diff --git a/.gitignore b/.gitignore index 9e68d19ddd..c14e808037 100644 --- a/.gitignore +++ b/.gitignore @@ -132,4 +132,3 @@ Mage.Client/serverlist.txt client_secrets.json dependency-reduced-pom.xml -/Mage.Server.Plugins/Mage.Game.PennyDreadfulCommanderFreeForAll/target/ \ No newline at end of file diff --git a/Mage.Client/release/sample-decks/Commander/Commander 2017/ArcaneWizardry.dck b/Mage.Client/release/sample-decks/Commander/Commander 2017/ArcaneWizardry.dck new file mode 100644 index 0000000000..dbf0f25dc1 --- /dev/null +++ b/Mage.Client/release/sample-decks/Commander/Commander 2017/ArcaneWizardry.dck @@ -0,0 +1,89 @@ +1 [C17:106] Corpse Augur +1 [C17:10] Galecaster Colossus +1 [C17:111] Decree of Pain +1 [C17:114] Go for the Throat +1 [C17:115] Magus of the Abyss +1 [C17:117] Necromantic Selection +1 [C17:121] Puppeteer Clique +1 [C17:12] Magus of the Mind +1 [C17:131] Chaos Warp +1 [C17:132] Comet Storm +1 [C17:13] Portal Mage +1 [C17:14] Bloodline Necromancer +1 [C17:166] Cauldron Dance +1 [C17:169] Crosis's Charm +1 [C17:16] Curse of Disturbance +1 [C17:171] Etherium-Horn Sorcerer +1 [C17:173] Havengul Lich +1 [C17:175] Izzet Chronarch +1 [C17:177] Marchesa, the Black Rose +1 [C17:178] Memory Plunder +1 [C17:180] Mercurial Chemister +1 [C17:183] Nin, the Pain Artist +1 [C17:185] Niv-Mizzet, the Firemind +1 [C17:186] Nivix Guildmage +1 [C17:18] Kindred Dominance +1 [C17:190] Rakdos Charm +1 [C17:193] Shadowmage Infiltrator +1 [C17:195] Silumgar's Command +1 [C17:199] Terminate +1 [C17:201] Vela the Night-Clad +1 [C17:206] Commander's Sphere +1 [C17:207] Darksteel Ingot +1 [C17:210] Fellwar Stone +1 [C17:217] Nevinyrral's Disk +1 [C17:21] Vindictive Lich +1 [C17:223] Sol Ring +1 [C17:229] Unstable Obelisk +1 [C17:232] Worn Powerstone +1 [C17:242] Command Tower +1 [C17:244] Crumbling Necropolis +1 [C17:245] Dimir Aqueduct +1 [C17:246] Dismal Backwater +1 [C17:248] Evolving Wilds +1 [C17:249] Exotic Orchard +1 [C17:24] Curse of Opulence +1 [C17:254] Grixis Panorama +1 [C17:256] Izzet Boilerworks +1 [C17:258] Jwar Isle Refuge +1 [C17:264] Mystifying Maze +1 [C17:26] Izzet Chemister +1 [C17:270] Rakdos Carnarium +1 [C17:283] Swiftwater Cliffs +1 [C17:284] Temple of the False God +1 [C17:285] Terramorphic Expanse +1 [C17:289] Vivid Crag +1 [C17:28] Shifting Shadow +1 [C17:290] Vivid Creek +1 [C17:292] Vivid Marsh +1 [C17:305] Mountain +1 [C17:306] Mountain +1 [C17:39] Kess, Dissident Mage +1 [C17:41] Mairsil, the Pretender +1 [C17:47] Taigam, Sidisi's Hand +1 [C17:54] Mirror of the Forebears +1 [C17:56] Path of Ancestry +1 [C17:80] Arcanis the Omnipotent +1 [C17:81] Archaeomancer +1 [C17:82] Azami, Lady of Scrolls +1 [C17:83] Body Double +1 [C17:84] Clone Legion +1 [C17:85] Harbinger of the Tides +1 [C17:86] Into the Roil +1 [C17:87] Merchant of Secrets +1 [C17:89] Opportunity +1 [C17:90] Polymorphist's Jest +1 [C17:91] Reality Shift +1 [C17:92] Sea Gate Oracle +1 [C17:93] Serendib Sorcerer +1 [C17:94] Spelltwine +1 [C17:97] Apprentice Necromancer +1 [C17:9] Curse of Verbosity +2 [C17:301] Swamp +2 [C17:302] Swamp +2 [C17:303] Swamp +2 [C17:304] Mountain +3 [C17:298] Island +3 [C17:300] Island +4 [C17:299] Island +SB: 1 [C17:38] Inalla, Archmage Ritualist diff --git a/Mage.Client/release/sample-decks/Commander/Commander 2017/DraconicDomination.dck b/Mage.Client/release/sample-decks/Commander/Commander 2017/DraconicDomination.dck new file mode 100644 index 0000000000..e1038198f9 --- /dev/null +++ b/Mage.Client/release/sample-decks/Commander/Commander 2017/DraconicDomination.dck @@ -0,0 +1,97 @@ +1 [C17:234] Arcane Sanctum +1 [C17:203] Armillary Sphere +1 [C17:161] Atarka, World Render +1 [C17:163] Bladewing the Risen +1 [C17:15] Boneyard Scourge +1 [C17:165] Broodmate Dragon +1 [C17:242] Command Tower +1 [C17:206] Commander's Sphere +1 [C17:168] Crosis, the Purger +1 [C17:133] Crucible of Fire +1 [C17:243] Crucible of the Spirit Dragon +1 [C17:244] Crumbling Necropolis +1 [C17:107] Crux of Fate +1 [C17:147] Cultivate +1 [C17:30] Curse of Bounty +1 [C17:24] Curse of Opulence +1 [C17:9] Curse of Verbosity +1 [C17:207] Darksteel Ingot +1 [C17:110] Deathbringer Regent +1 [C17:134] Dragon Tempest +1 [C17:135] Dragonlord's Servant +1 [C17:136] Dragonspeaker Shaman +1 [C17:209] Dreamstone Hedron +1 [C17:170] Dromoka, the Eternal +1 [C17:137] Earthquake +1 [C17:148] Elemental Bond +1 [C17:149] Farseek +1 [C17:211] Fist of Suns +1 [C17:307] Forest +1 [C17:308] Forest +1 [C17:309] Forest +1 [C17:4] Fortunate Few +1 [C17:37] Fractured Identity +1 [C17:251] Frontier Bivouac +1 [C17:150] Frontier Siege +1 [C17:255] Haven of the Spirit Dragon +1 [C17:138] Hellkite Charger +1 [C17:53] Herald's Horn +1 [C17:174] Intet, the Dreamer +1 [C17:298] Island +1 [C17:299] Island +1 [C17:300] Island +1 [C17:257] Jungle Shrine +1 [C17:11] Kindred Discovery +1 [C17:154] Kodama's Reach +1 [C17:176] Kolaghan, the Storm's Fury +1 [C17:215] Lightning Greaves +1 [C17:54] Mirror of the Forebears +1 [C17:88] Monastery Siege +1 [C17:263] Mystic Monastery +1 [C17:218] Nihil Spellbomb +1 [C17:184] Niv-Mizzet, Dracogenius +1 [C17:265] Nomad Outpost +1 [C17:45] O-Kagachi, Vengeful Kami +1 [C17:187] Ojutai, Soul of Winter +1 [C17:267] Opulent Palace +1 [C17:67] Orator of Ojutai +1 [C17:118] Painful Truths +1 [C17:119] Palace Siege +1 [C17:56] Path of Ancestry +1 [C17:295] Plains +1 [C17:296] Plains +1 [C17:297] Plains +1 [C17:156] Rain of Thorns +1 [C17:55] Ramos, Dragon Engine +1 [C17:141] Ryusei, the Falling Star +1 [C17:274] Sandsteppe Citadel +1 [C17:275] Savage Lands +1 [C17:191] Savage Ventmaw +1 [C17:6] Scalelord Reckoner +1 [C17:192] Scion of the Ur-Dragon +1 [C17:142] Scourge of Valkas +1 [C17:277] Seaside Citadel +1 [C17:194] Silumgar, the Drifting Death +1 [C17:223] Sol Ring +1 [C17:196] Spellbound Dragon +1 [C17:225] Steel Hellkite +1 [C17:74] Sunscorch Regent +1 [C17:301] Swamp +1 [C17:302] Swamp +1 [C17:303] Swamp +1 [C17:46] Taigam, Ojutai Master +1 [C17:198] Teneb, the Harvester +1 [C17:29] Territorial Hellkite +1 [C17:143] Tyrant's Familiar +1 [C17:144] Utvara Hellkite +1 [C17:289] Vivid Crag +1 [C17:290] Vivid Creek +1 [C17:291] Vivid Grove +1 [C17:292] Vivid Marsh +1 [C17:293] Vivid Meadow +1 [C17:49] Wasitora, Nekoru Queen +1 [C17:230] Wayfarer's Bauble +2 [C17:304] Mountain +2 [C17:305] Mountain +2 [C17:306] Mountain +SB: 1 [C17:48] The Ur-Dragon diff --git a/Mage.Client/release/sample-decks/Commander/Commander 2017/FelineFerocity.dck b/Mage.Client/release/sample-decks/Commander/Commander 2017/FelineFerocity.dck new file mode 100644 index 0000000000..989a2561e4 --- /dev/null +++ b/Mage.Client/release/sample-decks/Commander/Commander 2017/FelineFerocity.dck @@ -0,0 +1,92 @@ +1 [C17:145] Abundance +1 [C17:1] Alms Collector +1 [C17:202] Argentum Armor +1 [C17:2] Balan, Wandering Knight +1 [C17:162] Behemoth Sledge +1 [C17:235] Blighted Woodland +1 [C17:50] Bloodforged Battle-Axe +1 [C17:237] Blossoming Sands +1 [C17:242] Command Tower +1 [C17:58] Condemn +1 [C17:146] Crushing Vines +1 [C17:147] Cultivate +1 [C17:30] Curse of Bounty +1 [C17:3] Curse of Vitality +1 [C17:59] Divine Reckoning +1 [C17:209] Dreamstone Hedron +1 [C17:247] Elfhame Palace +1 [C17:248] Evolving Wilds +1 [C17:172] Fleecemane Lion +1 [C17:212] Grappling Hook +1 [C17:252] Grasslands +1 [C17:253] Graypelt Refuge +1 [C17:51] Hammer of Nazahn +1 [C17:151] Harmonize +1 [C17:213] Hedron Archive +1 [C17:52] Heirloom Blade +1 [C17:53] Herald's Horn +1 [C17:214] Hero's Blade +1 [C17:31] Hungry Lynx +1 [C17:152] Hunter's Prowess +1 [C17:61] Jareth, Leonine Titan +1 [C17:62] Jazal Goldmane +1 [C17:153] Jedit Ojanen of Efrava +1 [C17:63] Kemba, Kha Regent +1 [C17:32] Kindred Summons +1 [C17:260] Krosan Verge +1 [C17:64] Leonin Arbiter +1 [C17:65] Leonin Relic-Warder +1 [C17:66] Leonin Shikari +1 [C17:215] Lightning Greaves +1 [C17:216] Loxodon Warhammer +1 [C17:181] Mirari's Wake +1 [C17:43] Mirri, Weatherlight Duelist +1 [C17:261] Mosswort Bridge +1 [C17:262] Myriad Landscape +1 [C17:44] Nazahn, Revered Bladesmith +1 [C17:155] Nissa's Pilgrimage +1 [C17:266] Opal Palace +1 [C17:68] Oreskos Explorer +1 [C17:56] Path of Ancestry +1 [C17:188] Phantom Nishoba +1 [C17:189] Qasali Pridemage +1 [C17:33] Qasali Slingers +1 [C17:220] Quietus Spike +1 [C17:69] Raksha Golden Cub +1 [C17:157] Relic Crush +1 [C17:272] Rogue's Passage +1 [C17:71] Rout +1 [C17:273] Saltcrusted Steppe +1 [C17:278] Secluded Steppe +1 [C17:72] Seht's Tiger +1 [C17:279] Selesnya Guildgate +1 [C17:280] Selesnya Sanctuary +1 [C17:222] Skullclamp +1 [C17:223] Sol Ring +1 [C17:158] Soul's Majesty +1 [C17:73] Spirit of the Hearth +1 [C17:224] Staff of Nin +1 [C17:281] Stirring Wildwood +1 [C17:75] Sunspear Shikari +1 [C17:226] Swiftfoot Boots +1 [C17:228] Sword of Vengeance +1 [C17:227] Sword of the Animist +1 [C17:77] Taj-Nar Swordsmith +1 [C17:284] Temple of the False God +1 [C17:159] Temur Sabertooth +1 [C17:285] Terramorphic Expanse +1 [C17:286] Tranquil Expanse +1 [C17:287] Tranquil Thicket +1 [C17:34] Traverse the Outlands +1 [C17:291] Vivid Grove +1 [C17:293] Vivid Meadow +1 [C17:78] White Sun's Zenith +1 [C17:79] Wing Shards +1 [C17:160] Zendikar Resurgent +2 [C17:307] Forest +2 [C17:308] Forest +2 [C17:309] Forest +2 [C17:295] Plains +2 [C17:296] Plains +3 [C17:297] Plains +SB: 1 [C17:35] Arahbo, Roar of the World diff --git a/Mage.Client/release/sample-decks/Commander/Commander 2017/VampiricBloodlust.dck b/Mage.Client/release/sample-decks/Commander/Commander 2017/VampiricBloodlust.dck new file mode 100644 index 0000000000..3944360bfb --- /dev/null +++ b/Mage.Client/release/sample-decks/Commander/Commander 2017/VampiricBloodlust.dck @@ -0,0 +1,94 @@ +1 [C17:100] Blood Tribute +1 [C17:101] Bloodhusk Ritualist +1 [C17:102] Bloodlord of Vaasgoth +1 [C17:103] Butcher of Malakir +1 [C17:104] Captivating Vampire +1 [C17:105] Consuming Vapors +1 [C17:108] Damnable Pact +1 [C17:112] Drana, Kalastria Bloodchief +1 [C17:113] Falkenrath Noble +1 [C17:114] Go for the Throat +1 [C17:116] Malakir Bloodwitch +1 [C17:120] Pawn of Ulamog +1 [C17:122] Read the Bones +1 [C17:123] Sangromancer +1 [C17:124] Sanguine Bond +1 [C17:125] Skeletal Scrying +1 [C17:126] Skeletal Vampire +1 [C17:127] Syphon Mind +1 [C17:128] Underworld Connections +1 [C17:129] Vampire Nighthawk +1 [C17:130] Vein Drinker +1 [C17:139] Outpost Siege +1 [C17:140] Rakish Heir +1 [C17:14] Bloodline Necromancer +1 [C17:164] Blood Baron of Vizkopa +1 [C17:167] Crackling Doom +1 [C17:16] Curse of Disturbance +1 [C17:179] Merciless Eviction +1 [C17:17] Kheru Mind-Eater +1 [C17:182] Mortify +1 [C17:197] Stromkirk Captain +1 [C17:200] Tithe Drinker +1 [C17:204] Blade of the Bloodchief +1 [C17:205] Boros Signet +1 [C17:207] Darksteel Ingot +1 [C17:208] Door of Destinies +1 [C17:20] Patron of the Vein +1 [C17:218] Nihil Spellbomb +1 [C17:219] Orzhov Signet +1 [C17:221] Rakdos Signet +1 [C17:222] Skullclamp +1 [C17:223] Sol Ring +1 [C17:22] Bloodsworn Steward +1 [C17:231] Well of Lost Dreams +1 [C17:232] Worn Powerstone +1 [C17:233] Akoum Refuge +1 [C17:236] Bloodfell Caves +1 [C17:238] Bojuka Bog +1 [C17:239] Boros Garrison +1 [C17:23] Crimson Honor Guard +1 [C17:240] Boros Guildgate +1 [C17:241] Cinder Barrens +1 [C17:242] Command Tower +1 [C17:248] Evolving Wilds +1 [C17:250] Forsaken Sanctuary +1 [C17:259] Kabira Crossroads +1 [C17:25] Disrupt Decorum +1 [C17:265] Nomad Outpost +1 [C17:266] Opal Palace +1 [C17:268] Orzhov Basilica +1 [C17:269] Orzhov Guildgate +1 [C17:270] Rakdos Carnarium +1 [C17:271] Rakdos Guildgate +1 [C17:276] Scoured Barrens +1 [C17:27] Kindred Charge +1 [C17:282] Stone Quarry +1 [C17:285] Terramorphic Expanse +1 [C17:288] Urborg Volcano +1 [C17:294] Wind-Scarred Crag +1 [C17:295] Plains +1 [C17:296] Plains +1 [C17:297] Plains +1 [C17:305] Mountain +1 [C17:306] Mountain +1 [C17:3] Curse of Vitality +1 [C17:40] Licia, Sanguine Tribune +1 [C17:42] Mathas, Fiend Seeker +1 [C17:52] Heirloom Blade +1 [C17:56] Path of Ancestry +1 [C17:57] Blind Obedience +1 [C17:5] Kindred Boon +1 [C17:60] Fell the Mighty +1 [C17:70] Return to Dust +1 [C17:76] Swords to Plowshares +1 [C17:8] Teferi's Protection +1 [C17:95] Ambition's Cost +1 [C17:96] Anowon, the Ruin Sage +1 [C17:98] Black Market +1 [C17:99] Blood Artist +2 [C17:304] Mountain +3 [C17:301] Swamp +2 [C17:303] Swamp +3 [C17:302] Swamp +SB: 1 [C17:36] Edgar Markov diff --git a/Mage.Client/sounds/GameCanStart.wav b/Mage.Client/sounds/GameCanStart.wav new file mode 100644 index 0000000000..68d6389256 Binary files /dev/null and b/Mage.Client/sounds/GameCanStart.wav differ diff --git a/Mage.Client/src/main/java/mage/client/MageFrame.java b/Mage.Client/src/main/java/mage/client/MageFrame.java index d474fbd100..425172f7a6 100644 --- a/Mage.Client/src/main/java/mage/client/MageFrame.java +++ b/Mage.Client/src/main/java/mage/client/MageFrame.java @@ -44,8 +44,6 @@ import javax.swing.event.PopupMenuEvent; import javax.swing.event.PopupMenuListener; import mage.cards.action.ActionCallback; import mage.cards.decks.Deck; -import mage.cards.repository.CardCriteria; -import mage.cards.repository.CardInfo; import mage.cards.repository.CardRepository; import mage.client.cards.BigCard; import mage.client.chat.ChatPanelBasic; @@ -134,8 +132,6 @@ public class MageFrame extends javax.swing.JFrame implements MageClient { private final BalloonTip balloonTip; - private java.util.List missingCards; - /** * @return the session */ @@ -513,18 +509,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient { } private void checkForNewImages() { - long beforeCall = System.currentTimeMillis(); - missingCards = CardRepository.instance.findCards(new CardCriteria()); - LOGGER.info("Card pool load time: " + ((System.currentTimeMillis() - beforeCall) / 1000 + " seconds")); - beforeCall = System.currentTimeMillis(); - if (DownloadPictures.checkForMissingCardImages(missingCards)) { - LOGGER.info("Card images checking time: " + ((System.currentTimeMillis() - beforeCall) / 1000 + " seconds")); - UserRequestMessage message = new UserRequestMessage("New images available", "Card images are missing (" + missingCards.size() + "). Do you want to download the images?" - + "

You can deactivate the image download check on application start in the preferences."); - message.setButton1("No", null); - message.setButton2("Yes", PlayerAction.CLIENT_DOWNLOAD_CARD_IMAGES); - showUserRequestDialog(message); - } + // Removed TODO: Remove related pref code } public static void setActive(MagePane frame) { @@ -978,8 +963,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient { }//GEN-LAST:event_btnImagesActionPerformed public void downloadImages() { - java.util.List cards = CardRepository.instance.findCards(new CardCriteria()); - DownloadPictures.startDownload(null, cards); + DownloadPictures.startDownload(); } public void exitApp() { @@ -1317,7 +1301,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient { Plugins.instance.downloadSymbols(); break; case CLIENT_DOWNLOAD_CARD_IMAGES: - DownloadPictures.startDownload(null, missingCards); + DownloadPictures.startDownload(); break; case CLIENT_DISCONNECT: if (SessionHandler.isConnected()) { diff --git a/Mage.Client/src/main/java/mage/client/cards/CardArea.java b/Mage.Client/src/main/java/mage/client/cards/CardArea.java index e14e810134..5fa3840253 100644 --- a/Mage.Client/src/main/java/mage/client/cards/CardArea.java +++ b/Mage.Client/src/main/java/mage/client/cards/CardArea.java @@ -27,20 +27,9 @@ */ package mage.client.cards; -import java.awt.BorderLayout; -import java.awt.Component; -import java.awt.Dimension; -import java.awt.Rectangle; -import java.awt.event.MouseEvent; -import java.awt.event.MouseListener; -import java.util.List; -import java.util.UUID; -import javax.swing.JLayeredPane; -import javax.swing.JPanel; -import javax.swing.JPopupMenu; -import javax.swing.JScrollPane; import mage.cards.MageCard; import mage.client.plugins.impl.Plugins; +import mage.client.util.ClientEventType; import mage.client.util.Event; import mage.client.util.GUISizeHelper; import mage.client.util.Listener; @@ -50,6 +39,13 @@ import mage.view.CardsView; import mage.view.SimpleCardView; import org.mage.card.arcane.CardPanel; +import javax.swing.*; +import java.awt.*; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.util.List; +import java.util.UUID; + public class CardArea extends JPanel implements MouseListener { protected final CardEventSource cardEventSource = new CardEventSource(); @@ -240,15 +236,15 @@ public class CardArea extends JPanel implements MouseListener { e.consume(); if (obj instanceof Card) { if (e.isAltDown()) { - cardEventSource.altDoubleClick(((Card) obj).getOriginal(), "alt-double-click"); + cardEventSource.fireEvent(((Card) obj).getOriginal(), ClientEventType.ALT_DOUBLE_CLICK); } else { - cardEventSource.doubleClick(((Card) obj).getOriginal(), "double-click"); + cardEventSource.fireEvent(((Card) obj).getOriginal(), ClientEventType.DOUBLE_CLICK); } } else if (obj instanceof MageCard) { if (e.isAltDown()) { - cardEventSource.altDoubleClick(((MageCard) obj).getOriginal(), "alt-double-click"); + cardEventSource.fireEvent(((MageCard) obj).getOriginal(), ClientEventType.ALT_DOUBLE_CLICK); } else { - cardEventSource.doubleClick(((MageCard) obj).getOriginal(), "double-click"); + cardEventSource.fireEvent(((MageCard) obj).getOriginal(),ClientEventType.DOUBLE_CLICK); } } } @@ -270,14 +266,14 @@ public class CardArea extends JPanel implements MouseListener { checkMenu(e, null); } } else { - cardEventSource.actionConsumedEvent("action-consumed"); + cardEventSource.fireEvent(ClientEventType.ACTION_CONSUMED); } } private void checkMenu(MouseEvent Me, SimpleCardView card) { if (Me.isPopupTrigger()) { Me.consume(); - cardEventSource.showPopupMenuEvent(card, Me.getComponent(), Me.getX(), Me.getY(), "show-popup-menu"); + cardEventSource.fireEvent(card, Me.getComponent(), Me.getX(), Me.getY(), ClientEventType.SHOW_POP_UP_MENU); } } diff --git a/Mage.Client/src/main/java/mage/client/cards/CardEventSource.java b/Mage.Client/src/main/java/mage/client/cards/CardEventSource.java index 81e29d83db..fb7282a4a3 100644 --- a/Mage.Client/src/main/java/mage/client/cards/CardEventSource.java +++ b/Mage.Client/src/main/java/mage/client/cards/CardEventSource.java @@ -27,14 +27,13 @@ */ package mage.client.cards; -import java.awt.Component; -import java.io.Serializable; +import mage.client.util.*; import mage.client.util.Event; -import mage.client.util.EventDispatcher; -import mage.client.util.EventSource; -import mage.client.util.Listener; import mage.view.SimpleCardView; +import java.awt.*; +import java.io.Serializable; + /** * * @author BetaSteward_at_googlemail.com @@ -49,42 +48,22 @@ public class CardEventSource implements EventSource, Serializable { dispatcher.addListener(listener); } - public void setNumber(SimpleCardView card, String message, int number) { - dispatcher.fireEvent(new Event(card, message, number)); + public void fireEvent(SimpleCardView card, ClientEventType eventType, int number){ + dispatcher.fireEvent(new Event(card, eventType, number)); } - public void removeSpecificCard(SimpleCardView card, String message) { - dispatcher.fireEvent(new Event(card, message)); + public void fireEvent(ClientEventType eventType){ + dispatcher.fireEvent(new Event(null, eventType)); } - public void addSpecificCard(SimpleCardView card, String message) { - dispatcher.fireEvent(new Event(card, message)); + public void fireEvent(SimpleCardView card, ClientEventType eventType){ + dispatcher.fireEvent(new Event(card, eventType)); } - public void doubleClick(SimpleCardView card, String message) { - dispatcher.fireEvent(new Event(card, message)); - } - - public void altDoubleClick(SimpleCardView card, String message) { - dispatcher.fireEvent(new Event(card, message)); - } - - public void removeFromMainEvent(String message) { - dispatcher.fireEvent(new Event(null, message)); - } - - public void removeFromSideboardEvent(String message) { - dispatcher.fireEvent(new Event(null, message)); - } - - public void showPopupMenuEvent(SimpleCardView card, Component component, int x, int y, String message) { + public void fireEvent(SimpleCardView card, Component component, int x, int y, ClientEventType message) { dispatcher.fireEvent(new Event(card, message, x, y, component)); } - public void actionConsumedEvent(String message) { - dispatcher.fireEvent(new Event(null, message)); - } - @Override public void clearListeners() { dispatcher.clearListeners(); diff --git a/Mage.Client/src/main/java/mage/client/cards/CardGrid.java b/Mage.Client/src/main/java/mage/client/cards/CardGrid.java index dbf4c1d6da..fe918f797d 100644 --- a/Mage.Client/src/main/java/mage/client/cards/CardGrid.java +++ b/Mage.Client/src/main/java/mage/client/cards/CardGrid.java @@ -33,22 +33,10 @@ */ package mage.client.cards; -import java.awt.Component; -import java.awt.Dimension; -import java.awt.Rectangle; -import java.awt.event.MouseEvent; -import java.awt.event.MouseListener; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.UUID; import mage.cards.MageCard; import mage.client.deckeditor.SortSetting; import mage.client.plugins.impl.Plugins; +import mage.client.util.ClientEventType; import mage.client.util.Event; import mage.client.util.GUISizeHelper; import mage.client.util.Listener; @@ -57,6 +45,13 @@ import mage.view.CardView; import mage.view.CardsView; import org.mage.card.arcane.CardPanel; +import java.awt.*; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.util.*; +import java.util.List; +import java.util.Map.Entry; + /** * * @author BetaSteward_at_googlemail.com @@ -321,15 +316,15 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener, Object obj = e.getSource(); if (obj instanceof Card) { if (e.isAltDown()) { - cardEventSource.altDoubleClick(((Card) obj).getOriginal(), "alt-double-click"); + cardEventSource.fireEvent(((Card) obj).getOriginal(), ClientEventType.ALT_DOUBLE_CLICK); } else { - cardEventSource.doubleClick(((Card) obj).getOriginal(), "double-click"); + cardEventSource.fireEvent(((Card) obj).getOriginal(), ClientEventType.DOUBLE_CLICK); } } else if (obj instanceof MageCard) { if (e.isAltDown()) { - cardEventSource.altDoubleClick(((MageCard) obj).getOriginal(), "alt-double-click"); + cardEventSource.fireEvent(((MageCard) obj).getOriginal(), ClientEventType.ALT_DOUBLE_CLICK); } else { - cardEventSource.doubleClick(((MageCard) obj).getOriginal(), "double-click"); + cardEventSource.fireEvent(((MageCard) obj).getOriginal(), ClientEventType.DOUBLE_CLICK); } } } diff --git a/Mage.Client/src/main/java/mage/client/cards/CardsList.java b/Mage.Client/src/main/java/mage/client/cards/CardsList.java index 637271efa5..aca7e83919 100644 --- a/Mage.Client/src/main/java/mage/client/cards/CardsList.java +++ b/Mage.Client/src/main/java/mage/client/cards/CardsList.java @@ -62,7 +62,6 @@ import java.util.*; import java.util.List; /** - * * @author BetaSteward_at_googlemail.com */ public class CardsList extends javax.swing.JPanel implements MouseListener, ICardGrid { @@ -475,9 +474,9 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); setMinimumSize(new java.awt.Dimension(30, 30)); - setPreferredSize((!Beans.isDesignTime())? - (GUISizeHelper.editorCardDimension) - :(new Dimension(600, 600))); + setPreferredSize((!Beans.isDesignTime()) ? + (GUISizeHelper.editorCardDimension) + : (new Dimension(600, 600))); setRequestFocusEnabled(false); panelControl.setMaximumSize(new java.awt.Dimension(32767, 23)); @@ -522,7 +521,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar chkPiles.setMargin(new java.awt.Insets(3, 2, 2, 2)); chkPiles.addActionListener(evt -> chkPilesActionPerformed(evt)); - cbSortBy.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SortBy" })); + cbSortBy.setModel(new javax.swing.DefaultComboBoxModel(new String[]{"SortBy"})); cbSortBy.setToolTipText("Sort the cards if card view is active."); cbSortBy.setMaximumSize(new java.awt.Dimension(120, 20)); cbSortBy.setMinimumSize(new java.awt.Dimension(120, 20)); @@ -553,36 +552,36 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar javax.swing.GroupLayout panelControlLayout = new javax.swing.GroupLayout(panelControl); panelControl.setLayout(panelControlLayout); panelControlLayout.setHorizontalGroup( - panelControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(panelControlLayout.createSequentialGroup() - .addComponent(lblCount) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(lblLandCount) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(lblCreatureCount) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(chkPiles) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(cbSortBy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(jToggleListView, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jToggleCardView, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + panelControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(panelControlLayout.createSequentialGroup() + .addComponent(lblCount) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(lblLandCount) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(lblCreatureCount) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(chkPiles) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(cbSortBy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jToggleListView, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jToggleCardView, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); panelControlLayout.setVerticalGroup( - panelControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(panelControlLayout.createSequentialGroup() - .addGroup(panelControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(panelControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(lblCount) - .addComponent(lblLandCount) - .addComponent(lblCreatureCount) - .addComponent(chkPiles)) - .addComponent(cbSortBy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jToggleListView, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jToggleCardView, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(0, 0, 0)) + panelControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(panelControlLayout.createSequentialGroup() + .addGroup(panelControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(panelControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblCount) + .addComponent(lblLandCount) + .addComponent(lblCreatureCount) + .addComponent(chkPiles)) + .addComponent(cbSortBy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jToggleListView, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jToggleCardView, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(0, 0, 0)) ); jToggleListView.getAccessibleContext().setAccessibleDescription("Switch between image and table view."); @@ -593,16 +592,16 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(panelControl, javax.swing.GroupLayout.PREFERRED_SIZE, 467, Short.MAX_VALUE) - .addComponent(panelCardArea) + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(panelControl, javax.swing.GroupLayout.PREFERRED_SIZE, 467, Short.MAX_VALUE) + .addComponent(panelCardArea) ); layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(panelControl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(2, 2, 2) - .addComponent(panelCardArea, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)) + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(panelControl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(2, 2, 2) + .addComponent(panelCardArea, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)) ); }// //GEN-END:initComponents @@ -660,15 +659,15 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar e.consume(); if (obj instanceof Card) { if (e.isAltDown()) { - cardEventSource.altDoubleClick(((Card) obj).getOriginal(), "alt-double-click"); + cardEventSource.fireEvent(((Card) obj).getOriginal(), ClientEventType.ALT_DOUBLE_CLICK); } else { - cardEventSource.doubleClick(((Card) obj).getOriginal(), "double-click"); + cardEventSource.fireEvent(((Card) obj).getOriginal(), ClientEventType.DOUBLE_CLICK); } } else if (obj instanceof MageCard) { if (e.isAltDown()) { - cardEventSource.altDoubleClick(((MageCard) obj).getOriginal(), "alt-double-click"); + cardEventSource.fireEvent(((MageCard) obj).getOriginal(), ClientEventType.ALT_DOUBLE_CLICK); } else { - cardEventSource.doubleClick(((MageCard) obj).getOriginal(), "double-click"); + cardEventSource.fireEvent(((MageCard) obj).getOriginal(), ClientEventType.DOUBLE_CLICK); } } } @@ -695,7 +694,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar private void checkMenu(MouseEvent Me, SimpleCardView card) { if (Me.isPopupTrigger()) { Me.consume(); - cardEventSource.showPopupMenuEvent(card, Me.getComponent(), Me.getX(), Me.getY(), "show-popup-menu"); + cardEventSource.fireEvent(card, Me.getComponent(), Me.getX(), Me.getY(), ClientEventType.SHOW_POP_UP_MENU); } } diff --git a/Mage.Client/src/main/java/mage/client/cards/DraftGrid.java b/Mage.Client/src/main/java/mage/client/cards/DraftGrid.java index dc91515619..409a0ac273 100644 --- a/Mage.Client/src/main/java/mage/client/cards/DraftGrid.java +++ b/Mage.Client/src/main/java/mage/client/cards/DraftGrid.java @@ -34,17 +34,11 @@ package mage.client.cards; -import java.awt.Component; -import java.awt.Dimension; -import java.awt.Rectangle; -import java.awt.event.MouseEvent; -import java.awt.event.MouseListener; -import java.util.ArrayList; -import java.util.List; import mage.cards.CardDimensions; import mage.cards.MageCard; import mage.client.plugins.impl.Plugins; import mage.client.util.CardViewRarityComparator; +import mage.client.util.ClientEventType; import mage.client.util.Event; import mage.client.util.Listener; import mage.client.util.audio.AudioManager; @@ -53,6 +47,12 @@ import mage.view.CardView; import mage.view.CardsView; import org.apache.log4j.Logger; +import java.awt.*; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.util.ArrayList; +import java.util.List; + /** * * @author BetaSteward_at_googlemail.com @@ -186,7 +186,7 @@ public class DraftGrid extends javax.swing.JPanel implements MouseListener { if (e.getButton() == MouseEvent.BUTTON1) { Object obj = e.getSource(); if (obj instanceof MageCard) { - this.cardEventSource.doubleClick(((MageCard)obj).getOriginal(), "pick-a-card"); + this.cardEventSource.fireEvent(((MageCard)obj).getOriginal(), ClientEventType.PICK_A_CARD); this.hidePopup(); AudioManager.playOnDraftSelect(); } @@ -203,7 +203,7 @@ public class DraftGrid extends javax.swing.JPanel implements MouseListener { if (this.markedCard != null) { markedCard.setSelected(false); } - this.cardEventSource.doubleClick(((MageCard)obj).getOriginal(), "mark-a-card"); + this.cardEventSource.fireEvent(((MageCard)obj).getOriginal(), ClientEventType.MARK_A_CARD); markedCard = ((MageCard)obj); markedCard.setSelected(true); repaint(); diff --git a/Mage.Client/src/main/java/mage/client/cards/DragCardGrid.java b/Mage.Client/src/main/java/mage/client/cards/DragCardGrid.java index 6973fa4ea7..c93f0fecb9 100644 --- a/Mage.Client/src/main/java/mage/client/cards/DragCardGrid.java +++ b/Mage.Client/src/main/java/mage/client/cards/DragCardGrid.java @@ -70,7 +70,7 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg if (card.isSelected()) { stack.set(i, null); removeCardView(card); - eventSource.removeSpecificCard(card, "remove-specific-card"); + eventSource.fireEvent(card, ClientEventType.REMOVE_SPECIFIC_CARD); } } } @@ -326,7 +326,7 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg for (CardView card : cards) { card.setSelected(true); addCardView(card, false); - eventSource.addSpecificCard(card, "add-specific-card"); + eventSource.fireEvent(card, ClientEventType.ADD_SPECIFIC_CARD); } layoutGrid(); cardContent.repaint(); @@ -381,7 +381,7 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg for (int i = 0; i < stack.size(); ++i) { CardView card = stack.get(i); if (card.isSelected()) { - eventSource.removeSpecificCard(card, "remove-specific-card"); + eventSource.fireEvent(card, ClientEventType.REMOVE_SPECIFIC_CARD); stack.set(i, null); removeCardView(card); } @@ -1497,7 +1497,7 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg if (acard.getName().equals(card.getName())) { CardView pimpedCard = new CardView(acard); addCardView(pimpedCard, false); - eventSource.addSpecificCard(pimpedCard, "add-specific-card"); + eventSource.fireEvent(pimpedCard, ClientEventType.ADD_SPECIFIC_CARD); pimpedCards.put(pimpedCard, 1); didModify = true; } @@ -1748,9 +1748,9 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg if (e.getClickCount() == 1) { cardClicked(card, e); } else if (e.isAltDown()) { - eventSource.altDoubleClick(card, "alt-double-click"); + eventSource.fireEvent(card, ClientEventType.ALT_DOUBLE_CLICK); } else { - eventSource.doubleClick(card, "double-click"); + eventSource.fireEvent(card, ClientEventType.DOUBLE_CLICK); } } } @@ -1776,7 +1776,7 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg if (duplicated) { sortIntoGrid(card); - eventSource.addSpecificCard(card, "add-specific-card"); + eventSource.fireEvent(card, ClientEventType.ADD_SPECIFIC_CARD); // Update layout layoutGrid(); // Update draw diff --git a/Mage.Client/src/main/java/mage/client/deckeditor/DeckArea.java b/Mage.Client/src/main/java/mage/client/deckeditor/DeckArea.java index 64fdad5015..0ccbbee26a 100644 --- a/Mage.Client/src/main/java/mage/client/deckeditor/DeckArea.java +++ b/Mage.Client/src/main/java/mage/client/deckeditor/DeckArea.java @@ -32,10 +32,6 @@ */ package mage.client.deckeditor; -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import javax.swing.*; import mage.cards.Card; import mage.cards.decks.Deck; import mage.cards.decks.DeckCardLayout; @@ -43,12 +39,18 @@ import mage.client.cards.BigCard; import mage.client.cards.CardEventSource; import mage.client.cards.DragCardGrid; import mage.client.constants.Constants.DeckEditorMode; +import mage.client.util.ClientEventType; import mage.client.util.Event; import mage.client.util.GUISizeHelper; import mage.client.util.Listener; import mage.view.CardView; import mage.view.CardsView; +import javax.swing.*; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + /** * * @author BetaSteward_at_googlemail.com @@ -124,8 +126,8 @@ public class DeckArea extends javax.swing.JPanel { // Add to hidden and move to sideboard for (CardView card : cards) { hiddenCards.add(card.getId()); - maindeckVirtualEvent.removeSpecificCard(card, "remove-specific-card"); - sideboardVirtualEvent.addSpecificCard(card, "add-specific-card"); + maindeckVirtualEvent.fireEvent(card, ClientEventType.REMOVE_SPECIFIC_CARD); + sideboardVirtualEvent.fireEvent(card, ClientEventType.ADD_SPECIFIC_CARD); } loadDeck(lastDeck, lastBigCard); } diff --git a/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.java b/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.java index f2b93ca6ec..b7ae78ced5 100644 --- a/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.java +++ b/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.java @@ -27,23 +27,6 @@ */ package mage.client.deckeditor; -import java.awt.*; -import java.awt.event.*; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.util.*; -import java.util.List; -import java.util.concurrent.Callable; -import java.util.concurrent.CancellationException; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledFuture; -import java.util.concurrent.TimeUnit; -import javax.swing.*; -import javax.swing.Timer; -import javax.swing.filechooser.FileFilter; import mage.cards.Card; import mage.cards.Sets; import mage.cards.decks.Deck; @@ -72,6 +55,18 @@ import mage.view.CardView; import mage.view.SimpleCardView; import org.apache.log4j.Logger; +import javax.swing.*; +import javax.swing.Timer; +import javax.swing.filechooser.FileFilter; +import java.awt.*; +import java.awt.event.*; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.*; +import java.util.List; +import java.util.concurrent.*; + /** * @author BetaSteward_at_googlemail.com */ @@ -280,11 +275,11 @@ public class DeckEditorPanel extends javax.swing.JPanel { component.clearCardEventListeners(); component.addCardEventListener( (Listener) event -> { - switch (event.getEventName()) { - case "double-click": + switch (event.getEventType()) { + case DOUBLE_CLICK: moveSelectorCardToDeck(event); break; - case "alt-double-click": + case ALT_DOUBLE_CLICK: if (mode == DeckEditorMode.FREE_BUILDING) { moveSelectorCardToSideboard(event); } else { @@ -292,10 +287,10 @@ public class DeckEditorPanel extends javax.swing.JPanel { moveSelectorCardToDeck(event); } break; - case "remove-main": + case REMOVE_MAIN: DeckEditorPanel.this.deckArea.getDeckList().removeSelection(); break; - case "remove-sideboard": + case REMOVE_SIDEBOARD: DeckEditorPanel.this.deckArea.getSideboardList().removeSelection(); break; } @@ -306,8 +301,8 @@ public class DeckEditorPanel extends javax.swing.JPanel { this.deckArea.addDeckEventListener( (Listener) event -> { if (mode == DeckEditorMode.FREE_BUILDING) { - switch (event.getEventName()) { - case "double-click": { + switch (event.getEventType()) { + case DOUBLE_CLICK: { SimpleCardView cardView = (SimpleCardView) event.getSource(); for (Card card : deck.getCards()) { if (card.getId().equals(cardView.getId())) { @@ -319,7 +314,7 @@ public class DeckEditorPanel extends javax.swing.JPanel { refreshDeck(); break; } - case "alt-double-click": { + case ALT_DOUBLE_CLICK: { SimpleCardView cardView = (SimpleCardView) event.getSource(); for (Card card : deck.getCards()) { if (card.getId().equals(cardView.getId())) { @@ -332,11 +327,11 @@ public class DeckEditorPanel extends javax.swing.JPanel { refreshDeck(); break; } - case "set-number": { + case SET_NUMBER: { setCardNumberToCardsList(event, deck.getCards()); break; } - case "remove-specific-card": { + case REMOVE_SPECIFIC_CARD: { SimpleCardView cardView = (SimpleCardView) event.getSource(); for (Card card : deck.getCards()) { if (card.getId().equals(cardView.getId())) { @@ -347,7 +342,7 @@ public class DeckEditorPanel extends javax.swing.JPanel { } break; } - case "add-specific-card": { + case ADD_SPECIFIC_CARD: { SimpleCardView cardView = (CardView) event.getSource(); deck.getCards().add(retrieveTemporaryCard(cardView)); break; @@ -355,9 +350,9 @@ public class DeckEditorPanel extends javax.swing.JPanel { } } else { // constructing phase or sideboarding during match -> card goes always to sideboard - switch (event.getEventName()) { - case "double-click": - case "alt-double-click": { + switch (event.getEventType()) { + case DOUBLE_CLICK: + case ALT_DOUBLE_CLICK: { SimpleCardView cardView = (SimpleCardView) event.getSource(); for (Card card : deck.getCards()) { if (card.getId().equals(cardView.getId())) { @@ -371,7 +366,7 @@ public class DeckEditorPanel extends javax.swing.JPanel { refreshDeck(); break; } - case "remove-specific-card": { + case REMOVE_SPECIFIC_CARD: { SimpleCardView cardView = (SimpleCardView) event.getSource(); for (Card card : deck.getCards()) { if (card.getId().equals(cardView.getId())) { @@ -382,7 +377,7 @@ public class DeckEditorPanel extends javax.swing.JPanel { } break; } - case "add-specific-card": { + case ADD_SPECIFIC_CARD: { SimpleCardView cardView = (CardView) event.getSource(); deck.getCards().add(retrieveTemporaryCard(cardView)); break; @@ -395,8 +390,8 @@ public class DeckEditorPanel extends javax.swing.JPanel { (Listener) event -> { if (mode == DeckEditorMode.FREE_BUILDING) { // normal edit mode - switch (event.getEventName()) { - case "double-click": + switch (event.getEventType()) { + case DOUBLE_CLICK: // remove card from sideboard (don't add it to deck) SimpleCardView cardView = (SimpleCardView) event.getSource(); for (Card card : deck.getSideboard()) { @@ -408,7 +403,7 @@ public class DeckEditorPanel extends javax.swing.JPanel { hidePopup(); refreshDeck(); break; - case "alt-double-click": + case ALT_DOUBLE_CLICK: // remove card from sideboard cardView = (SimpleCardView) event.getSource(); for (Card card : deck.getSideboard()) { @@ -421,11 +416,11 @@ public class DeckEditorPanel extends javax.swing.JPanel { hidePopup(); refreshDeck(); break; - case "set-number": { + case SET_NUMBER: { setCardNumberToCardsList(event, deck.getSideboard()); break; } - case "remove-specific-card": { + case REMOVE_SPECIFIC_CARD: { cardView = (SimpleCardView) event.getSource(); for (Card card : deck.getSideboard()) { if (card.getId().equals(cardView.getId())) { @@ -436,7 +431,7 @@ public class DeckEditorPanel extends javax.swing.JPanel { } break; } - case "add-specific-card": { + case ADD_SPECIFIC_CARD: { cardView = (CardView) event.getSource(); deck.getSideboard().add(retrieveTemporaryCard(cardView)); break; @@ -444,8 +439,8 @@ public class DeckEditorPanel extends javax.swing.JPanel { } } else { // construct phase or sideboarding during match - switch (event.getEventName()) { - case "remove-specific-card": { + switch (event.getEventType()) { + case REMOVE_SPECIFIC_CARD: { SimpleCardView cardView = (SimpleCardView) event.getSource(); for (Card card : deck.getSideboard()) { if (card.getId().equals(cardView.getId())) { @@ -456,13 +451,13 @@ public class DeckEditorPanel extends javax.swing.JPanel { } break; } - case "add-specific-card": { + case ADD_SPECIFIC_CARD: { SimpleCardView cardView = (CardView) event.getSource(); deck.getSideboard().add(retrieveTemporaryCard(cardView)); break; } - case "double-click": - case "alt-double-click": + case DOUBLE_CLICK: + case ALT_DOUBLE_CLICK: SimpleCardView cardView = (SimpleCardView) event.getSource(); for (Card card : deck.getSideboard()) { if (card.getId().equals(cardView.getId())) { diff --git a/Mage.Client/src/main/java/mage/client/deckeditor/table/TableModel.java b/Mage.Client/src/main/java/mage/client/deckeditor/table/TableModel.java index cc54162334..44ed87185b 100644 --- a/Mage.Client/src/main/java/mage/client/deckeditor/table/TableModel.java +++ b/Mage.Client/src/main/java/mage/client/deckeditor/table/TableModel.java @@ -33,6 +33,7 @@ import mage.client.cards.CardEventSource; import mage.client.cards.ICardGrid; import mage.client.deckeditor.SortSetting; import mage.client.plugins.impl.Plugins; +import mage.client.util.ClientEventType; import mage.client.util.Config; import mage.client.util.Event; import mage.client.util.Listener; @@ -146,7 +147,7 @@ public class TableModel extends AbstractTableModel implements ICardGrid { } // no easy logic for merge :) - for (Iterator> i = cards.entrySet().iterator(); i.hasNext();) { + for (Iterator> i = cards.entrySet().iterator(); i.hasNext(); ) { Entry entry = i.next(); if (!showCards.containsKey(entry.getKey())) { i.remove(); @@ -306,25 +307,25 @@ public class TableModel extends AbstractTableModel implements ICardGrid { public void setNumber(int index, int number) { CardView card = view.get(index); - cardEventSource.setNumber(card, "set-number", number); + cardEventSource.fireEvent(card, ClientEventType.SET_NUMBER, number); } public void doubleClick(int index) { CardView card = view.get(index); - cardEventSource.doubleClick(card, "double-click"); + cardEventSource.fireEvent(card, ClientEventType.DOUBLE_CLICK); } public void altDoubleClick(int index) { CardView card = view.get(index); - cardEventSource.altDoubleClick(card, "alt-double-click"); + cardEventSource.fireEvent(card, ClientEventType.ALT_DOUBLE_CLICK); } public void removeFromMainEvent(int index) { - cardEventSource.removeFromMainEvent("remove-main"); + cardEventSource.fireEvent(ClientEventType.REMOVE_MAIN); } public void removeFromSideEvent(int index) { - cardEventSource.removeFromSideboardEvent("remove-sideboard"); + cardEventSource.fireEvent(ClientEventType.REMOVE_SIDEBOARD); } public void addListeners(final JTable table) { diff --git a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form index 83e3d152dd..8a312223d6 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form +++ b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form @@ -121,10 +121,16 @@ - - - - + + + + + + + + + + @@ -133,7 +139,10 @@ - + + + + @@ -176,6 +185,24 @@ + + + + + + + + + + + + + + + + + + diff --git a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java index 5eabe7d720..eeb58e8d05 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java @@ -91,6 +91,7 @@ public class PreferencesDialog extends javax.swing.JDialog { public static final String KEY_SHOW_TOOLTIPS_DELAY = "showTooltipsDelay"; public static final String KEY_SHOW_CARD_NAMES = "showCardNames"; + public static final String KEY_SHOW_FULL_IMAGE_PATH = "showFullImagePath"; public static final String KEY_PERMANENTS_IN_ONE_PILE = "nonLandPermanentsInOnePile"; public static final String KEY_SHOW_PLAYER_NAMES_PERMANENTLY = "showPlayerNamesPermanently"; public static final String KEY_SHOW_ABILITY_PICKER_FORCED = "showAbilityPicker"; @@ -399,6 +400,7 @@ public class PreferencesDialog extends javax.swing.JDialog { tabMain = new javax.swing.JPanel(); main_card = new javax.swing.JPanel(); showCardName = new javax.swing.JCheckBox(); + showFullImagePath = new javax.swing.JCheckBox(); tooltipDelayLabel = new javax.swing.JLabel(); tooltipDelay = new javax.swing.JSlider(); main_game = new javax.swing.JPanel(); @@ -613,28 +615,48 @@ public class PreferencesDialog extends javax.swing.JDialog { tooltipDelay.setToolTipText("The time the appearance of the tooltip window for a card is delayed.
\nIf set to zero, the tooltip window won't be shown at all."); tooltipDelay.setValue(300); + showFullImagePath.setSelected(false); + showFullImagePath.setToolTipText("Show the path Xmage is expecting for this card's image (only displays if missing)"); + showFullImagePath.setActionCommand(""); + showFullImagePath.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + showFullImagePath.setLabel("Display image path for missing images"); + showFullImagePath.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + showFullImagePathActionPerformed(evt); + } + }); + org.jdesktop.layout.GroupLayout main_cardLayout = new org.jdesktop.layout.GroupLayout(main_card); main_card.setLayout(main_cardLayout); main_cardLayout.setHorizontalGroup( main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(main_cardLayout.createSequentialGroup() .add(6, 6, 6) - .add(main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) - .add(tooltipDelayLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 308, Short.MAX_VALUE) - .add(org.jdesktop.layout.GroupLayout.LEADING, showCardName) - .add(tooltipDelay, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .add(main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) + .add(tooltipDelayLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 308, Short.MAX_VALUE) + .add(tooltipDelay, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .add(main_cardLayout.createSequentialGroup() + .add(showCardName) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(showFullImagePath))) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); main_cardLayout.setVerticalGroup( main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(main_cardLayout.createSequentialGroup() - .add(showCardName) + .add(main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(showCardName) + .add(showFullImagePath)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(tooltipDelayLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(tooltipDelay, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); + showFullImagePath.getAccessibleContext().setAccessibleName("Display image path for missing images"); + showFullImagePath.getAccessibleContext().setAccessibleDescription("Show the path Xmage is expecting for this card's image (only displays if missing)"); + main_game.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Game")); nonLandPermanentsInOnePile.setSelected(true); @@ -720,7 +742,7 @@ public class PreferencesDialog extends javax.swing.JDialog { .add(cbAllowRequestToShowHandCards, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(cbShowStormCounter, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(cbAskMoveToGraveOrder, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap(255, Short.MAX_VALUE)) ); main_gameLayout.setVerticalGroup( main_gameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) @@ -2679,6 +2701,7 @@ public class PreferencesDialog extends javax.swing.JDialog { // main save(prefs, dialog.tooltipDelay, KEY_SHOW_TOOLTIPS_DELAY, "true", "false", UPDATE_CACHE_POLICY); save(prefs, dialog.showCardName, KEY_SHOW_CARD_NAMES, "true", "false", UPDATE_CACHE_POLICY); + save(prefs, dialog.showFullImagePath, KEY_SHOW_FULL_IMAGE_PATH, "true", "false", UPDATE_CACHE_POLICY); save(prefs, dialog.nonLandPermanentsInOnePile, KEY_PERMANENTS_IN_ONE_PILE, "true", "false", UPDATE_CACHE_POLICY); save(prefs, dialog.showPlayerNamesPermanently, KEY_SHOW_PLAYER_NAMES_PERMANENTLY, "true", "false", UPDATE_CACHE_POLICY); save(prefs, dialog.showAbilityPickerForced, KEY_SHOW_ABILITY_PICKER_FORCED, "true", "false", UPDATE_CACHE_POLICY); @@ -3119,6 +3142,9 @@ public class PreferencesDialog extends javax.swing.JDialog { }); }//GEN-LAST:event_bttnResetControlsActionPerformed + private void showFullImagePathActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showFullImagePathActionPerformed + }//GEN-LAST:event_showFullImagePathActionPerformed + private void showProxySettings() { Connection.ProxyType proxyType = (Connection.ProxyType) cbProxyType.getSelectedItem(); switch (proxyType) { @@ -3222,6 +3248,7 @@ public class PreferencesDialog extends javax.swing.JDialog { private static void loadPhases(Preferences prefs) { load(prefs, dialog.tooltipDelay, KEY_SHOW_TOOLTIPS_DELAY, "300"); load(prefs, dialog.showCardName, KEY_SHOW_CARD_NAMES, "true"); + load(prefs, dialog.showFullImagePath, KEY_SHOW_FULL_IMAGE_PATH, "true"); load(prefs, dialog.nonLandPermanentsInOnePile, KEY_PERMANENTS_IN_ONE_PILE, "true"); load(prefs, dialog.showPlayerNamesPermanently, KEY_SHOW_PLAYER_NAMES_PERMANENTLY, "true"); load(prefs, dialog.showAbilityPickerForced, KEY_SHOW_ABILITY_PICKER_FORCED, "true"); @@ -3898,6 +3925,7 @@ public class PreferencesDialog extends javax.swing.JDialog { private javax.swing.JButton saveButton; private javax.swing.JCheckBox showAbilityPickerForced; private javax.swing.JCheckBox showCardName; + private javax.swing.JCheckBox showFullImagePath; private javax.swing.JCheckBox showPlayerNamesPermanently; private javax.swing.JSlider sliderCardSizeHand; private javax.swing.JSlider sliderCardSizeMaxBattlefield; diff --git a/Mage.Client/src/main/java/mage/client/dialog/TableWaitingDialog.java b/Mage.Client/src/main/java/mage/client/dialog/TableWaitingDialog.java index 0753be8248..a6e523cfcc 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/TableWaitingDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/TableWaitingDialog.java @@ -438,7 +438,10 @@ class UpdateSeatsTask extends SwingWorker { int current = getPlayersCount(tableView); if (current != count) { if (count > 0) { - if (current > count) { + if (current == tableView.getSeats().size()) { + MageTray.instance.displayMessage("The game can start."); + AudioManager.playGameCanStart(); + } else if (current > count) { MageTray.instance.displayMessage("New player joined your game."); AudioManager.playPlayerJoinedTable(); } else { diff --git a/Mage.Client/src/main/java/mage/client/draft/DraftPanel.java b/Mage.Client/src/main/java/mage/client/draft/DraftPanel.java index 56b22b9b38..a5322b4f52 100644 --- a/Mage.Client/src/main/java/mage/client/draft/DraftPanel.java +++ b/Mage.Client/src/main/java/mage/client/draft/DraftPanel.java @@ -33,9 +33,25 @@ */ package mage.client.draft; -import java.awt.Component; -import java.awt.Dimension; -import java.awt.Image; +import mage.cards.repository.CardInfo; +import mage.cards.repository.CardRepository; +import mage.client.MageFrame; +import mage.client.SessionHandler; +import mage.client.components.tray.MageTray; +import mage.client.deckeditor.SortSettingDraft; +import mage.client.dialog.PreferencesDialog; +import mage.client.plugins.impl.Plugins; +import mage.client.util.*; +import mage.client.util.Event; +import mage.client.util.audio.AudioManager; +import mage.client.util.gui.BufferedImageBuilder; +import mage.constants.PlayerAction; +import mage.view.*; +import org.apache.log4j.Logger; + +import javax.swing.*; +import javax.swing.Timer; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; @@ -46,43 +62,7 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.StandardOpenOption; import java.text.SimpleDateFormat; -import java.util.Collection; -import java.util.Date; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.Map; -import java.util.Set; -import java.util.UUID; -import javax.swing.AbstractAction; -import javax.swing.ImageIcon; -import javax.swing.JComponent; -import javax.swing.JMenuItem; -import javax.swing.JPopupMenu; -import javax.swing.KeyStroke; -import javax.swing.Timer; -import mage.cards.repository.CardInfo; -import mage.cards.repository.CardRepository; -import mage.client.MageFrame; -import mage.client.SessionHandler; -import mage.client.components.tray.MageTray; -import mage.client.deckeditor.SortSettingDraft; -import mage.client.dialog.PreferencesDialog; -import mage.client.plugins.impl.Plugins; -import mage.client.util.CardsViewUtil; -import mage.client.util.Event; -import mage.client.util.GUISizeHelper; -import mage.client.util.ImageHelper; -import mage.client.util.Listener; -import mage.client.util.audio.AudioManager; -import mage.client.util.gui.BufferedImageBuilder; -import mage.constants.PlayerAction; -import mage.view.CardsView; -import mage.view.DraftPickView; -import mage.view.DraftView; -import mage.view.SimpleCardView; -import mage.view.SimpleCardsView; -import mage.view.UserRequestMessage; -import org.apache.log4j.Logger; +import java.util.*; /** * @@ -304,7 +284,7 @@ public class DraftPanel extends javax.swing.JPanel { this.draftPicks.clearCardEventListeners(); this.draftPicks.addCardEventListener((Listener) event -> { - if (event.getEventName().equals("show-popup-menu")) { + if (event.getEventType() == ClientEventType.SHOW_POP_UP_MENU) { if (event.getSource() != null) { // Popup Menu Card cardIdPopupMenu = ((SimpleCardView) event.getSource()).getId(); @@ -322,7 +302,7 @@ public class DraftPanel extends javax.swing.JPanel { this.draftBooster.clearCardEventListeners(); this.draftBooster.addCardEventListener( (Listener) event -> { - if (event.getEventName().equals("pick-a-card")) { + if (event.getEventType() == ClientEventType.PICK_A_CARD) { SimpleCardView source = (SimpleCardView) event.getSource(); DraftPickView view = SessionHandler.sendCardPick(draftId, source.getId(), cardsHidden); if (view != null) { @@ -332,7 +312,7 @@ public class DraftPanel extends javax.swing.JPanel { setMessage("Waiting for other players"); } } - if (event.getEventName().equals("mark-a-card")) { + if (event.getEventType() == ClientEventType.MARK_A_CARD) { SimpleCardView source = (SimpleCardView) event.getSource(); SessionHandler.sendCardMark(draftId, source.getId()); } diff --git a/Mage.Client/src/main/java/mage/client/game/GamePanel.java b/Mage.Client/src/main/java/mage/client/game/GamePanel.java index c215382b40..a014167df0 100644 --- a/Mage.Client/src/main/java/mage/client/game/GamePanel.java +++ b/Mage.Client/src/main/java/mage/client/game/GamePanel.java @@ -27,61 +27,6 @@ */ package mage.client.game; -import java.awt.AWTEvent; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Component; -import static java.awt.Component.LEFT_ALIGNMENT; -import java.awt.Container; -import java.awt.Dimension; -import java.awt.Font; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.Point; -import java.awt.Rectangle; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.ComponentAdapter; -import java.awt.event.ComponentEvent; -import java.awt.event.ComponentListener; -import java.awt.event.InputEvent; -import java.awt.event.KeyEvent; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.MouseListener; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.UUID; -import java.util.concurrent.CancellationException; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; -import javax.swing.AbstractAction; -import javax.swing.BorderFactory; -import javax.swing.GroupLayout; -import javax.swing.GroupLayout.Alignment; -import javax.swing.ImageIcon; -import javax.swing.JButton; -import javax.swing.JComponent; -import javax.swing.JLayeredPane; -import javax.swing.JMenuItem; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JPopupMenu; -import javax.swing.KeyStroke; -import javax.swing.SwingUtilities; -import javax.swing.SwingWorker; -import javax.swing.Timer; -import javax.swing.border.Border; -import javax.swing.border.EmptyBorder; -import javax.swing.border.LineBorder; -import javax.swing.plaf.basic.BasicSplitPaneDivider; -import javax.swing.plaf.basic.BasicSplitPaneUI; import mage.cards.Card; import mage.cards.action.ActionCallback; import mage.choices.Choice; @@ -95,51 +40,43 @@ import mage.client.components.KeyboundButton; import mage.client.components.MageComponents; import mage.client.components.ext.dlg.DialogManager; import mage.client.components.layout.RelativeLayout; -import mage.client.dialog.CardInfoWindowDialog; +import mage.client.dialog.*; import mage.client.dialog.CardInfoWindowDialog.ShowType; -import mage.client.dialog.PickChoiceDialog; -import mage.client.dialog.PickNumberDialog; -import mage.client.dialog.PickPileDialog; -import mage.client.dialog.PreferencesDialog; -import static mage.client.dialog.PreferencesDialog.*; -import mage.client.dialog.ShowCardsDialog; import mage.client.game.FeedbackPanel.FeedbackMode; import mage.client.plugins.adapters.MageActionCallback; import mage.client.plugins.impl.Plugins; -import mage.client.util.CardsViewUtil; +import mage.client.util.*; import mage.client.util.Event; -import mage.client.util.GUISizeHelper; -import mage.client.util.GameManager; -import mage.client.util.Listener; import mage.client.util.audio.AudioManager; import mage.client.util.gui.ArrowBuilder; import mage.client.util.gui.MageDialogState; -import mage.constants.Constants; -import mage.constants.EnlargeMode; -import mage.constants.PhaseStep; -import mage.constants.PlayerAction; -import static mage.constants.PlayerAction.TRIGGER_AUTO_ORDER_ABILITY_FIRST; -import static mage.constants.PlayerAction.TRIGGER_AUTO_ORDER_ABILITY_LAST; -import static mage.constants.PlayerAction.TRIGGER_AUTO_ORDER_NAME_FIRST; -import static mage.constants.PlayerAction.TRIGGER_AUTO_ORDER_NAME_LAST; -import static mage.constants.PlayerAction.TRIGGER_AUTO_ORDER_RESET_ALL; -import mage.constants.Zone; +import mage.constants.*; import mage.game.events.PlayerQueryEvent; -import mage.view.AbilityPickerView; -import mage.view.CardView; -import mage.view.CardsView; -import mage.view.ExileView; -import mage.view.GameView; -import mage.view.LookedAtView; -import mage.view.MatchView; -import mage.view.PlayerView; -import mage.view.RevealedView; -import mage.view.SimpleCardsView; -import mage.view.UserRequestMessage; +import mage.view.*; import org.apache.log4j.Logger; import org.mage.card.arcane.CardPanel; import org.mage.plugins.card.utils.impl.ImageManagerImpl; +import javax.swing.*; +import javax.swing.GroupLayout.Alignment; +import javax.swing.Timer; +import javax.swing.border.Border; +import javax.swing.border.EmptyBorder; +import javax.swing.border.LineBorder; +import javax.swing.plaf.basic.BasicSplitPaneDivider; +import javax.swing.plaf.basic.BasicSplitPaneUI; +import java.awt.*; +import java.awt.event.*; +import java.io.Serializable; +import java.util.*; +import java.util.List; +import java.util.concurrent.CancellationException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; + +import static mage.client.dialog.PreferencesDialog.*; +import static mage.constants.PlayerAction.*; + /** * @author BetaSteward_at_googlemail.com, nantuko8 */ @@ -2251,7 +2188,7 @@ public final class GamePanel extends javax.swing.JPanel { // Event listener for the ShowCardsDialog private Listener getShowCardsEventListener(final ShowCardsDialog dialog) { return (Listener) event -> { - if (event.getEventName().equals("show-popup-menu")) { + if (event.getEventType() == ClientEventType.SHOW_POP_UP_MENU) { if (event.getComponent() != null && event.getComponent() instanceof CardPanel) { JPopupMenu menu = ((CardPanel) event.getComponent()).getPopupMenu(); if (menu != null) { @@ -2260,7 +2197,7 @@ public final class GamePanel extends javax.swing.JPanel { } } } - if (event.getEventName().equals("action-consumed")) { + if (event.getEventType() == ClientEventType.ACTION_CONSUMED) { dialog.removeDialog(); } }; diff --git a/Mage.Client/src/main/java/mage/client/remote/CallbackClientImpl.java b/Mage.Client/src/main/java/mage/client/remote/CallbackClientImpl.java index 6e1db68012..386c2156a6 100644 --- a/Mage.Client/src/main/java/mage/client/remote/CallbackClientImpl.java +++ b/Mage.Client/src/main/java/mage/client/remote/CallbackClientImpl.java @@ -27,6 +27,10 @@ */ package mage.client.remote; +import java.awt.event.KeyEvent; +import java.util.List; +import java.util.UUID; +import javax.swing.*; import mage.cards.decks.Deck; import mage.client.MageFrame; import mage.client.SessionHandler; @@ -48,11 +52,6 @@ import mage.view.*; import mage.view.ChatMessage.MessageType; import org.apache.log4j.Logger; -import javax.swing.*; -import java.awt.event.KeyEvent; -import java.util.List; -import java.util.UUID; - /** * * @author BetaSteward_at_googlemail.com @@ -325,11 +324,11 @@ public class CallbackClientImpl implements CallbackClient { break; } case VIEW_LIMITED_DECK: { - TableClientMessage message = (TableClientMessage) callback.getData(); - DeckView deckView = message.getDeck(); - Deck deck = DeckUtil.construct(deckView); - viewLimitedDeck(deck, message.getTableId(), message.getTime()); - break; + TableClientMessage message = (TableClientMessage) callback.getData(); + DeckView deckView = message.getDeck(); + Deck deck = DeckUtil.construct(deckView); + viewLimitedDeck(deck, message.getTableId(), message.getTime()); + break; } case CONSTRUCT: { TableClientMessage message = (TableClientMessage) callback.getData(); @@ -356,14 +355,6 @@ public class CallbackClientImpl implements CallbackClient { } break; } - case DRAFT_INFORM: // if (callback.getMessageId() > messageId) { - { - DraftClientMessage message = (DraftClientMessage) callback.getData(); - } -// } else { -// logger.warn("message out of sequence - ignoring"); -// } - break; case DRAFT_INIT: { DraftClientMessage message = (DraftClientMessage) callback.getData(); DraftPanel panel = MageFrame.getDraft(callback.getObjectId()); diff --git a/Mage.Client/src/main/java/mage/client/table/PlayerTypeEventSource.java b/Mage.Client/src/main/java/mage/client/table/PlayerTypeEventSource.java index f7d9d243dc..7c942fa508 100644 --- a/Mage.Client/src/main/java/mage/client/table/PlayerTypeEventSource.java +++ b/Mage.Client/src/main/java/mage/client/table/PlayerTypeEventSource.java @@ -28,11 +28,9 @@ package mage.client.table; +import mage.client.util.*; + import java.io.Serializable; -import mage.client.util.Event; -import mage.client.util.EventDispatcher; -import mage.client.util.EventSource; -import mage.client.util.Listener; /** * @@ -48,7 +46,7 @@ public class PlayerTypeEventSource implements EventSource, Serializable { } public void playerTypeChanged() { - dispatcher.fireEvent(new Event(null, "playerTypeChanged")); + dispatcher.fireEvent(new Event(null, ClientEventType.PLAYER_TYPE_CHANGED)); } @Override diff --git a/Mage.Client/src/main/java/mage/client/util/ClientEventType.java b/Mage.Client/src/main/java/mage/client/util/ClientEventType.java new file mode 100644 index 0000000000..252707f26c --- /dev/null +++ b/Mage.Client/src/main/java/mage/client/util/ClientEventType.java @@ -0,0 +1,20 @@ +package mage.client.util; + +public enum ClientEventType { + SET_NUMBER, + ACTION_CONSUMED, + DOUBLE_CLICK, + ALT_DOUBLE_CLICK, + REMOVE_MAIN, + REMOVE_SIDEBOARD, + SHOW_POP_UP_MENU, + REMOVE_SPECIFIC_CARD, + ADD_SPECIFIC_CARD, + PICK_A_CARD, + MARK_A_CARD, + PLAYER_TYPE_CHANGED + + + + +} diff --git a/Mage.Client/src/main/java/mage/client/util/Event.java b/Mage.Client/src/main/java/mage/client/util/Event.java index bcf8b64ac8..f753ced26e 100644 --- a/Mage.Client/src/main/java/mage/client/util/Event.java +++ b/Mage.Client/src/main/java/mage/client/util/Event.java @@ -38,27 +38,27 @@ import java.io.Serializable; public class Event implements Serializable { private final Object source; private final Component component; - private final String eventName; + private final ClientEventType eventType; private final int number; private final int xPos; private final int yPos; - public Event(Object source, String eventName) { - this(source, eventName, 0); + public Event(Object source, ClientEventType eventType) { + this(source, eventType, 0); } - public Event(Object source, String eventName, int number) { + public Event(Object source, ClientEventType eventType, int number) { this.source = source; - this.eventName = eventName; + this.eventType = eventType; this.number = number; this.xPos = 0; this.yPos = 0; this.component = null; } - public Event(Object source, String eventName, int xPos, int yPos, Component component) { + public Event(Object source, ClientEventType eventType, int xPos, int yPos, Component component) { this.source = source; - this.eventName = eventName; + this.eventType = eventType; this.number =0; this.xPos = xPos; this.yPos = yPos; @@ -69,8 +69,8 @@ public class Event implements Serializable { return source; } - public String getEventName() { - return eventName; + public ClientEventType getEventType() { + return eventType; } public int getNumber() { diff --git a/Mage.Client/src/main/java/mage/client/util/audio/AudioManager.java b/Mage.Client/src/main/java/mage/client/util/audio/AudioManager.java index cefdab11aa..da018d0d8f 100644 --- a/Mage.Client/src/main/java/mage/client/util/audio/AudioManager.java +++ b/Mage.Client/src/main/java/mage/client/util/audio/AudioManager.java @@ -40,6 +40,7 @@ public class AudioManager { private MageClip tournamentStarted = null; private MageClip yourGameStarted = null; private MageClip playerJoinedTable = null; + private MageClip gameCanStart = null; private MageClip playerSubmittedDeck = null; private MageClip playerWhispered = null; private MageClip playerLeft = null; @@ -218,6 +219,13 @@ public class AudioManager { } checkAndPlayClip(audioManager.playerJoinedTable); } + + public static void playGameCanStart() { + if (audioManager.gameCanStart == null) { + audioManager.gameCanStart = new MageClip(Constants.BASE_SOUND_PATH + "GameCanStart.wav", AudioGroup.OtherSounds); + } + checkAndPlayClip(audioManager.gameCanStart); + } public static void playYourGameStarted() { if (audioManager.yourGameStarted == null) { diff --git a/Mage.Client/src/main/java/org/mage/card/arcane/CardPanelComponentImpl.java b/Mage.Client/src/main/java/org/mage/card/arcane/CardPanelComponentImpl.java index 01c7a6db23..c57a41f043 100644 --- a/Mage.Client/src/main/java/org/mage/card/arcane/CardPanelComponentImpl.java +++ b/Mage.Client/src/main/java/org/mage/card/arcane/CardPanelComponentImpl.java @@ -31,7 +31,8 @@ import java.util.UUID; import static org.mage.plugins.card.constants.Constants.THUMBNAIL_SIZE_FULL; /** - * Class for drawing the mage card object by using a form based JComponent approach + * Class for drawing the mage card object by using a form based JComponent + * approach * * @author arcane, nantuko, noxx, stravant */ @@ -68,10 +69,13 @@ public class CardPanelComponentImpl extends CardPanel { private final GlowText titleText; private final GlowText ptText; + private final JLabel fullImageText; + private String fullImagePath = null; private boolean hasImage = false; private boolean displayTitleAnyway; + private boolean displayFullImagePath; private final static Map IMAGE_CACHE; @@ -202,7 +206,7 @@ public class CardPanelComponentImpl extends CardPanel { counterPanel.setVisible(false); } - + // Ability icon if (newGameCard.isAbility()) { if (newGameCard.getAbilityType() == AbilityType.TRIGGERED) { @@ -211,13 +215,14 @@ public class CardPanelComponentImpl extends CardPanel { setTypeIcon(ImageManagerImpl.instance.getActivatedAbilityImage(), "Activated Ability"); } } - + // Token icon if (this.gameCard.isToken()) { setTypeIcon(ImageManagerImpl.instance.getTokenIconImage(), "Token Permanent"); } displayTitleAnyway = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_CARD_NAMES, "true").equals("true"); + displayFullImagePath = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_FULL_IMAGE_PATH, "false").equals("true"); // Title Text titleText = new GlowText(); @@ -229,6 +234,12 @@ public class CardPanelComponentImpl extends CardPanel { titleText.setWrap(true); add(titleText); + // Full path to image text + fullImageText = new JLabel(); + fullImageText.setText(fullImagePath); + fullImageText.setForeground(Color.BLACK); + add(fullImageText); + // PT Text ptText = new GlowText(); if (gameCard.isCreature()) { @@ -300,10 +311,19 @@ public class CardPanelComponentImpl extends CardPanel { doLayout(); } + private void setFullPath(String fullImagePath) { + this.fullImagePath = fullImagePath; + this.fullImagePath = this.fullImagePath.replaceAll("\\\\", "\\\\
"); + this.fullImagePath = this.fullImagePath.replaceAll("/", "/
"); + this.fullImagePath = "" + this.fullImagePath + ""; + fullImageText.setText(!displayFullImagePath ? "" : this.fullImagePath); + doLayout(); + } + @Override public void transferResources(final CardPanel panelAbstract) { if (panelAbstract instanceof CardPanelComponentImpl) { - CardPanelComponentImpl panel = (CardPanelComponentImpl)panelAbstract; + CardPanelComponentImpl panel = (CardPanelComponentImpl) panelAbstract; synchronized (panel.imagePanel) { if (panel.imagePanel.hasImage()) { setImage(panel.imagePanel.getSrcImage()); @@ -321,7 +341,7 @@ public class CardPanelComponentImpl extends CardPanel { this.titleText.setGlowColor(Color.black); } } - + @Override protected void paintCard(Graphics2D g2d) { float alpha = getAlpha(); @@ -333,9 +353,9 @@ public class CardPanelComponentImpl extends CardPanel { g2d.drawImage( IMAGE_CACHE.get( new Key(getWidth(), getHeight(), getCardWidth(), getCardHeight(), getCardXOffset(), getCardYOffset(), - hasImage, isSelected(), isChoosable(), gameCard.isPlayable(), gameCard.isCanAttack())), + hasImage, isSelected(), isChoosable(), gameCard.isPlayable(), gameCard.isCanAttack())), 0, 0, null); - g2d.dispose(); + g2d.dispose(); } private static BufferedImage createImage(Key key) { @@ -414,7 +434,7 @@ public class CardPanelComponentImpl extends CardPanel { @Override public void doLayout() { super.doLayout(); - + int cardWidth = getCardWidth(); int cardHeight = getCardHeight(); int cardXOffset = getCardXOffset(); @@ -456,6 +476,7 @@ public class CardPanelComponentImpl extends CardPanel { boolean showText = (!isAnimationPanel() && fontHeight < 12); titleText.setVisible(showText); ptText.setVisible(showText); + fullImageText.setVisible(fullImagePath != null); if (showText) { int fontSize = cardHeight / 11; @@ -465,6 +486,9 @@ public class CardPanelComponentImpl extends CardPanel { int titleY = Math.round(cardHeight * (9f / 680)) + getTextOffset(); titleText.setBounds(cardXOffset + titleX, cardYOffset + titleY, cardWidth - titleX, cardHeight - titleY); + fullImageText.setFont(getFont().deriveFont(Font.PLAIN, 10)); + fullImageText.setBounds(cardXOffset, cardYOffset + titleY, cardWidth, cardHeight - titleY); + ptText.setFont(getFont().deriveFont(Font.BOLD, fontSize)); Dimension ptSize = ptText.getPreferredSize(); ptText.setSize(ptSize.width, ptSize.height); @@ -486,7 +510,7 @@ public class CardPanelComponentImpl extends CardPanel { public void setCardBounds(int x, int y, int cardWidth, int cardHeight) { // Call to super super.setCardBounds(x, y, cardWidth, cardHeight); - + // Update image if (imagePanel != null && imagePanel.getSrcImage() != null) { updateArtImage(); @@ -496,7 +520,7 @@ public class CardPanelComponentImpl extends CardPanel { @Override public void setAlpha(float alpha) { super.setAlpha(alpha); - + // Update components if (alpha == 0) { this.ptText.setVisible(false); @@ -529,6 +553,9 @@ public class CardPanelComponentImpl extends CardPanel { } else { srcImage = ImageCache.getThumbnail(gameCard); } + if (srcImage == null) { + setFullPath(ImageCache.getFilePath(gameCard, getCardWidth())); + } UI.invokeLater(() -> { if (stamp == updateArtImageStamp) { hasImage = srcImage != null; diff --git a/Mage.Client/src/main/java/org/mage/card/arcane/CardRendererUtils.java b/Mage.Client/src/main/java/org/mage/card/arcane/CardRendererUtils.java index 89a6a5d173..6e3921f099 100644 --- a/Mage.Client/src/main/java/org/mage/card/arcane/CardRendererUtils.java +++ b/Mage.Client/src/main/java/org/mage/card/arcane/CardRendererUtils.java @@ -5,10 +5,7 @@ */ package org.mage.card.arcane; -import java.awt.Color; -import java.awt.Graphics2D; -import java.awt.Image; -import java.awt.Paint; +import java.awt.*; import java.awt.image.BufferedImage; import java.util.HashMap; import java.util.Iterator; @@ -19,8 +16,8 @@ import java.util.regex.Pattern; /** * @author stravant@gmail.com - * - * Various static utilities for use in the card renderer + *

+ * Various static utilities for use in the card renderer */ public final class CardRendererUtils { @@ -124,6 +121,8 @@ public final class CardRendererUtils { } public static String killReminderText(String rule) { - return killReminderTextPattern.matcher(rule).replaceAll(""); + return killReminderTextPattern.matcher(rule).replaceAll("") + .replaceAll("", "") + .replaceAll("", ""); } } diff --git a/Mage.Client/src/main/java/org/mage/card/arcane/ModernCardRenderer.java b/Mage.Client/src/main/java/org/mage/card/arcane/ModernCardRenderer.java index 2fd8363f41..5436c39af3 100644 --- a/Mage.Client/src/main/java/org/mage/card/arcane/ModernCardRenderer.java +++ b/Mage.Client/src/main/java/org/mage/card/arcane/ModernCardRenderer.java @@ -602,7 +602,7 @@ public class ModernCardRenderer extends CardRenderer { int partWidth = (int) Math.max(30, 0.20f * cardWidth); // Is it a creature? - boolean isVehicle = cardView.getSubTypes().contains("Vehicle"); + boolean isVehicle = cardView.getSubTypes().contains(SubType.VEHICLE); if (cardView.isCreature() || isVehicle) { int x = cardWidth - borderWidth - partWidth; diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/CardImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/CardImageSource.java index 0f25bba72c..e49c334a1c 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/CardImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/CardImageSource.java @@ -1,5 +1,6 @@ package org.mage.plugins.card.dl.sources; +import java.util.ArrayList; import org.mage.plugins.card.images.CardDownloadData; /** @@ -9,12 +10,38 @@ import org.mage.plugins.card.images.CardDownloadData; public interface CardImageSource { String generateURL(CardDownloadData card) throws Exception; + String generateTokenUrl(CardDownloadData card) throws Exception; + String getNextHttpImageUrl(); + String getFileForHttpImage(String httpImageUrl); + String getSourceName(); + float getAverageSize(); + int getTotalImages(); - boolean isTokenSource(); + + default int getTokenImages() { + return 0; + } + + default boolean isTokenSource() { + return false; + } + void doPause(String httpImageUrl); + + default ArrayList getSupportedSets() { + return null; + } + + default boolean isSetSupportedComplete(String setCode) { + return true; + } + + default boolean isImageProvided(String setCode, String cardName) { + return false; + } } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GrabbagImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GrabbagImageSource.java index f0b6aa02d4..ef5fa334df 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GrabbagImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GrabbagImageSource.java @@ -28,8 +28,12 @@ package org.mage.plugins.card.dl.sources; import java.io.IOException; +import java.util.ArrayList; import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.Set; import java.util.concurrent.TimeUnit; +import java.util.logging.Level; import org.apache.log4j.Logger; import org.mage.plugins.card.images.CardDownloadData; @@ -37,11 +41,33 @@ import org.mage.plugins.card.images.CardDownloadData; * * @author spjspj */ -public enum GrabbagImageSource implements CardImageSource { +public enum GrabbagImageSource implements CardImageSource { instance; private static final Logger logger = Logger.getLogger(GrabbagImageSource.class); - private static int maxTimes = 0; + + private static final Set supportedSets = new LinkedHashSet() { + { + add("PTC"); + add("SWS"); +// add("EXP"); +// add("APAC"); +// add("ARENA"); +// add("FNMP"); +// add("GPX"); +// add("GRC"); +// add("JR"); +// add("MBP"); +// add("MGDC"); +// add("MLP"); +// add("MPRP"); +// add("MPS"); +// add("SUS"); +// add("UGIN"); +// add("WMCQ"); + + } + }; @Override public String getSourceName() { @@ -55,1638 +81,1935 @@ public enum GrabbagImageSource implements CardImageSource { @Override public String getNextHttpImageUrl() { - if (copyUrlToImage == null) { - setupLinks(); - } - - for (String key : copyUrlToImageDone.keySet()) { - if (copyUrlToImageDone.get(key) < maxTimes) { - copyUrlToImageDone.put(key, maxTimes); - return getSourceName(key) + key; - } - } - if (maxTimes < 2) { - maxTimes++; - } - for (String key : copyUrlToImageDone.keySet()) { - if (copyUrlToImageDone.get(key) < maxTimes) { - copyUrlToImageDone.put(key, maxTimes); - return getSourceName(key) + key; - } - } return null; +// if (singleLinks == null) { +// setupLinks(); +// } +// +// for (String key : singleLinksDone.keySet()) { +// if (singleLinksDone.get(key) < maxTimes) { +// singleLinksDone.put(key, maxTimes); +// return getSourceName(key) + key; +// } +// } +// if (maxTimes < 2) { +// maxTimes++; +// } +// for (String key : singleLinksDone.keySet()) { +// if (singleLinksDone.get(key) < maxTimes) { +// singleLinksDone.put(key, maxTimes); +// return getSourceName(key) + key; +// } +// } +// return null; } @Override public String getFileForHttpImage(String httpImageUrl) { - String copy = httpImageUrl; - if (copy != null) { - copy = copy.replaceFirst("http:\\/\\/static.starcitygames.com\\/sales\\/cardscans\\/", ""); - copy = copy.replaceFirst("http:\\/\\/magiccards.info\\/scans\\/en\\/", ""); - return copyUrlToImage.get(copy); - } +// String copy = httpImageUrl; +// if (copy != null) { +// copy = copy.replaceFirst("http:\\/\\/static.starcitygames.com\\/sales\\/cardscans\\/", ""); +// copy = copy.replaceFirst("http:\\/\\/magiccards.info\\/scans\\/en\\/", ""); +// return singleLinks.get(copy); +// } return null; } @Override public String generateURL(CardDownloadData card) throws Exception { - if (copyUrlToImage == null) { + if (singleLinks == null) { setupLinks(); } + String url = singleLinks.get(card.getSet() + "/" + card.getName()); + if (url != null) { + return getSourceName(card, url) + url; + } return null; } - HashMap copyUrlToImage = null; - HashMap copyImageToUrl = null; - HashMap copyUrlToImageDone = null; + HashMap singleLinks = null; private void setupLinks() { - if (copyUrlToImage != null) { + if (singleLinks != null) { return; } - copyUrlToImage = new HashMap<>(); - copyImageToUrl = new HashMap<>(); - copyUrlToImageDone = new HashMap<>(); + singleLinks = new HashMap<>(); + singleLinks.put("PTC/Arbiter of the Ideal", "MTG/BNG/en/promo/ArbiterOfTheIdeal.jpg"); + singleLinks.put("PTC/Courser of Kruphix", "MTG/BNG/en/promo/CourserOfKruphix.jpg"); + singleLinks.put("PTC/Eater of Hope", "MTG/BNG/en/promo/EaterOfHope.jpg"); + singleLinks.put("PTC/Fated Return", "MTG/BNG/en/promo/FatedReturn.jpg"); + singleLinks.put("PTC/Forgestoker Dragon", "MTG/BNG/en/promo/ForgestokerDragon.jpg"); + singleLinks.put("PTC/Nessian Wilds Ravager", "MTG/BNG/en/promo/NessianWildsRavager.jpg"); + singleLinks.put("PTC/Pain Seer", "MTG/BNG/en/promo/PainSeer.jpg"); + singleLinks.put("PTC/Silent Sentinel", "MTG/BNG/en/promo/SilentSentinel.jpg"); + singleLinks.put("PTC/Tromokratis", "MTG/BNG/en/promo/Tromokratis.jpg"); - //http://anonymouse.org/cgi-bin/anon-www.cgi/http://magiccards.info/scans/en/arena/42.jpg - copyUrlToImage.put("MTG/BNG/en/promo/ArbiterOfTheIdeal.jpg", "PTC.zip/PTC/Arbiter of the Ideal.full.jpg"); - copyUrlToImage.put("MTG/BNG/en/promo/CourserOfKruphix.jpg", "PTC.zip/PTC/Courser of Kruphix.full.jpg"); - copyUrlToImage.put("MTG/BNG/en/promo/EaterOfHope.jpg", "PTC.zip/PTC/Eater of Hope.full.jpg"); - copyUrlToImage.put("MTG/BNG/en/promo/FatedReturn.jpg", "PTC.zip/PTC/Fated Return.full.jpg"); - copyUrlToImage.put("MTG/BNG/en/promo/ForgestokerDragon.jpg", "PTC.zip/PTC/Forgestoker Dragon.full.jpg"); - copyUrlToImage.put("MTG/BNG/en/promo/NessianWildsRavager.jpg", "PTC.zip/PTC/Nessian Wilds Ravager.full.jpg"); - copyUrlToImage.put("MTG/BNG/en/promo/PainSeer.jpg", "PTC.zip/PTC/Pain Seer.full.jpg"); - copyUrlToImage.put("MTG/BNG/en/promo/SilentSentinel.jpg", "PTC.zip/PTC/Silent Sentinel.full.jpg"); - copyUrlToImage.put("MTG/BNG/en/promo/Tromokratis.jpg", "PTC.zip/PTC/Tromokratis.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/AleshaWhoSmilesAtDeath.jpg", "PTC.zip/PTC/Alesha, Who Smiles at Death.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/Arcbond.jpg", "PTC.zip/PTC/Arcbond.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/ArchfiendOfDepravity.jpg", "PTC.zip/PTC/Archfiend of Depravity.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/AtarkaWorldRender.jpg", "PTC.zip/PTC/Atarka, World Render.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/BrutalHordechief.jpg", "PTC.zip/PTC/Brutal Hordechief.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/DaghatarTheAdamant.jpg", "PTC.zip/PTC/Daghatar the Adamant.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/DragonscaleGeneral.jpg", "PTC.zip/PTC/Dragonscale General.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/DromokaTheEternal.jpg", "PTC.zip/PTC/Dromoka, the Eternal.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/FlamerushRider.jpg", "PTC.zip/PTC/Flamerush Rider.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/FlamewakePhoenix.jpg", "PTC.zip/PTC/Flamewake Phoenix.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/JeskaiInfiltrator.jpg", "PTC.zip/PTC/Jeskai Infiltrator.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/KolaghanTheStormsFury.jpg", "PTC.zip/PTC/Kolaghan, the Storm's Fury.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/MarduStrikeLeader.jpg", "PTC.zip/PTC/Mardu Strike leader.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/MasteryOfTheUnseen.jpg", "PTC.zip/PTC/Mastery of the Unseen.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/OjutaiSoulOfWinter.jpg", "PTC.zip/PTC/Ojutai, Soul of Winter.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/RallyTheAncestors.jpg", "PTC.zip/PTC/Rally the Ancestors.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/SageEyeAvengers.jpg", "PTC.zip/PTC/Sage-Eye Avengers.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/SandsteppeMastodon.jpg", "PTC.zip/PTC/Sandsteppe Mastodon.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/ShamanOfTheGreatHunt.jpg", "PTC.zip/PTC/Shaman of the Great Hunt.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/ShamanicRevelation.jpg", "PTC.zip/PTC/Shamanic Revelation.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/ShuYunTheSilentTempest.jpg", "PTC.zip/PTC/Shu Yun, the Silent Tempest.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/SilumgarTheDriftingDeath.jpg", "PTC.zip/PTC/Silumgar, the Drifting Death.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/SoulfireGrandMaster.jpg", "PTC.zip/PTC/Soulfire Grand Master.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/Soulflayer.jpg", "PTC.zip/PTC/Soulflayer.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/SupplantForm.jpg", "PTC.zip/PTC/Supplant Form.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/TasigurTheGoldenFang.jpg", "PTC.zip/PTC/Tasigur, the Golden Fang.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/TorrentElemental.jpg", "PTC.zip/PTC/Torrent Elemental.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/WardenOfTheFirstTree.jpg", "PTC.zip/PTC/Warden of the First Tree.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/Wildcall.jpg", "PTC.zip/PTC/Wildcall.full.jpg"); - copyUrlToImage.put("MTG/FRF/en/promo/prerelease/YasovaDragonclaw.jpg", "PTC.zip/PTC/Yasova Dragonclaw.full.jpg"); - copyUrlToImage.put("MTG/JOU/en/promo/DawnbringerCharioteers.jpg", "PTC.zip/PTC/Dawnbringer Charioteers.full.jpg"); - copyUrlToImage.put("MTG/JOU/en/promo/DictateOfKruphix.jpg", "PTC.zip/PTC/Dictate of Kruphix.full.jpg"); - copyUrlToImage.put("MTG/JOU/en/promo/DictateOfTheTwinGods.jpg", "PTC.zip/PTC/Dictate of the Twin Gods.full.jpg"); - copyUrlToImage.put("MTG/JOU/en/promo/DoomwakeGiant.jpg", "PTC.zip/PTC/Doomwake Giant.full.jpg"); - copyUrlToImage.put("MTG/JOU/en/promo/EidolonOfBlossoms.jpg", "PTC.zip/PTC/Eidolon of Blossoms.full.jpg"); - copyUrlToImage.put("MTG/JOU/en/promo/ScourgeOfSkolaVale.jpg", "PTC.zip/PTC/Scourge of Skola Vale.full.jpg"); - copyUrlToImage.put("MTG/JOU/en/promo/SpawnOfThraxes.jpg", "PTC.zip/PTC/Spawn of Thraxes.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/AbzanAscendancy.jpg", "PTC.zip/PTC/Abzan Ascendancy.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/AnafenzaTheForemost.jpg", "PTC.zip/PTC/Anafenza, the Foremost.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/AnkleShanker.jpg", "PTC.zip/PTC/Ankle Shanker.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/AvalancheTusker.jpg", "PTC.zip/PTC/Avalanche Tusker.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/BloodsoakedChampion.jpg", "PTC.zip/PTC/Bloodsoaked Champion.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/ButcherOfTheHorde.jpg", "PTC.zip/PTC/Butcher of the Horde.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/CracklingDoom.jpg", "PTC.zip/PTC/Crackling Doom.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/CratersClaws.jpg", "PTC.zip/PTC/Crater's Claws.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/DeflectingPalm.jpg", "PTC.zip/PTC/Deflecting Palm.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/DigThroughTime.jpg", "PTC.zip/PTC/Dig Through Time.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/DragonStyleTwins.jpg", "PTC.zip/PTC/Dragon-Style Twins.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/DragonThroneOfTarkir.jpg", "PTC.zip/PTC/Dragon Throne of Tarkir.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/Duneblast.jpg", "PTC.zip/PTC/Duneblast.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/FlyingCraneTechnique.jpg", "PTC.zip/PTC/Flying Crane Technique.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/GrimHaruspex.jpg", "PTC.zip/PTC/Grim Haruspex.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/HardenedScales.jpg", "PTC.zip/PTC/Hardened Scales.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/HeraldOfTorment.jpg", "PTC.zip/PTC/Herald of Torment.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/HighSentinelsOfArashin.jpg", "PTC.zip/PTC/High Sentinels of Arashin.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/IcyBlast.jpg", "PTC.zip/PTC/Icy Blast.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/IvorytuskFortress.jpg", "PTC.zip/PTC/Ivorytusk Fortress.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/JeeringInstigator.jpg", "PTC.zip/PTC/Jeering Instigator.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/JeskaiAscendancy.jpg", "PTC.zip/PTC/Jeskai Ascendancy.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/KheruSpellsnatcher.jpg", "PTC.zip/PTC/Kheru Spellsnatcher.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/MarduAscendancy.jpg", "PTC.zip/PTC/Mardu Ascendancy.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/MasterOfPearls.jpg", "PTC.zip/PTC/Master of Pearls.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/NarsetEnlightenedMaster.jpg", "PTC.zip/PTC/Narset, Enlightened Master.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/NecropolisFiend.jpg", "PTC.zip/PTC/Necropolis Fiend.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/RakshasaVizier.jpg", "PTC.zip/PTC/Rakshasa Vizier.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/RattleclawMystic.jpg", "PTC.zip/PTC/Rattleclaw Mystic.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/SageOfTheInwardEye.jpg", "PTC.zip/PTC/Sage of the Inward Eye.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/SidisiBroodTyrant.jpg", "PTC.zip/PTC/Sidisi, Brood Tyrant.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/SiegeRhino.jpg", "PTC.zip/PTC/Siege Rhino.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/SultaiAscendancy.jpg", "PTC.zip/PTC/Sultai Ascendancy.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/SurrakDragonclaw.jpg", "PTC.zip/PTC/Surrak Dragonclaw.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/TemurAscendancy.jpg", "PTC.zip/PTC/Temur Ascendancy.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/ThousandWinds.jpg", "PTC.zip/PTC/Thousand Winds.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/TrailOfMystery.jpg", "PTC.zip/PTC/Trail of Mystery.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/TrapEssence.jpg", "PTC.zip/PTC/Trap Essence.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/UtterEnd.jpg", "PTC.zip/PTC/Utter End.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/VillainousWealth.jpg", "PTC.zip/PTC/Villainous Wealth.full.jpg"); - copyUrlToImage.put("MTG/KTK/en/promo/ZurgoHelmsmasher.jpg", "PTC.zip/PTC/Zurgo Helmsmasher.full.jpg"); - copyUrlToImage.put("MTG/M15/en/promo/ChiefEngineer.jpg", "PTC.zip/PTC/Chief Engineer.full.jpg"); - copyUrlToImage.put("MTG/M15/en/promo/InGarruksWake.jpg", "PTC.zip/PTC/In Garruk's Wake.full.jpg"); - copyUrlToImage.put("MTG/M15/en/promo/IndulgentTormentor.jpg", "PTC.zip/PTC/Indulgent Tormentor.full.jpg"); - copyUrlToImage.put("MTG/M15/en/promo/MercurialPretender.jpg", "PTC.zip/PTC/Mercurial Pretender.full.jpg"); - copyUrlToImage.put("MTG/M15/en/promo/PhyrexianRevoker.jpg", "PTC.zip/PTC/Phyrexian Revoker.full.jpg"); - copyUrlToImage.put("MTG/M15/en/promo/Phytotitan.jpg", "PTC.zip/PTC/Phytotitan.full.jpg"); - copyUrlToImage.put("MTG/M15/en/promo/ResoluteArchangel.jpg", "PTC.zip/PTC/Resolute Archangel.full.jpg"); - copyUrlToImage.put("MTG/M15/en/promo/SiegeDragon.jpg", "PTC.zip/PTC/Siege Dragon.full.jpg"); - copyUrlToImage.put("MTG/M15/en/promo/SoulOfRavnica.jpg", "PTC.zip/PTC/Soul of Ravnica.full.jpg"); - copyUrlToImage.put("MTG/M15/en/promo/SoulOfZendikar.jpg", "PTC.zip/PTC/Soul of Zendikar.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/AzusaLostButSeeking.jpg", "JR.zip/JR/Azusa, Lost but Seeking.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/Bitterblossom.jpg", "JR.zip/JR/Bitterblossom.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/BloodstainedMire.jpg", "JR.zip/JR/Bloodstained Mire.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/CommandBeacon.jpg", "JR.zip/JR/Command Beacon.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/DarkRitual.jpg", "JR.zip/JR/Dark Ritual.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/DecreeOfJustice.jpg", "JR.zip/JR/Decree of Justice.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/DefenseOfTheHeart.jpg", "JR.zip/JR/Defense of the Heart.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/ExaltedAngel.jpg", "JR.zip/JR/Exalted Angel.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/FeldonOfTheThirdPath.jpg", "JR.zip/JR/Feldon of the Third Path.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/ForceOfWill.jpg", "JR.zip/JR/Force of Will.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/GaeasCradle.jpg", "JR.zip/JR/Gaea's Cradle.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/ImperialRecruiter.jpg", "JR.zip/JR/Imperial Recruiter.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/LandTax.jpg", "JR.zip/JR/Land Tax.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/MindsDesire.jpg", "JR.zip/JR/Mind's Desire.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/MishrasFactory.jpg", "JR.zip/JR/Mishra's Factory.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/RishadanPort.jpg", "JR.zip/JR/Rishadan Port.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/ShardlessAgent.jpg", "JR.zip/JR/Shardless Agent.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/ThawingGlaciers.jpg", "JR.zip/JR/Thawing Glaciers.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/Vindicate2007.jpg", "JR.zip/JR/Vindicate.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/Vindicate2013.jpg", "JR.zip/JR/Vindicate 1.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/Wasteland2010.jpg", "JR.zip/JR/Wasteland 1.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/Wasteland2015.jpg", "JR.zip/JR/Wasteland.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/WindsweptHeath.jpg", "JR.zip/JR/Windswept Heath.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/XiahouDunTheOneEyed.jpg", "JR.zip/JR/Xiahou Dun, the One-Eyed.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/YawgmothsWill.jpg", "JR.zip/JR/Yawgmoth's Will.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Judge/ZurtheEnchanter.jpg", "JR.zip/JR/Zur the Enchanter.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/AkoumFirebird.jpg", "PTC.zip/PTC/Akoum Firebird.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/AkoumHellkite.jpg", "PTC.zip/PTC/Akoum Hellkite.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/AlignedHedronNetwork.jpg", "PTC.zip/PTC/Aligned Hedron Network.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/AllyEncampment.jpg", "PTC.zip/PTC/Ally Encampment.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/AngelicCaptain.jpg", "PTC.zip/PTC/Angelic Captain.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/BarrageTyrant.jpg", "PTC.zip/PTC/Barrage Tyrant.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/BeastcallerSavant.jpg", "PTC.zip/PTC/Beastcaller Savant.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/BlightHerder.jpg", "PTC.zip/PTC/Blight Herder.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/BringToLight.jpg", "PTC.zip/PTC/Bring to Light.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/BroodButcher.jpg", "PTC.zip/PTC/Brood Butcher.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/BrutalExpulsion.jpg", "PTC.zip/PTC/Brutal Expulsion.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/CanopyVista.jpg", "PTC.zip/PTC/Canopy Vista.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/CinderGlade.jpg", "PTC.zip/PTC/Cinder Glade.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/ConduitOfRuin.jpg", "PTC.zip/PTC/Conduit of Ruin.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/DefiantBloodlord.jpg", "PTC.zip/PTC/Defiant Bloodlord.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/DesolationTwin.jpg", "PTC.zip/PTC/Desolation Twin.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/DragonmasterOutcast.jpg", "PTC.zip/PTC/Dragonmaster Outcast.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/DranasChosen.jpg", "PTC.zip/PTC/Drana's Chosen.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/DrownerOfHope.jpg", "PTC.zip/PTC/Drowner of Hope.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/DustStalker.jpg", "PTC.zip/PTC/Dust Stalker.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/EmeriaShepherd.jpg", "PTC.zip/PTC/Emeria Shepherd.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/EndlessOne.jpg", "PTC.zip/PTC/Endless One.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/ExertInfluence.jpg", "PTC.zip/PTC/Exert Influence.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/FathomFeeder.jpg", "PTC.zip/PTC/Fathom Feeder.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/FelidarSovereign.jpg", "PTC.zip/PTC/Felidar Sovereign.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/FromBeyond.jpg", "PTC.zip/PTC/From Beyond.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/GideonAllyOfZendikar.jpg", "PTC.zip/PTC/Gideon, Ally of Zendikar.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/GreenwardenOfMurasa.jpg", "PTC.zip/PTC/Greenwarden of Murasa.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/GruesomeSlaughter.jpg", "PTC.zip/PTC/Gruesome Slaughter.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/GuardianOfTazeem.jpg", "PTC.zip/PTC/Guardian of Tazeem.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/GuulDrazOverseer.jpg", "PTC.zip/PTC/Guul Draz Overseer.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/HeroOfGomaFada.jpg", "PTC.zip/PTC/Hero of Goma Fada.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/HerosDownfall.jpg", "PTC.zip/PTC/Hero's Downfall.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/KioraMasterOfTheDepths.jpg", "PTC.zip/PTC/Kiora, Master of the Depths.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/KioraTheCrashingWave.jpg", "PTC.zip/PTC/Kiora, the Crashing Wave.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/LanternScout.jpg", "PTC.zip/PTC/Lantern Scout.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/LumberingFalls.jpg", "PTC.zip/PTC/Lumbering Falls.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/MarchFromTheTomb.jpg", "PTC.zip/PTC/March from the Tomb.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/MundaAmbushLeader.jpg", "PTC.zip/PTC/Munda, Ambush Leader.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/NissasRenewal.jpg", "PTC.zip/PTC/Nissa's Renewal.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/NoyanDarRoilShaper.jpg", "PTC.zip/PTC/Noyan Dar, Roil Shaper.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/ObNixilisReignited.jpg", "PTC.zip/PTC/Ob Nixilis Reignited.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/ObNixilisUnshackled.jpg", "PTC.zip/PTC/Ob Nixilis, Unshackled.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/OblivionSower.jpg", "PTC.zip/PTC/Oblivion Sower.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/OmnathLocusOfRage.jpg", "PTC.zip/PTC/Omnath, Locus of Rage.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/OranRiefHydra.jpg", "PTC.zip/PTC/Oran-Rief Hydra.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/PainfulTruths.jpg", "PTC.zip/PTC/Painful Truths.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/PartTheWaterveil.jpg", "PTC.zip/PTC/Part the Waterveil.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/PlanarOutburst.jpg", "PTC.zip/PTC/Planar Outburst.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/PrairieStream.jpg", "PTC.zip/PTC/Prairie Stream.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/PrismArray.jpg", "PTC.zip/PTC/Prism Array.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/QuarantineField.jpg", "PTC.zip/PTC/Quarantine Field.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/RadiantFlames.jpg", "PTC.zip/PTC/Radiant Flames.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/RuinousPath.jpg", "PTC.zip/PTC/Ruinous Path.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/SanctumOfUgin.jpg", "PTC.zip/PTC/Sanctum of Ugin.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/ScatterToTheWinds.jpg", "PTC.zip/PTC/Scatter to the Winds.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/SerpentineSpike.jpg", "PTC.zip/PTC/Serpentine Spike.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/ShamblingVent.jpg", "PTC.zip/PTC/Shambling Vent.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/ShrineOfTheForsakenGods.jpg", "PTC.zip/PTC/Shrine of the Forsaken Gods.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/SireOfStagnation.jpg", "PTC.zip/PTC/Sire of Stagnation.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/SmolderingMarsh.jpg", "PTC.zip/PTC/Smoldering Marsh.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/SmotheringAbomination.jpg", "PTC.zip/PTC/Smothering Abomination.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/SunkenHollow.jpg", "PTC.zip/PTC/Sunken Hollow.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/UginsInsight.jpg", "PTC.zip/PTC/Ugin's Insight.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/UginsNexus.jpg", "PTC.zip/PTC/Ugin's Nexus.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/UlamogTheCeaselessHunger.jpg", "PTC.zip/PTC/Ulamog, the Ceaseless Hunger.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/UndergrowthChampion.jpg", "PTC.zip/PTC/Undergrowth Champion.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/VeteranWarleader.jpg", "PTC.zip/PTC/Veteran Warleader.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/VoidWinnower.jpg", "PTC.zip/PTC/Void Winnower.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/WastelandStrangler.jpg", "PTC.zip/PTC/Wasteland Strangler.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/WoodlandWanderer.jpg", "PTC.zip/PTC/Woodland Wanderer.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/BFZ/ZadaHedronGrinder.jpg", "PTC.zip/PTC/Zada, Hedron Grinder.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/AetherfluxReservoir.jpg", "PTC.zip/PTC/Aetherflux Reservoir.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/AethersquallAncient.jpg", "PTC.zip/PTC/Aethersquall Ancient.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/AetherstormRoc.jpg", "PTC.zip/PTC/Aetherstorm Roc.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/AetherworksMarvel.jpg", "PTC.zip/PTC/Aetherworks Marvel.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/AngelOfInvention.jpg", "PTC.zip/PTC/Angel of Invention.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/AnimationModule.jpg", "PTC.zip/PTC/Animation Module.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/ArchitectOfTheUntamed.jpg", "PTC.zip/PTC/Architect of the Untamed.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/AuthorityOfTheConsuls.jpg", "PTC.zip/PTC/Authority of the Consuls.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/BloomingMarsh.jpg", "PTC.zip/PTC/Blooming Marsh.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/BomatCourier.jpg", "PTC.zip/PTC/Bomat Courier.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/BotanicalSanctum.jpg", "PTC.zip/PTC/Botanical Sanctum.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/BristlingHydra.jpg", "PTC.zip/PTC/Bristling Hydra.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/CapturedByTheConsulate.jpg", "PTC.zip/PTC/Captured by the Consulate.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/CataclysmicGearhulk.jpg", "PTC.zip/PTC/Cataclysmic Gearhulk.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/ChandraTorchOfDefiance.jpg", "PTC.zip/PTC/Chandra, Torch of Defiance.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/CombustibleGearhulk.jpg", "PTC.zip/PTC/Combustible Gearhulk.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/ConcealedCourtyard.jpg", "PTC.zip/PTC/Concealed Courtyard.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/ConfiscationCoup.jpg", "PTC.zip/PTC/Confiscation Coup.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/CultivatorOfBlades.jpg", "PTC.zip/PTC/Cultivator of Blades.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/CultivatorsCaravan.jpg", "PTC.zip/PTC/Cultivator's Caravan.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/DeadlockTrap.jpg", "PTC.zip/PTC/Deadlock Trap.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/DemonOfDarkSchemes.jpg", "PTC.zip/PTC/Demon of Dark Schemes.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/DepalaPilotExemplar.jpg", "PTC.zip/PTC/Depala, Pilot Exemplar.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/DovinBaan.jpg", "PTC.zip/PTC/Dovin Baan.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/DubiousChallenge.jpg", "PTC.zip/PTC/Dubious Challenge.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/DynavoltTower.jpg", "PTC.zip/PTC/Dynavolt Tower.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/ElectrostaticPummeler.jpg", "PTC.zip/PTC/Electrostatic Pummeler.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/EliminateTheCompetition.jpg", "PTC.zip/PTC/Eliminate the Competition.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/FatefulShowdown.jpg", "PTC.zip/PTC/Fateful Showdown.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/FleetwheelCruiser.jpg", "PTC.zip/PTC/Fleetwheel Cruiser.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/Fumigate.jpg", "PTC.zip/PTC/Fumigate.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/GhirapurOrrery.jpg", "PTC.zip/PTC/Ghirapur Orrery.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/GontiLordOfLuxury.jpg", "PTC.zip/PTC/Gonti, Lord of Luxury.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/InsidiousWill.jpg", "PTC.zip/PTC/Insidious Will.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/InspiringVantage.jpg", "PTC.zip/PTC/Inspiring Vantage.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/InventorsFair.jpg", "PTC.zip/PTC/Inventors' Fair.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/KambalConsulOfAllocation.jpg", "PTC.zip/PTC/Kambal, Consul of Allocation.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/KeyToTheCity.jpg", "PTC.zip/PTC/Key to the City.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/LathnuHellion.jpg", "PTC.zip/PTC/Lathnu Hellion.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/LostLegacy.jpg", "PTC.zip/PTC/Lost Legacy.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/MadcapExperiment.jpg", "PTC.zip/PTC/Madcap Experiment.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/MarionetteMaster.jpg", "PTC.zip/PTC/Marionette Master.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/MasterTrinketeer.jpg", "PTC.zip/PTC/Master Trinketeer.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/MetallurgicSummonings.jpg", "PTC.zip/PTC/Metallurgic Summonings.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/MetalworkColossus.jpg", "PTC.zip/PTC/Metalwork Colossus.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/MidnightOil.jpg", "PTC.zip/PTC/Midnight Oil.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/MultiformWonder.jpg", "PTC.zip/PTC/Multiform Wonder.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/NissaVitalForce.jpg", "PTC.zip/PTC/Nissa, Vital Force.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/NoxiousGearhulk.jpg", "PTC.zip/PTC/Noxious Gearhulk.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/OviyaPashiriSageLifecrafter.jpg", "PTC.zip/PTC/Oviya Pashiri, Sage Lifecrafter.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/PadeemConsulOfInnovation.jpg", "PTC.zip/PTC/Padeem, Consul of Innovation.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/Panharmonicon.jpg", "PTC.zip/PTC/Panharmonicon.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/ParadoxicalOutcome.jpg", "PTC.zip/PTC/Paradoxical Outcome.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/PiaNalaar.jpg", "PTC.zip/PTC/Pia Nalaar.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/RashmiEternitiesCrafter.jpg", "PTC.zip/PTC/Rashmi, Eternities Crafter.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/SaheeliRai.jpg", "PTC.zip/PTC/Saheeli Rai.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/SaheelisArtistry.jpg", "PTC.zip/PTC/Saheeli's Artistry.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/ScrapheapScrounger.jpg", "PTC.zip/PTC/Scrapheap Scrounger.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/SkyshipStalker.jpg", "PTC.zip/PTC/Skyship Stalker.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/SkysovereignConsulFlagship.jpg", "PTC.zip/PTC/Skysovereign, Consul Flagship.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/SmugglersCopter.jpg", "PTC.zip/PTC/Smuggler's Copter.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/SpirebluffCanal.jpg", "PTC.zip/PTC/Spirebluff Canal.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/SyndicateTrafficker.jpg", "PTC.zip/PTC/Syndicate Trafficker.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/TerritorialGorger.jpg", "PTC.zip/PTC/Territorial Gorger.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/ToolcraftExemplar.jpg", "PTC.zip/PTC/Toolcraft Exemplar.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/TorrentialGearhulk.jpg", "PTC.zip/PTC/Torrential Gearhulk.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/VerdurousGearhulk.jpg", "PTC.zip/PTC/Verdurous Gearhulk.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/KLD/WildestDreams.jpg", "PTC.zip/PTC/Wildest Dreams.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/AyliEternalPilgrim.jpg", "PTC.zip/PTC/Ayli, Eternal Pilgrim.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/BearerOfSilence.jpg", "PTC.zip/PTC/Bearer of Silence.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/BearerOfTheHeavens.jpg", "PTC.zip/PTC/Bearer of the Heavens.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/CallTheGatewatch.jpg", "PTC.zip/PTC/Call the Gatewatch.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/CaptainsClaws.jpg", "PTC.zip/PTC/Captain's Claws.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/ChandraFlamecaller.jpg", "PTC.zip/PTC/Chandra, Flamecaller.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/ChandraPyromaster.jpg", "PTC.zip/PTC/Chandra, Pyromaster.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/CorruptedCrossroads.jpg", "PTC.zip/PTC/Corrupted Crossroads.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/CrushOfTentacles.jpg", "PTC.zip/PTC/Crush of Tentacles.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/DeceiverOfForm.jpg", "PTC.zip/PTC/Deceiver of Form.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/DeepfathomSkulker.jpg", "PTC.zip/PTC/Deepfathom Skulker.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/DimensionalInfiltrator.jpg", "PTC.zip/PTC/Dimensional Infiltrator.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/DranaLiberatorOfMalakir.jpg", "PTC.zip/PTC/Drana, Liberator of Malakir.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/DreadDefiler.jpg", "PTC.zip/PTC/Dread Defiler.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/EldraziDisplacer.jpg", "PTC.zip/PTC/Eldrazi Displacer.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/EldraziMimic.jpg", "PTC.zip/PTC/Eldrazi Mimic.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/EldraziObligator.jpg", "PTC.zip/PTC/Eldrazi Obligator.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/EndHostilities.jpg", "PTC.zip/PTC/End Hostilities.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/Endbringer.jpg", "PTC.zip/PTC/Endbringer.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/FallOfTheTitans.jpg", "PTC.zip/PTC/Fall of the Titans.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/GeneralTazri.jpg", "PTC.zip/PTC/General Tazri.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/GladehartCavalry.jpg", "PTC.zip/PTC/Gladehart Cavalry.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/GoblinDarkDwellers.jpg", "PTC.zip/PTC/Goblin Dark-Dwellers.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/GoblinRabblemaster.jpg", "PTC.zip/PTC/Goblin Rabblemaster.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/HedronAlignment.jpg", "PTC.zip/PTC/Hedron Alignment.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/HissingQuagmire.jpg", "PTC.zip/PTC/Hissing Quagmire.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/InverterOfTruth.jpg", "PTC.zip/PTC/Inverter of Truth.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/JoriEnRuinDiver.jpg", "PTC.zip/PTC/Jori En, Ruin Diver.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/KalitasTraitorOfGhet.jpg", "PTC.zip/PTC/Kalitas, Traitor of Ghet.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/KozilekTheGreatDistortion.jpg", "PTC.zip/PTC/Kozilek, the Great Distortion.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/KozileksReturn.jpg", "PTC.zip/PTC/Kozilek's Return.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/LinvalaThePreserver.jpg", "PTC.zip/PTC/Linvala, the Preserver.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/MatterReshaper.jpg", "PTC.zip/PTC/Matter Reshaper.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/MinaAndDennWildborn.jpg", "PTC.zip/PTC/Mina and Denn, Wildborn.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/Mirrorpool.jpg", "PTC.zip/PTC/Mirrorpool.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/MundasVanguard.jpg", "PTC.zip/PTC/Munda's Vanguard.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/NeedleSpires.jpg", "PTC.zip/PTC/Needle Spires.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/NissaVoiceOfZendikar.jpg", "PTC.zip/PTC/Nissa, Voice of Zendikar.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/OathOfChandra.jpg", "PTC.zip/PTC/Oath of Chandra.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/OathOfGideon.jpg", "PTC.zip/PTC/Oath of Gideon.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/OathOfJace.jpg", "PTC.zip/PTC/Oath of Jace.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/OathOfNissa.jpg", "PTC.zip/PTC/Oath of Nissa.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/OverwhelmingDenial.jpg", "PTC.zip/PTC/Overwhelming Denial.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/RealitySmasher.jpg", "PTC.zip/PTC/Reality Smasher.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/RemorselessPunishment.jpg", "PTC.zip/PTC/Remorseless Punishment.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/RuinsOfOranRief.jpg", "PTC.zip/PTC/Ruins of Oran-Rief.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/SeaGateWreckage.jpg", "PTC.zip/PTC/Sea Gate Wreckage.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/SifterOfSkulls.jpg", "PTC.zip/PTC/Sifter of Skulls.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/SphinxOfTheFinalWord.jpg", "PTC.zip/PTC/Sphinx of the Final Word.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/StoneHavenOutfitter.jpg", "PTC.zip/PTC/Stone Haven Outfitter.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/StoneforgeMasterwork.jpg", "PTC.zip/PTC/Stoneforge Masterwork.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/SylvanAdvocate.jpg", "PTC.zip/PTC/Sylvan Advocate.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/SylvanCaryatid.jpg", "PTC.zip/PTC/Sylvan Caryatid.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/ThoughtKnotSeer.jpg", "PTC.zip/PTC/Thought-Knot Seer.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/TyrantOfValakut.jpg", "PTC.zip/PTC/Tyrant of Valakut.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/VileRedeemer.jpg", "PTC.zip/PTC/Vile Redeemer.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/WanderingFumarole.jpg", "PTC.zip/PTC/Wandering Fumarole.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/WorldBreaker.jpg", "PTC.zip/PTC/World Breaker.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/OGW/ZendikarResurgent.jpg", "PTC.zip/PTC/Zendikar Resurgent.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/AlteredEgo.jpg", "PTC.zip/PTC/Altered Ego.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/AlwaysWatching.jpg", "PTC.zip/PTC/Always Watching.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/AngelOfDeliverance.jpg", "PTC.zip/PTC/Angel of Deliverance.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/AnguishedUnmaking.jpg", "PTC.zip/PTC/Anguished Unmaking.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/ArchangelAvacyn.jpg", "PTC.zip/PTC/Archangel Avacyn.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/ArlinnKord.jpg", "PTC.zip/PTC/Arlinn Kord.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/AsylumVisitor.jpg", "PTC.zip/PTC/Asylum Visitor.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/AvacynGuardianAngel.jpg", "PTC.zip/PTC/Avacyn, Guardian Angel.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/AvacynsJudgment.jpg", "PTC.zip/PTC/Avacyn's Judgement.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/BeholdTheBeyond.jpg", "PTC.zip/PTC/Behold the Beyond.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/BrainInAJar.jpg", "PTC.zip/PTC/Brain in a Jar.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/BurnFromWithin.jpg", "PTC.zip/PTC/Burn from Within.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/BygoneBishop.jpg", "PTC.zip/PTC/Bygone Bishop.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/ChokedEstuary.jpg", "PTC.zip/PTC/Choked Estuary.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/ConfirmSuspicions.jpg", "PTC.zip/PTC/Confirm Suspicions.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/CorruptedGrafstone.jpg", "PTC.zip/PTC/Corrupted Grafstone.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/CryptolithRite.jpg", "PTC.zip/PTC/Cryptolith Rite.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/DeathcapCultivator.jpg", "PTC.zip/PTC/Deathcap Cultivator.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/DeclarationInStone.jpg", "PTC.zip/PTC/Declaration in Stone.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/DescendUponTheSinful.jpg", "PTC.zip/PTC/Descend upon the Sinful.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/DevilsPlayground.jpg", "PTC.zip/PTC/Devils' Playground.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/DiregrafColossus.jpg", "PTC.zip/PTC/Diregraf Colossus.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/DrogskolCavalry.jpg", "PTC.zip/PTC/Drogskol Cavalry.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/DrownyardTemple.jpg", "PTC.zip/PTC/Drownyard Temple.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/EerieInterlude.jpg", "PTC.zip/PTC/Eerie Interlude.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/EngulfTheShore.jpg", "PTC.zip/PTC/Engulf the Shore.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/EpiphanyAtTheDrownyard.jpg", "PTC.zip/PTC/Epiphany at the Drownyard.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/EverAfter.jpg", "PTC.zip/PTC/Ever After.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/FalkenrathGorger.jpg", "PTC.zip/PTC/Falkenrath Gorger.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/FeveredVisions.jpg", "PTC.zip/PTC/Fevered Visions.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/FlamebladeAngel.jpg", "PTC.zip/PTC/Flameblade Angel.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/ForebodingRuins.jpg", "PTC.zip/PTC/Foreboding Ruins.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/ForgottenCreation.jpg", "PTC.zip/PTC/Forgotten Creation.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/FortifiedVillage.jpg", "PTC.zip/PTC/Fortified Village.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/FromUnderTheFloorboards.jpg", "PTC.zip/PTC/From Under the Floorboards.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/GameTrail.jpg", "PTC.zip/PTC/Game Trail.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/GeierReachBandit.jpg", "PTC.zip/PTC/Geier Reach Bandit.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/GeierReachSanitarium.jpg", "PTC.zip/PTC/Geier Reach Sanitarium.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/GeralfsMasterpiece.jpg", "PTC.zip/PTC/Geralf's Masterpiece.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/GoldnightCastigator.jpg", "PTC.zip/PTC/Goldnight Castigator.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/HanweirMilitiaCaptain.jpg", "PTC.zip/PTC/Hanweir Militia Captain.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/HarnessTheStorm.jpg", "PTC.zip/PTC/Harness the Storm.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/InexorableBlob.jpg", "PTC.zip/PTC/Inexorable Blob.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/InvocationOfSaintTraft.jpg", "PTC.zip/PTC/Invocation of Saint Traft.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/JaceTheLivingGuildpact.jpg", "PTC.zip/PTC/Jace, the Living Guildpact.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/JaceUnravelerOfSecrets.jpg", "PTC.zip/PTC/Jace, Unraveler of Secrets.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/MarkovDreadknight.jpg", "PTC.zip/PTC/Markov Dreadknight.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/MindwrackDemon.jpg", "PTC.zip/PTC/Mindwrack Demon.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/NahiriTheHarbinger.jpg", "PTC.zip/PTC/Nahiri, the Harbinger.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/NephaliaMoondrakes.jpg", "PTC.zip/PTC/Nephalia Moondrakes.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/OdricLunarchMarshal.jpg", "PTC.zip/PTC/Odric, Lunarch Marshal.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/OliviaMobilizedForWar.jpg", "PTC.zip/PTC/Olivia, Mobilized for War.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/OrmendahlProfanePrince.jpg", "PTC.zip/PTC/Ormendahl, Profane Prince.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/PortTown.jpg", "PTC.zip/PTC/Port Town.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/PrizedAmalgam.jpg", "PTC.zip/PTC/Prized Amalgam.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/Rattlechains.jpg", "PTC.zip/PTC/Rattlechains.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/RelentlessDead.jpg", "PTC.zip/PTC/Relentless Dead.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/SageOfAncientLore.jpg", "PTC.zip/PTC/Sage of Ancient Lore.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/ScourgeWolf.jpg", "PTC.zip/PTC/Scourge Wolf.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/SeasonsPast.jpg", "PTC.zip/PTC/Seasons Past.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/SecondHarvest.jpg", "PTC.zip/PTC/Second Harvest.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/SigardaHeronsGrace.jpg", "PTC.zip/PTC/Sigarda, Heron's Grace.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/SilverfurPartisan.jpg", "PTC.zip/PTC/Silverfur Partisan.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/SinProdder.jpg", "PTC.zip/PTC/Sin Prodder.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/SlayersPlate.jpg", "PTC.zip/PTC/Slayer's Plate.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/SorinGrimNemesis.jpg", "PTC.zip/PTC/Sorin, Grim Nemesis.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/SorinSolemnVisitor.jpg", "PTC.zip/PTC/Sorin, Solemn Visitor.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/SoulSwallower.jpg", "PTC.zip/PTC/Soul Swallower.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/StartledAwake.jpg", "PTC.zip/PTC/Startled Awake.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/TamiyoFieldResearcher.jpg", "PTC.zip/PTC/Tamiyo, Field Researcher.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/TamiyosJournal.jpg", "PTC.zip/PTC/Tamiyo's Journal.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/ThaliaHereticCathar.jpg", "PTC.zip/PTC/Thalia, Heretic Cathar.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/ThaliasLieutenant.jpg", "PTC.zip/PTC/Thalia's Lieutenant.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/TheGitrogMonster.jpg", "PTC.zip/PTC/The Gitrog Monster.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/ThingInTheIce.jpg", "PTC.zip/PTC/Thing in the Ice.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/TirelessTracker.jpg", "PTC.zip/PTC/Tireless Tracker.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/ToTheSlaughter.jpg", "PTC.zip/PTC/To the Slaughter.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/TraverseTheUlvenwald.jpg", "PTC.zip/PTC/Traverse the Ulvenwald.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/Triskaidekaphobia.jpg", "PTC.zip/PTC/Triskaidekaphobia.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/UlvenwaldObserver.jpg", "PTC.zip/PTC/Ulvenwald Observer.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/WelcomeToTheFold.jpg", "PTC.zip/PTC/Welcome to the Fold.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/WestvaleAbbey.jpg", "PTC.zip/PTC/Westvale Abbey.full.jpg"); - copyUrlToImage.put("MTG/PRM/en/foil/Prerelease/SOI/WolfOfDevilsBreach.jpg", "PTC.zip/PTC/Wolf of Devil's Breach.full.jpg"); - copyUrlToImage.put("MTG/THS/en/promo/HerosDownfall.jpg", "PTC.zip/PTC/Hero's Downfall.full.jpg"); - copyUrlToImage.put("MTG/THS/en/promo/ReaperOfTheWilds.jpg", "PTC.zip/PTC/Reaper of the Wilds.full.jpg"); - copyUrlToImage.put("MTG/THS/en/promo/WhipOfErebos.jpg", "PTC.zip/PTC/Whip of Erebos.full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/AncientTomb.jpg", "EXP.zip/EXP/Ancient Tomb .full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/CascadeBluffs.jpg", "EXP.zip/EXP/Cascade Bluffs .full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/DustBowl.jpg", "EXP.zip/EXP/Dust Bowl .full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/EyeOfUgin.jpg", "EXP.zip/EXP/Eye of Ugin .full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/FetidHeath.jpg", "EXP.zip/EXP/Fetid Heath .full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/FireLitThicket.jpg", "EXP.zip/EXP/Fire-Lit Thicket .full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/FloodedGrove.jpg", "EXP.zip/EXP/Flooded Grove .full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/ForbiddenOrchard.jpg", "EXP.zip/EXP/Forbidden Orchard .full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/GravenCairns.jpg", "EXP.zip/EXP/Graven Cairns .full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/HorizonCanopy.jpg", "EXP.zip/EXP/Horizon Canopy.full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/KorHaven.jpg", "EXP.zip/EXP/Kor Haven.full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/ManaConfluence.jpg", "EXP.zip/EXP/Mana Confluence.full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/MysticGate.jpg", "EXP.zip/EXP/Mystic Gate.full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/RuggedPrairie.jpg", "EXP.zip/EXP/Rugged Prairie.full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/StripMine.jpg", "EXP.zip/EXP/Strip Mine.full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/SunkenRuins.jpg", "EXP.zip/EXP/Sunken Ruins.full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/TectonicEdge.jpg", "EXP.zip/EXP/Tectonic Edge.full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/TwilightMire.jpg", "EXP.zip/EXP/Twilight Mire.full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/Wasteland.jpg", "EXP.zip/EXP/Wasteland.full.jpg"); - copyUrlToImage.put("MTG/EXP/en/foil/WoodedBastion.jpg", "EXP.zip/EXP/Wooded Bastion.full.jpg"); - copyUrlToImage.put("apac/1.jpg", "APAC.zip/APAC/Forest.1.full.jpg"); - copyUrlToImage.put("apac/10.jpg", "APAC.zip/APAC/Swamp.10.full.jpg"); - copyUrlToImage.put("apac/11.jpg", "APAC.zip/APAC/Forest.11.full.jpg"); - copyUrlToImage.put("apac/12.jpg", "APAC.zip/APAC/Island.7.full.jpg"); - copyUrlToImage.put("apac/13.jpg", "APAC.zip/APAC/Mountain.13.full.jpg"); - copyUrlToImage.put("apac/14.jpg", "APAC.zip/APAC/Plains.14.full.jpg"); - copyUrlToImage.put("apac/15.jpg", "APAC.zip/APAC/Swamp.15.full.jpg"); - copyUrlToImage.put("apac/2.jpg", "APAC.zip/APAC/Island.2.full.jpg"); - copyUrlToImage.put("apac/3.jpg", "APAC.zip/APAC/Mountain.3.full.jpg"); - copyUrlToImage.put("apac/4.jpg", "APAC.zip/APAC/Plains.4.full.jpg"); - copyUrlToImage.put("apac/5.jpg", "APAC.zip/APAC/Swamp.5.full.jpg"); - copyUrlToImage.put("apac/6.jpg", "APAC.zip/APAC/Forest.6.full.jpg"); - copyUrlToImage.put("apac/7.jpg", "APAC.zip/APAC/Island.12.full.jpg"); - copyUrlToImage.put("apac/8.jpg", "APAC.zip/APAC/Mountain.8.full.jpg"); - copyUrlToImage.put("apac/9.jpg", "APAC.zip/APAC/Plains.9.full.jpg"); - copyUrlToImage.put("arena/1.jpg", "ARENA.zip/ARENA/Plains.1.full.jpg"); - copyUrlToImage.put("arena/10.jpg", "ARENA.zip/ARENA/Swamp.10.full.jpg"); - copyUrlToImage.put("arena/11.jpg", "ARENA.zip/ARENA/Mountain.11.full.jpg"); - copyUrlToImage.put("arena/12.jpg", "ARENA.zip/ARENA/Forest.12.full.jpg"); - copyUrlToImage.put("arena/13.jpg", "ARENA.zip/ARENA/Pouncing Jaguar.full.jpg"); - copyUrlToImage.put("arena/14.jpg", "ARENA.zip/ARENA/Skittering Skirge.full.jpg"); - copyUrlToImage.put("arena/15.jpg", "ARENA.zip/ARENA/Rewind.full.jpg"); - copyUrlToImage.put("arena/16.jpg", "ARENA.zip/ARENA/Karn, Silver Golem.full.jpg"); - copyUrlToImage.put("arena/17.jpg", "ARENA.zip/ARENA/Duress.full.jpg"); - copyUrlToImage.put("arena/18.jpg", "ARENA.zip/ARENA/Uktabi Orangutan.full.jpg"); - copyUrlToImage.put("arena/19.jpg", "ARENA.zip/ARENA/Chill.full.jpg"); - copyUrlToImage.put("arena/2.jpg", "ARENA.zip/ARENA/Island.2.full.jpg"); - copyUrlToImage.put("arena/20.jpg", "ARENA.zip/ARENA/Pillage.full.jpg"); - copyUrlToImage.put("arena/21.jpg", "ARENA.zip/ARENA/Enlightened Tutor.full.jpg"); - copyUrlToImage.put("arena/22.jpg", "ARENA.zip/ARENA/Stupor.full.jpg"); - copyUrlToImage.put("arena/23.jpg", "ARENA.zip/ARENA/Plains.23.full.jpg"); - copyUrlToImage.put("arena/24.jpg", "ARENA.zip/ARENA/Island.24.full.jpg"); - copyUrlToImage.put("arena/25.jpg", "ARENA.zip/ARENA/Swamp.25.full.jpg"); - copyUrlToImage.put("arena/26.jpg", "ARENA.zip/ARENA/Mountain.26.full.jpg"); - copyUrlToImage.put("arena/27.jpg", "ARENA.zip/ARENA/Forest.27.full.jpg"); - copyUrlToImage.put("arena/28.jpg", "ARENA.zip/ARENA/Creeping Mold.full.jpg"); - copyUrlToImage.put("arena/29.jpg", "ARENA.zip/ARENA/Dismiss.full.jpg"); - copyUrlToImage.put("arena/3.jpg", "ARENA.zip/ARENA/Swamp.3.full.jpg"); - copyUrlToImage.put("arena/30.jpg", "ARENA.zip/ARENA/Fling.full.jpg"); - copyUrlToImage.put("arena/31.jpg", "ARENA.zip/ARENA/Empyrial Armor.full.jpg"); - copyUrlToImage.put("arena/32.jpg", "ARENA.zip/ARENA/Plains.32.full.jpg"); - copyUrlToImage.put("arena/33.jpg", "ARENA.zip/ARENA/Island.33.full.jpg"); - copyUrlToImage.put("arena/34.jpg", "ARENA.zip/ARENA/Swamp.34.full.jpg"); - copyUrlToImage.put("arena/35.jpg", "ARENA.zip/ARENA/Mountain.35.full.jpg"); - copyUrlToImage.put("arena/36.jpg", "ARENA.zip/ARENA/Forest.36.full.jpg"); - copyUrlToImage.put("arena/37.jpg", "ARENA.zip/ARENA/Diabolic Edict.full.jpg"); - copyUrlToImage.put("arena/38.jpg", "ARENA.zip/ARENA/Gaea's Blessing.full.jpg"); - copyUrlToImage.put("arena/39.jpg", "ARENA.zip/ARENA/Island.39.full.jpg"); - copyUrlToImage.put("arena/4.jpg", "ARENA.zip/ARENA/Mountain.4.full.jpg"); - copyUrlToImage.put("arena/40.jpg", "ARENA.zip/ARENA/Forest.40.full.jpg"); - copyUrlToImage.put("arena/41.jpg", "ARENA.zip/ARENA/Man-o'-War.full.jpg"); - copyUrlToImage.put("arena/42.jpg", "ARENA.zip/ARENA/Arc Lightning.full.jpg"); - copyUrlToImage.put("arena/43.jpg", "ARENA.zip/ARENA/Dauthi Slayer.full.jpg"); - copyUrlToImage.put("arena/44.jpg", "ARENA.zip/ARENA/Mana Leak.full.jpg"); - copyUrlToImage.put("arena/45.jpg", "ARENA.zip/ARENA/Plains.45.full.jpg"); - copyUrlToImage.put("arena/46.jpg", "ARENA.zip/ARENA/Island.46.full.jpg"); - copyUrlToImage.put("arena/47.jpg", "ARENA.zip/ARENA/Swamp.47.full.jpg"); - copyUrlToImage.put("arena/48.jpg", "ARENA.zip/ARENA/Mountain.48.full.jpg"); - copyUrlToImage.put("arena/5.jpg", "ARENA.zip/ARENA/Forest.5.full.jpg"); - copyUrlToImage.put("arena/50.jpg", "ARENA.zip/ARENA/Skirk Marauder.full.jpg"); - copyUrlToImage.put("arena/51.jpg", "ARENA.zip/ARENA/Elvish Aberration.full.jpg"); - copyUrlToImage.put("arena/52.jpg", "ARENA.zip/ARENA/Bonesplitter.full.jpg"); - copyUrlToImage.put("arena/53.jpg", "ARENA.zip/ARENA/Plains.53.full.jpg"); - copyUrlToImage.put("arena/54.jpg", "ARENA.zip/ARENA/Island.54.full.jpg"); - copyUrlToImage.put("arena/55.jpg", "ARENA.zip/ARENA/Swamp.55.full.jpg"); - copyUrlToImage.put("arena/56.jpg", "ARENA.zip/ARENA/Mountain.56.full.jpg"); - copyUrlToImage.put("arena/57.jpg", "ARENA.zip/ARENA/Forest.57.full.jpg"); - copyUrlToImage.put("arena/58.jpg", "ARENA.zip/ARENA/Darksteel Ingot.full.jpg"); - copyUrlToImage.put("arena/59.jpg", "ARENA.zip/ARENA/Serum Visions.full.jpg"); - copyUrlToImage.put("arena/6.jpg", "ARENA.zip/ARENA/Disenchant.full.jpg"); - copyUrlToImage.put("arena/60.jpg", "ARENA.zip/ARENA/Glacial Ray.full.jpg"); - copyUrlToImage.put("arena/61.jpg", "ARENA.zip/ARENA/Circle of Protection Art.full.jpg"); - copyUrlToImage.put("arena/62.jpg", "ARENA.zip/ARENA/Mise.full.jpg"); - copyUrlToImage.put("arena/63.jpg", "ARENA.zip/ARENA/Booster Tutor.full.jpg"); - copyUrlToImage.put("arena/64.jpg", "ARENA.zip/ARENA/Goblin Mime.full.jpg"); - copyUrlToImage.put("arena/65.jpg", "ARENA.zip/ARENA/Granny's Payback.full.jpg"); - copyUrlToImage.put("arena/66.jpg", "ARENA.zip/ARENA/Ashnod's Coupon.full.jpg"); - copyUrlToImage.put("arena/67.jpg", "ARENA.zip/ARENA/Plains.67.full.jpg"); - copyUrlToImage.put("arena/68.jpg", "ARENA.zip/ARENA/Island.68.full.jpg"); - copyUrlToImage.put("arena/69.jpg", "ARENA.zip/ARENA/Swamp.69.full.jpg"); - copyUrlToImage.put("arena/7.jpg", "ARENA.zip/ARENA/Fireball.full.jpg"); - copyUrlToImage.put("arena/70.jpg", "ARENA.zip/ARENA/Mountain.70.full.jpg"); - copyUrlToImage.put("arena/71.jpg", "ARENA.zip/ARENA/Forest.71.full.jpg"); - copyUrlToImage.put("arena/72.jpg", "ARENA.zip/ARENA/Genju of the Spires.full.jpg"); - copyUrlToImage.put("arena/73.jpg", "ARENA.zip/ARENA/Okina Nightwatch.full.jpg"); - copyUrlToImage.put("arena/74.jpg", "ARENA.zip/ARENA/Skyknight Legionnaire.full.jpg"); - copyUrlToImage.put("arena/75.jpg", "ARENA.zip/ARENA/Plains.75.full.jpg"); - copyUrlToImage.put("arena/76.jpg", "ARENA.zip/ARENA/Island.76.full.jpg"); - copyUrlToImage.put("arena/77.jpg", "ARENA.zip/ARENA/Swamp.77.full.jpg"); - copyUrlToImage.put("arena/78.jpg", "ARENA.zip/ARENA/Mountain.78.full.jpg"); - copyUrlToImage.put("arena/8.jpg", "ARENA.zip/ARENA/Plains.8.full.jpg"); - copyUrlToImage.put("arena/80.jpg", "ARENA.zip/ARENA/Castigate.full.jpg"); - copyUrlToImage.put("arena/81.jpg", "ARENA.zip/ARENA/Wee Dragonauts.full.jpg"); - copyUrlToImage.put("arena/82.jpg", "ARENA.zip/ARENA/Coiling Oracle.full.jpg"); - copyUrlToImage.put("arena/83.jpg", "ARENA.zip/ARENA/Surging Flame.full.jpg"); - copyUrlToImage.put("arena/9.jpg", "ARENA.zip/ARENA/Island.9.full.jpg"); - copyUrlToImage.put("euro/1.jpg", "EURO.zip/EURO/Forest.1.full.jpg"); - copyUrlToImage.put("euro/10.jpg", "EURO.zip/EURO/Swamp.10.full.jpg"); - copyUrlToImage.put("euro/11.jpg", "EURO.zip/EURO/Forest.11.full.jpg"); - copyUrlToImage.put("euro/12.jpg", "EURO.zip/EURO/Island.12.full.jpg"); - copyUrlToImage.put("euro/13.jpg", "EURO.zip/EURO/Mountain.13.full.jpg"); - copyUrlToImage.put("euro/14.jpg", "EURO.zip/EURO/Plains.14.full.jpg"); - copyUrlToImage.put("euro/15.jpg", "EURO.zip/EURO/Swamp.15.full.jpg"); - copyUrlToImage.put("euro/2.jpg", "EURO.zip/EURO/Island.2.full.jpg"); - copyUrlToImage.put("euro/3.jpg", "EURO.zip/EURO/Mountain.3.full.jpg"); - copyUrlToImage.put("euro/4.jpg", "EURO.zip/EURO/Plains.4.full.jpg"); - copyUrlToImage.put("euro/5.jpg", "EURO.zip/EURO/Swamp.5.full.jpg"); - copyUrlToImage.put("euro/6.jpg", "EURO.zip/EURO/Forest.6.full.jpg"); - copyUrlToImage.put("euro/7.jpg", "EURO.zip/EURO/Island.7.full.jpg"); - copyUrlToImage.put("euro/8.jpg", "EURO.zip/EURO/Mountain.8.full.jpg"); - copyUrlToImage.put("euro/9.jpg", "EURO.zip/EURO/Plains.9.full.jpg"); - copyUrlToImage.put("exp/1.jpg", "EXP.zip/EXP/Prairie Stream.full.jpg"); - copyUrlToImage.put("exp/10.jpg", "EXP.zip/EXP/Temple Garden.full.jpg"); - copyUrlToImage.put("exp/11.jpg", "EXP.zip/EXP/Godless Shrine.full.jpg"); - copyUrlToImage.put("exp/12.jpg", "EXP.zip/EXP/Steam Vents.full.jpg"); - copyUrlToImage.put("exp/13.jpg", "EXP.zip/EXP/Overgrown Tomb.full.jpg"); - copyUrlToImage.put("exp/14.jpg", "EXP.zip/EXP/Sacred Foundry.full.jpg"); - copyUrlToImage.put("exp/15.jpg", "EXP.zip/EXP/Breeding Pool.full.jpg"); - copyUrlToImage.put("exp/16.jpg", "EXP.zip/EXP/Flooded Strand.full.jpg"); - copyUrlToImage.put("exp/17.jpg", "EXP.zip/EXP/Polluted Delta.full.jpg"); - copyUrlToImage.put("exp/18.jpg", "EXP.zip/EXP/Bloodstained Mire.full.jpg"); - copyUrlToImage.put("exp/19.jpg", "EXP.zip/EXP/Wooded Foothills.full.jpg"); - copyUrlToImage.put("exp/2.jpg", "EXP.zip/EXP/Sunken Hollow.full.jpg"); - copyUrlToImage.put("exp/20.jpg", "EXP.zip/EXP/Windswept Heath.full.jpg"); - copyUrlToImage.put("exp/21.jpg", "EXP.zip/EXP/Marsh Flats.full.jpg"); - copyUrlToImage.put("exp/22.jpg", "EXP.zip/EXP/Scalding Tarn.full.jpg"); - copyUrlToImage.put("exp/23.jpg", "EXP.zip/EXP/Verdant Catacombs.full.jpg"); - copyUrlToImage.put("exp/24.jpg", "EXP.zip/EXP/Arid Mesa.full.jpg"); - copyUrlToImage.put("exp/25.jpg", "EXP.zip/EXP/Misty Rainforest.full.jpg"); - copyUrlToImage.put("exp/3.jpg", "EXP.zip/EXP/Smoldering Marsh.full.jpg"); - copyUrlToImage.put("exp/4.jpg", "EXP.zip/EXP/Cinder Glade.full.jpg"); - copyUrlToImage.put("exp/5.jpg", "EXP.zip/EXP/Canopy Vista.full.jpg"); - copyUrlToImage.put("exp/6.jpg", "EXP.zip/EXP/Hallowed Fountain.full.jpg"); - copyUrlToImage.put("exp/7.jpg", "EXP.zip/EXP/Watery Grave.full.jpg"); - copyUrlToImage.put("exp/8.jpg", "EXP.zip/EXP/Blood Crypt.full.jpg"); - copyUrlToImage.put("exp/9.jpg", "EXP.zip/EXP/Stomping Ground.full.jpg"); - copyUrlToImage.put("fnmp/1.jpg", "FNMP.zip/FNMP/River Boa.full.jpg"); - copyUrlToImage.put("fnmp/10.jpg", "FNMP.zip/FNMP/Stone Rain.full.jpg"); - copyUrlToImage.put("fnmp/100.jpg", "FNMP.zip/FNMP/Thirst for Knowledge.full.jpg"); - copyUrlToImage.put("fnmp/101.jpg", "FNMP.zip/FNMP/Serrated Arrows.full.jpg"); - copyUrlToImage.put("fnmp/102.jpg", "FNMP.zip/FNMP/Isochron Scepter.full.jpg"); - copyUrlToImage.put("fnmp/103.jpg", "FNMP.zip/FNMP/Shrapnel Blast.full.jpg"); - copyUrlToImage.put("fnmp/104.jpg", "FNMP.zip/FNMP/Magma Jet.full.jpg"); - copyUrlToImage.put("fnmp/105.jpg", "FNMP.zip/FNMP/Myr Enforcer.full.jpg"); - copyUrlToImage.put("fnmp/106.jpg", "FNMP.zip/FNMP/Kitchen Finks.full.jpg"); - copyUrlToImage.put("fnmp/107.jpg", "FNMP.zip/FNMP/Merrow Reejerey.full.jpg"); - copyUrlToImage.put("fnmp/108.jpg", "FNMP.zip/FNMP/Wren's Run Vanquisher.full.jpg"); - copyUrlToImage.put("fnmp/109.jpg", "FNMP.zip/FNMP/Mulldrifter.full.jpg"); - copyUrlToImage.put("fnmp/11.jpg", "FNMP.zip/FNMP/Llanowar Elves.full.jpg"); - copyUrlToImage.put("fnmp/110.jpg", "FNMP.zip/FNMP/Murderous Redcap.full.jpg"); - copyUrlToImage.put("fnmp/111.jpg", "FNMP.zip/FNMP/Lightning Greaves.full.jpg"); - copyUrlToImage.put("fnmp/112.jpg", "FNMP.zip/FNMP/Watchwolf.full.jpg"); - copyUrlToImage.put("fnmp/113.jpg", "FNMP.zip/FNMP/Browbeat.full.jpg"); - copyUrlToImage.put("fnmp/114.jpg", "FNMP.zip/FNMP/Oblivion Ring.full.jpg"); - copyUrlToImage.put("fnmp/115.jpg", "FNMP.zip/FNMP/Sakura-Tribe Elder.full.jpg"); - copyUrlToImage.put("fnmp/116.jpg", "FNMP.zip/FNMP/Tidehollow Sculler.full.jpg"); - copyUrlToImage.put("fnmp/117.jpg", "FNMP.zip/FNMP/Ghostly Prison.full.jpg"); - copyUrlToImage.put("fnmp/118.jpg", "FNMP.zip/FNMP/Ancient Ziggurat.full.jpg"); - copyUrlToImage.put("fnmp/119.jpg", "FNMP.zip/FNMP/Bloodbraid Elf.full.jpg"); - copyUrlToImage.put("fnmp/12.jpg", "FNMP.zip/FNMP/Swords to Plowshares.full.jpg"); - copyUrlToImage.put("fnmp/120.jpg", "FNMP.zip/FNMP/Cloudpost.full.jpg"); - copyUrlToImage.put("fnmp/121.jpg", "FNMP.zip/FNMP/Elvish Visionary.full.jpg"); - copyUrlToImage.put("fnmp/122.jpg", "FNMP.zip/FNMP/Anathemancer.full.jpg"); - copyUrlToImage.put("fnmp/123.jpg", "FNMP.zip/FNMP/Krosan Grip.full.jpg"); - copyUrlToImage.put("fnmp/124.jpg", "FNMP.zip/FNMP/Qasali Pridemage.full.jpg"); - copyUrlToImage.put("fnmp/125.jpg", "FNMP.zip/FNMP/Rift Bolt.full.jpg"); - copyUrlToImage.put("fnmp/126.jpg", "FNMP.zip/FNMP/Gatekeeper of Malakir.full.jpg"); - copyUrlToImage.put("fnmp/127.jpg", "FNMP.zip/FNMP/Wild Nacatl.full.jpg"); - copyUrlToImage.put("fnmp/128.jpg", "FNMP.zip/FNMP/Everflowing Chalice.full.jpg"); - copyUrlToImage.put("fnmp/129.jpg", "FNMP.zip/FNMP/Spellstutter Sprite.full.jpg"); - copyUrlToImage.put("fnmp/13.jpg", "FNMP.zip/FNMP/Ophidian.full.jpg"); - copyUrlToImage.put("fnmp/130.jpg", "FNMP.zip/FNMP/Wall of Omens.full.jpg"); - copyUrlToImage.put("fnmp/131.jpg", "FNMP.zip/FNMP/Artisan of Kozilek.full.jpg"); - copyUrlToImage.put("fnmp/132.jpg", "FNMP.zip/FNMP/Squadron Hawk.full.jpg"); - copyUrlToImage.put("fnmp/133.jpg", "FNMP.zip/FNMP/Rhox War Monk.full.jpg"); - copyUrlToImage.put("fnmp/134.jpg", "FNMP.zip/FNMP/Jace's Ingenuity.full.jpg"); - copyUrlToImage.put("fnmp/135.jpg", "FNMP.zip/FNMP/Cultivate.full.jpg"); - copyUrlToImage.put("fnmp/136.jpg", "FNMP.zip/FNMP/Teetering Peaks.full.jpg"); - copyUrlToImage.put("fnmp/137.jpg", "FNMP.zip/FNMP/Contagion Clasp.full.jpg"); - copyUrlToImage.put("fnmp/138.jpg", "FNMP.zip/FNMP/Go for the Throat.full.jpg"); - copyUrlToImage.put("fnmp/139.jpg", "FNMP.zip/FNMP/Savage Lands.full.jpg"); - copyUrlToImage.put("fnmp/14.jpg", "FNMP.zip/FNMP/Jackal Pup.full.jpg"); - copyUrlToImage.put("fnmp/140.jpg", "FNMP.zip/FNMP/Glistener Elf.full.jpg"); - copyUrlToImage.put("fnmp/141.jpg", "FNMP.zip/FNMP/Despise.full.jpg"); - copyUrlToImage.put("fnmp/142.jpg", "FNMP.zip/FNMP/Tectonic Edge.full.jpg"); - copyUrlToImage.put("fnmp/143.jpg", "FNMP.zip/FNMP/Dismember.full.jpg"); - copyUrlToImage.put("fnmp/144.jpg", "FNMP.zip/FNMP/Ancient Grudge.full.jpg"); - copyUrlToImage.put("fnmp/145.jpg", "FNMP.zip/FNMP/Acidic Slime.full.jpg"); - copyUrlToImage.put("fnmp/146.jpg", "FNMP.zip/FNMP/Forbidden Alchemy.full.jpg"); - copyUrlToImage.put("fnmp/147.jpg", "FNMP.zip/FNMP/Avacyn's Pilgrim.full.jpg"); - copyUrlToImage.put("fnmp/148.jpg", "FNMP.zip/FNMP/Lingering Souls.full.jpg"); - copyUrlToImage.put("fnmp/149.jpg", "FNMP.zip/FNMP/Evolving Wilds.full.jpg"); - copyUrlToImage.put("fnmp/15.jpg", "FNMP.zip/FNMP/Quirion Ranger.full.jpg"); - copyUrlToImage.put("fnmp/150.jpg", "FNMP.zip/FNMP/Pillar of Flame.full.jpg"); - copyUrlToImage.put("fnmp/151.jpg", "FNMP.zip/FNMP/Gitaxian Probe.full.jpg"); - copyUrlToImage.put("fnmp/152.jpg", "FNMP.zip/FNMP/Searing Spear.full.jpg"); - copyUrlToImage.put("fnmp/153.jpg", "FNMP.zip/FNMP/Reliquary Tower.full.jpg"); - copyUrlToImage.put("fnmp/154.jpg", "FNMP.zip/FNMP/Farseek.full.jpg"); - copyUrlToImage.put("fnmp/155.jpg", "FNMP.zip/FNMP/Call of the Conclave.full.jpg"); - copyUrlToImage.put("fnmp/156.jpg", "FNMP.zip/FNMP/Judge's Familiar.full.jpg"); - copyUrlToImage.put("fnmp/157.jpg", "FNMP.zip/FNMP/Izzet Charm.full.jpg"); - copyUrlToImage.put("fnmp/158.jpg", "FNMP.zip/FNMP/Rakdos Cackler.full.jpg"); - copyUrlToImage.put("fnmp/159.jpg", "FNMP.zip/FNMP/Dimir Charm.full.jpg"); - copyUrlToImage.put("fnmp/16.jpg", "FNMP.zip/FNMP/Carnophage.full.jpg"); - copyUrlToImage.put("fnmp/160.jpg", "FNMP.zip/FNMP/Experiment One.full.jpg"); - copyUrlToImage.put("fnmp/161.jpg", "FNMP.zip/FNMP/Ghor-Clan Rampager.full.jpg"); - copyUrlToImage.put("fnmp/162.jpg", "FNMP.zip/FNMP/Grisly Salvage.full.jpg"); - copyUrlToImage.put("fnmp/163.jpg", "FNMP.zip/FNMP/Sin Collector.full.jpg"); - copyUrlToImage.put("fnmp/164.jpg", "FNMP.zip/FNMP/Warleader's Helix.full.jpg"); - copyUrlToImage.put("fnmp/165.jpg", "FNMP.zip/FNMP/Elvish Mystic.full.jpg"); - copyUrlToImage.put("fnmp/166.jpg", "FNMP.zip/FNMP/Banisher Priest.full.jpg"); - copyUrlToImage.put("fnmp/167.jpg", "FNMP.zip/FNMP/Encroaching Wastes.full.jpg"); - copyUrlToImage.put("fnmp/168.jpg", "FNMP.zip/FNMP/Tormented Hero.full.jpg"); - copyUrlToImage.put("fnmp/169.jpg", "FNMP.zip/FNMP/Dissolve.full.jpg"); - copyUrlToImage.put("fnmp/17.jpg", "FNMP.zip/FNMP/Impulse.full.jpg"); - copyUrlToImage.put("fnmp/170.jpg", "FNMP.zip/FNMP/Magma Spray.full.jpg"); - copyUrlToImage.put("fnmp/171.jpg", "FNMP.zip/FNMP/Bile Blight.full.jpg"); - copyUrlToImage.put("fnmp/172.jpg", "FNMP.zip/FNMP/Banishing Light.full.jpg"); - copyUrlToImage.put("fnmp/173.jpg", "FNMP.zip/FNMP/Fanatic of Xenagos.full.jpg"); - copyUrlToImage.put("fnmp/174.jpg", "FNMP.zip/FNMP/Brain Maggot.full.jpg"); - copyUrlToImage.put("fnmp/175.jpg", "FNMP.zip/FNMP/Stoke the Flames.full.jpg"); - copyUrlToImage.put("fnmp/176.jpg", "FNMP.zip/FNMP/Frenzied Goblin.full.jpg"); - copyUrlToImage.put("fnmp/177.jpg", "FNMP.zip/FNMP/Disdainful Stroke.full.jpg"); - copyUrlToImage.put("fnmp/178.jpg", "FNMP.zip/FNMP/Hordeling Outburst.full.jpg"); - copyUrlToImage.put("fnmp/179.jpg", "FNMP.zip/FNMP/Suspension Field.full.jpg"); - copyUrlToImage.put("fnmp/18.jpg", "FNMP.zip/FNMP/Fireblast.full.jpg"); - copyUrlToImage.put("fnmp/180.jpg", "FNMP.zip/FNMP/Abzan Beastmaster.full.jpg"); - copyUrlToImage.put("fnmp/181.jpg", "FNMP.zip/FNMP/Frost Walker.full.jpg"); - copyUrlToImage.put("fnmp/182.jpg", "FNMP.zip/FNMP/Path to Exile.full.jpg"); - copyUrlToImage.put("fnmp/183.jpg", "FNMP.zip/FNMP/Serum Visions.full.jpg"); - copyUrlToImage.put("fnmp/184.jpg", "FNMP.zip/FNMP/Orator of Ojutai.full.jpg"); - copyUrlToImage.put("fnmp/186.jpg", "FNMP.zip/FNMP/Roast.full.jpg"); - copyUrlToImage.put("fnmp/187.jpg", "FNMP.zip/FNMP/Anticipate.full.jpg"); - copyUrlToImage.put("fnmp/188.jpg", "FNMP.zip/FNMP/Nissa's Pilgrimage.full.jpg"); - copyUrlToImage.put("fnmp/189.jpg", "FNMP.zip/FNMP/Clash of Wills.full.jpg"); - copyUrlToImage.put("fnmp/19.jpg", "FNMP.zip/FNMP/Soltari Priest.full.jpg"); - copyUrlToImage.put("fnmp/190.jpg", "FNMP.zip/FNMP/Smash to Smithereens.full.jpg"); - copyUrlToImage.put("fnmp/191.jpg", "FNMP.zip/FNMP/Blighted Fen.full.jpg"); - copyUrlToImage.put("fnmp/2.jpg", "FNMP.zip/FNMP/Terror.full.jpg"); - copyUrlToImage.put("fnmp/20.jpg", "FNMP.zip/FNMP/Albino Troll.full.jpg"); - copyUrlToImage.put("fnmp/21.jpg", "FNMP.zip/FNMP/Dissipate.full.jpg"); - copyUrlToImage.put("fnmp/22.jpg", "FNMP.zip/FNMP/Black Knight.full.jpg"); - copyUrlToImage.put("fnmp/23.jpg", "FNMP.zip/FNMP/Wall of Blossoms.full.jpg"); - copyUrlToImage.put("fnmp/24.jpg", "FNMP.zip/FNMP/Fireslinger.full.jpg"); - copyUrlToImage.put("fnmp/25.jpg", "FNMP.zip/FNMP/Drain Life.full.jpg"); - copyUrlToImage.put("fnmp/26.jpg", "FNMP.zip/FNMP/Aura of Silence.full.jpg"); - copyUrlToImage.put("fnmp/27.jpg", "FNMP.zip/FNMP/Forbid.full.jpg"); - copyUrlToImage.put("fnmp/28.jpg", "FNMP.zip/FNMP/Spike Feeder.full.jpg"); - copyUrlToImage.put("fnmp/29.jpg", "FNMP.zip/FNMP/Mogg Fanatic.full.jpg"); - copyUrlToImage.put("fnmp/3.jpg", "FNMP.zip/FNMP/Longbow Archer.full.jpg"); - copyUrlToImage.put("fnmp/30.jpg", "FNMP.zip/FNMP/White Knight.full.jpg"); - copyUrlToImage.put("fnmp/31.jpg", "FNMP.zip/FNMP/Disenchant.full.jpg"); - copyUrlToImage.put("fnmp/32.jpg", "FNMP.zip/FNMP/Bottle Gnomes.full.jpg"); - copyUrlToImage.put("fnmp/33.jpg", "FNMP.zip/FNMP/Muscle Sliver.full.jpg"); - copyUrlToImage.put("fnmp/34.jpg", "FNMP.zip/FNMP/Crystalline Sliver.full.jpg"); - copyUrlToImage.put("fnmp/35.jpg", "FNMP.zip/FNMP/Capsize.full.jpg"); - copyUrlToImage.put("fnmp/36.jpg", "FNMP.zip/FNMP/Priest of Titania.full.jpg"); - copyUrlToImage.put("fnmp/37.jpg", "FNMP.zip/FNMP/Goblin Bombardment.full.jpg"); - copyUrlToImage.put("fnmp/38.jpg", "FNMP.zip/FNMP/Scragnoth.full.jpg"); - copyUrlToImage.put("fnmp/39.jpg", "FNMP.zip/FNMP/Smother.full.jpg"); - copyUrlToImage.put("fnmp/4.jpg", "FNMP.zip/FNMP/Volcanic Geyser.full.jpg"); - copyUrlToImage.put("fnmp/40.jpg", "FNMP.zip/FNMP/Whipcorder.full.jpg"); - copyUrlToImage.put("fnmp/41.jpg", "FNMP.zip/FNMP/Sparksmith.full.jpg"); - copyUrlToImage.put("fnmp/42.jpg", "FNMP.zip/FNMP/Krosan Tusker.full.jpg"); - copyUrlToImage.put("fnmp/43.jpg", "FNMP.zip/FNMP/Withered Wretch.full.jpg"); - copyUrlToImage.put("fnmp/44.jpg", "FNMP.zip/FNMP/Willbender.full.jpg"); - copyUrlToImage.put("fnmp/45.jpg", "FNMP.zip/FNMP/Slice and Dice.full.jpg"); - copyUrlToImage.put("fnmp/46.jpg", "FNMP.zip/FNMP/Silver Knight.full.jpg"); - copyUrlToImage.put("fnmp/47.jpg", "FNMP.zip/FNMP/Krosan Warchief.full.jpg"); - copyUrlToImage.put("fnmp/48.jpg", "FNMP.zip/FNMP/Lightning Rift.full.jpg"); - copyUrlToImage.put("fnmp/49.jpg", "FNMP.zip/FNMP/Carrion Feeder.full.jpg"); - copyUrlToImage.put("fnmp/5.jpg", "FNMP.zip/FNMP/Mind Warp.full.jpg"); - copyUrlToImage.put("fnmp/50.jpg", "FNMP.zip/FNMP/Treetop Village.full.jpg"); - copyUrlToImage.put("fnmp/51.jpg", "FNMP.zip/FNMP/Accumulated Knowledge.full.jpg"); - copyUrlToImage.put("fnmp/52.jpg", "FNMP.zip/FNMP/Avalanche Riders.full.jpg"); - copyUrlToImage.put("fnmp/53.jpg", "FNMP.zip/FNMP/Reanimate.full.jpg"); - copyUrlToImage.put("fnmp/54.jpg", "FNMP.zip/FNMP/Mother of Runes.full.jpg"); - copyUrlToImage.put("fnmp/55.jpg", "FNMP.zip/FNMP/Brainstorm.full.jpg"); - copyUrlToImage.put("fnmp/56.jpg", "FNMP.zip/FNMP/Rancor.full.jpg"); - copyUrlToImage.put("fnmp/57.jpg", "FNMP.zip/FNMP/Seal of Cleansing.full.jpg"); - copyUrlToImage.put("fnmp/58.jpg", "FNMP.zip/FNMP/Flametongue Kavu.full.jpg"); - copyUrlToImage.put("fnmp/59.jpg", "FNMP.zip/FNMP/Blastoderm.full.jpg"); - copyUrlToImage.put("fnmp/6.jpg", "FNMP.zip/FNMP/Shock.full.jpg"); - copyUrlToImage.put("fnmp/60.jpg", "FNMP.zip/FNMP/Cabal Therapy.full.jpg"); - copyUrlToImage.put("fnmp/61.jpg", "FNMP.zip/FNMP/Fact or Fiction.full.jpg"); - copyUrlToImage.put("fnmp/62.jpg", "FNMP.zip/FNMP/Juggernaut.full.jpg"); - copyUrlToImage.put("fnmp/63.jpg", "FNMP.zip/FNMP/Circle of Protection Red.full.jpg"); - copyUrlToImage.put("fnmp/64.jpg", "FNMP.zip/FNMP/Kird Ape.full.jpg"); - copyUrlToImage.put("fnmp/65.jpg", "FNMP.zip/FNMP/Duress.full.jpg"); - copyUrlToImage.put("fnmp/66.jpg", "FNMP.zip/FNMP/Counterspell.full.jpg"); - copyUrlToImage.put("fnmp/67.jpg", "FNMP.zip/FNMP/Icy Manipulator.full.jpg"); - copyUrlToImage.put("fnmp/68.jpg", "FNMP.zip/FNMP/Elves of Deep Shadow.full.jpg"); - copyUrlToImage.put("fnmp/69.jpg", "FNMP.zip/FNMP/Armadillo Cloak.full.jpg"); - copyUrlToImage.put("fnmp/7.jpg", "FNMP.zip/FNMP/Staunch Defenders.full.jpg"); - copyUrlToImage.put("fnmp/70.jpg", "FNMP.zip/FNMP/Terminate.full.jpg"); - copyUrlToImage.put("fnmp/71.jpg", "FNMP.zip/FNMP/Lobotomy.full.jpg"); - copyUrlToImage.put("fnmp/72.jpg", "FNMP.zip/FNMP/Goblin Warchief.full.jpg"); - copyUrlToImage.put("fnmp/73.jpg", "FNMP.zip/FNMP/Wild Mongrel.full.jpg"); - copyUrlToImage.put("fnmp/74.jpg", "FNMP.zip/FNMP/Chainer's Edict.full.jpg"); - copyUrlToImage.put("fnmp/75.jpg", "FNMP.zip/FNMP/Circular Logic.full.jpg"); - copyUrlToImage.put("fnmp/76.jpg", "FNMP.zip/FNMP/Astral Slide.full.jpg"); - copyUrlToImage.put("fnmp/77.jpg", "FNMP.zip/FNMP/Arrogant Wurm.full.jpg"); - copyUrlToImage.put("fnmp/78a.jpg", "FNMP.zip/FNMP/Life (Life/Death.full.jpg"); - copyUrlToImage.put("fnmp/78b.jpg", "FNMP.zip/FNMP/Death (Life/Death).full.jpg"); - copyUrlToImage.put("fnmp/79a.jpg", "FNMP.zip/FNMP/Fire (Fire/Ice).full.jpg"); - copyUrlToImage.put("fnmp/79b.jpg", "FNMP.zip/FNMP/Ice (Fire/Ice).full.jpg"); - copyUrlToImage.put("fnmp/8.jpg", "FNMP.zip/FNMP/Giant Growth.full.jpg"); - copyUrlToImage.put("fnmp/80.jpg", "FNMP.zip/FNMP/Firebolt.full.jpg"); - copyUrlToImage.put("fnmp/81.jpg", "FNMP.zip/FNMP/Deep Analysis.full.jpg"); - copyUrlToImage.put("fnmp/82.jpg", "FNMP.zip/FNMP/Gerrard's Verdict.full.jpg"); - copyUrlToImage.put("fnmp/83.jpg", "FNMP.zip/FNMP/Basking Rootwalla.full.jpg"); - copyUrlToImage.put("fnmp/84.jpg", "FNMP.zip/FNMP/Wonder.full.jpg"); - copyUrlToImage.put("fnmp/85.jpg", "FNMP.zip/FNMP/Goblin Legionnaire.full.jpg"); - copyUrlToImage.put("fnmp/86.jpg", "FNMP.zip/FNMP/Engineered Plague.full.jpg"); - copyUrlToImage.put("fnmp/87.jpg", "FNMP.zip/FNMP/Goblin Ringleader.full.jpg"); - copyUrlToImage.put("fnmp/88.jpg", "FNMP.zip/FNMP/Wing Shards.full.jpg"); - copyUrlToImage.put("fnmp/89.jpg", "FNMP.zip/FNMP/Cabal Coffers.full.jpg"); - copyUrlToImage.put("fnmp/9.jpg", "FNMP.zip/FNMP/Prodigal Sorcerer.full.jpg"); - copyUrlToImage.put("fnmp/90.jpg", "FNMP.zip/FNMP/Roar of the Wurm.full.jpg"); - copyUrlToImage.put("fnmp/91.jpg", "FNMP.zip/FNMP/Force Spike.full.jpg"); - copyUrlToImage.put("fnmp/92.jpg", "FNMP.zip/FNMP/Remand.full.jpg"); - copyUrlToImage.put("fnmp/93.jpg", "FNMP.zip/FNMP/Tormod's Crypt.full.jpg"); - copyUrlToImage.put("fnmp/94.jpg", "FNMP.zip/FNMP/Eternal Witness.full.jpg"); - copyUrlToImage.put("fnmp/95.jpg", "FNMP.zip/FNMP/Tendrils of Agony.full.jpg"); - copyUrlToImage.put("fnmp/96.jpg", "FNMP.zip/FNMP/Pendelhaven.full.jpg"); - copyUrlToImage.put("fnmp/97.jpg", "FNMP.zip/FNMP/Resurrection.full.jpg"); - copyUrlToImage.put("fnmp/98.jpg", "FNMP.zip/FNMP/Wall of Roots.full.jpg"); - copyUrlToImage.put("fnmp/99.jpg", "FNMP.zip/FNMP/Desert.full.jpg"); - copyUrlToImage.put("gpx/1.jpg", "GPX.zip/GPX/Spiritmonger.full.jpg"); - copyUrlToImage.put("gpx/10.jpg", "GPX.zip/GPX/Batterskull.full.jpg"); - copyUrlToImage.put("gpx/11.jpg", "GPX.zip/GPX/Griselbrand.full.jpg"); - copyUrlToImage.put("gpx/12.jpg", "GPX.zip/GPX/Stoneforge Mystic.full.jpg"); - copyUrlToImage.put("gpx/2.jpg", "GPX.zip/GPX/Call of the Herd.full.jpg"); - copyUrlToImage.put("gpx/3.jpg", "GPX.zip/GPX/Chrome Mox.full.jpg"); - copyUrlToImage.put("gpx/4.jpg", "GPX.zip/GPX/Umezawa's Jitte.full.jpg"); - copyUrlToImage.put("gpx/5.jpg", "GPX.zip/GPX/Maelstrom Pulse.full.jpg"); - copyUrlToImage.put("gpx/6.jpg", "GPX.zip/GPX/Goblin Guide.full.jpg"); - copyUrlToImage.put("gpx/7.jpg", "GPX.zip/GPX/Lotus Cobra.full.jpg"); - copyUrlToImage.put("gpx/8.jpg", "GPX.zip/GPX/Primeval Titan.full.jpg"); - copyUrlToImage.put("gpx/9.jpg", "GPX.zip/GPX/All Is Dust.full.jpg"); - copyUrlToImage.put("grc/1.jpg", "GRC.zip/GRC/Wood Elves.full.jpg"); - copyUrlToImage.put("grc/10.jpg", "GRC.zip/GRC/Mogg Fanatic.full.jpg"); - copyUrlToImage.put("grc/11.jpg", "GRC.zip/GRC/Mind Stone.full.jpg"); - copyUrlToImage.put("grc/12.jpg", "GRC.zip/GRC/Dauntless Dourbark.full.jpg"); - copyUrlToImage.put("grc/13.jpg", "GRC.zip/GRC/Lava Axe.full.jpg"); - copyUrlToImage.put("grc/14.jpg", "GRC.zip/GRC/Cenn's Tactician.full.jpg"); - copyUrlToImage.put("grc/15.jpg", "GRC.zip/GRC/Oona's Blackguard.full.jpg"); - copyUrlToImage.put("grc/16.jpg", "GRC.zip/GRC/Gravedigger.full.jpg"); - copyUrlToImage.put("grc/17.jpg", "GRC.zip/GRC/Boggart Ram-Gang.full.jpg"); - copyUrlToImage.put("grc/18.jpg", "GRC.zip/GRC/Wilt-Leaf Cavaliers.full.jpg"); - copyUrlToImage.put("grc/19.jpg", "GRC.zip/GRC/Duergar Hedge-Mage.full.jpg"); - copyUrlToImage.put("grc/2.jpg", "GRC.zip/GRC/Icatian Javelineers.full.jpg"); - copyUrlToImage.put("grc/20.jpg", "GRC.zip/GRC/Selkie Hedge-Mage.full.jpg"); - copyUrlToImage.put("grc/21.jpg", "GRC.zip/GRC/Sprouting Thrinax.full.jpg"); - copyUrlToImage.put("grc/22.jpg", "GRC.zip/GRC/Woolly Thoctar.full.jpg"); - copyUrlToImage.put("grc/24.jpg", "GRC.zip/GRC/Path to Exile.full.jpg"); - copyUrlToImage.put("grc/25.jpg", "GRC.zip/GRC/Hellspark Elemental.full.jpg"); - copyUrlToImage.put("grc/26.jpg", "GRC.zip/GRC/Marisi's Twinclaws.full.jpg"); - copyUrlToImage.put("grc/27.jpg", "GRC.zip/GRC/Slave of Bolas.full.jpg"); - copyUrlToImage.put("grc/28.jpg", "GRC.zip/GRC/Mycoid Shepherd.full.jpg"); - copyUrlToImage.put("grc/29.jpg", "GRC.zip/GRC/Naya Sojourners.full.jpg"); - copyUrlToImage.put("grc/3.jpg", "GRC.zip/GRC/Fiery Temper.full.jpg"); - copyUrlToImage.put("grc/30.jpg", "GRC.zip/GRC/Mind Control.full.jpg"); - copyUrlToImage.put("grc/31.jpg", "GRC.zip/GRC/Rise from the Grave.full.jpg"); - copyUrlToImage.put("grc/32.jpg", "GRC.zip/GRC/Kor Duelist.full.jpg"); - copyUrlToImage.put("grc/33.jpg", "GRC.zip/GRC/Vampire Nighthawk.full.jpg"); - copyUrlToImage.put("grc/34.jpg", "GRC.zip/GRC/Nissa's Chosen.full.jpg"); - copyUrlToImage.put("grc/35.jpg", "GRC.zip/GRC/Emeria Angel.full.jpg"); - copyUrlToImage.put("grc/36.jpg", "GRC.zip/GRC/Kor Firewalker.full.jpg"); - copyUrlToImage.put("grc/37.jpg", "GRC.zip/GRC/Leatherback Baloth.full.jpg"); - copyUrlToImage.put("grc/38.jpg", "GRC.zip/GRC/Hada Freeblade.full.jpg"); - copyUrlToImage.put("grc/39.jpg", "GRC.zip/GRC/Kalastria Highborn.full.jpg"); - copyUrlToImage.put("grc/4.jpg", "GRC.zip/GRC/Boomerang.full.jpg"); - copyUrlToImage.put("grc/40.jpg", "GRC.zip/GRC/Syphon Mind.full.jpg"); - copyUrlToImage.put("grc/46.jpg", "GRC.zip/GRC/Pathrazer of Ulamog.full.jpg"); - copyUrlToImage.put("grc/47.jpg", "GRC.zip/GRC/Curse of Wizardry.full.jpg"); - copyUrlToImage.put("grc/48.jpg", "GRC.zip/GRC/Staggershock.full.jpg"); - copyUrlToImage.put("grc/49.jpg", "GRC.zip/GRC/Deathless Angel.full.jpg"); - copyUrlToImage.put("grc/5.jpg", "GRC.zip/GRC/Calciderm.full.jpg"); - copyUrlToImage.put("grc/50.jpg", "GRC.zip/GRC/Fling.full.jpg"); - copyUrlToImage.put("grc/51.jpg", "GRC.zip/GRC/Sylvan Ranger.full.jpg"); - copyUrlToImage.put("grc/59.jpg", "GRC.zip/GRC/Plague Stinger.full.jpg"); - copyUrlToImage.put("grc/6.jpg", "GRC.zip/GRC/Reckless Wurm.full.jpg"); - copyUrlToImage.put("grc/60.jpg", "GRC.zip/GRC/Golem's Heart.full.jpg"); - copyUrlToImage.put("grc/63.jpg", "GRC.zip/GRC/Skinrender.full.jpg"); - copyUrlToImage.put("grc/64.jpg", "GRC.zip/GRC/Master's Call.full.jpg"); - copyUrlToImage.put("grc/65.jpg", "GRC.zip/GRC/Plague Myr.full.jpg"); - copyUrlToImage.put("grc/66.jpg", "GRC.zip/GRC/Signal Pest.full.jpg"); - copyUrlToImage.put("grc/69.jpg", "GRC.zip/GRC/Fling.full.jpg"); - copyUrlToImage.put("grc/7.jpg", "GRC.zip/GRC/Yixlid Jailer.full.jpg"); - copyUrlToImage.put("grc/70.jpg", "GRC.zip/GRC/Sylvan Ranger.full.jpg"); - copyUrlToImage.put("grc/71.jpg", "GRC.zip/GRC/Vault Skirge.full.jpg"); - copyUrlToImage.put("grc/72.jpg", "GRC.zip/GRC/Maul Splicer.full.jpg"); - copyUrlToImage.put("grc/73.jpg", "GRC.zip/GRC/Shrine of Burning Rage.full.jpg"); - copyUrlToImage.put("grc/76.jpg", "GRC.zip/GRC/Tormented Soul.full.jpg"); - copyUrlToImage.put("grc/77.jpg", "GRC.zip/GRC/Auramancer.full.jpg"); - copyUrlToImage.put("grc/78.jpg", "GRC.zip/GRC/Circle of Flame.full.jpg"); - copyUrlToImage.put("grc/79.jpg", "GRC.zip/GRC/Gather the Townsfolk.full.jpg"); - copyUrlToImage.put("grc/8.jpg", "GRC.zip/GRC/Zoetic Cavern.full.jpg"); - copyUrlToImage.put("grc/80.jpg", "GRC.zip/GRC/Curse of the Bloody Tome.full.jpg"); - copyUrlToImage.put("grc/81.jpg", "GRC.zip/GRC/Curse of Thirst.full.jpg"); - copyUrlToImage.put("grc/82.jpg", "GRC.zip/GRC/Nearheath Stalker.full.jpg"); - copyUrlToImage.put("grc/83.jpg", "GRC.zip/GRC/Bloodcrazed Neonate.full.jpg"); - copyUrlToImage.put("grc/84.jpg", "GRC.zip/GRC/Boneyard Wurm.full.jpg"); - copyUrlToImage.put("grc/9.jpg", "GRC.zip/GRC/Llanowar Elves.full.jpg"); - copyUrlToImage.put("jr/1.jpg", "JP.zip/JP/Lightning Bolt.full.jpg"); - copyUrlToImage.put("jr/10.jpg", "JP.zip/JP/Tradewind Rider.full.jpg"); - copyUrlToImage.put("jr/100.jpg", "JP.zip/JP/Feldon of the Third Path.full.jpg"); - copyUrlToImage.put("jr/101.jpg", "JP.zip/JP/Wasteland.full.jpg"); - copyUrlToImage.put("jr/103.jpg", "JP.zip/JP/Mana Drain.full.jpg"); - copyUrlToImage.put("jr/105.jpg", "JP.zip/JP/Command Beacon.full.jpg"); - copyUrlToImage.put("jr/11.jpg", "JP.zip/JP/Intuition.full.jpg"); - copyUrlToImage.put("jr/12.jpg", "JP.zip/JP/Argothian Enchantress.full.jpg"); - copyUrlToImage.put("jr/13.jpg", "JP.zip/JP/Living Death.full.jpg"); - copyUrlToImage.put("jr/14.jpg", "JP.zip/JP/Armageddon.full.jpg"); - copyUrlToImage.put("jr/15.jpg", "JP.zip/JP/Balance.full.jpg"); - copyUrlToImage.put("jr/16.jpg", "JP.zip/JP/Time Warp.full.jpg"); - copyUrlToImage.put("jr/17.jpg", "JP.zip/JP/Phyrexian Negator.full.jpg"); - copyUrlToImage.put("jr/18.jpg", "JP.zip/JP/Deranged Hermit.full.jpg"); - copyUrlToImage.put("jr/19.jpg", "JP.zip/JP/Hermit Druid.full.jpg"); - copyUrlToImage.put("jr/2.jpg", "JP.zip/JP/Stroke of Genius.full.jpg"); - copyUrlToImage.put("jr/20.jpg", "JP.zip/JP/Gemstone Mine.full.jpg"); - copyUrlToImage.put("jr/21.jpg", "JP.zip/JP/Regrowth.full.jpg"); - copyUrlToImage.put("jr/22.jpg", "JP.zip/JP/Sol Ring.full.jpg"); - copyUrlToImage.put("jr/23.jpg", "JP.zip/JP/Mishra's Factory.full.jpg"); - copyUrlToImage.put("jr/24.jpg", "JP.zip/JP/Exalted Angel.full.jpg"); - copyUrlToImage.put("jr/25.jpg", "JP.zip/JP/Grim Lavamancer.full.jpg"); - copyUrlToImage.put("jr/26.jpg", "JP.zip/JP/Meddling Mage.full.jpg"); - copyUrlToImage.put("jr/27.jpg", "JP.zip/JP/Pernicious Deed.full.jpg"); - copyUrlToImage.put("jr/28.jpg", "JP.zip/JP/Ravenous Baloth.full.jpg"); - copyUrlToImage.put("jr/29.jpg", "JP.zip/JP/Cunning Wish.full.jpg"); - copyUrlToImage.put("jr/3.jpg", "JP.zip/JP/Gaea's Cradle.full.jpg"); - copyUrlToImage.put("jr/30.jpg", "JP.zip/JP/Yawgmoth's Will.full.jpg"); - copyUrlToImage.put("jr/31.jpg", "JP.zip/JP/Vindicate.full.jpg"); - copyUrlToImage.put("jr/32.jpg", "JP.zip/JP/Decree of Justice.full.jpg"); - copyUrlToImage.put("jr/33.jpg", "JP.zip/JP/Orim's Chant.full.jpg"); - copyUrlToImage.put("jr/34.jpg", "JP.zip/JP/Mind's Desire.full.jpg"); - copyUrlToImage.put("jr/35.jpg", "JP.zip/JP/Demonic Tutor.full.jpg"); - copyUrlToImage.put("jr/36.jpg", "JP.zip/JP/Goblin Piledriver.full.jpg"); - copyUrlToImage.put("jr/37.jpg", "JP.zip/JP/Living Wish.full.jpg"); - copyUrlToImage.put("jr/38.jpg", "JP.zip/JP/Dark Ritual.full.jpg"); - copyUrlToImage.put("jr/39.jpg", "JP.zip/JP/Maze of Ith.full.jpg"); - copyUrlToImage.put("jr/4.jpg", "JP.zip/JP/Memory Lapse.full.jpg"); - copyUrlToImage.put("jr/40.jpg", "JP.zip/JP/Stifle.full.jpg"); - copyUrlToImage.put("jr/41.jpg", "JP.zip/JP/Survival of the Fittest.full.jpg"); - copyUrlToImage.put("jr/42.jpg", "JP.zip/JP/Burning Wish.full.jpg"); - copyUrlToImage.put("jr/43.jpg", "JP.zip/JP/Bloodstained Mire.full.jpg"); - copyUrlToImage.put("jr/44.jpg", "JP.zip/JP/Flooded Strand.full.jpg"); - copyUrlToImage.put("jr/45.jpg", "JP.zip/JP/Polluted Delta.full.jpg"); - copyUrlToImage.put("jr/46.jpg", "JP.zip/JP/Windswept Heath.full.jpg"); - copyUrlToImage.put("jr/47.jpg", "JP.zip/JP/Wooded Foothills.full.jpg"); - copyUrlToImage.put("jr/48.jpg", "JP.zip/JP/Sinkhole.full.jpg"); - copyUrlToImage.put("jr/49.jpg", "JP.zip/JP/Natural Order.full.jpg"); - copyUrlToImage.put("jr/5.jpg", "JP.zip/JP/Counterspell.full.jpg"); - copyUrlToImage.put("jr/50.jpg", "JP.zip/JP/Phyrexian Dreadnought.full.jpg"); - copyUrlToImage.put("jr/51.jpg", "JP.zip/JP/Thawing Glaciers.full.jpg"); - copyUrlToImage.put("jr/52.jpg", "JP.zip/JP/Land Tax.full.jpg"); - copyUrlToImage.put("jr/53.jpg", "JP.zip/JP/Morphling.full.jpg"); - copyUrlToImage.put("jr/54.jpg", "JP.zip/JP/Wheel of Fortune.full.jpg"); - copyUrlToImage.put("jr/55.jpg", "JP.zip/JP/Wasteland.full.jpg"); - copyUrlToImage.put("jr/56.jpg", "JP.zip/JP/Entomb.full.jpg"); - copyUrlToImage.put("jr/57.jpg", "JP.zip/JP/Sword of Fire and Ice.full.jpg"); - copyUrlToImage.put("jr/58.jpg", "JP.zip/JP/Vendilion Clique.full.jpg"); - copyUrlToImage.put("jr/59.jpg", "JP.zip/JP/Bitterblossom.full.jpg"); - copyUrlToImage.put("jr/6.jpg", "JP.zip/JP/Vampiric Tutor.full.jpg"); - copyUrlToImage.put("jr/60.jpg", "JP.zip/JP/Mana Crypt.full.jpg"); - copyUrlToImage.put("jr/61.jpg", "JP.zip/JP/Dark Confidant.full.jpg"); - copyUrlToImage.put("jr/62.jpg", "JP.zip/JP/Doubling Season.full.jpg"); - copyUrlToImage.put("jr/63.jpg", "JP.zip/JP/Goblin Welder.full.jpg"); - copyUrlToImage.put("jr/64.jpg", "JP.zip/JP/Xiahou Dun, the One-Eyed.full.jpg"); - copyUrlToImage.put("jr/65.jpg", "JP.zip/JP/Flusterstorm.full.jpg"); - copyUrlToImage.put("jr/66.jpg", "JP.zip/JP/Noble Hierarch.full.jpg"); - copyUrlToImage.put("jr/67.jpg", "JP.zip/JP/Karmic Guide.full.jpg"); - copyUrlToImage.put("jr/68.jpg", "JP.zip/JP/Sneak Attack.full.jpg"); - copyUrlToImage.put("jr/69.jpg", "JP.zip/JP/Karakas.full.jpg"); - copyUrlToImage.put("jr/7.jpg", "JP.zip/JP/Ball Lightning.full.jpg"); - copyUrlToImage.put("jr/70.jpg", "JP.zip/JP/Sword of Light and Shadow.full.jpg"); - copyUrlToImage.put("jr/71.jpg", "JP.zip/JP/Command Tower.full.jpg"); - copyUrlToImage.put("jr/72.jpg", "JP.zip/JP/Swords to Plowshares.full.jpg"); - copyUrlToImage.put("jr/73.jpg", "JP.zip/JP/Bribery.full.jpg"); - copyUrlToImage.put("jr/74.jpg", "JP.zip/JP/Imperial Recruiter.full.jpg"); - copyUrlToImage.put("jr/75.jpg", "JP.zip/JP/Crucible of Worlds.full.jpg"); - copyUrlToImage.put("jr/76.jpg", "JP.zip/JP/Overwhelming Forces.full.jpg"); - copyUrlToImage.put("jr/77.jpg", "JP.zip/JP/Show and Tell.full.jpg"); - copyUrlToImage.put("jr/78.jpg", "JP.zip/JP/Vindicate.full.jpg"); - copyUrlToImage.put("jr/79.jpg", "JP.zip/JP/Genesis.full.jpg"); - copyUrlToImage.put("jr/8.jpg", "JP.zip/JP/Oath of Druids.full.jpg"); - copyUrlToImage.put("jr/80.jpg", "JP.zip/JP/Karador, Ghost Chieftain.full.jpg"); - copyUrlToImage.put("jr/81.jpg", "JP.zip/JP/Greater Good.full.jpg"); - copyUrlToImage.put("jr/82.jpg", "JP.zip/JP/Riku of Two Reflections.full.jpg"); - copyUrlToImage.put("jr/83.jpg", "JP.zip/JP/Force of Will.full.jpg"); - copyUrlToImage.put("jr/84.jpg", "JP.zip/JP/Hanna, Ship's Navigator.full.jpg"); - copyUrlToImage.put("jr/85.jpg", "JP.zip/JP/Sword of Feast and Famine.full.jpg"); - copyUrlToImage.put("jr/86.jpg", "JP.zip/JP/Nekusar, the Mindrazer.full.jpg"); - copyUrlToImage.put("jr/87.jpg", "JP.zip/JP/Elesh Norn, Grand Cenobite.full.jpg"); - copyUrlToImage.put("jr/88.jpg", "JP.zip/JP/Oloro, Ageless Ascetic.full.jpg"); - copyUrlToImage.put("jr/89.jpg", "JP.zip/JP/Plains.full.jpg"); - copyUrlToImage.put("jr/9.jpg", "JP.zip/JP/Hammer of Bogardan.full.jpg"); - copyUrlToImage.put("jr/90.jpg", "JP.zip/JP/Island.full.jpg"); - copyUrlToImage.put("jr/91.jpg", "JP.zip/JP/Swamp.full.jpg"); - copyUrlToImage.put("jr/92.jpg", "JP.zip/JP/Mountain.full.jpg"); - copyUrlToImage.put("jr/93.jpg", "JP.zip/JP/Forest.full.jpg"); - copyUrlToImage.put("jr/97.jpg", "JP.zip/JP/Ravages of War.full.jpg"); - copyUrlToImage.put("jr/98.jpg", "JP.zip/JP/Damnation.full.jpg"); - copyUrlToImage.put("jr/99.jpg", "JP.zip/JP/Dualcaster Mage.full.jpg"); - copyUrlToImage.put("mbp/1.jpg", "MBP.zip/MBP/Arena.full.jpg"); - copyUrlToImage.put("mbp/10.jpg", "MBP.zip/MBP/Lightning Hounds.full.jpg"); - copyUrlToImage.put("mbp/100.jpg", "MBP.zip/MBP/Jace, the Living Guildpact.full.jpg"); - copyUrlToImage.put("mbp/101.jpg", "MBP.zip/MBP/Liliana Vess.full.jpg"); - copyUrlToImage.put("mbp/102.jpg", "MBP.zip/MBP/Chandra, Pyromaster.full.jpg"); - copyUrlToImage.put("mbp/103.jpg", "MBP.zip/MBP/Nissa, Worldwaker.full.jpg"); - copyUrlToImage.put("mbp/104.jpg", "MBP.zip/MBP/Garruk, Apex Predator.full.jpg"); - copyUrlToImage.put("mbp/105.jpg", "MBP.zip/MBP/Shamanic Revelation.full.jpg"); - copyUrlToImage.put("mbp/106.jpg", "MBP.zip/MBP/Ojutai's Command.full.jpg"); - copyUrlToImage.put("mbp/107.jpg", "MBP.zip/MBP/Dragonscale General.full.jpg"); - copyUrlToImage.put("mbp/108.jpg", "MBP.zip/MBP/Sage-Eye Avengers.full.jpg"); - copyUrlToImage.put("mbp/109.jpg", "MBP.zip/MBP/Archfiend of Depravity.full.jpg"); - copyUrlToImage.put("mbp/11.jpg", "MBP.zip/MBP/Spined Wurm.full.jpg"); - copyUrlToImage.put("mbp/110.jpg", "MBP.zip/MBP/Flamerush Rider.full.jpg"); - copyUrlToImage.put("mbp/111.jpg", "MBP.zip/MBP/Temur War Shaman.full.jpg"); - copyUrlToImage.put("mbp/112.jpg", "MBP.zip/MBP/Arashin Sovereign.full.jpg"); - copyUrlToImage.put("mbp/113.jpg", "MBP.zip/MBP/Pristine Skywise.full.jpg"); - copyUrlToImage.put("mbp/114.jpg", "MBP.zip/MBP/Necromaster Dragon.full.jpg"); - copyUrlToImage.put("mbp/115.jpg", "MBP.zip/MBP/Boltwing Marauder.full.jpg"); - copyUrlToImage.put("mbp/116.jpg", "MBP.zip/MBP/Harbinger of the Hunt.full.jpg"); - copyUrlToImage.put("mbp/117.jpg", "MBP.zip/MBP/Sultai Charm.full.jpg"); - copyUrlToImage.put("mbp/118.jpg", "MBP.zip/MBP/Aeronaut Tinkerer.full.jpg"); - copyUrlToImage.put("mbp/119.jpg", "MBP.zip/MBP/Dragon Fodder.full.jpg"); - copyUrlToImage.put("mbp/12.jpg", "MBP.zip/MBP/Warmonger.full.jpg"); - copyUrlToImage.put("mbp/120.jpg", "MBP.zip/MBP/Dragonlord's Servant.full.jpg"); - copyUrlToImage.put("mbp/121.jpg", "MBP.zip/MBP/Evolving Wilds.full.jpg"); - copyUrlToImage.put("mbp/122.jpg", "MBP.zip/MBP/Foe-Razer Regent.full.jpg"); - copyUrlToImage.put("mbp/123.jpg", "MBP.zip/MBP/Relic Seeker.full.jpg"); - copyUrlToImage.put("mbp/124.jpg", "MBP.zip/MBP/Alhammarret, High Arbiter.full.jpg"); - copyUrlToImage.put("mbp/125.jpg", "MBP.zip/MBP/Dwynen, Gilt-Leaf Daen.full.jpg"); - copyUrlToImage.put("mbp/126.jpg", "MBP.zip/MBP/Hixus, Prison Warden.full.jpg"); - copyUrlToImage.put("mbp/127.jpg", "MBP.zip/MBP/Kothophed, Soul Hoarder.full.jpg"); - copyUrlToImage.put("mbp/128.jpg", "MBP.zip/MBP/Pia and Kiran Nalaar.full.jpg"); - copyUrlToImage.put("mbp/129.jpg", "MBP.zip/MBP/Honored Hierarch.full.jpg"); - copyUrlToImage.put("mbp/13.jpg", "MBP.zip/MBP/Silver Drake.full.jpg"); - copyUrlToImage.put("mbp/130.jpg", "MBP.zip/MBP/Seeker of the Way.full.jpg"); - copyUrlToImage.put("mbp/131.jpg", "MBP.zip/MBP/Valorous Stance.full.jpg"); - copyUrlToImage.put("mbp/132.jpg", "MBP.zip/MBP/Dromoka, the Eternal.full.jpg"); - copyUrlToImage.put("mbp/133.jpg", "MBP.zip/MBP/Siege Rhino.full.jpg"); - copyUrlToImage.put("mbp/134.jpg", "MBP.zip/MBP/Sandsteppe Citadel.full.jpg"); - copyUrlToImage.put("mbp/135.jpg", "MBP.zip/MBP/Ruinous Path.full.jpg"); - copyUrlToImage.put("mbp/136.jpg", "MBP.zip/MBP/Hero of Goma Fada.full.jpg"); - copyUrlToImage.put("mbp/137.jpg", "MBP.zip/MBP/Drowner of Hope.full.jpg"); - copyUrlToImage.put("mbp/138.jpg", "MBP.zip/MBP/Defiant Bloodlord.full.jpg"); - copyUrlToImage.put("mbp/139.jpg", "MBP.zip/MBP/Barrage Tyrant.full.jpg"); - copyUrlToImage.put("mbp/14.jpg", "MBP.zip/MBP/Phyrexian Rager.full.jpg"); - copyUrlToImage.put("mbp/140.jpg", "MBP.zip/MBP/Oran-Rief Hydra.full.jpg"); - copyUrlToImage.put("mbp/141.jpg", "MBP.zip/MBP/Scythe Leopard.full.jpg"); - copyUrlToImage.put("mbp/142.jpg", "MBP.zip/MBP/Genesis Hydra.full.jpg"); - copyUrlToImage.put("mbp/143.jpg", "MBP.zip/MBP/Munda's Vanguard.full.jpg"); - copyUrlToImage.put("mbp/144.jpg", "MBP.zip/MBP/Deepfathom Skulker.full.jpg"); - copyUrlToImage.put("mbp/145.jpg", "MBP.zip/MBP/Dread Defiler.full.jpg"); - copyUrlToImage.put("mbp/146.jpg", "MBP.zip/MBP/Tyrant of Valakut.full.jpg"); - copyUrlToImage.put("mbp/147.jpg", "MBP.zip/MBP/Gladehart Cavalry.full.jpg"); - copyUrlToImage.put("mbp/148.jpg", "MBP.zip/MBP/Goblin Dark-Dwellers.full.jpg"); - copyUrlToImage.put("mbp/15.jpg", "MBP.zip/MBP/Jace Beleren.full.jpg"); - copyUrlToImage.put("mbp/16.jpg", "MBP.zip/MBP/Garruk Wildspeaker.full.jpg"); - copyUrlToImage.put("mbp/17.jpg", "MBP.zip/MBP/Brion Stoutarm.full.jpg"); - copyUrlToImage.put("mbp/18.jpg", "MBP.zip/MBP/Jaya Ballard, Task Mage.full.jpg"); - copyUrlToImage.put("mbp/19.jpg", "MBP.zip/MBP/Broodmate Dragon.full.jpg"); - copyUrlToImage.put("mbp/2.jpg", "MBP.zip/MBP/Sewers of Estark.full.jpg"); - copyUrlToImage.put("mbp/20.jpg", "MBP.zip/MBP/Honor of the Pure.full.jpg"); - copyUrlToImage.put("mbp/21.jpg", "MBP.zip/MBP/Steward of Valeron.full.jpg"); - copyUrlToImage.put("mbp/22.jpg", "MBP.zip/MBP/Day of Judgment.full.jpg"); - copyUrlToImage.put("mbp/23.jpg", "MBP.zip/MBP/Celestial Colonnade.full.jpg"); - copyUrlToImage.put("mbp/24.jpg", "MBP.zip/MBP/Retaliator Griffin.full.jpg"); - copyUrlToImage.put("mbp/25.jpg", "MBP.zip/MBP/Kor Skyfisher.full.jpg"); - copyUrlToImage.put("mbp/26.jpg", "MBP.zip/MBP/Guul Draz Assassin.full.jpg"); - copyUrlToImage.put("mbp/27.jpg", "MBP.zip/MBP/Nissa Revane.full.jpg"); - copyUrlToImage.put("mbp/28.jpg", "MBP.zip/MBP/Birds of Paradise.full.jpg"); - copyUrlToImage.put("mbp/29.jpg", "MBP.zip/MBP/Memoricide.full.jpg"); - copyUrlToImage.put("mbp/3.jpg", "MBP.zip/MBP/Nalathni Dragon.full.jpg"); - copyUrlToImage.put("mbp/30.jpg", "MBP.zip/MBP/Liliana Vess.full.jpg"); - copyUrlToImage.put("mbp/31.jpg", "MBP.zip/MBP/Bloodthrone Vampire.full.jpg"); - copyUrlToImage.put("mbp/32.jpg", "MBP.zip/MBP/Mirran Crusader.full.jpg"); - copyUrlToImage.put("mbp/33.jpg", "MBP.zip/MBP/Surgical Extraction.full.jpg"); - copyUrlToImage.put("mbp/34.jpg", "MBP.zip/MBP/Frost Titan.full.jpg"); - copyUrlToImage.put("mbp/35.jpg", "MBP.zip/MBP/Grave Titan.full.jpg"); - copyUrlToImage.put("mbp/36.jpg", "MBP.zip/MBP/Inferno Titan.full.jpg"); - copyUrlToImage.put("mbp/37.jpg", "MBP.zip/MBP/Chandra's Phoenix.full.jpg"); - copyUrlToImage.put("mbp/38.jpg", "MBP.zip/MBP/Treasure Hunt.full.jpg"); - copyUrlToImage.put("mbp/39.jpg", "MBP.zip/MBP/Faithless Looting.full.jpg"); - copyUrlToImage.put("mbp/4.jpg", "MBP.zip/MBP/Fireball.full.jpg"); - copyUrlToImage.put("mbp/40.jpg", "MBP.zip/MBP/Devil's Play.full.jpg"); - copyUrlToImage.put("mbp/41.jpg", "MBP.zip/MBP/Gravecrawler.full.jpg"); - copyUrlToImage.put("mbp/42.jpg", "MBP.zip/MBP/Electrolyze.full.jpg"); - copyUrlToImage.put("mbp/43.jpg", "MBP.zip/MBP/Feast of Blood.full.jpg"); - copyUrlToImage.put("mbp/44.jpg", "MBP.zip/MBP/Silverblade Paladin.full.jpg"); - copyUrlToImage.put("mbp/45.jpg", "MBP.zip/MBP/Merfolk Mesmerist.full.jpg"); - copyUrlToImage.put("mbp/46.jpg", "MBP.zip/MBP/Knight Exemplar.full.jpg"); - copyUrlToImage.put("mbp/47.jpg", "MBP.zip/MBP/Sunblast Angel.full.jpg"); - copyUrlToImage.put("mbp/48.jpg", "MBP.zip/MBP/Serra Avatar.full.jpg"); - copyUrlToImage.put("mbp/49.jpg", "MBP.zip/MBP/Primordial Hydra.full.jpg"); - copyUrlToImage.put("mbp/5.jpg", "MBP.zip/MBP/Blue Elemental Blast.full.jpg"); - copyUrlToImage.put("mbp/50.jpg", "MBP.zip/MBP/Vampire Nocturnus.full.jpg"); - copyUrlToImage.put("mbp/51.jpg", "MBP.zip/MBP/Cathedral of War.full.jpg"); - copyUrlToImage.put("mbp/52.jpg", "MBP.zip/MBP/Terastodon.full.jpg"); - copyUrlToImage.put("mbp/53.jpg", "MBP.zip/MBP/Arrest.full.jpg"); - copyUrlToImage.put("mbp/54.jpg", "MBP.zip/MBP/Consume Spirit.full.jpg"); - copyUrlToImage.put("mbp/55.jpg", "MBP.zip/MBP/Dreg Mangler.full.jpg"); - copyUrlToImage.put("mbp/56.jpg", "MBP.zip/MBP/Supreme Verdict.full.jpg"); - copyUrlToImage.put("mbp/57.jpg", "MBP.zip/MBP/Standstill.full.jpg"); - copyUrlToImage.put("mbp/58.jpg", "MBP.zip/MBP/Breath of Malfegor.full.jpg"); - copyUrlToImage.put("mbp/59.jpg", "MBP.zip/MBP/Angel of Glory's Rise.full.jpg"); - copyUrlToImage.put("mbp/6.jpg", "MBP.zip/MBP/Mana Crypt.full.jpg"); - copyUrlToImage.put("mbp/60.jpg", "MBP.zip/MBP/Turnabout.full.jpg"); - copyUrlToImage.put("mbp/61.jpg", "MBP.zip/MBP/Nightveil Specter.full.jpg"); - copyUrlToImage.put("mbp/62.jpg", "MBP.zip/MBP/Voidmage Husher.full.jpg"); - copyUrlToImage.put("mbp/63.jpg", "MBP.zip/MBP/Ogre Arsonist.full.jpg"); - copyUrlToImage.put("mbp/64.jpg", "MBP.zip/MBP/Corrupt.full.jpg"); - copyUrlToImage.put("mbp/65.jpg", "MBP.zip/MBP/Chandra's Fury.full.jpg"); - copyUrlToImage.put("mbp/66.jpg", "MBP.zip/MBP/Render Silent.full.jpg"); - copyUrlToImage.put("mbp/67.jpg", "MBP.zip/MBP/Ratchet Bomb.full.jpg"); - copyUrlToImage.put("mbp/68.jpg", "MBP.zip/MBP/Bonescythe Sliver.full.jpg"); - copyUrlToImage.put("mbp/69.jpg", "MBP.zip/MBP/Ogre Battledriver.full.jpg"); - copyUrlToImage.put("mbp/7.jpg", "MBP.zip/MBP/Windseeker Centaur.full.jpg"); - copyUrlToImage.put("mbp/70.jpg", "MBP.zip/MBP/Scavenging Ooze.full.jpg"); - copyUrlToImage.put("mbp/71.jpg", "MBP.zip/MBP/Hamletback Goliath.full.jpg"); - copyUrlToImage.put("mbp/72.jpg", "MBP.zip/MBP/Ajani, Caller of the Pride.full.jpg"); - copyUrlToImage.put("mbp/73.jpg", "MBP.zip/MBP/Jace, Memory Adept.full.jpg"); - copyUrlToImage.put("mbp/74.jpg", "MBP.zip/MBP/Liliana of the Dark Realms.full.jpg"); - copyUrlToImage.put("mbp/75.jpg", "MBP.zip/MBP/Chandra, Pyromaster.full.jpg"); - copyUrlToImage.put("mbp/76.jpg", "MBP.zip/MBP/Garruk, Caller of Beasts.full.jpg"); - copyUrlToImage.put("mbp/77.jpg", "MBP.zip/MBP/Sylvan Caryatid.full.jpg"); - copyUrlToImage.put("mbp/78.jpg", "MBP.zip/MBP/Karametra's Acolyte.full.jpg"); - copyUrlToImage.put("mbp/79.jpg", "MBP.zip/MBP/Fated Conflagration.full.jpg"); - copyUrlToImage.put("mbp/8.jpg", "MBP.zip/MBP/Giant Badger.full.jpg"); - copyUrlToImage.put("mbp/80.jpg", "MBP.zip/MBP/High Tide.full.jpg"); - copyUrlToImage.put("mbp/81.jpg", "MBP.zip/MBP/Gaze of Granite.full.jpg"); - copyUrlToImage.put("mbp/82.jpg", "MBP.zip/MBP/Wash Out.full.jpg"); - copyUrlToImage.put("mbp/83.jpg", "MBP.zip/MBP/Acquire.full.jpg"); - copyUrlToImage.put("mbp/84.jpg", "MBP.zip/MBP/Duress.full.jpg"); - copyUrlToImage.put("mbp/85.jpg", "MBP.zip/MBP/Eidolon of Blossoms.full.jpg"); - copyUrlToImage.put("mbp/86.jpg", "MBP.zip/MBP/Magister of Worth.full.jpg"); - copyUrlToImage.put("mbp/87.jpg", "MBP.zip/MBP/Soul of Ravnica.full.jpg"); - copyUrlToImage.put("mbp/88.jpg", "MBP.zip/MBP/Soul of Zendikar.full.jpg"); - copyUrlToImage.put("mbp/89.jpg", "MBP.zip/MBP/Stealer of Secrets.full.jpg"); - copyUrlToImage.put("mbp/9.jpg", "MBP.zip/MBP/Scent of Cinder.full.jpg"); - copyUrlToImage.put("mbp/90.jpg", "MBP.zip/MBP/Angelic Skirmisher.full.jpg"); - copyUrlToImage.put("mbp/91.jpg", "MBP.zip/MBP/Xathrid Necromancer.full.jpg"); - copyUrlToImage.put("mbp/92.jpg", "MBP.zip/MBP/Rattleclaw Mystic.full.jpg"); - copyUrlToImage.put("mbp/93.jpg", "MBP.zip/MBP/Ankle Shanker.full.jpg"); - copyUrlToImage.put("mbp/94.jpg", "MBP.zip/MBP/Avalanche Tusker.full.jpg"); - copyUrlToImage.put("mbp/95.jpg", "MBP.zip/MBP/Ivorytusk Fortress.full.jpg"); - copyUrlToImage.put("mbp/96.jpg", "MBP.zip/MBP/Rakshasa Vizier.full.jpg"); - copyUrlToImage.put("mbp/97.jpg", "MBP.zip/MBP/Sage of the Inward Eye.full.jpg"); - copyUrlToImage.put("mbp/98.jpg", "MBP.zip/MBP/Goblin Rabblemaster.full.jpg"); - copyUrlToImage.put("mbp/99.jpg", "MBP.zip/MBP/Ajani Steadfast.full.jpg"); - copyUrlToImage.put("mgdc/1.jpg", "MGDC.zip/MGDC/Reya Dawnbringer.full.jpg"); - copyUrlToImage.put("mgdc/10.jpg", "MGDC.zip/MGDC/Stormblood Berserker.full.jpg"); - copyUrlToImage.put("mgdc/11.jpg", "MGDC.zip/MGDC/Dungrove Elder.full.jpg"); - copyUrlToImage.put("mgdc/12.jpg", "MGDC.zip/MGDC/Diregraf Ghoul.full.jpg"); - copyUrlToImage.put("mgdc/13.jpg", "MGDC.zip/MGDC/Elite Inquisitor.full.jpg"); - copyUrlToImage.put("mgdc/14.jpg", "MGDC.zip/MGDC/Zombie Apocalypse.full.jpg"); - copyUrlToImage.put("mgdc/15.jpg", "MGDC.zip/MGDC/Strangleroot Geist.full.jpg"); - copyUrlToImage.put("mgdc/16.jpg", "MGDC.zip/MGDC/Suture Priest.full.jpg"); - copyUrlToImage.put("mgdc/17.jpg", "MGDC.zip/MGDC/Pristine Talisman.full.jpg"); - copyUrlToImage.put("mgdc/18.jpg", "MGDC.zip/MGDC/Latch Seeker.full.jpg"); - copyUrlToImage.put("mgdc/19.jpg", "MGDC.zip/MGDC/Killing Wave.full.jpg"); - copyUrlToImage.put("mgdc/2.jpg", "MGDC.zip/MGDC/Liliana's Specter.full.jpg"); - copyUrlToImage.put("mgdc/20.jpg", "MGDC.zip/MGDC/Magmaquake.full.jpg"); - copyUrlToImage.put("mgdc/21.jpg", "MGDC.zip/MGDC/Mwonvuli Beast Tracker.full.jpg"); - copyUrlToImage.put("mgdc/22.jpg", "MGDC.zip/MGDC/Cryptborn Horror.full.jpg"); - copyUrlToImage.put("mgdc/23.jpg", "MGDC.zip/MGDC/Dryad Militant.full.jpg"); - copyUrlToImage.put("mgdc/24.jpg", "MGDC.zip/MGDC/Firemane Avenger.full.jpg"); - copyUrlToImage.put("mgdc/25.jpg", "MGDC.zip/MGDC/Zameck Guildmage.full.jpg"); - copyUrlToImage.put("mgdc/26.jpg", "MGDC.zip/MGDC/Melek, Izzet Paragon.full.jpg"); - copyUrlToImage.put("mgdc/27.jpg", "MGDC.zip/MGDC/Trostani's Summoner.full.jpg"); - copyUrlToImage.put("mgdc/28.jpg", "MGDC.zip/MGDC/Hive Stirrings.full.jpg"); - copyUrlToImage.put("mgdc/29.jpg", "MGDC.zip/MGDC/Goblin Diplomats.full.jpg"); - copyUrlToImage.put("mgdc/3.jpg", "MGDC.zip/MGDC/Mitotic Slime.full.jpg"); - copyUrlToImage.put("mgdc/30.jpg", "MGDC.zip/MGDC/Phalanx Leader.full.jpg"); - copyUrlToImage.put("mgdc/31.jpg", "MGDC.zip/MGDC/Nighthowler.full.jpg"); - copyUrlToImage.put("mgdc/32.jpg", "MGDC.zip/MGDC/Pain Seer.full.jpg"); - copyUrlToImage.put("mgdc/33.jpg", "MGDC.zip/MGDC/Kiora's Follower.full.jpg"); - copyUrlToImage.put("mgdc/34.jpg", "MGDC.zip/MGDC/Squelching Leeches.full.jpg"); - copyUrlToImage.put("mgdc/35.jpg", "MGDC.zip/MGDC/Dictate of Kruphix.full.jpg"); - copyUrlToImage.put("mgdc/36.jpg", "MGDC.zip/MGDC/Hall of Triumph.full.jpg"); - copyUrlToImage.put("mgdc/37.jpg", "MGDC.zip/MGDC/Heir of the Wilds.full.jpg"); - copyUrlToImage.put("mgdc/38.jpg", "MGDC.zip/MGDC/Utter End.full.jpg"); - copyUrlToImage.put("mgdc/39.jpg", "MGDC.zip/MGDC/Reclamation Sage.full.jpg"); - copyUrlToImage.put("mgdc/4.jpg", "MGDC.zip/MGDC/Memnite.full.jpg"); - copyUrlToImage.put("mgdc/40.jpg", "MGDC.zip/MGDC/Chief Engineer.full.jpg"); - copyUrlToImage.put("mgdc/41.jpg", "MGDC.zip/MGDC/Mardu Shadowspear.full.jpg"); - copyUrlToImage.put("mgdc/42.jpg", "MGDC.zip/MGDC/Supplant Form.full.jpg"); - copyUrlToImage.put("mgdc/43.jpg", "MGDC.zip/MGDC/Thunderbreak Regent.full.jpg"); - copyUrlToImage.put("mgdc/44.jpg", "MGDC.zip/MGDC/Scaleguard Sentinels.full.jpg"); - copyUrlToImage.put("mgdc/45.jpg", "MGDC.zip/MGDC/Conclave Naturalists.full.jpg"); - copyUrlToImage.put("mgdc/46.jpg", "MGDC.zip/MGDC/Languish.full.jpg"); - copyUrlToImage.put("mgdc/47.jpg", "MGDC.zip/MGDC/Stasis Snare.full.jpg"); - copyUrlToImage.put("mgdc/48.jpg", "MGDC.zip/MGDC/Radiant Flames.full.jpg"); - copyUrlToImage.put("mgdc/49.jpg", "MGDC.zip/MGDC/Immolating Glare.full.jpg"); - copyUrlToImage.put("mgdc/5.jpg", "MGDC.zip/MGDC/Tempered Steel.full.jpg"); - copyUrlToImage.put("mgdc/50.jpg", "MGDC.zip/MGDC/Jori En, Ruin Diver.full.jpg"); - copyUrlToImage.put("mgdc/6.jpg", "MGDC.zip/MGDC/Treasure Mage.full.jpg"); - copyUrlToImage.put("mgdc/7.jpg", "MGDC.zip/MGDC/Black Sun's Zenith.full.jpg"); - copyUrlToImage.put("mgdc/8.jpg", "MGDC.zip/MGDC/Myr Superion.full.jpg"); - copyUrlToImage.put("mgdc/9.jpg", "MGDC.zip/MGDC/Priest of Urabrask.full.jpg"); - copyUrlToImage.put("mlp/1.jpg", "MLP.zip/MLP/Earwig Squad.full.jpg"); - copyUrlToImage.put("mlp/10.jpg", "MLP.zip/MLP/Lord of Shatterskull Pass.full.jpg"); - copyUrlToImage.put("mlp/11.jpg", "MLP.zip/MLP/Ancient Hellkite.full.jpg"); - copyUrlToImage.put("mlp/12.jpg", "MLP.zip/MLP/Steel Hellkite.full.jpg"); - copyUrlToImage.put("mlp/13.jpg", "MLP.zip/MLP/Thopter Assembly.full.jpg"); - copyUrlToImage.put("mlp/14.jpg", "MLP.zip/MLP/Phyrexian Metamorph.full.jpg"); - copyUrlToImage.put("mlp/15.jpg", "MLP.zip/MLP/Garruk's Horde.full.jpg"); - copyUrlToImage.put("mlp/16a.jpg", "MLP.zip/MLP/Ludevic's Test Subject.full.jpg"); - copyUrlToImage.put("mlp/16b.jpg", "MLP.zip/MLP/Ludevic's Abomination.full.jpg"); - copyUrlToImage.put("mlp/17a.jpg", "MLP.zip/MLP/Mondronen Shaman.full.jpg"); - copyUrlToImage.put("mlp/17b.jpg", "MLP.zip/MLP/Tovolar's Magehunter.full.jpg"); - copyUrlToImage.put("mlp/18.jpg", "MLP.zip/MLP/Restoration Angel.full.jpg"); - copyUrlToImage.put("mlp/19.jpg", "MLP.zip/MLP/Staff of Nin.full.jpg"); - copyUrlToImage.put("mlp/2.jpg", "MLP.zip/MLP/Vexing Shusher.full.jpg"); - copyUrlToImage.put("mlp/20.jpg", "MLP.zip/MLP/Deadbridge Goliath.full.jpg"); - copyUrlToImage.put("mlp/21.jpg", "MLP.zip/MLP/Skarrg Goliath.full.jpg"); - copyUrlToImage.put("mlp/22a.jpg", "MLP.zip/MLP/Breaking (Breaking/Entering).full.jpg"); - copyUrlToImage.put("mlp/22b.jpg", "MLP.zip/MLP/Entering (Breaking/Entering).full.jpg"); - copyUrlToImage.put("mlp/23.jpg", "MLP.zip/MLP/Colossal Whale.full.jpg"); - copyUrlToImage.put("mlp/24.jpg", "MLP.zip/MLP/Bident of Thassa.full.jpg"); - copyUrlToImage.put("mlp/25.jpg", "MLP.zip/MLP/Tromokratis.full.jpg"); - copyUrlToImage.put("mlp/26.jpg", "MLP.zip/MLP/Dictate of the Twin Gods.full.jpg"); - copyUrlToImage.put("mlp/27.jpg", "MLP.zip/MLP/Dragone Throne of Tarkir.full.jpg"); - copyUrlToImage.put("mlp/28.jpg", "MLP.zip/MLP/In Garruk's Wake.full.jpg"); - copyUrlToImage.put("mlp/29.jpg", "MLP.zip/MLP/Sandsteppe Mastodon.full.jpg"); - copyUrlToImage.put("mlp/3.jpg", "MLP.zip/MLP/Figure of Destiny.full.jpg"); - copyUrlToImage.put("mlp/31.jpg", "MLP.zip/MLP/Deathbringer Regent.full.jpg"); - copyUrlToImage.put("mlp/32.jpg", "MLP.zip/MLP/Mizzium Meddler.full.jpg"); - copyUrlToImage.put("mlp/33.jpg", "MLP.zip/MLP/Blight Herder.full.jpg"); - copyUrlToImage.put("mlp/34.jpg", "MLP.zip/MLP/Endbringer.full.jpg"); - copyUrlToImage.put("mlp/4.jpg", "MLP.zip/MLP/Ajani Vengeant.full.jpg"); - copyUrlToImage.put("mlp/5.jpg", "MLP.zip/MLP/Obelisk of Alara.full.jpg"); - copyUrlToImage.put("mlp/6.jpg", "MLP.zip/MLP/Knight of New Alara.full.jpg"); - copyUrlToImage.put("mlp/7.jpg", "MLP.zip/MLP/Ant Queen.full.jpg"); - copyUrlToImage.put("mlp/8.jpg", "MLP.zip/MLP/Valakut, the Molten Pinnacle.full.jpg"); - copyUrlToImage.put("mlp/9.jpg", "MLP.zip/MLP/Joraga Warcaller.full.jpg"); - copyUrlToImage.put("mprp/1.jpg", "MPRP.zip/MPRP/Wasteland.full.jpg"); - copyUrlToImage.put("mprp/10.jpg", "MPRP.zip/MPRP/Hypnotic Specter.full.jpg"); - copyUrlToImage.put("mprp/11.jpg", "MPRP.zip/MPRP/Hinder.full.jpg"); - copyUrlToImage.put("mprp/12.jpg", "MPRP.zip/MPRP/Pyroclasm.full.jpg"); - copyUrlToImage.put("mprp/13.jpg", "MPRP.zip/MPRP/Giant Growth.full.jpg"); - copyUrlToImage.put("mprp/14.jpg", "MPRP.zip/MPRP/Putrefy.full.jpg"); - copyUrlToImage.put("mprp/15.jpg", "MPRP.zip/MPRP/Zombify.full.jpg"); - copyUrlToImage.put("mprp/16.jpg", "MPRP.zip/MPRP/Lightning Helix.full.jpg"); - copyUrlToImage.put("mprp/17.jpg", "MPRP.zip/MPRP/Wrath of God.full.jpg"); - copyUrlToImage.put("mprp/18.jpg", "MPRP.zip/MPRP/Condemn.full.jpg"); - copyUrlToImage.put("mprp/19.jpg", "MPRP.zip/MPRP/Mortify.full.jpg"); - copyUrlToImage.put("mprp/2.jpg", "MPRP.zip/MPRP/Voidmage Prodigy.full.jpg"); - copyUrlToImage.put("mprp/20.jpg", "MPRP.zip/MPRP/Psionic Blast.full.jpg"); - copyUrlToImage.put("mprp/21.jpg", "MPRP.zip/MPRP/Cruel Edict.full.jpg"); - copyUrlToImage.put("mprp/22.jpg", "MPRP.zip/MPRP/Disenchant.full.jpg"); - copyUrlToImage.put("mprp/23.jpg", "MPRP.zip/MPRP/Recollect.full.jpg"); - copyUrlToImage.put("mprp/24.jpg", "MPRP.zip/MPRP/Damnation.full.jpg"); - copyUrlToImage.put("mprp/25.jpg", "MPRP.zip/MPRP/Tidings.full.jpg"); - copyUrlToImage.put("mprp/26.jpg", "MPRP.zip/MPRP/Incinerate.full.jpg"); - copyUrlToImage.put("mprp/27.jpg", "MPRP.zip/MPRP/Mana Tithe.full.jpg"); - copyUrlToImage.put("mprp/28.jpg", "MPRP.zip/MPRP/Harmonize.full.jpg"); - copyUrlToImage.put("mprp/29.jpg", "MPRP.zip/MPRP/Ponder.full.jpg"); - copyUrlToImage.put("mprp/3.jpg", "MPRP.zip/MPRP/Powder Keg.full.jpg"); - copyUrlToImage.put("mprp/30.jpg", "MPRP.zip/MPRP/Corrupt.full.jpg"); - copyUrlToImage.put("mprp/31.jpg", "MPRP.zip/MPRP/Cryptic Command.full.jpg"); - copyUrlToImage.put("mprp/32.jpg", "MPRP.zip/MPRP/Flame Javelin.full.jpg"); - copyUrlToImage.put("mprp/33.jpg", "MPRP.zip/MPRP/Unmake.full.jpg"); - copyUrlToImage.put("mprp/34.jpg", "MPRP.zip/MPRP/Nameless Inversion.full.jpg"); - copyUrlToImage.put("mprp/35.jpg", "MPRP.zip/MPRP/Remove Soul.full.jpg"); - copyUrlToImage.put("mprp/36.jpg", "MPRP.zip/MPRP/Blightning.full.jpg"); - copyUrlToImage.put("mprp/37.jpg", "MPRP.zip/MPRP/Rampant Growth.full.jpg"); - copyUrlToImage.put("mprp/38.jpg", "MPRP.zip/MPRP/Negate.full.jpg"); - copyUrlToImage.put("mprp/39.jpg", "MPRP.zip/MPRP/Terminate.full.jpg"); - copyUrlToImage.put("mprp/4.jpg", "MPRP.zip/MPRP/Psychatog.full.jpg"); - copyUrlToImage.put("mprp/40.jpg", "MPRP.zip/MPRP/Lightning Bolt.full.jpg"); - copyUrlToImage.put("mprp/41.jpg", "MPRP.zip/MPRP/Cancel.full.jpg"); - copyUrlToImage.put("mprp/42.jpg", "MPRP.zip/MPRP/Sign in Blood.full.jpg"); - copyUrlToImage.put("mprp/43.jpg", "MPRP.zip/MPRP/Infest.full.jpg"); - copyUrlToImage.put("mprp/44.jpg", "MPRP.zip/MPRP/Volcanic Fallout.full.jpg"); - copyUrlToImage.put("mprp/45.jpg", "MPRP.zip/MPRP/Celestial Purge.full.jpg"); - copyUrlToImage.put("mprp/46.jpg", "MPRP.zip/MPRP/Bituminous Blast.full.jpg"); - copyUrlToImage.put("mprp/47.jpg", "MPRP.zip/MPRP/Burst Lightning.full.jpg"); - copyUrlToImage.put("mprp/48.jpg", "MPRP.zip/MPRP/Harrow.full.jpg"); - copyUrlToImage.put("mprp/49.jpg", "MPRP.zip/MPRP/Day of Judgment.full.jpg"); - copyUrlToImage.put("mprp/5.jpg", "MPRP.zip/MPRP/Terror.full.jpg"); - copyUrlToImage.put("mprp/50.jpg", "MPRP.zip/MPRP/Brave the Elements.full.jpg"); - copyUrlToImage.put("mprp/51.jpg", "MPRP.zip/MPRP/Doom Blade.full.jpg"); - copyUrlToImage.put("mprp/52.jpg", "MPRP.zip/MPRP/Treasure Hunt.full.jpg"); - copyUrlToImage.put("mprp/53.jpg", "MPRP.zip/MPRP/Searing Blaze.full.jpg"); - copyUrlToImage.put("mprp/6.jpg", "MPRP.zip/MPRP/Fireball.full.jpg"); - copyUrlToImage.put("mprp/7.jpg", "MPRP.zip/MPRP/Oxidize.full.jpg"); - copyUrlToImage.put("mprp/8.jpg", "MPRP.zip/MPRP/Mana Leak.full.jpg"); - copyUrlToImage.put("mprp/9.jpg", "MPRP.zip/MPRP/Reciprocate.full.jpg"); - copyUrlToImage.put("mpskld/1.jpg", "MPS.zip/MPS/Cataclysmic Gearhulk.full.jpg"); - copyUrlToImage.put("mpskld/10.jpg", "MPS.zip/MPS/Cloudstone Curio.full.jpg"); - copyUrlToImage.put("mpskld/11.jpg", "MPS.zip/MPS/Crucible of Worlds.full.jpg"); - copyUrlToImage.put("mpskld/12.jpg", "MPS.zip/MPS/Gauntlet of Power.full.jpg"); - copyUrlToImage.put("mpskld/13.jpg", "MPS.zip/MPS/Hangarback Walker.full.jpg"); - copyUrlToImage.put("mpskld/14.jpg", "MPS.zip/MPS/Lightning Greaves.full.jpg"); - copyUrlToImage.put("mpskld/15.jpg", "MPS.zip/MPS/Lotus Petal.full.jpg"); - copyUrlToImage.put("mpskld/16.jpg", "MPS.zip/MPS/Mana Crypt.full.jpg"); - copyUrlToImage.put("mpskld/17.jpg", "MPS.zip/MPS/Mana Vault.full.jpg"); - copyUrlToImage.put("mpskld/18.jpg", "MPS.zip/MPS/Mind's Eye.full.jpg"); - copyUrlToImage.put("mpskld/19.jpg", "MPS.zip/MPS/Mox Opal.full.jpg"); - copyUrlToImage.put("mpskld/2.jpg", "MPS.zip/MPS/Torrential Gearhulk.full.jpg"); - copyUrlToImage.put("mpskld/20.jpg", "MPS.zip/MPS/Painter's Servant.full.jpg"); - copyUrlToImage.put("mpskld/21.jpg", "MPS.zip/MPS/Rings of Brighthearth.full.jpg"); - copyUrlToImage.put("mpskld/22.jpg", "MPS.zip/MPS/Scroll Rack.full.jpg"); - copyUrlToImage.put("mpskld/23.jpg", "MPS.zip/MPS/Sculpting Steel.full.jpg"); - copyUrlToImage.put("mpskld/24.jpg", "MPS.zip/MPS/Sol Ring.full.jpg"); - copyUrlToImage.put("mpskld/25.jpg", "MPS.zip/MPS/Solemn Simulacrum.full.jpg"); - copyUrlToImage.put("mpskld/26.jpg", "MPS.zip/MPS/Static Orb.full.jpg"); - copyUrlToImage.put("mpskld/27.jpg", "MPS.zip/MPS/Steel Overseer.full.jpg"); - copyUrlToImage.put("mpskld/28.jpg", "MPS.zip/MPS/Sword of Feast and Famine.full.jpg"); - copyUrlToImage.put("mpskld/29.jpg", "MPS.zip/MPS/Sword of Fire and Ice.full.jpg"); - copyUrlToImage.put("mpskld/3.jpg", "MPS.zip/MPS/Noxious Gearhulk.full.jpg"); - copyUrlToImage.put("mpskld/30.jpg", "MPS.zip/MPS/Sword of Light and Shadow.full.jpg"); - copyUrlToImage.put("mpskld/4.jpg", "MPS.zip/MPS/Combustible Gearhulk.full.jpg"); - copyUrlToImage.put("mpskld/5.jpg", "MPS.zip/MPS/Verdurous Gearhulk.full.jpg"); - copyUrlToImage.put("mpskld/6.jpg", "MPS.zip/MPS/Aether Vial.full.jpg"); - copyUrlToImage.put("mpskld/7.jpg", "MPS.zip/MPS/Champion's Helm.full.jpg"); - copyUrlToImage.put("mpskld/8.jpg", "MPS.zip/MPS/Chromatic Lantern.full.jpg"); - copyUrlToImage.put("mpskld/9.jpg", "MPS.zip/MPS/Chrome Mox.full.jpg"); - copyUrlToImage.put("ptc/1.jpg", "PTC.zip/PTC/Dirtcowl Wurm.full.jpg"); - copyUrlToImage.put("ptc/10.jpg", "PTC.zip/PTC/Rathi Assassin.full.jpg"); - copyUrlToImage.put("ptc/100.jpg", "PTC.zip/PTC/Flying Crane Technique.full.jpg"); - copyUrlToImage.put("ptc/101.jpg", "PTC.zip/PTC/Grim Haruspex.full.jpg"); - copyUrlToImage.put("ptc/102.jpg", "PTC.zip/PTC/Hardened Scales.full.jpg"); - copyUrlToImage.put("ptc/103.jpg", "PTC.zip/PTC/Herald of Anafenza.full.jpg"); - copyUrlToImage.put("ptc/104.jpg", "PTC.zip/PTC/High Sentinels of Arashin.full.jpg"); - copyUrlToImage.put("ptc/105.jpg", "PTC.zip/PTC/Icy Blast.full.jpg"); - copyUrlToImage.put("ptc/106.jpg", "PTC.zip/PTC/Ivorytusk Fortress.full.jpg"); - copyUrlToImage.put("ptc/107.jpg", "PTC.zip/PTC/Jeering Instigator.full.jpg"); - copyUrlToImage.put("ptc/108.jpg", "PTC.zip/PTC/Jeskai Ascendancy.full.jpg"); - copyUrlToImage.put("ptc/109.jpg", "PTC.zip/PTC/Kheru Lich Lord.full.jpg"); - copyUrlToImage.put("ptc/11.jpg", "PTC.zip/PTC/Avatar of Hope.full.jpg"); - copyUrlToImage.put("ptc/110.jpg", "PTC.zip/PTC/Mardu Ascendancy.full.jpg"); - copyUrlToImage.put("ptc/111.jpg", "PTC.zip/PTC/Master of Pearls.full.jpg"); - copyUrlToImage.put("ptc/112.jpg", "PTC.zip/PTC/Narset, Enlightened Master.full.jpg"); - copyUrlToImage.put("ptc/113.jpg", "PTC.zip/PTC/Necropolis Fiend.full.jpg"); - copyUrlToImage.put("ptc/114.jpg", "PTC.zip/PTC/Rakshasa Vizier.full.jpg"); - copyUrlToImage.put("ptc/115.jpg", "PTC.zip/PTC/Rattleclaw Mystic.full.jpg"); - copyUrlToImage.put("ptc/116.jpg", "PTC.zip/PTC/Sage of the Inward Eye.full.jpg"); - copyUrlToImage.put("ptc/117.jpg", "PTC.zip/PTC/Sidisi, Brood Tyrant.full.jpg"); - copyUrlToImage.put("ptc/118.jpg", "PTC.zip/PTC/Siege Rhino.full.jpg"); - copyUrlToImage.put("ptc/119.jpg", "PTC.zip/PTC/Sultai Ascendacy.full.jpg"); - copyUrlToImage.put("ptc/12.jpg", "PTC.zip/PTC/Raging Kavu.full.jpg"); - copyUrlToImage.put("ptc/120.jpg", "PTC.zip/PTC/Surrak Dragonclaw.full.jpg"); - copyUrlToImage.put("ptc/121.jpg", "PTC.zip/PTC/Temur Ascendancy.full.jpg"); - copyUrlToImage.put("ptc/122.jpg", "PTC.zip/PTC/Thousand Winds.full.jpg"); - copyUrlToImage.put("ptc/123.jpg", "PTC.zip/PTC/Trail of Mystery.full.jpg"); - copyUrlToImage.put("ptc/124.jpg", "PTC.zip/PTC/Trap Essence.full.jpg"); - copyUrlToImage.put("ptc/125.jpg", "PTC.zip/PTC/Utter End.full.jpg"); - copyUrlToImage.put("ptc/126.jpg", "PTC.zip/PTC/Villainous Wealth.full.jpg"); - copyUrlToImage.put("ptc/127.jpg", "PTC.zip/PTC/Zurgo Helmsmasher.full.jpg"); - copyUrlToImage.put("ptc/128.jpg", "PTC.zip/PTC/Alesha, Who Smiles at Death.full.jpg"); - copyUrlToImage.put("ptc/129.jpg", "PTC.zip/PTC/Arcbond.full.jpg"); - copyUrlToImage.put("ptc/13.jpg", "PTC.zip/PTC/Questing Phelddagrif.full.jpg"); - copyUrlToImage.put("ptc/130.jpg", "PTC.zip/PTC/Archfiend of Depravity.full.jpg"); - copyUrlToImage.put("ptc/131.jpg", "PTC.zip/PTC/Atarka, World Render.full.jpg"); - copyUrlToImage.put("ptc/132.jpg", "PTC.zip/PTC/Brutal Hordechief.full.jpg"); - copyUrlToImage.put("ptc/133.jpg", "PTC.zip/PTC/Daghatar the Adamant.full.jpg"); - copyUrlToImage.put("ptc/134.jpg", "PTC.zip/PTC/Dragonscale General.full.jpg"); - copyUrlToImage.put("ptc/135.jpg", "PTC.zip/PTC/Dromoka, the Eternal.full.jpg"); - copyUrlToImage.put("ptc/136.jpg", "PTC.zip/PTC/Flamerush Rider.full.jpg"); - copyUrlToImage.put("ptc/137.jpg", "PTC.zip/PTC/Flamewake Phoenix.full.jpg"); - copyUrlToImage.put("ptc/138.jpg", "PTC.zip/PTC/Jeskai Infiltrator.full.jpg"); - copyUrlToImage.put("ptc/14.jpg", "PTC.zip/PTC/Fungal Shambler.full.jpg"); - copyUrlToImage.put("ptc/141.jpg", "PTC.zip/PTC/Mastery of the Unseen.full.jpg"); - copyUrlToImage.put("ptc/142.jpg", "PTC.zip/PTC/Ojutai, Soul of Winter.full.jpg"); - copyUrlToImage.put("ptc/143.jpg", "PTC.zip/PTC/Rally the Ancestors.full.jpg"); - copyUrlToImage.put("ptc/145.jpg", "PTC.zip/PTC/Sandsteppe Mastodon.full.jpg"); - copyUrlToImage.put("ptc/147.jpg", "PTC.zip/PTC/Shamanic Revelation.full.jpg"); - copyUrlToImage.put("ptc/15.jpg", "PTC.zip/PTC/Stone-Tongue Basilisk.full.jpg"); - copyUrlToImage.put("ptc/150.jpg", "PTC.zip/PTC/Soulfire Grand Master.full.jpg"); - copyUrlToImage.put("ptc/151.jpg", "PTC.zip/PTC/Soulflayer.full.jpg"); - copyUrlToImage.put("ptc/152.jpg", "PTC.zip/PTC/Supplant Form.full.jpg"); - copyUrlToImage.put("ptc/153.jpg", "PTC.zip/PTC/Tasigur, the Golden Fang.full.jpg"); - copyUrlToImage.put("ptc/154.jpg", "PTC.zip/PTC/Torrent Elemental.full.jpg"); - copyUrlToImage.put("ptc/157.jpg", "PTC.zip/PTC/Yasova Dragonclaw.full.jpg"); - copyUrlToImage.put("ptc/16.jpg", "PTC.zip/PTC/Laquatus's Champion.full.jpg"); - copyUrlToImage.put("ptc/166.jpg", "PTC.zip/PTC/Crater Elemental.full.jpg"); - copyUrlToImage.put("ptc/168.jpg", "PTC.zip/PTC/Deathbringer Regent.full.jpg"); - copyUrlToImage.put("ptc/17.jpg", "PTC.zip/PTC/Glory.full.jpg"); - copyUrlToImage.put("ptc/18.jpg", "PTC.zip/PTC/Silent Specter.full.jpg"); - copyUrlToImage.put("ptc/181.jpg", "PTC.zip/PTC/Kolaghan's Command.full.jpg"); - copyUrlToImage.put("ptc/183.jpg", "PTC.zip/PTC/Myth Realized.full.jpg"); - copyUrlToImage.put("ptc/185.jpg", "PTC.zip/PTC/Ojutai's Command.full.jpg"); - copyUrlToImage.put("ptc/19.jpg", "PTC.zip/PTC/Feral Throwback.full.jpg"); - copyUrlToImage.put("ptc/196.jpg", "PTC.zip/PTC/Volcanic Vision.full.jpg"); - copyUrlToImage.put("ptc/198.jpg", "PTC.zip/PTC/Abbot of Keral Keep.full.jpg"); - copyUrlToImage.put("ptc/2.jpg", "PTC.zip/PTC/Revenant.full.jpg"); - copyUrlToImage.put("ptc/20.jpg", "PTC.zip/PTC/Soul Collector.full.jpg"); - copyUrlToImage.put("ptc/21.jpg", "PTC.zip/PTC/Sword of Kaldra.full.jpg"); - copyUrlToImage.put("ptc/210.jpg", "PTC.zip/PTC/Gilt-Leaf Winnower.full.jpg"); - copyUrlToImage.put("ptc/212.jpg", "PTC.zip/PTC/Graveblade Marauder.full.jpg"); - copyUrlToImage.put("ptc/216.jpg", "PTC.zip/PTC/Jace, Vryn's Prodigy.full.jpg"); - copyUrlToImage.put("ptc/22.jpg", "PTC.zip/PTC/Shield of Kaldra.full.jpg"); - copyUrlToImage.put("ptc/225.jpg", "PTC.zip/PTC/Nissa's Revelation.full.jpg"); - copyUrlToImage.put("ptc/227.jpg", "PTC.zip/PTC/Outland Colossus.full.jpg"); - copyUrlToImage.put("ptc/23.jpg", "PTC.zip/PTC/Helm of Kaldra.full.jpg"); - copyUrlToImage.put("ptc/238.jpg", "PTC.zip/PTC/Akoum Firebird.full.jpg"); - copyUrlToImage.put("ptc/239.jpg", "PTC.zip/PTC/Akoum Hellkite.full.jpg"); - copyUrlToImage.put("ptc/24.jpg", "PTC.zip/PTC/Ryusei, the Falling Star.full.jpg"); - copyUrlToImage.put("ptc/240.jpg", "PTC.zip/PTC/Aligned Hedron Network.full.jpg"); - copyUrlToImage.put("ptc/241.jpg", "PTC.zip/PTC/Ally Encampment.full.jpg"); - copyUrlToImage.put("ptc/242.jpg", "PTC.zip/PTC/Angelic Captain.full.jpg"); - copyUrlToImage.put("ptc/243.jpg", "PTC.zip/PTC/Barrage Tyrant.full.jpg"); - copyUrlToImage.put("ptc/244.jpg", "PTC.zip/PTC/Beastcaller Savant.full.jpg"); - copyUrlToImage.put("ptc/245.jpg", "PTC.zip/PTC/Blight Herder.full.jpg"); - copyUrlToImage.put("ptc/246.jpg", "PTC.zip/PTC/Bring to Light.full.jpg"); - copyUrlToImage.put("ptc/247.jpg", "PTC.zip/PTC/Brood Butcher.full.jpg"); - copyUrlToImage.put("ptc/248.jpg", "PTC.zip/PTC/Brutal Expulsion.full.jpg"); - copyUrlToImage.put("ptc/249.jpg", "PTC.zip/PTC/Canopy Vista.full.jpg"); - copyUrlToImage.put("ptc/25.jpg", "PTC.zip/PTC/Ink-Eyes, Servant of Oni.full.jpg"); - copyUrlToImage.put("ptc/250.jpg", "PTC.zip/PTC/Cinder Glade.full.jpg"); - copyUrlToImage.put("ptc/251.jpg", "PTC.zip/PTC/Conduit of Ruin.full.jpg"); - copyUrlToImage.put("ptc/252.jpg", "PTC.zip/PTC/Defiant Bloodlord.full.jpg"); - copyUrlToImage.put("ptc/253.jpg", "PTC.zip/PTC/Desolation Twin.full.jpg"); - copyUrlToImage.put("ptc/254.jpg", "PTC.zip/PTC/Dragonmaster Outcast.full.jpg"); - copyUrlToImage.put("ptc/255.jpg", "PTC.zip/PTC/Drana, Liberator of Malakir.full.jpg"); - copyUrlToImage.put("ptc/256.jpg", "PTC.zip/PTC/Drowner of Hope.full.jpg"); - copyUrlToImage.put("ptc/257.jpg", "PTC.zip/PTC/Dust Stalker.full.jpg"); - copyUrlToImage.put("ptc/258.jpg", "PTC.zip/PTC/Emeria Shepherd.full.jpg"); - copyUrlToImage.put("ptc/259.jpg", "PTC.zip/PTC/Endless One.full.jpg"); - copyUrlToImage.put("ptc/26.jpg", "PTC.zip/PTC/Kiyomaro, First to Stand.full.jpg"); - copyUrlToImage.put("ptc/260.jpg", "PTC.zip/PTC/Exert Influence.full.jpg"); - copyUrlToImage.put("ptc/261.jpg", "PTC.zip/PTC/Fathom Feeder.full.jpg"); - copyUrlToImage.put("ptc/262.jpg", "PTC.zip/PTC/Felidar Sovereign.full.jpg"); - copyUrlToImage.put("ptc/263.jpg", "PTC.zip/PTC/From Beyond.full.jpg"); - copyUrlToImage.put("ptc/264.jpg", "PTC.zip/PTC/Gideon, Ally of Zendikar.full.jpg"); - copyUrlToImage.put("ptc/265.jpg", "PTC.zip/PTC/Greenwarden of Murasa.full.jpg"); - copyUrlToImage.put("ptc/266.jpg", "PTC.zip/PTC/Gruesome Slaughter.full.jpg"); - copyUrlToImage.put("ptc/267.jpg", "PTC.zip/PTC/Guardian of Tazeem.full.jpg"); - copyUrlToImage.put("ptc/268.jpg", "PTC.zip/PTC/Guul Draz Overseer.full.jpg"); - copyUrlToImage.put("ptc/27.jpg", "PTC.zip/PTC/Gleancrawler.full.jpg"); - copyUrlToImage.put("ptc/271.jpg", "PTC.zip/PTC/Lantern Scout.full.jpg"); - copyUrlToImage.put("ptc/272.jpg", "PTC.zip/PTC/Lumbering Falls.full.jpg"); - copyUrlToImage.put("ptc/273.jpg", "PTC.zip/PTC/March from the Tomb.full.jpg"); - copyUrlToImage.put("ptc/274.jpg", "PTC.zip/PTC/Munda, Ambush Leader.full.jpg"); - copyUrlToImage.put("ptc/275.jpg", "PTC.zip/PTC/Nissa's Renewal.full.jpg"); - copyUrlToImage.put("ptc/276.jpg", "PTC.zip/PTC/Noyan Dar, Roil Shaper.full.jpg"); - copyUrlToImage.put("ptc/277.jpg", "PTC.zip/PTC/Ob Nixilis Reignited.full.jpg"); - copyUrlToImage.put("ptc/278.jpg", "PTC.zip/PTC/Oblivion Sower.full.jpg"); - copyUrlToImage.put("ptc/279.jpg", "PTC.zip/PTC/Omnath, Locus of Rage.full.jpg"); - copyUrlToImage.put("ptc/28.jpg", "PTC.zip/PTC/Djinn Illuminatus.full.jpg"); - copyUrlToImage.put("ptc/280.jpg", "PTC.zip/PTC/Oran-Rief Hydra.full.jpg"); - copyUrlToImage.put("ptc/281.jpg", "PTC.zip/PTC/Painful Truths.full.jpg"); - copyUrlToImage.put("ptc/282.jpg", "PTC.zip/PTC/Part the Waterveil.full.jpg"); - copyUrlToImage.put("ptc/283.jpg", "PTC.zip/PTC/Planar Outburst.full.jpg"); - copyUrlToImage.put("ptc/284.jpg", "PTC.zip/PTC/Prairie Stream.full.jpg"); - copyUrlToImage.put("ptc/285.jpg", "PTC.zip/PTC/Prism Array.full.jpg"); - copyUrlToImage.put("ptc/286.jpg", "PTC.zip/PTC/Quarantine Field.full.jpg"); - copyUrlToImage.put("ptc/287.jpg", "PTC.zip/PTC/Radiant Flames.full.jpg"); - copyUrlToImage.put("ptc/288.jpg", "PTC.zip/PTC/Ruinous Path.full.jpg"); - copyUrlToImage.put("ptc/289.jpg", "PTC.zip/PTC/Sanctum of Ugin.full.jpg"); - copyUrlToImage.put("ptc/29.jpg", "PTC.zip/PTC/Avatar of Discord.full.jpg"); - copyUrlToImage.put("ptc/290.jpg", "PTC.zip/PTC/Scatter to the Winds.full.jpg"); - copyUrlToImage.put("ptc/291.jpg", "PTC.zip/PTC/Serpentine Spike.full.jpg"); - copyUrlToImage.put("ptc/292.jpg", "PTC.zip/PTC/Shambling Vent.full.jpg"); - copyUrlToImage.put("ptc/293.jpg", "PTC.zip/PTC/Shrine of the Forsaken Gods.full.jpg"); - copyUrlToImage.put("ptc/294.jpg", "PTC.zip/PTC/Sire of Stagnation.full.jpg"); - copyUrlToImage.put("ptc/295.jpg", "PTC.zip/PTC/Smoldering Marsh.full.jpg"); - copyUrlToImage.put("ptc/296.jpg", "PTC.zip/PTC/Smothering Abomination.full.jpg"); - copyUrlToImage.put("ptc/297.jpg", "PTC.zip/PTC/Sunken Hollow.full.jpg"); - copyUrlToImage.put("ptc/298.jpg", "PTC.zip/PTC/Ugin's Insight.full.jpg"); - copyUrlToImage.put("ptc/299.jpg", "PTC.zip/PTC/Ulamog, the Ceaseless Hunger.full.jpg"); - copyUrlToImage.put("ptc/3.jpg", "PTC.zip/PTC/Monstrous Hound.full.jpg"); - copyUrlToImage.put("ptc/30.jpg", "PTC.zip/PTC/Allosaurus Rider.full.jpg"); - copyUrlToImage.put("ptc/300.jpg", "PTC.zip/PTC/Undergrowth Champion.full.jpg"); - copyUrlToImage.put("ptc/301.jpg", "PTC.zip/PTC/Veteran Warleader.full.jpg"); - copyUrlToImage.put("ptc/302.jpg", "PTC.zip/PTC/Void Winnower.full.jpg"); - copyUrlToImage.put("ptc/303.jpg", "PTC.zip/PTC/Wasteland Strangler.full.jpg"); - copyUrlToImage.put("ptc/304.jpg", "PTC.zip/PTC/Woodland Wanderer.full.jpg"); - copyUrlToImage.put("ptc/305.jpg", "PTC.zip/PTC/Zada, Hedron Grinder.full.jpg"); - copyUrlToImage.put("ptc/31.jpg", "PTC.zip/PTC/Lotus Bloom.full.jpg"); - copyUrlToImage.put("ptc/32.jpg", "PTC.zip/PTC/Oros, the Avenger.full.jpg"); - copyUrlToImage.put("ptc/33.jpg", "PTC.zip/PTC/Korlash, Heir to Blackblade.full.jpg"); - copyUrlToImage.put("ptc/34.jpg", "PTC.zip/PTC/Wren's Run Packmaster.full.jpg"); - copyUrlToImage.put("ptc/35.jpg", "PTC.zip/PTC/Door of Destinies.full.jpg"); - copyUrlToImage.put("ptc/36.jpg", "PTC.zip/PTC/Demigod of Revenge.full.jpg"); - copyUrlToImage.put("ptc/37.jpg", "PTC.zip/PTC/Overbeing of Myth.full.jpg"); - copyUrlToImage.put("ptc/38.jpg", "PTC.zip/PTC/Ajani Vengeant.full.jpg"); - copyUrlToImage.put("ptc/39.jpg", "PTC.zip/PTC/Malfegor.full.jpg"); - copyUrlToImage.put("ptc/4.jpg", "PTC.zip/PTC/Lightning Dragon.full.jpg"); - copyUrlToImage.put("ptc/40.jpg", "PTC.zip/PTC/Dragon Broodmother.full.jpg"); - copyUrlToImage.put("ptc/41.jpg", "PTC.zip/PTC/Vampire Nocturnus.full.jpg"); - copyUrlToImage.put("ptc/42.jpg", "PTC.zip/PTC/Rampaging Baloths.full.jpg"); - copyUrlToImage.put("ptc/43.jpg", "PTC.zip/PTC/Comet Storm.full.jpg"); - copyUrlToImage.put("ptc/44.jpg", "PTC.zip/PTC/Emrakul, the Aeons Torn.full.jpg"); - copyUrlToImage.put("ptc/45.jpg", "PTC.zip/PTC/Sun Titan.full.jpg"); - copyUrlToImage.put("ptc/46.jpg", "PTC.zip/PTC/Wurmcoil Engine.full.jpg"); - copyUrlToImage.put("ptc/47.jpg", "PTC.zip/PTC/Hero of Bladehold.full.jpg"); - copyUrlToImage.put("ptc/48.jpg", "PTC.zip/PTC/Glissa, the Traitor.full.jpg"); - copyUrlToImage.put("ptc/49.jpg", "PTC.zip/PTC/Sheoldred, Whispering One.full.jpg"); - copyUrlToImage.put("ptc/5.jpg", "PTC.zip/PTC/Beast of Burden.full.jpg"); - copyUrlToImage.put("ptc/50.jpg", "PTC.zip/PTC/Bloodlord of Vaasgoth.full.jpg"); - copyUrlToImage.put("ptc/51a.jpg", "PTC.zip/PTC/Mayor of Avabruck.full.jpg"); - copyUrlToImage.put("ptc/51b.jpg", "PTC.zip/PTC/Howlpack Alpha.full.jpg"); - copyUrlToImage.put("ptc/52a.jpg", "PTC.zip/PTC/Ravenous Demon.full.jpg"); - copyUrlToImage.put("ptc/52b.jpg", "PTC.zip/PTC/Archdemon of Greed.full.jpg"); - copyUrlToImage.put("ptc/53.jpg", "PTC.zip/PTC/Moonsilver Spear.full.jpg"); - copyUrlToImage.put("ptc/54.jpg", "PTC.zip/PTC/Xathrid Gorgon.full.jpg"); - copyUrlToImage.put("ptc/55.jpg", "PTC.zip/PTC/Archon of the Triumvirate.full.jpg"); - copyUrlToImage.put("ptc/56.jpg", "PTC.zip/PTC/Hypersonic Dragon.full.jpg"); - copyUrlToImage.put("ptc/57.jpg", "PTC.zip/PTC/Carnival Hellsteed.full.jpg"); - copyUrlToImage.put("ptc/58.jpg", "PTC.zip/PTC/Corpsejack Menace.full.jpg"); - copyUrlToImage.put("ptc/59.jpg", "PTC.zip/PTC/Grove of the Guardian.full.jpg"); - copyUrlToImage.put("ptc/6.jpg", "PTC.zip/PTC/Lu Bu, Master-at-Arms.full.jpg"); - copyUrlToImage.put("ptc/60.jpg", "PTC.zip/PTC/Consuming Aberration.full.jpg"); - copyUrlToImage.put("ptc/61.jpg", "PTC.zip/PTC/Fathom Mage.full.jpg"); - copyUrlToImage.put("ptc/62.jpg", "PTC.zip/PTC/Foundry Champion.full.jpg"); - copyUrlToImage.put("ptc/63.jpg", "PTC.zip/PTC/Rubblehulk.full.jpg"); - copyUrlToImage.put("ptc/64.jpg", "PTC.zip/PTC/Treasury Thrull.full.jpg"); - copyUrlToImage.put("ptc/65.jpg", "PTC.zip/PTC/Maze's End.full.jpg"); - copyUrlToImage.put("ptc/66.jpg", "PTC.zip/PTC/Plains.66.full.jpg"); - copyUrlToImage.put("ptc/67.jpg", "PTC.zip/PTC/Megantic Sliver.full.jpg"); - copyUrlToImage.put("ptc/68.jpg", "PTC.zip/PTC/Celestial Archon.full.jpg"); - copyUrlToImage.put("ptc/69.jpg", "PTC.zip/PTC/Shipbreaker Kraken.full.jpg"); - copyUrlToImage.put("ptc/7.jpg", "PTC.zip/PTC/False Prophet.full.jpg"); - copyUrlToImage.put("ptc/70.jpg", "PTC.zip/PTC/Abhorrent Overlord.full.jpg"); - copyUrlToImage.put("ptc/71.jpg", "PTC.zip/PTC/Ember Swallower.full.jpg"); - copyUrlToImage.put("ptc/72.jpg", "PTC.zip/PTC/Anthousa, Setessan Hero.full.jpg"); - copyUrlToImage.put("ptc/73.jpg", "PTC.zip/PTC/Silent Sentinel.full.jpg"); - copyUrlToImage.put("ptc/74.jpg", "PTC.zip/PTC/Arbiter of the Ideal.full.jpg"); - copyUrlToImage.put("ptc/75.jpg", "PTC.zip/PTC/Eater of Hope.full.jpg"); - copyUrlToImage.put("ptc/76.jpg", "PTC.zip/PTC/Forgestoker Dragon.full.jpg"); - copyUrlToImage.put("ptc/77.jpg", "PTC.zip/PTC/Nessian Wilds Ravager.full.jpg"); - copyUrlToImage.put("ptc/78.jpg", "PTC.zip/PTC/Dawnbringer Charioteers.full.jpg"); - copyUrlToImage.put("ptc/79.jpg", "PTC.zip/PTC/Scourge of Fleets.full.jpg"); - copyUrlToImage.put("ptc/8.jpg", "PTC.zip/PTC/Lu Bu, Master-at-Arms.full.jpg"); - copyUrlToImage.put("ptc/80.jpg", "PTC.zip/PTC/Doomwake Giant.full.jpg"); - copyUrlToImage.put("ptc/81.jpg", "PTC.zip/PTC/Spawn of Thraxes.full.jpg"); - copyUrlToImage.put("ptc/82.jpg", "PTC.zip/PTC/Heroes' Bane.full.jpg"); - copyUrlToImage.put("ptc/83.jpg", "PTC.zip/PTC/Resolute Archangel.full.jpg"); - copyUrlToImage.put("ptc/84.jpg", "PTC.zip/PTC/Mercurial Pretender.full.jpg"); - copyUrlToImage.put("ptc/85.jpg", "PTC.zip/PTC/Indulgent Tormentor.full.jpg"); - copyUrlToImage.put("ptc/86.jpg", "PTC.zip/PTC/Siege Dragon.full.jpg"); - copyUrlToImage.put("ptc/87.jpg", "PTC.zip/PTC/Phytotitan.full.jpg"); - copyUrlToImage.put("ptc/88.jpg", "PTC.zip/PTC/Abzan Ascendancy.full.jpg"); - copyUrlToImage.put("ptc/89.jpg", "PTC.zip/PTC/Anafenza, the Foremost.full.jpg"); - copyUrlToImage.put("ptc/9.jpg", "PTC.zip/PTC/Overtaker.full.jpg"); - copyUrlToImage.put("ptc/90.jpg", "PTC.zip/PTC/Ankle Shanker.full.jpg"); - copyUrlToImage.put("ptc/91.jpg", "PTC.zip/PTC/Avalanche Tusker.full.jpg"); - copyUrlToImage.put("ptc/92.jpg", "PTC.zip/PTC/Bloodsoaked Champion.full.jpg"); - copyUrlToImage.put("ptc/93.jpg", "PTC.zip/PTC/Butcher of the Horde.full.jpg"); - copyUrlToImage.put("ptc/94.jpg", "PTC.zip/PTC/Crackling Doom.full.jpg"); - copyUrlToImage.put("ptc/95.jpg", "PTC.zip/PTC/Crater's Claws.full.jpg"); - copyUrlToImage.put("ptc/96.jpg", "PTC.zip/PTC/Deflecting Palm.full.jpg"); - copyUrlToImage.put("ptc/97.jpg", "PTC.zip/PTC/Dig Through Time.full.jpg"); - copyUrlToImage.put("ptc/98.jpg", "PTC.zip/PTC/Dragon-Style Twins.full.jpg"); - copyUrlToImage.put("ptc/99.jpg", "PTC.zip/PTC/Duneblast.full.jpg"); - copyUrlToImage.put("sus/1.jpg", "SUS.zip/SUS/Thran Quarry.full.jpg"); - copyUrlToImage.put("sus/10.jpg", "SUS.zip/SUS/Slith Firewalker.full.jpg"); - copyUrlToImage.put("sus/11.jpg", "SUS.zip/SUS/Royal Assassin.full.jpg"); - copyUrlToImage.put("sus/12.jpg", "SUS.zip/SUS/Sakura-Tribe Elder.full.jpg"); - copyUrlToImage.put("sus/13.jpg", "SUS.zip/SUS/Shard Phoenix.full.jpg"); - copyUrlToImage.put("sus/14.jpg", "SUS.zip/SUS/Soltari Priest.full.jpg"); - copyUrlToImage.put("sus/15.jpg", "SUS.zip/SUS/Whirling Dervish.full.jpg"); - copyUrlToImage.put("sus/16.jpg", "SUS.zip/SUS/Glorious Anthem.full.jpg"); - copyUrlToImage.put("sus/17.jpg", "SUS.zip/SUS/Elvish Champion.full.jpg"); - copyUrlToImage.put("sus/18.jpg", "SUS.zip/SUS/Mad Auntie.full.jpg"); - copyUrlToImage.put("sus/19.jpg", "SUS.zip/SUS/Slith Firewalker.full.jpg"); - copyUrlToImage.put("sus/2.jpg", "SUS.zip/SUS/Serra Avatar.full.jpg"); - copyUrlToImage.put("sus/20.jpg", "SUS.zip/SUS/Royal Assassin.full.jpg"); - copyUrlToImage.put("sus/21.jpg", "SUS.zip/SUS/Sakura-Tribe Elder.full.jpg"); - copyUrlToImage.put("sus/22.jpg", "SUS.zip/SUS/Shard Phoenix.full.jpg"); - copyUrlToImage.put("sus/23.jpg", "SUS.zip/SUS/Soltari Priest.full.jpg"); - copyUrlToImage.put("sus/24.jpg", "SUS.zip/SUS/Whirling Dervish.full.jpg"); - copyUrlToImage.put("sus/25.jpg", "SUS.zip/SUS/Glorious Anthem.full.jpg"); - copyUrlToImage.put("sus/26.jpg", "SUS.zip/SUS/Elvish Champion.full.jpg"); - copyUrlToImage.put("sus/27.jpg", "SUS.zip/SUS/Sakura-Tribe Elder.full.jpg"); - copyUrlToImage.put("sus/28.jpg", "SUS.zip/SUS/Shard Phoenix.full.jpg"); - copyUrlToImage.put("sus/29.jpg", "SUS.zip/SUS/Soltari Priest.full.jpg"); - copyUrlToImage.put("sus/3.jpg", "SUS.zip/SUS/Lord of Atlantis.full.jpg"); - copyUrlToImage.put("sus/30.jpg", "SUS.zip/SUS/Whirling Dervish.full.jpg"); - copyUrlToImage.put("sus/31.jpg", "SUS.zip/SUS/Glorious Anthem.full.jpg"); - copyUrlToImage.put("sus/32.jpg", "SUS.zip/SUS/Elvish Champion.full.jpg"); - copyUrlToImage.put("sus/4.jpg", "SUS.zip/SUS/Crusade.full.jpg"); - copyUrlToImage.put("sus/5.jpg", "SUS.zip/SUS/Elvish Lyrist.full.jpg"); - copyUrlToImage.put("sus/6.jpg", "SUS.zip/SUS/City of Brass.full.jpg"); - copyUrlToImage.put("sus/7.jpg", "SUS.zip/SUS/Volcanic Hammer.full.jpg"); - copyUrlToImage.put("sus/8.jpg", "SUS.zip/SUS/Giant Growth.full.jpg"); - copyUrlToImage.put("sus/9.jpg", "SUS.zip/SUS/Two-Headed Dragon.full.jpg"); - copyUrlToImage.put("ugin/1.jpg", "UGIN.zip/UGIN/Ugin, the Spirit Dragon.full.jpg"); - copyUrlToImage.put("ugin/113.jpg", "UGIN.zip/UGIN/Jeering Instigator.full.jpg"); - copyUrlToImage.put("ugin/123.jpg", "UGIN.zip/UGIN/Arashin War Beast.full.jpg"); - copyUrlToImage.put("ugin/129.jpg", "UGIN.zip/UGIN/Formless Nurturing.full.jpg"); - copyUrlToImage.put("ugin/131.jpg", "UGIN.zip/UGIN/Dragonscale Boon.full.jpg"); - copyUrlToImage.put("ugin/146.jpg", "UGIN.zip/UGIN/Wildcall.full.jpg"); - copyUrlToImage.put("ugin/161.jpg", "UGIN.zip/UGIN/Hewed Stone Retainers.full.jpg"); - copyUrlToImage.put("ugin/164.jpg", "UGIN.zip/UGIN/Ugin's Construct.full.jpg"); - copyUrlToImage.put("ugin/19.jpg", "UGIN.zip/UGIN/Mastery of the Unseen.full.jpg"); - copyUrlToImage.put("ugin/216.jpg", "UGIN.zip/UGIN/Altar of the Brood.full.jpg"); - copyUrlToImage.put("ugin/217.jpg", "UGIN.zip/UGIN/Briber's Purse.full.jpg"); - copyUrlToImage.put("ugin/220.jpg", "UGIN.zip/UGIN/Ghostfire Blade.full.jpg"); - copyUrlToImage.put("ugin/24.jpg", "UGIN.zip/UGIN/Smite the Monstrous.full.jpg"); - copyUrlToImage.put("ugin/26.jpg", "UGIN.zip/UGIN/Soul Summons.full.jpg"); - copyUrlToImage.put("ugin/30.jpg", "UGIN.zip/UGIN/Watcher of the Roost.full.jpg"); - copyUrlToImage.put("ugin/36.jpg", "UGIN.zip/UGIN/Jeskai Infiltrator.full.jpg"); - copyUrlToImage.put("ugin/46.jpg", "UGIN.zip/UGIN/Reality Shift.full.jpg"); - copyUrlToImage.put("ugin/48.jpg", "UGIN.zip/UGIN/Mystic of the Hidden Way.full.jpg"); - copyUrlToImage.put("ugin/59.jpg", "UGIN.zip/UGIN/Write into Being.full.jpg"); - copyUrlToImage.put("ugin/68.jpg", "UGIN.zip/UGIN/Debilitating Injury.full.jpg"); - copyUrlToImage.put("ugin/73.jpg", "UGIN.zip/UGIN/Grim Haruspex.full.jpg"); - copyUrlToImage.put("ugin/85.jpg", "UGIN.zip/UGIN/Sultai Emissary.full.jpg"); - copyUrlToImage.put("ugin/88.jpg", "UGIN.zip/UGIN/Ruthless Ripper.full.jpg"); - copyUrlToImage.put("ugin/96.jpg", "UGIN.zip/UGIN/Ainok Tracker.full.jpg"); - copyUrlToImage.put("ugin/97.jpg", "UGIN.zip/UGIN/Arc Lightning.full.jpg"); - copyUrlToImage.put("ugin/98.jpg", "UGIN.zip/UGIN/Fierce Invocation.full.jpg"); - copyUrlToImage.put("wmcq/1.jpg", "WMCQ.zip/WMCQ/Vengevine.full.jpg"); - copyUrlToImage.put("wmcq/2.jpg", "WMCQ.zip/WMCQ/Geist of Saint Traft.full.jpg"); - copyUrlToImage.put("wmcq/3.jpg", "WMCQ.zip/WMCQ/Thalia, Guardian of Thraben.full.jpg"); - copyUrlToImage.put("wmcq/4.jpg", "WMCQ.zip/WMCQ/Liliana of the Veil.full.jpg"); - copyUrlToImage.put("wmcq/5.jpg", "WMCQ.zip/WMCQ/Snapcaster Mage.full.jpg"); + singleLinks.put("SWS/AAT-1", "CqmDY8V.jpg"); + singleLinks.put("SWS/Acklay of the Arena", "ESVRm6F.jpg"); + singleLinks.put("SWS/Acquire Target", "FOskB4q.jpg"); + singleLinks.put("SWS/Admiral Ackbar", "JdGpP3p.jpg"); + singleLinks.put("SWS/Adroit Hateflayer", "0gSIQ4K.jpg"); + singleLinks.put("SWS/Anakin Skywalker", "3pGvZZEg.png"); + singleLinks.put("SWS/Ancient Holocron", "fH2dVP5.jpg"); + singleLinks.put("SWS/Aqualish Bounty Hunter", "Wm2aKa2.jpg"); + singleLinks.put("SWS/Armed Protocol Droid", "mywdKgN.jpg"); + singleLinks.put("SWS/Arrest", "VXLnNUo.jpg"); + singleLinks.put("SWS/Asajj Ventress", "rOXSIwO.jpg"); + singleLinks.put("SWS/AT-ST", "9sMcy3C.jpg"); + singleLinks.put("SWS/Aurra Sing, Bane of Jedi", "VgbndqZ.png"); + singleLinks.put("SWS/A-Wing", "4TaYoRO.jpg"); + singleLinks.put("SWS/Bantha Herd", "9rLPE2a.jpg"); + singleLinks.put("SWS/Bathe in Bacta", "sPynQAZ.jpg"); + singleLinks.put("SWS/Battle Tactics", "zoon1p4.jpg"); + singleLinks.put("SWS/Bib Fortuna", "AqAmOEw.jpg"); + singleLinks.put("SWS/Black Market Dealer", "EJpIxna.jpg"); + singleLinks.put("SWS/Blind Worship", "GonJyeF.jpg"); + singleLinks.put("SWS/Boba Fett", "XE83Ks7.jpg"); + singleLinks.put("SWS/Bossk", "m91vUdJ.jpg"); + singleLinks.put("SWS/Bounty Collector", "GHHxvb0.jpg"); + singleLinks.put("SWS/Bounty Sniper", "ANTNrsS.jpg"); + singleLinks.put("SWS/Bounty Spotter", "aB6LAZs.jpg"); + singleLinks.put("SWS/Bull Rancor", "eG4mJ7o.jpg"); + singleLinks.put("SWS/C-3PO and R2D2", "RTv4ikx.jpg"); + singleLinks.put("SWS/Cantina Band", "PqMQP0o.jpg"); + singleLinks.put("SWS/Capture", "jxoTOyC.jpg"); + singleLinks.put("SWS/Carbonite Chamber", "rqEr1gm.jpg"); + singleLinks.put("SWS/Chewbacca", "D3D5T42.jpg"); + singleLinks.put("SWS/Chief Chirpa", "Gx3hLsg.jpg"); + singleLinks.put("SWS/Cloaking Device", "Vtz1NZU.jpg"); + singleLinks.put("SWS/Commander Cody", "9PGV2pV.jpg"); + singleLinks.put("SWS/Condemn", "36yejT2.jpg"); + singleLinks.put("SWS/Corellian Corvette", "j8uPQDY.jpg"); + singleLinks.put("SWS/Crossfire", "Iz9OdPh.jpg"); + singleLinks.put("SWS/Cruelty of the Sith", "q3WIYAt.jpg"); + singleLinks.put("SWS/Cunning Abduction", "CueTNo7.jpg"); + singleLinks.put("SWS/Dagobah Maw Slug", "SqmdUMp.jpg"); + singleLinks.put("SWS/Dark Apprenticeship", "yf5MthH.jpg"); + singleLinks.put("SWS/Dark Decision", "2HB5lYN.jpg"); + singleLinks.put("SWS/Dark Trooper", "atKdUTA.jpg"); + singleLinks.put("SWS/Darth Maul", "EwC1e1Q.jpg"); + singleLinks.put("SWS/Darth Sidious, Sith Lord", "UYk3KnH.png"); + singleLinks.put("SWS/Darth Tyranus, Count of Serenno", "AXUfNuO.png"); + singleLinks.put("SWS/Darth Vader", "3pGvZZE.png"); + singleLinks.put("SWS/Death Trooper", "j7lWmPJ.jpg"); + singleLinks.put("SWS/Deploy The Troops", "QtcN0qV.jpg"); + singleLinks.put("SWS/Doom Blade", "cSuxWUr.jpg"); + singleLinks.put("SWS/Droid Commando", "HkKiaBQ.jpg"); + singleLinks.put("SWS/Droid Factory", "34L3ykD.jpg"); + singleLinks.put("SWS/Droid Foundry", "qYijxSk.jpg"); + singleLinks.put("SWS/Droideka", "BXN7t1i.jpg"); + singleLinks.put("SWS/Drone Holocron", "cHzqK4v.jpg"); + singleLinks.put("SWS/Echo Base Commando", "AdLjV4Y.jpg"); + singleLinks.put("SWS/EMP Blast", "Y0JWgRO.jpg"); + singleLinks.put("SWS/Escape Pod", "vj8gQ1u.jpg"); + singleLinks.put("SWS/Ewok Ambush", "219aufH.jpg"); + singleLinks.put("SWS/Ewok Firedancers", "DFAB3h4.jpg"); + singleLinks.put("SWS/Ewok Village", "rgQevhZ.jpg"); + singleLinks.put("SWS/Exogorth", "cS6fq3u.jpg"); + singleLinks.put("SWS/Ferocity of the Underworld", "lTqtVab.jpg"); + singleLinks.put("SWS/Flames of Remembrance", "WAKhi9i.jpg"); + singleLinks.put("SWS/Force Choke", "Uu1QUf9.jpg"); + singleLinks.put("SWS/Force Denial", "qwYGiUg.jpg"); + singleLinks.put("SWS/Force Drain", "prHdDXa.jpg"); + singleLinks.put("SWS/Force Healing", "kDGRFoj.jpg"); + singleLinks.put("SWS/Force Lightning", "DhAE9lZ.jpg"); + singleLinks.put("SWS/Force Mastery", "XPCWaP8.jpg"); + singleLinks.put("SWS/Force Pull", "rWWfkhX.jpg"); + singleLinks.put("SWS/Force Push", "aN8n4sk.jpg"); + singleLinks.put("SWS/Force Reflex", "RIlvXTz.jpg"); + singleLinks.put("SWS/Force Scream", "EsagOnR.jpg"); + singleLinks.put("SWS/Force Spark", "14MOM1y.jpg"); + singleLinks.put("SWS/Forest", "LIpeeP9.jpg"); + singleLinks.put("SWS/Forest", "jKwDwH7.jpg"); + singleLinks.put("SWS/Forest", "CVb3582.jpg"); + singleLinks.put("SWS/Forest", "q09fMW0.jpg"); + singleLinks.put("SWS/Fulfill Contract", "FtLMpHK.jpg"); + singleLinks.put("SWS/Gamorrean Prison Guard", "4dgOMPA.jpg"); + singleLinks.put("SWS/General Grievous", "tRLM8Hz.jpg"); + singleLinks.put("SWS/Gifted Initiate", "NDePdLv.jpg"); + singleLinks.put("SWS/Grand Moff Tarkin", "QXq1V40.jpg"); + singleLinks.put("SWS/Greater Krayt Dragon", "dzIiXXg.jpg"); + singleLinks.put("SWS/Greedo", "IRKwsX0.jpg"); + singleLinks.put("SWS/Gundark", "zLxfLM8.jpg"); + singleLinks.put("SWS/Gungan Captain", "1Q4DNWh.jpg"); + singleLinks.put("SWS/Han Solo", "G0Awota.jpg"); + singleLinks.put("SWS/Hazard Trooper", "ZOutamG.jpg"); + singleLinks.put("SWS/Head Hunting", "7OT1bGZ.jpg"); + singleLinks.put("SWS/Heavy Trooper", "HhZWs2N.jpg"); + singleLinks.put("SWS/Hot Pursuit", "ih1GT5Z.jpg"); + singleLinks.put("SWS/Hungry Dragonsnake", "23v7RTm.jpg"); + singleLinks.put("SWS/Hunt to Extinction", "3eJyfzZ.jpg"); + singleLinks.put("SWS/Hutt Crime Lord", "NAzK7Hp.jpg"); + singleLinks.put("SWS/Hutt Palace", "HEb2JN5.jpg"); + singleLinks.put("SWS/IG-88B", "YZUZJC8.jpg"); + singleLinks.put("SWS/Images of the Past", "sOXEk4Q.jpg"); + singleLinks.put("SWS/Imperial Gunner", "9KpZ8AX.jpg"); + singleLinks.put("SWS/Impulsive Wager", "lLutRRs.jpg"); + singleLinks.put("SWS/Insatiable Rakghoul", "IYqBnTK.jpg"); + singleLinks.put("SWS/Interrogation", "kI2bIbo.jpg"); + singleLinks.put("SWS/Ion Cannon", "Tb546IK.jpg"); + singleLinks.put("SWS/Iron Fist of the Empire", "9Ui7NRn.jpg"); + singleLinks.put("SWS/Island", "GxITXBO.jpg"); + singleLinks.put("SWS/Island", "vKdg4fG.jpg"); + singleLinks.put("SWS/Island", "NPMxIew.jpg"); + singleLinks.put("SWS/Island", "cnqFMa6.jpg"); + singleLinks.put("SWS/Ithorian Initiate", "2RYpp5o.jpg"); + singleLinks.put("SWS/Jabba the Hutt", "QMz0sKa.jpg"); + singleLinks.put("SWS/Jango Fett", "nEnspQP.jpg"); + singleLinks.put("SWS/Jar Jar Binks", "GCnx72b.jpg"); + singleLinks.put("SWS/Jar'Kai Battle Stance", "GLavgj7.jpg"); + singleLinks.put("SWS/Jedi Battle Healer", "RyIJON5.jpg"); + singleLinks.put("SWS/Jedi Battle Mage", "V9qHRGq.jpg"); + singleLinks.put("SWS/Jedi Battle Sage", "sZVlGWE.jpg"); + singleLinks.put("SWS/Jedi Enclave", "FlibBhx.jpg"); + singleLinks.put("SWS/Jedi Holocron", "ojbt2av.jpg"); + singleLinks.put("SWS/Jedi Inquirer", "ghFQA76.jpg"); + singleLinks.put("SWS/Jedi Instructor", "IwEpVkz.jpg"); + singleLinks.put("SWS/Jedi Knight", "VXNHpZs.jpg"); + singleLinks.put("SWS/Jedi Mind Trick", "aaVfgSA.jpg"); + singleLinks.put("SWS/Jedi Sentinel", "cae3O1s.jpg"); + singleLinks.put("SWS/Jedi Starfighter", "Ta20jjD.jpg"); + singleLinks.put("SWS/Jedi Temple", "ZkOUJnM.jpg"); + singleLinks.put("SWS/Jedi Training", "7L1LWie.jpg"); + singleLinks.put("SWS/Jump Trooper", "62Pg5r4.jpg"); + singleLinks.put("SWS/Jungle Village", "3a1KN8u.jpg"); + singleLinks.put("SWS/Kamino Cloning Facility", "kwBudvf.jpg"); + singleLinks.put("SWS/Ki-Adi-Mundi", "atqNF3H.jpg"); + singleLinks.put("SWS/LAAT Gunship", "DEMXleY.jpg"); + singleLinks.put("SWS/Lando Calrissian", "jcoTjGV.jpg"); + singleLinks.put("SWS/Legacy of the Beloved", "Y0ObvQg.jpg"); + singleLinks.put("SWS/Lightning Bolt", "XSNGQYi.jpg"); + singleLinks.put("SWS/Lightsaber", "YrpWygk.jpg"); + singleLinks.put("SWS/Loyal Tauntaun", "JKDV2WK.jpg"); + singleLinks.put("SWS/Luke Skywalker", "9worW6q.jpg"); + singleLinks.put("SWS/Mace Windu", "rmTuBGT.jpg"); + singleLinks.put("SWS/Maintenance Droid", "A66IIC1.jpg"); + singleLinks.put("SWS/Maintenance Hangar", "DzCYnH3.jpg"); + singleLinks.put("SWS/Mantellian Savrip", "a9JIDEM.jpg"); + singleLinks.put("SWS/March of the Droids", "A4HIQ5V.jpg"); + singleLinks.put("SWS/Massiff Swarm", "0qRPfbC.jpg"); + singleLinks.put("SWS/Might of the Wild", "eNXOdxp.jpg"); + singleLinks.put("SWS/Millennium Falcon", "aZ6sIn2.jpg"); + singleLinks.put("SWS/Miraculous Recovery", "DH6Cei8.jpg"); + singleLinks.put("SWS/Moisture Farm", "S6kJHtL.jpg"); + singleLinks.put("SWS/Mon Calamari Cruiser", "ZHdTV7p.jpg"); + singleLinks.put("SWS/Mon Calamari Initiate", "GBuXdGP.jpg"); + singleLinks.put("SWS/Mountain", "MCii4g1.jpg"); + singleLinks.put("SWS/Mountain", "Tb0ic31.jpg"); + singleLinks.put("SWS/Mountain", "wqXTdsC.jpg"); + singleLinks.put("SWS/Mountain", "9oBNCHk.jpg"); + singleLinks.put("SWS/N-1 Starfighter", "UH3qd7x.jpg"); + singleLinks.put("SWS/Nebulon-B Frigate", "IwEpVkz.jpg"); + singleLinks.put("SWS/Neophyte Hateflayer", "Has2AIW.jpg"); + singleLinks.put("SWS/Nerf Herder", "VUX0LHV.jpg"); + singleLinks.put("SWS/Nexu Stalker", "E1xxHe1.jpg"); + singleLinks.put("SWS/Nightspider", "H1po0uV.jpg"); + singleLinks.put("SWS/No Contest", "6SwC9ri.jpg"); + singleLinks.put("SWS/Novice Bounty Hunter", "WfNSsLY.jpg"); + singleLinks.put("SWS/Nute Gunray", "UZg12DD.jpg"); + singleLinks.put("SWS/Obi-Wan Kenobi", "BHkbjdL.png"); + singleLinks.put("SWS/Open Season", "E4iM90K.jpg"); + singleLinks.put("SWS/Orbital Bombardment", "Ov1mB3A.jpg"); + singleLinks.put("SWS/Order 66", "jZituQQ.jpg"); + singleLinks.put("SWS/Ortolan Keyboardist", "dYDgEUB.jpg"); + singleLinks.put("SWS/Outer Rim Slaver", "xq8ozqq.jpg"); + singleLinks.put("SWS/Outlaw Holocron", "mWbyX78.jpg"); + singleLinks.put("SWS/Personal Energy Shield", "v6TGLne.jpg"); + singleLinks.put("SWS/Plains", "HgXaAKh.jpg"); + singleLinks.put("SWS/Plains", "Y0i7MBh.jpg"); + singleLinks.put("SWS/Plains", "4grXQVd.jpg"); + singleLinks.put("SWS/Plains", "kTmN8MM.jpg"); + singleLinks.put("SWS/Plo Koon", "dDNi8CV.jpg"); + singleLinks.put("SWS/Precipice of Mortis", "TRAPT86.jpg"); + singleLinks.put("SWS/Predator's Strike", "pcBoUny.jpg"); + singleLinks.put("SWS/Preordain", "u8nSNQW.jpg"); + singleLinks.put("SWS/Primal Instinct", "bInouYH.jpg"); + singleLinks.put("SWS/Princess Leia", "pnHyPWg.jpg"); + singleLinks.put("SWS/Probe Droid", "0r84uUM.jpg"); + singleLinks.put("SWS/Qui-Gon Jinn", "7DdumG2.jpg"); + singleLinks.put("SWS/Raging Reek", "9maXaMR.jpg"); + singleLinks.put("SWS/Rallying Fire", "wtaTlhd.jpg"); + singleLinks.put("SWS/Ravenous Wampa", "rHDaKDD.jpg"); + singleLinks.put("SWS/Regression", "j5z0TOE.jpg"); + singleLinks.put("SWS/Republic Frigate", "LzNpjxP.jpg"); + singleLinks.put("SWS/Repurpose", "BvRMy3f.jpg"); + singleLinks.put("SWS/Revenge", "xkKzMRX.jpg"); + singleLinks.put("SWS/Riding Ronto", "xECBi7G.jpg"); + singleLinks.put("SWS/Rocket Trooper", "94wUTH5.jpg"); + singleLinks.put("SWS/Rogue's Passage", "UunpJPZ.jpg"); + singleLinks.put("SWS/Rule of two", "wNqZWLJ.jpg"); + singleLinks.put("SWS/Rumination", "nSD3UHQ.jpg"); + singleLinks.put("SWS/Rumor Monger", "wSN6H6v.jpg"); + singleLinks.put("SWS/Sabacc Game", "qIcFb3U.jpg"); + singleLinks.put("SWS/Salvage Squad", "ThYSxmD.jpg"); + singleLinks.put("SWS/Sand Trooper", "ysfpyL8.jpg"); + singleLinks.put("SWS/Sarlacc Pit", "N4dcnln.png"); + singleLinks.put("SWS/Scout the Perimeter", "2cObUbz.jpg"); + singleLinks.put("SWS/Scout Trooper", "9RAY4U1.jpg"); + singleLinks.put("SWS/Security Droid", "dzy8m4v.jpg"); + singleLinks.put("SWS/Senator Bail Organa", "BRkUuYU.jpg"); + singleLinks.put("SWS/Senator Lott Dod", "yYQtXZo.jpg"); + singleLinks.put("SWS/Senator Onaconda Farr", "oPez77z.png"); + singleLinks.put("SWS/Senator Padmé Amidala", "287deD9.jpg"); + singleLinks.put("SWS/Senator Passel Argente", "51qpnaE.jpg"); + singleLinks.put("SWS/Shaak Herd", "PtnZD0I.jpg"); + singleLinks.put("SWS/Shadow Trooper", "09NAiGa.jpg"); + singleLinks.put("SWS/Shock Trooper", "UVNOxMR.jpg"); + singleLinks.put("SWS/Show of Dominance", "ru2D3Qp.jpg"); + singleLinks.put("SWS/Sith Assassin", "Nt8WUCj.jpg"); + singleLinks.put("SWS/Sith Citadel", "bBCbK30.jpg"); + singleLinks.put("SWS/Sith Evoker", "jwRzCEB.jpg"); + singleLinks.put("SWS/Sith Holocron", "07Ufx5X.jpg"); + singleLinks.put("SWS/Sith Inquisitor", "NivI1E5.jpg"); + singleLinks.put("SWS/Sith Lord", "lWBfQoA.jpg"); + singleLinks.put("SWS/Sith Magic", "cDPFeve.jpg"); + singleLinks.put("SWS/Sith Manipulator", "Q7CIvyz.jpg"); + singleLinks.put("SWS/Sith Marauder", "9zZUSJW.jpg"); + singleLinks.put("SWS/Sith Mindseer", "Lmps3oO.jpg"); + singleLinks.put("SWS/Sith Ravager", "nl9Dp41.jpg"); + singleLinks.put("SWS/Sith Ruins", "oSqiYyO.jpg"); + singleLinks.put("SWS/Sith Sorcerer", "Pq37iop.jpg"); + singleLinks.put("SWS/Sith Thoughtseeker", "YzIY1di.jpg"); + singleLinks.put("SWS/Slave I", "QUGpxlb.jpg"); + singleLinks.put("SWS/Smash to Smithereens", "UlzDZWp.jpg"); + singleLinks.put("SWS/Snow Trooper", "28Jp5JL.jpg"); + singleLinks.put("SWS/Speeder Trooper", "BIEnTDL.jpg"); + singleLinks.put("SWS/Star Destroyer", "DYUMXHZ.jpg"); + singleLinks.put("SWS/Strike Team Commando", "783ZFsF.jpg"); + singleLinks.put("SWS/Super Battle Droid", "T8IjrKD.jpg"); + singleLinks.put("SWS/Surprise Maneuver", "uaAmzz8.jpg"); + singleLinks.put("SWS/Swamp", "kBGj6vk.jpg"); + singleLinks.put("SWS/Swamp", "BLJl2lf.jpg"); + singleLinks.put("SWS/Swamp", "MLH5o2u.jpg"); + singleLinks.put("SWS/Swamp", "Rmrv9tC.jpg"); + singleLinks.put("SWS/Swarm the Skies", "Ti1McaV.jpg"); + singleLinks.put("SWS/Syndicate Enforcer", "xZ0g2Sx.jpg"); + singleLinks.put("SWS/Tank Droid", "N4YyMje.jpg"); + singleLinks.put("SWS/Terentatek Cub", "nbmBxst.jpg"); + singleLinks.put("SWS/The Battle of Endor", "vhL6gdI.jpg"); + singleLinks.put("SWS/The Battle of Geonosis", "7Fnr2MD.jpg"); + singleLinks.put("SWS/The Battle of Hoth", "wcVJwKP.jpg"); + singleLinks.put("SWS/The Battle of Naboo", "aesSN9E.jpg"); + singleLinks.put("SWS/The Battle of Yavin", "AtGE49k.jpg"); + singleLinks.put("SWS/The Death Star", "2LjSXa9.jpg"); + singleLinks.put("SWS/TIE Bomber", "R2l7ZXQ.jpg"); + singleLinks.put("SWS/TIE Interceptor", "fYY4PUR.jpg"); + singleLinks.put("SWS/Trade Federation Battleship", "sKN9Gzv.jpg"); + singleLinks.put("SWS/Tri-Fighter", "IhwHzqT.jpg"); + singleLinks.put("SWS/Trooper Armor", "nqnFj9f.jpg"); + singleLinks.put("SWS/Trooper Commando", "PiAYXJv.jpg"); + singleLinks.put("SWS/Twi'lek Seductress", "iPhUxUV.jpg"); + singleLinks.put("SWS/Ugnaught Scrap Worker", "fuuNN3n.jpg"); + singleLinks.put("SWS/Underworld Slums", "o4CFq3x.jpg"); + singleLinks.put("SWS/Unity of the Droids", "WFAIRy3.jpg"); + singleLinks.put("SWS/Unruly Sureshot", "AHymfLc.jpg"); + singleLinks.put("SWS/Vapor Snag", "8g3q0ny.jpg"); + singleLinks.put("SWS/V-Wing", "7eThuU9.jpg"); + singleLinks.put("SWS/Weequay Beastmaster", "metAs1p.jpg"); + singleLinks.put("SWS/Wild Holocron", "adw7dFO.jpg"); + singleLinks.put("SWS/Wisdom of the Jedi", "TgTj2Dd.jpg"); + singleLinks.put("SWS/Womp Rat", "XKF79Hr.jpg"); + singleLinks.put("SWS/Wookiee Bounty Hunter", "A76UGTJ.jpg"); + singleLinks.put("SWS/Wookiee Mystic", "8DCkOVe.jpg"); + singleLinks.put("SWS/Wookiee Raidleader", "ZZTduL5.jpg"); + singleLinks.put("SWS/X-Wing", "AV1LPuZ.jpg"); + singleLinks.put("SWS/Yoda, Jedi Master", "6arN1Hl.png"); + singleLinks.put("SWS/Y-Wing", "aQQ5zwA.jpg"); + singleLinks.put("SWS/Zam Wesell", "ToG0C1r.jpg"); + // Emblems + singleLinks.put("SWS/Obi-Wan Kenobi", "Qyc10aT.png"); + singleLinks.put("SWS/Aurra Sing", "BLWbVJC.png"); + singleLinks.put("SWS/Yoda", "zH0sYxg.png"); + // Tokens + singleLinks.put("SWS/Ewok", "N2MvJyr.png"); + singleLinks.put("SWS/B-Wing", "oH62AUD.png"); + singleLinks.put("SWS/Hunter", "oJiawFA.png"); + singleLinks.put("SWS/TIE Fighter", "CLOuJ05.png"); + singleLinks.put("SWS/Trooper", "2XKqdX5.png"); + singleLinks.put("SWS/AT-AT", "Tv5b7h1.png"); + singleLinks.put("SWS/Rebel", "pVoShnF.png"); + singleLinks.put("SWS/Royal Guard", "9tqE8vL.png"); + singleLinks.put("SWS/Tusken Raider", "gPMiSmP.png"); + singleLinks.put("SWS/Droid", "4PRrWFF.png"); - for (String key : copyUrlToImage.keySet()) { - copyUrlToImageDone.put(key, maxTimes); - copyImageToUrl.put(copyUrlToImage.get(key), key); - } +// singleLinks.put("MTG/FRF/en/promo/prerelease/AleshaWhoSmilesAtDeath.jpg", "PTC.zip/PTC/Alesha, Who Smiles at Death.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/Arcbond.jpg", "PTC.zip/PTC/Arcbond.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/ArchfiendOfDepravity.jpg", "PTC.zip/PTC/Archfiend of Depravity.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/AtarkaWorldRender.jpg", "PTC.zip/PTC/Atarka, World Render.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/BrutalHordechief.jpg", "PTC.zip/PTC/Brutal Hordechief.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/DaghatarTheAdamant.jpg", "PTC.zip/PTC/Daghatar the Adamant.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/DragonscaleGeneral.jpg", "PTC.zip/PTC/Dragonscale General.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/DromokaTheEternal.jpg", "PTC.zip/PTC/Dromoka, the Eternal.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/FlamerushRider.jpg", "PTC.zip/PTC/Flamerush Rider.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/FlamewakePhoenix.jpg", "PTC.zip/PTC/Flamewake Phoenix.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/JeskaiInfiltrator.jpg", "PTC.zip/PTC/Jeskai Infiltrator.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/KolaghanTheStormsFury.jpg", "PTC.zip/PTC/Kolaghan, the Storm's Fury.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/MarduStrikeLeader.jpg", "PTC.zip/PTC/Mardu Strike leader.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/MasteryOfTheUnseen.jpg", "PTC.zip/PTC/Mastery of the Unseen.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/OjutaiSoulOfWinter.jpg", "PTC.zip/PTC/Ojutai, Soul of Winter.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/RallyTheAncestors.jpg", "PTC.zip/PTC/Rally the Ancestors.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/SageEyeAvengers.jpg", "PTC.zip/PTC/Sage-Eye Avengers.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/SandsteppeMastodon.jpg", "PTC.zip/PTC/Sandsteppe Mastodon.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/ShamanOfTheGreatHunt.jpg", "PTC.zip/PTC/Shaman of the Great Hunt.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/ShamanicRevelation.jpg", "PTC.zip/PTC/Shamanic Revelation.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/ShuYunTheSilentTempest.jpg", "PTC.zip/PTC/Shu Yun, the Silent Tempest.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/SilumgarTheDriftingDeath.jpg", "PTC.zip/PTC/Silumgar, the Drifting Death.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/SoulfireGrandMaster.jpg", "PTC.zip/PTC/Soulfire Grand Master.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/Soulflayer.jpg", "PTC.zip/PTC/Soulflayer.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/SupplantForm.jpg", "PTC.zip/PTC/Supplant Form.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/TasigurTheGoldenFang.jpg", "PTC.zip/PTC/Tasigur, the Golden Fang.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/TorrentElemental.jpg", "PTC.zip/PTC/Torrent Elemental.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/WardenOfTheFirstTree.jpg", "PTC.zip/PTC/Warden of the First Tree.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/Wildcall.jpg", "PTC.zip/PTC/Wildcall.full.jpg"); +// singleLinks.put("MTG/FRF/en/promo/prerelease/YasovaDragonclaw.jpg", "PTC.zip/PTC/Yasova Dragonclaw.full.jpg"); +// singleLinks.put("MTG/JOU/en/promo/DawnbringerCharioteers.jpg", "PTC.zip/PTC/Dawnbringer Charioteers.full.jpg"); +// singleLinks.put("MTG/JOU/en/promo/DictateOfKruphix.jpg", "PTC.zip/PTC/Dictate of Kruphix.full.jpg"); +// singleLinks.put("MTG/JOU/en/promo/DictateOfTheTwinGods.jpg", "PTC.zip/PTC/Dictate of the Twin Gods.full.jpg"); +// singleLinks.put("MTG/JOU/en/promo/DoomwakeGiant.jpg", "PTC.zip/PTC/Doomwake Giant.full.jpg"); +// singleLinks.put("MTG/JOU/en/promo/EidolonOfBlossoms.jpg", "PTC.zip/PTC/Eidolon of Blossoms.full.jpg"); +// singleLinks.put("MTG/JOU/en/promo/ScourgeOfSkolaVale.jpg", "PTC.zip/PTC/Scourge of Skola Vale.full.jpg"); +// singleLinks.put("MTG/JOU/en/promo/SpawnOfThraxes.jpg", "PTC.zip/PTC/Spawn of Thraxes.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/AbzanAscendancy.jpg", "PTC.zip/PTC/Abzan Ascendancy.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/AnafenzaTheForemost.jpg", "PTC.zip/PTC/Anafenza, the Foremost.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/AnkleShanker.jpg", "PTC.zip/PTC/Ankle Shanker.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/AvalancheTusker.jpg", "PTC.zip/PTC/Avalanche Tusker.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/BloodsoakedChampion.jpg", "PTC.zip/PTC/Bloodsoaked Champion.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/ButcherOfTheHorde.jpg", "PTC.zip/PTC/Butcher of the Horde.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/CracklingDoom.jpg", "PTC.zip/PTC/Crackling Doom.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/CratersClaws.jpg", "PTC.zip/PTC/Crater's Claws.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/DeflectingPalm.jpg", "PTC.zip/PTC/Deflecting Palm.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/DigThroughTime.jpg", "PTC.zip/PTC/Dig Through Time.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/DragonStyleTwins.jpg", "PTC.zip/PTC/Dragon-Style Twins.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/DragonThroneOfTarkir.jpg", "PTC.zip/PTC/Dragon Throne of Tarkir.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/Duneblast.jpg", "PTC.zip/PTC/Duneblast.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/FlyingCraneTechnique.jpg", "PTC.zip/PTC/Flying Crane Technique.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/GrimHaruspex.jpg", "PTC.zip/PTC/Grim Haruspex.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/HardenedScales.jpg", "PTC.zip/PTC/Hardened Scales.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/HeraldOfTorment.jpg", "PTC.zip/PTC/Herald of Torment.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/HighSentinelsOfArashin.jpg", "PTC.zip/PTC/High Sentinels of Arashin.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/IcyBlast.jpg", "PTC.zip/PTC/Icy Blast.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/IvorytuskFortress.jpg", "PTC.zip/PTC/Ivorytusk Fortress.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/JeeringInstigator.jpg", "PTC.zip/PTC/Jeering Instigator.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/JeskaiAscendancy.jpg", "PTC.zip/PTC/Jeskai Ascendancy.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/KheruSpellsnatcher.jpg", "PTC.zip/PTC/Kheru Spellsnatcher.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/MarduAscendancy.jpg", "PTC.zip/PTC/Mardu Ascendancy.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/MasterOfPearls.jpg", "PTC.zip/PTC/Master of Pearls.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/NarsetEnlightenedMaster.jpg", "PTC.zip/PTC/Narset, Enlightened Master.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/NecropolisFiend.jpg", "PTC.zip/PTC/Necropolis Fiend.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/RakshasaVizier.jpg", "PTC.zip/PTC/Rakshasa Vizier.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/RattleclawMystic.jpg", "PTC.zip/PTC/Rattleclaw Mystic.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/SageOfTheInwardEye.jpg", "PTC.zip/PTC/Sage of the Inward Eye.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/SidisiBroodTyrant.jpg", "PTC.zip/PTC/Sidisi, Brood Tyrant.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/SiegeRhino.jpg", "PTC.zip/PTC/Siege Rhino.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/SultaiAscendancy.jpg", "PTC.zip/PTC/Sultai Ascendancy.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/SurrakDragonclaw.jpg", "PTC.zip/PTC/Surrak Dragonclaw.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/TemurAscendancy.jpg", "PTC.zip/PTC/Temur Ascendancy.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/ThousandWinds.jpg", "PTC.zip/PTC/Thousand Winds.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/TrailOfMystery.jpg", "PTC.zip/PTC/Trail of Mystery.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/TrapEssence.jpg", "PTC.zip/PTC/Trap Essence.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/UtterEnd.jpg", "PTC.zip/PTC/Utter End.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/VillainousWealth.jpg", "PTC.zip/PTC/Villainous Wealth.full.jpg"); +// singleLinks.put("MTG/KTK/en/promo/ZurgoHelmsmasher.jpg", "PTC.zip/PTC/Zurgo Helmsmasher.full.jpg"); +// singleLinks.put("MTG/M15/en/promo/ChiefEngineer.jpg", "PTC.zip/PTC/Chief Engineer.full.jpg"); +// singleLinks.put("MTG/M15/en/promo/InGarruksWake.jpg", "PTC.zip/PTC/In Garruk's Wake.full.jpg"); +// singleLinks.put("MTG/M15/en/promo/IndulgentTormentor.jpg", "PTC.zip/PTC/Indulgent Tormentor.full.jpg"); +// singleLinks.put("MTG/M15/en/promo/MercurialPretender.jpg", "PTC.zip/PTC/Mercurial Pretender.full.jpg"); +// singleLinks.put("MTG/M15/en/promo/PhyrexianRevoker.jpg", "PTC.zip/PTC/Phyrexian Revoker.full.jpg"); +// singleLinks.put("MTG/M15/en/promo/Phytotitan.jpg", "PTC.zip/PTC/Phytotitan.full.jpg"); +// singleLinks.put("MTG/M15/en/promo/ResoluteArchangel.jpg", "PTC.zip/PTC/Resolute Archangel.full.jpg"); +// singleLinks.put("MTG/M15/en/promo/SiegeDragon.jpg", "PTC.zip/PTC/Siege Dragon.full.jpg"); +// singleLinks.put("MTG/M15/en/promo/SoulOfRavnica.jpg", "PTC.zip/PTC/Soul of Ravnica.full.jpg"); +// singleLinks.put("MTG/M15/en/promo/SoulOfZendikar.jpg", "PTC.zip/PTC/Soul of Zendikar.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/AzusaLostButSeeking.jpg", "JR.zip/JR/Azusa, Lost but Seeking.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/Bitterblossom.jpg", "JR.zip/JR/Bitterblossom.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/BloodstainedMire.jpg", "JR.zip/JR/Bloodstained Mire.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/CommandBeacon.jpg", "JR.zip/JR/Command Beacon.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/DarkRitual.jpg", "JR.zip/JR/Dark Ritual.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/DecreeOfJustice.jpg", "JR.zip/JR/Decree of Justice.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/DefenseOfTheHeart.jpg", "JR.zip/JR/Defense of the Heart.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/ExaltedAngel.jpg", "JR.zip/JR/Exalted Angel.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/FeldonOfTheThirdPath.jpg", "JR.zip/JR/Feldon of the Third Path.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/ForceOfWill.jpg", "JR.zip/JR/Force of Will.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/GaeasCradle.jpg", "JR.zip/JR/Gaea's Cradle.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/ImperialRecruiter.jpg", "JR.zip/JR/Imperial Recruiter.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/LandTax.jpg", "JR.zip/JR/Land Tax.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/MindsDesire.jpg", "JR.zip/JR/Mind's Desire.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/MishrasFactory.jpg", "JR.zip/JR/Mishra's Factory.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/RishadanPort.jpg", "JR.zip/JR/Rishadan Port.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/ShardlessAgent.jpg", "JR.zip/JR/Shardless Agent.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/ThawingGlaciers.jpg", "JR.zip/JR/Thawing Glaciers.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/Vindicate2007.jpg", "JR.zip/JR/Vindicate.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/Vindicate2013.jpg", "JR.zip/JR/Vindicate 1.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/Wasteland2010.jpg", "JR.zip/JR/Wasteland 1.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/Wasteland2015.jpg", "JR.zip/JR/Wasteland.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/WindsweptHeath.jpg", "JR.zip/JR/Windswept Heath.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/XiahouDunTheOneEyed.jpg", "JR.zip/JR/Xiahou Dun, the One-Eyed.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/YawgmothsWill.jpg", "JR.zip/JR/Yawgmoth's Will.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Judge/ZurtheEnchanter.jpg", "JR.zip/JR/Zur the Enchanter.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/AkoumFirebird.jpg", "PTC.zip/PTC/Akoum Firebird.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/AkoumHellkite.jpg", "PTC.zip/PTC/Akoum Hellkite.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/AlignedHedronNetwork.jpg", "PTC.zip/PTC/Aligned Hedron Network.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/AllyEncampment.jpg", "PTC.zip/PTC/Ally Encampment.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/AngelicCaptain.jpg", "PTC.zip/PTC/Angelic Captain.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/BarrageTyrant.jpg", "PTC.zip/PTC/Barrage Tyrant.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/BeastcallerSavant.jpg", "PTC.zip/PTC/Beastcaller Savant.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/BlightHerder.jpg", "PTC.zip/PTC/Blight Herder.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/BringToLight.jpg", "PTC.zip/PTC/Bring to Light.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/BroodButcher.jpg", "PTC.zip/PTC/Brood Butcher.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/BrutalExpulsion.jpg", "PTC.zip/PTC/Brutal Expulsion.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/CanopyVista.jpg", "PTC.zip/PTC/Canopy Vista.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/CinderGlade.jpg", "PTC.zip/PTC/Cinder Glade.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/ConduitOfRuin.jpg", "PTC.zip/PTC/Conduit of Ruin.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/DefiantBloodlord.jpg", "PTC.zip/PTC/Defiant Bloodlord.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/DesolationTwin.jpg", "PTC.zip/PTC/Desolation Twin.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/DragonmasterOutcast.jpg", "PTC.zip/PTC/Dragonmaster Outcast.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/DranasChosen.jpg", "PTC.zip/PTC/Drana's Chosen.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/DrownerOfHope.jpg", "PTC.zip/PTC/Drowner of Hope.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/DustStalker.jpg", "PTC.zip/PTC/Dust Stalker.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/EmeriaShepherd.jpg", "PTC.zip/PTC/Emeria Shepherd.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/EndlessOne.jpg", "PTC.zip/PTC/Endless One.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/ExertInfluence.jpg", "PTC.zip/PTC/Exert Influence.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/FathomFeeder.jpg", "PTC.zip/PTC/Fathom Feeder.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/FelidarSovereign.jpg", "PTC.zip/PTC/Felidar Sovereign.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/FromBeyond.jpg", "PTC.zip/PTC/From Beyond.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/GideonAllyOfZendikar.jpg", "PTC.zip/PTC/Gideon, Ally of Zendikar.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/GreenwardenOfMurasa.jpg", "PTC.zip/PTC/Greenwarden of Murasa.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/GruesomeSlaughter.jpg", "PTC.zip/PTC/Gruesome Slaughter.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/GuardianOfTazeem.jpg", "PTC.zip/PTC/Guardian of Tazeem.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/GuulDrazOverseer.jpg", "PTC.zip/PTC/Guul Draz Overseer.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/HeroOfGomaFada.jpg", "PTC.zip/PTC/Hero of Goma Fada.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/HerosDownfall.jpg", "PTC.zip/PTC/Hero's Downfall.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/KioraMasterOfTheDepths.jpg", "PTC.zip/PTC/Kiora, Master of the Depths.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/KioraTheCrashingWave.jpg", "PTC.zip/PTC/Kiora, the Crashing Wave.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/LanternScout.jpg", "PTC.zip/PTC/Lantern Scout.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/LumberingFalls.jpg", "PTC.zip/PTC/Lumbering Falls.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/MarchFromTheTomb.jpg", "PTC.zip/PTC/March from the Tomb.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/MundaAmbushLeader.jpg", "PTC.zip/PTC/Munda, Ambush Leader.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/NissasRenewal.jpg", "PTC.zip/PTC/Nissa's Renewal.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/NoyanDarRoilShaper.jpg", "PTC.zip/PTC/Noyan Dar, Roil Shaper.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/ObNixilisReignited.jpg", "PTC.zip/PTC/Ob Nixilis Reignited.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/ObNixilisUnshackled.jpg", "PTC.zip/PTC/Ob Nixilis, Unshackled.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/OblivionSower.jpg", "PTC.zip/PTC/Oblivion Sower.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/OmnathLocusOfRage.jpg", "PTC.zip/PTC/Omnath, Locus of Rage.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/OranRiefHydra.jpg", "PTC.zip/PTC/Oran-Rief Hydra.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/PainfulTruths.jpg", "PTC.zip/PTC/Painful Truths.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/PartTheWaterveil.jpg", "PTC.zip/PTC/Part the Waterveil.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/PlanarOutburst.jpg", "PTC.zip/PTC/Planar Outburst.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/PrairieStream.jpg", "PTC.zip/PTC/Prairie Stream.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/PrismArray.jpg", "PTC.zip/PTC/Prism Array.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/QuarantineField.jpg", "PTC.zip/PTC/Quarantine Field.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/RadiantFlames.jpg", "PTC.zip/PTC/Radiant Flames.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/RuinousPath.jpg", "PTC.zip/PTC/Ruinous Path.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/SanctumOfUgin.jpg", "PTC.zip/PTC/Sanctum of Ugin.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/ScatterToTheWinds.jpg", "PTC.zip/PTC/Scatter to the Winds.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/SerpentineSpike.jpg", "PTC.zip/PTC/Serpentine Spike.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/ShamblingVent.jpg", "PTC.zip/PTC/Shambling Vent.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/ShrineOfTheForsakenGods.jpg", "PTC.zip/PTC/Shrine of the Forsaken Gods.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/SireOfStagnation.jpg", "PTC.zip/PTC/Sire of Stagnation.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/SmolderingMarsh.jpg", "PTC.zip/PTC/Smoldering Marsh.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/SmotheringAbomination.jpg", "PTC.zip/PTC/Smothering Abomination.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/SunkenHollow.jpg", "PTC.zip/PTC/Sunken Hollow.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/UginsInsight.jpg", "PTC.zip/PTC/Ugin's Insight.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/UginsNexus.jpg", "PTC.zip/PTC/Ugin's Nexus.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/UlamogTheCeaselessHunger.jpg", "PTC.zip/PTC/Ulamog, the Ceaseless Hunger.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/UndergrowthChampion.jpg", "PTC.zip/PTC/Undergrowth Champion.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/VeteranWarleader.jpg", "PTC.zip/PTC/Veteran Warleader.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/VoidWinnower.jpg", "PTC.zip/PTC/Void Winnower.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/WastelandStrangler.jpg", "PTC.zip/PTC/Wasteland Strangler.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/WoodlandWanderer.jpg", "PTC.zip/PTC/Woodland Wanderer.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/BFZ/ZadaHedronGrinder.jpg", "PTC.zip/PTC/Zada, Hedron Grinder.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/AetherfluxReservoir.jpg", "PTC.zip/PTC/Aetherflux Reservoir.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/AethersquallAncient.jpg", "PTC.zip/PTC/Aethersquall Ancient.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/AetherstormRoc.jpg", "PTC.zip/PTC/Aetherstorm Roc.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/AetherworksMarvel.jpg", "PTC.zip/PTC/Aetherworks Marvel.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/AngelOfInvention.jpg", "PTC.zip/PTC/Angel of Invention.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/AnimationModule.jpg", "PTC.zip/PTC/Animation Module.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/ArchitectOfTheUntamed.jpg", "PTC.zip/PTC/Architect of the Untamed.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/AuthorityOfTheConsuls.jpg", "PTC.zip/PTC/Authority of the Consuls.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/BloomingMarsh.jpg", "PTC.zip/PTC/Blooming Marsh.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/BomatCourier.jpg", "PTC.zip/PTC/Bomat Courier.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/BotanicalSanctum.jpg", "PTC.zip/PTC/Botanical Sanctum.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/BristlingHydra.jpg", "PTC.zip/PTC/Bristling Hydra.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/CapturedByTheConsulate.jpg", "PTC.zip/PTC/Captured by the Consulate.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/CataclysmicGearhulk.jpg", "PTC.zip/PTC/Cataclysmic Gearhulk.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/ChandraTorchOfDefiance.jpg", "PTC.zip/PTC/Chandra, Torch of Defiance.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/CombustibleGearhulk.jpg", "PTC.zip/PTC/Combustible Gearhulk.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/ConcealedCourtyard.jpg", "PTC.zip/PTC/Concealed Courtyard.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/ConfiscationCoup.jpg", "PTC.zip/PTC/Confiscation Coup.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/CultivatorOfBlades.jpg", "PTC.zip/PTC/Cultivator of Blades.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/CultivatorsCaravan.jpg", "PTC.zip/PTC/Cultivator's Caravan.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/DeadlockTrap.jpg", "PTC.zip/PTC/Deadlock Trap.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/DemonOfDarkSchemes.jpg", "PTC.zip/PTC/Demon of Dark Schemes.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/DepalaPilotExemplar.jpg", "PTC.zip/PTC/Depala, Pilot Exemplar.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/DovinBaan.jpg", "PTC.zip/PTC/Dovin Baan.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/DubiousChallenge.jpg", "PTC.zip/PTC/Dubious Challenge.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/DynavoltTower.jpg", "PTC.zip/PTC/Dynavolt Tower.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/ElectrostaticPummeler.jpg", "PTC.zip/PTC/Electrostatic Pummeler.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/EliminateTheCompetition.jpg", "PTC.zip/PTC/Eliminate the Competition.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/FatefulShowdown.jpg", "PTC.zip/PTC/Fateful Showdown.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/FleetwheelCruiser.jpg", "PTC.zip/PTC/Fleetwheel Cruiser.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/Fumigate.jpg", "PTC.zip/PTC/Fumigate.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/GhirapurOrrery.jpg", "PTC.zip/PTC/Ghirapur Orrery.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/GontiLordOfLuxury.jpg", "PTC.zip/PTC/Gonti, Lord of Luxury.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/InsidiousWill.jpg", "PTC.zip/PTC/Insidious Will.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/InspiringVantage.jpg", "PTC.zip/PTC/Inspiring Vantage.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/InventorsFair.jpg", "PTC.zip/PTC/Inventors' Fair.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/KambalConsulOfAllocation.jpg", "PTC.zip/PTC/Kambal, Consul of Allocation.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/KeyToTheCity.jpg", "PTC.zip/PTC/Key to the City.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/LathnuHellion.jpg", "PTC.zip/PTC/Lathnu Hellion.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/LostLegacy.jpg", "PTC.zip/PTC/Lost Legacy.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/MadcapExperiment.jpg", "PTC.zip/PTC/Madcap Experiment.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/MarionetteMaster.jpg", "PTC.zip/PTC/Marionette Master.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/MasterTrinketeer.jpg", "PTC.zip/PTC/Master Trinketeer.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/MetallurgicSummonings.jpg", "PTC.zip/PTC/Metallurgic Summonings.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/MetalworkColossus.jpg", "PTC.zip/PTC/Metalwork Colossus.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/MidnightOil.jpg", "PTC.zip/PTC/Midnight Oil.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/MultiformWonder.jpg", "PTC.zip/PTC/Multiform Wonder.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/NissaVitalForce.jpg", "PTC.zip/PTC/Nissa, Vital Force.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/NoxiousGearhulk.jpg", "PTC.zip/PTC/Noxious Gearhulk.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/OviyaPashiriSageLifecrafter.jpg", "PTC.zip/PTC/Oviya Pashiri, Sage Lifecrafter.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/PadeemConsulOfInnovation.jpg", "PTC.zip/PTC/Padeem, Consul of Innovation.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/Panharmonicon.jpg", "PTC.zip/PTC/Panharmonicon.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/ParadoxicalOutcome.jpg", "PTC.zip/PTC/Paradoxical Outcome.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/PiaNalaar.jpg", "PTC.zip/PTC/Pia Nalaar.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/RashmiEternitiesCrafter.jpg", "PTC.zip/PTC/Rashmi, Eternities Crafter.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/SaheeliRai.jpg", "PTC.zip/PTC/Saheeli Rai.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/SaheelisArtistry.jpg", "PTC.zip/PTC/Saheeli's Artistry.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/ScrapheapScrounger.jpg", "PTC.zip/PTC/Scrapheap Scrounger.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/SkyshipStalker.jpg", "PTC.zip/PTC/Skyship Stalker.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/SkysovereignConsulFlagship.jpg", "PTC.zip/PTC/Skysovereign, Consul Flagship.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/SmugglersCopter.jpg", "PTC.zip/PTC/Smuggler's Copter.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/SpirebluffCanal.jpg", "PTC.zip/PTC/Spirebluff Canal.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/SyndicateTrafficker.jpg", "PTC.zip/PTC/Syndicate Trafficker.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/TerritorialGorger.jpg", "PTC.zip/PTC/Territorial Gorger.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/ToolcraftExemplar.jpg", "PTC.zip/PTC/Toolcraft Exemplar.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/TorrentialGearhulk.jpg", "PTC.zip/PTC/Torrential Gearhulk.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/VerdurousGearhulk.jpg", "PTC.zip/PTC/Verdurous Gearhulk.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/KLD/WildestDreams.jpg", "PTC.zip/PTC/Wildest Dreams.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/AyliEternalPilgrim.jpg", "PTC.zip/PTC/Ayli, Eternal Pilgrim.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/BearerOfSilence.jpg", "PTC.zip/PTC/Bearer of Silence.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/BearerOfTheHeavens.jpg", "PTC.zip/PTC/Bearer of the Heavens.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/CallTheGatewatch.jpg", "PTC.zip/PTC/Call the Gatewatch.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/CaptainsClaws.jpg", "PTC.zip/PTC/Captain's Claws.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/ChandraFlamecaller.jpg", "PTC.zip/PTC/Chandra, Flamecaller.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/ChandraPyromaster.jpg", "PTC.zip/PTC/Chandra, Pyromaster.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/CorruptedCrossroads.jpg", "PTC.zip/PTC/Corrupted Crossroads.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/CrushOfTentacles.jpg", "PTC.zip/PTC/Crush of Tentacles.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/DeceiverOfForm.jpg", "PTC.zip/PTC/Deceiver of Form.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/DeepfathomSkulker.jpg", "PTC.zip/PTC/Deepfathom Skulker.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/DimensionalInfiltrator.jpg", "PTC.zip/PTC/Dimensional Infiltrator.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/DranaLiberatorOfMalakir.jpg", "PTC.zip/PTC/Drana, Liberator of Malakir.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/DreadDefiler.jpg", "PTC.zip/PTC/Dread Defiler.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/EldraziDisplacer.jpg", "PTC.zip/PTC/Eldrazi Displacer.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/EldraziMimic.jpg", "PTC.zip/PTC/Eldrazi Mimic.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/EldraziObligator.jpg", "PTC.zip/PTC/Eldrazi Obligator.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/EndHostilities.jpg", "PTC.zip/PTC/End Hostilities.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/Endbringer.jpg", "PTC.zip/PTC/Endbringer.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/FallOfTheTitans.jpg", "PTC.zip/PTC/Fall of the Titans.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/GeneralTazri.jpg", "PTC.zip/PTC/General Tazri.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/GladehartCavalry.jpg", "PTC.zip/PTC/Gladehart Cavalry.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/GoblinDarkDwellers.jpg", "PTC.zip/PTC/Goblin Dark-Dwellers.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/GoblinRabblemaster.jpg", "PTC.zip/PTC/Goblin Rabblemaster.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/HedronAlignment.jpg", "PTC.zip/PTC/Hedron Alignment.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/HissingQuagmire.jpg", "PTC.zip/PTC/Hissing Quagmire.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/InverterOfTruth.jpg", "PTC.zip/PTC/Inverter of Truth.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/JoriEnRuinDiver.jpg", "PTC.zip/PTC/Jori En, Ruin Diver.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/KalitasTraitorOfGhet.jpg", "PTC.zip/PTC/Kalitas, Traitor of Ghet.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/KozilekTheGreatDistortion.jpg", "PTC.zip/PTC/Kozilek, the Great Distortion.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/KozileksReturn.jpg", "PTC.zip/PTC/Kozilek's Return.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/LinvalaThePreserver.jpg", "PTC.zip/PTC/Linvala, the Preserver.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/MatterReshaper.jpg", "PTC.zip/PTC/Matter Reshaper.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/MinaAndDennWildborn.jpg", "PTC.zip/PTC/Mina and Denn, Wildborn.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/Mirrorpool.jpg", "PTC.zip/PTC/Mirrorpool.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/MundasVanguard.jpg", "PTC.zip/PTC/Munda's Vanguard.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/NeedleSpires.jpg", "PTC.zip/PTC/Needle Spires.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/NissaVoiceOfZendikar.jpg", "PTC.zip/PTC/Nissa, Voice of Zendikar.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/OathOfChandra.jpg", "PTC.zip/PTC/Oath of Chandra.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/OathOfGideon.jpg", "PTC.zip/PTC/Oath of Gideon.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/OathOfJace.jpg", "PTC.zip/PTC/Oath of Jace.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/OathOfNissa.jpg", "PTC.zip/PTC/Oath of Nissa.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/OverwhelmingDenial.jpg", "PTC.zip/PTC/Overwhelming Denial.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/RealitySmasher.jpg", "PTC.zip/PTC/Reality Smasher.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/RemorselessPunishment.jpg", "PTC.zip/PTC/Remorseless Punishment.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/RuinsOfOranRief.jpg", "PTC.zip/PTC/Ruins of Oran-Rief.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/SeaGateWreckage.jpg", "PTC.zip/PTC/Sea Gate Wreckage.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/SifterOfSkulls.jpg", "PTC.zip/PTC/Sifter of Skulls.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/SphinxOfTheFinalWord.jpg", "PTC.zip/PTC/Sphinx of the Final Word.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/StoneHavenOutfitter.jpg", "PTC.zip/PTC/Stone Haven Outfitter.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/StoneforgeMasterwork.jpg", "PTC.zip/PTC/Stoneforge Masterwork.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/SylvanAdvocate.jpg", "PTC.zip/PTC/Sylvan Advocate.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/SylvanCaryatid.jpg", "PTC.zip/PTC/Sylvan Caryatid.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/ThoughtKnotSeer.jpg", "PTC.zip/PTC/Thought-Knot Seer.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/TyrantOfValakut.jpg", "PTC.zip/PTC/Tyrant of Valakut.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/VileRedeemer.jpg", "PTC.zip/PTC/Vile Redeemer.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/WanderingFumarole.jpg", "PTC.zip/PTC/Wandering Fumarole.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/WorldBreaker.jpg", "PTC.zip/PTC/World Breaker.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/OGW/ZendikarResurgent.jpg", "PTC.zip/PTC/Zendikar Resurgent.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/AlteredEgo.jpg", "PTC.zip/PTC/Altered Ego.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/AlwaysWatching.jpg", "PTC.zip/PTC/Always Watching.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/AngelOfDeliverance.jpg", "PTC.zip/PTC/Angel of Deliverance.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/AnguishedUnmaking.jpg", "PTC.zip/PTC/Anguished Unmaking.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/ArchangelAvacyn.jpg", "PTC.zip/PTC/Archangel Avacyn.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/ArlinnKord.jpg", "PTC.zip/PTC/Arlinn Kord.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/AsylumVisitor.jpg", "PTC.zip/PTC/Asylum Visitor.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/AvacynGuardianAngel.jpg", "PTC.zip/PTC/Avacyn, Guardian Angel.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/AvacynsJudgment.jpg", "PTC.zip/PTC/Avacyn's Judgement.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/BeholdTheBeyond.jpg", "PTC.zip/PTC/Behold the Beyond.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/BrainInAJar.jpg", "PTC.zip/PTC/Brain in a Jar.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/BurnFromWithin.jpg", "PTC.zip/PTC/Burn from Within.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/BygoneBishop.jpg", "PTC.zip/PTC/Bygone Bishop.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/ChokedEstuary.jpg", "PTC.zip/PTC/Choked Estuary.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/ConfirmSuspicions.jpg", "PTC.zip/PTC/Confirm Suspicions.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/CorruptedGrafstone.jpg", "PTC.zip/PTC/Corrupted Grafstone.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/CryptolithRite.jpg", "PTC.zip/PTC/Cryptolith Rite.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/DeathcapCultivator.jpg", "PTC.zip/PTC/Deathcap Cultivator.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/DeclarationInStone.jpg", "PTC.zip/PTC/Declaration in Stone.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/DescendUponTheSinful.jpg", "PTC.zip/PTC/Descend upon the Sinful.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/DevilsPlayground.jpg", "PTC.zip/PTC/Devils' Playground.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/DiregrafColossus.jpg", "PTC.zip/PTC/Diregraf Colossus.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/DrogskolCavalry.jpg", "PTC.zip/PTC/Drogskol Cavalry.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/DrownyardTemple.jpg", "PTC.zip/PTC/Drownyard Temple.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/EerieInterlude.jpg", "PTC.zip/PTC/Eerie Interlude.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/EngulfTheShore.jpg", "PTC.zip/PTC/Engulf the Shore.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/EpiphanyAtTheDrownyard.jpg", "PTC.zip/PTC/Epiphany at the Drownyard.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/EverAfter.jpg", "PTC.zip/PTC/Ever After.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/FalkenrathGorger.jpg", "PTC.zip/PTC/Falkenrath Gorger.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/FeveredVisions.jpg", "PTC.zip/PTC/Fevered Visions.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/FlamebladeAngel.jpg", "PTC.zip/PTC/Flameblade Angel.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/ForebodingRuins.jpg", "PTC.zip/PTC/Foreboding Ruins.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/ForgottenCreation.jpg", "PTC.zip/PTC/Forgotten Creation.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/FortifiedVillage.jpg", "PTC.zip/PTC/Fortified Village.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/FromUnderTheFloorboards.jpg", "PTC.zip/PTC/From Under the Floorboards.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/GameTrail.jpg", "PTC.zip/PTC/Game Trail.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/GeierReachBandit.jpg", "PTC.zip/PTC/Geier Reach Bandit.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/GeierReachSanitarium.jpg", "PTC.zip/PTC/Geier Reach Sanitarium.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/GeralfsMasterpiece.jpg", "PTC.zip/PTC/Geralf's Masterpiece.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/GoldnightCastigator.jpg", "PTC.zip/PTC/Goldnight Castigator.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/HanweirMilitiaCaptain.jpg", "PTC.zip/PTC/Hanweir Militia Captain.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/HarnessTheStorm.jpg", "PTC.zip/PTC/Harness the Storm.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/InexorableBlob.jpg", "PTC.zip/PTC/Inexorable Blob.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/InvocationOfSaintTraft.jpg", "PTC.zip/PTC/Invocation of Saint Traft.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/JaceTheLivingGuildpact.jpg", "PTC.zip/PTC/Jace, the Living Guildpact.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/JaceUnravelerOfSecrets.jpg", "PTC.zip/PTC/Jace, Unraveler of Secrets.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/MarkovDreadknight.jpg", "PTC.zip/PTC/Markov Dreadknight.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/MindwrackDemon.jpg", "PTC.zip/PTC/Mindwrack Demon.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/NahiriTheHarbinger.jpg", "PTC.zip/PTC/Nahiri, the Harbinger.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/NephaliaMoondrakes.jpg", "PTC.zip/PTC/Nephalia Moondrakes.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/OdricLunarchMarshal.jpg", "PTC.zip/PTC/Odric, Lunarch Marshal.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/OliviaMobilizedForWar.jpg", "PTC.zip/PTC/Olivia, Mobilized for War.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/OrmendahlProfanePrince.jpg", "PTC.zip/PTC/Ormendahl, Profane Prince.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/PortTown.jpg", "PTC.zip/PTC/Port Town.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/PrizedAmalgam.jpg", "PTC.zip/PTC/Prized Amalgam.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/Rattlechains.jpg", "PTC.zip/PTC/Rattlechains.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/RelentlessDead.jpg", "PTC.zip/PTC/Relentless Dead.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/SageOfAncientLore.jpg", "PTC.zip/PTC/Sage of Ancient Lore.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/ScourgeWolf.jpg", "PTC.zip/PTC/Scourge Wolf.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/SeasonsPast.jpg", "PTC.zip/PTC/Seasons Past.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/SecondHarvest.jpg", "PTC.zip/PTC/Second Harvest.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/SigardaHeronsGrace.jpg", "PTC.zip/PTC/Sigarda, Heron's Grace.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/SilverfurPartisan.jpg", "PTC.zip/PTC/Silverfur Partisan.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/SinProdder.jpg", "PTC.zip/PTC/Sin Prodder.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/SlayersPlate.jpg", "PTC.zip/PTC/Slayer's Plate.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/SorinGrimNemesis.jpg", "PTC.zip/PTC/Sorin, Grim Nemesis.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/SorinSolemnVisitor.jpg", "PTC.zip/PTC/Sorin, Solemn Visitor.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/SoulSwallower.jpg", "PTC.zip/PTC/Soul Swallower.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/StartledAwake.jpg", "PTC.zip/PTC/Startled Awake.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/TamiyoFieldResearcher.jpg", "PTC.zip/PTC/Tamiyo, Field Researcher.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/TamiyosJournal.jpg", "PTC.zip/PTC/Tamiyo's Journal.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/ThaliaHereticCathar.jpg", "PTC.zip/PTC/Thalia, Heretic Cathar.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/ThaliasLieutenant.jpg", "PTC.zip/PTC/Thalia's Lieutenant.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/TheGitrogMonster.jpg", "PTC.zip/PTC/The Gitrog Monster.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/ThingInTheIce.jpg", "PTC.zip/PTC/Thing in the Ice.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/TirelessTracker.jpg", "PTC.zip/PTC/Tireless Tracker.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/ToTheSlaughter.jpg", "PTC.zip/PTC/To the Slaughter.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/TraverseTheUlvenwald.jpg", "PTC.zip/PTC/Traverse the Ulvenwald.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/Triskaidekaphobia.jpg", "PTC.zip/PTC/Triskaidekaphobia.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/UlvenwaldObserver.jpg", "PTC.zip/PTC/Ulvenwald Observer.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/WelcomeToTheFold.jpg", "PTC.zip/PTC/Welcome to the Fold.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/WestvaleAbbey.jpg", "PTC.zip/PTC/Westvale Abbey.full.jpg"); +// singleLinks.put("MTG/PRM/en/foil/Prerelease/SOI/WolfOfDevilsBreach.jpg", "PTC.zip/PTC/Wolf of Devil's Breach.full.jpg"); +// singleLinks.put("MTG/THS/en/promo/HerosDownfall.jpg", "PTC.zip/PTC/Hero's Downfall.full.jpg"); +// singleLinks.put("MTG/THS/en/promo/ReaperOfTheWilds.jpg", "PTC.zip/PTC/Reaper of the Wilds.full.jpg"); +// singleLinks.put("MTG/THS/en/promo/WhipOfErebos.jpg", "PTC.zip/PTC/Whip of Erebos.full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/AncientTomb.jpg", "EXP.zip/EXP/Ancient Tomb .full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/CascadeBluffs.jpg", "EXP.zip/EXP/Cascade Bluffs .full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/DustBowl.jpg", "EXP.zip/EXP/Dust Bowl .full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/EyeOfUgin.jpg", "EXP.zip/EXP/Eye of Ugin .full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/FetidHeath.jpg", "EXP.zip/EXP/Fetid Heath .full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/FireLitThicket.jpg", "EXP.zip/EXP/Fire-Lit Thicket .full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/FloodedGrove.jpg", "EXP.zip/EXP/Flooded Grove .full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/ForbiddenOrchard.jpg", "EXP.zip/EXP/Forbidden Orchard .full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/GravenCairns.jpg", "EXP.zip/EXP/Graven Cairns .full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/HorizonCanopy.jpg", "EXP.zip/EXP/Horizon Canopy.full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/KorHaven.jpg", "EXP.zip/EXP/Kor Haven.full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/ManaConfluence.jpg", "EXP.zip/EXP/Mana Confluence.full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/MysticGate.jpg", "EXP.zip/EXP/Mystic Gate.full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/RuggedPrairie.jpg", "EXP.zip/EXP/Rugged Prairie.full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/StripMine.jpg", "EXP.zip/EXP/Strip Mine.full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/SunkenRuins.jpg", "EXP.zip/EXP/Sunken Ruins.full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/TectonicEdge.jpg", "EXP.zip/EXP/Tectonic Edge.full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/TwilightMire.jpg", "EXP.zip/EXP/Twilight Mire.full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/Wasteland.jpg", "EXP.zip/EXP/Wasteland.full.jpg"); +// singleLinks.put("MTG/EXP/en/foil/WoodedBastion.jpg", "EXP.zip/EXP/Wooded Bastion.full.jpg"); +// singleLinks.put("apac/1.jpg", "APAC.zip/APAC/Forest.1.full.jpg"); +// singleLinks.put("apac/10.jpg", "APAC.zip/APAC/Swamp.10.full.jpg"); +// singleLinks.put("apac/11.jpg", "APAC.zip/APAC/Forest.11.full.jpg"); +// singleLinks.put("apac/12.jpg", "APAC.zip/APAC/Island.7.full.jpg"); +// singleLinks.put("apac/13.jpg", "APAC.zip/APAC/Mountain.13.full.jpg"); +// singleLinks.put("apac/14.jpg", "APAC.zip/APAC/Plains.14.full.jpg"); +// singleLinks.put("apac/15.jpg", "APAC.zip/APAC/Swamp.15.full.jpg"); +// singleLinks.put("apac/2.jpg", "APAC.zip/APAC/Island.2.full.jpg"); +// singleLinks.put("apac/3.jpg", "APAC.zip/APAC/Mountain.3.full.jpg"); +// singleLinks.put("apac/4.jpg", "APAC.zip/APAC/Plains.4.full.jpg"); +// singleLinks.put("apac/5.jpg", "APAC.zip/APAC/Swamp.5.full.jpg"); +// singleLinks.put("apac/6.jpg", "APAC.zip/APAC/Forest.6.full.jpg"); +// singleLinks.put("apac/7.jpg", "APAC.zip/APAC/Island.12.full.jpg"); +// singleLinks.put("apac/8.jpg", "APAC.zip/APAC/Mountain.8.full.jpg"); +// singleLinks.put("apac/9.jpg", "APAC.zip/APAC/Plains.9.full.jpg"); +// singleLinks.put("arena/1.jpg", "ARENA.zip/ARENA/Plains.1.full.jpg"); +// singleLinks.put("arena/10.jpg", "ARENA.zip/ARENA/Swamp.10.full.jpg"); +// singleLinks.put("arena/11.jpg", "ARENA.zip/ARENA/Mountain.11.full.jpg"); +// singleLinks.put("arena/12.jpg", "ARENA.zip/ARENA/Forest.12.full.jpg"); +// singleLinks.put("arena/13.jpg", "ARENA.zip/ARENA/Pouncing Jaguar.full.jpg"); +// singleLinks.put("arena/14.jpg", "ARENA.zip/ARENA/Skittering Skirge.full.jpg"); +// singleLinks.put("arena/15.jpg", "ARENA.zip/ARENA/Rewind.full.jpg"); +// singleLinks.put("arena/16.jpg", "ARENA.zip/ARENA/Karn, Silver Golem.full.jpg"); +// singleLinks.put("arena/17.jpg", "ARENA.zip/ARENA/Duress.full.jpg"); +// singleLinks.put("arena/18.jpg", "ARENA.zip/ARENA/Uktabi Orangutan.full.jpg"); +// singleLinks.put("arena/19.jpg", "ARENA.zip/ARENA/Chill.full.jpg"); +// singleLinks.put("arena/2.jpg", "ARENA.zip/ARENA/Island.2.full.jpg"); +// singleLinks.put("arena/20.jpg", "ARENA.zip/ARENA/Pillage.full.jpg"); +// singleLinks.put("arena/21.jpg", "ARENA.zip/ARENA/Enlightened Tutor.full.jpg"); +// singleLinks.put("arena/22.jpg", "ARENA.zip/ARENA/Stupor.full.jpg"); +// singleLinks.put("arena/23.jpg", "ARENA.zip/ARENA/Plains.23.full.jpg"); +// singleLinks.put("arena/24.jpg", "ARENA.zip/ARENA/Island.24.full.jpg"); +// singleLinks.put("arena/25.jpg", "ARENA.zip/ARENA/Swamp.25.full.jpg"); +// singleLinks.put("arena/26.jpg", "ARENA.zip/ARENA/Mountain.26.full.jpg"); +// singleLinks.put("arena/27.jpg", "ARENA.zip/ARENA/Forest.27.full.jpg"); +// singleLinks.put("arena/28.jpg", "ARENA.zip/ARENA/Creeping Mold.full.jpg"); +// singleLinks.put("arena/29.jpg", "ARENA.zip/ARENA/Dismiss.full.jpg"); +// singleLinks.put("arena/3.jpg", "ARENA.zip/ARENA/Swamp.3.full.jpg"); +// singleLinks.put("arena/30.jpg", "ARENA.zip/ARENA/Fling.full.jpg"); +// singleLinks.put("arena/31.jpg", "ARENA.zip/ARENA/Empyrial Armor.full.jpg"); +// singleLinks.put("arena/32.jpg", "ARENA.zip/ARENA/Plains.32.full.jpg"); +// singleLinks.put("arena/33.jpg", "ARENA.zip/ARENA/Island.33.full.jpg"); +// singleLinks.put("arena/34.jpg", "ARENA.zip/ARENA/Swamp.34.full.jpg"); +// singleLinks.put("arena/35.jpg", "ARENA.zip/ARENA/Mountain.35.full.jpg"); +// singleLinks.put("arena/36.jpg", "ARENA.zip/ARENA/Forest.36.full.jpg"); +// singleLinks.put("arena/37.jpg", "ARENA.zip/ARENA/Diabolic Edict.full.jpg"); +// singleLinks.put("arena/38.jpg", "ARENA.zip/ARENA/Gaea's Blessing.full.jpg"); +// singleLinks.put("arena/39.jpg", "ARENA.zip/ARENA/Island.39.full.jpg"); +// singleLinks.put("arena/4.jpg", "ARENA.zip/ARENA/Mountain.4.full.jpg"); +// singleLinks.put("arena/40.jpg", "ARENA.zip/ARENA/Forest.40.full.jpg"); +// singleLinks.put("arena/41.jpg", "ARENA.zip/ARENA/Man-o'-War.full.jpg"); +// singleLinks.put("arena/42.jpg", "ARENA.zip/ARENA/Arc Lightning.full.jpg"); +// singleLinks.put("arena/43.jpg", "ARENA.zip/ARENA/Dauthi Slayer.full.jpg"); +// singleLinks.put("arena/44.jpg", "ARENA.zip/ARENA/Mana Leak.full.jpg"); +// singleLinks.put("arena/45.jpg", "ARENA.zip/ARENA/Plains.45.full.jpg"); +// singleLinks.put("arena/46.jpg", "ARENA.zip/ARENA/Island.46.full.jpg"); +// singleLinks.put("arena/47.jpg", "ARENA.zip/ARENA/Swamp.47.full.jpg"); +// singleLinks.put("arena/48.jpg", "ARENA.zip/ARENA/Mountain.48.full.jpg"); +// singleLinks.put("arena/5.jpg", "ARENA.zip/ARENA/Forest.5.full.jpg"); +// singleLinks.put("arena/50.jpg", "ARENA.zip/ARENA/Skirk Marauder.full.jpg"); +// singleLinks.put("arena/51.jpg", "ARENA.zip/ARENA/Elvish Aberration.full.jpg"); +// singleLinks.put("arena/52.jpg", "ARENA.zip/ARENA/Bonesplitter.full.jpg"); +// singleLinks.put("arena/53.jpg", "ARENA.zip/ARENA/Plains.53.full.jpg"); +// singleLinks.put("arena/54.jpg", "ARENA.zip/ARENA/Island.54.full.jpg"); +// singleLinks.put("arena/55.jpg", "ARENA.zip/ARENA/Swamp.55.full.jpg"); +// singleLinks.put("arena/56.jpg", "ARENA.zip/ARENA/Mountain.56.full.jpg"); +// singleLinks.put("arena/57.jpg", "ARENA.zip/ARENA/Forest.57.full.jpg"); +// singleLinks.put("arena/58.jpg", "ARENA.zip/ARENA/Darksteel Ingot.full.jpg"); +// singleLinks.put("arena/59.jpg", "ARENA.zip/ARENA/Serum Visions.full.jpg"); +// singleLinks.put("arena/6.jpg", "ARENA.zip/ARENA/Disenchant.full.jpg"); +// singleLinks.put("arena/60.jpg", "ARENA.zip/ARENA/Glacial Ray.full.jpg"); +// singleLinks.put("arena/61.jpg", "ARENA.zip/ARENA/Circle of Protection Art.full.jpg"); +// singleLinks.put("arena/62.jpg", "ARENA.zip/ARENA/Mise.full.jpg"); +// singleLinks.put("arena/63.jpg", "ARENA.zip/ARENA/Booster Tutor.full.jpg"); +// singleLinks.put("arena/64.jpg", "ARENA.zip/ARENA/Goblin Mime.full.jpg"); +// singleLinks.put("arena/65.jpg", "ARENA.zip/ARENA/Granny's Payback.full.jpg"); +// singleLinks.put("arena/66.jpg", "ARENA.zip/ARENA/Ashnod's Coupon.full.jpg"); +// singleLinks.put("arena/67.jpg", "ARENA.zip/ARENA/Plains.67.full.jpg"); +// singleLinks.put("arena/68.jpg", "ARENA.zip/ARENA/Island.68.full.jpg"); +// singleLinks.put("arena/69.jpg", "ARENA.zip/ARENA/Swamp.69.full.jpg"); +// singleLinks.put("arena/7.jpg", "ARENA.zip/ARENA/Fireball.full.jpg"); +// singleLinks.put("arena/70.jpg", "ARENA.zip/ARENA/Mountain.70.full.jpg"); +// singleLinks.put("arena/71.jpg", "ARENA.zip/ARENA/Forest.71.full.jpg"); +// singleLinks.put("arena/72.jpg", "ARENA.zip/ARENA/Genju of the Spires.full.jpg"); +// singleLinks.put("arena/73.jpg", "ARENA.zip/ARENA/Okina Nightwatch.full.jpg"); +// singleLinks.put("arena/74.jpg", "ARENA.zip/ARENA/Skyknight Legionnaire.full.jpg"); +// singleLinks.put("arena/75.jpg", "ARENA.zip/ARENA/Plains.75.full.jpg"); +// singleLinks.put("arena/76.jpg", "ARENA.zip/ARENA/Island.76.full.jpg"); +// singleLinks.put("arena/77.jpg", "ARENA.zip/ARENA/Swamp.77.full.jpg"); +// singleLinks.put("arena/78.jpg", "ARENA.zip/ARENA/Mountain.78.full.jpg"); +// singleLinks.put("arena/8.jpg", "ARENA.zip/ARENA/Plains.8.full.jpg"); +// singleLinks.put("arena/80.jpg", "ARENA.zip/ARENA/Castigate.full.jpg"); +// singleLinks.put("arena/81.jpg", "ARENA.zip/ARENA/Wee Dragonauts.full.jpg"); +// singleLinks.put("arena/82.jpg", "ARENA.zip/ARENA/Coiling Oracle.full.jpg"); +// singleLinks.put("arena/83.jpg", "ARENA.zip/ARENA/Surging Flame.full.jpg"); +// singleLinks.put("arena/9.jpg", "ARENA.zip/ARENA/Island.9.full.jpg"); +// singleLinks.put("euro/1.jpg", "EURO.zip/EURO/Forest.1.full.jpg"); +// singleLinks.put("euro/10.jpg", "EURO.zip/EURO/Swamp.10.full.jpg"); +// singleLinks.put("euro/11.jpg", "EURO.zip/EURO/Forest.11.full.jpg"); +// singleLinks.put("euro/12.jpg", "EURO.zip/EURO/Island.12.full.jpg"); +// singleLinks.put("euro/13.jpg", "EURO.zip/EURO/Mountain.13.full.jpg"); +// singleLinks.put("euro/14.jpg", "EURO.zip/EURO/Plains.14.full.jpg"); +// singleLinks.put("euro/15.jpg", "EURO.zip/EURO/Swamp.15.full.jpg"); +// singleLinks.put("euro/2.jpg", "EURO.zip/EURO/Island.2.full.jpg"); +// singleLinks.put("euro/3.jpg", "EURO.zip/EURO/Mountain.3.full.jpg"); +// singleLinks.put("euro/4.jpg", "EURO.zip/EURO/Plains.4.full.jpg"); +// singleLinks.put("euro/5.jpg", "EURO.zip/EURO/Swamp.5.full.jpg"); +// singleLinks.put("euro/6.jpg", "EURO.zip/EURO/Forest.6.full.jpg"); +// singleLinks.put("euro/7.jpg", "EURO.zip/EURO/Island.7.full.jpg"); +// singleLinks.put("euro/8.jpg", "EURO.zip/EURO/Mountain.8.full.jpg"); +// singleLinks.put("euro/9.jpg", "EURO.zip/EURO/Plains.9.full.jpg"); +// singleLinks.put("exp/1.jpg", "EXP.zip/EXP/Prairie Stream.full.jpg"); +// singleLinks.put("exp/10.jpg", "EXP.zip/EXP/Temple Garden.full.jpg"); +// singleLinks.put("exp/11.jpg", "EXP.zip/EXP/Godless Shrine.full.jpg"); +// singleLinks.put("exp/12.jpg", "EXP.zip/EXP/Steam Vents.full.jpg"); +// singleLinks.put("exp/13.jpg", "EXP.zip/EXP/Overgrown Tomb.full.jpg"); +// singleLinks.put("exp/14.jpg", "EXP.zip/EXP/Sacred Foundry.full.jpg"); +// singleLinks.put("exp/15.jpg", "EXP.zip/EXP/Breeding Pool.full.jpg"); +// singleLinks.put("exp/16.jpg", "EXP.zip/EXP/Flooded Strand.full.jpg"); +// singleLinks.put("exp/17.jpg", "EXP.zip/EXP/Polluted Delta.full.jpg"); +// singleLinks.put("exp/18.jpg", "EXP.zip/EXP/Bloodstained Mire.full.jpg"); +// singleLinks.put("exp/19.jpg", "EXP.zip/EXP/Wooded Foothills.full.jpg"); +// singleLinks.put("exp/2.jpg", "EXP.zip/EXP/Sunken Hollow.full.jpg"); +// singleLinks.put("exp/20.jpg", "EXP.zip/EXP/Windswept Heath.full.jpg"); +// singleLinks.put("exp/21.jpg", "EXP.zip/EXP/Marsh Flats.full.jpg"); +// singleLinks.put("exp/22.jpg", "EXP.zip/EXP/Scalding Tarn.full.jpg"); +// singleLinks.put("exp/23.jpg", "EXP.zip/EXP/Verdant Catacombs.full.jpg"); +// singleLinks.put("exp/24.jpg", "EXP.zip/EXP/Arid Mesa.full.jpg"); +// singleLinks.put("exp/25.jpg", "EXP.zip/EXP/Misty Rainforest.full.jpg"); +// singleLinks.put("exp/3.jpg", "EXP.zip/EXP/Smoldering Marsh.full.jpg"); +// singleLinks.put("exp/4.jpg", "EXP.zip/EXP/Cinder Glade.full.jpg"); +// singleLinks.put("exp/5.jpg", "EXP.zip/EXP/Canopy Vista.full.jpg"); +// singleLinks.put("exp/6.jpg", "EXP.zip/EXP/Hallowed Fountain.full.jpg"); +// singleLinks.put("exp/7.jpg", "EXP.zip/EXP/Watery Grave.full.jpg"); +// singleLinks.put("exp/8.jpg", "EXP.zip/EXP/Blood Crypt.full.jpg"); +// singleLinks.put("exp/9.jpg", "EXP.zip/EXP/Stomping Ground.full.jpg"); +// singleLinks.put("fnmp/1.jpg", "FNMP.zip/FNMP/River Boa.full.jpg"); +// singleLinks.put("fnmp/10.jpg", "FNMP.zip/FNMP/Stone Rain.full.jpg"); +// singleLinks.put("fnmp/100.jpg", "FNMP.zip/FNMP/Thirst for Knowledge.full.jpg"); +// singleLinks.put("fnmp/101.jpg", "FNMP.zip/FNMP/Serrated Arrows.full.jpg"); +// singleLinks.put("fnmp/102.jpg", "FNMP.zip/FNMP/Isochron Scepter.full.jpg"); +// singleLinks.put("fnmp/103.jpg", "FNMP.zip/FNMP/Shrapnel Blast.full.jpg"); +// singleLinks.put("fnmp/104.jpg", "FNMP.zip/FNMP/Magma Jet.full.jpg"); +// singleLinks.put("fnmp/105.jpg", "FNMP.zip/FNMP/Myr Enforcer.full.jpg"); +// singleLinks.put("fnmp/106.jpg", "FNMP.zip/FNMP/Kitchen Finks.full.jpg"); +// singleLinks.put("fnmp/107.jpg", "FNMP.zip/FNMP/Merrow Reejerey.full.jpg"); +// singleLinks.put("fnmp/108.jpg", "FNMP.zip/FNMP/Wren's Run Vanquisher.full.jpg"); +// singleLinks.put("fnmp/109.jpg", "FNMP.zip/FNMP/Mulldrifter.full.jpg"); +// singleLinks.put("fnmp/11.jpg", "FNMP.zip/FNMP/Llanowar Elves.full.jpg"); +// singleLinks.put("fnmp/110.jpg", "FNMP.zip/FNMP/Murderous Redcap.full.jpg"); +// singleLinks.put("fnmp/111.jpg", "FNMP.zip/FNMP/Lightning Greaves.full.jpg"); +// singleLinks.put("fnmp/112.jpg", "FNMP.zip/FNMP/Watchwolf.full.jpg"); +// singleLinks.put("fnmp/113.jpg", "FNMP.zip/FNMP/Browbeat.full.jpg"); +// singleLinks.put("fnmp/114.jpg", "FNMP.zip/FNMP/Oblivion Ring.full.jpg"); +// singleLinks.put("fnmp/115.jpg", "FNMP.zip/FNMP/Sakura-Tribe Elder.full.jpg"); +// singleLinks.put("fnmp/116.jpg", "FNMP.zip/FNMP/Tidehollow Sculler.full.jpg"); +// singleLinks.put("fnmp/117.jpg", "FNMP.zip/FNMP/Ghostly Prison.full.jpg"); +// singleLinks.put("fnmp/118.jpg", "FNMP.zip/FNMP/Ancient Ziggurat.full.jpg"); +// singleLinks.put("fnmp/119.jpg", "FNMP.zip/FNMP/Bloodbraid Elf.full.jpg"); +// singleLinks.put("fnmp/12.jpg", "FNMP.zip/FNMP/Swords to Plowshares.full.jpg"); +// singleLinks.put("fnmp/120.jpg", "FNMP.zip/FNMP/Cloudpost.full.jpg"); +// singleLinks.put("fnmp/121.jpg", "FNMP.zip/FNMP/Elvish Visionary.full.jpg"); +// singleLinks.put("fnmp/122.jpg", "FNMP.zip/FNMP/Anathemancer.full.jpg"); +// singleLinks.put("fnmp/123.jpg", "FNMP.zip/FNMP/Krosan Grip.full.jpg"); +// singleLinks.put("fnmp/124.jpg", "FNMP.zip/FNMP/Qasali Pridemage.full.jpg"); +// singleLinks.put("fnmp/125.jpg", "FNMP.zip/FNMP/Rift Bolt.full.jpg"); +// singleLinks.put("fnmp/126.jpg", "FNMP.zip/FNMP/Gatekeeper of Malakir.full.jpg"); +// singleLinks.put("fnmp/127.jpg", "FNMP.zip/FNMP/Wild Nacatl.full.jpg"); +// singleLinks.put("fnmp/128.jpg", "FNMP.zip/FNMP/Everflowing Chalice.full.jpg"); +// singleLinks.put("fnmp/129.jpg", "FNMP.zip/FNMP/Spellstutter Sprite.full.jpg"); +// singleLinks.put("fnmp/13.jpg", "FNMP.zip/FNMP/Ophidian.full.jpg"); +// singleLinks.put("fnmp/130.jpg", "FNMP.zip/FNMP/Wall of Omens.full.jpg"); +// singleLinks.put("fnmp/131.jpg", "FNMP.zip/FNMP/Artisan of Kozilek.full.jpg"); +// singleLinks.put("fnmp/132.jpg", "FNMP.zip/FNMP/Squadron Hawk.full.jpg"); +// singleLinks.put("fnmp/133.jpg", "FNMP.zip/FNMP/Rhox War Monk.full.jpg"); +// singleLinks.put("fnmp/134.jpg", "FNMP.zip/FNMP/Jace's Ingenuity.full.jpg"); +// singleLinks.put("fnmp/135.jpg", "FNMP.zip/FNMP/Cultivate.full.jpg"); +// singleLinks.put("fnmp/136.jpg", "FNMP.zip/FNMP/Teetering Peaks.full.jpg"); +// singleLinks.put("fnmp/137.jpg", "FNMP.zip/FNMP/Contagion Clasp.full.jpg"); +// singleLinks.put("fnmp/138.jpg", "FNMP.zip/FNMP/Go for the Throat.full.jpg"); +// singleLinks.put("fnmp/139.jpg", "FNMP.zip/FNMP/Savage Lands.full.jpg"); +// singleLinks.put("fnmp/14.jpg", "FNMP.zip/FNMP/Jackal Pup.full.jpg"); +// singleLinks.put("fnmp/140.jpg", "FNMP.zip/FNMP/Glistener Elf.full.jpg"); +// singleLinks.put("fnmp/141.jpg", "FNMP.zip/FNMP/Despise.full.jpg"); +// singleLinks.put("fnmp/142.jpg", "FNMP.zip/FNMP/Tectonic Edge.full.jpg"); +// singleLinks.put("fnmp/143.jpg", "FNMP.zip/FNMP/Dismember.full.jpg"); +// singleLinks.put("fnmp/144.jpg", "FNMP.zip/FNMP/Ancient Grudge.full.jpg"); +// singleLinks.put("fnmp/145.jpg", "FNMP.zip/FNMP/Acidic Slime.full.jpg"); +// singleLinks.put("fnmp/146.jpg", "FNMP.zip/FNMP/Forbidden Alchemy.full.jpg"); +// singleLinks.put("fnmp/147.jpg", "FNMP.zip/FNMP/Avacyn's Pilgrim.full.jpg"); +// singleLinks.put("fnmp/148.jpg", "FNMP.zip/FNMP/Lingering Souls.full.jpg"); +// singleLinks.put("fnmp/149.jpg", "FNMP.zip/FNMP/Evolving Wilds.full.jpg"); +// singleLinks.put("fnmp/15.jpg", "FNMP.zip/FNMP/Quirion Ranger.full.jpg"); +// singleLinks.put("fnmp/150.jpg", "FNMP.zip/FNMP/Pillar of Flame.full.jpg"); +// singleLinks.put("fnmp/151.jpg", "FNMP.zip/FNMP/Gitaxian Probe.full.jpg"); +// singleLinks.put("fnmp/152.jpg", "FNMP.zip/FNMP/Searing Spear.full.jpg"); +// singleLinks.put("fnmp/153.jpg", "FNMP.zip/FNMP/Reliquary Tower.full.jpg"); +// singleLinks.put("fnmp/154.jpg", "FNMP.zip/FNMP/Farseek.full.jpg"); +// singleLinks.put("fnmp/155.jpg", "FNMP.zip/FNMP/Call of the Conclave.full.jpg"); +// singleLinks.put("fnmp/156.jpg", "FNMP.zip/FNMP/Judge's Familiar.full.jpg"); +// singleLinks.put("fnmp/157.jpg", "FNMP.zip/FNMP/Izzet Charm.full.jpg"); +// singleLinks.put("fnmp/158.jpg", "FNMP.zip/FNMP/Rakdos Cackler.full.jpg"); +// singleLinks.put("fnmp/159.jpg", "FNMP.zip/FNMP/Dimir Charm.full.jpg"); +// singleLinks.put("fnmp/16.jpg", "FNMP.zip/FNMP/Carnophage.full.jpg"); +// singleLinks.put("fnmp/160.jpg", "FNMP.zip/FNMP/Experiment One.full.jpg"); +// singleLinks.put("fnmp/161.jpg", "FNMP.zip/FNMP/Ghor-Clan Rampager.full.jpg"); +// singleLinks.put("fnmp/162.jpg", "FNMP.zip/FNMP/Grisly Salvage.full.jpg"); +// singleLinks.put("fnmp/163.jpg", "FNMP.zip/FNMP/Sin Collector.full.jpg"); +// singleLinks.put("fnmp/164.jpg", "FNMP.zip/FNMP/Warleader's Helix.full.jpg"); +// singleLinks.put("fnmp/165.jpg", "FNMP.zip/FNMP/Elvish Mystic.full.jpg"); +// singleLinks.put("fnmp/166.jpg", "FNMP.zip/FNMP/Banisher Priest.full.jpg"); +// singleLinks.put("fnmp/167.jpg", "FNMP.zip/FNMP/Encroaching Wastes.full.jpg"); +// singleLinks.put("fnmp/168.jpg", "FNMP.zip/FNMP/Tormented Hero.full.jpg"); +// singleLinks.put("fnmp/169.jpg", "FNMP.zip/FNMP/Dissolve.full.jpg"); +// singleLinks.put("fnmp/17.jpg", "FNMP.zip/FNMP/Impulse.full.jpg"); +// singleLinks.put("fnmp/170.jpg", "FNMP.zip/FNMP/Magma Spray.full.jpg"); +// singleLinks.put("fnmp/171.jpg", "FNMP.zip/FNMP/Bile Blight.full.jpg"); +// singleLinks.put("fnmp/172.jpg", "FNMP.zip/FNMP/Banishing Light.full.jpg"); +// singleLinks.put("fnmp/173.jpg", "FNMP.zip/FNMP/Fanatic of Xenagos.full.jpg"); +// singleLinks.put("fnmp/174.jpg", "FNMP.zip/FNMP/Brain Maggot.full.jpg"); +// singleLinks.put("fnmp/175.jpg", "FNMP.zip/FNMP/Stoke the Flames.full.jpg"); +// singleLinks.put("fnmp/176.jpg", "FNMP.zip/FNMP/Frenzied Goblin.full.jpg"); +// singleLinks.put("fnmp/177.jpg", "FNMP.zip/FNMP/Disdainful Stroke.full.jpg"); +// singleLinks.put("fnmp/178.jpg", "FNMP.zip/FNMP/Hordeling Outburst.full.jpg"); +// singleLinks.put("fnmp/179.jpg", "FNMP.zip/FNMP/Suspension Field.full.jpg"); +// singleLinks.put("fnmp/18.jpg", "FNMP.zip/FNMP/Fireblast.full.jpg"); +// singleLinks.put("fnmp/180.jpg", "FNMP.zip/FNMP/Abzan Beastmaster.full.jpg"); +// singleLinks.put("fnmp/181.jpg", "FNMP.zip/FNMP/Frost Walker.full.jpg"); +// singleLinks.put("fnmp/182.jpg", "FNMP.zip/FNMP/Path to Exile.full.jpg"); +// singleLinks.put("fnmp/183.jpg", "FNMP.zip/FNMP/Serum Visions.full.jpg"); +// singleLinks.put("fnmp/184.jpg", "FNMP.zip/FNMP/Orator of Ojutai.full.jpg"); +// singleLinks.put("fnmp/186.jpg", "FNMP.zip/FNMP/Roast.full.jpg"); +// singleLinks.put("fnmp/187.jpg", "FNMP.zip/FNMP/Anticipate.full.jpg"); +// singleLinks.put("fnmp/188.jpg", "FNMP.zip/FNMP/Nissa's Pilgrimage.full.jpg"); +// singleLinks.put("fnmp/189.jpg", "FNMP.zip/FNMP/Clash of Wills.full.jpg"); +// singleLinks.put("fnmp/19.jpg", "FNMP.zip/FNMP/Soltari Priest.full.jpg"); +// singleLinks.put("fnmp/190.jpg", "FNMP.zip/FNMP/Smash to Smithereens.full.jpg"); +// singleLinks.put("fnmp/191.jpg", "FNMP.zip/FNMP/Blighted Fen.full.jpg"); +// singleLinks.put("fnmp/2.jpg", "FNMP.zip/FNMP/Terror.full.jpg"); +// singleLinks.put("fnmp/20.jpg", "FNMP.zip/FNMP/Albino Troll.full.jpg"); +// singleLinks.put("fnmp/21.jpg", "FNMP.zip/FNMP/Dissipate.full.jpg"); +// singleLinks.put("fnmp/22.jpg", "FNMP.zip/FNMP/Black Knight.full.jpg"); +// singleLinks.put("fnmp/23.jpg", "FNMP.zip/FNMP/Wall of Blossoms.full.jpg"); +// singleLinks.put("fnmp/24.jpg", "FNMP.zip/FNMP/Fireslinger.full.jpg"); +// singleLinks.put("fnmp/25.jpg", "FNMP.zip/FNMP/Drain Life.full.jpg"); +// singleLinks.put("fnmp/26.jpg", "FNMP.zip/FNMP/Aura of Silence.full.jpg"); +// singleLinks.put("fnmp/27.jpg", "FNMP.zip/FNMP/Forbid.full.jpg"); +// singleLinks.put("fnmp/28.jpg", "FNMP.zip/FNMP/Spike Feeder.full.jpg"); +// singleLinks.put("fnmp/29.jpg", "FNMP.zip/FNMP/Mogg Fanatic.full.jpg"); +// singleLinks.put("fnmp/3.jpg", "FNMP.zip/FNMP/Longbow Archer.full.jpg"); +// singleLinks.put("fnmp/30.jpg", "FNMP.zip/FNMP/White Knight.full.jpg"); +// singleLinks.put("fnmp/31.jpg", "FNMP.zip/FNMP/Disenchant.full.jpg"); +// singleLinks.put("fnmp/32.jpg", "FNMP.zip/FNMP/Bottle Gnomes.full.jpg"); +// singleLinks.put("fnmp/33.jpg", "FNMP.zip/FNMP/Muscle Sliver.full.jpg"); +// singleLinks.put("fnmp/34.jpg", "FNMP.zip/FNMP/Crystalline Sliver.full.jpg"); +// singleLinks.put("fnmp/35.jpg", "FNMP.zip/FNMP/Capsize.full.jpg"); +// singleLinks.put("fnmp/36.jpg", "FNMP.zip/FNMP/Priest of Titania.full.jpg"); +// singleLinks.put("fnmp/37.jpg", "FNMP.zip/FNMP/Goblin Bombardment.full.jpg"); +// singleLinks.put("fnmp/38.jpg", "FNMP.zip/FNMP/Scragnoth.full.jpg"); +// singleLinks.put("fnmp/39.jpg", "FNMP.zip/FNMP/Smother.full.jpg"); +// singleLinks.put("fnmp/4.jpg", "FNMP.zip/FNMP/Volcanic Geyser.full.jpg"); +// singleLinks.put("fnmp/40.jpg", "FNMP.zip/FNMP/Whipcorder.full.jpg"); +// singleLinks.put("fnmp/41.jpg", "FNMP.zip/FNMP/Sparksmith.full.jpg"); +// singleLinks.put("fnmp/42.jpg", "FNMP.zip/FNMP/Krosan Tusker.full.jpg"); +// singleLinks.put("fnmp/43.jpg", "FNMP.zip/FNMP/Withered Wretch.full.jpg"); +// singleLinks.put("fnmp/44.jpg", "FNMP.zip/FNMP/Willbender.full.jpg"); +// singleLinks.put("fnmp/45.jpg", "FNMP.zip/FNMP/Slice and Dice.full.jpg"); +// singleLinks.put("fnmp/46.jpg", "FNMP.zip/FNMP/Silver Knight.full.jpg"); +// singleLinks.put("fnmp/47.jpg", "FNMP.zip/FNMP/Krosan Warchief.full.jpg"); +// singleLinks.put("fnmp/48.jpg", "FNMP.zip/FNMP/Lightning Rift.full.jpg"); +// singleLinks.put("fnmp/49.jpg", "FNMP.zip/FNMP/Carrion Feeder.full.jpg"); +// singleLinks.put("fnmp/5.jpg", "FNMP.zip/FNMP/Mind Warp.full.jpg"); +// singleLinks.put("fnmp/50.jpg", "FNMP.zip/FNMP/Treetop Village.full.jpg"); +// singleLinks.put("fnmp/51.jpg", "FNMP.zip/FNMP/Accumulated Knowledge.full.jpg"); +// singleLinks.put("fnmp/52.jpg", "FNMP.zip/FNMP/Avalanche Riders.full.jpg"); +// singleLinks.put("fnmp/53.jpg", "FNMP.zip/FNMP/Reanimate.full.jpg"); +// singleLinks.put("fnmp/54.jpg", "FNMP.zip/FNMP/Mother of Runes.full.jpg"); +// singleLinks.put("fnmp/55.jpg", "FNMP.zip/FNMP/Brainstorm.full.jpg"); +// singleLinks.put("fnmp/56.jpg", "FNMP.zip/FNMP/Rancor.full.jpg"); +// singleLinks.put("fnmp/57.jpg", "FNMP.zip/FNMP/Seal of Cleansing.full.jpg"); +// singleLinks.put("fnmp/58.jpg", "FNMP.zip/FNMP/Flametongue Kavu.full.jpg"); +// singleLinks.put("fnmp/59.jpg", "FNMP.zip/FNMP/Blastoderm.full.jpg"); +// singleLinks.put("fnmp/6.jpg", "FNMP.zip/FNMP/Shock.full.jpg"); +// singleLinks.put("fnmp/60.jpg", "FNMP.zip/FNMP/Cabal Therapy.full.jpg"); +// singleLinks.put("fnmp/61.jpg", "FNMP.zip/FNMP/Fact or Fiction.full.jpg"); +// singleLinks.put("fnmp/62.jpg", "FNMP.zip/FNMP/Juggernaut.full.jpg"); +// singleLinks.put("fnmp/63.jpg", "FNMP.zip/FNMP/Circle of Protection Red.full.jpg"); +// singleLinks.put("fnmp/64.jpg", "FNMP.zip/FNMP/Kird Ape.full.jpg"); +// singleLinks.put("fnmp/65.jpg", "FNMP.zip/FNMP/Duress.full.jpg"); +// singleLinks.put("fnmp/66.jpg", "FNMP.zip/FNMP/Counterspell.full.jpg"); +// singleLinks.put("fnmp/67.jpg", "FNMP.zip/FNMP/Icy Manipulator.full.jpg"); +// singleLinks.put("fnmp/68.jpg", "FNMP.zip/FNMP/Elves of Deep Shadow.full.jpg"); +// singleLinks.put("fnmp/69.jpg", "FNMP.zip/FNMP/Armadillo Cloak.full.jpg"); +// singleLinks.put("fnmp/7.jpg", "FNMP.zip/FNMP/Staunch Defenders.full.jpg"); +// singleLinks.put("fnmp/70.jpg", "FNMP.zip/FNMP/Terminate.full.jpg"); +// singleLinks.put("fnmp/71.jpg", "FNMP.zip/FNMP/Lobotomy.full.jpg"); +// singleLinks.put("fnmp/72.jpg", "FNMP.zip/FNMP/Goblin Warchief.full.jpg"); +// singleLinks.put("fnmp/73.jpg", "FNMP.zip/FNMP/Wild Mongrel.full.jpg"); +// singleLinks.put("fnmp/74.jpg", "FNMP.zip/FNMP/Chainer's Edict.full.jpg"); +// singleLinks.put("fnmp/75.jpg", "FNMP.zip/FNMP/Circular Logic.full.jpg"); +// singleLinks.put("fnmp/76.jpg", "FNMP.zip/FNMP/Astral Slide.full.jpg"); +// singleLinks.put("fnmp/77.jpg", "FNMP.zip/FNMP/Arrogant Wurm.full.jpg"); +// singleLinks.put("fnmp/78a.jpg", "FNMP.zip/FNMP/Life (Life/Death.full.jpg"); +// singleLinks.put("fnmp/78b.jpg", "FNMP.zip/FNMP/Death (Life/Death).full.jpg"); +// singleLinks.put("fnmp/79a.jpg", "FNMP.zip/FNMP/Fire (Fire/Ice).full.jpg"); +// singleLinks.put("fnmp/79b.jpg", "FNMP.zip/FNMP/Ice (Fire/Ice).full.jpg"); +// singleLinks.put("fnmp/8.jpg", "FNMP.zip/FNMP/Giant Growth.full.jpg"); +// singleLinks.put("fnmp/80.jpg", "FNMP.zip/FNMP/Firebolt.full.jpg"); +// singleLinks.put("fnmp/81.jpg", "FNMP.zip/FNMP/Deep Analysis.full.jpg"); +// singleLinks.put("fnmp/82.jpg", "FNMP.zip/FNMP/Gerrard's Verdict.full.jpg"); +// singleLinks.put("fnmp/83.jpg", "FNMP.zip/FNMP/Basking Rootwalla.full.jpg"); +// singleLinks.put("fnmp/84.jpg", "FNMP.zip/FNMP/Wonder.full.jpg"); +// singleLinks.put("fnmp/85.jpg", "FNMP.zip/FNMP/Goblin Legionnaire.full.jpg"); +// singleLinks.put("fnmp/86.jpg", "FNMP.zip/FNMP/Engineered Plague.full.jpg"); +// singleLinks.put("fnmp/87.jpg", "FNMP.zip/FNMP/Goblin Ringleader.full.jpg"); +// singleLinks.put("fnmp/88.jpg", "FNMP.zip/FNMP/Wing Shards.full.jpg"); +// singleLinks.put("fnmp/89.jpg", "FNMP.zip/FNMP/Cabal Coffers.full.jpg"); +// singleLinks.put("fnmp/9.jpg", "FNMP.zip/FNMP/Prodigal Sorcerer.full.jpg"); +// singleLinks.put("fnmp/90.jpg", "FNMP.zip/FNMP/Roar of the Wurm.full.jpg"); +// singleLinks.put("fnmp/91.jpg", "FNMP.zip/FNMP/Force Spike.full.jpg"); +// singleLinks.put("fnmp/92.jpg", "FNMP.zip/FNMP/Remand.full.jpg"); +// singleLinks.put("fnmp/93.jpg", "FNMP.zip/FNMP/Tormod's Crypt.full.jpg"); +// singleLinks.put("fnmp/94.jpg", "FNMP.zip/FNMP/Eternal Witness.full.jpg"); +// singleLinks.put("fnmp/95.jpg", "FNMP.zip/FNMP/Tendrils of Agony.full.jpg"); +// singleLinks.put("fnmp/96.jpg", "FNMP.zip/FNMP/Pendelhaven.full.jpg"); +// singleLinks.put("fnmp/97.jpg", "FNMP.zip/FNMP/Resurrection.full.jpg"); +// singleLinks.put("fnmp/98.jpg", "FNMP.zip/FNMP/Wall of Roots.full.jpg"); +// singleLinks.put("fnmp/99.jpg", "FNMP.zip/FNMP/Desert.full.jpg"); +// singleLinks.put("gpx/1.jpg", "GPX.zip/GPX/Spiritmonger.full.jpg"); +// singleLinks.put("gpx/10.jpg", "GPX.zip/GPX/Batterskull.full.jpg"); +// singleLinks.put("gpx/11.jpg", "GPX.zip/GPX/Griselbrand.full.jpg"); +// singleLinks.put("gpx/12.jpg", "GPX.zip/GPX/Stoneforge Mystic.full.jpg"); +// singleLinks.put("gpx/2.jpg", "GPX.zip/GPX/Call of the Herd.full.jpg"); +// singleLinks.put("gpx/3.jpg", "GPX.zip/GPX/Chrome Mox.full.jpg"); +// singleLinks.put("gpx/4.jpg", "GPX.zip/GPX/Umezawa's Jitte.full.jpg"); +// singleLinks.put("gpx/5.jpg", "GPX.zip/GPX/Maelstrom Pulse.full.jpg"); +// singleLinks.put("gpx/6.jpg", "GPX.zip/GPX/Goblin Guide.full.jpg"); +// singleLinks.put("gpx/7.jpg", "GPX.zip/GPX/Lotus Cobra.full.jpg"); +// singleLinks.put("gpx/8.jpg", "GPX.zip/GPX/Primeval Titan.full.jpg"); +// singleLinks.put("gpx/9.jpg", "GPX.zip/GPX/All Is Dust.full.jpg"); +// singleLinks.put("grc/1.jpg", "GRC.zip/GRC/Wood Elves.full.jpg"); +// singleLinks.put("grc/10.jpg", "GRC.zip/GRC/Mogg Fanatic.full.jpg"); +// singleLinks.put("grc/11.jpg", "GRC.zip/GRC/Mind Stone.full.jpg"); +// singleLinks.put("grc/12.jpg", "GRC.zip/GRC/Dauntless Dourbark.full.jpg"); +// singleLinks.put("grc/13.jpg", "GRC.zip/GRC/Lava Axe.full.jpg"); +// singleLinks.put("grc/14.jpg", "GRC.zip/GRC/Cenn's Tactician.full.jpg"); +// singleLinks.put("grc/15.jpg", "GRC.zip/GRC/Oona's Blackguard.full.jpg"); +// singleLinks.put("grc/16.jpg", "GRC.zip/GRC/Gravedigger.full.jpg"); +// singleLinks.put("grc/17.jpg", "GRC.zip/GRC/Boggart Ram-Gang.full.jpg"); +// singleLinks.put("grc/18.jpg", "GRC.zip/GRC/Wilt-Leaf Cavaliers.full.jpg"); +// singleLinks.put("grc/19.jpg", "GRC.zip/GRC/Duergar Hedge-Mage.full.jpg"); +// singleLinks.put("grc/2.jpg", "GRC.zip/GRC/Icatian Javelineers.full.jpg"); +// singleLinks.put("grc/20.jpg", "GRC.zip/GRC/Selkie Hedge-Mage.full.jpg"); +// singleLinks.put("grc/21.jpg", "GRC.zip/GRC/Sprouting Thrinax.full.jpg"); +// singleLinks.put("grc/22.jpg", "GRC.zip/GRC/Woolly Thoctar.full.jpg"); +// singleLinks.put("grc/24.jpg", "GRC.zip/GRC/Path to Exile.full.jpg"); +// singleLinks.put("grc/25.jpg", "GRC.zip/GRC/Hellspark Elemental.full.jpg"); +// singleLinks.put("grc/26.jpg", "GRC.zip/GRC/Marisi's Twinclaws.full.jpg"); +// singleLinks.put("grc/27.jpg", "GRC.zip/GRC/Slave of Bolas.full.jpg"); +// singleLinks.put("grc/28.jpg", "GRC.zip/GRC/Mycoid Shepherd.full.jpg"); +// singleLinks.put("grc/29.jpg", "GRC.zip/GRC/Naya Sojourners.full.jpg"); +// singleLinks.put("grc/3.jpg", "GRC.zip/GRC/Fiery Temper.full.jpg"); +// singleLinks.put("grc/30.jpg", "GRC.zip/GRC/Mind Control.full.jpg"); +// singleLinks.put("grc/31.jpg", "GRC.zip/GRC/Rise from the Grave.full.jpg"); +// singleLinks.put("grc/32.jpg", "GRC.zip/GRC/Kor Duelist.full.jpg"); +// singleLinks.put("grc/33.jpg", "GRC.zip/GRC/Vampire Nighthawk.full.jpg"); +// singleLinks.put("grc/34.jpg", "GRC.zip/GRC/Nissa's Chosen.full.jpg"); +// singleLinks.put("grc/35.jpg", "GRC.zip/GRC/Emeria Angel.full.jpg"); +// singleLinks.put("grc/36.jpg", "GRC.zip/GRC/Kor Firewalker.full.jpg"); +// singleLinks.put("grc/37.jpg", "GRC.zip/GRC/Leatherback Baloth.full.jpg"); +// singleLinks.put("grc/38.jpg", "GRC.zip/GRC/Hada Freeblade.full.jpg"); +// singleLinks.put("grc/39.jpg", "GRC.zip/GRC/Kalastria Highborn.full.jpg"); +// singleLinks.put("grc/4.jpg", "GRC.zip/GRC/Boomerang.full.jpg"); +// singleLinks.put("grc/40.jpg", "GRC.zip/GRC/Syphon Mind.full.jpg"); +// singleLinks.put("grc/46.jpg", "GRC.zip/GRC/Pathrazer of Ulamog.full.jpg"); +// singleLinks.put("grc/47.jpg", "GRC.zip/GRC/Curse of Wizardry.full.jpg"); +// singleLinks.put("grc/48.jpg", "GRC.zip/GRC/Staggershock.full.jpg"); +// singleLinks.put("grc/49.jpg", "GRC.zip/GRC/Deathless Angel.full.jpg"); +// singleLinks.put("grc/5.jpg", "GRC.zip/GRC/Calciderm.full.jpg"); +// singleLinks.put("grc/50.jpg", "GRC.zip/GRC/Fling.full.jpg"); +// singleLinks.put("grc/51.jpg", "GRC.zip/GRC/Sylvan Ranger.full.jpg"); +// singleLinks.put("grc/59.jpg", "GRC.zip/GRC/Plague Stinger.full.jpg"); +// singleLinks.put("grc/6.jpg", "GRC.zip/GRC/Reckless Wurm.full.jpg"); +// singleLinks.put("grc/60.jpg", "GRC.zip/GRC/Golem's Heart.full.jpg"); +// singleLinks.put("grc/63.jpg", "GRC.zip/GRC/Skinrender.full.jpg"); +// singleLinks.put("grc/64.jpg", "GRC.zip/GRC/Master's Call.full.jpg"); +// singleLinks.put("grc/65.jpg", "GRC.zip/GRC/Plague Myr.full.jpg"); +// singleLinks.put("grc/66.jpg", "GRC.zip/GRC/Signal Pest.full.jpg"); +// singleLinks.put("grc/69.jpg", "GRC.zip/GRC/Fling.full.jpg"); +// singleLinks.put("grc/7.jpg", "GRC.zip/GRC/Yixlid Jailer.full.jpg"); +// singleLinks.put("grc/70.jpg", "GRC.zip/GRC/Sylvan Ranger.full.jpg"); +// singleLinks.put("grc/71.jpg", "GRC.zip/GRC/Vault Skirge.full.jpg"); +// singleLinks.put("grc/72.jpg", "GRC.zip/GRC/Maul Splicer.full.jpg"); +// singleLinks.put("grc/73.jpg", "GRC.zip/GRC/Shrine of Burning Rage.full.jpg"); +// singleLinks.put("grc/76.jpg", "GRC.zip/GRC/Tormented Soul.full.jpg"); +// singleLinks.put("grc/77.jpg", "GRC.zip/GRC/Auramancer.full.jpg"); +// singleLinks.put("grc/78.jpg", "GRC.zip/GRC/Circle of Flame.full.jpg"); +// singleLinks.put("grc/79.jpg", "GRC.zip/GRC/Gather the Townsfolk.full.jpg"); +// singleLinks.put("grc/8.jpg", "GRC.zip/GRC/Zoetic Cavern.full.jpg"); +// singleLinks.put("grc/80.jpg", "GRC.zip/GRC/Curse of the Bloody Tome.full.jpg"); +// singleLinks.put("grc/81.jpg", "GRC.zip/GRC/Curse of Thirst.full.jpg"); +// singleLinks.put("grc/82.jpg", "GRC.zip/GRC/Nearheath Stalker.full.jpg"); +// singleLinks.put("grc/83.jpg", "GRC.zip/GRC/Bloodcrazed Neonate.full.jpg"); +// singleLinks.put("grc/84.jpg", "GRC.zip/GRC/Boneyard Wurm.full.jpg"); +// singleLinks.put("grc/9.jpg", "GRC.zip/GRC/Llanowar Elves.full.jpg"); +// singleLinks.put("jr/1.jpg", "JP.zip/JP/Lightning Bolt.full.jpg"); +// singleLinks.put("jr/10.jpg", "JP.zip/JP/Tradewind Rider.full.jpg"); +// singleLinks.put("jr/100.jpg", "JP.zip/JP/Feldon of the Third Path.full.jpg"); +// singleLinks.put("jr/101.jpg", "JP.zip/JP/Wasteland.full.jpg"); +// singleLinks.put("jr/103.jpg", "JP.zip/JP/Mana Drain.full.jpg"); +// singleLinks.put("jr/105.jpg", "JP.zip/JP/Command Beacon.full.jpg"); +// singleLinks.put("jr/11.jpg", "JP.zip/JP/Intuition.full.jpg"); +// singleLinks.put("jr/12.jpg", "JP.zip/JP/Argothian Enchantress.full.jpg"); +// singleLinks.put("jr/13.jpg", "JP.zip/JP/Living Death.full.jpg"); +// singleLinks.put("jr/14.jpg", "JP.zip/JP/Armageddon.full.jpg"); +// singleLinks.put("jr/15.jpg", "JP.zip/JP/Balance.full.jpg"); +// singleLinks.put("jr/16.jpg", "JP.zip/JP/Time Warp.full.jpg"); +// singleLinks.put("jr/17.jpg", "JP.zip/JP/Phyrexian Negator.full.jpg"); +// singleLinks.put("jr/18.jpg", "JP.zip/JP/Deranged Hermit.full.jpg"); +// singleLinks.put("jr/19.jpg", "JP.zip/JP/Hermit Druid.full.jpg"); +// singleLinks.put("jr/2.jpg", "JP.zip/JP/Stroke of Genius.full.jpg"); +// singleLinks.put("jr/20.jpg", "JP.zip/JP/Gemstone Mine.full.jpg"); +// singleLinks.put("jr/21.jpg", "JP.zip/JP/Regrowth.full.jpg"); +// singleLinks.put("jr/22.jpg", "JP.zip/JP/Sol Ring.full.jpg"); +// singleLinks.put("jr/23.jpg", "JP.zip/JP/Mishra's Factory.full.jpg"); +// singleLinks.put("jr/24.jpg", "JP.zip/JP/Exalted Angel.full.jpg"); +// singleLinks.put("jr/25.jpg", "JP.zip/JP/Grim Lavamancer.full.jpg"); +// singleLinks.put("jr/26.jpg", "JP.zip/JP/Meddling Mage.full.jpg"); +// singleLinks.put("jr/27.jpg", "JP.zip/JP/Pernicious Deed.full.jpg"); +// singleLinks.put("jr/28.jpg", "JP.zip/JP/Ravenous Baloth.full.jpg"); +// singleLinks.put("jr/29.jpg", "JP.zip/JP/Cunning Wish.full.jpg"); +// singleLinks.put("jr/3.jpg", "JP.zip/JP/Gaea's Cradle.full.jpg"); +// singleLinks.put("jr/30.jpg", "JP.zip/JP/Yawgmoth's Will.full.jpg"); +// singleLinks.put("jr/31.jpg", "JP.zip/JP/Vindicate.full.jpg"); +// singleLinks.put("jr/32.jpg", "JP.zip/JP/Decree of Justice.full.jpg"); +// singleLinks.put("jr/33.jpg", "JP.zip/JP/Orim's Chant.full.jpg"); +// singleLinks.put("jr/34.jpg", "JP.zip/JP/Mind's Desire.full.jpg"); +// singleLinks.put("jr/35.jpg", "JP.zip/JP/Demonic Tutor.full.jpg"); +// singleLinks.put("jr/36.jpg", "JP.zip/JP/Goblin Piledriver.full.jpg"); +// singleLinks.put("jr/37.jpg", "JP.zip/JP/Living Wish.full.jpg"); +// singleLinks.put("jr/38.jpg", "JP.zip/JP/Dark Ritual.full.jpg"); +// singleLinks.put("jr/39.jpg", "JP.zip/JP/Maze of Ith.full.jpg"); +// singleLinks.put("jr/4.jpg", "JP.zip/JP/Memory Lapse.full.jpg"); +// singleLinks.put("jr/40.jpg", "JP.zip/JP/Stifle.full.jpg"); +// singleLinks.put("jr/41.jpg", "JP.zip/JP/Survival of the Fittest.full.jpg"); +// singleLinks.put("jr/42.jpg", "JP.zip/JP/Burning Wish.full.jpg"); +// singleLinks.put("jr/43.jpg", "JP.zip/JP/Bloodstained Mire.full.jpg"); +// singleLinks.put("jr/44.jpg", "JP.zip/JP/Flooded Strand.full.jpg"); +// singleLinks.put("jr/45.jpg", "JP.zip/JP/Polluted Delta.full.jpg"); +// singleLinks.put("jr/46.jpg", "JP.zip/JP/Windswept Heath.full.jpg"); +// singleLinks.put("jr/47.jpg", "JP.zip/JP/Wooded Foothills.full.jpg"); +// singleLinks.put("jr/48.jpg", "JP.zip/JP/Sinkhole.full.jpg"); +// singleLinks.put("jr/49.jpg", "JP.zip/JP/Natural Order.full.jpg"); +// singleLinks.put("jr/5.jpg", "JP.zip/JP/Counterspell.full.jpg"); +// singleLinks.put("jr/50.jpg", "JP.zip/JP/Phyrexian Dreadnought.full.jpg"); +// singleLinks.put("jr/51.jpg", "JP.zip/JP/Thawing Glaciers.full.jpg"); +// singleLinks.put("jr/52.jpg", "JP.zip/JP/Land Tax.full.jpg"); +// singleLinks.put("jr/53.jpg", "JP.zip/JP/Morphling.full.jpg"); +// singleLinks.put("jr/54.jpg", "JP.zip/JP/Wheel of Fortune.full.jpg"); +// singleLinks.put("jr/55.jpg", "JP.zip/JP/Wasteland.full.jpg"); +// singleLinks.put("jr/56.jpg", "JP.zip/JP/Entomb.full.jpg"); +// singleLinks.put("jr/57.jpg", "JP.zip/JP/Sword of Fire and Ice.full.jpg"); +// singleLinks.put("jr/58.jpg", "JP.zip/JP/Vendilion Clique.full.jpg"); +// singleLinks.put("jr/59.jpg", "JP.zip/JP/Bitterblossom.full.jpg"); +// singleLinks.put("jr/6.jpg", "JP.zip/JP/Vampiric Tutor.full.jpg"); +// singleLinks.put("jr/60.jpg", "JP.zip/JP/Mana Crypt.full.jpg"); +// singleLinks.put("jr/61.jpg", "JP.zip/JP/Dark Confidant.full.jpg"); +// singleLinks.put("jr/62.jpg", "JP.zip/JP/Doubling Season.full.jpg"); +// singleLinks.put("jr/63.jpg", "JP.zip/JP/Goblin Welder.full.jpg"); +// singleLinks.put("jr/64.jpg", "JP.zip/JP/Xiahou Dun, the One-Eyed.full.jpg"); +// singleLinks.put("jr/65.jpg", "JP.zip/JP/Flusterstorm.full.jpg"); +// singleLinks.put("jr/66.jpg", "JP.zip/JP/Noble Hierarch.full.jpg"); +// singleLinks.put("jr/67.jpg", "JP.zip/JP/Karmic Guide.full.jpg"); +// singleLinks.put("jr/68.jpg", "JP.zip/JP/Sneak Attack.full.jpg"); +// singleLinks.put("jr/69.jpg", "JP.zip/JP/Karakas.full.jpg"); +// singleLinks.put("jr/7.jpg", "JP.zip/JP/Ball Lightning.full.jpg"); +// singleLinks.put("jr/70.jpg", "JP.zip/JP/Sword of Light and Shadow.full.jpg"); +// singleLinks.put("jr/71.jpg", "JP.zip/JP/Command Tower.full.jpg"); +// singleLinks.put("jr/72.jpg", "JP.zip/JP/Swords to Plowshares.full.jpg"); +// singleLinks.put("jr/73.jpg", "JP.zip/JP/Bribery.full.jpg"); +// singleLinks.put("jr/74.jpg", "JP.zip/JP/Imperial Recruiter.full.jpg"); +// singleLinks.put("jr/75.jpg", "JP.zip/JP/Crucible of Worlds.full.jpg"); +// singleLinks.put("jr/76.jpg", "JP.zip/JP/Overwhelming Forces.full.jpg"); +// singleLinks.put("jr/77.jpg", "JP.zip/JP/Show and Tell.full.jpg"); +// singleLinks.put("jr/78.jpg", "JP.zip/JP/Vindicate.full.jpg"); +// singleLinks.put("jr/79.jpg", "JP.zip/JP/Genesis.full.jpg"); +// singleLinks.put("jr/8.jpg", "JP.zip/JP/Oath of Druids.full.jpg"); +// singleLinks.put("jr/80.jpg", "JP.zip/JP/Karador, Ghost Chieftain.full.jpg"); +// singleLinks.put("jr/81.jpg", "JP.zip/JP/Greater Good.full.jpg"); +// singleLinks.put("jr/82.jpg", "JP.zip/JP/Riku of Two Reflections.full.jpg"); +// singleLinks.put("jr/83.jpg", "JP.zip/JP/Force of Will.full.jpg"); +// singleLinks.put("jr/84.jpg", "JP.zip/JP/Hanna, Ship's Navigator.full.jpg"); +// singleLinks.put("jr/85.jpg", "JP.zip/JP/Sword of Feast and Famine.full.jpg"); +// singleLinks.put("jr/86.jpg", "JP.zip/JP/Nekusar, the Mindrazer.full.jpg"); +// singleLinks.put("jr/87.jpg", "JP.zip/JP/Elesh Norn, Grand Cenobite.full.jpg"); +// singleLinks.put("jr/88.jpg", "JP.zip/JP/Oloro, Ageless Ascetic.full.jpg"); +// singleLinks.put("jr/89.jpg", "JP.zip/JP/Plains.full.jpg"); +// singleLinks.put("jr/9.jpg", "JP.zip/JP/Hammer of Bogardan.full.jpg"); +// singleLinks.put("jr/90.jpg", "JP.zip/JP/Island.full.jpg"); +// singleLinks.put("jr/91.jpg", "JP.zip/JP/Swamp.full.jpg"); +// singleLinks.put("jr/92.jpg", "JP.zip/JP/Mountain.full.jpg"); +// singleLinks.put("jr/93.jpg", "JP.zip/JP/Forest.full.jpg"); +// singleLinks.put("jr/97.jpg", "JP.zip/JP/Ravages of War.full.jpg"); +// singleLinks.put("jr/98.jpg", "JP.zip/JP/Damnation.full.jpg"); +// singleLinks.put("jr/99.jpg", "JP.zip/JP/Dualcaster Mage.full.jpg"); +// singleLinks.put("mbp/1.jpg", "MBP.zip/MBP/Arena.full.jpg"); +// singleLinks.put("mbp/10.jpg", "MBP.zip/MBP/Lightning Hounds.full.jpg"); +// singleLinks.put("mbp/100.jpg", "MBP.zip/MBP/Jace, the Living Guildpact.full.jpg"); +// singleLinks.put("mbp/101.jpg", "MBP.zip/MBP/Liliana Vess.full.jpg"); +// singleLinks.put("mbp/102.jpg", "MBP.zip/MBP/Chandra, Pyromaster.full.jpg"); +// singleLinks.put("mbp/103.jpg", "MBP.zip/MBP/Nissa, Worldwaker.full.jpg"); +// singleLinks.put("mbp/104.jpg", "MBP.zip/MBP/Garruk, Apex Predator.full.jpg"); +// singleLinks.put("mbp/105.jpg", "MBP.zip/MBP/Shamanic Revelation.full.jpg"); +// singleLinks.put("mbp/106.jpg", "MBP.zip/MBP/Ojutai's Command.full.jpg"); +// singleLinks.put("mbp/107.jpg", "MBP.zip/MBP/Dragonscale General.full.jpg"); +// singleLinks.put("mbp/108.jpg", "MBP.zip/MBP/Sage-Eye Avengers.full.jpg"); +// singleLinks.put("mbp/109.jpg", "MBP.zip/MBP/Archfiend of Depravity.full.jpg"); +// singleLinks.put("mbp/11.jpg", "MBP.zip/MBP/Spined Wurm.full.jpg"); +// singleLinks.put("mbp/110.jpg", "MBP.zip/MBP/Flamerush Rider.full.jpg"); +// singleLinks.put("mbp/111.jpg", "MBP.zip/MBP/Temur War Shaman.full.jpg"); +// singleLinks.put("mbp/112.jpg", "MBP.zip/MBP/Arashin Sovereign.full.jpg"); +// singleLinks.put("mbp/113.jpg", "MBP.zip/MBP/Pristine Skywise.full.jpg"); +// singleLinks.put("mbp/114.jpg", "MBP.zip/MBP/Necromaster Dragon.full.jpg"); +// singleLinks.put("mbp/115.jpg", "MBP.zip/MBP/Boltwing Marauder.full.jpg"); +// singleLinks.put("mbp/116.jpg", "MBP.zip/MBP/Harbinger of the Hunt.full.jpg"); +// singleLinks.put("mbp/117.jpg", "MBP.zip/MBP/Sultai Charm.full.jpg"); +// singleLinks.put("mbp/118.jpg", "MBP.zip/MBP/Aeronaut Tinkerer.full.jpg"); +// singleLinks.put("mbp/119.jpg", "MBP.zip/MBP/Dragon Fodder.full.jpg"); +// singleLinks.put("mbp/12.jpg", "MBP.zip/MBP/Warmonger.full.jpg"); +// singleLinks.put("mbp/120.jpg", "MBP.zip/MBP/Dragonlord's Servant.full.jpg"); +// singleLinks.put("mbp/121.jpg", "MBP.zip/MBP/Evolving Wilds.full.jpg"); +// singleLinks.put("mbp/122.jpg", "MBP.zip/MBP/Foe-Razer Regent.full.jpg"); +// singleLinks.put("mbp/123.jpg", "MBP.zip/MBP/Relic Seeker.full.jpg"); +// singleLinks.put("mbp/124.jpg", "MBP.zip/MBP/Alhammarret, High Arbiter.full.jpg"); +// singleLinks.put("mbp/125.jpg", "MBP.zip/MBP/Dwynen, Gilt-Leaf Daen.full.jpg"); +// singleLinks.put("mbp/126.jpg", "MBP.zip/MBP/Hixus, Prison Warden.full.jpg"); +// singleLinks.put("mbp/127.jpg", "MBP.zip/MBP/Kothophed, Soul Hoarder.full.jpg"); +// singleLinks.put("mbp/128.jpg", "MBP.zip/MBP/Pia and Kiran Nalaar.full.jpg"); +// singleLinks.put("mbp/129.jpg", "MBP.zip/MBP/Honored Hierarch.full.jpg"); +// singleLinks.put("mbp/13.jpg", "MBP.zip/MBP/Silver Drake.full.jpg"); +// singleLinks.put("mbp/130.jpg", "MBP.zip/MBP/Seeker of the Way.full.jpg"); +// singleLinks.put("mbp/131.jpg", "MBP.zip/MBP/Valorous Stance.full.jpg"); +// singleLinks.put("mbp/132.jpg", "MBP.zip/MBP/Dromoka, the Eternal.full.jpg"); +// singleLinks.put("mbp/133.jpg", "MBP.zip/MBP/Siege Rhino.full.jpg"); +// singleLinks.put("mbp/134.jpg", "MBP.zip/MBP/Sandsteppe Citadel.full.jpg"); +// singleLinks.put("mbp/135.jpg", "MBP.zip/MBP/Ruinous Path.full.jpg"); +// singleLinks.put("mbp/136.jpg", "MBP.zip/MBP/Hero of Goma Fada.full.jpg"); +// singleLinks.put("mbp/137.jpg", "MBP.zip/MBP/Drowner of Hope.full.jpg"); +// singleLinks.put("mbp/138.jpg", "MBP.zip/MBP/Defiant Bloodlord.full.jpg"); +// singleLinks.put("mbp/139.jpg", "MBP.zip/MBP/Barrage Tyrant.full.jpg"); +// singleLinks.put("mbp/14.jpg", "MBP.zip/MBP/Phyrexian Rager.full.jpg"); +// singleLinks.put("mbp/140.jpg", "MBP.zip/MBP/Oran-Rief Hydra.full.jpg"); +// singleLinks.put("mbp/141.jpg", "MBP.zip/MBP/Scythe Leopard.full.jpg"); +// singleLinks.put("mbp/142.jpg", "MBP.zip/MBP/Genesis Hydra.full.jpg"); +// singleLinks.put("mbp/143.jpg", "MBP.zip/MBP/Munda's Vanguard.full.jpg"); +// singleLinks.put("mbp/144.jpg", "MBP.zip/MBP/Deepfathom Skulker.full.jpg"); +// singleLinks.put("mbp/145.jpg", "MBP.zip/MBP/Dread Defiler.full.jpg"); +// singleLinks.put("mbp/146.jpg", "MBP.zip/MBP/Tyrant of Valakut.full.jpg"); +// singleLinks.put("mbp/147.jpg", "MBP.zip/MBP/Gladehart Cavalry.full.jpg"); +// singleLinks.put("mbp/148.jpg", "MBP.zip/MBP/Goblin Dark-Dwellers.full.jpg"); +// singleLinks.put("mbp/15.jpg", "MBP.zip/MBP/Jace Beleren.full.jpg"); +// singleLinks.put("mbp/16.jpg", "MBP.zip/MBP/Garruk Wildspeaker.full.jpg"); +// singleLinks.put("mbp/17.jpg", "MBP.zip/MBP/Brion Stoutarm.full.jpg"); +// singleLinks.put("mbp/18.jpg", "MBP.zip/MBP/Jaya Ballard, Task Mage.full.jpg"); +// singleLinks.put("mbp/19.jpg", "MBP.zip/MBP/Broodmate Dragon.full.jpg"); +// singleLinks.put("mbp/2.jpg", "MBP.zip/MBP/Sewers of Estark.full.jpg"); +// singleLinks.put("mbp/20.jpg", "MBP.zip/MBP/Honor of the Pure.full.jpg"); +// singleLinks.put("mbp/21.jpg", "MBP.zip/MBP/Steward of Valeron.full.jpg"); +// singleLinks.put("mbp/22.jpg", "MBP.zip/MBP/Day of Judgment.full.jpg"); +// singleLinks.put("mbp/23.jpg", "MBP.zip/MBP/Celestial Colonnade.full.jpg"); +// singleLinks.put("mbp/24.jpg", "MBP.zip/MBP/Retaliator Griffin.full.jpg"); +// singleLinks.put("mbp/25.jpg", "MBP.zip/MBP/Kor Skyfisher.full.jpg"); +// singleLinks.put("mbp/26.jpg", "MBP.zip/MBP/Guul Draz Assassin.full.jpg"); +// singleLinks.put("mbp/27.jpg", "MBP.zip/MBP/Nissa Revane.full.jpg"); +// singleLinks.put("mbp/28.jpg", "MBP.zip/MBP/Birds of Paradise.full.jpg"); +// singleLinks.put("mbp/29.jpg", "MBP.zip/MBP/Memoricide.full.jpg"); +// singleLinks.put("mbp/3.jpg", "MBP.zip/MBP/Nalathni Dragon.full.jpg"); +// singleLinks.put("mbp/30.jpg", "MBP.zip/MBP/Liliana Vess.full.jpg"); +// singleLinks.put("mbp/31.jpg", "MBP.zip/MBP/Bloodthrone Vampire.full.jpg"); +// singleLinks.put("mbp/32.jpg", "MBP.zip/MBP/Mirran Crusader.full.jpg"); +// singleLinks.put("mbp/33.jpg", "MBP.zip/MBP/Surgical Extraction.full.jpg"); +// singleLinks.put("mbp/34.jpg", "MBP.zip/MBP/Frost Titan.full.jpg"); +// singleLinks.put("mbp/35.jpg", "MBP.zip/MBP/Grave Titan.full.jpg"); +// singleLinks.put("mbp/36.jpg", "MBP.zip/MBP/Inferno Titan.full.jpg"); +// singleLinks.put("mbp/37.jpg", "MBP.zip/MBP/Chandra's Phoenix.full.jpg"); +// singleLinks.put("mbp/38.jpg", "MBP.zip/MBP/Treasure Hunt.full.jpg"); +// singleLinks.put("mbp/39.jpg", "MBP.zip/MBP/Faithless Looting.full.jpg"); +// singleLinks.put("mbp/4.jpg", "MBP.zip/MBP/Fireball.full.jpg"); +// singleLinks.put("mbp/40.jpg", "MBP.zip/MBP/Devil's Play.full.jpg"); +// singleLinks.put("mbp/41.jpg", "MBP.zip/MBP/Gravecrawler.full.jpg"); +// singleLinks.put("mbp/42.jpg", "MBP.zip/MBP/Electrolyze.full.jpg"); +// singleLinks.put("mbp/43.jpg", "MBP.zip/MBP/Feast of Blood.full.jpg"); +// singleLinks.put("mbp/44.jpg", "MBP.zip/MBP/Silverblade Paladin.full.jpg"); +// singleLinks.put("mbp/45.jpg", "MBP.zip/MBP/Merfolk Mesmerist.full.jpg"); +// singleLinks.put("mbp/46.jpg", "MBP.zip/MBP/Knight Exemplar.full.jpg"); +// singleLinks.put("mbp/47.jpg", "MBP.zip/MBP/Sunblast Angel.full.jpg"); +// singleLinks.put("mbp/48.jpg", "MBP.zip/MBP/Serra Avatar.full.jpg"); +// singleLinks.put("mbp/49.jpg", "MBP.zip/MBP/Primordial Hydra.full.jpg"); +// singleLinks.put("mbp/5.jpg", "MBP.zip/MBP/Blue Elemental Blast.full.jpg"); +// singleLinks.put("mbp/50.jpg", "MBP.zip/MBP/Vampire Nocturnus.full.jpg"); +// singleLinks.put("mbp/51.jpg", "MBP.zip/MBP/Cathedral of War.full.jpg"); +// singleLinks.put("mbp/52.jpg", "MBP.zip/MBP/Terastodon.full.jpg"); +// singleLinks.put("mbp/53.jpg", "MBP.zip/MBP/Arrest.full.jpg"); +// singleLinks.put("mbp/54.jpg", "MBP.zip/MBP/Consume Spirit.full.jpg"); +// singleLinks.put("mbp/55.jpg", "MBP.zip/MBP/Dreg Mangler.full.jpg"); +// singleLinks.put("mbp/56.jpg", "MBP.zip/MBP/Supreme Verdict.full.jpg"); +// singleLinks.put("mbp/57.jpg", "MBP.zip/MBP/Standstill.full.jpg"); +// singleLinks.put("mbp/58.jpg", "MBP.zip/MBP/Breath of Malfegor.full.jpg"); +// singleLinks.put("mbp/59.jpg", "MBP.zip/MBP/Angel of Glory's Rise.full.jpg"); +// singleLinks.put("mbp/6.jpg", "MBP.zip/MBP/Mana Crypt.full.jpg"); +// singleLinks.put("mbp/60.jpg", "MBP.zip/MBP/Turnabout.full.jpg"); +// singleLinks.put("mbp/61.jpg", "MBP.zip/MBP/Nightveil Specter.full.jpg"); +// singleLinks.put("mbp/62.jpg", "MBP.zip/MBP/Voidmage Husher.full.jpg"); +// singleLinks.put("mbp/63.jpg", "MBP.zip/MBP/Ogre Arsonist.full.jpg"); +// singleLinks.put("mbp/64.jpg", "MBP.zip/MBP/Corrupt.full.jpg"); +// singleLinks.put("mbp/65.jpg", "MBP.zip/MBP/Chandra's Fury.full.jpg"); +// singleLinks.put("mbp/66.jpg", "MBP.zip/MBP/Render Silent.full.jpg"); +// singleLinks.put("mbp/67.jpg", "MBP.zip/MBP/Ratchet Bomb.full.jpg"); +// singleLinks.put("mbp/68.jpg", "MBP.zip/MBP/Bonescythe Sliver.full.jpg"); +// singleLinks.put("mbp/69.jpg", "MBP.zip/MBP/Ogre Battledriver.full.jpg"); +// singleLinks.put("mbp/7.jpg", "MBP.zip/MBP/Windseeker Centaur.full.jpg"); +// singleLinks.put("mbp/70.jpg", "MBP.zip/MBP/Scavenging Ooze.full.jpg"); +// singleLinks.put("mbp/71.jpg", "MBP.zip/MBP/Hamletback Goliath.full.jpg"); +// singleLinks.put("mbp/72.jpg", "MBP.zip/MBP/Ajani, Caller of the Pride.full.jpg"); +// singleLinks.put("mbp/73.jpg", "MBP.zip/MBP/Jace, Memory Adept.full.jpg"); +// singleLinks.put("mbp/74.jpg", "MBP.zip/MBP/Liliana of the Dark Realms.full.jpg"); +// singleLinks.put("mbp/75.jpg", "MBP.zip/MBP/Chandra, Pyromaster.full.jpg"); +// singleLinks.put("mbp/76.jpg", "MBP.zip/MBP/Garruk, Caller of Beasts.full.jpg"); +// singleLinks.put("mbp/77.jpg", "MBP.zip/MBP/Sylvan Caryatid.full.jpg"); +// singleLinks.put("mbp/78.jpg", "MBP.zip/MBP/Karametra's Acolyte.full.jpg"); +// singleLinks.put("mbp/79.jpg", "MBP.zip/MBP/Fated Conflagration.full.jpg"); +// singleLinks.put("mbp/8.jpg", "MBP.zip/MBP/Giant Badger.full.jpg"); +// singleLinks.put("mbp/80.jpg", "MBP.zip/MBP/High Tide.full.jpg"); +// singleLinks.put("mbp/81.jpg", "MBP.zip/MBP/Gaze of Granite.full.jpg"); +// singleLinks.put("mbp/82.jpg", "MBP.zip/MBP/Wash Out.full.jpg"); +// singleLinks.put("mbp/83.jpg", "MBP.zip/MBP/Acquire.full.jpg"); +// singleLinks.put("mbp/84.jpg", "MBP.zip/MBP/Duress.full.jpg"); +// singleLinks.put("mbp/85.jpg", "MBP.zip/MBP/Eidolon of Blossoms.full.jpg"); +// singleLinks.put("mbp/86.jpg", "MBP.zip/MBP/Magister of Worth.full.jpg"); +// singleLinks.put("mbp/87.jpg", "MBP.zip/MBP/Soul of Ravnica.full.jpg"); +// singleLinks.put("mbp/88.jpg", "MBP.zip/MBP/Soul of Zendikar.full.jpg"); +// singleLinks.put("mbp/89.jpg", "MBP.zip/MBP/Stealer of Secrets.full.jpg"); +// singleLinks.put("mbp/9.jpg", "MBP.zip/MBP/Scent of Cinder.full.jpg"); +// singleLinks.put("mbp/90.jpg", "MBP.zip/MBP/Angelic Skirmisher.full.jpg"); +// singleLinks.put("mbp/91.jpg", "MBP.zip/MBP/Xathrid Necromancer.full.jpg"); +// singleLinks.put("mbp/92.jpg", "MBP.zip/MBP/Rattleclaw Mystic.full.jpg"); +// singleLinks.put("mbp/93.jpg", "MBP.zip/MBP/Ankle Shanker.full.jpg"); +// singleLinks.put("mbp/94.jpg", "MBP.zip/MBP/Avalanche Tusker.full.jpg"); +// singleLinks.put("mbp/95.jpg", "MBP.zip/MBP/Ivorytusk Fortress.full.jpg"); +// singleLinks.put("mbp/96.jpg", "MBP.zip/MBP/Rakshasa Vizier.full.jpg"); +// singleLinks.put("mbp/97.jpg", "MBP.zip/MBP/Sage of the Inward Eye.full.jpg"); +// singleLinks.put("mbp/98.jpg", "MBP.zip/MBP/Goblin Rabblemaster.full.jpg"); +// singleLinks.put("mbp/99.jpg", "MBP.zip/MBP/Ajani Steadfast.full.jpg"); +// singleLinks.put("mgdc/1.jpg", "MGDC.zip/MGDC/Reya Dawnbringer.full.jpg"); +// singleLinks.put("mgdc/10.jpg", "MGDC.zip/MGDC/Stormblood Berserker.full.jpg"); +// singleLinks.put("mgdc/11.jpg", "MGDC.zip/MGDC/Dungrove Elder.full.jpg"); +// singleLinks.put("mgdc/12.jpg", "MGDC.zip/MGDC/Diregraf Ghoul.full.jpg"); +// singleLinks.put("mgdc/13.jpg", "MGDC.zip/MGDC/Elite Inquisitor.full.jpg"); +// singleLinks.put("mgdc/14.jpg", "MGDC.zip/MGDC/Zombie Apocalypse.full.jpg"); +// singleLinks.put("mgdc/15.jpg", "MGDC.zip/MGDC/Strangleroot Geist.full.jpg"); +// singleLinks.put("mgdc/16.jpg", "MGDC.zip/MGDC/Suture Priest.full.jpg"); +// singleLinks.put("mgdc/17.jpg", "MGDC.zip/MGDC/Pristine Talisman.full.jpg"); +// singleLinks.put("mgdc/18.jpg", "MGDC.zip/MGDC/Latch Seeker.full.jpg"); +// singleLinks.put("mgdc/19.jpg", "MGDC.zip/MGDC/Killing Wave.full.jpg"); +// singleLinks.put("mgdc/2.jpg", "MGDC.zip/MGDC/Liliana's Specter.full.jpg"); +// singleLinks.put("mgdc/20.jpg", "MGDC.zip/MGDC/Magmaquake.full.jpg"); +// singleLinks.put("mgdc/21.jpg", "MGDC.zip/MGDC/Mwonvuli Beast Tracker.full.jpg"); +// singleLinks.put("mgdc/22.jpg", "MGDC.zip/MGDC/Cryptborn Horror.full.jpg"); +// singleLinks.put("mgdc/23.jpg", "MGDC.zip/MGDC/Dryad Militant.full.jpg"); +// singleLinks.put("mgdc/24.jpg", "MGDC.zip/MGDC/Firemane Avenger.full.jpg"); +// singleLinks.put("mgdc/25.jpg", "MGDC.zip/MGDC/Zameck Guildmage.full.jpg"); +// singleLinks.put("mgdc/26.jpg", "MGDC.zip/MGDC/Melek, Izzet Paragon.full.jpg"); +// singleLinks.put("mgdc/27.jpg", "MGDC.zip/MGDC/Trostani's Summoner.full.jpg"); +// singleLinks.put("mgdc/28.jpg", "MGDC.zip/MGDC/Hive Stirrings.full.jpg"); +// singleLinks.put("mgdc/29.jpg", "MGDC.zip/MGDC/Goblin Diplomats.full.jpg"); +// singleLinks.put("mgdc/3.jpg", "MGDC.zip/MGDC/Mitotic Slime.full.jpg"); +// singleLinks.put("mgdc/30.jpg", "MGDC.zip/MGDC/Phalanx Leader.full.jpg"); +// singleLinks.put("mgdc/31.jpg", "MGDC.zip/MGDC/Nighthowler.full.jpg"); +// singleLinks.put("mgdc/32.jpg", "MGDC.zip/MGDC/Pain Seer.full.jpg"); +// singleLinks.put("mgdc/33.jpg", "MGDC.zip/MGDC/Kiora's Follower.full.jpg"); +// singleLinks.put("mgdc/34.jpg", "MGDC.zip/MGDC/Squelching Leeches.full.jpg"); +// singleLinks.put("mgdc/35.jpg", "MGDC.zip/MGDC/Dictate of Kruphix.full.jpg"); +// singleLinks.put("mgdc/36.jpg", "MGDC.zip/MGDC/Hall of Triumph.full.jpg"); +// singleLinks.put("mgdc/37.jpg", "MGDC.zip/MGDC/Heir of the Wilds.full.jpg"); +// singleLinks.put("mgdc/38.jpg", "MGDC.zip/MGDC/Utter End.full.jpg"); +// singleLinks.put("mgdc/39.jpg", "MGDC.zip/MGDC/Reclamation Sage.full.jpg"); +// singleLinks.put("mgdc/4.jpg", "MGDC.zip/MGDC/Memnite.full.jpg"); +// singleLinks.put("mgdc/40.jpg", "MGDC.zip/MGDC/Chief Engineer.full.jpg"); +// singleLinks.put("mgdc/41.jpg", "MGDC.zip/MGDC/Mardu Shadowspear.full.jpg"); +// singleLinks.put("mgdc/42.jpg", "MGDC.zip/MGDC/Supplant Form.full.jpg"); +// singleLinks.put("mgdc/43.jpg", "MGDC.zip/MGDC/Thunderbreak Regent.full.jpg"); +// singleLinks.put("mgdc/44.jpg", "MGDC.zip/MGDC/Scaleguard Sentinels.full.jpg"); +// singleLinks.put("mgdc/45.jpg", "MGDC.zip/MGDC/Conclave Naturalists.full.jpg"); +// singleLinks.put("mgdc/46.jpg", "MGDC.zip/MGDC/Languish.full.jpg"); +// singleLinks.put("mgdc/47.jpg", "MGDC.zip/MGDC/Stasis Snare.full.jpg"); +// singleLinks.put("mgdc/48.jpg", "MGDC.zip/MGDC/Radiant Flames.full.jpg"); +// singleLinks.put("mgdc/49.jpg", "MGDC.zip/MGDC/Immolating Glare.full.jpg"); +// singleLinks.put("mgdc/5.jpg", "MGDC.zip/MGDC/Tempered Steel.full.jpg"); +// singleLinks.put("mgdc/50.jpg", "MGDC.zip/MGDC/Jori En, Ruin Diver.full.jpg"); +// singleLinks.put("mgdc/6.jpg", "MGDC.zip/MGDC/Treasure Mage.full.jpg"); +// singleLinks.put("mgdc/7.jpg", "MGDC.zip/MGDC/Black Sun's Zenith.full.jpg"); +// singleLinks.put("mgdc/8.jpg", "MGDC.zip/MGDC/Myr Superion.full.jpg"); +// singleLinks.put("mgdc/9.jpg", "MGDC.zip/MGDC/Priest of Urabrask.full.jpg"); +// singleLinks.put("mlp/1.jpg", "MLP.zip/MLP/Earwig Squad.full.jpg"); +// singleLinks.put("mlp/10.jpg", "MLP.zip/MLP/Lord of Shatterskull Pass.full.jpg"); +// singleLinks.put("mlp/11.jpg", "MLP.zip/MLP/Ancient Hellkite.full.jpg"); +// singleLinks.put("mlp/12.jpg", "MLP.zip/MLP/Steel Hellkite.full.jpg"); +// singleLinks.put("mlp/13.jpg", "MLP.zip/MLP/Thopter Assembly.full.jpg"); +// singleLinks.put("mlp/14.jpg", "MLP.zip/MLP/Phyrexian Metamorph.full.jpg"); +// singleLinks.put("mlp/15.jpg", "MLP.zip/MLP/Garruk's Horde.full.jpg"); +// singleLinks.put("mlp/16a.jpg", "MLP.zip/MLP/Ludevic's Test Subject.full.jpg"); +// singleLinks.put("mlp/16b.jpg", "MLP.zip/MLP/Ludevic's Abomination.full.jpg"); +// singleLinks.put("mlp/17a.jpg", "MLP.zip/MLP/Mondronen Shaman.full.jpg"); +// singleLinks.put("mlp/17b.jpg", "MLP.zip/MLP/Tovolar's Magehunter.full.jpg"); +// singleLinks.put("mlp/18.jpg", "MLP.zip/MLP/Restoration Angel.full.jpg"); +// singleLinks.put("mlp/19.jpg", "MLP.zip/MLP/Staff of Nin.full.jpg"); +// singleLinks.put("mlp/2.jpg", "MLP.zip/MLP/Vexing Shusher.full.jpg"); +// singleLinks.put("mlp/20.jpg", "MLP.zip/MLP/Deadbridge Goliath.full.jpg"); +// singleLinks.put("mlp/21.jpg", "MLP.zip/MLP/Skarrg Goliath.full.jpg"); +// singleLinks.put("mlp/22a.jpg", "MLP.zip/MLP/Breaking (Breaking/Entering).full.jpg"); +// singleLinks.put("mlp/22b.jpg", "MLP.zip/MLP/Entering (Breaking/Entering).full.jpg"); +// singleLinks.put("mlp/23.jpg", "MLP.zip/MLP/Colossal Whale.full.jpg"); +// singleLinks.put("mlp/24.jpg", "MLP.zip/MLP/Bident of Thassa.full.jpg"); +// singleLinks.put("mlp/25.jpg", "MLP.zip/MLP/Tromokratis.full.jpg"); +// singleLinks.put("mlp/26.jpg", "MLP.zip/MLP/Dictate of the Twin Gods.full.jpg"); +// singleLinks.put("mlp/27.jpg", "MLP.zip/MLP/Dragone Throne of Tarkir.full.jpg"); +// singleLinks.put("mlp/28.jpg", "MLP.zip/MLP/In Garruk's Wake.full.jpg"); +// singleLinks.put("mlp/29.jpg", "MLP.zip/MLP/Sandsteppe Mastodon.full.jpg"); +// singleLinks.put("mlp/3.jpg", "MLP.zip/MLP/Figure of Destiny.full.jpg"); +// singleLinks.put("mlp/31.jpg", "MLP.zip/MLP/Deathbringer Regent.full.jpg"); +// singleLinks.put("mlp/32.jpg", "MLP.zip/MLP/Mizzium Meddler.full.jpg"); +// singleLinks.put("mlp/33.jpg", "MLP.zip/MLP/Blight Herder.full.jpg"); +// singleLinks.put("mlp/34.jpg", "MLP.zip/MLP/Endbringer.full.jpg"); +// singleLinks.put("mlp/4.jpg", "MLP.zip/MLP/Ajani Vengeant.full.jpg"); +// singleLinks.put("mlp/5.jpg", "MLP.zip/MLP/Obelisk of Alara.full.jpg"); +// singleLinks.put("mlp/6.jpg", "MLP.zip/MLP/Knight of New Alara.full.jpg"); +// singleLinks.put("mlp/7.jpg", "MLP.zip/MLP/Ant Queen.full.jpg"); +// singleLinks.put("mlp/8.jpg", "MLP.zip/MLP/Valakut, the Molten Pinnacle.full.jpg"); +// singleLinks.put("mlp/9.jpg", "MLP.zip/MLP/Joraga Warcaller.full.jpg"); +// singleLinks.put("mprp/1.jpg", "MPRP.zip/MPRP/Wasteland.full.jpg"); +// singleLinks.put("mprp/10.jpg", "MPRP.zip/MPRP/Hypnotic Specter.full.jpg"); +// singleLinks.put("mprp/11.jpg", "MPRP.zip/MPRP/Hinder.full.jpg"); +// singleLinks.put("mprp/12.jpg", "MPRP.zip/MPRP/Pyroclasm.full.jpg"); +// singleLinks.put("mprp/13.jpg", "MPRP.zip/MPRP/Giant Growth.full.jpg"); +// singleLinks.put("mprp/14.jpg", "MPRP.zip/MPRP/Putrefy.full.jpg"); +// singleLinks.put("mprp/15.jpg", "MPRP.zip/MPRP/Zombify.full.jpg"); +// singleLinks.put("mprp/16.jpg", "MPRP.zip/MPRP/Lightning Helix.full.jpg"); +// singleLinks.put("mprp/17.jpg", "MPRP.zip/MPRP/Wrath of God.full.jpg"); +// singleLinks.put("mprp/18.jpg", "MPRP.zip/MPRP/Condemn.full.jpg"); +// singleLinks.put("mprp/19.jpg", "MPRP.zip/MPRP/Mortify.full.jpg"); +// singleLinks.put("mprp/2.jpg", "MPRP.zip/MPRP/Voidmage Prodigy.full.jpg"); +// singleLinks.put("mprp/20.jpg", "MPRP.zip/MPRP/Psionic Blast.full.jpg"); +// singleLinks.put("mprp/21.jpg", "MPRP.zip/MPRP/Cruel Edict.full.jpg"); +// singleLinks.put("mprp/22.jpg", "MPRP.zip/MPRP/Disenchant.full.jpg"); +// singleLinks.put("mprp/23.jpg", "MPRP.zip/MPRP/Recollect.full.jpg"); +// singleLinks.put("mprp/24.jpg", "MPRP.zip/MPRP/Damnation.full.jpg"); +// singleLinks.put("mprp/25.jpg", "MPRP.zip/MPRP/Tidings.full.jpg"); +// singleLinks.put("mprp/26.jpg", "MPRP.zip/MPRP/Incinerate.full.jpg"); +// singleLinks.put("mprp/27.jpg", "MPRP.zip/MPRP/Mana Tithe.full.jpg"); +// singleLinks.put("mprp/28.jpg", "MPRP.zip/MPRP/Harmonize.full.jpg"); +// singleLinks.put("mprp/29.jpg", "MPRP.zip/MPRP/Ponder.full.jpg"); +// singleLinks.put("mprp/3.jpg", "MPRP.zip/MPRP/Powder Keg.full.jpg"); +// singleLinks.put("mprp/30.jpg", "MPRP.zip/MPRP/Corrupt.full.jpg"); +// singleLinks.put("mprp/31.jpg", "MPRP.zip/MPRP/Cryptic Command.full.jpg"); +// singleLinks.put("mprp/32.jpg", "MPRP.zip/MPRP/Flame Javelin.full.jpg"); +// singleLinks.put("mprp/33.jpg", "MPRP.zip/MPRP/Unmake.full.jpg"); +// singleLinks.put("mprp/34.jpg", "MPRP.zip/MPRP/Nameless Inversion.full.jpg"); +// singleLinks.put("mprp/35.jpg", "MPRP.zip/MPRP/Remove Soul.full.jpg"); +// singleLinks.put("mprp/36.jpg", "MPRP.zip/MPRP/Blightning.full.jpg"); +// singleLinks.put("mprp/37.jpg", "MPRP.zip/MPRP/Rampant Growth.full.jpg"); +// singleLinks.put("mprp/38.jpg", "MPRP.zip/MPRP/Negate.full.jpg"); +// singleLinks.put("mprp/39.jpg", "MPRP.zip/MPRP/Terminate.full.jpg"); +// singleLinks.put("mprp/4.jpg", "MPRP.zip/MPRP/Psychatog.full.jpg"); +// singleLinks.put("mprp/40.jpg", "MPRP.zip/MPRP/Lightning Bolt.full.jpg"); +// singleLinks.put("mprp/41.jpg", "MPRP.zip/MPRP/Cancel.full.jpg"); +// singleLinks.put("mprp/42.jpg", "MPRP.zip/MPRP/Sign in Blood.full.jpg"); +// singleLinks.put("mprp/43.jpg", "MPRP.zip/MPRP/Infest.full.jpg"); +// singleLinks.put("mprp/44.jpg", "MPRP.zip/MPRP/Volcanic Fallout.full.jpg"); +// singleLinks.put("mprp/45.jpg", "MPRP.zip/MPRP/Celestial Purge.full.jpg"); +// singleLinks.put("mprp/46.jpg", "MPRP.zip/MPRP/Bituminous Blast.full.jpg"); +// singleLinks.put("mprp/47.jpg", "MPRP.zip/MPRP/Burst Lightning.full.jpg"); +// singleLinks.put("mprp/48.jpg", "MPRP.zip/MPRP/Harrow.full.jpg"); +// singleLinks.put("mprp/49.jpg", "MPRP.zip/MPRP/Day of Judgment.full.jpg"); +// singleLinks.put("mprp/5.jpg", "MPRP.zip/MPRP/Terror.full.jpg"); +// singleLinks.put("mprp/50.jpg", "MPRP.zip/MPRP/Brave the Elements.full.jpg"); +// singleLinks.put("mprp/51.jpg", "MPRP.zip/MPRP/Doom Blade.full.jpg"); +// singleLinks.put("mprp/52.jpg", "MPRP.zip/MPRP/Treasure Hunt.full.jpg"); +// singleLinks.put("mprp/53.jpg", "MPRP.zip/MPRP/Searing Blaze.full.jpg"); +// singleLinks.put("mprp/6.jpg", "MPRP.zip/MPRP/Fireball.full.jpg"); +// singleLinks.put("mprp/7.jpg", "MPRP.zip/MPRP/Oxidize.full.jpg"); +// singleLinks.put("mprp/8.jpg", "MPRP.zip/MPRP/Mana Leak.full.jpg"); +// singleLinks.put("mprp/9.jpg", "MPRP.zip/MPRP/Reciprocate.full.jpg"); +// singleLinks.put("mpskld/1.jpg", "MPS.zip/MPS/Cataclysmic Gearhulk.full.jpg"); +// singleLinks.put("mpskld/10.jpg", "MPS.zip/MPS/Cloudstone Curio.full.jpg"); +// singleLinks.put("mpskld/11.jpg", "MPS.zip/MPS/Crucible of Worlds.full.jpg"); +// singleLinks.put("mpskld/12.jpg", "MPS.zip/MPS/Gauntlet of Power.full.jpg"); +// singleLinks.put("mpskld/13.jpg", "MPS.zip/MPS/Hangarback Walker.full.jpg"); +// singleLinks.put("mpskld/14.jpg", "MPS.zip/MPS/Lightning Greaves.full.jpg"); +// singleLinks.put("mpskld/15.jpg", "MPS.zip/MPS/Lotus Petal.full.jpg"); +// singleLinks.put("mpskld/16.jpg", "MPS.zip/MPS/Mana Crypt.full.jpg"); +// singleLinks.put("mpskld/17.jpg", "MPS.zip/MPS/Mana Vault.full.jpg"); +// singleLinks.put("mpskld/18.jpg", "MPS.zip/MPS/Mind's Eye.full.jpg"); +// singleLinks.put("mpskld/19.jpg", "MPS.zip/MPS/Mox Opal.full.jpg"); +// singleLinks.put("mpskld/2.jpg", "MPS.zip/MPS/Torrential Gearhulk.full.jpg"); +// singleLinks.put("mpskld/20.jpg", "MPS.zip/MPS/Painter's Servant.full.jpg"); +// singleLinks.put("mpskld/21.jpg", "MPS.zip/MPS/Rings of Brighthearth.full.jpg"); +// singleLinks.put("mpskld/22.jpg", "MPS.zip/MPS/Scroll Rack.full.jpg"); +// singleLinks.put("mpskld/23.jpg", "MPS.zip/MPS/Sculpting Steel.full.jpg"); +// singleLinks.put("mpskld/24.jpg", "MPS.zip/MPS/Sol Ring.full.jpg"); +// singleLinks.put("mpskld/25.jpg", "MPS.zip/MPS/Solemn Simulacrum.full.jpg"); +// singleLinks.put("mpskld/26.jpg", "MPS.zip/MPS/Static Orb.full.jpg"); +// singleLinks.put("mpskld/27.jpg", "MPS.zip/MPS/Steel Overseer.full.jpg"); +// singleLinks.put("mpskld/28.jpg", "MPS.zip/MPS/Sword of Feast and Famine.full.jpg"); +// singleLinks.put("mpskld/29.jpg", "MPS.zip/MPS/Sword of Fire and Ice.full.jpg"); +// singleLinks.put("mpskld/3.jpg", "MPS.zip/MPS/Noxious Gearhulk.full.jpg"); +// singleLinks.put("mpskld/30.jpg", "MPS.zip/MPS/Sword of Light and Shadow.full.jpg"); +// singleLinks.put("mpskld/4.jpg", "MPS.zip/MPS/Combustible Gearhulk.full.jpg"); +// singleLinks.put("mpskld/5.jpg", "MPS.zip/MPS/Verdurous Gearhulk.full.jpg"); +// singleLinks.put("mpskld/6.jpg", "MPS.zip/MPS/Aether Vial.full.jpg"); +// singleLinks.put("mpskld/7.jpg", "MPS.zip/MPS/Champion's Helm.full.jpg"); +// singleLinks.put("mpskld/8.jpg", "MPS.zip/MPS/Chromatic Lantern.full.jpg"); +// singleLinks.put("mpskld/9.jpg", "MPS.zip/MPS/Chrome Mox.full.jpg"); +// singleLinks.put("ptc/1.jpg", "PTC.zip/PTC/Dirtcowl Wurm.full.jpg"); +// singleLinks.put("ptc/10.jpg", "PTC.zip/PTC/Rathi Assassin.full.jpg"); +// singleLinks.put("ptc/100.jpg", "PTC.zip/PTC/Flying Crane Technique.full.jpg"); +// singleLinks.put("ptc/101.jpg", "PTC.zip/PTC/Grim Haruspex.full.jpg"); +// singleLinks.put("ptc/102.jpg", "PTC.zip/PTC/Hardened Scales.full.jpg"); +// singleLinks.put("ptc/103.jpg", "PTC.zip/PTC/Herald of Anafenza.full.jpg"); +// singleLinks.put("ptc/104.jpg", "PTC.zip/PTC/High Sentinels of Arashin.full.jpg"); +// singleLinks.put("ptc/105.jpg", "PTC.zip/PTC/Icy Blast.full.jpg"); +// singleLinks.put("ptc/106.jpg", "PTC.zip/PTC/Ivorytusk Fortress.full.jpg"); +// singleLinks.put("ptc/107.jpg", "PTC.zip/PTC/Jeering Instigator.full.jpg"); +// singleLinks.put("ptc/108.jpg", "PTC.zip/PTC/Jeskai Ascendancy.full.jpg"); +// singleLinks.put("ptc/109.jpg", "PTC.zip/PTC/Kheru Lich Lord.full.jpg"); +// singleLinks.put("ptc/11.jpg", "PTC.zip/PTC/Avatar of Hope.full.jpg"); +// singleLinks.put("ptc/110.jpg", "PTC.zip/PTC/Mardu Ascendancy.full.jpg"); +// singleLinks.put("ptc/111.jpg", "PTC.zip/PTC/Master of Pearls.full.jpg"); +// singleLinks.put("ptc/112.jpg", "PTC.zip/PTC/Narset, Enlightened Master.full.jpg"); +// singleLinks.put("ptc/113.jpg", "PTC.zip/PTC/Necropolis Fiend.full.jpg"); +// singleLinks.put("ptc/114.jpg", "PTC.zip/PTC/Rakshasa Vizier.full.jpg"); +// singleLinks.put("ptc/115.jpg", "PTC.zip/PTC/Rattleclaw Mystic.full.jpg"); +// singleLinks.put("ptc/116.jpg", "PTC.zip/PTC/Sage of the Inward Eye.full.jpg"); +// singleLinks.put("ptc/117.jpg", "PTC.zip/PTC/Sidisi, Brood Tyrant.full.jpg"); +// singleLinks.put("ptc/118.jpg", "PTC.zip/PTC/Siege Rhino.full.jpg"); +// singleLinks.put("ptc/119.jpg", "PTC.zip/PTC/Sultai Ascendacy.full.jpg"); +// singleLinks.put("ptc/12.jpg", "PTC.zip/PTC/Raging Kavu.full.jpg"); +// singleLinks.put("ptc/120.jpg", "PTC.zip/PTC/Surrak Dragonclaw.full.jpg"); +// singleLinks.put("ptc/121.jpg", "PTC.zip/PTC/Temur Ascendancy.full.jpg"); +// singleLinks.put("ptc/122.jpg", "PTC.zip/PTC/Thousand Winds.full.jpg"); +// singleLinks.put("ptc/123.jpg", "PTC.zip/PTC/Trail of Mystery.full.jpg"); +// singleLinks.put("ptc/124.jpg", "PTC.zip/PTC/Trap Essence.full.jpg"); +// singleLinks.put("ptc/125.jpg", "PTC.zip/PTC/Utter End.full.jpg"); +// singleLinks.put("ptc/126.jpg", "PTC.zip/PTC/Villainous Wealth.full.jpg"); +// singleLinks.put("ptc/127.jpg", "PTC.zip/PTC/Zurgo Helmsmasher.full.jpg"); +// singleLinks.put("ptc/128.jpg", "PTC.zip/PTC/Alesha, Who Smiles at Death.full.jpg"); +// singleLinks.put("ptc/129.jpg", "PTC.zip/PTC/Arcbond.full.jpg"); +// singleLinks.put("ptc/13.jpg", "PTC.zip/PTC/Questing Phelddagrif.full.jpg"); +// singleLinks.put("ptc/130.jpg", "PTC.zip/PTC/Archfiend of Depravity.full.jpg"); +// singleLinks.put("ptc/131.jpg", "PTC.zip/PTC/Atarka, World Render.full.jpg"); +// singleLinks.put("ptc/132.jpg", "PTC.zip/PTC/Brutal Hordechief.full.jpg"); +// singleLinks.put("ptc/133.jpg", "PTC.zip/PTC/Daghatar the Adamant.full.jpg"); +// singleLinks.put("ptc/134.jpg", "PTC.zip/PTC/Dragonscale General.full.jpg"); +// singleLinks.put("ptc/135.jpg", "PTC.zip/PTC/Dromoka, the Eternal.full.jpg"); +// singleLinks.put("ptc/136.jpg", "PTC.zip/PTC/Flamerush Rider.full.jpg"); +// singleLinks.put("ptc/137.jpg", "PTC.zip/PTC/Flamewake Phoenix.full.jpg"); +// singleLinks.put("ptc/138.jpg", "PTC.zip/PTC/Jeskai Infiltrator.full.jpg"); +// singleLinks.put("ptc/14.jpg", "PTC.zip/PTC/Fungal Shambler.full.jpg"); +// singleLinks.put("ptc/141.jpg", "PTC.zip/PTC/Mastery of the Unseen.full.jpg"); +// singleLinks.put("ptc/142.jpg", "PTC.zip/PTC/Ojutai, Soul of Winter.full.jpg"); +// singleLinks.put("ptc/143.jpg", "PTC.zip/PTC/Rally the Ancestors.full.jpg"); +// singleLinks.put("ptc/145.jpg", "PTC.zip/PTC/Sandsteppe Mastodon.full.jpg"); +// singleLinks.put("ptc/147.jpg", "PTC.zip/PTC/Shamanic Revelation.full.jpg"); +// singleLinks.put("ptc/15.jpg", "PTC.zip/PTC/Stone-Tongue Basilisk.full.jpg"); +// singleLinks.put("ptc/150.jpg", "PTC.zip/PTC/Soulfire Grand Master.full.jpg"); +// singleLinks.put("ptc/151.jpg", "PTC.zip/PTC/Soulflayer.full.jpg"); +// singleLinks.put("ptc/152.jpg", "PTC.zip/PTC/Supplant Form.full.jpg"); +// singleLinks.put("ptc/153.jpg", "PTC.zip/PTC/Tasigur, the Golden Fang.full.jpg"); +// singleLinks.put("ptc/154.jpg", "PTC.zip/PTC/Torrent Elemental.full.jpg"); +// singleLinks.put("ptc/157.jpg", "PTC.zip/PTC/Yasova Dragonclaw.full.jpg"); +// singleLinks.put("ptc/16.jpg", "PTC.zip/PTC/Laquatus's Champion.full.jpg"); +// singleLinks.put("ptc/166.jpg", "PTC.zip/PTC/Crater Elemental.full.jpg"); +// singleLinks.put("ptc/168.jpg", "PTC.zip/PTC/Deathbringer Regent.full.jpg"); +// singleLinks.put("ptc/17.jpg", "PTC.zip/PTC/Glory.full.jpg"); +// singleLinks.put("ptc/18.jpg", "PTC.zip/PTC/Silent Specter.full.jpg"); +// singleLinks.put("ptc/181.jpg", "PTC.zip/PTC/Kolaghan's Command.full.jpg"); +// singleLinks.put("ptc/183.jpg", "PTC.zip/PTC/Myth Realized.full.jpg"); +// singleLinks.put("ptc/185.jpg", "PTC.zip/PTC/Ojutai's Command.full.jpg"); +// singleLinks.put("ptc/19.jpg", "PTC.zip/PTC/Feral Throwback.full.jpg"); +// singleLinks.put("ptc/196.jpg", "PTC.zip/PTC/Volcanic Vision.full.jpg"); +// singleLinks.put("ptc/198.jpg", "PTC.zip/PTC/Abbot of Keral Keep.full.jpg"); +// singleLinks.put("ptc/2.jpg", "PTC.zip/PTC/Revenant.full.jpg"); +// singleLinks.put("ptc/20.jpg", "PTC.zip/PTC/Soul Collector.full.jpg"); +// singleLinks.put("ptc/21.jpg", "PTC.zip/PTC/Sword of Kaldra.full.jpg"); +// singleLinks.put("ptc/210.jpg", "PTC.zip/PTC/Gilt-Leaf Winnower.full.jpg"); +// singleLinks.put("ptc/212.jpg", "PTC.zip/PTC/Graveblade Marauder.full.jpg"); +// singleLinks.put("ptc/216.jpg", "PTC.zip/PTC/Jace, Vryn's Prodigy.full.jpg"); +// singleLinks.put("ptc/22.jpg", "PTC.zip/PTC/Shield of Kaldra.full.jpg"); +// singleLinks.put("ptc/225.jpg", "PTC.zip/PTC/Nissa's Revelation.full.jpg"); +// singleLinks.put("ptc/227.jpg", "PTC.zip/PTC/Outland Colossus.full.jpg"); +// singleLinks.put("ptc/23.jpg", "PTC.zip/PTC/Helm of Kaldra.full.jpg"); +// singleLinks.put("ptc/238.jpg", "PTC.zip/PTC/Akoum Firebird.full.jpg"); +// singleLinks.put("ptc/239.jpg", "PTC.zip/PTC/Akoum Hellkite.full.jpg"); +// singleLinks.put("ptc/24.jpg", "PTC.zip/PTC/Ryusei, the Falling Star.full.jpg"); +// singleLinks.put("ptc/240.jpg", "PTC.zip/PTC/Aligned Hedron Network.full.jpg"); +// singleLinks.put("ptc/241.jpg", "PTC.zip/PTC/Ally Encampment.full.jpg"); +// singleLinks.put("ptc/242.jpg", "PTC.zip/PTC/Angelic Captain.full.jpg"); +// singleLinks.put("ptc/243.jpg", "PTC.zip/PTC/Barrage Tyrant.full.jpg"); +// singleLinks.put("ptc/244.jpg", "PTC.zip/PTC/Beastcaller Savant.full.jpg"); +// singleLinks.put("ptc/245.jpg", "PTC.zip/PTC/Blight Herder.full.jpg"); +// singleLinks.put("ptc/246.jpg", "PTC.zip/PTC/Bring to Light.full.jpg"); +// singleLinks.put("ptc/247.jpg", "PTC.zip/PTC/Brood Butcher.full.jpg"); +// singleLinks.put("ptc/248.jpg", "PTC.zip/PTC/Brutal Expulsion.full.jpg"); +// singleLinks.put("ptc/249.jpg", "PTC.zip/PTC/Canopy Vista.full.jpg"); +// singleLinks.put("ptc/25.jpg", "PTC.zip/PTC/Ink-Eyes, Servant of Oni.full.jpg"); +// singleLinks.put("ptc/250.jpg", "PTC.zip/PTC/Cinder Glade.full.jpg"); +// singleLinks.put("ptc/251.jpg", "PTC.zip/PTC/Conduit of Ruin.full.jpg"); +// singleLinks.put("ptc/252.jpg", "PTC.zip/PTC/Defiant Bloodlord.full.jpg"); +// singleLinks.put("ptc/253.jpg", "PTC.zip/PTC/Desolation Twin.full.jpg"); +// singleLinks.put("ptc/254.jpg", "PTC.zip/PTC/Dragonmaster Outcast.full.jpg"); +// singleLinks.put("ptc/255.jpg", "PTC.zip/PTC/Drana, Liberator of Malakir.full.jpg"); +// singleLinks.put("ptc/256.jpg", "PTC.zip/PTC/Drowner of Hope.full.jpg"); +// singleLinks.put("ptc/257.jpg", "PTC.zip/PTC/Dust Stalker.full.jpg"); +// singleLinks.put("ptc/258.jpg", "PTC.zip/PTC/Emeria Shepherd.full.jpg"); +// singleLinks.put("ptc/259.jpg", "PTC.zip/PTC/Endless One.full.jpg"); +// singleLinks.put("ptc/26.jpg", "PTC.zip/PTC/Kiyomaro, First to Stand.full.jpg"); +// singleLinks.put("ptc/260.jpg", "PTC.zip/PTC/Exert Influence.full.jpg"); +// singleLinks.put("ptc/261.jpg", "PTC.zip/PTC/Fathom Feeder.full.jpg"); +// singleLinks.put("ptc/262.jpg", "PTC.zip/PTC/Felidar Sovereign.full.jpg"); +// singleLinks.put("ptc/263.jpg", "PTC.zip/PTC/From Beyond.full.jpg"); +// singleLinks.put("ptc/264.jpg", "PTC.zip/PTC/Gideon, Ally of Zendikar.full.jpg"); +// singleLinks.put("ptc/265.jpg", "PTC.zip/PTC/Greenwarden of Murasa.full.jpg"); +// singleLinks.put("ptc/266.jpg", "PTC.zip/PTC/Gruesome Slaughter.full.jpg"); +// singleLinks.put("ptc/267.jpg", "PTC.zip/PTC/Guardian of Tazeem.full.jpg"); +// singleLinks.put("ptc/268.jpg", "PTC.zip/PTC/Guul Draz Overseer.full.jpg"); +// singleLinks.put("ptc/27.jpg", "PTC.zip/PTC/Gleancrawler.full.jpg"); +// singleLinks.put("ptc/271.jpg", "PTC.zip/PTC/Lantern Scout.full.jpg"); +// singleLinks.put("ptc/272.jpg", "PTC.zip/PTC/Lumbering Falls.full.jpg"); +// singleLinks.put("ptc/273.jpg", "PTC.zip/PTC/March from the Tomb.full.jpg"); +// singleLinks.put("ptc/274.jpg", "PTC.zip/PTC/Munda, Ambush Leader.full.jpg"); +// singleLinks.put("ptc/275.jpg", "PTC.zip/PTC/Nissa's Renewal.full.jpg"); +// singleLinks.put("ptc/276.jpg", "PTC.zip/PTC/Noyan Dar, Roil Shaper.full.jpg"); +// singleLinks.put("ptc/277.jpg", "PTC.zip/PTC/Ob Nixilis Reignited.full.jpg"); +// singleLinks.put("ptc/278.jpg", "PTC.zip/PTC/Oblivion Sower.full.jpg"); +// singleLinks.put("ptc/279.jpg", "PTC.zip/PTC/Omnath, Locus of Rage.full.jpg"); +// singleLinks.put("ptc/28.jpg", "PTC.zip/PTC/Djinn Illuminatus.full.jpg"); +// singleLinks.put("ptc/280.jpg", "PTC.zip/PTC/Oran-Rief Hydra.full.jpg"); +// singleLinks.put("ptc/281.jpg", "PTC.zip/PTC/Painful Truths.full.jpg"); +// singleLinks.put("ptc/282.jpg", "PTC.zip/PTC/Part the Waterveil.full.jpg"); +// singleLinks.put("ptc/283.jpg", "PTC.zip/PTC/Planar Outburst.full.jpg"); +// singleLinks.put("ptc/284.jpg", "PTC.zip/PTC/Prairie Stream.full.jpg"); +// singleLinks.put("ptc/285.jpg", "PTC.zip/PTC/Prism Array.full.jpg"); +// singleLinks.put("ptc/286.jpg", "PTC.zip/PTC/Quarantine Field.full.jpg"); +// singleLinks.put("ptc/287.jpg", "PTC.zip/PTC/Radiant Flames.full.jpg"); +// singleLinks.put("ptc/288.jpg", "PTC.zip/PTC/Ruinous Path.full.jpg"); +// singleLinks.put("ptc/289.jpg", "PTC.zip/PTC/Sanctum of Ugin.full.jpg"); +// singleLinks.put("ptc/29.jpg", "PTC.zip/PTC/Avatar of Discord.full.jpg"); +// singleLinks.put("ptc/290.jpg", "PTC.zip/PTC/Scatter to the Winds.full.jpg"); +// singleLinks.put("ptc/291.jpg", "PTC.zip/PTC/Serpentine Spike.full.jpg"); +// singleLinks.put("ptc/292.jpg", "PTC.zip/PTC/Shambling Vent.full.jpg"); +// singleLinks.put("ptc/293.jpg", "PTC.zip/PTC/Shrine of the Forsaken Gods.full.jpg"); +// singleLinks.put("ptc/294.jpg", "PTC.zip/PTC/Sire of Stagnation.full.jpg"); +// singleLinks.put("ptc/295.jpg", "PTC.zip/PTC/Smoldering Marsh.full.jpg"); +// singleLinks.put("ptc/296.jpg", "PTC.zip/PTC/Smothering Abomination.full.jpg"); +// singleLinks.put("ptc/297.jpg", "PTC.zip/PTC/Sunken Hollow.full.jpg"); +// singleLinks.put("ptc/298.jpg", "PTC.zip/PTC/Ugin's Insight.full.jpg"); +// singleLinks.put("ptc/299.jpg", "PTC.zip/PTC/Ulamog, the Ceaseless Hunger.full.jpg"); +// singleLinks.put("ptc/3.jpg", "PTC.zip/PTC/Monstrous Hound.full.jpg"); +// singleLinks.put("ptc/30.jpg", "PTC.zip/PTC/Allosaurus Rider.full.jpg"); +// singleLinks.put("ptc/300.jpg", "PTC.zip/PTC/Undergrowth Champion.full.jpg"); +// singleLinks.put("ptc/301.jpg", "PTC.zip/PTC/Veteran Warleader.full.jpg"); +// singleLinks.put("ptc/302.jpg", "PTC.zip/PTC/Void Winnower.full.jpg"); +// singleLinks.put("ptc/303.jpg", "PTC.zip/PTC/Wasteland Strangler.full.jpg"); +// singleLinks.put("ptc/304.jpg", "PTC.zip/PTC/Woodland Wanderer.full.jpg"); +// singleLinks.put("ptc/305.jpg", "PTC.zip/PTC/Zada, Hedron Grinder.full.jpg"); +// singleLinks.put("ptc/31.jpg", "PTC.zip/PTC/Lotus Bloom.full.jpg"); +// singleLinks.put("ptc/32.jpg", "PTC.zip/PTC/Oros, the Avenger.full.jpg"); +// singleLinks.put("ptc/33.jpg", "PTC.zip/PTC/Korlash, Heir to Blackblade.full.jpg"); +// singleLinks.put("ptc/34.jpg", "PTC.zip/PTC/Wren's Run Packmaster.full.jpg"); +// singleLinks.put("ptc/35.jpg", "PTC.zip/PTC/Door of Destinies.full.jpg"); +// singleLinks.put("ptc/36.jpg", "PTC.zip/PTC/Demigod of Revenge.full.jpg"); +// singleLinks.put("ptc/37.jpg", "PTC.zip/PTC/Overbeing of Myth.full.jpg"); +// singleLinks.put("ptc/38.jpg", "PTC.zip/PTC/Ajani Vengeant.full.jpg"); +// singleLinks.put("ptc/39.jpg", "PTC.zip/PTC/Malfegor.full.jpg"); +// singleLinks.put("ptc/4.jpg", "PTC.zip/PTC/Lightning Dragon.full.jpg"); +// singleLinks.put("ptc/40.jpg", "PTC.zip/PTC/Dragon Broodmother.full.jpg"); +// singleLinks.put("ptc/41.jpg", "PTC.zip/PTC/Vampire Nocturnus.full.jpg"); +// singleLinks.put("ptc/42.jpg", "PTC.zip/PTC/Rampaging Baloths.full.jpg"); +// singleLinks.put("ptc/43.jpg", "PTC.zip/PTC/Comet Storm.full.jpg"); +// singleLinks.put("ptc/44.jpg", "PTC.zip/PTC/Emrakul, the Aeons Torn.full.jpg"); +// singleLinks.put("ptc/45.jpg", "PTC.zip/PTC/Sun Titan.full.jpg"); +// singleLinks.put("ptc/46.jpg", "PTC.zip/PTC/Wurmcoil Engine.full.jpg"); +// singleLinks.put("ptc/47.jpg", "PTC.zip/PTC/Hero of Bladehold.full.jpg"); +// singleLinks.put("ptc/48.jpg", "PTC.zip/PTC/Glissa, the Traitor.full.jpg"); +// singleLinks.put("ptc/49.jpg", "PTC.zip/PTC/Sheoldred, Whispering One.full.jpg"); +// singleLinks.put("ptc/5.jpg", "PTC.zip/PTC/Beast of Burden.full.jpg"); +// singleLinks.put("ptc/50.jpg", "PTC.zip/PTC/Bloodlord of Vaasgoth.full.jpg"); +// singleLinks.put("ptc/51a.jpg", "PTC.zip/PTC/Mayor of Avabruck.full.jpg"); +// singleLinks.put("ptc/51b.jpg", "PTC.zip/PTC/Howlpack Alpha.full.jpg"); +// singleLinks.put("ptc/52a.jpg", "PTC.zip/PTC/Ravenous Demon.full.jpg"); +// singleLinks.put("ptc/52b.jpg", "PTC.zip/PTC/Archdemon of Greed.full.jpg"); +// singleLinks.put("ptc/53.jpg", "PTC.zip/PTC/Moonsilver Spear.full.jpg"); +// singleLinks.put("ptc/54.jpg", "PTC.zip/PTC/Xathrid Gorgon.full.jpg"); +// singleLinks.put("ptc/55.jpg", "PTC.zip/PTC/Archon of the Triumvirate.full.jpg"); +// singleLinks.put("ptc/56.jpg", "PTC.zip/PTC/Hypersonic Dragon.full.jpg"); +// singleLinks.put("ptc/57.jpg", "PTC.zip/PTC/Carnival Hellsteed.full.jpg"); +// singleLinks.put("ptc/58.jpg", "PTC.zip/PTC/Corpsejack Menace.full.jpg"); +// singleLinks.put("ptc/59.jpg", "PTC.zip/PTC/Grove of the Guardian.full.jpg"); +// singleLinks.put("ptc/6.jpg", "PTC.zip/PTC/Lu Bu, Master-at-Arms.full.jpg"); +// singleLinks.put("ptc/60.jpg", "PTC.zip/PTC/Consuming Aberration.full.jpg"); +// singleLinks.put("ptc/61.jpg", "PTC.zip/PTC/Fathom Mage.full.jpg"); +// singleLinks.put("ptc/62.jpg", "PTC.zip/PTC/Foundry Champion.full.jpg"); +// singleLinks.put("ptc/63.jpg", "PTC.zip/PTC/Rubblehulk.full.jpg"); +// singleLinks.put("ptc/64.jpg", "PTC.zip/PTC/Treasury Thrull.full.jpg"); +// singleLinks.put("ptc/65.jpg", "PTC.zip/PTC/Maze's End.full.jpg"); +// singleLinks.put("ptc/66.jpg", "PTC.zip/PTC/Plains.66.full.jpg"); +// singleLinks.put("ptc/67.jpg", "PTC.zip/PTC/Megantic Sliver.full.jpg"); +// singleLinks.put("ptc/68.jpg", "PTC.zip/PTC/Celestial Archon.full.jpg"); +// singleLinks.put("ptc/69.jpg", "PTC.zip/PTC/Shipbreaker Kraken.full.jpg"); +// singleLinks.put("ptc/7.jpg", "PTC.zip/PTC/False Prophet.full.jpg"); +// singleLinks.put("ptc/70.jpg", "PTC.zip/PTC/Abhorrent Overlord.full.jpg"); +// singleLinks.put("ptc/71.jpg", "PTC.zip/PTC/Ember Swallower.full.jpg"); +// singleLinks.put("ptc/72.jpg", "PTC.zip/PTC/Anthousa, Setessan Hero.full.jpg"); +// singleLinks.put("ptc/73.jpg", "PTC.zip/PTC/Silent Sentinel.full.jpg"); +// singleLinks.put("ptc/74.jpg", "PTC.zip/PTC/Arbiter of the Ideal.full.jpg"); +// singleLinks.put("ptc/75.jpg", "PTC.zip/PTC/Eater of Hope.full.jpg"); +// singleLinks.put("ptc/76.jpg", "PTC.zip/PTC/Forgestoker Dragon.full.jpg"); +// singleLinks.put("ptc/77.jpg", "PTC.zip/PTC/Nessian Wilds Ravager.full.jpg"); +// singleLinks.put("ptc/78.jpg", "PTC.zip/PTC/Dawnbringer Charioteers.full.jpg"); +// singleLinks.put("ptc/79.jpg", "PTC.zip/PTC/Scourge of Fleets.full.jpg"); +// singleLinks.put("ptc/8.jpg", "PTC.zip/PTC/Lu Bu, Master-at-Arms.full.jpg"); +// singleLinks.put("ptc/80.jpg", "PTC.zip/PTC/Doomwake Giant.full.jpg"); +// singleLinks.put("ptc/81.jpg", "PTC.zip/PTC/Spawn of Thraxes.full.jpg"); +// singleLinks.put("ptc/82.jpg", "PTC.zip/PTC/Heroes' Bane.full.jpg"); +// singleLinks.put("ptc/83.jpg", "PTC.zip/PTC/Resolute Archangel.full.jpg"); +// singleLinks.put("ptc/84.jpg", "PTC.zip/PTC/Mercurial Pretender.full.jpg"); +// singleLinks.put("ptc/85.jpg", "PTC.zip/PTC/Indulgent Tormentor.full.jpg"); +// singleLinks.put("ptc/86.jpg", "PTC.zip/PTC/Siege Dragon.full.jpg"); +// singleLinks.put("ptc/87.jpg", "PTC.zip/PTC/Phytotitan.full.jpg"); +// singleLinks.put("ptc/88.jpg", "PTC.zip/PTC/Abzan Ascendancy.full.jpg"); +// singleLinks.put("ptc/89.jpg", "PTC.zip/PTC/Anafenza, the Foremost.full.jpg"); +// singleLinks.put("ptc/9.jpg", "PTC.zip/PTC/Overtaker.full.jpg"); +// singleLinks.put("ptc/90.jpg", "PTC.zip/PTC/Ankle Shanker.full.jpg"); +// singleLinks.put("ptc/91.jpg", "PTC.zip/PTC/Avalanche Tusker.full.jpg"); +// singleLinks.put("ptc/92.jpg", "PTC.zip/PTC/Bloodsoaked Champion.full.jpg"); +// singleLinks.put("ptc/93.jpg", "PTC.zip/PTC/Butcher of the Horde.full.jpg"); +// singleLinks.put("ptc/94.jpg", "PTC.zip/PTC/Crackling Doom.full.jpg"); +// singleLinks.put("ptc/95.jpg", "PTC.zip/PTC/Crater's Claws.full.jpg"); +// singleLinks.put("ptc/96.jpg", "PTC.zip/PTC/Deflecting Palm.full.jpg"); +// singleLinks.put("ptc/97.jpg", "PTC.zip/PTC/Dig Through Time.full.jpg"); +// singleLinks.put("ptc/98.jpg", "PTC.zip/PTC/Dragon-Style Twins.full.jpg"); +// singleLinks.put("ptc/99.jpg", "PTC.zip/PTC/Duneblast.full.jpg"); +// singleLinks.put("sus/1.jpg", "SUS.zip/SUS/Thran Quarry.full.jpg"); +// singleLinks.put("sus/10.jpg", "SUS.zip/SUS/Slith Firewalker.full.jpg"); +// singleLinks.put("sus/11.jpg", "SUS.zip/SUS/Royal Assassin.full.jpg"); +// singleLinks.put("sus/12.jpg", "SUS.zip/SUS/Sakura-Tribe Elder.full.jpg"); +// singleLinks.put("sus/13.jpg", "SUS.zip/SUS/Shard Phoenix.full.jpg"); +// singleLinks.put("sus/14.jpg", "SUS.zip/SUS/Soltari Priest.full.jpg"); +// singleLinks.put("sus/15.jpg", "SUS.zip/SUS/Whirling Dervish.full.jpg"); +// singleLinks.put("sus/16.jpg", "SUS.zip/SUS/Glorious Anthem.full.jpg"); +// singleLinks.put("sus/17.jpg", "SUS.zip/SUS/Elvish Champion.full.jpg"); +// singleLinks.put("sus/18.jpg", "SUS.zip/SUS/Mad Auntie.full.jpg"); +// singleLinks.put("sus/19.jpg", "SUS.zip/SUS/Slith Firewalker.full.jpg"); +// singleLinks.put("sus/2.jpg", "SUS.zip/SUS/Serra Avatar.full.jpg"); +// singleLinks.put("sus/20.jpg", "SUS.zip/SUS/Royal Assassin.full.jpg"); +// singleLinks.put("sus/21.jpg", "SUS.zip/SUS/Sakura-Tribe Elder.full.jpg"); +// singleLinks.put("sus/22.jpg", "SUS.zip/SUS/Shard Phoenix.full.jpg"); +// singleLinks.put("sus/23.jpg", "SUS.zip/SUS/Soltari Priest.full.jpg"); +// singleLinks.put("sus/24.jpg", "SUS.zip/SUS/Whirling Dervish.full.jpg"); +// singleLinks.put("sus/25.jpg", "SUS.zip/SUS/Glorious Anthem.full.jpg"); +// singleLinks.put("sus/26.jpg", "SUS.zip/SUS/Elvish Champion.full.jpg"); +// singleLinks.put("sus/27.jpg", "SUS.zip/SUS/Sakura-Tribe Elder.full.jpg"); +// singleLinks.put("sus/28.jpg", "SUS.zip/SUS/Shard Phoenix.full.jpg"); +// singleLinks.put("sus/29.jpg", "SUS.zip/SUS/Soltari Priest.full.jpg"); +// singleLinks.put("sus/3.jpg", "SUS.zip/SUS/Lord of Atlantis.full.jpg"); +// singleLinks.put("sus/30.jpg", "SUS.zip/SUS/Whirling Dervish.full.jpg"); +// singleLinks.put("sus/31.jpg", "SUS.zip/SUS/Glorious Anthem.full.jpg"); +// singleLinks.put("sus/32.jpg", "SUS.zip/SUS/Elvish Champion.full.jpg"); +// singleLinks.put("sus/4.jpg", "SUS.zip/SUS/Crusade.full.jpg"); +// singleLinks.put("sus/5.jpg", "SUS.zip/SUS/Elvish Lyrist.full.jpg"); +// singleLinks.put("sus/6.jpg", "SUS.zip/SUS/City of Brass.full.jpg"); +// singleLinks.put("sus/7.jpg", "SUS.zip/SUS/Volcanic Hammer.full.jpg"); +// singleLinks.put("sus/8.jpg", "SUS.zip/SUS/Giant Growth.full.jpg"); +// singleLinks.put("sus/9.jpg", "SUS.zip/SUS/Two-Headed Dragon.full.jpg"); +// singleLinks.put("ugin/1.jpg", "UGIN.zip/UGIN/Ugin, the Spirit Dragon.full.jpg"); +// singleLinks.put("ugin/113.jpg", "UGIN.zip/UGIN/Jeering Instigator.full.jpg"); +// singleLinks.put("ugin/123.jpg", "UGIN.zip/UGIN/Arashin War Beast.full.jpg"); +// singleLinks.put("ugin/129.jpg", "UGIN.zip/UGIN/Formless Nurturing.full.jpg"); +// singleLinks.put("ugin/131.jpg", "UGIN.zip/UGIN/Dragonscale Boon.full.jpg"); +// singleLinks.put("ugin/146.jpg", "UGIN.zip/UGIN/Wildcall.full.jpg"); +// singleLinks.put("ugin/161.jpg", "UGIN.zip/UGIN/Hewed Stone Retainers.full.jpg"); +// singleLinks.put("ugin/164.jpg", "UGIN.zip/UGIN/Ugin's Construct.full.jpg"); +// singleLinks.put("ugin/19.jpg", "UGIN.zip/UGIN/Mastery of the Unseen.full.jpg"); +// singleLinks.put("ugin/216.jpg", "UGIN.zip/UGIN/Altar of the Brood.full.jpg"); +// singleLinks.put("ugin/217.jpg", "UGIN.zip/UGIN/Briber's Purse.full.jpg"); +// singleLinks.put("ugin/220.jpg", "UGIN.zip/UGIN/Ghostfire Blade.full.jpg"); +// singleLinks.put("ugin/24.jpg", "UGIN.zip/UGIN/Smite the Monstrous.full.jpg"); +// singleLinks.put("ugin/26.jpg", "UGIN.zip/UGIN/Soul Summons.full.jpg"); +// singleLinks.put("ugin/30.jpg", "UGIN.zip/UGIN/Watcher of the Roost.full.jpg"); +// singleLinks.put("ugin/36.jpg", "UGIN.zip/UGIN/Jeskai Infiltrator.full.jpg"); +// singleLinks.put("ugin/46.jpg", "UGIN.zip/UGIN/Reality Shift.full.jpg"); +// singleLinks.put("ugin/48.jpg", "UGIN.zip/UGIN/Mystic of the Hidden Way.full.jpg"); +// singleLinks.put("ugin/59.jpg", "UGIN.zip/UGIN/Write into Being.full.jpg"); +// singleLinks.put("ugin/68.jpg", "UGIN.zip/UGIN/Debilitating Injury.full.jpg"); +// singleLinks.put("ugin/73.jpg", "UGIN.zip/UGIN/Grim Haruspex.full.jpg"); +// singleLinks.put("ugin/85.jpg", "UGIN.zip/UGIN/Sultai Emissary.full.jpg"); +// singleLinks.put("ugin/88.jpg", "UGIN.zip/UGIN/Ruthless Ripper.full.jpg"); +// singleLinks.put("ugin/96.jpg", "UGIN.zip/UGIN/Ainok Tracker.full.jpg"); +// singleLinks.put("ugin/97.jpg", "UGIN.zip/UGIN/Arc Lightning.full.jpg"); +// singleLinks.put("ugin/98.jpg", "UGIN.zip/UGIN/Fierce Invocation.full.jpg"); +// singleLinks.put("wmcq/1.jpg", "WMCQ.zip/WMCQ/Vengevine.full.jpg"); +// singleLinks.put("wmcq/2.jpg", "WMCQ.zip/WMCQ/Geist of Saint Traft.full.jpg"); +// singleLinks.put("wmcq/3.jpg", "WMCQ.zip/WMCQ/Thalia, Guardian of Thraben.full.jpg"); +// singleLinks.put("wmcq/4.jpg", "WMCQ.zip/WMCQ/Liliana of the Veil.full.jpg"); +// singleLinks.put("wmcq/5.jpg", "WMCQ.zip/WMCQ/Snapcaster Mage.full.jpg"); } @Override public String generateTokenUrl(CardDownloadData card) throws IOException { + try { + return generateURL(card); + } catch (Exception ex) { + java.util.logging.Logger.getLogger(GrabbagImageSource.class.getName()).log(Level.SEVERE, null, ex); + } return null; } @Override public int getTotalImages() { - if (copyUrlToImage == null) { + if (singleLinks == null) { setupLinks(); } - if (copyUrlToImage != null) { - return copyImageToUrl.size(); + if (singleLinks != null) { + return singleLinks.size(); } return -1; } @Override public boolean isTokenSource() { - return false; + return true; } - private String getSourceName(String httpImageUrl) { - if (httpImageUrl.startsWith("MTG")) { + private String getSourceName(CardDownloadData card, String httpImageUrl) { + if (card.getSet().equals("MTG")) { return "http://static.starcitygames.com/sales/cardscans/"; + } else if (card.getSet().equals("SWS")) { + return "http://i.imgur.com/"; } else { return "http://magiccards.info/scans/en/"; } } + @Override + public ArrayList getSupportedSets() { + ArrayList supportedSetsCopy = new ArrayList<>(); + supportedSetsCopy.addAll(supportedSets); + return supportedSetsCopy; + } + @Override public void doPause(String httpImageUrl) { if (!httpImageUrl.startsWith("/MTG")) { @@ -1696,4 +2019,18 @@ public enum GrabbagImageSource implements CardImageSource { } } } + + @Override + public boolean isImageProvided(String setCode, String cardName) { + if (singleLinks == null) { + setupLinks(); + } + return singleLinks.containsKey(setCode + "/" + cardName); + } + + @Override + public boolean isSetSupportedComplete(String setCode) { + return false; + } + } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java index 3052a2dc41..78f55e9b7a 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java @@ -1,7 +1,10 @@ package org.mage.plugins.card.dl.sources; +import java.util.ArrayList; import java.util.HashMap; +import java.util.LinkedHashSet; import java.util.Map; +import java.util.Set; import mage.client.dialog.PreferencesDialog; import org.mage.plugins.card.images.CardDownloadData; import org.mage.plugins.card.utils.CardImageUtils; @@ -13,6 +16,202 @@ import org.mage.plugins.card.utils.CardImageUtils; public enum MagicCardsImageSource implements CardImageSource { instance; + + private static final Set supportedSets = new LinkedHashSet() { + { + // add("PTC"); // Prerelease Events + add("LEA"); + add("LEB"); + add("2ED"); + add("ARN"); + add("ATQ"); + add("3ED"); + add("LEG"); + add("DRK"); + add("FEM"); + add("4ED"); + add("ICE"); + add("CHR"); + add("HML"); + add("ALL"); + add("MIR"); + add("VIS"); + add("5ED"); + add("POR"); + add("WTH"); + add("TMP"); + add("STH"); + add("EXO"); + add("P02"); + add("UGL"); + add("USG"); + add("DD3DVD"); + add("DD3EVG"); + add("DD3GVL"); + add("DD3JVC"); + + add("ULG"); + add("6ED"); + add("UDS"); + add("PTK"); + add("S99"); + add("MMQ"); + // add("BRB");Battle Royale Box Set + add("NEM"); + add("S00"); + add("PCY"); + add("INV"); + // add("BTD"); // Beatdown Boxset + add("PLS"); + add("7ED"); + add("APC"); + add("ODY"); + // add("DKM"); // Deckmasters 2001 + add("TOR"); + add("JUD"); + add("ONS"); + add("LGN"); + add("SCG"); + add("8ED"); + add("MRD"); + add("DST"); + add("5DN"); + add("CHK"); + add("UNH"); + add("BOK"); + add("SOK"); + add("9ED"); + add("RAV"); + add("GPT"); + add("DIS"); + add("CSP"); + add("TSP"); + add("TSB"); + add("PLC"); + add("FUT"); + add("10E"); + add("MED"); + add("LRW"); + add("EVG"); + add("MOR"); + add("SHM"); + add("EVE"); + add("DRB"); + add("ME2"); + add("ALA"); + add("DD2"); + add("CON"); + add("DDC"); + add("ARB"); + add("M10"); + // add("TD0"); // Magic Online Deck Series + add("V09"); + add("HOP"); + add("ME3"); + add("ZEN"); + add("DDD"); + add("H09"); + add("WWK"); + add("DDE"); + add("ROE"); + add("DPA"); + add("ARC"); + add("M11"); + add("V10"); + add("DDF"); + add("SOM"); + // add("TD0"); // Commander Theme Decks + add("PD2"); + add("ME4"); + add("MBS"); + add("DDG"); + add("NPH"); + add("CMD"); + add("M12"); + add("V11"); + add("DDH"); + add("ISD"); + add("PD3"); + add("DKA"); + add("DDI"); + add("AVR"); + add("PC2"); + add("M13"); + add("V12"); + add("DDJ"); + add("RTR"); + add("CM1"); + // add("TD2"); // Duel Decks: Mirrodin Pure vs. New Phyrexia + add("GTC"); + add("DDK"); + add("DGM"); + add("MMA"); + add("M14"); + add("V13"); + add("DDL"); + add("THS"); + add("C13"); + add("BNG"); + add("DDM"); + add("JOU"); + // add("MD1"); // Modern Event Deck + add("CNS"); + add("VMA"); + add("M15"); + add("V14"); + add("DDN"); + add("KTK"); + add("C14"); + // add("DD3"); // Duel Decks Anthology + add("FRF"); + add("DDO"); + add("DTK"); + add("TPR"); + add("MM2"); + add("ORI"); + add("V15"); + add("DDP"); + add("BFZ"); + add("EXP"); + add("C15"); + // add("PZ1"); // Legendary Cube + add("OGW"); + add("DDQ"); + add("W16"); + add("SOI"); + add("EMA"); + add("EMN"); + add("V16"); + add("CN2"); + add("DDR"); + add("KLD"); + add("MPS"); + // add("PZ2"); // Treasure Chests + add("C16"); + add("PCA"); + add("AER"); + add("MM3"); + add("DDS"); + add("W17"); + add("AKH"); + add("MPS"); + add("CMA"); + add("E01"); + add("HOU"); + add("C17"); +// add("XLN"); +// add("DDT"); +// add("IMA"); +// add("E02"); +// add("V17"); +// add("UST"); +// add("RIX"); +// add("A25"); +// add("DOM"); +// add("M19"); + } + }; + private static final Map setNameTokenReplacement = new HashMap() { { put("10E", "tenth-edition"); @@ -146,12 +345,11 @@ public enum MagicCardsImageSource implements CardImageSource { return "magiccards.info"; } - @Override public String getNextHttpImageUrl() { return null; } - + @Override public String getFileForHttpImage(String httpImageUrl) { return null; @@ -210,18 +408,26 @@ public enum MagicCardsImageSource implements CardImageSource { public float getAverageSize() { return 70.0f; } - + @Override public int getTotalImages() { return -1; } - + @Override public boolean isTokenSource() { return true; } - + + @Override + public ArrayList getSupportedSets() { + ArrayList supportedSetsCopy = new ArrayList<>(); + supportedSetsCopy.addAll(supportedSets); + return supportedSetsCopy; + } + @Override public void doPause(String httpImageUrl) { } + } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagidexImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagidexImageSource.java index 2c0ab80e75..7261ad4cbc 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagidexImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagidexImageSource.java @@ -24,20 +24,221 @@ * 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 org.mage.plugins.card.dl.sources; -import org.mage.plugins.card.images.CardDownloadData; import java.net.URI; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Set; +import org.mage.plugins.card.images.CardDownloadData; /** * * @author Pete Rossi */ +public enum MagidexImageSource implements CardImageSource { + instance; -public enum MagidexImageSource implements CardImageSource { - instance; + private final Set supportedSets; + + MagidexImageSource() { + supportedSets = new LinkedHashSet<>(); + // supportedSets.add("PTC"); // Prerelease Events + // supportedSets.add("FNMP"); + supportedSets.add("JR"); + supportedSets.add("LEA"); + supportedSets.add("LEB"); + supportedSets.add("2ED"); + supportedSets.add("ARN"); + supportedSets.add("ATQ"); + supportedSets.add("3ED"); + supportedSets.add("LEG"); + supportedSets.add("DRK"); + supportedSets.add("FEM"); + supportedSets.add("4ED"); + supportedSets.add("ICE"); + supportedSets.add("CHR"); + supportedSets.add("HML"); + supportedSets.add("ALL"); + supportedSets.add("MIR"); + supportedSets.add("VIS"); + supportedSets.add("5ED"); + supportedSets.add("POR"); + supportedSets.add("WTH"); + supportedSets.add("TMP"); + supportedSets.add("STH"); + supportedSets.add("EXO"); + supportedSets.add("P02"); + supportedSets.add("UGL"); + supportedSets.add("USG"); + supportedSets.add("DD3DVD"); + supportedSets.add("DD3EVG"); + supportedSets.add("DD3GVL"); + supportedSets.add("DD3JVC"); + + supportedSets.add("ULG"); + supportedSets.add("6ED"); + supportedSets.add("UDS"); + supportedSets.add("PTK"); + supportedSets.add("S99"); + supportedSets.add("MMQ"); + // supportedSets.add("BRB");Battle Royale Box Set + supportedSets.add("NEM"); + supportedSets.add("S00"); + supportedSets.add("PCY"); + supportedSets.add("INV"); + // supportedSets.add("BTD"); // Beatdown Boxset + supportedSets.add("PLS"); + supportedSets.add("7ED"); + supportedSets.add("APC"); + supportedSets.add("ODY"); + // supportedSets.add("DKM"); // Deckmasters 2001 + supportedSets.add("TOR"); + supportedSets.add("JUD"); + supportedSets.add("ONS"); + supportedSets.add("LGN"); + supportedSets.add("SCG"); + supportedSets.add("8ED"); + supportedSets.add("MRD"); + supportedSets.add("DST"); + supportedSets.add("5DN"); + supportedSets.add("CHK"); + supportedSets.add("UNH"); + supportedSets.add("BOK"); + supportedSets.add("SOK"); + supportedSets.add("9ED"); + supportedSets.add("RAV"); + supportedSets.add("GPT"); + supportedSets.add("DIS"); + supportedSets.add("CSP"); + supportedSets.add("TSP"); + supportedSets.add("TSB"); + supportedSets.add("PLC"); + supportedSets.add("FUT"); + supportedSets.add("10E"); + supportedSets.add("MED"); + supportedSets.add("LRW"); + supportedSets.add("EVG"); + supportedSets.add("MOR"); + supportedSets.add("SHM"); + supportedSets.add("EVE"); + supportedSets.add("DRB"); + supportedSets.add("ME2"); + supportedSets.add("ALA"); + supportedSets.add("DD2"); + supportedSets.add("CON"); + supportedSets.add("DDC"); + supportedSets.add("ARB"); + supportedSets.add("M10"); + // supportedSets.add("TD0"); // Magic Online Deck Series + supportedSets.add("V09"); + supportedSets.add("HOP"); + supportedSets.add("ME3"); + supportedSets.add("ZEN"); + supportedSets.add("DDD"); + supportedSets.add("H09"); + supportedSets.add("WWK"); + supportedSets.add("DDE"); + supportedSets.add("ROE"); + supportedSets.add("DPA"); + supportedSets.add("ARC"); + supportedSets.add("M11"); + supportedSets.add("V10"); + supportedSets.add("DDF"); + supportedSets.add("SOM"); + // supportedSets.add("TD0"); // Commander Theme Decks + supportedSets.add("PD2"); + supportedSets.add("ME4"); + supportedSets.add("MBS"); + supportedSets.add("DDG"); + supportedSets.add("NPH"); + supportedSets.add("CMD"); + supportedSets.add("M12"); + supportedSets.add("V11"); + supportedSets.add("DDH"); + supportedSets.add("ISD"); + supportedSets.add("PD3"); + supportedSets.add("DKA"); + supportedSets.add("DDI"); + supportedSets.add("AVR"); + supportedSets.add("PC2"); + supportedSets.add("M13"); + supportedSets.add("V12"); + supportedSets.add("DDJ"); + supportedSets.add("RTR"); + supportedSets.add("CM1"); + // supportedSets.add("TD2"); // Duel Decks: Mirrodin Pure vs. New Phyrexia + supportedSets.add("GTC"); + supportedSets.add("DDK"); + supportedSets.add("DGM"); + supportedSets.add("MMA"); + supportedSets.add("M14"); + supportedSets.add("V13"); + supportedSets.add("DDL"); + supportedSets.add("THS"); + supportedSets.add("C13"); + supportedSets.add("BNG"); + supportedSets.add("DDM"); + supportedSets.add("JOU"); + // supportedSets.add("MD1"); // Modern Event Deck + supportedSets.add("CNS"); + supportedSets.add("VMA"); + supportedSets.add("M15"); + supportedSets.add("V14"); + supportedSets.add("DDN"); + supportedSets.add("KTK"); + supportedSets.add("C14"); + // supportedSets.add("DD3"); // Duel Decks Anthology + supportedSets.add("FRF"); + supportedSets.add("DDO"); + supportedSets.add("DTK"); + supportedSets.add("TPR"); + supportedSets.add("MM2"); + supportedSets.add("ORI"); + supportedSets.add("V15"); + supportedSets.add("DDP"); + supportedSets.add("BFZ"); + supportedSets.add("EXP"); + supportedSets.add("C15"); + // supportedSets.add("PZ1"); // Legendary Cube + supportedSets.add("OGW"); + supportedSets.add("DDQ"); + supportedSets.add("W16"); + supportedSets.add("SOI"); + supportedSets.add("EMA"); + supportedSets.add("EMN"); + supportedSets.add("V16"); + supportedSets.add("CN2"); + supportedSets.add("DDR"); + supportedSets.add("KLD"); + supportedSets.add("MPS"); + // supportedSets.add("PZ2"); // Treasure Chests + supportedSets.add("C16"); + supportedSets.add("PCA"); + supportedSets.add("AER"); + supportedSets.add("MM3"); + supportedSets.add("DDS"); + supportedSets.add("W17"); + supportedSets.add("AKH"); + supportedSets.add("MPS"); + supportedSets.add("CMA"); + supportedSets.add("E01"); + supportedSets.add("HOU"); + supportedSets.add("C17"); +// supportedSets.add("XLN"); +// supportedSets.add("DDT"); +// supportedSets.add("IMA"); +// supportedSets.add("E02"); +// supportedSets.add("V17"); +// supportedSets.add("UST"); +// supportedSets.add("RIX"); +// supportedSets.add("A25"); +// supportedSets.add("DOM"); +// supportedSets.add("M19"); + } @Override public String getSourceName() { @@ -68,10 +269,23 @@ public enum MagidexImageSource implements CardImageSource { } // This will properly escape the url - URI uri = new URI("http", "magidex.com", "/extstatic/card/" + cardSet + '/' + cardDownloadName + ".jpg", null, null); - return uri.toASCIIString(); + URI uri = new URI("http", "magidex.com", "/extstatic/card/" + formatSetName(cardSet) + '/' + cardDownloadName + ".jpg", null, null); + return uri.toASCIIString(); } + private String formatSetName(String setName) { + if (setNameReplacement.containsKey(setName)) { + setName = setNameReplacement.get(setName); + } + return setName; + } + + private static final Map setNameReplacement = new HashMap() { + { + put("JR", "pJGP"); + } + }; + @Override public String generateTokenUrl(CardDownloadData card) { return null; @@ -95,4 +309,11 @@ public enum MagidexImageSource implements CardImageSource { @Override public void doPause(String httpImageUrl) { } + + @Override + public ArrayList getSupportedSets() { + ArrayList supportedSetsCopy = new ArrayList<>(); + supportedSetsCopy.addAll(supportedSets); + return supportedSetsCopy; + } } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MtgOnlTokensImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MtgOnlTokensImageSource.java index 56f42fac5a..618b4cf464 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MtgOnlTokensImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MtgOnlTokensImageSource.java @@ -27,11 +27,10 @@ */ package org.mage.plugins.card.dl.sources; -import org.apache.log4j.Logger; -import org.mage.plugins.card.images.CardDownloadData; - import java.io.IOException; import java.util.HashMap; +import org.apache.log4j.Logger; +import org.mage.plugins.card.images.CardDownloadData; /** * @@ -368,13 +367,19 @@ public enum MtgOnlTokensImageSource implements CardImageSource { } return -1; } - + @Override public boolean isTokenSource() { return true; } - + @Override public void doPause(String httpImageUrl) { } + + @Override + public boolean isImageProvided(String setCode, String cardName) { + return true; + } + } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MythicspoilerComSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MythicspoilerComSource.java index 6f6d8cce20..03ba31aac4 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MythicspoilerComSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MythicspoilerComSource.java @@ -35,9 +35,11 @@ import java.net.InetSocketAddress; import java.net.Proxy; import java.net.URL; import java.net.URLEncoder; +import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashMap; +import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; import java.util.prefs.Preferences; @@ -57,11 +59,12 @@ import org.mage.plugins.card.images.CardDownloadData; public enum MythicspoilerComSource implements CardImageSource { instance; - private Map setsAliases; - private Map cardNameAliases; - private Map> cardNameAliasesStart; + private final Map setsAliases; + private final Map cardNameAliases; + private final Map> cardNameAliasesStart; private final Map> sets; - + private final Set supportedSets; + private final Map> manualLinks; @Override public String getSourceName() { @@ -69,9 +72,192 @@ public enum MythicspoilerComSource implements CardImageSource { } MythicspoilerComSource() { + supportedSets = new LinkedHashSet<>(); +// supportedSets.add("LEA"); + supportedSets.add("LEB"); +// supportedSets.add("2ED"); + supportedSets.add("ARN"); + supportedSets.add("ATQ"); + supportedSets.add("3ED"); + supportedSets.add("LEG"); + supportedSets.add("DRK"); + supportedSets.add("FEM"); +// supportedSets.add("4ED"); + supportedSets.add("ICE"); + supportedSets.add("CHR"); + supportedSets.add("HML"); + supportedSets.add("ALL"); + supportedSets.add("MIR"); + supportedSets.add("VIS"); +// supportedSets.add("5ED"); +// supportedSets.add("POR"); + supportedSets.add("WTH"); + supportedSets.add("TMP"); + supportedSets.add("STH"); + supportedSets.add("EXO"); +// supportedSets.add("P02"); +// supportedSets.add("UGL"); + supportedSets.add("USG"); +// supportedSets.add("DD3DVD"); +// supportedSets.add("DD3EVG"); +// supportedSets.add("DD3GVL"); +// supportedSets.add("DD3JVC"); + +// supportedSets.add("ULG"); +// supportedSets.add("6ED"); + supportedSets.add("UDS"); + supportedSets.add("PTK"); +// supportedSets.add("S99"); + supportedSets.add("MMQ"); + // supportedSets.add("BRB");Battle Royale Box Set + supportedSets.add("NEM"); +// supportedSets.add("S00"); + supportedSets.add("PCY"); + supportedSets.add("INV"); + // supportedSets.add("BTD"); // Beatdown Boxset + supportedSets.add("PLS"); + supportedSets.add("7ED"); + supportedSets.add("APC"); + supportedSets.add("ODY"); + // supportedSets.add("DKM"); // Deckmasters 2001 + supportedSets.add("TOR"); + supportedSets.add("JUD"); + supportedSets.add("ONS"); + supportedSets.add("LGN"); + supportedSets.add("SCG"); + supportedSets.add("8ED"); + supportedSets.add("MRD"); + supportedSets.add("DST"); + supportedSets.add("5DN"); + supportedSets.add("CHK"); + supportedSets.add("UNH"); + supportedSets.add("BOK"); + supportedSets.add("SOK"); + supportedSets.add("9ED"); + supportedSets.add("RAV"); + supportedSets.add("GPT"); + supportedSets.add("DIS"); + supportedSets.add("CSP"); + supportedSets.add("TSP"); + supportedSets.add("TSB"); + supportedSets.add("PLC"); + supportedSets.add("FUT"); + supportedSets.add("10E"); + supportedSets.add("MED"); + supportedSets.add("LRW"); + supportedSets.add("EVG"); + supportedSets.add("MOR"); + supportedSets.add("SHM"); + supportedSets.add("EVE"); + supportedSets.add("DRB"); +// supportedSets.add("ME2"); + supportedSets.add("ALA"); +// supportedSets.add("DD2"); + supportedSets.add("CON"); +// supportedSets.add("DDC"); + supportedSets.add("ARB"); + supportedSets.add("M10"); + // supportedSets.add("TD0"); // Magic Online Deck Series +// supportedSets.add("V09"); + supportedSets.add("HOP"); +// supportedSets.add("ME3"); + supportedSets.add("ZEN"); +// supportedSets.add("DDD"); + supportedSets.add("H09"); + supportedSets.add("WWK"); +// supportedSets.add("DDE"); + supportedSets.add("ROE"); + supportedSets.add("DPA"); + supportedSets.add("ARC"); + supportedSets.add("M11"); +// supportedSets.add("V10"); +// supportedSets.add("DDF"); + supportedSets.add("SOM"); +// supportedSets.add("TD0"); // Commander Theme Decks +// supportedSets.add("PD2"); +// supportedSets.add("ME4"); + supportedSets.add("MBS"); +// supportedSets.add("DDG"); + supportedSets.add("NPH"); + supportedSets.add("CMD"); + supportedSets.add("M12"); + supportedSets.add("V11"); +// supportedSets.add("DDH"); + supportedSets.add("ISD"); + supportedSets.add("PD3"); + supportedSets.add("DKA"); +// supportedSets.add("DDI"); + supportedSets.add("AVR"); +// supportedSets.add("PC2"); + supportedSets.add("M13"); +// supportedSets.add("V12"); +// supportedSets.add("DDJ"); + supportedSets.add("RTR"); +// supportedSets.add("CM1"); + // supportedSets.add("TD2"); // Duel Decks: Mirrodin Pure vs. New Phyrexia + supportedSets.add("GTC"); +// supportedSets.add("DDK"); + supportedSets.add("DGM"); +// supportedSets.add("MMA"); + supportedSets.add("M14"); + supportedSets.add("V13"); +// supportedSets.add("DDL"); + supportedSets.add("THS"); + supportedSets.add("C13"); + supportedSets.add("BNG"); +// supportedSets.add("DDM"); + supportedSets.add("JOU"); + // supportedSets.add("MD1"); // Modern Event Deck +// supportedSets.add("CNS"); +// supportedSets.add("VMA"); + supportedSets.add("M15"); + supportedSets.add("V14"); + supportedSets.add("DDN"); + supportedSets.add("KTK"); + supportedSets.add("C14"); + // supportedSets.add("DD3"); // Duel Decks Anthology + supportedSets.add("FRF"); +// supportedSets.add("DDO"); +// supportedSets.add("DTK"); +// supportedSets.add("TPR"); + supportedSets.add("MM2"); + supportedSets.add("ORI"); +// supportedSets.add("V15"); +// supportedSets.add("DDP"); + supportedSets.add("BFZ"); +// supportedSets.add("EXP"); + supportedSets.add("C15"); + // supportedSets.add("PZ1"); // Legendary Cube + supportedSets.add("OGW"); +// supportedSets.add("DDQ"); +// supportedSets.add("W16"); + supportedSets.add("SOI"); + supportedSets.add("EMA"); + supportedSets.add("EMN"); +// supportedSets.add("V16"); + supportedSets.add("CN2"); +// supportedSets.add("DDR"); + supportedSets.add("KLD"); +// supportedSets.add("MPS"); + // supportedSets.add("PZ2"); + supportedSets.add("C16"); +// supportedSets.add("PCA"); + supportedSets.add("AER"); + supportedSets.add("MM3"); +// supportedSets.add("W17"); + supportedSets.add("AKH"); + supportedSets.add("MPS"); + supportedSets.add("CMA"); + supportedSets.add("E01"); + supportedSets.add("HOU"); + supportedSets.add("C17"); + supportedSets.add("IMA"); + supportedSets.add("XLN"); + sets = new LinkedHashMap<>(); setsAliases = new HashMap<>(); setsAliases.put("exp", "bfz"); + setsAliases.put("xln", "ixa"); cardNameAliases = new HashMap<>(); // set+wrong name from web side => correct card name cardNameAliases.put("MM2-otherwordlyjourney", "otherworldlyjourney"); @@ -88,6 +274,25 @@ public enum MythicspoilerComSource implements CardImageSource { cardNameAliases.put("AKH-reducerumble", "reducerubble"); cardNameAliases.put("AKH-forsakethewordly", "forsaketheworldly"); cardNameAliases.put("AKH-kefnatsmonument", "kefnetsmonument"); + cardNameAliases.put("XLN-kinjaliscaller", "kinjalliscaller"); + cardNameAliases.put("XLN-lookoutsdecision", "lookoutsdispersal"); + cardNameAliases.put("XLN-infuriatedgladiodon", "ragingswordtooth"); + cardNameAliases.put("XLN-redoubledvolley", "repeatingbarrage"); + + // + manualLinks = new HashMap<>(); + HashMap links = new HashMap<>(); + links.put("templeofaclazotz", "templeofaclazotz"); + links.put("conquerorsfoothold", "conquerorsfoothold"); + links.put("primalwellspring", "primalwellspring"); + links.put("azcantathesunkenruin", "azcantathesunkenruin"); + links.put("spiresoforazca", "spiresoforazca"); + links.put("treasurecove", "treasurecove"); + links.put("itlimoccradleofthesun", "itlimoccradleofthesun"); + links.put("lostvale", "lostvale"); + links.put("adantothefirstfort", "adantothefirstport"); + links.put("spitfirebastion", "spitfirebastion"); + manualLinks.put("XLN", links); cardNameAliasesStart = new HashMap<>(); HashSet names = new HashSet<>(); @@ -184,7 +389,12 @@ public enum MythicspoilerComSource implements CardImageSource { pageLinks.put(cardName, baseUrl + cardLink); } } - + Map linksToAdd = manualLinks.get(cardSet); + if (linksToAdd != null) { + for (Map.Entry link : linksToAdd.entrySet()) { + pageLinks.put(link.getKey(), baseUrl + "cards/" + link.getValue() + ".jpg"); + } + } return pageLinks; } @@ -243,4 +453,12 @@ public enum MythicspoilerComSource implements CardImageSource { @Override public void doPause(String httpImageUrl) { } + + @Override + public ArrayList getSupportedSets() { + ArrayList supportedSetsCopy = new ArrayList<>(); + supportedSetsCopy.addAll(supportedSets); + return supportedSetsCopy; + } + } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java index 1166e40fc8..759a9bdacf 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java @@ -1,21 +1,223 @@ package org.mage.plugins.card.dl.sources; -import org.mage.plugins.card.images.CardDownloadData; - +import java.util.ArrayList; import java.util.HashMap; +import java.util.LinkedHashSet; import java.util.Map; +import java.util.Set; +import org.mage.plugins.card.images.CardDownloadData; /** * @author Quercitron * */ -public enum ScryfallImageSource implements CardImageSource { +public enum ScryfallImageSource implements CardImageSource { instance; + private final Set supportedSets; + + ScryfallImageSource() { + supportedSets = new LinkedHashSet<>(); + // supportedSets.add("PTC"); // + supportedSets.add("LEA"); + supportedSets.add("LEB"); + supportedSets.add("2ED"); + supportedSets.add("ARN"); + supportedSets.add("ATQ"); + supportedSets.add("3ED"); + supportedSets.add("LEG"); + supportedSets.add("DRK"); + supportedSets.add("FEM"); + supportedSets.add("4ED"); + supportedSets.add("ICE"); + supportedSets.add("CHR"); + supportedSets.add("HML"); + supportedSets.add("ALL"); + supportedSets.add("MIR"); + supportedSets.add("VIS"); + supportedSets.add("5ED"); + supportedSets.add("POR"); + supportedSets.add("WTH"); + supportedSets.add("TMP"); + supportedSets.add("STH"); + supportedSets.add("EXO"); + supportedSets.add("P02"); + supportedSets.add("UGL"); + supportedSets.add("USG"); + supportedSets.add("DD3DVD"); + supportedSets.add("DD3EVG"); + supportedSets.add("DD3GVL"); + supportedSets.add("DD3JVC"); + + supportedSets.add("ULG"); + supportedSets.add("6ED"); + supportedSets.add("UDS"); + supportedSets.add("PTK"); + supportedSets.add("S99"); + supportedSets.add("MMQ"); + // supportedSets.add("BRB");Battle Royale Box Set + supportedSets.add("NEM"); + supportedSets.add("S00"); + supportedSets.add("PCY"); + supportedSets.add("INV"); + // supportedSets.add("BTD"); // Beatdown Boxset + supportedSets.add("PLS"); + supportedSets.add("7ED"); + supportedSets.add("APC"); + supportedSets.add("ODY"); + // supportedSets.add("DKM"); // Deckmasters 2001 + supportedSets.add("TOR"); + supportedSets.add("JUD"); + supportedSets.add("ONS"); + supportedSets.add("LGN"); + supportedSets.add("SCG"); + supportedSets.add("8ED"); + supportedSets.add("MRD"); + supportedSets.add("DST"); + supportedSets.add("5DN"); + supportedSets.add("CHK"); + supportedSets.add("UNH"); + supportedSets.add("BOK"); + supportedSets.add("SOK"); + supportedSets.add("9ED"); + supportedSets.add("RAV"); + supportedSets.add("GPT"); + supportedSets.add("DIS"); + supportedSets.add("CSP"); + supportedSets.add("TSP"); + supportedSets.add("TSB"); + supportedSets.add("PLC"); + supportedSets.add("FUT"); + supportedSets.add("10E"); + supportedSets.add("MED"); + supportedSets.add("LRW"); + supportedSets.add("EVG"); + supportedSets.add("MOR"); + supportedSets.add("SHM"); + supportedSets.add("EVE"); + supportedSets.add("DRB"); + supportedSets.add("ME2"); + supportedSets.add("ALA"); + supportedSets.add("DD2"); + supportedSets.add("CON"); + supportedSets.add("DDC"); + supportedSets.add("ARB"); + supportedSets.add("M10"); + // supportedSets.add("TD0"); // Magic Online Deck Series + supportedSets.add("V09"); + supportedSets.add("HOP"); + supportedSets.add("ME3"); + supportedSets.add("ZEN"); + supportedSets.add("DDD"); + supportedSets.add("H09"); + supportedSets.add("WWK"); + supportedSets.add("DDE"); + supportedSets.add("ROE"); + supportedSets.add("DPA"); + supportedSets.add("ARC"); + supportedSets.add("M11"); + supportedSets.add("V10"); + supportedSets.add("DDF"); + supportedSets.add("SOM"); + // supportedSets.add("TD0"); // Commander Theme Decks + supportedSets.add("PD2"); + supportedSets.add("ME4"); + supportedSets.add("MBS"); + supportedSets.add("DDG"); + supportedSets.add("NPH"); + supportedSets.add("CMD"); + supportedSets.add("M12"); + supportedSets.add("V11"); + supportedSets.add("DDH"); + supportedSets.add("ISD"); + supportedSets.add("PD3"); + supportedSets.add("DKA"); + supportedSets.add("DDI"); + supportedSets.add("AVR"); + supportedSets.add("PC2"); + supportedSets.add("M13"); + supportedSets.add("V12"); + supportedSets.add("DDJ"); + supportedSets.add("RTR"); + supportedSets.add("CM1"); + // supportedSets.add("TD2"); // Duel Decks: Mirrodin Pure vs. New Phyrexia + supportedSets.add("GTC"); + supportedSets.add("DDK"); + supportedSets.add("DGM"); + supportedSets.add("MMA"); + supportedSets.add("M14"); + supportedSets.add("V13"); + supportedSets.add("DDL"); + supportedSets.add("THS"); + supportedSets.add("C13"); + supportedSets.add("BNG"); + supportedSets.add("DDM"); + supportedSets.add("JOU"); + // supportedSets.add("MD1"); // Modern Event Deck + supportedSets.add("CNS"); + supportedSets.add("VMA"); + supportedSets.add("M15"); + supportedSets.add("V14"); + supportedSets.add("DDN"); + supportedSets.add("KTK"); + supportedSets.add("C14"); + // supportedSets.add("DD3"); // Duel Decks Anthology + supportedSets.add("FRF"); + supportedSets.add("DDO"); + supportedSets.add("DTK"); + supportedSets.add("TPR"); + supportedSets.add("MM2"); + supportedSets.add("ORI"); + supportedSets.add("V15"); + supportedSets.add("DDP"); + supportedSets.add("BFZ"); + supportedSets.add("EXP"); + supportedSets.add("C15"); + // supportedSets.add("PZ1"); // Legendary Cube + supportedSets.add("OGW"); + supportedSets.add("DDQ"); + supportedSets.add("W16"); + supportedSets.add("SOI"); + supportedSets.add("EMA"); + supportedSets.add("EMN"); + supportedSets.add("V16"); + supportedSets.add("CN2"); + supportedSets.add("DDR"); + supportedSets.add("KLD"); + supportedSets.add("MPS"); + // supportedSets.add("PZ2"); + supportedSets.add("C16"); + supportedSets.add("PCA"); + supportedSets.add("AER"); + supportedSets.add("MM3"); + supportedSets.add("DDS"); + supportedSets.add("W17"); + supportedSets.add("AKH"); + supportedSets.add("MPS"); + supportedSets.add("CMA"); + supportedSets.add("E01"); + supportedSets.add("HOU"); + supportedSets.add("C17"); + supportedSets.add("XLN"); +// supportedSets.add("DDT"); + supportedSets.add("IMA"); +// supportedSets.add("E02"); +// supportedSets.add("V17"); +// supportedSets.add("UST"); +// supportedSets.add("RIX"); +// supportedSets.add("A25"); +// supportedSets.add("DOM"); +// supportedSets.add("M19"); + + } + @Override public String generateURL(CardDownloadData card) throws Exception { - return "https://api.scryfall.com/cards/" + formatSetName(card.getSet()) + "/" + card.getCollectorId() + "?format=image"; + return "https://api.scryfall.com/cards/" + formatSetName(card.getSet()) + "/" + + card.getCollectorId() + + (card.isSecondSide() ? "b" : "") + + "?format=image"; } @Override @@ -40,7 +242,7 @@ public enum ScryfallImageSource implements CardImageSource { @Override public float getAverageSize() { - return 240; + return 90; } @Override @@ -75,4 +277,11 @@ public enum ScryfallImageSource implements CardImageSource { put("MBP", "pmei"); } }; + + @Override + public ArrayList getSupportedSets() { + ArrayList supportedSetsCopy = new ArrayList<>(); + supportedSetsCopy.addAll(supportedSets); + return supportedSetsCopy; + } } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/TokensMtgImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/TokensMtgImageSource.java index 2f58b13a2c..0a2de30729 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/TokensMtgImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/TokensMtgImageSource.java @@ -27,9 +27,6 @@ */ package org.mage.plugins.card.dl.sources; -import org.apache.log4j.Logger; -import org.mage.plugins.card.images.CardDownloadData; - import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; @@ -37,8 +34,14 @@ import java.io.InputStreamReader; import java.net.URL; import java.util.ArrayList; import java.util.HashMap; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import java.util.Set; +import java.util.logging.Level; +import org.apache.log4j.Logger; +import org.mage.plugins.card.images.CardDownloadData; +import org.mage.plugins.card.images.DownloadPictures; /** * @@ -46,11 +49,12 @@ import java.util.Map; */ public enum TokensMtgImageSource implements CardImageSource { - instance; + instance; private static final Logger logger = Logger.getLogger(TokensMtgImageSource.class); - - private List tokensData; + // [[EXP/Name, TokenData> + private HashMap> tokensData; + private static final Set supportedSets = new LinkedHashSet(); private final Object tokensDataSync = new Object(); @@ -100,7 +104,12 @@ public enum TokensMtgImageSource implements CardImageSource { "Sorin", "Tamiyo", "Teferi", - "Venser",}; + "Venser", + // Custom Emblems + "Yoda", + "Obi-Wan Kenobi", + "Aurra Sing" + }; private static final Map SET_NAMES_REPLACEMENT = new HashMap() { { @@ -134,36 +143,31 @@ public enum TokensMtgImageSource implements CardImageSource { // e.g. http://tokens.mtg.onl/tokens/ORI_010-Thopter.jpg -- token number 010 // We don't know these numbers, but we can take them from a file // with tokens information that can be downloaded from the site. - List newTokensData = getTokensData(); - - if (newTokensData.isEmpty()) { + if (tokensData.isEmpty()) { + logger.info("Source " + getSourceName() + " provides no token data."); return null; } - List matchedTokens = new ArrayList<>(); - for (TokenData token : newTokensData) { - if (name.equalsIgnoreCase(token.getName()) && set.equalsIgnoreCase(token.getExpansionSetCode())) { - matchedTokens.add(token); - } + String key = set + "/" + name; + List list = tokensData.get(key); + if (list == null) { + logger.info("Could not find data for token " + name + ", set " + set + "."); + return null; } -// -// if (matchedTokens.isEmpty()) { -// logger.info("Could not find data for token " + name + ", set " + set + "."); -// return null; -// } TokenData tokenData; if (type == 0) { - if (matchedTokens.size() > 1) { + if (list.size() > 1) { logger.info("Multiple images were found for token " + name + ", set " + set + '.'); } - tokenData = matchedTokens.get(0); + logger.info("Token found: " + name + ", set " + set + '.'); + tokenData = list.get(0); } else { - if (type > matchedTokens.size()) { + if (type > list.size()) { logger.warn("Not enough images for token with type " + type + ", name " + name + ", set " + set + '.'); return null; } - tokenData = matchedTokens.get(card.getType() - 1); + tokenData = list.get(card.getType() - 1); } String url = "http://tokens.mtg.onl/tokens/" + tokenData.getExpansionSetCode().trim() + '_' @@ -172,15 +176,26 @@ public enum TokensMtgImageSource implements CardImageSource { return url; } - private List getTokensData() throws IOException { + private HashMap> getTokensData() throws IOException { synchronized (tokensDataSync) { if (tokensData == null) { - tokensData = new ArrayList<>(); + DownloadPictures.getInstance().updateAndViewMessage("Creating token data..."); + tokensData = new HashMap<>(); // get tokens data from resource file - try(InputStream inputStream = this.getClass().getResourceAsStream("/tokens-mtg-onl-list.csv")) { + try (InputStream inputStream = this.getClass().getResourceAsStream("/tokens-mtg-onl-list.csv")) { List fileTokensData = parseTokensData(inputStream); - tokensData.addAll(fileTokensData); + for (TokenData tokenData : fileTokensData) { + String key = tokenData.getExpansionSetCode() + "/" + tokenData.getName(); + ArrayList list = tokensData.get(key); + if (list == null) { + list = new ArrayList<>(); + tokensData.put(key, list); + supportedSets.add(tokenData.getExpansionSetCode()); + logger.info("Added key: " + key); + } + list.add(tokenData); + } } catch (Exception exception) { logger.warn("Failed to get tokens description from resource file tokens-mtg-onl-list.csv", exception); } @@ -188,27 +203,33 @@ public enum TokensMtgImageSource implements CardImageSource { // description on site may contain new information // try to add it URL url = new URL("http://tokens.mtg.onl/data/SetsWithTokens.csv"); - try(InputStream inputStream = url.openStream()) { + try (InputStream inputStream = url.openStream()) { List siteTokensData = parseTokensData(inputStream); - List newTokensData = new ArrayList<>(); for (TokenData siteData : siteTokensData) { - boolean isNew = true; - for (TokenData fileData : tokensData) { - if (siteData.getName().equalsIgnoreCase(fileData.getName()) - && siteData.getNumber().equalsIgnoreCase(fileData.getNumber()) - && siteData.getExpansionSetCode().equalsIgnoreCase(fileData.getExpansionSetCode())) { - isNew = false; - break; + String key = siteData.getExpansionSetCode() + "/" + siteData.getName(); + supportedSets.add(siteData.getExpansionSetCode()); + ArrayList list = tokensData.get(key); + if (list == null) { + list = new ArrayList<>(); + tokensData.put(key, list); + list.add(siteData); + } else { + boolean newToken = true; + for (TokenData tokenData : list) { + if (siteData.getNumber().equals(tokenData.number)) { + newToken = false; + break; + } + } + if (newToken) { + list.add(siteData); } } - if (isNew) { - newTokensData.add(siteData); - } } - - tokensData.addAll(newTokensData); - } catch (Exception exception) { - logger.warn("Failed to get tokens description from tokens.mtg.onl", exception); + DownloadPictures.getInstance().updateAndViewMessage(""); + } catch (Exception ex) { + logger.warn("Failed to get tokens description from tokens.mtg.onl", ex); + DownloadPictures.getInstance().updateAndViewMessage(ex.getMessage()); } } } @@ -219,8 +240,8 @@ public enum TokensMtgImageSource implements CardImageSource { private List parseTokensData(InputStream inputStream) throws IOException { List newTokensData = new ArrayList<>(); - try(InputStreamReader inputReader = new InputStreamReader(inputStream, "Cp1252"); - BufferedReader reader = new BufferedReader(inputReader)) { + try (InputStreamReader inputReader = new InputStreamReader(inputStream, "Cp1252"); + BufferedReader reader = new BufferedReader(inputReader)) { // we have to specify encoding to read special comma reader.readLine(); // skip header @@ -285,7 +306,17 @@ public enum TokensMtgImageSource implements CardImageSource { @Override public int getTotalImages() { - return -1; + return getTokenImages(); + } + + @Override + public int getTokenImages() { + try { + getTokensData(); + } catch (IOException ex) { + logger.error(getSourceName() + ": Loading available data failed. " + ex.getMessage()); + } + return tokensData.size(); } @Override @@ -296,4 +327,28 @@ public enum TokensMtgImageSource implements CardImageSource { @Override public void doPause(String httpImageUrl) { } + + @Override + public ArrayList getSupportedSets() { + ArrayList supportedSetsCopy = new ArrayList<>(); + supportedSetsCopy.addAll(supportedSets); + return supportedSetsCopy; + } + + @Override + public boolean isImageProvided(String setCode, String cardName) { + try { + getTokensData(); + } catch (IOException ex) { + java.util.logging.Logger.getLogger(TokensMtgImageSource.class.getName()).log(Level.SEVERE, null, ex); + } + String key = setCode + "/" + cardName; + return (tokensData.containsKey(key)); + } + + @Override + public boolean isSetSupportedComplete(String setCode) { + return false; + } + } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java index a42cc1633a..5ea83188bf 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java @@ -34,10 +34,13 @@ import java.net.HttpURLConnection; import java.net.InetSocketAddress; import java.net.Proxy; import java.net.URL; -import java.net.URLEncoder; +import java.util.ArrayList; import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; +import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; @@ -46,6 +49,7 @@ import mage.client.MageFrame; import mage.client.dialog.PreferencesDialog; import mage.remote.Connection; import mage.remote.Connection.ProxyType; +import org.apache.log4j.Logger; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; @@ -58,10 +62,13 @@ import org.mage.plugins.card.images.CardDownloadData; public enum WizardCardsImageSource implements CardImageSource { instance; - private Map setsAliases; - private Map languageAliases; - private final Map> sets; + private static final Logger logger = Logger.getLogger(WizardCardsImageSource.class); + + private final Map setsAliases; + private final Map languageAliases; + private final Map> sets; + private final Set supportedSets; @Override public String getSourceName() { @@ -69,6 +76,198 @@ public enum WizardCardsImageSource implements CardImageSource { } WizardCardsImageSource() { + supportedSets = new LinkedHashSet<>(); + // supportedSets.add("PTC"); // Prerelease Events + supportedSets.add("LEA"); + supportedSets.add("LEB"); + supportedSets.add("2ED"); + supportedSets.add("ARN"); + supportedSets.add("ATQ"); + supportedSets.add("3ED"); + supportedSets.add("LEG"); + supportedSets.add("DRK"); + supportedSets.add("FEM"); + supportedSets.add("4ED"); + supportedSets.add("ICE"); + supportedSets.add("CHR"); + supportedSets.add("HML"); + supportedSets.add("ALL"); + supportedSets.add("MIR"); + supportedSets.add("VIS"); + supportedSets.add("5ED"); + supportedSets.add("POR"); + supportedSets.add("WTH"); + supportedSets.add("TMP"); + supportedSets.add("STH"); + supportedSets.add("EXO"); + supportedSets.add("P02"); + supportedSets.add("UGL"); + supportedSets.add("USG"); + supportedSets.add("DD3DVD"); + supportedSets.add("DD3EVG"); + supportedSets.add("DD3GVL"); + supportedSets.add("DD3JVC"); + + supportedSets.add("ULG"); + supportedSets.add("6ED"); + supportedSets.add("UDS"); + supportedSets.add("PTK"); + supportedSets.add("S99"); + supportedSets.add("MMQ"); + // supportedSets.add("BRB");Battle Royale Box Set + supportedSets.add("NEM"); + supportedSets.add("S00"); + supportedSets.add("PCY"); + supportedSets.add("INV"); + // supportedSets.add("BTD"); // Beatdown Boxset + supportedSets.add("PLS"); + supportedSets.add("7ED"); + supportedSets.add("APC"); + supportedSets.add("ODY"); + // supportedSets.add("DKM"); // Deckmasters 2001 + supportedSets.add("TOR"); + supportedSets.add("JUD"); + supportedSets.add("ONS"); + supportedSets.add("LGN"); + supportedSets.add("SCG"); + supportedSets.add("8ED"); + supportedSets.add("MRD"); + supportedSets.add("DST"); + supportedSets.add("5DN"); + supportedSets.add("CHK"); + supportedSets.add("UNH"); + supportedSets.add("BOK"); + supportedSets.add("SOK"); + supportedSets.add("9ED"); + supportedSets.add("RAV"); + supportedSets.add("GPT"); + supportedSets.add("DIS"); + supportedSets.add("CSP"); + supportedSets.add("TSP"); + supportedSets.add("TSB"); + supportedSets.add("PLC"); + supportedSets.add("FUT"); + supportedSets.add("10E"); + supportedSets.add("MED"); + supportedSets.add("LRW"); + supportedSets.add("EVG"); + supportedSets.add("MOR"); + supportedSets.add("SHM"); + supportedSets.add("EVE"); + supportedSets.add("DRB"); + supportedSets.add("ME2"); + supportedSets.add("ALA"); + supportedSets.add("DD2"); + supportedSets.add("CON"); + supportedSets.add("DDC"); + supportedSets.add("ARB"); + supportedSets.add("M10"); + // supportedSets.add("TD0"); // Magic Online Deck Series + supportedSets.add("V09"); + supportedSets.add("HOP"); + supportedSets.add("ME3"); + supportedSets.add("ZEN"); + supportedSets.add("DDD"); + supportedSets.add("H09"); + supportedSets.add("WWK"); + supportedSets.add("DDE"); + supportedSets.add("ROE"); + supportedSets.add("DPA"); + supportedSets.add("ARC"); + supportedSets.add("M11"); + supportedSets.add("V10"); + supportedSets.add("DDF"); + supportedSets.add("SOM"); + // supportedSets.add("TD0"); // Commander Theme Decks + supportedSets.add("PD2"); + supportedSets.add("ME4"); + supportedSets.add("MBS"); + supportedSets.add("DDG"); + supportedSets.add("NPH"); + supportedSets.add("CMD"); + supportedSets.add("M12"); + supportedSets.add("V11"); + supportedSets.add("DDH"); + supportedSets.add("ISD"); + supportedSets.add("PD3"); + supportedSets.add("DKA"); + supportedSets.add("DDI"); + supportedSets.add("AVR"); + supportedSets.add("PC2"); + supportedSets.add("M13"); + supportedSets.add("V12"); + supportedSets.add("DDJ"); + supportedSets.add("RTR"); + supportedSets.add("CM1"); + // supportedSets.add("TD2"); // Duel Decks: Mirrodin Pure vs. New Phyrexia + supportedSets.add("GTC"); + supportedSets.add("DDK"); + supportedSets.add("DGM"); + supportedSets.add("MMA"); + supportedSets.add("M14"); + supportedSets.add("V13"); + supportedSets.add("DDL"); + supportedSets.add("THS"); + supportedSets.add("C13"); + supportedSets.add("BNG"); + supportedSets.add("DDM"); + supportedSets.add("JOU"); + // supportedSets.add("MD1"); // Modern Event Deck + supportedSets.add("CNS"); + supportedSets.add("VMA"); + supportedSets.add("M15"); + supportedSets.add("V14"); + supportedSets.add("DDN"); + supportedSets.add("KTK"); + supportedSets.add("C14"); + // supportedSets.add("DD3"); // Duel Decks Anthology + supportedSets.add("FRF"); + supportedSets.add("DDO"); + supportedSets.add("DTK"); + supportedSets.add("TPR"); + supportedSets.add("MM2"); + supportedSets.add("ORI"); + supportedSets.add("V15"); + supportedSets.add("DDP"); + supportedSets.add("BFZ"); + supportedSets.add("EXP"); + supportedSets.add("C15"); + // supportedSets.add("PZ1"); // Legendary Cube + supportedSets.add("OGW"); + supportedSets.add("DDQ"); + supportedSets.add("W16"); + supportedSets.add("SOI"); + supportedSets.add("EMA"); + supportedSets.add("EMN"); + supportedSets.add("V16"); + supportedSets.add("CN2"); + supportedSets.add("DDR"); + supportedSets.add("KLD"); + supportedSets.add("MPS"); + // supportedSets.add("PZ2"); // Treasure Chests + supportedSets.add("C16"); + supportedSets.add("PCA"); + supportedSets.add("AER"); + supportedSets.add("MM3"); + supportedSets.add("DDS"); + supportedSets.add("W17"); + supportedSets.add("AKH"); + supportedSets.add("MPS"); + supportedSets.add("CMA"); + supportedSets.add("E01"); + supportedSets.add("HOU"); + supportedSets.add("C17"); + supportedSets.add("XLN"); +// supportedSets.add("DDT"); // Duel Decks: Merfolk vs. Goblins +// supportedSets.add("IMA"); // Iconic Msters +// supportedSets.add("E02"); // Explorers of Ixalan +// supportedSets.add("V17"); // From the Vault: Transform +// supportedSets.add("UST"); // Unstable +// supportedSets.add("RIX"); // Rivals of Ixalan +// supportedSets.add("A25"); // Masters 25 +// supportedSets.add("DOM"); // Dominaria +// supportedSets.add("M19"); // Core 2019 + sets = new HashMap<>(); setsAliases = new HashMap<>(); setsAliases.put("2ED", "Unlimited Edition"); @@ -102,6 +301,7 @@ public enum WizardCardsImageSource implements CardImageSource { setsAliases.put("C14", "Commander 2014"); setsAliases.put("C15", "Commander 2015"); setsAliases.put("C16", "Commander 2016"); + setsAliases.put("C17", "Commander 2017"); setsAliases.put("CMA", "Commander Anthology"); setsAliases.put("CHK", "Champions of Kamigawa"); setsAliases.put("CHR", "Chronicles"); @@ -140,6 +340,7 @@ public enum WizardCardsImageSource implements CardImageSource { setsAliases.put("DRK", "The Dark"); setsAliases.put("DST", "Darksteel"); setsAliases.put("DTK", "Dragons of Tarkir"); + setsAliases.put("E01", "Archenemy: Nicol Bolas"); setsAliases.put("EMN", "Eldritch Moon"); setsAliases.put("EMA", "Eternal Masters"); setsAliases.put("EVE", "Eventide"); @@ -272,18 +473,20 @@ public enum WizardCardsImageSource implements CardImageSource { } private Map getSetLinks(String cardSet) { - ConcurrentHashMap setLinks = new ConcurrentHashMap<>(); + LinkedHashMap setLinks = new LinkedHashMap<>(); ExecutorService executor = Executors.newFixedThreadPool(10); try { String setNames = setsAliases.get(cardSet); String preferedLanguage = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_IMAGES_PREF_LANGUAGE, "en"); for (String setName : setNames.split("\\^")) { - String URLSetName = URLEncoder.encode(setName, "UTF-8"); + // String URLSetName = URLEncoder.encode(setName, "UTF-8"); + String URLSetName = setName.replaceAll(" ", "%20"); int page = 0; int firstMultiverseIdLastPage = 0; Pages: while (page < 999) { - String searchUrl = "http://gatherer.wizards.com/Pages/Search/Default.aspx?page=" + page + "&output=spoiler&method=visual&action=advanced&set=+[%22" + URLSetName + "%22]"; + String searchUrl = "http://gatherer.wizards.com/Pages/Search/Default.aspx?sort=cn+&page=" + page + "&action=advanced&output=spoiler&method=visual&set=+%5B%22" + URLSetName + "%22%5D"; + logger.debug("URL: " + searchUrl); Document doc = getDocument(searchUrl); Elements cardsImages = doc.select("img[src^=../../Handlers/]"); if (cardsImages.isEmpty()) { @@ -307,7 +510,7 @@ public enum WizardCardsImageSource implements CardImageSource { } } } catch (IOException ex) { - System.out.println("Exception when parsing the wizards page: " + ex.getMessage()); + logger.error("Exception when parsing the wizards page: " + ex.getMessage()); } executor.shutdown(); @@ -327,14 +530,15 @@ public enum WizardCardsImageSource implements CardImageSource { Connection.ProxyType proxyType = Connection.ProxyType.valueByText(prefs.get("proxyType", "None")); Document doc; if (proxyType == ProxyType.NONE) { - doc = Jsoup.connect(urlString).get(); + doc = Jsoup.connect(urlString).timeout(60 * 1000).get(); } else { String proxyServer = prefs.get("proxyAddress", ""); int proxyPort = Integer.parseInt(prefs.get("proxyPort", "0")); URL url = new URL(urlString); Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyServer, proxyPort)); HttpURLConnection uc = (HttpURLConnection) url.openConnection(proxy); - + uc.setConnectTimeout(10000); + uc.setReadTimeout(60000); uc.connect(); String line; @@ -356,7 +560,7 @@ public enum WizardCardsImageSource implements CardImageSource { if (!variations.isEmpty()) { int landNumber = 1; for (Element variation : variations) { - Integer landMultiverseId = Integer.parseInt(variation.attr("onclick").replaceAll("[^\\d]", "")); + Integer landMultiverseId = Integer.parseInt(variation.attr("href").replaceAll("[^\\d]", "")); links.put((cardName + landNumber).toLowerCase(), generateLink(landMultiverseId)); landNumber++; } @@ -435,6 +639,9 @@ public enum WizardCardsImageSource implements CardImageSource { String setNames = setsAliases.get(cardSet); if (setNames != null) { Map setLinks = sets.computeIfAbsent(cardSet, k -> getSetLinks(cardSet)); + if (setLinks == null || setLinks.isEmpty()) { + return null; + } String link = setLinks.get(card.getDownloadName().toLowerCase()); if (link == null) { int length = collectorId.length(); @@ -444,11 +651,11 @@ public enum WizardCardsImageSource implements CardImageSource { } int number = Integer.parseInt(collectorId.substring(0, length)); - - if (setLinks.size() >= number) { - link = setLinks.get(Integer.toString(number - 1)); - } else { - link = setLinks.get(Integer.toString(number - 21)); + List l = new ArrayList<>(setLinks.values()); + if (l.size() >= number) { + link = l.get(number - 1); + } else {; + link = l.get(number - 21); if (link != null) { link = link.replace(Integer.toString(number - 20), (Integer.toString(number - 20) + 'a')); } @@ -460,6 +667,7 @@ public enum WizardCardsImageSource implements CardImageSource { return link; } return null; + } @Override @@ -474,16 +682,24 @@ public enum WizardCardsImageSource implements CardImageSource { private final class GetImageLinkTask implements Runnable { - private final int multiverseId; - private final String cardName; - private final String preferedLanguage; - private final ConcurrentHashMap setLinks; + private int multiverseId; + private String cardName; + private String preferedLanguage; + private LinkedHashMap setLinks; - public GetImageLinkTask(int multiverseId, String cardName, String preferedLanguage, ConcurrentHashMap setLinks) { - this.multiverseId = multiverseId; - this.cardName = cardName; - this.preferedLanguage = preferedLanguage; - this.setLinks = setLinks; + public GetImageLinkTask(int multiverseId, String cardName, String preferedLanguage, LinkedHashMap setLinks) { + try { + this.multiverseId = multiverseId; + this.cardName = cardName; + this.preferedLanguage = preferedLanguage; + this.setLinks = setLinks; + } catch (Exception ex) { + logger.error(ex.getMessage()); + logger.error("multiverseId: " + multiverseId); + logger.error("cardName: " + cardName); + logger.error("preferedLanguage: " + preferedLanguage); + logger.error("setLinks: " + setLinks.toString()); + } } @Override @@ -496,7 +712,7 @@ public enum WizardCardsImageSource implements CardImageSource { setLinks.put(cardName.toLowerCase(), generateLink(preferedMultiverseId)); } } catch (IOException | NumberFormatException ex) { - System.out.println("Exception when parsing the wizards page: " + ex.getMessage()); + logger.error("Exception when parsing the wizards page: " + ex.getMessage()); } } @@ -515,4 +731,12 @@ public enum WizardCardsImageSource implements CardImageSource { @Override public void doPause(String httpImageUrl) { } + + @Override + public ArrayList getSupportedSets() { + ArrayList supportedSetsCopy = new ArrayList<>(); + supportedSetsCopy.addAll(supportedSets); + return supportedSetsCopy; + } + } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/images/CardDownloadData.java b/Mage.Client/src/main/java/org/mage/plugins/card/images/CardDownloadData.java index 6c70b19810..9956f8e10f 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/images/CardDownloadData.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/images/CardDownloadData.java @@ -40,7 +40,7 @@ public class CardDownloadData { } public CardDownloadData(String name, String set, String collectorId, boolean usesVariousArt, Integer type, String tokenSetCode, String tokenDescriptor, boolean token, boolean twoFacedCard, boolean secondSide) { - this(name, set, collectorId, usesVariousArt, type, tokenSetCode, tokenDescriptor, token, false, false, ""); + this(name, set, collectorId, usesVariousArt, type, tokenSetCode, tokenDescriptor, token, twoFacedCard, secondSide, ""); } public CardDownloadData(String name, String set, String collectorId, boolean usesVariousArt, Integer type, String tokenSetCode, String tokenDescriptor, boolean token, boolean twoFacedCard, boolean secondSide, String tokenClassName) { @@ -72,7 +72,7 @@ public class CardDownloadData { this.usesVariousArt = card.usesVariousArt; this.tokenSetCode = card.tokenSetCode; this.tokenDescriptor = card.tokenDescriptor; - this.tokenClassName = tokenClassName; + this.tokenClassName = card.tokenClassName; this.fileName = card.fileName; } @@ -163,7 +163,7 @@ public class CardDownloadData { public String getTokenDescriptor() { return tokenDescriptor; } - + public void setTokenClassName(String tokenClassName) { this.tokenClassName = tokenClassName; } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/images/DownloadPictures.java b/Mage.Client/src/main/java/org/mage/plugins/card/images/DownloadPictures.java index 02e639ba19..0895b79219 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/images/DownloadPictures.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/images/DownloadPictures.java @@ -1,6 +1,7 @@ package org.mage.plugins.card.images; import java.awt.*; +import java.awt.event.ItemEvent; import java.awt.image.BufferedImage; import java.io.*; import java.net.*; @@ -14,18 +15,25 @@ import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; import javax.imageio.IIOImage; import javax.imageio.ImageIO; import javax.imageio.ImageWriteParam; import javax.imageio.ImageWriter; import javax.imageio.stream.FileImageOutputStream; import javax.swing.*; +import mage.cards.ExpansionSet; +import mage.cards.Sets; +import mage.cards.repository.CardCriteria; import mage.cards.repository.CardInfo; +import mage.cards.repository.CardRepository; +import mage.client.MageFrame; import mage.client.constants.Constants; import mage.client.dialog.PreferencesDialog; import mage.client.util.sets.ConstructedFormats; import mage.remote.Connection; +import static mage.remote.Connection.ProxyType.HTTP; +import static mage.remote.Connection.ProxyType.NONE; +import static mage.remote.Connection.ProxyType.SOCKS; import net.java.truevfs.access.TFile; import net.java.truevfs.access.TFileOutputStream; import net.java.truevfs.access.TVFS; @@ -37,51 +45,97 @@ import org.mage.plugins.card.utils.CardImageUtils; public class DownloadPictures extends DefaultBoundedRangeModel implements Runnable { + private static DownloadPictures instance; + private static final Logger logger = Logger.getLogger(DownloadPictures.class); + public static final String ALL_IMAGES = "- All images from that source"; + public static final String ALL_STANDARD_IMAGES = "- All images from standard from that source"; + public static final String ALL_TOKENS = "- Only all token images from that source"; + + private JDialog dialog; private final JProgressBar bar; private final JOptionPane dlg; private boolean cancel; private final JButton closeButton; private final JButton startDownloadButton; private int cardIndex; - private List cards; - private List type2cards; - private final JComboBox jComboBox1; - private final JLabel jLabel1; - private static boolean offlineMode = false; - private JCheckBox checkBox; + private List allCardsMissingImage; + private List cardsToDownload; + + private int missingCards = 0; + private int missingTokens = 0; + + List selectedSetCodes = new ArrayList<>(); + + private final JComboBox jComboBoxServer; + private final JLabel jLabelMessage; + private final JLabel jLabelAllMissing; + private final JLabel jLabelServer; + + private final JComboBox jComboBoxSet; + private final JLabel jLabelSet; + private final Object sync = new Object(); private static CardImageSource cardImageSource; private Proxy p = Proxy.NO_PROXY; - // private ExecutorService executor = Executors.newFixedThreadPool(10); - public static void main(String[] args) { - startDownload(null, null); + enum DownloadSources { + WIZARDS("wizards.com", WizardCardsImageSource.instance), + MYTHICSPOILER("mythicspoiler.com", MythicspoilerComSource.instance), + TOKENS("tokens.mtg.onl", TokensMtgImageSource.instance), + // MTG_ONL("mtg.onl", MtgOnlTokensImageSource.instance), Not working correctly yet + ALTERNATIVE("alternative.mtg.onl", AltMtgOnlTokensImageSource.instance), + GRAB_BAG("GrabBag", GrabbagImageSource.instance), + MAGIDEX("magidex.com", MagidexImageSource.instance), + SCRYFALL("scryfall.com", ScryfallImageSource.instance); + // MAGICCARDS("magiccards.info", MagicCardsImageSource.instance) + + private final String text; + private final CardImageSource source; + + DownloadSources(String text, CardImageSource sourceInstance) { + this.text = text; + this.source = sourceInstance; + } + + public CardImageSource getSource() { + return source; + } + + @Override + public String toString() { + return text; + } + } - public static void startDownload(JFrame frame, List allCards) { - List cards = getNeededCards(allCards); + public static DownloadPictures getInstance() { + return instance; + } + + public static void main(String[] args) { + startDownload(); + } + + public static void startDownload() { /* * if (cards == null || cards.isEmpty()) { * JOptionPane.showMessageDialog(null, * "All card pictures have been downloaded."); return; } */ - DownloadPictures download = new DownloadPictures(cards); - JDialog dlg = download.getDlg(frame); - dlg.setVisible(true); - dlg.dispose(); - download.cancel = true; + instance = new DownloadPictures(MageFrame.getInstance()); + Thread t1 = new Thread(new LoadMissingCardData(instance)); + t1.start(); + instance.getDlg().setVisible(true); + instance.getDlg().dispose(); + instance.cancel = true; } - public JDialog getDlg(JFrame frame) { - String title = "Downloading"; - - final JDialog dialog = this.dlg.createDialog(frame, title); - closeButton.addActionListener(e -> dialog.setVisible(false)); + public JDialog getDlg() { return dialog; } @@ -89,75 +143,77 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab this.cancel = cancel; } - public DownloadPictures(List cards) { - this.cards = cards; + static int WIDTH = 400; - bar = new JProgressBar(this); + public DownloadPictures(JFrame frame) { + + cardsToDownload = new ArrayList<>(); JPanel p0 = new JPanel(); p0.setLayout(new BoxLayout(p0, BoxLayout.Y_AXIS)); p0.add(Box.createVerticalStrut(5)); - jLabel1 = new JLabel(); - jLabel1.setText("Please select server:"); - jLabel1.setAlignmentX(Component.LEFT_ALIGNMENT); - - p0.add(jLabel1); + jLabelMessage = new JLabel(); + jLabelMessage.setAlignmentX(Component.CENTER_ALIGNMENT); + jLabelMessage.setText("Initializing image download..."); + p0.add(jLabelMessage); p0.add(Box.createVerticalStrut(5)); - ComboBoxModel jComboBox1Model = new DefaultComboBoxModel(new String[]{ - // "magiccards.info", - "wizards.com", - "mythicspoiler.com", - "tokens.mtg.onl", //"mtgimage.com (HQ)", - "mtg.onl", - "alternative.mtg.onl", - "GrabBag", - "magidex.com", - "scryfall.com", //"mtgathering.ru HQ", - //"mtgathering.ru MQ", - //"mtgathering.ru LQ", - }); - jComboBox1 = new JComboBox(); - cardImageSource = MagicCardsImageSource.instance; + jLabelAllMissing = new JLabel(); - jComboBox1.setModel(jComboBox1Model); - jComboBox1.setAlignmentX(Component.LEFT_ALIGNMENT); - jComboBox1.addActionListener(e -> { - JComboBox cb = (JComboBox) e.getSource(); - switch (cb.getSelectedIndex() + 1) { - case 0: - cardImageSource = MagicCardsImageSource.instance; - break; - case 1: - cardImageSource = WizardCardsImageSource.instance; - break; - case 2: - cardImageSource = MythicspoilerComSource.instance; - break; - case 3: - cardImageSource = TokensMtgImageSource.instance; - break; - case 4: - cardImageSource = MtgOnlTokensImageSource.instance; - break; - case 5: - cardImageSource = AltMtgOnlTokensImageSource.instance; - break; - case 6: - cardImageSource = GrabbagImageSource.instance; - break; - case 7: - cardImageSource = MagidexImageSource.instance; - break; - case 8: - cardImageSource = ScryfallImageSource.instance; - break; + jLabelAllMissing.setAlignmentX(Component.LEFT_ALIGNMENT); + // jLabelAllMissing.setText("Computing number of missing images..."); + p0.add(jLabelAllMissing); + p0.add(Box.createVerticalStrut(5)); + + jLabelServer = new JLabel(); + jLabelServer.setText("Please select image source:"); + jLabelServer.setAlignmentX(Component.LEFT_ALIGNMENT); + jLabelServer.setVisible(false); + p0.add(jLabelServer); + + p0.add(Box.createVerticalStrut(5)); + + jComboBoxServer = new JComboBox(); + jComboBoxServer.setModel(new DefaultComboBoxModel(DownloadSources.values())); + jComboBoxServer.setAlignmentX(Component.LEFT_ALIGNMENT); + jComboBoxServer.setAlignmentY(Component.LEFT_ALIGNMENT); + jComboBoxServer.addItemListener((ItemEvent event) -> { + if (event.getStateChange() == ItemEvent.SELECTED) { + comboBoxServerItemSelected(event); } - updateCardsToDownload(); }); - p0.add(jComboBox1); + Dimension d = jComboBoxServer.getPreferredSize(); + d.width = WIDTH; + jComboBoxServer.setPreferredSize(d); + p0.add(jComboBoxServer); + jComboBoxServer.setVisible(false); + + // set the first source as default + cardImageSource = WizardCardsImageSource.instance; + + p0.add(Box.createVerticalStrut(5)); + + // Set selection --------------------------------- + jLabelSet = new JLabel(); + jLabelSet.setText("Please select sets to download the images for:"); + jLabelSet.setAlignmentX(Component.LEFT_ALIGNMENT); + jLabelSet.setVisible(false); + p0.add(jLabelSet); + + jComboBoxSet = new JComboBox(); +// jComboBoxSet.setModel(new DefaultComboBoxModel<>(getSetsForCurrentImageSource())); + jComboBoxSet.setAlignmentX(Component.LEFT_ALIGNMENT); + jComboBoxSet.addItemListener((ItemEvent event) -> { + if (event.getStateChange() == ItemEvent.SELECTED) { + comboBoxSetItemSelected(event); + } + }); + + p0.add(jComboBoxSet); + jComboBoxSet.setVisible(false); + p0.add(Box.createVerticalStrut(5)); // Start @@ -165,78 +221,168 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab startDownloadButton.addActionListener(e -> { new Thread(DownloadPictures.this).start(); startDownloadButton.setEnabled(false); - checkBox.setEnabled(false); }); p0.add(Box.createVerticalStrut(5)); // Progress + bar = new JProgressBar(this); p0.add(bar); bar.setStringPainted(true); - int count = cards.size(); - float mb = (count * cardImageSource.getAverageSize()) / 1024; - bar.setString(String.format(cardIndex == cards.size() ? "%d of %d cards finished! Please close!" - : "%d of %d cards finished! Please wait! [%.1f Mb]", 0, cards.size(), mb)); - Dimension d = bar.getPreferredSize(); - d.width = 300; + + d = bar.getPreferredSize(); + d.width = WIDTH; bar.setPreferredSize(d); - - p0.add(Box.createVerticalStrut(5)); - checkBox = new JCheckBox("Download images for Standard (Type2) only"); - p0.add(checkBox); - p0.add(Box.createVerticalStrut(5)); - - checkBox.addActionListener(e -> updateCardsToDownload()); + bar.setVisible(false); // JOptionPane Object[] options = {startDownloadButton, closeButton = new JButton("Cancel")}; + startDownloadButton.setVisible(false); + closeButton.addActionListener(e -> dialog.setVisible(false)); + closeButton.setVisible(false); + dlg = new JOptionPane(p0, JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION, null, options, options[1]); + dialog = this.dlg.createDialog(frame, "Downloading images"); } - public static boolean checkForMissingCardImages(List allCards) { - AtomicBoolean missedCardTFiles = new AtomicBoolean(); - allCards.parallelStream().forEach(card -> { - if (!missedCardTFiles.get()) { - if (!card.getCardNumber().isEmpty() && !"0".equals(card.getCardNumber()) && !card.getSetCode().isEmpty()) { - CardDownloadData url = new CardDownloadData(card.getName(), card.getSetCode(), card.getCardNumber(), card.usesVariousArt(), - 0, "", "", false, card.isDoubleFaced(), card.isNightCard()); - TFile file = new TFile(CardImageUtils.generateImagePath(url)); - if (!file.exists()) { - missedCardTFiles.set(true); + public void setAllMissingCards() { + updateAndViewMessage("Get all available cards from the repository..."); + List cards = CardRepository.instance.findCards(new CardCriteria()); + updateAndViewMessage("Check which images are missing ..."); + this.allCardsMissingImage = getNeededCards(cards); + updateAndViewMessage("Check which images the current source is providing ..."); + jComboBoxSet.setModel(new DefaultComboBoxModel<>(getSetsForCurrentImageSource())); + + updateCardsToDownload(jComboBoxSet.getSelectedItem().toString()); + + jComboBoxServer.setVisible(true); + jLabelServer.setVisible(true); + jComboBoxSet.setVisible(true); + jLabelSet.setVisible(true); + bar.setVisible(true); + startDownloadButton.setVisible(true); + closeButton.setVisible(true); + + updateAndViewMessage(""); + } + + private void comboBoxServerItemSelected(ItemEvent evt) { + if (jComboBoxServer.isEnabled()) { + cardImageSource = ((DownloadSources) evt.getItem()).getSource(); + // update the available sets / token comboBox + jComboBoxSet.setModel(new DefaultComboBoxModel<>(getSetsForCurrentImageSource())); + updateCardsToDownload(jComboBoxSet.getSelectedItem().toString()); + } + } + + public void updateAndViewMessage(String text) { + jLabelMessage.setText(text); + if (dialog != null) { + dialog.pack(); + dialog.validate(); + dialog.repaint(); + } + } + + private Object[] getSetsForCurrentImageSource() { + // Set the available sets to the combo box + ArrayList supportedSets = cardImageSource.getSupportedSets(); + List setNames = new ArrayList<>(); + if (supportedSets != null) { + setNames.add(ALL_IMAGES); + setNames.add(ALL_STANDARD_IMAGES); + } + if (cardImageSource.isTokenSource()) { + setNames.add(ALL_TOKENS); + } + if (supportedSets != null) { + for (String setCode : supportedSets) { + ExpansionSet expansionSet = Sets.findSet(setCode); + if (expansionSet != null) { + setNames.add(expansionSet.getName()); + } else { + logger.error(cardImageSource.getSourceName() + ": Expansion set for code " + setCode + " not found!"); + } + } + + } + if (setNames.isEmpty()) { + logger.error("Source " + cardImageSource.getSourceName() + " creates no selectable items."); + setNames.add("not avalable"); + } + return setNames.toArray(new String[0]); + } + + private void updateCardsToDownload(String itemText) { + selectedSetCodes.clear(); + switch (itemText) { + case ALL_IMAGES: + if (cardImageSource.getSupportedSets() == null) { + selectedSetCodes = cardImageSource.getSupportedSets(); + } else { + selectedSetCodes.addAll(cardImageSource.getSupportedSets()); + } + break; + case ALL_STANDARD_IMAGES: + List standardSets = ConstructedFormats.getSetsByFormat(ConstructedFormats.STANDARD); + for (String setCode : cardImageSource.getSupportedSets()) { + if (standardSets.contains(setCode)) { + selectedSetCodes.add(setCode); + } else { + logger.debug("Set code " + setCode + " from download source " + cardImageSource.getSourceName()); + } + } + break; + case ALL_TOKENS: + break; + default: + int nonSetEntries = 0; + if (cardImageSource.getSupportedSets() != null) { + nonSetEntries = 2; + } + if (cardImageSource.isTokenSource()) { + nonSetEntries++; + } + selectedSetCodes.add(cardImageSource.getSupportedSets().get(jComboBoxSet.getSelectedIndex() - nonSetEntries)); + } + cardsToDownload.clear(); + int numberTokenImagesAvailable = 0; + int numberCardImagesAvailable = 0; + for (CardDownloadData data : allCardsMissingImage) { + if (data.isToken()) { + if (cardImageSource.isTokenSource() && cardImageSource.isImageProvided(data.getSet(), data.getName())) { + numberTokenImagesAvailable++; + cardsToDownload.add(data); + } + } else { + if (selectedSetCodes != null && selectedSetCodes.contains(data.getSet())) { + if (cardImageSource.isSetSupportedComplete(data.getSet()) || cardImageSource.isImageProvided(data.getSet(), data.getName())) { + numberCardImagesAvailable++; + cardsToDownload.add(data); } } } - }); - return missedCardTFiles.get(); - } - - private void updateCardsToDownload() { - List cardsToDownload = cards; - if (type2cardsOnly()) { - selectType2andTokenCardsIfNotYetDone(); - cardsToDownload = type2cards; } - updateProgressText(cardsToDownload.size()); + updateProgressText(numberCardImagesAvailable, numberTokenImagesAvailable); } - private boolean type2cardsOnly() { - return checkBox.isSelected(); + private void comboBoxSetItemSelected(ItemEvent event) { + // Update the cards to download related to the selected set + updateCardsToDownload(event.getItem().toString()); } - private void selectType2andTokenCardsIfNotYetDone() { - if (type2cards == null) { - type2cards = new ArrayList<>(); - for (CardDownloadData data : cards) { - if (data.isType2() || data.isToken()) { - type2cards.add(data); - } + private void updateProgressText(int cardCount, int tokenCount) { + missingTokens = 0; + for (CardDownloadData card : allCardsMissingImage) { + if (card.isToken()) { + missingTokens++; } } - } - - private void updateProgressText(int cardCount) { - float mb = (cardCount * cardImageSource.getAverageSize()) / 1024; - bar.setString(String.format(cardIndex == cardCount ? "%d of %d cards finished! Please close!" - : "%d of %d cards finished! Please wait! [%.1f Mb]", 0, cardCount, mb)); + missingCards = allCardsMissingImage.size() - missingTokens; + jLabelAllMissing.setText("Missing: " + missingCards + " card images / " + missingTokens + " token images"); + int imageSum = cardCount + tokenCount; + float mb = (imageSum * cardImageSource.getAverageSize()) / 1024; + bar.setString(String.format(cardIndex == imageSum ? "%d of %d (%d cards/%d tokens) image downloads finished! Please close!" + : "%d of %d (%d cards/%d tokens) image downloads finished! Please wait! [%.1f Mb]", 0, imageSum, cardCount, tokenCount, mb)); } private static String createDownloadName(CardInfo card) { @@ -262,11 +408,8 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab logger.warn("No formats defined. Try connecting to a server first!"); } - int numberCardImages = allCards.size(); - int numberWithoutTokens = 0; List allCardsUrls = Collections.synchronizedList(new ArrayList<>()); try { - offlineMode = true; allCards.parallelStream().forEach(card -> { if (!card.getCardNumber().isEmpty() && !"0".equals(card.getCardNumber()) && !card.getSetCode().isEmpty() && !ignoreUrls.contains(card.getSetCode())) { @@ -286,6 +429,7 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab if (card.getSecondSideName() == null || card.getSecondSideName().trim().isEmpty()) { throw new IllegalStateException("Second side card can't have empty name."); } + url = new CardDownloadData(card.getSecondSideName(), card.getSetCode(), card.getCardNumber(), card.usesVariousArt(), 0, "", "", false, card.isDoubleFaced(), true); url.setType2(isType2); allCardsUrls.add(url); @@ -301,21 +445,18 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab allCardsUrls.add(cardDownloadData); } } else if (card.getCardNumber().isEmpty() || "0".equals(card.getCardNumber())) { - System.err.println("There was a critical error!"); logger.error("Card has no collector ID and won't be sent to client: " + card.getName()); } else if (card.getSetCode().isEmpty()) { - System.err.println("There was a critical error!"); logger.error("Card has no set name and won't be sent to client:" + card.getName()); + } else { + logger.info("Card was not selected: " + card.getName()); } }); - numberWithoutTokens = allCards.size(); allCardsUrls.addAll(getTokenCardUrls()); } catch (Exception e) { logger.error(e); } - int numberAllTokenImages = allCardsUrls.size() - numberWithoutTokens; - /** * check to see which cards we already have */ @@ -329,22 +470,13 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab } }); - int tokenImages = 0; - for (CardDownloadData card : cardsToDownload) { - logger.debug((card.isToken() ? "Token" : "Card") + " image to download: " + card.getName() + " (" + card.getSet() + ')'); - if (card.isToken()) { - tokenImages++; - } - } - logger.info("Check download images (total card images: " + numberCardImages + ", total token images: " + numberAllTokenImages + ')'); - logger.info(" => Missing card images: " + (cardsToDownload.size() - tokenImages)); - logger.info(" => Missing token images: " + tokenImages); return new ArrayList<>(cardsToDownload); } public static ArrayList getTokenCardUrls() throws RuntimeException { ArrayList list = new ArrayList<>(); - InputStream in = DownloadPictures.class.getClassLoader().getResourceAsStream("card-pictures-tok.txt"); + InputStream in = DownloadPictures.class + .getClassLoader().getResourceAsStream("card-pictures-tok.txt"); if (in == null) { logger.error("resources input stream is null"); @@ -446,9 +578,8 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab if (p != null) { HashSet ignoreUrls = SettingsManager.getIntance().getIgnoreUrls(); - List cardsToDownload = this.checkBox.isSelected() ? type2cards : cards; - update(0, cardsToDownload.size()); + logger.info("Started download of " + cardsToDownload.size() + " images from source: " + cardImageSource.getSourceName()); int numberOfThreads = Integer.parseInt(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_IMAGES_THREADS, "10")); ExecutorService executor = Executors.newFixedThreadPool(numberOfThreads); @@ -457,7 +588,7 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab CardDownloadData card = cardsToDownload.get(i); - logger.debug("Downloading card: " + card.getName() + " (" + card.getSet() + ')'); + logger.debug("Downloading image: " + card.getName() + " (" + card.getSet() + ')'); String url; if (ignoreUrls.contains(card.getSet()) || card.isToken()) { @@ -482,7 +613,7 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab } catch (Exception ex) { } } else if (cardImageSource.getTotalImages() == -1) { - logger.info("Card not available on " + cardImageSource.getSourceName() + ": " + card.getName() + " (" + card.getSet() + ')'); + logger.info("Image not available on " + cardImageSource.getSourceName() + ": " + card.getName() + " (" + card.getSet() + ')'); synchronized (sync) { update(cardIndex + 1, cardsToDownload.size()); } @@ -513,6 +644,7 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab System.gc(); } closeButton.setText("Close"); + updateCardsToDownload(jComboBoxSet.getSelectedItem().toString()); } static String convertStreamToString(java.io.InputStream is) { @@ -604,6 +736,7 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab if (temporaryFile != null && temporaryFile.length() > 100) { useTempFile = true; } else { + cardImageSource.doPause(url.getPath()); httpConn = url.openConnection(p); httpConn.connect(); @@ -708,29 +841,52 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab if (cardIndex < count) { float mb = ((count - card) * cardImageSource.getAverageSize()) / 1024; - bar.setString(String.format("%d of %d cards finished! Please wait! [%.1f Mb]", + bar.setString(String.format("%d of %d image downloads finished! Please wait! [%.1f Mb]", card, count, mb)); } else { List remainingCards = Collections.synchronizedList(new ArrayList<>()); - DownloadPictures.this.cards.parallelStream().forEach(cardDownloadData -> { + DownloadPictures.this.allCardsMissingImage.parallelStream().forEach(cardDownloadData -> { TFile file = new TFile(CardImageUtils.generateImagePath(cardDownloadData)); if (!file.exists()) { remainingCards.add(cardDownloadData); } }); - DownloadPictures.this.cards = new ArrayList<>(remainingCards); + // remove the cards not downloaded to get the siccessfull downloaded cards + DownloadPictures.this.cardsToDownload.removeAll(remainingCards); + DownloadPictures.this.allCardsMissingImage.removeAll(DownloadPictures.this.cardsToDownload); - count = DownloadPictures.this.cards.size(); + count = remainingCards.size(); if (count == 0) { - bar.setString("0 cards remaining! Please close!"); + bar.setString("0 images remaining! Please close!"); } else { - bar.setString(String.format("%d cards remaining! Please choose another source!", count)); +// bar.setString(String.format("%d cards remaining! Please choose another source!", count)); startDownloadButton.setEnabled(true); } } } private static final long serialVersionUID = 1L; + +} + +class LoadMissingCardData implements Runnable { + + private static DownloadPictures downloadPictures; + + public LoadMissingCardData(DownloadPictures downloadPictures) { + LoadMissingCardData.downloadPictures = downloadPictures; + } + + @Override + public void run() { + downloadPictures.setAllMissingCards(); + } + + public static void main() { + + (new Thread(new LoadMissingCardData(downloadPictures))).start(); + } + } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/images/ImageCache.java b/Mage.Client/src/main/java/org/mage/plugins/card/images/ImageCache.java index 05ad7b0747..97cbd4af82 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/images/ImageCache.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/images/ImageCache.java @@ -157,6 +157,53 @@ public final class ImageCache { }); } + public static String getFilePath(CardView card, int width) { + String key = getKey(card, card.getName(), Integer.toString(width)); + boolean usesVariousArt = false; + if (key.matches(".*#usesVariousArt.*")) { + usesVariousArt = true; + key = key.replace("#usesVariousArt", ""); + } + boolean thumbnail = false; + if (key.matches(".*#thumb.*")) { + thumbnail = true; + key = key.replace("#thumb", ""); + } + Matcher m = KEY_PATTERN.matcher(key); + + if (m.matches()) { + String name = m.group(1); + String set = m.group(2); + Integer type = Integer.parseInt(m.group(3)); + String collectorId = m.group(4); + if (collectorId.equals("null")) { + collectorId = "0"; + } + String tokenSetCode = m.group(5); + String tokenDescriptor = m.group(6); + + CardDownloadData info = new CardDownloadData(name, set, collectorId, usesVariousArt, type, tokenSetCode, tokenDescriptor); + + String path; + if (collectorId.isEmpty() || "0".equals(collectorId)) { + info.setToken(true); + path = CardImageUtils.generateFullTokenImagePath(info); + if (path == null) { + path = DirectLinksForDownload.outDir + File.separator + DirectLinksForDownload.cardbackFilename; + } + } else { + path = CardImageUtils.generateImagePath(info); + } + + if (thumbnail && path.endsWith(".jpg")) { + return buildThumbnailPath(path); + } + return path; + } + + return ""; + } + private ImageCache() { } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/utils/CardImageUtils.java b/Mage.Client/src/main/java/org/mage/plugins/card/utils/CardImageUtils.java index cba58f353f..ac45d2a2f8 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/utils/CardImageUtils.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/utils/CardImageUtils.java @@ -48,6 +48,19 @@ public final class CardImageUtils { log.warn("Token image file not found: " + card.getSet() + " - " + card.getTokenSetCode() + " - " + card.getName()); return null; } + + /** + * + * @param card + * @return String regardless of whether image exists + */ + public static String generateFullTokenImagePath(CardDownloadData card) { + if (card.isToken()) { + String filePath = getTokenImagePath(card); + return filePath; + } + return ""; + } private static String getTokenImagePath(CardDownloadData card) { String filename = generateImagePath(card); diff --git a/Mage.Client/src/main/resources/card-pictures-tok.txt b/Mage.Client/src/main/resources/card-pictures-tok.txt index c172c971f3..2bad012c0a 100644 --- a/Mage.Client/src/main/resources/card-pictures-tok.txt +++ b/Mage.Client/src/main/resources/card-pictures-tok.txt @@ -1096,6 +1096,16 @@ |Generate|TOK:WWK|Snake|||SnakeToken| |Generate|TOK:WWK|Soldier Ally|||JoinTheRanksSoldierToken| |Generate|TOK:WWK|Wolf|||WolfToken| +|Generate|TOK:XLN|Dinosaur|||DinosaurToken| +|Generate|TOK:XLN|Illusion|||JaceCunningCastawayIllusionToken| +|Generate|TOK:XLN|Merfolk|||MerfolkHexproofToken| +|Generate|TOK:XLN|Pirate|||PirateToken| +|Generate|TOK:XLN|Plant|||DefenderPlantToken| +|Generate|TOK:XLN|Treasure|1||TreasureToken| +|Generate|TOK:XLN|Treasure|2||TreasureToken| +|Generate|TOK:XLN|Treasure|3||TreasureToken| +|Generate|TOK:XLN|Treasure|4||TreasureToken| +|Generate|TOK:XLN|Vampire|||IxalanVampireToken| |Generate|TOK:ZEN|Angel|||AngelToken| |Generate|TOK:ZEN|Beast|||BeastToken2| |Generate|TOK:ZEN|Bird|||BirdToken| diff --git a/Mage.Client/src/main/resources/image.url.properties b/Mage.Client/src/main/resources/image.url.properties index 3415b291f2..0ded050d87 100644 --- a/Mage.Client/src/main/resources/image.url.properties +++ b/Mage.Client/src/main/resources/image.url.properties @@ -74,6 +74,6 @@ dd3evg=ddaevg dd3gvl=ddagvl dd3jvc=ddajvc # Remove setname as soon as the images can be downloaded -ignore.urls=TOK,DDT,V17,IMA,XLN,RIX,,E02,M19,M25,DOM,UST,H17 +ignore.urls=TOK,DDT,V17,RIX,E02,M19,M25,DOM,UST,H17 # sets ordered by release time (newest goes first) token.lookup.order=M19,M25,DOM,E02,RIX,UST,XLN,IMA,H17,C17,V17,E01,DDT,CMA,HOU,MM3,DDS,AKH,DD3DVD,DD3EVG,DD3GVL,DD3JVC,H09,AER,PCA,C16,V16,MPS,KLD,DDR,CN2,EMN,EMA,SOI,DDQ,CP,CMA,ARENA,SUS,APAC,EURO,UGIN,C15,OGW,EXP,DDP,BFZ,DRB,V09,V10,V11,V12,V13,V14,V15,TPR,MPRP,DD3,DDO,ORI,MM2,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC \ No newline at end of file diff --git a/Mage.Client/src/main/resources/tokens-mtg-onl-list.csv b/Mage.Client/src/main/resources/tokens-mtg-onl-list.csv index 1d2ea50d5c..4343e5257e 100644 --- a/Mage.Client/src/main/resources/tokens-mtg-onl-list.csv +++ b/Mage.Client/src/main/resources/tokens-mtg-onl-list.csv @@ -222,7 +222,7 @@ Eldrazi Spawn, 1a, -, -, -, Creature - Eldrazi Spawn, Aleksi Briclot, Sacrifice Eldrazi Spawn, 1b, -, -, -, Creature - Eldrazi Spawn, Mark Tedin, Sacrifice this creature: Add {1} to your mana pool. Eldrazi Spawn, 1c, -, -, -, Creature - Eldrazi Spawn, Veronique Meignaud, Sacrifice this creature: Add {1} to your mana pool. Elemental, 2, R, *|*, -, Creature - Elemental, Jung Park, - -Hellion, 3, R, 4|4, -, Creature - Hellion, Anthony Francisco, - +Hellion, 1, R, 4|4, -, Creature - Hellion, Anthony Francisco, - Ooze, 4, G, *|*, -, Creature - Ooze, Daniel Ljunggren, - Tuktuk The Returned, 5, -, 5|5, -, Legendary Artifact Creature - Goblin Golem, Franz Vohwinkel, - @@ -344,7 +344,7 @@ Soldier, 3, W, 1|1, -, Creature - Soldier, Greg Staples, - Drake, 4, U, 2|2, -, Creature - Drake, Svetlin Velinov, Flying Zombie, 5, B, 2|2, -, Creature - Zombie, Lucas Graciano, - Goblin, 6, R, 1|1, -, Creature - Goblin, Karl Kopinski, - -Hellion, 7, R, 4|4, -, Creature - Hellion, Anthony Francisco, - +Hellion, 1, R, 4|4, -, Creature - Hellion, Anthony Francisco, - Beast, 8, G, 3|3, -, Creature - Beast, John Donahue, - Saproling, 9, G, 1|1, -, Creature - Saproling, Brad Rigney, - Wurm, 10, G, 6|6, -, Creature - Wurm, Anthony Francisco, - @@ -664,7 +664,7 @@ DDP - Duel Decks: Zendikar vs. Eldrazi (2015-08-28) Eldrazi Spawn, 076, -, -, -, Creature - Eldrazi Spawn, Aleksi Briclot, Sacrifice this creature: Add {1} to your mana pool. Eldrazi Spawn, 077, -, -, -, Creature - Eldrazi Spawn, Veronique Meignaud, Sacrifice this creature: Add {1} to your mana pool. Eldrazi Spawn, 078, -, -, -, Creature - Eldrazi Spawn, Mark Tedin, Sacrifice this creature: Add {1} to your mana pool. -Hellion, 079, R, 4|4, -, Creature - Hellion, Anthony Francisco, - +Hellion, 1, R, 4|4, -, Creature - Hellion, Anthony Francisco, - Plant, 080, G, -, -, Creature - Plant, Daren Bader, - BFZ - Battle for Zendikar (2015-10-09) @@ -745,3 +745,20 @@ Clue, 015, -, -, -, Artifact - Clue, James Paick, {2}‚ Sacrifice this Artifact Clue, 016, -, -, -, Artifact - Clue, Franz Vohwinkel, {2}‚ Sacrifice this Artifact: Draw a card. Jace Emblem, 017, -, -, -, Emblem - Jace, Tyler Jacobson, Whenever an opponent casts his or her first spell each turn� counter that spell. Arlinn Emblem, 018, -, -, -, Emblem - Arlinn, Winona Nelson, Creatures you control have haste and '{T}: This creature deals damage equal to its power to target creature or player.' + + +SWS - Star Wars Custom set + +Rebel, 001, W, 1|1, -, Creature - Rebel, Alex Konstad, - +Trooper, 002, W, 1|1, -, Creature - Trooper, Darren Tan, - +Tusken Raider, 003, W, 1|1, -, Creature - Tusken Raider, William O'Connor, - +Ewok, 004, G, 1|1, -, Creature - Ewok, Chris NG, - +Hunter, 005, R, 4|4, -, Creature - Hunter, Steve Argyle, - +Royal Guard, 006, R, 2|2, -, Creature - Soldier, Aldo Katayanagi, First Strike +AT-AT, 007, -, 5|5, -, Artifact Creature - AT-AT, Prokhoda, When this creature dies� create two 1/1 white Trooper creature tokens. +B-Wing, 008, -, 1|1, -, Artifact Creature - Rebel Starship, Anthony Devine, Spaceflight +Droid, 009, -, 1|1, -, Artifact Creature - Droid, PeetuGee, - +TIE Fighter, 010, -, 1|1, -, Artifact Creature - Starship, Darren Tan, Spaceflight +Yoda Emblem, 011, -, -, -, Emblem - Yoda, Jerry Vanderstelt, Hexproof� you and your creatures have. +Obi-Wan Kenobi Emblem, 012, -, -, -, Emblem - Obi-Wan Kenobi, Jerry Vanderstelt, Creatures you control get +1/+1 and have vigilance� first strike� and lifelink. +Aurra Sing Emblem, 013, -, -, -, Emblem - Aurra Sing, Willman1701, Whenever a nontoken creature you control leaves the battlefield� discard a card. diff --git a/Mage.Common/src/main/java/mage/interfaces/callback/ClientCallbackMethod.java b/Mage.Common/src/main/java/mage/interfaces/callback/ClientCallbackMethod.java index 9a74ad6e2a..cf9e43df39 100644 --- a/Mage.Common/src/main/java/mage/interfaces/callback/ClientCallbackMethod.java +++ b/Mage.Common/src/main/java/mage/interfaces/callback/ClientCallbackMethod.java @@ -30,18 +30,27 @@ public enum ClientCallbackMethod { GAME_UPDATE("gameUpdate"), DRAFT_OVER("draftOver"), REPLAY_DONE("replayDone"), - USER_REQUEST_DIALOG("userRequestDialog"), + USER_REQUEST_DIALOG("userRequestDialog"), REPLAY_UPDATE("replayUpdate"), REPLAY_INIT("replayInit"), END_GAME_INFO("endGameInfo"), GAME_TARGET("gameTarget"), - GAME_CHOOSE_ABILITY("gameChooseAbility"), + GAME_CHOOSE_ABILITY("gameChooseAbility"), GAME_CHOOSE_PILE("gameChoosePile"), - GAME_CHOOSE_CHOICE("gameChooseChoice"), GAME_ASK("gameAsk"), GAME_SELECT("gameSelect"), GAME_PLAY_MANA("gamePlayMana"), GAME_PLAY_XMANA("gamePlayXMana"), GAME_GET_AMOUNT("gameSelectAmount"), DRAFT_INIT("draftInit"), DRAFT_INFORM("draftInform"), DRAFT_PICK("draftPick"), DRAFT_UPDATE("draftUpdate"); + GAME_CHOOSE_CHOICE("gameChooseChoice"), + GAME_ASK("gameAsk"), + GAME_SELECT("gameSelect"), + GAME_PLAY_MANA("gamePlayMana"), + GAME_PLAY_XMANA("gamePlayXMana"), + GAME_GET_AMOUNT("gameSelectAmount"), + DRAFT_INIT("draftInit"), + // DRAFT_INFORM("draftInform"), + DRAFT_PICK("draftPick"), + DRAFT_UPDATE("draftUpdate"); String value; - ClientCallbackMethod(String value){ + ClientCallbackMethod(String value) { this.value = value; } } diff --git a/Mage.Common/src/main/java/mage/remote/SessionImpl.java b/Mage.Common/src/main/java/mage/remote/SessionImpl.java index 86e598c04b..187b8179c1 100644 --- a/Mage.Common/src/main/java/mage/remote/SessionImpl.java +++ b/Mage.Common/src/main/java/mage/remote/SessionImpl.java @@ -35,7 +35,6 @@ import java.util.concurrent.TimeUnit; import javax.swing.*; import mage.MageException; import mage.cards.decks.DeckCardLists; -import mage.cards.decks.InvalidDeckException; import mage.cards.repository.CardInfo; import mage.cards.repository.CardRepository; import mage.cards.repository.ExpansionInfo; @@ -691,8 +690,6 @@ public class SessionImpl implements Session { } return server.joinTable(sessionId, roomId, tableId, playerName, playerType, skill, deckList, password); } - } catch (InvalidDeckException iex) { - handleInvalidDeckException(iex); } catch (GameException ex) { handleGameException(ex); } catch (MageException ex) { @@ -1547,11 +1544,6 @@ public class SessionImpl implements Session { client.showError(ex.getMessage()); } - private void handleInvalidDeckException(InvalidDeckException iex) { - logger.warn(iex.getMessage() + '\n' + iex.getInvalid()); - client.showError(iex.getMessage() + '\n' + iex.getInvalid()); - } - private void handleGameException(GameException ex) { logger.warn(ex.getMessage()); client.showError(ex.getMessage()); diff --git a/Mage.Common/src/main/java/mage/utils/DeckBuilder.java b/Mage.Common/src/main/java/mage/utils/DeckBuilder.java index 19922120b3..74615c9bff 100644 --- a/Mage.Common/src/main/java/mage/utils/DeckBuilder.java +++ b/Mage.Common/src/main/java/mage/utils/DeckBuilder.java @@ -8,6 +8,7 @@ import mage.interfaces.rate.RateCallback; import mage.util.RandomUtil; import java.util.*; +import mage.constants.SubType; /** * Builds deck from provided card pool. @@ -114,7 +115,7 @@ public final class DeckBuilder { * @param count */ private static void addCardsToDeck(final Collection remainingCards, final int minCost, final int maxCost, - final int count) { + final int count) { for (int c = count; c > 0; c--) { @@ -140,7 +141,8 @@ public final class DeckBuilder { } /** - * Adds lands from non basic land (if provided), adds basic lands getting them from provided {@link RateCallback}}. + * Adds lands from non basic land (if provided), adds basic lands getting + * them from provided {@link RateCallback}}. * * @param allowedColors * @param landCardPool @@ -241,9 +243,9 @@ public final class DeckBuilder { int type; if (card.isCreature()) { type = 10; - } else if (card.getSubtype(null).contains("Equipment")) { + } else if (card.getSubtype(null).contains(SubType.EQUIPMENT)) { type = 8; - } else if (card.getSubtype(null).contains("Aura")) { + } else if (card.getSubtype(null).contains(SubType.AURA)) { type = 5; } else if (card.isInstant()) { type = 7; @@ -251,11 +253,11 @@ public final class DeckBuilder { type = 6; } - this.score = - // 5*card.getValue() + // not possible now - 3 * cardRater.rateCard(card) + - // 3*card.getRemoval() + // not possible now - type + getManaCostScore(card, allowedColors); + this.score + = // 5*card.getValue() + // not possible now + 3 * cardRater.rateCard(card) + + // 3*card.getRemoval() + // not possible now + type + getManaCostScore(card, allowedColors); } private int getManaCostScore(Card card, List allowedColors) { diff --git a/Mage.Common/src/main/java/mage/utils/MageVersion.java b/Mage.Common/src/main/java/mage/utils/MageVersion.java index 5d12136081..00d203ef6c 100644 --- a/Mage.Common/src/main/java/mage/utils/MageVersion.java +++ b/Mage.Common/src/main/java/mage/utils/MageVersion.java @@ -41,7 +41,7 @@ public class MageVersion implements Serializable, Comparable { public final static int MAGE_VERSION_MAJOR = 1; public final static int MAGE_VERSION_MINOR = 4; public final static int MAGE_VERSION_PATCH = 26; - public final static String MAGE_VERSION_MINOR_PATCH = "V2"; + public final static String MAGE_VERSION_MINOR_PATCH = "V7"; public final static String MAGE_VERSION_INFO = ""; private final int major; diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/DuelCommander.java b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/DuelCommander.java index b80bc63084..cbbe513112 100644 --- a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/DuelCommander.java +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/DuelCommander.java @@ -41,8 +41,10 @@ public class DuelCommander extends Commander { banned.add("Channel"); banned.add("Chrome Mox"); banned.add("Dig Through Time"); + banned.add("Eidolon of the Great Revel"); banned.add("Emrakul, the Aeons Torn"); banned.add("Entomb"); + banned.add("Fireblast"); banned.add("Food Chain"); banned.add("Gaea's Cradle"); banned.add("Gifts Ungiven"); @@ -68,11 +70,13 @@ public class DuelCommander extends Commander { banned.add("Necrotic Ooze"); banned.add("Oath of Druids"); banned.add("Polymorph"); + banned.add("Price of Progress"); banned.add("Protean Hulk"); banned.add("Sensei's Divining Top"); banned.add("Shahrazad"); banned.add("Sol Ring"); banned.add("Strip Mine"); + banned.add("Sulfuric Vortex"); banned.add("The Tabernacle at Pendrell Vale"); banned.add("Time Vault"); banned.add("Time Walk"); @@ -84,6 +88,7 @@ public class DuelCommander extends Commander { bannedCommander.add("Breya, Etherium Shaper"); bannedCommander.add("Bruse Tarl, Boorish Herder"); bannedCommander.add("Derevi, Empyrial Tactician"); + bannedCommander.add("Edgar Markov"); bannedCommander.add("Edric, Spymaster of Trest"); bannedCommander.add("Erayo, Soratami Ascendant"); bannedCommander.add("Geist of Saint Traft"); diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/HistoricalType2.java b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/HistoricalType2.java index 3d38284922..02aff6b5ab 100644 --- a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/HistoricalType2.java +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/HistoricalType2.java @@ -109,6 +109,15 @@ public class HistoricalType2 extends Constructed { @Override public boolean validate(Deck deck) { + // debug code for finding set info +// System.out.println(); +// for (ExpansionSet set : Sets.getInstance().values()) { +// if (set.getSetType() == SetType.CORE || set.getSetType() == SetType.EXPANSION) { +// System.out.println("Set:\t" + set.getCode() + "\t" + set.getReleaseDate() + "\t" + set.getName() + "\t" + set.getBlockName()); +// } +// } + + Map leastInvalid = null; boolean valid = false; diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/MTGO1v1Commander.java b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/MTGO1v1Commander.java index 6b0f0dab25..7281e662c8 100644 --- a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/MTGO1v1Commander.java +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/MTGO1v1Commander.java @@ -36,17 +36,20 @@ public class MTGO1v1Commander extends Commander { public MTGO1v1Commander() { super("MTGO 1v1 Commander"); banned.add("Ancestral Recall"); - banned.add("Arcum Dagsson"); banned.add("Back to Basics"); banned.add("Balance"); + banned.add("Baral, Chief of Compliance"); banned.add("Bazaar of Baghdad"); banned.add("Black Lotus"); banned.add("Braids, Cabal Minion"); banned.add("Brainstorm"); banned.add("Channel"); banned.add("Derevi, Empyrial Tactician"); + banned.add("Demonic Tutor"); banned.add("Dig Through Time"); banned.add("Edric, Spymaster of Trest"); + banned.add("Emrakul, the Aeons Torn"); + banned.add("Enlightened Tutor"); banned.add("Entomb"); banned.add("Fastbond"); banned.add("Food Chain"); @@ -55,6 +58,7 @@ public class MTGO1v1Commander extends Commander { banned.add("Griselbrand"); banned.add("Hermit Druid"); banned.add("Humility"); + banned.add("Imperial Seal"); banned.add("Karakas"); banned.add("Library of Alexandria"); banned.add("Mana Crypt"); @@ -68,6 +72,7 @@ public class MTGO1v1Commander extends Commander { banned.add("Mox Pearl"); banned.add("Mox Ruby"); banned.add("Mox Sapphire"); + banned.add("Mystical Tutor"); banned.add("Natural Order"); banned.add("Necropotence"); banned.add("Oath of Druids"); @@ -88,8 +93,8 @@ public class MTGO1v1Commander extends Commander { banned.add("Treachery"); banned.add("Treasure Cruise"); banned.add("Vial Smasher the Fierce"); + banned.add("Vampiric Tutor"); banned.add("Yamgmoth's Bargain"); - banned.add("Yisan, the Wanderer Bard"); banned.add("Zur the Enchanter"); } -} \ No newline at end of file +} diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Standard.java b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Standard.java index 4f2dd72c22..674c0d189e 100644 --- a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Standard.java +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Standard.java @@ -73,9 +73,7 @@ public class Standard extends Constructed { } } banned.add("Aetherworks Marvel"); - banned.add("Emrakul, the Promised End"); banned.add("Felidar Guardian"); - banned.add("Reflector Mage"); banned.add("Smuggler's Copter"); } @@ -83,6 +81,6 @@ public class Standard extends Constructed { Calendar cal = Calendar.getInstance(); cal.setTime(set.getReleaseDate()); // Sets from fall block are normally released in September and January - return cal.get(Calendar.MONTH) > 8 || cal.get(Calendar.MONTH) < 2; + return cal.get(Calendar.MONTH) > 7 || cal.get(Calendar.MONTH) < 2; } } diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Vintage.java b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Vintage.java index c88500dbc3..579418d570 100644 --- a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Vintage.java +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Vintage.java @@ -94,6 +94,7 @@ public class Vintage extends Constructed { restricted.add("Memory Jar"); restricted.add("Merchant Scroll"); restricted.add("Mind's Desire"); + restricted.add("Monastery Mentory"); restricted.add("Mox Emerald"); restricted.add("Mox Jet"); restricted.add("Mox Pearl"); @@ -104,6 +105,7 @@ public class Vintage extends Constructed { restricted.add("Ponder"); restricted.add("Sol Ring"); restricted.add("Strip Mine"); + restricted.add("Thorn of Amethyst"); restricted.add("Time Vault"); restricted.add("Time Walk"); restricted.add("Timetwister"); @@ -114,7 +116,6 @@ public class Vintage extends Constructed { restricted.add("Vampiric Tutor"); restricted.add("Wheel of Fortune"); restricted.add("Windfall"); - restricted.add("Yawgmoth's Bargain"); restricted.add("Yawgmoth's Will"); } diff --git a/Mage.Server.Plugins/Mage.Game.PennyDreadfulCommanderFreeForAll/target/maven-archiver/pom.properties b/Mage.Server.Plugins/Mage.Game.PennyDreadfulCommanderFreeForAll/target/maven-archiver/pom.properties index d7097083df..9ea86aa6e9 100644 --- a/Mage.Server.Plugins/Mage.Game.PennyDreadfulCommanderFreeForAll/target/maven-archiver/pom.properties +++ b/Mage.Server.Plugins/Mage.Game.PennyDreadfulCommanderFreeForAll/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ -#Generated by Maven -#Mon Aug 28 09:53:46 CEST 2017 -version=1.4.26 -groupId=org.mage -artifactId=mage-game-pennydreadfulcommanderfreeforall +#Generated by Maven +#Fri Sep 15 22:14:29 CEST 2017 +version=1.4.26 +groupId=org.mage +artifactId=mage-game-pennydreadfulcommanderfreeforall diff --git a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ma/ArtificialScoringSystem.java b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ma/ArtificialScoringSystem.java index d5ad689c8f..379dadee6a 100644 --- a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ma/ArtificialScoringSystem.java +++ b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ma/ArtificialScoringSystem.java @@ -1,17 +1,17 @@ package mage.player.ai.ma; +import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.Effect; import mage.abilities.keyword.HasteAbility; import mage.cards.Card; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.counters.CounterType; import mage.game.Game; import mage.game.permanent.Permanent; -import java.util.UUID; - /** * @author ubeefx, nantuko */ @@ -56,7 +56,7 @@ public final class ArtificialScoringSystem { //score + =cardDefinition.getActivations().size()*50; //score += cardDefinition.getManaActivations().size()*80; } else { - if (permanent.getSubtype(game).contains("Equipment")) { + if (permanent.getSubtype(game).contains(SubType.EQUIPMENT)) { score += 100; } } @@ -103,7 +103,7 @@ public final class ArtificialScoringSystem { } score += equipments * 50 + enchantments * 100; - if (!permanent.canAttack(game)) { + if (!permanent.canAttack(null, game)) { score -= 100; } diff --git a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/CombatEvaluator.java b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/CombatEvaluator.java index 12032f470b..62b13acd84 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/CombatEvaluator.java +++ b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/CombatEvaluator.java @@ -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,24 +20,22 @@ * 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.player.ai; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; import mage.abilities.keyword.DoubleStrikeAbility; import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.TrampleAbility; import mage.game.Game; import mage.game.permanent.Permanent; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - /** * * @author BetaSteward_at_googlemail.com @@ -50,15 +48,16 @@ public class CombatEvaluator { public int evaluate(Permanent creature, Game game) { if (!values.containsKey(creature.getId())) { int value = 0; - if (creature.canAttack(game)) + if (creature.canAttack(null, game)) { value += 2; + } value += creature.getPower().getValue(); value += creature.getToughness().getValue(); value += creature.getAbilities().getEvasionAbilities().size(); value += creature.getAbilities().getProtectionAbilities().size(); - value += creature.getAbilities().containsKey(FirstStrikeAbility.getInstance().getId())?1:0; - value += creature.getAbilities().containsKey(DoubleStrikeAbility.getInstance().getId())?2:0; - value += creature.getAbilities().containsKey(TrampleAbility.getInstance().getId())?1:0; + value += creature.getAbilities().containsKey(FirstStrikeAbility.getInstance().getId()) ? 1 : 0; + value += creature.getAbilities().containsKey(DoubleStrikeAbility.getInstance().getId()) ? 2 : 0; + value += creature.getAbilities().containsKey(TrampleAbility.getInstance().getId()) ? 1 : 0; values.put(creature.getId(), value); } return values.get(creature.getId()); diff --git a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java index 27129fed99..84253863c6 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java @@ -1514,7 +1514,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { if (object != null) { LinkedHashMap useableAbilities = getSpellAbilities(object, game.getState().getZone(object.getId()), game); if (useableAbilities != null && !useableAbilities.isEmpty()) { - game.fireGetChoiceEvent(playerId, name, object, new ArrayList<>(useableAbilities.values())); + // game.fireGetChoiceEvent(playerId, name, object, new ArrayList<>(useableAbilities.values())); // TODO: Improve this return (SpellAbility) useableAbilities.values().iterator().next(); } @@ -1939,7 +1939,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { protected int combatPotential(Permanent creature, Game game) { log.debug("combatPotential"); - if (!creature.canAttack(game)) { + if (!creature.canAttack(null, game)) { return 0; } int potential = creature.getPower().getValue(); diff --git a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/utils/RateCard.java b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/utils/RateCard.java index bfb41b55fe..c1bd72b201 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/utils/RateCard.java +++ b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/utils/RateCard.java @@ -13,6 +13,7 @@ import org.apache.log4j.Logger; import java.io.InputStream; import java.util.*; +import mage.constants.SubType; /** * Class responsible for reading ratings from resources and rating given cards. @@ -60,9 +61,9 @@ public final class RateCard { type = 15; } else if (card.isCreature()) { type = 10; - } else if (card.getSubtype(null).contains("Equipment")) { + } else if (card.getSubtype(null).contains(SubType.EQUIPMENT)) { type = 8; - } else if (card.getSubtype(null).contains("Aura")) { + } else if (card.getSubtype(null).contains(SubType.AURA)) { type = 5; } else if (card.isInstant()) { type = 7; @@ -77,7 +78,7 @@ public final class RateCard { } private static int isRemoval(Card card) { - if (card.getSubtype(null).contains("Aura") || card.isInstant() || card.isSorcery()) { + if (card.getSubtype(null).contains(SubType.AURA) || card.isInstant() || card.isSorcery()) { for (Ability ability : card.getAbilities()) { for (Effect effect : ability.getEffects()) { diff --git a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java index 995303191f..1e934e1915 100644 --- a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java @@ -46,6 +46,7 @@ import mage.choices.ChoiceImpl; import mage.constants.*; import static mage.constants.PlayerAction.REQUEST_AUTO_ANSWER_RESET_ALL; import static mage.constants.PlayerAction.TRIGGER_AUTO_ORDER_RESET_ALL; +import mage.filter.StaticFilters; import mage.filter.common.FilterAttackingCreature; import mage.filter.common.FilterBlockingCreature; import mage.filter.common.FilterCreatureForCombat; @@ -726,7 +727,10 @@ public class HumanPlayer extends PlayerImpl { // It's end of turn phase if (!skippedAtLeastOnce || (playerId.equals(game.getActivePlayerId()) - && !controllingPlayer.getUserData().getUserSkipPrioritySteps().isStopOnAllEndPhases())) { + && !controllingPlayer + .getUserData() + .getUserSkipPrioritySteps() + .isStopOnAllEndPhases())) { skippedAtLeastOnce = true; if (passWithManaPoolCheck(game)) { return false; @@ -834,10 +838,23 @@ public class HumanPlayer extends PlayerImpl { return !controllingPlayer.getUserData().getUserSkipPrioritySteps().getOpponentTurn().isPhaseStepSet(game.getStep().getType()); } } catch (NullPointerException ex) { - String isNull = controllingPlayer.getUserData() == null ? "null" : "not null"; - logger.error("null pointer exception UserData = " + isNull); + if (controllingPlayer.getUserData() != null) { + if (controllingPlayer.getUserData().getUserSkipPrioritySteps() != null) { + if (game.getStep() != null) { + if (game.getStep().getType() == null) { + logger.error("game.getStep().getType() == null"); + } + } else { + logger.error("game.getStep() == null"); + } + } else { + logger.error("UserData.getUserSkipPrioritySteps == null"); + } + } else { + logger.error("UserData == null"); + } } - return true; + return false; } @Override @@ -1042,21 +1059,26 @@ public class HumanPlayer extends PlayerImpl { updateGameStatePriority("selectAttackers", game); FilterCreatureForCombat filter = filterCreatureForCombat.copy(); filter.add(new ControllerIdPredicate(attackingPlayerId)); + while (!abort) { if (passedAllTurns || passedUntilEndStepBeforeMyTurn - || (!getControllingPlayersUserData(game).getUserSkipPrioritySteps().isStopOnDeclareAttackersDuringSkipAction() + || (!getControllingPlayersUserData(game) + .getUserSkipPrioritySteps() + .isStopOnDeclareAttackersDuringSkipAction() && (passedTurn || passedTurnSkipStack || passedUntilEndOfTurn || passedUntilNextMain))) { - return; + if (checkIfAttackersValid(game)) { + return; + } } Map options = new HashMap<>(); List possibleAttackers = new ArrayList<>(); for (Permanent possibleAttacker : game.getBattlefield().getActivePermanents(filter, attackingPlayerId, game)) { - if (possibleAttacker.canAttack(game)) { + if (possibleAttacker.canAttack(null, game)) { possibleAttackers.add(possibleAttacker.getId()); } } @@ -1095,46 +1117,14 @@ public class HumanPlayer extends PlayerImpl { // attack selected default defender declareAttacker(attacker.getId(), attackedDefender, game, false); } - } else if (response.getBoolean() != null) { - // check if enough attackers are declared - if (!game.getCombat().getCreaturesForcedToAttack().isEmpty()) { - if (!game.getCombat().getAttackers().containsAll(game.getCombat().getCreaturesForcedToAttack().keySet())) { - int forcedAttackers = 0; - StringBuilder sb = new StringBuilder(); - for (UUID creatureId : game.getCombat().getCreaturesForcedToAttack().keySet()) { - boolean validForcedAttacker = false; - if (game.getCombat().getAttackers().contains(creatureId)) { - Set possibleDefender = game.getCombat().getCreaturesForcedToAttack().get(creatureId); - if (possibleDefender.isEmpty() - || possibleDefender.contains(game.getCombat().getDefenderId(creatureId))) { - validForcedAttacker = true; - } - } - if (validForcedAttacker) { - forcedAttackers++; - } else { - Permanent creature = game.getPermanent(creatureId); - if (creature != null) { - sb.append(creature.getIdName()).append(' '); - } - } - - } - if (game.getCombat().getMaxAttackers() > forcedAttackers) { - int requireToAttack = Math.min(game.getCombat().getMaxAttackers() - forcedAttackers, game.getCombat().getCreaturesForcedToAttack().size() - forcedAttackers); - String message = (requireToAttack == 1 ? " more attacker that is " : " more attackers that are ") - + "forced to attack.\nCreature" - + (requireToAttack == 1 ? "" : "s") + " forced to attack: "; - game.informPlayer(this, sb.insert(0, message) - .insert(0, requireToAttack) - .insert(0, "You have to attack with ").toString()); - continue; - } - } + } else if (response.getInteger() != null) { // F-Key + if (checkIfAttackersValid(game)) { + return; + } + } else if (response.getBoolean() != null) { // ok button + if (checkIfAttackersValid(game)) { + return; } - return; - } else if (response.getInteger() != null) { - return; } else if (response.getUUID() != null) { Permanent attacker = game.getPermanent(response.getUUID()); if (attacker != null) { @@ -1148,8 +1138,95 @@ public class HumanPlayer extends PlayerImpl { } } + private boolean checkIfAttackersValid(Game game) { + if (!game.getCombat().getCreaturesForcedToAttack().isEmpty()) { + if (!game.getCombat().getAttackers().containsAll(game.getCombat().getCreaturesForcedToAttack().keySet())) { + int forcedAttackers = 0; + StringBuilder sb = new StringBuilder(); + for (UUID creatureId : game.getCombat().getCreaturesForcedToAttack().keySet()) { + boolean validForcedAttacker = false; + if (game.getCombat().getAttackers().contains(creatureId)) { + Set possibleDefender = game.getCombat().getCreaturesForcedToAttack().get(creatureId); + if (possibleDefender.isEmpty() + || possibleDefender.contains(game.getCombat().getDefenderId(creatureId))) { + validForcedAttacker = true; + } + } + if (validForcedAttacker) { + forcedAttackers++; + } else { + Permanent creature = game.getPermanent(creatureId); + if (creature != null) { + sb.append(creature.getIdName()).append(' '); + } + } + + } + if (game.getCombat().getMaxAttackers() > forcedAttackers) { + int requireToAttack = Math.min(game.getCombat().getMaxAttackers() - forcedAttackers, game.getCombat().getCreaturesForcedToAttack().size() - forcedAttackers); + String message = (requireToAttack == 1 ? " more attacker that is " : " more attackers that are ") + + "forced to attack.\nCreature" + + (requireToAttack == 1 ? "" : "s") + " forced to attack: "; + game.informPlayer(this, sb.insert(0, message) + .insert(0, requireToAttack) + .insert(0, "You have to attack with ").toString()); + return false; + } + } + } + // check if enough attackers are declared + // check if players have to be attacked + Set playersToAttackIfAble = new HashSet<>(); + for (Map.Entry> entry : game.getContinuousEffects().getApplicableRequirementEffects(null, true, game).entrySet()) { + RequirementEffect effect = entry.getKey(); + for (Ability ability : entry.getValue()) { + UUID playerToAttack = effect.playerMustBeAttackedIfAble(ability, game); + if (playerToAttack != null) { + playersToAttackIfAble.add(playerToAttack); + } + } + } + if (!playersToAttackIfAble.isEmpty()) { + Set checkPlayersToAttackIfAble = new HashSet<>(playersToAttackIfAble); + for (CombatGroup combatGroup : game.getCombat().getGroups()) { + checkPlayersToAttackIfAble.remove(combatGroup.getDefendingPlayerId()); + } + + for (UUID forcedToAttackId : checkPlayersToAttackIfAble) { + Player forcedToAttack = game.getPlayer(forcedToAttackId); + + for (Permanent attacker : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, getId(), game)) { + + if (game.getContinuousEffects().checkIfThereArePayCostToAttackBlockEffects( + GameEvent.getEvent(GameEvent.EventType.DECLARE_ATTACKER, + forcedToAttackId, attacker.getId(), attacker.getControllerId()), game)) { + continue; + } + // if attacker needs a specific defender to attack so select that one instead + if (game.getCombat().getCreaturesForcedToAttack().containsKey(attacker.getId())) { + Set possibleDefenders = game.getCombat().getCreaturesForcedToAttack().get(attacker.getId()); + if (!possibleDefenders.isEmpty() && !possibleDefenders.contains(forcedToAttackId)) { + continue; + } + } + UUID defendingPlayerId = game.getCombat().getDefendingPlayerId(attacker.getId(), game); + if (playersToAttackIfAble.contains(defendingPlayerId)) { + // already attacks other player taht has to be attacked + continue; + } + if (defendingPlayerId != null || attacker.canAttackInPrinciple(forcedToAttackId, game)) { + game.informPlayer(this, "You are forced to attack " + forcedToAttack.getName() + " or a controlled planeswalker e.g. with " + attacker.getIdName() + "."); + return false; + } + } + } + } + + return true; + } + private void removeAttackerIfPossible(Game game, Permanent attacker) { - for (Map.Entry entry : game.getContinuousEffects().getApplicableRequirementEffects(attacker, game).entrySet()) { + for (Map.Entry entry : game.getContinuousEffects().getApplicableRequirementEffects(attacker, false, game).entrySet()) { RequirementEffect effect = (RequirementEffect) entry.getKey(); if (effect.mustAttack(game)) { if (game.getCombat().getMaxAttackers() >= game.getCombat().getCreaturesForcedToAttack().size() @@ -1223,7 +1300,9 @@ public class HumanPlayer extends PlayerImpl { FilterCreatureForCombatBlock filter = filterCreatureForCombatBlock.copy(); filter.add(new ControllerIdPredicate(defendingPlayerId)); if (game.getBattlefield().count(filter, null, playerId, game) == 0 - && !getControllingPlayersUserData(game).getUserSkipPrioritySteps().isStopOnDeclareBlockerIfNoneAvailable()) { + && !getControllingPlayersUserData(game) + .getUserSkipPrioritySteps() + .isStopOnDeclareBlockerIfNoneAvailable()) { return; } while (!abort) { diff --git a/Mage.Server/src/main/java/mage/server/MageServerImpl.java b/Mage.Server/src/main/java/mage/server/MageServerImpl.java index 463a5b9d7e..f25de76395 100644 --- a/Mage.Server/src/main/java/mage/server/MageServerImpl.java +++ b/Mage.Server/src/main/java/mage/server/MageServerImpl.java @@ -548,8 +548,6 @@ public class MageServerImpl implements MageServer { UUID userId = session.get().getUserId(); ChatManager.instance.leaveChat(chatId, userId); } - } else { - logger.warn("The chatId is null. sessionId = " + sessionId); } }); } diff --git a/Mage.Server/src/main/java/mage/server/Session.java b/Mage.Server/src/main/java/mage/server/Session.java index 1e5127dd9e..018e6b4a1a 100644 --- a/Mage.Server/src/main/java/mage/server/Session.java +++ b/Mage.Server/src/main/java/mage/server/Session.java @@ -374,11 +374,9 @@ public class Session { call.setMessageId(messageId++); callbackHandler.handleCallbackOneway(new Callback(call)); } catch (HandleCallbackException ex) { - // ex.printStackTrace(); UserManager.instance.getUser(userId).ifPresent(user -> { - logger.warn("SESSION CALLBACK EXCEPTION - " + user.getName() + " userId " + userId); - logger.warn(" - method: " + call.getMethod()); - logger.warn(" - cause: " + getBasicCause(ex).toString()); + user.setUserState(User.UserState.Disconnected); + logger.warn("SESSION CALLBACK EXCEPTION - " + user.getName() + " userId " + userId + " - cause: " + getBasicCause(ex).toString()); logger.trace("Stack trace:", ex); SessionManager.instance.disconnect(sessionId, LostConnection); }); diff --git a/Mage.Server/src/main/java/mage/server/SessionManager.java b/Mage.Server/src/main/java/mage/server/SessionManager.java index e32be43897..b3d9c0db00 100644 --- a/Mage.Server/src/main/java/mage/server/SessionManager.java +++ b/Mage.Server/src/main/java/mage/server/SessionManager.java @@ -27,8 +27,6 @@ */ package mage.server; -import java.util.HashMap; -import java.util.Map; import java.util.Optional; import java.util.concurrent.ConcurrentHashMap; import javax.annotation.Nonnull; @@ -41,7 +39,9 @@ import org.jboss.remoting.callback.InvokerCallbackHandler; * @author BetaSteward_at_googlemail.com */ public enum SessionManager { + instance; + private static final Logger logger = Logger.getLogger(SessionManager.class); private final ConcurrentHashMap sessions = new ConcurrentHashMap<>(); @@ -153,14 +153,6 @@ public enum SessionManager { } - public Map getSessions() { - Map map = new HashMap<>(); - for (Map.Entry entry : sessions.entrySet()) { - map.put(entry.getKey(), entry.getValue()); - } - return map; - } - /** * Admin requested the disconnect of a user * diff --git a/Mage.Server/src/main/java/mage/server/TableController.java b/Mage.Server/src/main/java/mage/server/TableController.java index 000c51126c..b22b2f49c1 100644 --- a/Mage.Server/src/main/java/mage/server/TableController.java +++ b/Mage.Server/src/main/java/mage/server/TableController.java @@ -38,7 +38,6 @@ import java.util.concurrent.TimeUnit; import mage.MageException; import mage.cards.decks.Deck; import mage.cards.decks.DeckCardLists; -import mage.cards.decks.InvalidDeckException; import mage.constants.RangeOfInfluence; import mage.constants.TableState; import mage.game.*; @@ -414,7 +413,17 @@ public class TableController { } } if (!Main.isTestMode() && !table.getValidator().validate(deck)) { - throw new InvalidDeckException("Invalid deck for this format", table.getValidator().getInvalid()); + Optional _user = UserManager.instance.getUser(userId); + if (!_user.isPresent()) { + return false; + } + StringBuilder sb = new StringBuilder("Invalid deck for the selected ").append(table.getValidator().getName()).append(" format. \n\n"); + for (Map.Entry entry : table.getValidator().getInvalid().entrySet()) { + sb.append(entry.getKey()).append(": ").append(entry.getValue()).append('\n'); + } + sb.append("\n\nAdd enough cards and try again!"); + _user.get().showUserMessage("Submit deck", sb.toString()); + return false; } submitDeck(userId, playerId, deck); return true; diff --git a/Mage.Server/src/main/java/mage/server/TableManager.java b/Mage.Server/src/main/java/mage/server/TableManager.java index d03e4872b1..a12a7f3522 100644 --- a/Mage.Server/src/main/java/mage/server/TableManager.java +++ b/Mage.Server/src/main/java/mage/server/TableManager.java @@ -35,6 +35,9 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; import mage.MageException; import mage.cards.decks.DeckCardLists; import mage.constants.TableState; @@ -66,7 +69,10 @@ public enum TableManager { private static final DateFormat formatter = new SimpleDateFormat("HH:mm:ss"); private final ConcurrentHashMap controllers = new ConcurrentHashMap<>(); + private final ReadWriteLock controllersLock = new ReentrantReadWriteLock(); + private final ConcurrentHashMap tables = new ConcurrentHashMap<>(); + private final ReadWriteLock tablesLock = new ReentrantReadWriteLock(); /** * Defines how often checking process should be run on server. @@ -88,25 +94,45 @@ public enum TableManager { public Table createTable(UUID roomId, UUID userId, MatchOptions options) { TableController tableController = new TableController(roomId, userId, options); - controllers.put(tableController.getTable().getId(), tableController); - tables.put(tableController.getTable().getId(), tableController.getTable()); + putControllers(tableController.getTable().getId(), tableController); + putTables(tableController.getTable().getId(), tableController.getTable()); return tableController.getTable(); } public Table createTable(UUID roomId, MatchOptions options) { TableController tableController = new TableController(roomId, null, options); - controllers.put(tableController.getTable().getId(), tableController); - tables.put(tableController.getTable().getId(), tableController.getTable()); + putControllers(tableController.getTable().getId(), tableController); + putTables(tableController.getTable().getId(), tableController.getTable()); return tableController.getTable(); } public Table createTournamentTable(UUID roomId, UUID userId, TournamentOptions options) { TableController tableController = new TableController(roomId, userId, options); - controllers.put(tableController.getTable().getId(), tableController); - tables.put(tableController.getTable().getId(), tableController.getTable()); + putControllers(tableController.getTable().getId(), tableController); + putTables(tableController.getTable().getId(), tableController.getTable()); return tableController.getTable(); } + private void putTables(UUID tableId, Table table) { + final Lock w = tablesLock.writeLock(); + w.lock(); + try { + tables.put(tableId, table); + } finally { + w.unlock(); + } + } + + private void putControllers(UUID controllerId, TableController tableController) { + final Lock w = controllersLock.writeLock(); + w.lock(); + try { + controllers.put(controllerId, tableController); + } finally { + w.unlock(); + } + } + public Table getTable(UUID tableId) { return tables.get(tableId); } @@ -119,7 +145,27 @@ public enum TableManager { } public Collection getTables() { - return tables.values(); + Collection
newTables = new ArrayList<>(); + final Lock r = tablesLock.readLock(); + r.lock(); + try { + newTables.addAll(tables.values()); + } finally { + r.unlock(); + } + return newTables; + } + + public Collection getControllers() { + Collection newControllers = new ArrayList<>(); + final Lock r = controllersLock.readLock(); + r.lock(); + try { + newControllers.addAll(controllers.values()); + } finally { + r.unlock(); + } + return newControllers; } public Optional getController(UUID tableId) { @@ -164,7 +210,7 @@ public enum TableManager { // removeUserFromAllTablesAndChat user from all tournament sub tables public void userQuitTournamentSubTables(UUID userId) { - for (TableController controller : controllers.values()) { + for (TableController controller : getControllers()) { if (controller.getTable() != null) { if (controller.getTable().isTournamentSubTable()) { controller.leaveTable(userId); @@ -177,7 +223,7 @@ public enum TableManager { // removeUserFromAllTablesAndChat user from all sub tables of a tournament public void userQuitTournamentSubTables(UUID tournamentId, UUID userId) { - for (TableController controller : controllers.values()) { + for (TableController controller : getControllers()) { if (controller.getTable().isTournamentSubTable() && controller.getTable().getTournament().getId().equals(tournamentId)) { if (controller.hasPlayer(userId)) { controller.leaveTable(userId); @@ -268,12 +314,6 @@ public enum TableManager { return false; } -// public boolean replayTable(UUID userId, UUID tableId) { -// if (controllers.containsKey(tableId)) { -// return controllers.get(tableId).replayTable(userId); -// } -// return false; -// } public void endGame(UUID tableId) { if (controllers.containsKey(tableId)) { if (controllers.get(tableId).endGameAndStartNextGame()) { @@ -321,11 +361,24 @@ public enum TableManager { public void removeTable(UUID tableId) { TableController tableController = controllers.get(tableId); if (tableController != null) { - controllers.remove(tableId); + Lock w = controllersLock.writeLock(); + w.lock(); + try { + controllers.remove(tableId); + } finally { + w.unlock(); + } tableController.cleanUp(); // deletes the table chat and references to users Table table = tables.get(tableId); - tables.remove(tableId); + w = tablesLock.writeLock(); + w.lock(); + try { + tables.remove(tableId); + } finally { + w.unlock(); + } + Match match = table.getMatch(); Game game = null; if (match != null) { @@ -383,8 +436,7 @@ public enum TableManager { debugServerState(); } logger.debug("TABLE HEALTH CHECK"); - List
tableCopy = new ArrayList<>(tables.values()); - for (Table table : tableCopy) { + for (Table table : getTables()) { try { if (table.getState() != TableState.FINISHED && ((System.currentTimeMillis() - table.getStartTime().getTime()) / 1000) > 30) { // removeUserFromAllTablesAndChat only if table started longer than 30 seconds ago diff --git a/Mage.Server/src/main/java/mage/server/User.java b/Mage.Server/src/main/java/mage/server/User.java index 817ad3b313..e1f0abd8fd 100644 --- a/Mage.Server/src/main/java/mage/server/User.java +++ b/Mage.Server/src/main/java/mage/server/User.java @@ -159,15 +159,15 @@ public class User { public void setSessionId(String sessionId) { this.sessionId = sessionId; if (sessionId.isEmpty()) { - userState = UserState.Disconnected; + setUserState(UserState.Disconnected); lostConnection(); logger.trace("USER - lost connection: " + userName + " id: " + userId); } else if (userState == UserState.Created) { - userState = UserState.Connected; + setUserState(UserState.Connected); logger.trace("USER - created: " + userName + " id: " + userId); } else { - userState = UserState.Connected; + setUserState(UserState.Connected); reconnect(); logger.trace("USER - reconnected: " + userName + " id: " + userId); } @@ -339,7 +339,7 @@ public class User { } lastActivity = new Date(); if (userState == UserState.Disconnected) { // this can happen if user reconnects very fast after disconnect - userState = UserState.Connected; + setUserState(UserState.Connected); } } @@ -388,7 +388,7 @@ public class User { } else { // Table is missing after connection was lost during sideboard. // Means other players were removed or conceded the game? - logger.error("sideboarding id not found : " + entry.getKey()); + logger.debug(getName() + " reconnects during sideboarding but tableId not found: " + entry.getKey()); } } ServerMessagesUtil.instance.incReconnects(); @@ -450,12 +450,14 @@ public class User { TournamentManager.instance.quit(tournamentId, userId); } userTournaments.clear(); + constructing.clear(); logger.trace("REMOVE " + userName + " Tables " + tables.size()); for (Entry entry : tables.entrySet()) { logger.debug("-- leave tableId: " + entry.getValue().getId()); TableManager.instance.leaveTable(userId, entry.getValue().getId()); } tables.clear(); + sideboarding.clear(); logger.trace("REMOVE " + userName + " Game sessions: " + gameSessions.size()); for (GameSessionPlayer gameSessionPlayer : gameSessions.values()) { logger.debug("-- kill game session of gameId: " + gameSessionPlayer.getGameId()); diff --git a/Mage.Server/src/main/java/mage/server/UserManager.java b/Mage.Server/src/main/java/mage/server/UserManager.java index 298914c94f..2b9efb3a4d 100644 --- a/Mage.Server/src/main/java/mage/server/UserManager.java +++ b/Mage.Server/src/main/java/mage/server/UserManager.java @@ -196,7 +196,7 @@ public enum UserManager { Calendar calendarRemove = Calendar.getInstance(); calendarRemove.add(Calendar.MINUTE, -8); List toRemove = new ArrayList<>(); - logger.info("Start Check Expired"); + logger.debug("Start Check Expired"); ArrayList userList = new ArrayList<>(); final Lock r = lock.readLock(); r.lock(); @@ -227,7 +227,7 @@ public enum UserManager { handleException(ex); } } - logger.info("Users to remove " + toRemove.size()); + logger.debug("Users to remove " + toRemove.size()); final Lock w = lock.readLock(); w.lock(); try { @@ -237,7 +237,7 @@ public enum UserManager { } finally { w.unlock(); } - logger.info("End Check Expired"); + logger.debug("End Check Expired"); } catch (Exception ex) { handleException(ex); } diff --git a/Mage.Server/src/main/java/mage/server/draft/DraftSession.java b/Mage.Server/src/main/java/mage/server/draft/DraftSession.java index 3992af7ca2..3f3984eaf3 100644 --- a/Mage.Server/src/main/java/mage/server/draft/DraftSession.java +++ b/Mage.Server/src/main/java/mage/server/draft/DraftSession.java @@ -24,10 +24,16 @@ * 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.server.draft; +import java.rmi.RemoteException; +import java.util.Optional; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; import mage.game.draft.Draft; import mage.interfaces.callback.ClientCallback; import mage.interfaces.callback.ClientCallbackMethod; @@ -39,14 +45,6 @@ import mage.view.DraftPickView; import mage.view.DraftView; import org.apache.log4j.Logger; -import java.rmi.RemoteException; -import java.util.Optional; -import java.util.Set; -import java.util.UUID; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledFuture; -import java.util.concurrent.TimeUnit; - /** * @author BetaSteward_at_googlemail.com */ @@ -89,21 +87,10 @@ public class DraftSession { UserManager.instance .getUser(userId). ifPresent(user -> user.fireCallback( - new ClientCallback(ClientCallbackMethod.DRAFT_UPDATE, draft.getId(), getDraftView()))); + new ClientCallback(ClientCallbackMethod.DRAFT_UPDATE, draft.getId(), getDraftView()))); } } - // not used - // - public void inform(final String message) { - if (!killed) { - UserManager.instance - .getUser(userId) - .ifPresent(user -> user.fireCallback(new ClientCallback(ClientCallbackMethod.DRAFT_INFORM, draft.getId(), new DraftClientMessage(getDraftView(), message)))); - } - - } - public void draftOver() { if (!killed) { UserManager.instance diff --git a/Mage.Server/src/main/java/mage/server/game/GameController.java b/Mage.Server/src/main/java/mage/server/game/GameController.java index 6ea79cf2bc..e7ceb47f8a 100644 --- a/Mage.Server/src/main/java/mage/server/game/GameController.java +++ b/Mage.Server/src/main/java/mage/server/game/GameController.java @@ -31,6 +31,9 @@ import java.io.*; import java.util.*; import java.util.Map.Entry; import java.util.concurrent.*; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.zip.GZIPOutputStream; import mage.MageException; import mage.abilities.Ability; @@ -80,7 +83,11 @@ public class GameController implements GameCallback { protected static final ScheduledExecutorService timeoutIdleExecutor = ThreadExecutor.instance.getTimeoutIdleExecutor(); private final ConcurrentHashMap gameSessions = new ConcurrentHashMap<>(); + private final ReadWriteLock gameSessionsLock = new ReentrantReadWriteLock(); + private final ConcurrentHashMap watchers = new ConcurrentHashMap<>(); + private final ReadWriteLock gameWatchersLock = new ReentrantReadWriteLock(); + private final ConcurrentHashMap timers = new ConcurrentHashMap<>(); private final ConcurrentHashMap userPlayerMap; @@ -114,7 +121,7 @@ public class GameController implements GameCallback { public void cleanUp() { cancelTimeout(); - for (GameSessionPlayer gameSessionPlayer : gameSessions.values()) { + for (GameSessionPlayer gameSessionPlayer : getGameSessions()) { gameSessionPlayer.cleanUp(); } ChatManager.instance.destroyChatSession(chatId); @@ -301,7 +308,13 @@ public class GameController implements GameCallback { String joinType; if (gameSession == null) { gameSession = new GameSessionPlayer(game, userId, playerId); - gameSessions.put(playerId, gameSession); + final Lock w = gameSessionsLock.writeLock(); + w.lock(); + try { + gameSessions.put(playerId, gameSession); + } finally { + w.unlock(); + } joinType = "joined"; } else { joinType = "rejoined"; @@ -314,8 +327,8 @@ public class GameController implements GameCallback { private synchronized void startGame() { if (gameFuture == null) { - for (final Entry entry : gameSessions.entrySet()) { - entry.getValue().init(); + for (GameSessionPlayer gameSessionPlayer : getGameSessions()) { + gameSessionPlayer.init(); } GameWorker worker = new GameWorker(game, choosingPlayerId, this); @@ -413,7 +426,13 @@ public class GameController implements GameCallback { } UserManager.instance.getUser(userId).ifPresent(user -> { GameSessionWatcher gameWatcher = new GameSessionWatcher(userId, game, false); - watchers.put(userId, gameWatcher); + final Lock w = gameWatchersLock.writeLock(); + w.lock(); + try { + watchers.put(userId, gameWatcher); + } finally { + w.unlock(); + } gameWatcher.init(); user.addGameWatchInfo(game.getId()); ChatManager.instance.broadcast(chatId, user.getName(), " has started watching", MessageColor.BLUE, true, ChatMessage.MessageType.STATUS, null); @@ -422,7 +441,13 @@ public class GameController implements GameCallback { } public void stopWatching(UUID userId) { - watchers.remove(userId); + final Lock w = gameWatchersLock.writeLock(); + w.lock(); + try { + watchers.remove(userId); + } finally { + w.unlock(); + } UserManager.instance.getUser(userId).ifPresent(user -> { ChatManager.instance.broadcast(chatId, user.getName(), " has stopped watching", MessageColor.BLUE, true, ChatMessage.MessageType.STATUS, null); }); @@ -673,11 +698,11 @@ public class GameController implements GameCallback { } public void endGame(final String message) throws MageException { - for (final GameSessionPlayer gameSession : gameSessions.values()) { + for (final GameSessionPlayer gameSession : getGameSessions()) { gameSession.gameOver(message); gameSession.removeGame(); } - for (final GameSessionWatcher gameWatcher : watchers.values()) { + for (final GameSessionWatcher gameWatcher : getGameSessionWatchers()) { gameWatcher.gameOver(message); } TableManager.instance.endGame(tableId); @@ -722,10 +747,10 @@ public class GameController implements GameCallback { } } } - for (final GameSessionPlayer gameSession : gameSessions.values()) { + for (final GameSessionPlayer gameSession : getGameSessions()) { gameSession.update(); } - for (final GameSessionWatcher gameWatcher : watchers.values()) { + for (final GameSessionWatcher gameWatcher : getGameSessionWatchers()) { gameWatcher.update(); } } @@ -734,12 +759,12 @@ public class GameController implements GameCallback { Table table = TableManager.instance.getTable(tableId); if (table != null) { if (table.getMatch() != null) { - for (final GameSessionPlayer gameSession : gameSessions.values()) { + for (final GameSessionPlayer gameSession : getGameSessions()) { gameSession.endGameInfo(table); } + // TODO: inform watchers about game end and who won } } - // TODO: inform watchers about game end and who won } private synchronized void ask(UUID playerId, final String question, final Map options) throws MageException { @@ -814,12 +839,12 @@ public class GameController implements GameCallback { message.append(game.getStep().getType().toString()).append(" - "); } message.append("Waiting for ").append(game.getPlayer(playerId).getLogName()); - for (final Entry entry : gameSessions.entrySet()) { + for (final Entry entry : getGameSessionsMap().entrySet()) { if (!entry.getKey().equals(playerId)) { entry.getValue().inform(message.toString()); } } - for (final GameSessionWatcher watcher : watchers.values()) { + for (final GameSessionWatcher watcher : getGameSessionWatchers()) { watcher.inform(message.toString()); } } @@ -834,14 +859,13 @@ public class GameController implements GameCallback { return; } final String message = new StringBuilder(game.getStep().getType().toString()).append(" - Waiting for ").append(controller.getName()).toString(); - for (final Entry entry : gameSessions.entrySet()) { + for (final Entry entry : getGameSessionsMap().entrySet()) { boolean skip = players.stream().anyMatch(playerId -> entry.getKey().equals(playerId)); - if (!skip) { entry.getValue().inform(message); } } - for (final GameSessionWatcher watcher : watchers.values()) { + for (final GameSessionWatcher watcher : getGameSessionWatchers()) { watcher.inform(message); } } @@ -858,7 +882,7 @@ public class GameController implements GameCallback { for (StackTraceElement e : ex.getStackTrace()) { sb.append(e.toString()).append('\n'); } - for (final Entry entry : gameSessions.entrySet()) { + for (final Entry entry : getGameSessionsMap().entrySet()) { entry.getValue().gameError(sb.toString()); } } @@ -995,6 +1019,42 @@ public class GameController implements GameCallback { void execute(UUID player); } + private Map getGameSessionsMap() { + Map newGameSessionsMap = new HashMap<>(); + final Lock r = gameSessionsLock.readLock(); + r.lock(); + try { + newGameSessionsMap.putAll(gameSessions); + } finally { + r.unlock(); + } + return newGameSessionsMap; + } + + private List getGameSessions() { + List newGameSessions = new ArrayList<>(); + final Lock r = gameSessionsLock.readLock(); + r.lock(); + try { + newGameSessions.addAll(gameSessions.values()); + } finally { + r.unlock(); + } + return newGameSessions; + } + + private List getGameSessionWatchers() { + List newGameSessionWatchers = new ArrayList<>(); + final Lock r = gameSessionsLock.readLock(); + r.lock(); + try { + newGameSessionWatchers.addAll(watchers.values()); + } finally { + r.unlock(); + } + return newGameSessionWatchers; + } + private GameSessionPlayer getGameSession(UUID playerId) { if (!timers.isEmpty()) { Player player = game.getState().getPlayer(playerId); diff --git a/Mage.Server/src/main/java/mage/server/game/GameManager.java b/Mage.Server/src/main/java/mage/server/game/GameManager.java index fe36171175..3f3a69c02b 100644 --- a/Mage.Server/src/main/java/mage/server/game/GameManager.java +++ b/Mage.Server/src/main/java/mage/server/game/GameManager.java @@ -24,13 +24,17 @@ * 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.server.game; +import java.util.HashMap; +import java.util.Map; import java.util.Optional; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; import mage.cards.decks.DeckCardLists; import mage.constants.ManaType; import mage.constants.PlayerAction; @@ -46,10 +50,17 @@ public enum GameManager { instance; private final ConcurrentHashMap gameControllers = new ConcurrentHashMap<>(); + private final ReadWriteLock gameControllersLock = new ReentrantReadWriteLock(); public UUID createGameSession(Game game, ConcurrentHashMap userPlayerMap, UUID tableId, UUID choosingPlayerId, GameOptions gameOptions) { GameController gameController = new GameController(game, userPlayerMap, tableId, choosingPlayerId, gameOptions); - gameControllers.put(game.getId(), gameController); + final Lock w = gameControllersLock.writeLock(); + w.lock(); + try { + gameControllers.put(game.getId(), gameController); + } finally { + w.unlock(); + } return gameController.getSessionId(); } @@ -109,10 +120,10 @@ public enum GameManager { gameController.quitMatch(userId); } } - + public void sendPlayerAction(PlayerAction playerAction, UUID gameId, UUID userId, Object data) { GameController gameController = gameControllers.get(gameId); - if (gameController != null) { + if (gameController != null) { gameController.sendPlayerAction(playerAction, userId, data); } } @@ -151,7 +162,13 @@ public enum GameManager { GameController gameController = gameControllers.get(gameId); if (gameController != null) { gameController.cleanUp(); - gameControllers.remove(gameId); + final Lock w = gameControllersLock.writeLock(); + w.lock(); + try { + gameControllers.remove(gameId); + } finally { + w.unlock(); + } } } @@ -174,8 +191,16 @@ public enum GameManager { public int getNumberActiveGames() { return gameControllers.size(); } - - public ConcurrentHashMap getGameController() { - return gameControllers; + + public Map getGameController() { + Map newControllers = new HashMap<>(); + final Lock r = gameControllersLock.readLock(); + r.lock(); + try { + newControllers.putAll(gameControllers); + } finally { + r.unlock(); + } + return newControllers; } } diff --git a/Mage.Server/src/main/java/mage/server/tournament/TournamentSession.java b/Mage.Server/src/main/java/mage/server/tournament/TournamentSession.java index cf4b16ee86..8819f262ec 100644 --- a/Mage.Server/src/main/java/mage/server/tournament/TournamentSession.java +++ b/Mage.Server/src/main/java/mage/server/tournament/TournamentSession.java @@ -170,9 +170,11 @@ public class TournamentSession { } private void removeTournamentForUser() { - UserManager.instance.getUser(userId).ifPresent(user - -> user.removeTournament(playerId)); - + Optional user = UserManager.instance.getUser(userId); + if (user.isPresent()) { + user.get().removeTable(playerId); + user.get().removeTournament(playerId); + } } } diff --git a/Mage.Sets/src/mage/cards/a/AcrobaticManeuver.java b/Mage.Sets/src/mage/cards/a/AcrobaticManeuver.java index f5cc01b33f..79d5c8820c 100644 --- a/Mage.Sets/src/mage/cards/a/AcrobaticManeuver.java +++ b/Mage.Sets/src/mage/cards/a/AcrobaticManeuver.java @@ -51,7 +51,7 @@ public class AcrobaticManeuver extends CardImpl { Effect effect = new ExileTargetForSourceEffect(); effect.setApplyEffectsAfter(); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect(false, true)); + this.getSpellAbility().addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect()); // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); diff --git a/Mage.Sets/src/mage/cards/a/ActOfAggression.java b/Mage.Sets/src/mage/cards/a/ActOfAggression.java index 0c17193e5e..5e05507247 100644 --- a/Mage.Sets/src/mage/cards/a/ActOfAggression.java +++ b/Mage.Sets/src/mage/cards/a/ActOfAggression.java @@ -54,12 +54,11 @@ public class ActOfAggression extends CardImpl { } public ActOfAggression(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R/P}{R/P}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R/P}{R/P}"); this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new UntapTargetEffect()); - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap that creature")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("It gains haste until end of turn.")); } public ActOfAggression(final ActOfAggression card) { diff --git a/Mage.Sets/src/mage/cards/a/ActOfTreason.java b/Mage.Sets/src/mage/cards/a/ActOfTreason.java index c402523712..bed4e24e0c 100644 --- a/Mage.Sets/src/mage/cards/a/ActOfTreason.java +++ b/Mage.Sets/src/mage/cards/a/ActOfTreason.java @@ -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.cards.a; import java.util.UUID; @@ -46,16 +45,14 @@ import mage.target.common.TargetCreaturePermanent; public class ActOfTreason extends CardImpl { public ActOfTreason(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}"); // Gain control of target creature until end of turn. Untap that creature. // It gains haste until end of turn. (It can attack and {T} this turn.) this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new UntapTargetEffect()); - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); - + this.getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap that creature")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("It gains haste until end of turn.")); } public ActOfTreason(final ActOfTreason card) { diff --git a/Mage.Sets/src/mage/cards/a/AdantoTheFirstFort.java b/Mage.Sets/src/mage/cards/a/AdantoTheFirstFort.java new file mode 100644 index 0000000000..2b1d7766d2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AdantoTheFirstFort.java @@ -0,0 +1,74 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.mana.WhiteManaAbility; +import mage.constants.SuperType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.game.permanent.token.IxalanVampireToken; + +/** + * + * @author TheElk801 + */ +public class AdantoTheFirstFort extends CardImpl { + + public AdantoTheFirstFort(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + this.addSuperType(SuperType.LEGENDARY); + + this.nightCard = true; + + // T: Add W to your mana pool. + this.addAbility(new WhiteManaAbility()); + + // 2W, T: Create a 1/1 white Vampire creature token with lifelink. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new IxalanVampireToken()), new ManaCostsImpl("{2}{W}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public AdantoTheFirstFort(final AdantoTheFirstFort card) { + super(card); + } + + @Override + public AdantoTheFirstFort copy() { + return new AdantoTheFirstFort(this); + } +} diff --git a/Mage.Sets/src/mage/cards/a/AdantoVanguard.java b/Mage.Sets/src/mage/cards/a/AdantoVanguard.java new file mode 100644 index 0000000000..2618cd1643 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AdantoVanguard.java @@ -0,0 +1,85 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.SourceAttackingCondition; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.IndestructibleAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class AdantoVanguard extends CardImpl { + + public AdantoVanguard(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // As long as Adanto Vanguard is attacking, it gets +2/+0. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostSourceEffect(2, 0, Duration.WhileOnBattlefield), + SourceAttackingCondition.instance, + "As long as {this} is attacking, it gets +2/+0" + ))); + + // Pay 4 life: Adanto Vanguard gains indestructible until end of turn. + this.addAbility(new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn), + new PayLifeCost(4) + )); + + } + + public AdantoVanguard(final AdantoVanguard card) { + super(card); + } + + @Override + public AdantoVanguard copy() { + return new AdantoVanguard(this); + } +} diff --git a/Mage.Sets/src/mage/cards/a/AdaptiveAutomaton.java b/Mage.Sets/src/mage/cards/a/AdaptiveAutomaton.java index b9d4da3de9..9212ae9e51 100644 --- a/Mage.Sets/src/mage/cards/a/AdaptiveAutomaton.java +++ b/Mage.Sets/src/mage/cards/a/AdaptiveAutomaton.java @@ -100,7 +100,7 @@ class AdaptiveAutomatonAddSubtypeEffect extends ContinuousEffectImpl { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { SubType subtype = (SubType) game.getState().getValue(permanent.getId() + "_type"); - if (subtype != null && !permanent.getSubtype(game).contains(subtype)) { + if (subtype != null && !permanent.hasSubtype(subtype, game)) { permanent.getSubtype(game).add(subtype); } } diff --git a/Mage.Sets/src/mage/cards/a/AdmiralBeckettBrass.java b/Mage.Sets/src/mage/cards/a/AdmiralBeckettBrass.java new file mode 100644 index 0000000000..cd291187e8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AdmiralBeckettBrass.java @@ -0,0 +1,160 @@ +/* + * 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.cards.a; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.common.FilterNonlandPermanent; +import mage.filter.predicate.Predicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.events.DamagedPlayerEvent; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.common.TargetNonlandPermanent; +import mage.watchers.Watcher; + +import java.util.*; + +/** + * + * @author TheElk801 + */ +public class AdmiralBeckettBrass extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Pirates you control"); + private static final FilterNonlandPermanent filter2 = new FilterNonlandPermanent("nonland permanent controlled by a player who was dealt combat damage by three or more Pirates this turn"); + + static { + filter.add(new SubtypePredicate(SubType.PIRATE)); + filter.add(new ControllerPredicate(TargetController.YOU)); + filter2.add(new ControllerDealtDamageByPiratesPredicate()); + } + + public AdmiralBeckettBrass(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{B}{R}"); + + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Other Pirates you control get +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, true))); + + // At the beginning of your end step, gain control of target nonland permanent controlled by a player who was dealt combat damage by three or more Pirates this turn. + Ability ability = new BeginningOfEndStepTriggeredAbility(new GainControlTargetEffect(Duration.Custom, true), TargetController.YOU, false); + ability.addTarget(new TargetNonlandPermanent(filter2)); + this.addAbility(ability, new DamagedByPiratesWatcher()); + } + + public AdmiralBeckettBrass(final AdmiralBeckettBrass card) { + super(card); + } + + @Override + public AdmiralBeckettBrass copy() { + return new AdmiralBeckettBrass(this); + } +} + +class DamagedByPiratesWatcher extends Watcher { + + private final Map> damageSourceIds = new HashMap<>(); + + public DamagedByPiratesWatcher() { + super(DamagedByPiratesWatcher.class.getSimpleName(), WatcherScope.GAME); + } + + public DamagedByPiratesWatcher(final DamagedByPiratesWatcher watcher) { + super(watcher); + for (UUID playerId : watcher.damageSourceIds.keySet()) { + Set creatures = new HashSet<>(); + creatures.addAll(watcher.damageSourceIds.get(playerId)); + this.damageSourceIds.put(playerId, creatures); + } + } + + @Override + public DamagedByPiratesWatcher copy() { + return new DamagedByPiratesWatcher(this); + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) { + if (((DamagedPlayerEvent) event).isCombatDamage()) { + Permanent creature = game.getPermanentOrLKIBattlefield(event.getSourceId()); + if (creature != null && creature.hasSubtype(SubType.PIRATE, game)) { + if (damageSourceIds.keySet().contains(event.getTargetId())) { + damageSourceIds.get(event.getTargetId()).add(creature.getId()); + } else { + Set creatureSet = new HashSet<>(); + creatureSet.add(creature.getId()); + damageSourceIds.put(event.getTargetId(), creatureSet); + } + } + } + } + } + + public boolean damagedByEnoughPirates(UUID sourceId, Game game) { + return damageSourceIds.keySet().contains(sourceId) && damageSourceIds.get(sourceId).size() > 2; + } + + @Override + public void reset() { + super.reset(); + damageSourceIds.clear(); + } +} + +class ControllerDealtDamageByPiratesPredicate implements Predicate { + + public ControllerDealtDamageByPiratesPredicate() { + } + + @Override + public boolean apply(Permanent input, Game game) { + DamagedByPiratesWatcher watcher = (DamagedByPiratesWatcher) game.getState().getWatchers().get(DamagedByPiratesWatcher.class.getSimpleName()); + if (watcher != null) { + return watcher.damagedByEnoughPirates(input.getControllerId(), game); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/a/AerialCaravan.java b/Mage.Sets/src/mage/cards/a/AerialCaravan.java new file mode 100644 index 0000000000..c9961f8e3a --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AerialCaravan.java @@ -0,0 +1,146 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AsThoughEffectType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Library; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public class AerialCaravan extends CardImpl { + + public AerialCaravan(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {1}{U}{U}: Exile the top card of your library. Until end of turn, you may play that card. + this.addAbility(new SimpleActivatedAbility(new AerialCaravanExileEffect(), new ManaCostsImpl("{1}{U}{U}"))); + } + + public AerialCaravan(final AerialCaravan card) { + super(card); + } + + @Override + public AerialCaravan copy() { + return new AerialCaravan(this); + } +} + +class AerialCaravanExileEffect extends OneShotEffect { + + public AerialCaravanExileEffect() { + super(Outcome.Detriment); + this.staticText = "Exile the top card of your library. Until end of turn, you may play that card"; + } + + public AerialCaravanExileEffect(final AerialCaravanExileEffect effect) { + super(effect); + } + + @Override + public AerialCaravanExileEffect copy() { + return new AerialCaravanExileEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (sourcePermanent != null && controller != null && controller.getLibrary().hasCards()) { + Library library = controller.getLibrary(); + Card card = library.removeFromTop(game); + if (card != null) { + String exileName = sourcePermanent.getIdName() + " "; + controller.moveCardsToExile(card, source, game, true, source.getSourceId(), exileName); + ContinuousEffect effect = new AerialCaravanCastFromExileEffect(); + effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game))); + game.addEffect(effect, source); + } + return true; + } + return false; + } +} + +class AerialCaravanCastFromExileEffect extends AsThoughEffectImpl { + + public AerialCaravanCastFromExileEffect() { + super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit); + staticText = "You may play the card from exile"; + } + + public AerialCaravanCastFromExileEffect(final AerialCaravanCastFromExileEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public AerialCaravanCastFromExileEffect copy() { + return new AerialCaravanCastFromExileEffect(this); + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + return source.getControllerId().equals(affectedControllerId) + && objectId.equals(getTargetPointer().getFirst(game, source)); + } +} diff --git a/Mage.Sets/src/mage/cards/a/AetherBurst.java b/Mage.Sets/src/mage/cards/a/AetherBurst.java index 94c73e7079..15ad665ff4 100644 --- a/Mage.Sets/src/mage/cards/a/AetherBurst.java +++ b/Mage.Sets/src/mage/cards/a/AetherBurst.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.common.ReturnToHandTargetEffect; @@ -35,13 +34,16 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.FilterCard; -import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; import mage.filter.predicate.mageobject.NamePredicate; import mage.game.Game; import mage.players.Player; import mage.target.Target; import mage.target.TargetPermanent; +import java.util.UUID; + +import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; + /** * * @author magenoxx_at_gmail.com @@ -76,7 +78,7 @@ public class AetherBurst extends CardImpl { } } } - ((DynamicTargetCreaturePermanent) target).setMaxNumberOfTargets(amount + 1); + target.setMaxNumberOfTargets(amount + 1); } } diff --git a/Mage.Sets/src/mage/cards/a/AethergeodeMiner.java b/Mage.Sets/src/mage/cards/a/AethergeodeMiner.java index 7e1851384b..60912dd97b 100644 --- a/Mage.Sets/src/mage/cards/a/AethergeodeMiner.java +++ b/Mage.Sets/src/mage/cards/a/AethergeodeMiner.java @@ -33,14 +33,17 @@ import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.PayEnergyCost; -import mage.abilities.effects.common.ExileSourceEffect; -import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlSourceEffect; +import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; +import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.Outcome; import mage.constants.SubType; import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; /** * @@ -60,9 +63,7 @@ public class AethergeodeMiner extends CardImpl { this.addAbility(new AttacksTriggeredAbility(new GetEnergyCountersControllerEffect(2), false)); // Pay {E}{E}: Exile Aethergeode Miner, then return it to the battlefield under its owner's control. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileSourceEffect(true), new PayEnergyCost(2)); - ability.addEffect(new ReturnToBattlefieldUnderOwnerControlSourceEffect()); - this.addAbility(ability); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AethergeodeMinerEffect(), new PayEnergyCost(2))); } public AethergeodeMiner(final AethergeodeMiner card) { @@ -74,3 +75,34 @@ public class AethergeodeMiner extends CardImpl { return new AethergeodeMiner(this); } } + +class AethergeodeMinerEffect extends OneShotEffect { + + public AethergeodeMinerEffect() { + super(Outcome.Neutral); + this.staticText = "Exile {this}, then return it to the battlefield under its owner's control"; + } + + public AethergeodeMinerEffect(final AethergeodeMinerEffect effect) { + super(effect); + } + + @Override + public AethergeodeMinerEffect copy() { + return new AethergeodeMinerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + if (permanent.moveToExile(source.getSourceId(), "Aethergeode Miner", source.getSourceId(), game)) { + Card card = game.getExile().getCard(source.getSourceId(), game); + if (card != null) { + return card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, false); + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/a/AgelessSentinels.java b/Mage.Sets/src/mage/cards/a/AgelessSentinels.java new file mode 100644 index 0000000000..95e308c9f3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AgelessSentinels.java @@ -0,0 +1,129 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.LoseAbilitySourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.DefenderAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author TheElk801 + */ +public class AgelessSentinels extends CardImpl { + + public AgelessSentinels(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + + this.subtype.add(SubType.WALL); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Ageless Sentinels blocks, it becomes a Bird Giant, and it loses defender. + Ability ability = new BlocksTriggeredAbility(new AgelessSentinelsEffect(), false, false, true); + Effect effect = new LoseAbilitySourceEffect(DefenderAbility.getInstance(), Duration.WhileOnBattlefield); + effect.setText("and it loses defender"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public AgelessSentinels(final AgelessSentinels card) { + super(card); + } + + @Override + public AgelessSentinels copy() { + return new AgelessSentinels(this); + } + + private class AgelessSentinelsEffect extends ContinuousEffectImpl { + + public AgelessSentinelsEffect() { + super(Duration.WhileOnBattlefield, Outcome.BecomeCreature); + staticText = "it becomes a Bird Giant,"; + } + + public AgelessSentinelsEffect(final AgelessSentinelsEffect effect) { + super(effect); + } + + @Override + public AgelessSentinelsEffect copy() { + return new AgelessSentinelsEffect(this); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent == null) { + return false; + } + switch (layer) { + case TypeChangingEffects_4: + if (sublayer == SubLayer.NA) { + permanent.getSubtype(game).clear(); + permanent.getSubtype(game).add(SubType.BIRD, SubType.GIANT); + } + break; + } + return true; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public boolean hasLayer(Layer layer) { + return layer == Layer.TypeChangingEffects_4; + } + } +} diff --git a/Mage.Sets/src/mage/cards/a/AjanisChosen.java b/Mage.Sets/src/mage/cards/a/AjanisChosen.java index fd837215da..56cdd43624 100644 --- a/Mage.Sets/src/mage/cards/a/AjanisChosen.java +++ b/Mage.Sets/src/mage/cards/a/AjanisChosen.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; @@ -42,6 +41,8 @@ import mage.game.permanent.token.CatToken; import mage.game.permanent.token.Token; import mage.players.Player; +import java.util.UUID; + /** * * @author Plopman @@ -95,7 +96,7 @@ class AjanisChosenEffect extends OneShotEffect { Token token = new CatToken(); if (token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId())) { Permanent enchantment = game.getPermanent(this.getTargetPointer().getFirst(game, source)); - if (enchantment != null && enchantment.getSubtype(game).contains("Aura")) { + if (enchantment != null && enchantment.hasSubtype(SubType.AURA, game)) { for (UUID tokenId : token.getLastAddedTokenIds()) { Permanent tokenPermanent = game.getPermanent(tokenId); if (tokenPermanent != null) { diff --git a/Mage.Sets/src/mage/cards/a/AkoumFirebird.java b/Mage.Sets/src/mage/cards/a/AkoumFirebird.java index c96af6ddb6..5a2352fa72 100644 --- a/Mage.Sets/src/mage/cards/a/AkoumFirebird.java +++ b/Mage.Sets/src/mage/cards/a/AkoumFirebird.java @@ -30,7 +30,7 @@ package mage.cards.a; import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DoIfCostPaid; @@ -65,7 +65,7 @@ public class AkoumFirebird extends CardImpl { this.addAbility(HasteAbility.getInstance()); // Akoum Firebird attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); // Landfall-Whenever a land enters the battlefield under your control, you may pay {4}{R}{R}. // If you do, return Akoum Firebird from your graveyard to the battlefield. diff --git a/Mage.Sets/src/mage/cards/a/AkuDjinn.java b/Mage.Sets/src/mage/cards/a/AkuDjinn.java new file mode 100644 index 0000000000..b3c3faf92e --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AkuDjinn.java @@ -0,0 +1,78 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.constants.SubType; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author TheElk801 + */ +public class AkuDjinn extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature each opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public AkuDjinn(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + + this.subtype.add(SubType.DJINN); + this.power = new MageInt(5); + this.toughness = new MageInt(6); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // At the beginning of your upkeep, put a +1/+1 counter on each creature each opponent controls. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), TargetController.YOU, false)); + } + + public AkuDjinn(final AkuDjinn card) { + super(card); + } + + @Override + public AkuDjinn copy() { + return new AkuDjinn(this); + } +} diff --git a/Mage.Sets/src/mage/cards/a/AlabasterPotion.java b/Mage.Sets/src/mage/cards/a/AlabasterPotion.java new file mode 100644 index 0000000000..0dbcf088b9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AlabasterPotion.java @@ -0,0 +1,68 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.GainLifeTargetEffect; +import mage.abilities.effects.common.PreventDamageToTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.TargetPlayer; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author TheElk801 + */ +public class AlabasterPotion extends CardImpl { + + public AlabasterPotion(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{W}{W}"); + + // Choose one - Target player gains X life; or prevent the next X damage that would be dealt to target creature or player this turn. + this.getSpellAbility().addEffect(new GainLifeTargetEffect(new ManacostVariableValue())); + this.getSpellAbility().addTarget(new TargetPlayer()); + Mode mode = new Mode(); + mode.getEffects().add(new PreventDamageToTargetEffect(Duration.EndOfTurn, false, true, new ManacostVariableValue())); + mode.getTargets().add(new TargetCreatureOrPlayer()); + this.getSpellAbility().addMode(mode); + } + + public AlabasterPotion(final AlabasterPotion card) { + super(card); + } + + @Override + public AlabasterPotion copy() { + return new AlabasterPotion(this); + } +} diff --git a/Mage.Sets/src/mage/cards/a/AlabornZealot.java b/Mage.Sets/src/mage/cards/a/AlabornZealot.java new file mode 100644 index 0000000000..37b137ba16 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AlabornZealot.java @@ -0,0 +1,69 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.effects.common.DestroySourceEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class AlabornZealot extends CardImpl { + + public AlabornZealot(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Alaborn Zealot blocks a creature, destroy that creature and Alaborn Zealot. + Ability ability = new BlocksTriggeredAbility(new DestroyTargetEffect().setText("destroy that creature"), false, true, true); + ability.addEffect(new DestroySourceEffect().setText("and {this}")); + this.addAbility(ability); + } + + public AlabornZealot(final AlabornZealot card) { + super(card); + } + + @Override + public AlabornZealot copy() { + return new AlabornZealot(this); + } +} diff --git a/Mage.Sets/src/mage/cards/a/AlchemistsRefuge.java b/Mage.Sets/src/mage/cards/a/AlchemistsRefuge.java index a9d1d40284..fdba19d848 100644 --- a/Mage.Sets/src/mage/cards/a/AlchemistsRefuge.java +++ b/Mage.Sets/src/mage/cards/a/AlchemistsRefuge.java @@ -47,23 +47,24 @@ import mage.filter.predicate.mageobject.CardTypePredicate; /** * * @author noxx - + * */ public class AlchemistsRefuge extends CardImpl { - private static final FilterCard filter = new FilterCard("nonland cards"); + private static final FilterCard filter = new FilterCard("spells"); + static { filter.add(Predicates.not(new CardTypePredicate(CardType.LAND))); } public AlchemistsRefuge(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},""); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); // {tap}: Add {C} to your mana pool. this.addAbility(new ColorlessManaAbility()); - // {G}{U}, {tap}: You may cast nonland cards this turn as though they had flash. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + // {G}{U}, {tap}: You may cast spells this turn as though they had flash. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddContinuousEffectToGame(new CastAsThoughItHadFlashAllEffect(Duration.EndOfTurn, filter)), new CompositeCost(new ManaCostsImpl("{G}{U}"), new TapSourceCost(), "{G}{U}, {T}"))); } diff --git a/Mage.Sets/src/mage/cards/a/AlexiZephyrMage.java b/Mage.Sets/src/mage/cards/a/AlexiZephyrMage.java index 97b927b056..3f55ec6cdb 100644 --- a/Mage.Sets/src/mage/cards/a/AlexiZephyrMage.java +++ b/Mage.Sets/src/mage/cards/a/AlexiZephyrMage.java @@ -42,9 +42,7 @@ import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterCard; -import mage.filter.FilterPermanent; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.game.Game; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; import mage.target.common.TargetCardInHand; @@ -53,17 +51,9 @@ import mage.target.common.TargetCardInHand; * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) */ public class AlexiZephyrMage extends CardImpl { - - private final UUID originalId; - - private static final FilterPermanent filter = new FilterPermanent("Target creatures"); - - static { - filter.add(new CardTypePredicate(CardType.CREATURE)); - } public AlexiZephyrMage(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SPELLSHAPER); @@ -74,22 +64,12 @@ public class AlexiZephyrMage extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{X}{U}")); ability.addCost(new TapSourceCost()); ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards")))); - this.addAbility(ability); - - originalId = ability.getOriginalId(); - } - - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(originalId)) { - ability.getTargets().clear(); - ability.addTarget(new TargetPermanent(ability.getManaCostsToPay().getX(), filter)); - } + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_CREATURES)); + this.addAbility(ability); } public AlexiZephyrMage(final AlexiZephyrMage card) { super(card); - this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/cards/a/AlliedStrategies.java b/Mage.Sets/src/mage/cards/a/AlliedStrategies.java index 7d1009bad9..517210b49b 100644 --- a/Mage.Sets/src/mage/cards/a/AlliedStrategies.java +++ b/Mage.Sets/src/mage/cards/a/AlliedStrategies.java @@ -32,6 +32,7 @@ import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.effects.common.DrawCardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.target.TargetPlayer; @@ -42,11 +43,13 @@ import mage.target.TargetPlayer; public class AlliedStrategies extends CardImpl { public AlliedStrategies(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}"); // Domain - Target player draws a card for each basic land type among lands he or she controls. this.getSpellAbility().addEffect(new DrawCardTargetEffect(new DomainValue(true))); this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN); + } public AlliedStrategies(final AlliedStrategies card) { diff --git a/Mage.Sets/src/mage/cards/a/AlphaStatus.java b/Mage.Sets/src/mage/cards/a/AlphaStatus.java index 3e106f9fab..9701f4a523 100644 --- a/Mage.Sets/src/mage/cards/a/AlphaStatus.java +++ b/Mage.Sets/src/mage/cards/a/AlphaStatus.java @@ -109,6 +109,6 @@ class AlphaStatusDynamicValue implements DynamicValue { @Override public String getMessage() { - return "each other creature on the battlefield that shares a creature type with it"; + return "other creature on the battlefield that shares a creature type with it"; } } diff --git a/Mage.Sets/src/mage/cards/a/AlphaTyrranax.java b/Mage.Sets/src/mage/cards/a/AlphaTyrranax.java index ad52403a27..70f3a694f3 100644 --- a/Mage.Sets/src/mage/cards/a/AlphaTyrranax.java +++ b/Mage.Sets/src/mage/cards/a/AlphaTyrranax.java @@ -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.cards.a; import java.util.UUID; @@ -41,15 +40,16 @@ import mage.constants.SubType; */ public class AlphaTyrranax extends CardImpl { - public AlphaTyrranax (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); + public AlphaTyrranax(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); + this.subtype.add(SubType.DINOSAUR); this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(5); } - public AlphaTyrranax (final AlphaTyrranax card) { + public AlphaTyrranax(final AlphaTyrranax card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/a/AltarGolem.java b/Mage.Sets/src/mage/cards/a/AltarGolem.java index 551314c24d..40a7fad949 100644 --- a/Mage.Sets/src/mage/cards/a/AltarGolem.java +++ b/Mage.Sets/src/mage/cards/a/AltarGolem.java @@ -53,18 +53,18 @@ import mage.target.common.TargetControlledCreaturePermanent; /** * * @author jeffwadsworth - + * */ public class AltarGolem extends CardImpl { - + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creatures you control"); - + static { filter.add(Predicates.not(new TappedPredicate())); } public AltarGolem(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{7}"); this.subtype.add(SubType.GOLEM); this.power = new MageInt(0); @@ -72,17 +72,17 @@ public class AltarGolem extends CardImpl { // Trample this.addAbility(TrampleAbility.getInstance()); - + // Altar Golem's power and toughness are each equal to the number of creatures on the battlefield. - DynamicValue amount = new PermanentsOnBattlefieldCount(new FilterCreaturePermanent("creatures in play")); + DynamicValue amount = new PermanentsOnBattlefieldCount(new FilterCreaturePermanent("creatures on the battlefield")); this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(amount, Duration.EndOfGame))); - + // Altar Golem doesn't untap during your untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepSourceEffect())); - + // Tap five untapped creatures you control: Untap Altar Golem. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(5, 5, filter, true)))); - + } public AltarGolem(final AltarGolem card) { diff --git a/Mage.Sets/src/mage/cards/a/Ambuscade.java b/Mage.Sets/src/mage/cards/a/Ambuscade.java index 86fc832b42..dc4f37d967 100644 --- a/Mage.Sets/src/mage/cards/a/Ambuscade.java +++ b/Mage.Sets/src/mage/cards/a/Ambuscade.java @@ -1,81 +1,81 @@ -/* - * 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.cards.a; - -import java.util.UUID; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.DamageWithPowerTargetEffect; -import mage.abilities.effects.common.continuous.BoostTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.TargetController; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.ControllerPredicate; -import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author ciaccona007 - */ -public class Ambuscade extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control"); - - static { - filter.add(new ControllerPredicate(TargetController.NOT_YOU)); - } - - public Ambuscade(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}"); - - - // Target creature you control gets +1/+0 until end of turn. - Effect effect = new BoostTargetEffect(1, 0, Duration.EndOfTurn); - effect.setApplyEffectsAfter(); // needed to count the boost for the second effect - this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); - this.getSpellAbility().addEffect(effect); - - // It deals damage equal to its power to target creature you don't control. - effect = new DamageWithPowerTargetEffect(); - effect.setText("It deals damage equal to its power to target creature you don't control"); - this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); - this.getSpellAbility().addEffect(effect); - } - - public Ambuscade(final Ambuscade card) { - super(card); - } - - @Override - public Ambuscade copy() { - return new Ambuscade(this); - } -} +/* + * 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.cards.a; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageWithPowerTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author ciaccona007 + */ +public class Ambuscade extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control"); + + static { + filter.add(new ControllerPredicate(TargetController.NOT_YOU)); + } + + public Ambuscade(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}"); + + + // Target creature you control gets +1/+0 until end of turn. + Effect effect = new BoostTargetEffect(1, 0, Duration.EndOfTurn); + effect.setApplyEffectsAfter(); // needed to count the boost for the second effect + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + this.getSpellAbility().addEffect(effect); + + // It deals damage equal to its power to target creature you don't control. + effect = new DamageWithPowerTargetEffect(); + effect.setText("It deals damage equal to its power to target creature you don't control"); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + this.getSpellAbility().addEffect(effect); + } + + public Ambuscade(final Ambuscade card) { + super(card); + } + + @Override + public Ambuscade copy() { + return new Ambuscade(this); + } +} diff --git a/Mage.Sets/src/mage/cards/a/AnZerrinRuins.java b/Mage.Sets/src/mage/cards/a/AnZerrinRuins.java new file mode 100644 index 0000000000..d37541c508 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AnZerrinRuins.java @@ -0,0 +1,106 @@ +/* + * 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.cards.a; + +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.ChooseCreatureTypeEffect; +import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +import java.util.UUID; + +/** + * + * @author TheElk801 + */ +public class AnZerrinRuins extends CardImpl { + + public AnZerrinRuins(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{R}"); + + // As An-Zerrin Ruins enters the battlefield, choose a creature type. + this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.UnboostCreature))); + + // Creatures of the chosen type don't untap during their controllers' untap steps. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AnZerrinRuinsDontUntapEffect())); + } + + public AnZerrinRuins(final AnZerrinRuins card) { + super(card); + } + + @Override + public AnZerrinRuins copy() { + return new AnZerrinRuins(this); + } +} + +class AnZerrinRuinsDontUntapEffect extends DontUntapInControllersUntapStepAllEffect { + + public AnZerrinRuinsDontUntapEffect() { + super(Duration.WhileOnBattlefield, TargetController.ANY, new FilterCreaturePermanent()); + } + + public AnZerrinRuinsDontUntapEffect(final AnZerrinRuinsDontUntapEffect effect) { + super(effect); + } + + @Override + public AnZerrinRuinsDontUntapEffect copy() { + return new AnZerrinRuinsDontUntapEffect(this); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (super.applies(event, source, game)) { + Permanent sourcePerm = game.getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(event.getTargetId()); + if (permanent != null && sourcePerm != null) { + SubType subtype = (SubType) game.getState().getValue(sourcePerm.getId() + "_type"); + if (permanent.hasSubtype(subtype, game)) { + return true; + } + } + } + return false; + } + + @Override + public String getText(Mode mode) { + return "Creatures of the chosen type don't untap during their controllers' untap steps."; + } +} diff --git a/Mage.Sets/src/mage/cards/a/AnaSanctuary.java b/Mage.Sets/src/mage/cards/a/AnaSanctuary.java new file mode 100644 index 0000000000..8b8584ecba --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AnaSanctuary.java @@ -0,0 +1,101 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SanctuaryTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.game.Game; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public class AnaSanctuary extends CardImpl { + + public AnaSanctuary(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + + // At the beginning of your upkeep, if you control a blue or black permanent, target creature gets +1/+1 until end of turn. If you control a blue permanent and a black permanent, that creature gets +5/+5 until end of turn instead. + Ability ability = new SanctuaryTriggeredAbility( + new BoostEffect(1), new BoostEffect(5), ObjectColor.BLACK, ObjectColor.BLUE, + "At the beginning of your upkeep, if you control a blue or black permanent, " + + "target creature gets +1/+1 until end of turn. If you control a blue permanent and a black permanent, that creature gets +5/+5 until end of turn instead." + ); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public AnaSanctuary(final AnaSanctuary card) { + super(card); + } + + @Override + public AnaSanctuary copy() { + return new AnaSanctuary(this); + } +} + +class BoostEffect extends OneShotEffect { + + private final int amount; + + BoostEffect(int amount) { + super(Outcome.Benefit); + this.amount = amount; + } + + BoostEffect(final BoostEffect effect) { + super(effect); + this.amount = effect.amount; + } + + @Override + public BoostEffect copy() { + return new BoostEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + ContinuousEffect effect = new BoostTargetEffect(amount, amount, Duration.EndOfTurn); + effect.setTargetPointer(new FixedTarget(source.getFirstTarget())); + game.addEffect(effect, source); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/a/AncestralMemories.java b/Mage.Sets/src/mage/cards/a/AncestralMemories.java index 6590fe5078..9dec2fdb8c 100644 --- a/Mage.Sets/src/mage/cards/a/AncestralMemories.java +++ b/Mage.Sets/src/mage/cards/a/AncestralMemories.java @@ -27,8 +27,6 @@ */ package mage.cards.a; -import java.util.List; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.*; @@ -40,6 +38,8 @@ import mage.game.Game; import mage.players.Player; import mage.target.TargetCard; +import java.util.UUID; + /** * * @author Quercitron @@ -99,7 +99,7 @@ class AncestralMemoriesEffect extends OneShotEffect { TargetCard target = new TargetCard(Math.min(2, cards.size()), Zone.LIBRARY, new FilterCard("two cards to put in your hand")); if (player.choose(Outcome.Benefit, cards, target, game)) { - for (UUID targetId : (List)target.getTargets()) { + for (UUID targetId : target.getTargets()) { Card card = cards.get(targetId, game); if (card != null) { card.moveToZone(Zone.HAND, source.getSourceId(), game, false); diff --git a/Mage.Sets/src/mage/cards/a/AncientBrontodon.java b/Mage.Sets/src/mage/cards/a/AncientBrontodon.java new file mode 100644 index 0000000000..074622f816 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AncientBrontodon.java @@ -0,0 +1,59 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author caldover + */ +public class AncientBrontodon extends CardImpl { + + public AncientBrontodon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{G}{G}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(9); + this.toughness = new MageInt(9); + } + + public AncientBrontodon(final AncientBrontodon card) { + super(card); + } + + @Override + public AncientBrontodon copy() { + return new AncientBrontodon(this); + } +} diff --git a/Mage.Sets/src/mage/cards/a/AncientHellkite.java b/Mage.Sets/src/mage/cards/a/AncientHellkite.java index a44e3c9817..ce4ccc612f 100644 --- a/Mage.Sets/src/mage/cards/a/AncientHellkite.java +++ b/Mage.Sets/src/mage/cards/a/AncientHellkite.java @@ -25,29 +25,25 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.a; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.ActivatedAbilityImpl; -import mage.abilities.costs.Cost; -import mage.abilities.costs.CostImpl; -import mage.abilities.costs.mana.ColoredManaCost; +import mage.abilities.condition.common.SourceAttackingCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalActivatedAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ColoredManaSymbol; import mage.constants.SubType; import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.ControllerIdPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.target.common.TargetCreaturePermanent; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.permanent.DefendingPlayerControlsPredicate; +import mage.target.TargetPermanent; /** * @@ -55,15 +51,24 @@ import mage.target.common.TargetCreaturePermanent; */ public class AncientHellkite extends CardImpl { + private static final FilterPermanent filter = new FilterPermanent("creature defending player controls"); + + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); + filter.add(new DefendingPlayerControlsPredicate()); + } + public AncientHellkite(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}{R}"); this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); this.addAbility(FlyingAbility.getInstance()); - this.addAbility(new AncientHellkiteAbility()); + Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R}"), SourceAttackingCondition.instance); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); } public AncientHellkite(final AncientHellkite card) { @@ -76,71 +81,3 @@ public class AncientHellkite extends CardImpl { } } - -class AncientHellkiteAbility extends ActivatedAbilityImpl { - - private static final FilterCreaturePermanent filterTemplate = new FilterCreaturePermanent("creature defending player controls"); - - public AncientHellkiteAbility() { - super(Zone.BATTLEFIELD, new DamageTargetEffect(1)); - addCost(new AncientHellkiteCost()); - addManaCost(new ColoredManaCost(ColoredManaSymbol.R)); - addTarget(new TargetCreaturePermanent(filterTemplate)); - } - - public AncientHellkiteAbility(final AncientHellkiteAbility ability) { - super(ability); - } - - @Override - public AncientHellkiteAbility copy() { - return new AncientHellkiteAbility(this); - } - - @Override - public boolean activate(Game game, boolean noMana) { - UUID defenderId = game.getCombat().getDefenderId(sourceId); - if (defenderId != null) { - FilterCreaturePermanent filter = filterTemplate.copy(); - filter.add(new ControllerIdPredicate(defenderId)); - - this.getTargets().clear(); - TargetCreaturePermanent target = new TargetCreaturePermanent(filter); - this.addTarget(target); - return super.activate(game, noMana); - } - return false; - } -} - -class AncientHellkiteCost extends CostImpl { - - public AncientHellkiteCost() { - this.text = "Activate this ability only if Ancient Hellkite is attacking"; - } - - public AncientHellkiteCost(final AncientHellkiteCost cost) { - super(cost); - } - - @Override - public AncientHellkiteCost copy() { - return new AncientHellkiteCost(this); - } - - @Override - public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { - Permanent permanent = game.getPermanent(sourceId); - if (permanent != null && permanent.isAttacking()) { - return true; - } - return false; - } - - @Override - public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) { - this.paid = true; - return paid; - } - -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/a/AncientOoze.java b/Mage.Sets/src/mage/cards/a/AncientOoze.java index b1d652fff1..e6b1542c56 100644 --- a/Mage.Sets/src/mage/cards/a/AncientOoze.java +++ b/Mage.Sets/src/mage/cards/a/AncientOoze.java @@ -52,15 +52,17 @@ import mage.game.permanent.Permanent; public class AncientOoze extends CardImpl { public AncientOoze(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); this.subtype.add(SubType.OOZE); - this.color.setGreen(true); + this.color.setGreen(true); this.power = new MageInt(0); this.toughness = new MageInt(0); - // Ancient Ooze's power and toughness are each equal to the total converted mana cost of other creatures you control. - this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new AncientOozePowerToughnessValue(), Duration.EndOfGame))); + // Ancient Ooze's power and toughness are each equal to the total converted mana cost of other creatures you control. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new AncientOozePowerToughnessValue(), Duration.EndOfGame) + .setText("{this}'s power and toughness are each equal to the total converted mana cost of other creatures you control.") + )); } public AncientOoze(final AncientOoze card) { @@ -74,12 +76,12 @@ public class AncientOoze extends CardImpl { } class AncientOozePowerToughnessValue implements DynamicValue { - + @Override public int calculate(Game game, Ability sourceAbility, Effect effect) { int value = 0; - for(Permanent creature : game.getBattlefield().getActivePermanents(new FilterControlledCreaturePermanent(), sourceAbility.getControllerId(), game)){ - if(creature != null && !sourceAbility.getSourceId().equals(creature.getId())){ + for (Permanent creature : game.getBattlefield().getActivePermanents(new FilterControlledCreaturePermanent(), sourceAbility.getControllerId(), game)) { + if (creature != null && !sourceAbility.getSourceId().equals(creature.getId())) { value += creature.getConvertedManaCost(); } } diff --git a/Mage.Sets/src/mage/cards/a/AngelicVoices.java b/Mage.Sets/src/mage/cards/a/AngelicVoices.java new file mode 100644 index 0000000000..b18a58ba84 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AngelicVoices.java @@ -0,0 +1,89 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.InvertCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author TheElk801 + */ +public class AngelicVoices extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("nonartifact, nonwhite creatures"); + + static { + filter.add(Predicates.not( + Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new ColorPredicate(ObjectColor.WHITE) + ) + )); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public AngelicVoices(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); + + // Creatures you control get +1/+1 as long as you control no nonartifact, nonwhite creatures. + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ConditionalContinuousEffect( + new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield), + new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)), + "Creatures you control get +1/+1 as long as you control no nonartifact, nonwhite creatures." + ) + )); + } + + public AngelicVoices(final AngelicVoices card) { + super(card); + } + + @Override + public AngelicVoices copy() { + return new AngelicVoices(this); + } +} diff --git a/Mage.Sets/src/mage/cards/a/AngrathsMarauders.java b/Mage.Sets/src/mage/cards/a/AngrathsMarauders.java new file mode 100644 index 0000000000..e6e12b2eec --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AngrathsMarauders.java @@ -0,0 +1,112 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author TheElk801 + */ +public class AngrathsMarauders extends CardImpl { + + public AngrathsMarauders(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // If a source you control would deal damage to a permanent or player, it deals double that damage to that permanent or player instead. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AngrathsMaraudersEffect())); + } + + public AngrathsMarauders(final AngrathsMarauders card) { + super(card); + } + + @Override + public AngrathsMarauders copy() { + return new AngrathsMarauders(this); + } +} + +class AngrathsMaraudersEffect extends ReplacementEffectImpl { + + public AngrathsMaraudersEffect() { + super(Duration.WhileOnBattlefield, Outcome.Damage); + staticText = "If a source you control would deal damage to a permanent or player, it deals double that damage to that permanent or player instead"; + } + + public AngrathsMaraudersEffect(final AngrathsMaraudersEffect effect) { + super(effect); + } + + @Override + public AngrathsMaraudersEffect copy() { + return new AngrathsMaraudersEffect(this); + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + switch (event.getType()) { + case DAMAGE_PLAYER: + return true; + case DAMAGE_CREATURE: + return true; + case DAMAGE_PLANESWALKER: + return true; + } + return false; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + return game.getControllerId(event.getSourceId()).equals(source.getControllerId()); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + event.setAmount(2 * event.getAmount()); + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/a/AnimarSoulOfElements.java b/Mage.Sets/src/mage/cards/a/AnimarSoulOfElements.java index 7377f176bc..f34ddeec7b 100644 --- a/Mage.Sets/src/mage/cards/a/AnimarSoulOfElements.java +++ b/Mage.Sets/src/mage/cards/a/AnimarSoulOfElements.java @@ -46,6 +46,7 @@ import mage.counters.CounterType; import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.game.stack.Spell; import mage.util.CardUtil; /** @@ -111,9 +112,15 @@ class AnimarCostReductionEffect extends CostModificationEffectImpl { @Override public boolean applies(Ability abilityToModify, Ability source, Game game) { if (abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility) { - Card sourceCard = game.getCard(abilityToModify.getSourceId()); - if (sourceCard != null && abilityToModify.getControllerId().equals(source.getControllerId()) && (sourceCard.isCreature())) { - return true; + if (abilityToModify.getControllerId().equals(source.getControllerId())) { + Spell spell = (Spell) game.getStack().getStackObject(abilityToModify.getId()); + if (spell != null) { + return spell.isCreature(); + } else { + // used at least for flashback ability because Flashback ability doesn't use stack or for getPlayables where spell is not cast yet + Card sourceCard = game.getCard(abilityToModify.getSourceId()); + return sourceCard != null && sourceCard.isCreature(); + } } } return false; diff --git a/Mage.Sets/src/mage/cards/a/AnimateDead.java b/Mage.Sets/src/mage/cards/a/AnimateDead.java index 73563a761d..4c57bb51d2 100644 --- a/Mage.Sets/src/mage/cards/a/AnimateDead.java +++ b/Mage.Sets/src/mage/cards/a/AnimateDead.java @@ -61,7 +61,7 @@ import mage.target.common.TargetCreaturePermanent; public class AnimateDead extends CardImpl { public AnimateDead(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); this.subtype.add(SubType.AURA); // Enchant creature card in a graveyard @@ -167,7 +167,7 @@ class AnimateDeadLeavesBattlefieldTriggeredEffect extends OneShotEffect { if (controller != null && sourcePermanent != null) { if (sourcePermanent.getAttachedTo() != null) { Permanent attachedTo = game.getPermanent(sourcePermanent.getAttachedTo()); - if (attachedTo != null) { + if (attachedTo != null && attachedTo.getZoneChangeCounter(game) == sourcePermanent.getAttachedToZoneChangeCounter()) { attachedTo.sacrifice(source.getSourceId(), game); } } diff --git a/Mage.Sets/src/mage/cards/a/AnointedDeacon.java b/Mage.Sets/src/mage/cards/a/AnointedDeacon.java new file mode 100644 index 0000000000..fff9f72130 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AnointedDeacon.java @@ -0,0 +1,78 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author caldover + */ +public class AnointedDeacon extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Vampire"); + + static { + filter.add(new SubtypePredicate(SubType.VAMPIRE)); + } + + public AnointedDeacon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // At the beginning of combat on your turn, you may have target Vampire get +2/+0 until end of turn. + Ability ability = new BeginningOfCombatTriggeredAbility(Zone.BATTLEFIELD, + new BoostTargetEffect(2, 0, Duration.EndOfTurn).setText("you may have target Vampire get +2/+0 until end of turn"), + TargetController.YOU, true, false); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public AnointedDeacon(final AnointedDeacon card) { + super(card); + } + + @Override + public AnointedDeacon copy() { + return new AnointedDeacon(this); + } +} diff --git a/Mage.Sets/src/mage/cards/a/Anthroplasm.java b/Mage.Sets/src/mage/cards/a/Anthroplasm.java index f90edce634..c42e0f42d7 100644 --- a/Mage.Sets/src/mage/cards/a/Anthroplasm.java +++ b/Mage.Sets/src/mage/cards/a/Anthroplasm.java @@ -53,7 +53,7 @@ import mage.game.permanent.Permanent; public class Anthroplasm extends CardImpl { public Anthroplasm(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); @@ -65,7 +65,7 @@ public class Anthroplasm extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AnthroplasmEffect(), new ManaCostsImpl("{X}")); ability.addCost(new TapSourceCost()); this.addAbility(ability); - + } public Anthroplasm(final Anthroplasm card) { @@ -80,12 +80,12 @@ public class Anthroplasm extends CardImpl { class AnthroplasmEffect extends OneShotEffect { - AnthroplasmEffect ( ) { + AnthroplasmEffect() { super(Outcome.Benefit); - staticText = "Remove all +1/+1 counters from Anthroplasm and put X +1/+1 counters on it"; + staticText = "Remove all +1/+1 counters from {this} and put X +1/+1 counters on it"; } - AnthroplasmEffect ( AnthroplasmEffect effect ) { + AnthroplasmEffect(AnthroplasmEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/a/AphettoVulture.java b/Mage.Sets/src/mage/cards/a/AphettoVulture.java index ac7ad529bb..1c717f0903 100644 --- a/Mage.Sets/src/mage/cards/a/AphettoVulture.java +++ b/Mage.Sets/src/mage/cards/a/AphettoVulture.java @@ -56,8 +56,8 @@ public class AphettoVulture extends CardImpl { public AphettoVulture(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Bird"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.BIRD); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/a/ApocalypseDemon.java b/Mage.Sets/src/mage/cards/a/ApocalypseDemon.java index d0c539f2fd..889d8d735c 100644 --- a/Mage.Sets/src/mage/cards/a/ApocalypseDemon.java +++ b/Mage.Sets/src/mage/cards/a/ApocalypseDemon.java @@ -1,3 +1,30 @@ +/* +* 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.cards.a; import java.util.UUID; @@ -16,12 +43,16 @@ import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.common.TargetControlledPermanent; +/** + * + * @author MajorLazar + */ public class ApocalypseDemon extends CardImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("nother creature"); - - static { - filter.add(new CardTypePredicate(CardType.CREATURE)); + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature"); + + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); filter.add(new AnotherPredicate()); } @@ -37,12 +68,12 @@ public class ApocalypseDemon extends CardImpl { // At the beginning of your upkeep, tap Apocalypse Demon unless you sacrifice another creature. TapSourceUnlessPaysEffect tapEffect = new TapSourceUnlessPaysEffect(new SacrificeTargetCost(new TargetControlledPermanent(filter))); - tapEffect.setText("At the beginning of your upkeep, tap Apocalypse Demon unless you sacrifice another creature."); + tapEffect.setText("tap {this} unless you sacrifice another creature."); this.addAbility(new BeginningOfUpkeepTriggeredAbility(tapEffect, TargetController.YOU, false)); - } - - public ApocalypseDemon(final ApocalypseDemon apocalypseDemon) { - super(apocalypseDemon); + } + + public ApocalypseDemon(final ApocalypseDemon card) { + super(card); } public ApocalypseDemon copy() { diff --git a/Mage.Sets/src/mage/cards/a/ApothecaryInitiate.java b/Mage.Sets/src/mage/cards/a/ApothecaryInitiate.java index d77c4658db..4b90f1926c 100644 --- a/Mage.Sets/src/mage/cards/a/ApothecaryInitiate.java +++ b/Mage.Sets/src/mage/cards/a/ApothecaryInitiate.java @@ -44,18 +44,18 @@ import mage.filter.predicate.mageobject.ColorPredicate; /** * * @author jeffwadsworth - + * */ public class ApothecaryInitiate extends CardImpl { - + private static final FilterSpell filter = new FilterSpell("a white spell"); - + static { filter.add(new ColorPredicate(ObjectColor.WHITE)); } public ApothecaryInitiate(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); this.subtype.add(SubType.KITHKIN); this.subtype.add(SubType.CLERIC); @@ -63,8 +63,8 @@ public class ApothecaryInitiate extends CardImpl { this.toughness = new MageInt(1); // Whenever a player casts a white spell, you may pay {1}. If you do, you gain 1 life. - this.addAbility(new SpellCastAllTriggeredAbility(new DoIfCostPaid(new GainLifeEffect(1), new ManaCostsImpl("{1}")), filter, true)); - + this.addAbility(new SpellCastAllTriggeredAbility(new DoIfCostPaid(new GainLifeEffect(1), new ManaCostsImpl("{1}")), filter, false)); + } public ApothecaryInitiate(final ApothecaryInitiate card) { diff --git a/Mage.Sets/src/mage/cards/a/AppealAuthority.java b/Mage.Sets/src/mage/cards/a/AppealAuthority.java index b8acda0f7b..8403bf305c 100644 --- a/Mage.Sets/src/mage/cards/a/AppealAuthority.java +++ b/Mage.Sets/src/mage/cards/a/AppealAuthority.java @@ -1,91 +1,91 @@ -/* - * 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.cards.a; - -import java.util.UUID; -import mage.abilities.dynamicvalue.DynamicValue; -import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.effects.common.TapTargetEffect; -import mage.abilities.effects.common.continuous.BoostTargetEffect; -import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.abilities.keyword.AftermathAbility; -import mage.abilities.keyword.TrampleAbility; -import mage.abilities.keyword.VigilanceAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.SplitCard; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SpellAbilityType; -import mage.constants.TargetController; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.ControllerPredicate; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author LevelX2 - */ -public class AppealAuthority extends SplitCard { - - public AppealAuthority(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.SORCERY}, "{G}", "{1}{W}", SpellAbilityType.SPLIT_AFTERMATH); - - // Appeal - // Until end of turn, target creature gains trample and gets +X/+X, where X is the number of creatures you control. - getLeftHalfCard().getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn) - .setText("Until end of turn, target creature gains trample")); - DynamicValue controlledCreatures = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent("the number of creatures you control")); - getLeftHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(controlledCreatures, controlledCreatures, Duration.EndOfTurn, true) - .setText("and gets +X/+X, where X is the number of creatures you control")); - getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); - - // Authority - // Aftermath - ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true)); - // Tap up to two target creatures your opponents control. Creatures you control gain vigilance until end of turn. - getRightHalfCard().getSpellAbility().addEffect(new TapTargetEffect()); - FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures your opponents control"); - filter.add(new ControllerPredicate(TargetController.OPPONENT)); - getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2, filter, false)); - getRightHalfCard().getSpellAbility().addEffect(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), - Duration.EndOfTurn, new FilterControlledCreaturePermanent("creatures"))); - - } - - public AppealAuthority(final AppealAuthority card) { - super(card); - } - - @Override - public AppealAuthority copy() { - return new AppealAuthority(this); - } -} +/* + * 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.cards.a; + +import java.util.UUID; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.AftermathAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.SplitCard; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SpellAbilityType; +import mage.constants.TargetController; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class AppealAuthority extends SplitCard { + + public AppealAuthority(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.SORCERY}, "{G}", "{1}{W}", SpellAbilityType.SPLIT_AFTERMATH); + + // Appeal + // Until end of turn, target creature gains trample and gets +X/+X, where X is the number of creatures you control. + getLeftHalfCard().getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn) + .setText("Until end of turn, target creature gains trample")); + DynamicValue controlledCreatures = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent("the number of creatures you control")); + getLeftHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(controlledCreatures, controlledCreatures, Duration.EndOfTurn, true) + .setText("and gets +X/+X, where X is the number of creatures you control")); + getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Authority + // Aftermath + ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true)); + // Tap up to two target creatures your opponents control. Creatures you control gain vigilance until end of turn. + getRightHalfCard().getSpellAbility().addEffect(new TapTargetEffect()); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures your opponents control"); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2, filter, false)); + getRightHalfCard().getSpellAbility().addEffect(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), + Duration.EndOfTurn, new FilterControlledCreaturePermanent("creatures"))); + + } + + public AppealAuthority(final AppealAuthority card) { + super(card); + } + + @Override + public AppealAuthority copy() { + return new AppealAuthority(this); + } +} diff --git a/Mage.Sets/src/mage/cards/a/ApproachOfTheSecondSun.java b/Mage.Sets/src/mage/cards/a/ApproachOfTheSecondSun.java index a058d12f3b..bc0e06d654 100644 --- a/Mage.Sets/src/mage/cards/a/ApproachOfTheSecondSun.java +++ b/Mage.Sets/src/mage/cards/a/ApproachOfTheSecondSun.java @@ -63,7 +63,10 @@ class ApproachOfTheSecondSunEffect extends OneShotEffect { if (controller != null && spell != null) { ApproachOfTheSecondSunWatcher watcher = (ApproachOfTheSecondSunWatcher) game.getState().getWatchers().get(ApproachOfTheSecondSunWatcher.class.getSimpleName()); - if (watcher != null && watcher.getApproachesCast(controller.getId()) > 1 && spell.getFromZone() == Zone.HAND) { + if (watcher != null + && !spell.isCopiedSpell() + && watcher.getApproachesCast(controller.getId()) > 1 + && spell.getFromZone() == Zone.HAND) { // Win the game controller.won(game); } else { @@ -71,6 +74,9 @@ class ApproachOfTheSecondSunEffect extends OneShotEffect { controller.gainLife(7, game); // Put this into the library as the 7th from the top + if (spell.isCopiedSpell()) { + return true; + } Card spellCard = game.getStack().getSpell(source.getSourceId()).getCard(); if (spellCard != null) { List top6 = new ArrayList<>(); diff --git a/Mage.Sets/src/mage/cards/a/ArcaneAdaptation.java b/Mage.Sets/src/mage/cards/a/ArcaneAdaptation.java new file mode 100644 index 0000000000..1d32c37240 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/ArcaneAdaptation.java @@ -0,0 +1,166 @@ +/* + * 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.cards.a; + +import mage.abilities.Ability; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.ChooseCreatureTypeEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.stack.Spell; +import mage.game.stack.StackObject; +import mage.players.Player; + +import java.util.Iterator; +import java.util.List; +import java.util.UUID; + +/** + * + * @author TheElk801 + */ +public class ArcaneAdaptation extends CardImpl { + + public ArcaneAdaptation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + + // As Arcane Adaptation enters the battlefield, choose a creature type. + this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.Neutral))); + // Creatures you control are the chosen type in addition to their other types. The same is true for creature spells you control and creature cards you own that aren't on the battlefield. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConspyEffect())); + } + + public ArcaneAdaptation(final ArcaneAdaptation card) { + super(card); + } + + @Override + public ArcaneAdaptation copy() { + return new ArcaneAdaptation(this); + } +} + +class ConspyEffect extends ContinuousEffectImpl { + + public ConspyEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = "Creatures you control are the chosen type in addition to their other types. The same is true for creature spells you control and creature cards you own that aren't on the battlefield"; + } + + public ConspyEffect(final ConspyEffect effect) { + super(effect); + } + + @Override + public ConspyEffect copy() { + return new ConspyEffect(this); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + Player controller = game.getPlayer(source.getControllerId()); + SubType choice = (SubType) game.getState().getValue(source.getSourceId().toString() + "_type"); + if (controller != null && choice != null) { + // Creature cards you own that aren't on the battlefield + // in graveyard + for (UUID cardId : controller.getGraveyard()) { + Card card = game.getCard(cardId); + if (card.isCreature() && !card.hasSubtype(choice, game)) { + game.getState().getCreateCardAttribute(card, game).getSubtype().add(choice); + } + } + // on Hand + for (UUID cardId : controller.getHand()) { + Card card = game.getCard(cardId); + if (card.isCreature() && !card.hasSubtype(choice, game)) { + game.getState().getCreateCardAttribute(card, game).getSubtype().add(choice); + } + } + // in Exile + for (Card card : game.getState().getExile().getAllCards(game)) { + if (card.isCreature() && !card.hasSubtype(choice, game)) { + game.getState().getCreateCardAttribute(card, game).getSubtype().add(choice); + } + } + // in Library (e.g. for Mystical Teachings) + for (Card card : controller.getLibrary().getCards(game)) { + if (card.getOwnerId().equals(controller.getId()) && card.isCreature() && !card.hasSubtype(choice, game)) { + game.getState().getCreateCardAttribute(card, game).getSubtype().add(choice); + } + } + // commander in command zone + for (UUID commanderId : controller.getCommandersIds()) { + if (game.getState().getZone(commanderId) == Zone.COMMAND) { + Card card = game.getCard(commanderId); + if (card.isCreature() && !card.hasSubtype(choice, game)) { + game.getState().getCreateCardAttribute(card, game).getSubtype().add(choice); + } + } + } + // creature spells you control + for (Iterator iterator = game.getStack().iterator(); iterator.hasNext();) { + StackObject stackObject = iterator.next(); + if (stackObject instanceof Spell + && stackObject.getControllerId().equals(source.getControllerId()) + && stackObject.isCreature() + && !stackObject.hasSubtype(choice, game)) { + Card card = ((Spell) stackObject).getCard(); + game.getState().getCreateCardAttribute(card, game).getSubtype().add(choice); + } + } + // creatures you control + List creatures = game.getBattlefield().getAllActivePermanents( + new FilterControlledCreaturePermanent(), source.getControllerId(), game); + for (Permanent creature : creatures) { + if (creature != null && !creature.hasSubtype(choice, game)) { + creature.getSubtype(game).add(choice); + } + } + return true; + } + + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public boolean hasLayer(Layer layer) { + return layer == Layer.TypeChangingEffects_4; + } +} diff --git a/Mage.Sets/src/mage/cards/a/ArcboundSlith.java b/Mage.Sets/src/mage/cards/a/ArcboundSlith.java index d5306d046c..2e00d9a16c 100644 --- a/Mage.Sets/src/mage/cards/a/ArcboundSlith.java +++ b/Mage.Sets/src/mage/cards/a/ArcboundSlith.java @@ -29,7 +29,7 @@ package mage.cards.a; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.ModularAbility; import mage.cards.CardImpl; @@ -45,14 +45,14 @@ import mage.counters.CounterType; public class ArcboundSlith extends CardImpl { public ArcboundSlith(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); this.subtype.add(SubType.SLITH); this.power = new MageInt(0); this.toughness = new MageInt(0); // Whenever Arcbound Slith deals combat damage to a player, put a +1/+1 counter on it. - this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(), true), false)); - + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(), true), false)); + // Modular 1 this.addAbility(new ModularAbility(this, 1)); } diff --git a/Mage.Sets/src/mage/cards/a/ArchmageAscension.java b/Mage.Sets/src/mage/cards/a/ArchmageAscension.java index 2cfe71062b..dc913c1005 100644 --- a/Mage.Sets/src/mage/cards/a/ArchmageAscension.java +++ b/Mage.Sets/src/mage/cards/a/ArchmageAscension.java @@ -55,8 +55,7 @@ import mage.watchers.common.CardsAmountDrawnThisTurnWatcher; public class ArchmageAscension extends CardImpl { public ArchmageAscension(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); // At the beginning of each end step, if you drew two or more cards this turn, you may put a quest counter on Archmage Ascension. this.addAbility(new ArchmageAscensionTriggeredAbility(), new CardsAmountDrawnThisTurnWatcher()); @@ -64,7 +63,7 @@ public class ArchmageAscension extends CardImpl { // As long as Archmage Ascension has six or more quest counters on it, if you would draw a card, // you may instead search your library for a card, put that card into your hand, then shuffle your library. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ArchmageAscensionReplacementEffect())); - + } public ArchmageAscension(final ArchmageAscension card) { @@ -91,17 +90,17 @@ class ArchmageAscensionTriggeredAbility extends TriggeredAbilityImpl { public ArchmageAscensionTriggeredAbility copy() { return new ArchmageAscensionTriggeredAbility(this); } - + @Override public boolean checkEventType(GameEvent event, Game game) { return event.getType() == GameEvent.EventType.END_TURN_STEP_PRE; } - + @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent archmage = game.getPermanent(super.getSourceId()); - CardsAmountDrawnThisTurnWatcher watcher = - (CardsAmountDrawnThisTurnWatcher) game.getState().getWatchers().get(CardsAmountDrawnThisTurnWatcher.class.getSimpleName()); + CardsAmountDrawnThisTurnWatcher watcher + = (CardsAmountDrawnThisTurnWatcher) game.getState().getWatchers().get(CardsAmountDrawnThisTurnWatcher.class.getSimpleName()); return archmage != null && watcher != null && watcher.getAmountCardsDrawn(this.getControllerId()) >= 2; } @@ -115,8 +114,8 @@ class ArchmageAscensionReplacementEffect extends ReplacementEffectImpl { public ArchmageAscensionReplacementEffect() { super(Duration.WhileOnBattlefield, Outcome.Benefit); - staticText = "As long as {this} has six or more quest counters on it, if you would draw a card, " + - "you may instead search your library for a card, put that card into your hand, then shuffle your library"; + staticText = "As long as {this} has six or more quest counters on it, if you would draw a card, " + + "you may instead search your library for a card, put that card into your hand, then shuffle your library"; } public ArchmageAscensionReplacementEffect(final ArchmageAscensionReplacementEffect effect) { @@ -141,19 +140,19 @@ class ArchmageAscensionReplacementEffect extends ReplacementEffectImpl { if (player.searchLibrary(target, game)) { Card card = game.getCard(target.getFirstTarget()); if (card != null) { - card.moveToZone(Zone.HAND, id, game, false); + card.moveToZone(Zone.HAND, source.getSourceId(), game, false); player.shuffleLibrary(source, game); } } } return true; } - + @Override public boolean checksEventType(GameEvent event, Game game) { return event.getType() == GameEvent.EventType.DRAW_CARD; } - + @Override public boolean applies(GameEvent event, Ability source, Game game) { Permanent archmage = game.getPermanent(source.getSourceId()); diff --git a/Mage.Sets/src/mage/cards/a/ArcticNishoba.java b/Mage.Sets/src/mage/cards/a/ArcticNishoba.java new file mode 100644 index 0000000000..927961134a --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/ArcticNishoba.java @@ -0,0 +1,85 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.costs.OrCost; +import mage.constants.SubType; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.MultipliedValue; +import mage.abilities.dynamicvalue.common.CountersSourceCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; + +/** + * + * @author TheElk801 + */ +public class ArcticNishoba extends CardImpl { + + public ArcticNishoba(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}"); + + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Cumulative upkeep {G} or {W} + this.addAbility(new CumulativeUpkeepAbility(new OrCost( + new ManaCostsImpl("{G}"), + new ManaCostsImpl("{W}"), + "{G} or {W}" + ))); + + // When Arctic Nishoba dies, you gain 2 life for each age counter on it. + Effect effect = new GainLifeEffect(new MultipliedValue(new CountersSourceCount(CounterType.AGE), 2)); + effect.setText("you gain 2 life for each age counter on it"); + this.addAbility(new DiesTriggeredAbility(effect)); + } + + public ArcticNishoba(final ArcticNishoba card) { + super(card); + } + + @Override + public ArcticNishoba copy() { + return new ArcticNishoba(this); + } +} diff --git a/Mage.Sets/src/mage/cards/a/ArguelsBloodFast.java b/Mage.Sets/src/mage/cards/a/ArguelsBloodFast.java new file mode 100644 index 0000000000..5ad32f20df --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/ArguelsBloodFast.java @@ -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.cards.a; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.FatefulHourCondition; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.t.TempleOfAclazotz; +import mage.constants.CardType; +import mage.constants.SuperType; +import mage.constants.TargetController; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class ArguelsBloodFast extends CardImpl { + + public ArguelsBloodFast(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); + + addSuperType(SuperType.LEGENDARY); + this.transformable = true; + this.secondSideCardClazz = TempleOfAclazotz.class; + + // {1}{B}, Pay 2 life: Draw a card. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{1}{B}")); + ability.addCost(new PayLifeCost(2)); + this.addAbility(ability); + + // At the beginning of your upkeep, if you have 5 or less life, you may transform Arguel's Blood Fast. + this.addAbility(new TransformAbility()); + this.addAbility(new ConditionalTriggeredAbility( + new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, true), + FatefulHourCondition.instance, + "At the beginning of your upkeep, if you have 5 or less life, you may transform {this}" + )); + } + + public ArguelsBloodFast(final ArguelsBloodFast card) { + super(card); + } + + @Override + public ArguelsBloodFast copy() { + return new ArguelsBloodFast(this); + } +} diff --git a/Mage.Sets/src/mage/cards/a/ArmamentMaster.java b/Mage.Sets/src/mage/cards/a/ArmamentMaster.java index 89cdd08823..aef4031ef5 100644 --- a/Mage.Sets/src/mage/cards/a/ArmamentMaster.java +++ b/Mage.Sets/src/mage/cards/a/ArmamentMaster.java @@ -27,8 +27,6 @@ */ package mage.cards.a; -import java.util.List; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; @@ -41,6 +39,9 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; import mage.game.permanent.Permanent; +import java.util.List; +import java.util.UUID; + /** * * @author North @@ -116,7 +117,7 @@ class ArmamentMasterEffect extends ContinuousEffectImpl { List attachments = p.getAttachments(); for (UUID attachmentId : attachments) { Permanent attached = game.getPermanent(attachmentId); - if (attached != null && attached.getSubtype(game).contains("Equipment")) { + if (attached != null && attached.hasSubtype(SubType.EQUIPMENT, game)) { count++; } } diff --git a/Mage.Sets/src/mage/cards/a/ArrowStorm.java b/Mage.Sets/src/mage/cards/a/ArrowStorm.java index 4783ceb255..741c85126a 100644 --- a/Mage.Sets/src/mage/cards/a/ArrowStorm.java +++ b/Mage.Sets/src/mage/cards/a/ArrowStorm.java @@ -45,8 +45,7 @@ import mage.watchers.common.PlayerAttackedWatcher; public class ArrowStorm extends CardImpl { public ArrowStorm(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); // Arrow Storm deals 4 damage to target creature or player. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( @@ -58,7 +57,7 @@ public class ArrowStorm extends CardImpl { this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DamageTargetEffect(5, false), RaidCondition.instance, - "

Raid - If you attacked with a creature this turn, instead {this} deals 5 damage to that creature or player and the damage can't be prevented")); + "

Raid — If you attacked with a creature this turn, instead {this} deals 5 damage to that creature or player and the damage can't be prevented")); this.getSpellAbility().addWatcher(new PlayerAttackedWatcher()); } diff --git a/Mage.Sets/src/mage/cards/a/AshenGhoul.java b/Mage.Sets/src/mage/cards/a/AshenGhoul.java new file mode 100644 index 0000000000..243529325d --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AshenGhoul.java @@ -0,0 +1,116 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; +import mage.constants.SubType; +import mage.abilities.keyword.HasteAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.PhaseStep; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class AshenGhoul extends CardImpl { + + public AshenGhoul(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.ZOMBIE); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // {B}: Return Ashen Ghoul from your graveyard to the battlefield. Activate this ability only during your upkeep and only if three or more creature cards are above Ashen Ghoul. + this.addAbility(new ConditionalActivatedAbility( + Zone.GRAVEYARD, + new ReturnSourceFromGraveyardToBattlefieldEffect(), + new ManaCostsImpl("{B}"), + AshenGhoulCondition.instance + )); + } + + public AshenGhoul(final AshenGhoul card) { + super(card); + } + + @Override + public AshenGhoul copy() { + return new AshenGhoul(this); + } +} + +enum AshenGhoulCondition implements Condition { + + instance; + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (!game.getStep().getType().equals(PhaseStep.UPKEEP) + || !game.getActivePlayerId().equals(source.getControllerId())) { + return false; + } + if (controller != null) { + int cardsAbove = 0; + boolean aboveCards = false; + for (Card card : controller.getGraveyard().getCards(game)) { + if (aboveCards && card.isCreature()) { + cardsAbove++; + if (cardsAbove > 2) { + return true; + } + } + if (card.getId().equals(source.getSourceId())) { + aboveCards = true; + } + } + } + return false; + } + + @Override + public String toString() { + return "three or more creature cards are above {this}"; + } +} diff --git a/Mage.Sets/src/mage/cards/a/AshenMonstrosity.java b/Mage.Sets/src/mage/cards/a/AshenMonstrosity.java index f1c2796430..a1ee9629e2 100644 --- a/Mage.Sets/src/mage/cards/a/AshenMonstrosity.java +++ b/Mage.Sets/src/mage/cards/a/AshenMonstrosity.java @@ -29,7 +29,7 @@ package mage.cards.a; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -50,7 +50,7 @@ public class AshenMonstrosity extends CardImpl { this.toughness = new MageInt(4); this.addAbility(HasteAbility.getInstance()); // Ashen Monstrosity attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public AshenMonstrosity(final AshenMonstrosity card) { diff --git a/Mage.Sets/src/mage/cards/a/AshesOfTheAbhorrent.java b/Mage.Sets/src/mage/cards/a/AshesOfTheAbhorrent.java new file mode 100644 index 0000000000..482cfc09ac --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AshesOfTheAbhorrent.java @@ -0,0 +1,110 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author TheElk801 + */ +public class AshesOfTheAbhorrent extends CardImpl { + + public AshesOfTheAbhorrent(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + + // Players can't cast spells from graveyards or activate abilities of cards in graveyards. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AshesOfTheAbhorrentEffect())); + + // Whenever a creature dies, you gain 1 life. + this.addAbility(new DiesCreatureTriggeredAbility(new GainLifeEffect(1), false)); + } + + public AshesOfTheAbhorrent(final AshesOfTheAbhorrent card) { + super(card); + } + + @Override + public AshesOfTheAbhorrent copy() { + return new AshesOfTheAbhorrent(this); + } +} + +class AshesOfTheAbhorrentEffect extends ContinuousRuleModifyingEffectImpl { + + public AshesOfTheAbhorrentEffect() { + super(Duration.WhileOnBattlefield, Outcome.Neutral); + staticText = "Players can't cast spells from graveyards or activate abilities of cards in graveyards"; + } + + public AshesOfTheAbhorrentEffect(final AshesOfTheAbhorrentEffect effect) { + super(effect); + } + + @Override + public AshesOfTheAbhorrentEffect copy() { + return new AshesOfTheAbhorrentEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.CAST_SPELL + || event.getType() == GameEvent.EventType.ACTIVATE_ABILITY; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + Card card = game.getCard(event.getSourceId()); + if (card != null) { + Zone zone = game.getState().getZone(card.getId()); + if (zone != null && (zone == Zone.GRAVEYARD)) { + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/a/AshesOfTheFallen.java b/Mage.Sets/src/mage/cards/a/AshesOfTheFallen.java index c424647775..edf3af051d 100644 --- a/Mage.Sets/src/mage/cards/a/AshesOfTheFallen.java +++ b/Mage.Sets/src/mage/cards/a/AshesOfTheFallen.java @@ -49,11 +49,11 @@ import java.util.UUID; public class AshesOfTheFallen extends CardImpl { public AshesOfTheFallen(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); // As Ashes of the Fallen enters the battlefield, choose a creature type. this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.Benefit))); - + // Each creature card in your graveyard has the chosen creature type in addition to its other types. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AshesOfTheFallenEffect())); } @@ -69,7 +69,7 @@ public class AshesOfTheFallen extends CardImpl { } class AshesOfTheFallenEffect extends ContinuousEffectImpl { - + AshesOfTheFallenEffect() { super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit); staticText = "Each creature card in your graveyard has the chosen creature type in addition to its other types"; @@ -87,8 +87,8 @@ class AshesOfTheFallenEffect extends ContinuousEffectImpl { SubType subtype = (SubType) game.getState().getValue(permanent.getId() + "_type"); for (UUID cardId : controller.getGraveyard()) { Card card = game.getCard(cardId); - if (card != null && card.isCreature() && !card.getSubtype(game).contains(subtype)) { - game.getState().getCreateCardAttribute(card).getSubtype().add(subtype); + if (card != null && card.isCreature() && !card.hasSubtype(subtype, game)) { + game.getState().getCreateCardAttribute(card, game).getSubtype().add(subtype); } } return true; @@ -101,4 +101,3 @@ class AshesOfTheFallenEffect extends ContinuousEffectImpl { return new AshesOfTheFallenEffect(this); } } - diff --git a/Mage.Sets/src/mage/cards/a/AshiokNightmareWeaver.java b/Mage.Sets/src/mage/cards/a/AshiokNightmareWeaver.java index 43b785ac75..c5cdc0e3a8 100644 --- a/Mage.Sets/src/mage/cards/a/AshiokNightmareWeaver.java +++ b/Mage.Sets/src/mage/cards/a/AshiokNightmareWeaver.java @@ -195,7 +195,7 @@ class AshiokNightmareWeaverAddTypeEffect extends ContinuousEffectImpl { switch (layer) { case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { - creature.getSubtype(game).add("Nightmare"); + creature.getSubtype(game).add(SubType.NIGHTMARE); } break; } diff --git a/Mage.Sets/src/mage/cards/a/AssassinsBlade.java b/Mage.Sets/src/mage/cards/a/AssassinsBlade.java new file mode 100644 index 0000000000..88c4ebf61d --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AssassinsBlade.java @@ -0,0 +1,85 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility; +import mage.abilities.condition.common.AttackedThisStepCondition; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.PhaseStep; +import mage.constants.TurnPhase; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.permanent.AttackingPredicate; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.common.PlayerAttackedStepWatcher; + +/** + * + * @author TheElk801 + */ +public class AssassinsBlade extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack attacking creature"); + + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + filter.add(new AttackingPredicate()); + } + + public AssassinsBlade(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}"); + + // Cast Assassin's Blade only during the declare attackers step and only if you've been attacked this step. + Ability ability = new CastOnlyDuringPhaseStepSourceAbility( + TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance, + "Cast {this} only during the declare attackers step and only if you've been attacked this step." + ); + ability.addWatcher(new PlayerAttackedStepWatcher()); + this.addAbility(ability); + + // Destroy target nonblack attacking creature. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + } + + public AssassinsBlade(final AssassinsBlade card) { + super(card); + } + + @Override + public AssassinsBlade copy() { + return new AssassinsBlade(this); + } +} diff --git a/Mage.Sets/src/mage/cards/a/AtalyaSamiteMaster.java b/Mage.Sets/src/mage/cards/a/AtalyaSamiteMaster.java index 474945b89a..8a62d61886 100644 --- a/Mage.Sets/src/mage/cards/a/AtalyaSamiteMaster.java +++ b/Mage.Sets/src/mage/cards/a/AtalyaSamiteMaster.java @@ -68,7 +68,7 @@ public class AtalyaSamiteMaster extends CardImpl { // {X}, {tap}: Choose one - Prevent the next X damage that would be dealt to target creature this turn; or you gain X life. Spend only white mana on X. PreventDamageToTargetEffect effect = new PreventDamageToTargetEffect(Duration.EndOfTurn, false, true, new ManacostVariableValue()); - effect.setText("Prevent the next X damage that would be dealt to target creature this turn"); + effect.setText("Prevent the next X damage that would be dealt to target creature this turn. Spend only white mana on X."); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}")); ability.addCost(new TapSourceCost()); @@ -81,7 +81,7 @@ public class AtalyaSamiteMaster extends CardImpl { // or you gain X life Mode mode = new Mode(); - mode.getEffects().add(new GainLifeEffect(new ManacostVariableValue())); + mode.getEffects().add(new GainLifeEffect(new ManacostVariableValue()).setText("You gain X life. Spend only white mana on X.")); ability.addMode(mode); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/a/AtarkaWorldRender.java b/Mage.Sets/src/mage/cards/a/AtarkaWorldRender.java index bdeced5686..7cc32c280d 100644 --- a/Mage.Sets/src/mage/cards/a/AtarkaWorldRender.java +++ b/Mage.Sets/src/mage/cards/a/AtarkaWorldRender.java @@ -52,7 +52,7 @@ import mage.target.targetpointer.FixedTarget; public class AtarkaWorldRender extends CardImpl { public AtarkaWorldRender(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}{G}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/a/AtzocanArcher.java b/Mage.Sets/src/mage/cards/a/AtzocanArcher.java new file mode 100644 index 0000000000..7cb2fb513a --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AtzocanArcher.java @@ -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.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.FightTargetSourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class AtzocanArcher extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature"); + + static { + filter.add(new AnotherPredicate()); + } + + public AtzocanArcher(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARCHER); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // Reach + this.addAbility(ReachAbility.getInstance()); + + // When Atzocan Archer enters the battlefield, you may have it fight another target creature. + Effect effect = new FightTargetSourceEffect(); + effect.setText("you may have it fight another target creature"); + Ability ability = new EntersBattlefieldTriggeredAbility(effect, true); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public AtzocanArcher(final AtzocanArcher card) { + super(card); + } + + @Override + public AtzocanArcher copy() { + return new AtzocanArcher(this); + } +} diff --git a/Mage.Sets/src/mage/cards/a/AuramancersGuise.java b/Mage.Sets/src/mage/cards/a/AuramancersGuise.java index 2068346c59..7bb76dcc1f 100644 --- a/Mage.Sets/src/mage/cards/a/AuramancersGuise.java +++ b/Mage.Sets/src/mage/cards/a/AuramancersGuise.java @@ -27,8 +27,6 @@ */ package mage.cards.a; -import java.util.List; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.DynamicValue; @@ -46,6 +44,9 @@ import mage.game.permanent.Permanent; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.List; +import java.util.UUID; + /** * * @author spjspj @@ -69,7 +70,7 @@ public class AuramancersGuise extends CardImpl { BoostEnchantedEffect effect = new BoostEnchantedEffect(ptBoost, ptBoost, Duration.WhileOnBattlefield); effect.setText("Enchanted creature gets +2/+2 for each Aura attached to it"); SimpleStaticAbility ability2 = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); - ability2.addEffect(new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA)); + ability2.addEffect(new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA).setText("and has vigilance")); this.addAbility(ability2); } @@ -101,7 +102,7 @@ class EnchantedCreatureAurasCount implements DynamicValue { List attachments = permanent.getAttachments(); for (UUID attachmentId : attachments) { Permanent attached = game.getPermanent(attachmentId); - if (attached != null && attached.getSubtype(game).contains("Aura")) { + if (attached != null && attached.hasSubtype(SubType.AURA, game)) { count++; } diff --git a/Mage.Sets/src/mage/cards/a/Avalanche.java b/Mage.Sets/src/mage/cards/a/Avalanche.java new file mode 100644 index 0000000000..d89cc837bf --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/Avalanche.java @@ -0,0 +1,74 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterLandPermanent; +import mage.game.Game; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public class Avalanche extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent("snow lands"); + + public Avalanche(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{2}{R}{R}"); + + // Destroy X target snow lands. + this.getSpellAbility().addEffect(new DestroyTargetEffect("Destroy X target snow lands")); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability instanceof SpellAbility) { + ability.getTargets().clear(); + int xValue = ability.getManaCostsToPay().getX(); + ability.addTarget(new TargetPermanent(xValue, xValue, filter, false)); + } + } + + public Avalanche(final Avalanche card) { + super(card); + } + + @Override + public Avalanche copy() { + return new Avalanche(this); + } +} diff --git a/Mage.Sets/src/mage/cards/a/AxelrodGunnarson.java b/Mage.Sets/src/mage/cards/a/AxelrodGunnarson.java new file mode 100644 index 0000000000..af0a6e29e4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AxelrodGunnarson.java @@ -0,0 +1,78 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealtDamageAndDiedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.TargetPlayer; + +/** + * + * @author TheElk801 + */ +public class AxelrodGunnarson extends CardImpl { + + public AxelrodGunnarson(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}{R}{R}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.GIANT); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Whenever a creature dealt damage by Axelrod Gunnarson this turn dies, you gain 1 life and Axelrod deals 1 damage to target player. + Ability ability = new DealtDamageAndDiedTriggeredAbility(new GainLifeEffect(1), false); + Effect effect = new DamageTargetEffect(1); + effect.setText("and {this} deals 1 damage to target player"); + ability.addEffect(effect); + ability.addTarget(new TargetPlayer()); + } + + public AxelrodGunnarson(final AxelrodGunnarson card) { + super(card); + } + + @Override + public AxelrodGunnarson copy() { + return new AxelrodGunnarson(this); + } +} diff --git a/Mage.Sets/src/mage/cards/a/AxisOfMortality.java b/Mage.Sets/src/mage/cards/a/AxisOfMortality.java new file mode 100644 index 0000000000..8470ebf843 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AxisOfMortality.java @@ -0,0 +1,116 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author TheElk801 + */ +public class AxisOfMortality extends CardImpl { + + public AxisOfMortality(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}{W}"); + + // At the beginning of your upkeep, you may have two target players exchange life totals. + Ability ability = new BeginningOfUpkeepTriggeredAbility(new AxisOfMortalityEffect(), TargetController.YOU, true); + ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public AxisOfMortality(final AxisOfMortality card) { + super(card); + } + + @Override + public AxisOfMortality copy() { + return new AxisOfMortality(this); + } +} + +class AxisOfMortalityEffect extends OneShotEffect { + + public AxisOfMortalityEffect() { + super(Outcome.Neutral); + this.staticText = "two target players exchange life totals"; + } + + public AxisOfMortalityEffect(final AxisOfMortalityEffect effect) { + super(effect); + } + + @Override + public AxisOfMortalityEffect copy() { + return new AxisOfMortalityEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player1 = game.getPlayer(source.getFirstTarget()); + Player player2 = game.getPlayer(source.getTargets().get(1).getFirstTarget()); + if (player1 != null && player2 != null) { + int lifePlayer1 = player1.getLife(); + int lifePlayer2 = player2.getLife(); + + if (lifePlayer1 == lifePlayer2) { + return false; + } + + if (!player1.isLifeTotalCanChange() || !player2.isLifeTotalCanChange()) { + return false; + } + + // 20110930 - 118.7, 118.8 + if (lifePlayer1 < lifePlayer2 && (!player1.isCanGainLife() || !player2.isCanLoseLife())) { + return false; + } + + if (lifePlayer1 > lifePlayer2 && (!player1.isCanLoseLife() || !player2.isCanGainLife())) { + return false; + } + + player1.setLife(lifePlayer2, game); + player2.setLife(lifePlayer1, game); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/a/AysenCrusader.java b/Mage.Sets/src/mage/cards/a/AysenCrusader.java new file mode 100644 index 0000000000..85530f8832 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AysenCrusader.java @@ -0,0 +1,86 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.IntPlusDynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author TheElk801 + */ +public class AysenCrusader extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Soldiers and Warriors you control"); + + static { + filter.add(Predicates.or( + new SubtypePredicate(SubType.SOLDIER), + new SubtypePredicate(SubType.WARRIOR) + )); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public AysenCrusader(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Aysen Crusader's power and toughness are each equal to 2 plus the number of Soldiers and Warriors you control. + DynamicValue value = new IntPlusDynamicValue(2, new PermanentsOnBattlefieldCount(filter)); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(value, Duration.EndOfGame))); + } + + public AysenCrusader(final AysenCrusader card) { + super(card); + } + + @Override + public AysenCrusader copy() { + return new AysenCrusader(this); + } +} diff --git a/Mage.Sets/src/mage/cards/a/AzcantaTheSunkenRuin.java b/Mage.Sets/src/mage/cards/a/AzcantaTheSunkenRuin.java new file mode 100644 index 0000000000..1e9c001d24 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AzcantaTheSunkenRuin.java @@ -0,0 +1,88 @@ +/* + * 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.cards.a; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; +import mage.abilities.mana.BlueManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author LevelX2 + */ +public class AzcantaTheSunkenRuin extends CardImpl { + + private static final FilterCard filter = new FilterCard("noncreature, nonland card"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); + filter.add(Predicates.not(new CardTypePredicate(CardType.LAND))); + } + + public AzcantaTheSunkenRuin(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + this.addSuperType(SuperType.LEGENDARY); + + // this card is the second face of double-faced card + this.nightCard = true; + this.transformable = true; + + // (Transforms from Search for Azcanta)/ + // {T} : Add {U} to your mana pool. + this.addAbility(new BlueManaAbility()); + + // {2}{U} , {T} : Look at the top four cards of your library. You may reveal a noncreature, nonland card from among them and put it into your hand. Put the rest on the bottom of your library in any order. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), filter, false), new ManaCostsImpl<>("{2}{U}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public AzcantaTheSunkenRuin(final AzcantaTheSunkenRuin card) { + super(card); + } + + @Override + public AzcantaTheSunkenRuin copy() { + return new AzcantaTheSunkenRuin(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BackFromTheBrink.java b/Mage.Sets/src/mage/cards/b/BackFromTheBrink.java index c91caa44ee..c056da0ca2 100644 --- a/Mage.Sets/src/mage/cards/b/BackFromTheBrink.java +++ b/Mage.Sets/src/mage/cards/b/BackFromTheBrink.java @@ -33,7 +33,7 @@ import mage.abilities.common.ActivateAsSorceryActivatedAbility; import mage.abilities.costs.Cost; import mage.abilities.costs.CostImpl; import mage.abilities.effects.Effect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -57,7 +57,7 @@ public class BackFromTheBrink extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{U}{U}"); // Exile a creature card from your graveyard and pay its mana cost: Create a token that's a copy of that card. Activate this ability only any time you could cast a sorcery. - Effect effect = new PutTokenOntoBattlefieldCopyTargetEffect(); + Effect effect = new CreateTokenCopyTargetEffect(); effect.setText("create a token that's a copy of that card"); this.addAbility(new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, effect, new BackFromTheBrinkCost())); diff --git a/Mage.Sets/src/mage/cards/b/Backslide.java b/Mage.Sets/src/mage/cards/b/Backslide.java new file mode 100644 index 0000000000..deaf789121 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/Backslide.java @@ -0,0 +1,113 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BecomesFaceDownCreatureAllEffect; +import mage.abilities.keyword.CyclingAbility; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicate; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.filter.predicate.permanent.PermanentIdPredicate; +import mage.game.Game; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class Backslide extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with a morph ability"); + + static { + filter.add(new AbilityPredicate(MorphAbility.class)); + } + + public Backslide(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); + + // Turn target creature with a morph ability face down. + this.getSpellAbility().addEffect(new BackslideEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + + // Cycling {U} + this.addAbility(new CyclingAbility(new ManaCostsImpl("{U}"))); + + } + + public Backslide(final Backslide card) { + super(card); + } + + @Override + public Backslide copy() { + return new Backslide(this); + } +} + +class BackslideEffect extends OneShotEffect { + + BackslideEffect() { + super(Outcome.Benefit); + this.staticText = "Turn target creature with a morph ability face down."; + } + + BackslideEffect(final BackslideEffect effect) { + super(effect); + } + + @Override + public BackslideEffect copy() { + return new BackslideEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Predicate pred = new PermanentIdPredicate(UUID.randomUUID()); + for (Target target : source.getTargets()) { + for (UUID targetId : target.getTargets()) { + pred = Predicates.or(pred, new PermanentIdPredicate(targetId)); + } + } + FilterCreaturePermanent filter = new FilterCreaturePermanent(); + filter.add(pred); + game.addEffect(new BecomesFaceDownCreatureAllEffect(filter), source); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/b/BakisCurse.java b/Mage.Sets/src/mage/cards/b/BakisCurse.java new file mode 100644 index 0000000000..d550b757ee --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BakisCurse.java @@ -0,0 +1,98 @@ +/* + * 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 LIAB8LE 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.cards.b; + +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author L_J + */ +public class BakisCurse extends CardImpl { + + public BakisCurse(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{U}{U}"); + + // Baki's Curse deals 2 damage to each creature for each Aura attached to that creature. + this.getSpellAbility().addEffect(new BakisCurseEffect()); + } + + public BakisCurse(final BakisCurse card) { + super(card); + } + + @Override + public BakisCurse copy() { + return new BakisCurse(this); + } +} + +class BakisCurseEffect extends OneShotEffect { + + public BakisCurseEffect() { + super(Outcome.Detriment); + staticText = "Baki's Curse deals 2 damage to each creature for each Aura attached to that creature."; + } + + public BakisCurseEffect(final BakisCurseEffect effect) { + super(effect); + } + + @Override + public BakisCurseEffect copy() { + return new BakisCurseEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (Permanent creature : game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), source.getSourceId(), game)) { + int count = 0; + List attachments = creature.getAttachments(); + for (UUID attachmentId : attachments) { + Permanent attached = game.getPermanent(attachmentId); + if (attached != null && attached.getSubtype(game).contains(SubType.AURA)) { + count++; + } + } + creature.damage(count * 2, source.getId(), game, false, true); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/b/BaneOfHanweir.java b/Mage.Sets/src/mage/cards/b/BaneOfHanweir.java index e1680e8d63..0288234dc8 100644 --- a/Mage.Sets/src/mage/cards/b/BaneOfHanweir.java +++ b/Mage.Sets/src/mage/cards/b/BaneOfHanweir.java @@ -30,7 +30,7 @@ package mage.cards.b; import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; @@ -60,7 +60,7 @@ public class BaneOfHanweir extends CardImpl { this.toughness = new MageInt(5); // Bane of Hanweir attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Bane of Hanweir. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); diff --git a/Mage.Sets/src/mage/cards/b/BanishingKnack.java b/Mage.Sets/src/mage/cards/b/BanishingKnack.java index 63501ca598..e583d54741 100644 --- a/Mage.Sets/src/mage/cards/b/BanishingKnack.java +++ b/Mage.Sets/src/mage/cards/b/BanishingKnack.java @@ -51,12 +51,14 @@ public class BanishingKnack extends CardImpl { private static final FilterPermanent filter = new FilterNonlandPermanent(); - public BanishingKnack(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}"); + public BanishingKnack(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}"); Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new TapSourceCost()); gainedAbility.addTarget(new TargetPermanent(filter)); - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(gainedAbility, Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(gainedAbility, Duration.EndOfTurn) + .setText("Until end of turn, target creature gains \"{T}: Return target nonland permanent to its owner's hand.\"") + ); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } diff --git a/Mage.Sets/src/mage/cards/b/BartelRuneaxe.java b/Mage.Sets/src/mage/cards/b/BartelRuneaxe.java index 206787f605..bc03f9f2a5 100644 --- a/Mage.Sets/src/mage/cards/b/BartelRuneaxe.java +++ b/Mage.Sets/src/mage/cards/b/BartelRuneaxe.java @@ -109,7 +109,7 @@ class BartelRuneaxeEffect extends ContinuousRuleModifyingEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { StackObject stackObject = (StackObject) game.getStack().getStackObject(event.getSourceId()); if (stackObject != null && event.getTargetId().equals(source.getSourceId())) { - if (stackObject.getSubtype(game).contains("Aura")) { + if (stackObject.hasSubtype(SubType.AURA, game)) { return true; } } diff --git a/Mage.Sets/src/mage/cards/b/BattleMadRonin.java b/Mage.Sets/src/mage/cards/b/BattleMadRonin.java index c374ac86df..1411369017 100644 --- a/Mage.Sets/src/mage/cards/b/BattleMadRonin.java +++ b/Mage.Sets/src/mage/cards/b/BattleMadRonin.java @@ -28,7 +28,7 @@ package mage.cards.b; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.keyword.BushidoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -54,7 +54,7 @@ public class BattleMadRonin extends CardImpl { this.addAbility(new BushidoAbility(2)); // Battle-Mad Ronin attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public BattleMadRonin(final BattleMadRonin card) { diff --git a/Mage.Sets/src/mage/cards/b/BattlefieldThaumaturge.java b/Mage.Sets/src/mage/cards/b/BattlefieldThaumaturge.java index 1177fc15e2..9b0993799e 100644 --- a/Mage.Sets/src/mage/cards/b/BattlefieldThaumaturge.java +++ b/Mage.Sets/src/mage/cards/b/BattlefieldThaumaturge.java @@ -55,7 +55,7 @@ import mage.util.CardUtil; public class BattlefieldThaumaturge extends CardImpl { public BattlefieldThaumaturge(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); this.subtype.add(SubType.HUMAN, SubType.WIZARD); this.power = new MageInt(2); @@ -79,10 +79,9 @@ public class BattlefieldThaumaturge extends CardImpl { class BattlefieldThaumaturgeSpellsCostReductionEffect extends CostModificationEffectImpl { - public BattlefieldThaumaturgeSpellsCostReductionEffect() { super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST); - this.staticText = "Each instant and sorcery spell you cast costs 1 less to cast for each creature it targets"; + this.staticText = "Each instant and sorcery spell you cast costs {1} less to cast for each creature it targets"; } protected BattlefieldThaumaturgeSpellsCostReductionEffect(BattlefieldThaumaturgeSpellsCostReductionEffect effect) { @@ -92,9 +91,9 @@ class BattlefieldThaumaturgeSpellsCostReductionEffect extends CostModificationEf @Override public boolean apply(Game game, Ability source, Ability abilityToModify) { Set creaturesTargeted = new HashSet<>(); - for (Target target: abilityToModify.getTargets()) { - for (UUID uuid: target.getTargets()) { - Permanent permanent = game.getPermanent(uuid); + for (Target target : abilityToModify.getTargets()) { + for (UUID uuid : target.getTargets()) { + Permanent permanent = game.getPermanent(uuid); if (permanent != null && permanent.isCreature()) { creaturesTargeted.add(permanent.getId()); } diff --git a/Mage.Sets/src/mage/cards/b/Bedlam.java b/Mage.Sets/src/mage/cards/b/Bedlam.java index 0baceb297d..ccee7bc212 100644 --- a/Mage.Sets/src/mage/cards/b/Bedlam.java +++ b/Mage.Sets/src/mage/cards/b/Bedlam.java @@ -25,18 +25,19 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.b; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.RestrictionEffect; +import mage.abilities.effects.common.combat.CantBlockAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; @@ -47,11 +48,10 @@ import mage.game.permanent.Permanent; public class Bedlam extends CardImpl { public Bedlam(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{R}"); // Creatures can't block. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BedlamEffect())); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockAllEffect(StaticFilters.FILTER_PERMANENT_CREATURES, Duration.WhileOnBattlefield))); } public Bedlam(final Bedlam card) { @@ -63,33 +63,3 @@ public class Bedlam extends CardImpl { return new Bedlam(this); } } - -class BedlamEffect extends RestrictionEffect { - - BedlamEffect() { - super(Duration.WhileOnBattlefield); - staticText = "Creatures can't block"; - } - - BedlamEffect(final BedlamEffect effect) { - super(effect); - } - - @Override - public boolean applies(Permanent permanent, Ability source, Game game) { - if (permanent.isCreature()) { - return true; - } - return false; - } - - @Override - public BedlamEffect copy() { - return new BedlamEffect(this); - } - - @Override - public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { - return false; - } -} diff --git a/Mage.Sets/src/mage/cards/b/BehemothSledge.java b/Mage.Sets/src/mage/cards/b/BehemothSledge.java index 1226d351b5..65a51d45f6 100644 --- a/Mage.Sets/src/mage/cards/b/BehemothSledge.java +++ b/Mage.Sets/src/mage/cards/b/BehemothSledge.java @@ -25,10 +25,10 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.b; import java.util.UUID; +import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.continuous.BoostEquippedEffect; @@ -40,7 +40,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; - /** * * @author BetaSteward_at_googlemail.com @@ -48,14 +47,13 @@ import mage.constants.*; public class BehemothSledge extends CardImpl { public BehemothSledge(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}{G}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{G}{W}"); this.subtype.add(SubType.EQUIPMENT); - - - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(LifelinkAbility.getInstance(), AttachmentType.EQUIPMENT))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.EQUIPMENT))); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2)); + ability.addEffect(new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.EQUIPMENT).setText("and has trample")); + ability.addEffect(new GainAbilityAttachedEffect(LifelinkAbility.getInstance(), AttachmentType.EQUIPMENT).setText("and lifelink")); + this.addAbility(ability); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3))); } diff --git a/Mage.Sets/src/mage/cards/b/BelbesArmor.java b/Mage.Sets/src/mage/cards/b/BelbesArmor.java new file mode 100644 index 0000000000..0f72276588 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BelbesArmor.java @@ -0,0 +1,76 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.MultipliedValue; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class BelbesArmor extends CardImpl { + + public BelbesArmor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + // {X}, {tap}: Target creature gets -X/+X until end of turn. + Ability ability = new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new BoostTargetEffect( + new MultipliedValue(new ManacostVariableValue(), -1), + new ManacostVariableValue(), + Duration.EndOfTurn + ), + new ManaCostsImpl("{X}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public BelbesArmor(final BelbesArmor card) { + super(card); + } + + @Override + public BelbesArmor copy() { + return new BelbesArmor(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BelligerentBrontodon.java b/Mage.Sets/src/mage/cards/b/BelligerentBrontodon.java new file mode 100644 index 0000000000..df036bce3b --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BelligerentBrontodon.java @@ -0,0 +1,105 @@ +/* + * 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.cards.b; + +import java.util.UUID; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; + +/** + * + * @author TheElk801 + */ +public class BelligerentBrontodon extends CardImpl { + + public BelligerentBrontodon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(4); + this.toughness = new MageInt(6); + + // Each creature you control assigns combat damage equal to its toughness rather than its power. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BelligerentBrontodonCombatDamageRuleEffect())); + } + + public BelligerentBrontodon(final BelligerentBrontodon card) { + super(card); + } + + @Override + public BelligerentBrontodon copy() { + return new BelligerentBrontodon(this); + } +} + +class BelligerentBrontodonCombatDamageRuleEffect extends ContinuousEffectImpl { + + public BelligerentBrontodonCombatDamageRuleEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + staticText = "Each creature you control assigns combat damage equal to its toughness rather than its power"; + } + + public BelligerentBrontodonCombatDamageRuleEffect(final BelligerentBrontodonCombatDamageRuleEffect effect) { + super(effect); + } + + @Override + public BelligerentBrontodonCombatDamageRuleEffect copy() { + return new BelligerentBrontodonCombatDamageRuleEffect(this); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + // Change the rule + FilterCreaturePermanent filter = new FilterCreaturePermanent(); + filter.add(new ControllerIdPredicate(source.getControllerId())); + game.getCombat().setUseToughnessForDamage(true); + game.getCombat().addUseToughnessForDamageFilter(filter); + return true; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public boolean hasLayer(Layer layer) { + return layer == Layer.RulesEffects; + } +} diff --git a/Mage.Sets/src/mage/cards/b/BellowingAegisaur.java b/Mage.Sets/src/mage/cards/b/BellowingAegisaur.java new file mode 100644 index 0000000000..e7dbc3daa4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BellowingAegisaur.java @@ -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.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author TheElk801 + */ +public class BellowingAegisaur extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("other creature you control"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + filter.add(new AnotherPredicate()); + } + + public BellowingAegisaur(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(3); + this.toughness = new MageInt(5); + + // Enrage - Whenever Bellowing Aegisaur is dealt damage, put a +1/+1 counter on each other creature you control. + Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), false, true); + this.addAbility(ability); + } + + public BellowingAegisaur(final BellowingAegisaur card) { + super(card); + } + + @Override + public BellowingAegisaur copy() { + return new BellowingAegisaur(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BelltollDragon.java b/Mage.Sets/src/mage/cards/b/BelltollDragon.java index a2eb839f71..8f62f096ab 100644 --- a/Mage.Sets/src/mage/cards/b/BelltollDragon.java +++ b/Mage.Sets/src/mage/cards/b/BelltollDragon.java @@ -49,8 +49,8 @@ import mage.filter.predicate.permanent.AnotherPredicate; * @author fireshoes */ public class BelltollDragon extends CardImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("each other Dragon creature you control"); + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other Dragon creature you control"); static { filter.add(new AnotherPredicate()); @@ -58,7 +58,7 @@ public class BelltollDragon extends CardImpl { } public BelltollDragon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}"); this.subtype.add(SubType.DRAGON); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -69,7 +69,7 @@ public class BelltollDragon extends CardImpl { this.addAbility(HexproofAbility.getInstance()); // Megamorph {5}{U}{U} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{5}{U}{U}"), true)); - + // When Belltoll Dragon is turned face up, put a +1/+1 counter on each other Dragon creature you control. this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), false, false)); } diff --git a/Mage.Sets/src/mage/cards/b/Bequeathal.java b/Mage.Sets/src/mage/cards/b/Bequeathal.java index 0243f77892..e1c6f12f92 100644 --- a/Mage.Sets/src/mage/cards/b/Bequeathal.java +++ b/Mage.Sets/src/mage/cards/b/Bequeathal.java @@ -48,7 +48,7 @@ import mage.target.common.TargetCreaturePermanent; public class Bequeathal extends CardImpl { public Bequeathal(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); this.subtype.add(SubType.AURA); // Enchant creature @@ -59,7 +59,7 @@ public class Bequeathal extends CardImpl { this.addAbility(ability); // When enchanted creature dies, you draw two cards. - this.addAbility( new DiesAttachedTriggeredAbility(new DrawCardSourceControllerEffect(2), "enchanted creature")); + this.addAbility(new DiesAttachedTriggeredAbility(new DrawCardSourceControllerEffect(2).setText("you draw two cards"), "enchanted creature")); } public Bequeathal(final Bequeathal card) { diff --git a/Mage.Sets/src/mage/cards/b/BerserkersOfBloodRidge.java b/Mage.Sets/src/mage/cards/b/BerserkersOfBloodRidge.java index e7c7100c41..b28d760295 100644 --- a/Mage.Sets/src/mage/cards/b/BerserkersOfBloodRidge.java +++ b/Mage.Sets/src/mage/cards/b/BerserkersOfBloodRidge.java @@ -30,7 +30,7 @@ package mage.cards.b; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -48,7 +48,7 @@ public class BerserkersOfBloodRidge extends CardImpl { this.subtype.add(SubType.HUMAN, SubType.BERSERKER); this.power = new MageInt(4); this.toughness = new MageInt(4); - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public BerserkersOfBloodRidge(final BerserkersOfBloodRidge card) { diff --git a/Mage.Sets/src/mage/cards/b/Bioplasm.java b/Mage.Sets/src/mage/cards/b/Bioplasm.java new file mode 100644 index 0000000000..3b591d9c7b --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/Bioplasm.java @@ -0,0 +1,110 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.Card; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Library; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class Bioplasm extends CardImpl { + + public Bioplasm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + + this.subtype.add(SubType.OOZE); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Whenever Bioplasm attacks, exile the top card of your library. If it's a creature card, Bioplasm gets +X/+Y until end of turn, where X is the exiled creature card's power and Y is its toughness. + this.addAbility(new AttacksTriggeredAbility(new BioplasmEffect(), false)); + } + + public Bioplasm(final Bioplasm card) { + super(card); + } + + @Override + public Bioplasm copy() { + return new Bioplasm(this); + } +} + +class BioplasmEffect extends OneShotEffect { + + BioplasmEffect() { + super(Outcome.Benefit); + this.staticText = "exile the top card of your library. If it's a creature card, {this} gets +X/+Y until end of turn, where X is the exiled creature card's power and Y is its toughness"; + } + + BioplasmEffect(final BioplasmEffect effect) { + super(effect); + } + + @Override + public BioplasmEffect copy() { + return new BioplasmEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + Library library = player.getLibrary(); + if (library == null || !library.hasCards()) { + return false; + } + Card card = library.getFromTop(game); + if (card == null) { + return false; + } + if (player.moveCards(card, Zone.EXILED, source, game) && card.isCreature()) { + game.addEffect(new BoostSourceEffect(card.getPower().getValue(), card.getToughness().getValue(), Duration.EndOfTurn), source); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/b/BishopOfRebirth.java b/Mage.Sets/src/mage/cards/b/BishopOfRebirth.java new file mode 100644 index 0000000000..590ac7d9a3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BishopOfRebirth.java @@ -0,0 +1,86 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author TacomenX + */ +public class BishopOfRebirth extends CardImpl { + + private static final FilterCard filter = new FilterCreatureCard("creature card with converted mana cost 3 or less from your graveyard"); + + static { + filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4)); + filter.add(new CardTypePredicate(CardType.CREATURE)); + } + + public BishopOfRebirth(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Whenever Bishop of Rebirth attacks, you may return target creature card with converted mana cost 3 or less from your graveyard to the battlefield. + Ability ability = new AttacksTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect() + .setText("you may return target creature card with converted mana cost 3 or less from your graveyard to the battlefield"), true); + ability.addTarget(new TargetCardInYourGraveyard(filter)); + this.addAbility(ability); + } + + public BishopOfRebirth(final BishopOfRebirth card) { + super(card); + } + + @Override + public BishopOfRebirth copy() { + return new BishopOfRebirth(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BishopOfTheBloodstained.java b/Mage.Sets/src/mage/cards/b/BishopOfTheBloodstained.java new file mode 100644 index 0000000000..d301e788ac --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BishopOfTheBloodstained.java @@ -0,0 +1,81 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetOpponent; + +/** + * + * @author TheElk801 + */ +public class BishopOfTheBloodstained extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Vampire you control"); + + static { + filter.add(new SubtypePredicate(SubType.VAMPIRE)); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public BishopOfTheBloodstained(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Bishop of the Bloodstained enters the battlefield, target opponent loses 1 life for each vampire you control. + Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(new PermanentsOnBattlefieldCount(filter))); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public BishopOfTheBloodstained(final BishopOfTheBloodstained card) { + super(card); + } + + @Override + public BishopOfTheBloodstained copy() { + return new BishopOfTheBloodstained(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BishopsSoldier.java b/Mage.Sets/src/mage/cards/b/BishopsSoldier.java new file mode 100644 index 0000000000..d017251200 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BishopsSoldier.java @@ -0,0 +1,65 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.constants.SubType; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class BishopsSoldier extends CardImpl { + + public BishopsSoldier(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Lifelink + this.addAbility(LifelinkAbility.getInstance()); + + } + + public BishopsSoldier(final BishopsSoldier card) { + super(card); + } + + @Override + public BishopsSoldier copy() { + return new BishopsSoldier(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BlackCarriage.java b/Mage.Sets/src/mage/cards/b/BlackCarriage.java index 98e36a38c4..1c6908c9af 100644 --- a/Mage.Sets/src/mage/cards/b/BlackCarriage.java +++ b/Mage.Sets/src/mage/cards/b/BlackCarriage.java @@ -52,21 +52,21 @@ import mage.target.common.TargetControlledCreaturePermanent; public class BlackCarriage extends CardImpl { public BlackCarriage(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); this.subtype.add(SubType.HORSE); this.power = new MageInt(4); this.toughness = new MageInt(4); // Trample this.addAbility(TrampleAbility.getInstance()); - + // Black Carriage doesn't untap during your untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepSourceEffect())); - + // Sacrifice a creature: Untap Black Carriage. Activate this ability only during your upkeep. - this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD, + this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new SacrificeTargetCost(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("a creature"))), - new IsStepCondition(PhaseStep.UPKEEP), null)); + new IsStepCondition(PhaseStep.UPKEEP), "Sacrifice a creature: Untap {this}. Activate this ability only during your upkeep.")); } public BlackCarriage(final BlackCarriage card) { diff --git a/Mage.Sets/src/mage/cards/b/BlackManaBattery.java b/Mage.Sets/src/mage/cards/b/BlackManaBattery.java index 8e6449f4d1..4b831bee4f 100644 --- a/Mage.Sets/src/mage/cards/b/BlackManaBattery.java +++ b/Mage.Sets/src/mage/cards/b/BlackManaBattery.java @@ -53,7 +53,6 @@ public class BlackManaBattery extends CardImpl { public BlackManaBattery(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); - // {2}, {tap}: Put a charge counter on Black Mana Battery. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.STORAGE.createInstance(1)), new GenericManaCost(2)); @@ -65,10 +64,10 @@ public class BlackManaBattery extends CardImpl { Mana.BlackMana(1), new IntPlusDynamicValue(1, new RemovedCountersForCostValue()), new TapSourceCost(), - "Add {B} to your mana pool, then add {B} to your mana pool for each storage counter removed this way", - true, new CountersSourceCount(CounterType.STORAGE)); - ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(), - "Remove X storage counters from {this}")); + "Add {B} to your mana pool, then add {B} to your mana pool for each charge counter removed this way", + true, new CountersSourceCount(CounterType.CHARGE)); + ability.addCost(new RemoveVariableCountersSourceCost(CounterType.CHARGE.createInstance(), + "Remove any number of charge counters from {this}")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BlackcleaveCliffs.java b/Mage.Sets/src/mage/cards/b/BlackcleaveCliffs.java index 1881b61caf..eff8060564 100644 --- a/Mage.Sets/src/mage/cards/b/BlackcleaveCliffs.java +++ b/Mage.Sets/src/mage/cards/b/BlackcleaveCliffs.java @@ -51,10 +51,10 @@ public class BlackcleaveCliffs extends CardImpl { private static final FilterLandPermanent filter = new FilterLandPermanent(); public BlackcleaveCliffs(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.FEWER_THAN, 3)); - String abilityText = "tapped unless you control fewer than 3 lands"; + String abilityText = " tapped unless you control two or fewer other lands"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlackManaAbility()); this.addAbility(new RedManaAbility()); diff --git a/Mage.Sets/src/mage/cards/b/BlastfireBolt.java b/Mage.Sets/src/mage/cards/b/BlastfireBolt.java index 723e024368..e6ac583f52 100644 --- a/Mage.Sets/src/mage/cards/b/BlastfireBolt.java +++ b/Mage.Sets/src/mage/cards/b/BlastfireBolt.java @@ -33,6 +33,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -94,7 +95,7 @@ class DestroyAllAttachedEquipmentEffect extends OneShotEffect { List attachments = new ArrayList<>(target.getAttachments()); for (UUID attachmentId : attachments) { Permanent attachment = game.getPermanent(attachmentId); - if (attachment != null && attachment.getSubtype(game).contains("Equipment")) { + if (attachment != null && attachment.hasSubtype(SubType.EQUIPMENT, game)) { attachment.destroy(source.getSourceId(), game, false); } } diff --git a/Mage.Sets/src/mage/cards/b/BlightKeeper.java b/Mage.Sets/src/mage/cards/b/BlightKeeper.java new file mode 100644 index 0000000000..b0c7d19305 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BlightKeeper.java @@ -0,0 +1,81 @@ +/* + * 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.cards.b; + +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.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.target.common.TargetOpponent; + +/** + * + * @author TheElk801 + */ +public class BlightKeeper extends CardImpl { + + public BlightKeeper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); + + this.subtype.add(SubType.BAT); + this.subtype.add(SubType.IMP); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {7}{B}, {T}, Sacrifice Blight Keeper: Target opponent loses 4 life and you gain 4 life. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(4), new ManaCostsImpl("{7}{B}")); + ability.addEffect(new GainLifeEffect(4).setText("and you gain 4 life")); + ability.addTarget(new TargetOpponent()); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public BlightKeeper(final BlightKeeper card) { + super(card); + } + + @Override + public BlightKeeper copy() { + return new BlightKeeper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BlindWithAnger.java b/Mage.Sets/src/mage/cards/b/BlindWithAnger.java index a63a7e97b4..076f4b9666 100644 --- a/Mage.Sets/src/mage/cards/b/BlindWithAnger.java +++ b/Mage.Sets/src/mage/cards/b/BlindWithAnger.java @@ -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.cards.b; import java.util.UUID; @@ -42,7 +41,6 @@ import mage.constants.SuperType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SupertypePredicate; -import mage.target.Target; import mage.target.common.TargetCreaturePermanent; /** @@ -57,14 +55,13 @@ public class BlindWithAnger extends CardImpl { } public BlindWithAnger(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}"); this.subtype.add(SubType.ARCANE); - this.getSpellAbility().addEffect(new UntapTargetEffect()); - this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); - Target target = new TargetCreaturePermanent(filter); - this.getSpellAbility().addTarget(target); + this.getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap target nonlegendary creature")); + this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn).setText("and gain control of it until end of turn")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("It gains haste until end of turn.")); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); } public BlindWithAnger(final BlindWithAnger card) { diff --git a/Mage.Sets/src/mage/cards/b/BlindingFog.java b/Mage.Sets/src/mage/cards/b/BlindingFog.java new file mode 100644 index 0000000000..fbac6b9092 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BlindingFog.java @@ -0,0 +1,64 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.abilities.effects.common.PreventAllDamageToAllEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.HexproofAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURE; +import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; + +/** + * + * @author LevelX2 + */ +public class BlindingFog extends CardImpl { + + public BlindingFog(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}"); + + // Prevent all damage that would be dealt to creatures this turn. + this.getSpellAbility().addEffect(new PreventAllDamageToAllEffect(Duration.EndOfTurn, FILTER_PERMANENT_CREATURES)); + // Creatures you control gain hexproof until end of turn. + this.getSpellAbility().addEffect(new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.EndOfTurn, FILTER_PERMANENT_CREATURE, false)); + } + + public BlindingFog(final BlindingFog card) { + super(card); + } + + @Override + public BlindingFog copy() { + return new BlindingFog(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BloodCrypt.java b/Mage.Sets/src/mage/cards/b/BloodCrypt.java index 5b3397a9d2..d176adbfd2 100644 --- a/Mage.Sets/src/mage/cards/b/BloodCrypt.java +++ b/Mage.Sets/src/mage/cards/b/BloodCrypt.java @@ -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.cards.b; import mage.abilities.common.AsEntersBattlefieldAbility; @@ -46,15 +45,16 @@ import java.util.UUID; */ public class BloodCrypt extends CardImpl { - public BloodCrypt (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + public BloodCrypt(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); this.subtype.add(SubType.SWAMP, SubType.MOUNTAIN); + + this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); this.addAbility(new BlackManaAbility()); this.addAbility(new RedManaAbility()); - this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); } - public BloodCrypt (final BloodCrypt card) { + public BloodCrypt(final BloodCrypt card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/b/BloodMoon.java b/Mage.Sets/src/mage/cards/b/BloodMoon.java index 5571f4fb22..ac4c466cf7 100644 --- a/Mage.Sets/src/mage/cards/b/BloodMoon.java +++ b/Mage.Sets/src/mage/cards/b/BloodMoon.java @@ -100,7 +100,7 @@ class BloodMoonEffect extends ContinuousEffectImpl { // So the ability removing has to be done before Layer 6 land.removeAllAbilities(source.getSourceId(), game); land.getSubtype(game).removeAll(SubType.getLandTypes(false)); - land.getSubtype(game).add("Mountain"); + land.getSubtype(game).add(SubType.MOUNTAIN); break; case AbilityAddingRemovingEffects_6: land.addAbility(new RedManaAbility(), source.getSourceId(), game); diff --git a/Mage.Sets/src/mage/cards/b/BloodOath.java b/Mage.Sets/src/mage/cards/b/BloodOath.java new file mode 100644 index 0000000000..8557e046d6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BloodOath.java @@ -0,0 +1,148 @@ +/* + * 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.cards.b; + +import java.util.LinkedHashSet; +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.CardSetInfo; +import mage.cards.Cards; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetOpponent; + +/** + * + * @author TheElk801 + */ +public class BloodOath extends CardImpl { + + public BloodOath(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}"); + + // Choose a card type. Target opponent reveals his or her hand. Blood Oath deals 3 damage to that player for each card of the chosen type revealed this way. + this.getSpellAbility().addEffect(new BloodOathEffect()); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public BloodOath(final BloodOath card) { + super(card); + } + + @Override + public BloodOath copy() { + return new BloodOath(this); + } +} + +class BloodOathEffect extends OneShotEffect { + + private static final Set choice = new LinkedHashSet<>(); + + static { + choice.add(CardType.ARTIFACT.toString()); + choice.add(CardType.CREATURE.toString()); + choice.add(CardType.ENCHANTMENT.toString()); + choice.add(CardType.INSTANT.toString()); + choice.add(CardType.LAND.toString()); + choice.add(CardType.PLANESWALKER.toString()); + choice.add(CardType.SORCERY.toString()); + choice.add(CardType.TRIBAL.toString()); + } + + public BloodOathEffect() { + super(Outcome.Benefit); + staticText = "Choose a card type. Target opponent reveals his or her hand. {this} deals 3 damage to that player for each card of the chosen type revealed this way"; + } + + public BloodOathEffect(final BloodOathEffect effect) { + super(effect); + } + + @Override + public BloodOathEffect copy() { + return new BloodOathEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + MageObject sourceObject = game.getObject(source.getSourceId()); + Player player = game.getPlayer(source.getControllerId()); + Player opponent = game.getPlayer(source.getFirstTarget()); + if (player != null && opponent != null && sourceObject != null) { + Choice choiceImpl = new ChoiceImpl(); + choiceImpl.setChoices(choice); + while (player.canRespond() && !player.choose(Outcome.Neutral, choiceImpl, game)) { + } + CardType type = null; + String choosenType = choiceImpl.getChoice(); + + if (choosenType.equals(CardType.ARTIFACT.toString())) { + type = CardType.ARTIFACT; + } else if (choosenType.equals(CardType.LAND.toString())) { + type = CardType.LAND; + } else if (choosenType.equals(CardType.CREATURE.toString())) { + type = CardType.CREATURE; + } else if (choosenType.equals(CardType.ENCHANTMENT.toString())) { + type = CardType.ENCHANTMENT; + } else if (choosenType.equals(CardType.INSTANT.toString())) { + type = CardType.INSTANT; + } else if (choosenType.equals(CardType.SORCERY.toString())) { + type = CardType.SORCERY; + } else if (choosenType.equals(CardType.PLANESWALKER.toString())) { + type = CardType.PLANESWALKER; + } else if (choosenType.equals(CardType.TRIBAL.toString())) { + type = CardType.TRIBAL; + } + if (type != null) { + Cards hand = opponent.getHand(); + opponent.revealCards(sourceObject.getIdName(), hand, game); + Set cards = hand.getCards(game); + int damageToDeal = 0; + for (Card card : cards) { + if (card != null && card.getCardType().contains(type)) { + damageToDeal += 3; + } + } + game.informPlayers(sourceObject.getLogName() + " deals " + (damageToDeal == 0 ? "no" : "" + damageToDeal) + " damage to " + opponent.getLogName()); + opponent.damage(damageToDeal, source.getSourceId(), game, false, true); + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/b/BloodTribute.java b/Mage.Sets/src/mage/cards/b/BloodTribute.java index cd1951fda3..19cd00f57e 100644 --- a/Mage.Sets/src/mage/cards/b/BloodTribute.java +++ b/Mage.Sets/src/mage/cards/b/BloodTribute.java @@ -35,6 +35,7 @@ import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.KickerAbility; +import mage.abilities.text.TextPartSubType; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -42,7 +43,7 @@ import mage.constants.Outcome; import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.mageobject.TextPartSubtypePredicate; import mage.filter.predicate.permanent.TappedPredicate; import mage.game.Game; import mage.players.Player; @@ -55,17 +56,14 @@ import mage.target.common.TargetOpponent; */ public class BloodTribute extends CardImpl { - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("an untapped Vampire you control"); - - static { - filter.add(Predicates.not(new TappedPredicate())); - filter.add(new SubtypePredicate(SubType.VAMPIRE)); - } - public BloodTribute(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}{B}"); // Kicker - Tap an untapped Vampire you control. + TextPartSubType textPartVampire = (TextPartSubType) addTextPart(new TextPartSubType(SubType.VAMPIRE)); + FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("an untapped Vampire you control"); + filter.add(new TextPartSubtypePredicate(textPartVampire)); + filter.add(Predicates.not(new TappedPredicate())); this.addAbility(new KickerAbility(new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true)))); // Target opponent loses half his or her life, rounded up. diff --git a/Mage.Sets/src/mage/cards/b/BloodbondMarch.java b/Mage.Sets/src/mage/cards/b/BloodbondMarch.java index da7b086ba9..de0ab798e8 100644 --- a/Mage.Sets/src/mage/cards/b/BloodbondMarch.java +++ b/Mage.Sets/src/mage/cards/b/BloodbondMarch.java @@ -85,7 +85,7 @@ public class BloodbondMarch extends CardImpl { return false; } - Spell spell = (Spell) game.getStack().getStackObject(targetPointer.getFirst(game, source)); + Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source)); if (spell == null) { return false; diff --git a/Mage.Sets/src/mage/cards/b/BloodcrazedHoplite.java b/Mage.Sets/src/mage/cards/b/BloodcrazedHoplite.java index b83b30f684..4ea155477d 100644 --- a/Mage.Sets/src/mage/cards/b/BloodcrazedHoplite.java +++ b/Mage.Sets/src/mage/cards/b/BloodcrazedHoplite.java @@ -61,7 +61,7 @@ public class BloodcrazedHoplite extends CardImpl { } public BloodcrazedHoplite(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); this.subtype.add(SubType.HUMAN, SubType.SOLDIER); this.power = new MageInt(2); @@ -88,7 +88,7 @@ public class BloodcrazedHoplite extends CardImpl { class BloodcrazedHopliteTriggeredAbility extends TriggeredAbilityImpl { public BloodcrazedHopliteTriggeredAbility() { - super(Zone.ALL, new RemoveCounterTargetEffect(CounterType.P1P1.createInstance()), true); + super(Zone.ALL, new RemoveCounterTargetEffect(CounterType.P1P1.createInstance()), false); } public BloodcrazedHopliteTriggeredAbility(BloodcrazedHopliteTriggeredAbility ability) { diff --git a/Mage.Sets/src/mage/cards/b/BloodcrazedNeonate.java b/Mage.Sets/src/mage/cards/b/BloodcrazedNeonate.java index c8733388d7..667ed6421a 100644 --- a/Mage.Sets/src/mage/cards/b/BloodcrazedNeonate.java +++ b/Mage.Sets/src/mage/cards/b/BloodcrazedNeonate.java @@ -29,7 +29,7 @@ package mage.cards.b; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; @@ -52,7 +52,7 @@ public class BloodcrazedNeonate extends CardImpl { this.toughness = new MageInt(1); // Bloodcrazed Neonate attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); // Whenever Bloodcrazed Neonate deals combat damage to a player, put a +1/+1 counter on it. this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false)); } diff --git a/Mage.Sets/src/mage/cards/b/BloodcrazedPaladin.java b/Mage.Sets/src/mage/cards/b/BloodcrazedPaladin.java new file mode 100644 index 0000000000..af835b494d --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BloodcrazedPaladin.java @@ -0,0 +1,76 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.dynamicvalue.common.CreaturesDiedThisTurnCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.watchers.common.CreaturesDiedWatcher; + +/** + * + * @author TheElk801 + */ +public class BloodcrazedPaladin extends CardImpl { + + public BloodcrazedPaladin(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // Bloodcrazed Paladin enters the battlefield with a +1/+1 counter on it for each creature that died this turn. + Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), + new CreaturesDiedThisTurnCount(), true); + effect.setText("with a +1/+1 counter on it for each creature that died this turn."); + this.addAbility(new EntersBattlefieldAbility(effect), new CreaturesDiedWatcher()); + } + + public BloodcrazedPaladin(final BloodcrazedPaladin card) { + super(card); + } + + @Override + public BloodcrazedPaladin copy() { + return new BloodcrazedPaladin(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BloodfireInfusion.java b/Mage.Sets/src/mage/cards/b/BloodfireInfusion.java new file mode 100644 index 0000000000..ba798c3045 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BloodfireInfusion.java @@ -0,0 +1,116 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeAttachedCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author L_J + */ +public class BloodfireInfusion extends CardImpl { + + public BloodfireInfusion(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); + this.subtype.add(SubType.AURA); + + // Enchant creature you control + TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // {R}, Sacrifice enchanted creature: Bloodfire Infusion deals damage equal to the sacrificed creature's power to each creature. + Effect effect = new DamageAllEffect(new AttachedPermanentPowerCount(), new FilterCreaturePermanent()); + effect.setText("{this} deals damage equal to the sacrificed creature's power to each creature"); + Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{R}")); + ability2.addCost(new SacrificeAttachedCost()); + this.addAbility(ability2); + + } + + public BloodfireInfusion(final BloodfireInfusion card) { + super(card); + } + + @Override + public BloodfireInfusion copy() { + return new BloodfireInfusion(this); + } +} + +class AttachedPermanentPowerCount implements DynamicValue { + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + Permanent attachment = game.getPermanentOrLKIBattlefield(sourceAbility.getSourceId()); + Permanent permanent = game.getPermanentOrLKIBattlefield(attachment.getAttachedTo()); + if (attachment != null + && permanent != null + && (permanent.getPower().getValue() >= 0)) { + return permanent.getPower().getValue(); + } + return 0; + } + + @Override + public AttachedPermanentPowerCount copy() { + return new AttachedPermanentPowerCount(); + } + + @Override + public String toString() { + return "X"; + } + + @Override + public String getMessage() { + return "enchanted creature's power"; + } +} diff --git a/Mage.Sets/src/mage/cards/b/BloodforgedBattleAxe.java b/Mage.Sets/src/mage/cards/b/BloodforgedBattleAxe.java index 10c5aab52a..98d934b7c5 100644 --- a/Mage.Sets/src/mage/cards/b/BloodforgedBattleAxe.java +++ b/Mage.Sets/src/mage/cards/b/BloodforgedBattleAxe.java @@ -30,7 +30,7 @@ package mage.cards.b; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.PutTokenOntoBattlefieldCopySourceEffect; +import mage.abilities.effects.CreateTokenCopySourceEffect; import mage.abilities.effects.common.continuous.BoostEquippedEffect; import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; @@ -81,7 +81,7 @@ public class BloodforgedBattleAxe extends CardImpl { class BloodforgedBattleAxeAbility extends TriggeredAbilityImpl { public BloodforgedBattleAxeAbility() { - super(Zone.BATTLEFIELD, new PutTokenOntoBattlefieldCopySourceEffect()); + super(Zone.BATTLEFIELD, new CreateTokenCopySourceEffect()); } public BloodforgedBattleAxeAbility(final BloodforgedBattleAxeAbility ability) { diff --git a/Mage.Sets/src/mage/cards/b/BloodletterQuill.java b/Mage.Sets/src/mage/cards/b/BloodletterQuill.java index 6b2dbf90a1..746d619d0c 100644 --- a/Mage.Sets/src/mage/cards/b/BloodletterQuill.java +++ b/Mage.Sets/src/mage/cards/b/BloodletterQuill.java @@ -1,77 +1,77 @@ -/* - * 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.cards.b; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.PutCountersSourceCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.dynamicvalue.common.CountersSourceCount; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.LoseLifeSourceControllerEffect; -import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.counters.Counter; - -/** - * - * @author LevelX2 - */ -public class BloodletterQuill extends CardImpl { - - public BloodletterQuill(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); - - Counter bloodCounter = new Counter("blood"); - // {2}, {T}, Put a blood counter on Bloodletter Quill: Draw a card, then lose 1 life for each blood counter on Bloodletter Quill. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(2)); - ability.addEffect(new LoseLifeSourceControllerEffect(new CountersSourceCount(bloodCounter.getName())) - .setText(", then lose 1 life for each blood counter on {this}")); - ability.addCost(new TapSourceCost()); - ability.addCost(new PutCountersSourceCost(bloodCounter)); - this.addAbility(ability); - // {U}{B}: Remove a blood counter from Bloodletter Quill. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, - new RemoveCounterSourceEffect(bloodCounter), new ManaCostsImpl("{U}{B}"))); - } - - public BloodletterQuill(final BloodletterQuill card) { - super(card); - } - - @Override - public BloodletterQuill copy() { - return new BloodletterQuill(this); - } -} +/* + * 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.cards.b; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.PutCountersSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.CountersSourceCount; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.counters.Counter; + +/** + * + * @author LevelX2 + */ +public class BloodletterQuill extends CardImpl { + + public BloodletterQuill(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + Counter bloodCounter = new Counter("blood"); + // {2}, {T}, Put a blood counter on Bloodletter Quill: Draw a card, then lose 1 life for each blood counter on Bloodletter Quill. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(2)); + ability.addEffect(new LoseLifeSourceControllerEffect(new CountersSourceCount(bloodCounter.getName())) + .setText(", then lose 1 life for each blood counter on {this}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new PutCountersSourceCost(bloodCounter)); + this.addAbility(ability); + // {U}{B}: Remove a blood counter from Bloodletter Quill. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new RemoveCounterSourceEffect(bloodCounter), new ManaCostsImpl("{U}{B}"))); + } + + public BloodletterQuill(final BloodletterQuill card) { + super(card); + } + + @Override + public BloodletterQuill copy() { + return new BloodletterQuill(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BloodrockCyclops.java b/Mage.Sets/src/mage/cards/b/BloodrockCyclops.java index f4379bb2ff..6367ac1bca 100644 --- a/Mage.Sets/src/mage/cards/b/BloodrockCyclops.java +++ b/Mage.Sets/src/mage/cards/b/BloodrockCyclops.java @@ -29,7 +29,7 @@ package mage.cards.b; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -47,7 +47,7 @@ public class BloodrockCyclops extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public BloodrockCyclops(final BloodrockCyclops card) { diff --git a/Mage.Sets/src/mage/cards/b/BloodsoakedChampion.java b/Mage.Sets/src/mage/cards/b/BloodsoakedChampion.java index 0f43b9dc6c..3127c144a5 100644 --- a/Mage.Sets/src/mage/cards/b/BloodsoakedChampion.java +++ b/Mage.Sets/src/mage/cards/b/BloodsoakedChampion.java @@ -49,7 +49,7 @@ import mage.watchers.common.PlayerAttackedWatcher; public class BloodsoakedChampion extends CardImpl { public BloodsoakedChampion(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); this.subtype.add(SubType.HUMAN, SubType.WARRIOR); this.power = new MageInt(2); @@ -57,14 +57,14 @@ public class BloodsoakedChampion extends CardImpl { // Bloodstained Brave can't block. this.addAbility(new CantBlockAbility()); - + // Raid - {1}{B}: Return Bloodstained Brave from your graveyard to the battlefield. Activate this ability only if you attacked with a creature this turn. Ability ability = new ConditionalActivatedAbility( - Zone.GRAVEYARD, - new ReturnSourceFromGraveyardToBattlefieldEffect(), - new ManaCostsImpl<>("{1}{B}"), + Zone.GRAVEYARD, + new ReturnSourceFromGraveyardToBattlefieldEffect(), + new ManaCostsImpl<>("{1}{B}"), RaidCondition.instance, - "Raid - {1}{B}: Return {this} from your graveyard to the battlefield. Activate this ability only if you attacked with a creature this turn"); + "Raid — {1}{B}: Return {this} from your graveyard to the battlefield. Activate this ability only if you attacked with a creature this turn"); this.addAbility(ability, new PlayerAttackedWatcher()); } diff --git a/Mage.Sets/src/mage/cards/b/BloodstokeHowler.java b/Mage.Sets/src/mage/cards/b/BloodstokeHowler.java new file mode 100644 index 0000000000..5e183305c5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BloodstokeHowler.java @@ -0,0 +1,78 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; +import mage.constants.SubType; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author TheElk801 + */ +public class BloodstokeHowler extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Beast creatures you control"); + + static { + filter.add(new SubtypePredicate(SubType.BEAST)); + } + + public BloodstokeHowler(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}"); + + this.subtype.add(SubType.BEAST); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Morph {6}{R} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{6}{R}"))); + + // When Bloodstoke Howler is turned face up, Beast creatures you control get +3/+0 until end of turn. + this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new BoostControlledEffect(3, 0, Duration.EndOfTurn, filter))); + } + + public BloodstokeHowler(final BloodstokeHowler card) { + super(card); + } + + @Override + public BloodstokeHowler copy() { + return new BloodstokeHowler(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BloomingMarsh.java b/Mage.Sets/src/mage/cards/b/BloomingMarsh.java index 10b43eaf25..a029235ef6 100644 --- a/Mage.Sets/src/mage/cards/b/BloomingMarsh.java +++ b/Mage.Sets/src/mage/cards/b/BloomingMarsh.java @@ -49,11 +49,11 @@ import mage.filter.common.FilterLandPermanent; public class BloomingMarsh extends CardImpl { public BloomingMarsh(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},""); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); // Blooming Marsh enters the battlefield tapped unless you control two or fewer other lands. Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(new FilterLandPermanent(), ComparisonType.FEWER_THAN, 3)); - String abilityText = "tapped unless you control fewer than 3 lands"; + String abilityText = " tapped unless you control two or fewer other lands"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); // {T}: Add {B} or {G} to your mana pool. diff --git a/Mage.Sets/src/mage/cards/b/BlossomDryad.java b/Mage.Sets/src/mage/cards/b/BlossomDryad.java new file mode 100644 index 0000000000..617b44e590 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BlossomDryad.java @@ -0,0 +1,70 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author TheElk801 + */ +public class BlossomDryad extends CardImpl { + + public BlossomDryad(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.DRYAD); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {t}: Untap target land. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new TapSourceCost()); + ability.addTarget(new TargetLandPermanent()); + this.addAbility(ability); + } + + public BlossomDryad(final BlossomDryad card) { + super(card); + } + + @Override + public BlossomDryad copy() { + return new BlossomDryad(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BludgeonBrawl.java b/Mage.Sets/src/mage/cards/b/BludgeonBrawl.java index 12dfe4090e..4d0dd92b13 100644 --- a/Mage.Sets/src/mage/cards/b/BludgeonBrawl.java +++ b/Mage.Sets/src/mage/cards/b/BludgeonBrawl.java @@ -113,7 +113,7 @@ class BludgeonBrawlAddSubtypeEffect extends ContinuousEffectImpl { List permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game); for (Permanent permanent : permanents) { if (permanent != null) { - permanent.getSubtype(game).add("Equipment"); + permanent.getSubtype(game).add(SubType.EQUIPMENT); affectedPermanents.add(permanent.getId()); } } diff --git a/Mage.Sets/src/mage/cards/b/BlueManaBattery.java b/Mage.Sets/src/mage/cards/b/BlueManaBattery.java index 410b81cb00..4a16c87b1d 100644 --- a/Mage.Sets/src/mage/cards/b/BlueManaBattery.java +++ b/Mage.Sets/src/mage/cards/b/BlueManaBattery.java @@ -64,10 +64,10 @@ public class BlueManaBattery extends CardImpl { Mana.BlueMana(1), new IntPlusDynamicValue(1, new RemovedCountersForCostValue()), new TapSourceCost(), - "Add {U} to your mana pool, then add {U} to your mana pool for each storage counter removed this way", - true, new CountersSourceCount(CounterType.STORAGE)); - ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(), - "Remove X storage counters from {this}")); + "Add {U} to your mana pool, then add {U} to your mana pool for each charge counter removed this way", + true, new CountersSourceCount(CounterType.CHARGE)); + ability.addCost(new RemoveVariableCountersSourceCost(CounterType.CHARGE.createInstance(), + "Remove any number of charge counters from {this}")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BlurOfBlades.java b/Mage.Sets/src/mage/cards/b/BlurOfBlades.java index beb3c37bcd..5a1b7b9c5f 100644 --- a/Mage.Sets/src/mage/cards/b/BlurOfBlades.java +++ b/Mage.Sets/src/mage/cards/b/BlurOfBlades.java @@ -1,66 +1,66 @@ -/* - * 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.cards.b; - -import java.util.UUID; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.DamageTargetControllerEffect; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.counters.CounterType; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author ciaccona007 - */ -public class BlurOfBlades extends CardImpl { - - public BlurOfBlades(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); - - // Put a -1/-1 counter on target creature. Blur of Blades deals 2 damage to that creature's controller. - getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.M1M1.createInstance(1))); - Effect effect = new DamageTargetControllerEffect(2); - effect.setText("{this} deals 2 damage to that creature's controller"); - getSpellAbility().addEffect(effect); - getSpellAbility().addTarget(new TargetCreaturePermanent()); - - } - - public BlurOfBlades(final BlurOfBlades card) { - super(card); - } - - @Override - public BlurOfBlades copy() { - return new BlurOfBlades(this); - } -} +/* + * 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.cards.b; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetControllerEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author ciaccona007 + */ +public class BlurOfBlades extends CardImpl { + + public BlurOfBlades(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); + + // Put a -1/-1 counter on target creature. Blur of Blades deals 2 damage to that creature's controller. + getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.M1M1.createInstance(1))); + Effect effect = new DamageTargetControllerEffect(2); + effect.setText("{this} deals 2 damage to that creature's controller"); + getSpellAbility().addEffect(effect); + getSpellAbility().addTarget(new TargetCreaturePermanent()); + + } + + public BlurOfBlades(final BlurOfBlades card) { + super(card); + } + + @Override + public BlurOfBlades copy() { + return new BlurOfBlades(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BomatCourier.java b/Mage.Sets/src/mage/cards/b/BomatCourier.java index 08219caa68..f5cecc1c36 100644 --- a/Mage.Sets/src/mage/cards/b/BomatCourier.java +++ b/Mage.Sets/src/mage/cards/b/BomatCourier.java @@ -54,7 +54,7 @@ import mage.util.CardUtil; public class BomatCourier extends CardImpl { public BomatCourier(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}"); this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -105,7 +105,7 @@ class BomatCourierExileEffect extends OneShotEffect { if (controller != null && sourceObject != null) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { - UUID exileZoneId = CardUtil.getExileZoneId(game, source.getSourceId(), 0); + UUID exileZoneId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); card.setFaceDown(true, game); controller.moveCardsToExile(card, source, game, false, exileZoneId, sourceObject.getIdName()); card.setFaceDown(true, game); @@ -136,7 +136,7 @@ class BomatCourierReturnEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - ExileZone exileZone = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(), 0)); + ExileZone exileZone = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter())); if (exileZone != null) { controller.moveCards(exileZone, Zone.HAND, source, game); } diff --git a/Mage.Sets/src/mage/cards/b/BondedHorncrest.java b/Mage.Sets/src/mage/cards/b/BondedHorncrest.java new file mode 100644 index 0000000000..a62a078324 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BondedHorncrest.java @@ -0,0 +1,65 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.CantAttackAloneAbility; +import mage.abilities.keyword.CantBlockAloneAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class BondedHorncrest extends CardImpl { + + public BondedHorncrest(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Bonded Horncrest can't attack or block alone. + this.addAbility(new CantAttackAloneAbility()); + this.addAbility(CantBlockAloneAbility.getInstance()); + } + + public BondedHorncrest(final BondedHorncrest card) { + super(card); + } + + @Override + public BondedHorncrest copy() { + return new BondedHorncrest(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BonethornValesk.java b/Mage.Sets/src/mage/cards/b/BonethornValesk.java new file mode 100644 index 0000000000..ebaa60b72f --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BonethornValesk.java @@ -0,0 +1,69 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.TurnedFaceUpAllTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterPermanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author TheElk801 + */ +public class BonethornValesk extends CardImpl { + + public BonethornValesk(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); + + this.subtype.add(SubType.BEAST); + this.power = new MageInt(4); + this.toughness = new MageInt(2); + + // Whenever a permanent is turned face up, Bonethorn Valesk deals 1 damage to target creature or player. + Ability ability = new TurnedFaceUpAllTriggeredAbility(new DamageTargetEffect(1), new FilterPermanent("a permanent")); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public BonethornValesk(final BonethornValesk card) { + super(card); + } + + @Override + public BonethornValesk copy() { + return new BonethornValesk(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BoneyardParley.java b/Mage.Sets/src/mage/cards/b/BoneyardParley.java new file mode 100644 index 0000000000..74874f678a --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BoneyardParley.java @@ -0,0 +1,162 @@ +/* + * 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.cards.b; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.Target; +import mage.target.TargetCard; +import mage.target.common.TargetCardInGraveyard; +import mage.target.common.TargetOpponent; + +/** + * + * @author TheElk801 + */ +public class BoneyardParley extends CardImpl { + + public BoneyardParley(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{B}{B}"); + + // Exile up to five target creature cards from graveyards. An opponent separates those cards into two piles. Put all cards from the pile of your choice onto the battlefield under your control and the rest into their owners' graveyards. + this.getSpellAbility().addEffect(new BoneyardParleyEffect()); + this.getSpellAbility().addTarget(new TargetCardInGraveyard(0, 5, new FilterCard("cards from graveyards"))); + } + + public BoneyardParley(final BoneyardParley card) { + super(card); + } + + @Override + public BoneyardParley copy() { + return new BoneyardParley(this); + } +} + +class BoneyardParleyEffect extends OneShotEffect { + + BoneyardParleyEffect() { + super(Outcome.Benefit); + this.staticText = "Exile up to five target creature cards from graveyards. " + + "An opponent separates those cards into two piles. " + + "Put all cards from the pile of your choice onto the battlefield under your control " + + "and the rest into their owners' graveyards"; + } + + BoneyardParleyEffect(final BoneyardParleyEffect effect) { + super(effect); + } + + @Override + public BoneyardParleyEffect copy() { + return new BoneyardParleyEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + Cards cards = new CardsImpl(); + for (Target target : source.getTargets()) { + for (UUID cardId : target.getTargets()) { + cards.add(cardId); + } + } + if (!cards.isEmpty() && player.moveCards(cards, Zone.EXILED, source, game)) { + TargetOpponent targetOpponent = new TargetOpponent(true); + if (player.choose(Outcome.Neutral, targetOpponent, source.getSourceId(), game)) { + Player opponent = game.getPlayer(targetOpponent.getFirstTarget()); + if (opponent != null) { + TargetCard targetCards = new TargetCard(0, cards.size(), Zone.EXILED, new FilterCard("cards to put in the first pile")); + List pile1 = new ArrayList<>(); + if (opponent.choose(Outcome.Neutral, cards, targetCards, game)) { + List targets = targetCards.getTargets(); + for (UUID targetId : targets) { + Card card = cards.get(targetId, game); + if (card != null) { + pile1.add(card); + cards.remove(card); + } + } + } + List pile2 = new ArrayList<>(); + pile2.addAll(cards.getCards(game)); + boolean choice = player.choosePile(outcome, "Choose a pile to put onto the battlefield.", pile1, pile2, game); + + Zone pile1Zone = Zone.GRAVEYARD; + Zone pile2Zone = Zone.BATTLEFIELD; + if (choice) { + pile1Zone = Zone.BATTLEFIELD; + pile2Zone = Zone.GRAVEYARD; + } + Set pile1Set = new HashSet<>(); + Set pile2Set = new HashSet<>(); + pile1Set.addAll(pile1); + pile2Set.addAll(pile2); + +// Cards toBattlefield = new CardsImpl(); +// Cards toGraveyard = new CardsImpl(); +// +// if (pile1Zone == Zone.BATTLEFIELD) { +// toBattlefield.addAll(pile1); +// toGraveyard.addAll(pile2); +// } else { +// toBattlefield.addAll(pile2); +// toGraveyard.addAll(pile1); +// } + player.moveCards(pile1Set, pile1Zone, source, game, false, false, false, null); + player.moveCards(pile2Set, pile2Zone, source, game, false, false, false, null); + +// StringBuilder sb = new StringBuilder("Pile 1, going to ").append(pile1Zone == Zone.BATTLEFIELD ? "Battlefield" : "Graveyard").append(": "); +// game.informPlayers(sb.toString()); +// sb = new StringBuilder("Pile 2, going to ").append(pile2Zone == Zone.BATTLEFIELD ? "Battlefield" : "Graveyard").append(':'); +// game.informPlayers(sb.toString()); + } + return true; + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/b/BorosReckoner.java b/Mage.Sets/src/mage/cards/b/BorosReckoner.java index 92d81ac125..54a67621c9 100644 --- a/Mage.Sets/src/mage/cards/b/BorosReckoner.java +++ b/Mage.Sets/src/mage/cards/b/BorosReckoner.java @@ -51,20 +51,20 @@ import mage.target.common.TargetCreatureOrPlayer; public class BorosReckoner extends CardImpl { public BorosReckoner(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R/W}{R/W}{R/W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R/W}{R/W}{R/W}"); this.subtype.add(SubType.MINOTAUR, SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); // Whenever Boros Reckoner is dealt damage, it deals that much damage to target creature or player. - Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new BorosReckonerDealDamageEffect(), false); + Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new BorosReckonerDealDamageEffect(), false, false, true); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); // {R/W}: Boros Reckoner gains first strike until end of turn. this.addAbility(new SimpleActivatedAbility( - Zone.BATTLEFIELD, new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(),Duration.EndOfTurn), new ManaCostsImpl("{R/W}"))); + Zone.BATTLEFIELD, new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{R/W}"))); } public BorosReckoner(final BorosReckoner card) { diff --git a/Mage.Sets/src/mage/cards/b/BotanicalSanctum.java b/Mage.Sets/src/mage/cards/b/BotanicalSanctum.java index 8c80d10605..9ad9cb57e6 100644 --- a/Mage.Sets/src/mage/cards/b/BotanicalSanctum.java +++ b/Mage.Sets/src/mage/cards/b/BotanicalSanctum.java @@ -49,11 +49,11 @@ import mage.filter.common.FilterLandPermanent; public class BotanicalSanctum extends CardImpl { public BotanicalSanctum(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},""); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); // Botanical Sanctum enters the battlefield tapped unless you control two or fewer other lands. Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(new FilterLandPermanent(), ComparisonType.FEWER_THAN, 3)); - String abilityText = "tapped unless you control fewer than 3 lands"; + String abilityText = " tapped unless you control two or fewer other lands"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); // {T}: Add {G} or {U} to your mana pool. diff --git a/Mage.Sets/src/mage/cards/b/BounteousKirin.java b/Mage.Sets/src/mage/cards/b/BounteousKirin.java index afcd8911c1..5a3ae7a8fa 100644 --- a/Mage.Sets/src/mage/cards/b/BounteousKirin.java +++ b/Mage.Sets/src/mage/cards/b/BounteousKirin.java @@ -48,7 +48,7 @@ import mage.players.Player; public class BounteousKirin extends CardImpl { public BounteousKirin(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.KIRIN, SubType.SPIRIT); @@ -89,7 +89,7 @@ class BounteousKirinEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Spell spell = game.getState().getStack().getSpell(getTargetPointer().getFirst(game, source)); + Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source)); if (spell != null) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { diff --git a/Mage.Sets/src/mage/cards/b/BraceForImpact.java b/Mage.Sets/src/mage/cards/b/BraceForImpact.java new file mode 100644 index 0000000000..dd6686b3c7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BraceForImpact.java @@ -0,0 +1,129 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.PreventionEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.MulticoloredPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class BraceForImpact extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("multicolored creature"); + + static { + filter.add(new MulticoloredPredicate()); + } + + public BraceForImpact(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{W}"); + + // Prevent all damage that would be dealt to target multicolored creature this turn. For each 1 damage prevented this way, put a +1/+1 counter on that creature. + this.getSpellAbility().addEffect(new BraceForImpactPreventDamageTargetEffect(Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + } + + public BraceForImpact(final BraceForImpact card) { + super(card); + } + + @Override + public BraceForImpact copy() { + return new BraceForImpact(this); + } +} + +class BraceForImpactPreventDamageTargetEffect extends PreventionEffectImpl { + + public BraceForImpactPreventDamageTargetEffect(Duration duration) { + super(duration); + staticText = "Prevent all damage that would be dealt to target multicolored creature this turn. For each 1 damage prevented this way, put a +1/+1 counter on that creature"; + } + + public BraceForImpactPreventDamageTargetEffect(final BraceForImpactPreventDamageTargetEffect effect) { + super(effect); + } + + @Override + public BraceForImpactPreventDamageTargetEffect copy() { + return new BraceForImpactPreventDamageTargetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + GameEvent preventEvent = new GameEvent(GameEvent.EventType.PREVENT_DAMAGE, source.getFirstTarget(), source.getSourceId(), source.getControllerId(), event.getAmount(), false); + if (!game.replaceEvent(preventEvent)) { + int prevented = 0; + int damage = event.getAmount(); + event.setAmount(0); + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, source.getFirstTarget(), source.getSourceId(), source.getControllerId(), damage)); + prevented = damage; + + // add counters now + if (prevented > 0) { + Permanent targetPermanent = game.getPermanent(source.getTargets().getFirstTarget()); + if (targetPermanent != null) { + targetPermanent.addCounters(CounterType.P1P1.createInstance(prevented), source, game); + game.informPlayers(new StringBuilder("Brace for Impact: Prevented ").append(prevented).append(" damage ").toString()); + game.informPlayers("Brace for Impact: Adding " + prevented + " +1/+1 counters to " + targetPermanent.getName()); + } + } + } + return false; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (!this.used && super.applies(event, source, game)) { + if (source.getTargets().getFirstTarget().equals(event.getTargetId())) { + return true; + } + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/cards/b/BraidsCabalMinion.java b/Mage.Sets/src/mage/cards/b/BraidsCabalMinion.java index 540df39df1..71387fcbb9 100644 --- a/Mage.Sets/src/mage/cards/b/BraidsCabalMinion.java +++ b/Mage.Sets/src/mage/cards/b/BraidsCabalMinion.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.effects.common.SacrificeEffect; @@ -38,13 +37,15 @@ import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; +import java.util.UUID; + /** * * @author cbt33, North (Karma) */ public class BraidsCabalMinion extends CardImpl { - static final FilterPermanent filter = new FilterPermanent("artifact, creature, or land"); + static final FilterPermanent filter = new FilterPermanent("an artifact, creature, or land"); static { filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), diff --git a/Mage.Sets/src/mage/cards/b/BraidsConjurerAdept.java b/Mage.Sets/src/mage/cards/b/BraidsConjurerAdept.java index 950894450f..0f1050c875 100644 --- a/Mage.Sets/src/mage/cards/b/BraidsConjurerAdept.java +++ b/Mage.Sets/src/mage/cards/b/BraidsConjurerAdept.java @@ -47,8 +47,8 @@ import mage.filter.predicate.mageobject.CardTypePredicate; */ public class BraidsConjurerAdept extends CardImpl { - private static final FilterCard filter = new FilterCard("artifact, creature, or land card") -; + private static final FilterCard filter = new FilterCard("an artifact, creature, or land card"); + static { filter.add(Predicates.or( new CardTypePredicate(CardType.ARTIFACT), @@ -57,7 +57,7 @@ public class BraidsConjurerAdept extends CardImpl { } public BraidsConjurerAdept(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.HUMAN, SubType.WIZARD); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/b/BrassTalonChimera.java b/Mage.Sets/src/mage/cards/b/BrassTalonChimera.java index 3c316e29d7..fc3b22aba5 100644 --- a/Mage.Sets/src/mage/cards/b/BrassTalonChimera.java +++ b/Mage.Sets/src/mage/cards/b/BrassTalonChimera.java @@ -53,7 +53,7 @@ import java.util.UUID; */ public class BrassTalonChimera extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Beast creature you control"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Chimera creature you control"); static { filter.add(new SubtypePredicate(SubType.CHIMERA)); @@ -73,6 +73,7 @@ public class BrassTalonChimera extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P2P2.createInstance()), new SacrificeSourceCost()); ability.addEffect(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield)); ability.addTarget(new TargetCreaturePermanent(filter)); + addAbility(ability); } public BrassTalonChimera(final BrassTalonChimera card) { diff --git a/Mage.Sets/src/mage/cards/b/Brawl.java b/Mage.Sets/src/mage/cards/b/Brawl.java new file mode 100644 index 0000000000..0d556da22e --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/Brawl.java @@ -0,0 +1,70 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DamageWithPowerTargetEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class Brawl extends CardImpl { + + public Brawl(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}{R}"); + + // Until end of turn, all creatures gain "{T}: This creature deals damage equal to its power to target creature." + Ability ability = new SimpleActivatedAbility(new DamageWithPowerTargetEffect(), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect( + new GainAbilityAllEffect(ability, Duration.EndOfTurn, new FilterCreaturePermanent()) + .setText("Until end of turn, all creatures gain \"{T}: This creature deals damage equal to its power to target creature.\"") + ); + } + + public Brawl(final Brawl card) { + super(card); + } + + @Override + public Brawl copy() { + return new Brawl(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BrazenBuccaneers.java b/Mage.Sets/src/mage/cards/b/BrazenBuccaneers.java new file mode 100644 index 0000000000..d0b9146597 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BrazenBuccaneers.java @@ -0,0 +1,69 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.keyword.ExploreSourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class BrazenBuccaneers extends CardImpl { + + public BrazenBuccaneers(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // When Brazen Buccaneers enters the battlefield, it explores. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ExploreSourceEffect())); + } + + public BrazenBuccaneers(final BrazenBuccaneers card) { + super(card); + } + + @Override + public BrazenBuccaneers copy() { + return new BrazenBuccaneers(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BreakOpen.java b/Mage.Sets/src/mage/cards/b/BreakOpen.java index 44cda67427..4d166c1ad6 100644 --- a/Mage.Sets/src/mage/cards/b/BreakOpen.java +++ b/Mage.Sets/src/mage/cards/b/BreakOpen.java @@ -28,18 +28,14 @@ package mage.cards.b; import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.TurnFaceUpTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.other.FaceDownPredicate; import mage.filter.predicate.permanent.ControllerPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; /** @@ -72,32 +68,3 @@ public class BreakOpen extends CardImpl { return new BreakOpen(this); } } - -class TurnFaceUpTargetEffect extends OneShotEffect { - - public TurnFaceUpTargetEffect() { - super(Outcome.Benefit); - this.staticText = "Turn target face-down creature an opponen controls face up."; - } - - public TurnFaceUpTargetEffect(final TurnFaceUpTargetEffect effect) { - super(effect); - } - - @Override - public TurnFaceUpTargetEffect copy() { - return new TurnFaceUpTargetEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - UUID target = targetPointer.getFirst(game, source); - if (target != null) { - Permanent permanent = game.getPermanent(target); - if (permanent != null) { - return permanent.turnFaceUp(game, source.getControllerId()); - } - } - return false; - } -} diff --git a/Mage.Sets/src/mage/cards/b/BreathOfDreams.java b/Mage.Sets/src/mage/cards/b/BreathOfDreams.java new file mode 100644 index 0000000000..a9ff1064d1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BreathOfDreams.java @@ -0,0 +1,75 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author L_J + */ +public class BreathOfDreams extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Green creatures"); + + static{ + filter.add(new ColorPredicate(ObjectColor.GREEN)); + } + + public BreathOfDreams(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}{U}"); + + // Cumulative upkeep-Pay {U}. + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{U}"))); + + // Green creatures have "Cumulative upkeep {1}." + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new CumulativeUpkeepAbility(new ManaCostsImpl("{1}")), Duration.WhileOnBattlefield, filter))); + } + + public BreathOfDreams(final BreathOfDreams card) { + super(card); + } + + @Override + public BreathOfDreams copy() { + return new BreathOfDreams(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BreathstealersCrypt.java b/Mage.Sets/src/mage/cards/b/BreathstealersCrypt.java index 9ed3297ab0..c93450f6e3 100644 --- a/Mage.Sets/src/mage/cards/b/BreathstealersCrypt.java +++ b/Mage.Sets/src/mage/cards/b/BreathstealersCrypt.java @@ -1,128 +1,128 @@ -/* - * 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.cards.b; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.common.PayLifeCost; -import mage.abilities.effects.ReplacementEffectImpl; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.players.Player; - -/** - * - * @author jeffwadsworth - */ -public class BreathstealersCrypt extends CardImpl { - - public BreathstealersCrypt(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{B}"); - - // If a player would draw a card, instead he or she draws a card and reveals it. If it's a creature card, that player discards it unless he or she pays 3 life. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BreathstealersCryptEffect())); - - } - - public BreathstealersCrypt(final BreathstealersCrypt card) { - super(card); - } - - @Override - public BreathstealersCrypt copy() { - return new BreathstealersCrypt(this); - } -} - -class BreathstealersCryptEffect extends ReplacementEffectImpl { - - public BreathstealersCryptEffect() { - super(Duration.WhileOnBattlefield, Outcome.LoseLife); - staticText = "If a player would draw a card, instead he or she draws a card and reveals it. If it's a creature card, that player discards it unless he or she pays 3 life"; - } - - public BreathstealersCryptEffect(final BreathstealersCryptEffect effect) { - super(effect); - } - - @Override - public BreathstealersCryptEffect copy() { - return new BreathstealersCryptEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } - - @Override - public boolean replaceEvent(GameEvent event, Ability source, Game game) { - Player player = game.getPlayer(event.getPlayerId()); - PayLifeCost cost = new PayLifeCost(3); - if (player != null) { - Card cardDrawn = player.getLibrary().removeFromTop(game); - if (cardDrawn != null) { - player.moveCardToHandWithInfo(cardDrawn, source.getSourceId(), game); - Cards cards = new CardsImpl(); - cards.add(cardDrawn); - player.revealCards("The card drawn from " + player.getName() + "'s library", cards, game); - if (cardDrawn.isCreature()) { - game.informPlayers("The card drawn by " + player.getName() + " is a creature card. He/she must pay 3 life or that card gets discarded."); - if (cost.canPay(source, source.getSourceId(), player.getId(), game) - && player.chooseUse(outcome, "Do you wish to pay 3 life to keep the drawn creature card? If not, you discard it.", source, game)) { - return cost.pay(source, game, source.getSourceId(), player.getId(), true, cost); - } else { - game.informPlayers("The cost of 3 life was not paid by " + player.getName() + ", so the creature card will be discarded."); - return player.discard(cardDrawn, source, game); - } - } - } - } - return false; - } - - @Override - public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.DRAW_CARD; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - return true; - } -} +/* + * 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.cards.b; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.players.Player; + +/** + * + * @author jeffwadsworth + */ +public class BreathstealersCrypt extends CardImpl { + + public BreathstealersCrypt(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{B}"); + + // If a player would draw a card, instead he or she draws a card and reveals it. If it's a creature card, that player discards it unless he or she pays 3 life. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BreathstealersCryptEffect())); + + } + + public BreathstealersCrypt(final BreathstealersCrypt card) { + super(card); + } + + @Override + public BreathstealersCrypt copy() { + return new BreathstealersCrypt(this); + } +} + +class BreathstealersCryptEffect extends ReplacementEffectImpl { + + public BreathstealersCryptEffect() { + super(Duration.WhileOnBattlefield, Outcome.LoseLife); + staticText = "If a player would draw a card, instead he or she draws a card and reveals it. If it's a creature card, that player discards it unless he or she pays 3 life"; + } + + public BreathstealersCryptEffect(final BreathstealersCryptEffect effect) { + super(effect); + } + + @Override + public BreathstealersCryptEffect copy() { + return new BreathstealersCryptEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Player player = game.getPlayer(event.getPlayerId()); + PayLifeCost cost = new PayLifeCost(3); + if (player != null) { + Card cardDrawn = player.getLibrary().removeFromTop(game); + if (cardDrawn != null) { + player.moveCardToHandWithInfo(cardDrawn, source.getSourceId(), game); + Cards cards = new CardsImpl(); + cards.add(cardDrawn); + player.revealCards("The card drawn from " + player.getName() + "'s library", cards, game); + if (cardDrawn.isCreature()) { + game.informPlayers("The card drawn by " + player.getName() + " is a creature card. He/she must pay 3 life or that card gets discarded."); + if (cost.canPay(source, source.getSourceId(), player.getId(), game) + && player.chooseUse(outcome, "Do you wish to pay 3 life to keep the drawn creature card? If not, you discard it.", source, game)) { + return cost.pay(source, game, source.getSourceId(), player.getId(), true, cost); + } else { + game.informPlayers("The cost of 3 life was not paid by " + player.getName() + ", so the creature card will be discarded."); + return player.discard(cardDrawn, source, game); + } + } + } + } + return false; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DRAW_CARD; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/b/BreedingPool.java b/Mage.Sets/src/mage/cards/b/BreedingPool.java index d617b43993..628bb5ac4a 100644 --- a/Mage.Sets/src/mage/cards/b/BreedingPool.java +++ b/Mage.Sets/src/mage/cards/b/BreedingPool.java @@ -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.cards.b; import mage.abilities.common.AsEntersBattlefieldAbility; @@ -46,15 +45,16 @@ import java.util.UUID; */ public class BreedingPool extends CardImpl { - public BreedingPool (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + public BreedingPool(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); this.subtype.add(SubType.FOREST, SubType.ISLAND); + + this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); this.addAbility(new GreenManaAbility()); this.addAbility(new BlueManaAbility()); - this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, Breeding Pool enters the battlefield tapped")); } - public BreedingPool (final BreedingPool card) { + public BreedingPool(final BreedingPool card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/b/BriarPatch.java b/Mage.Sets/src/mage/cards/b/BriarPatch.java index feef4a8020..ce90a08e89 100644 --- a/Mage.Sets/src/mage/cards/b/BriarPatch.java +++ b/Mage.Sets/src/mage/cards/b/BriarPatch.java @@ -52,7 +52,7 @@ public class BriarPatch extends CardImpl { Effect effect = new BoostTargetEffect(-1, 0, Duration.EndOfTurn); effect.setText("it gets -1/-0"); Ability ability = new AttackedByCreatureTriggeredAbility(Zone.BATTLEFIELD, effect, false, SetTargetPointer.PERMANENT); - this.getAbilities().add(ability); + addAbility(ability); } public BriarPatch(final BriarPatch card) { diff --git a/Mage.Sets/src/mage/cards/b/BriarbridgePatrol.java b/Mage.Sets/src/mage/cards/b/BriarbridgePatrol.java index 565cafc01e..9cbfc70cc3 100644 --- a/Mage.Sets/src/mage/cards/b/BriarbridgePatrol.java +++ b/Mage.Sets/src/mage/cards/b/BriarbridgePatrol.java @@ -27,8 +27,6 @@ */ package mage.cards.b; -import java.util.List; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; @@ -47,6 +45,9 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.watchers.common.PermanentsSacrificedWatcher; +import java.util.List; +import java.util.UUID; + /** * @author LevelX2 */ @@ -88,7 +89,7 @@ enum BriarbridgePatrolCondition implements Condition { if (sacrificedPermanents != null && !sacrificedPermanents.isEmpty()) { int amountOfClues = 0; for (Permanent permanent : sacrificedPermanents) { - if (permanent.getSubtype(game).contains("Clue")) { + if (permanent.hasSubtype(SubType.CLUE, game)) { amountOfClues++; } } diff --git a/Mage.Sets/src/mage/cards/b/BrightReprisal.java b/Mage.Sets/src/mage/cards/b/BrightReprisal.java new file mode 100644 index 0000000000..3a8884ea8f --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BrightReprisal.java @@ -0,0 +1,63 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetAttackingCreature; + +/** + * + * @author TheElk801 + */ +public class BrightReprisal extends CardImpl { + + public BrightReprisal(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{W}"); + + // Destroy target attacking creature. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetAttackingCreature()); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public BrightReprisal(final BrightReprisal card) { + super(card); + } + + @Override + public BrightReprisal copy() { + return new BrightReprisal(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BroodhatchNantuko.java b/Mage.Sets/src/mage/cards/b/BroodhatchNantuko.java index 11bf446387..72bf9a42a3 100644 --- a/Mage.Sets/src/mage/cards/b/BroodhatchNantuko.java +++ b/Mage.Sets/src/mage/cards/b/BroodhatchNantuko.java @@ -52,13 +52,13 @@ import mage.players.Player; public class BroodhatchNantuko extends CardImpl { public BroodhatchNantuko(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); this.subtype.add(SubType.INSECT, SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); // Whenever Broodhatch Nantuko is dealt damage, you may create that many 1/1 green Insect creature tokens. - this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new BroodhatchNantukoDealDamageEffect(), true)); + this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new BroodhatchNantukoDealDamageEffect(), true, false, true)); // Morph {2}{G} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{G}"))); } @@ -100,4 +100,4 @@ class BroodhatchNantukoDealDamageEffect extends OneShotEffect { } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/b/BrownOuphe.java b/Mage.Sets/src/mage/cards/b/BrownOuphe.java index 0e8014f032..1810831dd0 100644 --- a/Mage.Sets/src/mage/cards/b/BrownOuphe.java +++ b/Mage.Sets/src/mage/cards/b/BrownOuphe.java @@ -53,7 +53,7 @@ import java.util.UUID; */ public class BrownOuphe extends CardImpl { - private final static FilterStackObject filter = new FilterStackObject("ability from an artifact source"); + private final static FilterStackObject filter = new FilterStackObject("activated ability from an artifact source"); static { filter.add(new ArtifactSourcePredicate()); diff --git a/Mage.Sets/src/mage/cards/b/BrutalDeceiver.java b/Mage.Sets/src/mage/cards/b/BrutalDeceiver.java index 0ff4dc4091..e443ace2d9 100644 --- a/Mage.Sets/src/mage/cards/b/BrutalDeceiver.java +++ b/Mage.Sets/src/mage/cards/b/BrutalDeceiver.java @@ -29,13 +29,13 @@ package mage.cards.b; import java.util.UUID; import mage.MageInt; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.Cost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.LookLibraryControllerEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; @@ -43,6 +43,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.*; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.Outcome; import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; @@ -55,7 +56,7 @@ import mage.players.Player; public class BrutalDeceiver extends CardImpl { public BrutalDeceiver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); @@ -65,9 +66,7 @@ public class BrutalDeceiver extends CardImpl { this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(), new GenericManaCost(1))); // {2}: Reveal the top card of your library. If it's a land card, {this} gets +1/+0 and gains first strike until end of turn. - Ability ability = new BrutalDeceiverAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{2}")); - ability.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn)); - this.addAbility(ability); + this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BrutalDeceiverEffect(), new ManaCostsImpl("{2}"))); } public BrutalDeceiver(final BrutalDeceiver card) { @@ -80,38 +79,39 @@ public class BrutalDeceiver extends CardImpl { } } -class BrutalDeceiverAbility extends LimitedTimesPerTurnActivatedAbility { +class BrutalDeceiverEffect extends OneShotEffect { - public BrutalDeceiverAbility(Zone zone, Effect effect, Cost cost) { - super(zone, effect, cost); + public BrutalDeceiverEffect() { + super(Outcome.BoostCreature); + this.staticText = "Reveal the top card of your library. If it's a land card, {this} gets +1/+0 and gains first strike until end of turn"; } - public BrutalDeceiverAbility(BrutalDeceiverAbility ability) { - super(ability); + public BrutalDeceiverEffect(final BrutalDeceiverEffect effect) { + super(effect); } @Override - public BrutalDeceiverAbility copy() { - return new BrutalDeceiverAbility(this); + public BrutalDeceiverEffect copy() { + return new BrutalDeceiverEffect(this); } @Override - public boolean checkIfClause(Game game) { - Player player = game.getPlayer(this.getControllerId()); - if (player != null) { + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null) { Cards cards = new CardsImpl(); - Card card = player.getLibrary().getFromTop(game); - cards.add(card); - player.revealCards("Brutal Deceiver", cards, game); - if (card != null && card.isLand()) { - return true; + Card card = controller.getLibrary().getFromTop(game); + if (card != null) { + cards.add(card); + controller.revealCards(sourceObject.getIdName(), cards, game); + if (card.isLand()) { + game.addEffect(new BoostSourceEffect(1, 0, Duration.EndOfTurn), source); + game.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), source); + } } + return true; } return false; } - - @Override - public String getRule() { - return "{2}: Reveal the top card of your library. If it's a land card, {this} gets +1/+0 and gains first strike until end of turn. Activate this ability only once each turn."; - } } diff --git a/Mage.Sets/src/mage/cards/b/BullElephant.java b/Mage.Sets/src/mage/cards/b/BullElephant.java index 0351b1fc0f..8ad3fdc609 100644 --- a/Mage.Sets/src/mage/cards/b/BullElephant.java +++ b/Mage.Sets/src/mage/cards/b/BullElephant.java @@ -1,6 +1,5 @@ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; @@ -13,9 +12,11 @@ import mage.filter.common.FilterControlledLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + public class BullElephant extends CardImpl { - private static FilterControlledLandPermanent controlledForest = new FilterControlledLandPermanent("two forests you control"); + private static FilterControlledLandPermanent controlledForest = new FilterControlledLandPermanent("Forests you control"); static { controlledForest.add(new SubtypePredicate(SubType.FOREST)); diff --git a/Mage.Sets/src/mage/cards/b/BurningPalmEfreet.java b/Mage.Sets/src/mage/cards/b/BurningPalmEfreet.java new file mode 100644 index 0000000000..1208ee6e9e --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BurningPalmEfreet.java @@ -0,0 +1,83 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.LoseAbilityTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class BurningPalmEfreet extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public BurningPalmEfreet(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + + this.subtype.add(SubType.EFREET); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {1}{R}{R}: Burning Palm Efreet deals 2 damage to target creature with flying and that creature loses flying until end of turn. + Ability ability = new SimpleActivatedAbility(new DamageTargetEffect(2), new ManaCostsImpl("{1}{R}{R}")); + ability.addEffect(new LoseAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn) + .setText("and that creature loses flying until end of turn") + ); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public BurningPalmEfreet(final BurningPalmEfreet card) { + super(card); + } + + @Override + public BurningPalmEfreet copy() { + return new BurningPalmEfreet(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BurningSunsAvatar.java b/Mage.Sets/src/mage/cards/b/BurningSunsAvatar.java new file mode 100644 index 0000000000..22576a7ce3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BurningSunsAvatar.java @@ -0,0 +1,74 @@ +/* + * 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.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetOpponent; + +/** + * + * @author TheElk801 + */ +public class BurningSunsAvatar extends CardImpl { + + public BurningSunsAvatar(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}{R}"); + + this.subtype.add(SubType.DINOSAUR); + this.subtype.add(SubType.AVATAR); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // When Burning Sun's Avatar enters the battlefield, it deals 3 damage to target opponent and 3 damage to up to one target creature. + Effect effect = new DamageTargetEffect(3); + effect.setText("it deals 3 damage to target opponent and 3 damage to up to one target creature"); + Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); + ability.addTarget(new TargetOpponent()); + ability.addTarget(new TargetCreaturePermanent(0, 1)); + this.addAbility(ability); + } + + public BurningSunsAvatar(final BurningSunsAvatar card) { + super(card); + } + + @Override + public BurningSunsAvatar copy() { + return new BurningSunsAvatar(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/C3POAndR2D2.java b/Mage.Sets/src/mage/cards/c/C3POAndR2D2.java index 77f2c1eee7..58e3132533 100644 --- a/Mage.Sets/src/mage/cards/c/C3POAndR2D2.java +++ b/Mage.Sets/src/mage/cards/c/C3POAndR2D2.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.RepairAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -49,7 +50,7 @@ public class C3POAndR2D2 extends CardImpl { public C3POAndR2D2(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Droid"); + this.subtype.add(SubType.DROID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CabalArchon.java b/Mage.Sets/src/mage/cards/c/CabalArchon.java index bb745fa99e..7b1309064c 100644 --- a/Mage.Sets/src/mage/cards/c/CabalArchon.java +++ b/Mage.Sets/src/mage/cards/c/CabalArchon.java @@ -60,8 +60,8 @@ public class CabalArchon extends CardImpl { public CabalArchon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CabalConditioning.java b/Mage.Sets/src/mage/cards/c/CabalConditioning.java index bd96b2cd0f..5ac53f18b1 100644 --- a/Mage.Sets/src/mage/cards/c/CabalConditioning.java +++ b/Mage.Sets/src/mage/cards/c/CabalConditioning.java @@ -42,10 +42,12 @@ import mage.target.TargetPlayer; public class CabalConditioning extends CardImpl { public CabalConditioning(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{6}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{6}{B}"); // Any number of target players each discard a number of cards equal to the highest converted mana cost among permanents you control. - this.getSpellAbility().addEffect(new DiscardTargetEffect(new HighestConvertedManaCostValue())); + this.getSpellAbility().addEffect(new DiscardTargetEffect(new HighestConvertedManaCostValue()) + .setText("Any number of target players each discard a number of cards equal to the highest converted mana cost among permanents you control.") + ); this.getSpellAbility().addTarget(new TargetPlayer(0, Integer.MAX_VALUE, false)); } diff --git a/Mage.Sets/src/mage/cards/c/CabalExecutioner.java b/Mage.Sets/src/mage/cards/c/CabalExecutioner.java index 2dd9cbfc4f..77877b4920 100644 --- a/Mage.Sets/src/mage/cards/c/CabalExecutioner.java +++ b/Mage.Sets/src/mage/cards/c/CabalExecutioner.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.game.Game; @@ -53,8 +54,8 @@ public class CabalExecutioner extends CardImpl { public CabalExecutioner(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CabalInquisitor.java b/Mage.Sets/src/mage/cards/c/CabalInquisitor.java index d12a25ac41..43f4de72c2 100644 --- a/Mage.Sets/src/mage/cards/c/CabalInquisitor.java +++ b/Mage.Sets/src/mage/cards/c/CabalInquisitor.java @@ -52,13 +52,12 @@ import mage.target.common.TargetCardInYourGraveyard; * * @author cbt33 */ - public class CabalInquisitor extends CardImpl { public CabalInquisitor(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Minion"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MINION); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -82,11 +81,8 @@ public class CabalInquisitor extends CardImpl { } } - class ActivateAsSorceryConditionalActivatedAbility extends ActivatedAbilityImpl { - private Condition condition; - private static final Effects emptyEffects = new Effects(); public ActivateAsSorceryConditionalActivatedAbility(Zone zone, Effect effect, ManaCosts cost, Condition condition) { @@ -95,10 +91,8 @@ class ActivateAsSorceryConditionalActivatedAbility extends ActivatedAbilityImpl timing = TimingRule.SORCERY; } - public ActivateAsSorceryConditionalActivatedAbility(final ActivateAsSorceryConditionalActivatedAbility ability) { super(ability); - this.condition = ability.condition; } @Override @@ -109,14 +103,6 @@ class ActivateAsSorceryConditionalActivatedAbility extends ActivatedAbilityImpl return super.getEffects(game, effectType); } - @Override - public boolean canActivate(UUID playerId, Game game) { - if (!condition.apply(game, this)) { - return false; - } - return super.canActivate(playerId, game); - } - @Override public ActivateAsSorceryConditionalActivatedAbility copy() { return new ActivateAsSorceryConditionalActivatedAbility(this); diff --git a/Mage.Sets/src/mage/cards/c/CabalInterrogator.java b/Mage.Sets/src/mage/cards/c/CabalInterrogator.java index 114aa05859..e044a7e709 100644 --- a/Mage.Sets/src/mage/cards/c/CabalInterrogator.java +++ b/Mage.Sets/src/mage/cards/c/CabalInterrogator.java @@ -38,6 +38,7 @@ import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.OneShotEffect; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -55,8 +56,8 @@ public class CabalInterrogator extends CardImpl { public CabalInterrogator(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CabalPatriarch.java b/Mage.Sets/src/mage/cards/c/CabalPatriarch.java index 017d4d46ac..2394359f5a 100644 --- a/Mage.Sets/src/mage/cards/c/CabalPatriarch.java +++ b/Mage.Sets/src/mage/cards/c/CabalPatriarch.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -56,8 +57,8 @@ public class CabalPatriarch extends CardImpl { public CabalPatriarch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CabalSlaver.java b/Mage.Sets/src/mage/cards/c/CabalSlaver.java index eaf660253c..3cbe12b1e6 100644 --- a/Mage.Sets/src/mage/cards/c/CabalSlaver.java +++ b/Mage.Sets/src/mage/cards/c/CabalSlaver.java @@ -53,8 +53,8 @@ public class CabalSlaver extends CardImpl { public CabalSlaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CabalSurgeon.java b/Mage.Sets/src/mage/cards/c/CabalSurgeon.java index cbc8265fb7..48413cde79 100644 --- a/Mage.Sets/src/mage/cards/c/CabalSurgeon.java +++ b/Mage.Sets/src/mage/cards/c/CabalSurgeon.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.common.FilterCreatureCard; @@ -53,8 +54,8 @@ public class CabalSurgeon extends CardImpl { public CabalSurgeon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Minion"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MINION); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CabalTorturer.java b/Mage.Sets/src/mage/cards/c/CabalTorturer.java index cfea1c87fe..d218423819 100644 --- a/Mage.Sets/src/mage/cards/c/CabalTorturer.java +++ b/Mage.Sets/src/mage/cards/c/CabalTorturer.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -52,8 +53,8 @@ public class CabalTorturer extends CardImpl { public CabalTorturer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Minion"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MINION); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CabalTrainee.java b/Mage.Sets/src/mage/cards/c/CabalTrainee.java index d9d623be5f..15c8c845a2 100644 --- a/Mage.Sets/src/mage/cards/c/CabalTrainee.java +++ b/Mage.Sets/src/mage/cards/c/CabalTrainee.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class CabalTrainee extends CardImpl { public CabalTrainee(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Human"); - this.subtype.add("Minion"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MINION); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CacheRaiders.java b/Mage.Sets/src/mage/cards/c/CacheRaiders.java index 75c148930f..4c5e0e6eee 100644 --- a/Mage.Sets/src/mage/cards/c/CacheRaiders.java +++ b/Mage.Sets/src/mage/cards/c/CacheRaiders.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterControlledPermanent; @@ -45,8 +46,8 @@ public class CacheRaiders extends CardImpl { public CacheRaiders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CacklingCounterpart.java b/Mage.Sets/src/mage/cards/c/CacklingCounterpart.java index 22c7c059e9..1db428edc3 100644 --- a/Mage.Sets/src/mage/cards/c/CacklingCounterpart.java +++ b/Mage.Sets/src/mage/cards/c/CacklingCounterpart.java @@ -29,7 +29,7 @@ package mage.cards.c; import java.util.UUID; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.keyword.FlashbackAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -46,7 +46,7 @@ public class CacklingCounterpart extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}{U}"); // Create a token that's a copy of target creature you control. - this.getSpellAbility().addEffect(new PutTokenOntoBattlefieldCopyTargetEffect()); + this.getSpellAbility().addEffect(new CreateTokenCopyTargetEffect()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); // Flashback {5}{U}{U} diff --git a/Mage.Sets/src/mage/cards/c/CacklingFiend.java b/Mage.Sets/src/mage/cards/c/CacklingFiend.java index 7d18409cb1..901d37bc2c 100644 --- a/Mage.Sets/src/mage/cards/c/CacklingFiend.java +++ b/Mage.Sets/src/mage/cards/c/CacklingFiend.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -45,7 +46,7 @@ public class CacklingFiend extends CardImpl { public CacklingFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CacklingImp.java b/Mage.Sets/src/mage/cards/c/CacklingImp.java index 4fb4e13753..f7089a7183 100644 --- a/Mage.Sets/src/mage/cards/c/CacklingImp.java +++ b/Mage.Sets/src/mage/cards/c/CacklingImp.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -48,7 +49,7 @@ public class CacklingImp extends CardImpl { public CacklingImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CacklingWitch.java b/Mage.Sets/src/mage/cards/c/CacklingWitch.java index 3bbfd8e1be..bf097b383e 100644 --- a/Mage.Sets/src/mage/cards/c/CacklingWitch.java +++ b/Mage.Sets/src/mage/cards/c/CacklingWitch.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -52,8 +53,8 @@ public class CacklingWitch extends CardImpl { public CacklingWitch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CadaverImp.java b/Mage.Sets/src/mage/cards/c/CadaverImp.java index c378bbd996..6e03cd8b45 100644 --- a/Mage.Sets/src/mage/cards/c/CadaverImp.java +++ b/Mage.Sets/src/mage/cards/c/CadaverImp.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; @@ -47,7 +48,7 @@ public class CadaverImp extends CardImpl { public CadaverImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CadaverousKnight.java b/Mage.Sets/src/mage/cards/c/CadaverousKnight.java index ef06af726e..d3587248cb 100644 --- a/Mage.Sets/src/mage/cards/c/CadaverousKnight.java +++ b/Mage.Sets/src/mage/cards/c/CadaverousKnight.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlankingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class CadaverousKnight extends CardImpl { public CadaverousKnight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CageOfHands.java b/Mage.Sets/src/mage/cards/c/CageOfHands.java index 4475469b10..082fc369a6 100644 --- a/Mage.Sets/src/mage/cards/c/CageOfHands.java +++ b/Mage.Sets/src/mage/cards/c/CageOfHands.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class CageOfHands extends CardImpl { public CageOfHands (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/c/Cagemail.java b/Mage.Sets/src/mage/cards/c/Cagemail.java index b0a0d4de9c..01c75c71ab 100644 --- a/Mage.Sets/src/mage/cards/c/Cagemail.java +++ b/Mage.Sets/src/mage/cards/c/Cagemail.java @@ -50,7 +50,7 @@ public class Cagemail extends CardImpl { public Cagemail(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CairnWanderer.java b/Mage.Sets/src/mage/cards/c/CairnWanderer.java index bb1319c547..29d0341e58 100644 --- a/Mage.Sets/src/mage/cards/c/CairnWanderer.java +++ b/Mage.Sets/src/mage/cards/c/CairnWanderer.java @@ -51,7 +51,7 @@ public class CairnWanderer extends CardImpl { public CairnWanderer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/Calciderm.java b/Mage.Sets/src/mage/cards/c/Calciderm.java index 4864062645..4b6e0ba57e 100644 --- a/Mage.Sets/src/mage/cards/c/Calciderm.java +++ b/Mage.Sets/src/mage/cards/c/Calciderm.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.VanishingUpkeepAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -48,7 +49,7 @@ public class Calciderm extends CardImpl { public Calciderm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CalciteSnapper.java b/Mage.Sets/src/mage/cards/c/CalciteSnapper.java index 2b20e3bf43..210a7f7a2d 100644 --- a/Mage.Sets/src/mage/cards/c/CalciteSnapper.java +++ b/Mage.Sets/src/mage/cards/c/CalciteSnapper.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,7 +46,7 @@ public class CalciteSnapper extends CardImpl { public CalciteSnapper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Turtle"); + this.subtype.add(SubType.TURTLE); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CalderaHellion.java b/Mage.Sets/src/mage/cards/c/CalderaHellion.java index 73cf63081b..cd46387ab8 100644 --- a/Mage.Sets/src/mage/cards/c/CalderaHellion.java +++ b/Mage.Sets/src/mage/cards/c/CalderaHellion.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DevourAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; /** @@ -46,7 +47,7 @@ public class CalderaHellion extends CardImpl { public CalderaHellion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Hellion"); + this.subtype.add(SubType.HELLION); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CalderaKavu.java b/Mage.Sets/src/mage/cards/c/CalderaKavu.java index 9a7a023a3a..59c3c91b46 100644 --- a/Mage.Sets/src/mage/cards/c/CalderaKavu.java +++ b/Mage.Sets/src/mage/cards/c/CalderaKavu.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class CalderaKavu extends CardImpl { public CalderaKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CallForBlood.java b/Mage.Sets/src/mage/cards/c/CallForBlood.java index 77393fc26f..7036df8b8b 100644 --- a/Mage.Sets/src/mage/cards/c/CallForBlood.java +++ b/Mage.Sets/src/mage/cards/c/CallForBlood.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -52,7 +53,7 @@ public class CallForBlood extends CardImpl { public CallForBlood(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{B}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // As an additional cost to cast Call for Blood, sacrifice a creature. diff --git a/Mage.Sets/src/mage/cards/c/CallOfTheFullMoon.java b/Mage.Sets/src/mage/cards/c/CallOfTheFullMoon.java index 8d30996395..c33f8ff472 100644 --- a/Mage.Sets/src/mage/cards/c/CallOfTheFullMoon.java +++ b/Mage.Sets/src/mage/cards/c/CallOfTheFullMoon.java @@ -56,7 +56,7 @@ public class CallOfTheFullMoon extends CardImpl { public CallOfTheFullMoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CallToServe.java b/Mage.Sets/src/mage/cards/c/CallToServe.java index 5663175c8c..7b5941a8ba 100644 --- a/Mage.Sets/src/mage/cards/c/CallToServe.java +++ b/Mage.Sets/src/mage/cards/c/CallToServe.java @@ -61,7 +61,7 @@ public class CallToServe extends CardImpl { public CallToServe(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant nonblack creature TargetPermanent auraTarget = new TargetCreaturePermanent(filter); diff --git a/Mage.Sets/src/mage/cards/c/CallToTheFeast.java b/Mage.Sets/src/mage/cards/c/CallToTheFeast.java new file mode 100644 index 0000000000..9408afd4ef --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CallToTheFeast.java @@ -0,0 +1,58 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.permanent.token.IxalanVampireToken; + +/** + * + * @author TheElk801 + */ +public class CallToTheFeast extends CardImpl { + + public CallToTheFeast(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{W}{B}"); + + // Create three 1/1 white Vampire creature tokens with lifelink. + this.getSpellAbility().addEffect(new CreateTokenEffect(new IxalanVampireToken(), 3)); + } + + public CallToTheFeast(final CallToTheFeast card) { + super(card); + } + + @Override + public CallToTheFeast copy() { + return new CallToTheFeast(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CallToTheKindred.java b/Mage.Sets/src/mage/cards/c/CallToTheKindred.java index 84aefe9db6..d7e400810e 100644 --- a/Mage.Sets/src/mage/cards/c/CallToTheKindred.java +++ b/Mage.Sets/src/mage/cards/c/CallToTheKindred.java @@ -63,7 +63,7 @@ public class CallToTheKindred extends CardImpl { public CallToTheKindred(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CallerOfGales.java b/Mage.Sets/src/mage/cards/c/CallerOfGales.java index b9c1b8d72b..58283d3652 100644 --- a/Mage.Sets/src/mage/cards/c/CallerOfGales.java +++ b/Mage.Sets/src/mage/cards/c/CallerOfGales.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -51,8 +52,8 @@ public class CallerOfGales extends CardImpl { public CallerOfGales (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CallerOfTheClaw.java b/Mage.Sets/src/mage/cards/c/CallerOfTheClaw.java index 79e508c4f3..73e3c316ae 100644 --- a/Mage.Sets/src/mage/cards/c/CallerOfTheClaw.java +++ b/Mage.Sets/src/mage/cards/c/CallerOfTheClaw.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.WatcherScope; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class CallerOfTheClaw extends CardImpl { public CallerOfTheClaw(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.color.setGreen(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CallerOfTheHunt.java b/Mage.Sets/src/mage/cards/c/CallerOfTheHunt.java index 93a6072beb..1249f6b126 100644 --- a/Mage.Sets/src/mage/cards/c/CallerOfTheHunt.java +++ b/Mage.Sets/src/mage/cards/c/CallerOfTheHunt.java @@ -1,152 +1,152 @@ -/* - * 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.cards.c; - -import mage.MageObject; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.effects.ContinuousEffect; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.continuous.SetPowerSourceEffect; -import mage.abilities.effects.common.continuous.SetToughnessSourceEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.choices.Choice; -import mage.choices.ChoiceCreatureType; -import mage.constants.*; -import mage.filter.FilterPermanent; -import mage.filter.predicate.mageobject.ChosenSubtypePredicate; -import mage.game.Game; -import mage.players.Player; - -import java.util.UUID; - -/** - * - * @author jeffwadsworth - */ -public class CallerOfTheHunt extends CardImpl { - - public CallerOfTheHunt(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - - this.subtype.add("Human"); - - // As an additional cost to cast Caller of the Hunt, choose a creature type. - // Caller of the Hunt's power and toughness are each equal to the number of creatures of the chosen type on the battlefield. - this.addAbility(new SimpleStaticAbility(Zone.ALL, new CallerOfTheHuntAdditionalCostEffect())); - - } - - public CallerOfTheHunt(final CallerOfTheHunt card) { - super(card); - } - - @Override - public void adjustCosts(Ability ability, Game game) { - MageObject mageObject = game.getObject(ability.getSourceId()); - Effect effect = new ChooseCreatureTypeEffect(Outcome.Benefit); - if (mageObject != null - && effect.apply(game, ability)) { - FilterPermanent filter = new FilterPermanent(); - filter.add(new ChosenSubtypePredicate(mageObject.getId())); - ContinuousEffect effectPower = new SetPowerSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.Custom); - ContinuousEffect effectToughness = new SetToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.Custom); - game.addEffect(effectPower, ability); - game.addEffect(effectToughness, ability); - } - } - - @Override - public CallerOfTheHunt copy() { - return new CallerOfTheHunt(this); - } -} - -class CallerOfTheHuntAdditionalCostEffect extends OneShotEffect { - - public CallerOfTheHuntAdditionalCostEffect() { - super(Outcome.Benefit); - this.staticText = "As an additional cost to cast {this}, choose a creature type. \r" - + "{this}'s power and toughness are each equal to the number of creatures of the chosen type on the battlefield"; - } - - public CallerOfTheHuntAdditionalCostEffect(final CallerOfTheHuntAdditionalCostEffect effect) { - super(effect); - } - - @Override - public CallerOfTheHuntAdditionalCostEffect copy() { - return new CallerOfTheHuntAdditionalCostEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } -} - -class ChooseCreatureTypeEffect extends OneShotEffect { // code by LevelX2, but that other version is not compatible with this card - - public ChooseCreatureTypeEffect(Outcome outcome) { - super(outcome); - staticText = "choose a creature type"; - } - - public ChooseCreatureTypeEffect(final ChooseCreatureTypeEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - MageObject mageObject = game.getObject(source.getSourceId()); - if (controller != null && mageObject != null) { - Choice typeChoice = new ChoiceCreatureType(); - while (!controller.choose(outcome, typeChoice, game)) { - if (!controller.canRespond()) { - return false; - } - } - if (!game.isSimulation()) { - game.informPlayers(mageObject.getName() + ": " + controller.getLogName() + " has chosen " + typeChoice.getChoice()); - } - game.getState().setValue(mageObject.getId() + "_type", SubType.byDescription(typeChoice.getChoice())); - return true; - } - return false; - } - - @Override - public ChooseCreatureTypeEffect copy() { - return new ChooseCreatureTypeEffect(this); - } - -} +/* + * 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.cards.c; + +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.SetPowerSourceEffect; +import mage.abilities.effects.common.continuous.SetToughnessSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.choices.Choice; +import mage.choices.ChoiceCreatureType; +import mage.constants.*; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.ChosenSubtypePredicate; +import mage.game.Game; +import mage.players.Player; + +import java.util.UUID; + +/** + * + * @author jeffwadsworth + */ +public class CallerOfTheHunt extends CardImpl { + + public CallerOfTheHunt(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.HUMAN); + + // As an additional cost to cast Caller of the Hunt, choose a creature type. + // Caller of the Hunt's power and toughness are each equal to the number of creatures of the chosen type on the battlefield. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new CallerOfTheHuntAdditionalCostEffect())); + + } + + public CallerOfTheHunt(final CallerOfTheHunt card) { + super(card); + } + + @Override + public void adjustCosts(Ability ability, Game game) { + MageObject mageObject = game.getObject(ability.getSourceId()); + Effect effect = new ChooseCreatureTypeEffect(Outcome.Benefit); + if (mageObject != null + && effect.apply(game, ability)) { + FilterPermanent filter = new FilterPermanent(); + filter.add(new ChosenSubtypePredicate(mageObject.getId())); + ContinuousEffect effectPower = new SetPowerSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.Custom); + ContinuousEffect effectToughness = new SetToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.Custom); + game.addEffect(effectPower, ability); + game.addEffect(effectToughness, ability); + } + } + + @Override + public CallerOfTheHunt copy() { + return new CallerOfTheHunt(this); + } +} + +class CallerOfTheHuntAdditionalCostEffect extends OneShotEffect { + + public CallerOfTheHuntAdditionalCostEffect() { + super(Outcome.Benefit); + this.staticText = "As an additional cost to cast {this}, choose a creature type. \r" + + "{this}'s power and toughness are each equal to the number of creatures of the chosen type on the battlefield"; + } + + public CallerOfTheHuntAdditionalCostEffect(final CallerOfTheHuntAdditionalCostEffect effect) { + super(effect); + } + + @Override + public CallerOfTheHuntAdditionalCostEffect copy() { + return new CallerOfTheHuntAdditionalCostEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } +} + +class ChooseCreatureTypeEffect extends OneShotEffect { // code by LevelX2, but that other version is not compatible with this card + + public ChooseCreatureTypeEffect(Outcome outcome) { + super(outcome); + staticText = "choose a creature type"; + } + + public ChooseCreatureTypeEffect(final ChooseCreatureTypeEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject mageObject = game.getObject(source.getSourceId()); + if (controller != null && mageObject != null) { + Choice typeChoice = new ChoiceCreatureType(); + while (!controller.choose(outcome, typeChoice, game)) { + if (!controller.canRespond()) { + return false; + } + } + if (!game.isSimulation()) { + game.informPlayers(mageObject.getName() + ": " + controller.getLogName() + " has chosen " + typeChoice.getChoice()); + } + game.getState().setValue(mageObject.getId() + "_type", SubType.byDescription(typeChoice.getChoice())); + return true; + } + return false; + } + + @Override + public ChooseCreatureTypeEffect copy() { + return new ChooseCreatureTypeEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/c/CallerOfThePack.java b/Mage.Sets/src/mage/cards/c/CallerOfThePack.java index a3da11668f..6875bed2fc 100644 --- a/Mage.Sets/src/mage/cards/c/CallerOfThePack.java +++ b/Mage.Sets/src/mage/cards/c/CallerOfThePack.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class CallerOfThePack extends CardImpl { public CallerOfThePack(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(8); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/c/CallousDeceiver.java b/Mage.Sets/src/mage/cards/c/CallousDeceiver.java index c0dcb00da1..03c905e245 100644 --- a/Mage.Sets/src/mage/cards/c/CallousDeceiver.java +++ b/Mage.Sets/src/mage/cards/c/CallousDeceiver.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,8 +56,8 @@ import mage.players.Player; public class CallousDeceiver extends CardImpl { public CallousDeceiver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Spirit"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CallousGiant.java b/Mage.Sets/src/mage/cards/c/CallousGiant.java index 0ef2c5e916..ddf68298ba 100644 --- a/Mage.Sets/src/mage/cards/c/CallousGiant.java +++ b/Mage.Sets/src/mage/cards/c/CallousGiant.java @@ -35,6 +35,7 @@ import mage.abilities.effects.PreventionEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -49,7 +50,7 @@ public class CallousGiant extends CardImpl { public CallousGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CallowJushi.java b/Mage.Sets/src/mage/cards/c/CallowJushi.java index cf1edaddb1..c8d12f69c9 100644 --- a/Mage.Sets/src/mage/cards/c/CallowJushi.java +++ b/Mage.Sets/src/mage/cards/c/CallowJushi.java @@ -43,6 +43,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.counters.CounterType; @@ -59,8 +60,8 @@ public class CallowJushi extends CardImpl { public CallowJushi(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -94,7 +95,7 @@ class JarakuTheInterloper extends Token { addSuperType(SuperType.LEGENDARY); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); power = new MageInt(3); toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CalmingLicid.java b/Mage.Sets/src/mage/cards/c/CalmingLicid.java index b96dc10b9d..5a281528f4 100644 --- a/Mage.Sets/src/mage/cards/c/CalmingLicid.java +++ b/Mage.Sets/src/mage/cards/c/CalmingLicid.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class CalmingLicid extends CardImpl { public CalmingLicid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Licid"); + this.subtype.add(SubType.LICID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CanalCourier.java b/Mage.Sets/src/mage/cards/c/CanalCourier.java index f4f9b982ee..4b064ba91e 100644 --- a/Mage.Sets/src/mage/cards/c/CanalCourier.java +++ b/Mage.Sets/src/mage/cards/c/CanalCourier.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -54,8 +55,8 @@ public class CanalCourier extends CardImpl { public CanalCourier(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CandelabraOfTawnos.java b/Mage.Sets/src/mage/cards/c/CandelabraOfTawnos.java index a203852f83..4cbab1c4fc 100644 --- a/Mage.Sets/src/mage/cards/c/CandelabraOfTawnos.java +++ b/Mage.Sets/src/mage/cards/c/CandelabraOfTawnos.java @@ -37,10 +37,10 @@ import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.TargetAdjustment; import mage.constants.Zone; -import mage.filter.common.FilterLandPermanent; -import mage.game.Game; -import mage.target.common.TargetLandPermanent; +import mage.filter.StaticFilters; +import mage.target.TargetPermanent; /** * @@ -48,32 +48,21 @@ import mage.target.common.TargetLandPermanent; */ public class CandelabraOfTawnos extends CardImpl { - private final UUID originalId; - public CandelabraOfTawnos(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); // {X}, {T}: Untap X target lands. Effect effect = new UntapTargetEffect(); effect.setText("untap X target lands"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}")); ability.addCost(new TapSourceCost()); - originalId = ability.getOriginalId(); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_LANDS)); + ability.setTargetAdjustment(TargetAdjustment.X_TARGETS); this.addAbility(ability); } - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(originalId)){ - int xValue = ability.getManaCostsToPay().getX(); - ability.getTargets().clear(); - ability.addTarget(new TargetLandPermanent(xValue, xValue, new FilterLandPermanent(), false)); - } - } - public CandelabraOfTawnos(final CandelabraOfTawnos card) { super(card); - this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/cards/c/CankerAbomination.java b/Mage.Sets/src/mage/cards/c/CankerAbomination.java index 4072076f37..f70a36552c 100644 --- a/Mage.Sets/src/mage/cards/c/CankerAbomination.java +++ b/Mage.Sets/src/mage/cards/c/CankerAbomination.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.filter.StaticFilters; @@ -53,8 +54,8 @@ public class CankerAbomination extends CardImpl { public CankerAbomination(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B/G}{B/G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Horror"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.HORROR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/c/CanopyCover.java b/Mage.Sets/src/mage/cards/c/CanopyCover.java index f4aa1faa78..2af226423b 100644 --- a/Mage.Sets/src/mage/cards/c/CanopyCover.java +++ b/Mage.Sets/src/mage/cards/c/CanopyCover.java @@ -55,7 +55,7 @@ public class CanopyCover extends CardImpl { public CanopyCover(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CanopyCrawler.java b/Mage.Sets/src/mage/cards/c/CanopyCrawler.java index cccb67840b..0705e10d6b 100644 --- a/Mage.Sets/src/mage/cards/c/CanopyCrawler.java +++ b/Mage.Sets/src/mage/cards/c/CanopyCrawler.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.AmplifyAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -52,7 +53,7 @@ public class CanopyCrawler extends CardImpl { public CanopyCrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CanopyDragon.java b/Mage.Sets/src/mage/cards/c/CanopyDragon.java index 9123af929b..5b72046482 100644 --- a/Mage.Sets/src/mage/cards/c/CanopyDragon.java +++ b/Mage.Sets/src/mage/cards/c/CanopyDragon.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class CanopyDragon extends CardImpl { public CanopyDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CanopyGorger.java b/Mage.Sets/src/mage/cards/c/CanopyGorger.java index 5142a005e2..043a88d5ef 100644 --- a/Mage.Sets/src/mage/cards/c/CanopyGorger.java +++ b/Mage.Sets/src/mage/cards/c/CanopyGorger.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class CanopyGorger extends CardImpl { public CanopyGorger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(6); this.toughness = new MageInt(5); } diff --git a/Mage.Sets/src/mage/cards/c/CanopySpider.java b/Mage.Sets/src/mage/cards/c/CanopySpider.java index 4250b8d0bc..fdf5935a52 100644 --- a/Mage.Sets/src/mage/cards/c/CanopySpider.java +++ b/Mage.Sets/src/mage/cards/c/CanopySpider.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class CanopySpider extends CardImpl { public CanopySpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CanopyVista.java b/Mage.Sets/src/mage/cards/c/CanopyVista.java index 77647caaa7..cf404b51cb 100644 --- a/Mage.Sets/src/mage/cards/c/CanopyVista.java +++ b/Mage.Sets/src/mage/cards/c/CanopyVista.java @@ -39,6 +39,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.SuperType; import mage.filter.common.FilterLandPermanent; @@ -57,8 +58,8 @@ public class CanopyVista extends CardImpl { public CanopyVista(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Forest"); - this.subtype.add("Plains"); + this.subtype.add(SubType.FOREST); + this.subtype.add(SubType.PLAINS); // Canopy Vista enters the battlefield tapped unless you control two or more basic lands. Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1)); diff --git a/Mage.Sets/src/mage/cards/c/CantinaBand.java b/Mage.Sets/src/mage/cards/c/CantinaBand.java index e79c01964f..a032732c33 100644 --- a/Mage.Sets/src/mage/cards/c/CantinaBand.java +++ b/Mage.Sets/src/mage/cards/c/CantinaBand.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -57,7 +58,7 @@ public class CantinaBand extends CardImpl { public CantinaBand(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); - this.subtype.add("Bith"); + this.subtype.add(SubType.BITH); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/Cantivore.java b/Mage.Sets/src/mage/cards/c/Cantivore.java index 937b878d84..d0e84ac5e5 100644 --- a/Mage.Sets/src/mage/cards/c/Cantivore.java +++ b/Mage.Sets/src/mage/cards/c/Cantivore.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterCard; @@ -56,7 +57,7 @@ public class Cantivore extends CardImpl { public Cantivore(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Lhurgoyf"); + this.subtype.add(SubType.LHURGOYF); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/c/CanyonDrake.java b/Mage.Sets/src/mage/cards/c/CanyonDrake.java index 220cff3a9d..9b193d9eaf 100644 --- a/Mage.Sets/src/mage/cards/c/CanyonDrake.java +++ b/Mage.Sets/src/mage/cards/c/CanyonDrake.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class CanyonDrake extends CardImpl { public CanyonDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CanyonLurkers.java b/Mage.Sets/src/mage/cards/c/CanyonLurkers.java index d7159a0a3f..c6bf3eaced 100644 --- a/Mage.Sets/src/mage/cards/c/CanyonLurkers.java +++ b/Mage.Sets/src/mage/cards/c/CanyonLurkers.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class CanyonLurkers extends CardImpl { public CanyonLurkers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(5); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CanyonMinotaur.java b/Mage.Sets/src/mage/cards/c/CanyonMinotaur.java index e50ddf33c7..c9e302841c 100644 --- a/Mage.Sets/src/mage/cards/c/CanyonMinotaur.java +++ b/Mage.Sets/src/mage/cards/c/CanyonMinotaur.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** @@ -44,8 +45,8 @@ public class CanyonMinotaur extends CardImpl { public CanyonMinotaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); } diff --git a/Mage.Sets/src/mage/cards/c/CanyonSlough.java b/Mage.Sets/src/mage/cards/c/CanyonSlough.java index 51fb70a2bc..01b8a4fafd 100644 --- a/Mage.Sets/src/mage/cards/c/CanyonSlough.java +++ b/Mage.Sets/src/mage/cards/c/CanyonSlough.java @@ -36,6 +36,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class CanyonSlough extends CardImpl { public CanyonSlough(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Swamp"); - this.subtype.add("Mountain"); + this.subtype.add(SubType.SWAMP); + this.subtype.add(SubType.MOUNTAIN); // ({T}: Add {B} or {R} to your mana pool.) this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/cards/c/CanyonWildcat.java b/Mage.Sets/src/mage/cards/c/CanyonWildcat.java index 0c55e639d4..cfd6cfd963 100644 --- a/Mage.Sets/src/mage/cards/c/CanyonWildcat.java +++ b/Mage.Sets/src/mage/cards/c/CanyonWildcat.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class CanyonWildcat extends CardImpl { public CanyonWildcat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CaoCaoLordOfWei.java b/Mage.Sets/src/mage/cards/c/CaoCaoLordOfWei.java index 40c0d271d6..963a94e8e6 100644 --- a/Mage.Sets/src/mage/cards/c/CaoCaoLordOfWei.java +++ b/Mage.Sets/src/mage/cards/c/CaoCaoLordOfWei.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.target.common.TargetOpponent; @@ -50,8 +51,8 @@ public class CaoCaoLordOfWei extends CardImpl { public CaoCaoLordOfWei(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CaoRenWeiCommander.java b/Mage.Sets/src/mage/cards/c/CaoRenWeiCommander.java index 334c5851b5..51735c9e71 100644 --- a/Mage.Sets/src/mage/cards/c/CaoRenWeiCommander.java +++ b/Mage.Sets/src/mage/cards/c/CaoRenWeiCommander.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -46,9 +47,9 @@ public class CaoRenWeiCommander extends CardImpl { public CaoRenWeiCommander(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CapashenKnight.java b/Mage.Sets/src/mage/cards/c/CapashenKnight.java index 3a7c042406..4a76dad183 100644 --- a/Mage.Sets/src/mage/cards/c/CapashenKnight.java +++ b/Mage.Sets/src/mage/cards/c/CapashenKnight.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class CapashenKnight extends CardImpl { public CapashenKnight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CapashenStandard.java b/Mage.Sets/src/mage/cards/c/CapashenStandard.java index 1630cebc81..1f6ac6206b 100644 --- a/Mage.Sets/src/mage/cards/c/CapashenStandard.java +++ b/Mage.Sets/src/mage/cards/c/CapashenStandard.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class CapashenStandard extends CardImpl { public CapashenStandard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CapashenTemplar.java b/Mage.Sets/src/mage/cards/c/CapashenTemplar.java index 84e8690a29..acd2c0d283 100644 --- a/Mage.Sets/src/mage/cards/c/CapashenTemplar.java +++ b/Mage.Sets/src/mage/cards/c/CapashenTemplar.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,8 +47,8 @@ public class CapashenTemplar extends CardImpl { public CapashenTemplar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CapashenUnicorn.java b/Mage.Sets/src/mage/cards/c/CapashenUnicorn.java index 7af92028e8..09a36f7d36 100644 --- a/Mage.Sets/src/mage/cards/c/CapashenUnicorn.java +++ b/Mage.Sets/src/mage/cards/c/CapashenUnicorn.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class CapashenUnicorn extends CardImpl { public CapashenUnicorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Unicorn"); + this.subtype.add(SubType.UNICORN); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CapriciousEfreet.java b/Mage.Sets/src/mage/cards/c/CapriciousEfreet.java index 3e271eb297..d8bc117292 100644 --- a/Mage.Sets/src/mage/cards/c/CapriciousEfreet.java +++ b/Mage.Sets/src/mage/cards/c/CapriciousEfreet.java @@ -34,6 +34,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.filter.common.FilterNonlandPermanent; @@ -63,7 +64,7 @@ public class CapriciousEfreet extends CardImpl { public CapriciousEfreet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Efreet"); + this.subtype.add(SubType.EFREET); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CapriciousSorcerer.java b/Mage.Sets/src/mage/cards/c/CapriciousSorcerer.java index b1836bbb71..a6015743b3 100644 --- a/Mage.Sets/src/mage/cards/c/CapriciousSorcerer.java +++ b/Mage.Sets/src/mage/cards/c/CapriciousSorcerer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class CapriciousSorcerer extends CardImpl { public CapriciousSorcerer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CaptainLanneryStorm.java b/Mage.Sets/src/mage/cards/c/CaptainLanneryStorm.java new file mode 100644 index 0000000000..71284beb9c --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CaptainLanneryStorm.java @@ -0,0 +1,89 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.SacrificePermanentTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.permanent.token.TreasureToken; + +/** + * + * @author TheElk801 + */ +public class CaptainLanneryStorm extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("a Treasure"); + + static { + filter.add(new SubtypePredicate(SubType.TREASURE)); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public CaptainLanneryStorm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // Whenever Captain lannery Storm attacks, create a colorless Treasure artifact token with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool." + this.addAbility(new AttacksTriggeredAbility(new CreateTokenEffect(new TreasureToken()), false)); + + // Whenever you sacrifice a Treasure, Captain Lannery Storm gets +1/+0 until end of turn. + this.addAbility(new SacrificePermanentTriggeredAbility(new BoostSourceEffect(1, 0, Duration.EndOfTurn), filter)); + } + + public CaptainLanneryStorm(final CaptainLanneryStorm card) { + super(card); + } + + @Override + public CaptainLanneryStorm copy() { + return new CaptainLanneryStorm(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CaptainOfTheMists.java b/Mage.Sets/src/mage/cards/c/CaptainOfTheMists.java index 79c07e6588..7cd7fce103 100644 --- a/Mage.Sets/src/mage/cards/c/CaptainOfTheMists.java +++ b/Mage.Sets/src/mage/cards/c/CaptainOfTheMists.java @@ -63,8 +63,8 @@ public class CaptainOfTheMists extends CardImpl { public CaptainOfTheMists(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CaptainOfTheWatch.java b/Mage.Sets/src/mage/cards/c/CaptainOfTheWatch.java index dd46d932eb..54c07f55a4 100644 --- a/Mage.Sets/src/mage/cards/c/CaptainOfTheWatch.java +++ b/Mage.Sets/src/mage/cards/c/CaptainOfTheWatch.java @@ -59,8 +59,8 @@ public class CaptainOfTheWatch extends CardImpl { public CaptainOfTheWatch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CaptainSisay.java b/Mage.Sets/src/mage/cards/c/CaptainSisay.java index bbc3f9f78b..d8bb9ccdff 100644 --- a/Mage.Sets/src/mage/cards/c/CaptainSisay.java +++ b/Mage.Sets/src/mage/cards/c/CaptainSisay.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterCard; @@ -56,8 +57,8 @@ public class CaptainSisay extends CardImpl { public CaptainSisay(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CaptainsClaws.java b/Mage.Sets/src/mage/cards/c/CaptainsClaws.java index 5508225a3b..aa4241bc1b 100644 --- a/Mage.Sets/src/mage/cards/c/CaptainsClaws.java +++ b/Mage.Sets/src/mage/cards/c/CaptainsClaws.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.permanent.token.KorAllyToken; @@ -49,7 +50,7 @@ public class CaptainsClaws extends CardImpl { public CaptainsClaws(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 0))); diff --git a/Mage.Sets/src/mage/cards/c/CaptivatingCrew.java b/Mage.Sets/src/mage/cards/c/CaptivatingCrew.java new file mode 100644 index 0000000000..ae87461a4f --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CaptivatingCrew.java @@ -0,0 +1,91 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class CaptivatingCrew extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public CaptivatingCrew(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // {3}{R}: Gain control of target creature an opponent controls until end of turn. Untap that creature. It gains haste until end of turn. Activate this ability only any time you could cast a sorcery. + Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new GainControlTargetEffect(Duration.EndOfTurn, true), new ManaCostsImpl("{3}{R}")); + Effect effect = new UntapTargetEffect(); + effect.setText("Untap that creature"); + ability.addEffect(effect); + effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn); + effect.setText("It gains haste until end of turn"); + ability.addEffect(effect); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public CaptivatingCrew(final CaptivatingCrew card) { + super(card); + } + + @Override + public CaptivatingCrew copy() { + return new CaptivatingCrew(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CaptivatingGlance.java b/Mage.Sets/src/mage/cards/c/CaptivatingGlance.java index abefb83018..a05fdd7fdf 100644 --- a/Mage.Sets/src/mage/cards/c/CaptivatingGlance.java +++ b/Mage.Sets/src/mage/cards/c/CaptivatingGlance.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.game.Game; @@ -57,7 +58,7 @@ public class CaptivatingGlance extends CardImpl { public CaptivatingGlance(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CaptivatingVampire.java b/Mage.Sets/src/mage/cards/c/CaptivatingVampire.java index c7c083eedc..fa95df4051 100644 --- a/Mage.Sets/src/mage/cards/c/CaptivatingVampire.java +++ b/Mage.Sets/src/mage/cards/c/CaptivatingVampire.java @@ -66,7 +66,7 @@ public class CaptivatingVampire extends CardImpl { public CaptivatingVampire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -119,7 +119,7 @@ class CaptivatingVampireEffect extends ContinuousEffectImpl { case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { if (!permanent.hasSubtype(SubType.VAMPIRE, game)) { - permanent.getSubtype(game).add("Vampire"); + permanent.getSubtype(game).add(SubType.VAMPIRE); } } break; diff --git a/Mage.Sets/src/mage/cards/c/CapturedByTheConsulate.java b/Mage.Sets/src/mage/cards/c/CapturedByTheConsulate.java index a4704f9a75..302dc5bf42 100644 --- a/Mage.Sets/src/mage/cards/c/CapturedByTheConsulate.java +++ b/Mage.Sets/src/mage/cards/c/CapturedByTheConsulate.java @@ -67,7 +67,7 @@ public class CapturedByTheConsulate extends CardImpl { public CapturedByTheConsulate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature you don't control TargetPermanent auraTarget = new TargetCreaturePermanent(filter); diff --git a/Mage.Sets/src/mage/cards/c/Carapace.java b/Mage.Sets/src/mage/cards/c/Carapace.java index efe1db0b8d..cd8fd5609a 100644 --- a/Mage.Sets/src/mage/cards/c/Carapace.java +++ b/Mage.Sets/src/mage/cards/c/Carapace.java @@ -51,7 +51,7 @@ public class Carapace extends CardImpl { public Carapace(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CarapaceForger.java b/Mage.Sets/src/mage/cards/c/CarapaceForger.java index 84deab3b77..7c9d135b86 100644 --- a/Mage.Sets/src/mage/cards/c/CarapaceForger.java +++ b/Mage.Sets/src/mage/cards/c/CarapaceForger.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class CarapaceForger extends CardImpl { public CarapaceForger (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CaravanEscort.java b/Mage.Sets/src/mage/cards/c/CaravanEscort.java index c898e90266..1ee6fec3e8 100644 --- a/Mage.Sets/src/mage/cards/c/CaravanEscort.java +++ b/Mage.Sets/src/mage/cards/c/CaravanEscort.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.LevelerCardBuilder; import mage.cards.CardSetInfo; import mage.cards.LevelerCard; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,8 +48,8 @@ public class CaravanEscort extends LevelerCard { public CaravanEscort(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.color.setWhite(true); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CaravanHurda.java b/Mage.Sets/src/mage/cards/c/CaravanHurda.java index 718429c779..5892cc4cb0 100644 --- a/Mage.Sets/src/mage/cards/c/CaravanHurda.java +++ b/Mage.Sets/src/mage/cards/c/CaravanHurda.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class CaravanHurda extends CardImpl { public CaravanHurda (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CarboniteChamber.java b/Mage.Sets/src/mage/cards/c/CarboniteChamber.java index eb0422c073..e130344797 100644 --- a/Mage.Sets/src/mage/cards/c/CarboniteChamber.java +++ b/Mage.Sets/src/mage/cards/c/CarboniteChamber.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -53,7 +54,7 @@ public class CarboniteChamber extends CardImpl { public CarboniteChamber(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/Caregiver.java b/Mage.Sets/src/mage/cards/c/Caregiver.java index be019ff329..0d14b5be97 100644 --- a/Mage.Sets/src/mage/cards/c/Caregiver.java +++ b/Mage.Sets/src/mage/cards/c/Caregiver.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class Caregiver extends CardImpl { public Caregiver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CaribouRange.java b/Mage.Sets/src/mage/cards/c/CaribouRange.java index 3e6684f4da..6f02cee6ab 100644 --- a/Mage.Sets/src/mage/cards/c/CaribouRange.java +++ b/Mage.Sets/src/mage/cards/c/CaribouRange.java @@ -66,7 +66,7 @@ public class CaribouRange extends CardImpl { public CaribouRange(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land you control TargetPermanent auraTarget = new TargetPermanent(new FilterControlledLandPermanent()); diff --git a/Mage.Sets/src/mage/cards/c/CarnageGladiator.java b/Mage.Sets/src/mage/cards/c/CarnageGladiator.java index 95b1d37507..a6cb836388 100644 --- a/Mage.Sets/src/mage/cards/c/CarnageGladiator.java +++ b/Mage.Sets/src/mage/cards/c/CarnageGladiator.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -51,8 +52,8 @@ public class CarnageGladiator extends CardImpl { public CarnageGladiator (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{R}"); - this.subtype.add("Skeleton"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.SKELETON); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CarnageTyrant.java b/Mage.Sets/src/mage/cards/c/CarnageTyrant.java new file mode 100644 index 0000000000..65769dbb24 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CarnageTyrant.java @@ -0,0 +1,72 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CantBeCounteredAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.keyword.HexproofAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author TheElk801 + */ +public class CarnageTyrant extends CardImpl { + + public CarnageTyrant(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(7); + this.toughness = new MageInt(6); + + // Carnage Tyrant can't be countered. + this.addAbility(new CantBeCounteredAbility()); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Hexproof + this.addAbility(HexproofAbility.getInstance()); + + } + + public CarnageTyrant(final CarnageTyrant card) { + super(card); + } + + @Override + public CarnageTyrant copy() { + return new CarnageTyrant(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CarnageWurm.java b/Mage.Sets/src/mage/cards/c/CarnageWurm.java index 12e57d1f61..033a8c5f9c 100644 --- a/Mage.Sets/src/mage/cards/c/CarnageWurm.java +++ b/Mage.Sets/src/mage/cards/c/CarnageWurm.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class CarnageWurm extends CardImpl { public CarnageWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/c/Carnassid.java b/Mage.Sets/src/mage/cards/c/Carnassid.java index e15e578592..ac8fae9961 100644 --- a/Mage.Sets/src/mage/cards/c/Carnassid.java +++ b/Mage.Sets/src/mage/cards/c/Carnassid.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class Carnassid extends CardImpl { public Carnassid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CarnifexDemon.java b/Mage.Sets/src/mage/cards/c/CarnifexDemon.java index cc2d6134e0..ed40d38241 100644 --- a/Mage.Sets/src/mage/cards/c/CarnifexDemon.java +++ b/Mage.Sets/src/mage/cards/c/CarnifexDemon.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -55,7 +56,7 @@ public class CarnifexDemon extends CardImpl { public CarnifexDemon (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/c/CarnivalHellsteed.java b/Mage.Sets/src/mage/cards/c/CarnivalHellsteed.java index 738923ade1..be7a3edde4 100644 --- a/Mage.Sets/src/mage/cards/c/CarnivalHellsteed.java +++ b/Mage.Sets/src/mage/cards/c/CarnivalHellsteed.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.UnleashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class CarnivalHellsteed extends CardImpl { public CarnivalHellsteed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{R}"); - this.subtype.add("Nightmare"); - this.subtype.add("Horse"); + this.subtype.add(SubType.NIGHTMARE); + this.subtype.add(SubType.HORSE); diff --git a/Mage.Sets/src/mage/cards/c/CarnivorousMossBeast.java b/Mage.Sets/src/mage/cards/c/CarnivorousMossBeast.java index ad41bda097..b67dbb3a77 100644 --- a/Mage.Sets/src/mage/cards/c/CarnivorousMossBeast.java +++ b/Mage.Sets/src/mage/cards/c/CarnivorousMossBeast.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -46,9 +47,9 @@ public class CarnivorousMossBeast extends CardImpl { public CarnivorousMossBeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Elemental"); - this.subtype.add("Beast"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CarnivorousPlant.java b/Mage.Sets/src/mage/cards/c/CarnivorousPlant.java index a66cbb2010..5f136ba96e 100644 --- a/Mage.Sets/src/mage/cards/c/CarnivorousPlant.java +++ b/Mage.Sets/src/mage/cards/c/CarnivorousPlant.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class CarnivorousPlant extends CardImpl { public CarnivorousPlant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Wall"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.WALL); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/Carnophage.java b/Mage.Sets/src/mage/cards/c/Carnophage.java index b5cc8148b6..f0c38a2b08 100644 --- a/Mage.Sets/src/mage/cards/c/Carnophage.java +++ b/Mage.Sets/src/mage/cards/c/Carnophage.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.TapSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -45,7 +46,7 @@ public class Carnophage extends CardImpl { public Carnophage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CarpetOfFlowers.java b/Mage.Sets/src/mage/cards/c/CarpetOfFlowers.java index d320f00f06..ac2aa41969 100644 --- a/Mage.Sets/src/mage/cards/c/CarpetOfFlowers.java +++ b/Mage.Sets/src/mage/cards/c/CarpetOfFlowers.java @@ -34,7 +34,6 @@ import mage.abilities.effects.common.ManaEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.choices.ChoiceColor; -import mage.choices.ChoiceImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SubType; @@ -48,8 +47,6 @@ import mage.game.events.GameEvent.EventType; import mage.players.Player; import mage.target.common.TargetOpponent; -import java.util.LinkedHashSet; -import java.util.Set; import java.util.UUID; /** @@ -145,7 +142,7 @@ class CarpetOfFlowersEffect extends ManaEffect { CarpetOfFlowersEffect() { super(); - staticText = "add up to X mana of any one color to your mana pool, where X is the number of Islands target opponent controls"; + staticText = "add X mana of any one color to your mana pool, where X is the number of Islands target opponent controls"; } CarpetOfFlowersEffect(final CarpetOfFlowersEffect effect) { @@ -163,19 +160,7 @@ class CarpetOfFlowersEffect extends ManaEffect { return false; } } - int countMax = game.getBattlefield().count(filter, source.getSourceId(), source.getTargets().getFirstTarget(), game); - ChoiceImpl choiceCount = new ChoiceImpl(true); - Set set = new LinkedHashSet<>(countMax + 1); - for (int i = 0; i <= countMax; i++) { - set.add(Integer.toString(i)); - } - choiceCount.setChoices(set); - choiceCount.setMessage("Choose number of mana"); - controller.choose(Outcome.PutManaInPool, choiceCount, game); - int count = 0; - if (choiceCount.getChoice() != null) { - count = Integer.parseInt(choiceCount.getChoice()); - } + int count = game.getBattlefield().count(filter, source.getSourceId(), source.getTargets().getFirstTarget(), game); if (count > 0) { Mana mana = new Mana(); switch (choice.getChoice()) { diff --git a/Mage.Sets/src/mage/cards/c/CarrierPigeons.java b/Mage.Sets/src/mage/cards/c/CarrierPigeons.java index dbf0493c37..862f30eef5 100644 --- a/Mage.Sets/src/mage/cards/c/CarrierPigeons.java +++ b/Mage.Sets/src/mage/cards/c/CarrierPigeons.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -47,7 +48,7 @@ public class CarrierPigeons extends CardImpl { public CarrierPigeons(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CarrierThrall.java b/Mage.Sets/src/mage/cards/c/CarrierThrall.java index 6a2f82f2dd..b599dd4986 100644 --- a/Mage.Sets/src/mage/cards/c/CarrierThrall.java +++ b/Mage.Sets/src/mage/cards/c/CarrierThrall.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.EldraziScionToken; /** @@ -45,7 +46,7 @@ public class CarrierThrall extends CardImpl { public CarrierThrall(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CarrionAnts.java b/Mage.Sets/src/mage/cards/c/CarrionAnts.java index b350ffc502..dc68247ed6 100644 --- a/Mage.Sets/src/mage/cards/c/CarrionAnts.java +++ b/Mage.Sets/src/mage/cards/c/CarrionAnts.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class CarrionAnts extends CardImpl { public CarrionAnts(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CarrionBeetles.java b/Mage.Sets/src/mage/cards/c/CarrionBeetles.java index 60185b0941..ee5f54f797 100644 --- a/Mage.Sets/src/mage/cards/c/CarrionBeetles.java +++ b/Mage.Sets/src/mage/cards/c/CarrionBeetles.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -52,7 +53,7 @@ public class CarrionBeetles extends CardImpl { public CarrionBeetles(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CarrionCrow.java b/Mage.Sets/src/mage/cards/c/CarrionCrow.java index 22af91f48b..41ab77069b 100644 --- a/Mage.Sets/src/mage/cards/c/CarrionCrow.java +++ b/Mage.Sets/src/mage/cards/c/CarrionCrow.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class CarrionCrow extends CardImpl { public CarrionCrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Bird"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CarrionFeeder.java b/Mage.Sets/src/mage/cards/c/CarrionFeeder.java index 3d2131af51..d76daec206 100644 --- a/Mage.Sets/src/mage/cards/c/CarrionFeeder.java +++ b/Mage.Sets/src/mage/cards/c/CarrionFeeder.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetControlledCreaturePermanent; @@ -48,7 +49,7 @@ public class CarrionFeeder extends CardImpl { public CarrionFeeder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CarrionHowler.java b/Mage.Sets/src/mage/cards/c/CarrionHowler.java index 10a5c178c6..811eff9b30 100644 --- a/Mage.Sets/src/mage/cards/c/CarrionHowler.java +++ b/Mage.Sets/src/mage/cards/c/CarrionHowler.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,8 +47,8 @@ public class CarrionHowler extends CardImpl { public CarrionHowler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WOLF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CarrionScreecher.java b/Mage.Sets/src/mage/cards/c/CarrionScreecher.java index 196630fdb3..e83b3d8210 100644 --- a/Mage.Sets/src/mage/cards/c/CarrionScreecher.java +++ b/Mage.Sets/src/mage/cards/c/CarrionScreecher.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class CarrionScreecher extends CardImpl { public CarrionScreecher(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Bird"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.BIRD); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CarrionThrash.java b/Mage.Sets/src/mage/cards/c/CarrionThrash.java index c2b6d9f23b..20be521a24 100644 --- a/Mage.Sets/src/mage/cards/c/CarrionThrash.java +++ b/Mage.Sets/src/mage/cards/c/CarrionThrash.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.AnotherCardPredicate; import mage.target.common.TargetCardInYourGraveyard; @@ -54,8 +55,8 @@ public class CarrionThrash extends CardImpl { public CarrionThrash(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{R}{G}"); - this.subtype.add("Viashino"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CarrionWall.java b/Mage.Sets/src/mage/cards/c/CarrionWall.java index d0c74bcf0f..ead4693420 100644 --- a/Mage.Sets/src/mage/cards/c/CarrionWall.java +++ b/Mage.Sets/src/mage/cards/c/CarrionWall.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class CarrionWall extends CardImpl { public CarrionWall(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CarryAway.java b/Mage.Sets/src/mage/cards/c/CarryAway.java index 8a96d839e9..d5db9da465 100644 --- a/Mage.Sets/src/mage/cards/c/CarryAway.java +++ b/Mage.Sets/src/mage/cards/c/CarryAway.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; @@ -54,7 +55,7 @@ public class CarryAway extends CardImpl { public CarryAway(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant Equipment TargetPermanent auraTarget = new TargetEquipmentPermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CartelAristocrat.java b/Mage.Sets/src/mage/cards/c/CartelAristocrat.java index 382bde14db..32a08d3d47 100644 --- a/Mage.Sets/src/mage/cards/c/CartelAristocrat.java +++ b/Mage.Sets/src/mage/cards/c/CartelAristocrat.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.GainProtectionFromColorSourceEff import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -49,8 +50,8 @@ public class CartelAristocrat extends CardImpl { public CartelAristocrat(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{B}"); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/Cartographer.java b/Mage.Sets/src/mage/cards/c/Cartographer.java index 88d34ef6af..e8f4c1dabc 100644 --- a/Mage.Sets/src/mage/cards/c/Cartographer.java +++ b/Mage.Sets/src/mage/cards/c/Cartographer.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterLandCard; import mage.target.common.TargetCardInYourGraveyard; @@ -46,7 +47,7 @@ public class Cartographer extends CardImpl { public Cartographer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CarvenCaryatid.java b/Mage.Sets/src/mage/cards/c/CarvenCaryatid.java index 2f59fbe009..993abb647e 100644 --- a/Mage.Sets/src/mage/cards/c/CarvenCaryatid.java +++ b/Mage.Sets/src/mage/cards/c/CarvenCaryatid.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class CarvenCaryatid extends CardImpl { public CarvenCaryatid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CastIntoDarkness.java b/Mage.Sets/src/mage/cards/c/CastIntoDarkness.java index e33d9390f0..29c4aa924d 100644 --- a/Mage.Sets/src/mage/cards/c/CastIntoDarkness.java +++ b/Mage.Sets/src/mage/cards/c/CastIntoDarkness.java @@ -49,7 +49,7 @@ public class CastIntoDarkness extends CardImpl { public CastIntoDarkness(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/c/CastThroughTime.java b/Mage.Sets/src/mage/cards/c/CastThroughTime.java index 1e841bb4f2..075c415df4 100644 --- a/Mage.Sets/src/mage/cards/c/CastThroughTime.java +++ b/Mage.Sets/src/mage/cards/c/CastThroughTime.java @@ -27,8 +27,6 @@ */ package mage.cards.c; -import java.util.Iterator; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousEffectImpl; @@ -46,6 +44,9 @@ import mage.game.stack.Spell; import mage.game.stack.StackObject; import mage.players.Player; +import java.util.Iterator; +import java.util.UUID; + /** * @author magenoxx_at_gmail.com @@ -118,13 +119,7 @@ class GainReboundEffect extends ContinuousEffectImpl { private void addReboundAbility(Card card, Ability source, Game game) { if (CastThroughTime.filter.match(card, game)) { - boolean found = false; - for (Ability ability : card.getAbilities()) { - if (ability instanceof ReboundAbility) { - found = true; - break; - } - } + boolean found = card.getAbilities().stream().anyMatch(ability -> ability instanceof ReboundAbility); if (!found) { Ability ability = new ReboundAbility(); game.getState().addOtherAbility(card, ability); diff --git a/Mage.Sets/src/mage/cards/c/CastawaysDespair.java b/Mage.Sets/src/mage/cards/c/CastawaysDespair.java new file mode 100644 index 0000000000..1ce5c09d57 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CastawaysDespair.java @@ -0,0 +1,80 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect; +import mage.abilities.effects.common.TapEnchantedEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class CastawaysDespair extends CardImpl { + + public CastawaysDespair(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // When Castaway's Despair enters the battlefield, tap enchanted creature. + this.addAbility(new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect())); + + // Enchanted creature doesn't untap during its controller's untap step. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect())); + } + + public CastawaysDespair(final CastawaysDespair card) { + super(card); + } + + @Override + public CastawaysDespair copy() { + return new CastawaysDespair(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CastleRaptors.java b/Mage.Sets/src/mage/cards/c/CastleRaptors.java index 230642715b..e60a1192cd 100644 --- a/Mage.Sets/src/mage/cards/c/CastleRaptors.java +++ b/Mage.Sets/src/mage/cards/c/CastleRaptors.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class CastleRaptors extends CardImpl { public CastleRaptors(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CatBurglar.java b/Mage.Sets/src/mage/cards/c/CatBurglar.java index 4f79c24836..65369adf34 100644 --- a/Mage.Sets/src/mage/cards/c/CatBurglar.java +++ b/Mage.Sets/src/mage/cards/c/CatBurglar.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -48,9 +49,9 @@ public class CatBurglar extends CardImpl { public CatBurglar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Kor"); - this.subtype.add("Rogue"); - this.subtype.add("Minion"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.ROGUE); + this.subtype.add(SubType.MINION); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CatWarriors.java b/Mage.Sets/src/mage/cards/c/CatWarriors.java index 45269f91d1..1d096ee5b4 100644 --- a/Mage.Sets/src/mage/cards/c/CatWarriors.java +++ b/Mage.Sets/src/mage/cards/c/CatWarriors.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class CatWarriors extends CardImpl { public CatWarriors(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Cat"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CataclysmicGearhulk.java b/Mage.Sets/src/mage/cards/c/CataclysmicGearhulk.java index 32c7e3b275..785c8f4a27 100644 --- a/Mage.Sets/src/mage/cards/c/CataclysmicGearhulk.java +++ b/Mage.Sets/src/mage/cards/c/CataclysmicGearhulk.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterControlledArtifactPermanent; import mage.filter.common.FilterControlledCreaturePermanent; @@ -60,7 +61,7 @@ public class CataclysmicGearhulk extends CardImpl { public CataclysmicGearhulk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CatacombSifter.java b/Mage.Sets/src/mage/cards/c/CatacombSifter.java index d2ac32347e..abb4613118 100644 --- a/Mage.Sets/src/mage/cards/c/CatacombSifter.java +++ b/Mage.Sets/src/mage/cards/c/CatacombSifter.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -57,8 +58,8 @@ public class CatacombSifter extends CardImpl { public CatacombSifter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{G}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CatacombSlug.java b/Mage.Sets/src/mage/cards/c/CatacombSlug.java index 2d82502171..fa2b0a6c8c 100644 --- a/Mage.Sets/src/mage/cards/c/CatacombSlug.java +++ b/Mage.Sets/src/mage/cards/c/CatacombSlug.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class CatacombSlug extends CardImpl { public CatacombSlug(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Slug"); + this.subtype.add(SubType.SLUG); this.power = new MageInt(2); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/c/CatapultMaster.java b/Mage.Sets/src/mage/cards/c/CatapultMaster.java index 6c83d116ae..1395c1f849 100644 --- a/Mage.Sets/src/mage/cards/c/CatapultMaster.java +++ b/Mage.Sets/src/mage/cards/c/CatapultMaster.java @@ -59,8 +59,8 @@ public class CatapultMaster extends CardImpl { } public CatapultMaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CatapultSquad.java b/Mage.Sets/src/mage/cards/c/CatapultSquad.java index babad9056b..cb78655d00 100644 --- a/Mage.Sets/src/mage/cards/c/CatapultSquad.java +++ b/Mage.Sets/src/mage/cards/c/CatapultSquad.java @@ -61,8 +61,8 @@ public class CatapultSquad extends CardImpl { public CatapultSquad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CateranBrute.java b/Mage.Sets/src/mage/cards/c/CateranBrute.java index 98c4cc3b59..8cb25d80c4 100644 --- a/Mage.Sets/src/mage/cards/c/CateranBrute.java +++ b/Mage.Sets/src/mage/cards/c/CateranBrute.java @@ -61,8 +61,8 @@ public class CateranBrute extends CardImpl { public CateranBrute(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Horror"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HORROR); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CateranEnforcer.java b/Mage.Sets/src/mage/cards/c/CateranEnforcer.java index a278dca9be..fff5bdf114 100644 --- a/Mage.Sets/src/mage/cards/c/CateranEnforcer.java +++ b/Mage.Sets/src/mage/cards/c/CateranEnforcer.java @@ -62,8 +62,8 @@ public class CateranEnforcer extends CardImpl { public CateranEnforcer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Horror"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HORROR); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CateranKidnappers.java b/Mage.Sets/src/mage/cards/c/CateranKidnappers.java index 1869e5c7fc..d8becc6885 100644 --- a/Mage.Sets/src/mage/cards/c/CateranKidnappers.java +++ b/Mage.Sets/src/mage/cards/c/CateranKidnappers.java @@ -60,8 +60,8 @@ public class CateranKidnappers extends CardImpl { public CateranKidnappers(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CateranOverlord.java b/Mage.Sets/src/mage/cards/c/CateranOverlord.java index 9fb3482b15..79c1725b53 100644 --- a/Mage.Sets/src/mage/cards/c/CateranOverlord.java +++ b/Mage.Sets/src/mage/cards/c/CateranOverlord.java @@ -64,8 +64,8 @@ public class CateranOverlord extends CardImpl { public CateranOverlord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}{B}"); - this.subtype.add("Horror"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HORROR); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(7); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CateranPersuader.java b/Mage.Sets/src/mage/cards/c/CateranPersuader.java index 666e215a16..bdc63e53ab 100644 --- a/Mage.Sets/src/mage/cards/c/CateranPersuader.java +++ b/Mage.Sets/src/mage/cards/c/CateranPersuader.java @@ -61,8 +61,8 @@ public class CateranPersuader extends CardImpl { public CateranPersuader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CateranSlaver.java b/Mage.Sets/src/mage/cards/c/CateranSlaver.java index 585b18b063..120ccdabda 100644 --- a/Mage.Sets/src/mage/cards/c/CateranSlaver.java +++ b/Mage.Sets/src/mage/cards/c/CateranSlaver.java @@ -62,8 +62,8 @@ public class CateranSlaver extends CardImpl { public CateranSlaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Horror"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HORROR); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CaterwaulingBoggart.java b/Mage.Sets/src/mage/cards/c/CaterwaulingBoggart.java index a632b5e999..23593081c2 100644 --- a/Mage.Sets/src/mage/cards/c/CaterwaulingBoggart.java +++ b/Mage.Sets/src/mage/cards/c/CaterwaulingBoggart.java @@ -58,8 +58,8 @@ public class CaterwaulingBoggart extends CardImpl { public CaterwaulingBoggart(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CatharsCompanion.java b/Mage.Sets/src/mage/cards/c/CatharsCompanion.java index 6f15bd8c45..58910324db 100644 --- a/Mage.Sets/src/mage/cards/c/CatharsCompanion.java +++ b/Mage.Sets/src/mage/cards/c/CatharsCompanion.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -53,7 +54,7 @@ public class CatharsCompanion extends CardImpl { public CatharsCompanion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CatharsShield.java b/Mage.Sets/src/mage/cards/c/CatharsShield.java index 6120c6da17..ce1690e429 100644 --- a/Mage.Sets/src/mage/cards/c/CatharsShield.java +++ b/Mage.Sets/src/mage/cards/c/CatharsShield.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -50,7 +51,7 @@ public class CatharsShield extends CardImpl { public CatharsShield(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{0}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +0/+3 and has vigilance. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(0, 3))); diff --git a/Mage.Sets/src/mage/cards/c/CatharticAdept.java b/Mage.Sets/src/mage/cards/c/CatharticAdept.java index 0b412dd416..8b51f4fd50 100644 --- a/Mage.Sets/src/mage/cards/c/CatharticAdept.java +++ b/Mage.Sets/src/mage/cards/c/CatharticAdept.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -46,8 +47,8 @@ public class CatharticAdept extends CardImpl { public CatharticAdept(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CathedralMembrane.java b/Mage.Sets/src/mage/cards/c/CathedralMembrane.java index ca2efa9cf9..1167df0bcd 100644 --- a/Mage.Sets/src/mage/cards/c/CathedralMembrane.java +++ b/Mage.Sets/src/mage/cards/c/CathedralMembrane.java @@ -48,7 +48,7 @@ public class CathedralMembrane extends CardImpl { public CathedralMembrane(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{W/P}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CathedralSanctifier.java b/Mage.Sets/src/mage/cards/c/CathedralSanctifier.java index de03a9d160..9a5c0b33df 100644 --- a/Mage.Sets/src/mage/cards/c/CathedralSanctifier.java +++ b/Mage.Sets/src/mage/cards/c/CathedralSanctifier.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class CathedralSanctifier extends CardImpl { public CathedralSanctifier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/Cathodion.java b/Mage.Sets/src/mage/cards/c/Cathodion.java index 892804ee33..f6c2368f37 100644 --- a/Mage.Sets/src/mage/cards/c/Cathodion.java +++ b/Mage.Sets/src/mage/cards/c/Cathodion.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.BasicManaEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class Cathodion extends CardImpl { public Cathodion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(3); this.toughness = new MageInt(3); this.addAbility(new DiesTriggeredAbility(new BasicManaEffect(Mana.ColorlessMana(3)), false)); diff --git a/Mage.Sets/src/mage/cards/c/CaughtInTheBrights.java b/Mage.Sets/src/mage/cards/c/CaughtInTheBrights.java index 93d012fc42..d38016f770 100644 --- a/Mage.Sets/src/mage/cards/c/CaughtInTheBrights.java +++ b/Mage.Sets/src/mage/cards/c/CaughtInTheBrights.java @@ -59,12 +59,12 @@ public class CaughtInTheBrights extends CardImpl { public CaughtInTheBrights(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); - this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit)); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.LoseAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/c/CausticCaterpillar.java b/Mage.Sets/src/mage/cards/c/CausticCaterpillar.java index e9a15e7099..9f2a223973 100644 --- a/Mage.Sets/src/mage/cards/c/CausticCaterpillar.java +++ b/Mage.Sets/src/mage/cards/c/CausticCaterpillar.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.TargetPermanent; @@ -50,7 +51,7 @@ public class CausticCaterpillar extends CardImpl { public CausticCaterpillar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CausticCrawler.java b/Mage.Sets/src/mage/cards/c/CausticCrawler.java index a3a4d536bd..449a07455c 100644 --- a/Mage.Sets/src/mage/cards/c/CausticCrawler.java +++ b/Mage.Sets/src/mage/cards/c/CausticCrawler.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -45,7 +46,7 @@ public class CausticCrawler extends CardImpl { public CausticCrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CausticHound.java b/Mage.Sets/src/mage/cards/c/CausticHound.java index 44cc5a20bf..79def2d645 100644 --- a/Mage.Sets/src/mage/cards/c/CausticHound.java +++ b/Mage.Sets/src/mage/cards/c/CausticHound.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.LoseLifeAllPlayersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class CausticHound extends CardImpl { public CausticHound (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CausticTar.java b/Mage.Sets/src/mage/cards/c/CausticTar.java index b698b9f3bb..63eaa002ea 100644 --- a/Mage.Sets/src/mage/cards/c/CausticTar.java +++ b/Mage.Sets/src/mage/cards/c/CausticTar.java @@ -51,7 +51,7 @@ public class CausticTar extends CardImpl { public CausticTar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{B}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land diff --git a/Mage.Sets/src/mage/cards/c/CausticWasps.java b/Mage.Sets/src/mage/cards/c/CausticWasps.java index 3e96dfd77b..cd65497748 100644 --- a/Mage.Sets/src/mage/cards/c/CausticWasps.java +++ b/Mage.Sets/src/mage/cards/c/CausticWasps.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -54,7 +55,7 @@ public class CausticWasps extends CardImpl { public CausticWasps(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CauterySliver.java b/Mage.Sets/src/mage/cards/c/CauterySliver.java index 8d18b00d8b..d4eea5a66f 100644 --- a/Mage.Sets/src/mage/cards/c/CauterySliver.java +++ b/Mage.Sets/src/mage/cards/c/CauterySliver.java @@ -58,7 +58,7 @@ public class CauterySliver extends CardImpl { public CauterySliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{W}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CavalryMaster.java b/Mage.Sets/src/mage/cards/c/CavalryMaster.java index 855642e1ef..6d20173064 100644 --- a/Mage.Sets/src/mage/cards/c/CavalryMaster.java +++ b/Mage.Sets/src/mage/cards/c/CavalryMaster.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlankingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -45,17 +46,17 @@ import mage.filter.predicate.mageobject.AbilityPredicate; * @author Plopman */ public class CavalryMaster extends CardImpl { - + static final private FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creatures you control with flanking"); - - static{ + + static { filter.add(new AbilityPredicate(FlankingAbility.class)); } - + public CavalryMaster(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -63,7 +64,10 @@ public class CavalryMaster extends CardImpl { // Flanking this.addAbility(new FlankingAbility()); // Other creatures you control with flanking have flanking. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new FlankingAbility(), Duration.WhileOnBattlefield, filter, true))); + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, new GainAbilityAllEffect(new FlankingAbility(), Duration.WhileOnBattlefield, filter, true) + .setText("Other creatures you control with flanking have flanking.") + )); } public CavalryMaster(final CavalryMaster card) { diff --git a/Mage.Sets/src/mage/cards/c/CavalryPegasus.java b/Mage.Sets/src/mage/cards/c/CavalryPegasus.java index 10b20d38f2..7801973854 100644 --- a/Mage.Sets/src/mage/cards/c/CavalryPegasus.java +++ b/Mage.Sets/src/mage/cards/c/CavalryPegasus.java @@ -56,7 +56,7 @@ public class CavalryPegasus extends CardImpl { public CavalryPegasus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Pegasus"); + this.subtype.add(SubType.PEGASUS); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CavePeople.java b/Mage.Sets/src/mage/cards/c/CavePeople.java index 7487abd73b..843feac623 100644 --- a/Mage.Sets/src/mage/cards/c/CavePeople.java +++ b/Mage.Sets/src/mage/cards/c/CavePeople.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -52,7 +53,7 @@ public class CavePeople extends CardImpl { public CavePeople(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CaveSense.java b/Mage.Sets/src/mage/cards/c/CaveSense.java index ced1760db6..c9968fa9ef 100644 --- a/Mage.Sets/src/mage/cards/c/CaveSense.java +++ b/Mage.Sets/src/mage/cards/c/CaveSense.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -53,7 +54,7 @@ public class CaveSense extends CardImpl { public CaveSense(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CaveTiger.java b/Mage.Sets/src/mage/cards/c/CaveTiger.java index a5de9483e7..b25f58d3e4 100644 --- a/Mage.Sets/src/mage/cards/c/CaveTiger.java +++ b/Mage.Sets/src/mage/cards/c/CaveTiger.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class CaveTiger extends CardImpl { public CaveTiger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CavernCrawler.java b/Mage.Sets/src/mage/cards/c/CavernCrawler.java index 4582139a84..7a36cdde60 100644 --- a/Mage.Sets/src/mage/cards/c/CavernCrawler.java +++ b/Mage.Sets/src/mage/cards/c/CavernCrawler.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class CavernCrawler extends CardImpl { public CavernCrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CavernHarpy.java b/Mage.Sets/src/mage/cards/c/CavernHarpy.java index 12385b895a..d46b06dd69 100644 --- a/Mage.Sets/src/mage/cards/c/CavernHarpy.java +++ b/Mage.Sets/src/mage/cards/c/CavernHarpy.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; @@ -58,8 +59,8 @@ public class CavernHarpy extends CardImpl { public CavernHarpy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}"); - this.subtype.add("Harpy"); - this.subtype.add("Beast"); + this.subtype.add(SubType.HARPY); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CavernLampad.java b/Mage.Sets/src/mage/cards/c/CavernLampad.java index 544e9d3868..2f55077885 100644 --- a/Mage.Sets/src/mage/cards/c/CavernLampad.java +++ b/Mage.Sets/src/mage/cards/c/CavernLampad.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -50,7 +51,7 @@ public class CavernLampad extends CardImpl { public CavernLampad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{B}"); - this.subtype.add("Nymph"); + this.subtype.add(SubType.NYMPH); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CavernThoctar.java b/Mage.Sets/src/mage/cards/c/CavernThoctar.java index 03e88fe91a..be75bd9c32 100644 --- a/Mage.Sets/src/mage/cards/c/CavernThoctar.java +++ b/Mage.Sets/src/mage/cards/c/CavernThoctar.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class CavernThoctar extends CardImpl { public CavernThoctar (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CeaselessSearblades.java b/Mage.Sets/src/mage/cards/c/CeaselessSearblades.java index e1bb7dc017..cb53700593 100644 --- a/Mage.Sets/src/mage/cards/c/CeaselessSearblades.java +++ b/Mage.Sets/src/mage/cards/c/CeaselessSearblades.java @@ -51,8 +51,8 @@ public class CeaselessSearblades extends CardImpl { public CeaselessSearblades(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CelestialAncient.java b/Mage.Sets/src/mage/cards/c/CelestialAncient.java index d32ad8b9fc..3e227cf29b 100644 --- a/Mage.Sets/src/mage/cards/c/CelestialAncient.java +++ b/Mage.Sets/src/mage/cards/c/CelestialAncient.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.FilterSpell; import mage.filter.common.FilterControlledCreaturePermanent; @@ -52,7 +53,7 @@ public class CelestialAncient extends CardImpl { } public CelestialAncient(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CelestialArchon.java b/Mage.Sets/src/mage/cards/c/CelestialArchon.java index a5cd7e2d27..013ddb60e9 100644 --- a/Mage.Sets/src/mage/cards/c/CelestialArchon.java +++ b/Mage.Sets/src/mage/cards/c/CelestialArchon.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -51,7 +52,7 @@ public class CelestialArchon extends CardImpl { public CelestialArchon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Archon"); + this.subtype.add(SubType.ARCHON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CelestialColonnade.java b/Mage.Sets/src/mage/cards/c/CelestialColonnade.java index 9956db6405..f0b5ebdc0b 100644 --- a/Mage.Sets/src/mage/cards/c/CelestialColonnade.java +++ b/Mage.Sets/src/mage/cards/c/CelestialColonnade.java @@ -40,6 +40,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -75,7 +76,7 @@ class CelestialColonnadeToken extends Token { public CelestialColonnadeToken() { super("", "4/4 white and blue Elemental creature with flying and vigilance"); cardType.add(CardType.CREATURE); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); color.setBlue(true); color.setWhite(true); power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CelestialConvergence.java b/Mage.Sets/src/mage/cards/c/CelestialConvergence.java index 937993b573..d0bffc9604 100644 --- a/Mage.Sets/src/mage/cards/c/CelestialConvergence.java +++ b/Mage.Sets/src/mage/cards/c/CelestialConvergence.java @@ -1,145 +1,145 @@ -/* - * 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.cards.c; - -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.counters.Counter; -import mage.game.Game; -import mage.players.Player; - -/** - * - * @author LevelX2 - */ -public class CelestialConvergence extends CardImpl { - - public CelestialConvergence(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); - - // Celestial Convergence enters the battlefield with seven omen counters on it. - Effect effect = new AddCountersSourceEffect(new Counter("omen", 7)); - this.addAbility(new EntersBattlefieldAbility(effect, "with seven omen counters")); - - // At the beginning of your upkeep, remove an omen counter from Celestial Convergence. If there are no omen counters on Celestial Convergence, the player with the highest life total wins the game. If two or more players are tied for highest life total, the game is a draw. - Ability ability = new BeginningOfUpkeepTriggeredAbility( - Zone.BATTLEFIELD, new RemoveCounterSourceEffect(new Counter("omen")), TargetController.YOU, false); - ability.addEffect(new CelestialConvergenceEffect()); - this.addAbility(ability); - } - - public CelestialConvergence(final CelestialConvergence card) { - super(card); - } - - @Override - public CelestialConvergence copy() { - return new CelestialConvergence(this); - } -} - -class CelestialConvergenceEffect extends OneShotEffect { - - public CelestialConvergenceEffect() { - super(Outcome.PutCreatureInPlay); - this.staticText = "If there are no omen counters on {this}, the player with the highest life total wins the game. If two or more players are tied for highest life total, the game is a draw"; - } - - public CelestialConvergenceEffect(final CelestialConvergenceEffect effect) { - super(effect); - } - - @Override - public CelestialConvergenceEffect copy() { - return new CelestialConvergenceEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Card sourceObject = game.getCard(source.getSourceId()); - Player controller = game.getPlayer(source.getControllerId()); - if (sourceObject != null - && controller != null - && sourceObject.getCounters(game).getCount("omen") == 0) { - - /** - * 801.14. If an effect states that a player wins the game, all of - * that player’s opponents within his or her range of influence lose - * the game instead. # - * - * 801.15. If the effect of a spell or ability states that the game - * is a draw, the game is a draw for that spell or ability’s - * controller and all players within his or her range of influence. - * They leave the game. All remaining players continue to play the - * game. - * - */ - List highestLifePlayers = new ArrayList<>(); - int highLife = Integer.MIN_VALUE; - for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { - Player player = game.getPlayer(playerId); - if (player != null) { - if (player.getLife() > highLife) { - highestLifePlayers.clear(); - highestLifePlayers.add(player.getId()); - } else if (player.getLife() == highLife) { - highestLifePlayers.add(player.getId()); - } - } - } - if (highestLifePlayers.isEmpty()) { - return false; - } - if (highestLifePlayers.size() > 1) { - game.setDraw(controller.getId()); - } else { - Player winner = game.getPlayer(highestLifePlayers.iterator().next()); - if (winner != null) { - winner.won(game); - } - } - return true; - } - return false; - } -} +/* + * 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.cards.c; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.Counter; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class CelestialConvergence extends CardImpl { + + public CelestialConvergence(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); + + // Celestial Convergence enters the battlefield with seven omen counters on it. + Effect effect = new AddCountersSourceEffect(new Counter("omen", 7)); + this.addAbility(new EntersBattlefieldAbility(effect, "with seven omen counters")); + + // At the beginning of your upkeep, remove an omen counter from Celestial Convergence. If there are no omen counters on Celestial Convergence, the player with the highest life total wins the game. If two or more players are tied for highest life total, the game is a draw. + Ability ability = new BeginningOfUpkeepTriggeredAbility( + Zone.BATTLEFIELD, new RemoveCounterSourceEffect(new Counter("omen")), TargetController.YOU, false); + ability.addEffect(new CelestialConvergenceEffect()); + this.addAbility(ability); + } + + public CelestialConvergence(final CelestialConvergence card) { + super(card); + } + + @Override + public CelestialConvergence copy() { + return new CelestialConvergence(this); + } +} + +class CelestialConvergenceEffect extends OneShotEffect { + + public CelestialConvergenceEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "If there are no omen counters on {this}, the player with the highest life total wins the game. If two or more players are tied for highest life total, the game is a draw"; + } + + public CelestialConvergenceEffect(final CelestialConvergenceEffect effect) { + super(effect); + } + + @Override + public CelestialConvergenceEffect copy() { + return new CelestialConvergenceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Card sourceObject = game.getCard(source.getSourceId()); + Player controller = game.getPlayer(source.getControllerId()); + if (sourceObject != null + && controller != null + && sourceObject.getCounters(game).getCount("omen") == 0) { + + /** + * 801.14. If an effect states that a player wins the game, all of + * that player’s opponents within his or her range of influence lose + * the game instead. # + * + * 801.15. If the effect of a spell or ability states that the game + * is a draw, the game is a draw for that spell or ability’s + * controller and all players within his or her range of influence. + * They leave the game. All remaining players continue to play the + * game. + * + */ + List highestLifePlayers = new ArrayList<>(); + int highLife = Integer.MIN_VALUE; + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + if (player.getLife() > highLife) { + highestLifePlayers.clear(); + highestLifePlayers.add(player.getId()); + } else if (player.getLife() == highLife) { + highestLifePlayers.add(player.getId()); + } + } + } + if (highestLifePlayers.isEmpty()) { + return false; + } + if (highestLifePlayers.size() > 1) { + game.setDraw(controller.getId()); + } else { + Player winner = game.getPlayer(highestLifePlayers.iterator().next()); + if (winner != null) { + winner.won(game); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/c/CelestialCrusader.java b/Mage.Sets/src/mage/cards/c/CelestialCrusader.java index 16c2bedc17..239bbec96f 100644 --- a/Mage.Sets/src/mage/cards/c/CelestialCrusader.java +++ b/Mage.Sets/src/mage/cards/c/CelestialCrusader.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.SplitSecondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -57,7 +58,7 @@ public class CelestialCrusader extends CardImpl { public CelestialCrusader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CelestialDawn.java b/Mage.Sets/src/mage/cards/c/CelestialDawn.java index 0f3367eae8..f0e43ddb42 100644 --- a/Mage.Sets/src/mage/cards/c/CelestialDawn.java +++ b/Mage.Sets/src/mage/cards/c/CelestialDawn.java @@ -57,7 +57,7 @@ import mage.sets.Commander; public class CelestialDawn extends CardImpl { public CelestialDawn(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{W}"); // Lands you control are Plains. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CelestialDawnToPlainsEffect())); @@ -116,7 +116,7 @@ class CelestialDawnToPlainsEffect extends ContinuousEffectImpl { break; case TypeChangingEffects_4: land.getSubtype(game).clear(); - land.getSubtype(game).add("Plains"); + land.getSubtype(game).add(SubType.PLAINS); break; } } @@ -136,7 +136,7 @@ class CelestialDawnToWhiteEffect extends ContinuousEffectImpl { public CelestialDawnToWhiteEffect() { super(Duration.WhileOnBattlefield, Layer.ColorChangingEffects_5, SubLayer.NA, Outcome.Benefit); - staticText = "Nonland cards you own that aren't on the battlefield, spells you control, and nonland permanents you control are white"; + staticText = "Nonland permanents you control are white. The same is true for spells you control and nonland cards you own that aren't on the battlefield."; } @Override diff --git a/Mage.Sets/src/mage/cards/c/CelestialForce.java b/Mage.Sets/src/mage/cards/c/CelestialForce.java index 3b1921d456..bc0fd97d8a 100644 --- a/Mage.Sets/src/mage/cards/c/CelestialForce.java +++ b/Mage.Sets/src/mage/cards/c/CelestialForce.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -44,7 +45,7 @@ public class CelestialForce extends CardImpl { public CelestialForce(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/c/CelestialGatekeeper.java b/Mage.Sets/src/mage/cards/c/CelestialGatekeeper.java new file mode 100644 index 0000000000..b3b76035f9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CelestialGatekeeper.java @@ -0,0 +1,94 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ExileSourceEffect; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.other.OwnerPredicate; +import mage.target.common.TargetCardInGraveyard; + +/** + * + * @author TheElk801 + */ +public class CelestialGatekeeper extends CardImpl { + + private static final FilterCard filter = new FilterCard("Bird and/or Cleric permanent cards"); + + static { + filter.add(new OwnerPredicate(TargetController.YOU)); + filter.add(Predicates.or( + new SubtypePredicate(SubType.BIRD), + new SubtypePredicate(SubType.CLERIC) + )); + } + + public CelestialGatekeeper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Celestial Gatekeeper dies, exile it, then return up to two target Bird and/or Cleric permanent cards from your graveyard to the battlefield. + Effect effect = new ExileSourceEffect(); + effect.setText(""); + DiesTriggeredAbility ability = new DiesTriggeredAbility(effect); + effect = new ReturnFromGraveyardToBattlefieldTargetEffect(); + effect.setText("exile it, then return up to two target Bird and/or Cleric permanent cards from your graveyard to the battlefield"); + ability.addEffect(effect); + ability.addTarget(new TargetCardInGraveyard(0, 2, filter)); + this.addAbility(ability); + } + + public CelestialGatekeeper(final CelestialGatekeeper card) { + super(card); + } + + @Override + public CelestialGatekeeper copy() { + return new CelestialGatekeeper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CelestialKirin.java b/Mage.Sets/src/mage/cards/c/CelestialKirin.java index 98e344ca55..3082e74b94 100644 --- a/Mage.Sets/src/mage/cards/c/CelestialKirin.java +++ b/Mage.Sets/src/mage/cards/c/CelestialKirin.java @@ -50,10 +50,10 @@ import mage.game.stack.Spell; public class CelestialKirin extends CardImpl { public CelestialKirin(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Kirin"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.KIRIN); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -92,7 +92,7 @@ class CelestialKirinEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Spell spell = game.getState().getStack().getSpell(getTargetPointer().getFirst(game, source)); + Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source)); if (spell != null) { int cmc = spell.getConvertedManaCost(); FilterPermanent filter = new FilterPermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CelestialMantle.java b/Mage.Sets/src/mage/cards/c/CelestialMantle.java index 896f87a685..befe24e8c9 100644 --- a/Mage.Sets/src/mage/cards/c/CelestialMantle.java +++ b/Mage.Sets/src/mage/cards/c/CelestialMantle.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class CelestialMantle extends CardImpl { public CelestialMantle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}{W}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CemeteryGate.java b/Mage.Sets/src/mage/cards/c/CemeteryGate.java index 527154e953..3868f76310 100644 --- a/Mage.Sets/src/mage/cards/c/CemeteryGate.java +++ b/Mage.Sets/src/mage/cards/c/CemeteryGate.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class CemeteryGate extends CardImpl { public CemeteryGate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CemeteryPuca.java b/Mage.Sets/src/mage/cards/c/CemeteryPuca.java index bc589474b9..07519be974 100644 --- a/Mage.Sets/src/mage/cards/c/CemeteryPuca.java +++ b/Mage.Sets/src/mage/cards/c/CemeteryPuca.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class CemeteryPuca extends CardImpl { public CemeteryPuca(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U/B}{U/B}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CemeteryReaper.java b/Mage.Sets/src/mage/cards/c/CemeteryReaper.java index f24d845b69..ec0e2a679c 100644 --- a/Mage.Sets/src/mage/cards/c/CemeteryReaper.java +++ b/Mage.Sets/src/mage/cards/c/CemeteryReaper.java @@ -62,7 +62,7 @@ public class CemeteryReaper extends CardImpl { public CemeteryReaper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CennsHeir.java b/Mage.Sets/src/mage/cards/c/CennsHeir.java index 39022c4dd5..e0174a7d69 100644 --- a/Mage.Sets/src/mage/cards/c/CennsHeir.java +++ b/Mage.Sets/src/mage/cards/c/CennsHeir.java @@ -56,8 +56,8 @@ public class CennsHeir extends CardImpl { public CennsHeir(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CennsTactician.java b/Mage.Sets/src/mage/cards/c/CennsTactician.java index a7351fa291..99ffeb0441 100644 --- a/Mage.Sets/src/mage/cards/c/CennsTactician.java +++ b/Mage.Sets/src/mage/cards/c/CennsTactician.java @@ -61,8 +61,8 @@ public class CennsTactician extends CardImpl { public CennsTactician(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CentaurArcher.java b/Mage.Sets/src/mage/cards/c/CentaurArcher.java index c6da02a0f7..719170613e 100644 --- a/Mage.Sets/src/mage/cards/c/CentaurArcher.java +++ b/Mage.Sets/src/mage/cards/c/CentaurArcher.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -56,8 +57,8 @@ public class CentaurArcher extends CardImpl { public CentaurArcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Archer"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CentaurBattlemaster.java b/Mage.Sets/src/mage/cards/c/CentaurBattlemaster.java index cb62f06250..3bc0c6aeba 100644 --- a/Mage.Sets/src/mage/cards/c/CentaurBattlemaster.java +++ b/Mage.Sets/src/mage/cards/c/CentaurBattlemaster.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -44,8 +45,8 @@ public class CentaurBattlemaster extends CardImpl { public CentaurBattlemaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CentaurChieftain.java b/Mage.Sets/src/mage/cards/c/CentaurChieftain.java index cac2063f0d..832e20cbe6 100644 --- a/Mage.Sets/src/mage/cards/c/CentaurChieftain.java +++ b/Mage.Sets/src/mage/cards/c/CentaurChieftain.java @@ -44,6 +44,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -56,7 +57,7 @@ public class CentaurChieftain extends CardImpl { public CentaurChieftain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Centaur"); + this.subtype.add(SubType.CENTAUR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CentaurCourser.java b/Mage.Sets/src/mage/cards/c/CentaurCourser.java index 106c3d549e..96ee087472 100644 --- a/Mage.Sets/src/mage/cards/c/CentaurCourser.java +++ b/Mage.Sets/src/mage/cards/c/CentaurCourser.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class CentaurCourser extends CardImpl { public CentaurCourser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CentaurHealer.java b/Mage.Sets/src/mage/cards/c/CentaurHealer.java index bf9a8fdf6b..2fbd1bab2b 100644 --- a/Mage.Sets/src/mage/cards/c/CentaurHealer.java +++ b/Mage.Sets/src/mage/cards/c/CentaurHealer.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class CentaurHealer extends CardImpl { public CentaurHealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}"); - this.subtype.add("Centaur"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CentaurOmenreader.java b/Mage.Sets/src/mage/cards/c/CentaurOmenreader.java index 627ebf6849..40dea7f8bf 100644 --- a/Mage.Sets/src/mage/cards/c/CentaurOmenreader.java +++ b/Mage.Sets/src/mage/cards/c/CentaurOmenreader.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterCard; @@ -49,15 +50,16 @@ import mage.game.permanent.Permanent; public class CentaurOmenreader extends CardImpl { private static final FilterCard filter = new FilterCard("creature spells"); + static { filter.add(new CardTypePredicate(CardType.CREATURE)); } public CentaurOmenreader(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); addSuperType(SuperType.SNOW); - this.subtype.add("Centaur"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CentaurRootcaster.java b/Mage.Sets/src/mage/cards/c/CentaurRootcaster.java index 144a853e4a..b175792f0c 100644 --- a/Mage.Sets/src/mage/cards/c/CentaurRootcaster.java +++ b/Mage.Sets/src/mage/cards/c/CentaurRootcaster.java @@ -33,6 +33,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; @@ -46,8 +47,8 @@ public class CentaurRootcaster extends CardImpl { public CentaurRootcaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Druid"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CentaurSafeguard.java b/Mage.Sets/src/mage/cards/c/CentaurSafeguard.java index 692f04d34f..f7381ad3e9 100644 --- a/Mage.Sets/src/mage/cards/c/CentaurSafeguard.java +++ b/Mage.Sets/src/mage/cards/c/CentaurSafeguard.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class CentaurSafeguard extends CardImpl { public CentaurSafeguard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G/W}"); - this.subtype.add("Centaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CentaurVeteran.java b/Mage.Sets/src/mage/cards/c/CentaurVeteran.java index 08738fd9ab..d59a07fb93 100644 --- a/Mage.Sets/src/mage/cards/c/CentaurVeteran.java +++ b/Mage.Sets/src/mage/cards/c/CentaurVeteran.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,7 +49,7 @@ public class CentaurVeteran extends CardImpl { public CentaurVeteran(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Centaur"); + this.subtype.add(SubType.CENTAUR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CentaurVinecrasher.java b/Mage.Sets/src/mage/cards/c/CentaurVinecrasher.java index 3274001f8c..4704ee770e 100644 --- a/Mage.Sets/src/mage/cards/c/CentaurVinecrasher.java +++ b/Mage.Sets/src/mage/cards/c/CentaurVinecrasher.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SetTargetPointer; import mage.constants.TargetController; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class CentaurVinecrasher extends CardImpl { public CentaurVinecrasher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Centaur"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.CENTAUR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CentaursHerald.java b/Mage.Sets/src/mage/cards/c/CentaursHerald.java index 3d487797a5..204fca9be5 100644 --- a/Mage.Sets/src/mage/cards/c/CentaursHerald.java +++ b/Mage.Sets/src/mage/cards/c/CentaursHerald.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.CentaurToken; @@ -48,8 +49,8 @@ public class CentaursHerald extends CardImpl { public CentaursHerald(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CephalidAristocrat.java b/Mage.Sets/src/mage/cards/c/CephalidAristocrat.java index 79d00d84a0..7ca4f11d07 100644 --- a/Mage.Sets/src/mage/cards/c/CephalidAristocrat.java +++ b/Mage.Sets/src/mage/cards/c/CephalidAristocrat.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class CephalidAristocrat extends CardImpl { public CephalidAristocrat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Cephalid"); + this.subtype.add(SubType.CEPHALID); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CephalidBroker.java b/Mage.Sets/src/mage/cards/c/CephalidBroker.java index 8d8caa5a61..a17f97b444 100644 --- a/Mage.Sets/src/mage/cards/c/CephalidBroker.java +++ b/Mage.Sets/src/mage/cards/c/CephalidBroker.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -51,7 +52,7 @@ public class CephalidBroker extends CardImpl { public CephalidBroker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Cephalid"); + this.subtype.add(SubType.CEPHALID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CephalidConstable.java b/Mage.Sets/src/mage/cards/c/CephalidConstable.java index 669258f7ad..61d91902db 100644 --- a/Mage.Sets/src/mage/cards/c/CephalidConstable.java +++ b/Mage.Sets/src/mage/cards/c/CephalidConstable.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; @@ -52,8 +53,8 @@ public class CephalidConstable extends CardImpl { public CephalidConstable(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Cephalid"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.CEPHALID); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CephalidIllusionist.java b/Mage.Sets/src/mage/cards/c/CephalidIllusionist.java index 1a28948918..e4046c8bbf 100644 --- a/Mage.Sets/src/mage/cards/c/CephalidIllusionist.java +++ b/Mage.Sets/src/mage/cards/c/CephalidIllusionist.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -53,8 +54,8 @@ public class CephalidIllusionist extends CardImpl { public CephalidIllusionist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Cephalid"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.CEPHALID); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CephalidInkshrouder.java b/Mage.Sets/src/mage/cards/c/CephalidInkshrouder.java index 8f2c4260ed..223ddca87e 100644 --- a/Mage.Sets/src/mage/cards/c/CephalidInkshrouder.java +++ b/Mage.Sets/src/mage/cards/c/CephalidInkshrouder.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class CephalidInkshrouder extends CardImpl { public CephalidInkshrouder(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Cephalid"); + this.subtype.add(SubType.CEPHALID); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CephalidLooter.java b/Mage.Sets/src/mage/cards/c/CephalidLooter.java index 8dcd6454fd..131f4d0f93 100644 --- a/Mage.Sets/src/mage/cards/c/CephalidLooter.java +++ b/Mage.Sets/src/mage/cards/c/CephalidLooter.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DrawDiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -47,8 +48,8 @@ public class CephalidLooter extends CardImpl { public CephalidLooter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Cephalid"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.CEPHALID); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CephalidPathmage.java b/Mage.Sets/src/mage/cards/c/CephalidPathmage.java index 7dfd9e2ebc..60fe0d0120 100644 --- a/Mage.Sets/src/mage/cards/c/CephalidPathmage.java +++ b/Mage.Sets/src/mage/cards/c/CephalidPathmage.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -51,8 +52,8 @@ public class CephalidPathmage extends CardImpl { public CephalidPathmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Cephalid"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.CEPHALID); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CephalidRetainer.java b/Mage.Sets/src/mage/cards/c/CephalidRetainer.java index d4368bdeda..8a59ad1fd2 100644 --- a/Mage.Sets/src/mage/cards/c/CephalidRetainer.java +++ b/Mage.Sets/src/mage/cards/c/CephalidRetainer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -57,7 +58,7 @@ public class CephalidRetainer extends CardImpl { public CephalidRetainer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Cephalid"); + this.subtype.add(SubType.CEPHALID); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CephalidSage.java b/Mage.Sets/src/mage/cards/c/CephalidSage.java index b45024911d..53afd4075f 100644 --- a/Mage.Sets/src/mage/cards/c/CephalidSage.java +++ b/Mage.Sets/src/mage/cards/c/CephalidSage.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -50,7 +51,7 @@ public class CephalidSage extends CardImpl { public CephalidSage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Cephalid"); + this.subtype.add(SubType.CEPHALID); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CephalidScout.java b/Mage.Sets/src/mage/cards/c/CephalidScout.java index 6734fffa31..5a00be02c1 100644 --- a/Mage.Sets/src/mage/cards/c/CephalidScout.java +++ b/Mage.Sets/src/mage/cards/c/CephalidScout.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.target.common.TargetControlledPermanent; @@ -50,9 +51,9 @@ public class CephalidScout extends CardImpl { public CephalidScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Cephalid"); - this.subtype.add("Wizard"); - this.subtype.add("Scout"); + this.subtype.add(SubType.CEPHALID); + this.subtype.add(SubType.WIZARD); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CephalidVandal.java b/Mage.Sets/src/mage/cards/c/CephalidVandal.java index 81eb4f4e00..3d301c5cdd 100644 --- a/Mage.Sets/src/mage/cards/c/CephalidVandal.java +++ b/Mage.Sets/src/mage/cards/c/CephalidVandal.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -53,8 +54,8 @@ public class CephalidVandal extends CardImpl { public CephalidVandal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Cephalid"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.CEPHALID); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CeremonialGuard.java b/Mage.Sets/src/mage/cards/c/CeremonialGuard.java index 11ebeef6d6..325d386667 100644 --- a/Mage.Sets/src/mage/cards/c/CeremonialGuard.java +++ b/Mage.Sets/src/mage/cards/c/CeremonialGuard.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroySourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class CeremonialGuard extends CardImpl { public CeremonialGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CerodonYearling.java b/Mage.Sets/src/mage/cards/c/CerodonYearling.java index e97b4478f1..2b060b6579 100644 --- a/Mage.Sets/src/mage/cards/c/CerodonYearling.java +++ b/Mage.Sets/src/mage/cards/c/CerodonYearling.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class CerodonYearling extends CardImpl { public CerodonYearling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{W}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); diff --git a/Mage.Sets/src/mage/cards/c/CeruleanSphinx.java b/Mage.Sets/src/mage/cards/c/CeruleanSphinx.java index 07eaffe7b9..d8a82ef4d4 100644 --- a/Mage.Sets/src/mage/cards/c/CeruleanSphinx.java +++ b/Mage.Sets/src/mage/cards/c/CeruleanSphinx.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,7 +49,7 @@ public class CeruleanSphinx extends CardImpl { public CeruleanSphinx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CeruleanWyvern.java b/Mage.Sets/src/mage/cards/c/CeruleanWyvern.java index 6d78503a13..520910d487 100644 --- a/Mage.Sets/src/mage/cards/c/CeruleanWyvern.java +++ b/Mage.Sets/src/mage/cards/c/CeruleanWyvern.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class CeruleanWyvern extends CardImpl { public CeruleanWyvern(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/Cessation.java b/Mage.Sets/src/mage/cards/c/Cessation.java index 9a0899e7bd..e1fa648f75 100644 --- a/Mage.Sets/src/mage/cards/c/Cessation.java +++ b/Mage.Sets/src/mage/cards/c/Cessation.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -52,7 +53,7 @@ public class Cessation extends CardImpl { public Cessation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); //Enchant creature diff --git a/Mage.Sets/src/mage/cards/c/CetaDisciple.java b/Mage.Sets/src/mage/cards/c/CetaDisciple.java index e98e1c1011..5adda4fb44 100644 --- a/Mage.Sets/src/mage/cards/c/CetaDisciple.java +++ b/Mage.Sets/src/mage/cards/c/CetaDisciple.java @@ -38,6 +38,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class CetaDisciple extends CardImpl { public CetaDisciple(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CetaSanctuary.java b/Mage.Sets/src/mage/cards/c/CetaSanctuary.java index ef3a88fc4d..7a126b0743 100644 --- a/Mage.Sets/src/mage/cards/c/CetaSanctuary.java +++ b/Mage.Sets/src/mage/cards/c/CetaSanctuary.java @@ -30,44 +30,28 @@ package mage.cards.c; import java.util.UUID; import mage.ObjectColor; import mage.abilities.Ability; -import mage.abilities.TriggeredAbility; -import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.common.SanctuaryTriggeredAbility; +import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.ColorPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; /** * - * @author Pete Rossi + * @author TheElk801 */ public class CetaSanctuary extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("a red or green permanent"); - - static { - filter.add(Predicates.or(new ColorPredicate(ObjectColor.RED), new ColorPredicate(ObjectColor.GREEN))); - } - public CetaSanctuary(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); // At the beginning of your upkeep, if you control a red or green permanent, draw a card, then discard a card. If you control a red permanent and a green permanent, instead draw two cards, then discard a card. - TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new CetaSanctuaryEffect(), TargetController.YOU, true); - this.addAbility(new ConditionalTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter), - "At the beginning of your upkeep, if you control a red or green permanent, draw a card, then discard a card. If you control a red permanent and a green permanent, instead draw two cards, then discard a card.")); - + Ability ability = new SanctuaryTriggeredAbility( + new DrawDiscardControllerEffect(1, 1), new DrawDiscardControllerEffect(2, 1), ObjectColor.GREEN, ObjectColor.RED, + "At the beginning of your upkeep, if you control a red or green permanent, draw a card, then discard a card. " + + "If you control a red permanent and a green permanent, instead draw two cards, then discard a card." + ); + this.addAbility(ability); } public CetaSanctuary(final CetaSanctuary card) { @@ -79,49 +63,3 @@ public class CetaSanctuary extends CardImpl { return new CetaSanctuary(this); } } - -class CetaSanctuaryEffect extends OneShotEffect { - - public CetaSanctuaryEffect() { - super(Outcome.DrawCard); - } - - public CetaSanctuaryEffect(final CetaSanctuaryEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - int red = 0; - int green = 0; - for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controller.getId())) { - ObjectColor color = permanent.getColor(game); - if (color.isRed()) { - red = 1; - } - if (color.isGreen()) { - green = 1; - } - - if (red == 1 && green == 1) { - break; - } - } - - if (red != 0 || green != 0) { - controller.drawCards((red + green), game); - controller.discard(1, false, source, game); - return true; - } - } - return false; - - } - - @Override - public CetaSanctuaryEffect copy() { - return new CetaSanctuaryEffect(this); - } -} diff --git a/Mage.Sets/src/mage/cards/c/Cetavolver.java b/Mage.Sets/src/mage/cards/c/Cetavolver.java index ec96ea7924..1b67890e14 100644 --- a/Mage.Sets/src/mage/cards/c/Cetavolver.java +++ b/Mage.Sets/src/mage/cards/c/Cetavolver.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.counters.CounterType; @@ -51,7 +52,7 @@ public class Cetavolver extends CardImpl { public Cetavolver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Volver"); + this.subtype.add(SubType.VOLVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/Chainbreaker.java b/Mage.Sets/src/mage/cards/c/Chainbreaker.java index 242b674379..13001c42c1 100644 --- a/Mage.Sets/src/mage/cards/c/Chainbreaker.java +++ b/Mage.Sets/src/mage/cards/c/Chainbreaker.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.RemoveCounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -52,7 +53,7 @@ public class Chainbreaker extends CardImpl { public Chainbreaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/ChainedThroatseeker.java b/Mage.Sets/src/mage/cards/c/ChainedThroatseeker.java index 49982d0d8c..450b36a37c 100644 --- a/Mage.Sets/src/mage/cards/c/ChainedThroatseeker.java +++ b/Mage.Sets/src/mage/cards/c/ChainedThroatseeker.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -51,7 +52,7 @@ public class ChainedThroatseeker extends CardImpl { public ChainedThroatseeker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/ChainedToTheRocks.java b/Mage.Sets/src/mage/cards/c/ChainedToTheRocks.java index 2a82397594..67e62f0cec 100644 --- a/Mage.Sets/src/mage/cards/c/ChainedToTheRocks.java +++ b/Mage.Sets/src/mage/cards/c/ChainedToTheRocks.java @@ -99,7 +99,7 @@ public class ChainedToTheRocks extends CardImpl { public ChainedToTheRocks(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant Mountain you control TargetPermanent auraTarget = new TargetPermanent(filter); diff --git a/Mage.Sets/src/mage/cards/c/ChainerDementiaMaster.java b/Mage.Sets/src/mage/cards/c/ChainerDementiaMaster.java index 3c3d4d76e5..605cd9f076 100644 --- a/Mage.Sets/src/mage/cards/c/ChainerDementiaMaster.java +++ b/Mage.Sets/src/mage/cards/c/ChainerDementiaMaster.java @@ -72,8 +72,8 @@ public class ChainerDementiaMaster extends CardImpl { public ChainerDementiaMaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Minion"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MINION); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/Chainflinger.java b/Mage.Sets/src/mage/cards/c/Chainflinger.java index 97e0477e50..40518970cb 100644 --- a/Mage.Sets/src/mage/cards/c/Chainflinger.java +++ b/Mage.Sets/src/mage/cards/c/Chainflinger.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -51,7 +52,7 @@ public class Chainflinger extends CardImpl { public Chainflinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ChamberOfManipulation.java b/Mage.Sets/src/mage/cards/c/ChamberOfManipulation.java index c5b0ee288b..d6548217a5 100644 --- a/Mage.Sets/src/mage/cards/c/ChamberOfManipulation.java +++ b/Mage.Sets/src/mage/cards/c/ChamberOfManipulation.java @@ -53,7 +53,7 @@ public class ChamberOfManipulation extends CardImpl { public ChamberOfManipulation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land diff --git a/Mage.Sets/src/mage/cards/c/ChamberedNautilus.java b/Mage.Sets/src/mage/cards/c/ChamberedNautilus.java index 4e1f73776c..f9688426c2 100644 --- a/Mage.Sets/src/mage/cards/c/ChamberedNautilus.java +++ b/Mage.Sets/src/mage/cards/c/ChamberedNautilus.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ChamberedNautilus extends CardImpl { public ChamberedNautilus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Nautilus"); - this.subtype.add("Beast"); + this.subtype.add(SubType.NAUTILUS); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ChameleonColossus.java b/Mage.Sets/src/mage/cards/c/ChameleonColossus.java index 08d381d775..68305d47fa 100644 --- a/Mage.Sets/src/mage/cards/c/ChameleonColossus.java +++ b/Mage.Sets/src/mage/cards/c/ChameleonColossus.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class ChameleonColossus extends CardImpl { public ChameleonColossus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/ChampionLancer.java b/Mage.Sets/src/mage/cards/c/ChampionLancer.java new file mode 100644 index 0000000000..71a9b84520 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChampionLancer.java @@ -0,0 +1,101 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.PreventAllDamageToSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author TheElk801 + */ +public class ChampionLancer extends CardImpl { + + public ChampionLancer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Prevent all damage that would be dealt to Champion Lancer by creatures. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventDamageToSourceByCardTypeEffect())); + } + + public ChampionLancer(final ChampionLancer card) { + super(card); + } + + @Override + public ChampionLancer copy() { + return new ChampionLancer(this); + } +} + +class PreventDamageToSourceByCardTypeEffect extends PreventAllDamageToSourceEffect { + + public PreventDamageToSourceByCardTypeEffect() { + super(Duration.WhileOnBattlefield); + } + + public PreventDamageToSourceByCardTypeEffect(final PreventDamageToSourceByCardTypeEffect effect) { + super(effect.duration); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (super.applies(event, source, game)) { + MageObject sourceObject = game.getObject(event.getSourceId()); + if (sourceObject != null && sourceObject.isCreature()) { + if (event.getTargetId().equals(source.getSourceId())) { + return true; + } + } + } + return false; + } + + @Override + public PreventAllDamageToSourceEffect copy() { + return new PreventAllDamageToSourceEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/c/ChampionOfArashin.java b/Mage.Sets/src/mage/cards/c/ChampionOfArashin.java index 205aa57708..335b6d0e3b 100644 --- a/Mage.Sets/src/mage/cards/c/ChampionOfArashin.java +++ b/Mage.Sets/src/mage/cards/c/ChampionOfArashin.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class ChampionOfArashin extends CardImpl { public ChampionOfArashin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Hound"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HOUND); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ChampionOfLambholt.java b/Mage.Sets/src/mage/cards/c/ChampionOfLambholt.java index 68e8bb8960..01dc8fe0e9 100644 --- a/Mage.Sets/src/mage/cards/c/ChampionOfLambholt.java +++ b/Mage.Sets/src/mage/cards/c/ChampionOfLambholt.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -61,8 +62,8 @@ public class ChampionOfLambholt extends CardImpl { public ChampionOfLambholt(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/ChampionOfRhonas.java b/Mage.Sets/src/mage/cards/c/ChampionOfRhonas.java index 6f6d4dbf4d..4d65190d27 100644 --- a/Mage.Sets/src/mage/cards/c/ChampionOfRhonas.java +++ b/Mage.Sets/src/mage/cards/c/ChampionOfRhonas.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ExertAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; /** @@ -46,8 +47,8 @@ public class ChampionOfRhonas extends CardImpl { public ChampionOfRhonas(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); - this.subtype.add("Jackal"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.JACKAL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/ChampionOfStraySouls.java b/Mage.Sets/src/mage/cards/c/ChampionOfStraySouls.java index ffd4ccc5a5..459920fa24 100644 --- a/Mage.Sets/src/mage/cards/c/ChampionOfStraySouls.java +++ b/Mage.Sets/src/mage/cards/c/ChampionOfStraySouls.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreatureCard; @@ -63,8 +64,8 @@ public class ChampionOfStraySouls extends CardImpl { public ChampionOfStraySouls(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Skeleton"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.SKELETON); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -74,6 +75,7 @@ public class ChampionOfStraySouls extends CardImpl { * ability, before you pay any costs. You can't target any of the * creatures you sacrifice. */ + //TODO: Make ability properly copiable // {3}{B}{B}, {T}, Sacrifice X other creatures: Return X target creatures from your graveyard to the battlefield. Effect effect = new ReturnFromGraveyardToBattlefieldTargetEffect(); effect.setText("Return X target creatures from your graveyard to the battlefield"); diff --git a/Mage.Sets/src/mage/cards/c/ChampionOfTheParish.java b/Mage.Sets/src/mage/cards/c/ChampionOfTheParish.java index ea3421069a..1bd661fd9e 100644 --- a/Mage.Sets/src/mage/cards/c/ChampionOfTheParish.java +++ b/Mage.Sets/src/mage/cards/c/ChampionOfTheParish.java @@ -55,8 +55,8 @@ public class ChampionOfTheParish extends CardImpl { public ChampionOfTheParish(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/ChampionOfWits.java b/Mage.Sets/src/mage/cards/c/ChampionOfWits.java index d280fac8f9..fd64d00a70 100644 --- a/Mage.Sets/src/mage/cards/c/ChampionOfWits.java +++ b/Mage.Sets/src/mage/cards/c/ChampionOfWits.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.EternalizeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -51,8 +52,8 @@ public class ChampionOfWits extends CardImpl { public ChampionOfWits(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Naga"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/ChampionsDrake.java b/Mage.Sets/src/mage/cards/c/ChampionsDrake.java index ad271d112a..924eef9a97 100644 --- a/Mage.Sets/src/mage/cards/c/ChampionsDrake.java +++ b/Mage.Sets/src/mage/cards/c/ChampionsDrake.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class ChampionsDrake extends CardImpl { public ChampionsDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.color.setBlue(true); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/ChampionsHelm.java b/Mage.Sets/src/mage/cards/c/ChampionsHelm.java index f9d729f672..cdaad44155 100644 --- a/Mage.Sets/src/mage/cards/c/ChampionsHelm.java +++ b/Mage.Sets/src/mage/cards/c/ChampionsHelm.java @@ -50,7 +50,7 @@ public class ChampionsHelm extends CardImpl { public ChampionsHelm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2))); diff --git a/Mage.Sets/src/mage/cards/c/ChampionsVictory.java b/Mage.Sets/src/mage/cards/c/ChampionsVictory.java new file mode 100644 index 0000000000..a3d2222ee2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChampionsVictory.java @@ -0,0 +1,73 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility; +import mage.abilities.condition.common.AttackedThisStepCondition; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.PhaseStep; +import mage.constants.TurnPhase; +import mage.target.common.TargetAttackingCreature; +import mage.watchers.common.PlayerAttackedStepWatcher; + +/** + * + * @author TheElk801 + */ +public class ChampionsVictory extends CardImpl { + + public ChampionsVictory(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}"); + + // Cast Champion's Victory only during the declare attackers step and only if you've been attacked this step. + Ability ability = new CastOnlyDuringPhaseStepSourceAbility( + TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance, + "Cast {this} only during the declare attackers step and only if you've been attacked this step." + ); + ability.addWatcher(new PlayerAttackedStepWatcher()); + this.addAbility(ability); + + // Return target attacking creature to its owner's hand. + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetAttackingCreature()); + } + + public ChampionsVictory(final ChampionsVictory card) { + super(card); + } + + @Override + public ChampionsVictory copy() { + return new ChampionsVictory(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/ChancellorOfTheAnnex.java b/Mage.Sets/src/mage/cards/c/ChancellorOfTheAnnex.java index 6bca6ded5b..94729d7276 100644 --- a/Mage.Sets/src/mage/cards/c/ChancellorOfTheAnnex.java +++ b/Mage.Sets/src/mage/cards/c/ChancellorOfTheAnnex.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class ChancellorOfTheAnnex extends CardImpl { public ChancellorOfTheAnnex(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/c/ChancellorOfTheDross.java b/Mage.Sets/src/mage/cards/c/ChancellorOfTheDross.java index b11c240d17..0a26a32dcd 100644 --- a/Mage.Sets/src/mage/cards/c/ChancellorOfTheDross.java +++ b/Mage.Sets/src/mage/cards/c/ChancellorOfTheDross.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.events.GameEvent; @@ -53,7 +54,7 @@ public class ChancellorOfTheDross extends CardImpl { public ChancellorOfTheDross(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/c/ChancellorOfTheForge.java b/Mage.Sets/src/mage/cards/c/ChancellorOfTheForge.java index 9f57b3b41d..941ab0ad9a 100644 --- a/Mage.Sets/src/mage/cards/c/ChancellorOfTheForge.java +++ b/Mage.Sets/src/mage/cards/c/ChancellorOfTheForge.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -61,7 +62,7 @@ public class ChancellorOfTheForge extends CardImpl { public ChancellorOfTheForge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/ChancellorOfTheSpires.java b/Mage.Sets/src/mage/cards/c/ChancellorOfTheSpires.java index 3d7826bb33..ca168443d1 100644 --- a/Mage.Sets/src/mage/cards/c/ChancellorOfTheSpires.java +++ b/Mage.Sets/src/mage/cards/c/ChancellorOfTheSpires.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -68,7 +69,7 @@ public class ChancellorOfTheSpires extends CardImpl { public ChancellorOfTheSpires(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(5); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/c/ChancellorOfTheTangle.java b/Mage.Sets/src/mage/cards/c/ChancellorOfTheTangle.java index 3166fb06de..5ba76c55ec 100644 --- a/Mage.Sets/src/mage/cards/c/ChancellorOfTheTangle.java +++ b/Mage.Sets/src/mage/cards/c/ChancellorOfTheTangle.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; @@ -52,7 +53,7 @@ public class ChancellorOfTheTangle extends CardImpl { public ChancellorOfTheTangle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.color.setGreen(true); this.power = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/c/Chandler.java b/Mage.Sets/src/mage/cards/c/Chandler.java index a1b10fa134..30c04c3d93 100644 --- a/Mage.Sets/src/mage/cards/c/Chandler.java +++ b/Mage.Sets/src/mage/cards/c/Chandler.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -58,8 +59,8 @@ public class Chandler extends CardImpl { public Chandler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/ChandraAblaze.java b/Mage.Sets/src/mage/cards/c/ChandraAblaze.java index 1149d6903f..48aa36b99c 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraAblaze.java +++ b/Mage.Sets/src/mage/cards/c/ChandraAblaze.java @@ -41,6 +41,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.filter.FilterCard; @@ -63,7 +64,7 @@ public class ChandraAblaze extends CardImpl { public ChandraAblaze(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{4}{R}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Chandra"); + this.subtype.add(SubType.CHANDRA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); diff --git a/Mage.Sets/src/mage/cards/c/ChandraFireOfKaladesh.java b/Mage.Sets/src/mage/cards/c/ChandraFireOfKaladesh.java index cdc996d610..55e1fcc0bf 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraFireOfKaladesh.java +++ b/Mage.Sets/src/mage/cards/c/ChandraFireOfKaladesh.java @@ -44,6 +44,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterSpell; @@ -65,8 +66,8 @@ public class ChandraFireOfKaladesh extends CardImpl { public ChandraFireOfKaladesh(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ChandraFlamecaller.java b/Mage.Sets/src/mage/cards/c/ChandraFlamecaller.java index 3a1c0755c3..77fcd01b7b 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraFlamecaller.java +++ b/Mage.Sets/src/mage/cards/c/ChandraFlamecaller.java @@ -43,6 +43,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.filter.StaticFilters; @@ -59,7 +60,7 @@ public class ChandraFlamecaller extends CardImpl { public ChandraFlamecaller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{4}{R}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Chandra"); + this.subtype.add(SubType.CHANDRA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/c/ChandraNalaar.java b/Mage.Sets/src/mage/cards/c/ChandraNalaar.java index 2a9ce3c8dc..fb4aec1f8b 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraNalaar.java +++ b/Mage.Sets/src/mage/cards/c/ChandraNalaar.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; @@ -56,7 +57,7 @@ public class ChandraNalaar extends CardImpl { public ChandraNalaar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{3}{R}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Chandra"); + this.subtype.add(SubType.CHANDRA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(6)); diff --git a/Mage.Sets/src/mage/cards/c/ChandraPyrogenius.java b/Mage.Sets/src/mage/cards/c/ChandraPyrogenius.java index 7089daab2f..bc27583600 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraPyrogenius.java +++ b/Mage.Sets/src/mage/cards/c/ChandraPyrogenius.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.TargetController; @@ -54,7 +55,7 @@ public class ChandraPyrogenius extends CardImpl { public ChandraPyrogenius(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{4}{R}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Chandra"); + this.subtype.add(SubType.CHANDRA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); diff --git a/Mage.Sets/src/mage/cards/c/ChandraPyromaster.java b/Mage.Sets/src/mage/cards/c/ChandraPyromaster.java index 350d85795f..2ad8974aa9 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraPyromaster.java +++ b/Mage.Sets/src/mage/cards/c/ChandraPyromaster.java @@ -62,7 +62,7 @@ public class ChandraPyromaster extends CardImpl { public ChandraPyromaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{R}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Chandra"); + this.subtype.add(SubType.CHANDRA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/c/ChandraRoaringFlame.java b/Mage.Sets/src/mage/cards/c/ChandraRoaringFlame.java index 9b494ed2eb..3f3fda5930 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraRoaringFlame.java +++ b/Mage.Sets/src/mage/cards/c/ChandraRoaringFlame.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.game.Game; @@ -55,7 +56,7 @@ public class ChandraRoaringFlame extends CardImpl { public ChandraRoaringFlame(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, ""); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Chandra"); + this.subtype.add(SubType.CHANDRA); this.color.setRed(true); this.nightCard = true; diff --git a/Mage.Sets/src/mage/cards/c/ChandraTheFirebrand.java b/Mage.Sets/src/mage/cards/c/ChandraTheFirebrand.java index 5849d6a8b9..1d474d1b25 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraTheFirebrand.java +++ b/Mage.Sets/src/mage/cards/c/ChandraTheFirebrand.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.game.Game; @@ -56,7 +57,7 @@ public class ChandraTheFirebrand extends CardImpl { public ChandraTheFirebrand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{3}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Chandra"); + this.subtype.add(SubType.CHANDRA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); @@ -90,7 +91,7 @@ public class ChandraTheFirebrand extends CardImpl { class ChandraTheFirebrandAbility extends DelayedTriggeredAbility { ChandraTheFirebrandAbility() { - super(new CopyTargetSpellEffect(), Duration.EndOfTurn); + super(new CopyTargetSpellEffect(true), Duration.EndOfTurn); } ChandraTheFirebrandAbility(final ChandraTheFirebrandAbility ability) { diff --git a/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java b/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java index 60dd9de3d4..cd8b93a66f 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java +++ b/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java @@ -43,6 +43,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.TargetController; @@ -61,7 +62,7 @@ public class ChandraTorchOfDefiance extends CardImpl { public ChandraTorchOfDefiance(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{R}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Chandra"); + this.subtype.add(SubType.CHANDRA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/c/ChandrasPhoenix.java b/Mage.Sets/src/mage/cards/c/ChandrasPhoenix.java index 07c6b951a3..ae9b57f278 100644 --- a/Mage.Sets/src/mage/cards/c/ChandrasPhoenix.java +++ b/Mage.Sets/src/mage/cards/c/ChandrasPhoenix.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -52,7 +53,7 @@ public class ChandrasPhoenix extends CardImpl { public ChandrasPhoenix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Phoenix"); + this.subtype.add(SubType.PHOENIX); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ChandrasSpitfire.java b/Mage.Sets/src/mage/cards/c/ChandrasSpitfire.java index 8cb4410656..158f5bb628 100644 --- a/Mage.Sets/src/mage/cards/c/ChandrasSpitfire.java +++ b/Mage.Sets/src/mage/cards/c/ChandrasSpitfire.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class ChandrasSpitfire extends CardImpl { public ChandrasSpitfire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/ChangelingBerserker.java b/Mage.Sets/src/mage/cards/c/ChangelingBerserker.java index f85a1cb1ec..d57e785cb8 100644 --- a/Mage.Sets/src/mage/cards/c/ChangelingBerserker.java +++ b/Mage.Sets/src/mage/cards/c/ChangelingBerserker.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class ChangelingBerserker extends CardImpl { public ChangelingBerserker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/ChangelingHero.java b/Mage.Sets/src/mage/cards/c/ChangelingHero.java index 7955e326d3..d9cd668053 100644 --- a/Mage.Sets/src/mage/cards/c/ChangelingHero.java +++ b/Mage.Sets/src/mage/cards/c/ChangelingHero.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class ChangelingHero extends CardImpl { public ChangelingHero(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/ChangelingSentinel.java b/Mage.Sets/src/mage/cards/c/ChangelingSentinel.java index 7ff7702788..fdc003ffc9 100644 --- a/Mage.Sets/src/mage/cards/c/ChangelingSentinel.java +++ b/Mage.Sets/src/mage/cards/c/ChangelingSentinel.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class ChangelingSentinel extends CardImpl { public ChangelingSentinel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ChangelingTitan.java b/Mage.Sets/src/mage/cards/c/ChangelingTitan.java index 9bd2c5730c..c04657ce4c 100644 --- a/Mage.Sets/src/mage/cards/c/ChangelingTitan.java +++ b/Mage.Sets/src/mage/cards/c/ChangelingTitan.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ChangelingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class ChangelingTitan extends CardImpl { public ChangelingTitan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/c/ChannelerInitiate.java b/Mage.Sets/src/mage/cards/c/ChannelerInitiate.java index 69586e8ada..6fd966640b 100644 --- a/Mage.Sets/src/mage/cards/c/ChannelerInitiate.java +++ b/Mage.Sets/src/mage/cards/c/ChannelerInitiate.java @@ -37,6 +37,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetControlledCreaturePermanent; @@ -49,8 +50,8 @@ public class ChannelerInitiate extends CardImpl { public ChannelerInitiate(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/ChantOfTheSkifsang.java b/Mage.Sets/src/mage/cards/c/ChantOfTheSkifsang.java index 3316f18bc4..736e8172c9 100644 --- a/Mage.Sets/src/mage/cards/c/ChantOfTheSkifsang.java +++ b/Mage.Sets/src/mage/cards/c/ChantOfTheSkifsang.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class ChantOfTheSkifsang extends CardImpl { public ChantOfTheSkifsang(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/c/ChantOfVituGhazi.java b/Mage.Sets/src/mage/cards/c/ChantOfVituGhazi.java index 60c9124019..df72a96504 100644 --- a/Mage.Sets/src/mage/cards/c/ChantOfVituGhazi.java +++ b/Mage.Sets/src/mage/cards/c/ChantOfVituGhazi.java @@ -1,98 +1,98 @@ -/* - * 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.cards.c; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.PreventionEffectData; -import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect; -import mage.abilities.keyword.ConvokeAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.filter.StaticFilters; -import mage.filter.common.FilterCreaturePermanent; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.players.Player; - -/** - * - * @author LevelX2 - */ -public class ChantOfVituGhazi extends CardImpl { - - public ChantOfVituGhazi(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{6}{W}{W}"); - - // Convoke - this.addAbility(new ConvokeAbility()); - - // Prevent all damage that would be dealt by creatures this turn. You gain life equal to the damage prevented this way. - this.getSpellAbility().addEffect(new ChantOfVituGhaziPreventEffect(StaticFilters.FILTER_PERMANENT_CREATURES, Duration.EndOfTurn, false)); - } - - public ChantOfVituGhazi(final ChantOfVituGhazi card) { - super(card); - } - - @Override - public ChantOfVituGhazi copy() { - return new ChantOfVituGhazi(this); - } -} - -class ChantOfVituGhaziPreventEffect extends PreventAllDamageByAllPermanentsEffect { - - public ChantOfVituGhaziPreventEffect(FilterCreaturePermanent filter, Duration duration, boolean onlyCombat) { - super(filter, duration, onlyCombat); - staticText = "Prevent all damage that would be dealt by creatures this turn. You gain life equal to the damage prevented this way"; - } - - public ChantOfVituGhaziPreventEffect(final ChantOfVituGhaziPreventEffect effect) { - super(effect); - } - - @Override - public ChantOfVituGhaziPreventEffect copy() { - return new ChantOfVituGhaziPreventEffect(this); - } - - @Override - public boolean replaceEvent(GameEvent event, Ability source, Game game) { - PreventionEffectData preventionData = preventDamageAction(event, source, game); - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - controller.gainLife(preventionData.getPreventedDamage(), game); - } - // damage amount is reduced or set to 0 so complete replacement of damage event is never neccessary - return false; - } - -} +/* + * 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.cards.c; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.PreventionEffectData; +import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect; +import mage.abilities.keyword.ConvokeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.StaticFilters; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class ChantOfVituGhazi extends CardImpl { + + public ChantOfVituGhazi(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{6}{W}{W}"); + + // Convoke + this.addAbility(new ConvokeAbility()); + + // Prevent all damage that would be dealt by creatures this turn. You gain life equal to the damage prevented this way. + this.getSpellAbility().addEffect(new ChantOfVituGhaziPreventEffect(StaticFilters.FILTER_PERMANENT_CREATURES, Duration.EndOfTurn, false)); + } + + public ChantOfVituGhazi(final ChantOfVituGhazi card) { + super(card); + } + + @Override + public ChantOfVituGhazi copy() { + return new ChantOfVituGhazi(this); + } +} + +class ChantOfVituGhaziPreventEffect extends PreventAllDamageByAllPermanentsEffect { + + public ChantOfVituGhaziPreventEffect(FilterCreaturePermanent filter, Duration duration, boolean onlyCombat) { + super(filter, duration, onlyCombat); + staticText = "Prevent all damage that would be dealt by creatures this turn. You gain life equal to the damage prevented this way"; + } + + public ChantOfVituGhaziPreventEffect(final ChantOfVituGhaziPreventEffect effect) { + super(effect); + } + + @Override + public ChantOfVituGhaziPreventEffect copy() { + return new ChantOfVituGhaziPreventEffect(this); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + PreventionEffectData preventionData = preventDamageAction(event, source, game); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + controller.gainLife(preventionData.getPreventedDamage(), game); + } + // damage amount is reduced or set to 0 so complete replacement of damage event is never neccessary + return false; + } + +} diff --git a/Mage.Sets/src/mage/cards/c/ChaosHarlequin.java b/Mage.Sets/src/mage/cards/c/ChaosHarlequin.java new file mode 100644 index 0000000000..8da3349e7e --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChaosHarlequin.java @@ -0,0 +1,107 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author L_J + */ +public class ChaosHarlequin extends CardImpl { + + public ChaosHarlequin(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); + this.subtype.add(SubType.HUMAN); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // {R}: Exile the top card of your library. If that card is a land card, Chaos Harlequin gets -4/-0 until end of turn. Otherwise, Chaos Harlequin gets +2/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ChaosHarlequinEffect(), new ManaCostsImpl("{R}"))); + } + + public ChaosHarlequin(final ChaosHarlequin card) { + super(card); + } + + @Override + public ChaosHarlequin copy() { + return new ChaosHarlequin(this); + } +} + +class ChaosHarlequinEffect extends OneShotEffect { + + public ChaosHarlequinEffect() { + super(Outcome.Benefit); + this.staticText = "Exile the top card of your library. If that card is a land card, {this} gets -4/-0 until end of turn. Otherwise, {this} gets +2/+0 until end of turn"; + } + + public ChaosHarlequinEffect(final ChaosHarlequinEffect effect) { + super(effect); + } + + @Override + public ChaosHarlequinEffect copy() { + return new ChaosHarlequinEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + Card card = player.getLibrary().removeFromTop(game); + if (card != null) { + player.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY, true); + if (card.isLand()) { + game.addEffect(new BoostSourceEffect(-4, 0, Duration.EndOfTurn), source); + } else { + game.addEffect(new BoostSourceEffect(2, 0, Duration.EndOfTurn), source); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/c/ChaosImps.java b/Mage.Sets/src/mage/cards/c/ChaosImps.java index f195faebed..08bb337550 100644 --- a/Mage.Sets/src/mage/cards/c/ChaosImps.java +++ b/Mage.Sets/src/mage/cards/c/ChaosImps.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.UnleashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -50,7 +51,7 @@ public class ChaosImps extends CardImpl { public ChaosImps(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/ChaosMaw.java b/Mage.Sets/src/mage/cards/c/ChaosMaw.java index 2d2e260b0e..b313293221 100644 --- a/Mage.Sets/src/mage/cards/c/ChaosMaw.java +++ b/Mage.Sets/src/mage/cards/c/ChaosMaw.java @@ -7,6 +7,7 @@ import mage.abilities.effects.common.DamageAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -17,7 +18,7 @@ public class ChaosMaw extends CardImpl { } public ChaosMaw(UUID ownerId, CardSetInfo cardSetInfo){ super(ownerId, cardSetInfo, new CardType[]{CardType.CREATURE}, "{5}{R}{R}"); - subtype.add("Hellion"); + subtype.add(SubType.HELLION); power = new MageInt(6); toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/c/ChaosMoon.java b/Mage.Sets/src/mage/cards/c/ChaosMoon.java new file mode 100644 index 0000000000..9db40417ac --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChaosMoon.java @@ -0,0 +1,224 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.MageObject; +import mage.Mana; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.TapForManaAllTriggeredManaAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AddManaToManaPoolTargetControllerEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.mana.DelayedTriggeredManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +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.ManaEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author L_J + */ +public class ChaosMoon extends CardImpl { + + public ChaosMoon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}"); + + + // At the beginning of each upkeep, count the number of permanents. If the number is odd, until end of turn, red creatures get +1/+1 and whenever a player taps a Mountain for mana, that player adds {R} to his or her mana pool (in addition to the mana the land produces). If the number is even, until end of turn, red creatures get -1/-1 and if a player taps a Mountain for mana, that Mountain produces colorless mana instead of any other type. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ChaosMoonEffect(), TargetController.ANY, false)); + } + + public ChaosMoon(final ChaosMoon card) { + super(card); + } + + @Override + public ChaosMoon copy() { + return new ChaosMoon(this); + } +} + +class ChaosMoonEffect extends OneShotEffect { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("red creatures"); + + static { + filter.add(new ColorPredicate(ObjectColor.RED)); + } + + public ChaosMoonEffect() { + super(Outcome.Neutral); + this.staticText = "count the number of permanents. If the number is odd, until end of turn, red creatures get +1/+1 and whenever a player taps a Mountain for mana, that player adds {R} to his or her mana pool (in addition to the mana the land produces). If the number is even, until end of turn, red creatures get -1/-1 and if a player taps a Mountain for mana, that Mountain produces colorless mana instead of any other type"; + } + + public ChaosMoonEffect(final ChaosMoonEffect effect) { + super(effect); + } + + @Override + public ChaosMoonEffect copy() { + return new ChaosMoonEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + int permanentsInPlay = new PermanentsOnBattlefieldCount().calculate(game, source, null); + // Odd + if (permanentsInPlay % 2 != 0) { + game.addEffect(new BoostAllEffect(1, 1, Duration.EndOfTurn, filter, false), source); + new CreateDelayedTriggeredAbilityEffect(new ChaosMoonOddTriggeredAbility()).apply(game, source); + } + // Even + else { + game.addEffect(new BoostAllEffect(-1, -1, Duration.EndOfTurn, filter, false), source); + game.addEffect(new ChaosMoonEvenReplacementEffect(), source); + } + return true; + } + return false; + } +} + +class ChaosMoonOddTriggeredAbility extends DelayedTriggeredManaAbility { + + private static final FilterLandPermanent filter = new FilterLandPermanent("Mountain"); + + static { + filter.add(new SubtypePredicate(SubType.MOUNTAIN)); + } + + public ChaosMoonOddTriggeredAbility() { + super(new AddManaToManaPoolTargetControllerEffect(new Mana(ColoredManaSymbol.R), "his or her"), Duration.EndOfTurn, false); + this.usesStack = false; + } + + public ChaosMoonOddTriggeredAbility(ChaosMoonOddTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.TAPPED_FOR_MANA; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent land = game.getPermanent(event.getTargetId()); + if (land != null && filter.match(land, game)) { + for (Effect effect : this.getEffects()) { + effect.setTargetPointer(new FixedTarget(land.getControllerId())); + } + return true; + } + return false; + } + + @Override + public ChaosMoonOddTriggeredAbility copy() { + return new ChaosMoonOddTriggeredAbility(this); + } + + @Override + public String getRule() { + return "Until end of turn, whenever a player taps a Mountain for mana, that player adds {R} to his or her mana pool"; + } +} + +class ChaosMoonEvenReplacementEffect extends ReplacementEffectImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent("Mountain"); + + static { + filter.add(new SubtypePredicate(SubType.MOUNTAIN)); + } + + ChaosMoonEvenReplacementEffect() { + super(Duration.EndOfTurn, Outcome.Neutral); + staticText = "Until end of turn, if a Mountain is tapped for mana, it produces colorless mana instead of any other type."; + } + + ChaosMoonEvenReplacementEffect(final ChaosMoonEvenReplacementEffect effect) { + super(effect); + } + + @Override + public ChaosMoonEvenReplacementEffect copy() { + return new ChaosMoonEvenReplacementEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + ManaEvent manaEvent = (ManaEvent) event; + Mana mana = manaEvent.getMana(); + mana.setToMana(Mana.ColorlessMana(mana.count())); + return false; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == EventType.TAPPED_FOR_MANA; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + MageObject mageObject = game.getObject(event.getSourceId()); + if (mageObject != null && mageObject.isLand()) { + Permanent land = game.getPermanent(event.getSourceId()); + return land != null && filter.match(land, game); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/c/Chaosphere.java b/Mage.Sets/src/mage/cards/c/Chaosphere.java index f419c8a3d0..9e1ae1af64 100644 --- a/Mage.Sets/src/mage/cards/c/Chaosphere.java +++ b/Mage.Sets/src/mage/cards/c/Chaosphere.java @@ -1,117 +1,117 @@ -/* - * 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.cards.c; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.RestrictionEffect; -import mage.abilities.effects.common.continuous.GainAbilityAllEffect; -import mage.abilities.keyword.FlyingAbility; -import mage.abilities.keyword.ReachAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SuperType; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.AbilityPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; - -/** - * - * @author jeffwadsworth - */ -public class Chaosphere extends CardImpl { - - static final private FilterCreaturePermanent filterCreature = new FilterCreaturePermanent(); - static final private String rule = "Creatures without flying have reach."; - - static { - filterCreature.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); - } - - public Chaosphere(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); - - addSuperType(SuperType.WORLD); - - // Creatures with flying can block only creatures with flying. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ChaosphereEffect())); - - // Creatures without flying have reach. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ReachAbility.getInstance(), Duration.WhileOnBattlefield, filterCreature, rule))); - - } - - public Chaosphere(final Chaosphere card) { - super(card); - } - - @Override - public Chaosphere copy() { - return new Chaosphere(this); - } -} - -class ChaosphereEffect extends RestrictionEffect { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures with flying"); - - static { - filter.add(new AbilityPredicate(FlyingAbility.class)); - } - - public ChaosphereEffect() { - super(Duration.WhileOnBattlefield); - staticText = "creatures with flying can block only creatures with flying"; - } - - public ChaosphereEffect(final ChaosphereEffect effect) { - super(effect); - } - - @Override - public boolean applies(Permanent permanent, Ability source, Game game) { - return filter.match(permanent, source.getSourceId(), source.getControllerId(), game); - } - - @Override - public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { - return attacker.hasAbility(FlyingAbility.getInstance().getId(), game); - } - - @Override - public ChaosphereEffect copy() { - return new ChaosphereEffect(this); - } - -} +/* + * 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.cards.c; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.RestrictionEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author jeffwadsworth + */ +public class Chaosphere extends CardImpl { + + static final private FilterCreaturePermanent filterCreature = new FilterCreaturePermanent(); + static final private String rule = "Creatures without flying have reach."; + + static { + filterCreature.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + + public Chaosphere(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + + addSuperType(SuperType.WORLD); + + // Creatures with flying can block only creatures with flying. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ChaosphereEffect())); + + // Creatures without flying have reach. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ReachAbility.getInstance(), Duration.WhileOnBattlefield, filterCreature, rule))); + + } + + public Chaosphere(final Chaosphere card) { + super(card); + } + + @Override + public Chaosphere copy() { + return new Chaosphere(this); + } +} + +class ChaosphereEffect extends RestrictionEffect { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures with flying"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public ChaosphereEffect() { + super(Duration.WhileOnBattlefield); + staticText = "creatures with flying can block only creatures with flying"; + } + + public ChaosphereEffect(final ChaosphereEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return filter.match(permanent, source.getSourceId(), source.getControllerId(), game); + } + + @Override + public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { + return attacker.hasAbility(FlyingAbility.getInstance().getId(), game); + } + + @Override + public ChaosphereEffect copy() { + return new ChaosphereEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/c/ChaoticGoo.java b/Mage.Sets/src/mage/cards/c/ChaoticGoo.java index 34fd4f3798..ae6ed5d317 100644 --- a/Mage.Sets/src/mage/cards/c/ChaoticGoo.java +++ b/Mage.Sets/src/mage/cards/c/ChaoticGoo.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class ChaoticGoo extends CardImpl { public ChaoticGoo(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Ooze"); + this.subtype.add(SubType.OOZE); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/c/ChapelGeist.java b/Mage.Sets/src/mage/cards/c/ChapelGeist.java index 6de8df13af..b330a6932d 100644 --- a/Mage.Sets/src/mage/cards/c/ChapelGeist.java +++ b/Mage.Sets/src/mage/cards/c/ChapelGeist.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class ChapelGeist extends CardImpl { public ChapelGeist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CharRumbler.java b/Mage.Sets/src/mage/cards/c/CharRumbler.java index d13e205d95..6148012759 100644 --- a/Mage.Sets/src/mage/cards/c/CharRumbler.java +++ b/Mage.Sets/src/mage/cards/c/CharRumbler.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class CharRumbler extends CardImpl { public CharRumbler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(-1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/ChargeAcrossTheAraba.java b/Mage.Sets/src/mage/cards/c/ChargeAcrossTheAraba.java index b12f6fd0ad..9cbb73c199 100644 --- a/Mage.Sets/src/mage/cards/c/ChargeAcrossTheAraba.java +++ b/Mage.Sets/src/mage/cards/c/ChargeAcrossTheAraba.java @@ -46,7 +46,7 @@ public class ChargeAcrossTheAraba extends CardImpl { public ChargeAcrossTheAraba(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{W}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Sweep - Return any number of Plains you control to their owner's hand. Creatures you control get +1/+1 until end of turn for each Plains returned this way. diff --git a/Mage.Sets/src/mage/cards/c/ChargingBadger.java b/Mage.Sets/src/mage/cards/c/ChargingBadger.java index 2b7e37006e..f45a063295 100644 --- a/Mage.Sets/src/mage/cards/c/ChargingBadger.java +++ b/Mage.Sets/src/mage/cards/c/ChargingBadger.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class ChargingBadger extends CardImpl { public ChargingBadger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Badger"); + this.subtype.add(SubType.BADGER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/ChargingBandits.java b/Mage.Sets/src/mage/cards/c/ChargingBandits.java index 4f585b2deb..9b2eaacdca 100644 --- a/Mage.Sets/src/mage/cards/c/ChargingBandits.java +++ b/Mage.Sets/src/mage/cards/c/ChargingBandits.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class ChargingBandits extends CardImpl { public ChargingBandits(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/ChargingCinderhorn.java b/Mage.Sets/src/mage/cards/c/ChargingCinderhorn.java index 50ef93dd28..b6b782dc70 100644 --- a/Mage.Sets/src/mage/cards/c/ChargingCinderhorn.java +++ b/Mage.Sets/src/mage/cards/c/ChargingCinderhorn.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -57,8 +58,8 @@ public class ChargingCinderhorn extends CardImpl { public ChargingCinderhorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Ox"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.OX); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ChargingGriffin.java b/Mage.Sets/src/mage/cards/c/ChargingGriffin.java index 4ae324c17f..9cd953e2db 100644 --- a/Mage.Sets/src/mage/cards/c/ChargingGriffin.java +++ b/Mage.Sets/src/mage/cards/c/ChargingGriffin.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,7 +46,7 @@ public class ChargingGriffin extends CardImpl { public ChargingGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ChargingMonstrosaur.java b/Mage.Sets/src/mage/cards/c/ChargingMonstrosaur.java new file mode 100644 index 0000000000..f56a6d9c23 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChargingMonstrosaur.java @@ -0,0 +1,68 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.constants.SubType; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class ChargingMonstrosaur extends CardImpl { + + public ChargingMonstrosaur(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + } + + public ChargingMonstrosaur(final ChargingMonstrosaur card) { + super(card); + } + + @Override + public ChargingMonstrosaur copy() { + return new ChargingMonstrosaur(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/ChargingPaladin.java b/Mage.Sets/src/mage/cards/c/ChargingPaladin.java index ab5e0e959f..d23e9d4e28 100644 --- a/Mage.Sets/src/mage/cards/c/ChargingPaladin.java +++ b/Mage.Sets/src/mage/cards/c/ChargingPaladin.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,8 +45,8 @@ public class ChargingPaladin extends CardImpl { public ChargingPaladin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ChargingRhino.java b/Mage.Sets/src/mage/cards/c/ChargingRhino.java index e7caffc2a7..8b9f3754fb 100644 --- a/Mage.Sets/src/mage/cards/c/ChargingRhino.java +++ b/Mage.Sets/src/mage/cards/c/ChargingRhino.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByMoreThanOneSourceEffe import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -44,7 +45,7 @@ public class ChargingRhino extends CardImpl { public ChargingRhino(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Rhino"); + this.subtype.add(SubType.RHINO); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/ChargingSlateback.java b/Mage.Sets/src/mage/cards/c/ChargingSlateback.java index ded6d7eef0..ee7ae26219 100644 --- a/Mage.Sets/src/mage/cards/c/ChargingSlateback.java +++ b/Mage.Sets/src/mage/cards/c/ChargingSlateback.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class ChargingSlateback extends CardImpl { public ChargingSlateback(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/ChargingTroll.java b/Mage.Sets/src/mage/cards/c/ChargingTroll.java index 45160e988e..3740430d70 100644 --- a/Mage.Sets/src/mage/cards/c/ChargingTroll.java +++ b/Mage.Sets/src/mage/cards/c/ChargingTroll.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class ChargingTroll extends CardImpl { public ChargingTroll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{W}"); - this.subtype.add("Troll"); + this.subtype.add(SubType.TROLL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/ChariotOfVictory.java b/Mage.Sets/src/mage/cards/c/ChariotOfVictory.java index 8b2caa788e..9207df79dd 100644 --- a/Mage.Sets/src/mage/cards/c/ChariotOfVictory.java +++ b/Mage.Sets/src/mage/cards/c/ChariotOfVictory.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,13 +52,13 @@ import mage.constants.Zone; public class ChariotOfVictory extends CardImpl { public ChariotOfVictory(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has first strike, trample, and haste. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT)); Effect effect = new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.EQUIPMENT); - effect.setText(", trample"); + effect.setText(", trample,"); ability.addEffect(effect); effect = new GainAbilityAttachedEffect(HasteAbility.getInstance(), AttachmentType.EQUIPMENT); effect.setText("and haste"); diff --git a/Mage.Sets/src/mage/cards/c/Charisma.java b/Mage.Sets/src/mage/cards/c/Charisma.java index 33ed814348..cfde550460 100644 --- a/Mage.Sets/src/mage/cards/c/Charisma.java +++ b/Mage.Sets/src/mage/cards/c/Charisma.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.target.TargetPermanent; @@ -55,7 +56,7 @@ public class Charisma extends CardImpl { public Charisma(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CharmbreakerDevils.java b/Mage.Sets/src/mage/cards/c/CharmbreakerDevils.java index e3e437fd92..36e9897dfc 100644 --- a/Mage.Sets/src/mage/cards/c/CharmbreakerDevils.java +++ b/Mage.Sets/src/mage/cards/c/CharmbreakerDevils.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -66,7 +67,7 @@ public class CharmbreakerDevils extends CardImpl { public CharmbreakerDevils(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CharmedGriffin.java b/Mage.Sets/src/mage/cards/c/CharmedGriffin.java index 0ad523dcfb..39f417082a 100644 --- a/Mage.Sets/src/mage/cards/c/CharmedGriffin.java +++ b/Mage.Sets/src/mage/cards/c/CharmedGriffin.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterArtifactOrEnchantmentCard; @@ -53,7 +54,7 @@ public class CharmedGriffin extends CardImpl { public CharmedGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CharnelhoardWurm.java b/Mage.Sets/src/mage/cards/c/CharnelhoardWurm.java index ef05089f8e..4be731363f 100644 --- a/Mage.Sets/src/mage/cards/c/CharnelhoardWurm.java +++ b/Mage.Sets/src/mage/cards/c/CharnelhoardWurm.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCardInYourGraveyard; /** @@ -46,7 +47,7 @@ public class CharnelhoardWurm extends CardImpl { public CharnelhoardWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{R}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/c/ChartACourse.java b/Mage.Sets/src/mage/cards/c/ChartACourse.java new file mode 100644 index 0000000000..5e205b28b7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChartACourse.java @@ -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.cards.c; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.players.Player; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * + * @author TheElk801 + */ +public class ChartACourse extends CardImpl { + + public ChartACourse(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{U}"); + + // Draw two cards. Then discard a card unless you attacked with a creature this turn. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2)); + this.getSpellAbility().addEffect(new ChartACourseEffect()); + this.getSpellAbility().addWatcher(new PlayerAttackedWatcher()); + } + + public ChartACourse(final ChartACourse card) { + super(card); + } + + @Override + public ChartACourse copy() { + return new ChartACourse(this); + } +} + +class ChartACourseEffect extends OneShotEffect { + + ChartACourseEffect() { + super(Outcome.Neutral); + this.staticText = "Then discard a card unless you attacked with a creature this turn."; + } + + ChartACourseEffect(final ChartACourseEffect effect) { + super(effect); + } + + @Override + public ChartACourseEffect copy() { + return new ChartACourseEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null && !RaidCondition.instance.apply(game, source)) { + player.discard(1, false, source, game); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/c/ChartoothCougar.java b/Mage.Sets/src/mage/cards/c/ChartoothCougar.java index 4e3981606b..8300964eec 100644 --- a/Mage.Sets/src/mage/cards/c/ChartoothCougar.java +++ b/Mage.Sets/src/mage/cards/c/ChartoothCougar.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MountaincyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class ChartoothCougar extends CardImpl { public ChartoothCougar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Cat"); - this.subtype.add("Beast"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/ChasmDrake.java b/Mage.Sets/src/mage/cards/c/ChasmDrake.java index 05176e4e41..0b8ee850e2 100644 --- a/Mage.Sets/src/mage/cards/c/ChasmDrake.java +++ b/Mage.Sets/src/mage/cards/c/ChasmDrake.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetControlledCreaturePermanent; @@ -47,7 +48,7 @@ public class ChasmDrake extends CardImpl { public ChasmDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/ChasmGuide.java b/Mage.Sets/src/mage/cards/c/ChasmGuide.java index 9f534f69bd..8f774529f0 100644 --- a/Mage.Sets/src/mage/cards/c/ChasmGuide.java +++ b/Mage.Sets/src/mage/cards/c/ChasmGuide.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; @@ -46,9 +47,9 @@ public class ChasmGuide extends CardImpl { public ChasmGuide(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Scout"); - this.subtype.add("Ally"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SCOUT); + this.subtype.add(SubType.ALLY); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ChasmSkulker.java b/Mage.Sets/src/mage/cards/c/ChasmSkulker.java index 00364e0697..1af20617a1 100644 --- a/Mage.Sets/src/mage/cards/c/ChasmSkulker.java +++ b/Mage.Sets/src/mage/cards/c/ChasmSkulker.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -54,8 +55,8 @@ public class ChasmSkulker extends CardImpl { public ChasmSkulker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Squid"); - this.subtype.add("Horror"); + this.subtype.add(SubType.SQUID); + this.subtype.add(SubType.HORROR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/Chewbacca.java b/Mage.Sets/src/mage/cards/c/Chewbacca.java index 6141b7556b..f87b5972ef 100644 --- a/Mage.Sets/src/mage/cards/c/Chewbacca.java +++ b/Mage.Sets/src/mage/cards/c/Chewbacca.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.filter.common.FilterControlledCreaturePermanent; @@ -57,8 +58,8 @@ public class Chewbacca extends CardImpl { public Chewbacca(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Wookiee"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.WOOKIEE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/ChiefChirpa.java b/Mage.Sets/src/mage/cards/c/ChiefChirpa.java index b2fc404de4..855cea3a05 100644 --- a/Mage.Sets/src/mage/cards/c/ChiefChirpa.java +++ b/Mage.Sets/src/mage/cards/c/ChiefChirpa.java @@ -72,8 +72,8 @@ public class ChiefChirpa extends CardImpl { public ChiefChirpa(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Ewok"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.EWOK); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ChiefEngineer.java b/Mage.Sets/src/mage/cards/c/ChiefEngineer.java index e3ab5aa26f..6d2c2ff102 100644 --- a/Mage.Sets/src/mage/cards/c/ChiefEngineer.java +++ b/Mage.Sets/src/mage/cards/c/ChiefEngineer.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ConvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterArtifactSpell; @@ -46,8 +47,8 @@ public class ChiefEngineer extends CardImpl { public ChiefEngineer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/ChiefOfTheEdge.java b/Mage.Sets/src/mage/cards/c/ChiefOfTheEdge.java index 36f7a253e8..2b7e2ff4f2 100644 --- a/Mage.Sets/src/mage/cards/c/ChiefOfTheEdge.java +++ b/Mage.Sets/src/mage/cards/c/ChiefOfTheEdge.java @@ -54,8 +54,8 @@ public class ChiefOfTheEdge extends CardImpl { public ChiefOfTheEdge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{B}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ChiefOfTheFoundry.java b/Mage.Sets/src/mage/cards/c/ChiefOfTheFoundry.java index 8b309aabc7..09f2b30afa 100644 --- a/Mage.Sets/src/mage/cards/c/ChiefOfTheFoundry.java +++ b/Mage.Sets/src/mage/cards/c/ChiefOfTheFoundry.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class ChiefOfTheFoundry extends CardImpl { public ChiefOfTheFoundry(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/ChiefOfTheScale.java b/Mage.Sets/src/mage/cards/c/ChiefOfTheScale.java index b66ef55ed9..1247817099 100644 --- a/Mage.Sets/src/mage/cards/c/ChiefOfTheScale.java +++ b/Mage.Sets/src/mage/cards/c/ChiefOfTheScale.java @@ -54,8 +54,8 @@ public class ChiefOfTheScale extends CardImpl { public ChiefOfTheScale(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{B}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/ChieftainEnDal.java b/Mage.Sets/src/mage/cards/c/ChieftainEnDal.java index dfb6edf9d5..e6f55fc33c 100644 --- a/Mage.Sets/src/mage/cards/c/ChieftainEnDal.java +++ b/Mage.Sets/src/mage/cards/c/ChieftainEnDal.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterAttackingCreature; @@ -48,8 +49,8 @@ public class ChieftainEnDal extends CardImpl { public ChieftainEnDal(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ChildOfAlara.java b/Mage.Sets/src/mage/cards/c/ChildOfAlara.java index 1e7e4e40a4..ad4c0d7f95 100644 --- a/Mage.Sets/src/mage/cards/c/ChildOfAlara.java +++ b/Mage.Sets/src/mage/cards/c/ChildOfAlara.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.common.FilterNonlandPermanent; @@ -47,7 +48,7 @@ public class ChildOfAlara extends CardImpl { public ChildOfAlara(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/c/ChildOfGaea.java b/Mage.Sets/src/mage/cards/c/ChildOfGaea.java index f6be0ebb36..4cca45a94e 100644 --- a/Mage.Sets/src/mage/cards/c/ChildOfGaea.java +++ b/Mage.Sets/src/mage/cards/c/ChildOfGaea.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class ChildOfGaea extends CardImpl { public ChildOfGaea(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/c/ChildOfNight.java b/Mage.Sets/src/mage/cards/c/ChildOfNight.java index 9a8c8c953e..fcfcba2415 100644 --- a/Mage.Sets/src/mage/cards/c/ChildOfNight.java +++ b/Mage.Sets/src/mage/cards/c/ChildOfNight.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class ChildOfNight extends CardImpl { public ChildOfNight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/ChildOfThorns.java b/Mage.Sets/src/mage/cards/c/ChildOfThorns.java index e3e727f05d..390a7cbff0 100644 --- a/Mage.Sets/src/mage/cards/c/ChildOfThorns.java +++ b/Mage.Sets/src/mage/cards/c/ChildOfThorns.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class ChildOfThorns extends CardImpl { public ChildOfThorns(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/ChildhoodHorror.java b/Mage.Sets/src/mage/cards/c/ChildhoodHorror.java index 8e36f0837e..4452370a73 100644 --- a/Mage.Sets/src/mage/cards/c/ChildhoodHorror.java +++ b/Mage.Sets/src/mage/cards/c/ChildhoodHorror.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class ChildhoodHorror extends CardImpl { public ChildhoodHorror(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ChildrenOfKorlis.java b/Mage.Sets/src/mage/cards/c/ChildrenOfKorlis.java index 244ab124c3..21fc131f49 100644 --- a/Mage.Sets/src/mage/cards/c/ChildrenOfKorlis.java +++ b/Mage.Sets/src/mage/cards/c/ChildrenOfKorlis.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.watchers.common.PlayerLostLifeWatcher; @@ -50,9 +51,9 @@ public class ChildrenOfKorlis extends CardImpl { public ChildrenOfKorlis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/ChillHaunting.java b/Mage.Sets/src/mage/cards/c/ChillHaunting.java index 4b678c0411..77610b404d 100644 --- a/Mage.Sets/src/mage/cards/c/ChillHaunting.java +++ b/Mage.Sets/src/mage/cards/c/ChillHaunting.java @@ -50,7 +50,7 @@ public class ChillHaunting extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}"); // As an additional cost to cast Chill Haunting, exile X creature cards from your graveyard. - this.getSpellAbility().addCost(new ExileXFromYourGraveCost(new FilterCreatureCard("cards from your graveyard"))); + this.getSpellAbility().addCost(new ExileXFromYourGraveCost(new FilterCreatureCard("creature cards from your graveyard"), true)); // Target creature gets -X/-X until end of turn. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/c/ChillingApparition.java b/Mage.Sets/src/mage/cards/c/ChillingApparition.java index 45cd6a6674..d9c336d954 100644 --- a/Mage.Sets/src/mage/cards/c/ChillingApparition.java +++ b/Mage.Sets/src/mage/cards/c/ChillingApparition.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class ChillingApparition extends CardImpl { public ChillingApparition(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/ChillingShade.java b/Mage.Sets/src/mage/cards/c/ChillingShade.java index 51d6506f18..0205c4d206 100644 --- a/Mage.Sets/src/mage/cards/c/ChillingShade.java +++ b/Mage.Sets/src/mage/cards/c/ChillingShade.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class ChillingShade extends CardImpl { public ChillingShade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); addSuperType(SuperType.SNOW); - this.subtype.add("Shade"); + this.subtype.add(SubType.SHADE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/ChimeOfNight.java b/Mage.Sets/src/mage/cards/c/ChimeOfNight.java index 85d0e436bb..bb87ac0332 100644 --- a/Mage.Sets/src/mage/cards/c/ChimeOfNight.java +++ b/Mage.Sets/src/mage/cards/c/ChimeOfNight.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -59,7 +60,7 @@ public class ChimeOfNight extends CardImpl { public ChimeOfNight(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/ChimericCoils.java b/Mage.Sets/src/mage/cards/c/ChimericCoils.java index a81fb795a4..0db1ff9d60 100644 --- a/Mage.Sets/src/mage/cards/c/ChimericCoils.java +++ b/Mage.Sets/src/mage/cards/c/ChimericCoils.java @@ -90,7 +90,7 @@ class ChimericCoilsEffect extends ContinuousEffectImpl { case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { permanent.addCardType(CardType.CREATURE); - permanent.getSubtype(game).add("Construct"); + permanent.getSubtype(game).add(SubType.CONSTRUCT); } break; case PTChangingEffects_7: diff --git a/Mage.Sets/src/mage/cards/c/ChimericEgg.java b/Mage.Sets/src/mage/cards/c/ChimericEgg.java index cf0e0e75cd..c68cd64383 100644 --- a/Mage.Sets/src/mage/cards/c/ChimericEgg.java +++ b/Mage.Sets/src/mage/cards/c/ChimericEgg.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.Counter; @@ -86,7 +87,7 @@ public class ChimericEgg extends CardImpl { super("", "6/6 Construct artifact creature with trample"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); power = new MageInt(6); toughness = new MageInt(6); this.addAbility(TrampleAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/c/ChimericIdol.java b/Mage.Sets/src/mage/cards/c/ChimericIdol.java index 9f71be4cfa..3db3bc1ab6 100644 --- a/Mage.Sets/src/mage/cards/c/ChimericIdol.java +++ b/Mage.Sets/src/mage/cards/c/ChimericIdol.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -74,7 +75,7 @@ class ChimericIdolToken extends Token { super("Turtle", "3/3 Turtle artifact creature token"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Turtle"); + subtype.add(SubType.TURTLE); power = new MageInt(3); toughness = new MageInt(3); } diff --git a/Mage.Sets/src/mage/cards/c/ChimericMass.java b/Mage.Sets/src/mage/cards/c/ChimericMass.java index f26c0b71c0..8ae0d1fb1a 100644 --- a/Mage.Sets/src/mage/cards/c/ChimericMass.java +++ b/Mage.Sets/src/mage/cards/c/ChimericMass.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -77,7 +78,7 @@ class ChimericMassToken extends Token { public ChimericMassToken() { super("", "Construct artifact creature with \"This creature's power and toughness are each equal to the number of charge counters on it.\""); cardType.add(CardType.CREATURE); - subtype.add("Construct"); + subtype.add(SubType.CONSTRUCT); power = new MageInt(0); toughness = new MageInt(0); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetPowerToughnessSourceEffect(new CountersSourceCount(CounterType.CHARGE), Duration.WhileOnBattlefield))); diff --git a/Mage.Sets/src/mage/cards/c/ChimericStaff.java b/Mage.Sets/src/mage/cards/c/ChimericStaff.java index 2c4c4aca3c..fea9809b78 100644 --- a/Mage.Sets/src/mage/cards/c/ChimericStaff.java +++ b/Mage.Sets/src/mage/cards/c/ChimericStaff.java @@ -85,7 +85,7 @@ class ChimericStaffEffect extends ContinuousEffectImpl { case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { permanent.addCardType(CardType.CREATURE); - permanent.getSubtype(game).add("Construct"); + permanent.getSubtype(game).add(SubType.CONSTRUCT); } break; case PTChangingEffects_7: diff --git a/Mage.Sets/src/mage/cards/c/ChimneyImp.java b/Mage.Sets/src/mage/cards/c/ChimneyImp.java index f18e96d11f..6522c0499d 100644 --- a/Mage.Sets/src/mage/cards/c/ChimneyImp.java +++ b/Mage.Sets/src/mage/cards/c/ChimneyImp.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -52,7 +53,7 @@ public class ChimneyImp extends CardImpl { public ChimneyImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ChiseiHeartOfOceans.java b/Mage.Sets/src/mage/cards/c/ChiseiHeartOfOceans.java index 15bea981e3..c2ed315ddf 100644 --- a/Mage.Sets/src/mage/cards/c/ChiseiHeartOfOceans.java +++ b/Mage.Sets/src/mage/cards/c/ChiseiHeartOfOceans.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.filter.FilterPermanent; @@ -60,7 +61,7 @@ public class ChiseiHeartOfOceans extends CardImpl { public ChiseiHeartOfOceans(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/ChitinousCloak.java b/Mage.Sets/src/mage/cards/c/ChitinousCloak.java index 19e37d57e5..165c8f52c2 100644 --- a/Mage.Sets/src/mage/cards/c/ChitinousCloak.java +++ b/Mage.Sets/src/mage/cards/c/ChitinousCloak.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class ChitinousCloak extends CardImpl { public ChitinousCloak(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+2 and has menace. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2)); diff --git a/Mage.Sets/src/mage/cards/c/ChitteringHost.java b/Mage.Sets/src/mage/cards/c/ChitteringHost.java index b1398716ae..9e65b786e8 100644 --- a/Mage.Sets/src/mage/cards/c/ChitteringHost.java +++ b/Mage.Sets/src/mage/cards/c/ChitteringHost.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardSetInfo; import mage.cards.MeldCard; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterControlledCreaturePermanent; @@ -49,8 +50,8 @@ import mage.filter.common.FilterControlledCreaturePermanent; public class ChitteringHost extends MeldCard { public ChitteringHost(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); - this.subtype.add("Eldrazi"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.HORROR); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/c/ChitteringRats.java b/Mage.Sets/src/mage/cards/c/ChitteringRats.java index 2cb26c0903..afaa4c0c6d 100644 --- a/Mage.Sets/src/mage/cards/c/ChitteringRats.java +++ b/Mage.Sets/src/mage/cards/c/ChitteringRats.java @@ -36,6 +36,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class ChitteringRats extends CardImpl { public ChitteringRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/Chlorophant.java b/Mage.Sets/src/mage/cards/c/Chlorophant.java index 10794220d3..ef9e6760fd 100644 --- a/Mage.Sets/src/mage/cards/c/Chlorophant.java +++ b/Mage.Sets/src/mage/cards/c/Chlorophant.java @@ -50,7 +50,7 @@ public class Chlorophant extends CardImpl { public Chlorophant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/ChoArrimAlchemist.java b/Mage.Sets/src/mage/cards/c/ChoArrimAlchemist.java index 5cbf395f3e..db7f8862fa 100644 --- a/Mage.Sets/src/mage/cards/c/ChoArrimAlchemist.java +++ b/Mage.Sets/src/mage/cards/c/ChoArrimAlchemist.java @@ -39,6 +39,7 @@ import mage.abilities.effects.PreventionEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class ChoArrimAlchemist extends CardImpl { public ChoArrimAlchemist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/ChoArrimBruiser.java b/Mage.Sets/src/mage/cards/c/ChoArrimBruiser.java index 4065cd7311..8b7db8f03d 100644 --- a/Mage.Sets/src/mage/cards/c/ChoArrimBruiser.java +++ b/Mage.Sets/src/mage/cards/c/ChoArrimBruiser.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -45,8 +46,8 @@ public class ChoArrimBruiser extends CardImpl { public ChoArrimBruiser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Ogre"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.REBEL); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/ChoArrimLegate.java b/Mage.Sets/src/mage/cards/c/ChoArrimLegate.java index c91bf3cb6c..962177a25b 100644 --- a/Mage.Sets/src/mage/cards/c/ChoArrimLegate.java +++ b/Mage.Sets/src/mage/cards/c/ChoArrimLegate.java @@ -59,8 +59,8 @@ public class ChoArrimLegate extends CardImpl { public ChoArrimLegate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ChoMannoRevolutionary.java b/Mage.Sets/src/mage/cards/c/ChoMannoRevolutionary.java index 4bbba6acc3..d800977636 100644 --- a/Mage.Sets/src/mage/cards/c/ChoMannoRevolutionary.java +++ b/Mage.Sets/src/mage/cards/c/ChoMannoRevolutionary.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.PreventAllDamageToSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class ChoMannoRevolutionary extends CardImpl { public ChoMannoRevolutionary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ChoMannosBlessing.java b/Mage.Sets/src/mage/cards/c/ChoMannosBlessing.java index 18e17b22cf..c2d245cf68 100644 --- a/Mage.Sets/src/mage/cards/c/ChoMannosBlessing.java +++ b/Mage.Sets/src/mage/cards/c/ChoMannosBlessing.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class ChoMannosBlessing extends CardImpl { public ChoMannosBlessing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/c/ChoiceOfDamnations.java b/Mage.Sets/src/mage/cards/c/ChoiceOfDamnations.java index 3eeb080a83..3fcfe76703 100644 --- a/Mage.Sets/src/mage/cards/c/ChoiceOfDamnations.java +++ b/Mage.Sets/src/mage/cards/c/ChoiceOfDamnations.java @@ -33,6 +33,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledPermanent; @@ -51,7 +52,7 @@ public class ChoiceOfDamnations extends CardImpl { public ChoiceOfDamnations(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{5}{B}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Target opponent chooses a number. You may have that player lose that much life. If you don't, that player sacrifices all but that many permanents. this.getSpellAbility().addEffect(new ChoiceOfDamnationsEffect()); diff --git a/Mage.Sets/src/mage/cards/c/ChokingRestraints.java b/Mage.Sets/src/mage/cards/c/ChokingRestraints.java index 2f982f47a1..44ab15bfa2 100644 --- a/Mage.Sets/src/mage/cards/c/ChokingRestraints.java +++ b/Mage.Sets/src/mage/cards/c/ChokingRestraints.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -54,7 +55,7 @@ public class ChokingRestraints extends CardImpl { public ChokingRestraints(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/ChorusOfTheConclave.java b/Mage.Sets/src/mage/cards/c/ChorusOfTheConclave.java index 421996644d..efe5d55042 100644 --- a/Mage.Sets/src/mage/cards/c/ChorusOfTheConclave.java +++ b/Mage.Sets/src/mage/cards/c/ChorusOfTheConclave.java @@ -58,7 +58,7 @@ public class ChorusOfTheConclave extends CardImpl { public ChorusOfTheConclave(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dryad"); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(3); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/c/ChorusOfTheTides.java b/Mage.Sets/src/mage/cards/c/ChorusOfTheTides.java index 96f8f65f9f..d6ee131ada 100644 --- a/Mage.Sets/src/mage/cards/c/ChorusOfTheTides.java +++ b/Mage.Sets/src/mage/cards/c/ChorusOfTheTides.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class ChorusOfTheTides extends CardImpl { public ChorusOfTheTides(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Siren"); + this.subtype.add(SubType.SIREN); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ChosenByHeliod.java b/Mage.Sets/src/mage/cards/c/ChosenByHeliod.java index 1b4de79030..1351f630aa 100644 --- a/Mage.Sets/src/mage/cards/c/ChosenByHeliod.java +++ b/Mage.Sets/src/mage/cards/c/ChosenByHeliod.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class ChosenByHeliod extends CardImpl { public ChosenByHeliod(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/c/ChosenOfMarkov.java b/Mage.Sets/src/mage/cards/c/ChosenOfMarkov.java index c6f22da87d..a5dffea59f 100644 --- a/Mage.Sets/src/mage/cards/c/ChosenOfMarkov.java +++ b/Mage.Sets/src/mage/cards/c/ChosenOfMarkov.java @@ -61,7 +61,7 @@ public class ChosenOfMarkov extends CardImpl { public ChosenOfMarkov(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/Chromanticore.java b/Mage.Sets/src/mage/cards/c/Chromanticore.java index df147adceb..7224cc683b 100644 --- a/Mage.Sets/src/mage/cards/c/Chromanticore.java +++ b/Mage.Sets/src/mage/cards/c/Chromanticore.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -49,7 +50,7 @@ public class Chromanticore extends CardImpl { public Chromanticore(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{W}{U}{B}{R}{G}"); - this.subtype.add("Manticore"); + this.subtype.add(SubType.MANTICORE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/ChromeSteed.java b/Mage.Sets/src/mage/cards/c/ChromeSteed.java index c76e74acbe..e00bfbbb85 100644 --- a/Mage.Sets/src/mage/cards/c/ChromeSteed.java +++ b/Mage.Sets/src/mage/cards/c/ChromeSteed.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class ChromeSteed extends CardImpl { public ChromeSteed (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Horse"); + this.subtype.add(SubType.HORSE); this.power = new MageInt(2); this.toughness = new MageInt(2); ContinuousEffect boostSource = new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield); diff --git a/Mage.Sets/src/mage/cards/c/ChromescaleDrake.java b/Mage.Sets/src/mage/cards/c/ChromescaleDrake.java index 64f35a7075..5da39d27b6 100644 --- a/Mage.Sets/src/mage/cards/c/ChromescaleDrake.java +++ b/Mage.Sets/src/mage/cards/c/ChromescaleDrake.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterArtifactCard; @@ -47,7 +48,7 @@ public class ChromescaleDrake extends CardImpl { public ChromescaleDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{U}{U}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/ChromeshellCrab.java b/Mage.Sets/src/mage/cards/c/ChromeshellCrab.java index f5e2361afb..59cf4dcbb0 100644 --- a/Mage.Sets/src/mage/cards/c/ChromeshellCrab.java +++ b/Mage.Sets/src/mage/cards/c/ChromeshellCrab.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -61,8 +62,8 @@ public class ChromeshellCrab extends CardImpl { public ChromeshellCrab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Crab"); - this.subtype.add("Beast"); + this.subtype.add(SubType.CRAB); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/Chromium.java b/Mage.Sets/src/mage/cards/c/Chromium.java index d096cc10e3..e01dc86835 100644 --- a/Mage.Sets/src/mage/cards/c/Chromium.java +++ b/Mage.Sets/src/mage/cards/c/Chromium.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.RampageAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; @@ -49,8 +50,8 @@ public class Chromium extends CardImpl { public Chromium(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}{U}{U}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elder"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.ELDER); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/c/Chronatog.java b/Mage.Sets/src/mage/cards/c/Chronatog.java index b19e0ab126..26c3b52082 100644 --- a/Mage.Sets/src/mage/cards/c/Chronatog.java +++ b/Mage.Sets/src/mage/cards/c/Chronatog.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.turn.SkipNextTurnSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class Chronatog extends CardImpl { public Chronatog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Atog"); + this.subtype.add(SubType.ATOG); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ChronatogTotem.java b/Mage.Sets/src/mage/cards/c/ChronatogTotem.java index 554a325dcc..2cb60a672e 100644 --- a/Mage.Sets/src/mage/cards/c/ChronatogTotem.java +++ b/Mage.Sets/src/mage/cards/c/ChronatogTotem.java @@ -44,6 +44,7 @@ import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.EffectType; import mage.constants.Zone; @@ -58,14 +59,14 @@ import mage.game.permanent.token.Token; public class ChronatogTotem extends CardImpl { public ChronatogTotem(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); // {tap}: Add {U} to your mana pool. this.addAbility(new BlueManaAbility()); - + // {1}{U}: Chronatog Totem becomes a 1/2 blue Atog artifact creature until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new ChronatogTotemToken(), "", Duration.EndOfTurn), new ManaCostsImpl<>("{1}{U}"))); - + // {0}: Chronatog Totem gets +3/+3 until end of turn. You skip your next turn. Activate this ability only once each turn and only if Chronatog Totem is a creature. Ability ability = new ChronatogTotemAbility( Zone.BATTLEFIELD, @@ -90,8 +91,6 @@ class ChronatogTotemAbility extends LimitedTimesPerTurnActivatedAbility { private static final Effects emptyEffects = new Effects(); - private final Condition condition; - public ChronatogTotemAbility(Zone zone, Effect effect, Cost cost, Condition condition) { super(zone, effect, cost); this.condition = condition; @@ -99,7 +98,6 @@ class ChronatogTotemAbility extends LimitedTimesPerTurnActivatedAbility { public ChronatogTotemAbility(ChronatogTotemAbility ability) { super(ability); - this.condition = ability.condition; } @Override @@ -110,14 +108,6 @@ class ChronatogTotemAbility extends LimitedTimesPerTurnActivatedAbility { return super.getEffects(game, effectType); } - @Override - public boolean canActivate(UUID playerId, Game game) { - if (!condition.apply(game, this)) { - return false; - } - return super.canActivate(playerId, game); - } - @Override public ChronatogTotemAbility copy() { return new ChronatogTotemAbility(this); @@ -138,7 +128,7 @@ class ChronatogTotemToken extends Token { super("Atog", "1/2 blue Atog artifact creature"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Atog"); + subtype.add(SubType.ATOG); power = new MageInt(1); toughness = new MageInt(2); color.setBlue(true); diff --git a/Mage.Sets/src/mage/cards/c/ChronicFlooding.java b/Mage.Sets/src/mage/cards/c/ChronicFlooding.java index f340202c24..da815baa94 100644 --- a/Mage.Sets/src/mage/cards/c/ChronicFlooding.java +++ b/Mage.Sets/src/mage/cards/c/ChronicFlooding.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -55,7 +56,7 @@ public class ChronicFlooding extends CardImpl { public ChronicFlooding(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); diff --git a/Mage.Sets/src/mage/cards/c/ChroniclerOfHeroes.java b/Mage.Sets/src/mage/cards/c/ChroniclerOfHeroes.java index 96461cb0fb..594349cfe5 100644 --- a/Mage.Sets/src/mage/cards/c/ChroniclerOfHeroes.java +++ b/Mage.Sets/src/mage/cards/c/ChroniclerOfHeroes.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.counters.CounterType; @@ -54,8 +55,8 @@ public class ChroniclerOfHeroes extends CardImpl { public ChroniclerOfHeroes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}"); - this.subtype.add("Centaur"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/Chronomaton.java b/Mage.Sets/src/mage/cards/c/Chronomaton.java index 46a1ae5c00..9b19363ea4 100644 --- a/Mage.Sets/src/mage/cards/c/Chronomaton.java +++ b/Mage.Sets/src/mage/cards/c/Chronomaton.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -48,7 +49,7 @@ public class Chronomaton extends CardImpl { public Chronomaton(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/Chronosavant.java b/Mage.Sets/src/mage/cards/c/Chronosavant.java index 6c07708173..f1a9a2f598 100644 --- a/Mage.Sets/src/mage/cards/c/Chronosavant.java +++ b/Mage.Sets/src/mage/cards/c/Chronosavant.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.turn.SkipNextTurnSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class Chronosavant extends CardImpl { public Chronosavant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/Chronozoa.java b/Mage.Sets/src/mage/cards/c/Chronozoa.java index 39fdd61b6f..a12bb99c5b 100644 --- a/Mage.Sets/src/mage/cards/c/Chronozoa.java +++ b/Mage.Sets/src/mage/cards/c/Chronozoa.java @@ -35,7 +35,7 @@ import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.common.LastTimeCounterRemovedCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.Effect; -import mage.abilities.effects.PutTokenOntoBattlefieldCopySourceEffect; +import mage.abilities.effects.CreateTokenCopySourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.VanishingSacrificeAbility; @@ -43,6 +43,7 @@ import mage.abilities.keyword.VanishingUpkeepAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -54,7 +55,7 @@ public class Chronozoa extends CardImpl { public Chronozoa(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -69,7 +70,7 @@ public class Chronozoa extends CardImpl { this.addAbility(new VanishingSacrificeAbility()); // When Chronozoa is put into a graveyard from play, if it had no time counters on it, create two tokens that are copies of it. - Effect effect = new PutTokenOntoBattlefieldCopySourceEffect(2); + Effect effect = new CreateTokenCopySourceEffect(2); effect.setText("create two tokens that are copies of it"); this.addAbility(new ConditionalTriggeredAbility(new DiesTriggeredAbility(effect, false), LastTimeCounterRemovedCondition.instance, diff --git a/Mage.Sets/src/mage/cards/c/ChubToad.java b/Mage.Sets/src/mage/cards/c/ChubToad.java index 04f74bf241..1b64eb472b 100644 --- a/Mage.Sets/src/mage/cards/c/ChubToad.java +++ b/Mage.Sets/src/mage/cards/c/ChubToad.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,7 +47,7 @@ public class ChubToad extends CardImpl { public ChubToad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Frog"); + this.subtype.add(SubType.FROG); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CinderElemental.java b/Mage.Sets/src/mage/cards/c/CinderElemental.java index 49b65c5068..93c6340345 100644 --- a/Mage.Sets/src/mage/cards/c/CinderElemental.java +++ b/Mage.Sets/src/mage/cards/c/CinderElemental.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -50,7 +51,7 @@ public class CinderElemental extends CardImpl { public CinderElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CinderGiant.java b/Mage.Sets/src/mage/cards/c/CinderGiant.java index e243e1b98e..18ceb0214d 100644 --- a/Mage.Sets/src/mage/cards/c/CinderGiant.java +++ b/Mage.Sets/src/mage/cards/c/CinderGiant.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -51,7 +52,7 @@ public class CinderGiant extends CardImpl { public CinderGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CinderGlade.java b/Mage.Sets/src/mage/cards/c/CinderGlade.java index 6add2373ef..e37a2f782e 100644 --- a/Mage.Sets/src/mage/cards/c/CinderGlade.java +++ b/Mage.Sets/src/mage/cards/c/CinderGlade.java @@ -39,6 +39,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.SuperType; import mage.filter.common.FilterLandPermanent; @@ -58,8 +59,8 @@ public class CinderGlade extends CardImpl { public CinderGlade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Mountain"); - this.subtype.add("Forest"); + this.subtype.add(SubType.MOUNTAIN); + this.subtype.add(SubType.FOREST); // Cinder Glade enters the battlefield tapped unless you control two or more basic lands. Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1)); diff --git a/Mage.Sets/src/mage/cards/c/CinderHellion.java b/Mage.Sets/src/mage/cards/c/CinderHellion.java index 388b780927..7f7de2a4d4 100644 --- a/Mage.Sets/src/mage/cards/c/CinderHellion.java +++ b/Mage.Sets/src/mage/cards/c/CinderHellion.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetOpponent; /** @@ -46,7 +47,7 @@ public class CinderHellion extends CardImpl { public CinderHellion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Hellion"); + this.subtype.add(SubType.HELLION); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CinderPyromancer.java b/Mage.Sets/src/mage/cards/c/CinderPyromancer.java index 15bbcea007..92b7e87d9e 100644 --- a/Mage.Sets/src/mage/cards/c/CinderPyromancer.java +++ b/Mage.Sets/src/mage/cards/c/CinderPyromancer.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -58,8 +59,8 @@ public class CinderPyromancer extends CardImpl { public CinderPyromancer (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CinderShade.java b/Mage.Sets/src/mage/cards/c/CinderShade.java index c954ad63ba..b3dc93f617 100644 --- a/Mage.Sets/src/mage/cards/c/CinderShade.java +++ b/Mage.Sets/src/mage/cards/c/CinderShade.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -51,7 +52,7 @@ public class CinderShade extends CardImpl { public CinderShade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}"); - this.subtype.add("Shade"); + this.subtype.add(SubType.SHADE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CinderWall.java b/Mage.Sets/src/mage/cards/c/CinderWall.java index f96138842f..3d7b059518 100644 --- a/Mage.Sets/src/mage/cards/c/CinderWall.java +++ b/Mage.Sets/src/mage/cards/c/CinderWall.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ import mage.constants.CardType; public class CinderWall extends CardImpl { public CinderWall(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Wall"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); + this.subtype.add(SubType.WALL); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -54,9 +55,10 @@ public class CinderWall extends CardImpl { // Defender this.addAbility(DefenderAbility.getInstance()); // When Cinder Wall blocks, destroy it at end of combat. - this.addAbility( - new BlocksTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new DestroySourceEffect())) - , false)); + this.addAbility(new BlocksTriggeredAbility( + new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new DestroySourceEffect())), + false, false, true + )); } public CinderWall(final CinderWall card) { diff --git a/Mage.Sets/src/mage/cards/c/Cinderbones.java b/Mage.Sets/src/mage/cards/c/Cinderbones.java index b539e5101c..54ed687bb6 100644 --- a/Mage.Sets/src/mage/cards/c/Cinderbones.java +++ b/Mage.Sets/src/mage/cards/c/Cinderbones.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class Cinderbones extends CardImpl { public Cinderbones(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Elemental"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CinderhazeWretch.java b/Mage.Sets/src/mage/cards/c/CinderhazeWretch.java index c4bb825e25..7bf79f392c 100644 --- a/Mage.Sets/src/mage/cards/c/CinderhazeWretch.java +++ b/Mage.Sets/src/mage/cards/c/CinderhazeWretch.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.TargetPlayer; @@ -53,8 +54,8 @@ public class CinderhazeWretch extends CardImpl { public CinderhazeWretch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CircleOfAffliction.java b/Mage.Sets/src/mage/cards/c/CircleOfAffliction.java index 4b8f61203d..bdc90f9b6b 100644 --- a/Mage.Sets/src/mage/cards/c/CircleOfAffliction.java +++ b/Mage.Sets/src/mage/cards/c/CircleOfAffliction.java @@ -32,7 +32,7 @@ import mage.MageObject; import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.ChooseColorEffect; import mage.abilities.effects.common.DoIfCostPaid; @@ -58,7 +58,7 @@ public class CircleOfAffliction extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); // As Circle of Affliction enters the battlefield, choose a color. - this.addAbility(new EntersBattlefieldAbility(new ChooseColorEffect(Outcome.Neutral))); + this.addAbility(new AsEntersBattlefieldAbility(new ChooseColorEffect(Outcome.Neutral))); // Whenever a source of the chosen color deals damage to you, you may pay {1}. If you do, target player loses 1 life and you gain 1 life. Ability ability = new CircleOfAfflictionTriggeredAbility(); diff --git a/Mage.Sets/src/mage/cards/c/CircleOfElders.java b/Mage.Sets/src/mage/cards/c/CircleOfElders.java index 9378b27aad..0b7de53f54 100644 --- a/Mage.Sets/src/mage/cards/c/CircleOfElders.java +++ b/Mage.Sets/src/mage/cards/c/CircleOfElders.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -50,8 +51,8 @@ public class CircleOfElders extends CardImpl { public CircleOfElders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CircuDimirLobotomist.java b/Mage.Sets/src/mage/cards/c/CircuDimirLobotomist.java index 96a3f642f0..461ccd4f02 100644 --- a/Mage.Sets/src/mage/cards/c/CircuDimirLobotomist.java +++ b/Mage.Sets/src/mage/cards/c/CircuDimirLobotomist.java @@ -1,179 +1,180 @@ -/* - * 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.cards.c; - -import java.util.UUID; -import mage.MageInt; -import mage.MageObject; -import mage.ObjectColor; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.common.SpellCastControllerTriggeredAbility; -import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.SuperType; -import mage.constants.Zone; -import mage.filter.FilterPlayer; -import mage.filter.FilterSpell; -import mage.filter.predicate.mageobject.ColorPredicate; -import mage.game.ExileZone; -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.util.CardUtil; - -/** - * - * @author LevelX2 - */ -public class CircuDimirLobotomist extends CardImpl { - - private static final FilterSpell filterBlue = new FilterSpell("a blue spell"); - private static final FilterSpell filterBlack = new FilterSpell("a black spell"); - - static { - filterBlue.add(new ColorPredicate(ObjectColor.BLUE)); - filterBlack.add(new ColorPredicate(ObjectColor.BLACK)); - } - - public CircuDimirLobotomist(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{B}"); - - addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); - this.power = new MageInt(2); - this.toughness = new MageInt(3); - - // 10/1/2005 The first two abilities target libraries, not players. - // Target Library not supported yet - used as workaround target player - // Whenever you cast a blue spell, exile the top card of target library. - Ability ability = new SpellCastControllerTriggeredAbility(new CircuDimirLobotomistEffect(), filterBlue, false); - ability.addTarget(new TargetPlayer(1, 1, true, new FilterPlayer("target library"))); - this.addAbility(ability); - // Whenever you cast a black spell, exile the top card of target library. - ability = new SpellCastControllerTriggeredAbility(new CircuDimirLobotomistEffect(), filterBlack, false); - ability.addTarget(new TargetPlayer(1, 1, true, new FilterPlayer("target library"))); - this.addAbility(ability); - // Your opponents can't cast nonland cards with the same name as a card exiled with Circu, Dimir Lobotomist. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CircuDimirLobotomistRuleModifyingEffect())); - } - - public CircuDimirLobotomist(final CircuDimirLobotomist card) { - super(card); - } - - @Override - public CircuDimirLobotomist copy() { - return new CircuDimirLobotomist(this); - } -} - -class CircuDimirLobotomistEffect extends OneShotEffect { - - public CircuDimirLobotomistEffect() { - super(Outcome.Detriment); - this.staticText = "exile the top card of target library"; - } - - public CircuDimirLobotomistEffect(final CircuDimirLobotomistEffect effect) { - super(effect); - } - - @Override - public CircuDimirLobotomistEffect copy() { - return new CircuDimirLobotomistEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - Player playerTargetLibrary = game.getPlayer(getTargetPointer().getFirst(game, source)); - Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); - if (controller != null && playerTargetLibrary != null && sourcePermanent != null) { - UUID exileId = CardUtil.getCardExileZoneId(game, source); - controller.moveCardToExileWithInfo(playerTargetLibrary.getLibrary().getFromTop(game), exileId, - sourcePermanent.getIdName() + " (" + sourcePermanent.getZoneChangeCounter(game) + ')', source.getSourceId(), game, Zone.BATTLEFIELD, true); - return true; - } - return false; - } -} - -class CircuDimirLobotomistRuleModifyingEffect extends ContinuousRuleModifyingEffectImpl { - - public CircuDimirLobotomistRuleModifyingEffect() { - super(Duration.WhileOnBattlefield, Outcome.Detriment); - staticText = "Your opponents can't cast nonland cards with the same name as a card exiled with {this}"; - } - - public CircuDimirLobotomistRuleModifyingEffect(final CircuDimirLobotomistRuleModifyingEffect effect) { - super(effect); - } - - @Override - public CircuDimirLobotomistRuleModifyingEffect copy() { - return new CircuDimirLobotomistRuleModifyingEffect(this); - } - - @Override - public String getInfoMessage(Ability source, GameEvent event, Game game) { - MageObject mageObject = game.getObject(source.getSourceId()); - if (mageObject != null) { - return "You can't cast this spell because a card with the same name is exiled by " + mageObject.getLogName() + '.'; - } - return null; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - if (event.getType() == EventType.CAST_SPELL && game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { - MageObject object = game.getObject(event.getSourceId()); - if (object != null) { - ExileZone exileZone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)); - if ((exileZone != null)) { - for (Card card : exileZone.getCards(game)) { - if ((card.getName().equals(object.getName()))) { - return true; - } - } - } - } - } - return false; - } -} +/* + * 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.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.FilterPlayer; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.ExileZone; +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.util.CardUtil; + +/** + * + * @author LevelX2 + */ +public class CircuDimirLobotomist extends CardImpl { + + private static final FilterSpell filterBlue = new FilterSpell("a blue spell"); + private static final FilterSpell filterBlack = new FilterSpell("a black spell"); + + static { + filterBlue.add(new ColorPredicate(ObjectColor.BLUE)); + filterBlack.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public CircuDimirLobotomist(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{B}"); + + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // 10/1/2005 The first two abilities target libraries, not players. + // Target Library not supported yet - used as workaround target player + // Whenever you cast a blue spell, exile the top card of target library. + Ability ability = new SpellCastControllerTriggeredAbility(new CircuDimirLobotomistEffect(), filterBlue, false); + ability.addTarget(new TargetPlayer(1, 1, true, new FilterPlayer("target library"))); + this.addAbility(ability); + // Whenever you cast a black spell, exile the top card of target library. + ability = new SpellCastControllerTriggeredAbility(new CircuDimirLobotomistEffect(), filterBlack, false); + ability.addTarget(new TargetPlayer(1, 1, true, new FilterPlayer("target library"))); + this.addAbility(ability); + // Your opponents can't cast nonland cards with the same name as a card exiled with Circu, Dimir Lobotomist. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CircuDimirLobotomistRuleModifyingEffect())); + } + + public CircuDimirLobotomist(final CircuDimirLobotomist card) { + super(card); + } + + @Override + public CircuDimirLobotomist copy() { + return new CircuDimirLobotomist(this); + } +} + +class CircuDimirLobotomistEffect extends OneShotEffect { + + public CircuDimirLobotomistEffect() { + super(Outcome.Detriment); + this.staticText = "exile the top card of target library"; + } + + public CircuDimirLobotomistEffect(final CircuDimirLobotomistEffect effect) { + super(effect); + } + + @Override + public CircuDimirLobotomistEffect copy() { + return new CircuDimirLobotomistEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Player playerTargetLibrary = game.getPlayer(getTargetPointer().getFirst(game, source)); + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (controller != null && playerTargetLibrary != null && sourcePermanent != null) { + UUID exileId = CardUtil.getCardExileZoneId(game, source); + controller.moveCardToExileWithInfo(playerTargetLibrary.getLibrary().getFromTop(game), exileId, + sourcePermanent.getIdName() + " (" + sourcePermanent.getZoneChangeCounter(game) + ')', source.getSourceId(), game, Zone.BATTLEFIELD, true); + return true; + } + return false; + } +} + +class CircuDimirLobotomistRuleModifyingEffect extends ContinuousRuleModifyingEffectImpl { + + public CircuDimirLobotomistRuleModifyingEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + staticText = "Your opponents can't cast nonland cards with the same name as a card exiled with {this}"; + } + + public CircuDimirLobotomistRuleModifyingEffect(final CircuDimirLobotomistRuleModifyingEffect effect) { + super(effect); + } + + @Override + public CircuDimirLobotomistRuleModifyingEffect copy() { + return new CircuDimirLobotomistRuleModifyingEffect(this); + } + + @Override + public String getInfoMessage(Ability source, GameEvent event, Game game) { + MageObject mageObject = game.getObject(source.getSourceId()); + if (mageObject != null) { + return "You can't cast this spell because a card with the same name is exiled by " + mageObject.getLogName() + '.'; + } + return null; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == EventType.CAST_SPELL && game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { + MageObject object = game.getObject(event.getSourceId()); + if (object != null) { + ExileZone exileZone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)); + if ((exileZone != null)) { + for (Card card : exileZone.getCards(game)) { + if ((card.getName().equals(object.getName()))) { + return true; + } + } + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/c/CitadelCastellan.java b/Mage.Sets/src/mage/cards/c/CitadelCastellan.java index 59f2fed867..1db77cfc2e 100644 --- a/Mage.Sets/src/mage/cards/c/CitadelCastellan.java +++ b/Mage.Sets/src/mage/cards/c/CitadelCastellan.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class CitadelCastellan extends CardImpl { public CitadelCastellan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CitanulCentaurs.java b/Mage.Sets/src/mage/cards/c/CitanulCentaurs.java index 7f75093699..1aa4315a48 100644 --- a/Mage.Sets/src/mage/cards/c/CitanulCentaurs.java +++ b/Mage.Sets/src/mage/cards/c/CitanulCentaurs.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class CitanulCentaurs extends CardImpl { public CitanulCentaurs(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Centaur"); + this.subtype.add(SubType.CENTAUR); this.power = new MageInt(6); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CitanulDruid.java b/Mage.Sets/src/mage/cards/c/CitanulDruid.java index a7f90ee14a..724e22d7eb 100644 --- a/Mage.Sets/src/mage/cards/c/CitanulDruid.java +++ b/Mage.Sets/src/mage/cards/c/CitanulDruid.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.counters.CounterType; import mage.filter.common.FilterArtifactSpell; @@ -53,8 +54,8 @@ public class CitanulDruid extends CardImpl { public CitanulDruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CitanulHierophants.java b/Mage.Sets/src/mage/cards/c/CitanulHierophants.java index 0b9ad163cd..4590a5badd 100644 --- a/Mage.Sets/src/mage/cards/c/CitanulHierophants.java +++ b/Mage.Sets/src/mage/cards/c/CitanulHierophants.java @@ -35,6 +35,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -54,8 +55,8 @@ public class CitanulHierophants extends CardImpl { public CitanulHierophants(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CitanulWoodreaders.java b/Mage.Sets/src/mage/cards/c/CitanulWoodreaders.java index fed156ebbd..a9804a5436 100644 --- a/Mage.Sets/src/mage/cards/c/CitanulWoodreaders.java +++ b/Mage.Sets/src/mage/cards/c/CitanulWoodreaders.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class CitanulWoodreaders extends CardImpl { public CitanulWoodreaders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CivicGuildmage.java b/Mage.Sets/src/mage/cards/c/CivicGuildmage.java index 4d445a22c0..7d3e73b0be 100644 --- a/Mage.Sets/src/mage/cards/c/CivicGuildmage.java +++ b/Mage.Sets/src/mage/cards/c/CivicGuildmage.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -51,8 +52,8 @@ public class CivicGuildmage extends CardImpl { public CivicGuildmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CivicSaber.java b/Mage.Sets/src/mage/cards/c/CivicSaber.java index f4d394987d..ad74455206 100644 --- a/Mage.Sets/src/mage/cards/c/CivicSaber.java +++ b/Mage.Sets/src/mage/cards/c/CivicSaber.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class CivicSaber extends CardImpl { public CivicSaber(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+0 for each of its colors. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new CivicSaberColorCount(), new StaticValue(0), Duration.WhileOnBattlefield))); diff --git a/Mage.Sets/src/mage/cards/c/CivicWayfinder.java b/Mage.Sets/src/mage/cards/c/CivicWayfinder.java index 04ac60e0fd..414602e160 100644 --- a/Mage.Sets/src/mage/cards/c/CivicWayfinder.java +++ b/Mage.Sets/src/mage/cards/c/CivicWayfinder.java @@ -33,6 +33,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; @@ -46,9 +47,9 @@ public class CivicWayfinder extends CardImpl { public CivicWayfinder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CivilizedScholar.java b/Mage.Sets/src/mage/cards/c/CivilizedScholar.java index adc71df8ce..30837240b2 100644 --- a/Mage.Sets/src/mage/cards/c/CivilizedScholar.java +++ b/Mage.Sets/src/mage/cards/c/CivilizedScholar.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.h.HomicidalBrute; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.WatcherScope; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class CivilizedScholar extends CardImpl { public CivilizedScholar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.transformable = true; this.secondSideCardClazz = HomicidalBrute.class; diff --git a/Mage.Sets/src/mage/cards/c/ClaimFame.java b/Mage.Sets/src/mage/cards/c/ClaimFame.java index 3161ce925e..e2923fa921 100644 --- a/Mage.Sets/src/mage/cards/c/ClaimFame.java +++ b/Mage.Sets/src/mage/cards/c/ClaimFame.java @@ -1,88 +1,88 @@ -/* - * 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.cards.c; - -import java.util.UUID; -import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; -import mage.abilities.effects.common.continuous.BoostTargetEffect; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.abilities.keyword.AftermathAbility; -import mage.abilities.keyword.HasteAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.SplitCard; -import mage.constants.CardType; -import mage.constants.ComparisonType; -import mage.constants.Duration; -import mage.constants.SpellAbilityType; -import mage.filter.FilterCard; -import mage.filter.common.FilterCreatureCard; -import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; -import mage.target.common.TargetCardInYourGraveyard; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author LevelX2 - */ -public class ClaimFame extends SplitCard { - - private static final FilterCard filter = new FilterCreatureCard("creature card with converted mana cost 2 or less from your graveyard"); - - static { - filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3)); - } - - public ClaimFame(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.SORCERY}, "{B}", "{1}{R}", SpellAbilityType.SPLIT_AFTERMATH); - - // Claim - // Return target creature card with converted mana cost 2 or less from your graveyard to the battlefield. - getLeftHalfCard().getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); - getLeftHalfCard().getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter)); - - // Fame - // Aftermath - ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true)); - // Target creature gets +2/+0 and gains haste until end of turn. - getRightHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(2, 0, Duration.EndOfTurn)); - getRightHalfCard().getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn) - .setText("and gains haste until end of turn")); - getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); - - } - - public ClaimFame(final ClaimFame card) { - super(card); - } - - @Override - public ClaimFame copy() { - return new ClaimFame(this); - } -} +/* + * 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.cards.c; + +import java.util.UUID; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.AftermathAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.SplitCard; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Duration; +import mage.constants.SpellAbilityType; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.target.common.TargetCardInYourGraveyard; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class ClaimFame extends SplitCard { + + private static final FilterCard filter = new FilterCreatureCard("creature card with converted mana cost 2 or less from your graveyard"); + + static { + filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3)); + } + + public ClaimFame(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.SORCERY}, "{B}", "{1}{R}", SpellAbilityType.SPLIT_AFTERMATH); + + // Claim + // Return target creature card with converted mana cost 2 or less from your graveyard to the battlefield. + getLeftHalfCard().getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); + getLeftHalfCard().getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter)); + + // Fame + // Aftermath + ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true)); + // Target creature gets +2/+0 and gains haste until end of turn. + getRightHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(2, 0, Duration.EndOfTurn)); + getRightHalfCard().getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn) + .setText("and gains haste until end of turn")); + getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + } + + public ClaimFame(final ClaimFame card) { + super(card); + } + + @Override + public ClaimFame copy() { + return new ClaimFame(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/ClaimOfErebos.java b/Mage.Sets/src/mage/cards/c/ClaimOfErebos.java index a02798e1c9..23dd7f3a75 100644 --- a/Mage.Sets/src/mage/cards/c/ClaimOfErebos.java +++ b/Mage.Sets/src/mage/cards/c/ClaimOfErebos.java @@ -52,7 +52,7 @@ public class ClaimOfErebos extends CardImpl { public ClaimOfErebos(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/c/Claustrophobia.java b/Mage.Sets/src/mage/cards/c/Claustrophobia.java index 0d833add9f..8bc3427e85 100644 --- a/Mage.Sets/src/mage/cards/c/Claustrophobia.java +++ b/Mage.Sets/src/mage/cards/c/Claustrophobia.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -49,7 +50,7 @@ public class Claustrophobia extends CardImpl { public Claustrophobia(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/c/ClawsOfValakut.java b/Mage.Sets/src/mage/cards/c/ClawsOfValakut.java index c6bbba0f04..fcb89ed7a7 100644 --- a/Mage.Sets/src/mage/cards/c/ClawsOfValakut.java +++ b/Mage.Sets/src/mage/cards/c/ClawsOfValakut.java @@ -60,7 +60,7 @@ public class ClawsOfValakut extends CardImpl { public ClawsOfValakut (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/ClayStatue.java b/Mage.Sets/src/mage/cards/c/ClayStatue.java index 873163daee..a937cc27ff 100644 --- a/Mage.Sets/src/mage/cards/c/ClayStatue.java +++ b/Mage.Sets/src/mage/cards/c/ClayStatue.java @@ -8,6 +8,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -18,7 +19,7 @@ public class ClayStatue extends CardImpl { public ClayStatue(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/Cleanfall.java b/Mage.Sets/src/mage/cards/c/Cleanfall.java index 73feaf614a..cffd9a9bf7 100644 --- a/Mage.Sets/src/mage/cards/c/Cleanfall.java +++ b/Mage.Sets/src/mage/cards/c/Cleanfall.java @@ -33,6 +33,7 @@ import mage.abilities.effects.common.DestroyAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterEnchantmentPermanent; /** @@ -42,7 +43,7 @@ public class Cleanfall extends CardImpl { public Cleanfall(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{W}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterEnchantmentPermanent("enchantments"))); } diff --git a/Mage.Sets/src/mage/cards/c/ClergyEnVec.java b/Mage.Sets/src/mage/cards/c/ClergyEnVec.java index 604926b394..3b2da63813 100644 --- a/Mage.Sets/src/mage/cards/c/ClergyEnVec.java +++ b/Mage.Sets/src/mage/cards/c/ClergyEnVec.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class ClergyEnVec extends CardImpl { public ClergyEnVec(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/ClergyOfTheHolyNimbus.java b/Mage.Sets/src/mage/cards/c/ClergyOfTheHolyNimbus.java index 74fcf82fa6..5022878c6f 100644 --- a/Mage.Sets/src/mage/cards/c/ClergyOfTheHolyNimbus.java +++ b/Mage.Sets/src/mage/cards/c/ClergyOfTheHolyNimbus.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CantBeRegeneratedSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,15 +53,15 @@ import mage.game.permanent.Permanent; public class ClergyOfTheHolyNimbus extends CardImpl { public ClergyOfTheHolyNimbus(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); // If Clergy of the Holy Nimbus would be destroyed, regenerate it. this.addAbility(new SimpleStaticAbility(Zone.ALL, new ClergyOfTheHolyNimbusReplacementEffect())); - + // {1}: Clergy of the Holy Nimbus can't be regenerated this turn. Only any opponent may activate this ability. this.addAbility(new ActivateOnlyByOpponentActivatedAbility(Zone.BATTLEFIELD, new CantBeRegeneratedSourceEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}"))); } @@ -89,7 +90,7 @@ class ClergyOfTheHolyNimbusReplacementEffect extends ReplacementEffectImpl { @Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { Permanent ClergyOfTheHolyNimbus = game.getPermanent(event.getTargetId()); - if (ClergyOfTheHolyNimbus != null + if (ClergyOfTheHolyNimbus != null && event.getAmount() == 0) { // 1=noRegen if (ClergyOfTheHolyNimbus.regenerate(source.getSourceId(), game)) { game.informPlayers(source.getSourceObject(game).getName() + " has been regenerated."); @@ -115,4 +116,4 @@ class ClergyOfTheHolyNimbusReplacementEffect extends ReplacementEffectImpl { return new ClergyOfTheHolyNimbusReplacementEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/c/ClericOfTheForwardOrder.java b/Mage.Sets/src/mage/cards/c/ClericOfTheForwardOrder.java index c9b5217824..eb08284b5a 100644 --- a/Mage.Sets/src/mage/cards/c/ClericOfTheForwardOrder.java +++ b/Mage.Sets/src/mage/cards/c/ClericOfTheForwardOrder.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.NamePredicate; @@ -55,8 +56,8 @@ public class ClericOfTheForwardOrder extends CardImpl { public ClericOfTheForwardOrder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CleverImpersonator.java b/Mage.Sets/src/mage/cards/c/CleverImpersonator.java index 36bcc8edd7..d1d099d686 100644 --- a/Mage.Sets/src/mage/cards/c/CleverImpersonator.java +++ b/Mage.Sets/src/mage/cards/c/CleverImpersonator.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CopyPermanentEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterNonlandPermanent; /** @@ -44,7 +45,7 @@ public class CleverImpersonator extends CardImpl { public CleverImpersonator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/c/Clickslither.java b/Mage.Sets/src/mage/cards/c/Clickslither.java index 94207484d8..ac73c7a8af 100644 --- a/Mage.Sets/src/mage/cards/c/Clickslither.java +++ b/Mage.Sets/src/mage/cards/c/Clickslither.java @@ -61,7 +61,7 @@ public class Clickslither extends CardImpl { public Clickslither(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}{R}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CliffThreader.java b/Mage.Sets/src/mage/cards/c/CliffThreader.java index b2e29d503a..27b600f361 100644 --- a/Mage.Sets/src/mage/cards/c/CliffThreader.java +++ b/Mage.Sets/src/mage/cards/c/CliffThreader.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class CliffThreader extends CardImpl { public CliffThreader (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Scout"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CliffhavenVampire.java b/Mage.Sets/src/mage/cards/c/CliffhavenVampire.java index 34dda14837..223047c996 100644 --- a/Mage.Sets/src/mage/cards/c/CliffhavenVampire.java +++ b/Mage.Sets/src/mage/cards/c/CliffhavenVampire.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,9 +45,9 @@ public class CliffhavenVampire extends CardImpl { public CliffhavenVampire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Warrior"); - this.subtype.add("Ally"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CliffrunnerBehemoth.java b/Mage.Sets/src/mage/cards/c/CliffrunnerBehemoth.java index a3e90633da..8aa065a7fc 100644 --- a/Mage.Sets/src/mage/cards/c/CliffrunnerBehemoth.java +++ b/Mage.Sets/src/mage/cards/c/CliffrunnerBehemoth.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -60,8 +61,8 @@ public class CliffrunnerBehemoth extends CardImpl { public CliffrunnerBehemoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Rhino"); - this.subtype.add("Beast"); + this.subtype.add(SubType.RHINO); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CliffsideLookout.java b/Mage.Sets/src/mage/cards/c/CliffsideLookout.java index 6277e75060..daf254f7a3 100644 --- a/Mage.Sets/src/mage/cards/c/CliffsideLookout.java +++ b/Mage.Sets/src/mage/cards/c/CliffsideLookout.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,9 +47,9 @@ public class CliffsideLookout extends CardImpl { public CliffsideLookout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Kor"); - this.subtype.add("Scout"); - this.subtype.add("Ally"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SCOUT); + this.subtype.add(SubType.ALLY); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/ClifftopRetreat.java b/Mage.Sets/src/mage/cards/c/ClifftopRetreat.java index 40e3a4be5e..b2359fba93 100644 --- a/Mage.Sets/src/mage/cards/c/ClifftopRetreat.java +++ b/Mage.Sets/src/mage/cards/c/ClifftopRetreat.java @@ -61,7 +61,7 @@ public class ClifftopRetreat extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.LAND},null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); - String abilityText = "tap it unless you control a Mountain or a Plains"; + String abilityText = " tapped unless you control a Mountain or a Plains"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new RedManaAbility()); this.addAbility(new WhiteManaAbility()); diff --git a/Mage.Sets/src/mage/cards/c/ClingingAnemones.java b/Mage.Sets/src/mage/cards/c/ClingingAnemones.java index 896d188a3b..c0f798e961 100644 --- a/Mage.Sets/src/mage/cards/c/ClingingAnemones.java +++ b/Mage.Sets/src/mage/cards/c/ClingingAnemones.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.EvolveAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class ClingingAnemones extends CardImpl { public ClingingAnemones(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Jellyfish"); + this.subtype.add(SubType.JELLYFISH); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/ClingingDarkness.java b/Mage.Sets/src/mage/cards/c/ClingingDarkness.java index 57b6e82c4b..c2574fb8c9 100644 --- a/Mage.Sets/src/mage/cards/c/ClingingDarkness.java +++ b/Mage.Sets/src/mage/cards/c/ClingingDarkness.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class ClingingDarkness extends CardImpl { public ClingingDarkness(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/c/CloakAndDagger.java b/Mage.Sets/src/mage/cards/c/CloakAndDagger.java index ae718102d0..bf022a10d5 100644 --- a/Mage.Sets/src/mage/cards/c/CloakAndDagger.java +++ b/Mage.Sets/src/mage/cards/c/CloakAndDagger.java @@ -51,18 +51,19 @@ import mage.filter.predicate.mageobject.SubtypePredicate; public class CloakAndDagger extends CardImpl { private static final FilterPermanent filter = new FilterCreaturePermanent("a Rogue creature"); + static { filter.add(new SubtypePredicate(SubType.ROGUE)); } public CloakAndDagger(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.ARTIFACT},"{2}"); - this.subtype.add("Rogue"); - this.subtype.add("Equipment"); + super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.ARTIFACT}, "{2}"); + this.subtype.add(SubType.ROGUE); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+0 and has shroud. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0)); - ability.addEffect(new GainAbilityAttachedEffect(ShroudAbility.getInstance(), AttachmentType.EQUIPMENT)); + ability.addEffect(new GainAbilityAttachedEffect(ShroudAbility.getInstance(), AttachmentType.EQUIPMENT).setText("and has shroud")); this.addAbility(ability); // Whenever a Rogue creature enters the battlefield, you may attach Cloak and Dagger to it. this.addAbility(new EntersBattlefieldAllTriggeredAbility( diff --git a/Mage.Sets/src/mage/cards/c/CloakOfInvisibility.java b/Mage.Sets/src/mage/cards/c/CloakOfInvisibility.java index 152c92a01e..06d89374a2 100644 --- a/Mage.Sets/src/mage/cards/c/CloakOfInvisibility.java +++ b/Mage.Sets/src/mage/cards/c/CloakOfInvisibility.java @@ -56,7 +56,7 @@ public class CloakOfInvisibility extends CardImpl { public CloakOfInvisibility(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CloakOfMists.java b/Mage.Sets/src/mage/cards/c/CloakOfMists.java index 0526dec1e4..5b98138ae2 100644 --- a/Mage.Sets/src/mage/cards/c/CloakOfMists.java +++ b/Mage.Sets/src/mage/cards/c/CloakOfMists.java @@ -36,6 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -49,7 +50,7 @@ public class CloakOfMists extends CardImpl { public CloakOfMists(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/c/CloakedSiren.java b/Mage.Sets/src/mage/cards/c/CloakedSiren.java index 2a4288b5a3..4b27cf42cd 100644 --- a/Mage.Sets/src/mage/cards/c/CloakedSiren.java +++ b/Mage.Sets/src/mage/cards/c/CloakedSiren.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class CloakedSiren extends CardImpl { public CloakedSiren(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Siren"); + this.subtype.add(SubType.SIREN); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CloakingDevice.java b/Mage.Sets/src/mage/cards/c/CloakingDevice.java index 755569c6de..87755d79a0 100644 --- a/Mage.Sets/src/mage/cards/c/CloakingDevice.java +++ b/Mage.Sets/src/mage/cards/c/CloakingDevice.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -58,7 +59,7 @@ public class CloakingDevice extends CardImpl { public CloakingDevice(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/ClockworkAvian.java b/Mage.Sets/src/mage/cards/c/ClockworkAvian.java index 3dbea9f041..bbdd354c57 100644 --- a/Mage.Sets/src/mage/cards/c/ClockworkAvian.java +++ b/Mage.Sets/src/mage/cards/c/ClockworkAvian.java @@ -46,6 +46,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.PhaseStep; import mage.constants.Zone; import mage.counters.Counter; @@ -62,25 +63,39 @@ public class ClockworkAvian extends CardImpl { public ClockworkAvian(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(0); this.toughness = new MageInt(4); // Flying this.addAbility(FlyingAbility.getInstance()); + // Clockwork Avian enters the battlefield with four +1/+0 counters on it. - this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P0.createInstance(4)), "{this} enters the battlefield with four +1/+0 counters on it")); + this.addAbility(new EntersBattlefieldAbility( + new AddCountersSourceEffect(CounterType.P1P0.createInstance(4)), + "with four +1/+0 counters on it" + )); // At end of combat, if Clockwork Avian attacked or blocked this combat, remove a +1/+0 counter from it. this.addAbility(new ConditionalTriggeredAbility( new EndOfCombatTriggeredAbility(new RemoveCounterSourceEffect(CounterType.P1P0.createInstance()), false), AttackedOrBlockedThisCombatSourceCondition.instance, "At end of combat, if {this} attacked or blocked this combat, remove a +1/+0 counter from it."), - new AttackedOrBlockedThisCombatWatcher()); + new AttackedOrBlockedThisCombatWatcher() + ); // {X}, {tap}: Put up to X +1/+0 counters on Clockwork Avian. This ability can't cause the total number of +1/+0 counters on Clockwork Avian to be greater than four. Activate this ability only during your upkeep. - Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, - new AvianAddCountersSourceEffect(CounterType.P1P0.createInstance(), new ManacostVariableValue(), true, true), new ManaCostsImpl("{X}"), new IsStepCondition(PhaseStep.UPKEEP), null); + Ability ability = new ConditionalActivatedAbility( + Zone.BATTLEFIELD, + new AvianAddCountersSourceEffect( + CounterType.P1P0.createInstance(), + new ManacostVariableValue(), + true, true + ), + new ManaCostsImpl("{X}"), + new IsStepCondition(PhaseStep.UPKEEP), + null + ); ability.addCost(new TapSourceCost()); this.addAbility(ability); } @@ -99,6 +114,7 @@ class AvianAddCountersSourceEffect extends AddCountersSourceEffect { public AvianAddCountersSourceEffect(Counter counter, DynamicValue amount, boolean informPlayers, boolean putOnCard) { super(counter, amount, informPlayers, putOnCard); + staticText = "Put up to X +1/+0 counters on {this}. This ability can't cause the total number of +1/+0 counters on {this} to be greater than four."; } @Override diff --git a/Mage.Sets/src/mage/cards/c/ClockworkBeast.java b/Mage.Sets/src/mage/cards/c/ClockworkBeast.java index 0a1c06eaf8..07123dda4e 100644 --- a/Mage.Sets/src/mage/cards/c/ClockworkBeast.java +++ b/Mage.Sets/src/mage/cards/c/ClockworkBeast.java @@ -45,6 +45,7 @@ import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.PhaseStep; import mage.constants.Zone; import mage.counters.Counter; @@ -61,23 +62,36 @@ public class ClockworkBeast extends CardImpl { public ClockworkBeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(0); this.toughness = new MageInt(4); // Clockwork Beast enters the battlefield with seven +1/+0 counters on it. - this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P0.createInstance(7)), "{this} enters the battlefield with seven +1/+0 counters on it")); + this.addAbility(new EntersBattlefieldAbility( + new AddCountersSourceEffect(CounterType.P1P0.createInstance(7)), + "with seven +1/+0 counters on it" + )); // At end of combat, if Clockwork Beast attacked or blocked this combat, remove a +1/+0 counter from it. this.addAbility(new ConditionalTriggeredAbility( new EndOfCombatTriggeredAbility(new RemoveCounterSourceEffect(CounterType.P1P0.createInstance()), false), AttackedOrBlockedThisCombatSourceCondition.instance, "At end of combat, if {this} attacked or blocked this combat, remove a +1/+0 counter from it."), - new AttackedOrBlockedThisCombatWatcher()); + new AttackedOrBlockedThisCombatWatcher() + ); // {X}, {tap}: Put up to X +1/+0 counters on Clockwork Beast. This ability can't cause the total number of +1/+0 counters on Clockwork Beast to be greater than seven. Activate this ability only during your upkeep. - Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, - new BeastAddCountersSourceEffect(CounterType.P1P0.createInstance(), new ManacostVariableValue(), true, true), new ManaCostsImpl("{X}"), new IsStepCondition(PhaseStep.UPKEEP), null); + Ability ability = new ConditionalActivatedAbility( + Zone.BATTLEFIELD, + new BeastAddCountersSourceEffect( + CounterType.P1P0.createInstance(), + new ManacostVariableValue(), + true, true + ), + new ManaCostsImpl("{X}"), + new IsStepCondition(PhaseStep.UPKEEP), + null + ); ability.addCost(new TapSourceCost()); this.addAbility(ability); } @@ -96,6 +110,7 @@ class BeastAddCountersSourceEffect extends AddCountersSourceEffect { public BeastAddCountersSourceEffect(Counter counter, DynamicValue amount, boolean informPlayers, boolean putOnCard) { super(counter, amount, informPlayers, putOnCard); + staticText = "Put up to X +1/+0 counters on {this}. This ability can't cause the total number of +1/+0 counters on {this} to be greater than seven."; } @Override diff --git a/Mage.Sets/src/mage/cards/c/ClockworkBeetle.java b/Mage.Sets/src/mage/cards/c/ClockworkBeetle.java index 02ca0b368d..cb4e78db16 100644 --- a/Mage.Sets/src/mage/cards/c/ClockworkBeetle.java +++ b/Mage.Sets/src/mage/cards/c/ClockworkBeetle.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.counter.RemoveCounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.game.Game; @@ -54,7 +55,7 @@ public class ClockworkBeetle extends CardImpl { public ClockworkBeetle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/c/ClockworkCondor.java b/Mage.Sets/src/mage/cards/c/ClockworkCondor.java index 3c84659583..bd8aae6941 100644 --- a/Mage.Sets/src/mage/cards/c/ClockworkCondor.java +++ b/Mage.Sets/src/mage/cards/c/ClockworkCondor.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.game.Game; @@ -53,7 +54,7 @@ public class ClockworkCondor extends CardImpl { public ClockworkCondor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(0); this.toughness = new MageInt(0); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/c/ClockworkDragon.java b/Mage.Sets/src/mage/cards/c/ClockworkDragon.java index 93e09a59d2..9d5f6450be 100644 --- a/Mage.Sets/src/mage/cards/c/ClockworkDragon.java +++ b/Mage.Sets/src/mage/cards/c/ClockworkDragon.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -56,7 +57,7 @@ public class ClockworkDragon extends CardImpl { public ClockworkDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(0); this.toughness = new MageInt(0); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/c/ClockworkGnomes.java b/Mage.Sets/src/mage/cards/c/ClockworkGnomes.java index 8d67b2e128..7c4377ec31 100644 --- a/Mage.Sets/src/mage/cards/c/ClockworkGnomes.java +++ b/Mage.Sets/src/mage/cards/c/ClockworkGnomes.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.RegenerateTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -56,7 +57,7 @@ public class ClockworkGnomes extends CardImpl { public ClockworkGnomes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Gnome"); + this.subtype.add(SubType.GNOME); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ClockworkHydra.java b/Mage.Sets/src/mage/cards/c/ClockworkHydra.java index 50a6675257..1c7859fb70 100644 --- a/Mage.Sets/src/mage/cards/c/ClockworkHydra.java +++ b/Mage.Sets/src/mage/cards/c/ClockworkHydra.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -59,7 +60,7 @@ public class ClockworkHydra extends CardImpl { public ClockworkHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/c/ClockworkSwarm.java b/Mage.Sets/src/mage/cards/c/ClockworkSwarm.java new file mode 100644 index 0000000000..37a603166c --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ClockworkSwarm.java @@ -0,0 +1,151 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EndOfCombatTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleEvasionAbility; +import mage.abilities.condition.common.AttackedOrBlockedThisCombatSourceCondition; +import mage.abilities.condition.common.IsStepCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.PhaseStep; +import mage.constants.Zone; +import mage.counters.Counter; +import mage.counters.CounterType; +import mage.counters.Counters; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.watchers.common.AttackedOrBlockedThisCombatWatcher; + +/** + * + * @author TheElk801 + */ +public class ClockworkSwarm extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Walls"); + + static { + filter.add(new SubtypePredicate(SubType.WALL)); + } + + public ClockworkSwarm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + + this.subtype.add(SubType.INSECT); + this.power = new MageInt(0); + this.toughness = new MageInt(3); + + // Clockwork Swarm enters the battlefield with four +1/+0 counters on it. + this.addAbility(new EntersBattlefieldAbility( + new AddCountersSourceEffect(CounterType.P1P0.createInstance(4)), + "with four +1/+0 counters on it" + )); + + // Clockwork Swarm can't be blocked by Walls. + this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); + + // At end of combat, if Clockwork Swarm attacked or blocked this combat, remove a +1/+0 counter from it. + this.addAbility(new ConditionalTriggeredAbility( + new EndOfCombatTriggeredAbility(new RemoveCounterSourceEffect(CounterType.P1P0.createInstance()), false), + AttackedOrBlockedThisCombatSourceCondition.instance, + "At end of combat, if {this} attacked or blocked this combat, remove a +1/+0 counter from it."), + new AttackedOrBlockedThisCombatWatcher()); + + // {X}, {tap}: Put up to X +1/+0 counters on Clockwork Swarm. This ability can't cause the total number of +1/+0 counters on Clockwork Swarm to be greater than four. Activate this ability only during your upkeep. + Ability ability = new ConditionalActivatedAbility( + Zone.BATTLEFIELD, + new SwarmAddCountersSourceEffect( + CounterType.P1P0.createInstance(), + new ManacostVariableValue(), + true, true + ), + new ManaCostsImpl("{X}"), + new IsStepCondition(PhaseStep.UPKEEP), + null + ); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public ClockworkSwarm(final ClockworkSwarm card) { + super(card); + } + + @Override + public ClockworkSwarm copy() { + return new ClockworkSwarm(this); + } +} + +class SwarmAddCountersSourceEffect extends AddCountersSourceEffect { + + public SwarmAddCountersSourceEffect(Counter counter, DynamicValue amount, boolean informPlayers, boolean putOnCard) { + super(counter, amount, informPlayers, putOnCard); + staticText = "Put up to X +1/+0 counters on {this}. This ability can't cause the total number of +1/+0 counters on {this} to be greater than four."; + } + + @Override + public boolean apply(Game game, Ability source) { + Counters permCounters = game.getPermanent(source.getSourceId()).getCounters(game); + int countersWas = permCounters.getCount(CounterType.P1P0); + if (countersWas < 4) { + super.apply(game, source); + if (permCounters.getCount(CounterType.P1P0) > 4) { + permCounters.removeCounter(CounterType.P1P0, permCounters.getCount(CounterType.P1P0) - 4); + }//if countersWas < 4 then counter is min(current,4); there is no setCounters function though + }//else this is a rare case of a Beast getting boosted by outside sources. Which is the sole purpose of this if, for the benefit of this rare but not impossible case + return true; + } + + public SwarmAddCountersSourceEffect(final SwarmAddCountersSourceEffect effect) { + super(effect); + } + + @Override + public SwarmAddCountersSourceEffect copy() { + return new SwarmAddCountersSourceEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/ClockworkVorrac.java b/Mage.Sets/src/mage/cards/c/ClockworkVorrac.java index 38aa0d063f..f2d19569ea 100644 --- a/Mage.Sets/src/mage/cards/c/ClockworkVorrac.java +++ b/Mage.Sets/src/mage/cards/c/ClockworkVorrac.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -56,8 +57,8 @@ public class ClockworkVorrac extends CardImpl { public ClockworkVorrac(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Boar"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BOAR); + this.subtype.add(SubType.BEAST); this.power = new MageInt(0); this.toughness = new MageInt(0); this.addAbility(TrampleAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/c/CloisteredYouth.java b/Mage.Sets/src/mage/cards/c/CloisteredYouth.java index ebdf8b9302..05723808f0 100644 --- a/Mage.Sets/src/mage/cards/c/CloisteredYouth.java +++ b/Mage.Sets/src/mage/cards/c/CloisteredYouth.java @@ -36,6 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.u.UnholyFiend; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -46,7 +47,7 @@ public class CloisteredYouth extends CardImpl { public CloisteredYouth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/Clone.java b/Mage.Sets/src/mage/cards/c/Clone.java index a46d26ca67..13420b2e6e 100644 --- a/Mage.Sets/src/mage/cards/c/Clone.java +++ b/Mage.Sets/src/mage/cards/c/Clone.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CopyPermanentEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class Clone extends CardImpl { public Clone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/c/CloneLegion.java b/Mage.Sets/src/mage/cards/c/CloneLegion.java index cfe1eecbdd..423b0c22ff 100644 --- a/Mage.Sets/src/mage/cards/c/CloneLegion.java +++ b/Mage.Sets/src/mage/cards/c/CloneLegion.java @@ -30,7 +30,7 @@ package mage.cards.c; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -90,7 +90,7 @@ class CloneLegionEffect extends OneShotEffect { if (controller != null && targetPlayer != null) { for (Permanent permanent : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, targetPlayer.getId(), game)) { if (permanent != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(); effect.setTargetPointer(new FixedTarget(permanent, game)); effect.apply(game, source); } diff --git a/Mage.Sets/src/mage/cards/c/CloneShell.java b/Mage.Sets/src/mage/cards/c/CloneShell.java index 836b9dbea5..8d6ae28ee9 100644 --- a/Mage.Sets/src/mage/cards/c/CloneShell.java +++ b/Mage.Sets/src/mage/cards/c/CloneShell.java @@ -36,6 +36,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -51,7 +52,7 @@ public class CloneShell extends CardImpl { public CloneShell(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ClotSliver.java b/Mage.Sets/src/mage/cards/c/ClotSliver.java index a45cc76121..f81d24e29c 100644 --- a/Mage.Sets/src/mage/cards/c/ClotSliver.java +++ b/Mage.Sets/src/mage/cards/c/ClotSliver.java @@ -56,7 +56,7 @@ public class ClotSliver extends CardImpl { public ClotSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CloudCrusader.java b/Mage.Sets/src/mage/cards/c/CloudCrusader.java index 3f98e6eddc..b6c84dc6d9 100644 --- a/Mage.Sets/src/mage/cards/c/CloudCrusader.java +++ b/Mage.Sets/src/mage/cards/c/CloudCrusader.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class CloudCrusader extends CardImpl { public CloudCrusader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CloudDjinn.java b/Mage.Sets/src/mage/cards/c/CloudDjinn.java index 16f3854f6a..8a638f021c 100644 --- a/Mage.Sets/src/mage/cards/c/CloudDjinn.java +++ b/Mage.Sets/src/mage/cards/c/CloudDjinn.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class CloudDjinn extends CardImpl { public CloudDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CloudDragon.java b/Mage.Sets/src/mage/cards/c/CloudDragon.java index b75e3b1eb6..2c35637a78 100644 --- a/Mage.Sets/src/mage/cards/c/CloudDragon.java +++ b/Mage.Sets/src/mage/cards/c/CloudDragon.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class CloudDragon extends CardImpl { public CloudDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Illusion"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.ILLUSION); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CloudElemental.java b/Mage.Sets/src/mage/cards/c/CloudElemental.java index 19c46314bf..c042e9738d 100644 --- a/Mage.Sets/src/mage/cards/c/CloudElemental.java +++ b/Mage.Sets/src/mage/cards/c/CloudElemental.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class CloudElemental extends CardImpl { public CloudElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CloudManta.java b/Mage.Sets/src/mage/cards/c/CloudManta.java index 967d2d1723..94b8589d0a 100644 --- a/Mage.Sets/src/mage/cards/c/CloudManta.java +++ b/Mage.Sets/src/mage/cards/c/CloudManta.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class CloudManta extends CardImpl { public CloudManta(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Fish"); + this.subtype.add(SubType.FISH); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CloudOfFaeries.java b/Mage.Sets/src/mage/cards/c/CloudOfFaeries.java index 94baf734e5..872cc6ab85 100644 --- a/Mage.Sets/src/mage/cards/c/CloudOfFaeries.java +++ b/Mage.Sets/src/mage/cards/c/CloudOfFaeries.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class CloudOfFaeries extends CardImpl { public CloudOfFaeries(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CloudPirates.java b/Mage.Sets/src/mage/cards/c/CloudPirates.java index 86d526ea1e..cb3e837bb0 100644 --- a/Mage.Sets/src/mage/cards/c/CloudPirates.java +++ b/Mage.Sets/src/mage/cards/c/CloudPirates.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class CloudPirates extends CardImpl { public CloudPirates(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Human"); - this.subtype.add("Pirate"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CloudSpirit.java b/Mage.Sets/src/mage/cards/c/CloudSpirit.java index 7542a6cfca..a8027b5b47 100644 --- a/Mage.Sets/src/mage/cards/c/CloudSpirit.java +++ b/Mage.Sets/src/mage/cards/c/CloudSpirit.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class CloudSpirit extends CardImpl { public CloudSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CloudSprite.java b/Mage.Sets/src/mage/cards/c/CloudSprite.java index 064e14ff46..14e06f6112 100644 --- a/Mage.Sets/src/mage/cards/c/CloudSprite.java +++ b/Mage.Sets/src/mage/cards/c/CloudSprite.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class CloudSprite extends CardImpl { public CloudSprite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/Cloudblazer.java b/Mage.Sets/src/mage/cards/c/Cloudblazer.java index 4ab0e9e477..b0fefc2803 100644 --- a/Mage.Sets/src/mage/cards/c/Cloudblazer.java +++ b/Mage.Sets/src/mage/cards/c/Cloudblazer.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,8 +48,8 @@ public class Cloudblazer extends CardImpl { public Cloudblazer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{U}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CloudchaserEagle.java b/Mage.Sets/src/mage/cards/c/CloudchaserEagle.java index 0e0c465dbd..01d305c799 100644 --- a/Mage.Sets/src/mage/cards/c/CloudchaserEagle.java +++ b/Mage.Sets/src/mage/cards/c/CloudchaserEagle.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetEnchantmentPermanent; /** @@ -46,7 +47,7 @@ public class CloudchaserEagle extends CardImpl { public CloudchaserEagle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CloudchaserKestrel.java b/Mage.Sets/src/mage/cards/c/CloudchaserKestrel.java index 68f702b285..91443238a9 100644 --- a/Mage.Sets/src/mage/cards/c/CloudchaserKestrel.java +++ b/Mage.Sets/src/mage/cards/c/CloudchaserKestrel.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -53,7 +54,7 @@ public class CloudchaserKestrel extends CardImpl { public CloudchaserKestrel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CloudcrownOak.java b/Mage.Sets/src/mage/cards/c/CloudcrownOak.java index e675c017a6..da3874c902 100644 --- a/Mage.Sets/src/mage/cards/c/CloudcrownOak.java +++ b/Mage.Sets/src/mage/cards/c/CloudcrownOak.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class CloudcrownOak extends CardImpl { public CloudcrownOak(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CloudfinRaptor.java b/Mage.Sets/src/mage/cards/c/CloudfinRaptor.java index 780b77a247..609a649114 100644 --- a/Mage.Sets/src/mage/cards/c/CloudfinRaptor.java +++ b/Mage.Sets/src/mage/cards/c/CloudfinRaptor.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class CloudfinRaptor extends CardImpl { public CloudfinRaptor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Bird"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CloudgoatRanger.java b/Mage.Sets/src/mage/cards/c/CloudgoatRanger.java index 1c0584ec87..f55639b471 100644 --- a/Mage.Sets/src/mage/cards/c/CloudgoatRanger.java +++ b/Mage.Sets/src/mage/cards/c/CloudgoatRanger.java @@ -66,8 +66,8 @@ public class CloudgoatRanger extends CardImpl { public CloudgoatRanger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CloudheathDrake.java b/Mage.Sets/src/mage/cards/c/CloudheathDrake.java index 48232686f4..9dd5a0db48 100644 --- a/Mage.Sets/src/mage/cards/c/CloudheathDrake.java +++ b/Mage.Sets/src/mage/cards/c/CloudheathDrake.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class CloudheathDrake extends CardImpl { public CloudheathDrake (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CloudhoofKirin.java b/Mage.Sets/src/mage/cards/c/CloudhoofKirin.java index f939ff5a11..2494270a62 100644 --- a/Mage.Sets/src/mage/cards/c/CloudhoofKirin.java +++ b/Mage.Sets/src/mage/cards/c/CloudhoofKirin.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -53,10 +54,10 @@ import mage.target.TargetPlayer; public class CloudhoofKirin extends CardImpl { public CloudhoofKirin(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Kirin"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.KIRIN); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -97,10 +98,10 @@ class CloudhoofKirinEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source)); + Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source)); if (spell != null) { Player targetPlayer = null; - for(Target target: source.getTargets()) { + for (Target target : source.getTargets()) { if (target instanceof TargetPlayer) { targetPlayer = game.getPlayer(target.getFirstTarget()); } diff --git a/Mage.Sets/src/mage/cards/c/CloudreachCavalry.java b/Mage.Sets/src/mage/cards/c/CloudreachCavalry.java index 82499a16d4..2c5d3ec0a2 100644 --- a/Mage.Sets/src/mage/cards/c/CloudreachCavalry.java +++ b/Mage.Sets/src/mage/cards/c/CloudreachCavalry.java @@ -59,8 +59,8 @@ public class CloudreachCavalry extends CardImpl { public CloudreachCavalry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/Cloudseeder.java b/Mage.Sets/src/mage/cards/c/Cloudseeder.java index faf8f4ba4d..a86c21ccee 100644 --- a/Mage.Sets/src/mage/cards/c/Cloudseeder.java +++ b/Mage.Sets/src/mage/cards/c/Cloudseeder.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.CloudSpriteToken; @@ -50,8 +51,8 @@ public class Cloudseeder extends CardImpl { public Cloudseeder(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/Cloudskate.java b/Mage.Sets/src/mage/cards/c/Cloudskate.java index 787b202217..6a144fe38e 100644 --- a/Mage.Sets/src/mage/cards/c/Cloudskate.java +++ b/Mage.Sets/src/mage/cards/c/Cloudskate.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class Cloudskate extends CardImpl { public Cloudskate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/Cloudthresher.java b/Mage.Sets/src/mage/cards/c/Cloudthresher.java index 96e29a1402..2d1651c387 100644 --- a/Mage.Sets/src/mage/cards/c/Cloudthresher.java +++ b/Mage.Sets/src/mage/cards/c/Cloudthresher.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -56,7 +57,7 @@ public class Cloudthresher extends CardImpl { public Cloudthresher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/c/CloutOfTheDominus.java b/Mage.Sets/src/mage/cards/c/CloutOfTheDominus.java index 27dd095bd6..90323feef0 100644 --- a/Mage.Sets/src/mage/cards/c/CloutOfTheDominus.java +++ b/Mage.Sets/src/mage/cards/c/CloutOfTheDominus.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -56,7 +57,7 @@ public class CloutOfTheDominus extends CardImpl { public CloutOfTheDominus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U/R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/c/ClovenCasting.java b/Mage.Sets/src/mage/cards/c/ClovenCasting.java index eea8864f43..107ed2c49d 100644 --- a/Mage.Sets/src/mage/cards/c/ClovenCasting.java +++ b/Mage.Sets/src/mage/cards/c/ClovenCasting.java @@ -60,7 +60,7 @@ public class ClovenCasting extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{5}{U}{R}"); // Whenever you cast a multicolored instant or sorcery spell, you may pay {1}. If you do, copy that spell. You may choose new targets for the copy. - Effect effect = new CopyTargetSpellEffect(); + Effect effect = new CopyTargetSpellEffect(true); effect.setText("copy that spell. You may choose new targets for the copy"); this.addAbility(new SpellCastControllerTriggeredAbility(new DoIfCostPaid(effect, new GenericManaCost(1)), filter, true, true)); } diff --git a/Mage.Sets/src/mage/cards/c/ClutchOfUndeath.java b/Mage.Sets/src/mage/cards/c/ClutchOfUndeath.java index 1156dbd801..2c04cc3a7e 100644 --- a/Mage.Sets/src/mage/cards/c/ClutchOfUndeath.java +++ b/Mage.Sets/src/mage/cards/c/ClutchOfUndeath.java @@ -53,7 +53,7 @@ public class ClutchOfUndeath extends CardImpl { public ClutchOfUndeath(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CoalGolem.java b/Mage.Sets/src/mage/cards/c/CoalGolem.java index dbb9a1e40a..b6ee9219ed 100644 --- a/Mage.Sets/src/mage/cards/c/CoalGolem.java +++ b/Mage.Sets/src/mage/cards/c/CoalGolem.java @@ -37,6 +37,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class CoalGolem extends CardImpl { public CoalGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CoalStoker.java b/Mage.Sets/src/mage/cards/c/CoalStoker.java index 8f0f9f98cc..bf3a8b83c0 100644 --- a/Mage.Sets/src/mage/cards/c/CoalStoker.java +++ b/Mage.Sets/src/mage/cards/c/CoalStoker.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.BasicManaEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.watchers.common.CastFromHandWatcher; /** @@ -47,7 +48,7 @@ public class CoalStoker extends CardImpl { public CoalStoker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CoalhaulerSwine.java b/Mage.Sets/src/mage/cards/c/CoalhaulerSwine.java index 84f067b8c4..6508d432b0 100644 --- a/Mage.Sets/src/mage/cards/c/CoalhaulerSwine.java +++ b/Mage.Sets/src/mage/cards/c/CoalhaulerSwine.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -48,14 +49,14 @@ public class CoalhaulerSwine extends CardImpl { public CoalhaulerSwine(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); - - this.subtype.add("Boar"); - this.subtype.add("Beast"); + + this.subtype.add(SubType.BOAR); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); // Whenever Coalhauler Swine is dealt damage, it deals that much damage to each player. - this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new CoalhaulerSwineEffect(), false)); + this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new CoalhaulerSwineEffect(), false, false, true)); } public CoalhaulerSwine(final CoalhaulerSwine card) { @@ -87,7 +88,7 @@ public class CoalhaulerSwine extends CardImpl { public boolean apply(Game game, Ability source) { for (UUID playerId : game.getPlayers().keySet()) { Player player = game.getPlayer(playerId); - if(player != null) { + if (player != null) { player.damage((Integer) this.getValue("damage"), source.getSourceId(), game, false, true); } } diff --git a/Mage.Sets/src/mage/cards/c/CoalitionFlag.java b/Mage.Sets/src/mage/cards/c/CoalitionFlag.java index e96f8e13bc..a5e996cd2d 100644 --- a/Mage.Sets/src/mage/cards/c/CoalitionFlag.java +++ b/Mage.Sets/src/mage/cards/c/CoalitionFlag.java @@ -28,6 +28,7 @@ package mage.cards.c; import java.util.UUID; + import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.AttachEffect; @@ -36,10 +37,15 @@ import mage.abilities.effects.common.ruleModifying.TargetsHaveToTargetPermanentI import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.*; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.target.TargetPermanent; -import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetControlledCreaturePermanent; /** * @@ -50,17 +56,17 @@ public class CoalitionFlag extends CardImpl { public CoalitionFlag(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature you control - TargetPermanent auraTarget = new TargetCreaturePermanent(); + TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature is a Flagbearer. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetCardSubtypeAttachedEffect(SubType.FLAGBEARER, Duration.WhileOnBattlefield, AttachmentType.AURA))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetCardSubtypeAttachedEffect(Duration.WhileOnBattlefield, AttachmentType.AURA, SubType.FLAGBEARER))); // While choosing targets as part of casting a spell or activating an ability, your opponents must choose at least one Flagbearer on the battlefield if able. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new TargetsHaveToTargetPermanentIfAbleEffect(new FilterPermanent(SubType.FLAGBEARER, "one Flagbearer")))); diff --git a/Mage.Sets/src/mage/cards/c/CoalitionHonorGuard.java b/Mage.Sets/src/mage/cards/c/CoalitionHonorGuard.java index 9efb9fb131..6625d8b943 100644 --- a/Mage.Sets/src/mage/cards/c/CoalitionHonorGuard.java +++ b/Mage.Sets/src/mage/cards/c/CoalitionHonorGuard.java @@ -48,8 +48,8 @@ public class CoalitionHonorGuard extends CardImpl { public CoalitionHonorGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Flagbearer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.FLAGBEARER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CoastWatcher.java b/Mage.Sets/src/mage/cards/c/CoastWatcher.java index 713fa18c76..510aedbcea 100644 --- a/Mage.Sets/src/mage/cards/c/CoastWatcher.java +++ b/Mage.Sets/src/mage/cards/c/CoastWatcher.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class CoastWatcher extends CardImpl { public CoastWatcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CoastalDrake.java b/Mage.Sets/src/mage/cards/c/CoastalDrake.java index 3ca0ff7800..d8fd9eb264 100644 --- a/Mage.Sets/src/mage/cards/c/CoastalDrake.java +++ b/Mage.Sets/src/mage/cards/c/CoastalDrake.java @@ -51,7 +51,7 @@ public class CoastalDrake extends CardImpl { public CoastalDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CoastalHornclaw.java b/Mage.Sets/src/mage/cards/c/CoastalHornclaw.java index 94c8df34e7..c41a11017f 100644 --- a/Mage.Sets/src/mage/cards/c/CoastalHornclaw.java +++ b/Mage.Sets/src/mage/cards/c/CoastalHornclaw.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -53,7 +54,7 @@ public class CoastalHornclaw extends CardImpl { public CoastalHornclaw(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CoastalWizard.java b/Mage.Sets/src/mage/cards/c/CoastalWizard.java index 5c53eb4d9a..4b689b3268 100644 --- a/Mage.Sets/src/mage/cards/c/CoastalWizard.java +++ b/Mage.Sets/src/mage/cards/c/CoastalWizard.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -57,8 +58,8 @@ public class CoastalWizard extends CardImpl { public CoastalWizard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CoastlineChimera.java b/Mage.Sets/src/mage/cards/c/CoastlineChimera.java index b8a06e49f8..bfe814eab4 100644 --- a/Mage.Sets/src/mage/cards/c/CoastlineChimera.java +++ b/Mage.Sets/src/mage/cards/c/CoastlineChimera.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class CoastlineChimera extends CardImpl { public CoastlineChimera(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Chimera"); + this.subtype.add(SubType.CHIMERA); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CobaltGolem.java b/Mage.Sets/src/mage/cards/c/CobaltGolem.java index 7df0ab599b..1f806dfcb0 100644 --- a/Mage.Sets/src/mage/cards/c/CobaltGolem.java +++ b/Mage.Sets/src/mage/cards/c/CobaltGolem.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class CobaltGolem extends CardImpl { public CobaltGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(2); this.toughness = new MageInt(3); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{1}{U}"))); diff --git a/Mage.Sets/src/mage/cards/c/Cobblebrute.java b/Mage.Sets/src/mage/cards/c/Cobblebrute.java index 99b200c5b3..503c4b2f03 100644 --- a/Mage.Sets/src/mage/cards/c/Cobblebrute.java +++ b/Mage.Sets/src/mage/cards/c/Cobblebrute.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class Cobblebrute extends CardImpl { public Cobblebrute (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CobbledWings.java b/Mage.Sets/src/mage/cards/c/CobbledWings.java index 67b0d7b8a8..fed371f2f8 100644 --- a/Mage.Sets/src/mage/cards/c/CobbledWings.java +++ b/Mage.Sets/src/mage/cards/c/CobbledWings.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class CobbledWings extends CardImpl { public CobbledWings(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has flying. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/c/Cockatrice.java b/Mage.Sets/src/mage/cards/c/Cockatrice.java index c1389e91f9..53d0ff12e7 100644 --- a/Mage.Sets/src/mage/cards/c/Cockatrice.java +++ b/Mage.Sets/src/mage/cards/c/Cockatrice.java @@ -57,7 +57,7 @@ public class Cockatrice extends CardImpl { public Cockatrice(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); - this.subtype.add("Cockatrice"); + this.subtype.add(SubType.COCKATRICE); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CoffinPuppets.java b/Mage.Sets/src/mage/cards/c/CoffinPuppets.java index 1a53273b65..55e53caf1b 100644 --- a/Mage.Sets/src/mage/cards/c/CoffinPuppets.java +++ b/Mage.Sets/src/mage/cards/c/CoffinPuppets.java @@ -63,7 +63,7 @@ public class CoffinPuppets extends CardImpl { public CoffinPuppets(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CoffinQueen.java b/Mage.Sets/src/mage/cards/c/CoffinQueen.java index b51adf9b8d..ca66fe8f4a 100644 --- a/Mage.Sets/src/mage/cards/c/CoffinQueen.java +++ b/Mage.Sets/src/mage/cards/c/CoffinQueen.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class CoffinQueen extends CardImpl { public CoffinQueen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/Cognivore.java b/Mage.Sets/src/mage/cards/c/Cognivore.java index 69a735302d..f1f4cd19b5 100644 --- a/Mage.Sets/src/mage/cards/c/Cognivore.java +++ b/Mage.Sets/src/mage/cards/c/Cognivore.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterCard; @@ -55,7 +56,7 @@ public class Cognivore extends CardImpl { public Cognivore(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{U}{U}"); - this.subtype.add("Lhurgoyf"); + this.subtype.add(SubType.LHURGOYF); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/c/CogworkAssembler.java b/Mage.Sets/src/mage/cards/c/CogworkAssembler.java index 0432779b8b..650f1962f8 100644 --- a/Mage.Sets/src/mage/cards/c/CogworkAssembler.java +++ b/Mage.Sets/src/mage/cards/c/CogworkAssembler.java @@ -36,10 +36,11 @@ import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbil import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class CogworkAssembler extends CardImpl { public CogworkAssembler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); - this.subtype.add("Assembly-Worker"); + this.subtype.add(SubType.ASSEMBLY_WORKER); this.power = new MageInt(2); this.toughness = new MageInt(3); @@ -96,7 +97,7 @@ class CogworkAssemblerCreateTokenEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent copiedPermanent = game.getPermanent(this.getTargetPointer().getFirst(game, source)); if (copiedPermanent != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(null, CardType.ARTIFACT, true); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(null, CardType.ARTIFACT, true); if (effect.apply(game, source)) { for (Permanent copyPermanent : effect.getAddedPermanent()) { ExileTargetEffect exileEffect = new ExileTargetEffect(); diff --git a/Mage.Sets/src/mage/cards/c/CoiledTinviper.java b/Mage.Sets/src/mage/cards/c/CoiledTinviper.java index 497f301436..659837bfab 100644 --- a/Mage.Sets/src/mage/cards/c/CoiledTinviper.java +++ b/Mage.Sets/src/mage/cards/c/CoiledTinviper.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class CoiledTinviper extends CardImpl { public CoiledTinviper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CoilingOracle.java b/Mage.Sets/src/mage/cards/c/CoilingOracle.java index 322db21d7f..358fa6714b 100644 --- a/Mage.Sets/src/mage/cards/c/CoilingOracle.java +++ b/Mage.Sets/src/mage/cards/c/CoilingOracle.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.RevealTopLandToBattlefieldElseHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author mluds @@ -42,9 +43,9 @@ public class CoilingOracle extends CardImpl { public CoilingOracle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{U}"); - this.subtype.add("Snake"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CoilingWoodworm.java b/Mage.Sets/src/mage/cards/c/CoilingWoodworm.java index da59c1bc16..189edae62b 100644 --- a/Mage.Sets/src/mage/cards/c/CoilingWoodworm.java +++ b/Mage.Sets/src/mage/cards/c/CoilingWoodworm.java @@ -56,8 +56,8 @@ public class CoilingWoodworm extends CardImpl { public CoilingWoodworm(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Insect"); - this.subtype.add("Worm"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.WORM); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/ColdEyedSelkie.java b/Mage.Sets/src/mage/cards/c/ColdEyedSelkie.java index 3c3fe6b837..f488e3cfde 100644 --- a/Mage.Sets/src/mage/cards/c/ColdEyedSelkie.java +++ b/Mage.Sets/src/mage/cards/c/ColdEyedSelkie.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.IslandwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -48,8 +49,8 @@ public class ColdEyedSelkie extends CardImpl { public ColdEyedSelkie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G/U}{G/U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/ColfenorsUrn.java b/Mage.Sets/src/mage/cards/c/ColfenorsUrn.java index ced07045bf..6f0c415ae1 100644 --- a/Mage.Sets/src/mage/cards/c/ColfenorsUrn.java +++ b/Mage.Sets/src/mage/cards/c/ColfenorsUrn.java @@ -1,138 +1,138 @@ -/* - * 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.cards.c; - -import java.util.UUID; -import mage.MageObject; -import mage.abilities.Ability; -import mage.abilities.common.BeginningOfEndStepTriggeredAbility; -import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility; -import mage.abilities.condition.Condition; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.ExileTargetForSourceEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.ComparisonType; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.ToughnessPredicate; -import mage.game.ExileZone; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.util.CardUtil; - -/** - * - * @author Styxo - */ -public class ColfenorsUrn extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with toughness 4 or greater"); - - static { - filter.add(new ToughnessPredicate(ComparisonType.MORE_THAN, 3)); - } - - public ColfenorsUrn(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); - - // Whenever a creature with toughness 4 or greater is put into your graveyard from the battlefield, you may exile it. - this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(new ExileTargetForSourceEffect(), true, filter, true, true)); - - // At the beginning of the end step, if three or more cards have been exiled with Colfenor's Urn, sacrifice it. If you do, return those cards to the battlefield under their owner's control. - this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new ColfenorsUrnEffect(), TargetController.ANY, new ColfenorsUrnCondition(), false)); - } - - public ColfenorsUrn(final ColfenorsUrn card) { - super(card); - } - - @Override - public ColfenorsUrn copy() { - return new ColfenorsUrn(this); - } -} - -class ColfenorsUrnEffect extends OneShotEffect { - - public ColfenorsUrnEffect() { - super(Outcome.PutCreatureInPlay); - this.staticText = "If you do, return those cards to the battlefield under their owner's control"; - } - - public ColfenorsUrnEffect(final ColfenorsUrnEffect effect) { - super(effect); - } - - @Override - public ColfenorsUrnEffect copy() { - return new ColfenorsUrnEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - Permanent permanent = (Permanent) source.getSourceObjectIfItStillExists(game); - if (controller != null && permanent != null) { - UUID exileId = CardUtil.getCardExileZoneId(game, source); - ExileZone exile = game.getExile().getExileZone(exileId); - if (permanent.sacrifice(source.getSourceId(), game)) { - controller.moveCards(exile.getCards(game), Zone.BATTLEFIELD, source, game); - } - return true; - - } - return false; - } -} - -class ColfenorsUrnCondition implements Condition { - - @Override - public final boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - MageObject sourceObject = game.getObject(source.getSourceId()); - if (controller != null && sourceObject != null) { - UUID exileId = CardUtil.getCardExileZoneId(game, source); - ExileZone exile = game.getExile().getExileZone(exileId); - if (exile != null) { - return exile.size() > 2; - } - } - return false; - } - - @Override - public String toString() { - return "if three or more cards have been exiled with Colfenor's Urn, sacrifice it."; - } -} +/* + * 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.cards.c; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ExileTargetForSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ToughnessPredicate; +import mage.game.ExileZone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.util.CardUtil; + +/** + * + * @author Styxo + */ +public class ColfenorsUrn extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with toughness 4 or greater"); + + static { + filter.add(new ToughnessPredicate(ComparisonType.MORE_THAN, 3)); + } + + public ColfenorsUrn(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + // Whenever a creature with toughness 4 or greater is put into your graveyard from the battlefield, you may exile it. + this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(new ExileTargetForSourceEffect(), true, filter, true, true)); + + // At the beginning of the end step, if three or more cards have been exiled with Colfenor's Urn, sacrifice it. If you do, return those cards to the battlefield under their owner's control. + this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new ColfenorsUrnEffect(), TargetController.ANY, new ColfenorsUrnCondition(), false)); + } + + public ColfenorsUrn(final ColfenorsUrn card) { + super(card); + } + + @Override + public ColfenorsUrn copy() { + return new ColfenorsUrn(this); + } +} + +class ColfenorsUrnEffect extends OneShotEffect { + + public ColfenorsUrnEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "If you do, return those cards to the battlefield under their owner's control"; + } + + public ColfenorsUrnEffect(final ColfenorsUrnEffect effect) { + super(effect); + } + + @Override + public ColfenorsUrnEffect copy() { + return new ColfenorsUrnEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent permanent = (Permanent) source.getSourceObjectIfItStillExists(game); + if (controller != null && permanent != null) { + UUID exileId = CardUtil.getCardExileZoneId(game, source); + ExileZone exile = game.getExile().getExileZone(exileId); + if (permanent.sacrifice(source.getSourceId(), game)) { + controller.moveCards(exile.getCards(game), Zone.BATTLEFIELD, source, game); + } + return true; + + } + return false; + } +} + +class ColfenorsUrnCondition implements Condition { + + @Override + public final boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (controller != null && sourceObject != null) { + UUID exileId = CardUtil.getCardExileZoneId(game, source); + ExileZone exile = game.getExile().getExileZone(exileId); + if (exile != null) { + return exile.size() > 2; + } + } + return false; + } + + @Override + public String toString() { + return "if three or more cards have been exiled with Colfenor's Urn, sacrifice it."; + } +} diff --git a/Mage.Sets/src/mage/cards/c/CollapsingBorders.java b/Mage.Sets/src/mage/cards/c/CollapsingBorders.java index b99b7dfd7f..c273b3e7b8 100644 --- a/Mage.Sets/src/mage/cards/c/CollapsingBorders.java +++ b/Mage.Sets/src/mage/cards/c/CollapsingBorders.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.GainLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.constants.TargetController; @@ -47,7 +48,7 @@ import mage.constants.TargetController; public class CollapsingBorders extends CardImpl { public CollapsingBorders(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}"); // Domain - At the beginning of each player's upkeep, that player gains 1 life for each basic land type among lands he or she controls. Then Collapsing Borders deals 3 damage to him or her. Effect effect = new GainLifeTargetEffect(new DomainValue(true)); @@ -56,6 +57,7 @@ public class CollapsingBorders extends CardImpl { effect = new DamageTargetEffect(3); effect.setText("Then {this} deals 3 damage to him or her."); ability.addEffect(effect); + ability.setAbilityWord(AbilityWord.DOMAIN); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CollectiveRestraint.java b/Mage.Sets/src/mage/cards/c/CollectiveRestraint.java index a956c84595..d2b60309a0 100644 --- a/Mage.Sets/src/mage/cards/c/CollectiveRestraint.java +++ b/Mage.Sets/src/mage/cards/c/CollectiveRestraint.java @@ -36,6 +36,7 @@ import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.effects.common.combat.CantAttackYouUnlessPayManaAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,9 @@ public class CollectiveRestraint extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}"); // Domain - Creatures can't attack you unless their controller pays {X} for each creature he or she controls that's attacking you, where X is the number of basic land types you control. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CollectiveRestraintPayManaToAttackAllEffect())); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new CollectiveRestraintPayManaToAttackAllEffect()); + ability.setAbilityWord(AbilityWord.DOMAIN); + this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/ColosYearling.java b/Mage.Sets/src/mage/cards/c/ColosYearling.java index a9dc44558d..8940c37bec 100644 --- a/Mage.Sets/src/mage/cards/c/ColosYearling.java +++ b/Mage.Sets/src/mage/cards/c/ColosYearling.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class ColosYearling extends CardImpl { public ColosYearling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goat"); - this.subtype.add("Beast"); + this.subtype.add(SubType.GOAT); + this.subtype.add(SubType.BEAST); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/ColossalDreadmaw.java b/Mage.Sets/src/mage/cards/c/ColossalDreadmaw.java new file mode 100644 index 0000000000..e1fcac90a4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ColossalDreadmaw.java @@ -0,0 +1,64 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.constants.SubType; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class ColossalDreadmaw extends CardImpl { + + public ColossalDreadmaw(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + } + + public ColossalDreadmaw(final ColossalDreadmaw card) { + super(card); + } + + @Override + public ColossalDreadmaw copy() { + return new ColossalDreadmaw(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/ColossalHeroics.java b/Mage.Sets/src/mage/cards/c/ColossalHeroics.java index bcad9fda9e..3dd6608302 100644 --- a/Mage.Sets/src/mage/cards/c/ColossalHeroics.java +++ b/Mage.Sets/src/mage/cards/c/ColossalHeroics.java @@ -45,14 +45,13 @@ import mage.target.common.TargetCreaturePermanent; public class ColossalHeroics extends CardImpl { public ColossalHeroics(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{G}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}"); // Strive - Colossal Heroics costs {1}{G} more to cast for each target beyond the first. this.addAbility(new StriveAbility("{1}{G}")); // Any number of target creatures each get +2/+2 until end of turn. Untap those creatures. - Effect effect = new BoostTargetEffect(2,2, Duration.EndOfTurn); - effect.setText("Any number of target creatures each get +2/+2"); + Effect effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn); + effect.setText("Any number of target creatures each get +2/+2 until end of turn."); this.getSpellAbility().addEffect(effect); effect = new UntapTargetEffect(); effect.setText("Untap those creatures"); diff --git a/Mage.Sets/src/mage/cards/c/ColossalWhale.java b/Mage.Sets/src/mage/cards/c/ColossalWhale.java index 69e32b2c6a..ea34c64046 100644 --- a/Mage.Sets/src/mage/cards/c/ColossalWhale.java +++ b/Mage.Sets/src/mage/cards/c/ColossalWhale.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.IslandwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -58,7 +59,7 @@ public class ColossalWhale extends CardImpl { public ColossalWhale(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); - this.subtype.add("Whale"); + this.subtype.add(SubType.WHALE); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/Colossapede.java b/Mage.Sets/src/mage/cards/c/Colossapede.java index a2e914ebcc..15886bd3e2 100644 --- a/Mage.Sets/src/mage/cards/c/Colossapede.java +++ b/Mage.Sets/src/mage/cards/c/Colossapede.java @@ -5,6 +5,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Stravant @@ -13,7 +14,7 @@ public class Colossapede extends CardImpl { public Colossapede(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(5); this.toughness = new MageInt(5); } diff --git a/Mage.Sets/src/mage/cards/c/ColossodonYearling.java b/Mage.Sets/src/mage/cards/c/ColossodonYearling.java index 5b2c30505a..5dfed80bf9 100644 --- a/Mage.Sets/src/mage/cards/c/ColossodonYearling.java +++ b/Mage.Sets/src/mage/cards/c/ColossodonYearling.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class ColossodonYearling extends CardImpl { public ColossodonYearling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(4); } diff --git a/Mage.Sets/src/mage/cards/c/ColossusOfAkros.java b/Mage.Sets/src/mage/cards/c/ColossusOfAkros.java index a1dccd72bb..3ecee28430 100644 --- a/Mage.Sets/src/mage/cards/c/ColossusOfAkros.java +++ b/Mage.Sets/src/mage/cards/c/ColossusOfAkros.java @@ -44,6 +44,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class ColossusOfAkros extends CardImpl { public ColossusOfAkros(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{8}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(10); this.toughness = new MageInt(10); diff --git a/Mage.Sets/src/mage/cards/c/ColossusOfSardia.java b/Mage.Sets/src/mage/cards/c/ColossusOfSardia.java index 0d2ab77813..1bf75b58b9 100644 --- a/Mage.Sets/src/mage/cards/c/ColossusOfSardia.java +++ b/Mage.Sets/src/mage/cards/c/ColossusOfSardia.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.PhaseStep; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class ColossusOfSardia extends CardImpl { public ColossusOfSardia(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{9}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(9); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/c/ComaVeil.java b/Mage.Sets/src/mage/cards/c/ComaVeil.java index c22d198aaa..0284ee55a7 100644 --- a/Mage.Sets/src/mage/cards/c/ComaVeil.java +++ b/Mage.Sets/src/mage/cards/c/ComaVeil.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -58,7 +59,7 @@ public class ComaVeil extends CardImpl { public ComaVeil(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant artifact or creature TargetPermanent auraTarget = new TargetPermanent(filter); diff --git a/Mage.Sets/src/mage/cards/c/CombatCelebrant.java b/Mage.Sets/src/mage/cards/c/CombatCelebrant.java index d8069144b7..a5b096a290 100644 --- a/Mage.Sets/src/mage/cards/c/CombatCelebrant.java +++ b/Mage.Sets/src/mage/cards/c/CombatCelebrant.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ExertAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; /** @@ -47,8 +48,8 @@ public class CombatCelebrant extends CardImpl { public CombatCelebrant(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CombatMedic.java b/Mage.Sets/src/mage/cards/c/CombatMedic.java index f6e0dcb23b..22f4a02f12 100644 --- a/Mage.Sets/src/mage/cards/c/CombatMedic.java +++ b/Mage.Sets/src/mage/cards/c/CombatMedic.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,9 +49,9 @@ public class CombatMedic extends CardImpl { public CombatMedic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CombustibleGearhulk.java b/Mage.Sets/src/mage/cards/c/CombustibleGearhulk.java index 9ea0f7704c..df92f77e6d 100644 --- a/Mage.Sets/src/mage/cards/c/CombustibleGearhulk.java +++ b/Mage.Sets/src/mage/cards/c/CombustibleGearhulk.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -55,7 +56,7 @@ public class CombustibleGearhulk extends CardImpl { public CombustibleGearhulk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/c/CommandOfUnsummoning.java b/Mage.Sets/src/mage/cards/c/CommandOfUnsummoning.java new file mode 100644 index 0000000000..9ea9c2069f --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CommandOfUnsummoning.java @@ -0,0 +1,74 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility; +import mage.abilities.condition.common.AttackedThisStepCondition; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.PhaseStep; +import mage.constants.TurnPhase; +import mage.filter.common.FilterAttackingCreature; +import mage.target.common.TargetAttackingCreature; +import mage.watchers.common.PlayerAttackedStepWatcher; + +/** + * + * @author TheElk801 + */ +public class CommandOfUnsummoning extends CardImpl { + + public CommandOfUnsummoning(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}"); + + // Cast Command of Unsummoning only during the declare attackers step and only if you've been attacked this step. + Ability ability = new CastOnlyDuringPhaseStepSourceAbility( + TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance, + "Cast {this} only during the declare attackers step and only if you've been attacked this step." + ); + ability.addWatcher(new PlayerAttackedStepWatcher()); + this.addAbility(ability); + + // Return one or two target attacking creatures to their owner's hand. + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect().setText("Return one or two target attacking creatures to their owner's hand.")); + this.getSpellAbility().addTarget(new TargetAttackingCreature(1, 2, new FilterAttackingCreature(), false)); + } + + public CommandOfUnsummoning(final CommandOfUnsummoning card) { + super(card); + } + + @Override + public CommandOfUnsummoning copy() { + return new CommandOfUnsummoning(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CommanderCody.java b/Mage.Sets/src/mage/cards/c/CommanderCody.java index 52797ddaa0..418ab31c20 100644 --- a/Mage.Sets/src/mage/cards/c/CommanderCody.java +++ b/Mage.Sets/src/mage/cards/c/CommanderCody.java @@ -58,8 +58,8 @@ public class CommanderCody extends CardImpl { public CommanderCody(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Trooper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.TROOPER); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/c/CommanderEesha.java b/Mage.Sets/src/mage/cards/c/CommanderEesha.java index d6248b0ce9..e5fea9d91c 100644 --- a/Mage.Sets/src/mage/cards/c/CommanderEesha.java +++ b/Mage.Sets/src/mage/cards/c/CommanderEesha.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -53,8 +54,8 @@ public class CommanderEesha extends CardImpl { public CommanderEesha(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CommanderGrevenIlVec.java b/Mage.Sets/src/mage/cards/c/CommanderGrevenIlVec.java index ce4b098eb6..6d6dca37ba 100644 --- a/Mage.Sets/src/mage/cards/c/CommanderGrevenIlVec.java +++ b/Mage.Sets/src/mage/cards/c/CommanderGrevenIlVec.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.StaticFilters; @@ -47,8 +48,8 @@ public class CommanderGrevenIlVec extends CardImpl { public CommanderGrevenIlVec(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(7); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CommandersAuthority.java b/Mage.Sets/src/mage/cards/c/CommandersAuthority.java index 4f4fd54012..2388990454 100644 --- a/Mage.Sets/src/mage/cards/c/CommandersAuthority.java +++ b/Mage.Sets/src/mage/cards/c/CommandersAuthority.java @@ -50,7 +50,7 @@ public class CommandersAuthority extends CardImpl { public CommandersAuthority(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/c/CommuneWithDinosaurs.java b/Mage.Sets/src/mage/cards/c/CommuneWithDinosaurs.java new file mode 100644 index 0000000000..8d657813de --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CommuneWithDinosaurs.java @@ -0,0 +1,72 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author TheElk801 + */ +public class CommuneWithDinosaurs extends CardImpl { + + private static final FilterCard filter = new FilterCard("a Dinosaur or land card"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.LAND), + new SubtypePredicate(SubType.DINOSAUR) + )); + } + + public CommuneWithDinosaurs(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}"); + + //Look at the top five cards of your library. You may reveal a Dinosaur or land card from among them and put it into your hand. Put the rest on the bottom of your library in any order. + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(5), false, new StaticValue(1), filter, false)); + } + + public CommuneWithDinosaurs(final CommuneWithDinosaurs card) { + super(card); + } + + @Override + public CommuneWithDinosaurs copy() { + return new CommuneWithDinosaurs(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CommuneWithNature.java b/Mage.Sets/src/mage/cards/c/CommuneWithNature.java index 017c3b118a..b5dc2824bf 100644 --- a/Mage.Sets/src/mage/cards/c/CommuneWithNature.java +++ b/Mage.Sets/src/mage/cards/c/CommuneWithNature.java @@ -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.cards.c; import java.util.UUID; @@ -34,8 +33,7 @@ import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.FilterCard; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.common.FilterCreatureCard; /** * @@ -43,21 +41,18 @@ import mage.filter.predicate.mageobject.CardTypePredicate; */ public class CommuneWithNature extends CardImpl { - private static final FilterCard filter = new FilterCard("a creature card"); - static { - filter.add(new CardTypePredicate(CardType.CREATURE)); - } - - - public CommuneWithNature (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{G}"); - + public CommuneWithNature(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}"); // Look at the top five cards of your library. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in any order. - this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(5), false, new StaticValue(1), filter, false)); + this.getSpellAbility().addEffect( + new LookLibraryAndPickControllerEffect( + new StaticValue(5), false, new StaticValue(1), new FilterCreatureCard("a creature card"), false + ) + ); } - public CommuneWithNature (final CommuneWithNature card) { + public CommuneWithNature(final CommuneWithNature card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/c/CompanionOfTheTrials.java b/Mage.Sets/src/mage/cards/c/CompanionOfTheTrials.java index 9c5060911a..3cba42bb5c 100644 --- a/Mage.Sets/src/mage/cards/c/CompanionOfTheTrials.java +++ b/Mage.Sets/src/mage/cards/c/CompanionOfTheTrials.java @@ -59,8 +59,8 @@ public class CompanionOfTheTrials extends CardImpl { public CompanionOfTheTrials(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ComplexAutomaton.java b/Mage.Sets/src/mage/cards/c/ComplexAutomaton.java index a1b9729bac..d6eba4f2c8 100644 --- a/Mage.Sets/src/mage/cards/c/ComplexAutomaton.java +++ b/Mage.Sets/src/mage/cards/c/ComplexAutomaton.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.TargetController; import mage.filter.common.FilterControlledPermanent; @@ -50,7 +51,7 @@ public class ComplexAutomaton extends CardImpl { public ComplexAutomaton(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CompositeGolem.java b/Mage.Sets/src/mage/cards/c/CompositeGolem.java index 3331e85ad8..7ffb48b797 100644 --- a/Mage.Sets/src/mage/cards/c/CompositeGolem.java +++ b/Mage.Sets/src/mage/cards/c/CompositeGolem.java @@ -35,6 +35,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class CompositeGolem extends CardImpl { public CompositeGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CompulsoryRest.java b/Mage.Sets/src/mage/cards/c/CompulsoryRest.java index 24eae26442..4056b89855 100644 --- a/Mage.Sets/src/mage/cards/c/CompulsoryRest.java +++ b/Mage.Sets/src/mage/cards/c/CompulsoryRest.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class CompulsoryRest extends CardImpl { public CompulsoryRest(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/ConcealedCourtyard.java b/Mage.Sets/src/mage/cards/c/ConcealedCourtyard.java index 6882d4c64c..b81bf82a81 100644 --- a/Mage.Sets/src/mage/cards/c/ConcealedCourtyard.java +++ b/Mage.Sets/src/mage/cards/c/ConcealedCourtyard.java @@ -49,11 +49,11 @@ import mage.filter.StaticFilters; public class ConcealedCourtyard extends CardImpl { public ConcealedCourtyard(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},""); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); // Concealed Courtyard enters the battlefield tapped unless you control two or fewer other lands. Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3)); - String abilityText = "tapped unless you control fewer than 3 lands"; + String abilityText = " tapped unless you control two or fewer other lands"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); // {T}: Add {W} or {B} to your mana pool.this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/cards/c/ConclaveEquenaut.java b/Mage.Sets/src/mage/cards/c/ConclaveEquenaut.java index a74c5c3fe6..9526a1fa8f 100644 --- a/Mage.Sets/src/mage/cards/c/ConclaveEquenaut.java +++ b/Mage.Sets/src/mage/cards/c/ConclaveEquenaut.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ConclaveEquenaut extends CardImpl { public ConclaveEquenaut(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/ConclaveNaturalists.java b/Mage.Sets/src/mage/cards/c/ConclaveNaturalists.java index 2b85bbf7b6..73c925df3c 100644 --- a/Mage.Sets/src/mage/cards/c/ConclaveNaturalists.java +++ b/Mage.Sets/src/mage/cards/c/ConclaveNaturalists.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.TargetPermanent; @@ -47,7 +48,7 @@ public class ConclaveNaturalists extends CardImpl { public ConclaveNaturalists(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Dryad"); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/ConclavePhalanx.java b/Mage.Sets/src/mage/cards/c/ConclavePhalanx.java index ca932999f1..a6e6d4f828 100644 --- a/Mage.Sets/src/mage/cards/c/ConclavePhalanx.java +++ b/Mage.Sets/src/mage/cards/c/ConclavePhalanx.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ConvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; /** @@ -46,8 +47,8 @@ public class ConclavePhalanx extends CardImpl { public ConclavePhalanx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/ConclavesBlessing.java b/Mage.Sets/src/mage/cards/c/ConclavesBlessing.java index 6f2ab57eaf..a7c3c88a83 100644 --- a/Mage.Sets/src/mage/cards/c/ConclavesBlessing.java +++ b/Mage.Sets/src/mage/cards/c/ConclavesBlessing.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -60,7 +61,7 @@ public class ConclavesBlessing extends CardImpl { public ConclavesBlessing(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Convoke this.addAbility(new ConvokeAbility()); diff --git a/Mage.Sets/src/mage/cards/c/ConcordiaPegasus.java b/Mage.Sets/src/mage/cards/c/ConcordiaPegasus.java index 972b98055b..0552441018 100644 --- a/Mage.Sets/src/mage/cards/c/ConcordiaPegasus.java +++ b/Mage.Sets/src/mage/cards/c/ConcordiaPegasus.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class ConcordiaPegasus extends CardImpl { public ConcordiaPegasus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Pegasus"); + this.subtype.add(SubType.PEGASUS); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/ConduitOfEmrakul.java b/Mage.Sets/src/mage/cards/c/ConduitOfEmrakul.java index 0edb9d0e10..6c9e354279 100644 --- a/Mage.Sets/src/mage/cards/c/ConduitOfEmrakul.java +++ b/Mage.Sets/src/mage/cards/c/ConduitOfEmrakul.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -48,8 +49,8 @@ public class ConduitOfEmrakul extends CardImpl { public ConduitOfEmrakul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Eldrazi"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java b/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java index df714e3bd7..b24a933ae8 100644 --- a/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java +++ b/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutOnLibraryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.WatcherScope; import mage.constants.Zone; @@ -70,7 +71,7 @@ public class ConduitOfRuin extends CardImpl { public ConduitOfRuin(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/ConduitOfStorms.java b/Mage.Sets/src/mage/cards/c/ConduitOfStorms.java index 21dc6e752a..e3451bfc89 100644 --- a/Mage.Sets/src/mage/cards/c/ConduitOfStorms.java +++ b/Mage.Sets/src/mage/cards/c/ConduitOfStorms.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -53,8 +54,8 @@ public class ConduitOfStorms extends CardImpl { public ConduitOfStorms(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Werewolf"); - this.subtype.add("Horror"); + this.subtype.add(SubType.WEREWOLF); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/Confessor.java b/Mage.Sets/src/mage/cards/c/Confessor.java index 759f18be1b..3ab080f4f2 100644 --- a/Mage.Sets/src/mage/cards/c/Confessor.java +++ b/Mage.Sets/src/mage/cards/c/Confessor.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.events.GameEvent.EventType; @@ -45,8 +46,8 @@ public class Confessor extends CardImpl { public Confessor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/Confiscate.java b/Mage.Sets/src/mage/cards/c/Confiscate.java index b5418a06bf..773b845c38 100644 --- a/Mage.Sets/src/mage/cards/c/Confiscate.java +++ b/Mage.Sets/src/mage/cards/c/Confiscate.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -48,7 +49,7 @@ public class Confiscate extends CardImpl { public Confiscate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant permanent diff --git a/Mage.Sets/src/mage/cards/c/Confound.java b/Mage.Sets/src/mage/cards/c/Confound.java index 38575e88dc..3675f891f2 100644 --- a/Mage.Sets/src/mage/cards/c/Confound.java +++ b/Mage.Sets/src/mage/cards/c/Confound.java @@ -44,14 +44,14 @@ import mage.target.TargetSpell; */ public class Confound extends CardImpl { - private final static FilterSpell filter = new FilterSpell("spell that targets one or more creatures"); + private final static FilterSpell filter = new FilterSpell("spell that targets a creature"); static { filter.add(new TargetsPermanentPredicate(new FilterCreaturePermanent())); } public Confound(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); // Counter target spell that targets one or more creatures. this.getSpellAbility().addEffect(new CounterTargetEffect()); diff --git a/Mage.Sets/src/mage/cards/c/ConiferStrider.java b/Mage.Sets/src/mage/cards/c/ConiferStrider.java index f2f672e893..7b8be0d3ea 100644 --- a/Mage.Sets/src/mage/cards/c/ConiferStrider.java +++ b/Mage.Sets/src/mage/cards/c/ConiferStrider.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class ConiferStrider extends CardImpl { public ConiferStrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/Conquer.java b/Mage.Sets/src/mage/cards/c/Conquer.java index 1da4a1fd33..6555c10a02 100644 --- a/Mage.Sets/src/mage/cards/c/Conquer.java +++ b/Mage.Sets/src/mage/cards/c/Conquer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -49,7 +50,7 @@ public class Conquer extends CardImpl { public Conquer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land diff --git a/Mage.Sets/src/mage/cards/c/ConqueringManticore.java b/Mage.Sets/src/mage/cards/c/ConqueringManticore.java index af25fb2150..64e6ab9ad0 100644 --- a/Mage.Sets/src/mage/cards/c/ConqueringManticore.java +++ b/Mage.Sets/src/mage/cards/c/ConqueringManticore.java @@ -39,7 +39,11 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.common.TargetCreaturePermanent; /** @@ -48,9 +52,15 @@ import mage.target.common.TargetCreaturePermanent; */ public class ConqueringManticore extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + public ConqueringManticore(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Manticore"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); + this.subtype.add(SubType.MANTICORE); this.power = new MageInt(5); this.toughness = new MageInt(5); @@ -58,9 +68,9 @@ public class ConqueringManticore extends CardImpl { this.addAbility(FlyingAbility.getInstance()); Ability ability = new EntersBattlefieldTriggeredAbility(new GainControlTargetEffect(Duration.EndOfTurn), false); - ability.addEffect(new UntapTargetEffect()); - ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); - ability.addTarget(new TargetCreaturePermanent()); + ability.addEffect(new UntapTargetEffect().setText("Untap that creature")); + ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("It gains haste until end of turn.")); + ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/ConquerorsFlail.java b/Mage.Sets/src/mage/cards/c/ConquerorsFlail.java index 349ff19071..a18c86f10b 100644 --- a/Mage.Sets/src/mage/cards/c/ConquerorsFlail.java +++ b/Mage.Sets/src/mage/cards/c/ConquerorsFlail.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class ConquerorsFlail extends CardImpl { public ConquerorsFlail(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1 for each color among permanents you control. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new ConquerorsFlailColorCount(), new ConquerorsFlailColorCount(), Duration.WhileOnBattlefield))); diff --git a/Mage.Sets/src/mage/cards/c/ConquerorsFoothold.java b/Mage.Sets/src/mage/cards/c/ConquerorsFoothold.java new file mode 100644 index 0000000000..13c53d85bf --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ConquerorsFoothold.java @@ -0,0 +1,89 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.DrawDiscardControllerEffect; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author TheElk801 + */ +public class ConquerorsFoothold extends CardImpl { + + public ConquerorsFoothold(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + this.nightCard = true; + + // {T}: Add {C} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {2}, {T}: Draw a card, then discard a card. + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new DrawDiscardControllerEffect(), + new ManaCostsImpl("{2}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + // {4}, {T}: Draw a card. + SimpleActivatedAbility ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new DrawCardSourceControllerEffect(1), + new ManaCostsImpl("{4}")); + ability2.addCost(new TapSourceCost()); + this.addAbility(ability2); + + // {6}, {T}: Return target card from your graveyard to your hand. + SimpleActivatedAbility ability3 = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new ReturnFromGraveyardToHandTargetEffect(), + new ManaCostsImpl("{6}")); + ability3.addCost(new TapSourceCost()); + ability3.addTarget(new TargetCardInYourGraveyard()); + this.addAbility(ability3); + } + + public ConquerorsFoothold(final ConquerorsFoothold card) { + super(card); + } + + @Override + public ConquerorsFoothold copy() { + return new ConquerorsFoothold(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/ConquerorsGalleon.java b/Mage.Sets/src/mage/cards/c/ConquerorsGalleon.java new file mode 100644 index 0000000000..aed4a49200 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ConquerorsGalleon.java @@ -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.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect; +import mage.abilities.keyword.CrewAbility; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author TheElk801 + */ +public class ConquerorsGalleon extends CardImpl { + + public ConquerorsGalleon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); + + this.subtype.add(SubType.VEHICLE); + this.power = new MageInt(2); + this.toughness = new MageInt(10); + + this.transformable = true; + this.secondSideCardClazz = ConquerorsFoothold.class; + + // When Conqueror's Galleon attacks, exile it at the end of combat, then return it to the battlefield transformed under your control. + this.addAbility(new TransformAbility()); + this.addAbility(new AttacksTriggeredAbility( + new CreateDelayedTriggeredAbilityEffect( + new AtTheEndOfCombatDelayedTriggeredAbility(new ExileAndReturnTransformedSourceEffect())), + false, + "When {this} attacks, exile it at the end of combat, then return it to the battlefield transformed under your control.")); + + // Crew 4 + this.addAbility(new CrewAbility(4)); + } + + public ConquerorsGalleon(final ConquerorsGalleon card) { + super(card); + } + + @Override + public ConquerorsGalleon copy() { + return new ConquerorsGalleon(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/ConsecrateLand.java b/Mage.Sets/src/mage/cards/c/ConsecrateLand.java index 843a536587..6f40600207 100644 --- a/Mage.Sets/src/mage/cards/c/ConsecrateLand.java +++ b/Mage.Sets/src/mage/cards/c/ConsecrateLand.java @@ -54,7 +54,7 @@ public class ConsecrateLand extends CardImpl { public ConsecrateLand(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/c/ConsecratedByBlood.java b/Mage.Sets/src/mage/cards/c/ConsecratedByBlood.java index b65e7cb50c..0c93d79ade 100644 --- a/Mage.Sets/src/mage/cards/c/ConsecratedByBlood.java +++ b/Mage.Sets/src/mage/cards/c/ConsecratedByBlood.java @@ -63,7 +63,7 @@ public class ConsecratedByBlood extends CardImpl { public ConsecratedByBlood(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/ConsecratedSphinx.java b/Mage.Sets/src/mage/cards/c/ConsecratedSphinx.java index bf06bfc1f8..53c0ad0ab2 100644 --- a/Mage.Sets/src/mage/cards/c/ConsecratedSphinx.java +++ b/Mage.Sets/src/mage/cards/c/ConsecratedSphinx.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -48,7 +49,7 @@ public class ConsecratedSphinx extends CardImpl { public ConsecratedSphinx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/c/ConsignOblivion.java b/Mage.Sets/src/mage/cards/c/ConsignOblivion.java index 54d3599a86..dfd284e667 100644 --- a/Mage.Sets/src/mage/cards/c/ConsignOblivion.java +++ b/Mage.Sets/src/mage/cards/c/ConsignOblivion.java @@ -1,72 +1,72 @@ -/* - * 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.cards.c; - -import java.util.UUID; -import mage.abilities.effects.common.ReturnToHandTargetEffect; -import mage.abilities.effects.common.discard.DiscardTargetEffect; -import mage.abilities.keyword.AftermathAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.SplitCard; -import mage.constants.CardType; -import mage.constants.SpellAbilityType; -import mage.target.common.TargetNonlandPermanent; -import mage.target.common.TargetOpponent; - -/** - * - * @author LevelX2 - */ -public class ConsignOblivion extends SplitCard { - - public ConsignOblivion(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{1}{U}", "{4}{B}", SpellAbilityType.SPLIT_AFTERMATH); - - // Return target nonland permanent to its owner's hand. - getLeftHalfCard().getSpellAbility().addEffect(new ReturnToHandTargetEffect()); - getLeftHalfCard().getSpellAbility().addTarget(new TargetNonlandPermanent()); - - // Oblivion {4}{B} - // Sorcery - // Aftermath - ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true)); - // Target opponent discards two cards. - getRightHalfCard().getSpellAbility().addEffect(new DiscardTargetEffect(2)); - getRightHalfCard().getSpellAbility().addTarget(new TargetOpponent()); - } - - public ConsignOblivion(final ConsignOblivion card) { - super(card); - } - - @Override - public ConsignOblivion copy() { - return new ConsignOblivion(this); - } -} +/* + * 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.cards.c; + +import java.util.UUID; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.abilities.keyword.AftermathAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.SplitCard; +import mage.constants.CardType; +import mage.constants.SpellAbilityType; +import mage.target.common.TargetNonlandPermanent; +import mage.target.common.TargetOpponent; + +/** + * + * @author LevelX2 + */ +public class ConsignOblivion extends SplitCard { + + public ConsignOblivion(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{1}{U}", "{4}{B}", SpellAbilityType.SPLIT_AFTERMATH); + + // Return target nonland permanent to its owner's hand. + getLeftHalfCard().getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + getLeftHalfCard().getSpellAbility().addTarget(new TargetNonlandPermanent()); + + // Oblivion {4}{B} + // Sorcery + // Aftermath + ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true)); + // Target opponent discards two cards. + getRightHalfCard().getSpellAbility().addEffect(new DiscardTargetEffect(2)); + getRightHalfCard().getSpellAbility().addTarget(new TargetOpponent()); + } + + public ConsignOblivion(final ConsignOblivion card) { + super(card); + } + + @Override + public ConsignOblivion copy() { + return new ConsignOblivion(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/Conspiracy.java b/Mage.Sets/src/mage/cards/c/Conspiracy.java index 7b24ba3cb4..d26a92a868 100644 --- a/Mage.Sets/src/mage/cards/c/Conspiracy.java +++ b/Mage.Sets/src/mage/cards/c/Conspiracy.java @@ -29,7 +29,6 @@ package mage.cards.c; import mage.MageObject; import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.common.ChooseCreatureTypeEffect; @@ -44,10 +43,10 @@ import mage.game.stack.Spell; import mage.game.stack.StackObject; import mage.players.Player; import mage.util.SubTypeList; - import java.util.Iterator; import java.util.List; import java.util.UUID; +import mage.abilities.common.AsEntersBattlefieldAbility; /** * @@ -56,10 +55,10 @@ import java.util.UUID; public class Conspiracy extends CardImpl { public Conspiracy(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{B}"); // As Conspiracy enters the battlefield, choose a creature type. - this.addAbility(new EntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.Neutral))); + this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.Neutral))); // Creature cards you own that aren't on the battlefield, creature spells you control, and creatures you control are the chosen type. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConspiracyEffect())); } @@ -78,7 +77,7 @@ class ConspiracyEffect extends ContinuousEffectImpl { public ConspiracyEffect() { super(Duration.WhileOnBattlefield, Outcome.Neutral); - staticText = "Creature cards you own that aren't on the battlefield, creature spells you control, and creatures you control are the chosen type"; + staticText = "Creatures you control are the chosen type. The same is true for creature spells you control and creature cards you own that aren't on the battlefield."; } public ConspiracyEffect(final ConspiracyEffect effect) { @@ -134,9 +133,9 @@ class ConspiracyEffect extends ContinuousEffectImpl { // creature spells you control for (Iterator iterator = game.getStack().iterator(); iterator.hasNext();) { StackObject stackObject = iterator.next(); - if (stackObject instanceof Spell && - stackObject.getControllerId().equals(source.getControllerId()) && - stackObject.isCreature()) { + if (stackObject instanceof Spell + && stackObject.getControllerId().equals(source.getControllerId()) + && stackObject.isCreature()) { Card card = ((Spell) stackObject).getCard(); setCreatureSubtype(card, choice, game); } @@ -157,7 +156,7 @@ class ConspiracyEffect extends ContinuousEffectImpl { if (object instanceof Card) { Card card = (Card) object; setChosenSubtype( - game.getState().getCreateCardAttribute(card).getSubtype(), + game.getState().getCreateCardAttribute(card, game).getSubtype(), subtype); } else { setChosenSubtype(object.getSubtype(game), subtype); @@ -166,7 +165,7 @@ class ConspiracyEffect extends ContinuousEffectImpl { } private void setChosenSubtype(SubTypeList subtype, SubType choice) { - if (subtype.size() != 1 || !subtype.contains(choice)) { + if (subtype.size() != 1 || !subtype.contains(choice)) { subtype.removeAll(SubType.getCreatureTypes(false)); subtype.add(choice); } diff --git a/Mage.Sets/src/mage/cards/c/ConstrictingSliver.java b/Mage.Sets/src/mage/cards/c/ConstrictingSliver.java index 8b3284ce15..0ba5e8c004 100644 --- a/Mage.Sets/src/mage/cards/c/ConstrictingSliver.java +++ b/Mage.Sets/src/mage/cards/c/ConstrictingSliver.java @@ -62,7 +62,7 @@ public class ConstrictingSliver extends CardImpl { public ConstrictingSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/ConsulateSkygate.java b/Mage.Sets/src/mage/cards/c/ConsulateSkygate.java index 83e9e52bfb..20a42f1e71 100644 --- a/Mage.Sets/src/mage/cards/c/ConsulateSkygate.java +++ b/Mage.Sets/src/mage/cards/c/ConsulateSkygate.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class ConsulateSkygate extends CardImpl { public ConsulateSkygate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/ConsulsLieutenant.java b/Mage.Sets/src/mage/cards/c/ConsulsLieutenant.java index 805ab0cb21..f801dec392 100644 --- a/Mage.Sets/src/mage/cards/c/ConsulsLieutenant.java +++ b/Mage.Sets/src/mage/cards/c/ConsulsLieutenant.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.RenownAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterAttackingCreature; @@ -49,8 +50,8 @@ public class ConsulsLieutenant extends CardImpl { public ConsulsLieutenant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/ConsulsShieldguard.java b/Mage.Sets/src/mage/cards/c/ConsulsShieldguard.java index 885b14e914..60e62aa920 100644 --- a/Mage.Sets/src/mage/cards/c/ConsulsShieldguard.java +++ b/Mage.Sets/src/mage/cards/c/ConsulsShieldguard.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterAttackingCreature; import mage.filter.predicate.permanent.AnotherPredicate; @@ -59,8 +60,8 @@ public class ConsulsShieldguard extends CardImpl { public ConsulsShieldguard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Dwarf"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/ConsumingAberration.java b/Mage.Sets/src/mage/cards/c/ConsumingAberration.java index 0978d139d0..1928b372c7 100644 --- a/Mage.Sets/src/mage/cards/c/ConsumingAberration.java +++ b/Mage.Sets/src/mage/cards/c/ConsumingAberration.java @@ -38,6 +38,7 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class ConsumingAberration extends CardImpl { public ConsumingAberration(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/c/ConsumingBonfire.java b/Mage.Sets/src/mage/cards/c/ConsumingBonfire.java index dcc0c58247..ba2eb347af 100644 --- a/Mage.Sets/src/mage/cards/c/ConsumingBonfire.java +++ b/Mage.Sets/src/mage/cards/c/ConsumingBonfire.java @@ -59,7 +59,7 @@ public class ConsumingBonfire extends CardImpl { public ConsumingBonfire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.SORCERY},"{3}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); // Choose one - Consuming Bonfire deals 4 damage to target non-Elemental creature; this.getSpellAbility().addTarget(new TargetPermanent(filter)); diff --git a/Mage.Sets/src/mage/cards/c/ConsumingFerocity.java b/Mage.Sets/src/mage/cards/c/ConsumingFerocity.java index ec6996e2c9..f8801a61a4 100644 --- a/Mage.Sets/src/mage/cards/c/ConsumingFerocity.java +++ b/Mage.Sets/src/mage/cards/c/ConsumingFerocity.java @@ -71,7 +71,7 @@ public class ConsumingFerocity extends CardImpl { public ConsumingFerocity(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant non-Wall creature TargetPermanent auraTarget = new TargetPermanent(filter); diff --git a/Mage.Sets/src/mage/cards/c/ConsumingFervor.java b/Mage.Sets/src/mage/cards/c/ConsumingFervor.java index d704b56ac3..59e8b751a0 100644 --- a/Mage.Sets/src/mage/cards/c/ConsumingFervor.java +++ b/Mage.Sets/src/mage/cards/c/ConsumingFervor.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -58,7 +59,7 @@ public class ConsumingFervor extends CardImpl { public ConsumingFervor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/ConsumingVortex.java b/Mage.Sets/src/mage/cards/c/ConsumingVortex.java index 83e17c50c5..ccfdd94653 100644 --- a/Mage.Sets/src/mage/cards/c/ConsumingVortex.java +++ b/Mage.Sets/src/mage/cards/c/ConsumingVortex.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SpliceOntoArcaneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -43,7 +44,7 @@ public class ConsumingVortex extends CardImpl { public ConsumingVortex(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Return target creature to its owner's hand. diff --git a/Mage.Sets/src/mage/cards/c/ConsumptiveGoo.java b/Mage.Sets/src/mage/cards/c/ConsumptiveGoo.java index 5f583a27da..9257f20e0d 100644 --- a/Mage.Sets/src/mage/cards/c/ConsumptiveGoo.java +++ b/Mage.Sets/src/mage/cards/c/ConsumptiveGoo.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -50,7 +51,7 @@ public class ConsumptiveGoo extends CardImpl { public ConsumptiveGoo(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Ooze"); + this.subtype.add(SubType.OOZE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/ContagiousNim.java b/Mage.Sets/src/mage/cards/c/ContagiousNim.java index 3ea14c890c..08e5707722 100644 --- a/Mage.Sets/src/mage/cards/c/ContagiousNim.java +++ b/Mage.Sets/src/mage/cards/c/ContagiousNim.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class ContagiousNim extends CardImpl { public ContagiousNim (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ContainmentMembrane.java b/Mage.Sets/src/mage/cards/c/ContainmentMembrane.java index a5ace7825e..476c4e215d 100644 --- a/Mage.Sets/src/mage/cards/c/ContainmentMembrane.java +++ b/Mage.Sets/src/mage/cards/c/ContainmentMembrane.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.SurgeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -50,7 +51,7 @@ public class ContainmentMembrane extends CardImpl { public ContainmentMembrane(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/ContainmentPriest.java b/Mage.Sets/src/mage/cards/c/ContainmentPriest.java index ed8b24fbc4..d93809301e 100644 --- a/Mage.Sets/src/mage/cards/c/ContainmentPriest.java +++ b/Mage.Sets/src/mage/cards/c/ContainmentPriest.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class ContainmentPriest extends CardImpl { public ContainmentPriest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/ContaminatedBond.java b/Mage.Sets/src/mage/cards/c/ContaminatedBond.java index a421fb7b92..d2b4646db9 100644 --- a/Mage.Sets/src/mage/cards/c/ContaminatedBond.java +++ b/Mage.Sets/src/mage/cards/c/ContaminatedBond.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -49,7 +50,7 @@ public class ContaminatedBond extends CardImpl { public ContaminatedBond(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/ContaminatedGround.java b/Mage.Sets/src/mage/cards/c/ContaminatedGround.java index 7b7d6f289e..56fcd12735 100644 --- a/Mage.Sets/src/mage/cards/c/ContaminatedGround.java +++ b/Mage.Sets/src/mage/cards/c/ContaminatedGround.java @@ -52,7 +52,7 @@ public class ContaminatedGround extends CardImpl { public ContaminatedGround(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land diff --git a/Mage.Sets/src/mage/cards/c/ContrabandKingpin.java b/Mage.Sets/src/mage/cards/c/ContrabandKingpin.java index f2252cc42a..2b9316574e 100644 --- a/Mage.Sets/src/mage/cards/c/ContrabandKingpin.java +++ b/Mage.Sets/src/mage/cards/c/ContrabandKingpin.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; @@ -46,8 +47,8 @@ public class ContrabandKingpin extends CardImpl { public ContrabandKingpin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}"); - this.subtype.add("Aetherborn"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.AETHERBORN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/ContractKilling.java b/Mage.Sets/src/mage/cards/c/ContractKilling.java new file mode 100644 index 0000000000..507b002ff2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ContractKilling.java @@ -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.cards.c; + +import java.util.UUID; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.permanent.token.TreasureToken; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class ContractKilling extends CardImpl { + + public ContractKilling(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}{B}"); + + // Destroy target creature. Create two colorless Treasure artifact tokens with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool." + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addEffect(new CreateTokenEffect(new TreasureToken(), 2)); + } + + public ContractKilling(final ContractKilling card) { + super(card); + } + + @Override + public ContractKilling copy() { + return new ContractKilling(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/ControlMagic.java b/Mage.Sets/src/mage/cards/c/ControlMagic.java index c85056dd72..fd5b3b734a 100644 --- a/Mage.Sets/src/mage/cards/c/ControlMagic.java +++ b/Mage.Sets/src/mage/cards/c/ControlMagic.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -50,7 +51,7 @@ public class ControlMagic extends CardImpl { public ControlMagic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/c/ControlledInstincts.java b/Mage.Sets/src/mage/cards/c/ControlledInstincts.java index d30cb857c7..0c2f9f8262 100644 --- a/Mage.Sets/src/mage/cards/c/ControlledInstincts.java +++ b/Mage.Sets/src/mage/cards/c/ControlledInstincts.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -60,7 +61,7 @@ public class ControlledInstincts extends CardImpl { public ControlledInstincts(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant red or green creature diff --git a/Mage.Sets/src/mage/cards/c/Conversion.java b/Mage.Sets/src/mage/cards/c/Conversion.java index 04f2f8e294..b9f7acfc78 100644 --- a/Mage.Sets/src/mage/cards/c/Conversion.java +++ b/Mage.Sets/src/mage/cards/c/Conversion.java @@ -106,7 +106,7 @@ public class Conversion extends CardImpl { break; case TypeChangingEffects_4: land.getSubtype(game).clear(); - land.getSubtype(game).add("Plains"); + land.getSubtype(game).add(SubType.PLAINS); break; } } diff --git a/Mage.Sets/src/mage/cards/c/ConvictedKiller.java b/Mage.Sets/src/mage/cards/c/ConvictedKiller.java index 7bfd9c9c34..33a40f929d 100644 --- a/Mage.Sets/src/mage/cards/c/ConvictedKiller.java +++ b/Mage.Sets/src/mage/cards/c/ConvictedKiller.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.b.BrandedHowler; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -49,8 +50,8 @@ public class ConvictedKiller extends CardImpl { public ConvictedKiller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/Conviction.java b/Mage.Sets/src/mage/cards/c/Conviction.java index cf4580b25f..137b86e9d3 100644 --- a/Mage.Sets/src/mage/cards/c/Conviction.java +++ b/Mage.Sets/src/mage/cards/c/Conviction.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class Conviction extends CardImpl { public Conviction(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/ConvincingMirage.java b/Mage.Sets/src/mage/cards/c/ConvincingMirage.java index ce546f20c7..cbb6f52f9e 100644 --- a/Mage.Sets/src/mage/cards/c/ConvincingMirage.java +++ b/Mage.Sets/src/mage/cards/c/ConvincingMirage.java @@ -51,8 +51,8 @@ import mage.target.common.TargetLandPermanent; public class ConvincingMirage extends CardImpl { public ConvincingMirage(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); @@ -95,7 +95,7 @@ class ConvincingMirageContinousEffect extends ContinuousEffectImpl { @Override public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { Permanent enchantment = game.getPermanent(source.getSourceId()); - String choice = (String) game.getState().getValue(source.getSourceId().toString() + ChooseBasicLandTypeEffect.VALUE_KEY); + SubType choice = SubType.byDescription((String) game.getState().getValue(source.getSourceId().toString() + ChooseBasicLandTypeEffect.VALUE_KEY)); if (enchantment != null && enchantment.getAttachedTo() != null && choice != null) { Permanent land = game.getPermanent(enchantment.getAttachedTo()); if (land != null) { @@ -109,19 +109,19 @@ class ConvincingMirageContinousEffect extends ContinuousEffectImpl { case AbilityAddingRemovingEffects_6: if (sublayer == SubLayer.NA) { land.getAbilities().clear(); - if (choice.equals("Forest")) { + if (choice.equals(SubType.FOREST)) { land.addAbility(new GreenManaAbility(), source.getSourceId(), game); } - if (choice.equals("Plains")) { + if (choice.equals(SubType.PLAINS)) { land.addAbility(new WhiteManaAbility(), source.getSourceId(), game); } - if (choice.equals("Mountain")) { + if (choice.equals(SubType.MOUNTAIN)) { land.addAbility(new RedManaAbility(), source.getSourceId(), game); } - if (choice.equals("Island")) { + if (choice.equals(SubType.ISLAND)) { land.addAbility(new BlueManaAbility(), source.getSourceId(), game); } - if (choice.equals("Swamp")) { + if (choice.equals(SubType.SWAMP)) { land.addAbility(new BlackManaAbility(), source.getSourceId(), game); } } diff --git a/Mage.Sets/src/mage/cards/c/ConvulsingLicid.java b/Mage.Sets/src/mage/cards/c/ConvulsingLicid.java index e0cd1f3321..de1edf40ef 100644 --- a/Mage.Sets/src/mage/cards/c/ConvulsingLicid.java +++ b/Mage.Sets/src/mage/cards/c/ConvulsingLicid.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class ConvulsingLicid extends CardImpl { public ConvulsingLicid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Licid"); + this.subtype.add(SubType.LICID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CopperCarapace.java b/Mage.Sets/src/mage/cards/c/CopperCarapace.java index e1d55f6d6d..a57e232c19 100644 --- a/Mage.Sets/src/mage/cards/c/CopperCarapace.java +++ b/Mage.Sets/src/mage/cards/c/CopperCarapace.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class CopperCarapace extends CardImpl { public CopperCarapace(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3))); // Equipped creature gets +2/+2 and can't block. diff --git a/Mage.Sets/src/mage/cards/c/CopperGnomes.java b/Mage.Sets/src/mage/cards/c/CopperGnomes.java index d8f07519b2..d926d333a8 100644 --- a/Mage.Sets/src/mage/cards/c/CopperGnomes.java +++ b/Mage.Sets/src/mage/cards/c/CopperGnomes.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.PutPermanentOnBattlefieldEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterArtifactCard; @@ -48,7 +49,7 @@ public class CopperGnomes extends CardImpl { public CopperGnomes(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); - this.subtype.add("Gnome"); + this.subtype.add(SubType.GNOME); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CopperLeafAngel.java b/Mage.Sets/src/mage/cards/c/CopperLeafAngel.java index 27fb1d19b5..8025026692 100644 --- a/Mage.Sets/src/mage/cards/c/CopperLeafAngel.java +++ b/Mage.Sets/src/mage/cards/c/CopperLeafAngel.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterControlledLandPermanent; @@ -52,7 +53,7 @@ public class CopperLeafAngel extends CardImpl { public CopperLeafAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CopperMyr.java b/Mage.Sets/src/mage/cards/c/CopperMyr.java index 20859bcb57..cd8cfafecc 100644 --- a/Mage.Sets/src/mage/cards/c/CopperMyr.java +++ b/Mage.Sets/src/mage/cards/c/CopperMyr.java @@ -34,6 +34,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class CopperMyr extends CardImpl { public CopperMyr (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(1); this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/cards/c/CopperhoofVorrac.java b/Mage.Sets/src/mage/cards/c/CopperhoofVorrac.java index 82c5285407..11ed989f77 100644 --- a/Mage.Sets/src/mage/cards/c/CopperhoofVorrac.java +++ b/Mage.Sets/src/mage/cards/c/CopperhoofVorrac.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -59,8 +60,8 @@ public class CopperhoofVorrac extends CardImpl { public CopperhoofVorrac(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Boar"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BOAR); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CopperhornScout.java b/Mage.Sets/src/mage/cards/c/CopperhornScout.java index b66d546c7a..c7229c0991 100644 --- a/Mage.Sets/src/mage/cards/c/CopperhornScout.java +++ b/Mage.Sets/src/mage/cards/c/CopperhornScout.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -52,8 +53,8 @@ public class CopperhornScout extends CardImpl { public CopperhornScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CopperlineGorge.java b/Mage.Sets/src/mage/cards/c/CopperlineGorge.java index 068a618956..7dbdfafeb6 100644 --- a/Mage.Sets/src/mage/cards/c/CopperlineGorge.java +++ b/Mage.Sets/src/mage/cards/c/CopperlineGorge.java @@ -47,12 +47,13 @@ import mage.filter.StaticFilters; * @author maurer.it_at_gmail.com */ public class CopperlineGorge extends CardImpl { + public CopperlineGorge(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); // Copperline Gorge enters the battlefield tapped unless you control two or fewer other lands. Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3)); - String abilityText = "tapped unless you control two or fewer other lands"; + String abilityText = " tapped unless you control two or fewer other lands"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new RedManaAbility()); this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/cards/c/CopyEnchantment.java b/Mage.Sets/src/mage/cards/c/CopyEnchantment.java index 210deb016e..cf9968c139 100644 --- a/Mage.Sets/src/mage/cards/c/CopyEnchantment.java +++ b/Mage.Sets/src/mage/cards/c/CopyEnchantment.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CopyPermanentEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.FilterPermanent; import mage.filter.common.FilterEnchantmentPermanent; @@ -87,7 +88,7 @@ class CopyEnchantmentEffect extends CopyPermanentEffect { if (super.apply(game, source)) { Permanent permanentToCopy = getBluePrintPermanent(); if (permanentToCopy != null) { - if (permanentToCopy.getSubtype(game).contains("Aura")) { + if (permanentToCopy.hasSubtype(SubType.AURA, game)) { Target target = getBluePrintPermanent().getSpellAbility().getTargets().get(0); Outcome auraOutcome = Outcome.BoostCreature; Ability: diff --git a/Mage.Sets/src/mage/cards/c/CoralBarrier.java b/Mage.Sets/src/mage/cards/c/CoralBarrier.java index 00fe2e40a8..1e6f30411d 100644 --- a/Mage.Sets/src/mage/cards/c/CoralBarrier.java +++ b/Mage.Sets/src/mage/cards/c/CoralBarrier.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.CoralBarrierSquidToken; /** @@ -45,7 +46,7 @@ public class CoralBarrier extends CardImpl { public CoralBarrier(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CoralEel.java b/Mage.Sets/src/mage/cards/c/CoralEel.java index 96b2e141f4..fc3478e113 100644 --- a/Mage.Sets/src/mage/cards/c/CoralEel.java +++ b/Mage.Sets/src/mage/cards/c/CoralEel.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class CoralEel extends CardImpl { public CoralEel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Fish"); + this.subtype.add(SubType.FISH); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CoralFighters.java b/Mage.Sets/src/mage/cards/c/CoralFighters.java index fa38a081a6..8234bd1604 100644 --- a/Mage.Sets/src/mage/cards/c/CoralFighters.java +++ b/Mage.Sets/src/mage/cards/c/CoralFighters.java @@ -34,6 +34,7 @@ import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -47,8 +48,8 @@ public class CoralFighters extends CardImpl { public CoralFighters(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CoralMerfolk.java b/Mage.Sets/src/mage/cards/c/CoralMerfolk.java index baf2912032..b254d1bf37 100644 --- a/Mage.Sets/src/mage/cards/c/CoralMerfolk.java +++ b/Mage.Sets/src/mage/cards/c/CoralMerfolk.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class CoralMerfolk extends CardImpl { public CoralMerfolk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(2); this.toughness = new MageInt(1); } diff --git a/Mage.Sets/src/mage/cards/c/CoralNet.java b/Mage.Sets/src/mage/cards/c/CoralNet.java index 1d84e39e40..b66d5404b1 100644 --- a/Mage.Sets/src/mage/cards/c/CoralNet.java +++ b/Mage.Sets/src/mage/cards/c/CoralNet.java @@ -64,7 +64,7 @@ public class CoralNet extends CardImpl { public CoralNet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant green or white creature TargetPermanent auraTarget = new TargetCreaturePermanent(filter); diff --git a/Mage.Sets/src/mage/cards/c/CoralTrickster.java b/Mage.Sets/src/mage/cards/c/CoralTrickster.java index 967b1231f6..5a995797cc 100644 --- a/Mage.Sets/src/mage/cards/c/CoralTrickster.java +++ b/Mage.Sets/src/mage/cards/c/CoralTrickster.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPermanent; /** @@ -47,8 +48,8 @@ public class CoralTrickster extends CardImpl { public CoralTrickster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CoralhelmCommander.java b/Mage.Sets/src/mage/cards/c/CoralhelmCommander.java index 2a6416db6b..f7e4959364 100644 --- a/Mage.Sets/src/mage/cards/c/CoralhelmCommander.java +++ b/Mage.Sets/src/mage/cards/c/CoralhelmCommander.java @@ -61,8 +61,8 @@ public class CoralhelmCommander extends LevelerCard { public CoralhelmCommander(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SOLDIER); this.color.setBlue(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CoralhelmGuide.java b/Mage.Sets/src/mage/cards/c/CoralhelmGuide.java index 48c593198e..1d3328e521 100644 --- a/Mage.Sets/src/mage/cards/c/CoralhelmGuide.java +++ b/Mage.Sets/src/mage/cards/c/CoralhelmGuide.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,9 +49,9 @@ public class CoralhelmGuide extends CardImpl { public CoralhelmGuide(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Scout"); - this.subtype.add("Ally"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SCOUT); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CoreProwler.java b/Mage.Sets/src/mage/cards/c/CoreProwler.java index 66a792e2dc..47dec4fe8e 100644 --- a/Mage.Sets/src/mage/cards/c/CoreProwler.java +++ b/Mage.Sets/src/mage/cards/c/CoreProwler.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class CoreProwler extends CardImpl { public CoreProwler (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(2); this.addAbility(InfectAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/c/CorellianCorvette.java b/Mage.Sets/src/mage/cards/c/CorellianCorvette.java index dfe55a0ee7..9b7af57ccc 100644 --- a/Mage.Sets/src/mage/cards/c/CorellianCorvette.java +++ b/Mage.Sets/src/mage/cards/c/CorellianCorvette.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.SpaceflightAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class CorellianCorvette extends CardImpl { public CorellianCorvette(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{G}"); - this.subtype.add("Starship"); + this.subtype.add(SubType.STARSHIP); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/Coretapper.java b/Mage.Sets/src/mage/cards/c/Coretapper.java index 1130d1b06a..2a95d0627b 100644 --- a/Mage.Sets/src/mage/cards/c/Coretapper.java +++ b/Mage.Sets/src/mage/cards/c/Coretapper.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.FilterPermanent; @@ -57,7 +58,7 @@ public class Coretapper extends CardImpl { public Coretapper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(1); Ability firstAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.CHARGE.createInstance()), new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/c/CorpseAugur.java b/Mage.Sets/src/mage/cards/c/CorpseAugur.java index 4b3629df34..4022c7f6ee 100644 --- a/Mage.Sets/src/mage/cards/c/CorpseAugur.java +++ b/Mage.Sets/src/mage/cards/c/CorpseAugur.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.target.TargetPlayer; @@ -49,8 +50,8 @@ public class CorpseAugur extends CardImpl { public CorpseAugur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CorpseBlockade.java b/Mage.Sets/src/mage/cards/c/CorpseBlockade.java index f2861fccf4..a14f89f231 100644 --- a/Mage.Sets/src/mage/cards/c/CorpseBlockade.java +++ b/Mage.Sets/src/mage/cards/c/CorpseBlockade.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -50,7 +51,7 @@ public class CorpseBlockade extends CardImpl { public CorpseBlockade(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CorpseConnoisseur.java b/Mage.Sets/src/mage/cards/c/CorpseConnoisseur.java index 6fad3c8e83..47efd67b94 100644 --- a/Mage.Sets/src/mage/cards/c/CorpseConnoisseur.java +++ b/Mage.Sets/src/mage/cards/c/CorpseConnoisseur.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -53,8 +54,8 @@ public class CorpseConnoisseur extends CardImpl { public CorpseConnoisseur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CorpseCur.java b/Mage.Sets/src/mage/cards/c/CorpseCur.java index f6f18740f6..e7f9506fb8 100644 --- a/Mage.Sets/src/mage/cards/c/CorpseCur.java +++ b/Mage.Sets/src/mage/cards/c/CorpseCur.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.AbilityPredicate; import mage.target.common.TargetCardInYourGraveyard; @@ -55,7 +56,7 @@ public class CorpseCur extends CardImpl { public CorpseCur (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(2); this.toughness = new MageInt(2); this.addAbility(InfectAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/c/CorpseHarvester.java b/Mage.Sets/src/mage/cards/c/CorpseHarvester.java index 40c9100a3a..17444dcf11 100644 --- a/Mage.Sets/src/mage/cards/c/CorpseHarvester.java +++ b/Mage.Sets/src/mage/cards/c/CorpseHarvester.java @@ -63,8 +63,8 @@ public class CorpseHarvester extends CardImpl { public CorpseHarvester(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CorpseHauler.java b/Mage.Sets/src/mage/cards/c/CorpseHauler.java index c36da250bd..699208df10 100644 --- a/Mage.Sets/src/mage/cards/c/CorpseHauler.java +++ b/Mage.Sets/src/mage/cards/c/CorpseHauler.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.AnotherCardPredicate; @@ -57,8 +58,8 @@ public class CorpseHauler extends CardImpl { public CorpseHauler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CorpseTraders.java b/Mage.Sets/src/mage/cards/c/CorpseTraders.java index 5dc86898d9..182abdc3b5 100644 --- a/Mage.Sets/src/mage/cards/c/CorpseTraders.java +++ b/Mage.Sets/src/mage/cards/c/CorpseTraders.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.discard.DiscardCardYouChooseTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetOpponent; @@ -48,8 +49,8 @@ public class CorpseTraders extends CardImpl { public CorpseTraders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CorpsejackMenace.java b/Mage.Sets/src/mage/cards/c/CorpsejackMenace.java index 82ba7a9bd0..57ea656335 100644 --- a/Mage.Sets/src/mage/cards/c/CorpsejackMenace.java +++ b/Mage.Sets/src/mage/cards/c/CorpsejackMenace.java @@ -35,6 +35,7 @@ import mage.abilities.effects.ReplacementEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class CorpsejackMenace extends CardImpl { public CorpsejackMenace(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CorpulentCorpse.java b/Mage.Sets/src/mage/cards/c/CorpulentCorpse.java index c383a5db9e..db2b7ae1b9 100644 --- a/Mage.Sets/src/mage/cards/c/CorpulentCorpse.java +++ b/Mage.Sets/src/mage/cards/c/CorpulentCorpse.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class CorpulentCorpse extends CardImpl { public CorpulentCorpse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CorrosiveMentor.java b/Mage.Sets/src/mage/cards/c/CorrosiveMentor.java index 97a27cd5f9..47e874a074 100644 --- a/Mage.Sets/src/mage/cards/c/CorrosiveMentor.java +++ b/Mage.Sets/src/mage/cards/c/CorrosiveMentor.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -55,8 +56,8 @@ public class CorrosiveMentor extends CardImpl { public CorrosiveMentor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Elemental"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CorruptCourtOfficial.java b/Mage.Sets/src/mage/cards/c/CorruptCourtOfficial.java index ece971b5d2..854dbaf265 100644 --- a/Mage.Sets/src/mage/cards/c/CorruptCourtOfficial.java +++ b/Mage.Sets/src/mage/cards/c/CorruptCourtOfficial.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetOpponent; /** @@ -45,8 +46,8 @@ public class CorruptCourtOfficial extends CardImpl { public CorruptCourtOfficial(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CorruptEunuchs.java b/Mage.Sets/src/mage/cards/c/CorruptEunuchs.java index e0009bee6e..4cb46225a5 100644 --- a/Mage.Sets/src/mage/cards/c/CorruptEunuchs.java +++ b/Mage.Sets/src/mage/cards/c/CorruptEunuchs.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -45,8 +46,8 @@ public class CorruptEunuchs extends CardImpl { public CorruptEunuchs(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CorruptOfficial.java b/Mage.Sets/src/mage/cards/c/CorruptOfficial.java index 461e8b0d6e..b9fa873cac 100644 --- a/Mage.Sets/src/mage/cards/c/CorruptOfficial.java +++ b/Mage.Sets/src/mage/cards/c/CorruptOfficial.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -52,8 +53,8 @@ public class CorruptOfficial extends CardImpl { public CorruptOfficial(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Human"); - this.subtype.add("Minion"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MINION); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CorruptedConscience.java b/Mage.Sets/src/mage/cards/c/CorruptedConscience.java index 66f4a9766d..1d410e2ab1 100644 --- a/Mage.Sets/src/mage/cards/c/CorruptedConscience.java +++ b/Mage.Sets/src/mage/cards/c/CorruptedConscience.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -52,7 +53,7 @@ public class CorruptedConscience extends CardImpl { public CorruptedConscience(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CorruptedHarvester.java b/Mage.Sets/src/mage/cards/c/CorruptedHarvester.java index 65488b2cda..614c47bdab 100644 --- a/Mage.Sets/src/mage/cards/c/CorruptedHarvester.java +++ b/Mage.Sets/src/mage/cards/c/CorruptedHarvester.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -49,7 +50,7 @@ public class CorruptedHarvester extends CardImpl { public CorruptedHarvester (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(6); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CorruptedRoots.java b/Mage.Sets/src/mage/cards/c/CorruptedRoots.java index ee155d20df..506dbecc09 100644 --- a/Mage.Sets/src/mage/cards/c/CorruptedRoots.java +++ b/Mage.Sets/src/mage/cards/c/CorruptedRoots.java @@ -59,7 +59,7 @@ public class CorruptedRoots extends CardImpl { public CorruptedRoots(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant Forest or Plains TargetPermanent auraTarget = new TargetPermanent(filter); diff --git a/Mage.Sets/src/mage/cards/c/CorruptedZendikon.java b/Mage.Sets/src/mage/cards/c/CorruptedZendikon.java index 3913512a7e..ecb1e79db3 100644 --- a/Mage.Sets/src/mage/cards/c/CorruptedZendikon.java +++ b/Mage.Sets/src/mage/cards/c/CorruptedZendikon.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class CorruptedZendikon extends CardImpl { public CorruptedZendikon(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); @@ -90,7 +91,7 @@ class CorruptedZendikonOozeToken extends Token { super("Ooze", "3/3 black Ooze creature"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Ooze"); + subtype.add(SubType.OOZE); this.power = new MageInt(3); this.toughness = new MageInt(3); } diff --git a/Mage.Sets/src/mage/cards/c/CorruptingLicid.java b/Mage.Sets/src/mage/cards/c/CorruptingLicid.java index 5fc0e9dc42..bb8093eceb 100644 --- a/Mage.Sets/src/mage/cards/c/CorruptingLicid.java +++ b/Mage.Sets/src/mage/cards/c/CorruptingLicid.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class CorruptingLicid extends CardImpl { public CorruptingLicid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Licid"); + this.subtype.add(SubType.LICID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CosisRavager.java b/Mage.Sets/src/mage/cards/c/CosisRavager.java index e25168cd25..c305d3a1d9 100644 --- a/Mage.Sets/src/mage/cards/c/CosisRavager.java +++ b/Mage.Sets/src/mage/cards/c/CosisRavager.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -46,7 +47,7 @@ public class CosisRavager extends CardImpl { public CosisRavager (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.color.setRed(true); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CosisTrickster.java b/Mage.Sets/src/mage/cards/c/CosisTrickster.java index 63c295626b..bd21b87384 100644 --- a/Mage.Sets/src/mage/cards/c/CosisTrickster.java +++ b/Mage.Sets/src/mage/cards/c/CosisTrickster.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -48,8 +49,8 @@ public class CosisTrickster extends CardImpl { public CosisTrickster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CosmicHorror.java b/Mage.Sets/src/mage/cards/c/CosmicHorror.java index 464a0cabb4..3196ca0f58 100644 --- a/Mage.Sets/src/mage/cards/c/CosmicHorror.java +++ b/Mage.Sets/src/mage/cards/c/CosmicHorror.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.game.Game; @@ -52,7 +53,7 @@ public class CosmicHorror extends CardImpl { public CosmicHorror(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/c/CosmicLarva.java b/Mage.Sets/src/mage/cards/c/CosmicLarva.java index ffb4c2d393..dd04b8fac8 100644 --- a/Mage.Sets/src/mage/cards/c/CosmicLarva.java +++ b/Mage.Sets/src/mage/cards/c/CosmicLarva.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterControlledLandPermanent; import mage.target.common.TargetControlledPermanent; @@ -48,7 +49,7 @@ public class CosmicLarva extends CardImpl { public CosmicLarva(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(7); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/c/CostlyPlunder.java b/Mage.Sets/src/mage/cards/c/CostlyPlunder.java new file mode 100644 index 0000000000..4a8cbd6625 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CostlyPlunder.java @@ -0,0 +1,74 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author TheElk801 + */ +public class CostlyPlunder extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("an artifact or creature"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.CREATURE) + )); + } + + public CostlyPlunder(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}"); + + // As an additional cost to cast Costly Plunder, sacrifice an artifact or creature. + this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, true))); + + // Draw two cards. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2)); + } + + public CostlyPlunder(final CostlyPlunder card) { + super(card); + } + + @Override + public CostlyPlunder copy() { + return new CostlyPlunder(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CouncilGuardian.java b/Mage.Sets/src/mage/cards/c/CouncilGuardian.java index f56956f4b7..f8fc87afc1 100644 --- a/Mage.Sets/src/mage/cards/c/CouncilGuardian.java +++ b/Mage.Sets/src/mage/cards/c/CouncilGuardian.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.choices.ChoiceColor; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.game.Game; @@ -55,8 +56,8 @@ public class CouncilGuardian extends CardImpl { public CouncilGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}"); - this.subtype.add("Giant"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CouncilOfAdvisors.java b/Mage.Sets/src/mage/cards/c/CouncilOfAdvisors.java index 348b1d5f01..aa80e99f0b 100644 --- a/Mage.Sets/src/mage/cards/c/CouncilOfAdvisors.java +++ b/Mage.Sets/src/mage/cards/c/CouncilOfAdvisors.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class CouncilOfAdvisors extends CardImpl { public CouncilOfAdvisors(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CouncilOfTheAbsolute.java b/Mage.Sets/src/mage/cards/c/CouncilOfTheAbsolute.java index 3bec136498..223d3cd3f7 100644 --- a/Mage.Sets/src/mage/cards/c/CouncilOfTheAbsolute.java +++ b/Mage.Sets/src/mage/cards/c/CouncilOfTheAbsolute.java @@ -55,8 +55,8 @@ public class CouncilOfTheAbsolute extends CardImpl { public CouncilOfTheAbsolute(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{U}"); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CountervailingWinds.java b/Mage.Sets/src/mage/cards/c/CountervailingWinds.java index bc1528f8e5..2f1b6717a7 100644 --- a/Mage.Sets/src/mage/cards/c/CountervailingWinds.java +++ b/Mage.Sets/src/mage/cards/c/CountervailingWinds.java @@ -1,69 +1,69 @@ -/* - * 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.cards.c; - -import java.util.UUID; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.CounterUnlessPaysEffect; -import mage.abilities.keyword.CyclingAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.target.TargetSpell; - -/** - * - * @author emerald000 - */ -public class CountervailingWinds extends CardImpl { - - public CountervailingWinds(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}"); - - // Counter target spell unless its controller pays {1} for each card in your graveyard. - Effect effect = new CounterUnlessPaysEffect(new CardsInControllerGraveyardCount()); - effect.setText("Counter target spell unless its controller pays {1} for each card in your graveyard"); - this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetSpell()); - - // Cycling {2} - this.addAbility(new CyclingAbility(new GenericManaCost(2))); - - } - - public CountervailingWinds(final CountervailingWinds card) { - super(card); - } - - @Override - public CountervailingWinds copy() { - return new CountervailingWinds(this); - } -} +/* + * 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.cards.c; + +import java.util.UUID; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.abilities.keyword.CyclingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.TargetSpell; + +/** + * + * @author emerald000 + */ +public class CountervailingWinds extends CardImpl { + + public CountervailingWinds(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}"); + + // Counter target spell unless its controller pays {1} for each card in your graveyard. + Effect effect = new CounterUnlessPaysEffect(new CardsInControllerGraveyardCount()); + effect.setText("Counter target spell unless its controller pays {1} for each card in your graveyard"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetSpell()); + + // Cycling {2} + this.addAbility(new CyclingAbility(new GenericManaCost(2))); + + } + + public CountervailingWinds(final CountervailingWinds card) { + super(card); + } + + @Override + public CountervailingWinds copy() { + return new CountervailingWinds(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CountlessGearsRenegade.java b/Mage.Sets/src/mage/cards/c/CountlessGearsRenegade.java index 07aa488d00..f2b0835c8d 100644 --- a/Mage.Sets/src/mage/cards/c/CountlessGearsRenegade.java +++ b/Mage.Sets/src/mage/cards/c/CountlessGearsRenegade.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.ServoToken; import mage.watchers.common.RevoltWatcher; @@ -49,8 +50,8 @@ public class CountlessGearsRenegade extends CardImpl { public CountlessGearsRenegade(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.subtype.add("Dwarf"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CountrysideCrusher.java b/Mage.Sets/src/mage/cards/c/CountrysideCrusher.java index edce249f5a..954851fb49 100644 --- a/Mage.Sets/src/mage/cards/c/CountrysideCrusher.java +++ b/Mage.Sets/src/mage/cards/c/CountrysideCrusher.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -53,8 +54,8 @@ public class CountrysideCrusher extends CardImpl { public CountrysideCrusher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CourageousOutrider.java b/Mage.Sets/src/mage/cards/c/CourageousOutrider.java index cca20d76fc..0234afeafa 100644 --- a/Mage.Sets/src/mage/cards/c/CourageousOutrider.java +++ b/Mage.Sets/src/mage/cards/c/CourageousOutrider.java @@ -53,8 +53,8 @@ public class CourageousOutrider extends CardImpl { public CourageousOutrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CourierGriffin.java b/Mage.Sets/src/mage/cards/c/CourierGriffin.java index 16d0072b56..64990241e0 100644 --- a/Mage.Sets/src/mage/cards/c/CourierGriffin.java +++ b/Mage.Sets/src/mage/cards/c/CourierGriffin.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class CourierGriffin extends CardImpl { public CourierGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CourierHawk.java b/Mage.Sets/src/mage/cards/c/CourierHawk.java index 57740560a4..c880685b36 100644 --- a/Mage.Sets/src/mage/cards/c/CourierHawk.java +++ b/Mage.Sets/src/mage/cards/c/CourierHawk.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class CourierHawk extends CardImpl { public CourierHawk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CourserOfKruphix.java b/Mage.Sets/src/mage/cards/c/CourserOfKruphix.java index 0cbed01e5b..a93a2974dd 100644 --- a/Mage.Sets/src/mage/cards/c/CourserOfKruphix.java +++ b/Mage.Sets/src/mage/cards/c/CourserOfKruphix.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.PlayWithTheTopCardRevealedEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterLandCard; import mage.filter.common.FilterLandPermanent; @@ -49,7 +50,7 @@ public class CourserOfKruphix extends CardImpl { public CourserOfKruphix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Centaur"); + this.subtype.add(SubType.CENTAUR); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CourtArchers.java b/Mage.Sets/src/mage/cards/c/CourtArchers.java index 00509a60ba..0622e7f7ae 100644 --- a/Mage.Sets/src/mage/cards/c/CourtArchers.java +++ b/Mage.Sets/src/mage/cards/c/CourtArchers.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class CourtArchers extends CardImpl { public CourtArchers (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CourtHomunculus.java b/Mage.Sets/src/mage/cards/c/CourtHomunculus.java index dd64ffa3ed..fb36c2130c 100644 --- a/Mage.Sets/src/mage/cards/c/CourtHomunculus.java +++ b/Mage.Sets/src/mage/cards/c/CourtHomunculus.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterArtifactPermanent; @@ -52,7 +53,7 @@ public class CourtHomunculus extends CardImpl { public CourtHomunculus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{W}"); - this.subtype.add("Homunculus"); + this.subtype.add(SubType.HOMUNCULUS); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CourtHussar.java b/Mage.Sets/src/mage/cards/c/CourtHussar.java index 3a77184cf1..6a768012b1 100644 --- a/Mage.Sets/src/mage/cards/c/CourtHussar.java +++ b/Mage.Sets/src/mage/cards/c/CourtHussar.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.filter.FilterCard; @@ -51,8 +52,8 @@ public class CourtHussar extends CardImpl { public CourtHussar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Knight"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CourtStreetDenizen.java b/Mage.Sets/src/mage/cards/c/CourtStreetDenizen.java index d5680ba6a9..e05868515a 100644 --- a/Mage.Sets/src/mage/cards/c/CourtStreetDenizen.java +++ b/Mage.Sets/src/mage/cards/c/CourtStreetDenizen.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -61,8 +62,8 @@ public class CourtStreetDenizen extends CardImpl { } public CourtStreetDenizen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CourtlyProvocateur.java b/Mage.Sets/src/mage/cards/c/CourtlyProvocateur.java index 6f47a90104..dd5a5b1b6c 100644 --- a/Mage.Sets/src/mage/cards/c/CourtlyProvocateur.java +++ b/Mage.Sets/src/mage/cards/c/CourtlyProvocateur.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.BlocksThisTurnMarkerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -51,8 +52,8 @@ public class CourtlyProvocateur extends CardImpl { public CourtlyProvocateur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CovertOperative.java b/Mage.Sets/src/mage/cards/c/CovertOperative.java index c6f450db58..c5089c4ef2 100644 --- a/Mage.Sets/src/mage/cards/c/CovertOperative.java +++ b/Mage.Sets/src/mage/cards/c/CovertOperative.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class CovertOperative extends CardImpl { public CovertOperative(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CovetedPeacock.java b/Mage.Sets/src/mage/cards/c/CovetedPeacock.java index 3637f67e07..7f4a010b7c 100644 --- a/Mage.Sets/src/mage/cards/c/CovetedPeacock.java +++ b/Mage.Sets/src/mage/cards/c/CovetedPeacock.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.Game; @@ -52,7 +53,7 @@ public class CovetedPeacock extends CardImpl { public CovetedPeacock(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CovetousDragon.java b/Mage.Sets/src/mage/cards/c/CovetousDragon.java index 445df15849..537b965c6a 100644 --- a/Mage.Sets/src/mage/cards/c/CovetousDragon.java +++ b/Mage.Sets/src/mage/cards/c/CovetousDragon.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.common.FilterArtifactPermanent; @@ -46,7 +47,7 @@ public class CovetousDragon extends CardImpl { public CovetousDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CowedByWisdom.java b/Mage.Sets/src/mage/cards/c/CowedByWisdom.java index e1e2290bdc..9c6a1868b7 100644 --- a/Mage.Sets/src/mage/cards/c/CowedByWisdom.java +++ b/Mage.Sets/src/mage/cards/c/CowedByWisdom.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class CowedByWisdom extends CardImpl { public CowedByWisdom(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CowlProwler.java b/Mage.Sets/src/mage/cards/c/CowlProwler.java index d306baaeac..40c00c413c 100644 --- a/Mage.Sets/src/mage/cards/c/CowlProwler.java +++ b/Mage.Sets/src/mage/cards/c/CowlProwler.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class CowlProwler extends CardImpl { public CowlProwler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(6); this.toughness = new MageInt(6); } diff --git a/Mage.Sets/src/mage/cards/c/CrabUmbra.java b/Mage.Sets/src/mage/cards/c/CrabUmbra.java index 13cf1704da..a182da6693 100644 --- a/Mage.Sets/src/mage/cards/c/CrabUmbra.java +++ b/Mage.Sets/src/mage/cards/c/CrabUmbra.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TotemArmorAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class CrabUmbra extends CardImpl { public CrabUmbra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/c/CrabappleCohort.java b/Mage.Sets/src/mage/cards/c/CrabappleCohort.java index 80bbcbdd87..e70187d7ea 100644 --- a/Mage.Sets/src/mage/cards/c/CrabappleCohort.java +++ b/Mage.Sets/src/mage/cards/c/CrabappleCohort.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -63,8 +64,8 @@ public class CrabappleCohort extends CardImpl { public CrabappleCohort(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.WARRIOR); this.color.setGreen(true); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CrackTheEarth.java b/Mage.Sets/src/mage/cards/c/CrackTheEarth.java index 0db78e162f..f82c61313d 100644 --- a/Mage.Sets/src/mage/cards/c/CrackTheEarth.java +++ b/Mage.Sets/src/mage/cards/c/CrackTheEarth.java @@ -32,6 +32,7 @@ import mage.abilities.effects.common.SacrificeAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; /** @@ -42,7 +43,7 @@ public class CrackTheEarth extends CardImpl { public CrackTheEarth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Each player sacrifices a permanent. this.getSpellAbility().addEffect(new SacrificeAllEffect(1, new FilterControlledPermanent("permanent"))); diff --git a/Mage.Sets/src/mage/cards/c/CrackdownConstruct.java b/Mage.Sets/src/mage/cards/c/CrackdownConstruct.java index beca085b91..6341a23b51 100644 --- a/Mage.Sets/src/mage/cards/c/CrackdownConstruct.java +++ b/Mage.Sets/src/mage/cards/c/CrackdownConstruct.java @@ -36,6 +36,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class CrackdownConstruct extends CardImpl { public CrackdownConstruct(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/Crackleburr.java b/Mage.Sets/src/mage/cards/c/Crackleburr.java index 0078728151..b6b81a070e 100644 --- a/Mage.Sets/src/mage/cards/c/Crackleburr.java +++ b/Mage.Sets/src/mage/cards/c/Crackleburr.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; @@ -71,7 +72,7 @@ public class Crackleburr extends CardImpl { public Crackleburr(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U/R}{U/R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CracklingClub.java b/Mage.Sets/src/mage/cards/c/CracklingClub.java index 289d0ce00d..aed57df283 100644 --- a/Mage.Sets/src/mage/cards/c/CracklingClub.java +++ b/Mage.Sets/src/mage/cards/c/CracklingClub.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class CracklingClub extends CardImpl { public CracklingClub(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CracklingTriton.java b/Mage.Sets/src/mage/cards/c/CracklingTriton.java index 76d2daccd0..1b597da8af 100644 --- a/Mage.Sets/src/mage/cards/c/CracklingTriton.java +++ b/Mage.Sets/src/mage/cards/c/CracklingTriton.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class CracklingTriton extends CardImpl { public CracklingTriton(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CradleGuard.java b/Mage.Sets/src/mage/cards/c/CradleGuard.java index 36355eceb5..1032befa2e 100644 --- a/Mage.Sets/src/mage/cards/c/CradleGuard.java +++ b/Mage.Sets/src/mage/cards/c/CradleGuard.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class CradleGuard extends CardImpl { public CradleGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CradleOfTheAccursed.java b/Mage.Sets/src/mage/cards/c/CradleOfTheAccursed.java index 85e3b0dbc8..e0b4e3be8d 100644 --- a/Mage.Sets/src/mage/cards/c/CradleOfTheAccursed.java +++ b/Mage.Sets/src/mage/cards/c/CradleOfTheAccursed.java @@ -38,6 +38,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.ZombieToken; @@ -50,7 +51,7 @@ public class CradleOfTheAccursed extends CardImpl { public CradleOfTheAccursed(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Desert"); + this.subtype.add(SubType.DESERT); // {T}: Add {C} to your mana pool. this.addAbility(new ColorlessManaAbility()); diff --git a/Mage.Sets/src/mage/cards/c/CraftyPathmage.java b/Mage.Sets/src/mage/cards/c/CraftyPathmage.java index 2e4b50ed2a..7389fbe7de 100644 --- a/Mage.Sets/src/mage/cards/c/CraftyPathmage.java +++ b/Mage.Sets/src/mage/cards/c/CraftyPathmage.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -56,8 +57,8 @@ public class CraftyPathmage extends CardImpl { public CraftyPathmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CragPuca.java b/Mage.Sets/src/mage/cards/c/CragPuca.java index eb1d1cde53..d659f13be3 100644 --- a/Mage.Sets/src/mage/cards/c/CragPuca.java +++ b/Mage.Sets/src/mage/cards/c/CragPuca.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.SwitchPowerToughnessSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class CragPuca extends CardImpl { public CragPuca(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U/R}{U/R}{U/R}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CragganwickCremator.java b/Mage.Sets/src/mage/cards/c/CragganwickCremator.java index 7906a40469..4fdbf66f84 100644 --- a/Mage.Sets/src/mage/cards/c/CragganwickCremator.java +++ b/Mage.Sets/src/mage/cards/c/CragganwickCremator.java @@ -36,6 +36,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -49,8 +50,8 @@ public class CragganwickCremator extends CardImpl { public CragganwickCremator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CranialPlating.java b/Mage.Sets/src/mage/cards/c/CranialPlating.java index 4c077b014a..fc666fda56 100644 --- a/Mage.Sets/src/mage/cards/c/CranialPlating.java +++ b/Mage.Sets/src/mage/cards/c/CranialPlating.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -60,7 +61,7 @@ public class CranialPlating extends CardImpl { public CranialPlating(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+0 for each artifact you control. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new PermanentsOnBattlefieldCount(filterCounted), new StaticValue(0)))); diff --git a/Mage.Sets/src/mage/cards/c/CrashOfRhinos.java b/Mage.Sets/src/mage/cards/c/CrashOfRhinos.java index 0c295adae7..576f6fdc26 100644 --- a/Mage.Sets/src/mage/cards/c/CrashOfRhinos.java +++ b/Mage.Sets/src/mage/cards/c/CrashOfRhinos.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class CrashOfRhinos extends CardImpl { public CrashOfRhinos(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}{G}"); - this.subtype.add("Rhino"); + this.subtype.add(SubType.RHINO); this.power = new MageInt(8); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CrashTheRamparts.java b/Mage.Sets/src/mage/cards/c/CrashTheRamparts.java new file mode 100644 index 0000000000..c199a4a077 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CrashTheRamparts.java @@ -0,0 +1,68 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class CrashTheRamparts extends CardImpl { + + public CrashTheRamparts(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}"); + + // Target creature gets +3/+3 and gains trample until end of turn. + Effect effect = new BoostTargetEffect(3, 3, Duration.EndOfTurn); + effect.setText("Target creature gets +3/+3"); + this.getSpellAbility().addEffect(effect); + effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains trample until end of turn"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public CrashTheRamparts(final CrashTheRamparts card) { + super(card); + } + + @Override + public CrashTheRamparts copy() { + return new CrashTheRamparts(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CrashingBoars.java b/Mage.Sets/src/mage/cards/c/CrashingBoars.java index 16d8ec6fbc..2d2de5f4f8 100644 --- a/Mage.Sets/src/mage/cards/c/CrashingBoars.java +++ b/Mage.Sets/src/mage/cards/c/CrashingBoars.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.combat.MustBeBlockedByTargetSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.filter.common.FilterControlledCreaturePermanent; @@ -56,7 +57,7 @@ public class CrashingBoars extends CardImpl { public CrashingBoars(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Boar"); + this.subtype.add(SubType.BOAR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CrashingCentaur.java b/Mage.Sets/src/mage/cards/c/CrashingCentaur.java index e9b609b3ef..70ae1601c1 100644 --- a/Mage.Sets/src/mage/cards/c/CrashingCentaur.java +++ b/Mage.Sets/src/mage/cards/c/CrashingCentaur.java @@ -45,6 +45,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class CrashingCentaur extends CardImpl { public CrashingCentaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Centaur"); + this.subtype.add(SubType.CENTAUR); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CraterElemental.java b/Mage.Sets/src/mage/cards/c/CraterElemental.java index 38615fc135..935ac7afaa 100644 --- a/Mage.Sets/src/mage/cards/c/CraterElemental.java +++ b/Mage.Sets/src/mage/cards/c/CraterElemental.java @@ -43,7 +43,9 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; +import mage.constants.SubLayer; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -54,8 +56,8 @@ import mage.target.common.TargetCreaturePermanent; public class CraterElemental extends CardImpl { public CraterElemental(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Elemental"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(6); @@ -65,14 +67,14 @@ public class CraterElemental extends CardImpl { ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); - + // Formidable - {2}{R}: Crater Elemental has base power 8 until end of turn. Activate this ability only if creatures you control have total power 8 or greater. ability = new ActivateIfConditionActivatedAbility( - Zone.BATTLEFIELD, - new SetPowerSourceEffect(new StaticValue(8), Duration.EndOfTurn), + Zone.BATTLEFIELD, + new SetPowerSourceEffect(new StaticValue(8), Duration.EndOfTurn, SubLayer.SetPT_7b), new ManaCostsImpl("{2}{R}"), FormidableCondition.instance); - ability.setAbilityWord(AbilityWord.FORMIDABLE); + ability.setAbilityWord(AbilityWord.FORMIDABLE); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CraterHellion.java b/Mage.Sets/src/mage/cards/c/CraterHellion.java index d9b347e690..bff7863db0 100644 --- a/Mage.Sets/src/mage/cards/c/CraterHellion.java +++ b/Mage.Sets/src/mage/cards/c/CraterHellion.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.StaticFilters; import mage.game.Game; @@ -50,8 +51,8 @@ public class CraterHellion extends CardImpl { public CraterHellion(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); - this.subtype.add("Hellion"); - this.subtype.add("Beast"); + this.subtype.add(SubType.HELLION); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/c/CraterhoofBehemoth.java b/Mage.Sets/src/mage/cards/c/CraterhoofBehemoth.java index cd9306790a..c9ab595eea 100644 --- a/Mage.Sets/src/mage/cards/c/CraterhoofBehemoth.java +++ b/Mage.Sets/src/mage/cards/c/CraterhoofBehemoth.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.common.FilterControlledCreaturePermanent; @@ -59,7 +60,7 @@ public class CraterhoofBehemoth extends CardImpl { public CraterhoofBehemoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CravenGiant.java b/Mage.Sets/src/mage/cards/c/CravenGiant.java index 42fcba22bc..9e2463c0b7 100644 --- a/Mage.Sets/src/mage/cards/c/CravenGiant.java +++ b/Mage.Sets/src/mage/cards/c/CravenGiant.java @@ -33,6 +33,7 @@ import mage.abilities.common.CantBlockAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class CravenGiant extends CardImpl { public CravenGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CravenKnight.java b/Mage.Sets/src/mage/cards/c/CravenKnight.java index 508965233c..86add2ea66 100644 --- a/Mage.Sets/src/mage/cards/c/CravenKnight.java +++ b/Mage.Sets/src/mage/cards/c/CravenKnight.java @@ -33,6 +33,7 @@ import mage.abilities.common.CantBlockAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class CravenKnight extends CardImpl { public CravenKnight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CrawGiant.java b/Mage.Sets/src/mage/cards/c/CrawGiant.java index 29c242cd19..f0b57c9502 100644 --- a/Mage.Sets/src/mage/cards/c/CrawGiant.java +++ b/Mage.Sets/src/mage/cards/c/CrawGiant.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class CrawGiant extends CardImpl { public CrawGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}{G}{G}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CrawWurm.java b/Mage.Sets/src/mage/cards/c/CrawWurm.java index ef1a30bb6a..4c213a02cb 100644 --- a/Mage.Sets/src/mage/cards/c/CrawWurm.java +++ b/Mage.Sets/src/mage/cards/c/CrawWurm.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class CrawWurm extends CardImpl { public CrawWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CrawlingFilth.java b/Mage.Sets/src/mage/cards/c/CrawlingFilth.java index c6b273f801..f72c98f9c6 100644 --- a/Mage.Sets/src/mage/cards/c/CrawlingFilth.java +++ b/Mage.Sets/src/mage/cards/c/CrawlingFilth.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class CrawlingFilth extends CardImpl { public CrawlingFilth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CrazedArmodon.java b/Mage.Sets/src/mage/cards/c/CrazedArmodon.java index 2d83228a0a..4f346ed846 100644 --- a/Mage.Sets/src/mage/cards/c/CrazedArmodon.java +++ b/Mage.Sets/src/mage/cards/c/CrazedArmodon.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class CrazedArmodon extends CardImpl { public CrazedArmodon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CrazedFirecat.java b/Mage.Sets/src/mage/cards/c/CrazedFirecat.java index 423874b908..048e0f10b5 100644 --- a/Mage.Sets/src/mage/cards/c/CrazedFirecat.java +++ b/Mage.Sets/src/mage/cards/c/CrazedFirecat.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.game.Game; @@ -50,8 +51,8 @@ public class CrazedFirecat extends CardImpl { public CrazedFirecat(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Cat"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.CAT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CrazedGoblin.java b/Mage.Sets/src/mage/cards/c/CrazedGoblin.java index 3e66a5d158..b077b979a4 100644 --- a/Mage.Sets/src/mage/cards/c/CrazedGoblin.java +++ b/Mage.Sets/src/mage/cards/c/CrazedGoblin.java @@ -30,10 +30,11 @@ package mage.cards.c; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -42,12 +43,12 @@ public class CrazedGoblin extends CardImpl { public CrazedGoblin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public CrazedGoblin(final CrazedGoblin card) { diff --git a/Mage.Sets/src/mage/cards/c/CrazedSkirge.java b/Mage.Sets/src/mage/cards/c/CrazedSkirge.java index b0bc8744b6..bfd80a531d 100644 --- a/Mage.Sets/src/mage/cards/c/CrazedSkirge.java +++ b/Mage.Sets/src/mage/cards/c/CrazedSkirge.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class CrazedSkirge extends CardImpl { public CrazedSkirge (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CreakwoodGhoul.java b/Mage.Sets/src/mage/cards/c/CreakwoodGhoul.java index 9e24c55d66..1e42c001b7 100644 --- a/Mage.Sets/src/mage/cards/c/CreakwoodGhoul.java +++ b/Mage.Sets/src/mage/cards/c/CreakwoodGhoul.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCardInGraveyard; @@ -49,8 +50,8 @@ public class CreakwoodGhoul extends CardImpl { public CreakwoodGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Plant"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CreakwoodLiege.java b/Mage.Sets/src/mage/cards/c/CreakwoodLiege.java index 4c6629a4de..05586fd5e8 100644 --- a/Mage.Sets/src/mage/cards/c/CreakwoodLiege.java +++ b/Mage.Sets/src/mage/cards/c/CreakwoodLiege.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -60,7 +61,7 @@ public class CreakwoodLiege extends CardImpl { public CreakwoodLiege(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B/G}{B/G}{B/G}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CreatureBond.java b/Mage.Sets/src/mage/cards/c/CreatureBond.java index b88a1283b2..6041d3debd 100644 --- a/Mage.Sets/src/mage/cards/c/CreatureBond.java +++ b/Mage.Sets/src/mage/cards/c/CreatureBond.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -50,7 +51,7 @@ public class CreatureBond extends CardImpl { public CreatureBond(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/Creeperhulk.java b/Mage.Sets/src/mage/cards/c/Creeperhulk.java index 82258d5be2..07f6d433d4 100644 --- a/Mage.Sets/src/mage/cards/c/Creeperhulk.java +++ b/Mage.Sets/src/mage/cards/c/Creeperhulk.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -51,8 +52,8 @@ public class Creeperhulk extends CardImpl { public Creeperhulk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CreepingTarPit.java b/Mage.Sets/src/mage/cards/c/CreepingTarPit.java index 31799c4f54..59ce83209f 100644 --- a/Mage.Sets/src/mage/cards/c/CreepingTarPit.java +++ b/Mage.Sets/src/mage/cards/c/CreepingTarPit.java @@ -40,6 +40,7 @@ import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -79,7 +80,7 @@ class CreepingTarPitToken extends Token { public CreepingTarPitToken() { super("", "3/2 blue and black Elemental creature and can't be blocked"); cardType.add(CardType.CREATURE); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); color.setBlue(true); color.setBlack(true); power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CreepyDoll.java b/Mage.Sets/src/mage/cards/c/CreepyDoll.java index adce9e80e2..5b0091cbaf 100644 --- a/Mage.Sets/src/mage/cards/c/CreepyDoll.java +++ b/Mage.Sets/src/mage/cards/c/CreepyDoll.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -53,7 +54,7 @@ public class CreepyDoll extends CardImpl { public CreepyDoll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CrenellatedWall.java b/Mage.Sets/src/mage/cards/c/CrenellatedWall.java index 2b21360e87..1beb37963d 100644 --- a/Mage.Sets/src/mage/cards/c/CrenellatedWall.java +++ b/Mage.Sets/src/mage/cards/c/CrenellatedWall.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class CrenellatedWall extends CardImpl { public CrenellatedWall(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CrestedCraghorn.java b/Mage.Sets/src/mage/cards/c/CrestedCraghorn.java index be0706ba73..47580c0afe 100644 --- a/Mage.Sets/src/mage/cards/c/CrestedCraghorn.java +++ b/Mage.Sets/src/mage/cards/c/CrestedCraghorn.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class CrestedCraghorn extends CardImpl { public CrestedCraghorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Goat"); - this.subtype.add("Beast"); + this.subtype.add(SubType.GOAT); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CrestedSunmare.java b/Mage.Sets/src/mage/cards/c/CrestedSunmare.java index 4bfaac4842..fa0bf4dd97 100644 --- a/Mage.Sets/src/mage/cards/c/CrestedSunmare.java +++ b/Mage.Sets/src/mage/cards/c/CrestedSunmare.java @@ -1,91 +1,91 @@ -/* - * 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.cards.c; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.BeginningOfEndStepTriggeredAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.condition.common.YouGainedLifeCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.continuous.GainAbilityAllEffect; -import mage.abilities.keyword.IndestructibleAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.ComparisonType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.permanent.token.CrestedSunmareToken; -import mage.watchers.common.PlayerGainedLifeWatcher; - -/** - * - * @author emerald000 - */ -public class CrestedSunmare extends CardImpl { - - private static final FilterControlledPermanent filter = new FilterControlledPermanent("Horses you control"); - - static { - filter.add(new SubtypePredicate(SubType.HORSE)); - } - - public CrestedSunmare(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); - - this.subtype.add("Horse"); - this.power = new MageInt(5); - this.toughness = new MageInt(5); - - // Other Horses you control have indestructible. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, filter, true))); - - // At the beginning of each end step, if you gained life this turn, create a 5/5 white Horse creature token. - this.addAbility( - new ConditionalTriggeredAbility( - new BeginningOfEndStepTriggeredAbility(new CreateTokenEffect(new CrestedSunmareToken()), TargetController.ANY, false), - new YouGainedLifeCondition(ComparisonType.MORE_THAN, 0), - "At the beginning of each end step, if you gained life this turn, create a 5/5 white Horse creature token."), - new PlayerGainedLifeWatcher()); - } - - public CrestedSunmare(final CrestedSunmare card) { - super(card); - } - - @Override - public CrestedSunmare copy() { - return new CrestedSunmare(this); - } -} +/* + * 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.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.YouGainedLifeCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.IndestructibleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.CrestedSunmareToken; +import mage.watchers.common.PlayerGainedLifeWatcher; + +/** + * + * @author emerald000 + */ +public class CrestedSunmare extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Horses you control"); + + static { + filter.add(new SubtypePredicate(SubType.HORSE)); + } + + public CrestedSunmare(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + + this.subtype.add(SubType.HORSE); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Other Horses you control have indestructible. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, filter, true))); + + // At the beginning of each end step, if you gained life this turn, create a 5/5 white Horse creature token. + this.addAbility( + new ConditionalTriggeredAbility( + new BeginningOfEndStepTriggeredAbility(new CreateTokenEffect(new CrestedSunmareToken()), TargetController.ANY, false), + new YouGainedLifeCondition(ComparisonType.MORE_THAN, 0), + "At the beginning of each end step, if you gained life this turn, create a 5/5 white Horse creature token."), + new PlayerGainedLifeWatcher()); + } + + public CrestedSunmare(final CrestedSunmare card) { + super(card); + } + + @Override + public CrestedSunmare copy() { + return new CrestedSunmare(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CribSwap.java b/Mage.Sets/src/mage/cards/c/CribSwap.java index 6abeb08548..d30b68eda0 100644 --- a/Mage.Sets/src/mage/cards/c/CribSwap.java +++ b/Mage.Sets/src/mage/cards/c/CribSwap.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ChangelingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -50,7 +51,7 @@ public class CribSwap extends CardImpl { public CribSwap(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.INSTANT}, "{2}{W}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); // Changeling this.addAbility(ChangelingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/c/CrimsonAcolyte.java b/Mage.Sets/src/mage/cards/c/CrimsonAcolyte.java index 21904b9926..288575b4aa 100644 --- a/Mage.Sets/src/mage/cards/c/CrimsonAcolyte.java +++ b/Mage.Sets/src/mage/cards/c/CrimsonAcolyte.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class CrimsonAcolyte extends CardImpl { public CrimsonAcolyte(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CrimsonHellkite.java b/Mage.Sets/src/mage/cards/c/CrimsonHellkite.java index 2dda663b60..9b395f4ebe 100644 --- a/Mage.Sets/src/mage/cards/c/CrimsonHellkite.java +++ b/Mage.Sets/src/mage/cards/c/CrimsonHellkite.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterMana; import mage.target.common.TargetCreaturePermanent; @@ -60,7 +61,7 @@ public class CrimsonHellkite extends CardImpl { public CrimsonHellkite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{R}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/c/CrimsonHonorGuard.java b/Mage.Sets/src/mage/cards/c/CrimsonHonorGuard.java index 137ec3a036..78187e67a6 100644 --- a/Mage.Sets/src/mage/cards/c/CrimsonHonorGuard.java +++ b/Mage.Sets/src/mage/cards/c/CrimsonHonorGuard.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.filter.FilterPermanent; @@ -54,8 +55,8 @@ public class CrimsonHonorGuard extends CardImpl { public CrimsonHonorGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); - this.subtype.add("Vampire"); - this.subtype.add("Knight"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(4); this.toughness = new MageInt(5); @@ -97,7 +98,7 @@ class CrimsonHonorGuardEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(game.getActivePlayerId()); if (player != null) { - int numCommanders = game.getBattlefield().getActivePermanents(filter, player.getId(), game).size(); + int numCommanders = game.getBattlefield().getAllActivePermanents(filter, player.getId(), game).size(); if (numCommanders == 0) { player.damage(4, source.getSourceId(), game, false, true); return true; diff --git a/Mage.Sets/src/mage/cards/c/CrimsonKobolds.java b/Mage.Sets/src/mage/cards/c/CrimsonKobolds.java index de6a512a0d..07fcaa1b81 100644 --- a/Mage.Sets/src/mage/cards/c/CrimsonKobolds.java +++ b/Mage.Sets/src/mage/cards/c/CrimsonKobolds.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class CrimsonKobolds extends CardImpl { public CrimsonKobolds(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{0}"); this.color.setRed(true); - this.subtype.add("Kobold"); + this.subtype.add(SubType.KOBOLD); this.power = new MageInt(0); this.toughness = new MageInt(1); } diff --git a/Mage.Sets/src/mage/cards/c/CrimsonMage.java b/Mage.Sets/src/mage/cards/c/CrimsonMage.java index d85aede881..be2a27e5ab 100644 --- a/Mage.Sets/src/mage/cards/c/CrimsonMage.java +++ b/Mage.Sets/src/mage/cards/c/CrimsonMage.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class CrimsonMage extends CardImpl { public CrimsonMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CrimsonManticore.java b/Mage.Sets/src/mage/cards/c/CrimsonManticore.java index 912e1d3324..73fbf7aceb 100644 --- a/Mage.Sets/src/mage/cards/c/CrimsonManticore.java +++ b/Mage.Sets/src/mage/cards/c/CrimsonManticore.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetAttackingOrBlockingCreature; @@ -49,7 +50,7 @@ public class CrimsonManticore extends CardImpl { public CrimsonManticore(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Manticore"); + this.subtype.add(SubType.MANTICORE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CrimsonMuckwader.java b/Mage.Sets/src/mage/cards/c/CrimsonMuckwader.java index b8eefaa94d..962312115e 100644 --- a/Mage.Sets/src/mage/cards/c/CrimsonMuckwader.java +++ b/Mage.Sets/src/mage/cards/c/CrimsonMuckwader.java @@ -56,7 +56,7 @@ public class CrimsonMuckwader extends CardImpl { public CrimsonMuckwader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CripplingBlight.java b/Mage.Sets/src/mage/cards/c/CripplingBlight.java index b1f97745bf..b4e95dd769 100644 --- a/Mage.Sets/src/mage/cards/c/CripplingBlight.java +++ b/Mage.Sets/src/mage/cards/c/CripplingBlight.java @@ -47,7 +47,7 @@ public class CripplingBlight extends CardImpl { public CripplingBlight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/c/Crocanura.java b/Mage.Sets/src/mage/cards/c/Crocanura.java index 3be39e334a..afdf6b8674 100644 --- a/Mage.Sets/src/mage/cards/c/Crocanura.java +++ b/Mage.Sets/src/mage/cards/c/Crocanura.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class Crocanura extends CardImpl { public Crocanura(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Crocodile"); - this.subtype.add("Frog"); + this.subtype.add(SubType.CROCODILE); + this.subtype.add(SubType.FROG); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CrocodileOfTheCrossing.java b/Mage.Sets/src/mage/cards/c/CrocodileOfTheCrossing.java index e98f62ac66..bdad68e934 100644 --- a/Mage.Sets/src/mage/cards/c/CrocodileOfTheCrossing.java +++ b/Mage.Sets/src/mage/cards/c/CrocodileOfTheCrossing.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetControlledCreaturePermanent; @@ -48,7 +49,7 @@ public class CrocodileOfTheCrossing extends CardImpl { public CrocodileOfTheCrossing(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); - this.subtype.add("Crocodile"); + this.subtype.add(SubType.CROCODILE); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/Cromat.java b/Mage.Sets/src/mage/cards/c/Cromat.java index 51ed41f45c..cfb752ae07 100644 --- a/Mage.Sets/src/mage/cards/c/Cromat.java +++ b/Mage.Sets/src/mage/cards/c/Cromat.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class Cromat extends CardImpl { public Cromat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CrookOfCondemnation.java b/Mage.Sets/src/mage/cards/c/CrookOfCondemnation.java index 676d248f3a..8f3733e97e 100644 --- a/Mage.Sets/src/mage/cards/c/CrookOfCondemnation.java +++ b/Mage.Sets/src/mage/cards/c/CrookOfCondemnation.java @@ -1,77 +1,77 @@ -/* - * 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.cards.c; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ExileSourceCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.ExileGraveyardAllPlayersEffect; -import mage.abilities.effects.common.ExileTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.target.common.TargetCardInGraveyard; - -/** - * - * @author jeffwadsworth - */ -public class CrookOfCondemnation extends CardImpl { - - private UUID exileId = UUID.randomUUID(); - - public CrookOfCondemnation(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); - - - // {1}, {t}: Exile target card from a graveyard. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new ManaCostsImpl("{1}")); - ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCardInGraveyard()); - this.addAbility(ability); - - // {1}, Exile Crook of Condemnation: Exile all cards from all graveyards. - Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileGraveyardAllPlayersEffect(), new ManaCostsImpl("{1}")); - ability2.addCost(new ExileSourceCost()); - this.addAbility(ability2); - - } - - public CrookOfCondemnation(final CrookOfCondemnation card) { - super(card); - } - - @Override - public CrookOfCondemnation copy() { - return new CrookOfCondemnation(this); - } -} +/* + * 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.cards.c; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ExileGraveyardAllPlayersEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.target.common.TargetCardInGraveyard; + +/** + * + * @author jeffwadsworth + */ +public class CrookOfCondemnation extends CardImpl { + + private UUID exileId = UUID.randomUUID(); + + public CrookOfCondemnation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + + // {1}, {t}: Exile target card from a graveyard. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new ManaCostsImpl("{1}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCardInGraveyard()); + this.addAbility(ability); + + // {1}, Exile Crook of Condemnation: Exile all cards from all graveyards. + Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileGraveyardAllPlayersEffect(), new ManaCostsImpl("{1}")); + ability2.addCost(new ExileSourceCost()); + this.addAbility(ability2); + + } + + public CrookOfCondemnation(final CrookOfCondemnation card) { + super(card); + } + + @Override + public CrookOfCondemnation copy() { + return new CrookOfCondemnation(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CrookclawElder.java b/Mage.Sets/src/mage/cards/c/CrookclawElder.java index d0810723e9..a529500302 100644 --- a/Mage.Sets/src/mage/cards/c/CrookclawElder.java +++ b/Mage.Sets/src/mage/cards/c/CrookclawElder.java @@ -67,8 +67,8 @@ public class CrookclawElder extends CardImpl { public CrookclawElder(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CrookclawTransmuter.java b/Mage.Sets/src/mage/cards/c/CrookclawTransmuter.java index 9f2da75669..6485562409 100644 --- a/Mage.Sets/src/mage/cards/c/CrookclawTransmuter.java +++ b/Mage.Sets/src/mage/cards/c/CrookclawTransmuter.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class CrookclawTransmuter extends CardImpl { public CrookclawTransmuter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CrookshankKobolds.java b/Mage.Sets/src/mage/cards/c/CrookshankKobolds.java index a47718fef9..6a2197d669 100644 --- a/Mage.Sets/src/mage/cards/c/CrookshankKobolds.java +++ b/Mage.Sets/src/mage/cards/c/CrookshankKobolds.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class CrookshankKobolds extends CardImpl { public CrookshankKobolds(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{0}"); this.color.setRed(true); - this.subtype.add("Kobold"); + this.subtype.add(SubType.KOBOLD); this.power = new MageInt(0); this.toughness = new MageInt(1); } diff --git a/Mage.Sets/src/mage/cards/c/CrosisThePurger.java b/Mage.Sets/src/mage/cards/c/CrosisThePurger.java index 87fe676404..a3675c0bdc 100644 --- a/Mage.Sets/src/mage/cards/c/CrosisThePurger.java +++ b/Mage.Sets/src/mage/cards/c/CrosisThePurger.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.choices.ChoiceColor; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.filter.FilterCard; @@ -60,7 +61,7 @@ public class CrosisThePurger extends CardImpl { public CrosisThePurger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/c/CrosissAttendant.java b/Mage.Sets/src/mage/cards/c/CrosissAttendant.java index 7829eb4a66..61fa716d5c 100644 --- a/Mage.Sets/src/mage/cards/c/CrosissAttendant.java +++ b/Mage.Sets/src/mage/cards/c/CrosissAttendant.java @@ -37,6 +37,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class CrosissAttendant extends CardImpl { public CrosissAttendant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CrossbowInfantry.java b/Mage.Sets/src/mage/cards/c/CrossbowInfantry.java index d26320852c..f070471074 100644 --- a/Mage.Sets/src/mage/cards/c/CrossbowInfantry.java +++ b/Mage.Sets/src/mage/cards/c/CrossbowInfantry.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetAttackingOrBlockingCreature; @@ -47,9 +48,9 @@ public class CrossbowInfantry extends CardImpl { public CrossbowInfantry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CrossroadsConsecrator.java b/Mage.Sets/src/mage/cards/c/CrossroadsConsecrator.java index 255217e935..3517a12e80 100644 --- a/Mage.Sets/src/mage/cards/c/CrossroadsConsecrator.java +++ b/Mage.Sets/src/mage/cards/c/CrossroadsConsecrator.java @@ -58,8 +58,8 @@ public class CrossroadsConsecrator extends CardImpl { public CrossroadsConsecrator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CrosstownCourier.java b/Mage.Sets/src/mage/cards/c/CrosstownCourier.java index 083bf52041..4c49aed695 100644 --- a/Mage.Sets/src/mage/cards/c/CrosstownCourier.java +++ b/Mage.Sets/src/mage/cards/c/CrosstownCourier.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.DamagedPlayerEvent; @@ -51,7 +52,7 @@ public class CrosstownCourier extends CardImpl { public CrosstownCourier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Vedalken"); + this.subtype.add(SubType.VEDALKEN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CrosswayVampire.java b/Mage.Sets/src/mage/cards/c/CrosswayVampire.java index 8f748257fe..4afba91c82 100644 --- a/Mage.Sets/src/mage/cards/c/CrosswayVampire.java +++ b/Mage.Sets/src/mage/cards/c/CrosswayVampire.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CantBlockTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -46,7 +47,7 @@ public class CrosswayVampire extends CardImpl { public CrosswayVampire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CrovaxAscendantHero.java b/Mage.Sets/src/mage/cards/c/CrovaxAscendantHero.java index 13b308d190..6b94be72ab 100644 --- a/Mage.Sets/src/mage/cards/c/CrovaxAscendantHero.java +++ b/Mage.Sets/src/mage/cards/c/CrovaxAscendantHero.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -61,7 +62,7 @@ public class CrovaxAscendantHero extends CardImpl { public CrovaxAscendantHero(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CrovaxTheCursed.java b/Mage.Sets/src/mage/cards/c/CrovaxTheCursed.java index ede8e62928..ac674638f5 100644 --- a/Mage.Sets/src/mage/cards/c/CrovaxTheCursed.java +++ b/Mage.Sets/src/mage/cards/c/CrovaxTheCursed.java @@ -57,7 +57,7 @@ public class CrovaxTheCursed extends CardImpl { public CrovaxTheCursed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/c/CrowOfDarkTidings.java b/Mage.Sets/src/mage/cards/c/CrowOfDarkTidings.java index a5ef620a60..981970f493 100644 --- a/Mage.Sets/src/mage/cards/c/CrowOfDarkTidings.java +++ b/Mage.Sets/src/mage/cards/c/CrowOfDarkTidings.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class CrowOfDarkTidings extends CardImpl { public CrowOfDarkTidings(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Bird"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CrowdFavorites.java b/Mage.Sets/src/mage/cards/c/CrowdFavorites.java index 4fb7f35202..cbf3d8cacc 100644 --- a/Mage.Sets/src/mage/cards/c/CrowdFavorites.java +++ b/Mage.Sets/src/mage/cards/c/CrowdFavorites.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class CrowdFavorites extends CardImpl { public CrowdFavorites(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CrowdOfCinders.java b/Mage.Sets/src/mage/cards/c/CrowdOfCinders.java index 1b38902ccd..42c9be5caa 100644 --- a/Mage.Sets/src/mage/cards/c/CrowdOfCinders.java +++ b/Mage.Sets/src/mage/cards/c/CrowdOfCinders.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -56,7 +57,7 @@ public class CrowdOfCinders extends CardImpl { public CrowdOfCinders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/c/CrownHunterHireling.java b/Mage.Sets/src/mage/cards/c/CrownHunterHireling.java index 3541708d15..f1c59b35fa 100644 --- a/Mage.Sets/src/mage/cards/c/CrownHunterHireling.java +++ b/Mage.Sets/src/mage/cards/c/CrownHunterHireling.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.BecomesMonarchSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -51,8 +52,8 @@ public class CrownHunterHireling extends CardImpl { public CrownHunterHireling(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CrownOfDoom.java b/Mage.Sets/src/mage/cards/c/CrownOfDoom.java index 3a447de9f2..851c8ecd92 100644 --- a/Mage.Sets/src/mage/cards/c/CrownOfDoom.java +++ b/Mage.Sets/src/mage/cards/c/CrownOfDoom.java @@ -39,15 +39,15 @@ import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.GainControlTargetEffect; -import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.filter.FilterPlayer; import mage.filter.StaticFilters; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.other.PlayerIdPredicate; +import mage.filter.predicate.ObjectSourcePlayer; +import mage.filter.predicate.ObjectSourcePlayerPredicate; import mage.game.Game; +import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPlayer; import mage.target.targetpointer.FixedTarget; @@ -58,7 +58,11 @@ import mage.target.targetpointer.FixedTarget; */ public class CrownOfDoom extends CardImpl { - private UUID abilityId; + private static final FilterPlayer filter = new FilterPlayer("player other than {this}'s owner"); + + static { + filter.add(new CrownOfDoomPredicate()); + } public CrownOfDoom(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); @@ -68,29 +72,15 @@ public class CrownOfDoom extends CardImpl { effect.setText("it gets +2/+0 until end of turn"); this.addAbility(new AttacksAllTriggeredAbility(effect, false, StaticFilters.FILTER_PERMANENT_CREATURE, SetTargetPointer.PERMANENT, true)); + //TODO: Make ability properly copiable // {2}: Target player other than Crown of Doom's owner gains control of it. Activate this ability only during your turn. Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new CrownOfDoomEffect(), new ManaCostsImpl("{2}"), MyTurnCondition.instance); - ability.addTarget(new TargetPlayer(1, 1, false, new FilterPlayer("player other than Crown of Doom's owner"))); - abilityId = ability.getOriginalId(); + ability.addTarget(new TargetPlayer(1, 1, false, filter)); this.addAbility(ability); } - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(abilityId)) { - Card sourceCard = game.getCard(ability.getSourceId()); - if (sourceCard != null) { - ability.getTargets().clear(); - FilterPlayer filter = new FilterPlayer("player other than " + sourceCard.getIdName() + "'s owner"); - filter.add(Predicates.not(new PlayerIdPredicate(sourceCard.getOwnerId()))); - ability.addTarget(new TargetPlayer(1, 1, false, filter)); - } - } - } - public CrownOfDoom(final CrownOfDoom card) { super(card); - this.abilityId = card.abilityId; } @Override @@ -99,6 +89,27 @@ public class CrownOfDoom extends CardImpl { } } +class CrownOfDoomPredicate implements ObjectSourcePlayerPredicate> { + + public CrownOfDoomPredicate() { + } + + @Override + public boolean apply(ObjectSourcePlayer input, Game game) { + Player targetPlayer = input.getObject(); + Permanent sourceObject = game.getPermanentOrLKIBattlefield(input.getSourceId()); + if (targetPlayer == null || sourceObject == null) { + return false; + } + return !targetPlayer.getId().equals(sourceObject.getOwnerId()); + } + + @Override + public String toString() { + return "Owner(" + ')'; + } +} + class CrownOfDoomEffect extends OneShotEffect { public CrownOfDoomEffect() { diff --git a/Mage.Sets/src/mage/cards/c/CrownOfFlames.java b/Mage.Sets/src/mage/cards/c/CrownOfFlames.java index 4add555597..a804666737 100644 --- a/Mage.Sets/src/mage/cards/c/CrownOfFlames.java +++ b/Mage.Sets/src/mage/cards/c/CrownOfFlames.java @@ -49,7 +49,7 @@ public class CrownOfFlames extends CardImpl { public CrownOfFlames(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CrownedCeratok.java b/Mage.Sets/src/mage/cards/c/CrownedCeratok.java index c03b07d417..332b8eede6 100644 --- a/Mage.Sets/src/mage/cards/c/CrownedCeratok.java +++ b/Mage.Sets/src/mage/cards/c/CrownedCeratok.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class CrownedCeratok extends CardImpl { public CrownedCeratok(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Rhino"); + this.subtype.add(SubType.RHINO); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CrudeRampart.java b/Mage.Sets/src/mage/cards/c/CrudeRampart.java index 9595ff4be1..b901baff91 100644 --- a/Mage.Sets/src/mage/cards/c/CrudeRampart.java +++ b/Mage.Sets/src/mage/cards/c/CrudeRampart.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class CrudeRampart extends CardImpl { public CrudeRampart(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CruelDeceiver.java b/Mage.Sets/src/mage/cards/c/CruelDeceiver.java index 38866d26c2..dd515075b0 100644 --- a/Mage.Sets/src/mage/cards/c/CruelDeceiver.java +++ b/Mage.Sets/src/mage/cards/c/CruelDeceiver.java @@ -29,18 +29,20 @@ package mage.cards.c; import java.util.UUID; import mage.MageInt; +import mage.MageObject; import mage.abilities.Ability; +import mage.abilities.common.DealsDamageToACreatureTriggeredAbility; import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.LookLibraryControllerEffect; -import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; -import mage.abilities.keyword.TrampleAbility; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,8 +56,8 @@ import mage.players.Player; public class CruelDeceiver extends CardImpl { public CruelDeceiver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Spirit"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); @@ -81,7 +83,7 @@ class CruelDeceiverEffect extends OneShotEffect { public CruelDeceiverEffect() { super(Outcome.AddAbility); - this.staticText = "Reveal the top card of your library. If it's a land card, {this} gets +2/+2 and gains trample until end of turn"; + this.staticText = "Reveal the top card of your library. If it's a land card, {this} gains \"Whenever Cruel Deceiver deals damage to a creature, destroy that creature\" until end of turn"; } public CruelDeceiverEffect(final CruelDeceiverEffect effect) { @@ -95,15 +97,17 @@ class CruelDeceiverEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null) { Cards cards = new CardsImpl(); - Card card = player.getLibrary().getFromTop(game); - cards.add(card); - player.revealCards("Cruel Deceiver", cards, game); - if (card != null && card.isLand()) { - game.addEffect(new BoostSourceEffect(2,2,Duration.EndOfTurn), source); - game.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(),Duration.EndOfTurn), source); + Card card = controller.getLibrary().getFromTop(game); + if (card != null) { + cards.add(card); + controller.revealCards(sourceObject.getIdName(), cards, game); + if (card.isLand()) { + game.addEffect(new GainAbilitySourceEffect(new DealsDamageToACreatureTriggeredAbility(new DestroyTargetEffect(true), false, false, true), Duration.EndOfTurn), source); + } } return true; } diff --git a/Mage.Sets/src/mage/cards/c/CruelSadist.java b/Mage.Sets/src/mage/cards/c/CruelSadist.java index 461b394017..11024c6cb3 100644 --- a/Mage.Sets/src/mage/cards/c/CruelSadist.java +++ b/Mage.Sets/src/mage/cards/c/CruelSadist.java @@ -43,6 +43,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.counters.CounterType; @@ -56,8 +57,8 @@ public class CruelSadist extends CardImpl { public CruelSadist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Human"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CrumblingColossus.java b/Mage.Sets/src/mage/cards/c/CrumblingColossus.java index 8c34e658d1..1e0ae9dc73 100644 --- a/Mage.Sets/src/mage/cards/c/CrumblingColossus.java +++ b/Mage.Sets/src/mage/cards/c/CrumblingColossus.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class CrumblingColossus extends CardImpl { public CrumblingColossus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(7); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CrusaderOfOdric.java b/Mage.Sets/src/mage/cards/c/CrusaderOfOdric.java index ddc7d6ad67..3d966157f8 100644 --- a/Mage.Sets/src/mage/cards/c/CrusaderOfOdric.java +++ b/Mage.Sets/src/mage/cards/c/CrusaderOfOdric.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -47,8 +48,8 @@ public class CrusaderOfOdric extends CardImpl { public CrusaderOfOdric(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/c/CrusadingKnight.java b/Mage.Sets/src/mage/cards/c/CrusadingKnight.java index 344e001b1a..5e35229460 100644 --- a/Mage.Sets/src/mage/cards/c/CrusadingKnight.java +++ b/Mage.Sets/src/mage/cards/c/CrusadingKnight.java @@ -55,8 +55,8 @@ public class CrusadingKnight extends CardImpl { public CrusadingKnight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CrushUnderfoot.java b/Mage.Sets/src/mage/cards/c/CrushUnderfoot.java index 04aa407efd..5fc416f168 100644 --- a/Mage.Sets/src/mage/cards/c/CrushUnderfoot.java +++ b/Mage.Sets/src/mage/cards/c/CrushUnderfoot.java @@ -53,7 +53,7 @@ public class CrushUnderfoot extends CardImpl { public CrushUnderfoot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{1}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); // Choose a Giant creature you control. It deals damage equal to its power to target creature. diff --git a/Mage.Sets/src/mage/cards/c/CrusherZendikon.java b/Mage.Sets/src/mage/cards/c/CrusherZendikon.java index 6576d5feea..b71aa8c365 100644 --- a/Mage.Sets/src/mage/cards/c/CrusherZendikon.java +++ b/Mage.Sets/src/mage/cards/c/CrusherZendikon.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class CrusherZendikon extends CardImpl { public CrusherZendikon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land @@ -88,7 +89,7 @@ class BeastToken extends Token { super("", "4/2 red Beast creature with trample"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Beast"); + subtype.add(SubType.BEAST); power = new MageInt(4); toughness = new MageInt(2); this.addAbility(TrampleAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/c/CrushingCanopy.java b/Mage.Sets/src/mage/cards/c/CrushingCanopy.java new file mode 100644 index 0000000000..26fa449740 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CrushingCanopy.java @@ -0,0 +1,76 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetEnchantmentPermanent; + +/** + * + * @author TheElk801 + */ +public class CrushingCanopy extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public CrushingCanopy(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}"); + + // Choose one -- + // * Destroy target creature with flying. + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + // * Destroy target enchantment. + Mode mode = new Mode(); + mode.getTargets().add(new TargetEnchantmentPermanent()); + mode.getEffects().add(new DestroyTargetEffect()); + this.getSpellAbility().addMode(mode); + } + + public CrushingCanopy(final CrushingCanopy card) { + super(card); + } + + @Override + public CrushingCanopy copy() { + return new CrushingCanopy(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CrushingPain.java b/Mage.Sets/src/mage/cards/c/CrushingPain.java index 3fa5d870e2..b60671a201 100644 --- a/Mage.Sets/src/mage/cards/c/CrushingPain.java +++ b/Mage.Sets/src/mage/cards/c/CrushingPain.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.WasDealtDamageThisTurnPredicate; import mage.target.common.TargetCreaturePermanent; @@ -52,7 +53,7 @@ public class CrushingPain extends CardImpl { public CrushingPain (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Crushing Pain deals 6 damage to target creature that was dealt damage this turn. this.getSpellAbility().addEffect(new DamageTargetEffect(6)); diff --git a/Mage.Sets/src/mage/cards/c/CryptAngel.java b/Mage.Sets/src/mage/cards/c/CryptAngel.java index f4d87d3a37..6376048e96 100644 --- a/Mage.Sets/src/mage/cards/c/CryptAngel.java +++ b/Mage.Sets/src/mage/cards/c/CryptAngel.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,7 +58,7 @@ public class CryptAngel extends CardImpl { public CryptAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CryptChampion.java b/Mage.Sets/src/mage/cards/c/CryptChampion.java index 47b8f0c86b..89bb2cd93f 100644 --- a/Mage.Sets/src/mage/cards/c/CryptChampion.java +++ b/Mage.Sets/src/mage/cards/c/CryptChampion.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.ComparisonType; import mage.constants.Outcome; @@ -61,7 +62,7 @@ public class CryptChampion extends CardImpl { public CryptChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CryptCobra.java b/Mage.Sets/src/mage/cards/c/CryptCobra.java index c7d11596b5..57e1f4b4d0 100644 --- a/Mage.Sets/src/mage/cards/c/CryptCobra.java +++ b/Mage.Sets/src/mage/cards/c/CryptCobra.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddPoisonCounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class CryptCobra extends CardImpl { public CryptCobra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CryptCreeper.java b/Mage.Sets/src/mage/cards/c/CryptCreeper.java index 88a81cf9e6..0935557bdb 100644 --- a/Mage.Sets/src/mage/cards/c/CryptCreeper.java +++ b/Mage.Sets/src/mage/cards/c/CryptCreeper.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCardInGraveyard; @@ -46,7 +47,7 @@ public class CryptCreeper extends CardImpl { public CryptCreeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CryptGhast.java b/Mage.Sets/src/mage/cards/c/CryptGhast.java index e42b70c23e..70c4e1d568 100644 --- a/Mage.Sets/src/mage/cards/c/CryptGhast.java +++ b/Mage.Sets/src/mage/cards/c/CryptGhast.java @@ -54,7 +54,7 @@ public class CryptGhast extends CardImpl { public CryptGhast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CryptOfTheEternals.java b/Mage.Sets/src/mage/cards/c/CryptOfTheEternals.java index ffd18b00e5..c4c173189b 100644 --- a/Mage.Sets/src/mage/cards/c/CryptOfTheEternals.java +++ b/Mage.Sets/src/mage/cards/c/CryptOfTheEternals.java @@ -1,52 +1,52 @@ -package mage.cards.c; - -import mage.Mana; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.GainLifeEffect; -import mage.abilities.mana.ColorlessManaAbility; -import mage.abilities.mana.SimpleManaAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; - -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -public class CryptOfTheEternals extends CardImpl { - - public CryptOfTheEternals(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - - // When Crypt of the Eternals enters the battlefield, you gain 1 life. - this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(1))); - - // {T}: Add {C} to your mana pool. - this.addAbility(new ColorlessManaAbility()); - - // {1}, {T}: Add {U}, {B}, or {R} to your mana pool. - List list = new ArrayList() {{ - add(Mana.BlueMana(1)); - add(Mana.BlackMana(1)); - add(Mana.RedMana(1)); - }}; - - for(Mana m: list) { - SimpleManaAbility uAbility = new SimpleManaAbility(Zone.BATTLEFIELD, m, new ManaCostsImpl("{1}")); - uAbility.addCost(new TapSourceCost()); - this.addAbility(uAbility); - } - } - - public CryptOfTheEternals(final CryptOfTheEternals card) { - super(card); - } - - @Override - public CryptOfTheEternals copy() { - return new CryptOfTheEternals(this); - } -} +package mage.cards.c; + +import mage.Mana; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +public class CryptOfTheEternals extends CardImpl { + + public CryptOfTheEternals(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + // When Crypt of the Eternals enters the battlefield, you gain 1 life. + this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(1))); + + // {T}: Add {C} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {1}, {T}: Add {U}, {B}, or {R} to your mana pool. + List list = new ArrayList() {{ + add(Mana.BlueMana(1)); + add(Mana.BlackMana(1)); + add(Mana.RedMana(1)); + }}; + + for(Mana m: list) { + SimpleManaAbility uAbility = new SimpleManaAbility(Zone.BATTLEFIELD, m, new ManaCostsImpl("{1}")); + uAbility.addCost(new TapSourceCost()); + this.addAbility(uAbility); + } + } + + public CryptOfTheEternals(final CryptOfTheEternals card) { + super(card); + } + + @Override + public CryptOfTheEternals copy() { + return new CryptOfTheEternals(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CryptRats.java b/Mage.Sets/src/mage/cards/c/CryptRats.java index e5fb5da2e9..fd2a8f6469 100644 --- a/Mage.Sets/src/mage/cards/c/CryptRats.java +++ b/Mage.Sets/src/mage/cards/c/CryptRats.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.DamageEverythingEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterMana; @@ -57,7 +58,7 @@ public class CryptRats extends CardImpl { public CryptRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CryptRipper.java b/Mage.Sets/src/mage/cards/c/CryptRipper.java index cde76def98..8139982a8b 100644 --- a/Mage.Sets/src/mage/cards/c/CryptRipper.java +++ b/Mage.Sets/src/mage/cards/c/CryptRipper.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class CryptRipper extends CardImpl { public CryptRipper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Shade"); + this.subtype.add(SubType.SHADE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CryptSliver.java b/Mage.Sets/src/mage/cards/c/CryptSliver.java index 271ba5b8d9..49a65d439a 100644 --- a/Mage.Sets/src/mage/cards/c/CryptSliver.java +++ b/Mage.Sets/src/mage/cards/c/CryptSliver.java @@ -53,7 +53,7 @@ public class CryptSliver extends CardImpl { public CryptSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CryptbornHorror.java b/Mage.Sets/src/mage/cards/c/CryptbornHorror.java index 24be98a363..18643f9ea4 100644 --- a/Mage.Sets/src/mage/cards/c/CryptbornHorror.java +++ b/Mage.Sets/src/mage/cards/c/CryptbornHorror.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.game.Game; @@ -52,7 +53,7 @@ public class CryptbornHorror extends CardImpl { public CryptbornHorror(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B/R}{B/R}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.color.setBlack(true); this.color.setRed(true); this.power = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/c/Cryptbreaker.java b/Mage.Sets/src/mage/cards/c/Cryptbreaker.java index 43f50b27ea..732cd644ed 100644 --- a/Mage.Sets/src/mage/cards/c/Cryptbreaker.java +++ b/Mage.Sets/src/mage/cards/c/Cryptbreaker.java @@ -66,7 +66,7 @@ public class Cryptbreaker extends CardImpl { public Cryptbreaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CrypticAnnelid.java b/Mage.Sets/src/mage/cards/c/CrypticAnnelid.java index 3b31fb8392..23dc6817db 100644 --- a/Mage.Sets/src/mage/cards/c/CrypticAnnelid.java +++ b/Mage.Sets/src/mage/cards/c/CrypticAnnelid.java @@ -36,6 +36,7 @@ import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class CrypticAnnelid extends CardImpl { public CrypticAnnelid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Worm"); - this.subtype.add("Beast"); + this.subtype.add(SubType.WORM); + this.subtype.add(SubType.BEAST); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CrypticCruiser.java b/Mage.Sets/src/mage/cards/c/CrypticCruiser.java index 1d587f23ee..1e53956d3e 100644 --- a/Mage.Sets/src/mage/cards/c/CrypticCruiser.java +++ b/Mage.Sets/src/mage/cards/c/CrypticCruiser.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class CrypticCruiser extends CardImpl { public CrypticCruiser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Processor"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.PROCESSOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CrypticGateway.java b/Mage.Sets/src/mage/cards/c/CrypticGateway.java index 8c17e28e5d..9821618bf7 100644 --- a/Mage.Sets/src/mage/cards/c/CrypticGateway.java +++ b/Mage.Sets/src/mage/cards/c/CrypticGateway.java @@ -203,14 +203,14 @@ class CrypticGatewayEffect extends OneShotEffect { List subtypes = new ArrayList<>(); for (SubType subtype : creature.getSubtype(game)) { - if (creature2.getSubtype(game).contains(subtype) || changeling2) { + if (creature2.hasSubtype(subtype, game) || changeling2) { subtypes.add(new SubtypePredicate(subtype)); commonSubType = true; } } for (SubType subtype : creature2.getSubtype(game)) { - if (creature.getSubtype(game).contains(subtype) || changeling) { + if (creature.hasSubtype(subtype, game) || changeling) { subtypes.add(new SubtypePredicate(subtype)); commonSubType = true; } diff --git a/Mage.Sets/src/mage/cards/c/CrypticSerpent.java b/Mage.Sets/src/mage/cards/c/CrypticSerpent.java index 01879bc9e4..a4f1d37d48 100644 --- a/Mage.Sets/src/mage/cards/c/CrypticSerpent.java +++ b/Mage.Sets/src/mage/cards/c/CrypticSerpent.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.cost.SourceCostReductionForEachCardInGravey import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterInstantOrSorceryCard; @@ -46,7 +47,7 @@ public class CrypticSerpent extends CardImpl { public CrypticSerpent(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/Cryptoplasm.java b/Mage.Sets/src/mage/cards/c/Cryptoplasm.java index 6a01c6f0a7..a6ca4a5315 100644 --- a/Mage.Sets/src/mage/cards/c/Cryptoplasm.java +++ b/Mage.Sets/src/mage/cards/c/Cryptoplasm.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -58,7 +59,7 @@ public class Cryptoplasm extends CardImpl { public Cryptoplasm(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CrystalGolem.java b/Mage.Sets/src/mage/cards/c/CrystalGolem.java index 6b3a8b0e67..5688b6a0e0 100644 --- a/Mage.Sets/src/mage/cards/c/CrystalGolem.java +++ b/Mage.Sets/src/mage/cards/c/CrystalGolem.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.PhaseOutSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -44,7 +45,7 @@ public class CrystalGolem extends CardImpl { public CrystalGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CrystalSeer.java b/Mage.Sets/src/mage/cards/c/CrystalSeer.java index cd2a057258..d7025b4f7e 100644 --- a/Mage.Sets/src/mage/cards/c/CrystalSeer.java +++ b/Mage.Sets/src/mage/cards/c/CrystalSeer.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -49,8 +50,8 @@ public class CrystalSeer extends CardImpl { public CrystalSeer (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CrystallineCrawler.java b/Mage.Sets/src/mage/cards/c/CrystallineCrawler.java index f93601c1ad..00d94f74e7 100644 --- a/Mage.Sets/src/mage/cards/c/CrystallineCrawler.java +++ b/Mage.Sets/src/mage/cards/c/CrystallineCrawler.java @@ -39,6 +39,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -51,7 +52,7 @@ public class CrystallineCrawler extends CardImpl { public CrystallineCrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CrystallineNautilus.java b/Mage.Sets/src/mage/cards/c/CrystallineNautilus.java index 6d6dca9d8d..929ffd9a69 100644 --- a/Mage.Sets/src/mage/cards/c/CrystallineNautilus.java +++ b/Mage.Sets/src/mage/cards/c/CrystallineNautilus.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class CrystallineNautilus extends CardImpl { public CrystallineNautilus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{U}"); - this.subtype.add("Nautilus"); + this.subtype.add(SubType.NAUTILUS); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CrystallineSliver.java b/Mage.Sets/src/mage/cards/c/CrystallineSliver.java index 8db90d5c71..6c5839c4bd 100644 --- a/Mage.Sets/src/mage/cards/c/CrystallineSliver.java +++ b/Mage.Sets/src/mage/cards/c/CrystallineSliver.java @@ -48,7 +48,7 @@ public class CrystallineSliver extends CardImpl { public CrystallineSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/Crystallization.java b/Mage.Sets/src/mage/cards/c/Crystallization.java index 80ca4dc990..5b992cb805 100644 --- a/Mage.Sets/src/mage/cards/c/Crystallization.java +++ b/Mage.Sets/src/mage/cards/c/Crystallization.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -57,7 +58,7 @@ public class Crystallization extends CardImpl { public Crystallization(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G/U}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CudgelTroll.java b/Mage.Sets/src/mage/cards/c/CudgelTroll.java index 8eccc4c466..b8091d7424 100644 --- a/Mage.Sets/src/mage/cards/c/CudgelTroll.java +++ b/Mage.Sets/src/mage/cards/c/CudgelTroll.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class CudgelTroll extends CardImpl { public CudgelTroll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Troll"); + this.subtype.add(SubType.TROLL); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CullingDrone.java b/Mage.Sets/src/mage/cards/c/CullingDrone.java index 1ff868f07a..181c706511 100644 --- a/Mage.Sets/src/mage/cards/c/CullingDrone.java +++ b/Mage.Sets/src/mage/cards/c/CullingDrone.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.IngestAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class CullingDrone extends CardImpl { public CullingDrone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CultOfTheWaxingMoon.java b/Mage.Sets/src/mage/cards/c/CultOfTheWaxingMoon.java index ae7a81d9e2..f9b0619e2c 100644 --- a/Mage.Sets/src/mage/cards/c/CultOfTheWaxingMoon.java +++ b/Mage.Sets/src/mage/cards/c/CultOfTheWaxingMoon.java @@ -52,8 +52,8 @@ public class CultOfTheWaxingMoon extends CardImpl { public CultOfTheWaxingMoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CultbrandCinder.java b/Mage.Sets/src/mage/cards/c/CultbrandCinder.java index 1758eeed8b..8aa1cdec0d 100644 --- a/Mage.Sets/src/mage/cards/c/CultbrandCinder.java +++ b/Mage.Sets/src/mage/cards/c/CultbrandCinder.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -46,8 +47,8 @@ public class CultbrandCinder extends CardImpl { public CultbrandCinder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B/R}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CultistsStaff.java b/Mage.Sets/src/mage/cards/c/CultistsStaff.java index 0397ddac93..184d283d74 100644 --- a/Mage.Sets/src/mage/cards/c/CultistsStaff.java +++ b/Mage.Sets/src/mage/cards/c/CultistsStaff.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -47,7 +48,7 @@ public class CultistsStaff extends CardImpl { public CultistsStaff(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2))); diff --git a/Mage.Sets/src/mage/cards/c/CultivatorDrone.java b/Mage.Sets/src/mage/cards/c/CultivatorDrone.java index 374de5a6bf..a05b89470a 100644 --- a/Mage.Sets/src/mage/cards/c/CultivatorDrone.java +++ b/Mage.Sets/src/mage/cards/c/CultivatorDrone.java @@ -46,6 +46,7 @@ import mage.abilities.mana.conditional.ManaCondition; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.Game; import mage.game.permanent.Permanent; @@ -57,8 +58,8 @@ public class CultivatorDrone extends CardImpl { public CultivatorDrone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CultivatorOfBlades.java b/Mage.Sets/src/mage/cards/c/CultivatorOfBlades.java index 7ab795a012..d5acad521d 100644 --- a/Mage.Sets/src/mage/cards/c/CultivatorOfBlades.java +++ b/Mage.Sets/src/mage/cards/c/CultivatorOfBlades.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount; @@ -37,7 +36,10 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.common.FilterAttackingCreature; +import mage.constants.SubType; +import mage.filter.StaticFilters; + +import java.util.UUID; /** * @@ -47,8 +49,8 @@ public class CultivatorOfBlades extends CardImpl { public CultivatorOfBlades(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -56,7 +58,7 @@ public class CultivatorOfBlades extends CardImpl { this.addAbility(new FabricateAbility(2)); // Whenever Cultivator of Blades attacks, you may have other attacking creatures get +X/+X until end of turn, where X is Cultivator of Blades's power. - this.addAbility(new AttacksTriggeredAbility(new BoostControlledEffect(new SourcePermanentPowerCount(), new SourcePermanentPowerCount(), Duration.EndOfTurn, new FilterAttackingCreature(), true, true), + this.addAbility(new AttacksTriggeredAbility(new BoostControlledEffect(new SourcePermanentPowerCount(), new SourcePermanentPowerCount(), Duration.EndOfTurn, StaticFilters.FILTER_ATTACKING_CREATURES, true, true), true, "Whenever Cultivator of Blades attacks, you may have other attacking creatures get +X/+X until end of turn, where X is Cultivator of Blades's power.")); } diff --git a/Mage.Sets/src/mage/cards/c/CulturalExchange.java b/Mage.Sets/src/mage/cards/c/CulturalExchange.java new file mode 100644 index 0000000000..bb81b4b40a --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CulturalExchange.java @@ -0,0 +1,136 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPlayer; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public class CulturalExchange extends CardImpl { + + public CulturalExchange(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}{U}"); + + // Choose any number of creatures target player controls. Choose the same number of creatures another target player controls. Those players exchange control of those creatures. + this.getSpellAbility().addEffect(new CulturalExchangeEffect()); + this.getSpellAbility().addTarget(new TargetPlayer(2)); + } + + public CulturalExchange(final CulturalExchange card) { + super(card); + } + + @Override + public CulturalExchange copy() { + return new CulturalExchange(this); + } +} + +class CulturalExchangeEffect extends OneShotEffect { + + CulturalExchangeEffect() { + super(Outcome.Benefit); + this.staticText = "Choose any number of creatures target player controls. " + + "Choose the same number of creatures another target player controls. " + + "Those players exchange control of those creatures."; + } + + CulturalExchangeEffect(final CulturalExchangeEffect effect) { + super(effect); + } + + @Override + public CulturalExchangeEffect copy() { + return new CulturalExchangeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player1 = game.getPlayer(targetPointer.getTargets(game, source).get(0)); + Player player2 = game.getPlayer(targetPointer.getTargets(game, source).get(1)); + Player controller = game.getPlayer(source.getControllerId()); + if (player1 == null || player2 == null || controller == null) { + return false; + } + FilterCreaturePermanent filter1 = new FilterCreaturePermanent("creatures " + player1.getLogName() + " controls"); + FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creatures " + player2.getLogName() + " controls"); + filter1.add(new ControllerIdPredicate(player1.getId())); + filter2.add(new ControllerIdPredicate(player2.getId())); + int creatureCount1 = game.getBattlefield().count(filter1, source.getSourceId(), source.getControllerId(), game); + int creatureCount2 = game.getBattlefield().count(filter2, source.getSourceId(), source.getControllerId(), game); + int creaturesToSwitch = Math.min(creatureCount1, creatureCount2); + if (creaturesToSwitch == 0) { + return true; + } + TargetCreaturePermanent target1 = new TargetCreaturePermanent(0, creaturesToSwitch, filter1, true); + if (target1.choose(Outcome.Benefit, controller.getId(), source.getSourceId(), game)) { + int otherToSwitch = target1.getTargets().size(); + TargetCreaturePermanent target2 = new TargetCreaturePermanent(otherToSwitch, otherToSwitch, filter2, true); + if (target2.choose(Outcome.Benefit, controller.getId(), source.getSourceId(), game)) { + for (UUID creatureId : target1.getTargets()) { + Permanent creature = game.getPermanent(creatureId); + if (creature != null) { + ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, player2.getId()); + game.informPlayers(player2.getLogName() + " gains control of " + creature.getLogName()); + effect.setTargetPointer(new FixedTarget(creature, game)); + game.addEffect(effect, source); + } + } + for (UUID creatureId : target2.getTargets()) { + Permanent creature = game.getPermanent(creatureId); + if (creature != null) { + ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, player1.getId()); + game.informPlayers(player1.getLogName() + " gains control of " + creature.getLogName()); + effect.setTargetPointer(new FixedTarget(creature, game)); + game.addEffect(effect, source); + } + } + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/c/CunningAdvisor.java b/Mage.Sets/src/mage/cards/c/CunningAdvisor.java index 0dd7bd2970..d9f52cdff4 100644 --- a/Mage.Sets/src/mage/cards/c/CunningAdvisor.java +++ b/Mage.Sets/src/mage/cards/c/CunningAdvisor.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetOpponent; @@ -48,8 +49,8 @@ public class CunningAdvisor extends CardImpl { public CunningAdvisor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CunningBandit.java b/Mage.Sets/src/mage/cards/c/CunningBandit.java index 2fd1493763..82f59bcbb9 100644 --- a/Mage.Sets/src/mage/cards/c/CunningBandit.java +++ b/Mage.Sets/src/mage/cards/c/CunningBandit.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -59,8 +60,8 @@ public class CunningBandit extends CardImpl { public CunningBandit(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -94,7 +95,7 @@ class AzamukiTreacheryIncarnate extends Token { addSuperType(SuperType.LEGENDARY); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); power = new MageInt(5); toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CunningBreezedancer.java b/Mage.Sets/src/mage/cards/c/CunningBreezedancer.java index 7d480f9661..d166055c55 100644 --- a/Mage.Sets/src/mage/cards/c/CunningBreezedancer.java +++ b/Mage.Sets/src/mage/cards/c/CunningBreezedancer.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -54,7 +55,7 @@ public class CunningBreezedancer extends CardImpl { public CunningBreezedancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{U}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CunningLethemancer.java b/Mage.Sets/src/mage/cards/c/CunningLethemancer.java index 09a8fb51cc..586303715f 100644 --- a/Mage.Sets/src/mage/cards/c/CunningLethemancer.java +++ b/Mage.Sets/src/mage/cards/c/CunningLethemancer.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.events.GameEvent.EventType; /** @@ -44,8 +45,8 @@ public class CunningLethemancer extends CardImpl { public CunningLethemancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CunningSparkmage.java b/Mage.Sets/src/mage/cards/c/CunningSparkmage.java index 434757ddc4..72447100d8 100644 --- a/Mage.Sets/src/mage/cards/c/CunningSparkmage.java +++ b/Mage.Sets/src/mage/cards/c/CunningSparkmage.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -49,8 +50,8 @@ public class CunningSparkmage extends CardImpl { public CunningSparkmage (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.color.setRed(true); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CunningSurvivor.java b/Mage.Sets/src/mage/cards/c/CunningSurvivor.java index 44c2321bcd..65eea723d8 100644 --- a/Mage.Sets/src/mage/cards/c/CunningSurvivor.java +++ b/Mage.Sets/src/mage/cards/c/CunningSurvivor.java @@ -1,72 +1,73 @@ -/* - * 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.cards.c; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.CycleOrDiscardControllerTriggeredAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; - -/** - * - * @author emerald000 - */ -public class CunningSurvivor extends CardImpl { - - public CunningSurvivor(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - - this.subtype.add("Human"); - this.subtype.add("Warrior"); - this.power = new MageInt(1); - this.toughness = new MageInt(3); - - // Whenever you cycle or discard a card, Cunning Survivor gets +1/+0 until end of turn and can't be blocked this turn. - Ability ability = new CycleOrDiscardControllerTriggeredAbility(new BoostSourceEffect(1, 0, Duration.EndOfTurn)); - Effect effect = new CantBeBlockedSourceEffect(Duration.EndOfTurn); - effect.setText("and can't be blocked this turn"); - ability.addEffect(effect); - this.addAbility(ability); - } - - public CunningSurvivor(final CunningSurvivor card) { - super(card); - } - - @Override - public CunningSurvivor copy() { - return new CunningSurvivor(this); - } -} +/* + * 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.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.CycleOrDiscardControllerTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; + +/** + * + * @author emerald000 + */ +public class CunningSurvivor extends CardImpl { + + public CunningSurvivor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Whenever you cycle or discard a card, Cunning Survivor gets +1/+0 until end of turn and can't be blocked this turn. + Ability ability = new CycleOrDiscardControllerTriggeredAbility(new BoostSourceEffect(1, 0, Duration.EndOfTurn)); + Effect effect = new CantBeBlockedSourceEffect(Duration.EndOfTurn); + effect.setText("and can't be blocked this turn"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public CunningSurvivor(final CunningSurvivor card) { + super(card); + } + + @Override + public CunningSurvivor copy() { + return new CunningSurvivor(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CuombajjWitches.java b/Mage.Sets/src/mage/cards/c/CuombajjWitches.java index 74047137f9..f4ea8c4cf1 100644 --- a/Mage.Sets/src/mage/cards/c/CuombajjWitches.java +++ b/Mage.Sets/src/mage/cards/c/CuombajjWitches.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,11 +57,12 @@ public class CuombajjWitches extends CardImpl { public CuombajjWitches(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); + //TODO: Make ability properly copiable // {T}: Cuombajj Witches deals 1 damage to target creature or player and 1 damage to target creature or player of an opponent's choice. Effect effect = new DamageTargetEffect(1); effect.setText("{this} deals 1 damage to target creature or player and 1 damage to target creature or player of an opponent's choice"); diff --git a/Mage.Sets/src/mage/cards/c/CuratorOfMysteries.java b/Mage.Sets/src/mage/cards/c/CuratorOfMysteries.java index 01e8448cfb..789aa0c95f 100644 --- a/Mage.Sets/src/mage/cards/c/CuratorOfMysteries.java +++ b/Mage.Sets/src/mage/cards/c/CuratorOfMysteries.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,7 +48,7 @@ public class CuratorOfMysteries extends CardImpl { public CuratorOfMysteries(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CurioVendor.java b/Mage.Sets/src/mage/cards/c/CurioVendor.java index ef599e6594..eab9d07933 100644 --- a/Mage.Sets/src/mage/cards/c/CurioVendor.java +++ b/Mage.Sets/src/mage/cards/c/CurioVendor.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class CurioVendor extends CardImpl { public CurioVendor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Vedalken"); + this.subtype.add(SubType.VEDALKEN); this.power = new MageInt(2); this.toughness = new MageInt(1); } diff --git a/Mage.Sets/src/mage/cards/c/Curiosity.java b/Mage.Sets/src/mage/cards/c/Curiosity.java index ed2e5eeb43..e096c5d1c6 100644 --- a/Mage.Sets/src/mage/cards/c/Curiosity.java +++ b/Mage.Sets/src/mage/cards/c/Curiosity.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -53,7 +54,7 @@ public class Curiosity extends CardImpl { public Curiosity(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/c/CuriousHomunculus.java b/Mage.Sets/src/mage/cards/c/CuriousHomunculus.java index ab69af8ff7..a6d3864186 100644 --- a/Mage.Sets/src/mage/cards/c/CuriousHomunculus.java +++ b/Mage.Sets/src/mage/cards/c/CuriousHomunculus.java @@ -48,6 +48,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.v.VoraciousReader; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterInstantOrSorceryCard; import mage.game.Game; @@ -61,7 +62,7 @@ public class CuriousHomunculus extends CardImpl { public CuriousHomunculus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Homunculus"); + this.subtype.add(SubType.HOMUNCULUS); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CurseOfChains.java b/Mage.Sets/src/mage/cards/c/CurseOfChains.java index fae3ee3e1d..032d68abd2 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfChains.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfChains.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.target.TargetPermanent; @@ -49,7 +50,7 @@ public class CurseOfChains extends CardImpl { public CurseOfChains(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W/U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/c/CurseOfEchoes.java b/Mage.Sets/src/mage/cards/c/CurseOfEchoes.java index b7f238deb8..96e43762b9 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfEchoes.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfEchoes.java @@ -58,7 +58,7 @@ import mage.target.targetpointer.FixedTarget; public class CurseOfEchoes extends CardImpl { public CurseOfEchoes(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{U}"); this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player @@ -143,7 +143,7 @@ class CurseOfEchoesEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source)); + Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source)); if (spell != null) { String chooseMessage = "Copy target spell? You may choose new targets for the copy."; for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { diff --git a/Mage.Sets/src/mage/cards/c/CurseOfMisfortunes.java b/Mage.Sets/src/mage/cards/c/CurseOfMisfortunes.java index 4d128d2c0d..ea26695acd 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfMisfortunes.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfMisfortunes.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.effects.OneShotEffect; @@ -52,6 +51,8 @@ import mage.target.TargetPlayer; import mage.target.common.TargetCardInLibrary; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author BetaSteward @@ -107,7 +108,7 @@ class CurseOfMisfortunesEffect extends OneShotEffect { // get the names of attached Curses for (UUID attachmentId: targetPlayer.getAttachments()) { Permanent attachment = game.getPermanent(attachmentId); - if (attachment != null && attachment.getSubtype(game).contains("Curse")) { + if (attachment != null && attachment.hasSubtype(SubType.CURSE, game)) { filter.add(Predicates.not(new NamePredicate(attachment.getName()))); } } diff --git a/Mage.Sets/src/mage/cards/c/CurseOfTheCabal.java b/Mage.Sets/src/mage/cards/c/CurseOfTheCabal.java index dfc3f882ec..9b36bf77d9 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfTheCabal.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfTheCabal.java @@ -82,7 +82,7 @@ public class CurseOfTheCabal extends CardImpl { } } -class CurseOfTheCabalSacrificeEffect extends OneShotEffect{ +class CurseOfTheCabalSacrificeEffect extends OneShotEffect { private static final FilterControlledPermanent FILTER = new FilterControlledPermanent(); // ggf filter.FilterPermanent @@ -103,10 +103,11 @@ class CurseOfTheCabalSacrificeEffect extends OneShotEffect{ @Override public boolean apply(Game game, Ability source) { Player targetPlayer = game.getPlayer(source.getFirstTarget()); - if(targetPlayer != null) { + if (targetPlayer != null) { int amount = game.getBattlefield().countAll(FILTER, targetPlayer.getId(), game) / 2; - if(amount < 1) + if (amount < 1) { return true; + } Target target = new TargetControlledPermanent(amount, amount, FILTER, true); if (target.canChoose(targetPlayer.getId(), game)) { while (!target.isChosen() && target.canChoose(targetPlayer.getId(), game) && targetPlayer.canRespond()) { @@ -129,9 +130,9 @@ class CurseOfTheCabalTriggeredAbility extends ConditionalTriggeredAbility { public CurseOfTheCabalTriggeredAbility() { super(new BeginningOfUpkeepTriggeredAbility( - Zone.EXILED, new CurseOfTheCabalTriggeredAbilityConditionalDelay(), - TargetController.ANY, false, true - ), + Zone.EXILED, new CurseOfTheCabalTriggeredAbilityConditionalDelay(), + TargetController.ANY, false, true + ), SuspendedCondition.instance, "At the beginning of each player's upkeep, if {this} is suspended, that player may sacrifice a permanent. If he or she does, put two time counters on {this}." ); @@ -149,21 +150,22 @@ class CurseOfTheCabalTriggeredAbility extends ConditionalTriggeredAbility { } } -class CurseOfTheCabalTriggeredAbilityConditionalDelay extends AddCountersSourceEffect{ +class CurseOfTheCabalTriggeredAbilityConditionalDelay extends AddCountersSourceEffect { - public CurseOfTheCabalTriggeredAbilityConditionalDelay(){ + public CurseOfTheCabalTriggeredAbilityConditionalDelay() { super(CounterType.TIME.createInstance(), new StaticValue(2), false, true); } public boolean apply(Game game, Ability source) { - UUID id = game.getActivePlayerId(); - Player target = game.getPlayer(id); + UUID activePlayerId = game.getActivePlayerId(); + Player target = game.getPlayer(activePlayerId); Cost cost = new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledPermanent())); - if(target == null) + if (target == null) { return false; - if (cost.canPay(source, source.getSourceId(), id, game) + } + if (cost.canPay(source, source.getSourceId(), activePlayerId, game) && target.chooseUse(Outcome.Sacrifice, "Sacrifice a permanent to delay Curse of the Cabal?", source, game) - && cost.pay(source, game, source.getSourceId(), id, true, null)) { + && cost.pay(source, game, source.getSourceId(), activePlayerId, true, null)) { return super.apply(game, source); } return true; diff --git a/Mage.Sets/src/mage/cards/c/CurseOfThirst.java b/Mage.Sets/src/mage/cards/c/CurseOfThirst.java index 81f1c82467..99ee2c1c20 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfThirst.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfThirst.java @@ -136,7 +136,7 @@ class CursesAttachedCount implements DynamicValue { if (player != null) { for (UUID attachmentId: player.getAttachments()) { Permanent attachment = game.getPermanent(attachmentId); - if (attachment != null && attachment.getSubtype(game).contains("Curse")) + if (attachment != null && attachment.hasSubtype(SubType.CURSE, game)) count++; } } diff --git a/Mage.Sets/src/mage/cards/c/Cursecatcher.java b/Mage.Sets/src/mage/cards/c/Cursecatcher.java index f226c19415..36bf35432f 100644 --- a/Mage.Sets/src/mage/cards/c/Cursecatcher.java +++ b/Mage.Sets/src/mage/cards/c/Cursecatcher.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.CounterUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.TargetSpell; @@ -48,8 +49,8 @@ public class Cursecatcher extends CardImpl { public Cursecatcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CursedFlesh.java b/Mage.Sets/src/mage/cards/c/CursedFlesh.java index fc2f296bd3..45064f5c3b 100644 --- a/Mage.Sets/src/mage/cards/c/CursedFlesh.java +++ b/Mage.Sets/src/mage/cards/c/CursedFlesh.java @@ -49,7 +49,7 @@ public class CursedFlesh extends CardImpl { public CursedFlesh(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CursedLand.java b/Mage.Sets/src/mage/cards/c/CursedLand.java index 947175a62b..07d7cf351b 100644 --- a/Mage.Sets/src/mage/cards/c/CursedLand.java +++ b/Mage.Sets/src/mage/cards/c/CursedLand.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class CursedLand extends CardImpl { public CursedLand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CursedMinotaur.java b/Mage.Sets/src/mage/cards/c/CursedMinotaur.java index 1c8ef94494..a363957ba0 100644 --- a/Mage.Sets/src/mage/cards/c/CursedMinotaur.java +++ b/Mage.Sets/src/mage/cards/c/CursedMinotaur.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class CursedMinotaur extends CardImpl { public CursedMinotaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Minotaur"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.MINOTAUR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CursedMonstrosity.java b/Mage.Sets/src/mage/cards/c/CursedMonstrosity.java index 990392fca9..1402a5bd34 100644 --- a/Mage.Sets/src/mage/cards/c/CursedMonstrosity.java +++ b/Mage.Sets/src/mage/cards/c/CursedMonstrosity.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterLandCard; import mage.target.common.TargetCardInHand; @@ -47,7 +48,7 @@ public class CursedMonstrosity extends CardImpl { public CursedMonstrosity(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CursedRonin.java b/Mage.Sets/src/mage/cards/c/CursedRonin.java index db8d79a757..c2b49d9d25 100644 --- a/Mage.Sets/src/mage/cards/c/CursedRonin.java +++ b/Mage.Sets/src/mage/cards/c/CursedRonin.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.BushidoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class CursedRonin extends CardImpl { public CursedRonin (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CurtainOfLight.java b/Mage.Sets/src/mage/cards/c/CurtainOfLight.java index 6f7211f921..f7a762d49e 100644 --- a/Mage.Sets/src/mage/cards/c/CurtainOfLight.java +++ b/Mage.Sets/src/mage/cards/c/CurtainOfLight.java @@ -41,7 +41,7 @@ import mage.constants.TurnPhase; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.permanent.AttackingPredicate; -import mage.filter.predicate.permanent.BlockingPredicate; +import mage.filter.predicate.permanent.BlockedPredicate; import mage.game.Game; import mage.game.combat.CombatGroup; import mage.game.permanent.Permanent; @@ -58,11 +58,11 @@ public class CurtainOfLight extends CardImpl { static { filter.add(new AttackingPredicate()); - filter.add(Predicates.not(new BlockingPredicate())); + filter.add(Predicates.not(new BlockedPredicate())); } public CurtainOfLight(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}"); // Cast Curtain of Light only during combat after blockers are declared. this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(TurnPhase.COMBAT, AfterBlockersAreDeclaredCondition.instance)); diff --git a/Mage.Sets/src/mage/cards/c/CustodiLich.java b/Mage.Sets/src/mage/cards/c/CustodiLich.java index 3896ab0276..0d202720d8 100644 --- a/Mage.Sets/src/mage/cards/c/CustodiLich.java +++ b/Mage.Sets/src/mage/cards/c/CustodiLich.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.SacrificeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.game.Game; @@ -53,8 +54,8 @@ public class CustodiLich extends CardImpl { public CustodiLich(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CustodiSoulbinders.java b/Mage.Sets/src/mage/cards/c/CustodiSoulbinders.java index b2098d86d6..135fed1208 100644 --- a/Mage.Sets/src/mage/cards/c/CustodiSoulbinders.java +++ b/Mage.Sets/src/mage/cards/c/CustodiSoulbinders.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -59,8 +60,8 @@ public class CustodiSoulbinders extends CardImpl { public CustodiSoulbinders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/c/CustodiSquire.java b/Mage.Sets/src/mage/cards/c/CustodiSquire.java index ef9e3e6252..2a821426a2 100644 --- a/Mage.Sets/src/mage/cards/c/CustodiSquire.java +++ b/Mage.Sets/src/mage/cards/c/CustodiSquire.java @@ -34,6 +34,7 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -55,8 +56,8 @@ public class CustodiSquire extends CardImpl { public CustodiSquire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Spirit"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CustodianOfTheTrove.java b/Mage.Sets/src/mage/cards/c/CustodianOfTheTrove.java index 2a06c3acd0..9a4be99ec8 100644 --- a/Mage.Sets/src/mage/cards/c/CustodianOfTheTrove.java +++ b/Mage.Sets/src/mage/cards/c/CustodianOfTheTrove.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class CustodianOfTheTrove extends CardImpl { public CustodianOfTheTrove(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CustodyBattle.java b/Mage.Sets/src/mage/cards/c/CustodyBattle.java index 3e18d3775d..cff9c850a9 100644 --- a/Mage.Sets/src/mage/cards/c/CustodyBattle.java +++ b/Mage.Sets/src/mage/cards/c/CustodyBattle.java @@ -46,6 +46,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.SubLayer; @@ -72,7 +73,7 @@ public class CustodyBattle extends CardImpl { public CustodyBattle(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CustomsDepot.java b/Mage.Sets/src/mage/cards/c/CustomsDepot.java new file mode 100644 index 0000000000..ce866cd1fc --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CustomsDepot.java @@ -0,0 +1,67 @@ +/* + * 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.cards.c; + +import java.util.UUID; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.DrawDiscardControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.StaticFilters; + +/** + * + * @author TheElk801 + */ +public class CustomsDepot extends CardImpl { + + public CustomsDepot(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + + // Whenever you cast a creature spell, you may pay {1}. If you do, draw a card, then discard a card. + this.addAbility(new SpellCastControllerTriggeredAbility( + new DoIfCostPaid( + new DrawDiscardControllerEffect(), + new GenericManaCost(1) + ), + StaticFilters.FILTER_SPELL_A_CREATURE, false + )); + } + + public CustomsDepot(final CustomsDepot card) { + super(card); + } + + @Override + public CustomsDepot copy() { + return new CustomsDepot(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CutthroatIlDal.java b/Mage.Sets/src/mage/cards/c/CutthroatIlDal.java index e934700160..d707cf1669 100644 --- a/Mage.Sets/src/mage/cards/c/CutthroatIlDal.java +++ b/Mage.Sets/src/mage/cards/c/CutthroatIlDal.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class CutthroatIlDal extends CardImpl { public CutthroatIlDal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CycloneSire.java b/Mage.Sets/src/mage/cards/c/CycloneSire.java index 3c45fcbf27..8dc818dabf 100644 --- a/Mage.Sets/src/mage/cards/c/CycloneSire.java +++ b/Mage.Sets/src/mage/cards/c/CycloneSire.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.counters.CounterType; import mage.filter.common.FilterControlledLandPermanent; @@ -52,7 +53,7 @@ public class CycloneSire extends CardImpl { public CycloneSire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CyclonicRift.java b/Mage.Sets/src/mage/cards/c/CyclonicRift.java index b9c1262408..826f7606dc 100644 --- a/Mage.Sets/src/mage/cards/c/CyclonicRift.java +++ b/Mage.Sets/src/mage/cards/c/CyclonicRift.java @@ -28,21 +28,17 @@ package mage.cards.c; import java.util.UUID; -import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.keyword.OverloadAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.TargetController; -import mage.constants.Zone; import mage.filter.common.FilterNonlandPermanent; import mage.filter.predicate.permanent.ControllerPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; import mage.target.common.TargetNonlandPermanent; /** @@ -58,14 +54,16 @@ public class CyclonicRift extends CardImpl { } public CyclonicRift(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); // Return target nonland permanent you don't control to its owner's hand. this.getSpellAbility().addTarget(new TargetNonlandPermanent(filter)); this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); // Overload {6}{U} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") - this.addAbility(new OverloadAbility(this, new CyclonicRiftEffect(), new ManaCostsImpl("{6}{U}"))); + Effect effect = new ReturnToHandFromBattlefieldAllEffect(filter); + effect.setText("Return each nonland permanent you don't control to its owner's hand"); + this.addAbility(new OverloadAbility(this, effect, new ManaCostsImpl("{6}{U}"))); } public CyclonicRift(final CyclonicRift card) { @@ -77,33 +75,3 @@ public class CyclonicRift extends CardImpl { return new CyclonicRift(this); } } - -class CyclonicRiftEffect extends OneShotEffect { - - private static final FilterNonlandPermanent filter = new FilterNonlandPermanent(); - - public CyclonicRiftEffect() { - super(Outcome.ReturnToHand); - staticText = "Return each nonland permanent you don't control to its owner's hand"; - } - - public CyclonicRiftEffect(final CyclonicRiftEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - for (Permanent creature : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { - if (!creature.getControllerId().equals(source.getControllerId())) { - creature.moveToZone(Zone.HAND, source.getSourceId(), game, true); - } - - } - return true; - } - - @Override - public CyclonicRiftEffect copy() { - return new CyclonicRiftEffect(this); - } -} diff --git a/Mage.Sets/src/mage/cards/c/CyclopeanMummy.java b/Mage.Sets/src/mage/cards/c/CyclopeanMummy.java index ee7db7206c..d945e06ccc 100644 --- a/Mage.Sets/src/mage/cards/c/CyclopeanMummy.java +++ b/Mage.Sets/src/mage/cards/c/CyclopeanMummy.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ExileSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class CyclopeanMummy extends CardImpl { public CyclopeanMummy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CyclopsGladiator.java b/Mage.Sets/src/mage/cards/c/CyclopsGladiator.java index 3ad114668d..93dcf09303 100644 --- a/Mage.Sets/src/mage/cards/c/CyclopsGladiator.java +++ b/Mage.Sets/src/mage/cards/c/CyclopsGladiator.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; @@ -52,8 +53,8 @@ public class CyclopsGladiator extends CardImpl { public CyclopsGladiator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}{R}"); - this.subtype.add("Cyclops"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CYCLOPS); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CyclopsOfEternalFury.java b/Mage.Sets/src/mage/cards/c/CyclopsOfEternalFury.java index 0711bd4230..9f7218d1af 100644 --- a/Mage.Sets/src/mage/cards/c/CyclopsOfEternalFury.java +++ b/Mage.Sets/src/mage/cards/c/CyclopsOfEternalFury.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -48,7 +49,7 @@ public class CyclopsOfEternalFury extends CardImpl { public CyclopsOfEternalFury(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Cyclops"); + this.subtype.add(SubType.CYCLOPS); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CyclopsOfOneEyedPass.java b/Mage.Sets/src/mage/cards/c/CyclopsOfOneEyedPass.java index 036a30e0a1..4759f2b9e6 100644 --- a/Mage.Sets/src/mage/cards/c/CyclopsOfOneEyedPass.java +++ b/Mage.Sets/src/mage/cards/c/CyclopsOfOneEyedPass.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class CyclopsOfOneEyedPass extends CardImpl { public CyclopsOfOneEyedPass(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Cyclops"); + this.subtype.add(SubType.CYCLOPS); this.power = new MageInt(5); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CyclopsTyrant.java b/Mage.Sets/src/mage/cards/c/CyclopsTyrant.java index bf075a3db5..2db10574e0 100644 --- a/Mage.Sets/src/mage/cards/c/CyclopsTyrant.java +++ b/Mage.Sets/src/mage/cards/c/CyclopsTyrant.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.IntimidateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -53,7 +54,7 @@ public class CyclopsTyrant extends CardImpl { public CyclopsTyrant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Cyclops"); + this.subtype.add(SubType.CYCLOPS); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/c/CylianElf.java b/Mage.Sets/src/mage/cards/c/CylianElf.java index f08772d553..01323f2c96 100644 --- a/Mage.Sets/src/mage/cards/c/CylianElf.java +++ b/Mage.Sets/src/mage/cards/c/CylianElf.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class CylianElf extends CardImpl { public CylianElf (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/CylianSunsinger.java b/Mage.Sets/src/mage/cards/c/CylianSunsinger.java index efe994b2a1..8276e3bdb6 100644 --- a/Mage.Sets/src/mage/cards/c/CylianSunsinger.java +++ b/Mage.Sets/src/mage/cards/c/CylianSunsinger.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -54,8 +55,8 @@ public class CylianSunsinger extends CardImpl { public CylianSunsinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/c/Cystbearer.java b/Mage.Sets/src/mage/cards/c/Cystbearer.java index b83a902f38..22f9999887 100644 --- a/Mage.Sets/src/mage/cards/c/Cystbearer.java +++ b/Mage.Sets/src/mage/cards/c/Cystbearer.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * Cystbearer @@ -44,7 +45,7 @@ public class Cystbearer extends CardImpl { public Cystbearer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/c/CytoplastManipulator.java b/Mage.Sets/src/mage/cards/c/CytoplastManipulator.java index 79d043ea41..469b6d334b 100644 --- a/Mage.Sets/src/mage/cards/c/CytoplastManipulator.java +++ b/Mage.Sets/src/mage/cards/c/CytoplastManipulator.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.GraftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -60,9 +61,9 @@ public class CytoplastManipulator extends CardImpl { public CytoplastManipulator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/c/CytoplastRootKin.java b/Mage.Sets/src/mage/cards/c/CytoplastRootKin.java index f441496207..805d7991b1 100644 --- a/Mage.Sets/src/mage/cards/c/CytoplastRootKin.java +++ b/Mage.Sets/src/mage/cards/c/CytoplastRootKin.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.GraftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -63,8 +64,8 @@ public class CytoplastRootKin extends CardImpl { public CytoplastRootKin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Elemental"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/c/CytospawnShambler.java b/Mage.Sets/src/mage/cards/c/CytospawnShambler.java index 2713234485..820ff1953f 100644 --- a/Mage.Sets/src/mage/cards/c/CytospawnShambler.java +++ b/Mage.Sets/src/mage/cards/c/CytospawnShambler.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -58,8 +59,8 @@ public class CytospawnShambler extends CardImpl { public CytospawnShambler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}"); - this.subtype.add("Elemental"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/d/DAvenantArcher.java b/Mage.Sets/src/mage/cards/d/DAvenantArcher.java index 0642070c76..a78f57c0de 100644 --- a/Mage.Sets/src/mage/cards/d/DAvenantArcher.java +++ b/Mage.Sets/src/mage/cards/d/DAvenantArcher.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetAttackingOrBlockingCreature; @@ -47,9 +48,9 @@ public class DAvenantArcher extends CardImpl { public DAvenantArcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DAvenantHealer.java b/Mage.Sets/src/mage/cards/d/DAvenantHealer.java index 9647b3090b..a2bbfde3ac 100644 --- a/Mage.Sets/src/mage/cards/d/DAvenantHealer.java +++ b/Mage.Sets/src/mage/cards/d/DAvenantHealer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetAttackingOrBlockingCreature; @@ -50,9 +51,9 @@ public class DAvenantHealer extends CardImpl { public DAvenantHealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DackFayden.java b/Mage.Sets/src/mage/cards/d/DackFayden.java index ca975a99ea..08760be900 100644 --- a/Mage.Sets/src/mage/cards/d/DackFayden.java +++ b/Mage.Sets/src/mage/cards/d/DackFayden.java @@ -51,7 +51,7 @@ public class DackFayden extends CardImpl { public DackFayden(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{1}{U}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dack"); + this.subtype.add(SubType.DACK); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/d/DacksDuplicate.java b/Mage.Sets/src/mage/cards/d/DacksDuplicate.java index 947e29caa6..07f784dc60 100644 --- a/Mage.Sets/src/mage/cards/d/DacksDuplicate.java +++ b/Mage.Sets/src/mage/cards/d/DacksDuplicate.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; @@ -52,7 +53,7 @@ public class DacksDuplicate extends CardImpl { public DacksDuplicate(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{R}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/d/DaggerOfTheWorthy.java b/Mage.Sets/src/mage/cards/d/DaggerOfTheWorthy.java index d076bdde99..7214f3c103 100644 --- a/Mage.Sets/src/mage/cards/d/DaggerOfTheWorthy.java +++ b/Mage.Sets/src/mage/cards/d/DaggerOfTheWorthy.java @@ -1,74 +1,75 @@ - /* - * 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.cards.d; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.common.continuous.BoostEquippedEffect; -import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; -import mage.abilities.keyword.AfflictAbility; -import mage.abilities.keyword.EquipAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; - -/** - * - * @author ciaccona007 - */ -public class DaggerOfTheWorthy extends CardImpl { - - public DaggerOfTheWorthy(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); - - this.subtype.add("Equipment"); - - // Equipped creature gets +2/+0 and has afflict 1. (Whenever it becomes blocked, defending player loses 1 life.) - Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2,0)); - ability.addEffect(new GainAbilityAttachedEffect(new AfflictAbility(1), AttachmentType.EQUIPMENT)); - addAbility(ability); - - // Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery.) - this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); - - } - - public DaggerOfTheWorthy(final DaggerOfTheWorthy card) { - super(card); - } - - @Override - public DaggerOfTheWorthy copy() { - return new DaggerOfTheWorthy(this); - } -} + /* + * 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.cards.d; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.AfflictAbility; +import mage.abilities.keyword.EquipAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; + +/** + * + * @author ciaccona007 + */ +public class DaggerOfTheWorthy extends CardImpl { + + public DaggerOfTheWorthy(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + this.subtype.add(SubType.EQUIPMENT); + + // Equipped creature gets +2/+0 and has afflict 1. (Whenever it becomes blocked, defending player loses 1 life.) + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2,0)); + ability.addEffect(new GainAbilityAttachedEffect(new AfflictAbility(1), AttachmentType.EQUIPMENT)); + addAbility(ability); + + // Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery.) + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); + + } + + public DaggerOfTheWorthy(final DaggerOfTheWorthy card) { + super(card); + } + + @Override + public DaggerOfTheWorthy copy() { + return new DaggerOfTheWorthy(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DaggerbackBasilisk.java b/Mage.Sets/src/mage/cards/d/DaggerbackBasilisk.java index 4cb8918132..2eaf485402 100644 --- a/Mage.Sets/src/mage/cards/d/DaggerbackBasilisk.java +++ b/Mage.Sets/src/mage/cards/d/DaggerbackBasilisk.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class DaggerbackBasilisk extends CardImpl { public DaggerbackBasilisk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Basilisk"); + this.subtype.add(SubType.BASILISK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DaggerclawImp.java b/Mage.Sets/src/mage/cards/d/DaggerclawImp.java index ebe397ac1b..d0368d138e 100644 --- a/Mage.Sets/src/mage/cards/d/DaggerclawImp.java +++ b/Mage.Sets/src/mage/cards/d/DaggerclawImp.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class DaggerclawImp extends CardImpl { public DaggerclawImp (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DaggerdromeImp.java b/Mage.Sets/src/mage/cards/d/DaggerdromeImp.java index 4f80418a79..1d4f2ce397 100644 --- a/Mage.Sets/src/mage/cards/d/DaggerdromeImp.java +++ b/Mage.Sets/src/mage/cards/d/DaggerdromeImp.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class DaggerdromeImp extends CardImpl { public DaggerdromeImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DaghatarTheAdamant.java b/Mage.Sets/src/mage/cards/d/DaghatarTheAdamant.java index c8e83d26b7..b3a102289a 100644 --- a/Mage.Sets/src/mage/cards/d/DaghatarTheAdamant.java +++ b/Mage.Sets/src/mage/cards/d/DaghatarTheAdamant.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -59,8 +60,8 @@ public class DaghatarTheAdamant extends CardImpl { public DaghatarTheAdamant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/d/DagobahMawSlug.java b/Mage.Sets/src/mage/cards/d/DagobahMawSlug.java index a552c70d34..d52589b1fe 100644 --- a/Mage.Sets/src/mage/cards/d/DagobahMawSlug.java +++ b/Mage.Sets/src/mage/cards/d/DagobahMawSlug.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,7 +49,7 @@ public class DagobahMawSlug extends CardImpl { public DagobahMawSlug(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{G}{W}"); - this.subtype.add("Slug"); + this.subtype.add(SubType.SLUG); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DailyRegimen.java b/Mage.Sets/src/mage/cards/d/DailyRegimen.java index bfad958efc..fd7553fe43 100644 --- a/Mage.Sets/src/mage/cards/d/DailyRegimen.java +++ b/Mage.Sets/src/mage/cards/d/DailyRegimen.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -51,7 +52,7 @@ public class DailyRegimen extends CardImpl { public DailyRegimen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/d/DakkonBlackblade.java b/Mage.Sets/src/mage/cards/d/DakkonBlackblade.java index b273f938c0..768c361794 100644 --- a/Mage.Sets/src/mage/cards/d/DakkonBlackblade.java +++ b/Mage.Sets/src/mage/cards/d/DakkonBlackblade.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -53,8 +54,8 @@ public class DakkonBlackblade extends CardImpl { public DakkonBlackblade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{U}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/d/DakmorBat.java b/Mage.Sets/src/mage/cards/d/DakmorBat.java index ffd9e34e41..87b85d05df 100644 --- a/Mage.Sets/src/mage/cards/d/DakmorBat.java +++ b/Mage.Sets/src/mage/cards/d/DakmorBat.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class DakmorBat extends CardImpl { public DakmorBat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Bat"); + this.subtype.add(SubType.BAT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DakmorGhoul.java b/Mage.Sets/src/mage/cards/d/DakmorGhoul.java index 63eee52d80..0a741d6b23 100644 --- a/Mage.Sets/src/mage/cards/d/DakmorGhoul.java +++ b/Mage.Sets/src/mage/cards/d/DakmorGhoul.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetOpponent; /** @@ -47,7 +48,7 @@ public class DakmorGhoul extends CardImpl { public DakmorGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DakmorLancer.java b/Mage.Sets/src/mage/cards/d/DakmorLancer.java index 4a48ebf48d..b6a0455b88 100644 --- a/Mage.Sets/src/mage/cards/d/DakmorLancer.java +++ b/Mage.Sets/src/mage/cards/d/DakmorLancer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,8 +58,8 @@ public class DakmorLancer extends CardImpl { public DakmorLancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DakmorScorpion.java b/Mage.Sets/src/mage/cards/d/DakmorScorpion.java index c10357bf96..a536967fb5 100644 --- a/Mage.Sets/src/mage/cards/d/DakmorScorpion.java +++ b/Mage.Sets/src/mage/cards/d/DakmorScorpion.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class DakmorScorpion extends CardImpl { public DakmorScorpion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Scorpion"); + this.subtype.add(SubType.SCORPION); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DakmorSorceress.java b/Mage.Sets/src/mage/cards/d/DakmorSorceress.java index e534c6473e..d66eec76ce 100644 --- a/Mage.Sets/src/mage/cards/d/DakmorSorceress.java +++ b/Mage.Sets/src/mage/cards/d/DakmorSorceress.java @@ -55,8 +55,8 @@ public class DakmorSorceress extends CardImpl { public DakmorSorceress(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DakraMystic.java b/Mage.Sets/src/mage/cards/d/DakraMystic.java index ace9563f95..3c9b890b5c 100644 --- a/Mage.Sets/src/mage/cards/d/DakraMystic.java +++ b/Mage.Sets/src/mage/cards/d/DakraMystic.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -51,9 +52,9 @@ import mage.players.Player; public class DakraMystic extends CardImpl { public DakraMystic(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -62,8 +63,7 @@ public class DakraMystic extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DakraMysticEffect(), new ManaCostsImpl("{U}")); ability.addCost(new TapSourceCost()); this.addAbility(ability); - - + } public DakraMystic(final DakraMystic card) { @@ -77,38 +77,38 @@ public class DakraMystic extends CardImpl { } class DakraMysticEffect extends OneShotEffect { - + public DakraMysticEffect() { super(Outcome.Detriment); - this.staticText = "Each player reveals the top card of his or her library. You may put the revealed cards into their owners graveyard. If you don't, each player draws a card"; + this.staticText = "Each player reveals the top card of his or her library. You may put the revealed cards into their owners' graveyard. If you don't, each player draws a card"; } - + public DakraMysticEffect(final DakraMysticEffect effect) { super(effect); } - + @Override public DakraMysticEffect copy() { return new DakraMysticEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - for(UUID playerId: game.getState().getPlayersInRange(controller.getId(), game)) { + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null && player.getLibrary().hasCards()) { player.revealCards(player.getLogName(), new CardsImpl(player.getLibrary().getFromTop(game)), game); } } if (controller.chooseUse(outcome, "Put revealed cards into graveyard?", source, game)) { - for(UUID playerId: game.getState().getPlayersInRange(controller.getId(), game)) { - Player player = game.getPlayer(playerId); + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player player = game.getPlayer(playerId); if (player != null && player.getLibrary().hasCards()) { player.moveCards(player.getLibrary().getFromTop(game), Zone.GRAVEYARD, source, game); } - } + } } else { new DrawCardAllEffect(1).apply(game, source); } diff --git a/Mage.Sets/src/mage/cards/d/DamiaSageOfStone.java b/Mage.Sets/src/mage/cards/d/DamiaSageOfStone.java index f99cb645d6..a9b29a2bc8 100644 --- a/Mage.Sets/src/mage/cards/d/DamiaSageOfStone.java +++ b/Mage.Sets/src/mage/cards/d/DamiaSageOfStone.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class DamiaSageOfStone extends CardImpl { public DamiaSageOfStone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Gorgon"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.GORGON); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DampenThought.java b/Mage.Sets/src/mage/cards/d/DampenThought.java index d37346e0a5..87e3f47387 100644 --- a/Mage.Sets/src/mage/cards/d/DampenThought.java +++ b/Mage.Sets/src/mage/cards/d/DampenThought.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SpliceOntoArcaneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -43,7 +44,7 @@ public class DampenThought extends CardImpl { public DampenThought(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Target player puts the top four cards of his or her library into his or her graveyard. diff --git a/Mage.Sets/src/mage/cards/d/DanceOfMany.java b/Mage.Sets/src/mage/cards/d/DanceOfMany.java index 62f2f7ea4f..773f801ac3 100644 --- a/Mage.Sets/src/mage/cards/d/DanceOfMany.java +++ b/Mage.Sets/src/mage/cards/d/DanceOfMany.java @@ -38,7 +38,7 @@ import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.InfoEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.abilities.effects.common.SacrificeTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; @@ -114,7 +114,7 @@ class DanceOfManyCreateTokenCopyEffect extends OneShotEffect { Permanent sourceObject = game.getPermanent(source.getSourceId()); if (permanent != null && sourceObject != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(); effect.setTargetPointer(new FixedTarget(permanent, game)); effect.apply(game, source); game.getState().setValue(source.getSourceId() + "_token", effect.getAddedPermanent()); diff --git a/Mage.Sets/src/mage/cards/d/DanceOfTheDead.java b/Mage.Sets/src/mage/cards/d/DanceOfTheDead.java index dd17e1c269..7e78146a90 100644 --- a/Mage.Sets/src/mage/cards/d/DanceOfTheDead.java +++ b/Mage.Sets/src/mage/cards/d/DanceOfTheDead.java @@ -69,7 +69,7 @@ public class DanceOfTheDead extends CardImpl { public DanceOfTheDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature card in a graveyard TargetCardInGraveyard auraTarget = new TargetCardInGraveyard(new FilterCreatureCard("creature card in a graveyard")); @@ -179,7 +179,7 @@ class DanceOfTheDeadLeavesBattlefieldTriggeredEffect extends OneShotEffect { if (controller != null && sourcePermanent != null) { if (sourcePermanent.getAttachedTo() != null) { Permanent attachedTo = game.getPermanent(sourcePermanent.getAttachedTo()); - if (attachedTo != null) { + if (attachedTo != null && attachedTo.getZoneChangeCounter(game) == sourcePermanent.getAttachedToZoneChangeCounter()) { attachedTo.sacrifice(source.getSourceId(), game); } } diff --git a/Mage.Sets/src/mage/cards/d/DanceOfTheSkywise.java b/Mage.Sets/src/mage/cards/d/DanceOfTheSkywise.java index 3e8e062a02..cdb619773f 100644 --- a/Mage.Sets/src/mage/cards/d/DanceOfTheSkywise.java +++ b/Mage.Sets/src/mage/cards/d/DanceOfTheSkywise.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.game.permanent.token.Token; import mage.target.common.TargetControlledCreaturePermanent; @@ -70,8 +71,8 @@ public class DanceOfTheSkywise extends CardImpl { super("Dragon", "blue Dragon Illusion with base power and toughness 4/4 and with flying"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Dragon"); - subtype.add("Illusion"); + subtype.add(SubType.DRAGON); + subtype.add(SubType.ILLUSION); power = new MageInt(4); toughness = new MageInt(4); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/d/DancingScimitar.java b/Mage.Sets/src/mage/cards/d/DancingScimitar.java index fc3de1a954..ee9a389b89 100644 --- a/Mage.Sets/src/mage/cards/d/DancingScimitar.java +++ b/Mage.Sets/src/mage/cards/d/DancingScimitar.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class DancingScimitar extends CardImpl { public DancingScimitar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/Dandan.java b/Mage.Sets/src/mage/cards/d/Dandan.java index 06626be85b..fc1f4f29b5 100644 --- a/Mage.Sets/src/mage/cards/d/Dandan.java +++ b/Mage.Sets/src/mage/cards/d/Dandan.java @@ -48,7 +48,7 @@ public class Dandan extends CardImpl { public Dandan(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{U}"); - this.subtype.add("Fish"); + this.subtype.add(SubType.FISH); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DarajaGriffin.java b/Mage.Sets/src/mage/cards/d/DarajaGriffin.java index 55fb01f017..10a21077de 100644 --- a/Mage.Sets/src/mage/cards/d/DarajaGriffin.java +++ b/Mage.Sets/src/mage/cards/d/DarajaGriffin.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,7 +58,7 @@ public class DarajaGriffin extends CardImpl { public DarajaGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/Darba.java b/Mage.Sets/src/mage/cards/d/Darba.java index ecc9c9d120..f380a60b7d 100644 --- a/Mage.Sets/src/mage/cards/d/Darba.java +++ b/Mage.Sets/src/mage/cards/d/Darba.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -45,8 +46,8 @@ public class Darba extends CardImpl { public Darba(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Bird"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DarettiIngeniousIconoclast.java b/Mage.Sets/src/mage/cards/d/DarettiIngeniousIconoclast.java index 839b49512d..4b8544d7e6 100644 --- a/Mage.Sets/src/mage/cards/d/DarettiIngeniousIconoclast.java +++ b/Mage.Sets/src/mage/cards/d/DarettiIngeniousIconoclast.java @@ -36,10 +36,11 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DoIfCostPaid; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.filter.FilterPermanent; @@ -70,7 +71,7 @@ public class DarettiIngeniousIconoclast extends CardImpl { public DarettiIngeniousIconoclast(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{1}{B}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Daretti"); + this.subtype.add(SubType.DARETTI); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); @@ -87,7 +88,7 @@ public class DarettiIngeniousIconoclast extends CardImpl { // -6: Choose target artifact card in a graveyard or artifact on the battlefield. Create three tokens that are copies of it. ability = new LoyaltyAbility( - new PutTokenOntoBattlefieldCopyTargetEffect(null, null, false, 3), + new CreateTokenCopyTargetEffect(null, null, false, 3), -6); ability.addTarget(new TargetCardInGraveyardOrBattlefield(new FilterArtifactCard("artifact card in a graveyard or artifact on the battlefield"))); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/d/DarettiScrapSavant.java b/Mage.Sets/src/mage/cards/d/DarettiScrapSavant.java index f85d4f4fe6..ce376ce686 100644 --- a/Mage.Sets/src/mage/cards/d/DarettiScrapSavant.java +++ b/Mage.Sets/src/mage/cards/d/DarettiScrapSavant.java @@ -41,6 +41,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.TargetController; @@ -67,7 +68,7 @@ public class DarettiScrapSavant extends CardImpl { public DarettiScrapSavant(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Daretti"); + this.subtype.add(SubType.DARETTI); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/d/DarienKingOfKjeldor.java b/Mage.Sets/src/mage/cards/d/DarienKingOfKjeldor.java index b7fc6b6e90..3581920ec0 100644 --- a/Mage.Sets/src/mage/cards/d/DarienKingOfKjeldor.java +++ b/Mage.Sets/src/mage/cards/d/DarienKingOfKjeldor.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -52,10 +53,10 @@ import mage.players.Player; public class DarienKingOfKjeldor extends CardImpl { public DarienKingOfKjeldor(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -73,6 +74,7 @@ public class DarienKingOfKjeldor extends CardImpl { return new DarienKingOfKjeldor(this); } } + class DarienKingOfKjeldorTriggeredAbility extends TriggeredAbilityImpl { public DarienKingOfKjeldorTriggeredAbility() { @@ -104,7 +106,7 @@ class DarienKingOfKjeldorTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever you are dealt damage, you may create that many 1/1 white Soldier creature tokens."; + return "Whenever you're dealt damage, you may create that many 1/1 white Soldier creature tokens."; } } @@ -132,4 +134,4 @@ class DarienKingOfKjeldorEffect extends OneShotEffect { } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/d/DarigaazTheIgniter.java b/Mage.Sets/src/mage/cards/d/DarigaazTheIgniter.java index 98969cbc8c..567f0177e4 100644 --- a/Mage.Sets/src/mage/cards/d/DarigaazTheIgniter.java +++ b/Mage.Sets/src/mage/cards/d/DarigaazTheIgniter.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.choices.ChoiceColor; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.filter.FilterCard; @@ -55,7 +56,7 @@ public class DarigaazTheIgniter extends CardImpl { public DarigaazTheIgniter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/DarigaazsAttendant.java b/Mage.Sets/src/mage/cards/d/DarigaazsAttendant.java index a0b07f2c42..c591ce8553 100644 --- a/Mage.Sets/src/mage/cards/d/DarigaazsAttendant.java +++ b/Mage.Sets/src/mage/cards/d/DarigaazsAttendant.java @@ -37,6 +37,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class DarigaazsAttendant extends CardImpl { public DarigaazsAttendant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DaringApprentice.java b/Mage.Sets/src/mage/cards/d/DaringApprentice.java index 656c219c35..2c68cb5cc9 100644 --- a/Mage.Sets/src/mage/cards/d/DaringApprentice.java +++ b/Mage.Sets/src/mage/cards/d/DaringApprentice.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetSpell; @@ -48,8 +49,8 @@ public class DaringApprentice extends CardImpl { public DaringApprentice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DaringSaboteur.java b/Mage.Sets/src/mage/cards/d/DaringSaboteur.java new file mode 100644 index 0000000000..9c34129962 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DaringSaboteur.java @@ -0,0 +1,76 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawDiscardControllerEffect; +import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class DaringSaboteur extends CardImpl { + + public DaringSaboteur(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // {2}{U}: Daring Saboteur can't be blocked this turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedSourceEffect(Duration.EndOfTurn), new ManaCostsImpl("{2}{U}"))); + + // Whenever Daring Saboteur deals combat damage to a player, you may draw a card. If you do, discard a card. + Effect effect = new DrawDiscardControllerEffect(1, 1); + effect.setText("you may draw a card. If you do, discard a card"); + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(effect, true)); + } + + public DaringSaboteur(final DaringSaboteur card) { + super(card); + } + + @Override + public DaringSaboteur copy() { + return new DaringSaboteur(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DaringSkyjek.java b/Mage.Sets/src/mage/cards/d/DaringSkyjek.java index ce03c93cf0..c0ea33efaa 100644 --- a/Mage.Sets/src/mage/cards/d/DaringSkyjek.java +++ b/Mage.Sets/src/mage/cards/d/DaringSkyjek.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class DaringSkyjek extends CardImpl { public DaringSkyjek(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DaringSleuth.java b/Mage.Sets/src/mage/cards/d/DaringSleuth.java index ebbddbec58..de3b79f7d2 100644 --- a/Mage.Sets/src/mage/cards/d/DaringSleuth.java +++ b/Mage.Sets/src/mage/cards/d/DaringSleuth.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.common.TransformSourceEffect; @@ -36,11 +35,14 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.b.BearerOfOverwhelmingTruths; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; +import java.util.UUID; + /** * * @author fireshoes @@ -49,8 +51,8 @@ public class DaringSleuth extends CardImpl { public DaringSleuth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); @@ -95,7 +97,7 @@ class DaringSleuthTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { return event.getPlayerId().equals(this.getControllerId()) - && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).getSubtype(game).contains("Clue"); + && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).hasSubtype(SubType.CLUE, game); } @Override diff --git a/Mage.Sets/src/mage/cards/d/DaringThief.java b/Mage.Sets/src/mage/cards/d/DaringThief.java index f25cd2046a..126138f063 100644 --- a/Mage.Sets/src/mage/cards/d/DaringThief.java +++ b/Mage.Sets/src/mage/cards/d/DaringThief.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.InspiredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -59,8 +60,8 @@ public class DaringThief extends CardImpl { public DaringThief(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DarkConfidant.java b/Mage.Sets/src/mage/cards/d/DarkConfidant.java index b89e457781..bca6a50257 100644 --- a/Mage.Sets/src/mage/cards/d/DarkConfidant.java +++ b/Mage.Sets/src/mage/cards/d/DarkConfidant.java @@ -34,6 +34,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class DarkConfidant extends CardImpl { public DarkConfidant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DarkFavor.java b/Mage.Sets/src/mage/cards/d/DarkFavor.java index d99fcb121f..bd70948b4a 100644 --- a/Mage.Sets/src/mage/cards/d/DarkFavor.java +++ b/Mage.Sets/src/mage/cards/d/DarkFavor.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class DarkFavor extends CardImpl { public DarkFavor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/cards/d/DarkHatchling.java b/Mage.Sets/src/mage/cards/d/DarkHatchling.java index 2d6c100765..7951a950ff 100644 --- a/Mage.Sets/src/mage/cards/d/DarkHatchling.java +++ b/Mage.Sets/src/mage/cards/d/DarkHatchling.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -56,7 +57,7 @@ public class DarkHatchling extends CardImpl { public DarkHatchling (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DarkImpostor.java b/Mage.Sets/src/mage/cards/d/DarkImpostor.java index 59aab2b858..ebd1853c01 100644 --- a/Mage.Sets/src/mage/cards/d/DarkImpostor.java +++ b/Mage.Sets/src/mage/cards/d/DarkImpostor.java @@ -56,8 +56,8 @@ public class DarkImpostor extends CardImpl { public DarkImpostor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DarkMaze.java b/Mage.Sets/src/mage/cards/d/DarkMaze.java index 8b85584513..7d70b7eac8 100644 --- a/Mage.Sets/src/mage/cards/d/DarkMaze.java +++ b/Mage.Sets/src/mage/cards/d/DarkMaze.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class DarkMaze extends CardImpl { public DarkMaze(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DarkNourishment.java b/Mage.Sets/src/mage/cards/d/DarkNourishment.java new file mode 100644 index 0000000000..4ade700f3c --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DarkNourishment.java @@ -0,0 +1,61 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author TheElk801 + */ +public class DarkNourishment extends CardImpl { + + public DarkNourishment(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{B}"); + + // Dark Nourishment deals 3 damage to target creature or player. You gain 3 life. + this.getSpellAbility().addEffect(new DamageTargetEffect(3)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addEffect(new GainLifeEffect(3)); + } + + public DarkNourishment(final DarkNourishment card) { + super(card); + } + + @Override + public DarkNourishment copy() { + return new DarkNourishment(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DarkPrivilege.java b/Mage.Sets/src/mage/cards/d/DarkPrivilege.java index 52cfbfb973..94a979fee1 100644 --- a/Mage.Sets/src/mage/cards/d/DarkPrivilege.java +++ b/Mage.Sets/src/mage/cards/d/DarkPrivilege.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -57,7 +58,7 @@ public class DarkPrivilege extends CardImpl { public DarkPrivilege(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/d/DarkRevenant.java b/Mage.Sets/src/mage/cards/d/DarkRevenant.java index cef47ae30f..e0120e02b6 100644 --- a/Mage.Sets/src/mage/cards/d/DarkRevenant.java +++ b/Mage.Sets/src/mage/cards/d/DarkRevenant.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -50,7 +51,7 @@ public class DarkRevenant extends CardImpl { public DarkRevenant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DarkSupplicant.java b/Mage.Sets/src/mage/cards/d/DarkSupplicant.java index 790c3cb3cf..34d342b90d 100644 --- a/Mage.Sets/src/mage/cards/d/DarkSupplicant.java +++ b/Mage.Sets/src/mage/cards/d/DarkSupplicant.java @@ -66,8 +66,8 @@ public class DarkSupplicant extends CardImpl { public DarkSupplicant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DarkTriumph.java b/Mage.Sets/src/mage/cards/d/DarkTriumph.java index f12199f472..35f8785adc 100644 --- a/Mage.Sets/src/mage/cards/d/DarkTriumph.java +++ b/Mage.Sets/src/mage/cards/d/DarkTriumph.java @@ -37,7 +37,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; -import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetControlledCreaturePermanent; @@ -59,8 +58,9 @@ public class DarkTriumph extends CardImpl { // If you control a Swamp, you may sacrifice a creature rather than pay Dark Triumph's mana cost. this.addAbility(new AlternativeCostSourceAbility( - new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature"), false)), - new PermanentsOnTheBattlefieldCondition(filterSwamp), null)); + new SacrificeTargetCost(new TargetControlledCreaturePermanent()), + new PermanentsOnTheBattlefieldCondition(filterSwamp), null + )); // Creatures you control get +2/+0 until end of turn. this.getSpellAbility().addEffect(new BoostControlledEffect(2, 0, Duration.EndOfTurn)); diff --git a/Mage.Sets/src/mage/cards/d/DarkTrooper.java b/Mage.Sets/src/mage/cards/d/DarkTrooper.java index 8cfbfd7065..f817049f4b 100644 --- a/Mage.Sets/src/mage/cards/d/DarkTrooper.java +++ b/Mage.Sets/src/mage/cards/d/DarkTrooper.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.RepairAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class DarkTrooper extends CardImpl { public DarkTrooper(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); - this.subtype.add("Droid"); - this.subtype.add("Trooper"); + this.subtype.add(SubType.DROID); + this.subtype.add(SubType.TROOPER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DarkheartSliver.java b/Mage.Sets/src/mage/cards/d/DarkheartSliver.java index 92efb96f2f..5cb7fcfa64 100644 --- a/Mage.Sets/src/mage/cards/d/DarkheartSliver.java +++ b/Mage.Sets/src/mage/cards/d/DarkheartSliver.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.GainAbilityAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -50,7 +51,7 @@ public class DarkheartSliver extends CardImpl { public DarkheartSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{G}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DarklingStalker.java b/Mage.Sets/src/mage/cards/d/DarklingStalker.java index f9be7723af..e3aee6f97c 100644 --- a/Mage.Sets/src/mage/cards/d/DarklingStalker.java +++ b/Mage.Sets/src/mage/cards/d/DarklingStalker.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class DarklingStalker extends CardImpl { public DarklingStalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Shade"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SHADE); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DarklitGargoyle.java b/Mage.Sets/src/mage/cards/d/DarklitGargoyle.java index 33772383dd..f6d00afad2 100644 --- a/Mage.Sets/src/mage/cards/d/DarklitGargoyle.java +++ b/Mage.Sets/src/mage/cards/d/DarklitGargoyle.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class DarklitGargoyle extends CardImpl { public DarklitGargoyle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}{W}"); - this.subtype.add("Gargoyle"); + this.subtype.add(SubType.GARGOYLE); this.power = new MageInt(1); this.toughness = new MageInt(2); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/d/DarkslickDrake.java b/Mage.Sets/src/mage/cards/d/DarkslickDrake.java index ae6127cc4a..d2c8f600e9 100644 --- a/Mage.Sets/src/mage/cards/d/DarkslickDrake.java +++ b/Mage.Sets/src/mage/cards/d/DarkslickDrake.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class DarkslickDrake extends CardImpl { public DarkslickDrake (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DarkslickShores.java b/Mage.Sets/src/mage/cards/d/DarkslickShores.java index 0bf6590b60..42bf7dd27f 100644 --- a/Mage.Sets/src/mage/cards/d/DarkslickShores.java +++ b/Mage.Sets/src/mage/cards/d/DarkslickShores.java @@ -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.cards.d; import java.util.UUID; @@ -51,24 +50,24 @@ import mage.filter.predicate.permanent.AnotherPredicate; public class DarkslickShores extends CardImpl { private final static FilterLandPermanent filter = new FilterLandPermanent(); - + static { filter.add(new AnotherPredicate()); } - public DarkslickShores (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + public DarkslickShores(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); // Darkslick Shores enters the battlefield tapped unless you control two or fewer other lands. Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.FEWER_THAN, 3)); - String abilityText = "tapped unless you control two or fewer other lands"; + String abilityText = " tapped unless you control two or fewer other lands"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); - + this.addAbility(new BlueManaAbility()); this.addAbility(new BlackManaAbility()); } - public DarkslickShores (final DarkslickShores card) { + public DarkslickShores(final DarkslickShores card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/d/DarksteelAxe.java b/Mage.Sets/src/mage/cards/d/DarksteelAxe.java index 158f73eea3..771d9f9366 100644 --- a/Mage.Sets/src/mage/cards/d/DarksteelAxe.java +++ b/Mage.Sets/src/mage/cards/d/DarksteelAxe.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class DarksteelAxe extends CardImpl { public DarksteelAxe (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(IndestructibleAbility.getInstance()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0))); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); diff --git a/Mage.Sets/src/mage/cards/d/DarksteelColossus.java b/Mage.Sets/src/mage/cards/d/DarksteelColossus.java index cd7f6442a6..59baceeff9 100644 --- a/Mage.Sets/src/mage/cards/d/DarksteelColossus.java +++ b/Mage.Sets/src/mage/cards/d/DarksteelColossus.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -45,7 +46,7 @@ public class DarksteelColossus extends CardImpl { public DarksteelColossus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{11}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(11); this.toughness = new MageInt(11); diff --git a/Mage.Sets/src/mage/cards/d/DarksteelGargoyle.java b/Mage.Sets/src/mage/cards/d/DarksteelGargoyle.java index 98345b6c00..f8bcb58e4b 100644 --- a/Mage.Sets/src/mage/cards/d/DarksteelGargoyle.java +++ b/Mage.Sets/src/mage/cards/d/DarksteelGargoyle.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -43,7 +44,7 @@ public class DarksteelGargoyle extends CardImpl { public DarksteelGargoyle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); - this.subtype.add("Gargoyle"); + this.subtype.add(SubType.GARGOYLE); this.power = new MageInt(3); this.toughness = new MageInt(3); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/d/DarksteelJuggernaut.java b/Mage.Sets/src/mage/cards/d/DarksteelJuggernaut.java index dc0663be15..e3c3caf48c 100644 --- a/Mage.Sets/src/mage/cards/d/DarksteelJuggernaut.java +++ b/Mage.Sets/src/mage/cards/d/DarksteelJuggernaut.java @@ -29,7 +29,7 @@ package mage.cards.d; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; @@ -37,6 +37,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; @@ -49,7 +50,7 @@ public class DarksteelJuggernaut extends CardImpl { public DarksteelJuggernaut(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}"); - this.subtype.add("Juggernaut"); + this.subtype.add(SubType.JUGGERNAUT); this.power = new MageInt(0); this.toughness = new MageInt(0); @@ -61,7 +62,7 @@ public class DarksteelJuggernaut extends CardImpl { new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(new FilterControlledArtifactPermanent("artifacts you control")), Duration.EndOfGame))); // Darksteel Juggernaut attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public DarksteelJuggernaut(final DarksteelJuggernaut card) { diff --git a/Mage.Sets/src/mage/cards/d/DarksteelMutation.java b/Mage.Sets/src/mage/cards/d/DarksteelMutation.java index 070fc2ebc1..d77d6ad8ac 100644 --- a/Mage.Sets/src/mage/cards/d/DarksteelMutation.java +++ b/Mage.Sets/src/mage/cards/d/DarksteelMutation.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class DarksteelMutation extends CardImpl { public DarksteelMutation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); @@ -86,7 +87,7 @@ class DarksteelMutationInsectToken extends Token { super("Insect", "Insect artifact creature with base power and toughness 0/1"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Insect"); + subtype.add(SubType.INSECT); power = new MageInt(0); toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DarksteelMyr.java b/Mage.Sets/src/mage/cards/d/DarksteelMyr.java index c0421aa891..0f20417a68 100644 --- a/Mage.Sets/src/mage/cards/d/DarksteelMyr.java +++ b/Mage.Sets/src/mage/cards/d/DarksteelMyr.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class DarksteelMyr extends CardImpl { public DarksteelMyr (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(0); this.toughness = new MageInt(1); this.addAbility(IndestructibleAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/d/DarksteelPlate.java b/Mage.Sets/src/mage/cards/d/DarksteelPlate.java index a38023a446..bdac772db5 100644 --- a/Mage.Sets/src/mage/cards/d/DarksteelPlate.java +++ b/Mage.Sets/src/mage/cards/d/DarksteelPlate.java @@ -46,7 +46,7 @@ public class DarksteelPlate extends CardImpl { public DarksteelPlate (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Darksteel Plate is indestructible. this.addAbility(IndestructibleAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/d/DarksteelSentinel.java b/Mage.Sets/src/mage/cards/d/DarksteelSentinel.java index 8d6270ced8..b21a279147 100644 --- a/Mage.Sets/src/mage/cards/d/DarksteelSentinel.java +++ b/Mage.Sets/src/mage/cards/d/DarksteelSentinel.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class DarksteelSentinel extends CardImpl { public DarksteelSentinel (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(3); this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/d/DarkthicketWolf.java b/Mage.Sets/src/mage/cards/d/DarkthicketWolf.java index 76e70a7b64..791bf48b64 100644 --- a/Mage.Sets/src/mage/cards/d/DarkthicketWolf.java +++ b/Mage.Sets/src/mage/cards/d/DarkthicketWolf.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class DarkthicketWolf extends CardImpl { public DarkthicketWolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DarkwatchElves.java b/Mage.Sets/src/mage/cards/d/DarkwatchElves.java index cbe5f24d24..5bd66ae38d 100644 --- a/Mage.Sets/src/mage/cards/d/DarkwatchElves.java +++ b/Mage.Sets/src/mage/cards/d/DarkwatchElves.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Backfir3 @@ -44,7 +45,7 @@ public class DarkwatchElves extends CardImpl { public DarkwatchElves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DarthMaul.java b/Mage.Sets/src/mage/cards/d/DarthMaul.java index 890beaf38e..918bd7be33 100644 --- a/Mage.Sets/src/mage/cards/d/DarthMaul.java +++ b/Mage.Sets/src/mage/cards/d/DarthMaul.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.target.common.TargetCreaturePermanent; @@ -53,8 +54,8 @@ public class DarthMaul extends CardImpl { public DarthMaul(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Zabrak"); - this.subtype.add("Sith"); + this.subtype.add(SubType.ZABRAK); + this.subtype.add(SubType.SITH); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DarthSidiousSithLord.java b/Mage.Sets/src/mage/cards/d/DarthSidiousSithLord.java index 852270a55c..114dc69f49 100644 --- a/Mage.Sets/src/mage/cards/d/DarthSidiousSithLord.java +++ b/Mage.Sets/src/mage/cards/d/DarthSidiousSithLord.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; @@ -61,7 +62,7 @@ public class DarthSidiousSithLord extends CardImpl { public DarthSidiousSithLord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{4}{U}{B}{B}{R}"); - this.subtype.add("Sidious"); + this.subtype.add(SubType.SIDIOUS); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); diff --git a/Mage.Sets/src/mage/cards/d/DarthTyranus.java b/Mage.Sets/src/mage/cards/d/DarthTyranus.java index cf375ba73b..98a6a34dba 100644 --- a/Mage.Sets/src/mage/cards/d/DarthTyranus.java +++ b/Mage.Sets/src/mage/cards/d/DarthTyranus.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -60,7 +61,7 @@ public class DarthTyranus extends CardImpl { public DarthTyranus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{1}{W}{U}{B}"); - this.subtype.add("Dooku"); + this.subtype.add(SubType.DOOKU); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/d/DarthVader.java b/Mage.Sets/src/mage/cards/d/DarthVader.java index acc15b1f84..85a40aca5d 100644 --- a/Mage.Sets/src/mage/cards/d/DarthVader.java +++ b/Mage.Sets/src/mage/cards/d/DarthVader.java @@ -54,8 +54,8 @@ public class DarthVader extends CardImpl { public DarthVader(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Sith"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SITH); this.power = new MageInt(4); this.toughness = new MageInt(4); this.color.setBlack(true); diff --git a/Mage.Sets/src/mage/cards/d/DartingMerfolk.java b/Mage.Sets/src/mage/cards/d/DartingMerfolk.java index 0e1547f0b9..a7ff571ea3 100644 --- a/Mage.Sets/src/mage/cards/d/DartingMerfolk.java +++ b/Mage.Sets/src/mage/cards/d/DartingMerfolk.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class DartingMerfolk extends CardImpl { public DartingMerfolk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DaruCavalier.java b/Mage.Sets/src/mage/cards/d/DaruCavalier.java index c931bd6696..37a75f64a7 100644 --- a/Mage.Sets/src/mage/cards/d/DaruCavalier.java +++ b/Mage.Sets/src/mage/cards/d/DaruCavalier.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.NamePredicate; import mage.target.common.TargetCardInLibrary; @@ -54,8 +55,8 @@ public class DaruCavalier extends CardImpl { public DaruCavalier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DaruHealer.java b/Mage.Sets/src/mage/cards/d/DaruHealer.java index 9b4778f03d..88fa15a77b 100644 --- a/Mage.Sets/src/mage/cards/d/DaruHealer.java +++ b/Mage.Sets/src/mage/cards/d/DaruHealer.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -51,8 +52,8 @@ public class DaruHealer extends CardImpl { public DaruHealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DaruLancer.java b/Mage.Sets/src/mage/cards/d/DaruLancer.java index 0d84167ee4..8055aa3c4c 100644 --- a/Mage.Sets/src/mage/cards/d/DaruLancer.java +++ b/Mage.Sets/src/mage/cards/d/DaruLancer.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class DaruLancer extends CardImpl { public DaruLancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DaruMender.java b/Mage.Sets/src/mage/cards/d/DaruMender.java index d54f78651b..88ae921811 100644 --- a/Mage.Sets/src/mage/cards/d/DaruMender.java +++ b/Mage.Sets/src/mage/cards/d/DaruMender.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -47,8 +48,8 @@ public class DaruMender extends CardImpl { public DaruMender(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DaruSanctifier.java b/Mage.Sets/src/mage/cards/d/DaruSanctifier.java index 6d4676eff9..725399e860 100644 --- a/Mage.Sets/src/mage/cards/d/DaruSanctifier.java +++ b/Mage.Sets/src/mage/cards/d/DaruSanctifier.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetEnchantmentPermanent; /** @@ -47,8 +48,8 @@ public class DaruSanctifier extends CardImpl { public DaruSanctifier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DaruSpiritualist.java b/Mage.Sets/src/mage/cards/d/DaruSpiritualist.java index 6b1617086d..2c0442f5df 100644 --- a/Mage.Sets/src/mage/cards/d/DaruSpiritualist.java +++ b/Mage.Sets/src/mage/cards/d/DaruSpiritualist.java @@ -54,8 +54,8 @@ public class DaruSpiritualist extends CardImpl { public DaruSpiritualist(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DaruStinger.java b/Mage.Sets/src/mage/cards/d/DaruStinger.java index 4a9b4974d6..9e4810f520 100644 --- a/Mage.Sets/src/mage/cards/d/DaruStinger.java +++ b/Mage.Sets/src/mage/cards/d/DaruStinger.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.AmplifyAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetAttackingOrBlockingCreature; @@ -51,7 +52,7 @@ public class DaruStinger extends CardImpl { public DaruStinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DaruWarchief.java b/Mage.Sets/src/mage/cards/d/DaruWarchief.java index 4fe0947a8e..c9f4a41e88 100644 --- a/Mage.Sets/src/mage/cards/d/DaruWarchief.java +++ b/Mage.Sets/src/mage/cards/d/DaruWarchief.java @@ -58,8 +58,8 @@ public class DaruWarchief extends CardImpl { public DaruWarchief(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DaughterOfAutumn.java b/Mage.Sets/src/mage/cards/d/DaughterOfAutumn.java index 6fe72a37f1..464864afe5 100644 --- a/Mage.Sets/src/mage/cards/d/DaughterOfAutumn.java +++ b/Mage.Sets/src/mage/cards/d/DaughterOfAutumn.java @@ -37,6 +37,7 @@ import mage.abilities.effects.RedirectionEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -63,13 +64,14 @@ public class DaughterOfAutumn extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(2); this.toughness = new MageInt(4); // {W}: The next 1 damage that would be dealt to target white creature this turn is dealt to Daughter of Autumn instead. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DaughterOfAutumnPreventDamageTargetEffect(Duration.EndOfTurn, 1), new ManaCostsImpl("{W}")); ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); } public DaughterOfAutumn(final DaughterOfAutumn card) { diff --git a/Mage.Sets/src/mage/cards/d/DauntingDefender.java b/Mage.Sets/src/mage/cards/d/DauntingDefender.java index e48db5befc..3e4e96f8ac 100644 --- a/Mage.Sets/src/mage/cards/d/DauntingDefender.java +++ b/Mage.Sets/src/mage/cards/d/DauntingDefender.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; @@ -42,6 +41,8 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; +import java.util.UUID; + /** * * @author TheElk801 @@ -51,8 +52,8 @@ public class DauntingDefender extends CardImpl { public DauntingDefender(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -90,7 +91,7 @@ class DauntingDefenderEffect extends PreventionEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { if (event.getType() == GameEvent.EventType.DAMAGE_CREATURE) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null && permanent.getControllerId().equals(source.getControllerId()) && permanent.getSubtype(game).contains(SubType.CLERIC)) { + if (permanent != null && permanent.getControllerId().equals(source.getControllerId()) && permanent.hasSubtype(SubType.CLERIC, game)) { return super.applies(event, source, game); } } diff --git a/Mage.Sets/src/mage/cards/d/DauntlessAven.java b/Mage.Sets/src/mage/cards/d/DauntlessAven.java index b74b7a9d01..d35dab98d6 100644 --- a/Mage.Sets/src/mage/cards/d/DauntlessAven.java +++ b/Mage.Sets/src/mage/cards/d/DauntlessAven.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetControlledCreaturePermanent; /** @@ -47,8 +48,8 @@ public class DauntlessAven extends CardImpl { public DauntlessAven(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DauntlessCathar.java b/Mage.Sets/src/mage/cards/d/DauntlessCathar.java index ee27c4519d..a29671d35e 100644 --- a/Mage.Sets/src/mage/cards/d/DauntlessCathar.java +++ b/Mage.Sets/src/mage/cards/d/DauntlessCathar.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.SpiritWhiteToken; @@ -48,8 +49,8 @@ public class DauntlessCathar extends CardImpl { public DauntlessCathar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DauntlessDourbark.java b/Mage.Sets/src/mage/cards/d/DauntlessDourbark.java index 86deb41293..e0560f0df8 100644 --- a/Mage.Sets/src/mage/cards/d/DauntlessDourbark.java +++ b/Mage.Sets/src/mage/cards/d/DauntlessDourbark.java @@ -69,8 +69,8 @@ public class DauntlessDourbark extends CardImpl { public DauntlessDourbark(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.WARRIOR); this.color.setGreen(true); this.power = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/d/DauntlessEscort.java b/Mage.Sets/src/mage/cards/d/DauntlessEscort.java index 818917e837..9d6ec5a0b9 100644 --- a/Mage.Sets/src/mage/cards/d/DauntlessEscort.java +++ b/Mage.Sets/src/mage/cards/d/DauntlessEscort.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -50,8 +51,8 @@ public class DauntlessEscort extends CardImpl { public DauntlessEscort(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}"); - this.subtype.add("Rhino"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.RHINO); + this.subtype.add(SubType.SOLDIER); diff --git a/Mage.Sets/src/mage/cards/d/DauntlessRiverMarshal.java b/Mage.Sets/src/mage/cards/d/DauntlessRiverMarshal.java index cdb57c80a1..b2875fb81b 100644 --- a/Mage.Sets/src/mage/cards/d/DauntlessRiverMarshal.java +++ b/Mage.Sets/src/mage/cards/d/DauntlessRiverMarshal.java @@ -59,8 +59,8 @@ public class DauntlessRiverMarshal extends CardImpl { public DauntlessRiverMarshal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DauthiCutthroat.java b/Mage.Sets/src/mage/cards/d/DauthiCutthroat.java index 6cb66fecef..71fadcf00a 100644 --- a/Mage.Sets/src/mage/cards/d/DauthiCutthroat.java +++ b/Mage.Sets/src/mage/cards/d/DauthiCutthroat.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -57,8 +58,8 @@ public class DauthiCutthroat extends CardImpl { public DauthiCutthroat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Dauthi"); - this.subtype.add("Minion"); + this.subtype.add(SubType.DAUTHI); + this.subtype.add(SubType.MINION); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DauthiGhoul.java b/Mage.Sets/src/mage/cards/d/DauthiGhoul.java index b392902aef..39f0cf1fc4 100644 --- a/Mage.Sets/src/mage/cards/d/DauthiGhoul.java +++ b/Mage.Sets/src/mage/cards/d/DauthiGhoul.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -53,8 +54,8 @@ public class DauthiGhoul extends CardImpl { public DauthiGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Dauthi"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.DAUTHI); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DauthiHorror.java b/Mage.Sets/src/mage/cards/d/DauthiHorror.java index 41d05cc671..e76dca1686 100644 --- a/Mage.Sets/src/mage/cards/d/DauthiHorror.java +++ b/Mage.Sets/src/mage/cards/d/DauthiHorror.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -53,8 +54,8 @@ public class DauthiHorror extends CardImpl { public DauthiHorror(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Dauthi"); - this.subtype.add("Horror"); + this.subtype.add(SubType.DAUTHI); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DauthiJackal.java b/Mage.Sets/src/mage/cards/d/DauthiJackal.java index e349112316..62db90500a 100644 --- a/Mage.Sets/src/mage/cards/d/DauthiJackal.java +++ b/Mage.Sets/src/mage/cards/d/DauthiJackal.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterBlockingCreature; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class DauthiJackal extends CardImpl { public DauthiJackal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Dauthi"); - this.subtype.add("Jackal"); + this.subtype.add(SubType.DAUTHI); + this.subtype.add(SubType.JACKAL); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DauthiMarauder.java b/Mage.Sets/src/mage/cards/d/DauthiMarauder.java index 6f0f9ac034..d65005baba 100644 --- a/Mage.Sets/src/mage/cards/d/DauthiMarauder.java +++ b/Mage.Sets/src/mage/cards/d/DauthiMarauder.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class DauthiMarauder extends CardImpl { public DauthiMarauder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Dauthi"); - this.subtype.add("Minion"); + this.subtype.add(SubType.DAUTHI); + this.subtype.add(SubType.MINION); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DauthiMercenary.java b/Mage.Sets/src/mage/cards/d/DauthiMercenary.java index 7005340fb5..22d3cad411 100644 --- a/Mage.Sets/src/mage/cards/d/DauthiMercenary.java +++ b/Mage.Sets/src/mage/cards/d/DauthiMercenary.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,9 +48,9 @@ public class DauthiMercenary extends CardImpl { public DauthiMercenary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Dauthi"); - this.subtype.add("Knight"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.DAUTHI); + this.subtype.add(SubType.KNIGHT); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DauthiMindripper.java b/Mage.Sets/src/mage/cards/d/DauthiMindripper.java index f32e8b6f51..71f11395c5 100644 --- a/Mage.Sets/src/mage/cards/d/DauthiMindripper.java +++ b/Mage.Sets/src/mage/cards/d/DauthiMindripper.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,8 +48,8 @@ public class DauthiMindripper extends CardImpl { public DauthiMindripper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Dauthi"); - this.subtype.add("Minion"); + this.subtype.add(SubType.DAUTHI); + this.subtype.add(SubType.MINION); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DauthiSlayer.java b/Mage.Sets/src/mage/cards/d/DauthiSlayer.java index 7cce97a377..f3ca71bdf2 100644 --- a/Mage.Sets/src/mage/cards/d/DauthiSlayer.java +++ b/Mage.Sets/src/mage/cards/d/DauthiSlayer.java @@ -29,11 +29,12 @@ package mage.cards.d; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class DauthiSlayer extends CardImpl { public DauthiSlayer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Dauthi"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.DAUTHI); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -52,7 +53,7 @@ public class DauthiSlayer extends CardImpl { // Shadow this.addAbility(ShadowAbility.getInstance()); // Dauthi Slayer attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public DauthiSlayer(final DauthiSlayer card) { diff --git a/Mage.Sets/src/mage/cards/d/DauthiTrapper.java b/Mage.Sets/src/mage/cards/d/DauthiTrapper.java index 5ebf1711d9..7670231f0b 100644 --- a/Mage.Sets/src/mage/cards/d/DauthiTrapper.java +++ b/Mage.Sets/src/mage/cards/d/DauthiTrapper.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class DauthiTrapper extends CardImpl { public DauthiTrapper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Dauthi"); - this.subtype.add("Minion"); + this.subtype.add(SubType.DAUTHI); + this.subtype.add(SubType.MINION); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DauthiWarlord.java b/Mage.Sets/src/mage/cards/d/DauthiWarlord.java index bb1cf1a9a3..915f690c40 100644 --- a/Mage.Sets/src/mage/cards/d/DauthiWarlord.java +++ b/Mage.Sets/src/mage/cards/d/DauthiWarlord.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -57,8 +58,8 @@ public class DauthiWarlord extends CardImpl { public DauthiWarlord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Dauthi"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.DAUTHI); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DawnElemental.java b/Mage.Sets/src/mage/cards/d/DawnElemental.java index 0a6dddaaa1..012bffa4b8 100644 --- a/Mage.Sets/src/mage/cards/d/DawnElemental.java +++ b/Mage.Sets/src/mage/cards/d/DawnElemental.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class DawnElemental extends CardImpl { public DawnElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{W}{W}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DawnGryff.java b/Mage.Sets/src/mage/cards/d/DawnGryff.java index 4fa4648a28..3051032170 100644 --- a/Mage.Sets/src/mage/cards/d/DawnGryff.java +++ b/Mage.Sets/src/mage/cards/d/DawnGryff.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class DawnGryff extends CardImpl { public DawnGryff(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Hippogriff"); + this.subtype.add(SubType.HIPPOGRIFF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DawnbreakReclaimer.java b/Mage.Sets/src/mage/cards/d/DawnbreakReclaimer.java index 92f47640d9..4c5b0f14d1 100644 --- a/Mage.Sets/src/mage/cards/d/DawnbreakReclaimer.java +++ b/Mage.Sets/src/mage/cards/d/DawnbreakReclaimer.java @@ -40,6 +40,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class DawnbreakReclaimer extends CardImpl { public DawnbreakReclaimer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DawnbringerCharioteers.java b/Mage.Sets/src/mage/cards/d/DawnbringerCharioteers.java index b33c88a6d1..d801492436 100644 --- a/Mage.Sets/src/mage/cards/d/DawnbringerCharioteers.java +++ b/Mage.Sets/src/mage/cards/d/DawnbringerCharioteers.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -46,8 +47,8 @@ public class DawnbringerCharioteers extends CardImpl { public DawnbringerCharioteers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DawnfeatherEagle.java b/Mage.Sets/src/mage/cards/d/DawnfeatherEagle.java index da6e32acf0..ae9435f2b2 100644 --- a/Mage.Sets/src/mage/cards/d/DawnfeatherEagle.java +++ b/Mage.Sets/src/mage/cards/d/DawnfeatherEagle.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; @@ -51,7 +52,7 @@ public class DawnfeatherEagle extends CardImpl { public DawnfeatherEagle(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/Dawnfluke.java b/Mage.Sets/src/mage/cards/d/Dawnfluke.java index 7116622951..cdcebfcbb1 100644 --- a/Mage.Sets/src/mage/cards/d/Dawnfluke.java +++ b/Mage.Sets/src/mage/cards/d/Dawnfluke.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.Target; import mage.target.common.TargetCreatureOrPlayer; @@ -49,7 +50,7 @@ public class Dawnfluke extends CardImpl { public Dawnfluke(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DawnglareInvoker.java b/Mage.Sets/src/mage/cards/d/DawnglareInvoker.java index 5c87a69b36..7683ae7673 100644 --- a/Mage.Sets/src/mage/cards/d/DawnglareInvoker.java +++ b/Mage.Sets/src/mage/cards/d/DawnglareInvoker.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; import mage.target.TargetPlayer; @@ -48,8 +49,8 @@ public class DawnglareInvoker extends CardImpl { public DawnglareInvoker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DawningPurist.java b/Mage.Sets/src/mage/cards/d/DawningPurist.java index 4a5e3e7fb4..4941ccc642 100644 --- a/Mage.Sets/src/mage/cards/d/DawningPurist.java +++ b/Mage.Sets/src/mage/cards/d/DawningPurist.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; @@ -52,8 +53,8 @@ public class DawningPurist extends CardImpl { public DawningPurist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DawnrayArcher.java b/Mage.Sets/src/mage/cards/d/DawnrayArcher.java index 82378baeed..2c1b159e0a 100644 --- a/Mage.Sets/src/mage/cards/d/DawnrayArcher.java +++ b/Mage.Sets/src/mage/cards/d/DawnrayArcher.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ExaltedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetAttackingOrBlockingCreature; @@ -49,8 +50,8 @@ public class DawnrayArcher extends CardImpl { public DawnrayArcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DawnsReflection.java b/Mage.Sets/src/mage/cards/d/DawnsReflection.java index 17f7aef0b7..f008b699bb 100644 --- a/Mage.Sets/src/mage/cards/d/DawnsReflection.java +++ b/Mage.Sets/src/mage/cards/d/DawnsReflection.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.choices.ChoiceColor; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -55,9 +56,8 @@ import mage.target.common.TargetLandPermanent; public class DawnsReflection extends CardImpl { public DawnsReflection(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{G}"); - this.subtype.add("Aura"); - + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); @@ -78,6 +78,7 @@ public class DawnsReflection extends CardImpl { return new DawnsReflection(this); } } + class DawnsReflectionTriggeredAbility extends TriggeredManaAbility { public DawnsReflectionTriggeredAbility() { @@ -104,14 +105,12 @@ class DawnsReflectionTriggeredAbility extends TriggeredManaAbility { return enchantment != null && event.getSourceId().equals(enchantment.getAttachedTo()); } - @Override public String getRule() { return "Whenever enchanted land is tapped for mana, its controller adds two mana in any combination of colors to his or her mana pool (in addition to the mana the land produces)."; } } - class DawnsReflectionManaEffect extends ManaEffect { public DawnsReflectionManaEffect() { @@ -131,18 +130,18 @@ class DawnsReflectionManaEffect extends ManaEffect { @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - if(controller != null){ - int x = 2; - + if (controller != null) { + int x = 2; Mana mana = new Mana(); - for(int i = 0; i < x; i++){ + for (int i = 0; i < x; i++) { ChoiceColor choiceColor = new ChoiceColor(); - while (controller.canRespond() && !controller.choose(Outcome.Benefit, choiceColor, game)) { + while (!controller.choose(Outcome.Benefit, choiceColor, game)) { + if (!controller.isInGame()) { + return false; + } } - choiceColor.increaseMana(mana); } - controller.getManaPool().addMana(mana, game, source); return true; @@ -155,5 +154,4 @@ class DawnsReflectionManaEffect extends ManaEffect { return null; } - } diff --git a/Mage.Sets/src/mage/cards/d/Dawnstrider.java b/Mage.Sets/src/mage/cards/d/Dawnstrider.java index 19b5a0b1e4..acc83ac2ea 100644 --- a/Mage.Sets/src/mage/cards/d/Dawnstrider.java +++ b/Mage.Sets/src/mage/cards/d/Dawnstrider.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCardInHand; @@ -50,8 +51,8 @@ public class Dawnstrider extends CardImpl { public Dawnstrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Dryad"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.DRYAD); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DawnstrikePaladin.java b/Mage.Sets/src/mage/cards/d/DawnstrikePaladin.java index ef042aa082..ecb80c4775 100644 --- a/Mage.Sets/src/mage/cards/d/DawnstrikePaladin.java +++ b/Mage.Sets/src/mage/cards/d/DawnstrikePaladin.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class DawnstrikePaladin extends CardImpl { public DawnstrikePaladin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DawntreaderElk.java b/Mage.Sets/src/mage/cards/d/DawntreaderElk.java index 85229f4337..23f52358dd 100644 --- a/Mage.Sets/src/mage/cards/d/DawntreaderElk.java +++ b/Mage.Sets/src/mage/cards/d/DawntreaderElk.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -50,7 +51,7 @@ public class DawntreaderElk extends CardImpl { public DawntreaderElk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elk"); + this.subtype.add(SubType.ELK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DaxosOfMeletis.java b/Mage.Sets/src/mage/cards/d/DaxosOfMeletis.java index 1f920318d9..5b66bc1930 100644 --- a/Mage.Sets/src/mage/cards/d/DaxosOfMeletis.java +++ b/Mage.Sets/src/mage/cards/d/DaxosOfMeletis.java @@ -67,8 +67,8 @@ public class DaxosOfMeletis extends CardImpl { public DaxosOfMeletis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DaxosTheReturned.java b/Mage.Sets/src/mage/cards/d/DaxosTheReturned.java index 2cbd014bee..511acbc335 100644 --- a/Mage.Sets/src/mage/cards/d/DaxosTheReturned.java +++ b/Mage.Sets/src/mage/cards/d/DaxosTheReturned.java @@ -59,8 +59,8 @@ public class DaxosTheReturned extends CardImpl { public DaxosTheReturned(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Zombie"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DaxossTorment.java b/Mage.Sets/src/mage/cards/d/DaxossTorment.java index e0ac0e2334..10ee7aeff9 100644 --- a/Mage.Sets/src/mage/cards/d/DaxossTorment.java +++ b/Mage.Sets/src/mage/cards/d/DaxossTorment.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.game.permanent.token.Token; @@ -68,7 +69,7 @@ class DaxossTormentToken extends Token { super("", "5/5 Demon creature with flying and haste"); cardType.add(CardType.CREATURE); - subtype.add("Demon"); + subtype.add(SubType.DEMON); power = new MageInt(5); toughness = new MageInt(5); addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/d/DaybreakCoronet.java b/Mage.Sets/src/mage/cards/d/DaybreakCoronet.java index 6128c5359e..086d0dd58f 100644 --- a/Mage.Sets/src/mage/cards/d/DaybreakCoronet.java +++ b/Mage.Sets/src/mage/cards/d/DaybreakCoronet.java @@ -58,7 +58,7 @@ public class DaybreakCoronet extends CardImpl { public DaybreakCoronet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature with another Aura attached to it @@ -110,7 +110,7 @@ class AuraAttachedPredicate implements Predicate { if (!uuid.equals(ownId)) { Permanent attachment = game.getPermanent(uuid); if (attachment != null - && attachment.getSubtype(game).contains("Aura")) { + && attachment.hasSubtype(SubType.AURA, game)) { return true; } } diff --git a/Mage.Sets/src/mage/cards/d/DaybreakRanger.java b/Mage.Sets/src/mage/cards/d/DaybreakRanger.java index 33ff8a4649..172b92e61e 100644 --- a/Mage.Sets/src/mage/cards/d/DaybreakRanger.java +++ b/Mage.Sets/src/mage/cards/d/DaybreakRanger.java @@ -44,6 +44,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.n.NightfallPredator; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -64,9 +65,9 @@ public class DaybreakRanger extends CardImpl { public DaybreakRanger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Archer"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARCHER); + this.subtype.add(SubType.WEREWOLF); this.transformable = true; this.secondSideCardClazz = NightfallPredator.class; diff --git a/Mage.Sets/src/mage/cards/d/DazzlingRamparts.java b/Mage.Sets/src/mage/cards/d/DazzlingRamparts.java index d0c4c26341..14d4301d2f 100644 --- a/Mage.Sets/src/mage/cards/d/DazzlingRamparts.java +++ b/Mage.Sets/src/mage/cards/d/DazzlingRamparts.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class DazzlingRamparts extends CardImpl { public DazzlingRamparts(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/d/DeadReckoning.java b/Mage.Sets/src/mage/cards/d/DeadReckoning.java index 1595bab2c2..0435e24eab 100644 --- a/Mage.Sets/src/mage/cards/d/DeadReckoning.java +++ b/Mage.Sets/src/mage/cards/d/DeadReckoning.java @@ -50,7 +50,7 @@ import mage.target.common.TargetCreaturePermanent; public class DeadReckoning extends CardImpl { public DeadReckoning(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{B}"); // You may put target creature card from your graveyard on top of your library. If you do, Dead Reckoning deals damage equal to that card's power to target creature. this.getSpellAbility().addEffect(new DeadReckoningEffect()); @@ -96,7 +96,7 @@ class DeadReckoningEffect extends OneShotEffect { && you.choose(Outcome.Damage, target2, source.getSourceId(), game)) { Card creatureInGraveyard = game.getCard(target1.getFirstTarget()); if (creatureInGraveyard != null) { - if (creatureInGraveyard.moveToZone(Zone.LIBRARY, id, game, true)) { + if (creatureInGraveyard.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true)) { int power = creatureInGraveyard.getPower().getValue(); Permanent creature = game.getPermanent(target2.getFirstTarget()); if (creature != null) { diff --git a/Mage.Sets/src/mage/cards/d/DeadReveler.java b/Mage.Sets/src/mage/cards/d/DeadReveler.java index a92b87d69b..4032ca7abf 100644 --- a/Mage.Sets/src/mage/cards/d/DeadReveler.java +++ b/Mage.Sets/src/mage/cards/d/DeadReveler.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.UnleashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class DeadReveler extends CardImpl { public DeadReveler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DeadWeight.java b/Mage.Sets/src/mage/cards/d/DeadWeight.java index 8753de09d1..fad973b69f 100644 --- a/Mage.Sets/src/mage/cards/d/DeadWeight.java +++ b/Mage.Sets/src/mage/cards/d/DeadWeight.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class DeadWeight extends CardImpl { public DeadWeight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/d/DeadbridgeGoliath.java b/Mage.Sets/src/mage/cards/d/DeadbridgeGoliath.java index a2f07212ce..be7f22987f 100644 --- a/Mage.Sets/src/mage/cards/d/DeadbridgeGoliath.java +++ b/Mage.Sets/src/mage/cards/d/DeadbridgeGoliath.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ScavengeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class DeadbridgeGoliath extends CardImpl { public DeadbridgeGoliath(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DeadbridgeShaman.java b/Mage.Sets/src/mage/cards/d/DeadbridgeShaman.java index a2c43b48a2..1a6af0d021 100644 --- a/Mage.Sets/src/mage/cards/d/DeadbridgeShaman.java +++ b/Mage.Sets/src/mage/cards/d/DeadbridgeShaman.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetOpponent; /** @@ -45,8 +46,8 @@ public class DeadbridgeShaman extends CardImpl { public DeadbridgeShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DeadeyeHarpooner.java b/Mage.Sets/src/mage/cards/d/DeadeyeHarpooner.java index cf884ba66b..ea20a739c3 100644 --- a/Mage.Sets/src/mage/cards/d/DeadeyeHarpooner.java +++ b/Mage.Sets/src/mage/cards/d/DeadeyeHarpooner.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterOpponentsCreaturePermanent; import mage.filter.predicate.permanent.TappedPredicate; import mage.target.common.TargetOpponentsCreaturePermanent; @@ -58,8 +59,8 @@ public class DeadeyeHarpooner extends CardImpl { public DeadeyeHarpooner(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Dwarf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DeadeyeNavigator.java b/Mage.Sets/src/mage/cards/d/DeadeyeNavigator.java index ad50173d73..d1be4f775a 100644 --- a/Mage.Sets/src/mage/cards/d/DeadeyeNavigator.java +++ b/Mage.Sets/src/mage/cards/d/DeadeyeNavigator.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.SoulbondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -51,7 +52,7 @@ public class DeadeyeNavigator extends CardImpl { public DeadeyeNavigator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DeadeyePlunderers.java b/Mage.Sets/src/mage/cards/d/DeadeyePlunderers.java new file mode 100644 index 0000000000..9ae98ea759 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DeadeyePlunderers.java @@ -0,0 +1,87 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.permanent.token.TreasureToken; + +/** + * + * @author TheElk801 + */ +public class DeadeyePlunderers extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("artifact you control"); + + static { + filter.add(new CardTypePredicate(CardType.ARTIFACT)); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public DeadeyePlunderers(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Deadeye Plunderers gets +1/+1 for each artifact you control. + PermanentsOnBattlefieldCount count = new PermanentsOnBattlefieldCount(filter); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(count, count, Duration.WhileOnBattlefield))); + + // {2}{U}{B}: Create a colorless artifact token named Treasure with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool." + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new TreasureToken()), new ManaCostsImpl("{2}{U}{B}"))); + } + + public DeadeyePlunderers(final DeadeyePlunderers card) { + super(card); + } + + @Override + public DeadeyePlunderers copy() { + return new DeadeyePlunderers(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DeadeyeQuartermaster.java b/Mage.Sets/src/mage/cards/d/DeadeyeQuartermaster.java new file mode 100644 index 0000000000..049f6915fa --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DeadeyeQuartermaster.java @@ -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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author TheElk801 + */ +public class DeadeyeQuartermaster extends CardImpl { + + private static final FilterCard filter = new FilterCard("an Equipment or Vehicle card"); + + static { + filter.add(Predicates.or( + new SubtypePredicate(SubType.EQUIPMENT), + new SubtypePredicate(SubType.VEHICLE) + )); + } + + public DeadeyeQuartermaster(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Deadeye Quartermaster enters the battlefield, you may search your library for an Equipment or a Vehicle card and put it into your hand. If you do, shuffle your library. + TargetCardInLibrary target = new TargetCardInLibrary(1, 1, filter); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(target, true, true), true)); + } + + public DeadeyeQuartermaster(final DeadeyeQuartermaster card) { + super(card); + } + + @Override + public DeadeyeQuartermaster copy() { + return new DeadeyeQuartermaster(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DeadeyeTormentor.java b/Mage.Sets/src/mage/cards/d/DeadeyeTormentor.java new file mode 100644 index 0000000000..9e9e44ae28 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DeadeyeTormentor.java @@ -0,0 +1,73 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.target.common.TargetOpponent; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * + * @author TheElk801 + */ +public class DeadeyeTormentor extends CardImpl { + + public DeadeyeTormentor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Raid — When Deadeye Tormentor enters the battlefield, if you attacked with a creature this turn, target opponent discards a card. + Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1)), RaidCondition.instance, + "Raid - When {this} enters the battlefield, if you attacked with a creature this turn, target opponent discards a card."); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability, new PlayerAttackedWatcher()); + } + + public DeadeyeTormentor(final DeadeyeTormentor card) { + super(card); + } + + @Override + public DeadeyeTormentor copy() { + return new DeadeyeTormentor(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DeadeyeTracker.java b/Mage.Sets/src/mage/cards/d/DeadeyeTracker.java new file mode 100644 index 0000000000..405263345e --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DeadeyeTracker.java @@ -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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.effects.keyword.ExploreSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.target.common.TargetCardInOpponentsGraveyard; + +/** + * + * @author TheElk801 + */ +public class DeadeyeTracker extends CardImpl { + + public DeadeyeTracker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}{B}, {T}: Exile two target cards from an opponent's graveyard. Deadeye Tracker explores. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new TapSourceCost()); + ability.addCost(new ManaCostsImpl("{1}{B}")); + Effect effect = new ExploreSourceEffect(); + effect.setText("{this} explores"); + ability.addEffect(effect); + ability.addTarget(new TargetCardInOpponentsGraveyard(2, 2, new FilterCard("cards from an opponent's graveyard"), true)); + this.addAbility(ability); + } + + public DeadeyeTracker(final DeadeyeTracker card) { + super(card); + } + + @Override + public DeadeyeTracker copy() { + return new DeadeyeTracker(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DeadlyGrub.java b/Mage.Sets/src/mage/cards/d/DeadlyGrub.java index fd144f9749..109c981cd5 100644 --- a/Mage.Sets/src/mage/cards/d/DeadlyGrub.java +++ b/Mage.Sets/src/mage/cards/d/DeadlyGrub.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.VanishingUpkeepAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.game.permanent.token.DeadlyGrubToken; @@ -52,7 +53,7 @@ public class DeadlyGrub extends CardImpl { public DeadlyGrub(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DeadlyInsect.java b/Mage.Sets/src/mage/cards/d/DeadlyInsect.java index 29f9cbeede..d7dfc1656c 100644 --- a/Mage.Sets/src/mage/cards/d/DeadlyInsect.java +++ b/Mage.Sets/src/mage/cards/d/DeadlyInsect.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class DeadlyInsect extends CardImpl { public DeadlyInsect(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(6); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DeadlyRecluse.java b/Mage.Sets/src/mage/cards/d/DeadlyRecluse.java index 23fc7bea98..3d861b4a40 100644 --- a/Mage.Sets/src/mage/cards/d/DeadlyRecluse.java +++ b/Mage.Sets/src/mage/cards/d/DeadlyRecluse.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class DeadlyRecluse extends CardImpl { public DeadlyRecluse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(1); this.toughness = new MageInt(2); this.addAbility(ReachAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/d/DeadshotMinotaur.java b/Mage.Sets/src/mage/cards/d/DeadshotMinotaur.java index 240d296662..e909307049 100644 --- a/Mage.Sets/src/mage/cards/d/DeadshotMinotaur.java +++ b/Mage.Sets/src/mage/cards/d/DeadshotMinotaur.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; import mage.target.common.TargetCreaturePermanent; @@ -56,7 +57,7 @@ public class DeadshotMinotaur extends CardImpl { public DeadshotMinotaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{G}"); - this.subtype.add("Minotaur"); + this.subtype.add(SubType.MINOTAUR); diff --git a/Mage.Sets/src/mage/cards/d/DeadwoodTreefolk.java b/Mage.Sets/src/mage/cards/d/DeadwoodTreefolk.java index 25dce2ffa0..10311b5ad9 100644 --- a/Mage.Sets/src/mage/cards/d/DeadwoodTreefolk.java +++ b/Mage.Sets/src/mage/cards/d/DeadwoodTreefolk.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.VanishingUpkeepAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.AnotherCardPredicate; @@ -58,7 +59,7 @@ public class DeadwoodTreefolk extends CardImpl { public DeadwoodTreefolk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/DearlyDeparted.java b/Mage.Sets/src/mage/cards/d/DearlyDeparted.java index d919c1a159..74b092938b 100644 --- a/Mage.Sets/src/mage/cards/d/DearlyDeparted.java +++ b/Mage.Sets/src/mage/cards/d/DearlyDeparted.java @@ -51,7 +51,7 @@ public class DearlyDeparted extends CardImpl { public DearlyDeparted(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DeathBaron.java b/Mage.Sets/src/mage/cards/d/DeathBaron.java index 1b00b5a3f5..ecd892178f 100644 --- a/Mage.Sets/src/mage/cards/d/DeathBaron.java +++ b/Mage.Sets/src/mage/cards/d/DeathBaron.java @@ -59,8 +59,8 @@ public class DeathBaron extends CardImpl { public DeathBaron(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DeathCultist.java b/Mage.Sets/src/mage/cards/d/DeathCultist.java index 7410606e3c..7daf76b093 100644 --- a/Mage.Sets/src/mage/cards/d/DeathCultist.java +++ b/Mage.Sets/src/mage/cards/d/DeathCultist.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -47,8 +48,8 @@ public class DeathCultist extends CardImpl { public DeathCultist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DeathHoodCobra.java b/Mage.Sets/src/mage/cards/d/DeathHoodCobra.java index c878c81fbe..ce27747ec2 100644 --- a/Mage.Sets/src/mage/cards/d/DeathHoodCobra.java +++ b/Mage.Sets/src/mage/cards/d/DeathHoodCobra.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class DeathHoodCobra extends CardImpl { public DeathHoodCobra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DeathSpeakers.java b/Mage.Sets/src/mage/cards/d/DeathSpeakers.java index 0a98194858..788a81e2fa 100644 --- a/Mage.Sets/src/mage/cards/d/DeathSpeakers.java +++ b/Mage.Sets/src/mage/cards/d/DeathSpeakers.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class DeathSpeakers extends CardImpl { public DeathSpeakers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DeathTrooper.java b/Mage.Sets/src/mage/cards/d/DeathTrooper.java index a5464a6641..c7095be0ba 100644 --- a/Mage.Sets/src/mage/cards/d/DeathTrooper.java +++ b/Mage.Sets/src/mage/cards/d/DeathTrooper.java @@ -55,8 +55,8 @@ public class DeathTrooper extends CardImpl { public DeathTrooper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Trooper"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.TROOPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DeathWatch.java b/Mage.Sets/src/mage/cards/d/DeathWatch.java index 148b4f4f29..26f421155a 100644 --- a/Mage.Sets/src/mage/cards/d/DeathWatch.java +++ b/Mage.Sets/src/mage/cards/d/DeathWatch.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -52,7 +53,7 @@ public class DeathWatch extends CardImpl { public DeathWatch(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/d/DeathbellowRaider.java b/Mage.Sets/src/mage/cards/d/DeathbellowRaider.java index 2c1a254990..1d747bb48b 100644 --- a/Mage.Sets/src/mage/cards/d/DeathbellowRaider.java +++ b/Mage.Sets/src/mage/cards/d/DeathbellowRaider.java @@ -29,13 +29,14 @@ package mage.cards.d; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,14 +47,14 @@ public class DeathbellowRaider extends CardImpl { public DeathbellowRaider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(2); this.toughness = new MageInt(3); // Deathbellow Raider attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); // {2}{B}: Regenerate Deathbellow Raider. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{2}{B}"))); diff --git a/Mage.Sets/src/mage/cards/d/DeathbringerLiege.java b/Mage.Sets/src/mage/cards/d/DeathbringerLiege.java index 681ef57d90..614feb88da 100644 --- a/Mage.Sets/src/mage/cards/d/DeathbringerLiege.java +++ b/Mage.Sets/src/mage/cards/d/DeathbringerLiege.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -69,7 +70,7 @@ public class DeathbringerLiege extends CardImpl { public DeathbringerLiege (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W/B}{W/B}{W/B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DeathbringerRegent.java b/Mage.Sets/src/mage/cards/d/DeathbringerRegent.java index 92f60ee9aa..2d2fdd0c8d 100644 --- a/Mage.Sets/src/mage/cards/d/DeathbringerRegent.java +++ b/Mage.Sets/src/mage/cards/d/DeathbringerRegent.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -59,7 +60,7 @@ public class DeathbringerRegent extends CardImpl { public DeathbringerRegent(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/DeathbringerThoctar.java b/Mage.Sets/src/mage/cards/d/DeathbringerThoctar.java index 929d6ff21e..094e5b662e 100644 --- a/Mage.Sets/src/mage/cards/d/DeathbringerThoctar.java +++ b/Mage.Sets/src/mage/cards/d/DeathbringerThoctar.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreatureOrPlayer; @@ -50,8 +51,8 @@ public class DeathbringerThoctar extends CardImpl { public DeathbringerThoctar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{R}"); - this.subtype.add("Zombie"); - this.subtype.add("Beast"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.BEAST); diff --git a/Mage.Sets/src/mage/cards/d/DeathcapCultivator.java b/Mage.Sets/src/mage/cards/d/DeathcapCultivator.java index 0a9368901f..65ff59cb00 100644 --- a/Mage.Sets/src/mage/cards/d/DeathcapCultivator.java +++ b/Mage.Sets/src/mage/cards/d/DeathcapCultivator.java @@ -39,6 +39,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class DeathcapCultivator extends CardImpl { public DeathcapCultivator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DeathcoilWurm.java b/Mage.Sets/src/mage/cards/d/DeathcoilWurm.java index 8a3fb15982..975d5d0551 100644 --- a/Mage.Sets/src/mage/cards/d/DeathcoilWurm.java +++ b/Mage.Sets/src/mage/cards/d/DeathcoilWurm.java @@ -33,6 +33,7 @@ import mage.abilities.common.DamageAsThoughNotBlockedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class DeathcoilWurm extends CardImpl { public DeathcoilWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(7); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/DeathcultRogue.java b/Mage.Sets/src/mage/cards/d/DeathcultRogue.java index c8c2e31ee2..b229c0874f 100644 --- a/Mage.Sets/src/mage/cards/d/DeathcultRogue.java +++ b/Mage.Sets/src/mage/cards/d/DeathcultRogue.java @@ -49,8 +49,8 @@ public class DeathcultRogue extends CardImpl { public DeathcultRogue(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U/B}{U/B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DeathcurseOgre.java b/Mage.Sets/src/mage/cards/d/DeathcurseOgre.java index a00040a789..905dfe2060 100644 --- a/Mage.Sets/src/mage/cards/d/DeathcurseOgre.java +++ b/Mage.Sets/src/mage/cards/d/DeathcurseOgre.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.LoseLifeAllPlayersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class DeathcurseOgre extends CardImpl { public DeathcurseOgre (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DeathforgeShaman.java b/Mage.Sets/src/mage/cards/d/DeathforgeShaman.java index a3ae41d8ce..f389704351 100644 --- a/Mage.Sets/src/mage/cards/d/DeathforgeShaman.java +++ b/Mage.Sets/src/mage/cards/d/DeathforgeShaman.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MultikickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -51,8 +52,8 @@ public class DeathforgeShaman extends CardImpl { public DeathforgeShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DeathgazeCockatrice.java b/Mage.Sets/src/mage/cards/d/DeathgazeCockatrice.java index 8f737172a9..6968bd3ac3 100644 --- a/Mage.Sets/src/mage/cards/d/DeathgazeCockatrice.java +++ b/Mage.Sets/src/mage/cards/d/DeathgazeCockatrice.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class DeathgazeCockatrice extends CardImpl { public DeathgazeCockatrice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Cockatrice"); + this.subtype.add(SubType.COCKATRICE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/Deathgazer.java b/Mage.Sets/src/mage/cards/d/Deathgazer.java index 4b5bf1a4b8..219899c75b 100644 --- a/Mage.Sets/src/mage/cards/d/Deathgazer.java +++ b/Mage.Sets/src/mage/cards/d/Deathgazer.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -56,7 +57,7 @@ public class Deathgazer extends CardImpl { public Deathgazer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DeathgorgeScavenger.java b/Mage.Sets/src/mage/cards/d/DeathgorgeScavenger.java new file mode 100644 index 0000000000..868409cd85 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DeathgorgeScavenger.java @@ -0,0 +1,111 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldOrAttacksSourceTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInGraveyard; + +/** + * + * @author TheElk801 + */ +public class DeathgorgeScavenger extends CardImpl { + + public DeathgorgeScavenger(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Whenever Deathgorge Scavenger enters the battlefield or attacks, you may exile target card from a graveyard. If a creature card is exiled this way, you gain 2 life. If a noncreature card is exiled this way, Deathgorge Scavenger gets +1/+1 until end of turn. + Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new DeathgorgeScavengerEffect(), true); + ability.addTarget(new TargetCardInGraveyard()); + this.addAbility(ability); + } + + public DeathgorgeScavenger(final DeathgorgeScavenger card) { + super(card); + } + + @Override + public DeathgorgeScavenger copy() { + return new DeathgorgeScavenger(this); + } +} + +class DeathgorgeScavengerEffect extends OneShotEffect { + + public DeathgorgeScavengerEffect() { + super(Outcome.Benefit); + this.staticText = "exile target card from a graveyard. If a creature card is exiled this way, you gain 2 life. If a noncreature card is exiled this way, {this} gets +1/+1 until end of turn"; + } + + public DeathgorgeScavengerEffect(final DeathgorgeScavengerEffect effect) { + super(effect); + } + + @Override + public DeathgorgeScavengerEffect copy() { + return new DeathgorgeScavengerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Card card = game.getCard(getTargetPointer().getFirst(game, source)); + if (card != null) { + controller.moveCards(card, Zone.EXILED, source, game); + if (card.isCreature()) { + controller.gainLife(2, game); + } else { + game.addEffect(new BoostSourceEffect(1, 1, Duration.EndOfTurn), source); + } + } + return true; + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/cards/d/Deathgreeter.java b/Mage.Sets/src/mage/cards/d/Deathgreeter.java index b6676df309..de07f1ff60 100644 --- a/Mage.Sets/src/mage/cards/d/Deathgreeter.java +++ b/Mage.Sets/src/mage/cards/d/Deathgreeter.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class Deathgreeter extends CardImpl { public Deathgreeter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DeathknellKami.java b/Mage.Sets/src/mage/cards/d/DeathknellKami.java index ca7a58b262..d89427df4e 100644 --- a/Mage.Sets/src/mage/cards/d/DeathknellKami.java +++ b/Mage.Sets/src/mage/cards/d/DeathknellKami.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class DeathknellKami extends CardImpl { public DeathknellKami(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DeathlessAncient.java b/Mage.Sets/src/mage/cards/d/DeathlessAncient.java new file mode 100644 index 0000000000..1db85ec80b --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DeathlessAncient.java @@ -0,0 +1,86 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author caldover + */ +public class DeathlessAncient extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Vampires you control"); + + static { + filter.add(Predicates.not(new TappedPredicate())); + filter.add(new SubtypePredicate(SubType.VAMPIRE)); + } + + public DeathlessAncient(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Tap three untapped Vampires you control: Return Deathless Ancient from your graveyard to your hand. + this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, + new ReturnSourceFromGraveyardToHandEffect(), + new TapTargetCost(new TargetControlledPermanent(3, 3, filter, true)))); + + } + + public DeathlessAncient(final DeathlessAncient card) { + super(card); + } + + @Override + public DeathlessAncient copy() { + return new DeathlessAncient(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DeathlessAngel.java b/Mage.Sets/src/mage/cards/d/DeathlessAngel.java index d97c39d651..831294e15f 100644 --- a/Mage.Sets/src/mage/cards/d/DeathlessAngel.java +++ b/Mage.Sets/src/mage/cards/d/DeathlessAngel.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -52,7 +53,7 @@ public class DeathlessAngel extends CardImpl { public DeathlessAngel (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(5); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/d/DeathlessBehemoth.java b/Mage.Sets/src/mage/cards/d/DeathlessBehemoth.java index acc14ffc13..743a8da73f 100644 --- a/Mage.Sets/src/mage/cards/d/DeathlessBehemoth.java +++ b/Mage.Sets/src/mage/cards/d/DeathlessBehemoth.java @@ -59,7 +59,7 @@ public class DeathlessBehemoth extends CardImpl { public DeathlessBehemoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/DeathmarkPrelate.java b/Mage.Sets/src/mage/cards/d/DeathmarkPrelate.java index cbb3d69ebb..4b5d854d9e 100644 --- a/Mage.Sets/src/mage/cards/d/DeathmarkPrelate.java +++ b/Mage.Sets/src/mage/cards/d/DeathmarkPrelate.java @@ -64,8 +64,8 @@ public class DeathmarkPrelate extends CardImpl { public DeathmarkPrelate(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DeathmaskNezumi.java b/Mage.Sets/src/mage/cards/d/DeathmaskNezumi.java index 0dd0b7204a..f567b7e1d0 100644 --- a/Mage.Sets/src/mage/cards/d/DeathmaskNezumi.java +++ b/Mage.Sets/src/mage/cards/d/DeathmaskNezumi.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; @@ -52,8 +53,8 @@ public class DeathmaskNezumi extends CardImpl { public DeathmaskNezumi(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Rat"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.RAT); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DeathmistRaptor.java b/Mage.Sets/src/mage/cards/d/DeathmistRaptor.java index e0d8cdeefd..0eea387ca7 100644 --- a/Mage.Sets/src/mage/cards/d/DeathmistRaptor.java +++ b/Mage.Sets/src/mage/cards/d/DeathmistRaptor.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.game.Game; @@ -53,9 +54,9 @@ import mage.players.Player; public class DeathmistRaptor extends CardImpl { public DeathmistRaptor(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Lizard"); - this.subtype.add("Beast"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + this.subtype.add(SubType.DINOSAUR); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DeathpactAngel.java b/Mage.Sets/src/mage/cards/d/DeathpactAngel.java index cdbb65139a..03bbda894b 100644 --- a/Mage.Sets/src/mage/cards/d/DeathpactAngel.java +++ b/Mage.Sets/src/mage/cards/d/DeathpactAngel.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.DeathpactAngelToken; /** @@ -46,7 +47,7 @@ public class DeathpactAngel extends CardImpl { public DeathpactAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{B}{B}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/Deathrender.java b/Mage.Sets/src/mage/cards/d/Deathrender.java index a2ddb5aec9..bd1b6c8d1d 100644 --- a/Mage.Sets/src/mage/cards/d/Deathrender.java +++ b/Mage.Sets/src/mage/cards/d/Deathrender.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -56,7 +57,7 @@ public class Deathrender extends CardImpl { public Deathrender(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2))); diff --git a/Mage.Sets/src/mage/cards/d/DeathriteShaman.java b/Mage.Sets/src/mage/cards/d/DeathriteShaman.java index 5169ea8658..91d8071e99 100644 --- a/Mage.Sets/src/mage/cards/d/DeathriteShaman.java +++ b/Mage.Sets/src/mage/cards/d/DeathriteShaman.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.LoseLifeOpponentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.common.FilterCreatureCard; @@ -64,8 +65,8 @@ public class DeathriteShaman extends CardImpl { public DeathriteShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B/G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DeathsApproach.java b/Mage.Sets/src/mage/cards/d/DeathsApproach.java index c13fe4529e..1977ca4c8a 100644 --- a/Mage.Sets/src/mage/cards/d/DeathsApproach.java +++ b/Mage.Sets/src/mage/cards/d/DeathsApproach.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class DeathsApproach extends CardImpl { public DeathsApproach(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/d/DeathsHeadBuzzard.java b/Mage.Sets/src/mage/cards/d/DeathsHeadBuzzard.java index 97f8e59ecf..feed52b3dd 100644 --- a/Mage.Sets/src/mage/cards/d/DeathsHeadBuzzard.java +++ b/Mage.Sets/src/mage/cards/d/DeathsHeadBuzzard.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,7 +46,7 @@ public class DeathsHeadBuzzard extends CardImpl { public DeathsHeadBuzzard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DeathsShadow.java b/Mage.Sets/src/mage/cards/d/DeathsShadow.java index 5dbc8d7733..6bae1cb589 100644 --- a/Mage.Sets/src/mage/cards/d/DeathsShadow.java +++ b/Mage.Sets/src/mage/cards/d/DeathsShadow.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class DeathsShadow extends CardImpl { public DeathsShadow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(13); this.toughness = new MageInt(13); diff --git a/Mage.Sets/src/mage/cards/d/DeathsporeThallid.java b/Mage.Sets/src/mage/cards/d/DeathsporeThallid.java index fcb7bee064..cfcabc9cea 100644 --- a/Mage.Sets/src/mage/cards/d/DeathsporeThallid.java +++ b/Mage.Sets/src/mage/cards/d/DeathsporeThallid.java @@ -60,8 +60,8 @@ public class DeathsporeThallid extends CardImpl { public DeathsporeThallid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DebilitatingInjury.java b/Mage.Sets/src/mage/cards/d/DebilitatingInjury.java index d1608326fb..7ab0167e64 100644 --- a/Mage.Sets/src/mage/cards/d/DebilitatingInjury.java +++ b/Mage.Sets/src/mage/cards/d/DebilitatingInjury.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class DebilitatingInjury extends CardImpl { public DebilitatingInjury(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/d/DebtorsPulpit.java b/Mage.Sets/src/mage/cards/d/DebtorsPulpit.java index 042c332b79..9687f2c567 100644 --- a/Mage.Sets/src/mage/cards/d/DebtorsPulpit.java +++ b/Mage.Sets/src/mage/cards/d/DebtorsPulpit.java @@ -52,7 +52,7 @@ public class DebtorsPulpit extends CardImpl { public DebtorsPulpit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/d/DeceiverExarch.java b/Mage.Sets/src/mage/cards/d/DeceiverExarch.java index 38dce4182f..17d7af7efe 100644 --- a/Mage.Sets/src/mage/cards/d/DeceiverExarch.java +++ b/Mage.Sets/src/mage/cards/d/DeceiverExarch.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.FilterPermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -58,7 +59,7 @@ public class DeceiverExarch extends CardImpl { public DeceiverExarch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DeceiverOfForm.java b/Mage.Sets/src/mage/cards/d/DeceiverOfForm.java index 3e1d28722d..f8dd917bbf 100644 --- a/Mage.Sets/src/mage/cards/d/DeceiverOfForm.java +++ b/Mage.Sets/src/mage/cards/d/DeceiverOfForm.java @@ -50,7 +50,7 @@ public class DeceiverOfForm extends CardImpl { public DeceiverOfForm(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{C}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/d/DecimatorBeetle.java b/Mage.Sets/src/mage/cards/d/DecimatorBeetle.java index 2a3b879686..268395c6b9 100644 --- a/Mage.Sets/src/mage/cards/d/DecimatorBeetle.java +++ b/Mage.Sets/src/mage/cards/d/DecimatorBeetle.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.RemoveCounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -60,7 +61,7 @@ public class DecimatorBeetle extends CardImpl { public DecimatorBeetle(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DecimatorOfTheProvinces.java b/Mage.Sets/src/mage/cards/d/DecimatorOfTheProvinces.java index ff790e6b86..f162c18e94 100644 --- a/Mage.Sets/src/mage/cards/d/DecimatorOfTheProvinces.java +++ b/Mage.Sets/src/mage/cards/d/DecimatorOfTheProvinces.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; @@ -52,8 +53,8 @@ public class DecimatorOfTheProvinces extends CardImpl { public DecimatorOfTheProvinces(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{10}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Boar"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.BOAR); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/d/DeclarationOfNaught.java b/Mage.Sets/src/mage/cards/d/DeclarationOfNaught.java index afd5f0c8ca..da4dd1c605 100644 --- a/Mage.Sets/src/mage/cards/d/DeclarationOfNaught.java +++ b/Mage.Sets/src/mage/cards/d/DeclarationOfNaught.java @@ -28,7 +28,6 @@ package mage.cards.d; import java.util.UUID; -import mage.abilities.Ability; import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; @@ -37,10 +36,9 @@ import mage.abilities.effects.common.NameACardEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.TargetAdjustment; import mage.constants.Zone; import mage.filter.FilterSpell; -import mage.filter.predicate.mageobject.NamePredicate; -import mage.game.Game; import mage.target.TargetSpell; /** @@ -49,37 +47,23 @@ import mage.target.TargetSpell; */ public class DeclarationOfNaught extends CardImpl { - private final UUID originalId; static final private FilterSpell filter = new FilterSpell("spell with the chosen name"); public DeclarationOfNaught(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}"); // As Declaration of Naught enters the battlefield, name a card. this.addAbility(new AsEntersBattlefieldAbility(new NameACardEffect(NameACardEffect.TypeOfName.ALL))); // {U}: Counter target spell with the chosen name. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new ManaCostsImpl("{U}")); + ability.setTargetAdjustment(TargetAdjustment.CHOSEN_NAME); ability.addTarget(new TargetSpell(filter)); - originalId = ability.getOriginalId(); this.addAbility(ability); - - } - - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(originalId)) { - ability.getTargets().clear(); - FilterSpell filter2 = new FilterSpell("spell with the chosen name"); - filter2.add(new NamePredicate((String) game.getState().getValue(ability.getSourceId().toString() + NameACardEffect.INFO_KEY))); - TargetSpell target = new TargetSpell(1, filter2); - ability.addTarget(target); - } } public DeclarationOfNaught(final DeclarationOfNaught card) { super(card); - this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/cards/d/DecoratedGriffin.java b/Mage.Sets/src/mage/cards/d/DecoratedGriffin.java index 2d728288d1..9825502bf3 100644 --- a/Mage.Sets/src/mage/cards/d/DecoratedGriffin.java +++ b/Mage.Sets/src/mage/cards/d/DecoratedGriffin.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class DecoratedGriffin extends CardImpl { public DecoratedGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DecreeOfAnnihilation.java b/Mage.Sets/src/mage/cards/d/DecreeOfAnnihilation.java index a0f0d5c2b0..dc7170d11d 100644 --- a/Mage.Sets/src/mage/cards/d/DecreeOfAnnihilation.java +++ b/Mage.Sets/src/mage/cards/d/DecreeOfAnnihilation.java @@ -1,4 +1,4 @@ - /* +/* * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -27,7 +27,7 @@ */ package mage.cards.d; - import java.util.UUID; +import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.CycleTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; @@ -54,14 +54,14 @@ import mage.players.Player; public class DecreeOfAnnihilation extends CardImpl { public DecreeOfAnnihilation(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{8}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{8}{R}{R}"); // Exile all artifacts, creatures, and lands from the battlefield, all cards from all graveyards, and all cards from all hands. this.getSpellAbility().addEffect(new DecreeOfAnnihilationEffect()); // Cycling {5}{R}{R} this.addAbility(new CyclingAbility(new ManaCostsImpl("{5}{R}{R}"))); - + // When you cycle Decree of Annihilation, destroy all lands. Ability ability = new CycleTriggeredAbility(new DestroyAllEffect(StaticFilters.FILTER_LANDS), false); this.addAbility(ability); @@ -78,16 +78,16 @@ public class DecreeOfAnnihilation extends CardImpl { } class DecreeOfAnnihilationEffect extends OneShotEffect { - + private static final FilterPermanent filter = new FilterPermanent(""); - + static { filter.add(Predicates.or( new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.LAND))); } - + public DecreeOfAnnihilationEffect() { super(Outcome.Detriment); staticText = "Exile all artifacts, creatures, and lands from the battlefield, all cards from all graveyards, and all cards from all hands"; @@ -105,7 +105,7 @@ class DecreeOfAnnihilationEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { - permanent.moveToExile(id, "all artifacts, creatures, and land", id, game); + permanent.moveToExile(null, "", source.getSourceId(), game); } for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { Player player = game.getPlayer(playerId); diff --git a/Mage.Sets/src/mage/cards/d/DecreeOfSilence.java b/Mage.Sets/src/mage/cards/d/DecreeOfSilence.java index b8a5262544..2c641e7c7d 100644 --- a/Mage.Sets/src/mage/cards/d/DecreeOfSilence.java +++ b/Mage.Sets/src/mage/cards/d/DecreeOfSilence.java @@ -45,7 +45,7 @@ import mage.constants.CardType; import mage.constants.SetTargetPointer; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.StaticFilters; +import mage.filter.FilterSpell; import mage.target.TargetSpell; /** @@ -55,19 +55,19 @@ import mage.target.TargetSpell; public class DecreeOfSilence extends CardImpl { public DecreeOfSilence(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{6}{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{6}{U}{U}"); // Whenever an opponent casts a spell, counter that spell and put a depletion counter on Decree of Silence. If there are three or more depletion counters on Decree of Silence, sacrifice it. Effect effect = new CounterTargetEffect(); effect.setText("counter that spell"); - Ability ability = new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, effect, StaticFilters.FILTER_SPELL, - false, SetTargetPointer.SPELL); + Ability ability = new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, effect, new FilterSpell("a spell"), + false, SetTargetPointer.SPELL); effect = new AddCountersSourceEffect(CounterType.DEPLETION.createInstance()); effect.setText("and put a depletion counter on {this}."); ability.addEffect(effect); ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), - new SourceHasCounterCondition(CounterType.DEPLETION, 3, Integer.MAX_VALUE), - " If there are three or more depletion counters on {this}, sacrifice it")); + new SourceHasCounterCondition(CounterType.DEPLETION, 3, Integer.MAX_VALUE), + " If there are three or more depletion counters on {this}, sacrifice it")); this.addAbility(ability); // Cycling {4}{U}{U} this.addAbility(new CyclingAbility(new ManaCostsImpl("{4}{U}{U}"))); diff --git a/Mage.Sets/src/mage/cards/d/DedicatedMartyr.java b/Mage.Sets/src/mage/cards/d/DedicatedMartyr.java index 11af8c99c7..e225e1f9a6 100644 --- a/Mage.Sets/src/mage/cards/d/DedicatedMartyr.java +++ b/Mage.Sets/src/mage/cards/d/DedicatedMartyr.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class DedicatedMartyr extends CardImpl { public DedicatedMartyr(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DeepSeaKraken.java b/Mage.Sets/src/mage/cards/d/DeepSeaKraken.java index 892889812c..d6786cff18 100644 --- a/Mage.Sets/src/mage/cards/d/DeepSeaKraken.java +++ b/Mage.Sets/src/mage/cards/d/DeepSeaKraken.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SetTargetPointer; import mage.constants.TargetController; import mage.constants.Zone; @@ -60,7 +61,7 @@ public class DeepSeaKraken extends CardImpl { public DeepSeaKraken(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{7}{U}{U}{U}"); - this.subtype.add("Kraken"); + this.subtype.add(SubType.KRAKEN); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/DeepSeaSerpent.java b/Mage.Sets/src/mage/cards/d/DeepSeaSerpent.java index ee51d8722a..fed428204d 100644 --- a/Mage.Sets/src/mage/cards/d/DeepSeaSerpent.java +++ b/Mage.Sets/src/mage/cards/d/DeepSeaSerpent.java @@ -46,7 +46,7 @@ public class DeepSeaSerpent extends CardImpl { public DeepSeaSerpent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DeepSeaTerror.java b/Mage.Sets/src/mage/cards/d/DeepSeaTerror.java index a3ed9deebf..8649b276c5 100644 --- a/Mage.Sets/src/mage/cards/d/DeepSeaTerror.java +++ b/Mage.Sets/src/mage/cards/d/DeepSeaTerror.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.combat.CantAttackAnyPlayerSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class DeepSeaTerror extends CardImpl { public DeepSeaTerror(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/DeepSlumberTitan.java b/Mage.Sets/src/mage/cards/d/DeepSlumberTitan.java index 069ac2bcdb..9ba4941576 100644 --- a/Mage.Sets/src/mage/cards/d/DeepSlumberTitan.java +++ b/Mage.Sets/src/mage/cards/d/DeepSlumberTitan.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,8 +49,8 @@ public class DeepSlumberTitan extends CardImpl { public DeepSlumberTitan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/d/DeepSpawn.java b/Mage.Sets/src/mage/cards/d/DeepSpawn.java index 83fc08a90b..47a088228e 100644 --- a/Mage.Sets/src/mage/cards/d/DeepSpawn.java +++ b/Mage.Sets/src/mage/cards/d/DeepSpawn.java @@ -44,6 +44,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class DeepSpawn extends CardImpl { public DeepSpawn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}{U}"); - this.subtype.add("Homarid"); + this.subtype.add(SubType.HOMARID); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/DeepWater.java b/Mage.Sets/src/mage/cards/d/DeepWater.java new file mode 100644 index 0000000000..d4aebc95fc --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DeepWater.java @@ -0,0 +1,120 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageObject; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.events.ManaEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author L_J + */ +public class DeepWater extends CardImpl { + + public DeepWater(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}"); + + // {U}: Until end of turn, if you tap a land you control for mana, it produces {U} instead of any other type. + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DeepWaterReplacementEffect(), new ManaCostsImpl("{U}")); + this.addAbility(ability); + } + + public DeepWater(final DeepWater card) { + super(card); + } + + @Override + public DeepWater copy() { + return new DeepWater(this); + } +} + +class DeepWaterReplacementEffect extends ReplacementEffectImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent(); + + DeepWaterReplacementEffect() { + super(Duration.EndOfTurn, Outcome.Neutral); + staticText = "Until end of turn, if you tap a land you control for mana, it produces {U} instead of any other type"; + } + + DeepWaterReplacementEffect(final DeepWaterReplacementEffect effect) { + super(effect); + } + + @Override + public DeepWaterReplacementEffect copy() { + return new DeepWaterReplacementEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + ManaEvent manaEvent = (ManaEvent) event; + Mana mana = manaEvent.getMana(); + mana.setToMana(Mana.BlueMana(mana.count())); + return false; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == EventType.TAPPED_FOR_MANA; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + MageObject mageObject = game.getObject(event.getSourceId()); + if (mageObject != null && mageObject.isLand()) { + Permanent land = game.getPermanent(event.getSourceId()); + return land != null && filter.match(land, game); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/d/DeepcavernImp.java b/Mage.Sets/src/mage/cards/d/DeepcavernImp.java index 1f5fa402fb..bef9e5a8b4 100644 --- a/Mage.Sets/src/mage/cards/d/DeepcavernImp.java +++ b/Mage.Sets/src/mage/cards/d/DeepcavernImp.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class DeepcavernImp extends CardImpl { public DeepcavernImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Imp"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.IMP); + this.subtype.add(SubType.REBEL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DeepchannelMentor.java b/Mage.Sets/src/mage/cards/d/DeepchannelMentor.java index 9a31019d8a..e5f6875af4 100644 --- a/Mage.Sets/src/mage/cards/d/DeepchannelMentor.java +++ b/Mage.Sets/src/mage/cards/d/DeepchannelMentor.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -54,8 +55,8 @@ public class DeepchannelMentor extends CardImpl { public DeepchannelMentor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DeepfathomSkulker.java b/Mage.Sets/src/mage/cards/d/DeepfathomSkulker.java index 6b502cd9a7..cccfd7596a 100644 --- a/Mage.Sets/src/mage/cards/d/DeepfathomSkulker.java +++ b/Mage.Sets/src/mage/cards/d/DeepfathomSkulker.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.DamagedPlayerEvent; @@ -55,7 +56,7 @@ public class DeepfathomSkulker extends CardImpl { public DeepfathomSkulker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DeepfireElemental.java b/Mage.Sets/src/mage/cards/d/DeepfireElemental.java index 6d5f2bc6da..331de2866f 100644 --- a/Mage.Sets/src/mage/cards/d/DeepfireElemental.java +++ b/Mage.Sets/src/mage/cards/d/DeepfireElemental.java @@ -36,14 +36,12 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; +import mage.constants.SubType; +import mage.constants.TargetAdjustment; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; -import mage.game.Game; -import mage.target.Target; import mage.target.TargetPermanent; /** @@ -52,17 +50,18 @@ import mage.target.TargetPermanent; */ public class DeepfireElemental extends CardImpl { - private final UUID originalId; - private static final FilterPermanent filter = new FilterPermanent("artifact or creature with converted mana cost X"); static { - filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.CREATURE))); + filter.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.CREATURE) + )); } public DeepfireElemental(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{R}"); - this.subtype.add("Elemental"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{R}"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -70,25 +69,12 @@ public class DeepfireElemental extends CardImpl { // {X}{X}{1}: Destroy target artifact or creature with converted mana cost X. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{X}{X}{1}")); ability.addTarget(new TargetPermanent(filter)); - originalId = ability.getOriginalId(); + ability.setTargetAdjustment(TargetAdjustment.X_CMC_EQUAL_PERM); this.addAbility(ability); } - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(originalId)) { - ability.getTargets().clear(); - FilterPermanent newFilter = filter.copy(); - newFilter.setMessage(new StringBuilder("artifact or creature with converted mana cost {").append(ability.getManaCostsToPay().getX()).append('}').toString()); - newFilter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, ability.getManaCostsToPay().getX())); - Target target = new TargetPermanent(newFilter); - ability.addTarget(target); - } - } - public DeepfireElemental(final DeepfireElemental card) { super(card); - this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/cards/d/DeepglowSkate.java b/Mage.Sets/src/mage/cards/d/DeepglowSkate.java index e41dcc6223..a79f4c599d 100644 --- a/Mage.Sets/src/mage/cards/d/DeepglowSkate.java +++ b/Mage.Sets/src/mage/cards/d/DeepglowSkate.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.Counter; import mage.filter.FilterPermanent; @@ -52,7 +53,7 @@ public class DeepglowSkate extends CardImpl { public DeepglowSkate(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); - this.subtype.add("Fish"); + this.subtype.add(SubType.FISH); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DeeprootChampion.java b/Mage.Sets/src/mage/cards/d/DeeprootChampion.java new file mode 100644 index 0000000000..7d8e31f097 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DeeprootChampion.java @@ -0,0 +1,75 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author TheElk801 + */ +public class DeeprootChampion extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("a noncreature spell"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); + } + + public DeeprootChampion(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SHAMAN); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever you cast a noncreature spell, put a +1/+1 counter on Deeproot Champion. + this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter, false)); + } + + public DeeprootChampion(final DeeprootChampion card) { + super(card); + } + + @Override + public DeeprootChampion copy() { + return new DeeprootChampion(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DeeprootWarrior.java b/Mage.Sets/src/mage/cards/d/DeeprootWarrior.java new file mode 100644 index 0000000000..d8c8b5b83a --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DeeprootWarrior.java @@ -0,0 +1,69 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesBlockedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; + +/** + * + * @author LevelX2 + */ +public class DeeprootWarrior extends CardImpl { + + public DeeprootWarrior(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Deeproot Warrior becomes blocked, it gets +1/+1 until end of turn. + Effect effect = new BoostSourceEffect(1, 1, Duration.EndOfTurn); + effect.setText("it gets +1/+1 until end of turn"); + this.addAbility(new BecomesBlockedTriggeredAbility(effect, false)); + } + + public DeeprootWarrior(final DeeprootWarrior card) { + super(card); + } + + @Override + public DeeprootWarrior copy() { + return new DeeprootWarrior(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DeeprootWaters.java b/Mage.Sets/src/mage/cards/d/DeeprootWaters.java new file mode 100644 index 0000000000..f1c3aa6b8f --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DeeprootWaters.java @@ -0,0 +1,69 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.MerfolkHexproofToken; + +/** + * + * @author TacomenX + */ +public class DeeprootWaters extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("a Merfolk spell"); + + static { + filter.add(new SubtypePredicate(SubType.MERFOLK)); + } + + public DeeprootWaters(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + + + // Whenever you cast a Merfolk spell, create a 1/1 blue Merfolk creature token with hexproof. + this.addAbility(new SpellCastControllerTriggeredAbility(new CreateTokenEffect(new MerfolkHexproofToken()), filter, false)); + } + + public DeeprootWaters(final DeeprootWaters card) { + super(card); + } + + @Override + public DeeprootWaters copy() { + return new DeeprootWaters(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DeeptreadMerrow.java b/Mage.Sets/src/mage/cards/d/DeeptreadMerrow.java index 483ce380b5..7cb5d7ce7f 100644 --- a/Mage.Sets/src/mage/cards/d/DeeptreadMerrow.java +++ b/Mage.Sets/src/mage/cards/d/DeeptreadMerrow.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.IslandwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class DeeptreadMerrow extends CardImpl { public DeeptreadMerrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DeepwaterHypnotist.java b/Mage.Sets/src/mage/cards/d/DeepwaterHypnotist.java index 063990348a..0d9364785a 100644 --- a/Mage.Sets/src/mage/cards/d/DeepwaterHypnotist.java +++ b/Mage.Sets/src/mage/cards/d/DeepwaterHypnotist.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.InspiredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -56,8 +57,8 @@ public class DeepwaterHypnotist extends CardImpl { public DeepwaterHypnotist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DeepwoodDrummer.java b/Mage.Sets/src/mage/cards/d/DeepwoodDrummer.java index 77f4c05283..19d15c96f6 100644 --- a/Mage.Sets/src/mage/cards/d/DeepwoodDrummer.java +++ b/Mage.Sets/src/mage/cards/d/DeepwoodDrummer.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class DeepwoodDrummer extends CardImpl { public DeepwoodDrummer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DeepwoodGhoul.java b/Mage.Sets/src/mage/cards/d/DeepwoodGhoul.java index aa901ce929..cb91f7998f 100644 --- a/Mage.Sets/src/mage/cards/d/DeepwoodGhoul.java +++ b/Mage.Sets/src/mage/cards/d/DeepwoodGhoul.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class DeepwoodGhoul extends CardImpl { public DeepwoodGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DeepwoodLegate.java b/Mage.Sets/src/mage/cards/d/DeepwoodLegate.java index cec31c517b..adcc98b7e9 100644 --- a/Mage.Sets/src/mage/cards/d/DeepwoodLegate.java +++ b/Mage.Sets/src/mage/cards/d/DeepwoodLegate.java @@ -62,7 +62,7 @@ public class DeepwoodLegate extends CardImpl { public DeepwoodLegate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Shade"); + this.subtype.add(SubType.SHADE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DeepwoodTantiv.java b/Mage.Sets/src/mage/cards/d/DeepwoodTantiv.java index c1395239bd..4ee5e32eb2 100644 --- a/Mage.Sets/src/mage/cards/d/DeepwoodTantiv.java +++ b/Mage.Sets/src/mage/cards/d/DeepwoodTantiv.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class DeepwoodTantiv extends CardImpl { public DeepwoodTantiv(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DeepwoodWolverine.java b/Mage.Sets/src/mage/cards/d/DeepwoodWolverine.java index dc7d34bac6..7c40d32aaa 100644 --- a/Mage.Sets/src/mage/cards/d/DeepwoodWolverine.java +++ b/Mage.Sets/src/mage/cards/d/DeepwoodWolverine.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,7 +46,7 @@ public class DeepwoodWolverine extends CardImpl { public DeepwoodWolverine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Wolverine"); + this.subtype.add(SubType.WOLVERINE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/Defang.java b/Mage.Sets/src/mage/cards/d/Defang.java index 32b1ee4ad1..96dc34cdb6 100644 --- a/Mage.Sets/src/mage/cards/d/Defang.java +++ b/Mage.Sets/src/mage/cards/d/Defang.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class Defang extends CardImpl { public Defang(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/d/DefenderEnVec.java b/Mage.Sets/src/mage/cards/d/DefenderEnVec.java index 5108aa9a44..7b1236370c 100644 --- a/Mage.Sets/src/mage/cards/d/DefenderEnVec.java +++ b/Mage.Sets/src/mage/cards/d/DefenderEnVec.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FadingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -50,8 +51,8 @@ public class DefenderEnVec extends CardImpl { public DefenderEnVec(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DefenderOfChaos.java b/Mage.Sets/src/mage/cards/d/DefenderOfChaos.java index 4bf364a39e..9fb3083233 100644 --- a/Mage.Sets/src/mage/cards/d/DefenderOfChaos.java +++ b/Mage.Sets/src/mage/cards/d/DefenderOfChaos.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Backfir3 @@ -43,8 +44,8 @@ public class DefenderOfChaos extends CardImpl { public DefenderOfChaos(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DefenderOfLaw.java b/Mage.Sets/src/mage/cards/d/DefenderOfLaw.java index 8626910c3a..3e0ad68c96 100644 --- a/Mage.Sets/src/mage/cards/d/DefenderOfLaw.java +++ b/Mage.Sets/src/mage/cards/d/DefenderOfLaw.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Backfir3 @@ -43,8 +44,8 @@ public class DefenderOfLaw extends CardImpl { public DefenderOfLaw(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DefenderOfTheOrder.java b/Mage.Sets/src/mage/cards/d/DefenderOfTheOrder.java index 6e432c0c65..6740aaeeae 100644 --- a/Mage.Sets/src/mage/cards/d/DefenderOfTheOrder.java +++ b/Mage.Sets/src/mage/cards/d/DefenderOfTheOrder.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,8 +47,8 @@ public class DefenderOfTheOrder extends CardImpl { public DefenderOfTheOrder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DefensiveStance.java b/Mage.Sets/src/mage/cards/d/DefensiveStance.java index e173d585ea..b309c04ae2 100644 --- a/Mage.Sets/src/mage/cards/d/DefensiveStance.java +++ b/Mage.Sets/src/mage/cards/d/DefensiveStance.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class DefensiveStance extends CardImpl { public DefensiveStance(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/d/DefiantBloodlord.java b/Mage.Sets/src/mage/cards/d/DefiantBloodlord.java index 8a2fb58e48..c670833463 100644 --- a/Mage.Sets/src/mage/cards/d/DefiantBloodlord.java +++ b/Mage.Sets/src/mage/cards/d/DefiantBloodlord.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -49,7 +50,7 @@ public class DefiantBloodlord extends CardImpl { public DefiantBloodlord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DefiantElf.java b/Mage.Sets/src/mage/cards/d/DefiantElf.java index fa795ef7cd..d42cb42681 100644 --- a/Mage.Sets/src/mage/cards/d/DefiantElf.java +++ b/Mage.Sets/src/mage/cards/d/DefiantElf.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class DefiantElf extends CardImpl { public DefiantElf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DefiantFalcon.java b/Mage.Sets/src/mage/cards/d/DefiantFalcon.java index c164c9c571..5a59f0b502 100644 --- a/Mage.Sets/src/mage/cards/d/DefiantFalcon.java +++ b/Mage.Sets/src/mage/cards/d/DefiantFalcon.java @@ -60,8 +60,8 @@ public class DefiantFalcon extends CardImpl { public DefiantFalcon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Rebel"); - this.subtype.add("Bird"); + this.subtype.add(SubType.REBEL); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DefiantGreatmaw.java b/Mage.Sets/src/mage/cards/d/DefiantGreatmaw.java index 56994aac9f..b465588e35 100644 --- a/Mage.Sets/src/mage/cards/d/DefiantGreatmaw.java +++ b/Mage.Sets/src/mage/cards/d/DefiantGreatmaw.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.RemoveCounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; @@ -57,7 +58,7 @@ public class DefiantGreatmaw extends CardImpl { public DefiantGreatmaw(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Hippo"); + this.subtype.add(SubType.HIPPO); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DefiantKhenra.java b/Mage.Sets/src/mage/cards/d/DefiantKhenra.java index 8c3f4a3bf8..ef519ea7d7 100644 --- a/Mage.Sets/src/mage/cards/d/DefiantKhenra.java +++ b/Mage.Sets/src/mage/cards/d/DefiantKhenra.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class DefiantKhenra extends CardImpl { public DefiantKhenra(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Jackal"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.JACKAL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); } diff --git a/Mage.Sets/src/mage/cards/d/DefiantOgre.java b/Mage.Sets/src/mage/cards/d/DefiantOgre.java index 391972d2f4..665c3168ca 100644 --- a/Mage.Sets/src/mage/cards/d/DefiantOgre.java +++ b/Mage.Sets/src/mage/cards/d/DefiantOgre.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetArtifactPermanent; @@ -48,8 +49,8 @@ public class DefiantOgre extends CardImpl { public DefiantOgre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DefiantSalvager.java b/Mage.Sets/src/mage/cards/d/DefiantSalvager.java index 7a754c3319..24ffefbf89 100644 --- a/Mage.Sets/src/mage/cards/d/DefiantSalvager.java +++ b/Mage.Sets/src/mage/cards/d/DefiantSalvager.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterControlledPermanent; @@ -58,8 +59,8 @@ public class DefiantSalvager extends CardImpl { public DefiantSalvager(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Aetherborn"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.AETHERBORN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DefiantStand.java b/Mage.Sets/src/mage/cards/d/DefiantStand.java new file mode 100644 index 0000000000..cc089e3303 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DefiantStand.java @@ -0,0 +1,76 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility; +import mage.abilities.condition.common.AttackedThisStepCondition; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.PhaseStep; +import mage.constants.TurnPhase; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.common.PlayerAttackedStepWatcher; + +/** + * + * @author TheElk801 + */ +public class DefiantStand extends CardImpl { + + public DefiantStand(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}"); + + // Cast Defiant Stand only during the declare attackers step and only if you've been attacked this step. + Ability ability = new CastOnlyDuringPhaseStepSourceAbility( + TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance, + "Cast {this} only during the declare attackers step and only if you've been attacked this step." + ); + ability.addWatcher(new PlayerAttackedStepWatcher()); + this.addAbility(ability); + + // Target creature gets +1/+3 until end of turn. Untap that creature. + this.getSpellAbility().addEffect(new BoostTargetEffect(1, 3, Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap that creature")); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public DefiantStand(final DefiantStand card) { + super(card); + } + + @Override + public DefiantStand copy() { + return new DefiantStand(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DefiantVanguard.java b/Mage.Sets/src/mage/cards/d/DefiantVanguard.java index 3160a5274c..3b28b8d6dc 100644 --- a/Mage.Sets/src/mage/cards/d/DefiantVanguard.java +++ b/Mage.Sets/src/mage/cards/d/DefiantVanguard.java @@ -73,14 +73,17 @@ public class DefiantVanguard extends CardImpl { public DefiantVanguard(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); this.power = new MageInt(2); this.toughness = new MageInt(2); // When Defiant Vanguard blocks, at end of combat, destroy it and all creatures it blocked this turn. this.addAbility( - new BlocksTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new DefiantVanguardEffect())), false), + new BlocksTriggeredAbility( + new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new DefiantVanguardEffect())), + false, false, true + ), new BlockedAttackerWatcher() ); diff --git a/Mage.Sets/src/mage/cards/d/DefilerOfSouls.java b/Mage.Sets/src/mage/cards/d/DefilerOfSouls.java index c338fa9129..9f4b497438 100644 --- a/Mage.Sets/src/mage/cards/d/DefilerOfSouls.java +++ b/Mage.Sets/src/mage/cards/d/DefilerOfSouls.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class DefilerOfSouls extends CardImpl { public DefilerOfSouls(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{R}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); diff --git a/Mage.Sets/src/mage/cards/d/DeftDuelist.java b/Mage.Sets/src/mage/cards/d/DeftDuelist.java index 43b399cd21..3132a6a98d 100644 --- a/Mage.Sets/src/mage/cards/d/DeftDuelist.java +++ b/Mage.Sets/src/mage/cards/d/DeftDuelist.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class DeftDuelist extends CardImpl { public DeftDuelist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DeftbladeElite.java b/Mage.Sets/src/mage/cards/d/DeftbladeElite.java index 68bdadbe34..228d133023 100644 --- a/Mage.Sets/src/mage/cards/d/DeftbladeElite.java +++ b/Mage.Sets/src/mage/cards/d/DeftbladeElite.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class DeftbladeElite extends CardImpl { public DeftbladeElite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DegaDisciple.java b/Mage.Sets/src/mage/cards/d/DegaDisciple.java index 04668e2fd6..dd1ce92470 100644 --- a/Mage.Sets/src/mage/cards/d/DegaDisciple.java +++ b/Mage.Sets/src/mage/cards/d/DegaDisciple.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class DegaDisciple extends CardImpl { public DegaDisciple(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DegaSanctuary.java b/Mage.Sets/src/mage/cards/d/DegaSanctuary.java new file mode 100644 index 0000000000..67141fe4cb --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DegaSanctuary.java @@ -0,0 +1,65 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SanctuaryTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class DegaSanctuary extends CardImpl { + + public DegaSanctuary(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + + // At the beginning of your upkeep, if you control a black or red permanent, you gain 2 life. If you control a black permanent and a red permanent, you gain 4 life instead. + Ability ability = new SanctuaryTriggeredAbility( + new GainLifeEffect(2), new GainLifeEffect(4), ObjectColor.BLACK, ObjectColor.RED, + "At the beginning of your upkeep, if you control a black or red permanent, you gain 2 life. " + + "If you control a black permanent and a red permanent, you gain 4 life instead." + ); + this.addAbility(ability); + } + + public DegaSanctuary(final DegaSanctuary card) { + super(card); + } + + @Override + public DegaSanctuary copy() { + return new DegaSanctuary(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/Degavolver.java b/Mage.Sets/src/mage/cards/d/Degavolver.java index c557a3256a..0b3c5965ca 100644 --- a/Mage.Sets/src/mage/cards/d/Degavolver.java +++ b/Mage.Sets/src/mage/cards/d/Degavolver.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -54,7 +55,7 @@ public class Degavolver extends CardImpl { public Degavolver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Volver"); + this.subtype.add(SubType.VOLVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/Dehydration.java b/Mage.Sets/src/mage/cards/d/Dehydration.java index f55749b6b2..87069b5548 100644 --- a/Mage.Sets/src/mage/cards/d/Dehydration.java +++ b/Mage.Sets/src/mage/cards/d/Dehydration.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -48,7 +49,7 @@ public class Dehydration extends CardImpl { public Dehydration(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/d/DeityOfScars.java b/Mage.Sets/src/mage/cards/d/DeityOfScars.java index ef29835776..6d979524ba 100644 --- a/Mage.Sets/src/mage/cards/d/DeityOfScars.java +++ b/Mage.Sets/src/mage/cards/d/DeityOfScars.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -49,10 +50,9 @@ import mage.counters.CounterType; public class DeityOfScars extends CardImpl { public DeityOfScars(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B/G}{B/G}{B/G}{B/G}{B/G}"); - this.subtype.add("Spirit"); - this.subtype.add("Avatar"); - + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B/G}{B/G}{B/G}{B/G}{B/G}"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(7); this.toughness = new MageInt(7); @@ -61,7 +61,7 @@ public class DeityOfScars extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // Deity of Scars enters the battlefield with two -1/-1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.M1M1.createInstance(2)))); + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.M1M1.createInstance(2)), "with two -1/-1 counters on it")); // {B/G}, Remove a -1/-1 counter from Deity of Scars: Regenerate Deity of Scars. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{B/G}")); diff --git a/Mage.Sets/src/mage/cards/d/Delraich.java b/Mage.Sets/src/mage/cards/d/Delraich.java index 4ae625a893..0e2a8d364f 100644 --- a/Mage.Sets/src/mage/cards/d/Delraich.java +++ b/Mage.Sets/src/mage/cards/d/Delraich.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.target.common.TargetControlledPermanent; @@ -55,7 +56,7 @@ public class Delraich extends CardImpl { public Delraich(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/DelverOfSecrets.java b/Mage.Sets/src/mage/cards/d/DelverOfSecrets.java index f6e260ebd1..c0c9cf8ad3 100644 --- a/Mage.Sets/src/mage/cards/d/DelverOfSecrets.java +++ b/Mage.Sets/src/mage/cards/d/DelverOfSecrets.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.*; import mage.cards.i.InsectileAberration; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.filter.FilterCard; @@ -53,8 +54,8 @@ public class DelverOfSecrets extends CardImpl { public DelverOfSecrets(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DementiaBat.java b/Mage.Sets/src/mage/cards/d/DementiaBat.java index 9e673a821b..5cf1f51344 100644 --- a/Mage.Sets/src/mage/cards/d/DementiaBat.java +++ b/Mage.Sets/src/mage/cards/d/DementiaBat.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -48,7 +49,7 @@ public class DementiaBat extends CardImpl { public DementiaBat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Bat"); + this.subtype.add(SubType.BAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DementiaSliver.java b/Mage.Sets/src/mage/cards/d/DementiaSliver.java index 2480eda08d..8e5cfb838b 100644 --- a/Mage.Sets/src/mage/cards/d/DementiaSliver.java +++ b/Mage.Sets/src/mage/cards/d/DementiaSliver.java @@ -51,7 +51,7 @@ import mage.target.common.TargetOpponent; * @author fireshoes */ public class DementiaSliver extends CardImpl { - + private static final FilterPermanent filter = new FilterPermanent("All Slivers"); static { @@ -59,8 +59,8 @@ public class DementiaSliver extends CardImpl { } public DementiaSliver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{B}"); - this.subtype.add("Sliver"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{B}"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -70,7 +70,12 @@ public class DementiaSliver extends CardImpl { gainedAbility.addTarget(new TargetOpponent()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(gainedAbility, Duration.WhileOnBattlefield, filter, - "All Slivers have \"{T}: Name a card. Target opponent reveals a card at random from his or her hand. If it's the named card, that player discards it\""))); + "All Slivers have \"{T}: Choose a card name. " + + "Target opponent reveals a card at random from his or her hand." + + " If that card has the chosen name, that player discards it." + + " Activate this ability only during your turn.\"" + ) + )); } public DementiaSliver(final DementiaSliver card) { @@ -98,7 +103,7 @@ class DementiaSliverEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player opponent = game.getPlayer(targetPointer.getFirst(game, source)); MageObject sourceObject = game.getObject(source.getSourceId()); - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); if (opponent != null && sourceObject != null && !cardName.isEmpty()) { if (!opponent.getHand().isEmpty()) { Cards revealed = new CardsImpl(); @@ -121,4 +126,4 @@ class DementiaSliverEffect extends OneShotEffect { return new DementiaSliverEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/d/DemigodOfRevenge.java b/Mage.Sets/src/mage/cards/d/DemigodOfRevenge.java index de5a7ce4c0..673aa2fa9d 100644 --- a/Mage.Sets/src/mage/cards/d/DemigodOfRevenge.java +++ b/Mage.Sets/src/mage/cards/d/DemigodOfRevenge.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -52,8 +53,8 @@ public class DemigodOfRevenge extends CardImpl { public DemigodOfRevenge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B/R}{B/R}{B/R}{B/R}{B/R}"); - this.subtype.add("Spirit"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DemonOfDarkSchemes.java b/Mage.Sets/src/mage/cards/d/DemonOfDarkSchemes.java index 578be6379f..937736289f 100644 --- a/Mage.Sets/src/mage/cards/d/DemonOfDarkSchemes.java +++ b/Mage.Sets/src/mage/cards/d/DemonOfDarkSchemes.java @@ -43,6 +43,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -56,7 +57,7 @@ public class DemonOfDarkSchemes extends CardImpl { public DemonOfDarkSchemes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DemonOfDeathsGate.java b/Mage.Sets/src/mage/cards/d/DemonOfDeathsGate.java index 520c9326b1..7741ebda95 100644 --- a/Mage.Sets/src/mage/cards/d/DemonOfDeathsGate.java +++ b/Mage.Sets/src/mage/cards/d/DemonOfDeathsGate.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.target.common.TargetControlledPermanent; @@ -57,7 +58,7 @@ public class DemonOfDeathsGate extends CardImpl { public DemonOfDeathsGate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{B}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(9); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/d/DemonOfWailingAgonies.java b/Mage.Sets/src/mage/cards/d/DemonOfWailingAgonies.java index 7c33892e87..e506772853 100644 --- a/Mage.Sets/src/mage/cards/d/DemonOfWailingAgonies.java +++ b/Mage.Sets/src/mage/cards/d/DemonOfWailingAgonies.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; /** @@ -49,7 +50,7 @@ public class DemonOfWailingAgonies extends CardImpl { public DemonOfWailingAgonies(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DemonPossessedWitch.java b/Mage.Sets/src/mage/cards/d/DemonPossessedWitch.java index 7cc4409c5c..0da73a8291 100644 --- a/Mage.Sets/src/mage/cards/d/DemonPossessedWitch.java +++ b/Mage.Sets/src/mage/cards/d/DemonPossessedWitch.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; @@ -52,8 +53,8 @@ public class DemonPossessedWitch extends CardImpl { public DemonPossessedWitch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(3); this.color.setBlack(true); diff --git a/Mage.Sets/src/mage/cards/d/DemonicAppetite.java b/Mage.Sets/src/mage/cards/d/DemonicAppetite.java index ec9669c659..9daf72d02c 100644 --- a/Mage.Sets/src/mage/cards/d/DemonicAppetite.java +++ b/Mage.Sets/src/mage/cards/d/DemonicAppetite.java @@ -51,7 +51,7 @@ public class DemonicAppetite extends CardImpl { public DemonicAppetite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature you control TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/d/DemonicHordes.java b/Mage.Sets/src/mage/cards/d/DemonicHordes.java index 1019b6d746..fc9d2271d3 100644 --- a/Mage.Sets/src/mage/cards/d/DemonicHordes.java +++ b/Mage.Sets/src/mage/cards/d/DemonicHordes.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -61,7 +62,7 @@ public class DemonicHordes extends CardImpl { public DemonicHordes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DemonicTaskmaster.java b/Mage.Sets/src/mage/cards/d/DemonicTaskmaster.java index 0f114bd82c..5c7381acc6 100644 --- a/Mage.Sets/src/mage/cards/d/DemonicTaskmaster.java +++ b/Mage.Sets/src/mage/cards/d/DemonicTaskmaster.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -54,7 +55,7 @@ public class DemonicTaskmaster extends CardImpl { public DemonicTaskmaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DemonicTorment.java b/Mage.Sets/src/mage/cards/d/DemonicTorment.java index 5cc923a040..dc04d29e71 100644 --- a/Mage.Sets/src/mage/cards/d/DemonicTorment.java +++ b/Mage.Sets/src/mage/cards/d/DemonicTorment.java @@ -48,7 +48,7 @@ public class DemonicTorment extends CardImpl { public DemonicTorment(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/d/DemonlordOfAshmouth.java b/Mage.Sets/src/mage/cards/d/DemonlordOfAshmouth.java index 5ec9914125..43fe1b418e 100644 --- a/Mage.Sets/src/mage/cards/d/DemonlordOfAshmouth.java +++ b/Mage.Sets/src/mage/cards/d/DemonlordOfAshmouth.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.UndyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.common.TargetControlledPermanent; @@ -54,7 +55,7 @@ public class DemonlordOfAshmouth extends CardImpl { public DemonlordOfAshmouth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DemonmailHauberk.java b/Mage.Sets/src/mage/cards/d/DemonmailHauberk.java index 07ea818e70..4ec10651c0 100644 --- a/Mage.Sets/src/mage/cards/d/DemonmailHauberk.java +++ b/Mage.Sets/src/mage/cards/d/DemonmailHauberk.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -47,7 +48,7 @@ public class DemonmailHauberk extends CardImpl { public DemonmailHauberk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equip - Sacrifice a creature. this.addAbility(new EquipAbility(Outcome.AddAbility, new SacrificeTargetCost(new TargetControlledCreaturePermanent()))); diff --git a/Mage.Sets/src/mage/cards/d/DemonsHerald.java b/Mage.Sets/src/mage/cards/d/DemonsHerald.java index 50bee6b416..3fb7ea6e6c 100644 --- a/Mage.Sets/src/mage/cards/d/DemonsHerald.java +++ b/Mage.Sets/src/mage/cards/d/DemonsHerald.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.common.FilterControlledCreaturePermanent; @@ -67,8 +68,8 @@ public class DemonsHerald extends CardImpl { public DemonsHerald(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DemonsJester.java b/Mage.Sets/src/mage/cards/d/DemonsJester.java index 13c1f1873e..be8c2c4188 100644 --- a/Mage.Sets/src/mage/cards/d/DemonsJester.java +++ b/Mage.Sets/src/mage/cards/d/DemonsJester.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class DemonsJester extends CardImpl { public DemonsJester(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DemonspineWhip.java b/Mage.Sets/src/mage/cards/d/DemonspineWhip.java index afb4eeb758..8c90a93e9b 100644 --- a/Mage.Sets/src/mage/cards/d/DemonspineWhip.java +++ b/Mage.Sets/src/mage/cards/d/DemonspineWhip.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class DemonspineWhip extends CardImpl { public DemonspineWhip(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{B}{R}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // {X}: Equipped creature gets +X/+0 until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new XPaid(), new StaticValue(0), Duration.EndOfTurn), new ManaCostsImpl("{X}"))); diff --git a/Mage.Sets/src/mage/cards/d/DenProtector.java b/Mage.Sets/src/mage/cards/d/DenProtector.java index ae954b7b2a..1d6bd8f8d9 100644 --- a/Mage.Sets/src/mage/cards/d/DenProtector.java +++ b/Mage.Sets/src/mage/cards/d/DenProtector.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCardInYourGraveyard; @@ -50,8 +51,8 @@ public class DenProtector extends CardImpl { public DenProtector(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DenizenOfTheDeep.java b/Mage.Sets/src/mage/cards/d/DenizenOfTheDeep.java index 583d998b93..8a2b778565 100644 --- a/Mage.Sets/src/mage/cards/d/DenizenOfTheDeep.java +++ b/Mage.Sets/src/mage/cards/d/DenizenOfTheDeep.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -52,7 +53,7 @@ public class DenizenOfTheDeep extends CardImpl { public DenizenOfTheDeep(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{U}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(11); this.toughness = new MageInt(11); diff --git a/Mage.Sets/src/mage/cards/d/DepalaPilotExemplar.java b/Mage.Sets/src/mage/cards/d/DepalaPilotExemplar.java index 8ec56896b8..d904eea100 100644 --- a/Mage.Sets/src/mage/cards/d/DepalaPilotExemplar.java +++ b/Mage.Sets/src/mage/cards/d/DepalaPilotExemplar.java @@ -59,8 +59,8 @@ public class DepalaPilotExemplar extends CardImpl { public DepalaPilotExemplar(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dwarf"); - this.subtype.add("Pilot"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.PILOT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DepthsOfDesire.java b/Mage.Sets/src/mage/cards/d/DepthsOfDesire.java new file mode 100644 index 0000000000..04130305f1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DepthsOfDesire.java @@ -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.cards.d; + +import java.util.UUID; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.permanent.token.TreasureToken; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class DepthsOfDesire extends CardImpl { + + public DepthsOfDesire(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}"); + + // Return target creature to its owner's hand. Create a colorless Treasure token with "{t}, Sacrifice this artifact: Add one mana of any color to your mana pool." + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addEffect(new CreateTokenEffect(new TreasureToken())); + } + + public DepthsOfDesire(final DepthsOfDesire card) { + super(card); + } + + @Override + public DepthsOfDesire copy() { + return new DepthsOfDesire(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DeputizedProtester.java b/Mage.Sets/src/mage/cards/d/DeputizedProtester.java index c6f6bc8ab9..b5550b8828 100644 --- a/Mage.Sets/src/mage/cards/d/DeputizedProtester.java +++ b/Mage.Sets/src/mage/cards/d/DeputizedProtester.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class DeputizedProtester extends CardImpl { public DeputizedProtester(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DeputyOfAcquittals.java b/Mage.Sets/src/mage/cards/d/DeputyOfAcquittals.java index f7169432b5..4654005151 100644 --- a/Mage.Sets/src/mage/cards/d/DeputyOfAcquittals.java +++ b/Mage.Sets/src/mage/cards/d/DeputyOfAcquittals.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -57,8 +58,8 @@ public class DeputyOfAcquittals extends CardImpl { public DeputyOfAcquittals(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DerangedAssistant.java b/Mage.Sets/src/mage/cards/d/DerangedAssistant.java index aad4f9541a..47638deec9 100644 --- a/Mage.Sets/src/mage/cards/d/DerangedAssistant.java +++ b/Mage.Sets/src/mage/cards/d/DerangedAssistant.java @@ -34,6 +34,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class DerangedAssistant extends CardImpl { public DerangedAssistant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DerangedHermit.java b/Mage.Sets/src/mage/cards/d/DerangedHermit.java index 8f61d91da8..bfa613bf75 100644 --- a/Mage.Sets/src/mage/cards/d/DerangedHermit.java +++ b/Mage.Sets/src/mage/cards/d/DerangedHermit.java @@ -58,7 +58,7 @@ public class DerangedHermit extends CardImpl { public DerangedHermit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DerangedOutcast.java b/Mage.Sets/src/mage/cards/d/DerangedOutcast.java index 45d8b2b71b..7e0ded1c21 100644 --- a/Mage.Sets/src/mage/cards/d/DerangedOutcast.java +++ b/Mage.Sets/src/mage/cards/d/DerangedOutcast.java @@ -58,8 +58,8 @@ public class DerangedOutcast extends CardImpl { public DerangedOutcast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DerangedWhelp.java b/Mage.Sets/src/mage/cards/d/DerangedWhelp.java index 88e7228b14..7b00a45fb7 100644 --- a/Mage.Sets/src/mage/cards/d/DerangedWhelp.java +++ b/Mage.Sets/src/mage/cards/d/DerangedWhelp.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class DerangedWhelp extends CardImpl { public DerangedWhelp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/Derelor.java b/Mage.Sets/src/mage/cards/d/Derelor.java index 12852f8fb5..5c466873cd 100644 --- a/Mage.Sets/src/mage/cards/d/Derelor.java +++ b/Mage.Sets/src/mage/cards/d/Derelor.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.cost.SpellsCostIncreasementControllerEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ColorPredicate; @@ -54,7 +55,7 @@ public class Derelor extends CardImpl { public Derelor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Thrull"); + this.subtype.add(SubType.THRULL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DereviEmpyrialTactician.java b/Mage.Sets/src/mage/cards/d/DereviEmpyrialTactician.java index 0368da6697..38fd233b3a 100644 --- a/Mage.Sets/src/mage/cards/d/DereviEmpyrialTactician.java +++ b/Mage.Sets/src/mage/cards/d/DereviEmpyrialTactician.java @@ -41,6 +41,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -61,8 +62,8 @@ public class DereviEmpyrialTactician extends CardImpl { public DereviEmpyrialTactician(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Bird"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/Dermoplasm.java b/Mage.Sets/src/mage/cards/d/Dermoplasm.java index b54af6914e..3fe7abef13 100644 --- a/Mage.Sets/src/mage/cards/d/Dermoplasm.java +++ b/Mage.Sets/src/mage/cards/d/Dermoplasm.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -57,7 +58,7 @@ public class Dermoplasm extends CardImpl { public Dermoplasm(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DescendantOfKiyomaro.java b/Mage.Sets/src/mage/cards/d/DescendantOfKiyomaro.java index 22da50ac1e..3119f0ffe2 100644 --- a/Mage.Sets/src/mage/cards/d/DescendantOfKiyomaro.java +++ b/Mage.Sets/src/mage/cards/d/DescendantOfKiyomaro.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class DescendantOfKiyomaro extends CardImpl { public DescendantOfKiyomaro(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DescendantOfMasumaro.java b/Mage.Sets/src/mage/cards/d/DescendantOfMasumaro.java index 5412a84808..9e0d574148 100644 --- a/Mage.Sets/src/mage/cards/d/DescendantOfMasumaro.java +++ b/Mage.Sets/src/mage/cards/d/DescendantOfMasumaro.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.counters.CounterType; @@ -52,8 +53,8 @@ public class DescendantOfMasumaro extends CardImpl { public DescendantOfMasumaro(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DescendantOfSoramaro.java b/Mage.Sets/src/mage/cards/d/DescendantOfSoramaro.java index 3db5df3ae8..aa41ed9658 100644 --- a/Mage.Sets/src/mage/cards/d/DescendantOfSoramaro.java +++ b/Mage.Sets/src/mage/cards/d/DescendantOfSoramaro.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.LookLibraryControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class DescendantOfSoramaro extends CardImpl { public DescendantOfSoramaro(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DescentOfTheDragons.java b/Mage.Sets/src/mage/cards/d/DescentOfTheDragons.java index da4c02d0cd..a8ec7660aa 100644 --- a/Mage.Sets/src/mage/cards/d/DescentOfTheDragons.java +++ b/Mage.Sets/src/mage/cards/d/DescentOfTheDragons.java @@ -72,7 +72,7 @@ class DescentOfTheDragonsEffect extends OneShotEffect { public DescentOfTheDragonsEffect() { super(Outcome.Benefit); - staticText = "Destroy any number of target creatures. For each creature destroyed this way, its controller creates a 4/4 red Dragon creature token with flying"; + staticText = "Destroy any number of target creatures. For each creature destroyed this way, its controller creates a 4/4 red Dragon creature token with flying"; } public DescentOfTheDragonsEffect(final DescentOfTheDragonsEffect effect) { diff --git a/Mage.Sets/src/mage/cards/d/DesecrationDemon.java b/Mage.Sets/src/mage/cards/d/DesecrationDemon.java index 8d49b8eeb4..c4ce45a3d4 100644 --- a/Mage.Sets/src/mage/cards/d/DesecrationDemon.java +++ b/Mage.Sets/src/mage/cards/d/DesecrationDemon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.counters.CounterType; @@ -55,7 +56,7 @@ public class DesecrationDemon extends CardImpl { public DesecrationDemon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/DesecrationElemental.java b/Mage.Sets/src/mage/cards/d/DesecrationElemental.java index f702ac6580..715151395a 100644 --- a/Mage.Sets/src/mage/cards/d/DesecrationElemental.java +++ b/Mage.Sets/src/mage/cards/d/DesecrationElemental.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; /** @@ -45,7 +46,7 @@ public class DesecrationElemental extends CardImpl { public DesecrationElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/d/DesecratorHag.java b/Mage.Sets/src/mage/cards/d/DesecratorHag.java index ddb20e60b1..ef658e805c 100644 --- a/Mage.Sets/src/mage/cards/d/DesecratorHag.java +++ b/Mage.Sets/src/mage/cards/d/DesecratorHag.java @@ -34,6 +34,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -50,7 +51,7 @@ public class DesecratorHag extends CardImpl { public DesecratorHag(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B/G}{B/G}"); - this.subtype.add("Hag"); + this.subtype.add(SubType.HAG); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/Desert.java b/Mage.Sets/src/mage/cards/d/Desert.java index 3ea37794a4..31fac87d93 100644 --- a/Mage.Sets/src/mage/cards/d/Desert.java +++ b/Mage.Sets/src/mage/cards/d/Desert.java @@ -37,6 +37,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.PhaseStep; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -57,7 +58,7 @@ public class Desert extends CardImpl { public Desert(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Desert"); + this.subtype.add(SubType.DESERT); // {tap}: Add {C} to your mana pool. this.addAbility(new ColorlessManaAbility()); diff --git a/Mage.Sets/src/mage/cards/d/DesertCerodon.java b/Mage.Sets/src/mage/cards/d/DesertCerodon.java index 17129eeec4..fdca107935 100644 --- a/Mage.Sets/src/mage/cards/d/DesertCerodon.java +++ b/Mage.Sets/src/mage/cards/d/DesertCerodon.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class DesertCerodon extends CardImpl { public DesertCerodon(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DesertDrake.java b/Mage.Sets/src/mage/cards/d/DesertDrake.java index d6cb8c13fa..5deda498b6 100644 --- a/Mage.Sets/src/mage/cards/d/DesertDrake.java +++ b/Mage.Sets/src/mage/cards/d/DesertDrake.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class DesertDrake extends CardImpl { public DesertDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DesertNomads.java b/Mage.Sets/src/mage/cards/d/DesertNomads.java index 3558baddda..ae20e300bb 100644 --- a/Mage.Sets/src/mage/cards/d/DesertNomads.java +++ b/Mage.Sets/src/mage/cards/d/DesertNomads.java @@ -59,8 +59,8 @@ public class DesertNomads extends CardImpl { public DesertNomads(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DesertOfTheFervent.java b/Mage.Sets/src/mage/cards/d/DesertOfTheFervent.java index c1f7a81530..38438d0711 100644 --- a/Mage.Sets/src/mage/cards/d/DesertOfTheFervent.java +++ b/Mage.Sets/src/mage/cards/d/DesertOfTheFervent.java @@ -35,6 +35,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class DesertOfTheFervent extends CardImpl { public DesertOfTheFervent(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Desert"); + this.subtype.add(SubType.DESERT); // Desert of the Fervent enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); diff --git a/Mage.Sets/src/mage/cards/d/DesertOfTheGlorified.java b/Mage.Sets/src/mage/cards/d/DesertOfTheGlorified.java index 1cb28246e6..78208179f3 100644 --- a/Mage.Sets/src/mage/cards/d/DesertOfTheGlorified.java +++ b/Mage.Sets/src/mage/cards/d/DesertOfTheGlorified.java @@ -35,6 +35,7 @@ import mage.abilities.mana.BlackManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class DesertOfTheGlorified extends CardImpl { public DesertOfTheGlorified(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Desert"); + this.subtype.add(SubType.DESERT); // Desert of the Glorified enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); diff --git a/Mage.Sets/src/mage/cards/d/DesertOfTheIndomitable.java b/Mage.Sets/src/mage/cards/d/DesertOfTheIndomitable.java index 410b8ac981..18e3672a48 100644 --- a/Mage.Sets/src/mage/cards/d/DesertOfTheIndomitable.java +++ b/Mage.Sets/src/mage/cards/d/DesertOfTheIndomitable.java @@ -35,6 +35,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class DesertOfTheIndomitable extends CardImpl { public DesertOfTheIndomitable(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Desert"); + this.subtype.add(SubType.DESERT); // Desert of the Indomitable enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); diff --git a/Mage.Sets/src/mage/cards/d/DesertOfTheMindful.java b/Mage.Sets/src/mage/cards/d/DesertOfTheMindful.java index 006eff7373..2f501b15fe 100644 --- a/Mage.Sets/src/mage/cards/d/DesertOfTheMindful.java +++ b/Mage.Sets/src/mage/cards/d/DesertOfTheMindful.java @@ -35,6 +35,7 @@ import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class DesertOfTheMindful extends CardImpl { public DesertOfTheMindful(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Desert"); + this.subtype.add(SubType.DESERT); // Desert of the Mindful enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); diff --git a/Mage.Sets/src/mage/cards/d/DesertOfTheTrue.java b/Mage.Sets/src/mage/cards/d/DesertOfTheTrue.java index 278cf3cd81..736aa27108 100644 --- a/Mage.Sets/src/mage/cards/d/DesertOfTheTrue.java +++ b/Mage.Sets/src/mage/cards/d/DesertOfTheTrue.java @@ -35,6 +35,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class DesertOfTheTrue extends CardImpl { public DesertOfTheTrue(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Desert"); + this.subtype.add(SubType.DESERT); // Desert of the True enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); diff --git a/Mage.Sets/src/mage/cards/d/DesertsHold.java b/Mage.Sets/src/mage/cards/d/DesertsHold.java index ecab2018eb..c74eac584f 100644 --- a/Mage.Sets/src/mage/cards/d/DesertsHold.java +++ b/Mage.Sets/src/mage/cards/d/DesertsHold.java @@ -1,99 +1,99 @@ -/* - * 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.cards.d; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.condition.OrCondition; -import mage.abilities.condition.common.CardsInControllerGraveCondition; -import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.GainLifeEffect; -import mage.abilities.effects.common.combat.CantBlockAttackActivateAttachedEffect; -import mage.abilities.keyword.EnchantAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.FilterCard; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.TargetPermanent; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author emerald000 - */ -public class DesertsHold extends CardImpl { - - private static final FilterControlledPermanent filterDesertPermanent = new FilterControlledPermanent("Desert"); - private static final FilterCard filterDesertCard = new FilterCard("Desert card"); - static { - filterDesertPermanent.add(new SubtypePredicate(SubType.DESERT)); - filterDesertCard.add(new SubtypePredicate(SubType.DESERT)); - } - - public DesertsHold(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); - - this.subtype.add("Aura"); - - // Enchant creature - TargetPermanent auraTarget = new TargetCreaturePermanent(); - this.getSpellAbility().addTarget(auraTarget); - this.getSpellAbility().addEffect(new AttachEffect(Outcome.Removal)); - Ability ability = new EnchantAbility(auraTarget.getTargetName()); - this.addAbility(ability); - - // When Desert's Hold enters the battlefield, if you control a Desert or there is a Desert card in your graveyard, you gain 3 life. - this.addAbility(new ConditionalTriggeredAbility( - new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3)), - new OrCondition( - new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(filterDesertPermanent)), - new CardsInControllerGraveCondition(1, filterDesertCard)), - "When {this} enters the battlefield, if you control a Desert or there is a Desert card in your graveyard, you gain 3 life.")); - - // Enchanted creature can't attack or block, and its activated abilities can't be activated. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockAttackActivateAttachedEffect())); - } - - public DesertsHold(final DesertsHold card) { - super(card); - } - - @Override - public DesertsHold copy() { - return new DesertsHold(this); - } -} +/* + * 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.cards.d; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.OrCondition; +import mage.abilities.condition.common.CardsInControllerGraveCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.combat.CantBlockAttackActivateAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author emerald000 + */ +public class DesertsHold extends CardImpl { + + private static final FilterControlledPermanent filterDesertPermanent = new FilterControlledPermanent("Desert"); + private static final FilterCard filterDesertCard = new FilterCard("Desert card"); + static { + filterDesertPermanent.add(new SubtypePredicate(SubType.DESERT)); + filterDesertCard.add(new SubtypePredicate(SubType.DESERT)); + } + + public DesertsHold(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Removal)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // When Desert's Hold enters the battlefield, if you control a Desert or there is a Desert card in your graveyard, you gain 3 life. + this.addAbility(new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3)), + new OrCondition( + new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(filterDesertPermanent)), + new CardsInControllerGraveCondition(1, filterDesertCard)), + "When {this} enters the battlefield, if you control a Desert or there is a Desert card in your graveyard, you gain 3 life.")); + + // Enchanted creature can't attack or block, and its activated abilities can't be activated. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockAttackActivateAttachedEffect())); + } + + public DesertsHold(final DesertsHold card) { + super(card); + } + + @Override + public DesertsHold copy() { + return new DesertsHold(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DesiccatedNaga.java b/Mage.Sets/src/mage/cards/d/DesiccatedNaga.java index 6fa7b811da..eb8eb6d4a5 100644 --- a/Mage.Sets/src/mage/cards/d/DesiccatedNaga.java +++ b/Mage.Sets/src/mage/cards/d/DesiccatedNaga.java @@ -61,8 +61,8 @@ public class DesiccatedNaga extends CardImpl { public DesiccatedNaga(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Naga"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.NAGA); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DesolationAngel.java b/Mage.Sets/src/mage/cards/d/DesolationAngel.java index f42bf6ecb4..bd5fddae30 100644 --- a/Mage.Sets/src/mage/cards/d/DesolationAngel.java +++ b/Mage.Sets/src/mage/cards/d/DesolationAngel.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.StaticFilters; import mage.filter.common.FilterLandPermanent; @@ -56,7 +57,7 @@ public class DesolationAngel extends CardImpl { public DesolationAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DesolationGiant.java b/Mage.Sets/src/mage/cards/d/DesolationGiant.java index bd07f232f7..49e542f846 100644 --- a/Mage.Sets/src/mage/cards/d/DesolationGiant.java +++ b/Mage.Sets/src/mage/cards/d/DesolationGiant.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -59,7 +60,7 @@ public class DesolationGiant extends CardImpl { public DesolationGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DesolationTwin.java b/Mage.Sets/src/mage/cards/d/DesolationTwin.java index 03044cf607..59daf3625e 100644 --- a/Mage.Sets/src/mage/cards/d/DesolationTwin.java +++ b/Mage.Sets/src/mage/cards/d/DesolationTwin.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -49,7 +50,7 @@ public class DesolationTwin extends CardImpl { public DesolationTwin(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{10}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(10); this.toughness = new MageInt(10); diff --git a/Mage.Sets/src/mage/cards/d/DesperateCastaways.java b/Mage.Sets/src/mage/cards/d/DesperateCastaways.java new file mode 100644 index 0000000000..63ab9a4ca2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DesperateCastaways.java @@ -0,0 +1,104 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.RestrictionEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author TheElk801 + */ +public class DesperateCastaways extends CardImpl { + + public DesperateCastaways(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Desperate Castaways can't attack unless you control an artifact. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DesperateCastawaysEffect())); + } + + public DesperateCastaways(final DesperateCastaways card) { + super(card); + } + + @Override + public DesperateCastaways copy() { + return new DesperateCastaways(this); + } +} + +class DesperateCastawaysEffect extends RestrictionEffect { + + public DesperateCastawaysEffect() { + super(Duration.WhileOnBattlefield); + staticText = "{this} can't attack unless you control an artifact"; + } + + public DesperateCastawaysEffect(final DesperateCastawaysEffect effect) { + super(effect); + } + + @Override + public DesperateCastawaysEffect copy() { + return new DesperateCastawaysEffect(this); + } + + @Override + public boolean canAttack(Game game) { + return false; + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + if (permanent.getId().equals(source.getSourceId())) { + if (game.getBattlefield().countAll(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT, source.getControllerId(), game) > 0) { + return false; + } + return true; + } // do not apply to other creatures. + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/d/DesperateRitual.java b/Mage.Sets/src/mage/cards/d/DesperateRitual.java index 71b9c94f7c..7167de5005 100644 --- a/Mage.Sets/src/mage/cards/d/DesperateRitual.java +++ b/Mage.Sets/src/mage/cards/d/DesperateRitual.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.SpliceOntoArcaneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class DesperateRitual extends CardImpl { public DesperateRitual(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Add {R}{R}{R} to your mana pool. diff --git a/Mage.Sets/src/mage/cards/d/DesperateSentry.java b/Mage.Sets/src/mage/cards/d/DesperateSentry.java index b7c891fb5f..5fa96b6e17 100644 --- a/Mage.Sets/src/mage/cards/d/DesperateSentry.java +++ b/Mage.Sets/src/mage/cards/d/DesperateSentry.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.EldraziHorrorToken; @@ -51,8 +52,8 @@ public class DesperateSentry extends CardImpl { public DesperateSentry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DespoilerOfSouls.java b/Mage.Sets/src/mage/cards/d/DespoilerOfSouls.java index 111c9d6d28..812c117410 100644 --- a/Mage.Sets/src/mage/cards/d/DespoilerOfSouls.java +++ b/Mage.Sets/src/mage/cards/d/DespoilerOfSouls.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.common.FilterCreatureCard; @@ -53,7 +54,7 @@ public class DespoilerOfSouls extends CardImpl { public DespoilerOfSouls(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/Despondency.java b/Mage.Sets/src/mage/cards/d/Despondency.java index 383f1c8b4f..9ce12a2c83 100644 --- a/Mage.Sets/src/mage/cards/d/Despondency.java +++ b/Mage.Sets/src/mage/cards/d/Despondency.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class Despondency extends CardImpl { public Despondency(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/d/DestructiveUrge.java b/Mage.Sets/src/mage/cards/d/DestructiveUrge.java index d51474b4ea..abf262acc3 100644 --- a/Mage.Sets/src/mage/cards/d/DestructiveUrge.java +++ b/Mage.Sets/src/mage/cards/d/DestructiveUrge.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; /** @@ -50,7 +51,7 @@ public class DestructiveUrge extends CardImpl { public DestructiveUrge(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/d/DestructorDragon.java b/Mage.Sets/src/mage/cards/d/DestructorDragon.java index 8b3d643dea..a32ab8f3b3 100644 --- a/Mage.Sets/src/mage/cards/d/DestructorDragon.java +++ b/Mage.Sets/src/mage/cards/d/DestructorDragon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -54,7 +55,7 @@ public class DestructorDragon extends CardImpl { public DestructorDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DetainmentSpell.java b/Mage.Sets/src/mage/cards/d/DetainmentSpell.java new file mode 100644 index 0000000000..cd8e4bff76 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DetainmentSpell.java @@ -0,0 +1,82 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.constants.SubType; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.CantActivateAbilitiesAttachedEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class DetainmentSpell extends CardImpl { + + public DetainmentSpell(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature's activated abilities can't be activated. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantActivateAbilitiesAttachedEffect())); + + // {1}{W}: Attach Detainment Spell to target creature. + ability = new SimpleActivatedAbility(new AttachEffect(Outcome.BoostCreature, "Attach {this} to target creature"), new ManaCostsImpl("{1}{W}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public DetainmentSpell(final DetainmentSpell card) { + super(card); + } + + @Override + public DetainmentSpell copy() { + return new DetainmentSpell(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/Detritivore.java b/Mage.Sets/src/mage/cards/d/Detritivore.java index 77cb02fab3..1865dfd752 100644 --- a/Mage.Sets/src/mage/cards/d/Detritivore.java +++ b/Mage.Sets/src/mage/cards/d/Detritivore.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -62,8 +63,8 @@ import mage.target.common.TargetNonBasicLandPermanent; public class Detritivore extends CardImpl { public Detritivore(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Lhurgoyf"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.subtype.add(SubType.LHURGOYF); this.power = new MageInt(0); this.toughness = new MageInt(0); @@ -131,7 +132,6 @@ class NonBasicLandsInOpponentsGraveyards implements DynamicValue { filter.add(Predicates.not(new SupertypePredicate(SuperType.BASIC))); } - @Override public int calculate(Game game, Ability sourceAbility, Effect effect) { int amount = 0; @@ -161,6 +161,6 @@ class NonBasicLandsInOpponentsGraveyards implements DynamicValue { @Override public String getMessage() { - return "the number of nonbasic land cards in your opponents' graveyards"; + return "nonbasic land cards in your opponents' graveyards"; } } diff --git a/Mage.Sets/src/mage/cards/d/DeusOfCalamity.java b/Mage.Sets/src/mage/cards/d/DeusOfCalamity.java index c232cbde47..3819106ef9 100644 --- a/Mage.Sets/src/mage/cards/d/DeusOfCalamity.java +++ b/Mage.Sets/src/mage/cards/d/DeusOfCalamity.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; @@ -52,8 +53,8 @@ public class DeusOfCalamity extends CardImpl { public DeusOfCalamity(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R/G}{R/G}{R/G}{R/G}{R/G}"); - this.subtype.add("Spirit"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/DeviantGlee.java b/Mage.Sets/src/mage/cards/d/DeviantGlee.java index 51b4dd292b..fbab746188 100644 --- a/Mage.Sets/src/mage/cards/d/DeviantGlee.java +++ b/Mage.Sets/src/mage/cards/d/DeviantGlee.java @@ -55,7 +55,7 @@ public class DeviantGlee extends CardImpl { public DeviantGlee (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); this.color.setBlack(true); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/d/DevilthornFox.java b/Mage.Sets/src/mage/cards/d/DevilthornFox.java index d3b09986de..e1d2105b36 100644 --- a/Mage.Sets/src/mage/cards/d/DevilthornFox.java +++ b/Mage.Sets/src/mage/cards/d/DevilthornFox.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class DevilthornFox extends CardImpl { public DevilthornFox(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Fox"); + this.subtype.add(SubType.FOX); this.power = new MageInt(3); this.toughness = new MageInt(1); } diff --git a/Mage.Sets/src/mage/cards/d/DevotedCaretaker.java b/Mage.Sets/src/mage/cards/d/DevotedCaretaker.java index 2627cdaae6..15b2f70861 100644 --- a/Mage.Sets/src/mage/cards/d/DevotedCaretaker.java +++ b/Mage.Sets/src/mage/cards/d/DevotedCaretaker.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterSpell; @@ -60,8 +61,8 @@ public class DevotedCaretaker extends CardImpl { public DevotedCaretaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DevotedCropMate.java b/Mage.Sets/src/mage/cards/d/DevotedCropMate.java index 4f7251a732..254a193d5d 100644 --- a/Mage.Sets/src/mage/cards/d/DevotedCropMate.java +++ b/Mage.Sets/src/mage/cards/d/DevotedCropMate.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ExertAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -56,8 +57,8 @@ public class DevotedCropMate extends CardImpl { public DevotedCropMate(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DevotedDruid.java b/Mage.Sets/src/mage/cards/d/DevotedDruid.java index 2900c9e4f8..1730fc3ecb 100644 --- a/Mage.Sets/src/mage/cards/d/DevotedDruid.java +++ b/Mage.Sets/src/mage/cards/d/DevotedDruid.java @@ -36,6 +36,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -47,8 +48,8 @@ public class DevotedDruid extends CardImpl { public DevotedDruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DevotedHero.java b/Mage.Sets/src/mage/cards/d/DevotedHero.java index a15a08d907..962d4eabf4 100644 --- a/Mage.Sets/src/mage/cards/d/DevotedHero.java +++ b/Mage.Sets/src/mage/cards/d/DevotedHero.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class DevotedHero extends CardImpl { public DevotedHero(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Elf"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DevotedRetainer.java b/Mage.Sets/src/mage/cards/d/DevotedRetainer.java index 7e138667b9..a5226ed797 100644 --- a/Mage.Sets/src/mage/cards/d/DevotedRetainer.java +++ b/Mage.Sets/src/mage/cards/d/DevotedRetainer.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.BushidoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class DevotedRetainer extends CardImpl { public DevotedRetainer (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DevoteeOfStrength.java b/Mage.Sets/src/mage/cards/d/DevoteeOfStrength.java index 24f4214b6b..0c6f5f5114 100644 --- a/Mage.Sets/src/mage/cards/d/DevoteeOfStrength.java +++ b/Mage.Sets/src/mage/cards/d/DevoteeOfStrength.java @@ -1,70 +1,71 @@ -/* - * 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.cards.d; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.continuous.BoostTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author ciaccona007 - */ -public class DevoteeOfStrength extends CardImpl { - - public DevoteeOfStrength(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - - this.subtype.add("Naga"); - this.subtype.add("Wizard"); - this.power = new MageInt(3); - this.toughness = new MageInt(2); - - // {4}{G}: Target creature gets +2/+2 until end of turn. - SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2,2,Duration.EndOfTurn), new ManaCostsImpl("{4}{G}")); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability); - } - - public DevoteeOfStrength(final DevoteeOfStrength card) { - super(card); - } - - @Override - public DevoteeOfStrength copy() { - return new DevoteeOfStrength(this); - } -} +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author ciaccona007 + */ +public class DevoteeOfStrength extends CardImpl { + + public DevoteeOfStrength(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // {4}{G}: Target creature gets +2/+2 until end of turn. + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2,2,Duration.EndOfTurn), new ManaCostsImpl("{4}{G}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public DevoteeOfStrength(final DevoteeOfStrength card) { + super(card); + } + + @Override + public DevoteeOfStrength copy() { + return new DevoteeOfStrength(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DevouringDeep.java b/Mage.Sets/src/mage/cards/d/DevouringDeep.java index 5c70cdd280..8413c92892 100644 --- a/Mage.Sets/src/mage/cards/d/DevouringDeep.java +++ b/Mage.Sets/src/mage/cards/d/DevouringDeep.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.IslandwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class DevouringDeep extends CardImpl { public DevouringDeep(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Fish"); + this.subtype.add(SubType.FISH); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DevouringGreed.java b/Mage.Sets/src/mage/cards/d/DevouringGreed.java index a88af5e6e7..a3d226dae3 100644 --- a/Mage.Sets/src/mage/cards/d/DevouringGreed.java +++ b/Mage.Sets/src/mage/cards/d/DevouringGreed.java @@ -58,7 +58,7 @@ public class DevouringGreed extends CardImpl { public DevouringGreed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}{B}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // As an additional cost to cast Devouring Greed, you may sacrifice any number of Spirits. diff --git a/Mage.Sets/src/mage/cards/d/DevouringRage.java b/Mage.Sets/src/mage/cards/d/DevouringRage.java index fa915b554b..7c77e504ca 100644 --- a/Mage.Sets/src/mage/cards/d/DevouringRage.java +++ b/Mage.Sets/src/mage/cards/d/DevouringRage.java @@ -62,7 +62,7 @@ public class DevouringRage extends CardImpl { public DevouringRage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // As an additional cost to cast Devouring Rage, you may sacrifice any number of Spirits. diff --git a/Mage.Sets/src/mage/cards/d/DevouringStrossus.java b/Mage.Sets/src/mage/cards/d/DevouringStrossus.java index cb4ed052f3..50f718f5fb 100644 --- a/Mage.Sets/src/mage/cards/d/DevouringStrossus.java +++ b/Mage.Sets/src/mage/cards/d/DevouringStrossus.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -53,7 +54,7 @@ public class DevouringStrossus extends CardImpl { public DevouringStrossus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(9); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/d/DevouringSwarm.java b/Mage.Sets/src/mage/cards/d/DevouringSwarm.java index 003adef1ca..b563fd2633 100644 --- a/Mage.Sets/src/mage/cards/d/DevouringSwarm.java +++ b/Mage.Sets/src/mage/cards/d/DevouringSwarm.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -48,7 +49,7 @@ public class DevouringSwarm extends CardImpl { public DevouringSwarm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DevoutChaplain.java b/Mage.Sets/src/mage/cards/d/DevoutChaplain.java index 67ab966e72..ba4fe4531f 100644 --- a/Mage.Sets/src/mage/cards/d/DevoutChaplain.java +++ b/Mage.Sets/src/mage/cards/d/DevoutChaplain.java @@ -62,8 +62,8 @@ public class DevoutChaplain extends CardImpl { public DevoutChaplain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.color.setWhite(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DevoutHarpist.java b/Mage.Sets/src/mage/cards/d/DevoutHarpist.java index 04d342c558..7dc2394b8e 100644 --- a/Mage.Sets/src/mage/cards/d/DevoutHarpist.java +++ b/Mage.Sets/src/mage/cards/d/DevoutHarpist.java @@ -59,7 +59,7 @@ public class DevoutHarpist extends CardImpl { } public DevoutHarpist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.color.setWhite(true); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DevoutLightcaster.java b/Mage.Sets/src/mage/cards/d/DevoutLightcaster.java index ad73b8889a..e277211a0e 100644 --- a/Mage.Sets/src/mage/cards/d/DevoutLightcaster.java +++ b/Mage.Sets/src/mage/cards/d/DevoutLightcaster.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.target.TargetPermanent; @@ -54,8 +55,8 @@ public class DevoutLightcaster extends CardImpl { public DevoutLightcaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DevoutMonk.java b/Mage.Sets/src/mage/cards/d/DevoutMonk.java index 0b63791542..e46635a353 100644 --- a/Mage.Sets/src/mage/cards/d/DevoutMonk.java +++ b/Mage.Sets/src/mage/cards/d/DevoutMonk.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,9 +44,9 @@ public class DevoutMonk extends CardImpl { public DevoutMonk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DevoutWitness.java b/Mage.Sets/src/mage/cards/d/DevoutWitness.java index 00a183c887..9705ee9383 100644 --- a/Mage.Sets/src/mage/cards/d/DevoutWitness.java +++ b/Mage.Sets/src/mage/cards/d/DevoutWitness.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.TargetPermanent; @@ -51,8 +52,8 @@ public class DevoutWitness extends CardImpl { public DevoutWitness(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DewdropSpy.java b/Mage.Sets/src/mage/cards/d/DewdropSpy.java index 9c3b227549..aa5acf70ee 100644 --- a/Mage.Sets/src/mage/cards/d/DewdropSpy.java +++ b/Mage.Sets/src/mage/cards/d/DewdropSpy.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -47,8 +48,8 @@ public class DewdropSpy extends CardImpl { public DewdropSpy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DhundOperative.java b/Mage.Sets/src/mage/cards/d/DhundOperative.java index 50e059d78b..35e5a6f302 100644 --- a/Mage.Sets/src/mage/cards/d/DhundOperative.java +++ b/Mage.Sets/src/mage/cards/d/DhundOperative.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -52,8 +53,8 @@ public class DhundOperative extends CardImpl { public DhundOperative(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DiabolicMachine.java b/Mage.Sets/src/mage/cards/d/DiabolicMachine.java index 6ec3070d0c..a6f316a7d3 100644 --- a/Mage.Sets/src/mage/cards/d/DiabolicMachine.java +++ b/Mage.Sets/src/mage/cards/d/DiabolicMachine.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class DiabolicMachine extends CardImpl { public DiabolicMachine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DiamondFaerie.java b/Mage.Sets/src/mage/cards/d/DiamondFaerie.java index e7e0f7c86a..5d5b8aac2d 100644 --- a/Mage.Sets/src/mage/cards/d/DiamondFaerie.java +++ b/Mage.Sets/src/mage/cards/d/DiamondFaerie.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class DiamondFaerie extends CardImpl { public DiamondFaerie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{W}{U}"); addSuperType(SuperType.SNOW); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DiaochanArtfulBeauty.java b/Mage.Sets/src/mage/cards/d/DiaochanArtfulBeauty.java index 2c91c6e56f..78f1274f6a 100644 --- a/Mage.Sets/src/mage/cards/d/DiaochanArtfulBeauty.java +++ b/Mage.Sets/src/mage/cards/d/DiaochanArtfulBeauty.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -56,8 +57,8 @@ public class DiaochanArtfulBeauty extends CardImpl { public DiaochanArtfulBeauty(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DictateOfErebos.java b/Mage.Sets/src/mage/cards/d/DictateOfErebos.java index 87cb1a626f..4efc724617 100644 --- a/Mage.Sets/src/mage/cards/d/DictateOfErebos.java +++ b/Mage.Sets/src/mage/cards/d/DictateOfErebos.java @@ -45,19 +45,19 @@ import mage.filter.predicate.permanent.ControllerPredicate; */ public class DictateOfErebos extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you control"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature you control"); static { filter.add(new ControllerPredicate(TargetController.YOU)); } public DictateOfErebos(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{B}"); // Flash this.addAbility(FlashAbility.getInstance()); // Whenever a creature you control dies, each opponent sacrifices a creature. - this.addAbility(new DiesCreatureTriggeredAbility(new SacrificeOpponentsEffect(new FilterControlledCreaturePermanent("a creature")), false, filter)); + this.addAbility(new DiesCreatureTriggeredAbility(new SacrificeOpponentsEffect(new FilterControlledCreaturePermanent("creature")), false, filter)); } public DictateOfErebos(final DictateOfErebos card) { diff --git a/Mage.Sets/src/mage/cards/d/DiffusionSliver.java b/Mage.Sets/src/mage/cards/d/DiffusionSliver.java index 6e9837affe..17e84aa750 100644 --- a/Mage.Sets/src/mage/cards/d/DiffusionSliver.java +++ b/Mage.Sets/src/mage/cards/d/DiffusionSliver.java @@ -54,7 +54,7 @@ public class DiffusionSliver extends CardImpl { public DiffusionSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DiligentFarmhand.java b/Mage.Sets/src/mage/cards/d/DiligentFarmhand.java index 8cdc4e4d41..3544c95618 100644 --- a/Mage.Sets/src/mage/cards/d/DiligentFarmhand.java +++ b/Mage.Sets/src/mage/cards/d/DiligentFarmhand.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.m.MuscleBurst; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; @@ -51,8 +52,8 @@ public class DiligentFarmhand extends CardImpl { public DiligentFarmhand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DiluvianPrimordial.java b/Mage.Sets/src/mage/cards/d/DiluvianPrimordial.java index cb84ea95cd..073afab433 100644 --- a/Mage.Sets/src/mage/cards/d/DiluvianPrimordial.java +++ b/Mage.Sets/src/mage/cards/d/DiluvianPrimordial.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -63,7 +64,7 @@ public class DiluvianPrimordial extends CardImpl { public DiluvianPrimordial(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DimensionalBreach.java b/Mage.Sets/src/mage/cards/d/DimensionalBreach.java index 5bbc097c82..8e8788faf5 100644 --- a/Mage.Sets/src/mage/cards/d/DimensionalBreach.java +++ b/Mage.Sets/src/mage/cards/d/DimensionalBreach.java @@ -1,166 +1,166 @@ -/* - * 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.cards.d; - -import java.util.UUID; -import mage.MageObject; -import mage.abilities.Ability; -import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.filter.FilterCard; -import mage.filter.predicate.other.OwnerIdPredicate; -import mage.game.ExileZone; -import mage.game.Game; -import mage.players.Player; -import mage.target.common.TargetCardInExile; -import mage.util.CardUtil; - -/** - * - * @author jeffwadsworth - */ -public class DimensionalBreach extends CardImpl { - - public DimensionalBreach(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{W}{W}"); - - // Exile all permanents. For as long as any of those cards remain exiled, at the beginning of each player's upkeep, that player returns one of the exiled cards he or she owns to the battlefield. - this.getSpellAbility().addEffect(new DimensionalBreachExileEffect()); - this.addAbility(new ConditionalTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(Zone.ALL, new DimensionalBreachReturnFromExileEffect(), TargetController.ANY, false, true, null), new CardsStillInExileCondition(), null)); - - } - - public DimensionalBreach(final DimensionalBreach card) { - super(card); - } - - @Override - public DimensionalBreach copy() { - return new DimensionalBreach(this); - } -} - -class DimensionalBreachExileEffect extends OneShotEffect { - - public DimensionalBreachExileEffect() { - super(Outcome.Exile); - staticText = "Exile all permanents."; - } - - public DimensionalBreachExileEffect(final DimensionalBreachExileEffect effect) { - super(effect); - } - - @Override - public DimensionalBreachExileEffect copy() { - return new DimensionalBreachExileEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - MageObject sourceObject = source.getSourceObject(game); - Player controller = game.getPlayer(source.getControllerId()); - if (sourceObject != null - && controller != null) { - UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), 0); - if (exileId != null) { - game.getBattlefield().getAllActivePermanents().forEach((permanent) -> { - permanent.moveToExile(exileId, sourceObject.getName(), source.getSourceId(), game); - }); - return true; - } - } - return false; - } -} - -class DimensionalBreachReturnFromExileEffect extends OneShotEffect { - - public DimensionalBreachReturnFromExileEffect() { - super(Outcome.PutCardInPlay); - staticText = "For as long as any of those cards remain exiled, at the beginning of each player's upkeep, that player returns one of the exiled cards he or she owns to the battlefield."; - } - - public DimensionalBreachReturnFromExileEffect(final DimensionalBreachReturnFromExileEffect effect) { - super(effect); - } - - @Override - public DimensionalBreachReturnFromExileEffect copy() { - return new DimensionalBreachReturnFromExileEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(targetPointer.getFirst(game, source)); - if (player != null) { - FilterCard filter = new FilterCard("card you own from the Dimensional Breach exile"); - filter.add(new OwnerIdPredicate(player.getId())); - - TargetCardInExile target = new TargetCardInExile(filter, CardUtil.getExileZoneId(game, source.getSourceId(), 0)); - target.setNotTarget(true); - - if (target.canChoose(source.getSourceId(), player.getId(), game)) { - if (player.chooseTarget(Outcome.PutCardInPlay, target, source, game)) { - Card card = game.getCard(target.getFirstTarget()); - if (card != null - && player.moveCards(card, Zone.BATTLEFIELD, source, game)) { - return true; - } - } - } - } - return false; - } -} - -class CardsStillInExileCondition implements Condition { - - @Override - public final boolean apply(Game game, Ability source) { - Player player = game.getPlayer(game.getActivePlayerId()); - if (player != null) { - FilterCard filter = new FilterCard(); - filter.add(new OwnerIdPredicate(player.getId())); - UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), 0); - ExileZone exileZone = game.getExile().getExileZone(exileId); - return (exileZone != null - && !exileZone.getCards(filter, game).isEmpty()); - } - return false; - } -} +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.other.OwnerIdPredicate; +import mage.game.ExileZone; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInExile; +import mage.util.CardUtil; + +/** + * + * @author jeffwadsworth + */ +public class DimensionalBreach extends CardImpl { + + public DimensionalBreach(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{W}{W}"); + + // Exile all permanents. For as long as any of those cards remain exiled, at the beginning of each player's upkeep, that player returns one of the exiled cards he or she owns to the battlefield. + this.getSpellAbility().addEffect(new DimensionalBreachExileEffect()); + this.addAbility(new ConditionalTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(Zone.ALL, new DimensionalBreachReturnFromExileEffect(), TargetController.ANY, false, true, null), new CardsStillInExileCondition(), null)); + + } + + public DimensionalBreach(final DimensionalBreach card) { + super(card); + } + + @Override + public DimensionalBreach copy() { + return new DimensionalBreach(this); + } +} + +class DimensionalBreachExileEffect extends OneShotEffect { + + public DimensionalBreachExileEffect() { + super(Outcome.Exile); + staticText = "Exile all permanents."; + } + + public DimensionalBreachExileEffect(final DimensionalBreachExileEffect effect) { + super(effect); + } + + @Override + public DimensionalBreachExileEffect copy() { + return new DimensionalBreachExileEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + MageObject sourceObject = source.getSourceObject(game); + Player controller = game.getPlayer(source.getControllerId()); + if (sourceObject != null + && controller != null) { + UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), 0); + if (exileId != null) { + game.getBattlefield().getAllActivePermanents().forEach((permanent) -> { + permanent.moveToExile(exileId, sourceObject.getName(), source.getSourceId(), game); + }); + return true; + } + } + return false; + } +} + +class DimensionalBreachReturnFromExileEffect extends OneShotEffect { + + public DimensionalBreachReturnFromExileEffect() { + super(Outcome.PutCardInPlay); + staticText = "For as long as any of those cards remain exiled, at the beginning of each player's upkeep, that player returns one of the exiled cards he or she owns to the battlefield."; + } + + public DimensionalBreachReturnFromExileEffect(final DimensionalBreachReturnFromExileEffect effect) { + super(effect); + } + + @Override + public DimensionalBreachReturnFromExileEffect copy() { + return new DimensionalBreachReturnFromExileEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + if (player != null) { + FilterCard filter = new FilterCard("card you own from the Dimensional Breach exile"); + filter.add(new OwnerIdPredicate(player.getId())); + + TargetCardInExile target = new TargetCardInExile(filter, CardUtil.getExileZoneId(game, source.getSourceId(), 0)); + target.setNotTarget(true); + + if (target.canChoose(source.getSourceId(), player.getId(), game)) { + if (player.chooseTarget(Outcome.PutCardInPlay, target, source, game)) { + Card card = game.getCard(target.getFirstTarget()); + if (card != null + && player.moveCards(card, Zone.BATTLEFIELD, source, game)) { + return true; + } + } + } + } + return false; + } +} + +class CardsStillInExileCondition implements Condition { + + @Override + public final boolean apply(Game game, Ability source) { + Player player = game.getPlayer(game.getActivePlayerId()); + if (player != null) { + FilterCard filter = new FilterCard(); + filter.add(new OwnerIdPredicate(player.getId())); + UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), 0); + ExileZone exileZone = game.getExile().getExileZone(exileId); + return (exileZone != null + && !exileZone.getCards(filter, game).isEmpty()); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/d/DimensionalInfiltrator.java b/Mage.Sets/src/mage/cards/d/DimensionalInfiltrator.java index fb2fc88583..561548c951 100644 --- a/Mage.Sets/src/mage/cards/d/DimensionalInfiltrator.java +++ b/Mage.Sets/src/mage/cards/d/DimensionalInfiltrator.java @@ -42,6 +42,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class DimensionalInfiltrator extends CardImpl { public DimensionalInfiltrator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DimirCutpurse.java b/Mage.Sets/src/mage/cards/d/DimirCutpurse.java index 157b9c360c..2753bf3023 100644 --- a/Mage.Sets/src/mage/cards/d/DimirCutpurse.java +++ b/Mage.Sets/src/mage/cards/d/DimirCutpurse.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -48,7 +49,7 @@ public class DimirCutpurse extends CardImpl { public DimirCutpurse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DimirDoppelganger.java b/Mage.Sets/src/mage/cards/d/DimirDoppelganger.java index c5203e307f..22d47106c2 100644 --- a/Mage.Sets/src/mage/cards/d/DimirDoppelganger.java +++ b/Mage.Sets/src/mage/cards/d/DimirDoppelganger.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CopyEffect; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class DimirDoppelganger extends CardImpl { public DimirDoppelganger(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{B}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DimirGuildmage.java b/Mage.Sets/src/mage/cards/d/DimirGuildmage.java index 796d597b72..7a6dfe05f4 100644 --- a/Mage.Sets/src/mage/cards/d/DimirGuildmage.java +++ b/Mage.Sets/src/mage/cards/d/DimirGuildmage.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -48,8 +49,8 @@ public class DimirGuildmage extends CardImpl { public DimirGuildmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U/B}{U/B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DimirHouseGuard.java b/Mage.Sets/src/mage/cards/d/DimirHouseGuard.java index e7fc8c46d6..c83828eba6 100644 --- a/Mage.Sets/src/mage/cards/d/DimirHouseGuard.java +++ b/Mage.Sets/src/mage/cards/d/DimirHouseGuard.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TransmuteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -48,7 +49,7 @@ public class DimirHouseGuard extends CardImpl { public DimirHouseGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DimirInfiltrator.java b/Mage.Sets/src/mage/cards/d/DimirInfiltrator.java index c83b0ba8df..175b8d1c94 100644 --- a/Mage.Sets/src/mage/cards/d/DimirInfiltrator.java +++ b/Mage.Sets/src/mage/cards/d/DimirInfiltrator.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TransmuteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class DimirInfiltrator extends CardImpl { public DimirInfiltrator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DimirKeyrune.java b/Mage.Sets/src/mage/cards/d/DimirKeyrune.java index f73db4524d..8e4ab1f83a 100644 --- a/Mage.Sets/src/mage/cards/d/DimirKeyrune.java +++ b/Mage.Sets/src/mage/cards/d/DimirKeyrune.java @@ -38,6 +38,7 @@ import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -75,7 +76,7 @@ public class DimirKeyrune extends CardImpl { cardType.add(CardType.CREATURE); color.setBlue(true); color.setBlack(true); - subtype.add("Horror"); + subtype.add(SubType.HORROR); power = new MageInt(2); toughness = new MageInt(2); this.addAbility(new CantBeBlockedSourceAbility()); diff --git a/Mage.Sets/src/mage/cards/d/DinosaurStampede.java b/Mage.Sets/src/mage/cards/d/DinosaurStampede.java new file mode 100644 index 0000000000..33ccd1f318 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DinosaurStampede.java @@ -0,0 +1,78 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author TheElk801 + */ +public class DinosaurStampede extends CardImpl { + + private static final FilterAttackingCreature filter = new FilterAttackingCreature("Attacking creatures"); + private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("Dinosaurs you control"); + + static { + filter2.add(new SubtypePredicate(SubType.DINOSAUR)); + filter2.add(new ControllerPredicate(TargetController.YOU)); + } + + public DinosaurStampede(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); + + // Attacking creatures get +2/+0 until end of turn. Dinosaurs you control gain trample until end of turn. + this.getSpellAbility().addEffect(new BoostAllEffect(2, 0, Duration.EndOfTurn, filter, false)); + Effect effect = new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, filter2); + effect.setText("Dinosaurs you control gain trample until end of turn."); + this.getSpellAbility().addEffect(effect); + } + + public DinosaurStampede(final DinosaurStampede card) { + super(card); + } + + @Override + public DinosaurStampede copy() { + return new DinosaurStampede(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DinrovaHorror.java b/Mage.Sets/src/mage/cards/d/DinrovaHorror.java index 6042067000..2da7da6ea4 100644 --- a/Mage.Sets/src/mage/cards/d/DinrovaHorror.java +++ b/Mage.Sets/src/mage/cards/d/DinrovaHorror.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -50,7 +51,7 @@ public class DinrovaHorror extends CardImpl { public DinrovaHorror(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DiplomaticEscort.java b/Mage.Sets/src/mage/cards/d/DiplomaticEscort.java index d18418a78d..459e7c6b1b 100644 --- a/Mage.Sets/src/mage/cards/d/DiplomaticEscort.java +++ b/Mage.Sets/src/mage/cards/d/DiplomaticEscort.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterStackObject; import mage.filter.common.FilterCreaturePermanent; @@ -58,8 +59,8 @@ public class DiplomaticEscort extends CardImpl { public DiplomaticEscort(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DiplomaticImmunity.java b/Mage.Sets/src/mage/cards/d/DiplomaticImmunity.java index d703328afe..3f0a8bc376 100644 --- a/Mage.Sets/src/mage/cards/d/DiplomaticImmunity.java +++ b/Mage.Sets/src/mage/cards/d/DiplomaticImmunity.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class DiplomaticImmunity extends CardImpl { public DiplomaticImmunity(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/d/DireFleetCaptain.java b/Mage.Sets/src/mage/cards/d/DireFleetCaptain.java new file mode 100644 index 0000000000..cf82dab875 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DireFleetCaptain.java @@ -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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author TheElk801 + */ +public class DireFleetCaptain extends CardImpl { + + private static final FilterAttackingCreature filter = new FilterAttackingCreature("other attacking Pirate"); + + static { + filter.add(new SubtypePredicate(SubType.PIRATE)); + filter.add(new AnotherPredicate()); + } + + public DireFleetCaptain(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{R}"); + + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Dire Fleet Captain attacks, it gets +1/+1 until end of turn for each other attacking Pirate. + PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(filter); + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(value, value, Duration.EndOfTurn, true) + .setText("it gets +1/+1 until end of turn for each other attacking Pirate"), false)); + } + + public DireFleetCaptain(final DireFleetCaptain card) { + super(card); + } + + @Override + public DireFleetCaptain copy() { + return new DireFleetCaptain(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DireFleetHoarder.java b/Mage.Sets/src/mage/cards/d/DireFleetHoarder.java new file mode 100644 index 0000000000..047449c9b6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DireFleetHoarder.java @@ -0,0 +1,66 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.permanent.token.TreasureToken; + +/** + * + * @author TheElk801 + */ +public class DireFleetHoarder extends CardImpl { + + public DireFleetHoarder(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // When Dire Fleet Hoarder dies, create a colorless Treasure artifact token with "{t}, Sacrifice this artifact: Add one mana of any color to your mana pool." + this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new TreasureToken()))); + } + + public DireFleetHoarder(final DireFleetHoarder card) { + super(card); + } + + @Override + public DireFleetHoarder copy() { + return new DireFleetHoarder(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DireFleetInterloper.java b/Mage.Sets/src/mage/cards/d/DireFleetInterloper.java new file mode 100644 index 0000000000..f0ccc16a90 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DireFleetInterloper.java @@ -0,0 +1,69 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.keyword.ExploreSourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class DireFleetInterloper extends CardImpl { + + public DireFleetInterloper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Menace + this.addAbility(new MenaceAbility()); + + // When Dire Fleet Interloper enters the battlefield, it explores. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ExploreSourceEffect())); + } + + public DireFleetInterloper(final DireFleetInterloper card) { + super(card); + } + + @Override + public DireFleetInterloper copy() { + return new DireFleetInterloper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DireFleetRavager.java b/Mage.Sets/src/mage/cards/d/DireFleetRavager.java new file mode 100644 index 0000000000..2cb8e9204a --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DireFleetRavager.java @@ -0,0 +1,111 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.constants.SubType; +import mage.abilities.keyword.MenaceAbility; +import mage.abilities.keyword.DeathtouchAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class DireFleetRavager extends CardImpl { + + public DireFleetRavager(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.PIRATE); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Menace + this.addAbility(new MenaceAbility()); + + // Deathtouch + this.addAbility(DeathtouchAbility.getInstance()); + + // When Dire Fleet Ravager enters the battlefield, each player loses a third of his or her life, rounded up. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DireFleetRavagerEffect())); + } + + public DireFleetRavager(final DireFleetRavager card) { + super(card); + } + + @Override + public DireFleetRavager copy() { + return new DireFleetRavager(this); + } +} + +class DireFleetRavagerEffect extends OneShotEffect { + + DireFleetRavagerEffect() { + super(Outcome.Detriment); + this.staticText = "each player loses a third of his or her life, rounded up"; + } + + DireFleetRavagerEffect(final DireFleetRavagerEffect effect) { + super(effect); + } + + @Override + public DireFleetRavagerEffect copy() { + return new DireFleetRavagerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + int lifeToLose = (int) Math.ceil(player.getLife() / 3.0); + player.loseLife(lifeToLose, game, false); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/d/DiregrafCaptain.java b/Mage.Sets/src/mage/cards/d/DiregrafCaptain.java index 3cb8a743a5..775e1238f3 100644 --- a/Mage.Sets/src/mage/cards/d/DiregrafCaptain.java +++ b/Mage.Sets/src/mage/cards/d/DiregrafCaptain.java @@ -63,8 +63,8 @@ public class DiregrafCaptain extends CardImpl { public DiregrafCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DiregrafColossus.java b/Mage.Sets/src/mage/cards/d/DiregrafColossus.java index e131cb7005..019bd4899a 100644 --- a/Mage.Sets/src/mage/cards/d/DiregrafColossus.java +++ b/Mage.Sets/src/mage/cards/d/DiregrafColossus.java @@ -62,8 +62,8 @@ public class DiregrafColossus extends CardImpl { public DiregrafColossus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Giant"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.GIANT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DiregrafEscort.java b/Mage.Sets/src/mage/cards/d/DiregrafEscort.java index 716b582ad0..0d90435318 100644 --- a/Mage.Sets/src/mage/cards/d/DiregrafEscort.java +++ b/Mage.Sets/src/mage/cards/d/DiregrafEscort.java @@ -57,8 +57,8 @@ public class DiregrafEscort extends CardImpl { public DiregrafEscort(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DiregrafGhoul.java b/Mage.Sets/src/mage/cards/d/DiregrafGhoul.java index 58eb0d033a..a7d4bb9eb9 100644 --- a/Mage.Sets/src/mage/cards/d/DiregrafGhoul.java +++ b/Mage.Sets/src/mage/cards/d/DiregrafGhoul.java @@ -33,6 +33,7 @@ import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class DiregrafGhoul extends CardImpl { public DiregrafGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.color.setBlack(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DirgurNemesis.java b/Mage.Sets/src/mage/cards/d/DirgurNemesis.java index aa37f4a993..9cc94ab4fe 100644 --- a/Mage.Sets/src/mage/cards/d/DirgurNemesis.java +++ b/Mage.Sets/src/mage/cards/d/DirgurNemesis.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class DirgurNemesis extends CardImpl { public DirgurNemesis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DirtcowlWurm.java b/Mage.Sets/src/mage/cards/d/DirtcowlWurm.java index e0ffc0cd88..b518f1a69a 100644 --- a/Mage.Sets/src/mage/cards/d/DirtcowlWurm.java +++ b/Mage.Sets/src/mage/cards/d/DirtcowlWurm.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -49,7 +50,7 @@ public class DirtcowlWurm extends CardImpl { public DirtcowlWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DirtwaterWraith.java b/Mage.Sets/src/mage/cards/d/DirtwaterWraith.java index d614292cd1..d837d294fe 100644 --- a/Mage.Sets/src/mage/cards/d/DirtwaterWraith.java +++ b/Mage.Sets/src/mage/cards/d/DirtwaterWraith.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class DirtwaterWraith extends CardImpl { public DirtwaterWraith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Wraith"); + this.subtype.add(SubType.WRAITH); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DirtyWererat.java b/Mage.Sets/src/mage/cards/d/DirtyWererat.java index 90435f8ff0..54c5df8b6a 100644 --- a/Mage.Sets/src/mage/cards/d/DirtyWererat.java +++ b/Mage.Sets/src/mage/cards/d/DirtyWererat.java @@ -45,6 +45,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -56,9 +57,9 @@ public class DirtyWererat extends CardImpl { public DirtyWererat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rat"); - this.subtype.add("Minion"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.RAT); + this.subtype.add(SubType.MINION); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DiscipleOfBolas.java b/Mage.Sets/src/mage/cards/d/DiscipleOfBolas.java index 1c9b797b93..7395ebfabb 100644 --- a/Mage.Sets/src/mage/cards/d/DiscipleOfBolas.java +++ b/Mage.Sets/src/mage/cards/d/DiscipleOfBolas.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.StaticFilters; import mage.game.Game; @@ -51,8 +52,8 @@ public class DiscipleOfBolas extends CardImpl { public DiscipleOfBolas(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DiscipleOfDeceit.java b/Mage.Sets/src/mage/cards/d/DiscipleOfDeceit.java index 3385a85c5f..86498c199a 100644 --- a/Mage.Sets/src/mage/cards/d/DiscipleOfDeceit.java +++ b/Mage.Sets/src/mage/cards/d/DiscipleOfDeceit.java @@ -40,6 +40,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.filter.FilterCard; @@ -58,8 +59,8 @@ public class DiscipleOfDeceit extends CardImpl { public DiscipleOfDeceit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DiscipleOfGrace.java b/Mage.Sets/src/mage/cards/d/DiscipleOfGrace.java index 81493f5e85..b34a026f32 100644 --- a/Mage.Sets/src/mage/cards/d/DiscipleOfGrace.java +++ b/Mage.Sets/src/mage/cards/d/DiscipleOfGrace.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Backfir3 @@ -45,8 +46,8 @@ public class DiscipleOfGrace extends CardImpl { public DiscipleOfGrace(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DiscipleOfGriselbrand.java b/Mage.Sets/src/mage/cards/d/DiscipleOfGriselbrand.java index 4b20bf0a6c..399b6a265f 100644 --- a/Mage.Sets/src/mage/cards/d/DiscipleOfGriselbrand.java +++ b/Mage.Sets/src/mage/cards/d/DiscipleOfGriselbrand.java @@ -38,6 +38,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -52,8 +53,8 @@ public class DiscipleOfGriselbrand extends CardImpl { public DiscipleOfGriselbrand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DiscipleOfKangee.java b/Mage.Sets/src/mage/cards/d/DiscipleOfKangee.java index fd9c5842fd..2b9013af4c 100644 --- a/Mage.Sets/src/mage/cards/d/DiscipleOfKangee.java +++ b/Mage.Sets/src/mage/cards/d/DiscipleOfKangee.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -53,8 +54,8 @@ public class DiscipleOfKangee extends CardImpl { public DiscipleOfKangee(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DiscipleOfLaw.java b/Mage.Sets/src/mage/cards/d/DiscipleOfLaw.java index b91e10738a..b7834c8ebb 100644 --- a/Mage.Sets/src/mage/cards/d/DiscipleOfLaw.java +++ b/Mage.Sets/src/mage/cards/d/DiscipleOfLaw.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class DiscipleOfLaw extends CardImpl { public DiscipleOfLaw(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DiscipleOfMalice.java b/Mage.Sets/src/mage/cards/d/DiscipleOfMalice.java index 76901256f9..3be5981f69 100644 --- a/Mage.Sets/src/mage/cards/d/DiscipleOfMalice.java +++ b/Mage.Sets/src/mage/cards/d/DiscipleOfMalice.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class DiscipleOfMalice extends CardImpl { public DiscipleOfMalice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DiscipleOfPhenax.java b/Mage.Sets/src/mage/cards/d/DiscipleOfPhenax.java index 19b3be9904..0ba1d58735 100644 --- a/Mage.Sets/src/mage/cards/d/DiscipleOfPhenax.java +++ b/Mage.Sets/src/mage/cards/d/DiscipleOfPhenax.java @@ -36,6 +36,7 @@ import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.OneShotEffect; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class DiscipleOfPhenax extends CardImpl { public DiscipleOfPhenax(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DiscipleOfTeveshSzat.java b/Mage.Sets/src/mage/cards/d/DiscipleOfTeveshSzat.java index 0638385b92..4e68a256aa 100644 --- a/Mage.Sets/src/mage/cards/d/DiscipleOfTeveshSzat.java +++ b/Mage.Sets/src/mage/cards/d/DiscipleOfTeveshSzat.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class DiscipleOfTeveshSzat extends CardImpl { public DiscipleOfTeveshSzat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DiscipleOfTheOldWays.java b/Mage.Sets/src/mage/cards/d/DiscipleOfTheOldWays.java index a86686e479..ad61ced9b7 100644 --- a/Mage.Sets/src/mage/cards/d/DiscipleOfTheOldWays.java +++ b/Mage.Sets/src/mage/cards/d/DiscipleOfTheOldWays.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class DiscipleOfTheOldWays extends CardImpl { public DiscipleOfTheOldWays(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DiscipleOfTheRing.java b/Mage.Sets/src/mage/cards/d/DiscipleOfTheRing.java index 1c0d744fd0..3b5dedc9dc 100644 --- a/Mage.Sets/src/mage/cards/d/DiscipleOfTheRing.java +++ b/Mage.Sets/src/mage/cards/d/DiscipleOfTheRing.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterSpell; @@ -65,8 +66,8 @@ public class DiscipleOfTheRing extends CardImpl { public DiscipleOfTheRing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DiscipleOfTheVault.java b/Mage.Sets/src/mage/cards/d/DiscipleOfTheVault.java index 95c4714849..540e976ec7 100644 --- a/Mage.Sets/src/mage/cards/d/DiscipleOfTheVault.java +++ b/Mage.Sets/src/mage/cards/d/DiscipleOfTheVault.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterArtifactPermanent; import mage.target.common.TargetOpponent; @@ -48,8 +49,8 @@ public class DiscipleOfTheVault extends CardImpl { public DiscipleOfTheVault(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DiseaseCarriers.java b/Mage.Sets/src/mage/cards/d/DiseaseCarriers.java index 7aebceec98..f116183b7a 100644 --- a/Mage.Sets/src/mage/cards/d/DiseaseCarriers.java +++ b/Mage.Sets/src/mage/cards/d/DiseaseCarriers.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -46,7 +47,7 @@ public class DiseaseCarriers extends CardImpl { public DiseaseCarriers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/Disharmony.java b/Mage.Sets/src/mage/cards/d/Disharmony.java new file mode 100644 index 0000000000..42d58c00a5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/Disharmony.java @@ -0,0 +1,70 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility; +import mage.abilities.condition.common.BeforeBlockersAreDeclaredCondition; +import mage.abilities.effects.common.RemoveFromCombatTargetEffect; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TurnPhase; +import mage.target.common.TargetAttackingCreature; + +/** + * + * @author TheElk801 + */ +public class Disharmony extends CardImpl { + + public Disharmony(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); + + // Cast Disharmony only during combat before blockers are declared. + this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(TurnPhase.COMBAT, BeforeBlockersAreDeclaredCondition.instance)); + + // Untap target attacking creature and remove it from combat. Gain control of that creature until end of turn. + this.getSpellAbility().addEffect(new UntapTargetEffect()); + this.getSpellAbility().addEffect(new RemoveFromCombatTargetEffect().setText("and remove it from combat.")); + this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn, true).setText("Gain control of that creature until end of turn.")); + this.getSpellAbility().addTarget(new TargetAttackingCreature()); + } + + public Disharmony(final Disharmony card) { + super(card); + } + + @Override + public Disharmony copy() { + return new Disharmony(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DisownedAncestor.java b/Mage.Sets/src/mage/cards/d/DisownedAncestor.java index 85191480ef..9ca6c401a0 100644 --- a/Mage.Sets/src/mage/cards/d/DisownedAncestor.java +++ b/Mage.Sets/src/mage/cards/d/DisownedAncestor.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.OutlastAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class DisownedAncestor extends CardImpl { public DisownedAncestor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Spirit"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DispersalTechnician.java b/Mage.Sets/src/mage/cards/d/DispersalTechnician.java index e936755bf7..c7cba6a9e1 100644 --- a/Mage.Sets/src/mage/cards/d/DispersalTechnician.java +++ b/Mage.Sets/src/mage/cards/d/DispersalTechnician.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterArtifactPermanent; import mage.target.TargetPermanent; @@ -47,8 +48,8 @@ public class DispersalTechnician extends CardImpl { public DispersalTechnician(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DisposalMummy.java b/Mage.Sets/src/mage/cards/d/DisposalMummy.java index bd05d1fbfa..d33f8ce436 100644 --- a/Mage.Sets/src/mage/cards/d/DisposalMummy.java +++ b/Mage.Sets/src/mage/cards/d/DisposalMummy.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.target.Target; import mage.target.common.TargetCardInOpponentsGraveyard; @@ -48,8 +49,8 @@ public class DisposalMummy extends CardImpl { public DisposalMummy(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Zombie"); - this.subtype.add("Jackal"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.JACKAL); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DisruptionAura.java b/Mage.Sets/src/mage/cards/d/DisruptionAura.java index eb3baf7c30..dc2849853f 100644 --- a/Mage.Sets/src/mage/cards/d/DisruptionAura.java +++ b/Mage.Sets/src/mage/cards/d/DisruptionAura.java @@ -55,7 +55,7 @@ public class DisruptionAura extends CardImpl { public DisruptionAura(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant artifact TargetPermanent auraTarget = new TargetArtifactPermanent(); diff --git a/Mage.Sets/src/mage/cards/d/DisruptivePitmage.java b/Mage.Sets/src/mage/cards/d/DisruptivePitmage.java index e5b8ffbc81..482b515138 100644 --- a/Mage.Sets/src/mage/cards/d/DisruptivePitmage.java +++ b/Mage.Sets/src/mage/cards/d/DisruptivePitmage.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetSpell; @@ -50,8 +51,8 @@ public class DisruptivePitmage extends CardImpl { public DisruptivePitmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DisruptiveStudent.java b/Mage.Sets/src/mage/cards/d/DisruptiveStudent.java index 5a2864ca81..c2e40f6a77 100644 --- a/Mage.Sets/src/mage/cards/d/DisruptiveStudent.java +++ b/Mage.Sets/src/mage/cards/d/DisruptiveStudent.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CounterUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetSpell; @@ -48,8 +49,8 @@ public class DisruptiveStudent extends CardImpl { public DisruptiveStudent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DistendedMindbender.java b/Mage.Sets/src/mage/cards/d/DistendedMindbender.java index 538386a4d6..46480bd2a8 100644 --- a/Mage.Sets/src/mage/cards/d/DistendedMindbender.java +++ b/Mage.Sets/src/mage/cards/d/DistendedMindbender.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.Zone; @@ -59,8 +60,8 @@ public class DistendedMindbender extends CardImpl { public DistendedMindbender(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{8}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Insect"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.INSECT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DiveBomber.java b/Mage.Sets/src/mage/cards/d/DiveBomber.java index 60f364d6d7..8e13129aa1 100644 --- a/Mage.Sets/src/mage/cards/d/DiveBomber.java +++ b/Mage.Sets/src/mage/cards/d/DiveBomber.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterAttackingOrBlockingCreature; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class DiveBomber extends CardImpl { public DiveBomber(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DiveDown.java b/Mage.Sets/src/mage/cards/d/DiveDown.java new file mode 100644 index 0000000000..8ce6392e1c --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DiveDown.java @@ -0,0 +1,68 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HexproofAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class DiveDown extends CardImpl { + + public DiveDown(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}"); + + // Target creature you control gets +0/+3 and gains hexproof until end of turn. + Effect effect = new BoostTargetEffect(0, 3, Duration.EndOfTurn); + effect.setText("Target creature you control gets +0/+3"); + this.getSpellAbility().addEffect(effect); + effect = new GainAbilityTargetEffect(HexproofAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains hexproof until end of turn"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + } + + public DiveDown(final DiveDown card) { + super(card); + } + + @Override + public DiveDown copy() { + return new DiveDown(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DivebomberGriffin.java b/Mage.Sets/src/mage/cards/d/DivebomberGriffin.java index f7ff360ac6..3c9e10acdb 100644 --- a/Mage.Sets/src/mage/cards/d/DivebomberGriffin.java +++ b/Mage.Sets/src/mage/cards/d/DivebomberGriffin.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterAttackingOrBlockingCreature; import mage.target.common.TargetCreaturePermanent; @@ -50,7 +51,7 @@ public class DivebomberGriffin extends CardImpl { public DivebomberGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DivineFavor.java b/Mage.Sets/src/mage/cards/d/DivineFavor.java index d6f0e1c154..b094283e04 100644 --- a/Mage.Sets/src/mage/cards/d/DivineFavor.java +++ b/Mage.Sets/src/mage/cards/d/DivineFavor.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class DivineFavor extends CardImpl { public DivineFavor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/cards/d/DivineLight.java b/Mage.Sets/src/mage/cards/d/DivineLight.java index 3035f362f8..ca3e4380ec 100644 --- a/Mage.Sets/src/mage/cards/d/DivineLight.java +++ b/Mage.Sets/src/mage/cards/d/DivineLight.java @@ -50,10 +50,12 @@ public class DivineLight extends CardImpl { } public DivineLight(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{W}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{W}"); // Prevent all damage that would be dealt this turn to creatures you control. - this.getSpellAbility().addEffect(new PreventAllDamageToAllEffect(Duration.EndOfTurn, filter)); + this.getSpellAbility().addEffect(new PreventAllDamageToAllEffect(Duration.EndOfTurn, filter) + .setText("Prevent all damage that would be dealt this turn to creatures you control.") + ); } public DivineLight(final DivineLight card) { diff --git a/Mage.Sets/src/mage/cards/d/DivineRetribution.java b/Mage.Sets/src/mage/cards/d/DivineRetribution.java new file mode 100644 index 0000000000..c73e8933b2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DivineRetribution.java @@ -0,0 +1,64 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterAttackingCreature; +import mage.target.common.TargetAttackingCreature; + +/** + * + * @author TheElk801 + */ +public class DivineRetribution extends CardImpl { + + public DivineRetribution(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}"); + + // Divine Retribution deals damage to target attacking creature equal to the number of attacking creatures. + this.getSpellAbility().addEffect( + new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterAttackingCreature())) + .setText("{this} deals damage to target attacking creature equal to the number of attacking creatures.") + ); + this.getSpellAbility().addTarget(new TargetAttackingCreature()); + } + + public DivineRetribution(final DivineRetribution card) { + super(card); + } + + @Override + public DivineRetribution copy() { + return new DivineRetribution(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DivineTransformation.java b/Mage.Sets/src/mage/cards/d/DivineTransformation.java index 7b149824bd..715eee2511 100644 --- a/Mage.Sets/src/mage/cards/d/DivineTransformation.java +++ b/Mage.Sets/src/mage/cards/d/DivineTransformation.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class DivineTransformation extends CardImpl { public DivineTransformation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/d/DivinerSpirit.java b/Mage.Sets/src/mage/cards/d/DivinerSpirit.java index f963f3f371..167ca0f3ba 100644 --- a/Mage.Sets/src/mage/cards/d/DivinerSpirit.java +++ b/Mage.Sets/src/mage/cards/d/DivinerSpirit.java @@ -30,11 +30,12 @@ package mage.cards.d; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -46,14 +47,14 @@ import mage.players.Player; public class DivinerSpirit extends CardImpl { public DivinerSpirit(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Spirit"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(4); // Whenever Diviner Spirit deals combat damage to a player, you and that player each draw that many cards. - this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new DivinerSpiritEffect(), false, true)); + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DivinerSpiritEffect(), false, true)); } public DivinerSpirit(final DivinerSpirit card) { diff --git a/Mage.Sets/src/mage/cards/d/DivinersWand.java b/Mage.Sets/src/mage/cards/d/DivinersWand.java index d3e41b8e90..b516226380 100644 --- a/Mage.Sets/src/mage/cards/d/DivinersWand.java +++ b/Mage.Sets/src/mage/cards/d/DivinersWand.java @@ -62,8 +62,8 @@ public class DivinersWand extends CardImpl { public DivinersWand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.ARTIFACT},"{3}"); - this.subtype.add("Wizard"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.WIZARD); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has "Whenever you draw a card, this creature gets +1/+1 and gains flying until end of turn" and "{4}: Draw a card." Ability gainedAbility = new DrawCardControllerTriggeredAbility(new BoostSourceEffect(1,1, Duration.EndOfTurn), false); diff --git a/Mage.Sets/src/mage/cards/d/DivingGriffin.java b/Mage.Sets/src/mage/cards/d/DivingGriffin.java index 6533cbfe25..db8cbbe9b1 100644 --- a/Mage.Sets/src/mage/cards/d/DivingGriffin.java +++ b/Mage.Sets/src/mage/cards/d/DivingGriffin.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class DivingGriffin extends CardImpl { public DivingGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DiviningWitch.java b/Mage.Sets/src/mage/cards/d/DiviningWitch.java index 47295968c6..cd9f02de23 100644 --- a/Mage.Sets/src/mage/cards/d/DiviningWitch.java +++ b/Mage.Sets/src/mage/cards/d/DiviningWitch.java @@ -41,6 +41,7 @@ import mage.cards.repository.CardRepository; import mage.choices.Choice; import mage.choices.ChoiceImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,8 +57,8 @@ public class DiviningWitch extends CardImpl { public DiviningWitch(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DivinityOfPride.java b/Mage.Sets/src/mage/cards/d/DivinityOfPride.java index 8e4af19084..2e687a2d8b 100644 --- a/Mage.Sets/src/mage/cards/d/DivinityOfPride.java +++ b/Mage.Sets/src/mage/cards/d/DivinityOfPride.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -52,8 +53,8 @@ public class DivinityOfPride extends CardImpl { public DivinityOfPride(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W/B}{W/B}{W/B}{W/B}{W/B}"); - this.subtype.add("Spirit"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DjeruWithEyesOpen.java b/Mage.Sets/src/mage/cards/d/DjeruWithEyesOpen.java index 3b37cf5b2f..efacfd9440 100644 --- a/Mage.Sets/src/mage/cards/d/DjeruWithEyesOpen.java +++ b/Mage.Sets/src/mage/cards/d/DjeruWithEyesOpen.java @@ -1,126 +1,127 @@ -/* - * 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.cards.d; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.PreventionEffectImpl; -import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; -import mage.abilities.keyword.VigilanceAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SuperType; -import mage.constants.Zone; -import mage.filter.FilterCard; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; -import mage.target.common.TargetCardInLibrary; - -/** - * - * @author LevelX2 - */ -public class DjeruWithEyesOpen extends CardImpl { - - private static final FilterCard filter = new FilterCard("planeswalker card"); - - static { - filter.add(new CardTypePredicate(CardType.PLANESWALKER)); - } - - public DjeruWithEyesOpen(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); - - addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Warrior"); - this.power = new MageInt(4); - this.toughness = new MageInt(3); - - // Vigilance - this.addAbility(VigilanceAbility.getInstance()); - - // When Djeru, With Eyes Open enters the battlefield, you may search your library for a planeswalker card, reveal it, put it into your hand, then shuffle your library. - Effect effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, filter), true, true); - effect.setText("you may search your library for a planeswalker card, reveal it, put it into your hand, then shuffle your library"); - this.addAbility(new EntersBattlefieldTriggeredAbility(effect, true)); - - // If a source would deal damage to a planeswalker you control, prevent 1 of that damage. - this.addAbility(new SimpleStaticAbility(Zone.COMMAND, new DjeruWithEyesOpenPreventEffect())); - } - - public DjeruWithEyesOpen(final DjeruWithEyesOpen card) { - super(card); - } - - @Override - public DjeruWithEyesOpen copy() { - return new DjeruWithEyesOpen(this); - } -} - -class DjeruWithEyesOpenPreventEffect extends PreventionEffectImpl { - - public DjeruWithEyesOpenPreventEffect() { - super(Duration.WhileOnBattlefield, 1, false, false); - this.staticText = "If a source would deal damage to a planeswalker you control, prevent 1 of that damage"; - } - - public DjeruWithEyesOpenPreventEffect(DjeruWithEyesOpenPreventEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - if (event.getType() == GameEvent.EventType.DAMAGE_PLANESWALKER) { - Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null && permanent.getControllerId().equals(source.getControllerId())) { - return super.applies(event, source, game); - } - } - return false; - } - - @Override - public DjeruWithEyesOpenPreventEffect copy() { - return new DjeruWithEyesOpenPreventEffect(this); - } -} +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.PreventionEffectImpl; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author LevelX2 + */ +public class DjeruWithEyesOpen extends CardImpl { + + private static final FilterCard filter = new FilterCard("planeswalker card"); + + static { + filter.add(new CardTypePredicate(CardType.PLANESWALKER)); + } + + public DjeruWithEyesOpen(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // When Djeru, With Eyes Open enters the battlefield, you may search your library for a planeswalker card, reveal it, put it into your hand, then shuffle your library. + Effect effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, filter), true, true); + effect.setText("you may search your library for a planeswalker card, reveal it, put it into your hand, then shuffle your library"); + this.addAbility(new EntersBattlefieldTriggeredAbility(effect, true)); + + // If a source would deal damage to a planeswalker you control, prevent 1 of that damage. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DjeruWithEyesOpenPreventEffect())); + } + + public DjeruWithEyesOpen(final DjeruWithEyesOpen card) { + super(card); + } + + @Override + public DjeruWithEyesOpen copy() { + return new DjeruWithEyesOpen(this); + } +} + +class DjeruWithEyesOpenPreventEffect extends PreventionEffectImpl { + + public DjeruWithEyesOpenPreventEffect() { + super(Duration.WhileOnBattlefield, 1, false, false); + this.staticText = "If a source would deal damage to a planeswalker you control, prevent 1 of that damage"; + } + + public DjeruWithEyesOpenPreventEffect(DjeruWithEyesOpenPreventEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == GameEvent.EventType.DAMAGE_PLANESWALKER) { + Permanent permanent = game.getPermanent(event.getTargetId()); + if (permanent != null && permanent.getControllerId().equals(source.getControllerId())) { + return super.applies(event, source, game); + } + } + return false; + } + + @Override + public DjeruWithEyesOpenPreventEffect copy() { + return new DjeruWithEyesOpenPreventEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DjinnIlluminatus.java b/Mage.Sets/src/mage/cards/d/DjinnIlluminatus.java index fa106b0ec7..ffccf10059 100644 --- a/Mage.Sets/src/mage/cards/d/DjinnIlluminatus.java +++ b/Mage.Sets/src/mage/cards/d/DjinnIlluminatus.java @@ -27,9 +27,6 @@ */ package mage.cards.d; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; @@ -44,6 +41,10 @@ import mage.game.Game; import mage.game.stack.Spell; import mage.game.stack.StackObject; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + /** * * @author LevelX2 @@ -52,7 +53,7 @@ public class DjinnIlluminatus extends CardImpl { public DjinnIlluminatus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U/R}{U/R}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(3); this.toughness = new MageInt(5); @@ -87,7 +88,7 @@ class DjinnIlluminatusGainReplicateEffect extends ContinuousEffectImpl { public DjinnIlluminatusGainReplicateEffect(final DjinnIlluminatusGainReplicateEffect effect) { super(effect); - this.replicateAbilities.putAll(replicateAbilities); + this.replicateAbilities.putAll(effect.replicateAbilities); } @Override diff --git a/Mage.Sets/src/mage/cards/d/DjinnOfInfiniteDeceits.java b/Mage.Sets/src/mage/cards/d/DjinnOfInfiniteDeceits.java index 08afeb7f43..d7017fbad4 100644 --- a/Mage.Sets/src/mage/cards/d/DjinnOfInfiniteDeceits.java +++ b/Mage.Sets/src/mage/cards/d/DjinnOfInfiniteDeceits.java @@ -58,7 +58,7 @@ public class DjinnOfInfiniteDeceits extends CardImpl { public DjinnOfInfiniteDeceits(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(2); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/d/DjinnOfTheLamp.java b/Mage.Sets/src/mage/cards/d/DjinnOfTheLamp.java index 6a83b4c25e..6c436e2127 100644 --- a/Mage.Sets/src/mage/cards/d/DjinnOfTheLamp.java +++ b/Mage.Sets/src/mage/cards/d/DjinnOfTheLamp.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class DjinnOfTheLamp extends CardImpl { public DjinnOfTheLamp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/DjinnOfWishes.java b/Mage.Sets/src/mage/cards/d/DjinnOfWishes.java index bc52382c8b..a6ca79ebae 100644 --- a/Mage.Sets/src/mage/cards/d/DjinnOfWishes.java +++ b/Mage.Sets/src/mage/cards/d/DjinnOfWishes.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -56,7 +57,7 @@ public class DjinnOfWishes extends CardImpl { public DjinnOfWishes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.color.setBlue(true); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DocentOfPerfection.java b/Mage.Sets/src/mage/cards/d/DocentOfPerfection.java index bac5a5b237..a0ec96d734 100644 --- a/Mage.Sets/src/mage/cards/d/DocentOfPerfection.java +++ b/Mage.Sets/src/mage/cards/d/DocentOfPerfection.java @@ -70,8 +70,8 @@ public class DocentOfPerfection extends CardImpl { public DocentOfPerfection(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Insect"); - this.subtype.add("Horror"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.HORROR); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/Dodecapod.java b/Mage.Sets/src/mage/cards/d/Dodecapod.java index faa4adacfb..f584342bc3 100644 --- a/Mage.Sets/src/mage/cards/d/Dodecapod.java +++ b/Mage.Sets/src/mage/cards/d/Dodecapod.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -49,7 +50,7 @@ public class Dodecapod extends CardImpl { public Dodecapod(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DoggedHunter.java b/Mage.Sets/src/mage/cards/d/DoggedHunter.java index 2485713a16..58f9b71470 100644 --- a/Mage.Sets/src/mage/cards/d/DoggedHunter.java +++ b/Mage.Sets/src/mage/cards/d/DoggedHunter.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.TokenPredicate; @@ -54,8 +55,8 @@ public class DoggedHunter extends CardImpl { public DoggedHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/Dogpile.java b/Mage.Sets/src/mage/cards/d/Dogpile.java index 18c8329fa0..bd7f3cc8d6 100644 --- a/Mage.Sets/src/mage/cards/d/Dogpile.java +++ b/Mage.Sets/src/mage/cards/d/Dogpile.java @@ -1,71 +1,71 @@ -/* - * 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.cards.d; - -import java.util.UUID; -import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.effects.common.DamageTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.TargetController; -import mage.filter.common.FilterAttackingCreature; -import mage.filter.predicate.permanent.ControllerPredicate; -import mage.target.common.TargetCreatureOrPlayer; - -/** - * - * @author LevelX2 - */ -public class Dogpile extends CardImpl { - - private static final FilterAttackingCreature filter = new FilterAttackingCreature("attacking creatures you control"); - - static { - filter.add(new ControllerPredicate(TargetController.YOU)); - } - - public Dogpile(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}"); - - // Dogpile deals damage to target creature or player equal to the number of attacking creatures you control. - this.getSpellAbility().addEffect(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter)). - setText("{this} deals damage to target creature or player equal to the number of attacking creatures you control")); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); - - } - - public Dogpile(final Dogpile card) { - super(card); - } - - @Override - public Dogpile copy() { - return new Dogpile(this); - } -} +/* + * 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.cards.d; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LevelX2 + */ +public class Dogpile extends CardImpl { + + private static final FilterAttackingCreature filter = new FilterAttackingCreature("attacking creatures you control"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public Dogpile(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}"); + + // Dogpile deals damage to target creature or player equal to the number of attacking creatures you control. + this.getSpellAbility().addEffect(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter)). + setText("{this} deals damage to target creature or player equal to the number of attacking creatures you control")); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + + } + + public Dogpile(final Dogpile card) { + super(card); + } + + @Override + public Dogpile copy() { + return new Dogpile(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DomesticatedHydra.java b/Mage.Sets/src/mage/cards/d/DomesticatedHydra.java index 20f3d4e1b6..60f50dc0c4 100644 --- a/Mage.Sets/src/mage/cards/d/DomesticatedHydra.java +++ b/Mage.Sets/src/mage/cards/d/DomesticatedHydra.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class DomesticatedHydra extends CardImpl { public DomesticatedHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/Domestication.java b/Mage.Sets/src/mage/cards/d/Domestication.java index ad5e473cf7..090645658c 100644 --- a/Mage.Sets/src/mage/cards/d/Domestication.java +++ b/Mage.Sets/src/mage/cards/d/Domestication.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class Domestication extends CardImpl { public Domestication(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/d/DominatingLicid.java b/Mage.Sets/src/mage/cards/d/DominatingLicid.java index 09165e8ccc..c74effe477 100644 --- a/Mage.Sets/src/mage/cards/d/DominatingLicid.java +++ b/Mage.Sets/src/mage/cards/d/DominatingLicid.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.ControlEnchantedEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class DominatingLicid extends CardImpl { public DominatingLicid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Licid"); + this.subtype.add(SubType.LICID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DominatorDrone.java b/Mage.Sets/src/mage/cards/d/DominatorDrone.java index 732ca25bf7..7c6e192818 100644 --- a/Mage.Sets/src/mage/cards/d/DominatorDrone.java +++ b/Mage.Sets/src/mage/cards/d/DominatorDrone.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.IngestAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorlessPredicate; import mage.filter.predicate.permanent.AnotherPredicate; @@ -59,8 +60,8 @@ public class DominatorDrone extends CardImpl { public DominatorDrone(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/Domineer.java b/Mage.Sets/src/mage/cards/d/Domineer.java index 1829064afd..c69265e542 100644 --- a/Mage.Sets/src/mage/cards/d/Domineer.java +++ b/Mage.Sets/src/mage/cards/d/Domineer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -57,7 +58,7 @@ public class Domineer extends CardImpl { public Domineer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant artifact creature TargetPermanent auraTarget = new TargetCreaturePermanent(filter); diff --git a/Mage.Sets/src/mage/cards/d/DominusOfFealty.java b/Mage.Sets/src/mage/cards/d/DominusOfFealty.java index 3d4e85bf5b..dd6b778533 100644 --- a/Mage.Sets/src/mage/cards/d/DominusOfFealty.java +++ b/Mage.Sets/src/mage/cards/d/DominusOfFealty.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.target.TargetPermanent; @@ -50,17 +51,16 @@ import mage.target.TargetPermanent; public class DominusOfFealty extends CardImpl { public DominusOfFealty(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U/R}{U/R}{U/R}{U/R}{U/R}"); - this.subtype.add("Spirit"); - this.subtype.add("Avatar"); - + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U/R}{U/R}{U/R}{U/R}{U/R}"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(4); this.toughness = new MageInt(4); this.addAbility(FlyingAbility.getInstance()); Ability ability = new BeginningOfUpkeepTriggeredAbility(new GainControlTargetEffect(Duration.EndOfTurn), TargetController.YOU, true); - ability.addEffect(new UntapTargetEffect()); - ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); + ability.addEffect(new UntapTargetEffect().setText("If you do, untap it")); + ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("and it gains haste until end of turn")); ability.addTarget(new TargetPermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DomriRade.java b/Mage.Sets/src/mage/cards/d/DomriRade.java index c954e3c376..679fd8c5c7 100644 --- a/Mage.Sets/src/mage/cards/d/DomriRade.java +++ b/Mage.Sets/src/mage/cards/d/DomriRade.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -60,7 +61,7 @@ public class DomriRade extends CardImpl { public DomriRade(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{1}{R}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Domri"); + this.subtype.add(SubType.DOMRI); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/d/DongZhouTheTyrant.java b/Mage.Sets/src/mage/cards/d/DongZhouTheTyrant.java index 69f9411f6b..4e4f9ff3b7 100644 --- a/Mage.Sets/src/mage/cards/d/DongZhouTheTyrant.java +++ b/Mage.Sets/src/mage/cards/d/DongZhouTheTyrant.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.TargetController; @@ -60,8 +61,8 @@ public class DongZhouTheTyrant extends CardImpl { public DongZhouTheTyrant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DoomedDissenter.java b/Mage.Sets/src/mage/cards/d/DoomedDissenter.java index f0c4c57eec..d9c4b5d979 100644 --- a/Mage.Sets/src/mage/cards/d/DoomedDissenter.java +++ b/Mage.Sets/src/mage/cards/d/DoomedDissenter.java @@ -1,64 +1,65 @@ -/* - * 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.cards.d; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.DiesTriggeredAbility; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.game.permanent.token.ZombieToken; - -/** - * - * @author Styxo - */ -public class DoomedDissenter extends CardImpl { - - public DoomedDissenter(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - - this.subtype.add("Human"); - this.power = new MageInt(1); - this.toughness = new MageInt(1); - - // When Doomed Dissenter dies, create a 2/2 black Zombie creature token. - this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new ZombieToken()))); - } - - public DoomedDissenter(final DoomedDissenter card) { - super(card); - } - - @Override - public DoomedDissenter copy() { - return new DoomedDissenter(this); - } -} +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.game.permanent.token.ZombieToken; + +/** + * + * @author Styxo + */ +public class DoomedDissenter extends CardImpl { + + public DoomedDissenter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.HUMAN); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Doomed Dissenter dies, create a 2/2 black Zombie creature token. + this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new ZombieToken()))); + } + + public DoomedDissenter(final DoomedDissenter card) { + super(card); + } + + @Override + public DoomedDissenter copy() { + return new DoomedDissenter(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DoomedNecromancer.java b/Mage.Sets/src/mage/cards/d/DoomedNecromancer.java index 9917daa911..55f0a60aac 100644 --- a/Mage.Sets/src/mage/cards/d/DoomedNecromancer.java +++ b/Mage.Sets/src/mage/cards/d/DoomedNecromancer.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -51,9 +52,9 @@ public class DoomedNecromancer extends CardImpl { public DoomedNecromancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DoomedTraveler.java b/Mage.Sets/src/mage/cards/d/DoomedTraveler.java index 8410ee882c..6a222203cb 100644 --- a/Mage.Sets/src/mage/cards/d/DoomedTraveler.java +++ b/Mage.Sets/src/mage/cards/d/DoomedTraveler.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.SpiritWhiteToken; /** @@ -44,8 +45,8 @@ public class DoomedTraveler extends CardImpl { public DoomedTraveler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/Doomgape.java b/Mage.Sets/src/mage/cards/d/Doomgape.java index 6235d24093..2547128ab7 100644 --- a/Mage.Sets/src/mage/cards/d/Doomgape.java +++ b/Mage.Sets/src/mage/cards/d/Doomgape.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class Doomgape extends CardImpl { public Doomgape(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B/G}{B/G}{B/G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(10); this.toughness = new MageInt(10); diff --git a/Mage.Sets/src/mage/cards/d/DoomsdaySpecter.java b/Mage.Sets/src/mage/cards/d/DoomsdaySpecter.java index c917080fc0..6a2a2be932 100644 --- a/Mage.Sets/src/mage/cards/d/DoomsdaySpecter.java +++ b/Mage.Sets/src/mage/cards/d/DoomsdaySpecter.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,7 +58,7 @@ public class DoomsdaySpecter extends CardImpl { public DoomsdaySpecter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{B}"); - this.subtype.add("Specter"); + this.subtype.add(SubType.SPECTER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DoomwakeGiant.java b/Mage.Sets/src/mage/cards/d/DoomwakeGiant.java index d5d6ee4f0b..f98f535e24 100644 --- a/Mage.Sets/src/mage/cards/d/DoomwakeGiant.java +++ b/Mage.Sets/src/mage/cards/d/DoomwakeGiant.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -53,7 +54,7 @@ public class DoomwakeGiant extends CardImpl { public DoomwakeGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{4}{B}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/Doorkeeper.java b/Mage.Sets/src/mage/cards/d/Doorkeeper.java index 9b7bbd00dc..b1780b7a9c 100644 --- a/Mage.Sets/src/mage/cards/d/Doorkeeper.java +++ b/Mage.Sets/src/mage/cards/d/Doorkeeper.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -58,7 +59,7 @@ public class Doorkeeper extends CardImpl { public Doorkeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Homunculus"); + this.subtype.add(SubType.HOMUNCULUS); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DoranTheSiegeTower.java b/Mage.Sets/src/mage/cards/d/DoranTheSiegeTower.java index 13de0d7d62..a6b272dce4 100644 --- a/Mage.Sets/src/mage/cards/d/DoranTheSiegeTower.java +++ b/Mage.Sets/src/mage/cards/d/DoranTheSiegeTower.java @@ -56,8 +56,8 @@ public class DoranTheSiegeTower extends CardImpl { public DoranTheSiegeTower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Treefolk"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DormantGomazoa.java b/Mage.Sets/src/mage/cards/d/DormantGomazoa.java index e074d2bdcf..067ebc283a 100644 --- a/Mage.Sets/src/mage/cards/d/DormantGomazoa.java +++ b/Mage.Sets/src/mage/cards/d/DormantGomazoa.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,7 +49,7 @@ public class DormantGomazoa extends CardImpl { public DormantGomazoa(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Jellyfish"); + this.subtype.add(SubType.JELLYFISH); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DormantSliver.java b/Mage.Sets/src/mage/cards/d/DormantSliver.java index 2859fdf799..79dfcb65e7 100644 --- a/Mage.Sets/src/mage/cards/d/DormantSliver.java +++ b/Mage.Sets/src/mage/cards/d/DormantSliver.java @@ -56,7 +56,7 @@ public class DormantSliver extends CardImpl { public DormantSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{U}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DosanTheFallingLeaf.java b/Mage.Sets/src/mage/cards/d/DosanTheFallingLeaf.java index 41e559e446..2f53e5baf0 100644 --- a/Mage.Sets/src/mage/cards/d/DosanTheFallingLeaf.java +++ b/Mage.Sets/src/mage/cards/d/DosanTheFallingLeaf.java @@ -47,8 +47,8 @@ public class DosanTheFallingLeaf extends CardImpl { public DosanTheFallingLeaf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DoubtlessOne.java b/Mage.Sets/src/mage/cards/d/DoubtlessOne.java index f5605ac2bf..28767b7277 100644 --- a/Mage.Sets/src/mage/cards/d/DoubtlessOne.java +++ b/Mage.Sets/src/mage/cards/d/DoubtlessOne.java @@ -56,8 +56,8 @@ public class DoubtlessOne extends CardImpl { public DoubtlessOne(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Cleric"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/d/Dovescape.java b/Mage.Sets/src/mage/cards/d/Dovescape.java index 9d63bde0fc..2b8e339aa4 100644 --- a/Mage.Sets/src/mage/cards/d/Dovescape.java +++ b/Mage.Sets/src/mage/cards/d/Dovescape.java @@ -91,7 +91,7 @@ class DovescapeEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Spell spell = game.getStack().getSpell(this.getTargetPointer().getFirst(game, source)); + Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source)); int spellCMC = 0; UUID spellControllerID = null; if (spell != null) { diff --git a/Mage.Sets/src/mage/cards/d/DovinBaan.java b/Mage.Sets/src/mage/cards/d/DovinBaan.java index e9e4d66379..2a2dbfb714 100644 --- a/Mage.Sets/src/mage/cards/d/DovinBaan.java +++ b/Mage.Sets/src/mage/cards/d/DovinBaan.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SuperType; @@ -58,7 +59,7 @@ public class DovinBaan extends CardImpl { public DovinBaan(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{W}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dovin"); + this.subtype.add(SubType.DOVIN); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/d/DowsingDagger.java b/Mage.Sets/src/mage/cards/d/DowsingDagger.java new file mode 100644 index 0000000000..9d170400f0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DowsingDagger.java @@ -0,0 +1,91 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.DealsDamageToAPlayerAttachedTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CreateTokenTargetEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.abilities.keyword.TransformAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.l.LostVale; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.permanent.token.DefenderPlantToken; +import mage.target.Target; +import mage.target.common.TargetOpponent; + +/** + * + * @author TheElk801 + */ +public class DowsingDagger extends CardImpl { + + public DowsingDagger(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + this.subtype.add(SubType.EQUIPMENT); + + this.transformable = true; + this.secondSideCardClazz = LostVale.class; + + // When Dowsing Dagger enters the battlefield, target opponent creates two 0/2 green Plant creature tokens with defender. + Ability ability = new EntersBattlefieldTriggeredAbility(new CreateTokenTargetEffect(new DefenderPlantToken(), 2), false); + Target target = new TargetOpponent(); + ability.addTarget(target); + this.addAbility(ability); + + // Equipped creature gets +2/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 1))); + + // Whenever equipped creature deals combat damage to a player, you may transform Dowsing Dagger. + this.addAbility(new TransformAbility()); + this.addAbility(new DealsDamageToAPlayerAttachedTriggeredAbility(new TransformSourceEffect(true), "equipped", true)); + + // Equip 2 + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); + } + + public DowsingDagger(final DowsingDagger card) { + super(card); + } + + @Override + public DowsingDagger copy() { + return new DowsingDagger(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DowsingShaman.java b/Mage.Sets/src/mage/cards/d/DowsingShaman.java index caa7a6c919..3f35a3d2c4 100644 --- a/Mage.Sets/src/mage/cards/d/DowsingShaman.java +++ b/Mage.Sets/src/mage/cards/d/DowsingShaman.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -56,8 +57,8 @@ public class DowsingShaman extends CardImpl { public DowsingShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/Draco.java b/Mage.Sets/src/mage/cards/d/Draco.java index d87fc4ee82..9132028b6f 100644 --- a/Mage.Sets/src/mage/cards/d/Draco.java +++ b/Mage.Sets/src/mage/cards/d/Draco.java @@ -53,7 +53,7 @@ public class Draco extends CardImpl { public Draco(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{16}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(9); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/d/Dracoplasm.java b/Mage.Sets/src/mage/cards/d/Dracoplasm.java index 16d12a0d02..e378fc7998 100644 --- a/Mage.Sets/src/mage/cards/d/Dracoplasm.java +++ b/Mage.Sets/src/mage/cards/d/Dracoplasm.java @@ -59,7 +59,7 @@ public class Dracoplasm extends CardImpl { public Dracoplasm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{R}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/d/DrafnasRestoration.java b/Mage.Sets/src/mage/cards/d/DrafnasRestoration.java index 3d86eced5f..c767d00504 100644 --- a/Mage.Sets/src/mage/cards/d/DrafnasRestoration.java +++ b/Mage.Sets/src/mage/cards/d/DrafnasRestoration.java @@ -51,9 +51,9 @@ import mage.target.common.TargetCardInGraveyard; public class DrafnasRestoration extends CardImpl { public DrafnasRestoration(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{U}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{U}"); - // Return any number of target artifact cards from target player's graveyard to the top of his or her library in any order. + // Put any number of target artifact cards from target player's graveyard on top of his or her library in any order. this.getSpellAbility().addEffect(new DrafnasRestorationEffect()); this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addTarget(new DrafnasRestorationTarget()); @@ -109,21 +109,21 @@ class DrafnasRestorationTarget extends TargetCardInGraveyard { } 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"; + this.staticText = "Put any number of target artifact cards from target player's graveyard on 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()); diff --git a/Mage.Sets/src/mage/cards/d/DragonBellMonk.java b/Mage.Sets/src/mage/cards/d/DragonBellMonk.java index 0bf52363e9..e2f15e05bc 100644 --- a/Mage.Sets/src/mage/cards/d/DragonBellMonk.java +++ b/Mage.Sets/src/mage/cards/d/DragonBellMonk.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class DragonBellMonk extends CardImpl { public DragonBellMonk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DragonBreath.java b/Mage.Sets/src/mage/cards/d/DragonBreath.java index e935c6c517..740b53850f 100644 --- a/Mage.Sets/src/mage/cards/d/DragonBreath.java +++ b/Mage.Sets/src/mage/cards/d/DragonBreath.java @@ -64,7 +64,7 @@ public class DragonBreath extends CardImpl { public DragonBreath(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/d/DragonBroodmother.java b/Mage.Sets/src/mage/cards/d/DragonBroodmother.java index d4aded7b8f..4b473f9c94 100644 --- a/Mage.Sets/src/mage/cards/d/DragonBroodmother.java +++ b/Mage.Sets/src/mage/cards/d/DragonBroodmother.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.game.permanent.token.DragonBroodmotherDragonToken; @@ -46,7 +47,7 @@ public class DragonBroodmother extends CardImpl { public DragonBroodmother(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}{R}{G}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DragonEgg.java b/Mage.Sets/src/mage/cards/d/DragonEgg.java index 1f27bf499e..cf74aefe4e 100644 --- a/Mage.Sets/src/mage/cards/d/DragonEgg.java +++ b/Mage.Sets/src/mage/cards/d/DragonEgg.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.DragonEggDragonToken; /** @@ -45,7 +46,7 @@ public class DragonEgg extends CardImpl { public DragonEgg(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DragonEngine.java b/Mage.Sets/src/mage/cards/d/DragonEngine.java index 233dd71036..da682db028 100644 --- a/Mage.Sets/src/mage/cards/d/DragonEngine.java +++ b/Mage.Sets/src/mage/cards/d/DragonEngine.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class DragonEngine extends CardImpl { public DragonEngine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DragonFangs.java b/Mage.Sets/src/mage/cards/d/DragonFangs.java index 2eb7a4f566..deb49462de 100644 --- a/Mage.Sets/src/mage/cards/d/DragonFangs.java +++ b/Mage.Sets/src/mage/cards/d/DragonFangs.java @@ -62,7 +62,7 @@ public class DragonFangs extends CardImpl { public DragonFangs(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/d/DragonGrip.java b/Mage.Sets/src/mage/cards/d/DragonGrip.java index 7ee1ecd455..34f06ac7a6 100644 --- a/Mage.Sets/src/mage/cards/d/DragonGrip.java +++ b/Mage.Sets/src/mage/cards/d/DragonGrip.java @@ -54,7 +54,7 @@ public class DragonGrip extends CardImpl { public DragonGrip(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Ferocious - If you control a creature with power 4 or greater, you may cast Dragon Grip as though it had flash. AsThoughEffect effect = new CastAsThoughItHadFlashSourceEffect(Duration.EndOfGame); diff --git a/Mage.Sets/src/mage/cards/d/DragonHatchling.java b/Mage.Sets/src/mage/cards/d/DragonHatchling.java index ef25542cf8..ada22f4f66 100644 --- a/Mage.Sets/src/mage/cards/d/DragonHatchling.java +++ b/Mage.Sets/src/mage/cards/d/DragonHatchling.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class DragonHatchling extends CardImpl { public DragonHatchling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DragonHunter.java b/Mage.Sets/src/mage/cards/d/DragonHunter.java index f0f3ce82aa..14ec0db075 100644 --- a/Mage.Sets/src/mage/cards/d/DragonHunter.java +++ b/Mage.Sets/src/mage/cards/d/DragonHunter.java @@ -47,8 +47,8 @@ public class DragonHunter extends CardImpl { public DragonHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DragonMage.java b/Mage.Sets/src/mage/cards/d/DragonMage.java index df56bb3588..f3be571b33 100644 --- a/Mage.Sets/src/mage/cards/d/DragonMage.java +++ b/Mage.Sets/src/mage/cards/d/DragonMage.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,8 +48,8 @@ public class DragonMage extends CardImpl { public DragonMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Dragon"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.DRAGON); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DragonMantle.java b/Mage.Sets/src/mage/cards/d/DragonMantle.java index 26a7b5ec2a..ef1ee3427f 100644 --- a/Mage.Sets/src/mage/cards/d/DragonMantle.java +++ b/Mage.Sets/src/mage/cards/d/DragonMantle.java @@ -52,7 +52,7 @@ public class DragonMantle extends CardImpl { public DragonMantle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/d/DragonScales.java b/Mage.Sets/src/mage/cards/d/DragonScales.java index a209beb757..bb0b0a66b6 100644 --- a/Mage.Sets/src/mage/cards/d/DragonScales.java +++ b/Mage.Sets/src/mage/cards/d/DragonScales.java @@ -62,7 +62,7 @@ public class DragonScales extends CardImpl { public DragonScales(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/d/DragonScarredBear.java b/Mage.Sets/src/mage/cards/d/DragonScarredBear.java index 5323b6518e..d3fdb0f066 100644 --- a/Mage.Sets/src/mage/cards/d/DragonScarredBear.java +++ b/Mage.Sets/src/mage/cards/d/DragonScarredBear.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,7 +49,7 @@ public class DragonScarredBear extends CardImpl { public DragonScarredBear(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Bear"); + this.subtype.add(SubType.BEAR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DragonShadow.java b/Mage.Sets/src/mage/cards/d/DragonShadow.java index 61cf10be21..77bb4e0fe6 100644 --- a/Mage.Sets/src/mage/cards/d/DragonShadow.java +++ b/Mage.Sets/src/mage/cards/d/DragonShadow.java @@ -62,7 +62,7 @@ public class DragonShadow extends CardImpl { public DragonShadow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/d/DragonStyleTwins.java b/Mage.Sets/src/mage/cards/d/DragonStyleTwins.java index a581bec601..976eea92e7 100644 --- a/Mage.Sets/src/mage/cards/d/DragonStyleTwins.java +++ b/Mage.Sets/src/mage/cards/d/DragonStyleTwins.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class DragonStyleTwins extends CardImpl { public DragonStyleTwins(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DragonThroneOfTarkir.java b/Mage.Sets/src/mage/cards/d/DragonThroneOfTarkir.java index a0dc0803c1..63dd1a0da5 100644 --- a/Mage.Sets/src/mage/cards/d/DragonThroneOfTarkir.java +++ b/Mage.Sets/src/mage/cards/d/DragonThroneOfTarkir.java @@ -56,7 +56,7 @@ public class DragonThroneOfTarkir extends CardImpl { public DragonThroneOfTarkir(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has defender and "{2}, {T}: Other creatures you control gain trample and get +X/+X until end of turn, where X is this creature's power." Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(DefenderAbility.getInstance(), AttachmentType.EQUIPMENT)); diff --git a/Mage.Sets/src/mage/cards/d/DragonTyrant.java b/Mage.Sets/src/mage/cards/d/DragonTyrant.java index a398e1c495..4569603d45 100644 --- a/Mage.Sets/src/mage/cards/d/DragonTyrant.java +++ b/Mage.Sets/src/mage/cards/d/DragonTyrant.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class DragonTyrant extends CardImpl { public DragonTyrant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{8}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/DragonWhelp.java b/Mage.Sets/src/mage/cards/d/DragonWhelp.java index 8951f353b5..d3da553d1a 100644 --- a/Mage.Sets/src/mage/cards/d/DragonWhelp.java +++ b/Mage.Sets/src/mage/cards/d/DragonWhelp.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class DragonWhelp extends CardImpl { public DragonWhelp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DragonWhisperer.java b/Mage.Sets/src/mage/cards/d/DragonWhisperer.java index 8683df206e..1692643f3f 100644 --- a/Mage.Sets/src/mage/cards/d/DragonWhisperer.java +++ b/Mage.Sets/src/mage/cards/d/DragonWhisperer.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.DragonToken; @@ -54,8 +55,8 @@ public class DragonWhisperer extends CardImpl { public DragonWhisperer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DragonWings.java b/Mage.Sets/src/mage/cards/d/DragonWings.java index 8e29f2cb78..22e1b24c2a 100644 --- a/Mage.Sets/src/mage/cards/d/DragonWings.java +++ b/Mage.Sets/src/mage/cards/d/DragonWings.java @@ -63,7 +63,7 @@ public class DragonWings extends CardImpl { public DragonWings(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/d/DragonlairSpider.java b/Mage.Sets/src/mage/cards/d/DragonlairSpider.java index 84e7280def..1cb888dcb1 100644 --- a/Mage.Sets/src/mage/cards/d/DragonlairSpider.java +++ b/Mage.Sets/src/mage/cards/d/DragonlairSpider.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.InsectToken; /** @@ -45,7 +46,7 @@ public class DragonlairSpider extends CardImpl { public DragonlairSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}{G}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DragonloftIdol.java b/Mage.Sets/src/mage/cards/d/DragonloftIdol.java index cbffd812f6..72293b3537 100644 --- a/Mage.Sets/src/mage/cards/d/DragonloftIdol.java +++ b/Mage.Sets/src/mage/cards/d/DragonloftIdol.java @@ -60,7 +60,7 @@ public class DragonloftIdol extends CardImpl { public DragonloftIdol(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Gargoyle"); + this.subtype.add(SubType.GARGOYLE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DragonlordAtarka.java b/Mage.Sets/src/mage/cards/d/DragonlordAtarka.java index 6746fcb020..fd993baca2 100644 --- a/Mage.Sets/src/mage/cards/d/DragonlordAtarka.java +++ b/Mage.Sets/src/mage/cards/d/DragonlordAtarka.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent; @@ -58,8 +59,8 @@ public class DragonlordAtarka extends CardImpl { public DragonlordAtarka(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elder"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.ELDER); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/d/DragonlordDromoka.java b/Mage.Sets/src/mage/cards/d/DragonlordDromoka.java index 85fa339bab..9ebd5ad793 100644 --- a/Mage.Sets/src/mage/cards/d/DragonlordDromoka.java +++ b/Mage.Sets/src/mage/cards/d/DragonlordDromoka.java @@ -50,8 +50,8 @@ public class DragonlordDromoka extends CardImpl { public DragonlordDromoka(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{W}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elder"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.ELDER); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/d/DragonlordKolaghan.java b/Mage.Sets/src/mage/cards/d/DragonlordKolaghan.java index 4d42029de6..05ff26a5c1 100644 --- a/Mage.Sets/src/mage/cards/d/DragonlordKolaghan.java +++ b/Mage.Sets/src/mage/cards/d/DragonlordKolaghan.java @@ -40,6 +40,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -59,8 +60,8 @@ public class DragonlordKolaghan extends CardImpl { public DragonlordKolaghan(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elder"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.ELDER); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DragonlordOjutai.java b/Mage.Sets/src/mage/cards/d/DragonlordOjutai.java index 3ff727afb4..022f45f42a 100644 --- a/Mage.Sets/src/mage/cards/d/DragonlordOjutai.java +++ b/Mage.Sets/src/mage/cards/d/DragonlordOjutai.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -56,8 +57,8 @@ public class DragonlordOjutai extends CardImpl { public DragonlordOjutai(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elder"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.ELDER); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DragonlordSilumgar.java b/Mage.Sets/src/mage/cards/d/DragonlordSilumgar.java index 51e5184c4c..153660b4be 100644 --- a/Mage.Sets/src/mage/cards/d/DragonlordSilumgar.java +++ b/Mage.Sets/src/mage/cards/d/DragonlordSilumgar.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SuperType; @@ -61,8 +62,8 @@ public class DragonlordSilumgar extends CardImpl { public DragonlordSilumgar(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elder"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.ELDER); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DragonlordsServant.java b/Mage.Sets/src/mage/cards/d/DragonlordsServant.java index 6cb7f13f20..2ce32aa1e8 100644 --- a/Mage.Sets/src/mage/cards/d/DragonlordsServant.java +++ b/Mage.Sets/src/mage/cards/d/DragonlordsServant.java @@ -53,8 +53,8 @@ public class DragonlordsServant extends CardImpl { public DragonlordsServant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DragonmasterOutcast.java b/Mage.Sets/src/mage/cards/d/DragonmasterOutcast.java index 15e12c1bb8..ed6c7cc3f6 100644 --- a/Mage.Sets/src/mage/cards/d/DragonmasterOutcast.java +++ b/Mage.Sets/src/mage/cards/d/DragonmasterOutcast.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.TargetController; import mage.filter.FilterPermanent; @@ -57,8 +58,8 @@ public class DragonmasterOutcast extends CardImpl { public DragonmasterOutcast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DragonsEyeSavants.java b/Mage.Sets/src/mage/cards/d/DragonsEyeSavants.java index bca366afcb..5f8a5b2e34 100644 --- a/Mage.Sets/src/mage/cards/d/DragonsEyeSavants.java +++ b/Mage.Sets/src/mage/cards/d/DragonsEyeSavants.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ColorPredicate; import mage.target.common.TargetCardInHand; @@ -57,8 +58,8 @@ public class DragonsEyeSavants extends CardImpl { public DragonsEyeSavants(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/DragonsEyeSentry.java b/Mage.Sets/src/mage/cards/d/DragonsEyeSentry.java index 2f15fb94bc..81f7e75f00 100644 --- a/Mage.Sets/src/mage/cards/d/DragonsEyeSentry.java +++ b/Mage.Sets/src/mage/cards/d/DragonsEyeSentry.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class DragonsEyeSentry extends CardImpl { public DragonsEyeSentry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DragonsHerald.java b/Mage.Sets/src/mage/cards/d/DragonsHerald.java index 352378410d..c0c5b9cf38 100644 --- a/Mage.Sets/src/mage/cards/d/DragonsHerald.java +++ b/Mage.Sets/src/mage/cards/d/DragonsHerald.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.common.FilterControlledCreaturePermanent; @@ -67,8 +68,8 @@ public class DragonsHerald extends CardImpl { public DragonsHerald(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DragonscaleGeneral.java b/Mage.Sets/src/mage/cards/d/DragonscaleGeneral.java index a97c8ee8f3..1204c0b234 100644 --- a/Mage.Sets/src/mage/cards/d/DragonscaleGeneral.java +++ b/Mage.Sets/src/mage/cards/d/DragonscaleGeneral.java @@ -35,6 +35,7 @@ import mage.abilities.effects.keyword.BolsterEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -55,8 +56,8 @@ public class DragonscaleGeneral extends CardImpl { public DragonscaleGeneral(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/Dragonshift.java b/Mage.Sets/src/mage/cards/d/Dragonshift.java index df4dc6b6f1..9ec8d8c96c 100644 --- a/Mage.Sets/src/mage/cards/d/Dragonshift.java +++ b/Mage.Sets/src/mage/cards/d/Dragonshift.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.OverloadAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.common.FilterControlledCreaturePermanent; @@ -91,7 +92,7 @@ public class Dragonshift extends CardImpl { cardType.add(CardType.CREATURE); color.setBlue(true); color.setRed(true); - subtype.add("Dragon"); + subtype.add(SubType.DRAGON); power = new MageInt(4); toughness = new MageInt(4); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/d/DragonskullSummit.java b/Mage.Sets/src/mage/cards/d/DragonskullSummit.java index 0f15208f99..4238fa7360 100644 --- a/Mage.Sets/src/mage/cards/d/DragonskullSummit.java +++ b/Mage.Sets/src/mage/cards/d/DragonskullSummit.java @@ -24,8 +24,7 @@ * 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.cards.d; import mage.abilities.common.EntersBattlefieldAbility; @@ -59,10 +58,10 @@ public class DragonskullSummit extends CardImpl { } public DragonskullSummit(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); - String abilityText = "tapped unless you control a Swamp or a Mountain"; + String abilityText = " tapped unless you control a Swamp or a Mountain"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlackManaAbility()); this.addAbility(new RedManaAbility()); diff --git a/Mage.Sets/src/mage/cards/d/DragonsoulKnight.java b/Mage.Sets/src/mage/cards/d/DragonsoulKnight.java index 516abf1db8..5d8189be3f 100644 --- a/Mage.Sets/src/mage/cards/d/DragonsoulKnight.java +++ b/Mage.Sets/src/mage/cards/d/DragonsoulKnight.java @@ -53,8 +53,8 @@ public class DragonsoulKnight extends CardImpl { public DragonsoulKnight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -112,7 +112,7 @@ public class DragonsoulKnight extends CardImpl { case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { permanent.getSubtype(game).clear(); - permanent.getSubtype(game).add("Dragon"); + permanent.getSubtype(game).add(SubType.DRAGON); } break; } diff --git a/Mage.Sets/src/mage/cards/d/DragonspeakerShaman.java b/Mage.Sets/src/mage/cards/d/DragonspeakerShaman.java index 9f0ab3a781..d97b0a6444 100644 --- a/Mage.Sets/src/mage/cards/d/DragonspeakerShaman.java +++ b/Mage.Sets/src/mage/cards/d/DragonspeakerShaman.java @@ -53,9 +53,9 @@ public class DragonspeakerShaman extends CardImpl { public DragonspeakerShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Barbarian"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BARBARIAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/Dragonstalker.java b/Mage.Sets/src/mage/cards/d/Dragonstalker.java index e486b2d80d..db993dd79f 100644 --- a/Mage.Sets/src/mage/cards/d/Dragonstalker.java +++ b/Mage.Sets/src/mage/cards/d/Dragonstalker.java @@ -45,8 +45,8 @@ public class Dragonstalker extends CardImpl { public Dragonstalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DrainingWhelk.java b/Mage.Sets/src/mage/cards/d/DrainingWhelk.java index 31258222f2..33600b0be6 100644 --- a/Mage.Sets/src/mage/cards/d/DrainingWhelk.java +++ b/Mage.Sets/src/mage/cards/d/DrainingWhelk.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.game.Game; import mage.game.stack.Spell; @@ -51,7 +52,7 @@ public class DrainingWhelk extends CardImpl { public DrainingWhelk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DrainpipeVermin.java b/Mage.Sets/src/mage/cards/d/DrainpipeVermin.java index 630a25f3d3..9883194f2b 100644 --- a/Mage.Sets/src/mage/cards/d/DrainpipeVermin.java +++ b/Mage.Sets/src/mage/cards/d/DrainpipeVermin.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.target.TargetPlayer; @@ -48,7 +49,7 @@ public class DrainpipeVermin extends CardImpl { public DrainpipeVermin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DrakeFamiliar.java b/Mage.Sets/src/mage/cards/d/DrakeFamiliar.java index e59471db2f..5ae94f8dee 100644 --- a/Mage.Sets/src/mage/cards/d/DrakeFamiliar.java +++ b/Mage.Sets/src/mage/cards/d/DrakeFamiliar.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -54,7 +55,7 @@ public class DrakeFamiliar extends CardImpl { public DrakeFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DrakeHatchling.java b/Mage.Sets/src/mage/cards/d/DrakeHatchling.java index 3fe4047f08..5a17e48b56 100644 --- a/Mage.Sets/src/mage/cards/d/DrakeHatchling.java +++ b/Mage.Sets/src/mage/cards/d/DrakeHatchling.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class DrakeHatchling extends CardImpl { public DrakeHatchling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DrakeUmbra.java b/Mage.Sets/src/mage/cards/d/DrakeUmbra.java index 85f4b748a7..466fc553a7 100644 --- a/Mage.Sets/src/mage/cards/d/DrakeUmbra.java +++ b/Mage.Sets/src/mage/cards/d/DrakeUmbra.java @@ -50,7 +50,7 @@ public class DrakeUmbra extends CardImpl { public DrakeUmbra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/d/DrakestownForgotten.java b/Mage.Sets/src/mage/cards/d/DrakestownForgotten.java index 7f146c1d57..a74dc5d4fd 100644 --- a/Mage.Sets/src/mage/cards/d/DrakestownForgotten.java +++ b/Mage.Sets/src/mage/cards/d/DrakestownForgotten.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -54,7 +55,7 @@ public class DrakestownForgotten extends CardImpl { public DrakestownForgotten(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/d/DrakewingKrasis.java b/Mage.Sets/src/mage/cards/d/DrakewingKrasis.java index a83696d8d0..b1301cc0c3 100644 --- a/Mage.Sets/src/mage/cards/d/DrakewingKrasis.java +++ b/Mage.Sets/src/mage/cards/d/DrakewingKrasis.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class DrakewingKrasis extends CardImpl { public DrakewingKrasis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{U}"); - this.subtype.add("Lizard"); - this.subtype.add("Drake"); + this.subtype.add(SubType.LIZARD); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DralnuLichLord.java b/Mage.Sets/src/mage/cards/d/DralnuLichLord.java index be5dcea59a..eed0ae78bf 100644 --- a/Mage.Sets/src/mage/cards/d/DralnuLichLord.java +++ b/Mage.Sets/src/mage/cards/d/DralnuLichLord.java @@ -66,8 +66,8 @@ public class DralnuLichLord extends CardImpl { public DralnuLichLord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Zombie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DralnusPet.java b/Mage.Sets/src/mage/cards/d/DralnusPet.java index f50bc56778..8627591833 100644 --- a/Mage.Sets/src/mage/cards/d/DralnusPet.java +++ b/Mage.Sets/src/mage/cards/d/DralnusPet.java @@ -48,6 +48,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.counters.CounterType; @@ -64,8 +65,8 @@ import mage.players.Player; public class DralnusPet extends CardImpl { public DralnusPet(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Shapeshifter"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -76,7 +77,7 @@ public class DralnusPet extends CardImpl { this.addAbility(new KickerAbility(kickerCosts)); // If Dralnu's Pet was kicked, it enters the battlefield with flying and with X +1/+1 counters on it, where X is the discarded card's converted mana cost. Ability ability = new EntersBattlefieldAbility(new DralnusPetEffect(), KickedCondition.instance, - "If {this} was kicked, it enters the battlefield with flying and with X +1/+1 counters on it, where X is the discarded card's converted mana cost", ""); + "If {this} was kicked, it enters the battlefield with flying and with X +1/+1 counters on it, where X is the discarded card's converted mana cost.", ""); ability.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DranaKalastriaBloodchief.java b/Mage.Sets/src/mage/cards/d/DranaKalastriaBloodchief.java index 72be013a3c..f002df3e40 100644 --- a/Mage.Sets/src/mage/cards/d/DranaKalastriaBloodchief.java +++ b/Mage.Sets/src/mage/cards/d/DranaKalastriaBloodchief.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class DranaKalastriaBloodchief extends CardImpl { public DranaKalastriaBloodchief(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vampire"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DranaLiberatorOfMalakir.java b/Mage.Sets/src/mage/cards/d/DranaLiberatorOfMalakir.java index f198306362..494019be5e 100644 --- a/Mage.Sets/src/mage/cards/d/DranaLiberatorOfMalakir.java +++ b/Mage.Sets/src/mage/cards/d/DranaLiberatorOfMalakir.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.counters.CounterType; @@ -57,8 +58,8 @@ public class DranaLiberatorOfMalakir extends CardImpl { public DranaLiberatorOfMalakir(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vampire"); - this.subtype.add("Ally"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DranasChosen.java b/Mage.Sets/src/mage/cards/d/DranasChosen.java index 890ce360bc..de0f85b541 100644 --- a/Mage.Sets/src/mage/cards/d/DranasChosen.java +++ b/Mage.Sets/src/mage/cards/d/DranasChosen.java @@ -62,9 +62,9 @@ public class DranasChosen extends CardImpl { public DranasChosen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Shaman"); - this.subtype.add("Ally"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SHAMAN); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DranasEmissary.java b/Mage.Sets/src/mage/cards/d/DranasEmissary.java index d25ae4b9f3..68dca9447f 100644 --- a/Mage.Sets/src/mage/cards/d/DranasEmissary.java +++ b/Mage.Sets/src/mage/cards/d/DranasEmissary.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -48,9 +49,9 @@ public class DranasEmissary extends CardImpl { public DranasEmissary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Cleric"); - this.subtype.add("Ally"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/Dread.java b/Mage.Sets/src/mage/cards/d/Dread.java index 1870f62fd9..d1bdce0952 100644 --- a/Mage.Sets/src/mage/cards/d/Dread.java +++ b/Mage.Sets/src/mage/cards/d/Dread.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -53,8 +54,8 @@ public class Dread extends CardImpl { public Dread(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}"); - this.subtype.add("Elemental"); - this.subtype.add("Incarnation"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.INCARNATION); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/DreadCacodemon.java b/Mage.Sets/src/mage/cards/d/DreadCacodemon.java index 0d6032fccb..1718fec5c9 100644 --- a/Mage.Sets/src/mage/cards/d/DreadCacodemon.java +++ b/Mage.Sets/src/mage/cards/d/DreadCacodemon.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.TapAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -62,7 +63,7 @@ public class DreadCacodemon extends CardImpl { public DreadCacodemon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{7}{B}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/d/DreadDefiler.java b/Mage.Sets/src/mage/cards/d/DreadDefiler.java index abfb2cf104..232f791f90 100644 --- a/Mage.Sets/src/mage/cards/d/DreadDefiler.java +++ b/Mage.Sets/src/mage/cards/d/DreadDefiler.java @@ -40,6 +40,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -56,7 +57,7 @@ public class DreadDefiler extends CardImpl { public DreadDefiler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{B}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(6); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/d/DreadDrone.java b/Mage.Sets/src/mage/cards/d/DreadDrone.java index d588f537dc..74d36f4e67 100644 --- a/Mage.Sets/src/mage/cards/d/DreadDrone.java +++ b/Mage.Sets/src/mage/cards/d/DreadDrone.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.EldraziSpawnToken; /** @@ -45,8 +46,8 @@ public class DreadDrone extends CardImpl { public DreadDrone (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DreadReaper.java b/Mage.Sets/src/mage/cards/d/DreadReaper.java index 7220704d6c..fd0c7ae5ea 100644 --- a/Mage.Sets/src/mage/cards/d/DreadReaper.java +++ b/Mage.Sets/src/mage/cards/d/DreadReaper.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class DreadReaper extends CardImpl { public DreadReaper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DreadSlag.java b/Mage.Sets/src/mage/cards/d/DreadSlag.java index 4f0122cc1e..e004ae3037 100644 --- a/Mage.Sets/src/mage/cards/d/DreadSlag.java +++ b/Mage.Sets/src/mage/cards/d/DreadSlag.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class DreadSlag extends CardImpl { public DreadSlag(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{R}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(9); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/d/DreadSlaver.java b/Mage.Sets/src/mage/cards/d/DreadSlaver.java index db3b3dd8e4..ce4f156e90 100644 --- a/Mage.Sets/src/mage/cards/d/DreadSlaver.java +++ b/Mage.Sets/src/mage/cards/d/DreadSlaver.java @@ -50,8 +50,8 @@ public class DreadSlaver extends CardImpl { public DreadSlaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DreadSpecter.java b/Mage.Sets/src/mage/cards/d/DreadSpecter.java index 788ff32891..4f8f3c8cbf 100644 --- a/Mage.Sets/src/mage/cards/d/DreadSpecter.java +++ b/Mage.Sets/src/mage/cards/d/DreadSpecter.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -56,7 +57,7 @@ public class DreadSpecter extends CardImpl { public DreadSpecter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Specter"); + this.subtype.add(SubType.SPECTER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DreadStatuary.java b/Mage.Sets/src/mage/cards/d/DreadStatuary.java index cd6b31a705..1f357efac2 100644 --- a/Mage.Sets/src/mage/cards/d/DreadStatuary.java +++ b/Mage.Sets/src/mage/cards/d/DreadStatuary.java @@ -37,6 +37,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -70,7 +71,7 @@ class DreadStatuaryToken extends Token { super("", "4/2 Golem artifact creature"); cardType.add(CardType.CREATURE); cardType.add(CardType.ARTIFACT); - subtype.add("Golem"); + subtype.add(SubType.GOLEM); power = new MageInt(4); toughness = new MageInt(2); } diff --git a/Mage.Sets/src/mage/cards/d/DreadWanderer.java b/Mage.Sets/src/mage/cards/d/DreadWanderer.java index 61e4d098c5..5026d0ae60 100644 --- a/Mage.Sets/src/mage/cards/d/DreadWanderer.java +++ b/Mage.Sets/src/mage/cards/d/DreadWanderer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TimingRule; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class DreadWanderer extends CardImpl { public DreadWanderer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Jackal"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.JACKAL); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DreadWarlock.java b/Mage.Sets/src/mage/cards/d/DreadWarlock.java index 749e9be7f9..adc0899844 100644 --- a/Mage.Sets/src/mage/cards/d/DreadWarlock.java +++ b/Mage.Sets/src/mage/cards/d/DreadWarlock.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -54,8 +55,8 @@ public class DreadWarlock extends CardImpl { public DreadWarlock(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DreadbringerLampads.java b/Mage.Sets/src/mage/cards/d/DreadbringerLampads.java index 8c8fdde077..82695e47db 100644 --- a/Mage.Sets/src/mage/cards/d/DreadbringerLampads.java +++ b/Mage.Sets/src/mage/cards/d/DreadbringerLampads.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.IntimidateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class DreadbringerLampads extends CardImpl { public DreadbringerLampads(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{4}{B}"); - this.subtype.add("Nymph"); + this.subtype.add(SubType.NYMPH); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/Dreadwing.java b/Mage.Sets/src/mage/cards/d/Dreadwing.java index 40b0350168..2bd44ccba6 100644 --- a/Mage.Sets/src/mage/cards/d/Dreadwing.java +++ b/Mage.Sets/src/mage/cards/d/Dreadwing.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class Dreadwing extends CardImpl { public Dreadwing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DreamLeash.java b/Mage.Sets/src/mage/cards/d/DreamLeash.java index 9f355dee64..db38df4aab 100644 --- a/Mage.Sets/src/mage/cards/d/DreamLeash.java +++ b/Mage.Sets/src/mage/cards/d/DreamLeash.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -50,7 +51,7 @@ public class DreamLeash extends CardImpl { public DreamLeash(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant permanent // You can't choose an untapped permanent as Dream Leash's target as you cast Dream Leash. diff --git a/Mage.Sets/src/mage/cards/d/DreamPillager.java b/Mage.Sets/src/mage/cards/d/DreamPillager.java index 856b9d0a7f..bea4ad92b6 100644 --- a/Mage.Sets/src/mage/cards/d/DreamPillager.java +++ b/Mage.Sets/src/mage/cards/d/DreamPillager.java @@ -57,7 +57,7 @@ public class DreamPillager extends CardImpl { public DreamPillager(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DreamProwler.java b/Mage.Sets/src/mage/cards/d/DreamProwler.java index 8386de1b34..d925f85b01 100644 --- a/Mage.Sets/src/mage/cards/d/DreamProwler.java +++ b/Mage.Sets/src/mage/cards/d/DreamProwler.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterAttackingCreature; @@ -49,7 +50,7 @@ public class DreamProwler extends CardImpl { public DreamProwler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DreamStalker.java b/Mage.Sets/src/mage/cards/d/DreamStalker.java index 16381c9636..c5b8a689d8 100644 --- a/Mage.Sets/src/mage/cards/d/DreamStalker.java +++ b/Mage.Sets/src/mage/cards/d/DreamStalker.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; /** @@ -44,7 +45,7 @@ public class DreamStalker extends CardImpl { public DreamStalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DreamThief.java b/Mage.Sets/src/mage/cards/d/DreamThief.java index 4f0dd7e94e..79338e861c 100644 --- a/Mage.Sets/src/mage/cards/d/DreamThief.java +++ b/Mage.Sets/src/mage/cards/d/DreamThief.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.Game; import mage.game.stack.Spell; import mage.watchers.common.SpellsCastWatcher; @@ -52,8 +53,8 @@ public class DreamThief extends CardImpl { public DreamThief(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DreamThrush.java b/Mage.Sets/src/mage/cards/d/DreamThrush.java index fa79453e0a..df6fc18704 100644 --- a/Mage.Sets/src/mage/cards/d/DreamThrush.java +++ b/Mage.Sets/src/mage/cards/d/DreamThrush.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.Target; @@ -50,7 +51,7 @@ public class DreamThrush extends CardImpl { public DreamThrush(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DreambornMuse.java b/Mage.Sets/src/mage/cards/d/DreambornMuse.java index 09d876c49a..d5300baf30 100644 --- a/Mage.Sets/src/mage/cards/d/DreambornMuse.java +++ b/Mage.Sets/src/mage/cards/d/DreambornMuse.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -45,7 +46,7 @@ public class DreambornMuse extends CardImpl { public DreambornMuse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DreamcallerSiren.java b/Mage.Sets/src/mage/cards/d/DreamcallerSiren.java new file mode 100644 index 0000000000..67709860a0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DreamcallerSiren.java @@ -0,0 +1,98 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.CanBlockOnlyFlyingAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetNonlandPermanent; + +/** + * + * @author TheElk801 + */ +public class DreamcallerSiren extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another Pirate"); + + static { + filter.add(new SubtypePredicate(SubType.PIRATE)); + filter.add(new AnotherPredicate()); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public DreamcallerSiren(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + + this.subtype.add(SubType.SIREN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Dreamcaller Siren can only block creatures with flying. + this.addAbility(new CanBlockOnlyFlyingAbility()); + + // When Dreamcaller Siren enters the battlefield, if you control another Pirate, tap up to two nonland permanents. + TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect()); + ability.addTarget(new TargetNonlandPermanent(0, 2, false)); + this.addAbility(new ConditionalTriggeredAbility(ability, + new PermanentsOnTheBattlefieldCondition(filter), + "when {this} enters the battlefield, if you control another Pirate, tap up to two target nonland permanents.")); + } + + public DreamcallerSiren(final DreamcallerSiren card) { + super(card); + } + + @Override + public DreamcallerSiren copy() { + return new DreamcallerSiren(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/Dreamcatcher.java b/Mage.Sets/src/mage/cards/d/Dreamcatcher.java index 0d44a519d3..300c1c8ad2 100644 --- a/Mage.Sets/src/mage/cards/d/Dreamcatcher.java +++ b/Mage.Sets/src/mage/cards/d/Dreamcatcher.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; /** @@ -46,7 +47,7 @@ public class Dreamcatcher extends CardImpl { public Dreamcatcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DreampodDruid.java b/Mage.Sets/src/mage/cards/d/DreampodDruid.java index 5dc74b143a..7708550df1 100644 --- a/Mage.Sets/src/mage/cards/d/DreampodDruid.java +++ b/Mage.Sets/src/mage/cards/d/DreampodDruid.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.game.permanent.token.SaprolingToken; @@ -48,8 +49,8 @@ public class DreampodDruid extends CardImpl { public DreampodDruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DreamscapeArtist.java b/Mage.Sets/src/mage/cards/d/DreamscapeArtist.java index c99334604f..fd547265f2 100644 --- a/Mage.Sets/src/mage/cards/d/DreamscapeArtist.java +++ b/Mage.Sets/src/mage/cards/d/DreamscapeArtist.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -55,8 +56,8 @@ public class DreamscapeArtist extends CardImpl { public DreamscapeArtist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DreamspoilerWitches.java b/Mage.Sets/src/mage/cards/d/DreamspoilerWitches.java index 12c44dbb53..893c8bd817 100644 --- a/Mage.Sets/src/mage/cards/d/DreamspoilerWitches.java +++ b/Mage.Sets/src/mage/cards/d/DreamspoilerWitches.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class DreamspoilerWitches extends CardImpl { public DreamspoilerWitches(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Faerie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/Dreamstealer.java b/Mage.Sets/src/mage/cards/d/Dreamstealer.java index 5261bd39c6..d48f9a3a77 100644 --- a/Mage.Sets/src/mage/cards/d/Dreamstealer.java +++ b/Mage.Sets/src/mage/cards/d/Dreamstealer.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -51,8 +52,8 @@ public class Dreamstealer extends CardImpl { public Dreamstealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/Dreamwinder.java b/Mage.Sets/src/mage/cards/d/Dreamwinder.java index e1ea919830..35b1657ec9 100644 --- a/Mage.Sets/src/mage/cards/d/Dreamwinder.java +++ b/Mage.Sets/src/mage/cards/d/Dreamwinder.java @@ -58,7 +58,7 @@ public class Dreamwinder extends CardImpl { public Dreamwinder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DregMangler.java b/Mage.Sets/src/mage/cards/d/DregMangler.java index 36fdd4ea2b..2932b40818 100644 --- a/Mage.Sets/src/mage/cards/d/DregMangler.java +++ b/Mage.Sets/src/mage/cards/d/DregMangler.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ScavengeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class DregMangler extends CardImpl { public DregMangler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DregReaver.java b/Mage.Sets/src/mage/cards/d/DregReaver.java index fb0922ccc1..4eb9e201ff 100644 --- a/Mage.Sets/src/mage/cards/d/DregReaver.java +++ b/Mage.Sets/src/mage/cards/d/DregReaver.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class DregReaver extends CardImpl { public DregReaver (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Beast"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DregscapeZombie.java b/Mage.Sets/src/mage/cards/d/DregscapeZombie.java index 643db785f1..02eef7646f 100644 --- a/Mage.Sets/src/mage/cards/d/DregscapeZombie.java +++ b/Mage.Sets/src/mage/cards/d/DregscapeZombie.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class DregscapeZombie extends CardImpl { public DregscapeZombie (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/Drekavac.java b/Mage.Sets/src/mage/cards/d/Drekavac.java index 19e54acc57..7bf6ccc7f3 100644 --- a/Mage.Sets/src/mage/cards/d/Drekavac.java +++ b/Mage.Sets/src/mage/cards/d/Drekavac.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -55,7 +56,7 @@ public class Drekavac extends CardImpl { public Drekavac(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/Drelnoch.java b/Mage.Sets/src/mage/cards/d/Drelnoch.java index ce76060185..0195aaf6a3 100644 --- a/Mage.Sets/src/mage/cards/d/Drelnoch.java +++ b/Mage.Sets/src/mage/cards/d/Drelnoch.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class Drelnoch extends CardImpl { public Drelnoch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Yeti"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.YETI); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DriftOfPhantasms.java b/Mage.Sets/src/mage/cards/d/DriftOfPhantasms.java index 81ba7b93ba..3db4ec14c4 100644 --- a/Mage.Sets/src/mage/cards/d/DriftOfPhantasms.java +++ b/Mage.Sets/src/mage/cards/d/DriftOfPhantasms.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TransmuteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class DriftOfPhantasms extends CardImpl { public DriftOfPhantasms(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DriftOfTheDead.java b/Mage.Sets/src/mage/cards/d/DriftOfTheDead.java new file mode 100644 index 0000000000..2e1ef24041 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DriftOfTheDead.java @@ -0,0 +1,85 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SuperType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author TheElk801 + */ +public class DriftOfTheDead extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("snow lands you control"); + + static { + filter.add(new SupertypePredicate(SuperType.SNOW)); + filter.add(new CardTypePredicate(CardType.LAND)); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public DriftOfTheDead(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.WALL); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + + // Drift of the Dead's power and toughness are each equal to the number of snow lands you control. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.EndOfGame))); + } + + public DriftOfTheDead(final DriftOfTheDead card) { + super(card); + } + + @Override + public DriftOfTheDead copy() { + return new DriftOfTheDead(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DrifterIlDal.java b/Mage.Sets/src/mage/cards/d/DrifterIlDal.java index 9b222817f8..0596b72fd0 100644 --- a/Mage.Sets/src/mage/cards/d/DrifterIlDal.java +++ b/Mage.Sets/src/mage/cards/d/DrifterIlDal.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -46,8 +47,8 @@ public class DrifterIlDal extends CardImpl { public DrifterIlDal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DriftingDjinn.java b/Mage.Sets/src/mage/cards/d/DriftingDjinn.java index ee27dcd6e4..a0f045b5c3 100644 --- a/Mage.Sets/src/mage/cards/d/DriftingDjinn.java +++ b/Mage.Sets/src/mage/cards/d/DriftingDjinn.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -48,7 +49,7 @@ public class DriftingDjinn extends CardImpl { public DriftingDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DriftingShade.java b/Mage.Sets/src/mage/cards/d/DriftingShade.java index e293cc30ee..b69b7c13fe 100644 --- a/Mage.Sets/src/mage/cards/d/DriftingShade.java +++ b/Mage.Sets/src/mage/cards/d/DriftingShade.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class DriftingShade extends CardImpl { public DriftingShade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Shade"); + this.subtype.add(SubType.SHADE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DrillSkimmer.java b/Mage.Sets/src/mage/cards/d/DrillSkimmer.java index 812130150f..125bad06f4 100644 --- a/Mage.Sets/src/mage/cards/d/DrillSkimmer.java +++ b/Mage.Sets/src/mage/cards/d/DrillSkimmer.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -61,7 +62,7 @@ public class DrillSkimmer extends CardImpl { public DrillSkimmer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Thopter"); + this.subtype.add(SubType.THOPTER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DrinkerOfSorrow.java b/Mage.Sets/src/mage/cards/d/DrinkerOfSorrow.java new file mode 100644 index 0000000000..65f1933c1e --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DrinkerOfSorrow.java @@ -0,0 +1,69 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CantBlockAbility; +import mage.abilities.common.DealsCombatDamageTriggeredAbility; +import mage.abilities.effects.common.SacrificeEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterPermanent; + +/** + * + * @author TheElk801 + */ +public class DrinkerOfSorrow extends CardImpl { + + public DrinkerOfSorrow(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.HORROR); + this.power = new MageInt(5); + this.toughness = new MageInt(3); + + // Drinker of Sorrow can't block. + this.addAbility(new CantBlockAbility()); + + // Whenever Drinker of Sorrow deals combat damage, sacrifice a permanent. + this.addAbility(new DealsCombatDamageTriggeredAbility(new SacrificeEffect(new FilterPermanent(), 1, ""), false)); + } + + public DrinkerOfSorrow(final DrinkerOfSorrow card) { + super(card); + } + + @Override + public DrinkerOfSorrow copy() { + return new DrinkerOfSorrow(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DrippingDead.java b/Mage.Sets/src/mage/cards/d/DrippingDead.java index f4191f4d09..7719d638dc 100644 --- a/Mage.Sets/src/mage/cards/d/DrippingDead.java +++ b/Mage.Sets/src/mage/cards/d/DrippingDead.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class DrippingDead extends CardImpl { public DrippingDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DrippingTongueZubera.java b/Mage.Sets/src/mage/cards/d/DrippingTongueZubera.java index 18400717f1..30f51bea68 100644 --- a/Mage.Sets/src/mage/cards/d/DrippingTongueZubera.java +++ b/Mage.Sets/src/mage/cards/d/DrippingTongueZubera.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.SpiritToken; import mage.watchers.common.ZuberasDiedWatcher; @@ -47,8 +48,8 @@ public class DrippingTongueZubera extends CardImpl { public DrippingTongueZubera (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Zubera"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.ZUBERA); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DrivenDespair.java b/Mage.Sets/src/mage/cards/d/DrivenDespair.java index 1003942763..7d15b56b48 100644 --- a/Mage.Sets/src/mage/cards/d/DrivenDespair.java +++ b/Mage.Sets/src/mage/cards/d/DrivenDespair.java @@ -1,81 +1,81 @@ -/* - * 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.cards.d; - -import java.util.UUID; -import mage.abilities.TriggeredAbility; -import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; -import mage.abilities.effects.common.discard.DiscardTargetEffect; -import mage.abilities.keyword.AftermathAbility; -import mage.abilities.keyword.MenaceAbility; -import mage.abilities.keyword.TrampleAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.SplitCard; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SpellAbilityType; - -/** - * - * @author LevelX2 - */ -public class DrivenDespair extends SplitCard { - - public DrivenDespair(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.SORCERY}, "{1}{G}", "{1}{B}", SpellAbilityType.SPLIT_AFTERMATH); - - // Until end of turn, creatures you control gain trample and "Whenever this creature deals combat damage to a player, draw a card." - getLeftHalfCard().getSpellAbility().addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)); - TriggeredAbility ability = new DealsCombatDamageToAPlayerTriggeredAbility(new DrawCardSourceControllerEffect(1), false); - getLeftHalfCard().getSpellAbility().addEffect(new GainAbilityControlledEffect(ability, Duration.EndOfTurn) - .setText("and \"Whenever this creature deals combat damage to a player, draw a card.\"")); - - // Despair {1}{B} - // Sorcery - // Aftermath - ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true)); - // Until end of turn, creatures you control gain menace and "Whenever this creature deals combat damage to a player, that player discards a card." - getRightHalfCard().getSpellAbility().addEffect(new GainAbilityControlledEffect(new MenaceAbility(), Duration.EndOfTurn)); - ability = new DealsCombatDamageToAPlayerTriggeredAbility(new DiscardTargetEffect(1), false, true); - getRightHalfCard().getSpellAbility().addEffect(new GainAbilityControlledEffect(ability, Duration.EndOfTurn) - .setText("and \"Whenever this creature deals combat damage to a player, that player discards a card.\"")); - - } - - public DrivenDespair(final DrivenDespair card) { - super(card); - } - - @Override - public DrivenDespair copy() { - return new DrivenDespair(this); - } -} +/* + * 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.cards.d; + +import java.util.UUID; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.abilities.keyword.AftermathAbility; +import mage.abilities.keyword.MenaceAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.SplitCard; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SpellAbilityType; + +/** + * + * @author LevelX2 + */ +public class DrivenDespair extends SplitCard { + + public DrivenDespair(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.SORCERY}, "{1}{G}", "{1}{B}", SpellAbilityType.SPLIT_AFTERMATH); + + // Until end of turn, creatures you control gain trample and "Whenever this creature deals combat damage to a player, draw a card." + getLeftHalfCard().getSpellAbility().addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)); + TriggeredAbility ability = new DealsCombatDamageToAPlayerTriggeredAbility(new DrawCardSourceControllerEffect(1), false); + getLeftHalfCard().getSpellAbility().addEffect(new GainAbilityControlledEffect(ability, Duration.EndOfTurn) + .setText("and \"Whenever this creature deals combat damage to a player, draw a card.\"")); + + // Despair {1}{B} + // Sorcery + // Aftermath + ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true)); + // Until end of turn, creatures you control gain menace and "Whenever this creature deals combat damage to a player, that player discards a card." + getRightHalfCard().getSpellAbility().addEffect(new GainAbilityControlledEffect(new MenaceAbility(), Duration.EndOfTurn)); + ability = new DealsCombatDamageToAPlayerTriggeredAbility(new DiscardTargetEffect(1), false, true); + getRightHalfCard().getSpellAbility().addEffect(new GainAbilityControlledEffect(ability, Duration.EndOfTurn) + .setText("and \"Whenever this creature deals combat damage to a player, that player discards a card.\"")); + + } + + public DrivenDespair(final DrivenDespair card) { + super(card); + } + + @Override + public DrivenDespair copy() { + return new DrivenDespair(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DriverOfTheDead.java b/Mage.Sets/src/mage/cards/d/DriverOfTheDead.java index a9b9a95be0..702d6bc1ba 100644 --- a/Mage.Sets/src/mage/cards/d/DriverOfTheDead.java +++ b/Mage.Sets/src/mage/cards/d/DriverOfTheDead.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -54,7 +55,7 @@ public class DriverOfTheDead extends CardImpl { public DriverOfTheDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DrogskolCaptain.java b/Mage.Sets/src/mage/cards/d/DrogskolCaptain.java index 7bcb85745c..01cd26d62e 100644 --- a/Mage.Sets/src/mage/cards/d/DrogskolCaptain.java +++ b/Mage.Sets/src/mage/cards/d/DrogskolCaptain.java @@ -56,8 +56,8 @@ public class DrogskolCaptain extends CardImpl { public DrogskolCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{U}"); - this.subtype.add("Spirit"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DrogskolCavalry.java b/Mage.Sets/src/mage/cards/d/DrogskolCavalry.java index 82d44406a5..be89d81d08 100644 --- a/Mage.Sets/src/mage/cards/d/DrogskolCavalry.java +++ b/Mage.Sets/src/mage/cards/d/DrogskolCavalry.java @@ -60,8 +60,8 @@ public class DrogskolCavalry extends CardImpl { public DrogskolCavalry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); - this.subtype.add("Spirit"); - this.subtype.add("Knight"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DrogskolReaver.java b/Mage.Sets/src/mage/cards/d/DrogskolReaver.java index 8cd22c101a..22f7f9c311 100644 --- a/Mage.Sets/src/mage/cards/d/DrogskolReaver.java +++ b/Mage.Sets/src/mage/cards/d/DrogskolReaver.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -50,7 +51,7 @@ public class DrogskolReaver extends CardImpl { public DrogskolReaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DrogskolShieldmate.java b/Mage.Sets/src/mage/cards/d/DrogskolShieldmate.java index 0144f74a47..fb1cd57cdd 100644 --- a/Mage.Sets/src/mage/cards/d/DrogskolShieldmate.java +++ b/Mage.Sets/src/mage/cards/d/DrogskolShieldmate.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; @@ -46,8 +47,8 @@ public class DrogskolShieldmate extends CardImpl { public DrogskolShieldmate(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Spirit"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DroidCommando.java b/Mage.Sets/src/mage/cards/d/DroidCommando.java index 550a9e55c6..22003d8761 100644 --- a/Mage.Sets/src/mage/cards/d/DroidCommando.java +++ b/Mage.Sets/src/mage/cards/d/DroidCommando.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.RepairAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -47,7 +48,7 @@ public class DroidCommando extends CardImpl { public DroidCommando(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Droid"); + this.subtype.add(SubType.DROID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/Droideka.java b/Mage.Sets/src/mage/cards/d/Droideka.java index 498908c95f..75a30b3630 100644 --- a/Mage.Sets/src/mage/cards/d/Droideka.java +++ b/Mage.Sets/src/mage/cards/d/Droideka.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.RepairAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetStackObject; @@ -48,7 +49,7 @@ public class Droideka extends CardImpl { public Droideka(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{W}"); - this.subtype.add("Droid"); + this.subtype.add(SubType.DROID); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/DromadPurebred.java b/Mage.Sets/src/mage/cards/d/DromadPurebred.java index 86c621775c..c7776de8e5 100644 --- a/Mage.Sets/src/mage/cards/d/DromadPurebred.java +++ b/Mage.Sets/src/mage/cards/d/DromadPurebred.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -44,8 +45,8 @@ public class DromadPurebred extends CardImpl { public DromadPurebred(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Camel"); - this.subtype.add("Beast"); + this.subtype.add(SubType.CAMEL); + this.subtype.add(SubType.BEAST); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DromarTheBanisher.java b/Mage.Sets/src/mage/cards/d/DromarTheBanisher.java index ebdc12da46..5c23250372 100644 --- a/Mage.Sets/src/mage/cards/d/DromarTheBanisher.java +++ b/Mage.Sets/src/mage/cards/d/DromarTheBanisher.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.choices.ChoiceColor; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.filter.common.FilterCreaturePermanent; @@ -56,7 +57,7 @@ public class DromarTheBanisher extends CardImpl { public DromarTheBanisher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/DromarsAttendant.java b/Mage.Sets/src/mage/cards/d/DromarsAttendant.java index 46c726f09c..175d7f1757 100644 --- a/Mage.Sets/src/mage/cards/d/DromarsAttendant.java +++ b/Mage.Sets/src/mage/cards/d/DromarsAttendant.java @@ -37,6 +37,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class DromarsAttendant extends CardImpl { public DromarsAttendant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DromokaCaptain.java b/Mage.Sets/src/mage/cards/d/DromokaCaptain.java index a463d68be1..47b50ea871 100644 --- a/Mage.Sets/src/mage/cards/d/DromokaCaptain.java +++ b/Mage.Sets/src/mage/cards/d/DromokaCaptain.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class DromokaCaptain extends CardImpl { public DromokaCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DromokaDunecaster.java b/Mage.Sets/src/mage/cards/d/DromokaDunecaster.java index dcd3bfd0a4..e4b961308b 100644 --- a/Mage.Sets/src/mage/cards/d/DromokaDunecaster.java +++ b/Mage.Sets/src/mage/cards/d/DromokaDunecaster.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -57,8 +58,8 @@ public class DromokaDunecaster extends CardImpl { public DromokaDunecaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DromokaMonument.java b/Mage.Sets/src/mage/cards/d/DromokaMonument.java index 02a0e7e859..36b05dd1e6 100644 --- a/Mage.Sets/src/mage/cards/d/DromokaMonument.java +++ b/Mage.Sets/src/mage/cards/d/DromokaMonument.java @@ -38,6 +38,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -76,7 +77,7 @@ public class DromokaMonument extends CardImpl { cardType.add(CardType.CREATURE); color.setGreen(true); color.setWhite(true); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); power = new MageInt(4); toughness = new MageInt(4); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/d/DromokaTheEternal.java b/Mage.Sets/src/mage/cards/d/DromokaTheEternal.java index d984d9a9f3..767fd508e8 100644 --- a/Mage.Sets/src/mage/cards/d/DromokaTheEternal.java +++ b/Mage.Sets/src/mage/cards/d/DromokaTheEternal.java @@ -48,7 +48,7 @@ public class DromokaTheEternal extends CardImpl { public DromokaTheEternal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DromokaWarrior.java b/Mage.Sets/src/mage/cards/d/DromokaWarrior.java index 2635ee57d1..85da714df0 100644 --- a/Mage.Sets/src/mage/cards/d/DromokaWarrior.java +++ b/Mage.Sets/src/mage/cards/d/DromokaWarrior.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class DromokaWarrior extends CardImpl { public DromokaWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); } diff --git a/Mage.Sets/src/mage/cards/d/Dromosaur.java b/Mage.Sets/src/mage/cards/d/Dromosaur.java index a154addcd3..18966f7110 100644 --- a/Mage.Sets/src/mage/cards/d/Dromosaur.java +++ b/Mage.Sets/src/mage/cards/d/Dromosaur.java @@ -35,6 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ import mage.constants.Duration; public class Dromosaur extends CardImpl { public Dromosaur(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Lizard"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.subtype.add(SubType.DINOSAUR); this.power = new MageInt(2); this.toughness = new MageInt(3); @@ -61,4 +62,4 @@ public class Dromosaur extends CardImpl { public Dromosaur copy() { return new Dromosaur(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/d/DronepackKindred.java b/Mage.Sets/src/mage/cards/d/DronepackKindred.java index 5c49d6827e..b21fcda7a6 100644 --- a/Mage.Sets/src/mage/cards/d/DronepackKindred.java +++ b/Mage.Sets/src/mage/cards/d/DronepackKindred.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class DronepackKindred extends CardImpl { public DronepackKindred(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Eldrazi"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(5); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/d/DroningBureaucrats.java b/Mage.Sets/src/mage/cards/d/DroningBureaucrats.java new file mode 100644 index 0000000000..aa17110ef5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DroningBureaucrats.java @@ -0,0 +1,103 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.combat.CantAttackBlockAllEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.game.Game; + +/** + * + * @author TheElk801 + */ +public class DroningBureaucrats extends CardImpl { + + public DroningBureaucrats(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // {X}, {tap}: Each creature with converted mana cost X can't attack or block this turn. + Ability ability = new SimpleActivatedAbility(new DroningBureaucratsEffect(), new ManaCostsImpl("{X}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public DroningBureaucrats(final DroningBureaucrats card) { + super(card); + } + + @Override + public DroningBureaucrats copy() { + return new DroningBureaucrats(this); + } +} + +class DroningBureaucratsEffect extends OneShotEffect { + + DroningBureaucratsEffect() { + super(Outcome.Benefit); + this.staticText = "Each creature with converted mana cost X can't attack or block this turn"; + } + + DroningBureaucratsEffect(final DroningBureaucratsEffect effect) { + super(effect); + } + + @Override + public DroningBureaucratsEffect copy() { + return new DroningBureaucratsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + int xValue = source.getManaCostsToPay().getX(); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost X"); + filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, xValue)); + game.addEffect(new CantAttackBlockAllEffect(Duration.EndOfTurn, filter), source); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/d/DroolingGroodion.java b/Mage.Sets/src/mage/cards/d/DroolingGroodion.java index 3589c8a512..0e07818425 100644 --- a/Mage.Sets/src/mage/cards/d/DroolingGroodion.java +++ b/Mage.Sets/src/mage/cards/d/DroolingGroodion.java @@ -53,7 +53,7 @@ public class DroolingGroodion extends CardImpl { public DroolingGroodion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DroolingOgre.java b/Mage.Sets/src/mage/cards/d/DroolingOgre.java index fde03818dd..e52984b77a 100644 --- a/Mage.Sets/src/mage/cards/d/DroolingOgre.java +++ b/Mage.Sets/src/mage/cards/d/DroolingOgre.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class DroolingOgre extends CardImpl { public DroolingOgre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Ogre"); + this.subtype.add(SubType.OGRE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DrossCrocodile.java b/Mage.Sets/src/mage/cards/d/DrossCrocodile.java index e1e3987e49..478d208e35 100644 --- a/Mage.Sets/src/mage/cards/d/DrossCrocodile.java +++ b/Mage.Sets/src/mage/cards/d/DrossCrocodile.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class DrossCrocodile extends CardImpl { public DrossCrocodile(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Crocodile"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.CROCODILE); this.power = new MageInt(5); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DrossGolem.java b/Mage.Sets/src/mage/cards/d/DrossGolem.java index 476b41deb4..e5c070cfad 100644 --- a/Mage.Sets/src/mage/cards/d/DrossGolem.java +++ b/Mage.Sets/src/mage/cards/d/DrossGolem.java @@ -44,7 +44,7 @@ public class DrossGolem extends CardImpl { public DrossGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DrossHarvester.java b/Mage.Sets/src/mage/cards/d/DrossHarvester.java index 6385f8caa8..8fef6a7eaf 100644 --- a/Mage.Sets/src/mage/cards/d/DrossHarvester.java +++ b/Mage.Sets/src/mage/cards/d/DrossHarvester.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -48,7 +49,7 @@ public class DrossHarvester extends CardImpl { public DrossHarvester(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DrossHopper.java b/Mage.Sets/src/mage/cards/d/DrossHopper.java index 5c441aad18..43b31f7eb4 100644 --- a/Mage.Sets/src/mage/cards/d/DrossHopper.java +++ b/Mage.Sets/src/mage/cards/d/DrossHopper.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -49,8 +50,8 @@ public class DrossHopper extends CardImpl { public DrossHopper (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Insect"); - this.subtype.add("Horror"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DrossProwler.java b/Mage.Sets/src/mage/cards/d/DrossProwler.java index 035c1a7b1b..385b0582cc 100644 --- a/Mage.Sets/src/mage/cards/d/DrossProwler.java +++ b/Mage.Sets/src/mage/cards/d/DrossProwler.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class DrossProwler extends CardImpl { public DrossProwler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DrossRipper.java b/Mage.Sets/src/mage/cards/d/DrossRipper.java index 87e008e36a..6aaa0eddd4 100644 --- a/Mage.Sets/src/mage/cards/d/DrossRipper.java +++ b/Mage.Sets/src/mage/cards/d/DrossRipper.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class DrossRipper extends CardImpl { public DrossRipper (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(3); this.toughness = new MageInt(3); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{2}{B}"))); diff --git a/Mage.Sets/src/mage/cards/d/DrossScorpion.java b/Mage.Sets/src/mage/cards/d/DrossScorpion.java index 15412fcbc7..dbcbfd7f59 100644 --- a/Mage.Sets/src/mage/cards/d/DrossScorpion.java +++ b/Mage.Sets/src/mage/cards/d/DrossScorpion.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetArtifactPermanent; @@ -53,7 +54,7 @@ public class DrossScorpion extends CardImpl { public DrossScorpion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Scorpion"); + this.subtype.add(SubType.SCORPION); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DroveOfElves.java b/Mage.Sets/src/mage/cards/d/DroveOfElves.java index ea35fff39d..c1613606ca 100644 --- a/Mage.Sets/src/mage/cards/d/DroveOfElves.java +++ b/Mage.Sets/src/mage/cards/d/DroveOfElves.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -56,7 +57,7 @@ public class DroveOfElves extends CardImpl { public DroveOfElves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/d/DroverOfTheMighty.java b/Mage.Sets/src/mage/cards/d/DroverOfTheMighty.java new file mode 100644 index 0000000000..43a6e62840 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DroverOfTheMighty.java @@ -0,0 +1,78 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostSourceWhileControlsEffect; +import mage.abilities.mana.AnyColorManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author TheElk801 + */ +public class DroverOfTheMighty extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Dinosaur"); + + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + } + + public DroverOfTheMighty(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Drover of the Mighty gets +2/+2 as long as you control a Dinosaur. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceWhileControlsEffect(filter, 2, 2))); + + // {T}: Add one mana of any color to your mana pool. + this.addAbility(new AnyColorManaAbility()); + } + + public DroverOfTheMighty(final DroverOfTheMighty card) { + super(card); + } + + @Override + public DroverOfTheMighty copy() { + return new DroverOfTheMighty(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/Drowned.java b/Mage.Sets/src/mage/cards/d/Drowned.java index 26a5238024..2477e2c80a 100644 --- a/Mage.Sets/src/mage/cards/d/Drowned.java +++ b/Mage.Sets/src/mage/cards/d/Drowned.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class Drowned extends CardImpl { public Drowned(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DrownedCatacomb.java b/Mage.Sets/src/mage/cards/d/DrownedCatacomb.java index 353f91b5b3..4565940df1 100644 --- a/Mage.Sets/src/mage/cards/d/DrownedCatacomb.java +++ b/Mage.Sets/src/mage/cards/d/DrownedCatacomb.java @@ -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.cards.d; import mage.abilities.common.EntersBattlefieldAbility; @@ -59,10 +58,10 @@ public class DrownedCatacomb extends CardImpl { } public DrownedCatacomb(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); - String abilityText = "tap it unless you control a Island or a Swamp"; + String abilityText = " tapped unless you control a Island or a Swamp"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlackManaAbility()); this.addAbility(new BlueManaAbility()); diff --git a/Mage.Sets/src/mage/cards/d/DrownedRusalka.java b/Mage.Sets/src/mage/cards/d/DrownedRusalka.java index 0a666a9747..bd9e2b6303 100644 --- a/Mage.Sets/src/mage/cards/d/DrownedRusalka.java +++ b/Mage.Sets/src/mage/cards/d/DrownedRusalka.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.discard.DiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent; @@ -50,7 +51,7 @@ public class DrownedRusalka extends CardImpl { public DrownedRusalka(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DrownerInitiate.java b/Mage.Sets/src/mage/cards/d/DrownerInitiate.java index f7f6c9faab..8f3fbcc414 100644 --- a/Mage.Sets/src/mage/cards/d/DrownerInitiate.java +++ b/Mage.Sets/src/mage/cards/d/DrownerInitiate.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; import mage.target.TargetPlayer; @@ -57,8 +58,8 @@ public class DrownerInitiate extends CardImpl { public DrownerInitiate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DrownerOfHope.java b/Mage.Sets/src/mage/cards/d/DrownerOfHope.java index 9ad05aebbb..afe440aa60 100644 --- a/Mage.Sets/src/mage/cards/d/DrownerOfHope.java +++ b/Mage.Sets/src/mage/cards/d/DrownerOfHope.java @@ -65,7 +65,7 @@ public class DrownerOfHope extends CardImpl { public DrownerOfHope(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DrownerOfSecrets.java b/Mage.Sets/src/mage/cards/d/DrownerOfSecrets.java index e76d44bbb8..aa753174cd 100644 --- a/Mage.Sets/src/mage/cards/d/DrownerOfSecrets.java +++ b/Mage.Sets/src/mage/cards/d/DrownerOfSecrets.java @@ -60,8 +60,8 @@ public class DrownerOfSecrets extends CardImpl { public DrownerOfSecrets(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DrownyardBehemoth.java b/Mage.Sets/src/mage/cards/d/DrownyardBehemoth.java index dcbf143ae9..2e005a79cd 100644 --- a/Mage.Sets/src/mage/cards/d/DrownyardBehemoth.java +++ b/Mage.Sets/src/mage/cards/d/DrownyardBehemoth.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -48,8 +49,8 @@ public class DrownyardBehemoth extends CardImpl { public DrownyardBehemoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{9}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Crab"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.CRAB); this.power = new MageInt(5); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/d/DrownyardExplorers.java b/Mage.Sets/src/mage/cards/d/DrownyardExplorers.java index f465a681c6..ef003c058e 100644 --- a/Mage.Sets/src/mage/cards/d/DrownyardExplorers.java +++ b/Mage.Sets/src/mage/cards/d/DrownyardExplorers.java @@ -34,6 +34,7 @@ import mage.abilities.effects.keyword.InvestigateEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class DrownyardExplorers extends CardImpl { public DrownyardExplorers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DrudgeBeetle.java b/Mage.Sets/src/mage/cards/d/DrudgeBeetle.java index 481f3058d5..4e75922629 100644 --- a/Mage.Sets/src/mage/cards/d/DrudgeBeetle.java +++ b/Mage.Sets/src/mage/cards/d/DrudgeBeetle.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ScavengeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class DrudgeBeetle extends CardImpl { public DrudgeBeetle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DrudgeReavers.java b/Mage.Sets/src/mage/cards/d/DrudgeReavers.java index 0e91693e58..8bcd4da2db 100644 --- a/Mage.Sets/src/mage/cards/d/DrudgeReavers.java +++ b/Mage.Sets/src/mage/cards/d/DrudgeReavers.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class DrudgeReavers extends CardImpl { public DrudgeReavers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DrudgeSkeletons.java b/Mage.Sets/src/mage/cards/d/DrudgeSkeletons.java index 59e0e4992f..6debe23e97 100644 --- a/Mage.Sets/src/mage/cards/d/DrudgeSkeletons.java +++ b/Mage.Sets/src/mage/cards/d/DrudgeSkeletons.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class DrudgeSkeletons extends CardImpl { public DrudgeSkeletons(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DruidLyrist.java b/Mage.Sets/src/mage/cards/d/DruidLyrist.java index cf4e47b8f5..c93ee9ad7c 100644 --- a/Mage.Sets/src/mage/cards/d/DruidLyrist.java +++ b/Mage.Sets/src/mage/cards/d/DruidLyrist.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetEnchantmentPermanent; @@ -49,8 +50,8 @@ public class DruidLyrist extends CardImpl { public DruidLyrist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DruidOfTheAnima.java b/Mage.Sets/src/mage/cards/d/DruidOfTheAnima.java index d4264ee9d7..be2be77921 100644 --- a/Mage.Sets/src/mage/cards/d/DruidOfTheAnima.java +++ b/Mage.Sets/src/mage/cards/d/DruidOfTheAnima.java @@ -36,6 +36,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class DruidOfTheAnima extends CardImpl { public DruidOfTheAnima (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DruidOfTheCowl.java b/Mage.Sets/src/mage/cards/d/DruidOfTheCowl.java index 3d9b371f63..7eef70911f 100644 --- a/Mage.Sets/src/mage/cards/d/DruidOfTheCowl.java +++ b/Mage.Sets/src/mage/cards/d/DruidOfTheCowl.java @@ -33,6 +33,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class DruidOfTheCowl extends CardImpl { public DruidOfTheCowl(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DruidsCall.java b/Mage.Sets/src/mage/cards/d/DruidsCall.java index 0d234a8d65..fcba8d21a3 100644 --- a/Mage.Sets/src/mage/cards/d/DruidsCall.java +++ b/Mage.Sets/src/mage/cards/d/DruidsCall.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class DruidsCall extends CardImpl { public DruidsCall(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/d/DruidsFamiliar.java b/Mage.Sets/src/mage/cards/d/DruidsFamiliar.java index 624a55ca53..c918fbe78b 100644 --- a/Mage.Sets/src/mage/cards/d/DruidsFamiliar.java +++ b/Mage.Sets/src/mage/cards/d/DruidsFamiliar.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SoulbondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,7 +49,7 @@ public class DruidsFamiliar extends CardImpl { public DruidsFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Bear"); + this.subtype.add(SubType.BEAR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/Drumhunter.java b/Mage.Sets/src/mage/cards/d/Drumhunter.java index cf9e1586ab..f9470246e5 100644 --- a/Mage.Sets/src/mage/cards/d/Drumhunter.java +++ b/Mage.Sets/src/mage/cards/d/Drumhunter.java @@ -35,6 +35,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -51,9 +52,9 @@ public class Drumhunter extends CardImpl { public Drumhunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DrunauCorpseTrawler.java b/Mage.Sets/src/mage/cards/d/DrunauCorpseTrawler.java index 5f7a082c16..cfab7d6c7d 100644 --- a/Mage.Sets/src/mage/cards/d/DrunauCorpseTrawler.java +++ b/Mage.Sets/src/mage/cards/d/DrunauCorpseTrawler.java @@ -54,7 +54,7 @@ public class DrunauCorpseTrawler extends CardImpl { public DrunauCorpseTrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DryadArbor.java b/Mage.Sets/src/mage/cards/d/DryadArbor.java index cf60c80f6b..0aa4a09866 100644 --- a/Mage.Sets/src/mage/cards/d/DryadArbor.java +++ b/Mage.Sets/src/mage/cards/d/DryadArbor.java @@ -33,6 +33,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class DryadArbor extends CardImpl { public DryadArbor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND,CardType.CREATURE},""); - this.subtype.add("Forest"); - this.subtype.add("Dryad"); + this.subtype.add(SubType.FOREST); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DryadMilitant.java b/Mage.Sets/src/mage/cards/d/DryadMilitant.java index ceb349f4ca..967f76b5b8 100644 --- a/Mage.Sets/src/mage/cards/d/DryadMilitant.java +++ b/Mage.Sets/src/mage/cards/d/DryadMilitant.java @@ -36,6 +36,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,8 +53,8 @@ public class DryadMilitant extends CardImpl { public DryadMilitant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G/W}"); - this.subtype.add("Dryad"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.DRYAD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DryadSophisticate.java b/Mage.Sets/src/mage/cards/d/DryadSophisticate.java index 890a952190..ca04e1ef5d 100644 --- a/Mage.Sets/src/mage/cards/d/DryadSophisticate.java +++ b/Mage.Sets/src/mage/cards/d/DryadSophisticate.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.LandwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; /** @@ -43,7 +44,7 @@ public class DryadSophisticate extends CardImpl { public DryadSophisticate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Dryad"); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DryadsFavor.java b/Mage.Sets/src/mage/cards/d/DryadsFavor.java index 69e42f4ef9..4ae6579d01 100644 --- a/Mage.Sets/src/mage/cards/d/DryadsFavor.java +++ b/Mage.Sets/src/mage/cards/d/DryadsFavor.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -52,7 +53,7 @@ public class DryadsFavor extends CardImpl { public DryadsFavor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/d/DualCasting.java b/Mage.Sets/src/mage/cards/d/DualCasting.java index 8939986d85..8b04fcc224 100644 --- a/Mage.Sets/src/mage/cards/d/DualCasting.java +++ b/Mage.Sets/src/mage/cards/d/DualCasting.java @@ -64,7 +64,7 @@ public class DualCasting extends CardImpl { public DualCasting(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/d/DualNature.java b/Mage.Sets/src/mage/cards/d/DualNature.java new file mode 100644 index 0000000000..3080786093 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DualNature.java @@ -0,0 +1,234 @@ +/* + * 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.cards.d; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.common.LeavesBattlefieldAllTriggeredAbility; +import mage.abilities.common.ZoneChangeTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; +import mage.abilities.effects.common.ExileAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SetTargetPointer; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.util.CardUtil; + +/** + * + * @author TheElk801 + */ +public class DualNature extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nontoken creature"); + + static { + filter.add(Predicates.not(new TokenPredicate())); + } + + public DualNature(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{G}{G}"); + + // Whenever a nontoken creature enters the battlefield, its controller creates a token that's a copy of that creature. + this.addAbility(new EntersBattlefieldAllTriggeredAbility( + Zone.BATTLEFIELD, new DualNatureCreateTokenEffect(), filter, false, SetTargetPointer.PERMANENT, + "Whenever a nontoken creature enters the battlefield, its controller creates a token that's a copy of that creature." + )); + + // Whenever a nontoken creature leaves the battlefield, exile all tokens with the same name as that creature. + this.addAbility(new LeavesBattlefieldAllTriggeredAbility( + Zone.BATTLEFIELD, new DualNatureCreatureLeavesEffect(), filter, false, SetTargetPointer.PERMANENT + )); + + // When Dual Nature leaves the battlefield, exile all tokens created with Dual Nature. + this.addAbility(new DualNatureLeavesBattlefieldTriggeredAbility()); + } + + public DualNature(final DualNature card) { + super(card); + } + + @Override + public DualNature copy() { + return new DualNature(this); + } +} + +class DualNatureCreateTokenEffect extends OneShotEffect { + + DualNatureCreateTokenEffect() { + super(Outcome.PutCardInPlay); + this.staticText = "its controller creates a token that's a copy of that creature"; + } + + DualNatureCreateTokenEffect(final DualNatureCreateTokenEffect effect) { + super(effect); + } + + @Override + public DualNatureCreateTokenEffect copy() { + return new DualNatureCreateTokenEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanentOrLKIBattlefield(this.getTargetPointer().getFirst(game, source)); + if (permanent != null) { + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(permanent.getControllerId()); + effect.setTargetPointer(targetPointer); + effect.apply(game, source); + Object object = game.getState().getValue(CardUtil.getCardZoneString("_tokensCreated", source.getSourceId(), game)); + Set tokensCreated; + if (object != null) { + tokensCreated = (Set) object; + } else { + tokensCreated = new HashSet<>(); + } + for (Permanent perm : effect.getAddedPermanent()) { + if (perm != null) { + tokensCreated.add(perm.getId()); + } + } + game.getState().setValue(CardUtil.getCardZoneString("_tokensCreated", source.getSourceId(), game), tokensCreated); + } + return true; + } +} + +class DualNatureCreatureLeavesEffect extends OneShotEffect { + + DualNatureCreatureLeavesEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "exile all tokens with the same name as that creature"; + } + + DualNatureCreatureLeavesEffect(final DualNatureCreatureLeavesEffect effect) { + super(effect); + } + + @Override + public DualNatureCreatureLeavesEffect copy() { + return new DualNatureCreatureLeavesEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent creature = game.getPermanentOrLKIBattlefield(this.getTargetPointer().getFirst(game, source)); + if (creature != null) { + FilterPermanent filter = new FilterPermanent(); + filter.add(new TokenPredicate()); + filter.add(new NamePredicate(creature.getName())); + new ExileAllEffect(filter).apply(game, source); + return true; + } + return false; + } +} + +class DualNatureLeavesBattlefieldTriggeredAbility extends ZoneChangeTriggeredAbility { + + DualNatureLeavesBattlefieldTriggeredAbility() { + super(Zone.BATTLEFIELD, null, new DualNatureExileEffect(), "When {this} leaves the battlefield, ", false); + } + + DualNatureLeavesBattlefieldTriggeredAbility(DualNatureLeavesBattlefieldTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (super.checkTrigger(event, game)) { + for (Effect effect : this.getEffects()) { + if (effect instanceof DualNatureExileEffect) { + ((DualNatureExileEffect) effect).setCardZoneString(CardUtil.getCardZoneString("_tokensCreated", this.getSourceId(), game, true)); + } + } + return true; + } + return false; + } + + @Override + public DualNatureLeavesBattlefieldTriggeredAbility copy() { + return new DualNatureLeavesBattlefieldTriggeredAbility(this); + } +} + +class DualNatureExileEffect extends OneShotEffect { + + private String cardZoneString; + + DualNatureExileEffect() { + super(Outcome.Benefit); + this.staticText = "exile all tokens created with {this}."; + } + + DualNatureExileEffect(final DualNatureExileEffect effect) { + super(effect); + this.cardZoneString = effect.cardZoneString; + } + + @Override + public DualNatureExileEffect copy() { + return new DualNatureExileEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Object object = game.getState().getValue(cardZoneString); + if (object != null) { + Set tokensCreated = (Set) object; + for (UUID tokenId : tokensCreated) { + Permanent token = game.getPermanent(tokenId); + if (token != null) { + token.destroy(source.getSourceId(), game, true); + } + } + } + return true; + } + + public void setCardZoneString(String cardZoneString) { + this.cardZoneString = cardZoneString; + } +} diff --git a/Mage.Sets/src/mage/cards/d/DualcasterMage.java b/Mage.Sets/src/mage/cards/d/DualcasterMage.java index f6b691995b..6b953bec66 100644 --- a/Mage.Sets/src/mage/cards/d/DualcasterMage.java +++ b/Mage.Sets/src/mage/cards/d/DualcasterMage.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.TargetSpell; @@ -47,8 +48,8 @@ public class DualcasterMage extends CardImpl { public DualcasterMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DubiousChallenge.java b/Mage.Sets/src/mage/cards/d/DubiousChallenge.java index ed2b4c02e2..cd973d7619 100644 --- a/Mage.Sets/src/mage/cards/d/DubiousChallenge.java +++ b/Mage.Sets/src/mage/cards/d/DubiousChallenge.java @@ -53,6 +53,8 @@ public class DubiousChallenge extends CardImpl { // Look at the top ten cards of your library, exile up to two creature cards from among them, then shuffle your library. Target opponent may choose one of the exiled cards and put it onto the battlefield under his or her control. Put the rest onto the battlefield under your control. getSpellAbility().addEffect(new DubiousChallengeEffect()); getSpellAbility().addTarget(new TargetOpponent()); + getSpellAbility().addEffect(new DubiousChallengeMoveToBattlefieldEffect()); + getSpellAbility().addEffect(new DubiousChallengeMoveToBattlefieldEffect()); } public DubiousChallenge(final DubiousChallenge card) { @@ -69,7 +71,7 @@ class DubiousChallengeEffect extends OneShotEffect { public DubiousChallengeEffect() { super(Outcome.Benefit); - this.staticText = "Look at the top ten cards of your library, exile up to two creature cards from among them, then shuffle your library. Target opponent may choose one of the exiled cards and put it onto the battlefield under his or her control. Put the rest onto the battlefield under your control"; + this.staticText = "Look at the top ten cards of your library, exile up to two creature cards from among them, then shuffle your library. Target opponent may choose one of the exiled cards and put it onto the battlefield under his or her control. Put the rest onto the battlefield under your control."; } public DubiousChallengeEffect(final DubiousChallengeEffect effect) { @@ -98,15 +100,17 @@ class DubiousChallengeEffect extends OneShotEffect { Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source)); if (opponent != null) { TargetCard targetOpponentCreature = new TargetCard(0, 1, Zone.EXILED, new FilterCreatureCard()); + DubiousChallengeMoveToBattlefieldEffect opponentEffect = (DubiousChallengeMoveToBattlefieldEffect) source.getEffects().get(1); + DubiousChallengeMoveToBattlefieldEffect controllerEffect = (DubiousChallengeMoveToBattlefieldEffect) source.getEffects().get(2); if (opponent.choose(outcome, exiledCards, targetOpponentCreature, game)) { Card card = game.getCard(targetOpponentCreature.getFirstTarget()); if (card != null) { - opponent.moveCards(card, Zone.BATTLEFIELD, source, game); + opponentEffect.setPlayerAndCards(opponent, new CardsImpl(card)); exiledCards.remove(card); } } if (!exiledCards.isEmpty()) { - controller.moveCards(exiledCards, Zone.BATTLEFIELD, source, game); + controllerEffect.setPlayerAndCards(controller, exiledCards); } } } else { @@ -117,3 +121,36 @@ class DubiousChallengeEffect extends OneShotEffect { return false; } } + +class DubiousChallengeMoveToBattlefieldEffect extends OneShotEffect { + + public DubiousChallengeMoveToBattlefieldEffect() { + super(Outcome.Benefit); + } + + public DubiousChallengeMoveToBattlefieldEffect(final DubiousChallengeMoveToBattlefieldEffect effect) { + super(effect); + } + + @Override + public DubiousChallengeMoveToBattlefieldEffect copy() { + return new DubiousChallengeMoveToBattlefieldEffect(this); + } + + public void setPlayerAndCards(Player targetPlayer, Cards targetCards) + { + this.player = targetPlayer; + this.cards = targetCards; + } + + @Override + public boolean apply(Game game, Ability source) { + if (cards != null && player != null) { + return player.moveCards(cards, Zone.BATTLEFIELD, source, game); + } + return false; + } + + private Cards cards; + private Player player; +} diff --git a/Mage.Sets/src/mage/cards/d/DuctCrawler.java b/Mage.Sets/src/mage/cards/d/DuctCrawler.java index aecd6e9917..c9e61d664c 100644 --- a/Mage.Sets/src/mage/cards/d/DuctCrawler.java +++ b/Mage.Sets/src/mage/cards/d/DuctCrawler.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByTargetSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class DuctCrawler extends CardImpl { public DuctCrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DuergarAssailant.java b/Mage.Sets/src/mage/cards/d/DuergarAssailant.java index c1ec8f48e9..af3f74d0fd 100644 --- a/Mage.Sets/src/mage/cards/d/DuergarAssailant.java +++ b/Mage.Sets/src/mage/cards/d/DuergarAssailant.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetAttackingOrBlockingCreature; @@ -48,8 +49,8 @@ public class DuergarAssailant extends CardImpl { public DuergarAssailant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R/W}"); - this.subtype.add("Dwarf"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DuergarCaveGuard.java b/Mage.Sets/src/mage/cards/d/DuergarCaveGuard.java index 525ba56366..81ac71e3d2 100644 --- a/Mage.Sets/src/mage/cards/d/DuergarCaveGuard.java +++ b/Mage.Sets/src/mage/cards/d/DuergarCaveGuard.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class DuergarCaveGuard extends CardImpl { public DuergarCaveGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Dwarf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DuergarHedgeMage.java b/Mage.Sets/src/mage/cards/d/DuergarHedgeMage.java index e3d78f2bef..41b8394cdd 100644 --- a/Mage.Sets/src/mage/cards/d/DuergarHedgeMage.java +++ b/Mage.Sets/src/mage/cards/d/DuergarHedgeMage.java @@ -62,8 +62,8 @@ public class DuergarHedgeMage extends CardImpl { public DuergarHedgeMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R/W}"); - this.subtype.add("Dwarf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DuergarMineCaptain.java b/Mage.Sets/src/mage/cards/d/DuergarMineCaptain.java index 7d51177ffd..aeb1283878 100644 --- a/Mage.Sets/src/mage/cards/d/DuergarMineCaptain.java +++ b/Mage.Sets/src/mage/cards/d/DuergarMineCaptain.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterAttackingCreature; @@ -44,23 +45,26 @@ import mage.filter.common.FilterAttackingCreature; /** * * @author jeffwadsworth - + * */ public class DuergarMineCaptain extends CardImpl { public DuergarMineCaptain(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R/W}"); - this.subtype.add("Dwarf"); - this.subtype.add("Soldier"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R/W}"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); // {1}{RW}, {untap}: Attacking creatures get +1/+0 until end of turn. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 0, Duration.EndOfTurn, new FilterAttackingCreature(), false), new ManaCostsImpl("{1}{R/W}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new BoostAllEffect(1, 0, Duration.EndOfTurn, new FilterAttackingCreature("attacking creatures"), false), + new ManaCostsImpl("{1}{R/W}") + ); ability.addCost(new UntapSourceCost()); this.addAbility(ability); - + } public DuergarMineCaptain(final DuergarMineCaptain card) { diff --git a/Mage.Sets/src/mage/cards/d/DukharaPeafowl.java b/Mage.Sets/src/mage/cards/d/DukharaPeafowl.java index 24e4d89e65..b35ab80a85 100644 --- a/Mage.Sets/src/mage/cards/d/DukharaPeafowl.java +++ b/Mage.Sets/src/mage/cards/d/DukharaPeafowl.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class DukharaPeafowl extends CardImpl { public DukharaPeafowl(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DukharaScavenger.java b/Mage.Sets/src/mage/cards/d/DukharaScavenger.java index 1c5ac9cbf4..220520abbc 100644 --- a/Mage.Sets/src/mage/cards/d/DukharaScavenger.java +++ b/Mage.Sets/src/mage/cards/d/DukharaScavenger.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PutOnLibraryTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetCardInYourGraveyard; @@ -47,7 +48,7 @@ public class DukharaScavenger extends CardImpl { public DukharaScavenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Crocodile"); + this.subtype.add(SubType.CROCODILE); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/DulcetSirens.java b/Mage.Sets/src/mage/cards/d/DulcetSirens.java index f5a9d037a0..9adfa5670d 100644 --- a/Mage.Sets/src/mage/cards/d/DulcetSirens.java +++ b/Mage.Sets/src/mage/cards/d/DulcetSirens.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -54,7 +55,7 @@ public class DulcetSirens extends CardImpl { public DulcetSirens(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Siren"); + this.subtype.add(SubType.SIREN); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DuneBeetle.java b/Mage.Sets/src/mage/cards/d/DuneBeetle.java index dadf12d0dd..123755f2a7 100644 --- a/Mage.Sets/src/mage/cards/d/DuneBeetle.java +++ b/Mage.Sets/src/mage/cards/d/DuneBeetle.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class DuneBeetle extends CardImpl { public DuneBeetle(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(4); } diff --git a/Mage.Sets/src/mage/cards/d/DuneBroodNephilim.java b/Mage.Sets/src/mage/cards/d/DuneBroodNephilim.java index e36f10b916..72c4b819f4 100644 --- a/Mage.Sets/src/mage/cards/d/DuneBroodNephilim.java +++ b/Mage.Sets/src/mage/cards/d/DuneBroodNephilim.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; import mage.game.permanent.token.DuneBroodNephilimToken; @@ -48,7 +49,7 @@ public class DuneBroodNephilim extends CardImpl { public DuneBroodNephilim(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{R}{G}{W}"); - this.subtype.add("Nephilim"); + this.subtype.add(SubType.NEPHILIM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DuneDiviner.java b/Mage.Sets/src/mage/cards/d/DuneDiviner.java index d2dcba80c6..61f93fa448 100644 --- a/Mage.Sets/src/mage/cards/d/DuneDiviner.java +++ b/Mage.Sets/src/mage/cards/d/DuneDiviner.java @@ -61,8 +61,8 @@ public class DuneDiviner extends CardImpl { public DuneDiviner(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Naga"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DuneriderOutlaw.java b/Mage.Sets/src/mage/cards/d/DuneriderOutlaw.java index 33dac27415..214034ff27 100644 --- a/Mage.Sets/src/mage/cards/d/DuneriderOutlaw.java +++ b/Mage.Sets/src/mage/cards/d/DuneriderOutlaw.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.game.events.GameEvent; @@ -52,9 +53,9 @@ public class DuneriderOutlaw extends CardImpl { public DuneriderOutlaw(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); + this.subtype.add(SubType.ROGUE); this.color.setBlack(true); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DunesOfTheDead.java b/Mage.Sets/src/mage/cards/d/DunesOfTheDead.java index 600bc53237..02754eae35 100644 --- a/Mage.Sets/src/mage/cards/d/DunesOfTheDead.java +++ b/Mage.Sets/src/mage/cards/d/DunesOfTheDead.java @@ -1,64 +1,65 @@ -/* - * 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.cards.d; - -import java.util.UUID; -import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.mana.ColorlessManaAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.game.permanent.token.ZombieToken; - -/** - * - * @author ciaccona007 - */ -public class DunesOfTheDead extends CardImpl { - - public DunesOfTheDead(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - - this.subtype.add("Desert"); - - // {T}: Add {C} to your mana pool. - addAbility(new ColorlessManaAbility()); - // When Dunes of the Dead is put into a graveyard from the battlefield, create a 2/2 black Zombie creature token. - this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new CreateTokenEffect(new ZombieToken(), 1), false)); - } - - public DunesOfTheDead(final DunesOfTheDead card) { - super(card); - } - - @Override - public DunesOfTheDead copy() { - return new DunesOfTheDead(this); - } -} +/* + * 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.cards.d; + +import java.util.UUID; +import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.game.permanent.token.ZombieToken; + +/** + * + * @author ciaccona007 + */ +public class DunesOfTheDead extends CardImpl { + + public DunesOfTheDead(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + this.subtype.add(SubType.DESERT); + + // {T}: Add {C} to your mana pool. + addAbility(new ColorlessManaAbility()); + // When Dunes of the Dead is put into a graveyard from the battlefield, create a 2/2 black Zombie creature token. + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new CreateTokenEffect(new ZombieToken(), 1), false)); + } + + public DunesOfTheDead(final DunesOfTheDead card) { + super(card); + } + + @Override + public DunesOfTheDead copy() { + return new DunesOfTheDead(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DungeonGeists.java b/Mage.Sets/src/mage/cards/d/DungeonGeists.java index 52952aaa5d..78bad86148 100644 --- a/Mage.Sets/src/mage/cards/d/DungeonGeists.java +++ b/Mage.Sets/src/mage/cards/d/DungeonGeists.java @@ -62,7 +62,7 @@ public class DungeonGeists extends CardImpl { public DungeonGeists(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DungeonShade.java b/Mage.Sets/src/mage/cards/d/DungeonShade.java index 8a2d558b2d..95c43ae2a0 100644 --- a/Mage.Sets/src/mage/cards/d/DungeonShade.java +++ b/Mage.Sets/src/mage/cards/d/DungeonShade.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class DungeonShade extends CardImpl { public DungeonShade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Shade"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SHADE); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DungroveElder.java b/Mage.Sets/src/mage/cards/d/DungroveElder.java index 530fde31f1..dfc5115bdc 100644 --- a/Mage.Sets/src/mage/cards/d/DungroveElder.java +++ b/Mage.Sets/src/mage/cards/d/DungroveElder.java @@ -57,7 +57,7 @@ public class DungroveElder extends CardImpl { public DungroveElder (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/d/Duplicant.java b/Mage.Sets/src/mage/cards/d/Duplicant.java index 11ddbf3300..33d6029d86 100644 --- a/Mage.Sets/src/mage/cards/d/Duplicant.java +++ b/Mage.Sets/src/mage/cards/d/Duplicant.java @@ -61,7 +61,7 @@ public class Duplicant extends CardImpl { public Duplicant(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DurkwoodBaloth.java b/Mage.Sets/src/mage/cards/d/DurkwoodBaloth.java index 34ac09e0b9..20dc56fbf3 100644 --- a/Mage.Sets/src/mage/cards/d/DurkwoodBaloth.java +++ b/Mage.Sets/src/mage/cards/d/DurkwoodBaloth.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class DurkwoodBaloth extends CardImpl { public DurkwoodBaloth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DurkwoodBoars.java b/Mage.Sets/src/mage/cards/d/DurkwoodBoars.java index 2f84e6dfc8..9edb4c5277 100644 --- a/Mage.Sets/src/mage/cards/d/DurkwoodBoars.java +++ b/Mage.Sets/src/mage/cards/d/DurkwoodBoars.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class DurkwoodBoars extends CardImpl { public DurkwoodBoars(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Boar"); + this.subtype.add(SubType.BOAR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DuskFeaster.java b/Mage.Sets/src/mage/cards/d/DuskFeaster.java index 0537cb6b13..dbff71b19d 100644 --- a/Mage.Sets/src/mage/cards/d/DuskFeaster.java +++ b/Mage.Sets/src/mage/cards/d/DuskFeaster.java @@ -51,7 +51,7 @@ public class DuskFeaster extends CardImpl { public DuskFeaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/d/DuskImp.java b/Mage.Sets/src/mage/cards/d/DuskImp.java index 3033d248c7..6a7f00ced5 100644 --- a/Mage.Sets/src/mage/cards/d/DuskImp.java +++ b/Mage.Sets/src/mage/cards/d/DuskImp.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class DuskImp extends CardImpl { public DuskImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DuskLegionDreadnought.java b/Mage.Sets/src/mage/cards/d/DuskLegionDreadnought.java new file mode 100644 index 0000000000..cbf4f9dd0f --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DuskLegionDreadnought.java @@ -0,0 +1,69 @@ +/* + * 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.cards.d; + +import java.util.UUID; + +import mage.MageInt; +import mage.abilities.keyword.CrewAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author TheElk801 + */ +public class DuskLegionDreadnought extends CardImpl { + + public DuskLegionDreadnought(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{5}"); + + this.subtype.add(SubType.VEHICLE); + this.power = new MageInt(4); + this.toughness = new MageInt(6); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Crew 2 + this.addAbility(new CrewAbility(2)); + + } + + public DuskLegionDreadnought(final DuskLegionDreadnought card) { + super(card); + } + + @Override + public DuskLegionDreadnought copy() { + return new DuskLegionDreadnought(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DuskUrchins.java b/Mage.Sets/src/mage/cards/d/DuskUrchins.java index 82a68bda5e..de8ac3e746 100644 --- a/Mage.Sets/src/mage/cards/d/DuskUrchins.java +++ b/Mage.Sets/src/mage/cards/d/DuskUrchins.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -47,7 +48,7 @@ public class DuskUrchins extends CardImpl { public DuskUrchins(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Ouphe"); + this.subtype.add(SubType.OUPHE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DuskborneSkymarcher.java b/Mage.Sets/src/mage/cards/d/DuskborneSkymarcher.java new file mode 100644 index 0000000000..4eb31fefe5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DuskborneSkymarcher.java @@ -0,0 +1,86 @@ +/* + * 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.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AttackingPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class DuskborneSkymarcher extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.VAMPIRE, "attacking Vampire"); + + static { + filter.add(new AttackingPredicate()); + } + + public DuskborneSkymarcher(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {W}, {T}: Target attacking vampire gets +1/+1 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{W}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public DuskborneSkymarcher(final DuskborneSkymarcher card) { + super(card); + } + + @Override + public DuskborneSkymarcher copy() { + return new DuskborneSkymarcher(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DuskdaleWurm.java b/Mage.Sets/src/mage/cards/d/DuskdaleWurm.java index 1c4c832071..1417fa3ffb 100644 --- a/Mage.Sets/src/mage/cards/d/DuskdaleWurm.java +++ b/Mage.Sets/src/mage/cards/d/DuskdaleWurm.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class DuskdaleWurm extends CardImpl { public DuskdaleWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/d/DuskhunterBat.java b/Mage.Sets/src/mage/cards/d/DuskhunterBat.java index a182dc6041..902751c77e 100644 --- a/Mage.Sets/src/mage/cards/d/DuskhunterBat.java +++ b/Mage.Sets/src/mage/cards/d/DuskhunterBat.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class DuskhunterBat extends CardImpl { public DuskhunterBat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Bat"); + this.subtype.add(SubType.BAT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DuskmantleGuildmage.java b/Mage.Sets/src/mage/cards/d/DuskmantleGuildmage.java index 4b12cdf56d..9255097c78 100644 --- a/Mage.Sets/src/mage/cards/d/DuskmantleGuildmage.java +++ b/Mage.Sets/src/mage/cards/d/DuskmantleGuildmage.java @@ -41,6 +41,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -58,8 +59,8 @@ public class DuskmantleGuildmage extends CardImpl { public DuskmantleGuildmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DuskmantleProwler.java b/Mage.Sets/src/mage/cards/d/DuskmantleProwler.java index 0e228db1c9..799ba20626 100644 --- a/Mage.Sets/src/mage/cards/d/DuskmantleProwler.java +++ b/Mage.Sets/src/mage/cards/d/DuskmantleProwler.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class DuskmantleProwler extends CardImpl { public DuskmantleProwler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DuskmantleSeer.java b/Mage.Sets/src/mage/cards/d/DuskmantleSeer.java index c27da7b49e..6fd7248a7e 100644 --- a/Mage.Sets/src/mage/cards/d/DuskmantleSeer.java +++ b/Mage.Sets/src/mage/cards/d/DuskmantleSeer.java @@ -35,10 +35,12 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; import mage.game.Game; +import mage.game.permanent.Permanent; import mage.players.Player; /** @@ -48,9 +50,9 @@ import mage.players.Player; public class DuskmantleSeer extends CardImpl { public DuskmantleSeer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Wizard"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{B}"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -90,15 +92,15 @@ class DuskmantleSeerEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Card sourceCard = game.getCard(source.getSourceId()); + Permanent sourceCard = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (sourceCard == null) { return false; } - for (Player player: game.getPlayers().values()) { - if(player.getLibrary().hasCards()){ + for (Player player : game.getPlayers().values()) { + if (player.getLibrary().hasCards()) { Card card = player.getLibrary().removeFromTop(game); if (card != null) { - Cards cards = new CardsImpl(); + Cards cards = new CardsImpl(); cards.add(card); player.revealCards(sourceCard.getName() + ": Revealed by " + player.getName(), cards, game); player.loseLife(card.getConvertedManaCost(), game, false); diff --git a/Mage.Sets/src/mage/cards/d/DuskriderFalcon.java b/Mage.Sets/src/mage/cards/d/DuskriderFalcon.java index 373edac074..d4dfa6a5f9 100644 --- a/Mage.Sets/src/mage/cards/d/DuskriderFalcon.java +++ b/Mage.Sets/src/mage/cards/d/DuskriderFalcon.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class DuskriderFalcon extends CardImpl { public DuskriderFalcon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DuskriderPeregrine.java b/Mage.Sets/src/mage/cards/d/DuskriderPeregrine.java index c6a44ee2fc..9333c4440b 100644 --- a/Mage.Sets/src/mage/cards/d/DuskriderPeregrine.java +++ b/Mage.Sets/src/mage/cards/d/DuskriderPeregrine.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class DuskriderPeregrine extends CardImpl { public DuskriderPeregrine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/Duskwalker.java b/Mage.Sets/src/mage/cards/d/Duskwalker.java index 360c478e75..c1697793a3 100644 --- a/Mage.Sets/src/mage/cards/d/Duskwalker.java +++ b/Mage.Sets/src/mage/cards/d/Duskwalker.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.counters.CounterType; @@ -50,8 +51,8 @@ public class Duskwalker extends CardImpl { public Duskwalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Human"); - this.subtype.add("Minion"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MINION); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DuskwatchRecruiter.java b/Mage.Sets/src/mage/cards/d/DuskwatchRecruiter.java index 17a97fcb60..6af0aff2c2 100644 --- a/Mage.Sets/src/mage/cards/d/DuskwatchRecruiter.java +++ b/Mage.Sets/src/mage/cards/d/DuskwatchRecruiter.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.k.KrallenhordeHowler; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -55,9 +56,9 @@ public class DuskwatchRecruiter extends CardImpl { public DuskwatchRecruiter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.WEREWOLF); this.transformable = true; this.secondSideCardClazz = KrallenhordeHowler.class; diff --git a/Mage.Sets/src/mage/cards/d/Duskworker.java b/Mage.Sets/src/mage/cards/d/Duskworker.java index 622b2d9197..dd3aadbc55 100644 --- a/Mage.Sets/src/mage/cards/d/Duskworker.java +++ b/Mage.Sets/src/mage/cards/d/Duskworker.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class Duskworker extends CardImpl { public Duskworker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(2); this.addAbility(new BecomesBlockedTriggeredAbility(new RegenerateSourceEffect(), false)); diff --git a/Mage.Sets/src/mage/cards/d/DustCorona.java b/Mage.Sets/src/mage/cards/d/DustCorona.java index b5e7c1c25d..e9c8a1029f 100644 --- a/Mage.Sets/src/mage/cards/d/DustCorona.java +++ b/Mage.Sets/src/mage/cards/d/DustCorona.java @@ -57,7 +57,7 @@ public class DustCorona extends CardImpl { public DustCorona(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/d/DustElemental.java b/Mage.Sets/src/mage/cards/d/DustElemental.java index 4aebab3b09..cffa27f1e1 100644 --- a/Mage.Sets/src/mage/cards/d/DustElemental.java +++ b/Mage.Sets/src/mage/cards/d/DustElemental.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; /** @@ -49,7 +50,7 @@ public class DustElemental extends CardImpl { public DustElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/d/DustStalker.java b/Mage.Sets/src/mage/cards/d/DustStalker.java index 91ccbe7400..8b39d2574e 100644 --- a/Mage.Sets/src/mage/cards/d/DustStalker.java +++ b/Mage.Sets/src/mage/cards/d/DustStalker.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.TargetController; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class DustStalker extends CardImpl { public DustStalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{R}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DutifulAttendant.java b/Mage.Sets/src/mage/cards/d/DutifulAttendant.java index a268fa2e1d..a3d5a5e2a8 100644 --- a/Mage.Sets/src/mage/cards/d/DutifulAttendant.java +++ b/Mage.Sets/src/mage/cards/d/DutifulAttendant.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.AnotherCardPredicate; import mage.target.common.TargetCardInYourGraveyard; @@ -45,16 +46,16 @@ import mage.target.common.TargetCardInYourGraveyard; */ public class DutifulAttendant extends CardImpl { - private static final FilterCreatureCard filter = new FilterCreatureCard("another creature card from your graveyard"); + private static final FilterCreatureCard filter = new FilterCreatureCard("another target creature card from your graveyard"); static { filter.add(new AnotherCardPredicate()); } public DutifulAttendant(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DutifulServants.java b/Mage.Sets/src/mage/cards/d/DutifulServants.java index 13d31f0a62..e54701a132 100644 --- a/Mage.Sets/src/mage/cards/d/DutifulServants.java +++ b/Mage.Sets/src/mage/cards/d/DutifulServants.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class DutifulServants extends CardImpl { public DutifulServants(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(5); } diff --git a/Mage.Sets/src/mage/cards/d/DutifulThrull.java b/Mage.Sets/src/mage/cards/d/DutifulThrull.java index 1be124481d..2b9ed36c55 100644 --- a/Mage.Sets/src/mage/cards/d/DutifulThrull.java +++ b/Mage.Sets/src/mage/cards/d/DutifulThrull.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class DutifulThrull extends CardImpl { public DutifulThrull(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Thrull"); + this.subtype.add(SubType.THRULL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DutyBoundDead.java b/Mage.Sets/src/mage/cards/d/DutyBoundDead.java index 0e5bb341fc..98caf11e3e 100644 --- a/Mage.Sets/src/mage/cards/d/DutyBoundDead.java +++ b/Mage.Sets/src/mage/cards/d/DutyBoundDead.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ExaltedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class DutyBoundDead extends CardImpl { public DutyBoundDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenArmorer.java b/Mage.Sets/src/mage/cards/d/DwarvenArmorer.java index 2fe3a19de7..1b0eafc30a 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenArmorer.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenArmorer.java @@ -41,6 +41,7 @@ import mage.cards.CardSetInfo; import mage.choices.Choice; import mage.choices.ChoiceImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.Counter; @@ -62,7 +63,7 @@ public class DwarvenArmorer extends CardImpl { public DwarvenArmorer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Dwarf"); + this.subtype.add(SubType.DWARF); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenBerserker.java b/Mage.Sets/src/mage/cards/d/DwarvenBerserker.java index e7192589f3..3fee75b7d2 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenBerserker.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenBerserker.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -48,8 +49,8 @@ public class DwarvenBerserker extends CardImpl { public DwarvenBerserker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Dwarf"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenBlastminer.java b/Mage.Sets/src/mage/cards/d/DwarvenBlastminer.java index 989ba43d52..cd0f09aeec 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenBlastminer.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenBlastminer.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetNonBasicLandPermanent; @@ -48,7 +49,7 @@ import mage.target.common.TargetNonBasicLandPermanent; public class DwarvenBlastminer extends CardImpl { public DwarvenBlastminer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Dwarf"); + this.subtype.add(SubType.DWARF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenBloodboiler.java b/Mage.Sets/src/mage/cards/d/DwarvenBloodboiler.java index 4a8d802c39..3bd75fe5a5 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenBloodboiler.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenBloodboiler.java @@ -61,7 +61,7 @@ public class DwarvenBloodboiler extends CardImpl { public DwarvenBloodboiler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{R}{R}"); - this.subtype.add("Dwarf"); + this.subtype.add(SubType.DWARF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenDemolitionTeam.java b/Mage.Sets/src/mage/cards/d/DwarvenDemolitionTeam.java index 8a889f0948..7b66489e50 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenDemolitionTeam.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenDemolitionTeam.java @@ -56,7 +56,7 @@ public class DwarvenDemolitionTeam extends CardImpl { public DwarvenDemolitionTeam(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Dwarf"); + this.subtype.add(SubType.DWARF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenDriller.java b/Mage.Sets/src/mage/cards/d/DwarvenDriller.java index abe53b80ca..ddcf64e452 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenDriller.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenDriller.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -52,7 +53,7 @@ public class DwarvenDriller extends CardImpl { public DwarvenDriller(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - this.subtype.add("Dwarf"); + this.subtype.add(SubType.DWARF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenGrunt.java b/Mage.Sets/src/mage/cards/d/DwarvenGrunt.java index 699e601414..667b3c335f 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenGrunt.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenGrunt.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class DwarvenGrunt extends CardImpl { public DwarvenGrunt(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Dwarf"); + this.subtype.add(SubType.DWARF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenLieutenant.java b/Mage.Sets/src/mage/cards/d/DwarvenLieutenant.java index 1c40badc1a..dd7c4434b5 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenLieutenant.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenLieutenant.java @@ -57,8 +57,8 @@ public class DwarvenLieutenant extends CardImpl { public DwarvenLieutenant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{R}"); - this.subtype.add("Dwarf"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenMiner.java b/Mage.Sets/src/mage/cards/d/DwarvenMiner.java index ff98af1ae6..d3a8d956de 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenMiner.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenMiner.java @@ -15,6 +15,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetNonBasicLandPermanent; @@ -26,7 +27,7 @@ public class DwarvenMiner extends CardImpl { public DwarvenMiner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Dwarf"); + this.subtype.add(SubType.DWARF); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenNomad.java b/Mage.Sets/src/mage/cards/d/DwarvenNomad.java index e01a2a512f..9289bed9db 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenNomad.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenNomad.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -56,8 +57,8 @@ public class DwarvenNomad extends CardImpl { public DwarvenNomad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Dwarf"); - this.subtype.add("Nomad"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.NOMAD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenPatrol.java b/Mage.Sets/src/mage/cards/d/DwarvenPatrol.java index 18b098f873..9cb25e7bf9 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenPatrol.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenPatrol.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -45,19 +46,19 @@ import mage.filter.predicate.mageobject.ColorPredicate; /** * * @author LoneFox - + * */ public class DwarvenPatrol extends CardImpl { - private static final FilterSpell filter = new FilterSpell("nonred spell"); + private static final FilterSpell filter = new FilterSpell("a nonred spell"); static { filter.add(Predicates.not(new ColorPredicate(ObjectColor.RED))); } public DwarvenPatrol(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Dwarf"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.subtype.add(SubType.DWARF); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenPony.java b/Mage.Sets/src/mage/cards/d/DwarvenPony.java index 127cc86004..7156212e08 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenPony.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenPony.java @@ -59,7 +59,7 @@ public class DwarvenPony extends CardImpl { public DwarvenPony(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Horse"); + this.subtype.add(SubType.HORSE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenRecruiter.java b/Mage.Sets/src/mage/cards/d/DwarvenRecruiter.java index 607626dc80..ed919c5b2a 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenRecruiter.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenRecruiter.java @@ -52,7 +52,7 @@ public class DwarvenRecruiter extends CardImpl { public DwarvenRecruiter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Dwarf"); + this.subtype.add(SubType.DWARF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenSoldier.java b/Mage.Sets/src/mage/cards/d/DwarvenSoldier.java index 2d0d292b86..837ceaa9ba 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenSoldier.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenSoldier.java @@ -46,8 +46,8 @@ public class DwarvenSoldier extends CardImpl { public DwarvenSoldier(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Dwarf"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenStrikeForce.java b/Mage.Sets/src/mage/cards/d/DwarvenStrikeForce.java index d5f53c0001..96aa9838fc 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenStrikeForce.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenStrikeForce.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class DwarvenStrikeForce extends CardImpl { public DwarvenStrikeForce(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Dwarf"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenThaumaturgist.java b/Mage.Sets/src/mage/cards/d/DwarvenThaumaturgist.java index 4dc68e668a..0b94e72f97 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenThaumaturgist.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenThaumaturgist.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.SwitchPowerToughnessTargetEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class DwarvenThaumaturgist extends CardImpl { public DwarvenThaumaturgist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Dwarf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenTrader.java b/Mage.Sets/src/mage/cards/d/DwarvenTrader.java index 53259a4f51..96144c73a6 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenTrader.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenTrader.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class DwarvenTrader extends CardImpl { public DwarvenTrader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Dwarf"); + this.subtype.add(SubType.DWARF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenVigilantes.java b/Mage.Sets/src/mage/cards/d/DwarvenVigilantes.java index ad2d61fe82..31c0cc5edd 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenVigilantes.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenVigilantes.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.AssignNoCombatDamageSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class DwarvenVigilantes extends CardImpl { public DwarvenVigilantes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Dwarf"); + this.subtype.add(SubType.DWARF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenWarriors.java b/Mage.Sets/src/mage/cards/d/DwarvenWarriors.java index effb92845e..723a026222 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenWarriors.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenWarriors.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -56,8 +57,8 @@ public class DwarvenWarriors extends CardImpl { public DwarvenWarriors(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Dwarf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenWeaponsmith.java b/Mage.Sets/src/mage/cards/d/DwarvenWeaponsmith.java index ed660a8837..fead54d3f0 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenWeaponsmith.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenWeaponsmith.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.PhaseStep; import mage.constants.Zone; import mage.counters.CounterType; @@ -53,8 +54,8 @@ public class DwarvenWeaponsmith extends CardImpl { public DwarvenWeaponsmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Dwarf"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DwynenGiltLeafDaen.java b/Mage.Sets/src/mage/cards/d/DwynenGiltLeafDaen.java index 299c6adae0..119757e677 100644 --- a/Mage.Sets/src/mage/cards/d/DwynenGiltLeafDaen.java +++ b/Mage.Sets/src/mage/cards/d/DwynenGiltLeafDaen.java @@ -56,8 +56,8 @@ public class DwynenGiltLeafDaen extends CardImpl { public DwynenGiltLeafDaen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DwynensElite.java b/Mage.Sets/src/mage/cards/d/DwynensElite.java index 8af06b2a0c..d1456fc8e2 100644 --- a/Mage.Sets/src/mage/cards/d/DwynensElite.java +++ b/Mage.Sets/src/mage/cards/d/DwynensElite.java @@ -59,8 +59,8 @@ public class DwynensElite extends CardImpl { public DwynensElite(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/d/DyingWail.java b/Mage.Sets/src/mage/cards/d/DyingWail.java index c94c086834..cf509a1c8c 100644 --- a/Mage.Sets/src/mage/cards/d/DyingWail.java +++ b/Mage.Sets/src/mage/cards/d/DyingWail.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.target.TargetPermanent; import mage.target.TargetPlayer; @@ -49,7 +50,7 @@ public class DyingWail extends CardImpl { public DyingWail(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/d/DyingWish.java b/Mage.Sets/src/mage/cards/d/DyingWish.java index 998386217c..31a4c2b10e 100644 --- a/Mage.Sets/src/mage/cards/d/DyingWish.java +++ b/Mage.Sets/src/mage/cards/d/DyingWish.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class DyingWish extends CardImpl { public DyingWish(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature you control TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/e/EagerCadet.java b/Mage.Sets/src/mage/cards/e/EagerCadet.java index 67c4bf9f07..370a71f080 100644 --- a/Mage.Sets/src/mage/cards/e/EagerCadet.java +++ b/Mage.Sets/src/mage/cards/e/EagerCadet.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class EagerCadet extends CardImpl { public EagerCadet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EagerConstruct.java b/Mage.Sets/src/mage/cards/e/EagerConstruct.java index 1638582ddf..b10ad5dc37 100644 --- a/Mage.Sets/src/mage/cards/e/EagerConstruct.java +++ b/Mage.Sets/src/mage/cards/e/EagerConstruct.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -47,7 +48,7 @@ public class EagerConstruct extends CardImpl { public EagerConstruct(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EagleOfTheWatch.java b/Mage.Sets/src/mage/cards/e/EagleOfTheWatch.java index 4fa5dda896..d75d9a9692 100644 --- a/Mage.Sets/src/mage/cards/e/EagleOfTheWatch.java +++ b/Mage.Sets/src/mage/cards/e/EagleOfTheWatch.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class EagleOfTheWatch extends CardImpl { public EagleOfTheWatch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EarsplittingRats.java b/Mage.Sets/src/mage/cards/e/EarsplittingRats.java index a8777af3bc..00ea44b2b4 100644 --- a/Mage.Sets/src/mage/cards/e/EarsplittingRats.java +++ b/Mage.Sets/src/mage/cards/e/EarsplittingRats.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class EarsplittingRats extends CardImpl { public EarsplittingRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EarthElemental.java b/Mage.Sets/src/mage/cards/e/EarthElemental.java index af2c9e614d..55a2e15da3 100644 --- a/Mage.Sets/src/mage/cards/e/EarthElemental.java +++ b/Mage.Sets/src/mage/cards/e/EarthElemental.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class EarthElemental extends CardImpl { public EarthElemental (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/EarthServant.java b/Mage.Sets/src/mage/cards/e/EarthServant.java index 3bfd6f041b..3b8056c558 100644 --- a/Mage.Sets/src/mage/cards/e/EarthServant.java +++ b/Mage.Sets/src/mage/cards/e/EarthServant.java @@ -55,7 +55,7 @@ public class EarthServant extends CardImpl { public EarthServant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/Earthbind.java b/Mage.Sets/src/mage/cards/e/Earthbind.java index 036131aae7..72d1b4b4e9 100644 --- a/Mage.Sets/src/mage/cards/e/Earthbind.java +++ b/Mage.Sets/src/mage/cards/e/Earthbind.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -54,7 +55,7 @@ public class Earthbind extends CardImpl { public Earthbind(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/e/Earthblighter.java b/Mage.Sets/src/mage/cards/e/Earthblighter.java index a89fafac21..dad73f40a4 100644 --- a/Mage.Sets/src/mage/cards/e/Earthblighter.java +++ b/Mage.Sets/src/mage/cards/e/Earthblighter.java @@ -58,8 +58,8 @@ public class Earthblighter extends CardImpl { public Earthblighter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EarthenGoo.java b/Mage.Sets/src/mage/cards/e/EarthenGoo.java new file mode 100644 index 0000000000..4778ddaf7b --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EarthenGoo.java @@ -0,0 +1,88 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.OrCost; +import mage.constants.SubType; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.CountersSourceCount; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author TheElk801 + */ +public class EarthenGoo extends CardImpl { + + public EarthenGoo(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + + this.subtype.add(SubType.OOZE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Cumulative upkeep {R} or {G} + this.addAbility(new CumulativeUpkeepAbility(new OrCost( + new ManaCostsImpl("{R}"), + new ManaCostsImpl("{G}"), + "{R} or {G}" + ))); + + // Earthen Goo gets +1/+1 for each age counter on it. + DynamicValue value = new CountersSourceCount(CounterType.AGE); + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, + new BoostSourceEffect(value, value, Duration.WhileOnBattlefield) + .setText("{this} gets +1/+1 for each age counter on it") + )); + } + + public EarthenGoo(final EarthenGoo card) { + super(card); + } + + @Override + public EarthenGoo copy() { + return new EarthenGoo(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/Earthlink.java b/Mage.Sets/src/mage/cards/e/Earthlink.java new file mode 100644 index 0000000000..ea985d210e --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/Earthlink.java @@ -0,0 +1,106 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.SacrificeEffect; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public class Earthlink extends CardImpl { + + public Earthlink(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{R}{G}"); + + // At the beginning of your upkeep, sacrifice Earthlink unless you pay {2}. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{2}")), TargetController.YOU, false)); + + // Whenever a creature dies, that creature's controller sacrifices a land. + this.addAbility(new DiesCreatureTriggeredAbility(new EarthlinkEffect(), false, false, true)); + } + + public Earthlink(final Earthlink card) { + super(card); + } + + @Override + public Earthlink copy() { + return new Earthlink(this); + } +} + +class EarthlinkEffect extends OneShotEffect { + + public EarthlinkEffect() { + super(Outcome.DrawCard); + this.staticText = "that creature's controller sacrifices a land"; + } + + public EarthlinkEffect(final EarthlinkEffect effect) { + super(effect); + } + + @Override + public EarthlinkEffect copy() { + return new EarthlinkEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = (Permanent) game.getLastKnownInformation(this.getTargetPointer().getFirst(game, source), Zone.BATTLEFIELD); + if (permanent != null) { + Player controller = game.getPlayer(permanent.getControllerId()); + if (controller != null) { + Effect effect = new SacrificeEffect(StaticFilters.FILTER_LAND, 1, "that creature's controller"); + effect.setTargetPointer(new FixedTarget(controller.getId(), game)); + effect.apply(game, source); + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/e/Earthlore.java b/Mage.Sets/src/mage/cards/e/Earthlore.java new file mode 100644 index 0000000000..f8e6998447 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/Earthlore.java @@ -0,0 +1,104 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.ActivateIfConditionActivatedAbility; +import mage.abilities.condition.common.AttachedToMatchesFilterCondition; +import mage.abilities.condition.common.MyTurnCondition; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.TapAttachedCost; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterBlockingCreature; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class Earthlore extends CardImpl { + + private static final FilterControlledPermanent filterLand = new FilterControlledPermanent("land you control"); + + static { + filterLand.add(new CardTypePredicate(CardType.LAND)); + } + + private static final FilterPermanent filterUntapped = new FilterPermanent("enchanted land is untapped"); + + static { + filterUntapped.add(Predicates.not(new TappedPredicate())); + } + + public Earthlore(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + this.subtype.add(SubType.AURA); + + // Enchant land you control + TargetPermanent auraTarget = new TargetControlledPermanent(filterLand); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Tap enchanted land: Target blocking creature gets +1/+2 until end of turn. Activate this ability only if enchanted land is untapped. + Cost cost = new TapAttachedCost(); + cost.setText("Tap enchanted land"); + Ability ability2 = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, + new BoostTargetEffect(1, 2, Duration.EndOfTurn), cost, new AttachedToMatchesFilterCondition(filterUntapped)); + ability2.addTarget(new TargetCreaturePermanent(new FilterBlockingCreature("blocking creature"))); + this.addAbility(ability2); + + } + + public Earthlore(final Earthlore card) { + super(card); + } + + @Override + public Earthlore copy() { + return new Earthlore(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/Earthshaker.java b/Mage.Sets/src/mage/cards/e/Earthshaker.java index 45c976efe1..62402900f8 100644 --- a/Mage.Sets/src/mage/cards/e/Earthshaker.java +++ b/Mage.Sets/src/mage/cards/e/Earthshaker.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -54,7 +55,7 @@ public class Earthshaker extends CardImpl { public Earthshaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/EarthshakerKhenra.java b/Mage.Sets/src/mage/cards/e/EarthshakerKhenra.java index 5faf9b1621..950d4fa555 100644 --- a/Mage.Sets/src/mage/cards/e/EarthshakerKhenra.java +++ b/Mage.Sets/src/mage/cards/e/EarthshakerKhenra.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Outcome; @@ -62,8 +63,8 @@ public class EarthshakerKhenra extends CardImpl { public EarthshakerKhenra(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Jackal"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.JACKAL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EarwigSquad.java b/Mage.Sets/src/mage/cards/e/EarwigSquad.java index 9eee178d31..be21434ef1 100644 --- a/Mage.Sets/src/mage/cards/e/EarwigSquad.java +++ b/Mage.Sets/src/mage/cards/e/EarwigSquad.java @@ -40,6 +40,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -56,8 +57,8 @@ public class EarwigSquad extends CardImpl { public EarwigSquad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EasternPaladin.java b/Mage.Sets/src/mage/cards/e/EasternPaladin.java index 39a772415a..210fb6df86 100644 --- a/Mage.Sets/src/mage/cards/e/EasternPaladin.java +++ b/Mage.Sets/src/mage/cards/e/EasternPaladin.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -59,8 +60,8 @@ public class EasternPaladin extends CardImpl { public EasternPaladin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EaterOfDays.java b/Mage.Sets/src/mage/cards/e/EaterOfDays.java index 209e959ae6..9860c76333 100644 --- a/Mage.Sets/src/mage/cards/e/EaterOfDays.java +++ b/Mage.Sets/src/mage/cards/e/EaterOfDays.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class EaterOfDays extends CardImpl { public EaterOfDays(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Leviathan"); + this.subtype.add(SubType.LEVIATHAN); this.power = new MageInt(9); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/e/EaterOfHope.java b/Mage.Sets/src/mage/cards/e/EaterOfHope.java index 38fd517e5e..783b7a49cf 100644 --- a/Mage.Sets/src/mage/cards/e/EaterOfHope.java +++ b/Mage.Sets/src/mage/cards/e/EaterOfHope.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.filter.common.FilterControlledCreaturePermanent; @@ -60,7 +61,7 @@ public class EaterOfHope extends CardImpl { public EaterOfHope(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/EaterOfTheDead.java b/Mage.Sets/src/mage/cards/e/EaterOfTheDead.java index 16be4c4075..770ac389c2 100644 --- a/Mage.Sets/src/mage/cards/e/EaterOfTheDead.java +++ b/Mage.Sets/src/mage/cards/e/EaterOfTheDead.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -52,7 +53,7 @@ public class EaterOfTheDead extends CardImpl { public EaterOfTheDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/EbonDragon.java b/Mage.Sets/src/mage/cards/e/EbonDragon.java index fe0a05c4b5..a6b870cc3d 100644 --- a/Mage.Sets/src/mage/cards/e/EbonDragon.java +++ b/Mage.Sets/src/mage/cards/e/EbonDragon.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetOpponent; /** @@ -47,7 +48,7 @@ public class EbonDragon extends CardImpl { public EbonDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/EbonDrake.java b/Mage.Sets/src/mage/cards/e/EbonDrake.java index 8005852b4a..34e6ce1dff 100644 --- a/Mage.Sets/src/mage/cards/e/EbonDrake.java +++ b/Mage.Sets/src/mage/cards/e/EbonDrake.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class EbonDrake extends CardImpl { public EbonDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EbonPraetor.java b/Mage.Sets/src/mage/cards/e/EbonPraetor.java index ee6ee95cb7..84561d9c98 100644 --- a/Mage.Sets/src/mage/cards/e/EbonPraetor.java +++ b/Mage.Sets/src/mage/cards/e/EbonPraetor.java @@ -57,8 +57,8 @@ public class EbonPraetor extends CardImpl { public EbonPraetor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Avatar"); - this.subtype.add("Praetor"); + this.subtype.add(SubType.AVATAR); + this.subtype.add(SubType.PRAETOR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/EbonbladeReaper.java b/Mage.Sets/src/mage/cards/e/EbonbladeReaper.java index 73e52f21db..5b7458ec08 100644 --- a/Mage.Sets/src/mage/cards/e/EbonbladeReaper.java +++ b/Mage.Sets/src/mage/cards/e/EbonbladeReaper.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -48,8 +49,8 @@ public class EbonbladeReaper extends CardImpl { public EbonbladeReaper(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EbonyRhino.java b/Mage.Sets/src/mage/cards/e/EbonyRhino.java index b2167d573b..a3df761f0c 100644 --- a/Mage.Sets/src/mage/cards/e/EbonyRhino.java +++ b/Mage.Sets/src/mage/cards/e/EbonyRhino.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class EbonyRhino extends CardImpl { public EbonyRhino(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); - this.subtype.add("Rhino"); + this.subtype.add(SubType.RHINO); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/EbonyTreefolk.java b/Mage.Sets/src/mage/cards/e/EbonyTreefolk.java index af3d39ba0c..775ae5160a 100644 --- a/Mage.Sets/src/mage/cards/e/EbonyTreefolk.java +++ b/Mage.Sets/src/mage/cards/e/EbonyTreefolk.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class EbonyTreefolk extends CardImpl { public EbonyTreefolk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EchoBaseCommando.java b/Mage.Sets/src/mage/cards/e/EchoBaseCommando.java index eacb50b638..75374acbee 100644 --- a/Mage.Sets/src/mage/cards/e/EchoBaseCommando.java +++ b/Mage.Sets/src/mage/cards/e/EchoBaseCommando.java @@ -60,8 +60,8 @@ public class EchoBaseCommando extends CardImpl { public EchoBaseCommando(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EchoChamber.java b/Mage.Sets/src/mage/cards/e/EchoChamber.java new file mode 100644 index 0000000000..7e0263f88a --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EchoChamber.java @@ -0,0 +1,113 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.target.common.TargetOpponentsChoicePermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author L_J + */ +public class EchoChamber extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); + + public EchoChamber(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); + + // {4}, {tap}: An opponent chooses target creature he or she controls. Create a token that's a copy of that creature. That token gains haste until end of turn. Exile the token at the beginning of the next end step. Activate this ability only any time you could cast a sorcery. + Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new EchoChamberCreateTokenEffect(), new GenericManaCost(4)); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetOpponentsChoicePermanent(1, 1, filter, false, true)); + this.addAbility(ability); + } + + public EchoChamber(final EchoChamber card) { + super(card); + } + + @Override + public EchoChamber copy() { + return new EchoChamber(this); + } +} + +class EchoChamberCreateTokenEffect extends OneShotEffect { + + EchoChamberCreateTokenEffect() { + super(Outcome.Copy); + this.staticText = "An opponent chooses target creature he or she controls. Create a token that's a copy of that creature. That token gains haste until end of turn. Exile the token at the beginning of the next end step"; + } + + EchoChamberCreateTokenEffect(final EchoChamberCreateTokenEffect effect) { + super(effect); + } + + @Override + public EchoChamberCreateTokenEffect copy() { + return new EchoChamberCreateTokenEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent copiedPermanent = game.getPermanent(this.getTargetPointer().getFirst(game, source)); + if (copiedPermanent != null) { + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(null, CardType.CREATURE, true); + if (effect.apply(game, source)) { + for (Permanent copyPermanent : effect.getAddedPermanent()) { + ExileTargetEffect exileEffect = new ExileTargetEffect(); + exileEffect.setTargetPointer(new FixedTarget(copyPermanent, game)); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); + game.addDelayedTriggeredAbility(delayedAbility, source); + } + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/e/EchoCirclet.java b/Mage.Sets/src/mage/cards/e/EchoCirclet.java index 472d377934..dd92b8924b 100644 --- a/Mage.Sets/src/mage/cards/e/EchoCirclet.java +++ b/Mage.Sets/src/mage/cards/e/EchoCirclet.java @@ -47,7 +47,7 @@ public class EchoCirclet extends CardImpl { public EchoCirclet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature can block an additional creature each combat. (static abilit of equipment, no ability that will be gained to equiped creature!) this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new EchoCircletEffect())); diff --git a/Mage.Sets/src/mage/cards/e/EchoMage.java b/Mage.Sets/src/mage/cards/e/EchoMage.java index 1d0aa6d801..db6efdd998 100644 --- a/Mage.Sets/src/mage/cards/e/EchoMage.java +++ b/Mage.Sets/src/mage/cards/e/EchoMage.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.LevelerCardBuilder; import mage.cards.CardSetInfo; import mage.cards.LevelerCard; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -57,8 +58,8 @@ public class EchoMage extends LevelerCard { public EchoMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.color.setBlue(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EchoTracer.java b/Mage.Sets/src/mage/cards/e/EchoTracer.java index ae79af8cfb..e030ec34fd 100644 --- a/Mage.Sets/src/mage/cards/e/EchoTracer.java +++ b/Mage.Sets/src/mage/cards/e/EchoTracer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -47,8 +48,8 @@ public class EchoTracer extends CardImpl { public EchoTracer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EddytrailHawk.java b/Mage.Sets/src/mage/cards/e/EddytrailHawk.java index 633b6a47fe..712f93c980 100644 --- a/Mage.Sets/src/mage/cards/e/EddytrailHawk.java +++ b/Mage.Sets/src/mage/cards/e/EddytrailHawk.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterAttackingCreature; import mage.filter.predicate.permanent.AnotherPredicate; @@ -59,7 +60,7 @@ public class EddytrailHawk extends CardImpl { public EddytrailHawk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EdgarMarkov.java b/Mage.Sets/src/mage/cards/e/EdgarMarkov.java index 0ea91ce095..40a6da44f2 100644 --- a/Mage.Sets/src/mage/cards/e/EdgarMarkov.java +++ b/Mage.Sets/src/mage/cards/e/EdgarMarkov.java @@ -69,8 +69,8 @@ public class EdgarMarkov extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{W}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vampire"); - this.subtype.add("Knight"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/EdgeOfTheDivinity.java b/Mage.Sets/src/mage/cards/e/EdgeOfTheDivinity.java index 3d86fecc3e..92c22a33b9 100644 --- a/Mage.Sets/src/mage/cards/e/EdgeOfTheDivinity.java +++ b/Mage.Sets/src/mage/cards/e/EdgeOfTheDivinity.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -52,7 +53,7 @@ public class EdgeOfTheDivinity extends CardImpl { public EdgeOfTheDivinity(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W/B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/e/Edgewalker.java b/Mage.Sets/src/mage/cards/e/Edgewalker.java index 1c1b3e106e..671b5c2517 100644 --- a/Mage.Sets/src/mage/cards/e/Edgewalker.java +++ b/Mage.Sets/src/mage/cards/e/Edgewalker.java @@ -53,8 +53,8 @@ public class Edgewalker extends CardImpl { public Edgewalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EdificeOfAuthority.java b/Mage.Sets/src/mage/cards/e/EdificeOfAuthority.java index 4d95815c71..f253371f7e 100644 --- a/Mage.Sets/src/mage/cards/e/EdificeOfAuthority.java +++ b/Mage.Sets/src/mage/cards/e/EdificeOfAuthority.java @@ -1,188 +1,188 @@ -/* - * 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.cards.e; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.condition.Condition; -import mage.abilities.condition.common.SourceHasCounterCondition; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalActivatedAbility; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.RestrictionEffect; -import mage.abilities.effects.common.combat.CantAttackTargetEffect; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.PhaseStep; -import mage.constants.Zone; -import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.game.turn.Step; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author jeffwadsworth - */ -public class EdificeOfAuthority extends CardImpl { - - private static final String rule = "{1}, {T}: Until your next turn, target creature can't attack or block and its activated abilities can't be activated. Activate this ability only if there are three or more brick counter on {this}."; - - public EdificeOfAuthority(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); - - // {1}, {T}: Target creature can't attack this turn. Put a brick counter on Edifice of Authority. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantAttackTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}")); - ability.addCost(new TapSourceCost()); - ability.addEffect(new AddCountersSourceEffect(CounterType.BRICK.createInstance())); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability); - - // {1}, {T}: Until your next turn, target creature can't attack or block and its activated abilities can't be activated. Activate this ability only if there are three or more brick counter on Edifice of Authority. - Condition condition = new SourceHasCounterCondition(CounterType.BRICK, 3, Integer.MAX_VALUE); - Ability ability2 = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new EdificeOfAuthorityEffect(), new ManaCostsImpl("{1}"), condition, rule); - ability2.addCost(new TapSourceCost()); - ability2.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability2); - - } - - public EdificeOfAuthority(final EdificeOfAuthority card) { - super(card); - } - - @Override - public EdificeOfAuthority copy() { - return new EdificeOfAuthority(this); - } -} - -class EdificeOfAuthorityEffect extends OneShotEffect { - - public EdificeOfAuthorityEffect() { - super(Outcome.LoseAbility); - } - - public EdificeOfAuthorityEffect(String ruleText) { - super(Outcome.LoseAbility); - staticText = ruleText; - } - - public EdificeOfAuthorityEffect(final EdificeOfAuthorityEffect effect) { - super(effect); - } - - @Override - public EdificeOfAuthorityEffect copy() { - return new EdificeOfAuthorityEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - EdificeOfAuthorityRestrictionEffect effect = new EdificeOfAuthorityRestrictionEffect(); - game.addEffect(effect, source); - return true; - } -} - -class EdificeOfAuthorityRestrictionEffect extends RestrictionEffect { - - public EdificeOfAuthorityRestrictionEffect() { - super(Duration.Custom); - staticText = ""; - } - - public EdificeOfAuthorityRestrictionEffect(final EdificeOfAuthorityRestrictionEffect effect) { - super(effect); - } - - @Override - public void init(Ability source, Game game) { - super.init(source, game); - for (UUID targetId : this.getTargetPointer().getTargets(game, source)) { - Permanent permanent = game.getPermanent(targetId); - if (permanent != null) { - permanent.addInfo("Can't attack or block and its activated abilities can't be activated." + getId(), "", game); - } - } - } - - @Override - public boolean isInactive(Ability source, Game game) { - if (game.getPhase().getStep().getType() == PhaseStep.UNTAP - && game.getStep().getStepPart() == Step.StepPart.PRE) { - if (game.getActivePlayerId().equals(source.getControllerId()) - || game.getPlayer(source.getControllerId()).hasReachedNextTurnAfterLeaving()) { - for (UUID targetId : this.getTargetPointer().getTargets(game, source)) { - Permanent permanent = game.getPermanent(targetId); - if (permanent != null) { - permanent.addInfo("Can't attack or block and its activated abilities can't be activated." + getId(), "", game); - } - } - return true; - } - } - return false; - } - - @Override - public boolean applies(Permanent permanent, Ability source, Game game) { - if (this.targetPointer.getTargets(game, source).contains(permanent.getId())) { - return true; - } - return false; - } - - @Override - public boolean canAttack(Game game) { - return false; - } - - @Override - public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { - return false; - } - - @Override - public boolean canUseActivatedAbilities(Permanent permanent, Ability source, Game game) { - return false; - } - - @Override - public EdificeOfAuthorityRestrictionEffect copy() { - return new EdificeOfAuthorityRestrictionEffect(this); - } - -} +/* + * 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.cards.e; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.SourceHasCounterCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.RestrictionEffect; +import mage.abilities.effects.common.combat.CantAttackTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.PhaseStep; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.turn.Step; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author jeffwadsworth + */ +public class EdificeOfAuthority extends CardImpl { + + private static final String rule = "{1}, {T}: Until your next turn, target creature can't attack or block and its activated abilities can't be activated. Activate this ability only if there are three or more brick counter on {this}."; + + public EdificeOfAuthority(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + // {1}, {T}: Target creature can't attack this turn. Put a brick counter on Edifice of Authority. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantAttackTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}")); + ability.addCost(new TapSourceCost()); + ability.addEffect(new AddCountersSourceEffect(CounterType.BRICK.createInstance())); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // {1}, {T}: Until your next turn, target creature can't attack or block and its activated abilities can't be activated. Activate this ability only if there are three or more brick counter on Edifice of Authority. + Condition condition = new SourceHasCounterCondition(CounterType.BRICK, 3, Integer.MAX_VALUE); + Ability ability2 = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new EdificeOfAuthorityEffect(), new ManaCostsImpl("{1}"), condition, rule); + ability2.addCost(new TapSourceCost()); + ability2.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability2); + + } + + public EdificeOfAuthority(final EdificeOfAuthority card) { + super(card); + } + + @Override + public EdificeOfAuthority copy() { + return new EdificeOfAuthority(this); + } +} + +class EdificeOfAuthorityEffect extends OneShotEffect { + + public EdificeOfAuthorityEffect() { + super(Outcome.LoseAbility); + } + + public EdificeOfAuthorityEffect(String ruleText) { + super(Outcome.LoseAbility); + staticText = ruleText; + } + + public EdificeOfAuthorityEffect(final EdificeOfAuthorityEffect effect) { + super(effect); + } + + @Override + public EdificeOfAuthorityEffect copy() { + return new EdificeOfAuthorityEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + EdificeOfAuthorityRestrictionEffect effect = new EdificeOfAuthorityRestrictionEffect(); + game.addEffect(effect, source); + return true; + } +} + +class EdificeOfAuthorityRestrictionEffect extends RestrictionEffect { + + public EdificeOfAuthorityRestrictionEffect() { + super(Duration.Custom); + staticText = ""; + } + + public EdificeOfAuthorityRestrictionEffect(final EdificeOfAuthorityRestrictionEffect effect) { + super(effect); + } + + @Override + public void init(Ability source, Game game) { + super.init(source, game); + for (UUID targetId : this.getTargetPointer().getTargets(game, source)) { + Permanent permanent = game.getPermanent(targetId); + if (permanent != null) { + permanent.addInfo("Can't attack or block and its activated abilities can't be activated." + getId(), "", game); + } + } + } + + @Override + public boolean isInactive(Ability source, Game game) { + if (game.getPhase().getStep().getType() == PhaseStep.UNTAP + && game.getStep().getStepPart() == Step.StepPart.PRE) { + if (game.getActivePlayerId().equals(source.getControllerId()) + || game.getPlayer(source.getControllerId()).hasReachedNextTurnAfterLeaving()) { + for (UUID targetId : this.getTargetPointer().getTargets(game, source)) { + Permanent permanent = game.getPermanent(targetId); + if (permanent != null) { + permanent.addInfo("Can't attack or block and its activated abilities can't be activated." + getId(), "", game); + } + } + return true; + } + } + return false; + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + if (this.targetPointer.getTargets(game, source).contains(permanent.getId())) { + return true; + } + return false; + } + + @Override + public boolean canAttack(Game game) { + return false; + } + + @Override + public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { + return false; + } + + @Override + public boolean canUseActivatedAbilities(Permanent permanent, Ability source, Game game) { + return false; + } + + @Override + public EdificeOfAuthorityRestrictionEffect copy() { + return new EdificeOfAuthorityRestrictionEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/e/EdricSpymasterOfTrest.java b/Mage.Sets/src/mage/cards/e/EdricSpymasterOfTrest.java index 7d2aa53ff6..405e28621b 100644 --- a/Mage.Sets/src/mage/cards/e/EdricSpymasterOfTrest.java +++ b/Mage.Sets/src/mage/cards/e/EdricSpymasterOfTrest.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DrawCardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.game.Game; @@ -51,8 +52,8 @@ public class EdricSpymasterOfTrest extends CardImpl { public EdricSpymasterOfTrest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EelUmbra.java b/Mage.Sets/src/mage/cards/e/EelUmbra.java index 597918926c..ade11aa4a5 100644 --- a/Mage.Sets/src/mage/cards/e/EelUmbra.java +++ b/Mage.Sets/src/mage/cards/e/EelUmbra.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TotemArmorAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class EelUmbra extends CardImpl { public EelUmbra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/e/EfreetWeaponmaster.java b/Mage.Sets/src/mage/cards/e/EfreetWeaponmaster.java index e228476fe5..8d005f6436 100644 --- a/Mage.Sets/src/mage/cards/e/EfreetWeaponmaster.java +++ b/Mage.Sets/src/mage/cards/e/EfreetWeaponmaster.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -55,8 +56,8 @@ public class EfreetWeaponmaster extends CardImpl { public EfreetWeaponmaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{R}{W}"); - this.subtype.add("Efreet"); - this.subtype.add("Monk"); + this.subtype.add(SubType.EFREET); + this.subtype.add(SubType.MONK); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EgoErasure.java b/Mage.Sets/src/mage/cards/e/EgoErasure.java index aea1f9b233..6dbb685411 100644 --- a/Mage.Sets/src/mage/cards/e/EgoErasure.java +++ b/Mage.Sets/src/mage/cards/e/EgoErasure.java @@ -50,7 +50,7 @@ public class EgoErasure extends CardImpl { public EgoErasure(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.INSTANT}, "{2}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); // Changeling this.addAbility(ChangelingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/e/EidolonOfBlossoms.java b/Mage.Sets/src/mage/cards/e/EidolonOfBlossoms.java index 02909b5855..36492575ca 100644 --- a/Mage.Sets/src/mage/cards/e/EidolonOfBlossoms.java +++ b/Mage.Sets/src/mage/cards/e/EidolonOfBlossoms.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class EidolonOfBlossoms extends CardImpl { public EidolonOfBlossoms(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EidolonOfCountlessBattles.java b/Mage.Sets/src/mage/cards/e/EidolonOfCountlessBattles.java index dd821cf1c7..199509d1d4 100644 --- a/Mage.Sets/src/mage/cards/e/EidolonOfCountlessBattles.java +++ b/Mage.Sets/src/mage/cards/e/EidolonOfCountlessBattles.java @@ -62,7 +62,7 @@ public class EidolonOfCountlessBattles extends CardImpl { public EidolonOfCountlessBattles(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/e/EidolonOfRhetoric.java b/Mage.Sets/src/mage/cards/e/EidolonOfRhetoric.java index 1feb781aec..07f562d7cf 100644 --- a/Mage.Sets/src/mage/cards/e/EidolonOfRhetoric.java +++ b/Mage.Sets/src/mage/cards/e/EidolonOfRhetoric.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.CantCastMoreThanOneSpellEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -45,7 +46,7 @@ public class EidolonOfRhetoric extends CardImpl { public EidolonOfRhetoric(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/EidolonOfTheGreatRevel.java b/Mage.Sets/src/mage/cards/e/EidolonOfTheGreatRevel.java index ebaa4404a8..24ec325217 100644 --- a/Mage.Sets/src/mage/cards/e/EidolonOfTheGreatRevel.java +++ b/Mage.Sets/src/mage/cards/e/EidolonOfTheGreatRevel.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -50,7 +51,7 @@ public class EidolonOfTheGreatRevel extends CardImpl { public EidolonOfTheGreatRevel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{R}{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EiganjoFreeRiders.java b/Mage.Sets/src/mage/cards/e/EiganjoFreeRiders.java index 99d5ca4901..071e97d0ef 100644 --- a/Mage.Sets/src/mage/cards/e/EiganjoFreeRiders.java +++ b/Mage.Sets/src/mage/cards/e/EiganjoFreeRiders.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -53,8 +54,8 @@ public class EiganjoFreeRiders extends CardImpl { public EiganjoFreeRiders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/EightAndAHalfTails.java b/Mage.Sets/src/mage/cards/e/EightAndAHalfTails.java index 02ebb4a271..123f2281ba 100644 --- a/Mage.Sets/src/mage/cards/e/EightAndAHalfTails.java +++ b/Mage.Sets/src/mage/cards/e/EightAndAHalfTails.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class EightAndAHalfTails extends CardImpl { public EightAndAHalfTails(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Fox"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.FOX); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EightfoldMaze.java b/Mage.Sets/src/mage/cards/e/EightfoldMaze.java new file mode 100644 index 0000000000..293c3b0792 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EightfoldMaze.java @@ -0,0 +1,73 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility; +import mage.abilities.condition.common.AttackedThisStepCondition; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.PhaseStep; +import mage.constants.TurnPhase; +import mage.target.common.TargetAttackingCreature; +import mage.watchers.common.PlayerAttackedStepWatcher; + +/** + * + * @author TheElk801 + */ +public class EightfoldMaze extends CardImpl { + + public EightfoldMaze(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}"); + + // Cast Eightfold Maze only during the declare attackers step and only if you've been attacked this step. + Ability ability = new CastOnlyDuringPhaseStepSourceAbility( + TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance, + "Cast {this} only during the declare attackers step and only if you've been attacked this step." + ); + ability.addWatcher(new PlayerAttackedStepWatcher()); + this.addAbility(ability); + + // Destroy target attacking creature. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetAttackingCreature()); + } + + public EightfoldMaze(final EightfoldMaze card) { + super(card); + } + + @Override + public EightfoldMaze copy() { + return new EightfoldMaze(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/EkunduGriffin.java b/Mage.Sets/src/mage/cards/e/EkunduGriffin.java index 56e7e1e36c..5b50995261 100644 --- a/Mage.Sets/src/mage/cards/e/EkunduGriffin.java +++ b/Mage.Sets/src/mage/cards/e/EkunduGriffin.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class EkunduGriffin extends CardImpl { public EkunduGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/ElHajjaj.java b/Mage.Sets/src/mage/cards/e/ElHajjaj.java index 6e7a394179..0647272486 100644 --- a/Mage.Sets/src/mage/cards/e/ElHajjaj.java +++ b/Mage.Sets/src/mage/cards/e/ElHajjaj.java @@ -33,6 +33,7 @@ import mage.abilities.common.DealsDamageGainLifeSourceTriggeredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class ElHajjaj extends CardImpl { public ElHajjaj(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElaborateFirecannon.java b/Mage.Sets/src/mage/cards/e/ElaborateFirecannon.java new file mode 100644 index 0000000000..ae2b2fc43d --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/ElaborateFirecannon.java @@ -0,0 +1,81 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.DontUntapInControllersUntapStepSourceEffect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LevelX2 + */ +public class ElaborateFirecannon extends CardImpl { + + public ElaborateFirecannon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + // Elaborate Firecannon doesn't untap during your untap step. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepSourceEffect())); + + // {4}, {T}: Elaborate Firecannon deals 2 damage to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl<>("{4}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + + // At the beginning of your upkeep, you may discard a card. If you do, untap Elaborate Firecannon. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DoIfCostPaid( + new UntapSourceEffect(), new DiscardCardCost()), TargetController.YOU, false)); + + } + + public ElaborateFirecannon(final ElaborateFirecannon card) { + super(card); + } + + @Override + public ElaborateFirecannon copy() { + return new ElaborateFirecannon(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/EladamriLordOfLeaves.java b/Mage.Sets/src/mage/cards/e/EladamriLordOfLeaves.java index bb60c43761..41c57529dd 100644 --- a/Mage.Sets/src/mage/cards/e/EladamriLordOfLeaves.java +++ b/Mage.Sets/src/mage/cards/e/EladamriLordOfLeaves.java @@ -57,8 +57,8 @@ public class EladamriLordOfLeaves extends CardImpl { public EladamriLordOfLeaves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/ElandUmbra.java b/Mage.Sets/src/mage/cards/e/ElandUmbra.java index 8c81282b81..774d16304b 100644 --- a/Mage.Sets/src/mage/cards/e/ElandUmbra.java +++ b/Mage.Sets/src/mage/cards/e/ElandUmbra.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TotemArmorAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class ElandUmbra extends CardImpl { public ElandUmbra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/e/ElbrusTheBindingBlade.java b/Mage.Sets/src/mage/cards/e/ElbrusTheBindingBlade.java index 1d74d1d59d..199f4a22ef 100644 --- a/Mage.Sets/src/mage/cards/e/ElbrusTheBindingBlade.java +++ b/Mage.Sets/src/mage/cards/e/ElbrusTheBindingBlade.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.w.WithengarUnbound; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class ElbrusTheBindingBlade extends CardImpl { public ElbrusTheBindingBlade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{7}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.transformable = true; this.secondSideCardClazz = WithengarUnbound.class; diff --git a/Mage.Sets/src/mage/cards/e/ElderCathar.java b/Mage.Sets/src/mage/cards/e/ElderCathar.java index 0fdc9523ea..078cfc0844 100644 --- a/Mage.Sets/src/mage/cards/e/ElderCathar.java +++ b/Mage.Sets/src/mage/cards/e/ElderCathar.java @@ -50,8 +50,8 @@ public class ElderCathar extends CardImpl { public ElderCathar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/ElderDeepFiend.java b/Mage.Sets/src/mage/cards/e/ElderDeepFiend.java index 0bdd0b562a..243dc3f42b 100644 --- a/Mage.Sets/src/mage/cards/e/ElderDeepFiend.java +++ b/Mage.Sets/src/mage/cards/e/ElderDeepFiend.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.target.TargetPermanent; @@ -49,8 +50,8 @@ public class ElderDeepFiend extends CardImpl { public ElderDeepFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{8}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Octopus"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.OCTOPUS); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/e/ElderDruid.java b/Mage.Sets/src/mage/cards/e/ElderDruid.java index 8704e3c8c6..37f56f64f9 100644 --- a/Mage.Sets/src/mage/cards/e/ElderDruid.java +++ b/Mage.Sets/src/mage/cards/e/ElderDruid.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.MayTapOrUntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; @@ -60,9 +61,9 @@ public class ElderDruid extends CardImpl { public ElderDruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Cleric"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/ElderLandWurm.java b/Mage.Sets/src/mage/cards/e/ElderLandWurm.java new file mode 100644 index 0000000000..7ce9c4ade3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/ElderLandWurm.java @@ -0,0 +1,74 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.effects.common.continuous.LoseAbilitySourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.DefenderAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; + +/** + * + * @author TheElk801 + */ +public class ElderLandWurm extends CardImpl { + + public ElderLandWurm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}{W}"); + + this.subtype.add(SubType.DRAGON); + this.subtype.add(SubType.WURM); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // When Elder Land Wurm blocks, it loses defender. + this.addAbility(new BlocksTriggeredAbility(new LoseAbilitySourceEffect(DefenderAbility.getInstance(), Duration.Custom), false, false, true)); + } + + public ElderLandWurm(final ElderLandWurm card) { + super(card); + } + + @Override + public ElderLandWurm copy() { + return new ElderLandWurm(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/ElderMastery.java b/Mage.Sets/src/mage/cards/e/ElderMastery.java index 5b5e8bb664..abba31ab50 100644 --- a/Mage.Sets/src/mage/cards/e/ElderMastery.java +++ b/Mage.Sets/src/mage/cards/e/ElderMastery.java @@ -51,7 +51,7 @@ public class ElderMastery extends CardImpl { public ElderMastery(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}{B}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/e/ElderOfLaurels.java b/Mage.Sets/src/mage/cards/e/ElderOfLaurels.java index 76f3442c90..bdbcb3d598 100644 --- a/Mage.Sets/src/mage/cards/e/ElderOfLaurels.java +++ b/Mage.Sets/src/mage/cards/e/ElderOfLaurels.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -49,8 +50,8 @@ public class ElderOfLaurels extends CardImpl { public ElderOfLaurels(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/ElderPineOfJukai.java b/Mage.Sets/src/mage/cards/e/ElderPineOfJukai.java index 5f70029e01..2333e8c52b 100644 --- a/Mage.Sets/src/mage/cards/e/ElderPineOfJukai.java +++ b/Mage.Sets/src/mage/cards/e/ElderPineOfJukai.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.filter.common.FilterLandCard; @@ -47,7 +48,7 @@ public class ElderPineOfJukai extends CardImpl { public ElderPineOfJukai(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElderscaleWurm.java b/Mage.Sets/src/mage/cards/e/ElderscaleWurm.java index 1a42e22354..54c2fe1b3b 100644 --- a/Mage.Sets/src/mage/cards/e/ElderscaleWurm.java +++ b/Mage.Sets/src/mage/cards/e/ElderscaleWurm.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class ElderscaleWurm extends CardImpl { public ElderscaleWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/e/ElderwoodScion.java b/Mage.Sets/src/mage/cards/e/ElderwoodScion.java index 87361e6c49..c85d61823b 100644 --- a/Mage.Sets/src/mage/cards/e/ElderwoodScion.java +++ b/Mage.Sets/src/mage/cards/e/ElderwoodScion.java @@ -51,8 +51,8 @@ import mage.util.CardUtil; public class ElderwoodScion extends CardImpl { public ElderwoodScion(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{W}"); - this.subtype.add("Elemental"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{W}"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -139,13 +139,13 @@ class ElderwoodScionCostReductionEffect2 extends CostModificationEffectImpl { @Override public boolean apply(Game game, Ability source, Ability abilityToModify) { SpellAbility spellAbility = (SpellAbility) abilityToModify; - CardUtil.adjustCost(spellAbility, -2); + CardUtil.increaseCost(spellAbility, 2); return true; } @Override public boolean applies(Ability abilityToModify, Ability source, Game game) { - if (abilityToModify instanceof SpellAbility) { + if (abilityToModify.getAbilityType() == AbilityType.ACTIVATED) { if (game.getOpponents(source.getControllerId()).contains(abilityToModify.getControllerId())) { for (Target target : abilityToModify.getTargets()) { for (UUID targetUUID : target.getTargets()) { diff --git a/Mage.Sets/src/mage/cards/e/EldraziAggressor.java b/Mage.Sets/src/mage/cards/e/EldraziAggressor.java index 7c4edd78a9..b275490b99 100644 --- a/Mage.Sets/src/mage/cards/e/EldraziAggressor.java +++ b/Mage.Sets/src/mage/cards/e/EldraziAggressor.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorlessPredicate; @@ -60,8 +61,8 @@ public class EldraziAggressor extends CardImpl { public EldraziAggressor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EldraziConscription.java b/Mage.Sets/src/mage/cards/e/EldraziConscription.java index 8d325c85cf..32099fe392 100644 --- a/Mage.Sets/src/mage/cards/e/EldraziConscription.java +++ b/Mage.Sets/src/mage/cards/e/EldraziConscription.java @@ -52,8 +52,8 @@ public class EldraziConscription extends CardImpl { public EldraziConscription (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.ENCHANTMENT},"{8}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Aura"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/e/EldraziDevastator.java b/Mage.Sets/src/mage/cards/e/EldraziDevastator.java index a1f6ed53ff..6d17b3678e 100644 --- a/Mage.Sets/src/mage/cards/e/EldraziDevastator.java +++ b/Mage.Sets/src/mage/cards/e/EldraziDevastator.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class EldraziDevastator extends CardImpl { public EldraziDevastator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{8}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(8); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/e/EldraziDisplacer.java b/Mage.Sets/src/mage/cards/e/EldraziDisplacer.java index 4bc25802a4..ceaa7cfbf9 100644 --- a/Mage.Sets/src/mage/cards/e/EldraziDisplacer.java +++ b/Mage.Sets/src/mage/cards/e/EldraziDisplacer.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -58,7 +59,7 @@ public class EldraziDisplacer extends CardImpl { public EldraziDisplacer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -70,7 +71,7 @@ public class EldraziDisplacer extends CardImpl { effect.setText("Exile another target creature"); effect.setApplyEffectsAfter(); // Needed to let temporary continuous effects end if a permanent is blinked Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{2}{C}")); - effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect(true, true); + effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect(true); effect.setText(", then return it to the battlefield tapped under its owner's control"); ability.addEffect(effect); ability.addTarget(new TargetCreaturePermanent(FILTER)); diff --git a/Mage.Sets/src/mage/cards/e/EldraziMimic.java b/Mage.Sets/src/mage/cards/e/EldraziMimic.java index a3089e1c04..4c4fef9ac9 100644 --- a/Mage.Sets/src/mage/cards/e/EldraziMimic.java +++ b/Mage.Sets/src/mage/cards/e/EldraziMimic.java @@ -60,7 +60,7 @@ public class EldraziMimic extends CardImpl { public EldraziMimic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EldraziObligator.java b/Mage.Sets/src/mage/cards/e/EldraziObligator.java index 973efb0c10..e3d9337d31 100644 --- a/Mage.Sets/src/mage/cards/e/EldraziObligator.java +++ b/Mage.Sets/src/mage/cards/e/EldraziObligator.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.target.Target; @@ -54,8 +55,8 @@ import mage.target.common.TargetCreaturePermanent; public class EldraziObligator extends CardImpl { public EldraziObligator(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Eldrazi"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(3); this.toughness = new MageInt(1); @@ -64,15 +65,15 @@ public class EldraziObligator extends CardImpl { // Haste this.addAbility(HasteAbility.getInstance()); - + DoIfCostPaid costPaidEffect = new DoIfCostPaid(new GainControlTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}{C}")); Effect untapEffect = new UntapTargetEffect(); - untapEffect.setText("Untap that creature"); + untapEffect.setText("untap that creature,"); Effect hasteEffect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn); - hasteEffect.setText("It gains haste until end of turn"); + hasteEffect.setText("and it gains haste until end of turn"); costPaidEffect.addEffect(untapEffect); - costPaidEffect.addEffect(hasteEffect); - + costPaidEffect.addEffect(hasteEffect); + // When you cast Eldrazi Obligator, you may pay {1}{C}. If you do, gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn. Ability ability = new CastSourceTriggeredAbility(costPaidEffect); diff --git a/Mage.Sets/src/mage/cards/e/EldraziSkyspawner.java b/Mage.Sets/src/mage/cards/e/EldraziSkyspawner.java index cd63ed4580..8901e49bd3 100644 --- a/Mage.Sets/src/mage/cards/e/EldraziSkyspawner.java +++ b/Mage.Sets/src/mage/cards/e/EldraziSkyspawner.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.EldraziScionToken; /** @@ -47,8 +48,8 @@ public class EldraziSkyspawner extends CardImpl { public EldraziSkyspawner(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElectricEel.java b/Mage.Sets/src/mage/cards/e/ElectricEel.java index 0e87a4e875..63cb2329fe 100644 --- a/Mage.Sets/src/mage/cards/e/ElectricEel.java +++ b/Mage.Sets/src/mage/cards/e/ElectricEel.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class ElectricEel extends CardImpl { public ElectricEel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Fish"); + this.subtype.add(SubType.FISH); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElectrostaticPummeler.java b/Mage.Sets/src/mage/cards/e/ElectrostaticPummeler.java index a116933a1f..5fd1511c4e 100644 --- a/Mage.Sets/src/mage/cards/e/ElectrostaticPummeler.java +++ b/Mage.Sets/src/mage/cards/e/ElectrostaticPummeler.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class ElectrostaticPummeler extends CardImpl { public ElectrostaticPummeler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElegantEdgecrafters.java b/Mage.Sets/src/mage/cards/e/ElegantEdgecrafters.java index c1cb4dfa77..f2114e5144 100644 --- a/Mage.Sets/src/mage/cards/e/ElegantEdgecrafters.java +++ b/Mage.Sets/src/mage/cards/e/ElegantEdgecrafters.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FabricateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; @@ -54,8 +55,8 @@ public class ElegantEdgecrafters extends CardImpl { public ElegantEdgecrafters(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/ElementalMastery.java b/Mage.Sets/src/mage/cards/e/ElementalMastery.java index 96139252b1..8d860f04e0 100644 --- a/Mage.Sets/src/mage/cards/e/ElementalMastery.java +++ b/Mage.Sets/src/mage/cards/e/ElementalMastery.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -57,7 +58,7 @@ public class ElementalMastery extends CardImpl { public ElementalMastery(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/e/ElementalResonance.java b/Mage.Sets/src/mage/cards/e/ElementalResonance.java new file mode 100644 index 0000000000..ff2cb56235 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/ElementalResonance.java @@ -0,0 +1,177 @@ +/* + * 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.cards.e; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.UUID; +import mage.Mana; +import mage.constants.SubType; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfPreCombatMainTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class ElementalResonance extends CardImpl { + + public ElementalResonance(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{G}"); + + this.subtype.add(SubType.AURA); + + // Enchant permanent + TargetPermanent auraTarget = new TargetPermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.PutManaInPool)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // At the beginning of your precombat main phase, add mana equal to enchanted permanent's mana cost to your mana pool. + this.addAbility(new BeginningOfPreCombatMainTriggeredAbility(new ElementalResonanceEffect(), TargetController.YOU, false)); + } + + public ElementalResonance(final ElementalResonance card) { + super(card); + } + + @Override + public ElementalResonance copy() { + return new ElementalResonance(this); + } +} + +class ElementalResonanceEffect extends OneShotEffect { + + ElementalResonanceEffect() { + super(Outcome.PutManaInPool); + this.staticText = "add mana equal to enchanted permanent's mana cost to your mana pool."; + } + + ElementalResonanceEffect(final ElementalResonanceEffect effect) { + super(effect); + } + + @Override + public ElementalResonanceEffect copy() { + return new ElementalResonanceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent thisPerm = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (thisPerm == null) { + return false; + } + Permanent permanent = game.getPermanentOrLKIBattlefield(thisPerm.getAttachedTo()); + if (permanent == null) { + return false; + } + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null) { + return false; + } + ArrayList manaOptions = new ArrayList<>(); +// TODO: Phyrexian mana gives multiple choices when there should only be one (e.g. Slash Panther is {4} or {4}{R}). + for (Mana mana : permanent.getManaCost().getOptions()) { + String manaString = mana.toString(); + if (!manaOptions.contains(manaString)) { + manaOptions.add(manaString); + } + } + String manaToAdd = ""; + if (manaOptions.size() > 1) { +// TODO: Make the choices look nicer, right now the brace notation is hard to visually parse, especially with Reaper King + Choice choice = new ChoiceImpl(); + choice.setMessage("Choose a mana combination"); + choice.getChoices().addAll(manaOptions); + while (!choice.isChosen()) { + controller.choose(Outcome.PutManaInPool, choice, game); + if (!controller.canRespond()) { + return false; + } + manaToAdd = choice.getChoice(); + } + } else if (manaOptions.size() == 1) { + manaToAdd = manaOptions.get(0); + } + if (!manaToAdd.equals("")) { + controller.getManaPool().addMana(getManaFromString(manaToAdd), game, source); + } + return true; + } + + private static Mana getManaFromString(String manaString) { + Mana out = new Mana(0, 0, 0, 0, 0, 0, 0, 0); + Integer generic = 0; + for (String str : Arrays.asList(manaString.replaceAll("[^-?0-9]+", " ").trim().split(" "))) { + if (!str.equals("")) { + generic += Integer.valueOf(str); + } + } + out.setColorless(generic); + for (char c : manaString.toCharArray()) { + switch (c) { + case 'W': + out.increaseWhite(); + break; + case 'U': + out.increaseBlue(); + break; + case 'B': + out.increaseBlack(); + break; + case 'R': + out.increaseRed(); + break; + case 'G': + out.increaseGreen(); + break; + case 'C': + out.increaseColorless(); + break; + } + } + return out; + } +} diff --git a/Mage.Sets/src/mage/cards/e/ElementalUprising.java b/Mage.Sets/src/mage/cards/e/ElementalUprising.java index 926f8ac93e..3b930cbf8e 100644 --- a/Mage.Sets/src/mage/cards/e/ElementalUprising.java +++ b/Mage.Sets/src/mage/cards/e/ElementalUprising.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterControlledLandPermanent; import mage.game.permanent.token.Token; @@ -74,7 +75,7 @@ class ElementalUprisingToken extends Token { super("", "4/4 Elemental creature with haste"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/ElephantGuide.java b/Mage.Sets/src/mage/cards/e/ElephantGuide.java index 13c09d0df0..6040076324 100644 --- a/Mage.Sets/src/mage/cards/e/ElephantGuide.java +++ b/Mage.Sets/src/mage/cards/e/ElephantGuide.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class ElephantGuide extends CardImpl { public ElephantGuide(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/e/ElephantResurgence.java b/Mage.Sets/src/mage/cards/e/ElephantResurgence.java new file mode 100644 index 0000000000..203780628f --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/ElephantResurgence.java @@ -0,0 +1,97 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.token.ElephantResurgenceToken; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public class ElephantResurgence extends CardImpl { + + public ElephantResurgence(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}"); + + // Each player creates a green Elephant creature token. Those creatures have "This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard." + this.getSpellAbility().addEffect(new ElephantResurgenceEffect()); + } + + public ElephantResurgence(final ElephantResurgence card) { + super(card); + } + + @Override + public ElephantResurgence copy() { + return new ElephantResurgence(this); + } +} + +class ElephantResurgenceEffect extends OneShotEffect { + + public ElephantResurgenceEffect() { + super(Outcome.Detriment); + this.staticText = "Each player creates a green Elephant creature token. Those creatures have " + + "\"This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard.\""; + } + + public ElephantResurgenceEffect(final ElephantResurgenceEffect effect) { + super(effect); + } + + @Override + public ElephantResurgenceEffect copy() { + return new ElephantResurgenceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Effect effect = new CreateTokenTargetEffect(new ElephantResurgenceToken(), 1); + effect.setTargetPointer(new FixedTarget(playerId)); + effect.apply(game, source); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/e/EleshNornGrandCenobite.java b/Mage.Sets/src/mage/cards/e/EleshNornGrandCenobite.java index 17ad84ef34..1858329b4c 100644 --- a/Mage.Sets/src/mage/cards/e/EleshNornGrandCenobite.java +++ b/Mage.Sets/src/mage/cards/e/EleshNornGrandCenobite.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class EleshNornGrandCenobite extends CardImpl { public EleshNornGrandCenobite (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Praetor"); + this.subtype.add(SubType.PRAETOR); this.power = new MageInt(4); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/e/ElfReplica.java b/Mage.Sets/src/mage/cards/e/ElfReplica.java index 2f2bca30ac..71252ac308 100644 --- a/Mage.Sets/src/mage/cards/e/ElfReplica.java +++ b/Mage.Sets/src/mage/cards/e/ElfReplica.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetEnchantmentPermanent; @@ -48,7 +49,7 @@ public class ElfReplica extends CardImpl { public ElfReplica(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(2); this.toughness = new MageInt(2); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{G}")); diff --git a/Mage.Sets/src/mage/cards/e/ElgaudInquisitor.java b/Mage.Sets/src/mage/cards/e/ElgaudInquisitor.java index 2e43a63c8e..f8f352d755 100644 --- a/Mage.Sets/src/mage/cards/e/ElgaudInquisitor.java +++ b/Mage.Sets/src/mage/cards/e/ElgaudInquisitor.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.SpiritWhiteToken; /** @@ -45,8 +46,8 @@ public class ElgaudInquisitor extends CardImpl { public ElgaudInquisitor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/ElgaudShieldmate.java b/Mage.Sets/src/mage/cards/e/ElgaudShieldmate.java index b7ab4757a1..630919f1e3 100644 --- a/Mage.Sets/src/mage/cards/e/ElgaudShieldmate.java +++ b/Mage.Sets/src/mage/cards/e/ElgaudShieldmate.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SoulbondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class ElgaudShieldmate extends CardImpl { public ElgaudShieldmate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EliteArcanist.java b/Mage.Sets/src/mage/cards/e/EliteArcanist.java index c3f3d5816e..adced54e58 100644 --- a/Mage.Sets/src/mage/cards/e/EliteArcanist.java +++ b/Mage.Sets/src/mage/cards/e/EliteArcanist.java @@ -40,6 +40,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -57,8 +58,8 @@ public class EliteArcanist extends CardImpl { public EliteArcanist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EliteArchers.java b/Mage.Sets/src/mage/cards/e/EliteArchers.java index c7fc0754b1..a8955441df 100644 --- a/Mage.Sets/src/mage/cards/e/EliteArchers.java +++ b/Mage.Sets/src/mage/cards/e/EliteArchers.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetAttackingOrBlockingCreature; @@ -47,9 +48,9 @@ public class EliteArchers extends CardImpl { public EliteArchers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EliteCatWarrior.java b/Mage.Sets/src/mage/cards/e/EliteCatWarrior.java index c373c2051d..bdc4762e87 100644 --- a/Mage.Sets/src/mage/cards/e/EliteCatWarrior.java +++ b/Mage.Sets/src/mage/cards/e/EliteCatWarrior.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class EliteCatWarrior extends CardImpl { public EliteCatWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Cat"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EliteInquisitor.java b/Mage.Sets/src/mage/cards/e/EliteInquisitor.java index 272005e60c..f631c169ec 100644 --- a/Mage.Sets/src/mage/cards/e/EliteInquisitor.java +++ b/Mage.Sets/src/mage/cards/e/EliteInquisitor.java @@ -57,8 +57,8 @@ public class EliteInquisitor extends CardImpl { public EliteInquisitor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EliteJavelineer.java b/Mage.Sets/src/mage/cards/e/EliteJavelineer.java index c7efab364e..1df30861c2 100644 --- a/Mage.Sets/src/mage/cards/e/EliteJavelineer.java +++ b/Mage.Sets/src/mage/cards/e/EliteJavelineer.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterAttackingCreature; import mage.target.common.TargetCreaturePermanent; @@ -46,8 +47,8 @@ public class EliteJavelineer extends CardImpl { public EliteJavelineer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EliteScaleguard.java b/Mage.Sets/src/mage/cards/e/EliteScaleguard.java index 4f267b0967..5204bd3b31 100644 --- a/Mage.Sets/src/mage/cards/e/EliteScaleguard.java +++ b/Mage.Sets/src/mage/cards/e/EliteScaleguard.java @@ -38,6 +38,7 @@ import mage.abilities.effects.keyword.BolsterEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreaturePermanent; @@ -60,8 +61,8 @@ public class EliteScaleguard extends CardImpl { public EliteScaleguard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EliteSkirmisher.java b/Mage.Sets/src/mage/cards/e/EliteSkirmisher.java index 82f7322b73..94ed1b806a 100644 --- a/Mage.Sets/src/mage/cards/e/EliteSkirmisher.java +++ b/Mage.Sets/src/mage/cards/e/EliteSkirmisher.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -45,8 +46,8 @@ public class EliteSkirmisher extends CardImpl { public EliteSkirmisher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EliteVanguard.java b/Mage.Sets/src/mage/cards/e/EliteVanguard.java index 3f61592ecc..4511f51fc4 100644 --- a/Mage.Sets/src/mage/cards/e/EliteVanguard.java +++ b/Mage.Sets/src/mage/cards/e/EliteVanguard.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class EliteVanguard extends CardImpl { public EliteVanguard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); } diff --git a/Mage.Sets/src/mage/cards/e/ElsewhereFlask.java b/Mage.Sets/src/mage/cards/e/ElsewhereFlask.java index 7baf0fba2c..7637054ca7 100644 --- a/Mage.Sets/src/mage/cards/e/ElsewhereFlask.java +++ b/Mage.Sets/src/mage/cards/e/ElsewhereFlask.java @@ -135,7 +135,7 @@ class ElsewhereFlaskContinuousEffect extends ContinuousEffectImpl { @Override public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { - String choice = (String) game.getState().getValue(source.getSourceId().toString() + "_ElsewhereFlask"); + SubType choice = SubType.byDescription((String) game.getState().getValue(source.getSourceId().toString() + "_ElsewhereFlask")); if (choice != null) { for (Iterator it = affectedObjectList.iterator(); it.hasNext();) { Permanent land = it.next().getPermanent(game); @@ -150,20 +150,20 @@ class ElsewhereFlaskContinuousEffect extends ContinuousEffectImpl { case AbilityAddingRemovingEffects_6: if (sublayer == SubLayer.NA) { land.getAbilities().clear(); - if (choice.equals("Forest")) { - land.addAbility(new GreenManaAbility(), id, game); + if (choice.equals(SubType.FOREST)) { + land.addAbility(new GreenManaAbility(), source.getSourceId(), game); } - if (choice.equals("Plains")) { - land.addAbility(new WhiteManaAbility(), id, game); + if (choice.equals(SubType.PLAINS)) { + land.addAbility(new WhiteManaAbility(), source.getSourceId(), game); } - if (choice.equals("Mountain")) { - land.addAbility(new RedManaAbility(), id, game); + if (choice.equals(SubType.MOUNTAIN)) { + land.addAbility(new RedManaAbility(), source.getSourceId(), game); } - if (choice.equals("Island")) { - land.addAbility(new BlueManaAbility(), id, game); + if (choice.equals(SubType.ISLAND)) { + land.addAbility(new BlueManaAbility(), source.getSourceId(), game); } - if (choice.equals("Swamp")) { - land.addAbility(new BlackManaAbility(), id, game); + if (choice.equals(SubType.SWAMP)) { + land.addAbility(new BlackManaAbility(), source.getSourceId(), game); } } break; diff --git a/Mage.Sets/src/mage/cards/e/ElspethKnightErrant.java b/Mage.Sets/src/mage/cards/e/ElspethKnightErrant.java index 3eb17f567d..fd12ee7237 100644 --- a/Mage.Sets/src/mage/cards/e/ElspethKnightErrant.java +++ b/Mage.Sets/src/mage/cards/e/ElspethKnightErrant.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.game.command.emblems.ElspethKnightErrantEmblem; @@ -56,7 +57,7 @@ public class ElspethKnightErrant extends CardImpl { public ElspethKnightErrant(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{W}{W}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elspeth"); + this.subtype.add(SubType.ELSPETH); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/e/ElspethSunsChampion.java b/Mage.Sets/src/mage/cards/e/ElspethSunsChampion.java index 1d0d3111c9..608b31517c 100644 --- a/Mage.Sets/src/mage/cards/e/ElspethSunsChampion.java +++ b/Mage.Sets/src/mage/cards/e/ElspethSunsChampion.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.GetEmblemEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.SuperType; import mage.filter.common.FilterCreaturePermanent; @@ -58,7 +59,7 @@ public class ElspethSunsChampion extends CardImpl { public ElspethSunsChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{W}{W}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elspeth"); + this.subtype.add(SubType.ELSPETH); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/e/ElspethTirel.java b/Mage.Sets/src/mage/cards/e/ElspethTirel.java index 8d7e539af1..a0f6e7cdc0 100644 --- a/Mage.Sets/src/mage/cards/e/ElspethTirel.java +++ b/Mage.Sets/src/mage/cards/e/ElspethTirel.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.filter.StaticFilters; @@ -54,7 +55,7 @@ public class ElspethTirel extends CardImpl { public ElspethTirel(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{W}{W}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elspeth"); + this.subtype.add(SubType.ELSPETH); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/e/ElusiveKrasis.java b/Mage.Sets/src/mage/cards/e/ElusiveKrasis.java index 3640401efa..1d96765888 100644 --- a/Mage.Sets/src/mage/cards/e/ElusiveKrasis.java +++ b/Mage.Sets/src/mage/cards/e/ElusiveKrasis.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.EvolveAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ElusiveKrasis extends CardImpl { public ElusiveKrasis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{U}"); - this.subtype.add("Fish"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.FISH); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/ElusiveSpellfist.java b/Mage.Sets/src/mage/cards/e/ElusiveSpellfist.java index 37e811382c..73af9b9fc1 100644 --- a/Mage.Sets/src/mage/cards/e/ElusiveSpellfist.java +++ b/Mage.Sets/src/mage/cards/e/ElusiveSpellfist.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -56,8 +57,8 @@ public class ElusiveSpellfist extends CardImpl { public ElusiveSpellfist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/ElusiveTormentor.java b/Mage.Sets/src/mage/cards/e/ElusiveTormentor.java index bb8c78061d..95969b03cd 100644 --- a/Mage.Sets/src/mage/cards/e/ElusiveTormentor.java +++ b/Mage.Sets/src/mage/cards/e/ElusiveTormentor.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.i.InsidiousMist; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -49,8 +50,8 @@ public class ElusiveTormentor extends CardImpl { public ElusiveTormentor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/ElvenPalisade.java b/Mage.Sets/src/mage/cards/e/ElvenPalisade.java new file mode 100644 index 0000000000..7bb8c7ea3e --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/ElvenPalisade.java @@ -0,0 +1,74 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetAttackingCreature; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author TheElk801 + */ +public class ElvenPalisade extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Forest"); + + static { + filter.add(new SubtypePredicate(SubType.FOREST)); + } + + public ElvenPalisade(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + + // Sacrifice a Forest: Target attacking creature gets -3/-0 until end of turn. + Ability ability = new SimpleActivatedAbility(new BoostTargetEffect(-3, 0, Duration.EndOfTurn), new SacrificeTargetCost(new TargetControlledPermanent(filter))); + ability.addTarget(new TargetAttackingCreature()); + this.addAbility(ability); + } + + public ElvenPalisade(final ElvenPalisade card) { + super(card); + } + + @Override + public ElvenPalisade copy() { + return new ElvenPalisade(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/ElvenRiders.java b/Mage.Sets/src/mage/cards/e/ElvenRiders.java index 53b7979a9b..ffeccbd783 100644 --- a/Mage.Sets/src/mage/cards/e/ElvenRiders.java +++ b/Mage.Sets/src/mage/cards/e/ElvenRiders.java @@ -56,7 +56,7 @@ public class ElvenRiders extends CardImpl { public ElvenRiders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/ElvenWarhounds.java b/Mage.Sets/src/mage/cards/e/ElvenWarhounds.java index 681c20b687..c23ade4897 100644 --- a/Mage.Sets/src/mage/cards/e/ElvenWarhounds.java +++ b/Mage.Sets/src/mage/cards/e/ElvenWarhounds.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.PutOnLibraryTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class ElvenWarhounds extends CardImpl { public ElvenWarhounds(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/ElvesOfDeepShadow.java b/Mage.Sets/src/mage/cards/e/ElvesOfDeepShadow.java index 8fb501f3c0..3fa2a25bf0 100644 --- a/Mage.Sets/src/mage/cards/e/ElvesOfDeepShadow.java +++ b/Mage.Sets/src/mage/cards/e/ElvesOfDeepShadow.java @@ -37,6 +37,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class ElvesOfDeepShadow extends CardImpl { public ElvesOfDeepShadow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElvishAberration.java b/Mage.Sets/src/mage/cards/e/ElvishAberration.java index c6fdc40ce9..7b14382e54 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishAberration.java +++ b/Mage.Sets/src/mage/cards/e/ElvishAberration.java @@ -37,6 +37,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class ElvishAberration extends CardImpl { public ElvishAberration(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/ElvishArchdruid.java b/Mage.Sets/src/mage/cards/e/ElvishArchdruid.java index 636a09c899..91ce20491f 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishArchdruid.java +++ b/Mage.Sets/src/mage/cards/e/ElvishArchdruid.java @@ -61,8 +61,8 @@ public class ElvishArchdruid extends CardImpl { public ElvishArchdruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/ElvishArchers.java b/Mage.Sets/src/mage/cards/e/ElvishArchers.java index f8c446ec42..115fd8c391 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishArchers.java +++ b/Mage.Sets/src/mage/cards/e/ElvishArchers.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class ElvishArchers extends CardImpl { public ElvishArchers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Archer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElvishBard.java b/Mage.Sets/src/mage/cards/e/ElvishBard.java index a50fa4c52b..762669bacb 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishBard.java +++ b/Mage.Sets/src/mage/cards/e/ElvishBard.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.MustBeBlockedByAllSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -44,8 +45,8 @@ public class ElvishBard extends CardImpl { public ElvishBard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/ElvishBerserker.java b/Mage.Sets/src/mage/cards/e/ElvishBerserker.java index 6e62ec3d4f..93333d5941 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishBerserker.java +++ b/Mage.Sets/src/mage/cards/e/ElvishBerserker.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,8 +47,8 @@ public class ElvishBerserker extends CardImpl { public ElvishBerserker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElvishBranchbender.java b/Mage.Sets/src/mage/cards/e/ElvishBranchbender.java index f1523b2743..1d590a0c0a 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishBranchbender.java +++ b/Mage.Sets/src/mage/cards/e/ElvishBranchbender.java @@ -59,8 +59,8 @@ public class ElvishBranchbender extends CardImpl { public ElvishBranchbender(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -117,7 +117,7 @@ class ElvishBranchbenderToken extends Token { ElvishBranchbenderToken(int xValue) { super("Treefolk", "X/X Treefolk creature in addition to its other types, where X is the number of Elves you control"); cardType.add(CardType.CREATURE); - subtype.add("Treefolk"); + subtype.add(SubType.TREEFOLK); power = new MageInt(xValue); toughness = new MageInt(xValue); } diff --git a/Mage.Sets/src/mage/cards/e/ElvishChampion.java b/Mage.Sets/src/mage/cards/e/ElvishChampion.java index ca9c862962..20829492d6 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishChampion.java +++ b/Mage.Sets/src/mage/cards/e/ElvishChampion.java @@ -55,7 +55,7 @@ public class ElvishChampion extends CardImpl { public ElvishChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/ElvishEulogist.java b/Mage.Sets/src/mage/cards/e/ElvishEulogist.java index 7a552d6c32..513b2e33ab 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishEulogist.java +++ b/Mage.Sets/src/mage/cards/e/ElvishEulogist.java @@ -55,8 +55,8 @@ public class ElvishEulogist extends CardImpl { public ElvishEulogist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElvishFarmer.java b/Mage.Sets/src/mage/cards/e/ElvishFarmer.java index a3956d71d4..a37aa65c7c 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishFarmer.java +++ b/Mage.Sets/src/mage/cards/e/ElvishFarmer.java @@ -62,7 +62,7 @@ public class ElvishFarmer extends CardImpl { public ElvishFarmer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/ElvishGuidance.java b/Mage.Sets/src/mage/cards/e/ElvishGuidance.java index f2bdc61488..bf70650d40 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishGuidance.java +++ b/Mage.Sets/src/mage/cards/e/ElvishGuidance.java @@ -56,7 +56,7 @@ public class ElvishGuidance extends CardImpl { public ElvishGuidance(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/e/ElvishHandservant.java b/Mage.Sets/src/mage/cards/e/ElvishHandservant.java index 8c0d0e0714..4d9b1d0bb1 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishHandservant.java +++ b/Mage.Sets/src/mage/cards/e/ElvishHandservant.java @@ -53,8 +53,8 @@ public class ElvishHandservant extends CardImpl { public ElvishHandservant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElvishHarbinger.java b/Mage.Sets/src/mage/cards/e/ElvishHarbinger.java index 567c39e866..0db2258160 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishHarbinger.java +++ b/Mage.Sets/src/mage/cards/e/ElvishHarbinger.java @@ -53,8 +53,8 @@ public class ElvishHarbinger extends CardImpl { } public ElvishHarbinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/ElvishHerder.java b/Mage.Sets/src/mage/cards/e/ElvishHerder.java index d1fb05a22e..cf5cd31f8f 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishHerder.java +++ b/Mage.Sets/src/mage/cards/e/ElvishHerder.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class ElvishHerder extends CardImpl { public ElvishHerder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElvishHexhunter.java b/Mage.Sets/src/mage/cards/e/ElvishHexhunter.java index 2c5d3fb67c..c635cbe92b 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishHexhunter.java +++ b/Mage.Sets/src/mage/cards/e/ElvishHexhunter.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetEnchantmentPermanent; @@ -49,8 +50,8 @@ public class ElvishHexhunter extends CardImpl { public ElvishHexhunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G/W}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElvishHunter.java b/Mage.Sets/src/mage/cards/e/ElvishHunter.java index 1aa71466f2..5e0db0786f 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishHunter.java +++ b/Mage.Sets/src/mage/cards/e/ElvishHunter.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEf import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class ElvishHunter extends CardImpl { public ElvishHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Archer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElvishLookout.java b/Mage.Sets/src/mage/cards/e/ElvishLookout.java index cacc277300..91e69b84b2 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishLookout.java +++ b/Mage.Sets/src/mage/cards/e/ElvishLookout.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class ElvishLookout extends CardImpl { public ElvishLookout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElvishLyrist.java b/Mage.Sets/src/mage/cards/e/ElvishLyrist.java index de899cf58b..f7b3e94ebf 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishLyrist.java +++ b/Mage.Sets/src/mage/cards/e/ElvishLyrist.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetEnchantmentPermanent; @@ -49,7 +50,7 @@ public class ElvishLyrist extends CardImpl { public ElvishLyrist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElvishMystic.java b/Mage.Sets/src/mage/cards/e/ElvishMystic.java index 80af000064..362fe046ad 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishMystic.java +++ b/Mage.Sets/src/mage/cards/e/ElvishMystic.java @@ -33,6 +33,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class ElvishMystic extends CardImpl { public ElvishMystic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElvishPathcutter.java b/Mage.Sets/src/mage/cards/e/ElvishPathcutter.java index 53bcd1d71a..b30e38984e 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishPathcutter.java +++ b/Mage.Sets/src/mage/cards/e/ElvishPathcutter.java @@ -58,8 +58,8 @@ public class ElvishPathcutter extends CardImpl { public ElvishPathcutter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/ElvishPioneer.java b/Mage.Sets/src/mage/cards/e/ElvishPioneer.java index 4f5309387d..8062bdbacf 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishPioneer.java +++ b/Mage.Sets/src/mage/cards/e/ElvishPioneer.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.PutLandFromHandOntoBattlefieldEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterLandCard; /** @@ -44,8 +45,8 @@ public class ElvishPioneer extends CardImpl { public ElvishPioneer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElvishPiper.java b/Mage.Sets/src/mage/cards/e/ElvishPiper.java index ec9c43522c..77b8a475ba 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishPiper.java +++ b/Mage.Sets/src/mage/cards/e/ElvishPiper.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.PutPermanentOnBattlefieldEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -48,8 +49,8 @@ public class ElvishPiper extends CardImpl { public ElvishPiper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElvishPromenade.java b/Mage.Sets/src/mage/cards/e/ElvishPromenade.java index 2a74fec55a..71784f46ab 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishPromenade.java +++ b/Mage.Sets/src/mage/cards/e/ElvishPromenade.java @@ -52,7 +52,7 @@ public class ElvishPromenade extends CardImpl { public ElvishPromenade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.SORCERY},"{3}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.getSpellAbility().addEffect(new CreateTokenEffect(new ElfToken(), new PermanentsOnBattlefieldCount(filter))); } diff --git a/Mage.Sets/src/mage/cards/e/ElvishRanger.java b/Mage.Sets/src/mage/cards/e/ElvishRanger.java index ee0f8ebd3b..28270f06a5 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishRanger.java +++ b/Mage.Sets/src/mage/cards/e/ElvishRanger.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class ElvishRanger extends CardImpl { public ElvishRanger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElvishScout.java b/Mage.Sets/src/mage/cards/e/ElvishScout.java index f824676095..3ea08780a6 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishScout.java +++ b/Mage.Sets/src/mage/cards/e/ElvishScout.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -60,8 +61,8 @@ public class ElvishScout extends CardImpl { public ElvishScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElvishScrapper.java b/Mage.Sets/src/mage/cards/e/ElvishScrapper.java index e67825173e..cbc4960fdc 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishScrapper.java +++ b/Mage.Sets/src/mage/cards/e/ElvishScrapper.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetArtifactPermanent; @@ -49,7 +50,7 @@ public class ElvishScrapper extends CardImpl { public ElvishScrapper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElvishSkysweeper.java b/Mage.Sets/src/mage/cards/e/ElvishSkysweeper.java index 896290642a..5b53518cf1 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishSkysweeper.java +++ b/Mage.Sets/src/mage/cards/e/ElvishSkysweeper.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -58,8 +59,8 @@ public class ElvishSkysweeper extends CardImpl { public ElvishSkysweeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElvishSoultiller.java b/Mage.Sets/src/mage/cards/e/ElvishSoultiller.java index 45a1d07897..8b20c146ba 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishSoultiller.java +++ b/Mage.Sets/src/mage/cards/e/ElvishSoultiller.java @@ -55,8 +55,8 @@ public class ElvishSoultiller extends CardImpl { public ElvishSoultiller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/ElvishSpiritGuide.java b/Mage.Sets/src/mage/cards/e/ElvishSpiritGuide.java index 2ebf989319..87d60dfd93 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishSpiritGuide.java +++ b/Mage.Sets/src/mage/cards/e/ElvishSpiritGuide.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.players.Player; @@ -50,8 +51,8 @@ public class ElvishSpiritGuide extends CardImpl { public ElvishSpiritGuide(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/ElvishVanguard.java b/Mage.Sets/src/mage/cards/e/ElvishVanguard.java index 1bcde16b5a..62787a4e71 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishVanguard.java +++ b/Mage.Sets/src/mage/cards/e/ElvishVanguard.java @@ -55,8 +55,8 @@ public class ElvishVanguard extends CardImpl { public ElvishVanguard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElvishVisionary.java b/Mage.Sets/src/mage/cards/e/ElvishVisionary.java index 75b287879f..38558c65f9 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishVisionary.java +++ b/Mage.Sets/src/mage/cards/e/ElvishVisionary.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class ElvishVisionary extends CardImpl { public ElvishVisionary (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ElvishWarrior.java b/Mage.Sets/src/mage/cards/e/ElvishWarrior.java index a5af034ae0..fb564189e1 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishWarrior.java +++ b/Mage.Sets/src/mage/cards/e/ElvishWarrior.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class ElvishWarrior extends CardImpl { public ElvishWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EmancipationAngel.java b/Mage.Sets/src/mage/cards/e/EmancipationAngel.java index c73a3738c5..0ea6e2d299 100644 --- a/Mage.Sets/src/mage/cards/e/EmancipationAngel.java +++ b/Mage.Sets/src/mage/cards/e/EmancipationAngel.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; /** @@ -45,7 +46,7 @@ public class EmancipationAngel extends CardImpl { public EmancipationAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EmbalmedBrawler.java b/Mage.Sets/src/mage/cards/e/EmbalmedBrawler.java index b4c0e2a79f..82ecfbd55f 100644 --- a/Mage.Sets/src/mage/cards/e/EmbalmedBrawler.java +++ b/Mage.Sets/src/mage/cards/e/EmbalmedBrawler.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.AmplifyAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -47,7 +48,7 @@ public class EmbalmedBrawler extends CardImpl { public EmbalmedBrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EmberBeast.java b/Mage.Sets/src/mage/cards/e/EmberBeast.java index 2c715082c8..7ce64e6462 100644 --- a/Mage.Sets/src/mage/cards/e/EmberBeast.java +++ b/Mage.Sets/src/mage/cards/e/EmberBeast.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.CantBlockAloneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class EmberBeast extends CardImpl { public EmberBeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/EmberEyeWolf.java b/Mage.Sets/src/mage/cards/e/EmberEyeWolf.java index e2d78156ad..532cb92909 100644 --- a/Mage.Sets/src/mage/cards/e/EmberEyeWolf.java +++ b/Mage.Sets/src/mage/cards/e/EmberEyeWolf.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class EmberEyeWolf extends CardImpl { public EmberEyeWolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EmberFistZubera.java b/Mage.Sets/src/mage/cards/e/EmberFistZubera.java index 46fe2ae8e5..7a2b729f38 100644 --- a/Mage.Sets/src/mage/cards/e/EmberFistZubera.java +++ b/Mage.Sets/src/mage/cards/e/EmberFistZubera.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; import mage.watchers.common.ZuberasDiedWatcher; @@ -48,8 +49,8 @@ public class EmberFistZubera extends CardImpl { public EmberFistZubera (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Zubera"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.ZUBERA); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EmberHauler.java b/Mage.Sets/src/mage/cards/e/EmberHauler.java index b5b4dc1a5f..4410a1638e 100644 --- a/Mage.Sets/src/mage/cards/e/EmberHauler.java +++ b/Mage.Sets/src/mage/cards/e/EmberHauler.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -49,7 +50,7 @@ public class EmberHauler extends CardImpl { public EmberHauler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EmberSwallower.java b/Mage.Sets/src/mage/cards/e/EmberSwallower.java index d745e468e7..1c618a54b6 100644 --- a/Mage.Sets/src/mage/cards/e/EmberSwallower.java +++ b/Mage.Sets/src/mage/cards/e/EmberSwallower.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MonstrosityAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledLandPermanent; /** @@ -45,7 +46,7 @@ public class EmberSwallower extends CardImpl { public EmberSwallower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/EmberWeaver.java b/Mage.Sets/src/mage/cards/e/EmberWeaver.java index b3c7145001..53a87e8980 100644 --- a/Mage.Sets/src/mage/cards/e/EmberWeaver.java +++ b/Mage.Sets/src/mage/cards/e/EmberWeaver.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -57,7 +58,7 @@ public class EmberWeaver extends CardImpl { public EmberWeaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EmberhornMinotaur.java b/Mage.Sets/src/mage/cards/e/EmberhornMinotaur.java index 2a16f49984..855609590c 100644 --- a/Mage.Sets/src/mage/cards/e/EmberhornMinotaur.java +++ b/Mage.Sets/src/mage/cards/e/EmberhornMinotaur.java @@ -1,75 +1,76 @@ -/* - * 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.cards.e; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.BecomesExertSourceTriggeredAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; -import mage.abilities.keyword.ExertAbility; -import mage.abilities.keyword.MenaceAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; - -/** - * - * @author Styxo - */ -public class EmberhornMinotaur extends CardImpl { - - public EmberhornMinotaur(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - - this.subtype.add("Minotaur"); - this.subtype.add("Warrior"); - this.power = new MageInt(4); - this.toughness = new MageInt(3); - - // You may exert Emberhorn Minotaur as it attacks. When you do, it gets +1/+1 and gains menace until end of turn. - Effect effect = new BoostSourceEffect(1, 1, Duration.EndOfTurn); - effect.setText("it gets +1/+1"); - BecomesExertSourceTriggeredAbility ability = new BecomesExertSourceTriggeredAbility(effect); - effect = new GainAbilitySourceEffect(new MenaceAbility(), Duration.EndOfTurn); - effect.setText("and gains menace until end of turn"); - ability.addEffect(effect); - this.addAbility(new ExertAbility(ability)); - } - - public EmberhornMinotaur(final EmberhornMinotaur card) { - super(card); - } - - @Override - public EmberhornMinotaur copy() { - return new EmberhornMinotaur(this); - } -} +/* + * 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.cards.e; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesExertSourceTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.ExertAbility; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; + +/** + * + * @author Styxo + */ +public class EmberhornMinotaur extends CardImpl { + + public EmberhornMinotaur(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // You may exert Emberhorn Minotaur as it attacks. When you do, it gets +1/+1 and gains menace until end of turn. + Effect effect = new BoostSourceEffect(1, 1, Duration.EndOfTurn); + effect.setText("it gets +1/+1"); + BecomesExertSourceTriggeredAbility ability = new BecomesExertSourceTriggeredAbility(effect); + effect = new GainAbilitySourceEffect(new MenaceAbility(), Duration.EndOfTurn); + effect.setText("and gains menace until end of turn"); + ability.addEffect(effect); + this.addAbility(new ExertAbility(ability)); + } + + public EmberhornMinotaur(final EmberhornMinotaur card) { + super(card); + } + + @Override + public EmberhornMinotaur copy() { + return new EmberhornMinotaur(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/EmbermageGoblin.java b/Mage.Sets/src/mage/cards/e/EmbermageGoblin.java index 9033b71b93..9e722e03ab 100644 --- a/Mage.Sets/src/mage/cards/e/EmbermageGoblin.java +++ b/Mage.Sets/src/mage/cards/e/EmbermageGoblin.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.NamePredicate; @@ -59,8 +60,8 @@ public class EmbermageGoblin extends CardImpl { public EmbermageGoblin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EmbermawHellion.java b/Mage.Sets/src/mage/cards/e/EmbermawHellion.java index beba51603f..641091b6fc 100644 --- a/Mage.Sets/src/mage/cards/e/EmbermawHellion.java +++ b/Mage.Sets/src/mage/cards/e/EmbermawHellion.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class EmbermawHellion extends CardImpl { public EmbermawHellion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Hellion"); + this.subtype.add(SubType.HELLION); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/Embersmith.java b/Mage.Sets/src/mage/cards/e/Embersmith.java index 1ef00d8913..5a6ec044ca 100644 --- a/Mage.Sets/src/mage/cards/e/Embersmith.java +++ b/Mage.Sets/src/mage/cards/e/Embersmith.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterArtifactSpell; import mage.game.Game; @@ -50,8 +51,8 @@ import mage.target.common.TargetCreatureOrPlayer; public class Embersmith extends CardImpl { public Embersmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EmberstrikeDuo.java b/Mage.Sets/src/mage/cards/e/EmberstrikeDuo.java index 1fd3d269b0..d0159d079d 100644 --- a/Mage.Sets/src/mage/cards/e/EmberstrikeDuo.java +++ b/Mage.Sets/src/mage/cards/e/EmberstrikeDuo.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,9 +58,9 @@ public class EmberstrikeDuo extends CardImpl { public EmberstrikeDuo(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B/R}"); - this.subtype.add("Elemental"); - this.subtype.add("Warrior"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EmberwildeAugur.java b/Mage.Sets/src/mage/cards/e/EmberwildeAugur.java index d8bb666f77..c41a158610 100644 --- a/Mage.Sets/src/mage/cards/e/EmberwildeAugur.java +++ b/Mage.Sets/src/mage/cards/e/EmberwildeAugur.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.PhaseStep; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -49,8 +50,8 @@ public class EmberwildeAugur extends CardImpl { public EmberwildeAugur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EmberwildeDjinn.java b/Mage.Sets/src/mage/cards/e/EmberwildeDjinn.java new file mode 100644 index 0000000000..1be4e804f1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EmberwildeDjinn.java @@ -0,0 +1,118 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.OrCost; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.game.Game; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public class EmberwildeDjinn extends CardImpl { + + public EmberwildeDjinn(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + + this.subtype.add(SubType.DJINN); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // At the beginning of each player's upkeep, that player may pay {R}{R} or 2 life. If he or she does, the player gains control of Emberwilde Djinn. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new EmberwildeDjinnEffect(), TargetController.ANY, false)); + } + + public EmberwildeDjinn(final EmberwildeDjinn card) { + super(card); + } + + @Override + public EmberwildeDjinn copy() { + return new EmberwildeDjinn(this); + } +} + +class EmberwildeDjinnEffect extends OneShotEffect { + + EmberwildeDjinnEffect() { + super(Outcome.Benefit); + this.staticText = "that player may pay {R}{R} or 2 life. If he or she does, the player gains control of {this}"; + } + + EmberwildeDjinnEffect(final EmberwildeDjinnEffect effect) { + super(effect); + } + + @Override + public EmberwildeDjinnEffect copy() { + return new EmberwildeDjinnEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(game.getActivePlayerId()); + MageObject sourceObject = source.getSourceObject(game); + if (player == null || sourceObject == null) { + return false; + } + Cost cost = new OrCost(new ManaCostsImpl("{R}{R}"), new PayLifeCost(2), "{R}{R} or 2 life"); + if (player.chooseUse(Outcome.GainControl, "Gain control of " + sourceObject.getLogName() + "?", source, game)) { + if (cost.pay(source, game, source.getSourceId(), player.getId(), false)) { + ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, false, player.getId()); + effect.setTargetPointer(new FixedTarget(source.getSourceId(), source.getSourceObjectZoneChangeCounter())); + game.addEffect(effect, source); + player.resetStoredBookmark(game); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/e/EmblemOfTheWarmind.java b/Mage.Sets/src/mage/cards/e/EmblemOfTheWarmind.java index a4ac56b7b8..4764b2e89c 100644 --- a/Mage.Sets/src/mage/cards/e/EmblemOfTheWarmind.java +++ b/Mage.Sets/src/mage/cards/e/EmblemOfTheWarmind.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class EmblemOfTheWarmind extends CardImpl { public EmblemOfTheWarmind(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature you control TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/e/EmbodimentOfFury.java b/Mage.Sets/src/mage/cards/e/EmbodimentOfFury.java index 37ad396db9..b058f3521c 100644 --- a/Mage.Sets/src/mage/cards/e/EmbodimentOfFury.java +++ b/Mage.Sets/src/mage/cards/e/EmbodimentOfFury.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -62,7 +63,7 @@ public class EmbodimentOfFury extends CardImpl { public EmbodimentOfFury(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(3); @@ -95,7 +96,7 @@ class EmbodimentOfFuryToken extends Token { super("", "3/3 Elemental creature with haste"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); this.addAbility(HasteAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/e/EmbodimentOfInsight.java b/Mage.Sets/src/mage/cards/e/EmbodimentOfInsight.java index 245b29e16d..28cba15533 100644 --- a/Mage.Sets/src/mage/cards/e/EmbodimentOfInsight.java +++ b/Mage.Sets/src/mage/cards/e/EmbodimentOfInsight.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -62,7 +63,7 @@ public class EmbodimentOfInsight extends CardImpl { public EmbodimentOfInsight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -95,7 +96,7 @@ class EmbodimentOfInsightToken extends Token { super("", "3/3 Elemental creature with haste"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); this.addAbility(HasteAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/e/EmbodimentOfSpring.java b/Mage.Sets/src/mage/cards/e/EmbodimentOfSpring.java index 5186e4b1f2..6c34b5fde2 100644 --- a/Mage.Sets/src/mage/cards/e/EmbodimentOfSpring.java +++ b/Mage.Sets/src/mage/cards/e/EmbodimentOfSpring.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; @@ -50,7 +51,7 @@ public class EmbodimentOfSpring extends CardImpl { public EmbodimentOfSpring(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/Embolden.java b/Mage.Sets/src/mage/cards/e/Embolden.java new file mode 100644 index 0000000000..be8ebffa0d --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/Embolden.java @@ -0,0 +1,67 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.PreventDamageToTargetMultiAmountEffect; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TimingRule; +import mage.target.common.TargetCreatureOrPlayerAmount; + +/** + * + * @author TheElk801 + */ +public class Embolden extends CardImpl { + + public Embolden(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}"); + + // Prevent the next 4 damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose. + this.getSpellAbility().addEffect(new PreventDamageToTargetMultiAmountEffect(Duration.EndOfTurn, 4)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(4)); + + // Flashback {1}{W} + this.addAbility(new FlashbackAbility(new ManaCostsImpl("{1}{W}"), TimingRule.INSTANT)); + + } + + public Embolden(final Embolden card) { + super(card); + } + + @Override + public Embolden copy() { + return new Embolden(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/EmbraalBruiser.java b/Mage.Sets/src/mage/cards/e/EmbraalBruiser.java index 701fb7872b..9904469165 100644 --- a/Mage.Sets/src/mage/cards/e/EmbraalBruiser.java +++ b/Mage.Sets/src/mage/cards/e/EmbraalBruiser.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -49,8 +50,8 @@ public class EmbraalBruiser extends CardImpl { public EmbraalBruiser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EmbraalGearSmasher.java b/Mage.Sets/src/mage/cards/e/EmbraalGearSmasher.java index 69eec96752..1c5eed278b 100644 --- a/Mage.Sets/src/mage/cards/e/EmbraalGearSmasher.java +++ b/Mage.Sets/src/mage/cards/e/EmbraalGearSmasher.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamagePlayersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; @@ -51,8 +52,8 @@ public class EmbraalGearSmasher extends CardImpl { public EmbraalGearSmasher(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EmeraldDragonfly.java b/Mage.Sets/src/mage/cards/e/EmeraldDragonfly.java index 8697d2f082..8491082c89 100644 --- a/Mage.Sets/src/mage/cards/e/EmeraldDragonfly.java +++ b/Mage.Sets/src/mage/cards/e/EmeraldDragonfly.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class EmeraldDragonfly extends CardImpl { public EmeraldDragonfly(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EmeraldOryx.java b/Mage.Sets/src/mage/cards/e/EmeraldOryx.java index a29a4c4a42..bbfdf8eca6 100644 --- a/Mage.Sets/src/mage/cards/e/EmeraldOryx.java +++ b/Mage.Sets/src/mage/cards/e/EmeraldOryx.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class EmeraldOryx extends CardImpl { public EmeraldOryx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Antelope"); + this.subtype.add(SubType.ANTELOPE); this.power = new MageInt(2); this.toughness = new MageInt(3); this.addAbility(new ForestwalkAbility()); diff --git a/Mage.Sets/src/mage/cards/e/EmergentGrowth.java b/Mage.Sets/src/mage/cards/e/EmergentGrowth.java new file mode 100644 index 0000000000..6ac84c334e --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EmergentGrowth.java @@ -0,0 +1,65 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.combat.MustBeBlockedByAtLeastOneTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class EmergentGrowth extends CardImpl { + + public EmergentGrowth(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}"); + + // Target creature gets +5/+5 until end of turn and must be blocked this turn if able. + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new BoostTargetEffect(5, 5, Duration.EndOfTurn)); + Effect effect = new MustBeBlockedByAtLeastOneTargetEffect(); + effect.setText("and must be blocked this turn if able"); + this.getSpellAbility().addEffect(effect); + } + + public EmergentGrowth(final EmergentGrowth card) { + super(card); + } + + @Override + public EmergentGrowth copy() { + return new EmergentGrowth(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/EmeriaAngel.java b/Mage.Sets/src/mage/cards/e/EmeriaAngel.java index a16b172932..d456e73d8f 100644 --- a/Mage.Sets/src/mage/cards/e/EmeriaAngel.java +++ b/Mage.Sets/src/mage/cards/e/EmeriaAngel.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.BirdToken; /** @@ -46,7 +47,7 @@ public class EmeriaAngel extends CardImpl { public EmeriaAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EmeriaShepherd.java b/Mage.Sets/src/mage/cards/e/EmeriaShepherd.java index c4d7d2c6e2..b0173b92a7 100644 --- a/Mage.Sets/src/mage/cards/e/EmeriaShepherd.java +++ b/Mage.Sets/src/mage/cards/e/EmeriaShepherd.java @@ -27,7 +27,6 @@ */ package mage.cards.e; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.LandfallAbility; @@ -38,6 +37,7 @@ import mage.cards.CardSetInfo; import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.Predicates; @@ -47,6 +47,8 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author LevelX2 @@ -61,7 +63,7 @@ public class EmeriaShepherd extends CardImpl { public EmeriaShepherd(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -108,7 +110,7 @@ class EmeriaShepherdReturnToHandTargetEffect extends OneShotEffect { return false; } Zone toZone = Zone.HAND; - if (triggeringLand.getSubtype(game).contains("Plains") + if (triggeringLand.hasSubtype(SubType.PLAINS, game) && controller.chooseUse(Outcome.PutCardInPlay, "Put the card to battlefield instead?", source, game)) { toZone = Zone.BATTLEFIELD; } diff --git a/Mage.Sets/src/mage/cards/e/EmissaryOfDespair.java b/Mage.Sets/src/mage/cards/e/EmissaryOfDespair.java index f8507db94f..fd3cfffdc7 100644 --- a/Mage.Sets/src/mage/cards/e/EmissaryOfDespair.java +++ b/Mage.Sets/src/mage/cards/e/EmissaryOfDespair.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterArtifactPermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.Game; @@ -50,7 +51,7 @@ public class EmissaryOfDespair extends CardImpl { public EmissaryOfDespair(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EmissaryOfHope.java b/Mage.Sets/src/mage/cards/e/EmissaryOfHope.java index 5e4319e2fd..4c191383e4 100644 --- a/Mage.Sets/src/mage/cards/e/EmissaryOfHope.java +++ b/Mage.Sets/src/mage/cards/e/EmissaryOfHope.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.filter.FilterPermanent; @@ -52,7 +53,7 @@ public class EmissaryOfHope extends CardImpl { public EmissaryOfHope(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EmissaryOfSunrise.java b/Mage.Sets/src/mage/cards/e/EmissaryOfSunrise.java new file mode 100644 index 0000000000..0587f17b36 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EmissaryOfSunrise.java @@ -0,0 +1,69 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.keyword.ExploreSourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class EmissaryOfSunrise extends CardImpl { + + public EmissaryOfSunrise(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // When Emissary of Sunrise enters the battlefield, it explores. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ExploreSourceEffect())); + } + + public EmissaryOfSunrise(final EmissaryOfSunrise card) { + super(card); + } + + @Override + public EmissaryOfSunrise copy() { + return new EmissaryOfSunrise(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/EmissaryOfTheSleepless.java b/Mage.Sets/src/mage/cards/e/EmissaryOfTheSleepless.java index 9a59d2b726..bfce46bf46 100644 --- a/Mage.Sets/src/mage/cards/e/EmissaryOfTheSleepless.java +++ b/Mage.Sets/src/mage/cards/e/EmissaryOfTheSleepless.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.SpiritWhiteToken; /** @@ -48,7 +49,7 @@ public class EmissaryOfTheSleepless extends CardImpl { public EmissaryOfTheSleepless(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/EmmaraTandris.java b/Mage.Sets/src/mage/cards/e/EmmaraTandris.java index 73e20a51b0..a56231eccf 100644 --- a/Mage.Sets/src/mage/cards/e/EmmaraTandris.java +++ b/Mage.Sets/src/mage/cards/e/EmmaraTandris.java @@ -55,8 +55,8 @@ public class EmmaraTandris extends CardImpl { public EmmaraTandris(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(5); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/e/EmperorCrocodile.java b/Mage.Sets/src/mage/cards/e/EmperorCrocodile.java index ea8ccec5f0..755d7173c5 100644 --- a/Mage.Sets/src/mage/cards/e/EmperorCrocodile.java +++ b/Mage.Sets/src/mage/cards/e/EmperorCrocodile.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -47,7 +48,7 @@ public class EmperorCrocodile extends CardImpl { public EmperorCrocodile(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Crocodile"); + this.subtype.add(SubType.CROCODILE); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/EmperorsVanguard.java b/Mage.Sets/src/mage/cards/e/EmperorsVanguard.java new file mode 100644 index 0000000000..1c606707cd --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EmperorsVanguard.java @@ -0,0 +1,65 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.keyword.ExploreSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author TheElk801 + */ +public class EmperorsVanguard extends CardImpl { + + public EmperorsVanguard(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Whenever Emperor's Vanguard deals combat damage to a player, it explores. + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new ExploreSourceEffect(), false)); + } + + public EmperorsVanguard(final EmperorsVanguard card) { + super(card); + } + + @Override + public EmperorsVanguard copy() { + return new EmperorsVanguard(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/EmpressGalina.java b/Mage.Sets/src/mage/cards/e/EmpressGalina.java index ce90362982..bc8521d990 100644 --- a/Mage.Sets/src/mage/cards/e/EmpressGalina.java +++ b/Mage.Sets/src/mage/cards/e/EmpressGalina.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class EmpressGalina extends CardImpl { public EmpressGalina(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EmptyShrineKannushi.java b/Mage.Sets/src/mage/cards/e/EmptyShrineKannushi.java index 5c76c4c55b..9183cd58a6 100644 --- a/Mage.Sets/src/mage/cards/e/EmptyShrineKannushi.java +++ b/Mage.Sets/src/mage/cards/e/EmptyShrineKannushi.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.FilterObject; @@ -55,8 +56,8 @@ public class EmptyShrineKannushi extends CardImpl { public EmptyShrineKannushi(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EmpyrealVoyager.java b/Mage.Sets/src/mage/cards/e/EmpyrealVoyager.java index 57b32d97e4..7105fb439e 100644 --- a/Mage.Sets/src/mage/cards/e/EmpyrealVoyager.java +++ b/Mage.Sets/src/mage/cards/e/EmpyrealVoyager.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -50,8 +51,8 @@ public class EmpyrealVoyager extends CardImpl { public EmpyrealVoyager(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Scout"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EmpyrialArchangel.java b/Mage.Sets/src/mage/cards/e/EmpyrialArchangel.java index 7af10b01af..133675ffb7 100644 --- a/Mage.Sets/src/mage/cards/e/EmpyrialArchangel.java +++ b/Mage.Sets/src/mage/cards/e/EmpyrialArchangel.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class EmpyrialArchangel extends CardImpl { public EmpyrialArchangel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{W}{W}{U}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(5); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/e/EmpyrialArmor.java b/Mage.Sets/src/mage/cards/e/EmpyrialArmor.java index 779d73330f..6aad6551e1 100644 --- a/Mage.Sets/src/mage/cards/e/EmpyrialArmor.java +++ b/Mage.Sets/src/mage/cards/e/EmpyrialArmor.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class EmpyrialArmor extends CardImpl { public EmpyrialArmor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/e/EmpyrialPlate.java b/Mage.Sets/src/mage/cards/e/EmpyrialPlate.java index ac2490ea33..123a1c01ed 100644 --- a/Mage.Sets/src/mage/cards/e/EmpyrialPlate.java +++ b/Mage.Sets/src/mage/cards/e/EmpyrialPlate.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class EmpyrialPlate extends CardImpl { public EmpyrialPlate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1 for each card in your hand. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new CardsInControllerHandCount(), new CardsInControllerHandCount()))); diff --git a/Mage.Sets/src/mage/cards/e/EmrakulTheAeonsTorn.java b/Mage.Sets/src/mage/cards/e/EmrakulTheAeonsTorn.java index cef0a02eb9..1b44456472 100644 --- a/Mage.Sets/src/mage/cards/e/EmrakulTheAeonsTorn.java +++ b/Mage.Sets/src/mage/cards/e/EmrakulTheAeonsTorn.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -59,7 +60,7 @@ public class EmrakulTheAeonsTorn extends CardImpl { public EmrakulTheAeonsTorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{15}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(15); this.toughness = new MageInt(15); diff --git a/Mage.Sets/src/mage/cards/e/EmrakulThePromisedEnd.java b/Mage.Sets/src/mage/cards/e/EmrakulThePromisedEnd.java index 26eb00305e..73095ab5fa 100644 --- a/Mage.Sets/src/mage/cards/e/EmrakulThePromisedEnd.java +++ b/Mage.Sets/src/mage/cards/e/EmrakulThePromisedEnd.java @@ -67,7 +67,7 @@ public class EmrakulThePromisedEnd extends CardImpl { public EmrakulThePromisedEnd(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{13}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(13); this.toughness = new MageInt(13); diff --git a/Mage.Sets/src/mage/cards/e/EmrakulsEvangel.java b/Mage.Sets/src/mage/cards/e/EmrakulsEvangel.java index 188532f936..9dce4aeb8f 100644 --- a/Mage.Sets/src/mage/cards/e/EmrakulsEvangel.java +++ b/Mage.Sets/src/mage/cards/e/EmrakulsEvangel.java @@ -60,8 +60,8 @@ public class EmrakulsEvangel extends CardImpl { public EmrakulsEvangel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EmrakulsHatcher.java b/Mage.Sets/src/mage/cards/e/EmrakulsHatcher.java index 2ee39bcb57..11577b7731 100644 --- a/Mage.Sets/src/mage/cards/e/EmrakulsHatcher.java +++ b/Mage.Sets/src/mage/cards/e/EmrakulsHatcher.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.EldraziSpawnToken; /** @@ -45,8 +46,8 @@ public class EmrakulsHatcher extends CardImpl { public EmrakulsHatcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EnatuGolem.java b/Mage.Sets/src/mage/cards/e/EnatuGolem.java index 6761da3a57..a287f475ac 100644 --- a/Mage.Sets/src/mage/cards/e/EnatuGolem.java +++ b/Mage.Sets/src/mage/cards/e/EnatuGolem.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class EnatuGolem extends CardImpl { public EnatuGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/EncampmentKeeper.java b/Mage.Sets/src/mage/cards/e/EncampmentKeeper.java new file mode 100644 index 0000000000..2ebda41ee6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EncampmentKeeper.java @@ -0,0 +1,77 @@ +/* + * 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.cards.e; + +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.BoostControlledEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class EncampmentKeeper extends CardImpl { + + public EncampmentKeeper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.HOUND); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // {7}{W}, Sacrifice Encampment Keeper: Creatures you control get +2/+2 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostControlledEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl("{7}{W}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public EncampmentKeeper(final EncampmentKeeper card) { + super(card); + } + + @Override + public EncampmentKeeper copy() { + return new EncampmentKeeper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/EncaseInIce.java b/Mage.Sets/src/mage/cards/e/EncaseInIce.java index 1cad5e1a46..23da8ddba0 100644 --- a/Mage.Sets/src/mage/cards/e/EncaseInIce.java +++ b/Mage.Sets/src/mage/cards/e/EncaseInIce.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -63,7 +64,7 @@ public class EncaseInIce extends CardImpl { public EncaseInIce(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/e/EnclaveCryptologist.java b/Mage.Sets/src/mage/cards/e/EnclaveCryptologist.java index 61aa5a81df..45261b032a 100644 --- a/Mage.Sets/src/mage/cards/e/EnclaveCryptologist.java +++ b/Mage.Sets/src/mage/cards/e/EnclaveCryptologist.java @@ -43,6 +43,7 @@ import mage.abilities.keyword.LevelerCardBuilder; import mage.cards.CardSetInfo; import mage.cards.LevelerCard; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -53,8 +54,8 @@ public class EnclaveCryptologist extends LevelerCard { public EnclaveCryptologist (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.color.setBlue(true); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EnclaveElite.java b/Mage.Sets/src/mage/cards/e/EnclaveElite.java index ba7737f281..7af0f09251 100644 --- a/Mage.Sets/src/mage/cards/e/EnclaveElite.java +++ b/Mage.Sets/src/mage/cards/e/EnclaveElite.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MultikickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -47,8 +48,8 @@ public class EnclaveElite extends CardImpl { public EnclaveElite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/Encrust.java b/Mage.Sets/src/mage/cards/e/Encrust.java index 0f722bfb97..29fa6048ea 100644 --- a/Mage.Sets/src/mage/cards/e/Encrust.java +++ b/Mage.Sets/src/mage/cards/e/Encrust.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -61,7 +62,7 @@ public class Encrust extends CardImpl { public Encrust(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant artifact or creature diff --git a/Mage.Sets/src/mage/cards/e/EndangeredArmodon.java b/Mage.Sets/src/mage/cards/e/EndangeredArmodon.java index 0153f93578..9dcbbe8489 100644 --- a/Mage.Sets/src/mage/cards/e/EndangeredArmodon.java +++ b/Mage.Sets/src/mage/cards/e/EndangeredArmodon.java @@ -33,6 +33,7 @@ import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ToughnessPredicate; @@ -53,7 +54,7 @@ public class EndangeredArmodon extends CardImpl { public EndangeredArmodon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/Endbringer.java b/Mage.Sets/src/mage/cards/e/Endbringer.java index c4290c2f7b..f80ab8c1c0 100644 --- a/Mage.Sets/src/mage/cards/e/Endbringer.java +++ b/Mage.Sets/src/mage/cards/e/Endbringer.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.continuous.UntapSourceDuringEachOtherPlayer import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -54,7 +55,7 @@ public class Endbringer extends CardImpl { public Endbringer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{C}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/EndlessCockroaches.java b/Mage.Sets/src/mage/cards/e/EndlessCockroaches.java index 6a77591b3d..c24c4b93a9 100644 --- a/Mage.Sets/src/mage/cards/e/EndlessCockroaches.java +++ b/Mage.Sets/src/mage/cards/e/EndlessCockroaches.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class EndlessCockroaches extends CardImpl { public EndlessCockroaches(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EndlessOne.java b/Mage.Sets/src/mage/cards/e/EndlessOne.java index 08f642c8ec..40086f05e1 100644 --- a/Mage.Sets/src/mage/cards/e/EndlessOne.java +++ b/Mage.Sets/src/mage/cards/e/EndlessOne.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -44,7 +45,7 @@ public class EndlessOne extends CardImpl { public EndlessOne(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{X}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/e/EndlessSands.java b/Mage.Sets/src/mage/cards/e/EndlessSands.java index aa9a644434..676f58b73d 100644 --- a/Mage.Sets/src/mage/cards/e/EndlessSands.java +++ b/Mage.Sets/src/mage/cards/e/EndlessSands.java @@ -12,6 +12,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -20,7 +21,7 @@ public class EndlessSands extends CardImpl { public EndlessSands(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Desert"); + this.subtype.add(SubType.DESERT); // {T}: Add {C} to your mana pool. this.addAbility(new ColorlessManaAbility()); diff --git a/Mage.Sets/src/mage/cards/e/EndlessScream.java b/Mage.Sets/src/mage/cards/e/EndlessScream.java index 0ed3b15c10..ffcd26a6ad 100644 --- a/Mage.Sets/src/mage/cards/e/EndlessScream.java +++ b/Mage.Sets/src/mage/cards/e/EndlessScream.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class EndlessScream extends CardImpl { public EndlessScream(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{X}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/e/EndlessWurm.java b/Mage.Sets/src/mage/cards/e/EndlessWurm.java index a0d082532c..6787f69e25 100644 --- a/Mage.Sets/src/mage/cards/e/EndlessWurm.java +++ b/Mage.Sets/src/mage/cards/e/EndlessWurm.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterControlledEnchantmentPermanent; import mage.filter.common.FilterControlledPermanent; @@ -52,7 +53,7 @@ public class EndlessWurm extends CardImpl { public EndlessWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(9); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/e/EndrekSahrMasterBreeder.java b/Mage.Sets/src/mage/cards/e/EndrekSahrMasterBreeder.java index 179df27379..931f6885b0 100644 --- a/Mage.Sets/src/mage/cards/e/EndrekSahrMasterBreeder.java +++ b/Mage.Sets/src/mage/cards/e/EndrekSahrMasterBreeder.java @@ -43,7 +43,6 @@ import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.permanent.token.ThrullToken; import mage.game.stack.Spell; -import mage.target.targetpointer.FixedTarget; /** * @author LevelX2 @@ -53,8 +52,8 @@ public class EndrekSahrMasterBreeder extends CardImpl { public EndrekSahrMasterBreeder(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -95,10 +94,7 @@ class EndrekSahrMasterBreederEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source)); - if (spell == null) { - spell = (Spell) game.getLastKnownInformation(((FixedTarget) getTargetPointer()).getTarget(), Zone.STACK); - } + Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source)); if (spell != null) { int cmc = spell.getConvertedManaCost(); if (cmc > 0) { diff --git a/Mage.Sets/src/mage/cards/e/EnduringScalelord.java b/Mage.Sets/src/mage/cards/e/EnduringScalelord.java index 5657a55a73..a591f0b15d 100644 --- a/Mage.Sets/src/mage/cards/e/EnduringScalelord.java +++ b/Mage.Sets/src/mage/cards/e/EnduringScalelord.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -49,7 +50,7 @@ public class EnduringScalelord extends CardImpl { public EnduringScalelord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{W}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/EnemyOfTheGuildpact.java b/Mage.Sets/src/mage/cards/e/EnemyOfTheGuildpact.java index b75a31424a..55d5e41da8 100644 --- a/Mage.Sets/src/mage/cards/e/EnemyOfTheGuildpact.java +++ b/Mage.Sets/src/mage/cards/e/EnemyOfTheGuildpact.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterObject; import mage.filter.predicate.mageobject.MulticoloredPredicate; @@ -50,7 +51,7 @@ public class EnemyOfTheGuildpact extends CardImpl { public EnemyOfTheGuildpact(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/Energizer.java b/Mage.Sets/src/mage/cards/e/Energizer.java index 6f9d759607..7da6d9ff8c 100644 --- a/Mage.Sets/src/mage/cards/e/Energizer.java +++ b/Mage.Sets/src/mage/cards/e/Energizer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -48,7 +49,7 @@ public class Energizer extends CardImpl { public Energizer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Juggernaut"); + this.subtype.add(SubType.JUGGERNAUT); this.power = new MageInt(2); this.toughness = new MageInt(2); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), new GenericManaCost(2)); diff --git a/Mage.Sets/src/mage/cards/e/EnergyArc.java b/Mage.Sets/src/mage/cards/e/EnergyArc.java new file mode 100644 index 0000000000..f3c4440db4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EnergyArc.java @@ -0,0 +1,67 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.PreventDamageByTargetEffect; +import mage.abilities.effects.common.PreventDamageToTargetEffect; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class EnergyArc extends CardImpl { + + public EnergyArc(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}{U}"); + + // Untap any number of target creatures. Prevent all combat damage that would be dealt to and dealt by those creatures this turn. + this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, Integer.MAX_VALUE)); + this.getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap any number of target creatures. ")); + this.getSpellAbility().addEffect(new PreventDamageByTargetEffect(Duration.EndOfTurn, true).setText("Prevent all combat damage that would be dealt to ")); + this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, true).setText("and dealt by those creatures this turn.")); + } + + public EnergyArc(final EnergyArc card) { + super(card); + } + + @Override + public EnergyArc copy() { + return new EnergyArc(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/EnergyBolt.java b/Mage.Sets/src/mage/cards/e/EnergyBolt.java new file mode 100644 index 0000000000..140d43836f --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EnergyBolt.java @@ -0,0 +1,66 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.GainLifeTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.TargetPlayer; + +/** + * + * @author TheElk801 + */ +public class EnergyBolt extends CardImpl { + + public EnergyBolt(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}{W}"); + + // Choose one - Energy Bolt deals X damage to target player; or target player gains X life. + this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); + this.getSpellAbility().addTarget(new TargetPlayer()); + Mode mode = new Mode(); + mode.getEffects().add(new GainLifeTargetEffect(new ManacostVariableValue())); + mode.getTargets().add(new TargetPlayer()); + this.getSpellAbility().addMode(mode); + } + + public EnergyBolt(final EnergyBolt card) { + super(card); + } + + @Override + public EnergyBolt copy() { + return new EnergyBolt(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/EnergyStorm.java b/Mage.Sets/src/mage/cards/e/EnergyStorm.java new file mode 100644 index 0000000000..3bf51c4a3f --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EnergyStorm.java @@ -0,0 +1,82 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect; +import mage.abilities.effects.common.PreventAllDamageByAllObjectsEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author TheElk801 + */ +public class EnergyStorm extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with flying"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public EnergyStorm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + + // Cumulative upkeep {1} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{1}"))); + + // Prevent all damage that would be dealt by instant and sorcery spells. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new PreventAllDamageByAllObjectsEffect(StaticFilters.FILTER_INSTANT_OR_SORCERY_SPELLS, Duration.WhileOnBattlefield, false) + )); + + // Creatures with flying don't untap during their controllers' untap steps. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter))); + } + + public EnergyStorm(final EnergyStorm card) { + super(card); + } + + @Override + public EnergyStorm copy() { + return new EnergyStorm(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/EnergyTap.java b/Mage.Sets/src/mage/cards/e/EnergyTap.java index 2eab464759..3012505d16 100644 --- a/Mage.Sets/src/mage/cards/e/EnergyTap.java +++ b/Mage.Sets/src/mage/cards/e/EnergyTap.java @@ -56,9 +56,9 @@ public class EnergyTap extends CardImpl { } public EnergyTap(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{U}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{U}"); - // Tap target untapped creature you control. If you do, add X mana of {C} to your mana pool, where X is that creature's converted mana cost. + // Tap target untapped creature you control. If you do, add an amount of {C} to your mana pool equal to that creature's converted mana cost. this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(filter)); this.getSpellAbility().addEffect(new EnergyTapEffect()); } @@ -77,7 +77,7 @@ class EnergyTapEffect extends OneShotEffect { EnergyTapEffect() { super(Outcome.PutManaInPool); - this.staticText = "Tap target untapped creature you control. If you do, add X mana of {C} to your mana pool, where X is that creature's converted mana cost"; + this.staticText = "Tap target untapped creature you control. If you do, add an amount of {C} to your mana pool equal to that creature's converted mana cost"; } EnergyTapEffect(final EnergyTapEffect effect) { @@ -106,4 +106,4 @@ class EnergyTapEffect extends OneShotEffect { } return applied; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/e/Enfeeblement.java b/Mage.Sets/src/mage/cards/e/Enfeeblement.java index 2a5a56ee10..8c58beebbb 100644 --- a/Mage.Sets/src/mage/cards/e/Enfeeblement.java +++ b/Mage.Sets/src/mage/cards/e/Enfeeblement.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class Enfeeblement extends CardImpl { public Enfeeblement(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/cards/e/EngulfingSlagwurm.java b/Mage.Sets/src/mage/cards/e/EngulfingSlagwurm.java index 2b030ae2ab..a725aafbc2 100644 --- a/Mage.Sets/src/mage/cards/e/EngulfingSlagwurm.java +++ b/Mage.Sets/src/mage/cards/e/EngulfingSlagwurm.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -49,7 +50,7 @@ public class EngulfingSlagwurm extends CardImpl { public EngulfingSlagwurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/e/EnigmaDrake.java b/Mage.Sets/src/mage/cards/e/EnigmaDrake.java index c7e403ef48..f436a325a7 100644 --- a/Mage.Sets/src/mage/cards/e/EnigmaDrake.java +++ b/Mage.Sets/src/mage/cards/e/EnigmaDrake.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterInstantOrSorceryCard; @@ -48,7 +49,7 @@ public class EnigmaDrake extends CardImpl { public EnigmaDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{R}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/EnigmaEidolon.java b/Mage.Sets/src/mage/cards/e/EnigmaEidolon.java index 5d0b14f2e1..4a452e0f11 100644 --- a/Mage.Sets/src/mage/cards/e/EnigmaEidolon.java +++ b/Mage.Sets/src/mage/cards/e/EnigmaEidolon.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.MulticoloredPredicate; @@ -58,7 +59,7 @@ public class EnigmaEidolon extends CardImpl { public EnigmaEidolon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EnigmaSphinx.java b/Mage.Sets/src/mage/cards/e/EnigmaSphinx.java index 01e1569261..ddfda7377a 100644 --- a/Mage.Sets/src/mage/cards/e/EnigmaSphinx.java +++ b/Mage.Sets/src/mage/cards/e/EnigmaSphinx.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -57,7 +58,7 @@ public class EnigmaSphinx extends CardImpl { public EnigmaSphinx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{W}{U}{B}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/EnlightenedAscetic.java b/Mage.Sets/src/mage/cards/e/EnlightenedAscetic.java index 482932feec..19046682ce 100644 --- a/Mage.Sets/src/mage/cards/e/EnlightenedAscetic.java +++ b/Mage.Sets/src/mage/cards/e/EnlightenedAscetic.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetEnchantmentPermanent; /** @@ -45,8 +46,8 @@ public class EnlightenedAscetic extends CardImpl { public EnlightenedAscetic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Monk"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.MONK); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EnlightenedManiac.java b/Mage.Sets/src/mage/cards/e/EnlightenedManiac.java index 6b3db45e71..6a48f2964b 100644 --- a/Mage.Sets/src/mage/cards/e/EnlightenedManiac.java +++ b/Mage.Sets/src/mage/cards/e/EnlightenedManiac.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.EldraziHorrorToken; /** @@ -44,7 +45,7 @@ public class EnlightenedManiac extends CardImpl { public EnlightenedManiac(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EnlistedWurm.java b/Mage.Sets/src/mage/cards/e/EnlistedWurm.java index 107552e08f..af0cc55c5d 100644 --- a/Mage.Sets/src/mage/cards/e/EnlistedWurm.java +++ b/Mage.Sets/src/mage/cards/e/EnlistedWurm.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.CascadeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class EnlistedWurm extends CardImpl { public EnlistedWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{W}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/EnlistmentOfficer.java b/Mage.Sets/src/mage/cards/e/EnlistmentOfficer.java index d9ba7158c5..4c4c60b433 100644 --- a/Mage.Sets/src/mage/cards/e/EnlistmentOfficer.java +++ b/Mage.Sets/src/mage/cards/e/EnlistmentOfficer.java @@ -54,8 +54,8 @@ public class EnlistmentOfficer extends CardImpl { public EnlistmentOfficer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EnormousBaloth.java b/Mage.Sets/src/mage/cards/e/EnormousBaloth.java index 0ff6392ab0..162c0ea152 100644 --- a/Mage.Sets/src/mage/cards/e/EnormousBaloth.java +++ b/Mage.Sets/src/mage/cards/e/EnormousBaloth.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class EnormousBaloth extends CardImpl { public EnormousBaloth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/e/EnragedGiant.java b/Mage.Sets/src/mage/cards/e/EnragedGiant.java index 578a526022..b18eee8110 100644 --- a/Mage.Sets/src/mage/cards/e/EnragedGiant.java +++ b/Mage.Sets/src/mage/cards/e/EnragedGiant.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class EnragedGiant extends CardImpl { public EnragedGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/EnragedRevolutionary.java b/Mage.Sets/src/mage/cards/e/EnragedRevolutionary.java index 09509bca2b..ed9b41c4f8 100644 --- a/Mage.Sets/src/mage/cards/e/EnragedRevolutionary.java +++ b/Mage.Sets/src/mage/cards/e/EnragedRevolutionary.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DethroneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class EnragedRevolutionary extends CardImpl { public EnragedRevolutionary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EnragingLicid.java b/Mage.Sets/src/mage/cards/e/EnragingLicid.java index 34122ded59..145460a3ff 100644 --- a/Mage.Sets/src/mage/cards/e/EnragingLicid.java +++ b/Mage.Sets/src/mage/cards/e/EnragingLicid.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class EnragingLicid extends CardImpl { public EnragingLicid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Licid"); + this.subtype.add(SubType.LICID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/Enslave.java b/Mage.Sets/src/mage/cards/e/Enslave.java index f16a66a34d..fc002a1b38 100644 --- a/Mage.Sets/src/mage/cards/e/Enslave.java +++ b/Mage.Sets/src/mage/cards/e/Enslave.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class Enslave extends CardImpl { public Enslave(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{B}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/e/EnslavedDwarf.java b/Mage.Sets/src/mage/cards/e/EnslavedDwarf.java index 8a7ade4c88..4b5ea5257c 100644 --- a/Mage.Sets/src/mage/cards/e/EnslavedDwarf.java +++ b/Mage.Sets/src/mage/cards/e/EnslavedDwarf.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -61,7 +62,7 @@ public class EnslavedDwarf extends CardImpl { public EnslavedDwarf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Dwarf"); + this.subtype.add(SubType.DWARF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EnslavedScout.java b/Mage.Sets/src/mage/cards/e/EnslavedScout.java index b82bcf07cb..36d4f8bdbf 100644 --- a/Mage.Sets/src/mage/cards/e/EnslavedScout.java +++ b/Mage.Sets/src/mage/cards/e/EnslavedScout.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class EnslavedScout extends CardImpl { public EnslavedScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Scout"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EnsnaringBridge.java b/Mage.Sets/src/mage/cards/e/EnsnaringBridge.java index ba74af82a2..d0d676f67f 100644 --- a/Mage.Sets/src/mage/cards/e/EnsnaringBridge.java +++ b/Mage.Sets/src/mage/cards/e/EnsnaringBridge.java @@ -47,7 +47,7 @@ import mage.players.Player; public class EnsnaringBridge extends CardImpl { public EnsnaringBridge(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); // Creatures with power greater than the number of cards in your hand can't attack. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new EnsnaringBridgeRestrictionEffect())); @@ -63,7 +63,6 @@ public class EnsnaringBridge extends CardImpl { } } - class EnsnaringBridgeRestrictionEffect extends RestrictionEffect { public EnsnaringBridgeRestrictionEffect() { @@ -78,10 +77,11 @@ class EnsnaringBridgeRestrictionEffect extends RestrictionEffect { @Override public boolean applies(Permanent permanent, Ability source, Game game) { Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - return permanent.getPower().getValue() > controller.getHand().size(); + if (controller == null) { + return false; } - return false; + return controller.getInRange().contains(permanent.getControllerId()) + && permanent.getPower().getValue() > controller.getHand().size(); } @Override diff --git a/Mage.Sets/src/mage/cards/e/EnsoulArtifact.java b/Mage.Sets/src/mage/cards/e/EnsoulArtifact.java index fecaabd681..c123e75752 100644 --- a/Mage.Sets/src/mage/cards/e/EnsoulArtifact.java +++ b/Mage.Sets/src/mage/cards/e/EnsoulArtifact.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class EnsoulArtifact extends CardImpl { public EnsoulArtifact(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant artifact diff --git a/Mage.Sets/src/mage/cards/e/EnsouledScimitar.java b/Mage.Sets/src/mage/cards/e/EnsouledScimitar.java index 53c4bd6817..c7f62de116 100644 --- a/Mage.Sets/src/mage/cards/e/EnsouledScimitar.java +++ b/Mage.Sets/src/mage/cards/e/EnsouledScimitar.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class EnsouledScimitar extends CardImpl { public EnsouledScimitar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // {3}: Ensouled Scimitar becomes a 1/5 Spirit artifact creature with flying until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new EnsouledScimitarToken(), "", Duration.EndOfTurn), new ManaCostsImpl("{3}"))); @@ -78,7 +79,7 @@ class EnsouledScimitarToken extends Token { super("Pincher", "1/5 Spirit artifact creature with flying"); setOriginalExpansionSetCode("5ND"); cardType.add(CardType.CREATURE); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); power = new MageInt(1); toughness = new MageInt(5); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/e/Entangler.java b/Mage.Sets/src/mage/cards/e/Entangler.java index f57c09e1f4..3ec1b2578b 100644 --- a/Mage.Sets/src/mage/cards/e/Entangler.java +++ b/Mage.Sets/src/mage/cards/e/Entangler.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class Entangler extends CardImpl { public Entangler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/e/EntanglingVines.java b/Mage.Sets/src/mage/cards/e/EntanglingVines.java index b3fbe2a7b5..3d92bf40ca 100644 --- a/Mage.Sets/src/mage/cards/e/EntanglingVines.java +++ b/Mage.Sets/src/mage/cards/e/EntanglingVines.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -56,7 +57,7 @@ public class EntanglingVines extends CardImpl { public EntanglingVines(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant tapped creature diff --git a/Mage.Sets/src/mage/cards/e/EnthrallingVictor.java b/Mage.Sets/src/mage/cards/e/EnthrallingVictor.java index 184aa508d9..c3225600ec 100644 --- a/Mage.Sets/src/mage/cards/e/EnthrallingVictor.java +++ b/Mage.Sets/src/mage/cards/e/EnthrallingVictor.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.TargetController; @@ -63,8 +64,8 @@ public class EnthrallingVictor extends CardImpl { public EnthrallingVictor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EntomberExarch.java b/Mage.Sets/src/mage/cards/e/EntomberExarch.java index b7f5b2af5d..13d6ff963c 100644 --- a/Mage.Sets/src/mage/cards/e/EntomberExarch.java +++ b/Mage.Sets/src/mage/cards/e/EntomberExarch.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -58,7 +59,7 @@ public class EntomberExarch extends CardImpl { public EntomberExarch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EntourageOfTrest.java b/Mage.Sets/src/mage/cards/e/EntourageOfTrest.java index daa2b4872c..1f9c5b415f 100644 --- a/Mage.Sets/src/mage/cards/e/EntourageOfTrest.java +++ b/Mage.Sets/src/mage/cards/e/EntourageOfTrest.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.combat.CanBlockAdditionalCreatureEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -49,8 +50,8 @@ public class EntourageOfTrest extends CardImpl { public EntourageOfTrest(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/EntrancingMelody.java b/Mage.Sets/src/mage/cards/e/EntrancingMelody.java new file mode 100644 index 0000000000..04eed25ce3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EntrancingMelody.java @@ -0,0 +1,77 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Duration; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.game.Game; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class EntrancingMelody extends CardImpl { + + public EntrancingMelody(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{U}{U}"); + + // Gain control of target creature with converted mana cost X. + this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.Custom, true)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature with converted mana cost X"))); + } + + public EntrancingMelody(final EntrancingMelody card) { + super(card); + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability instanceof SpellAbility) { + ability.getTargets().clear(); + int xValue = ability.getManaCostsToPay().getX(); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost X"); + filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, xValue)); + ability.addTarget(new TargetCreaturePermanent(filter)); + } + } + + @Override + public EntrancingMelody copy() { + return new EntrancingMelody(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/EntropicEidolon.java b/Mage.Sets/src/mage/cards/e/EntropicEidolon.java index 4a62d59350..519fb197f8 100644 --- a/Mage.Sets/src/mage/cards/e/EntropicEidolon.java +++ b/Mage.Sets/src/mage/cards/e/EntropicEidolon.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.MulticoloredPredicate; @@ -60,7 +61,7 @@ public class EntropicEidolon extends CardImpl { public EntropicEidolon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EntropicSpecter.java b/Mage.Sets/src/mage/cards/e/EntropicSpecter.java index 8213ca0826..eb0cb15d73 100644 --- a/Mage.Sets/src/mage/cards/e/EntropicSpecter.java +++ b/Mage.Sets/src/mage/cards/e/EntropicSpecter.java @@ -52,9 +52,9 @@ import mage.players.Player; public class EntropicSpecter extends CardImpl { public EntropicSpecter(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Specter"); - this.subtype.add("Spirit"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + this.subtype.add(SubType.SPECTER); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(0); @@ -105,7 +105,7 @@ class CardsInTargetPlayerHandCount implements DynamicValue { @Override public String getMessage() { - return "cards in chosen opponents hand"; + return "cards in the chosen player's hand"; } @Override diff --git a/Mage.Sets/src/mage/cards/e/EpharaGodOfThePolis.java b/Mage.Sets/src/mage/cards/e/EpharaGodOfThePolis.java index 3e78b3cc52..bb0ee39528 100644 --- a/Mage.Sets/src/mage/cards/e/EpharaGodOfThePolis.java +++ b/Mage.Sets/src/mage/cards/e/EpharaGodOfThePolis.java @@ -55,7 +55,7 @@ public class EpharaGodOfThePolis extends CardImpl { public EpharaGodOfThePolis(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{W}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/EpharasEnlightenment.java b/Mage.Sets/src/mage/cards/e/EpharasEnlightenment.java index 419eee9a19..0cda2ae9da 100644 --- a/Mage.Sets/src/mage/cards/e/EpharasEnlightenment.java +++ b/Mage.Sets/src/mage/cards/e/EpharasEnlightenment.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -57,7 +58,7 @@ public class EpharasEnlightenment extends CardImpl { public EpharasEnlightenment(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/e/EpharasRadiance.java b/Mage.Sets/src/mage/cards/e/EpharasRadiance.java index ee5648dcbe..75426d6228 100644 --- a/Mage.Sets/src/mage/cards/e/EpharasRadiance.java +++ b/Mage.Sets/src/mage/cards/e/EpharasRadiance.java @@ -51,7 +51,7 @@ public class EpharasRadiance extends CardImpl { public EpharasRadiance(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/e/EpharasWarden.java b/Mage.Sets/src/mage/cards/e/EpharasWarden.java index c19e7ed53e..ed4295f979 100644 --- a/Mage.Sets/src/mage/cards/e/EpharasWarden.java +++ b/Mage.Sets/src/mage/cards/e/EpharasWarden.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -56,8 +57,8 @@ public class EpharasWarden extends CardImpl { public EpharasWarden(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/Ephemeron.java b/Mage.Sets/src/mage/cards/e/Ephemeron.java index aee6b630d4..f7b75b4663 100644 --- a/Mage.Sets/src/mage/cards/e/Ephemeron.java +++ b/Mage.Sets/src/mage/cards/e/Ephemeron.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCardInHand; @@ -47,7 +48,7 @@ public class Ephemeron extends CardImpl { public Ephemeron(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/EpicProportions.java b/Mage.Sets/src/mage/cards/e/EpicProportions.java index f0414a816e..215b29413c 100644 --- a/Mage.Sets/src/mage/cards/e/EpicProportions.java +++ b/Mage.Sets/src/mage/cards/e/EpicProportions.java @@ -50,7 +50,7 @@ public class EpicProportions extends CardImpl { public EpicProportions(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{G}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); this.addAbility(FlashAbility.getInstance()); TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/e/EpiphanyStorm.java b/Mage.Sets/src/mage/cards/e/EpiphanyStorm.java index f5a360a32c..9177817084 100644 --- a/Mage.Sets/src/mage/cards/e/EpiphanyStorm.java +++ b/Mage.Sets/src/mage/cards/e/EpiphanyStorm.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -55,7 +56,7 @@ public class EpiphanyStorm extends CardImpl { public EpiphanyStorm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/e/EpitaphGolem.java b/Mage.Sets/src/mage/cards/e/EpitaphGolem.java index c670e6d4ee..5d9780d93b 100644 --- a/Mage.Sets/src/mage/cards/e/EpitaphGolem.java +++ b/Mage.Sets/src/mage/cards/e/EpitaphGolem.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -50,7 +51,7 @@ public class EpitaphGolem extends CardImpl { public EpitaphGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/Epochrasite.java b/Mage.Sets/src/mage/cards/e/Epochrasite.java index 39eb39f8ea..9707d0c231 100644 --- a/Mage.Sets/src/mage/cards/e/Epochrasite.java +++ b/Mage.Sets/src/mage/cards/e/Epochrasite.java @@ -43,6 +43,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -58,7 +59,7 @@ public class Epochrasite extends CardImpl { public Epochrasite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EquestrianSkill.java b/Mage.Sets/src/mage/cards/e/EquestrianSkill.java index 168c870093..481952b160 100644 --- a/Mage.Sets/src/mage/cards/e/EquestrianSkill.java +++ b/Mage.Sets/src/mage/cards/e/EquestrianSkill.java @@ -51,7 +51,7 @@ public class EquestrianSkill extends CardImpl { public EquestrianSkill(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/e/ErayoSoratamiAscendant.java b/Mage.Sets/src/mage/cards/e/ErayoSoratamiAscendant.java index 178b613ca5..85c7867794 100644 --- a/Mage.Sets/src/mage/cards/e/ErayoSoratamiAscendant.java +++ b/Mage.Sets/src/mage/cards/e/ErayoSoratamiAscendant.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.game.Game; @@ -55,8 +56,8 @@ public class ErayoSoratamiAscendant extends CardImpl { public ErayoSoratamiAscendant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Moonfolk"); - this.subtype.add("Monk"); + this.subtype.add(SubType.MOONFOLK); + this.subtype.add(SubType.MONK); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ErdwalIlluminator.java b/Mage.Sets/src/mage/cards/e/ErdwalIlluminator.java index 0f7112442b..545e545091 100644 --- a/Mage.Sets/src/mage/cards/e/ErdwalIlluminator.java +++ b/Mage.Sets/src/mage/cards/e/ErdwalIlluminator.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.WatcherScope; import mage.constants.Zone; import mage.game.Game; @@ -52,7 +53,7 @@ public class ErdwalIlluminator extends CardImpl { public ErdwalIlluminator(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/ErdwalRipper.java b/Mage.Sets/src/mage/cards/e/ErdwalRipper.java index 608bda6738..2b533990da 100644 --- a/Mage.Sets/src/mage/cards/e/ErdwalRipper.java +++ b/Mage.Sets/src/mage/cards/e/ErdwalRipper.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,7 +46,7 @@ public class ErdwalRipper extends CardImpl { public ErdwalRipper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ErebosGodOfTheDead.java b/Mage.Sets/src/mage/cards/e/ErebosGodOfTheDead.java index b99c335250..f250f2df16 100644 --- a/Mage.Sets/src/mage/cards/e/ErebosGodOfTheDead.java +++ b/Mage.Sets/src/mage/cards/e/ErebosGodOfTheDead.java @@ -55,7 +55,7 @@ public class ErebosGodOfTheDead extends CardImpl { public ErebosGodOfTheDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(5); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/e/ErebossEmissary.java b/Mage.Sets/src/mage/cards/e/ErebossEmissary.java index f24adeae2f..9c0fd1625d 100644 --- a/Mage.Sets/src/mage/cards/e/ErebossEmissary.java +++ b/Mage.Sets/src/mage/cards/e/ErebossEmissary.java @@ -54,7 +54,7 @@ public class ErebossEmissary extends CardImpl { public ErebossEmissary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{B}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/ErebossTitan.java b/Mage.Sets/src/mage/cards/e/ErebossTitan.java index 8e7cb8867b..ba7de369b4 100644 --- a/Mage.Sets/src/mage/cards/e/ErebossTitan.java +++ b/Mage.Sets/src/mage/cards/e/ErebossTitan.java @@ -42,6 +42,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.TargetController; @@ -67,7 +68,7 @@ public class ErebossTitan extends CardImpl { public ErebossTitan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}{B}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/ErgRaiders.java b/Mage.Sets/src/mage/cards/e/ErgRaiders.java index 0566d72b8b..1ac5bdd124 100644 --- a/Mage.Sets/src/mage/cards/e/ErgRaiders.java +++ b/Mage.Sets/src/mage/cards/e/ErgRaiders.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.DamageControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.game.Game; import mage.game.permanent.Permanent; @@ -53,8 +54,8 @@ public class ErgRaiders extends CardImpl { public ErgRaiders(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/ErhnamDjinn.java b/Mage.Sets/src/mage/cards/e/ErhnamDjinn.java index 038676d78b..7a9d554974 100644 --- a/Mage.Sets/src/mage/cards/e/ErhnamDjinn.java +++ b/Mage.Sets/src/mage/cards/e/ErhnamDjinn.java @@ -57,7 +57,7 @@ public class ErhnamDjinn extends CardImpl { public ErhnamDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/EronTheRelentless.java b/Mage.Sets/src/mage/cards/e/EronTheRelentless.java index 8dacffedef..eaf8e92149 100644 --- a/Mage.Sets/src/mage/cards/e/EronTheRelentless.java +++ b/Mage.Sets/src/mage/cards/e/EronTheRelentless.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class EronTheRelentless extends CardImpl { public EronTheRelentless(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(5); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/ErrantDoomsayers.java b/Mage.Sets/src/mage/cards/e/ErrantDoomsayers.java index 91911819a5..23fa87e793 100644 --- a/Mage.Sets/src/mage/cards/e/ErrantDoomsayers.java +++ b/Mage.Sets/src/mage/cards/e/ErrantDoomsayers.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -56,8 +57,8 @@ public class ErrantDoomsayers extends CardImpl { public ErrantDoomsayers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ErrantEphemeron.java b/Mage.Sets/src/mage/cards/e/ErrantEphemeron.java index d2da1a2dec..93d258d651 100644 --- a/Mage.Sets/src/mage/cards/e/ErrantEphemeron.java +++ b/Mage.Sets/src/mage/cards/e/ErrantEphemeron.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class ErrantEphemeron extends CardImpl { public ErrantEphemeron(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/Errantry.java b/Mage.Sets/src/mage/cards/e/Errantry.java index cfbdf44098..aa86b5ff8e 100644 --- a/Mage.Sets/src/mage/cards/e/Errantry.java +++ b/Mage.Sets/src/mage/cards/e/Errantry.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class Errantry extends CardImpl { public Errantry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/e/ErsatzGnomes.java b/Mage.Sets/src/mage/cards/e/ErsatzGnomes.java index 59bedb0ea9..bd15d44bf4 100644 --- a/Mage.Sets/src/mage/cards/e/ErsatzGnomes.java +++ b/Mage.Sets/src/mage/cards/e/ErsatzGnomes.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BecomesColorTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -50,7 +51,7 @@ public class ErsatzGnomes extends CardImpl { public ErsatzGnomes(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); - this.subtype.add("Gnome"); + this.subtype.add(SubType.GNOME); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ErtaiTheCorrupted.java b/Mage.Sets/src/mage/cards/e/ErtaiTheCorrupted.java index fede6fbad0..879d083312 100644 --- a/Mage.Sets/src/mage/cards/e/ErtaiTheCorrupted.java +++ b/Mage.Sets/src/mage/cards/e/ErtaiTheCorrupted.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -61,8 +62,8 @@ public class ErtaiTheCorrupted extends CardImpl { public ErtaiTheCorrupted(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/ErtaiWizardAdept.java b/Mage.Sets/src/mage/cards/e/ErtaiWizardAdept.java index 69b0d4273b..0a02c0c538 100644 --- a/Mage.Sets/src/mage/cards/e/ErtaiWizardAdept.java +++ b/Mage.Sets/src/mage/cards/e/ErtaiWizardAdept.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.target.TargetSpell; @@ -50,8 +51,8 @@ public class ErtaiWizardAdept extends CardImpl { public ErtaiWizardAdept(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EruptingDreadwolf.java b/Mage.Sets/src/mage/cards/e/EruptingDreadwolf.java index 2e6bd05ce7..89360085f2 100644 --- a/Mage.Sets/src/mage/cards/e/EruptingDreadwolf.java +++ b/Mage.Sets/src/mage/cards/e/EruptingDreadwolf.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; /** @@ -46,8 +47,8 @@ public class EruptingDreadwolf extends CardImpl { public EruptingDreadwolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Eldrazi"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/EscapeArtist.java b/Mage.Sets/src/mage/cards/e/EscapeArtist.java index 6709bed0e9..cd2abe99e2 100644 --- a/Mage.Sets/src/mage/cards/e/EscapeArtist.java +++ b/Mage.Sets/src/mage/cards/e/EscapeArtist.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCardInHand; @@ -49,8 +50,8 @@ public class EscapeArtist extends CardImpl { public EscapeArtist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EscapedNull.java b/Mage.Sets/src/mage/cards/e/EscapedNull.java index 101b1309cb..2d4aa41af3 100644 --- a/Mage.Sets/src/mage/cards/e/EscapedNull.java +++ b/Mage.Sets/src/mage/cards/e/EscapedNull.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class EscapedNull extends CardImpl { public EscapedNull(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EsperBattlemage.java b/Mage.Sets/src/mage/cards/e/EsperBattlemage.java index 6314f09209..d566492cc8 100644 --- a/Mage.Sets/src/mage/cards/e/EsperBattlemage.java +++ b/Mage.Sets/src/mage/cards/e/EsperBattlemage.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class EsperBattlemage extends CardImpl { public EsperBattlemage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EsperCormorants.java b/Mage.Sets/src/mage/cards/e/EsperCormorants.java index d006bbb2f0..e300552e4c 100644 --- a/Mage.Sets/src/mage/cards/e/EsperCormorants.java +++ b/Mage.Sets/src/mage/cards/e/EsperCormorants.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class EsperCormorants extends CardImpl { public EsperCormorants(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{W}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EsperSojourners.java b/Mage.Sets/src/mage/cards/e/EsperSojourners.java index 131aef14b5..1ea1b0aff3 100644 --- a/Mage.Sets/src/mage/cards/e/EsperSojourners.java +++ b/Mage.Sets/src/mage/cards/e/EsperSojourners.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPermanent; /** @@ -48,8 +49,8 @@ public class EsperSojourners extends CardImpl { public EsperSojourners(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{W}{U}{B}"); - this.subtype.add("Vedalken"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.WIZARD); diff --git a/Mage.Sets/src/mage/cards/e/EsperStormblade.java b/Mage.Sets/src/mage/cards/e/EsperStormblade.java index f9f1218b1b..0216121010 100644 --- a/Mage.Sets/src/mage/cards/e/EsperStormblade.java +++ b/Mage.Sets/src/mage/cards/e/EsperStormblade.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -60,8 +61,8 @@ public class EsperStormblade extends CardImpl { public EsperStormblade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{W/B}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.WIZARD); diff --git a/Mage.Sets/src/mage/cards/e/Esperzoa.java b/Mage.Sets/src/mage/cards/e/Esperzoa.java index 7fb421a538..202f46f7c4 100644 --- a/Mage.Sets/src/mage/cards/e/Esperzoa.java +++ b/Mage.Sets/src/mage/cards/e/Esperzoa.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterControlledArtifactPermanent; @@ -48,7 +49,7 @@ public class Esperzoa extends CardImpl { public Esperzoa (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{U}"); - this.subtype.add("Jellyfish"); + this.subtype.add(SubType.JELLYFISH); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EssenceDepleter.java b/Mage.Sets/src/mage/cards/e/EssenceDepleter.java index 94465ff053..4ae9f468ef 100644 --- a/Mage.Sets/src/mage/cards/e/EssenceDepleter.java +++ b/Mage.Sets/src/mage/cards/e/EssenceDepleter.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetOpponent; @@ -50,8 +51,8 @@ public class EssenceDepleter extends CardImpl { public EssenceDepleter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EssenceFilter.java b/Mage.Sets/src/mage/cards/e/EssenceFilter.java new file mode 100644 index 0000000000..173ec2d5c3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EssenceFilter.java @@ -0,0 +1,108 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.StaticFilters; +import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author LevelX2 & L_J + */ +public class EssenceFilter extends CardImpl { + + public EssenceFilter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}{G}"); + + // Destroy all enchantments or all nonwhite enchantments. + this.getSpellAbility().addEffect(new EssenceFilterEffect()); + } + + public EssenceFilter(final EssenceFilter card) { + super(card); + } + + @Override + public EssenceFilter copy() { + return new EssenceFilter(this); + } +} + +class EssenceFilterEffect extends OneShotEffect { + + private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent("nonwhite enchantments"); + + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.WHITE))); + } + + public EssenceFilterEffect() { + super(Outcome.Detriment); + this.staticText = "Destroy all enchantments or all nonwhite enchantments"; + } + + public EssenceFilterEffect(final EssenceFilterEffect effect) { + super(effect); + } + + @Override + public EssenceFilterEffect copy() { + return new EssenceFilterEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + if (controller.chooseUse(outcome, "Destroy all enchantments? (otherwise all nonwhite enchantments are destroyed)", source, game)) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterEnchantmentPermanent(), controller.getId(), source.getSourceId(), game)) { + permanent.destroy(source.getSourceId(), game, false); + } + } else { + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, controller.getId(), source.getSourceId(), game)) { + permanent.destroy(source.getSourceId(), game, false); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/e/EssenceFlare.java b/Mage.Sets/src/mage/cards/e/EssenceFlare.java new file mode 100644 index 0000000000..9ee6f7246d --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EssenceFlare.java @@ -0,0 +1,80 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.counter.AddCountersAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.BoostCounter; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox & L_J + */ +public class EssenceFlare extends CardImpl { + + public EssenceFlare(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // Enchanted creature gets +2/+0. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 0))); + // At the beginning of the upkeep of enchanted creature's controller, put a -0/-1 counter on that creature. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersAttachedEffect(new BoostCounter(0, -1), "that creature"), + TargetController.CONTROLLER_ATTACHED_TO, false)); + } + + public EssenceFlare(final EssenceFlare card) { + super(card); + } + + @Override + public EssenceFlare copy() { + return new EssenceFlare(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/EssenceOfTheWild.java b/Mage.Sets/src/mage/cards/e/EssenceOfTheWild.java index 14eb71058c..d3deaf9796 100644 --- a/Mage.Sets/src/mage/cards/e/EssenceOfTheWild.java +++ b/Mage.Sets/src/mage/cards/e/EssenceOfTheWild.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.CopyEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class EssenceOfTheWild extends CardImpl { public EssenceOfTheWild(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}{G}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/e/EssenceScatter.java b/Mage.Sets/src/mage/cards/e/EssenceScatter.java index 136b54c670..653ffbe8fd 100644 --- a/Mage.Sets/src/mage/cards/e/EssenceScatter.java +++ b/Mage.Sets/src/mage/cards/e/EssenceScatter.java @@ -44,6 +44,7 @@ public class EssenceScatter extends CardImpl { public EssenceScatter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); + // Counter target creature spell. this.getSpellAbility().addTarget(new TargetSpell(new FilterCreatureSpell())); this.getSpellAbility().addEffect(new CounterTargetEffect()); } diff --git a/Mage.Sets/src/mage/cards/e/EssenceSliver.java b/Mage.Sets/src/mage/cards/e/EssenceSliver.java index 7087f115a6..08c98c3eb8 100644 --- a/Mage.Sets/src/mage/cards/e/EssenceSliver.java +++ b/Mage.Sets/src/mage/cards/e/EssenceSliver.java @@ -54,7 +54,7 @@ public class EssenceSliver extends CardImpl { public EssenceSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EssenceWarden.java b/Mage.Sets/src/mage/cards/e/EssenceWarden.java index d27d66fddd..7b3474fc4b 100644 --- a/Mage.Sets/src/mage/cards/e/EssenceWarden.java +++ b/Mage.Sets/src/mage/cards/e/EssenceWarden.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -51,8 +52,8 @@ public class EssenceWarden extends CardImpl { public EssenceWarden(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EtchedChampion.java b/Mage.Sets/src/mage/cards/e/EtchedChampion.java index a075785337..a21f74ad7b 100644 --- a/Mage.Sets/src/mage/cards/e/EtchedChampion.java +++ b/Mage.Sets/src/mage/cards/e/EtchedChampion.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterCard; @@ -65,7 +66,7 @@ public class EtchedChampion extends CardImpl { public EtchedChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EtchedMonstrosity.java b/Mage.Sets/src/mage/cards/e/EtchedMonstrosity.java index b7aea53094..b3a599b509 100644 --- a/Mage.Sets/src/mage/cards/e/EtchedMonstrosity.java +++ b/Mage.Sets/src/mage/cards/e/EtchedMonstrosity.java @@ -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.cards.e; import java.util.UUID; @@ -40,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.TargetPlayer; @@ -50,19 +50,19 @@ import mage.target.TargetPlayer; */ public class EtchedMonstrosity extends CardImpl { - public EtchedMonstrosity (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Golem"); + public EtchedMonstrosity(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(10); this.toughness = new MageInt(10); - this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.M1M1.createInstance(5)), "{this} gets five -1/-1 counters")); + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.M1M1.createInstance(5)), " with five -1/-1 counters on it")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardTargetEffect(3), new ManaCostsImpl("{W}{U}{B}{R}{G}")); ability.addCost(new RemoveCountersSourceCost(CounterType.M1M1.createInstance(5))); ability.addTarget(new TargetPlayer()); this.addAbility(ability); } - public EtchedMonstrosity (final EtchedMonstrosity card) { + public EtchedMonstrosity(final EtchedMonstrosity card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/e/EtchedOracle.java b/Mage.Sets/src/mage/cards/e/EtchedOracle.java index fc3021d5fa..b72c87b13b 100644 --- a/Mage.Sets/src/mage/cards/e/EtchedOracle.java +++ b/Mage.Sets/src/mage/cards/e/EtchedOracle.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.SunburstAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.TargetPlayer; @@ -50,7 +51,7 @@ public class EtchedOracle extends CardImpl { public EtchedOracle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/e/EternalDragon.java b/Mage.Sets/src/mage/cards/e/EternalDragon.java index eb16d0ffc7..525fba0dfe 100644 --- a/Mage.Sets/src/mage/cards/e/EternalDragon.java +++ b/Mage.Sets/src/mage/cards/e/EternalDragon.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.PlainscyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.PhaseStep; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class EternalDragon extends CardImpl { public EternalDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); - this.subtype.add("Dragon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DRAGON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/EternalOfHarshTruths.java b/Mage.Sets/src/mage/cards/e/EternalOfHarshTruths.java index e22fc74a9b..dad55a9d3c 100644 --- a/Mage.Sets/src/mage/cards/e/EternalOfHarshTruths.java +++ b/Mage.Sets/src/mage/cards/e/EternalOfHarshTruths.java @@ -1,68 +1,69 @@ -/* - * 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.cards.e; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.keyword.AfflictAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author emerald000 - */ -public class EternalOfHarshTruths extends CardImpl { - - public EternalOfHarshTruths(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - - this.subtype.add("Zombie"); - this.subtype.add("Cleric"); - this.power = new MageInt(1); - this.toughness = new MageInt(3); - - // Afflict 2 - this.addAbility(new AfflictAbility(2)); - - // Whenever Eternal of Harsh Truths attacks and isn't blocked, draw a card. - this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(new DrawCardSourceControllerEffect(1))); - } - - public EternalOfHarshTruths(final EternalOfHarshTruths card) { - super(card); - } - - @Override - public EternalOfHarshTruths copy() { - return new EternalOfHarshTruths(this); - } -} +/* + * 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.cards.e; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.keyword.AfflictAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author emerald000 + */ +public class EternalOfHarshTruths extends CardImpl { + + public EternalOfHarshTruths(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Afflict 2 + this.addAbility(new AfflictAbility(2)); + + // Whenever Eternal of Harsh Truths attacks and isn't blocked, draw a card. + this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(new DrawCardSourceControllerEffect(1))); + } + + public EternalOfHarshTruths(final EternalOfHarshTruths card) { + super(card); + } + + @Override + public EternalOfHarshTruths copy() { + return new EternalOfHarshTruths(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/EternalScourge.java b/Mage.Sets/src/mage/cards/e/EternalScourge.java index 59dd46eda0..2bfc585547 100644 --- a/Mage.Sets/src/mage/cards/e/EternalScourge.java +++ b/Mage.Sets/src/mage/cards/e/EternalScourge.java @@ -50,8 +50,8 @@ public class EternalScourge extends CardImpl { public EternalScourge(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EternalThirst.java b/Mage.Sets/src/mage/cards/e/EternalThirst.java index 4804781490..a4c95f58e5 100644 --- a/Mage.Sets/src/mage/cards/e/EternalThirst.java +++ b/Mage.Sets/src/mage/cards/e/EternalThirst.java @@ -59,7 +59,7 @@ public class EternalThirst extends CardImpl { public EternalThirst(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/e/EternalWarrior.java b/Mage.Sets/src/mage/cards/e/EternalWarrior.java index 5cdae666d7..4d09e9f7dc 100644 --- a/Mage.Sets/src/mage/cards/e/EternalWarrior.java +++ b/Mage.Sets/src/mage/cards/e/EternalWarrior.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class EternalWarrior extends CardImpl { public EternalWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/e/EternalWitness.java b/Mage.Sets/src/mage/cards/e/EternalWitness.java index ec4f0658e2..84dfb1a9f5 100644 --- a/Mage.Sets/src/mage/cards/e/EternalWitness.java +++ b/Mage.Sets/src/mage/cards/e/EternalWitness.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCardInYourGraveyard; /** @@ -45,8 +46,8 @@ public class EternalWitness extends CardImpl { public EternalWitness(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EternitySnare.java b/Mage.Sets/src/mage/cards/e/EternitySnare.java index ada607a00c..a008d5d97a 100644 --- a/Mage.Sets/src/mage/cards/e/EternitySnare.java +++ b/Mage.Sets/src/mage/cards/e/EternitySnare.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class EternitySnare extends CardImpl { public EternitySnare(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{5}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/e/EthercasteKnight.java b/Mage.Sets/src/mage/cards/e/EthercasteKnight.java index 856658f678..0caf2c4f05 100644 --- a/Mage.Sets/src/mage/cards/e/EthercasteKnight.java +++ b/Mage.Sets/src/mage/cards/e/EthercasteKnight.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ExaltedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class EthercasteKnight extends CardImpl { public EthercasteKnight (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{W}{U}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EtherealArmor.java b/Mage.Sets/src/mage/cards/e/EtherealArmor.java index 946233ca4d..67328cead2 100644 --- a/Mage.Sets/src/mage/cards/e/EtherealArmor.java +++ b/Mage.Sets/src/mage/cards/e/EtherealArmor.java @@ -59,7 +59,7 @@ public class EtherealArmor extends CardImpl { public EtherealArmor (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/e/EtherealChampion.java b/Mage.Sets/src/mage/cards/e/EtherealChampion.java index 592865f1a5..8977b176e0 100644 --- a/Mage.Sets/src/mage/cards/e/EtherealChampion.java +++ b/Mage.Sets/src/mage/cards/e/EtherealChampion.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventDamageToSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class EtherealChampion extends CardImpl { public EtherealChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}{W}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/EtherealUsher.java b/Mage.Sets/src/mage/cards/e/EtherealUsher.java index 4b3272675f..90d9ce9167 100644 --- a/Mage.Sets/src/mage/cards/e/EtherealUsher.java +++ b/Mage.Sets/src/mage/cards/e/EtherealUsher.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TransmuteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class EtherealUsher extends CardImpl { public EtherealUsher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EtherealWhiskergill.java b/Mage.Sets/src/mage/cards/e/EtherealWhiskergill.java index a59d32098d..20dbd5bbe4 100644 --- a/Mage.Sets/src/mage/cards/e/EtherealWhiskergill.java +++ b/Mage.Sets/src/mage/cards/e/EtherealWhiskergill.java @@ -47,7 +47,7 @@ public class EtherealWhiskergill extends CardImpl { public EtherealWhiskergill(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EtheriumAbomination.java b/Mage.Sets/src/mage/cards/e/EtheriumAbomination.java index 44d3ef564b..ebff0f2854 100644 --- a/Mage.Sets/src/mage/cards/e/EtheriumAbomination.java +++ b/Mage.Sets/src/mage/cards/e/EtheriumAbomination.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class EtheriumAbomination extends CardImpl { public EtheriumAbomination (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{U}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/EtheriumHornSorcerer.java b/Mage.Sets/src/mage/cards/e/EtheriumHornSorcerer.java index 87eb08c382..e9c2ccaf05 100644 --- a/Mage.Sets/src/mage/cards/e/EtheriumHornSorcerer.java +++ b/Mage.Sets/src/mage/cards/e/EtheriumHornSorcerer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.CascadeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class EtheriumHornSorcerer extends CardImpl { public EtheriumHornSorcerer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{U}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EtheriumSculptor.java b/Mage.Sets/src/mage/cards/e/EtheriumSculptor.java index fb59588604..4f028723ff 100644 --- a/Mage.Sets/src/mage/cards/e/EtheriumSculptor.java +++ b/Mage.Sets/src/mage/cards/e/EtheriumSculptor.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -50,8 +51,8 @@ public class EtheriumSculptor extends CardImpl { public EtheriumSculptor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EtherswornAdjudicator.java b/Mage.Sets/src/mage/cards/e/EtherswornAdjudicator.java index c49323e75b..efa55606d5 100644 --- a/Mage.Sets/src/mage/cards/e/EtherswornAdjudicator.java +++ b/Mage.Sets/src/mage/cards/e/EtherswornAdjudicator.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; @@ -62,8 +63,8 @@ public class EtherswornAdjudicator extends CardImpl { public EtherswornAdjudicator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Knight"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/EtherswornCanonist.java b/Mage.Sets/src/mage/cards/e/EtherswornCanonist.java index ae2a0b0ee0..988ea9719f 100644 --- a/Mage.Sets/src/mage/cards/e/EtherswornCanonist.java +++ b/Mage.Sets/src/mage/cards/e/EtherswornCanonist.java @@ -52,8 +52,8 @@ public class EtherswornCanonist extends CardImpl { public EtherswornCanonist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EtherswornShieldmage.java b/Mage.Sets/src/mage/cards/e/EtherswornShieldmage.java index 4e7a0fab87..644a8dd605 100644 --- a/Mage.Sets/src/mage/cards/e/EtherswornShieldmage.java +++ b/Mage.Sets/src/mage/cards/e/EtherswornShieldmage.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -53,8 +54,8 @@ public class EtherswornShieldmage extends CardImpl { public EtherswornShieldmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}{W}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.WIZARD); diff --git a/Mage.Sets/src/mage/cards/e/EvanescentIntellect.java b/Mage.Sets/src/mage/cards/e/EvanescentIntellect.java index 4d7ff6554e..0c3440db5e 100644 --- a/Mage.Sets/src/mage/cards/e/EvanescentIntellect.java +++ b/Mage.Sets/src/mage/cards/e/EvanescentIntellect.java @@ -52,7 +52,7 @@ public class EvanescentIntellect extends CardImpl { public EvanescentIntellect(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/e/EvangelOfHeliod.java b/Mage.Sets/src/mage/cards/e/EvangelOfHeliod.java index 792863e31d..84dc8c21e8 100644 --- a/Mage.Sets/src/mage/cards/e/EvangelOfHeliod.java +++ b/Mage.Sets/src/mage/cards/e/EvangelOfHeliod.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.game.permanent.token.SoldierToken; @@ -46,8 +47,8 @@ public class EvangelOfHeliod extends CardImpl { public EvangelOfHeliod(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/Evangelize.java b/Mage.Sets/src/mage/cards/e/Evangelize.java index 74ad62887d..c9209a99c3 100644 --- a/Mage.Sets/src/mage/cards/e/Evangelize.java +++ b/Mage.Sets/src/mage/cards/e/Evangelize.java @@ -53,7 +53,7 @@ public class Evangelize extends CardImpl { // Gain control of target creature of an opponent's choice that he or she controls. GainControlTargetEffect effect = new GainControlTargetEffect(Duration.EndOfGame); - effect.setText("Gain control of target creature of an opponent's choice that he or she controls"); + effect.setText("Gain control of target creature of an opponent's choice he or she controls"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetOpponentsChoicePermanent(1, 1, filter, false, true)); } diff --git a/Mage.Sets/src/mage/cards/e/EvasiveAction.java b/Mage.Sets/src/mage/cards/e/EvasiveAction.java index f271c86d6d..87773fdc23 100644 --- a/Mage.Sets/src/mage/cards/e/EvasiveAction.java +++ b/Mage.Sets/src/mage/cards/e/EvasiveAction.java @@ -32,6 +32,7 @@ import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.effects.common.CounterUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.target.TargetSpell; @@ -42,11 +43,12 @@ import mage.target.TargetSpell; public class EvasiveAction extends CardImpl { public EvasiveAction(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); // Domain - Counter target spell unless its controller pays {1} for each basic land type among lands you control. this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new DomainValue())); this.getSpellAbility().addTarget(new TargetSpell()); + this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN); } public EvasiveAction(final EvasiveAction card) { diff --git a/Mage.Sets/src/mage/cards/e/EverbarkShaman.java b/Mage.Sets/src/mage/cards/e/EverbarkShaman.java index 535ede2c98..8195477bdc 100644 --- a/Mage.Sets/src/mage/cards/e/EverbarkShaman.java +++ b/Mage.Sets/src/mage/cards/e/EverbarkShaman.java @@ -61,8 +61,8 @@ public class EverbarkShaman extends CardImpl { public EverbarkShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/EverflameEidolon.java b/Mage.Sets/src/mage/cards/e/EverflameEidolon.java index ff3783bb65..978b5ca8bb 100644 --- a/Mage.Sets/src/mage/cards/e/EverflameEidolon.java +++ b/Mage.Sets/src/mage/cards/e/EverflameEidolon.java @@ -27,7 +27,6 @@ */ package mage.cards.e; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -39,13 +38,12 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.BestowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; import mage.game.permanent.Permanent; +import java.util.UUID; + /** * * @author Quercitron @@ -54,7 +52,7 @@ public class EverflameEidolon extends CardImpl { public EverflameEidolon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -97,7 +95,7 @@ class EverflameEidolonEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent sourceObject = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (sourceObject != null) { - if (sourceObject.getSubtype(game).contains("Aura")) { + if (sourceObject.hasSubtype(SubType.AURA, game)) { game.addEffect(new BoostEnchantedEffect(1, 0, Duration.EndOfTurn), source); } else { game.addEffect(new BoostSourceEffect(1, 0, Duration.EndOfTurn), source); diff --git a/Mage.Sets/src/mage/cards/e/EvergloveCourier.java b/Mage.Sets/src/mage/cards/e/EvergloveCourier.java index 9c1af1b4ad..7afe657fe8 100644 --- a/Mage.Sets/src/mage/cards/e/EvergloveCourier.java +++ b/Mage.Sets/src/mage/cards/e/EvergloveCourier.java @@ -63,7 +63,7 @@ public class EvergloveCourier extends CardImpl { public EvergloveCourier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EvernightShade.java b/Mage.Sets/src/mage/cards/e/EvernightShade.java index d6c93b7bad..918b24fb10 100644 --- a/Mage.Sets/src/mage/cards/e/EvernightShade.java +++ b/Mage.Sets/src/mage/cards/e/EvernightShade.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.UndyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class EvernightShade extends CardImpl { public EvernightShade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Shade"); + this.subtype.add(SubType.SHADE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/Evershrike.java b/Mage.Sets/src/mage/cards/e/Evershrike.java index 592d285127..6a17ed0623 100644 --- a/Mage.Sets/src/mage/cards/e/Evershrike.java +++ b/Mage.Sets/src/mage/cards/e/Evershrike.java @@ -58,8 +58,8 @@ public class Evershrike extends CardImpl { public Evershrike(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W/B}{W/B}"); - this.subtype.add("Elemental"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EvilEyeOfOrmsByGore.java b/Mage.Sets/src/mage/cards/e/EvilEyeOfOrmsByGore.java index f5066be1a2..fe7773fee3 100644 --- a/Mage.Sets/src/mage/cards/e/EvilEyeOfOrmsByGore.java +++ b/Mage.Sets/src/mage/cards/e/EvilEyeOfOrmsByGore.java @@ -58,7 +58,7 @@ public class EvilEyeOfOrmsByGore extends CardImpl { public EvilEyeOfOrmsByGore(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Eye"); + this.subtype.add(SubType.EYE); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/e/EvilEyeOfUrborg.java b/Mage.Sets/src/mage/cards/e/EvilEyeOfUrborg.java index 8660c0703a..01c15db662 100644 --- a/Mage.Sets/src/mage/cards/e/EvilEyeOfUrborg.java +++ b/Mage.Sets/src/mage/cards/e/EvilEyeOfUrborg.java @@ -56,7 +56,7 @@ public class EvilEyeOfUrborg extends CardImpl { public EvilEyeOfUrborg(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Eye"); + this.subtype.add(SubType.EYE); this.power = new MageInt(6); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EvilPresence.java b/Mage.Sets/src/mage/cards/e/EvilPresence.java index c707000737..91574130db 100644 --- a/Mage.Sets/src/mage/cards/e/EvilPresence.java +++ b/Mage.Sets/src/mage/cards/e/EvilPresence.java @@ -50,7 +50,7 @@ public class EvilPresence extends CardImpl { public EvilPresence(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/e/EvilTwin.java b/Mage.Sets/src/mage/cards/e/EvilTwin.java index 3800c83565..ed81374d0e 100644 --- a/Mage.Sets/src/mage/cards/e/EvilTwin.java +++ b/Mage.Sets/src/mage/cards/e/EvilTwin.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.filter.common.FilterCreaturePermanent; @@ -59,7 +60,7 @@ public class EvilTwin extends CardImpl { public EvilTwin(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{B}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/e/Eviscerator.java b/Mage.Sets/src/mage/cards/e/Eviscerator.java index 12cd8d9ffa..1066d53b2c 100644 --- a/Mage.Sets/src/mage/cards/e/Eviscerator.java +++ b/Mage.Sets/src/mage/cards/e/Eviscerator.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class Eviscerator extends CardImpl { public Eviscerator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/EvolvingWilds.java b/Mage.Sets/src/mage/cards/e/EvolvingWilds.java index 69211f6845..13c09f8abd 100644 --- a/Mage.Sets/src/mage/cards/e/EvolvingWilds.java +++ b/Mage.Sets/src/mage/cards/e/EvolvingWilds.java @@ -27,19 +27,19 @@ */ package mage.cards.e; -import mage.abilities.ActivatedAbilityImpl; -import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; /** * @@ -48,10 +48,15 @@ import java.util.UUID; public class EvolvingWilds extends CardImpl { public EvolvingWilds(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); // {T}, Sacrifice Evolving Wilds: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. - this.addAbility(new EvolvingWildsAbility()); + Ability ability = new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true), + new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); } public EvolvingWilds(final EvolvingWilds card) { @@ -64,24 +69,3 @@ public class EvolvingWilds extends CardImpl { } } - -class EvolvingWildsAbility extends ActivatedAbilityImpl { - - public EvolvingWildsAbility() { - super(Zone.BATTLEFIELD, null); - addCost(new TapSourceCost()); - addCost(new SacrificeSourceCost()); - TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD); - addEffect(new SearchLibraryPutInPlayEffect(target, true, Outcome.PutLandInPlay)); - } - - public EvolvingWildsAbility(final EvolvingWildsAbility ability) { - super(ability); - } - - @Override - public EvolvingWildsAbility copy() { - return new EvolvingWildsAbility(this); - } - -} diff --git a/Mage.Sets/src/mage/cards/e/EwokFiredancers.java b/Mage.Sets/src/mage/cards/e/EwokFiredancers.java index 715540af3e..7cd5f291a4 100644 --- a/Mage.Sets/src/mage/cards/e/EwokFiredancers.java +++ b/Mage.Sets/src/mage/cards/e/EwokFiredancers.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class EwokFiredancers extends CardImpl { public EwokFiredancers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Ewok"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.EWOK); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/ExaltedAngel.java b/Mage.Sets/src/mage/cards/e/ExaltedAngel.java index dba3fb7a9a..738920ab3c 100644 --- a/Mage.Sets/src/mage/cards/e/ExaltedAngel.java +++ b/Mage.Sets/src/mage/cards/e/ExaltedAngel.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class ExaltedAngel extends CardImpl { public ExaltedAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/ExaltedDragon.java b/Mage.Sets/src/mage/cards/e/ExaltedDragon.java index d0029ddaad..55ee01bf79 100644 --- a/Mage.Sets/src/mage/cards/e/ExaltedDragon.java +++ b/Mage.Sets/src/mage/cards/e/ExaltedDragon.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class ExaltedDragon extends CardImpl { public ExaltedDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/ExavaRakdosBloodWitch.java b/Mage.Sets/src/mage/cards/e/ExavaRakdosBloodWitch.java index 0eb0abfae1..507a67b25c 100644 --- a/Mage.Sets/src/mage/cards/e/ExavaRakdosBloodWitch.java +++ b/Mage.Sets/src/mage/cards/e/ExavaRakdosBloodWitch.java @@ -62,8 +62,8 @@ public class ExavaRakdosBloodWitch extends CardImpl { public ExavaRakdosBloodWitch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/Excruciator.java b/Mage.Sets/src/mage/cards/e/Excruciator.java index 3c691afa1b..dbfa7593d8 100644 --- a/Mage.Sets/src/mage/cards/e/Excruciator.java +++ b/Mage.Sets/src/mage/cards/e/Excruciator.java @@ -1,97 +1,98 @@ -/* - * 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.cards.e; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent; - -/** - * - * @author LevelX2 - */ -public class Excruciator extends CardImpl { - - public Excruciator(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{R}{R}"); - - this.subtype.add("Avatar"); - this.power = new MageInt(7); - this.toughness = new MageInt(7); - - // Damage that would be dealt by Excruciator can't be prevented. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ExcruciatorEffect())); - } - - public Excruciator(final Excruciator card) { - super(card); - } - - @Override - public Excruciator copy() { - return new Excruciator(this); - } -} - -class ExcruciatorEffect extends ContinuousRuleModifyingEffectImpl { - - public ExcruciatorEffect() { - super(Duration.WhileOnBattlefield, Outcome.Benefit); - staticText = "Damage that would be dealt by {this} can't be prevented"; - } - - public ExcruciatorEffect(final ExcruciatorEffect effect) { - super(effect); - } - - @Override - public ExcruciatorEffect copy() { - return new ExcruciatorEffect(this); - } - - @Override - public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.PREVENT_DAMAGE; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - return event.getSourceId().equals(source.getSourceId()); - } - -} +/* + * 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.cards.e; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author LevelX2 + */ +public class Excruciator extends CardImpl { + + public Excruciator(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{R}{R}"); + + this.subtype.add(SubType.AVATAR); + this.power = new MageInt(7); + this.toughness = new MageInt(7); + + // Damage that would be dealt by Excruciator can't be prevented. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ExcruciatorEffect())); + } + + public Excruciator(final Excruciator card) { + super(card); + } + + @Override + public Excruciator copy() { + return new Excruciator(this); + } +} + +class ExcruciatorEffect extends ContinuousRuleModifyingEffectImpl { + + public ExcruciatorEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = "Damage that would be dealt by {this} can't be prevented"; + } + + public ExcruciatorEffect(final ExcruciatorEffect effect) { + super(effect); + } + + @Override + public ExcruciatorEffect copy() { + return new ExcruciatorEffect(this); + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.PREVENT_DAMAGE; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + return event.getSourceId().equals(source.getSourceId()); + } + +} diff --git a/Mage.Sets/src/mage/cards/e/ExecutionersHood.java b/Mage.Sets/src/mage/cards/e/ExecutionersHood.java index 4f6d8a3a17..45f262f3e9 100644 --- a/Mage.Sets/src/mage/cards/e/ExecutionersHood.java +++ b/Mage.Sets/src/mage/cards/e/ExecutionersHood.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class ExecutionersHood extends CardImpl { public ExecutionersHood(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has intimidate. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(IntimidateAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/e/ExemplarOfStrength.java b/Mage.Sets/src/mage/cards/e/ExemplarOfStrength.java index 2b15189677..6e6fb45d7e 100644 --- a/Mage.Sets/src/mage/cards/e/ExemplarOfStrength.java +++ b/Mage.Sets/src/mage/cards/e/ExemplarOfStrength.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetControlledCreaturePermanent; @@ -51,8 +52,8 @@ public class ExemplarOfStrength extends CardImpl { public ExemplarOfStrength(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/e/ExhumerThrull.java b/Mage.Sets/src/mage/cards/e/ExhumerThrull.java index 0a36a6d008..11b85615f5 100644 --- a/Mage.Sets/src/mage/cards/e/ExhumerThrull.java +++ b/Mage.Sets/src/mage/cards/e/ExhumerThrull.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HauntAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; @@ -46,7 +47,7 @@ public class ExhumerThrull extends CardImpl { public ExhumerThrull(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Thrull"); + this.subtype.add(SubType.THRULL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/ExiledBoggart.java b/Mage.Sets/src/mage/cards/e/ExiledBoggart.java index 1f8d670561..515339213e 100644 --- a/Mage.Sets/src/mage/cards/e/ExiledBoggart.java +++ b/Mage.Sets/src/mage/cards/e/ExiledBoggart.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.discard.DiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ExiledBoggart extends CardImpl { public ExiledBoggart(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/Exogorth.java b/Mage.Sets/src/mage/cards/e/Exogorth.java index 60dbfe3ded..c670f6b3d7 100644 --- a/Mage.Sets/src/mage/cards/e/Exogorth.java +++ b/Mage.Sets/src/mage/cards/e/Exogorth.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class Exogorth extends CardImpl { public Exogorth(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); - this.subtype.add("Slug"); + this.subtype.add(SubType.SLUG); this.power = new MageInt(8); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/e/Exorcist.java b/Mage.Sets/src/mage/cards/e/Exorcist.java index 0d4e38424e..7dfd8f7ac8 100644 --- a/Mage.Sets/src/mage/cards/e/Exorcist.java +++ b/Mage.Sets/src/mage/cards/e/Exorcist.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -56,8 +57,8 @@ public class Exorcist extends CardImpl { public Exorcist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ExoskeletalArmor.java b/Mage.Sets/src/mage/cards/e/ExoskeletalArmor.java index 2b1032f5ad..3609731733 100644 --- a/Mage.Sets/src/mage/cards/e/ExoskeletalArmor.java +++ b/Mage.Sets/src/mage/cards/e/ExoskeletalArmor.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class ExoskeletalArmor extends CardImpl { public ExoskeletalArmor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/e/ExoticCurse.java b/Mage.Sets/src/mage/cards/e/ExoticCurse.java index 542e03dc67..34c231b9bb 100644 --- a/Mage.Sets/src/mage/cards/e/ExoticCurse.java +++ b/Mage.Sets/src/mage/cards/e/ExoticCurse.java @@ -28,6 +28,7 @@ package mage.cards.e; import java.util.UUID; +import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DomainValue; @@ -37,7 +38,9 @@ import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,8 +53,8 @@ import mage.target.TargetPermanent; public class ExoticCurse extends CardImpl { public ExoticCurse(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetPermanent(); @@ -61,8 +64,9 @@ public class ExoticCurse extends CardImpl { // Domain - Enchanted creature gets -1/-1 for each basic land type among lands you control. DynamicValue unboost = new SignInversionDynamicValue(new DomainValue()); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new BoostEnchantedEffect(unboost, unboost, Duration.WhileOnBattlefield))); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(unboost, unboost, Duration.WhileOnBattlefield)); + ability.setAbilityWord(AbilityWord.DOMAIN); + this.addAbility(ability); } public ExoticCurse(final ExoticCurse card) { diff --git a/Mage.Sets/src/mage/cards/e/ExpeditionEnvoy.java b/Mage.Sets/src/mage/cards/e/ExpeditionEnvoy.java index 3528bb86df..3746c04587 100644 --- a/Mage.Sets/src/mage/cards/e/ExpeditionEnvoy.java +++ b/Mage.Sets/src/mage/cards/e/ExpeditionEnvoy.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,9 +42,9 @@ public class ExpeditionEnvoy extends CardImpl { public ExpeditionEnvoy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(1); } diff --git a/Mage.Sets/src/mage/cards/e/ExpeditionRaptor.java b/Mage.Sets/src/mage/cards/e/ExpeditionRaptor.java index 57815ca96d..9451c447f3 100644 --- a/Mage.Sets/src/mage/cards/e/ExpeditionRaptor.java +++ b/Mage.Sets/src/mage/cards/e/ExpeditionRaptor.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.SupportAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class ExpeditionRaptor extends CardImpl { public ExpeditionRaptor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/ExpendableTroops.java b/Mage.Sets/src/mage/cards/e/ExpendableTroops.java index 97fa03ac50..4718edc811 100644 --- a/Mage.Sets/src/mage/cards/e/ExpendableTroops.java +++ b/Mage.Sets/src/mage/cards/e/ExpendableTroops.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterAttackingOrBlockingCreature; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class ExpendableTroops extends CardImpl { public ExpendableTroops(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ExperimentKraj.java b/Mage.Sets/src/mage/cards/e/ExperimentKraj.java index 4deb4aaafb..5d447f575a 100644 --- a/Mage.Sets/src/mage/cards/e/ExperimentKraj.java +++ b/Mage.Sets/src/mage/cards/e/ExperimentKraj.java @@ -56,8 +56,8 @@ public class ExperimentKraj extends CardImpl { public ExperimentKraj(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Ooze"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.OOZE); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/e/ExperimentOne.java b/Mage.Sets/src/mage/cards/e/ExperimentOne.java index d08385fdf1..26add92b7c 100644 --- a/Mage.Sets/src/mage/cards/e/ExperimentOne.java +++ b/Mage.Sets/src/mage/cards/e/ExperimentOne.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EvolveAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -48,8 +49,8 @@ public class ExperimentOne extends CardImpl { public ExperimentOne(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Ooze"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.OOZE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ExperimentalAviator.java b/Mage.Sets/src/mage/cards/e/ExperimentalAviator.java index 8efd48544b..ddf617af91 100644 --- a/Mage.Sets/src/mage/cards/e/ExperimentalAviator.java +++ b/Mage.Sets/src/mage/cards/e/ExperimentalAviator.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.ThopterColorlessToken; /** @@ -45,8 +46,8 @@ public class ExperimentalAviator extends CardImpl { public ExperimentalAviator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/ExplorersScope.java b/Mage.Sets/src/mage/cards/e/ExplorersScope.java index 420aad6e06..f9603ea2f9 100644 --- a/Mage.Sets/src/mage/cards/e/ExplorersScope.java +++ b/Mage.Sets/src/mage/cards/e/ExplorersScope.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.EquipAbility; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -49,7 +50,7 @@ public class ExplorersScope extends CardImpl { public ExplorersScope(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Whenever equipped creature attacks, look at the top card of your library. If it's a land card, you may put it onto the battlefield tapped. this.addAbility(new AttacksAttachedTriggeredAbility(new ExplorersScopeEffect())); diff --git a/Mage.Sets/src/mage/cards/e/ExplosiveRevelation.java b/Mage.Sets/src/mage/cards/e/ExplosiveRevelation.java index bffd736712..c1707a1e65 100644 --- a/Mage.Sets/src/mage/cards/e/ExplosiveRevelation.java +++ b/Mage.Sets/src/mage/cards/e/ExplosiveRevelation.java @@ -28,6 +28,7 @@ package mage.cards.e; import java.util.UUID; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; @@ -50,8 +51,7 @@ import mage.target.common.TargetCreatureOrPlayer; public class ExplosiveRevelation extends CardImpl { public ExplosiveRevelation(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); // Choose target creature or player. Reveal cards from the top of your library until you reveal a nonland card. Explosive Revelation deals damage equal to that card's converted mana cost to that creature or player. Put the nonland card into your hand and the rest on the bottom of your library in any order. this.getSpellAbility().addEffect(new ExplosiveRevelationEffect()); @@ -86,42 +86,46 @@ class ExplosiveRevelationEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null && player.getLibrary().hasCards()) { - CardsImpl cards = new CardsImpl(); - Library library = player.getLibrary(); - Card card = null; - do { - card = library.removeFromTop(game); - if (card != null) { - cards.add(card); + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null) { + if (controller.getLibrary().hasCards()) { + + CardsImpl cards = new CardsImpl(); + Library library = controller.getLibrary(); + Card card = null; + do { + card = library.removeFromTop(game); + if (card != null) { + cards.add(card); + } + } while (library.hasCards() && card != null && card.isLand()); + // reveal cards + if (!cards.isEmpty()) { + controller.revealCards(sourceObject.getIdName(), cards, game); } - } while (library.hasCards() && card != null && card.isLand()); - // reveal cards - if (!cards.isEmpty()) { - player.revealCards("Explosive Revelation", cards, game); - } - // the nonland card - int damage = card.getConvertedManaCost(); - // assign damage to target - for (UUID targetId: targetPointer.getTargets(game, source)) { - Permanent targetedCreature = game.getPermanent(targetId); - if (targetedCreature != null) { - targetedCreature.damage(damage, source.getSourceId(), game, false, true); - } - else { - Player targetedPlayer = game.getPlayer(targetId); - if (targetedPlayer != null) { - targetedPlayer.damage(damage, source.getSourceId(), game, false, true); + // the nonland card + int damage = card.getConvertedManaCost(); + // assign damage to target + for (UUID targetId : targetPointer.getTargets(game, source)) { + Permanent targetedCreature = game.getPermanent(targetId); + if (targetedCreature != null) { + targetedCreature.damage(damage, source.getSourceId(), game, false, true); + } else { + Player targetedPlayer = game.getPlayer(targetId); + if (targetedPlayer != null) { + targetedPlayer.damage(damage, source.getSourceId(), game, false, true); + } } } + // move nonland card to hand + card.moveToZone(Zone.HAND, source.getSourceId(), game, true); + // remove nonland card from revealed card list + cards.remove(card); + // put the rest of the cards on the bottom of the library in any order + return controller.putCardsOnBottomOfLibrary(cards, game, source, true); } - // move nonland card to hand - card.moveToZone(Zone.HAND, id, game, true); - // remove nonland card from revealed card list - cards.remove(card); - // put the rest of the cards on the bottom of the library in any order - return player.putCardsOnBottomOfLibrary(cards, game, source, true); + return true; } return false; } diff --git a/Mage.Sets/src/mage/cards/e/ExquisiteArchangel.java b/Mage.Sets/src/mage/cards/e/ExquisiteArchangel.java index 52739f48d7..b2953410ae 100644 --- a/Mage.Sets/src/mage/cards/e/ExquisiteArchangel.java +++ b/Mage.Sets/src/mage/cards/e/ExquisiteArchangel.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class ExquisiteArchangel extends CardImpl { public ExquisiteArchangel(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/Extortion.java b/Mage.Sets/src/mage/cards/e/Extortion.java new file mode 100644 index 0000000000..8e132f4926 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/Extortion.java @@ -0,0 +1,103 @@ +/* + * 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.cards.e; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; +import mage.target.TargetPlayer; + +/** + * + * @author TheElk801 + */ +public class Extortion extends CardImpl { + + public Extortion(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}{B}"); + + // Look at target player's hand and choose up to two cards from it. That player discards those cards. + this.getSpellAbility().addEffect(new ExtortionEffect()); + this.getSpellAbility().addTarget(new TargetPlayer()); + } + + public Extortion(final Extortion card) { + super(card); + } + + @Override + public Extortion copy() { + return new Extortion(this); + } +} + +class ExtortionEffect extends OneShotEffect { + + public ExtortionEffect() { + super(Outcome.Discard); + staticText = "Look at target player's hand and choose up to two cards from it. That player discards that card."; + } + + public ExtortionEffect(final ExtortionEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player targetPlayer = game.getPlayer(source.getFirstTarget()); + Player you = game.getPlayer(source.getControllerId()); + if (targetPlayer != null && you != null) { + you.lookAtCards("Discard", targetPlayer.getHand(), game); + TargetCard target = new TargetCard(0, 2, Zone.HAND, new FilterCard()); + target.setNotTarget(true); + if (you.choose(Outcome.Benefit, targetPlayer.getHand(), target, game)) { + Card card = targetPlayer.getHand().get(target.getFirstTarget(), game); + if (card != null) { + return targetPlayer.discard(card, source, game); + } + } + + } + return false; + } + + @Override + public ExtortionEffect copy() { + return new ExtortionEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/ExtraArms.java b/Mage.Sets/src/mage/cards/e/ExtraArms.java index 86c03053ee..9755af4b27 100644 --- a/Mage.Sets/src/mage/cards/e/ExtraArms.java +++ b/Mage.Sets/src/mage/cards/e/ExtraArms.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.target.TargetPermanent; import mage.target.common.TargetCreatureOrPlayer; @@ -51,7 +52,7 @@ public class ExtraArms extends CardImpl { public ExtraArms(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/e/ExtractorDemon.java b/Mage.Sets/src/mage/cards/e/ExtractorDemon.java index c86208519d..1c4edb67e8 100644 --- a/Mage.Sets/src/mage/cards/e/ExtractorDemon.java +++ b/Mage.Sets/src/mage/cards/e/ExtractorDemon.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.TargetPlayer; @@ -57,7 +58,7 @@ public class ExtractorDemon extends CardImpl { public ExtractorDemon(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/ExtricatorOfFlesh.java b/Mage.Sets/src/mage/cards/e/ExtricatorOfFlesh.java index e1dd326fdc..27e60f747f 100644 --- a/Mage.Sets/src/mage/cards/e/ExtricatorOfFlesh.java +++ b/Mage.Sets/src/mage/cards/e/ExtricatorOfFlesh.java @@ -64,8 +64,8 @@ public class ExtricatorOfFlesh extends CardImpl { public ExtricatorOfFlesh(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Eldrazi"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/e/ExtricatorOfSin.java b/Mage.Sets/src/mage/cards/e/ExtricatorOfSin.java index ee80a4ba15..9ddecc3606 100644 --- a/Mage.Sets/src/mage/cards/e/ExtricatorOfSin.java +++ b/Mage.Sets/src/mage/cards/e/ExtricatorOfSin.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -62,8 +63,8 @@ public class ExtricatorOfSin extends CardImpl { public ExtricatorOfSin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/Extruder.java b/Mage.Sets/src/mage/cards/e/Extruder.java index 82a3da222e..015543286b 100644 --- a/Mage.Sets/src/mage/cards/e/Extruder.java +++ b/Mage.Sets/src/mage/cards/e/Extruder.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterControlledPermanent; @@ -58,7 +59,7 @@ public class Extruder extends CardImpl { public Extruder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Juggernaut"); + this.subtype.add(SubType.JUGGERNAUT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/ExuberantFirestoker.java b/Mage.Sets/src/mage/cards/e/ExuberantFirestoker.java index c5d24007bb..66c3cd89b8 100644 --- a/Mage.Sets/src/mage/cards/e/ExuberantFirestoker.java +++ b/Mage.Sets/src/mage/cards/e/ExuberantFirestoker.java @@ -35,6 +35,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -51,9 +52,9 @@ public class ExuberantFirestoker extends CardImpl { public ExuberantFirestoker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/ExultantCultist.java b/Mage.Sets/src/mage/cards/e/ExultantCultist.java index 674b96b02c..3b1868390c 100644 --- a/Mage.Sets/src/mage/cards/e/ExultantCultist.java +++ b/Mage.Sets/src/mage/cards/e/ExultantCultist.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ExultantCultist extends CardImpl { public ExultantCultist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EyeblightAssassin.java b/Mage.Sets/src/mage/cards/e/EyeblightAssassin.java index 63f78f0f4f..e490059723 100644 --- a/Mage.Sets/src/mage/cards/e/EyeblightAssassin.java +++ b/Mage.Sets/src/mage/cards/e/EyeblightAssassin.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -55,8 +56,8 @@ public class EyeblightAssassin extends CardImpl { public EyeblightAssassin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Elf"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EyeblightsEnding.java b/Mage.Sets/src/mage/cards/e/EyeblightsEnding.java index 71069d7050..4505dbf682 100644 --- a/Mage.Sets/src/mage/cards/e/EyeblightsEnding.java +++ b/Mage.Sets/src/mage/cards/e/EyeblightsEnding.java @@ -52,7 +52,7 @@ public class EyeblightsEnding extends CardImpl { public EyeblightsEnding(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{2}{B}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); diff --git a/Mage.Sets/src/mage/cards/e/EyelessWatcher.java b/Mage.Sets/src/mage/cards/e/EyelessWatcher.java index d7f1ea1d62..0b74c437fa 100644 --- a/Mage.Sets/src/mage/cards/e/EyelessWatcher.java +++ b/Mage.Sets/src/mage/cards/e/EyelessWatcher.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.EldraziScionToken; /** @@ -46,8 +47,8 @@ public class EyelessWatcher extends CardImpl { public EyelessWatcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/e/EyesOfTheWisent.java b/Mage.Sets/src/mage/cards/e/EyesOfTheWisent.java index 81b5475727..0e1944d7d4 100644 --- a/Mage.Sets/src/mage/cards/e/EyesOfTheWisent.java +++ b/Mage.Sets/src/mage/cards/e/EyesOfTheWisent.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; import mage.game.permanent.token.EyesOfTheWisentElementalToken; @@ -54,7 +55,7 @@ public class EyesOfTheWisent extends CardImpl { public EyesOfTheWisent(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.ENCHANTMENT}, "{1}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); // Whenever an opponent casts a blue spell during your turn, you may create a 4/4 green Elemental creature token. this.addAbility(new ConditionalTriggeredAbility( diff --git a/Mage.Sets/src/mage/cards/e/EzuriClawOfProgress.java b/Mage.Sets/src/mage/cards/e/EzuriClawOfProgress.java index d7dcaded57..6fca7d514f 100644 --- a/Mage.Sets/src/mage/cards/e/EzuriClawOfProgress.java +++ b/Mage.Sets/src/mage/cards/e/EzuriClawOfProgress.java @@ -65,8 +65,8 @@ public class EzuriClawOfProgress extends CardImpl { public EzuriClawOfProgress(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EzuriRenegadeLeader.java b/Mage.Sets/src/mage/cards/e/EzuriRenegadeLeader.java index 35312b62c0..49fb80befe 100644 --- a/Mage.Sets/src/mage/cards/e/EzuriRenegadeLeader.java +++ b/Mage.Sets/src/mage/cards/e/EzuriRenegadeLeader.java @@ -65,8 +65,8 @@ public class EzuriRenegadeLeader extends CardImpl { public EzuriRenegadeLeader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EzurisArchers.java b/Mage.Sets/src/mage/cards/e/EzurisArchers.java index 8c7daa9573..c33045efee 100644 --- a/Mage.Sets/src/mage/cards/e/EzurisArchers.java +++ b/Mage.Sets/src/mage/cards/e/EzurisArchers.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -51,8 +52,8 @@ public class EzurisArchers extends CardImpl { public EzurisArchers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Archer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EzurisBrigade.java b/Mage.Sets/src/mage/cards/e/EzurisBrigade.java index 33da33d01f..cfc79c392c 100644 --- a/Mage.Sets/src/mage/cards/e/EzurisBrigade.java +++ b/Mage.Sets/src/mage/cards/e/EzurisBrigade.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -53,8 +54,8 @@ public class EzurisBrigade extends CardImpl { public EzurisBrigade (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FaadiyahSeer.java b/Mage.Sets/src/mage/cards/f/FaadiyahSeer.java index 6cbe2cda0e..43a9c3d9c0 100644 --- a/Mage.Sets/src/mage/cards/f/FaadiyahSeer.java +++ b/Mage.Sets/src/mage/cards/f/FaadiyahSeer.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -53,8 +54,8 @@ public class FaadiyahSeer extends CardImpl { public FaadiyahSeer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FabledHero.java b/Mage.Sets/src/mage/cards/f/FabledHero.java index 811f78c9d1..ed5aec5e96 100644 --- a/Mage.Sets/src/mage/cards/f/FabledHero.java +++ b/Mage.Sets/src/mage/cards/f/FabledHero.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,8 +46,8 @@ public class FabledHero extends CardImpl { public FabledHero(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FaceOfFear.java b/Mage.Sets/src/mage/cards/f/FaceOfFear.java index abda3cf947..58ff9ebf3f 100644 --- a/Mage.Sets/src/mage/cards/f/FaceOfFear.java +++ b/Mage.Sets/src/mage/cards/f/FaceOfFear.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class FaceOfFear extends CardImpl { public FaceOfFear(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FacelessButcher.java b/Mage.Sets/src/mage/cards/f/FacelessButcher.java index ce77fdb142..3d28163965 100644 --- a/Mage.Sets/src/mage/cards/f/FacelessButcher.java +++ b/Mage.Sets/src/mage/cards/f/FacelessButcher.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnFromExileForSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -61,8 +62,8 @@ public class FacelessButcher extends CardImpl { public FacelessButcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Nightmare"); - this.subtype.add("Horror"); + this.subtype.add(SubType.NIGHTMARE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FacelessDevourer.java b/Mage.Sets/src/mage/cards/f/FacelessDevourer.java index a6d28d271b..9eeb0c0988 100644 --- a/Mage.Sets/src/mage/cards/f/FacelessDevourer.java +++ b/Mage.Sets/src/mage/cards/f/FacelessDevourer.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -61,8 +62,8 @@ public class FacelessDevourer extends CardImpl { public FacelessDevourer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Nightmare"); - this.subtype.add("Horror"); + this.subtype.add(SubType.NIGHTMARE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/Facevaulter.java b/Mage.Sets/src/mage/cards/f/Facevaulter.java index 50926451ca..b25094a13a 100644 --- a/Mage.Sets/src/mage/cards/f/Facevaulter.java +++ b/Mage.Sets/src/mage/cards/f/Facevaulter.java @@ -55,8 +55,8 @@ public class Facevaulter extends CardImpl { public Facevaulter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FaerieArtisans.java b/Mage.Sets/src/mage/cards/f/FaerieArtisans.java index dd66fb2c92..539328bc61 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieArtisans.java +++ b/Mage.Sets/src/mage/cards/f/FaerieArtisans.java @@ -33,7 +33,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -65,8 +65,8 @@ public class FaerieArtisans extends CardImpl { public FaerieArtisans(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -110,7 +110,7 @@ class FaerieArtisansEffect extends OneShotEffect { Permanent permanentToCopy = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source)); Player controller = game.getPlayer(source.getControllerId()); if (controller != null && permanentToCopy != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(null, CardType.ARTIFACT, false); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(null, CardType.ARTIFACT, false); effect.setTargetPointer(new FixedTarget(permanentToCopy, game)); if (effect.apply(game, source)) { String oldTokens = (String) game.getState().getValue(source.getSourceId().toString() + source.getSourceObjectZoneChangeCounter()); diff --git a/Mage.Sets/src/mage/cards/f/FaerieConclave.java b/Mage.Sets/src/mage/cards/f/FaerieConclave.java index e6039060cb..342ec5067f 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieConclave.java +++ b/Mage.Sets/src/mage/cards/f/FaerieConclave.java @@ -38,6 +38,7 @@ import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -69,7 +70,7 @@ class FaerieConclaveToken extends Token { FaerieConclaveToken() { super("Faerie", "2/1 blue Faerie creature with flying"); cardType.add(CardType.CREATURE); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); color.setBlue(true); power = new MageInt(2); toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FaerieHarbinger.java b/Mage.Sets/src/mage/cards/f/FaerieHarbinger.java index 512770fd23..ad304c536b 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieHarbinger.java +++ b/Mage.Sets/src/mage/cards/f/FaerieHarbinger.java @@ -54,8 +54,8 @@ public class FaerieHarbinger extends CardImpl { public FaerieHarbinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FaerieImpostor.java b/Mage.Sets/src/mage/cards/f/FaerieImpostor.java index 8a13e52649..1e7dd44a75 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieImpostor.java +++ b/Mage.Sets/src/mage/cards/f/FaerieImpostor.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -54,8 +55,8 @@ public class FaerieImpostor extends CardImpl { public FaerieImpostor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FaerieInvaders.java b/Mage.Sets/src/mage/cards/f/FaerieInvaders.java index f13be2cf7f..fc161f5526 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieInvaders.java +++ b/Mage.Sets/src/mage/cards/f/FaerieInvaders.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class FaerieInvaders extends CardImpl { public FaerieInvaders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FaerieMacabre.java b/Mage.Sets/src/mage/cards/f/FaerieMacabre.java index 64d2ee8052..25bc8c77f7 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieMacabre.java +++ b/Mage.Sets/src/mage/cards/f/FaerieMacabre.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.target.common.TargetCardInGraveyard; @@ -49,8 +50,8 @@ public class FaerieMacabre extends CardImpl { public FaerieMacabre(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); - this.subtype.add("Faerie"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FaerieMechanist.java b/Mage.Sets/src/mage/cards/f/FaerieMechanist.java index d112a508b8..49b7ac1f37 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieMechanist.java +++ b/Mage.Sets/src/mage/cards/f/FaerieMechanist.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -54,8 +55,8 @@ public class FaerieMechanist extends CardImpl { public FaerieMechanist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(2); // Flying diff --git a/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java b/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java index 9a33c53459..8532d41b62 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java +++ b/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.NamePredicate; @@ -61,8 +62,8 @@ public class FaerieMiscreant extends CardImpl { public FaerieMiscreant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FaerieNoble.java b/Mage.Sets/src/mage/cards/f/FaerieNoble.java index 4e142a8662..9f6689b16e 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieNoble.java +++ b/Mage.Sets/src/mage/cards/f/FaerieNoble.java @@ -59,7 +59,7 @@ public class FaerieNoble extends CardImpl { public FaerieNoble(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FaerieSquadron.java b/Mage.Sets/src/mage/cards/f/FaerieSquadron.java index 4a4310fc09..fb8cfdba0c 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieSquadron.java +++ b/Mage.Sets/src/mage/cards/f/FaerieSquadron.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.counters.CounterType; @@ -52,7 +53,7 @@ public class FaerieSquadron extends CardImpl { public FaerieSquadron(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FaerieSwarm.java b/Mage.Sets/src/mage/cards/f/FaerieSwarm.java index cab81754bb..35701a8c1e 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieSwarm.java +++ b/Mage.Sets/src/mage/cards/f/FaerieSwarm.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -56,7 +57,7 @@ public class FaerieSwarm extends CardImpl { public FaerieSwarm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/f/FaerieTauntings.java b/Mage.Sets/src/mage/cards/f/FaerieTauntings.java index 96d8db2c69..95318c523c 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieTauntings.java +++ b/Mage.Sets/src/mage/cards/f/FaerieTauntings.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.LoseLifeOpponentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class FaerieTauntings extends CardImpl { public FaerieTauntings(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); // Whenever you cast a spell during an opponent's turn, you may have each opponent lose 1 life this.addAbility(new ConditionalTriggeredAbility(new SpellCastControllerTriggeredAbility(new LoseLifeOpponentsEffect(1), true), OnOpponentsTurnCondition.instance, diff --git a/Mage.Sets/src/mage/cards/f/FaerieTrickery.java b/Mage.Sets/src/mage/cards/f/FaerieTrickery.java index 3b65f7075c..3ef7b7e8b8 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieTrickery.java +++ b/Mage.Sets/src/mage/cards/f/FaerieTrickery.java @@ -53,7 +53,7 @@ public class FaerieTrickery extends CardImpl { public FaerieTrickery(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{1}{U}{U}"); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); // Counter target non-Faerie spell. If that spell is countered this way, exile it instead of putting it into its owner's graveyard. diff --git a/Mage.Sets/src/mage/cards/f/FairgroundsTrumpeter.java b/Mage.Sets/src/mage/cards/f/FairgroundsTrumpeter.java index 2a2063fa2c..371aa107a7 100644 --- a/Mage.Sets/src/mage/cards/f/FairgroundsTrumpeter.java +++ b/Mage.Sets/src/mage/cards/f/FairgroundsTrumpeter.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.WatcherScope; import mage.counters.CounterType; @@ -54,7 +55,7 @@ public class FairgroundsTrumpeter extends CardImpl { public FairgroundsTrumpeter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FairgroundsWarden.java b/Mage.Sets/src/mage/cards/f/FairgroundsWarden.java index 1d8cc99529..cda48678f7 100644 --- a/Mage.Sets/src/mage/cards/f/FairgroundsWarden.java +++ b/Mage.Sets/src/mage/cards/f/FairgroundsWarden.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -61,8 +62,8 @@ public class FairgroundsWarden extends CardImpl { public FairgroundsWarden(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Dwarf"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FaithHealer.java b/Mage.Sets/src/mage/cards/f/FaithHealer.java index 4e9f831808..0d0ae59ee1 100644 --- a/Mage.Sets/src/mage/cards/f/FaithHealer.java +++ b/Mage.Sets/src/mage/cards/f/FaithHealer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledEnchantmentPermanent; import mage.target.common.TargetControlledPermanent; @@ -48,8 +49,8 @@ public class FaithHealer extends CardImpl { public FaithHealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FaithOfTheDevoted.java b/Mage.Sets/src/mage/cards/f/FaithOfTheDevoted.java index dd4b8816c8..8b727ded21 100644 --- a/Mage.Sets/src/mage/cards/f/FaithOfTheDevoted.java +++ b/Mage.Sets/src/mage/cards/f/FaithOfTheDevoted.java @@ -1,70 +1,70 @@ -/* - * 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.cards.f; - -import java.util.UUID; -import mage.abilities.common.CycleOrDiscardControllerTriggeredAbility; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.DoIfCostPaid; -import mage.abilities.effects.common.GainLifeEffect; -import mage.abilities.effects.common.LoseLifeOpponentsEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class FaithOfTheDevoted extends CardImpl { - - public FaithOfTheDevoted(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); - - // Whenever you cycle or discard a card, you may pay {1}. If you do, each opponent loses 2 life and you gain 2 life. - Effect subEffect = new GainLifeEffect(2); - subEffect.setText("and you gain 2 life"); - - DoIfCostPaid effect = new DoIfCostPaid( - new LoseLifeOpponentsEffect(2), - new GenericManaCost(1)); - effect.addEffect(subEffect); - - this.addAbility(new CycleOrDiscardControllerTriggeredAbility(effect)); - } - - public FaithOfTheDevoted(final FaithOfTheDevoted card) { - super(card); - } - - @Override - public FaithOfTheDevoted copy() { - return new FaithOfTheDevoted(this); - } -} +/* + * 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.cards.f; + +import java.util.UUID; +import mage.abilities.common.CycleOrDiscardControllerTriggeredAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author Styxo + */ +public class FaithOfTheDevoted extends CardImpl { + + public FaithOfTheDevoted(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + + // Whenever you cycle or discard a card, you may pay {1}. If you do, each opponent loses 2 life and you gain 2 life. + Effect subEffect = new GainLifeEffect(2); + subEffect.setText("and you gain 2 life"); + + DoIfCostPaid effect = new DoIfCostPaid( + new LoseLifeOpponentsEffect(2), + new GenericManaCost(1)); + effect.addEffect(subEffect); + + this.addAbility(new CycleOrDiscardControllerTriggeredAbility(effect)); + } + + public FaithOfTheDevoted(final FaithOfTheDevoted card) { + super(card); + } + + @Override + public FaithOfTheDevoted copy() { + return new FaithOfTheDevoted(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FaithUnbroken.java b/Mage.Sets/src/mage/cards/f/FaithUnbroken.java index 6f44164b5f..71bc4c4d66 100644 --- a/Mage.Sets/src/mage/cards/f/FaithUnbroken.java +++ b/Mage.Sets/src/mage/cards/f/FaithUnbroken.java @@ -64,7 +64,7 @@ public class FaithUnbroken extends CardImpl { public FaithUnbroken(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature you control TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FaithbearerPaladin.java b/Mage.Sets/src/mage/cards/f/FaithbearerPaladin.java index 2d3d8579a1..684a8f1bf8 100644 --- a/Mage.Sets/src/mage/cards/f/FaithbearerPaladin.java +++ b/Mage.Sets/src/mage/cards/f/FaithbearerPaladin.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class FaithbearerPaladin extends CardImpl { public FaithbearerPaladin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FaithfulSquire.java b/Mage.Sets/src/mage/cards/f/FaithfulSquire.java index 76571a4b86..5b932817ee 100644 --- a/Mage.Sets/src/mage/cards/f/FaithfulSquire.java +++ b/Mage.Sets/src/mage/cards/f/FaithfulSquire.java @@ -45,6 +45,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -61,8 +62,8 @@ public class FaithfulSquire extends CardImpl { public FaithfulSquire(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -97,7 +98,7 @@ class KaisoMemoryOfLoyalty extends Token { addSuperType(SuperType.LEGENDARY); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); power = new MageInt(3); toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FaithsFetters.java b/Mage.Sets/src/mage/cards/f/FaithsFetters.java index 6e37a69055..cab9348632 100644 --- a/Mage.Sets/src/mage/cards/f/FaithsFetters.java +++ b/Mage.Sets/src/mage/cards/f/FaithsFetters.java @@ -53,7 +53,7 @@ public class FaithsFetters extends CardImpl { public FaithsFetters(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant permanent TargetPermanent auraTarget = new TargetPermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FalkenrathAristocrat.java b/Mage.Sets/src/mage/cards/f/FalkenrathAristocrat.java index 0226d0fbeb..f70466f494 100644 --- a/Mage.Sets/src/mage/cards/f/FalkenrathAristocrat.java +++ b/Mage.Sets/src/mage/cards/f/FalkenrathAristocrat.java @@ -54,7 +54,7 @@ public class FalkenrathAristocrat extends CardImpl { public FalkenrathAristocrat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{R}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FalkenrathExterminator.java b/Mage.Sets/src/mage/cards/f/FalkenrathExterminator.java index d0a2e6a058..567e1a75c9 100644 --- a/Mage.Sets/src/mage/cards/f/FalkenrathExterminator.java +++ b/Mage.Sets/src/mage/cards/f/FalkenrathExterminator.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -51,8 +52,8 @@ public class FalkenrathExterminator extends CardImpl { public FalkenrathExterminator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Vampire"); - this.subtype.add("Archer"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FalkenrathGorger.java b/Mage.Sets/src/mage/cards/f/FalkenrathGorger.java index cd3d3c3307..a2ad8c4ad0 100644 --- a/Mage.Sets/src/mage/cards/f/FalkenrathGorger.java +++ b/Mage.Sets/src/mage/cards/f/FalkenrathGorger.java @@ -53,8 +53,8 @@ public class FalkenrathGorger extends CardImpl { public FalkenrathGorger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Vampire"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(2); this.toughness = new MageInt(1); /** diff --git a/Mage.Sets/src/mage/cards/f/FalkenrathMarauders.java b/Mage.Sets/src/mage/cards/f/FalkenrathMarauders.java index 2aa34862e8..9433765e71 100644 --- a/Mage.Sets/src/mage/cards/f/FalkenrathMarauders.java +++ b/Mage.Sets/src/mage/cards/f/FalkenrathMarauders.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -46,8 +47,8 @@ public class FalkenrathMarauders extends CardImpl { public FalkenrathMarauders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Vampire"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FalkenrathNoble.java b/Mage.Sets/src/mage/cards/f/FalkenrathNoble.java index 7cd9b755b0..a831ecd967 100644 --- a/Mage.Sets/src/mage/cards/f/FalkenrathNoble.java +++ b/Mage.Sets/src/mage/cards/f/FalkenrathNoble.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -52,7 +53,7 @@ public class FalkenrathNoble extends CardImpl { public FalkenrathNoble(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FalkenrathReaver.java b/Mage.Sets/src/mage/cards/f/FalkenrathReaver.java index a9821d247e..1c6fa22445 100644 --- a/Mage.Sets/src/mage/cards/f/FalkenrathReaver.java +++ b/Mage.Sets/src/mage/cards/f/FalkenrathReaver.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class FalkenrathReaver extends CardImpl { public FalkenrathReaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(2); this.toughness = new MageInt(2); } diff --git a/Mage.Sets/src/mage/cards/f/FalkenrathTorturer.java b/Mage.Sets/src/mage/cards/f/FalkenrathTorturer.java index 00e21d0bee..7b647e76eb 100644 --- a/Mage.Sets/src/mage/cards/f/FalkenrathTorturer.java +++ b/Mage.Sets/src/mage/cards/f/FalkenrathTorturer.java @@ -53,7 +53,7 @@ public class FalkenrathTorturer extends CardImpl { public FalkenrathTorturer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FallenAngel.java b/Mage.Sets/src/mage/cards/f/FallenAngel.java index cdeb3a2fd9..531b82f875 100644 --- a/Mage.Sets/src/mage/cards/f/FallenAngel.java +++ b/Mage.Sets/src/mage/cards/f/FallenAngel.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -48,7 +49,7 @@ public class FallenAngel extends CardImpl { public FallenAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FallenAskari.java b/Mage.Sets/src/mage/cards/f/FallenAskari.java index 31b6c7c39d..61a0cc7373 100644 --- a/Mage.Sets/src/mage/cards/f/FallenAskari.java +++ b/Mage.Sets/src/mage/cards/f/FallenAskari.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlankingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class FallenAskari extends CardImpl { public FallenAskari(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FallenCleric.java b/Mage.Sets/src/mage/cards/f/FallenCleric.java index 7347592ccb..fcbda888f7 100644 --- a/Mage.Sets/src/mage/cards/f/FallenCleric.java +++ b/Mage.Sets/src/mage/cards/f/FallenCleric.java @@ -53,8 +53,8 @@ public class FallenCleric extends CardImpl { public FallenCleric(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FallenFerromancer.java b/Mage.Sets/src/mage/cards/f/FallenFerromancer.java index 33ad077da0..ba77d08382 100644 --- a/Mage.Sets/src/mage/cards/f/FallenFerromancer.java +++ b/Mage.Sets/src/mage/cards/f/FallenFerromancer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class FallenFerromancer extends CardImpl { public FallenFerromancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FallenIdeal.java b/Mage.Sets/src/mage/cards/f/FallenIdeal.java index 38f3031176..72c832a08b 100644 --- a/Mage.Sets/src/mage/cards/f/FallenIdeal.java +++ b/Mage.Sets/src/mage/cards/f/FallenIdeal.java @@ -56,7 +56,7 @@ public class FallenIdeal extends CardImpl { public FallenIdeal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FallowWurm.java b/Mage.Sets/src/mage/cards/f/FallowWurm.java index ab41258f76..3366c06d22 100644 --- a/Mage.Sets/src/mage/cards/f/FallowWurm.java +++ b/Mage.Sets/src/mage/cards/f/FallowWurm.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterLandCard; /** @@ -45,7 +46,7 @@ public class FallowWurm extends CardImpl { public FallowWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/Fallowsage.java b/Mage.Sets/src/mage/cards/f/Fallowsage.java index f93af51ac1..29941e5807 100644 --- a/Mage.Sets/src/mage/cards/f/Fallowsage.java +++ b/Mage.Sets/src/mage/cards/f/Fallowsage.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class Fallowsage extends CardImpl { public Fallowsage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FalseDemise.java b/Mage.Sets/src/mage/cards/f/FalseDemise.java index be315893f2..cef5feae84 100644 --- a/Mage.Sets/src/mage/cards/f/FalseDemise.java +++ b/Mage.Sets/src/mage/cards/f/FalseDemise.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class FalseDemise extends CardImpl { public FalseDemise(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FalseProphet.java b/Mage.Sets/src/mage/cards/f/FalseProphet.java index 5a2de6bea8..a58d41eb94 100644 --- a/Mage.Sets/src/mage/cards/f/FalseProphet.java +++ b/Mage.Sets/src/mage/cards/f/FalseProphet.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ExileAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; /** @@ -45,8 +46,8 @@ public class FalseProphet extends CardImpl { public FalseProphet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FamishedGhoul.java b/Mage.Sets/src/mage/cards/f/FamishedGhoul.java index 1287e1ae83..746b68c137 100644 --- a/Mage.Sets/src/mage/cards/f/FamishedGhoul.java +++ b/Mage.Sets/src/mage/cards/f/FamishedGhoul.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.target.common.TargetCardInASingleGraveyard; @@ -49,7 +50,7 @@ public class FamishedGhoul extends CardImpl { public FamishedGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FanBearer.java b/Mage.Sets/src/mage/cards/f/FanBearer.java index e7f0b2d17f..27ff675c8a 100644 --- a/Mage.Sets/src/mage/cards/f/FanBearer.java +++ b/Mage.Sets/src/mage/cards/f/FanBearer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class FanBearer extends CardImpl { public FanBearer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FanaticOfMogis.java b/Mage.Sets/src/mage/cards/f/FanaticOfMogis.java index 2e12ffb7be..5abbdee8fb 100644 --- a/Mage.Sets/src/mage/cards/f/FanaticOfMogis.java +++ b/Mage.Sets/src/mage/cards/f/FanaticOfMogis.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamagePlayersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Outcome; import mage.constants.TargetController; @@ -48,8 +49,8 @@ public class FanaticOfMogis extends CardImpl { public FanaticOfMogis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FanaticOfXenagos.java b/Mage.Sets/src/mage/cards/f/FanaticOfXenagos.java index 7883b85642..7d8170a8cc 100644 --- a/Mage.Sets/src/mage/cards/f/FanaticOfXenagos.java +++ b/Mage.Sets/src/mage/cards/f/FanaticOfXenagos.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.TributeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -51,8 +52,8 @@ public class FanaticOfXenagos extends CardImpl { public FanaticOfXenagos(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FangOfThePack.java b/Mage.Sets/src/mage/cards/f/FangOfThePack.java index 84534f780c..761816efd9 100644 --- a/Mage.Sets/src/mage/cards/f/FangOfThePack.java +++ b/Mage.Sets/src/mage/cards/f/FangOfThePack.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MeleeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.common.FilterControlledCreaturePermanent; @@ -57,7 +58,7 @@ public class FangOfThePack extends CardImpl { public FangOfThePack(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FangSkulkin.java b/Mage.Sets/src/mage/cards/f/FangSkulkin.java index 210fb4848d..cc3c912acc 100644 --- a/Mage.Sets/src/mage/cards/f/FangSkulkin.java +++ b/Mage.Sets/src/mage/cards/f/FangSkulkin.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -57,7 +58,7 @@ public class FangSkulkin extends CardImpl { public FangSkulkin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(2); this.toughness = new MageInt(1); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(WitherAbility.getInstance(), Duration.EndOfTurn), new GenericManaCost(2)); diff --git a/Mage.Sets/src/mage/cards/f/FangrenFirstborn.java b/Mage.Sets/src/mage/cards/f/FangrenFirstborn.java index ae12d4c0ed..b223ab2722 100644 --- a/Mage.Sets/src/mage/cards/f/FangrenFirstborn.java +++ b/Mage.Sets/src/mage/cards/f/FangrenFirstborn.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterAttackingCreature; @@ -45,7 +46,7 @@ public class FangrenFirstborn extends CardImpl { public FangrenFirstborn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FangrenHunter.java b/Mage.Sets/src/mage/cards/f/FangrenHunter.java index 221eaed535..e993362694 100644 --- a/Mage.Sets/src/mage/cards/f/FangrenHunter.java +++ b/Mage.Sets/src/mage/cards/f/FangrenHunter.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class FangrenHunter extends CardImpl { public FangrenHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FangrenMarauder.java b/Mage.Sets/src/mage/cards/f/FangrenMarauder.java index c7ab546a6e..cde625c951 100644 --- a/Mage.Sets/src/mage/cards/f/FangrenMarauder.java +++ b/Mage.Sets/src/mage/cards/f/FangrenMarauder.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterArtifactPermanent; @@ -45,7 +46,7 @@ public class FangrenMarauder extends CardImpl { public FangrenMarauder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/f/FangrenPathcutter.java b/Mage.Sets/src/mage/cards/f/FangrenPathcutter.java index ec03e642f6..305aa2d7ba 100644 --- a/Mage.Sets/src/mage/cards/f/FangrenPathcutter.java +++ b/Mage.Sets/src/mage/cards/f/FangrenPathcutter.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterAttackingCreature; @@ -46,7 +47,7 @@ public class FangrenPathcutter extends CardImpl { public FangrenPathcutter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/f/FarbogBoneflinger.java b/Mage.Sets/src/mage/cards/f/FarbogBoneflinger.java index 22076bccfb..35dbf75631 100644 --- a/Mage.Sets/src/mage/cards/f/FarbogBoneflinger.java +++ b/Mage.Sets/src/mage/cards/f/FarbogBoneflinger.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -46,7 +47,7 @@ public class FarbogBoneflinger extends CardImpl { public FarbogBoneflinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FarbogExplorer.java b/Mage.Sets/src/mage/cards/f/FarbogExplorer.java index f6a1baefad..f33fc21778 100644 --- a/Mage.Sets/src/mage/cards/f/FarbogExplorer.java +++ b/Mage.Sets/src/mage/cards/f/FarbogExplorer.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class FarbogExplorer extends CardImpl { public FarbogExplorer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FarbogRevenant.java b/Mage.Sets/src/mage/cards/f/FarbogRevenant.java index f33ad1ca33..3bdfb80d93 100644 --- a/Mage.Sets/src/mage/cards/f/FarbogRevenant.java +++ b/Mage.Sets/src/mage/cards/f/FarbogRevenant.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.SkulkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class FarbogRevenant extends CardImpl { public FarbogRevenant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FarhavenElf.java b/Mage.Sets/src/mage/cards/f/FarhavenElf.java index f3d2322d3a..ca27b784fa 100644 --- a/Mage.Sets/src/mage/cards/f/FarhavenElf.java +++ b/Mage.Sets/src/mage/cards/f/FarhavenElf.java @@ -33,6 +33,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; @@ -46,8 +47,8 @@ public class FarhavenElf extends CardImpl { public FarhavenElf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FarmMarket.java b/Mage.Sets/src/mage/cards/f/FarmMarket.java index f907b6a332..19b1fc65a2 100644 --- a/Mage.Sets/src/mage/cards/f/FarmMarket.java +++ b/Mage.Sets/src/mage/cards/f/FarmMarket.java @@ -1,71 +1,71 @@ -/* - * 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.cards.f; - -import java.util.UUID; -import mage.abilities.effects.common.DestroyTargetEffect; -import mage.abilities.effects.common.DrawDiscardControllerEffect; -import mage.abilities.keyword.AftermathAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.SplitCard; -import mage.constants.CardType; -import mage.constants.SpellAbilityType; -import mage.target.common.TargetAttackingOrBlockingCreature; - -/** - * - * @author LevelX2 - */ -public class FarmMarket extends SplitCard { - - public FarmMarket(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{2}{W}", "{2}{U}", SpellAbilityType.SPLIT_AFTERMATH); - - // Destroy target attacking or blocking creature. - getLeftHalfCard().getSpellAbility().addEffect(new DestroyTargetEffect()); - getLeftHalfCard().getSpellAbility().addTarget(new TargetAttackingOrBlockingCreature()); - - // Market {2}{U} - // Sorcery - // Aftermath - ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true)); - // Draw two cards, then discard two cards - getRightHalfCard().getSpellAbility().addEffect(new DrawDiscardControllerEffect(2, 2)); - - } - - public FarmMarket(final FarmMarket card) { - super(card); - } - - @Override - public FarmMarket copy() { - return new FarmMarket(this); - } -} +/* + * 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.cards.f; + +import java.util.UUID; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.DrawDiscardControllerEffect; +import mage.abilities.keyword.AftermathAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.SplitCard; +import mage.constants.CardType; +import mage.constants.SpellAbilityType; +import mage.target.common.TargetAttackingOrBlockingCreature; + +/** + * + * @author LevelX2 + */ +public class FarmMarket extends SplitCard { + + public FarmMarket(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{2}{W}", "{2}{U}", SpellAbilityType.SPLIT_AFTERMATH); + + // Destroy target attacking or blocking creature. + getLeftHalfCard().getSpellAbility().addEffect(new DestroyTargetEffect()); + getLeftHalfCard().getSpellAbility().addTarget(new TargetAttackingOrBlockingCreature()); + + // Market {2}{U} + // Sorcery + // Aftermath + ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true)); + // Draw two cards, then discard two cards + getRightHalfCard().getSpellAbility().addEffect(new DrawDiscardControllerEffect(2, 2)); + + } + + public FarmMarket(final FarmMarket card) { + super(card); + } + + @Override + public FarmMarket copy() { + return new FarmMarket(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/Farmstead.java b/Mage.Sets/src/mage/cards/f/Farmstead.java index 0aa733ddf7..b1ddf16126 100644 --- a/Mage.Sets/src/mage/cards/f/Farmstead.java +++ b/Mage.Sets/src/mage/cards/f/Farmstead.java @@ -52,7 +52,7 @@ public class Farmstead extends CardImpl { public Farmstead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}{W}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FarrelitePriest.java b/Mage.Sets/src/mage/cards/f/FarrelitePriest.java index 1c66774555..07c9200b3c 100644 --- a/Mage.Sets/src/mage/cards/f/FarrelitePriest.java +++ b/Mage.Sets/src/mage/cards/f/FarrelitePriest.java @@ -41,6 +41,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -53,8 +54,8 @@ public class FarrelitePriest extends CardImpl { public FarrelitePriest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FarrelsMantle.java b/Mage.Sets/src/mage/cards/f/FarrelsMantle.java index 2060fc3593..380f184ab9 100644 --- a/Mage.Sets/src/mage/cards/f/FarrelsMantle.java +++ b/Mage.Sets/src/mage/cards/f/FarrelsMantle.java @@ -58,7 +58,7 @@ public class FarrelsMantle extends CardImpl { public FarrelsMantle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FarrelsZealot.java b/Mage.Sets/src/mage/cards/f/FarrelsZealot.java index c9ff54606b..6ed4e9f1f9 100644 --- a/Mage.Sets/src/mage/cards/f/FarrelsZealot.java +++ b/Mage.Sets/src/mage/cards/f/FarrelsZealot.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.AssignNoCombatDamageSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class FarrelsZealot extends CardImpl { public FarrelsZealot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FatalAttraction.java b/Mage.Sets/src/mage/cards/f/FatalAttraction.java index 765c2f81cf..f4ed25b703 100644 --- a/Mage.Sets/src/mage/cards/f/FatalAttraction.java +++ b/Mage.Sets/src/mage/cards/f/FatalAttraction.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -51,7 +52,7 @@ public class FatalAttraction extends CardImpl { public FatalAttraction(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FatalFrenzy.java b/Mage.Sets/src/mage/cards/f/FatalFrenzy.java index 08ab764a29..2794d52a20 100644 --- a/Mage.Sets/src/mage/cards/f/FatalFrenzy.java +++ b/Mage.Sets/src/mage/cards/f/FatalFrenzy.java @@ -55,11 +55,15 @@ import mage.target.targetpointer.FixedTarget; public class FatalFrenzy extends CardImpl { public FatalFrenzy(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); // Until end of turn, target creature you control gains trample and gets +X/+0, where X is its power. Sacrifice it at the beginning of the next end step. - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new BoostTargetEffect(new TargetPermanentPowerCount(), new StaticValue(0), Duration.EndOfTurn, true)); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn) + .setText("Until end of turn, target creature you control gains trample") + ); + this.getSpellAbility().addEffect(new BoostTargetEffect(new TargetPermanentPowerCount(), new StaticValue(0), Duration.EndOfTurn, true) + .setText("and gets +X/+0, where X is its power.") + ); this.getSpellAbility().addEffect(new FatalFrenzyEffect()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/f/FatalMutation.java b/Mage.Sets/src/mage/cards/f/FatalMutation.java index b49813e1bd..e1eb3a2101 100644 --- a/Mage.Sets/src/mage/cards/f/FatalMutation.java +++ b/Mage.Sets/src/mage/cards/f/FatalMutation.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -53,7 +54,7 @@ public class FatalMutation extends CardImpl { public FatalMutation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FateForetold.java b/Mage.Sets/src/mage/cards/f/FateForetold.java index fc39dc975b..23343f0715 100644 --- a/Mage.Sets/src/mage/cards/f/FateForetold.java +++ b/Mage.Sets/src/mage/cards/f/FateForetold.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class FateForetold extends CardImpl { public FateForetold(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/f/FateUnraveler.java b/Mage.Sets/src/mage/cards/f/FateUnraveler.java index 80f0d2c0f5..8c4df6e5b2 100644 --- a/Mage.Sets/src/mage/cards/f/FateUnraveler.java +++ b/Mage.Sets/src/mage/cards/f/FateUnraveler.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class FateUnraveler extends CardImpl { public FateUnraveler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{B}"); - this.subtype.add("Hag"); + this.subtype.add(SubType.HAG); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FatedInfatuation.java b/Mage.Sets/src/mage/cards/f/FatedInfatuation.java index db36763b33..a5c82de3d8 100644 --- a/Mage.Sets/src/mage/cards/f/FatedInfatuation.java +++ b/Mage.Sets/src/mage/cards/f/FatedInfatuation.java @@ -30,7 +30,7 @@ package mage.cards.f; import java.util.UUID; import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.decorator.ConditionalOneShotEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -48,7 +48,7 @@ public class FatedInfatuation extends CardImpl { // Create a token that's a copy of target creature you control. If it's your turn, scry 2. - this.getSpellAbility().addEffect(new PutTokenOntoBattlefieldCopyTargetEffect()); + this.getSpellAbility().addEffect(new CreateTokenCopyTargetEffect()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new ScryEffect(2), MyTurnCondition.instance, "If it's your turn, scry 2")); } diff --git a/Mage.Sets/src/mage/cards/f/Fatespinner.java b/Mage.Sets/src/mage/cards/f/Fatespinner.java index e14082372b..7eed6c6fb6 100644 --- a/Mage.Sets/src/mage/cards/f/Fatespinner.java +++ b/Mage.Sets/src/mage/cards/f/Fatespinner.java @@ -54,8 +54,8 @@ public class Fatespinner extends CardImpl { public Fatespinner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/Fatestitcher.java b/Mage.Sets/src/mage/cards/f/Fatestitcher.java index d287dc7346..97e2363447 100644 --- a/Mage.Sets/src/mage/cards/f/Fatestitcher.java +++ b/Mage.Sets/src/mage/cards/f/Fatestitcher.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -56,8 +57,8 @@ public class Fatestitcher extends CardImpl { public Fatestitcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FathomFeeder.java b/Mage.Sets/src/mage/cards/f/FathomFeeder.java index 9feb4b51c0..ee461bf0b2 100644 --- a/Mage.Sets/src/mage/cards/f/FathomFeeder.java +++ b/Mage.Sets/src/mage/cards/f/FathomFeeder.java @@ -42,6 +42,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -55,8 +56,8 @@ public class FathomFeeder extends CardImpl { public FathomFeeder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FathomFleetCaptain.java b/Mage.Sets/src/mage/cards/f/FathomFleetCaptain.java new file mode 100644 index 0000000000..9d7913136a --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FathomFleetCaptain.java @@ -0,0 +1,90 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.game.permanent.token.PirateToken; + +/** + * + * @author TheElk801 + */ +public class FathomFleetCaptain extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("another nontoken Pirate"); + + static { + filter.add(new SubtypePredicate(SubType.PIRATE)); + filter.add(new AnotherPredicate()); + filter.add(Predicates.not(new TokenPredicate())); + } + + public FathomFleetCaptain(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Menace + this.addAbility(new MenaceAbility()); + + // Whenever Fathom Fleet Captain attacks, if you control another nontoken Pirate, you may pay {2}. If you do, creature a 2/2 black Pirate creature token with menace. + this.addAbility(new ConditionalTriggeredAbility( + new AttacksTriggeredAbility(new DoIfCostPaid(new CreateTokenEffect(new PirateToken()), new GenericManaCost(2)), false), + new PermanentsOnTheBattlefieldCondition(filter), + "Whenever {this} attacks, if you control another nontoken Pirate, you may pay {2}. If you do, create a 2/2 black Pirate creature token with menace")); + } + + public FathomFleetCaptain(final FathomFleetCaptain card) { + super(card); + } + + @Override + public FathomFleetCaptain copy() { + return new FathomFleetCaptain(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FathomFleetCutthroat.java b/Mage.Sets/src/mage/cards/f/FathomFleetCutthroat.java new file mode 100644 index 0000000000..cb3a84b619 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FathomFleetCutthroat.java @@ -0,0 +1,80 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.filter.predicate.permanent.WasDealtDamageThisTurnPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class FathomFleetCutthroat extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls that was dealt damage this turn"); + + static { + filter.add(new WasDealtDamageThisTurnPredicate()); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public FathomFleetCutthroat(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Fathom Fleet Cutthroat enters the battlefield, destroy target creature an opponent controls that was dealt damage this turn. + Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public FathomFleetCutthroat(final FathomFleetCutthroat card) { + super(card); + } + + @Override + public FathomFleetCutthroat copy() { + return new FathomFleetCutthroat(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FathomFleetFirebrand.java b/Mage.Sets/src/mage/cards/f/FathomFleetFirebrand.java new file mode 100644 index 0000000000..9e03ba0b03 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FathomFleetFirebrand.java @@ -0,0 +1,68 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class FathomFleetFirebrand extends CardImpl { + + public FathomFleetFirebrand(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {1}{r}: Fathom Fleet Firebrand gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{1}{R}"))); + } + + public FathomFleetFirebrand(final FathomFleetFirebrand card) { + super(card); + } + + @Override + public FathomFleetFirebrand copy() { + return new FathomFleetFirebrand(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FathomMage.java b/Mage.Sets/src/mage/cards/f/FathomMage.java index e898a53523..dd60e4a70d 100644 --- a/Mage.Sets/src/mage/cards/f/FathomMage.java +++ b/Mage.Sets/src/mage/cards/f/FathomMage.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EvolveAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -50,8 +51,8 @@ public class FathomMage extends CardImpl { public FathomMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FathomSeer.java b/Mage.Sets/src/mage/cards/f/FathomSeer.java index 6bc18130f5..02d7b8a18f 100644 --- a/Mage.Sets/src/mage/cards/f/FathomSeer.java +++ b/Mage.Sets/src/mage/cards/f/FathomSeer.java @@ -54,7 +54,7 @@ public class FathomSeer extends CardImpl { } public FathomSeer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FaultRiders.java b/Mage.Sets/src/mage/cards/f/FaultRiders.java index 982df06cff..97f98ba005 100644 --- a/Mage.Sets/src/mage/cards/f/FaultRiders.java +++ b/Mage.Sets/src/mage/cards/f/FaultRiders.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -52,8 +53,8 @@ public class FaultRiders extends CardImpl { public FaultRiders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/Faultgrinder.java b/Mage.Sets/src/mage/cards/f/Faultgrinder.java index 700340cf26..0e4a4f9c0a 100644 --- a/Mage.Sets/src/mage/cards/f/Faultgrinder.java +++ b/Mage.Sets/src/mage/cards/f/Faultgrinder.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.Target; import mage.target.common.TargetLandPermanent; @@ -48,7 +49,7 @@ public class Faultgrinder extends CardImpl { public Faultgrinder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FaunaShaman.java b/Mage.Sets/src/mage/cards/f/FaunaShaman.java index 9021cf38a5..ff75aecdba 100644 --- a/Mage.Sets/src/mage/cards/f/FaunaShaman.java +++ b/Mage.Sets/src/mage/cards/f/FaunaShaman.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -53,8 +54,8 @@ public class FaunaShaman extends CardImpl { public FaunaShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FavorOfTheMighty.java b/Mage.Sets/src/mage/cards/f/FavorOfTheMighty.java index 8b094dca7d..aea2316e0f 100644 --- a/Mage.Sets/src/mage/cards/f/FavorOfTheMighty.java +++ b/Mage.Sets/src/mage/cards/f/FavorOfTheMighty.java @@ -54,7 +54,7 @@ public class FavorOfTheMighty extends CardImpl { public FavorOfTheMighty(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.ENCHANTMENT}, "{1}{W}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); // Each creature with the highest converted mana cost has protection from all colors. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new FavorOfTheMightyEffect())); diff --git a/Mage.Sets/src/mage/cards/f/FavorOfTheOverbeing.java b/Mage.Sets/src/mage/cards/f/FavorOfTheOverbeing.java index d0dcffe748..0d040c84d6 100644 --- a/Mage.Sets/src/mage/cards/f/FavorOfTheOverbeing.java +++ b/Mage.Sets/src/mage/cards/f/FavorOfTheOverbeing.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -56,7 +57,7 @@ public class FavorOfTheOverbeing extends CardImpl { public FavorOfTheOverbeing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G/U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/f/FavorOfTheWoods.java b/Mage.Sets/src/mage/cards/f/FavorOfTheWoods.java index 62625d29c6..8a8a43e5fe 100644 --- a/Mage.Sets/src/mage/cards/f/FavorOfTheWoods.java +++ b/Mage.Sets/src/mage/cards/f/FavorOfTheWoods.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class FavorOfTheWoods extends CardImpl { public FavorOfTheWoods(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/f/FavorableDestiny.java b/Mage.Sets/src/mage/cards/f/FavorableDestiny.java new file mode 100644 index 0000000000..3ead00717a --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FavorableDestiny.java @@ -0,0 +1,130 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.ObjectColor; +import mage.constants.SubType; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.EnchantedCreatureColorCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.ShroudAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class FavorableDestiny extends CardImpl { + + public FavorableDestiny(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + 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 as long as it's white. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new ConditionalContinuousEffect( + new BoostEnchantedEffect(1, 2), + new EnchantedCreatureColorCondition(ObjectColor.WHITE), + "Enchanted creature gets +1/+2 as long as it's white." + ) + )); + + // Enchanted creature has shroud as long as its controller controls another creature. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new ConditionalContinuousEffect( + new GainAbilityAttachedEffect( + ShroudAbility.getInstance(), + AttachmentType.AURA + ), + new FavorableDestinyCondition(), + "Enchanted creature has shroud as long as its controller controls another creature." + ) + )); + } + + public FavorableDestiny(final FavorableDestiny card) { + super(card); + } + + @Override + public FavorableDestiny copy() { + return new FavorableDestiny(this); + } +} + +class FavorableDestinyCondition implements Condition { + + public FavorableDestinyCondition() { + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent enchantment = game.getPermanent(source.getSourceId()); + if (enchantment != null) { + Permanent creature = game.getPermanent(enchantment.getAttachedTo()); + if (creature != null) { + Player controller = game.getPlayer(creature.getControllerId()); + if (controller != null) { + for (Permanent perm : game.getBattlefield().getActivePermanents(controller.getId(), game)) { + if (perm.getControllerId().equals(controller.getId()) + && perm.isCreature() + && !perm.equals(creature)) { + return true; + } + } + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/f/FavoredHoplite.java b/Mage.Sets/src/mage/cards/f/FavoredHoplite.java index 97f772fc19..28a4488611 100644 --- a/Mage.Sets/src/mage/cards/f/FavoredHoplite.java +++ b/Mage.Sets/src/mage/cards/f/FavoredHoplite.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.counters.CounterType; @@ -47,8 +48,8 @@ public class FavoredHoplite extends CardImpl { public FavoredHoplite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/Fear.java b/Mage.Sets/src/mage/cards/f/Fear.java index f6dabf5497..b407165e94 100644 --- a/Mage.Sets/src/mage/cards/f/Fear.java +++ b/Mage.Sets/src/mage/cards/f/Fear.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class Fear extends CardImpl { public Fear(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/f/FearsomeTemper.java b/Mage.Sets/src/mage/cards/f/FearsomeTemper.java index 8f75025ee5..31e1a7b4c5 100644 --- a/Mage.Sets/src/mage/cards/f/FearsomeTemper.java +++ b/Mage.Sets/src/mage/cards/f/FearsomeTemper.java @@ -52,7 +52,7 @@ public class FearsomeTemper extends CardImpl { public FearsomeTemper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/f/FeastOfTheUnicorn.java b/Mage.Sets/src/mage/cards/f/FeastOfTheUnicorn.java index 908b771dcf..7423851dbd 100644 --- a/Mage.Sets/src/mage/cards/f/FeastOfTheUnicorn.java +++ b/Mage.Sets/src/mage/cards/f/FeastOfTheUnicorn.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class FeastOfTheUnicorn extends CardImpl { public FeastOfTheUnicorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/f/Feebleness.java b/Mage.Sets/src/mage/cards/f/Feebleness.java index 66f2fb0faf..320497fdd7 100644 --- a/Mage.Sets/src/mage/cards/f/Feebleness.java +++ b/Mage.Sets/src/mage/cards/f/Feebleness.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class Feebleness extends CardImpl { public Feebleness(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/f/Feedback.java b/Mage.Sets/src/mage/cards/f/Feedback.java index 27f7892f25..a6140d0a01 100644 --- a/Mage.Sets/src/mage/cards/f/Feedback.java +++ b/Mage.Sets/src/mage/cards/f/Feedback.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class Feedback extends CardImpl { public Feedback(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant enchantment TargetPermanent auraTarget = new TargetEnchantmentPermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FeldonOfTheThirdPath.java b/Mage.Sets/src/mage/cards/f/FeldonOfTheThirdPath.java index 1903cd2290..b26b85adc0 100644 --- a/Mage.Sets/src/mage/cards/f/FeldonOfTheThirdPath.java +++ b/Mage.Sets/src/mage/cards/f/FeldonOfTheThirdPath.java @@ -36,12 +36,13 @@ import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbil import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.effects.common.SacrificeTargetEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class FeldonOfTheThirdPath extends CardImpl { public FeldonOfTheThirdPath(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(3); @@ -103,7 +104,7 @@ class FeldonOfTheThirdPathEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Card card = game.getCard(getTargetPointer().getFirst(game, source)); if (card != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), CardType.ARTIFACT, true); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), CardType.ARTIFACT, true); effect.setTargetPointer(new FixedTarget(card.getId(), game.getState().getZoneChangeCounter(card.getId()))); effect.apply(game, source); for (Permanent addedToken : effect.getAddedPermanent()) { diff --git a/Mage.Sets/src/mage/cards/f/FelhideBrawler.java b/Mage.Sets/src/mage/cards/f/FelhideBrawler.java index f1c720e790..bd4544d2d9 100644 --- a/Mage.Sets/src/mage/cards/f/FelhideBrawler.java +++ b/Mage.Sets/src/mage/cards/f/FelhideBrawler.java @@ -55,7 +55,7 @@ public class FelhideBrawler extends CardImpl { public FelhideBrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Minotaur"); + this.subtype.add(SubType.MINOTAUR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FelhideMinotaur.java b/Mage.Sets/src/mage/cards/f/FelhideMinotaur.java index 6b67c5177b..0749dfffa7 100644 --- a/Mage.Sets/src/mage/cards/f/FelhideMinotaur.java +++ b/Mage.Sets/src/mage/cards/f/FelhideMinotaur.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class FelhideMinotaur extends CardImpl { public FelhideMinotaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Minotaur"); + this.subtype.add(SubType.MINOTAUR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FelhidePetrifier.java b/Mage.Sets/src/mage/cards/f/FelhidePetrifier.java index 6230d8f525..40e024a558 100644 --- a/Mage.Sets/src/mage/cards/f/FelhidePetrifier.java +++ b/Mage.Sets/src/mage/cards/f/FelhidePetrifier.java @@ -48,8 +48,8 @@ public class FelhidePetrifier extends CardImpl { public FelhidePetrifier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Minotaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FelhideSpiritbinder.java b/Mage.Sets/src/mage/cards/f/FelhideSpiritbinder.java index 8da4e58b75..3ffef384f9 100644 --- a/Mage.Sets/src/mage/cards/f/FelhideSpiritbinder.java +++ b/Mage.Sets/src/mage/cards/f/FelhideSpiritbinder.java @@ -36,11 +36,12 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.keyword.InspiredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -63,8 +64,8 @@ public class FelhideSpiritbinder extends CardImpl { public FelhideSpiritbinder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(4); @@ -105,7 +106,7 @@ class FelhideSpiritbinderEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanentOrLKIBattlefield(source.getFirstTarget()); if (permanent != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(null, CardType.ENCHANTMENT, true); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(null, CardType.ENCHANTMENT, true); effect.setTargetPointer(getTargetPointer()); if (effect.apply(game, source)) { for (Permanent tokenPermanent : effect.getAddedPermanent()) { diff --git a/Mage.Sets/src/mage/cards/f/FelidarCub.java b/Mage.Sets/src/mage/cards/f/FelidarCub.java index 978842c67c..3511685981 100644 --- a/Mage.Sets/src/mage/cards/f/FelidarCub.java +++ b/Mage.Sets/src/mage/cards/f/FelidarCub.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetEnchantmentPermanent; @@ -47,8 +48,8 @@ public class FelidarCub extends CardImpl { public FelidarCub(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Beast"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FelidarGuardian.java b/Mage.Sets/src/mage/cards/f/FelidarGuardian.java index 2cb2214b31..c7acc317d9 100644 --- a/Mage.Sets/src/mage/cards/f/FelidarGuardian.java +++ b/Mage.Sets/src/mage/cards/f/FelidarGuardian.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetE import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.common.TargetControlledPermanent; @@ -56,8 +57,8 @@ public class FelidarGuardian extends CardImpl { public FelidarGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Beast"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.BEAST); this.power = new MageInt(1); this.toughness = new MageInt(4); @@ -65,7 +66,7 @@ public class FelidarGuardian extends CardImpl { Effect effect = new ExileTargetForSourceEffect(); effect.setApplyEffectsAfter(); Ability ability = new EntersBattlefieldTriggeredAbility(effect, true); - ability.addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect(false, true)); + ability.addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect()); ability.addTarget(new TargetControlledPermanent(filter)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/f/FelidarSovereign.java b/Mage.Sets/src/mage/cards/f/FelidarSovereign.java index 24f5d1f7c7..cc4a50695d 100644 --- a/Mage.Sets/src/mage/cards/f/FelidarSovereign.java +++ b/Mage.Sets/src/mage/cards/f/FelidarSovereign.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.game.Game; @@ -51,8 +52,8 @@ public class FelidarSovereign extends CardImpl { public FelidarSovereign(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Beast"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/f/FelidarUmbra.java b/Mage.Sets/src/mage/cards/f/FelidarUmbra.java index d152f4d74a..45aeffa4e2 100644 --- a/Mage.Sets/src/mage/cards/f/FelidarUmbra.java +++ b/Mage.Sets/src/mage/cards/f/FelidarUmbra.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -55,7 +56,7 @@ public class FelidarUmbra extends CardImpl { public FelidarUmbra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/f/FellFlagship.java b/Mage.Sets/src/mage/cards/f/FellFlagship.java new file mode 100644 index 0000000000..c518dd75a1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FellFlagship.java @@ -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.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.constants.SubType; +import mage.abilities.keyword.CrewAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author TheElk801 + */ +public class FellFlagship extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Pirates"); + + static { + filter.add(new SubtypePredicate(SubType.PIRATE)); + } + + public FellFlagship(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + this.subtype.add(SubType.VEHICLE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Pirates you control get +1/+0. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 0, Duration.WhileOnBattlefield, filter))); + + // Whenever Fell Flagship deals combat damage to a player, that player discards a card. + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DiscardTargetEffect(1, false), false, true)); + + // Crew 3 + this.addAbility(new CrewAbility(3)); + + } + + public FellFlagship(final FellFlagship card) { + super(card); + } + + @Override + public FellFlagship copy() { + return new FellFlagship(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FellShepherd.java b/Mage.Sets/src/mage/cards/f/FellShepherd.java index 8f0081a4f9..2f843e96be 100644 --- a/Mage.Sets/src/mage/cards/f/FellShepherd.java +++ b/Mage.Sets/src/mage/cards/f/FellShepherd.java @@ -60,7 +60,7 @@ public class FellShepherd extends CardImpl { public FellShepherd(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(8); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/f/FemerefArchers.java b/Mage.Sets/src/mage/cards/f/FemerefArchers.java index 5a1e4f375e..3ec86db136 100644 --- a/Mage.Sets/src/mage/cards/f/FemerefArchers.java +++ b/Mage.Sets/src/mage/cards/f/FemerefArchers.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterAttackingCreature; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -56,8 +57,8 @@ public class FemerefArchers extends CardImpl { public FemerefArchers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FemerefEnchantress.java b/Mage.Sets/src/mage/cards/f/FemerefEnchantress.java index 7960891b5f..824966e7d7 100644 --- a/Mage.Sets/src/mage/cards/f/FemerefEnchantress.java +++ b/Mage.Sets/src/mage/cards/f/FemerefEnchantress.java @@ -33,6 +33,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -46,8 +47,8 @@ public class FemerefEnchantress extends CardImpl { public FemerefEnchantress(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FemerefHealer.java b/Mage.Sets/src/mage/cards/f/FemerefHealer.java index 5347c92f03..4eaf6ec881 100644 --- a/Mage.Sets/src/mage/cards/f/FemerefHealer.java +++ b/Mage.Sets/src/mage/cards/f/FemerefHealer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class FemerefHealer extends CardImpl { public FemerefHealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FemerefKnight.java b/Mage.Sets/src/mage/cards/f/FemerefKnight.java index a221c1c1d4..25219c46a0 100644 --- a/Mage.Sets/src/mage/cards/f/FemerefKnight.java +++ b/Mage.Sets/src/mage/cards/f/FemerefKnight.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class FemerefKnight extends CardImpl { public FemerefKnight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FemerefScouts.java b/Mage.Sets/src/mage/cards/f/FemerefScouts.java index 8bb11d89ec..d572bded88 100644 --- a/Mage.Sets/src/mage/cards/f/FemerefScouts.java +++ b/Mage.Sets/src/mage/cards/f/FemerefScouts.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class FemerefScouts extends CardImpl { public FemerefScouts(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FenHauler.java b/Mage.Sets/src/mage/cards/f/FenHauler.java index 302982662c..33e12b19cf 100644 --- a/Mage.Sets/src/mage/cards/f/FenHauler.java +++ b/Mage.Sets/src/mage/cards/f/FenHauler.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ImproviseAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -54,7 +55,7 @@ public class FenHauler extends CardImpl { public FenHauler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/f/FenStalker.java b/Mage.Sets/src/mage/cards/f/FenStalker.java index 9279bf4aca..5a431d6087 100644 --- a/Mage.Sets/src/mage/cards/f/FenStalker.java +++ b/Mage.Sets/src/mage/cards/f/FenStalker.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -58,7 +59,7 @@ public class FenStalker extends CardImpl { public FenStalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Nightstalker"); + this.subtype.add(SubType.NIGHTSTALKER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FencerClique.java b/Mage.Sets/src/mage/cards/f/FencerClique.java index 0bad67a90d..56a3c62392 100644 --- a/Mage.Sets/src/mage/cards/f/FencerClique.java +++ b/Mage.Sets/src/mage/cards/f/FencerClique.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class FencerClique extends CardImpl { public FencerClique(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FencersMagemark.java b/Mage.Sets/src/mage/cards/f/FencersMagemark.java index fa3f44e1f5..e01a80d2e6 100644 --- a/Mage.Sets/src/mage/cards/f/FencersMagemark.java +++ b/Mage.Sets/src/mage/cards/f/FencersMagemark.java @@ -59,7 +59,7 @@ public class FencersMagemark extends CardImpl { public FencersMagemark(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FencingAce.java b/Mage.Sets/src/mage/cards/f/FencingAce.java index d64f5a3514..ec57bb4b30 100644 --- a/Mage.Sets/src/mage/cards/f/FencingAce.java +++ b/Mage.Sets/src/mage/cards/f/FencingAce.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class FencingAce extends CardImpl { public FencingAce(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FendeepSummoner.java b/Mage.Sets/src/mage/cards/f/FendeepSummoner.java index 6b0085390f..558b01bb47 100644 --- a/Mage.Sets/src/mage/cards/f/FendeepSummoner.java +++ b/Mage.Sets/src/mage/cards/f/FendeepSummoner.java @@ -57,8 +57,8 @@ public class FendeepSummoner extends CardImpl { public FendeepSummoner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Treefolk"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(5); @@ -84,8 +84,8 @@ class FendeepSummonerToken extends Token { public FendeepSummonerToken() { super("", "3/5 Treefolk Warrior"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Treefolk"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(5); } diff --git a/Mage.Sets/src/mage/cards/f/FeralAnimist.java b/Mage.Sets/src/mage/cards/f/FeralAnimist.java index eac9ee5689..ca007ff7ad 100644 --- a/Mage.Sets/src/mage/cards/f/FeralAnimist.java +++ b/Mage.Sets/src/mage/cards/f/FeralAnimist.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class FeralAnimist extends CardImpl { public FeralAnimist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{G}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FeralDeceiver.java b/Mage.Sets/src/mage/cards/f/FeralDeceiver.java index 00a45cced8..5bde2e76fc 100644 --- a/Mage.Sets/src/mage/cards/f/FeralDeceiver.java +++ b/Mage.Sets/src/mage/cards/f/FeralDeceiver.java @@ -29,20 +29,29 @@ package mage.cards.f; import java.util.UUID; import mage.MageInt; +import mage.MageObject; import mage.abilities.Ability; -import mage.abilities.common.FeralDeceiverAbility; +import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.LookLibraryControllerEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.TrampleAbility; +import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; +import mage.constants.Outcome; import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; /** * @@ -51,19 +60,17 @@ import mage.constants.Zone; public class FeralDeceiver extends CardImpl { public FeralDeceiver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Spirit"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(2); // {1}: Look at the top card of your library. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(), new GenericManaCost(1))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(), new GenericManaCost(1))); // {2}: Reveal the top card of your library. If it's a land card, {this} gets +2/+2 and gains trample until end of turn. - Ability ability = new FeralDeceiverAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2,2,Duration.EndOfTurn), new ManaCostsImpl("{2}")); - ability.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(),Duration.EndOfTurn)); - this.addAbility(ability); + this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new FeralDeceiverEffect(), new ManaCostsImpl("{2}"))); } public FeralDeceiver(final FeralDeceiver card) { @@ -76,3 +83,39 @@ public class FeralDeceiver extends CardImpl { } } +class FeralDeceiverEffect extends OneShotEffect { + + public FeralDeceiverEffect() { + super(Outcome.BoostCreature); + this.staticText = "Reveal the top card of your library. If it's a land card, {this} gets +2/+2 and gains trample until end of turn"; + } + + public FeralDeceiverEffect(final FeralDeceiverEffect effect) { + super(effect); + } + + @Override + public FeralDeceiverEffect copy() { + return new FeralDeceiverEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null) { + Cards cards = new CardsImpl(); + Card card = controller.getLibrary().getFromTop(game); + if (card != null) { + cards.add(card); + controller.revealCards(sourceObject.getIdName(), cards, game); + if (card.isLand()) { + game.addEffect(new BoostSourceEffect(2, 2, Duration.EndOfTurn), source); + game.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn), source); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/f/FeralHydra.java b/Mage.Sets/src/mage/cards/f/FeralHydra.java index acd1babf5d..89460a10e7 100644 --- a/Mage.Sets/src/mage/cards/f/FeralHydra.java +++ b/Mage.Sets/src/mage/cards/f/FeralHydra.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; @@ -50,8 +51,8 @@ public class FeralHydra extends CardImpl { public FeralHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{X}{G}"); - this.subtype.add("Hydra"); - this.subtype.add("Beast"); + this.subtype.add(SubType.HYDRA); + this.subtype.add(SubType.BEAST); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/f/FeralInvocation.java b/Mage.Sets/src/mage/cards/f/FeralInvocation.java index 90f5ddef6d..c652426d3b 100644 --- a/Mage.Sets/src/mage/cards/f/FeralInvocation.java +++ b/Mage.Sets/src/mage/cards/f/FeralInvocation.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class FeralInvocation extends CardImpl { public FeralInvocation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash diff --git a/Mage.Sets/src/mage/cards/f/FeralKrushok.java b/Mage.Sets/src/mage/cards/f/FeralKrushok.java index 778618b105..5daa6226d9 100644 --- a/Mage.Sets/src/mage/cards/f/FeralKrushok.java +++ b/Mage.Sets/src/mage/cards/f/FeralKrushok.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class FeralKrushok extends CardImpl { public FeralKrushok(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(4); } diff --git a/Mage.Sets/src/mage/cards/f/FeralProwler.java b/Mage.Sets/src/mage/cards/f/FeralProwler.java index 57dc91f01a..203ff20a45 100644 --- a/Mage.Sets/src/mage/cards/f/FeralProwler.java +++ b/Mage.Sets/src/mage/cards/f/FeralProwler.java @@ -7,12 +7,13 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; public class FeralProwler extends CardImpl { public FeralProwler(UUID ownerId, CardSetInfo cardSetInfo) { super(ownerId, cardSetInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - subtype.add("Cat"); + subtype.add(SubType.CAT); power = new MageInt(1); toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FeralRidgewolf.java b/Mage.Sets/src/mage/cards/f/FeralRidgewolf.java index 6923adb95e..1e6137ac5a 100644 --- a/Mage.Sets/src/mage/cards/f/FeralRidgewolf.java +++ b/Mage.Sets/src/mage/cards/f/FeralRidgewolf.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class FeralRidgewolf extends CardImpl { public FeralRidgewolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FeralShadow.java b/Mage.Sets/src/mage/cards/f/FeralShadow.java index 8fa556bc02..2a3662fe7b 100644 --- a/Mage.Sets/src/mage/cards/f/FeralShadow.java +++ b/Mage.Sets/src/mage/cards/f/FeralShadow.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class FeralShadow extends CardImpl { public FeralShadow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Nightstalker"); + this.subtype.add(SubType.NIGHTSTALKER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FeralThallid.java b/Mage.Sets/src/mage/cards/f/FeralThallid.java index a9febd9bd6..7da65633e9 100644 --- a/Mage.Sets/src/mage/cards/f/FeralThallid.java +++ b/Mage.Sets/src/mage/cards/f/FeralThallid.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; @@ -49,7 +50,7 @@ public class FeralThallid extends CardImpl { public FeralThallid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(6); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FeralThrowback.java b/Mage.Sets/src/mage/cards/f/FeralThrowback.java index 510b0f5df5..5623cdd574 100644 --- a/Mage.Sets/src/mage/cards/f/FeralThrowback.java +++ b/Mage.Sets/src/mage/cards/f/FeralThrowback.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class FeralThrowback extends CardImpl { public FeralThrowback(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/Ferropede.java b/Mage.Sets/src/mage/cards/f/Ferropede.java index d51fdc01be..8a494890c5 100644 --- a/Mage.Sets/src/mage/cards/f/Ferropede.java +++ b/Mage.Sets/src/mage/cards/f/Ferropede.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPermanent; /** @@ -46,7 +47,7 @@ public class Ferropede extends CardImpl { public Ferropede(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/Ferrovore.java b/Mage.Sets/src/mage/cards/f/Ferrovore.java index 6eed52a2f1..d55161bc9c 100644 --- a/Mage.Sets/src/mage/cards/f/Ferrovore.java +++ b/Mage.Sets/src/mage/cards/f/Ferrovore.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -57,7 +58,7 @@ public class Ferrovore extends CardImpl { public Ferrovore (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FertileGround.java b/Mage.Sets/src/mage/cards/f/FertileGround.java index 6dc49e8bc2..057d16697a 100644 --- a/Mage.Sets/src/mage/cards/f/FertileGround.java +++ b/Mage.Sets/src/mage/cards/f/FertileGround.java @@ -36,6 +36,7 @@ import mage.abilities.mana.TriggeredManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -54,7 +55,7 @@ public class FertileGround extends CardImpl { public FertileGround(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land diff --git a/Mage.Sets/src/mage/cards/f/Fertilid.java b/Mage.Sets/src/mage/cards/f/Fertilid.java index b7eb0bb7d1..9f47bf79eb 100644 --- a/Mage.Sets/src/mage/cards/f/Fertilid.java +++ b/Mage.Sets/src/mage/cards/f/Fertilid.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayTargetPlayerEf import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.StaticFilters; @@ -54,7 +55,7 @@ public class Fertilid extends CardImpl { public Fertilid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/f/FerventCathar.java b/Mage.Sets/src/mage/cards/f/FerventCathar.java index da6c015e54..81452f07ef 100644 --- a/Mage.Sets/src/mage/cards/f/FerventCathar.java +++ b/Mage.Sets/src/mage/cards/f/FerventCathar.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -46,8 +47,8 @@ public class FerventCathar extends CardImpl { public FerventCathar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FerventPaincaster.java b/Mage.Sets/src/mage/cards/f/FerventPaincaster.java index e58aee4265..5c71b314ba 100644 --- a/Mage.Sets/src/mage/cards/f/FerventPaincaster.java +++ b/Mage.Sets/src/mage/cards/f/FerventPaincaster.java @@ -1,80 +1,81 @@ -/* - * 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.cards.f; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ExertSourceCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.DamageTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.target.TargetPlayer; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author jeffwadsworth - */ -public class FerventPaincaster extends CardImpl { - - public FerventPaincaster(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - - this.subtype.add("Human"); - this.subtype.add("Wizard"); - - this.power = new MageInt(3); - this.toughness = new MageInt(1); - - // {T}: Fervent Paincaster deals 1 damage to target player. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetPlayer()); - this.addAbility(ability); - - // {T}, Exert Fervent Paincaster: It deals 1 damage to target creature. - Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability2.addCost(new ExertSourceCost()); - ability2.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability2); - - } - - public FerventPaincaster(final FerventPaincaster card) { - super(card); - } - - @Override - public FerventPaincaster copy() { - return new FerventPaincaster(this); - } -} +/* + * 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.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExertSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.target.TargetPlayer; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author jeffwadsworth + */ +public class FerventPaincaster extends CardImpl { + + public FerventPaincaster(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // {T}: Fervent Paincaster deals 1 damage to target player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + + // {T}, Exert Fervent Paincaster: It deals 1 damage to target creature. + Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); + ability2.addCost(new ExertSourceCost()); + ability2.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability2); + + } + + public FerventPaincaster(final FerventPaincaster card) { + super(card); + } + + @Override + public FerventPaincaster copy() { + return new FerventPaincaster(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/Festercreep.java b/Mage.Sets/src/mage/cards/f/Festercreep.java index 5542a2a203..a932e1dbe2 100644 --- a/Mage.Sets/src/mage/cards/f/Festercreep.java +++ b/Mage.Sets/src/mage/cards/f/Festercreep.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -52,7 +53,7 @@ public class Festercreep extends CardImpl { public Festercreep(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/f/FesterhideBoar.java b/Mage.Sets/src/mage/cards/f/FesterhideBoar.java index 653ffffeb8..8924e1c965 100644 --- a/Mage.Sets/src/mage/cards/f/FesterhideBoar.java +++ b/Mage.Sets/src/mage/cards/f/FesterhideBoar.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -47,7 +48,7 @@ public class FesterhideBoar extends CardImpl { public FesterhideBoar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Boar"); + this.subtype.add(SubType.BOAR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FesteringGoblin.java b/Mage.Sets/src/mage/cards/f/FesteringGoblin.java index 5efedce0b6..23c4331657 100644 --- a/Mage.Sets/src/mage/cards/f/FesteringGoblin.java +++ b/Mage.Sets/src/mage/cards/f/FesteringGoblin.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -46,8 +47,8 @@ public class FesteringGoblin extends CardImpl { public FesteringGoblin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FesteringMummy.java b/Mage.Sets/src/mage/cards/f/FesteringMummy.java index 4e929b8dd4..d0c85650c8 100644 --- a/Mage.Sets/src/mage/cards/f/FesteringMummy.java +++ b/Mage.Sets/src/mage/cards/f/FesteringMummy.java @@ -1,68 +1,69 @@ -/* - * 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.cards.f; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.DiesTriggeredAbility; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.counters.CounterType; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Styxo - */ -public class FesteringMummy extends CardImpl { - - public FesteringMummy(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); - - this.subtype.add("Zombie"); - this.power = new MageInt(1); - this.toughness = new MageInt(1); - - // When Festering Mummy dies, you may put a -1/-1 counter on target creature. - Ability ability = new DiesTriggeredAbility(new AddCountersTargetEffect(CounterType.M1M1.createInstance()), true); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability); - } - - public FesteringMummy(final FesteringMummy card) { - super(card); - } - - @Override - public FesteringMummy copy() { - return new FesteringMummy(this); - } -} +/* + * 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.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Styxo + */ +public class FesteringMummy extends CardImpl { + + public FesteringMummy(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); + + this.subtype.add(SubType.ZOMBIE); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Festering Mummy dies, you may put a -1/-1 counter on target creature. + Ability ability = new DiesTriggeredAbility(new AddCountersTargetEffect(CounterType.M1M1.createInstance()), true); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public FesteringMummy(final FesteringMummy card) { + super(card); + } + + @Override + public FesteringMummy copy() { + return new FesteringMummy(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FesteringNewt.java b/Mage.Sets/src/mage/cards/f/FesteringNewt.java index 1efc505493..5f9cfe7f20 100644 --- a/Mage.Sets/src/mage/cards/f/FesteringNewt.java +++ b/Mage.Sets/src/mage/cards/f/FesteringNewt.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -60,7 +61,7 @@ public class FesteringNewt extends CardImpl { } public FesteringNewt(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Salamander"); + this.subtype.add(SubType.SALAMANDER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FesteringWound.java b/Mage.Sets/src/mage/cards/f/FesteringWound.java index 0317ee9255..3fb996d83d 100644 --- a/Mage.Sets/src/mage/cards/f/FesteringWound.java +++ b/Mage.Sets/src/mage/cards/f/FesteringWound.java @@ -63,7 +63,7 @@ public class FesteringWound extends CardImpl { public FesteringWound(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FetidHorror.java b/Mage.Sets/src/mage/cards/f/FetidHorror.java index 053a66bba0..e18603b143 100644 --- a/Mage.Sets/src/mage/cards/f/FetidHorror.java +++ b/Mage.Sets/src/mage/cards/f/FetidHorror.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class FetidHorror extends CardImpl { public FetidHorror(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Shade"); - this.subtype.add("Horror"); + this.subtype.add(SubType.SHADE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FetidImp.java b/Mage.Sets/src/mage/cards/f/FetidImp.java index be9ce03d5d..6ac4244217 100644 --- a/Mage.Sets/src/mage/cards/f/FetidImp.java +++ b/Mage.Sets/src/mage/cards/f/FetidImp.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class FetidImp extends CardImpl { public FetidImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FetidPools.java b/Mage.Sets/src/mage/cards/f/FetidPools.java index 6e8a7a2a55..c749682b74 100644 --- a/Mage.Sets/src/mage/cards/f/FetidPools.java +++ b/Mage.Sets/src/mage/cards/f/FetidPools.java @@ -36,6 +36,7 @@ import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class FetidPools extends CardImpl { public FetidPools(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Island"); - this.subtype.add("Swamp"); + this.subtype.add(SubType.ISLAND); + this.subtype.add(SubType.SWAMP); // ({T}: Add {U} or {B} to your mana pool.) this.addAbility(new BlueManaAbility()); diff --git a/Mage.Sets/src/mage/cards/f/Fettergeist.java b/Mage.Sets/src/mage/cards/f/Fettergeist.java index f6163a4857..fed59ba32a 100644 --- a/Mage.Sets/src/mage/cards/f/Fettergeist.java +++ b/Mage.Sets/src/mage/cards/f/Fettergeist.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.filter.common.FilterControlledCreaturePermanent; @@ -54,7 +55,7 @@ public class Fettergeist extends CardImpl { public Fettergeist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FeudkillersVerdict.java b/Mage.Sets/src/mage/cards/f/FeudkillersVerdict.java index 4794d982d1..c2ba1a17ed 100644 --- a/Mage.Sets/src/mage/cards/f/FeudkillersVerdict.java +++ b/Mage.Sets/src/mage/cards/f/FeudkillersVerdict.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.token.GiantWarriorToken; @@ -47,7 +48,7 @@ public class FeudkillersVerdict extends CardImpl { public FeudkillersVerdict(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.SORCERY}, "{4}{W}{W}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); // You gain 10 life. Then if you have more life than an opponent, create a 5/5 white Giant Warrior creature token. this.getSpellAbility().addEffect(new FeudkillersVerdictEffect()); diff --git a/Mage.Sets/src/mage/cards/f/FibrousEntangler.java b/Mage.Sets/src/mage/cards/f/FibrousEntangler.java index efd7bd7d4a..b50e6207f3 100644 --- a/Mage.Sets/src/mage/cards/f/FibrousEntangler.java +++ b/Mage.Sets/src/mage/cards/f/FibrousEntangler.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class FibrousEntangler extends CardImpl { public FibrousEntangler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Eldrazi"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/f/FiddleheadKami.java b/Mage.Sets/src/mage/cards/f/FiddleheadKami.java index ff773db3d5..36734c2fe7 100644 --- a/Mage.Sets/src/mage/cards/f/FiddleheadKami.java +++ b/Mage.Sets/src/mage/cards/f/FiddleheadKami.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; /** @@ -44,7 +45,7 @@ public class FiddleheadKami extends CardImpl { public FiddleheadKami(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FieldCreeper.java b/Mage.Sets/src/mage/cards/f/FieldCreeper.java index ac4f4922bc..5123946091 100644 --- a/Mage.Sets/src/mage/cards/f/FieldCreeper.java +++ b/Mage.Sets/src/mage/cards/f/FieldCreeper.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class FieldCreeper extends CardImpl { public FieldCreeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(2); this.toughness = new MageInt(1); } diff --git a/Mage.Sets/src/mage/cards/f/FieldMarshal.java b/Mage.Sets/src/mage/cards/f/FieldMarshal.java index 6fd974e43f..f4857d7aeb 100644 --- a/Mage.Sets/src/mage/cards/f/FieldMarshal.java +++ b/Mage.Sets/src/mage/cards/f/FieldMarshal.java @@ -55,8 +55,8 @@ public class FieldMarshal extends CardImpl { public FieldMarshal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FieldOfReality.java b/Mage.Sets/src/mage/cards/f/FieldOfReality.java index 2dfe0a879f..0b4d2994b2 100644 --- a/Mage.Sets/src/mage/cards/f/FieldOfReality.java +++ b/Mage.Sets/src/mage/cards/f/FieldOfReality.java @@ -49,7 +49,7 @@ public class FieldOfReality extends CardImpl { public FieldOfReality(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FieldOfRuin.java b/Mage.Sets/src/mage/cards/f/FieldOfRuin.java new file mode 100644 index 0000000000..93cce26254 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FieldOfRuin.java @@ -0,0 +1,129 @@ +/* + * 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.cards.f; + +import java.util.UUID; +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.OneShotEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SuperType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInLibrary; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author TheElk801 + */ +public class FieldOfRuin extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent("nonbasic land an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + filter.add(Predicates.not(new SupertypePredicate(SuperType.BASIC))); + } + + public FieldOfRuin(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + // {T}: Add {C} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {2}, {T}, Sacrifice Field of Ruin: Destroy target nonbasic land an opponent controls. Each player searches his or her library for a basic land card, puts it onto the battlefield, then shuffles his or her library. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost()); + ability.addCost(new ManaCostsImpl("{2}")); + ability.addCost(new SacrificeSourceCost()); + ability.addEffect(new FieldOfRuinEffect()); + ability.addTarget(new TargetLandPermanent(filter)); + this.addAbility(ability); + } + + public FieldOfRuin(final FieldOfRuin card) { + super(card); + } + + @Override + public FieldOfRuin copy() { + return new FieldOfRuin(this); + } +} + +class FieldOfRuinEffect extends OneShotEffect { + + FieldOfRuinEffect() { + super(Outcome.Benefit); + this.staticText = "Each player searches his or her library for a basic land card, puts it onto the battlefield, then shuffles his or her library"; + } + + FieldOfRuinEffect(final FieldOfRuinEffect effect) { + super(effect); + } + + @Override + public FieldOfRuinEffect copy() { + return new FieldOfRuinEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + TargetCardInLibrary target = new TargetCardInLibrary(0, 1, StaticFilters.FILTER_BASIC_LAND_CARD); + if (player.searchLibrary(target, game)) { + player.moveCards(new CardsImpl(target.getTargets()), Zone.BATTLEFIELD, source, game); + player.shuffleLibrary(source, game); + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/f/FieldSurgeon.java b/Mage.Sets/src/mage/cards/f/FieldSurgeon.java index 9ae2f53328..64db3fb9af 100644 --- a/Mage.Sets/src/mage/cards/f/FieldSurgeon.java +++ b/Mage.Sets/src/mage/cards/f/FieldSurgeon.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -58,8 +59,8 @@ public class FieldSurgeon extends CardImpl { public FieldSurgeon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FiendBinder.java b/Mage.Sets/src/mage/cards/f/FiendBinder.java index 8a8f74b042..5b36ad3abc 100644 --- a/Mage.Sets/src/mage/cards/f/FiendBinder.java +++ b/Mage.Sets/src/mage/cards/f/FiendBinder.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.Game; @@ -50,8 +51,8 @@ public class FiendBinder extends CardImpl { public FiendBinder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FiendHunter.java b/Mage.Sets/src/mage/cards/f/FiendHunter.java index e9c0edc7cf..3a45386211 100644 --- a/Mage.Sets/src/mage/cards/f/FiendHunter.java +++ b/Mage.Sets/src/mage/cards/f/FiendHunter.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnFromExileForSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -55,8 +56,8 @@ public class FiendHunter extends CardImpl { public FiendHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FiendOfTheShadows.java b/Mage.Sets/src/mage/cards/f/FiendOfTheShadows.java index 6a5b2cf1cc..8e8bc07070 100644 --- a/Mage.Sets/src/mage/cards/f/FiendOfTheShadows.java +++ b/Mage.Sets/src/mage/cards/f/FiendOfTheShadows.java @@ -64,8 +64,8 @@ public class FiendOfTheShadows extends CardImpl { public FiendOfTheShadows(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FiendslayerPaladin.java b/Mage.Sets/src/mage/cards/f/FiendslayerPaladin.java index 567bf43517..7196825b5c 100644 --- a/Mage.Sets/src/mage/cards/f/FiendslayerPaladin.java +++ b/Mage.Sets/src/mage/cards/f/FiendslayerPaladin.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class FiendslayerPaladin extends CardImpl { public FiendslayerPaladin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FierceEmpath.java b/Mage.Sets/src/mage/cards/f/FierceEmpath.java index e44e6cfac8..d03a0fbd00 100644 --- a/Mage.Sets/src/mage/cards/f/FierceEmpath.java +++ b/Mage.Sets/src/mage/cards/f/FierceEmpath.java @@ -27,7 +27,6 @@ */ package mage.cards.f; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; @@ -35,23 +34,26 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.ComparisonType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 */ public class FierceEmpath extends CardImpl { - private static final FilterCreatureCard filter = new FilterCreatureCard("a creature card with converted mana cost 6 or greater"); + private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with converted mana cost 6 or greater"); static { filter.add(new ConvertedManaCostPredicate(ComparisonType.MORE_THAN, 5)); } public FierceEmpath(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FieryBombardment.java b/Mage.Sets/src/mage/cards/f/FieryBombardment.java index a7c51fa2b1..63d29ac716 100644 --- a/Mage.Sets/src/mage/cards/f/FieryBombardment.java +++ b/Mage.Sets/src/mage/cards/f/FieryBombardment.java @@ -37,6 +37,7 @@ import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,15 +55,14 @@ import mage.target.common.TargetCreatureOrPlayer; public class FieryBombardment extends CardImpl { public FieryBombardment(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); // Chroma - {2}, Sacrifice a creature: Fiery Bombardment deals damage to target creature or player equal to the number of red mana symbols in the sacrificed creature's mana cost. Effect effect = new FieryBombardmentEffect(); - effect.setText("Chroma - Fiery Bombardment deals damage to target creature or player equal to the number of red mana symbols in the sacrificed creature's mana cost."); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}")); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent())); ability.addTarget(new TargetCreatureOrPlayer()); + ability.setAbilityWord(AbilityWord.CHROMA); this.addAbility(ability); } @@ -81,6 +81,7 @@ class FieryBombardmentEffect extends OneShotEffect { public FieryBombardmentEffect() { super(Outcome.Benefit); + staticText = "{this} deals damage to target creature or player equal to the number of red mana symbols in the sacrificed creature's mana cost."; } public FieryBombardmentEffect(final FieryBombardmentEffect effect) { @@ -117,4 +118,4 @@ class FieryBombardmentEffect extends OneShotEffect { } return true; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/f/FieryCannonade.java b/Mage.Sets/src/mage/cards/f/FieryCannonade.java new file mode 100644 index 0000000000..670ed09aee --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FieryCannonade.java @@ -0,0 +1,67 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.abilities.effects.common.DamageAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LevelX2 + */ +public class FieryCannonade extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Pirate creature"); + + static { + filter.add(Predicates.not(new SubtypePredicate(SubType.PIRATE))); + } + + public FieryCannonade(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); + + // Fiery Cannonade deals 2 damage to each non-Pirate creature. + this.getSpellAbility().addEffect(new DamageAllEffect(2, filter)); + } + + public FieryCannonade(final FieryCannonade card) { + super(card); + } + + @Override + public FieryCannonade copy() { + return new FieryCannonade(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FieryHellhound.java b/Mage.Sets/src/mage/cards/f/FieryHellhound.java index 3d6c0b6887..998762bab8 100644 --- a/Mage.Sets/src/mage/cards/f/FieryHellhound.java +++ b/Mage.Sets/src/mage/cards/f/FieryHellhound.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class FieryHellhound extends CardImpl { public FieryHellhound(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Hound"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.HOUND); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FieryMantle.java b/Mage.Sets/src/mage/cards/f/FieryMantle.java index 9cc59df4da..b7f8b842cb 100644 --- a/Mage.Sets/src/mage/cards/f/FieryMantle.java +++ b/Mage.Sets/src/mage/cards/f/FieryMantle.java @@ -50,7 +50,7 @@ public class FieryMantle extends CardImpl { public FieryMantle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FightingDrake.java b/Mage.Sets/src/mage/cards/f/FightingDrake.java index 66ef3ab751..0e52c5bde7 100644 --- a/Mage.Sets/src/mage/cards/f/FightingDrake.java +++ b/Mage.Sets/src/mage/cards/f/FightingDrake.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class FightingDrake extends CardImpl { public FightingDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FigureOfDestiny.java b/Mage.Sets/src/mage/cards/f/FigureOfDestiny.java index 8d2d2cea5d..22456975e0 100644 --- a/Mage.Sets/src/mage/cards/f/FigureOfDestiny.java +++ b/Mage.Sets/src/mage/cards/f/FigureOfDestiny.java @@ -62,7 +62,7 @@ public class FigureOfDestiny extends CardImpl { public FigureOfDestiny(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R/W}"); - this.subtype.add("Kithkin"); + this.subtype.add(SubType.KITHKIN); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -106,8 +106,8 @@ public class FigureOfDestiny extends CardImpl { public FigureOfDestinyToken1() { super("Figure of Destiny", "Kithkin Spirit with base power and toughness 2/2"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Kithkin"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SPIRIT); this.color.setRed(true); this.color.setWhite(true); @@ -121,9 +121,9 @@ public class FigureOfDestiny extends CardImpl { public FigureOfDestinyToken2() { super("Figure of Destiny", "Kithkin Spirit Warrior with base power and toughness 4/4"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Kithkin"); - this.subtype.add("Spirit"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.WARRIOR); this.color.setRed(true); this.color.setWhite(true); @@ -137,10 +137,10 @@ public class FigureOfDestiny extends CardImpl { public FigureOfDestinyToken3() { super("Figure of Destiny", "Kithkin Spirit Warrior Avatar with base power and toughness 8/8, flying, and first strike"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Kithkin"); - this.subtype.add("Spirit"); - this.subtype.add("Warrior"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.AVATAR); this.color.setRed(true); this.color.setWhite(true); diff --git a/Mage.Sets/src/mage/cards/f/FiligreeAngel.java b/Mage.Sets/src/mage/cards/f/FiligreeAngel.java index 6d1274b579..efa187682e 100644 --- a/Mage.Sets/src/mage/cards/f/FiligreeAngel.java +++ b/Mage.Sets/src/mage/cards/f/FiligreeAngel.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledPermanent; @@ -52,7 +53,7 @@ public class FiligreeAngel extends CardImpl { public FiligreeAngel (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}{W}{W}{U}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FiligreeCrawler.java b/Mage.Sets/src/mage/cards/f/FiligreeCrawler.java index 774ff7bff7..a906daff61 100644 --- a/Mage.Sets/src/mage/cards/f/FiligreeCrawler.java +++ b/Mage.Sets/src/mage/cards/f/FiligreeCrawler.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.ThopterColorlessToken; /** @@ -45,7 +46,7 @@ public class FiligreeCrawler extends CardImpl { public FiligreeCrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FiligreeFamiliar.java b/Mage.Sets/src/mage/cards/f/FiligreeFamiliar.java index 9f346ab8aa..8d61d4605d 100644 --- a/Mage.Sets/src/mage/cards/f/FiligreeFamiliar.java +++ b/Mage.Sets/src/mage/cards/f/FiligreeFamiliar.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class FiligreeFamiliar extends CardImpl { public FiligreeFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Fox"); + this.subtype.add(SubType.FOX); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FiligreeSages.java b/Mage.Sets/src/mage/cards/f/FiligreeSages.java index 34f9a245b1..18917cfca7 100644 --- a/Mage.Sets/src/mage/cards/f/FiligreeSages.java +++ b/Mage.Sets/src/mage/cards/f/FiligreeSages.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -55,8 +56,8 @@ public class FiligreeSages extends CardImpl { public FiligreeSages (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/Filth.java b/Mage.Sets/src/mage/cards/f/Filth.java index f25dc113c8..64de93f30e 100644 --- a/Mage.Sets/src/mage/cards/f/Filth.java +++ b/Mage.Sets/src/mage/cards/f/Filth.java @@ -63,7 +63,7 @@ public class Filth extends CardImpl { public Filth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Incarnation"); + this.subtype.add(SubType.INCARNATION); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FilthyCur.java b/Mage.Sets/src/mage/cards/f/FilthyCur.java index 6b4be753d0..62b74dae0b 100644 --- a/Mage.Sets/src/mage/cards/f/FilthyCur.java +++ b/Mage.Sets/src/mage/cards/f/FilthyCur.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -48,7 +49,7 @@ public class FilthyCur extends CardImpl { public FilthyCur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FinalIteration.java b/Mage.Sets/src/mage/cards/f/FinalIteration.java index 9b2131df1e..9684e54116 100644 --- a/Mage.Sets/src/mage/cards/f/FinalIteration.java +++ b/Mage.Sets/src/mage/cards/f/FinalIteration.java @@ -67,8 +67,8 @@ public class FinalIteration extends CardImpl { public FinalIteration(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Eldrazi"); - this.subtype.add("Insect"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.INSECT); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/f/FinalStingFaerie.java b/Mage.Sets/src/mage/cards/f/FinalStingFaerie.java index c9e63f1474..5bb42d3f1f 100644 --- a/Mage.Sets/src/mage/cards/f/FinalStingFaerie.java +++ b/Mage.Sets/src/mage/cards/f/FinalStingFaerie.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.WasDealtDamageThisTurnPredicate; import mage.target.common.TargetCreaturePermanent; @@ -54,8 +55,8 @@ public class FinalStingFaerie extends CardImpl { public FinalStingFaerie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Faerie"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FireAnts.java b/Mage.Sets/src/mage/cards/f/FireAnts.java index 7a89f681fb..0e221b3b3a 100644 --- a/Mage.Sets/src/mage/cards/f/FireAnts.java +++ b/Mage.Sets/src/mage/cards/f/FireAnts.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -57,7 +58,7 @@ public class FireAnts extends CardImpl { public FireAnts(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FireAtWill.java b/Mage.Sets/src/mage/cards/f/FireAtWill.java index 9185696458..182baebb8a 100644 --- a/Mage.Sets/src/mage/cards/f/FireAtWill.java +++ b/Mage.Sets/src/mage/cards/f/FireAtWill.java @@ -54,11 +54,10 @@ public class FireAtWill extends CardImpl { } public FireAtWill(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R/W}{R/W}{R/W}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R/W}{R/W}{R/W}"); // Fire at Will deals 3 damage divided as you choose among one, two, or three target attacking or blocking creatures. - this.getSpellAbility().addEffect(new DamageMultiEffect(3)); + this.getSpellAbility().addEffect(new DamageMultiEffect(3).setText("{this} deals 3 damage divided as you choose among one, two, or three target attacking or blocking creatures.")); this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(3, filter)); } diff --git a/Mage.Sets/src/mage/cards/f/FireBellyChangeling.java b/Mage.Sets/src/mage/cards/f/FireBellyChangeling.java index 08844565a8..e6b69ff21b 100644 --- a/Mage.Sets/src/mage/cards/f/FireBellyChangeling.java +++ b/Mage.Sets/src/mage/cards/f/FireBellyChangeling.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ChangelingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class FireBellyChangeling extends CardImpl { public FireBellyChangeling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FireBowman.java b/Mage.Sets/src/mage/cards/f/FireBowman.java index 4d0984b889..c7de392c33 100644 --- a/Mage.Sets/src/mage/cards/f/FireBowman.java +++ b/Mage.Sets/src/mage/cards/f/FireBowman.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,9 +49,9 @@ public class FireBowman extends CardImpl { public FireBowman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FireDragon.java b/Mage.Sets/src/mage/cards/f/FireDragon.java index 1f6fa2c514..db7b55927c 100644 --- a/Mage.Sets/src/mage/cards/f/FireDragon.java +++ b/Mage.Sets/src/mage/cards/f/FireDragon.java @@ -57,7 +57,7 @@ public class FireDragon extends CardImpl { public FireDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{R}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/f/FireDrake.java b/Mage.Sets/src/mage/cards/f/FireDrake.java index 83bad1e730..0c34a7056f 100644 --- a/Mage.Sets/src/mage/cards/f/FireDrake.java +++ b/Mage.Sets/src/mage/cards/f/FireDrake.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class FireDrake extends CardImpl { public FireDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FireElemental.java b/Mage.Sets/src/mage/cards/f/FireElemental.java index ab8a04d665..bd8b9f3fdb 100644 --- a/Mage.Sets/src/mage/cards/f/FireElemental.java +++ b/Mage.Sets/src/mage/cards/f/FireElemental.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class FireElemental extends CardImpl { public FireElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FireFieldOgre.java b/Mage.Sets/src/mage/cards/f/FireFieldOgre.java index 5fe33e8625..02adaf2431 100644 --- a/Mage.Sets/src/mage/cards/f/FireFieldOgre.java +++ b/Mage.Sets/src/mage/cards/f/FireFieldOgre.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class FireFieldOgre extends CardImpl { public FireFieldOgre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FireImp.java b/Mage.Sets/src/mage/cards/f/FireImp.java index ad5d25d926..80386fa3be 100644 --- a/Mage.Sets/src/mage/cards/f/FireImp.java +++ b/Mage.Sets/src/mage/cards/f/FireImp.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -46,7 +47,7 @@ public class FireImp extends CardImpl { public FireImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FireJuggler.java b/Mage.Sets/src/mage/cards/f/FireJuggler.java index 5e57056ff0..bc2aef4a55 100644 --- a/Mage.Sets/src/mage/cards/f/FireJuggler.java +++ b/Mage.Sets/src/mage/cards/f/FireJuggler.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DoIfClashWonEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.permanent.BlockingAttackerIdPredicate; @@ -46,8 +47,8 @@ public class FireJuggler extends CardImpl { public FireJuggler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FireServant.java b/Mage.Sets/src/mage/cards/f/FireServant.java index 8b52c1977e..e0eadfc957 100644 --- a/Mage.Sets/src/mage/cards/f/FireServant.java +++ b/Mage.Sets/src/mage/cards/f/FireServant.java @@ -36,6 +36,7 @@ import mage.abilities.effects.ReplacementEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class FireServant extends CardImpl { public FireServant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FireShrineKeeper.java b/Mage.Sets/src/mage/cards/f/FireShrineKeeper.java new file mode 100644 index 0000000000..442e83b0b8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FireShrineKeeper.java @@ -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.cards.f; + +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.DamageTargetEffect; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class FireShrineKeeper extends CardImpl { + + public FireShrineKeeper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); + + this.subtype.add(SubType.ELEMENTAL); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Menace + this.addAbility(new MenaceAbility()); + + // {7}{R}, {T}, Sacrifice Fire Shrine Keeper: It deals 3 damage to each of up to two target creatures. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new DamageTargetEffect(3).setText("It deals 3 damage to each of up to two target creatures"), new ManaCostsImpl<>("{7}{R}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreaturePermanent(0, 2)); + this.addAbility(ability); + } + + public FireShrineKeeper(final FireShrineKeeper card) { + super(card); + } + + @Override + public FireShrineKeeper copy() { + return new FireShrineKeeper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FireSnake.java b/Mage.Sets/src/mage/cards/f/FireSnake.java index 3a4fad38d8..74252b27a7 100644 --- a/Mage.Sets/src/mage/cards/f/FireSnake.java +++ b/Mage.Sets/src/mage/cards/f/FireSnake.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetLandPermanent; /** @@ -45,7 +46,7 @@ public class FireSnake extends CardImpl { public FireSnake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FireSprites.java b/Mage.Sets/src/mage/cards/f/FireSprites.java index d6dad89470..d197bb64d4 100644 --- a/Mage.Sets/src/mage/cards/f/FireSprites.java +++ b/Mage.Sets/src/mage/cards/f/FireSprites.java @@ -38,6 +38,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,7 +49,7 @@ public class FireSprites extends CardImpl { public FireSprites(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FireWhip.java b/Mage.Sets/src/mage/cards/f/FireWhip.java index 2dbb9e9a96..8196680e08 100644 --- a/Mage.Sets/src/mage/cards/f/FireWhip.java +++ b/Mage.Sets/src/mage/cards/f/FireWhip.java @@ -52,7 +52,7 @@ public class FireWhip extends CardImpl { public FireWhip(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature you control diff --git a/Mage.Sets/src/mage/cards/f/FirebrandArcher.java b/Mage.Sets/src/mage/cards/f/FirebrandArcher.java index 8f3a96f955..f14a34e372 100644 --- a/Mage.Sets/src/mage/cards/f/FirebrandArcher.java +++ b/Mage.Sets/src/mage/cards/f/FirebrandArcher.java @@ -1,74 +1,75 @@ -/* - * 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.cards.f; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SpellCastControllerTriggeredAbility; -import mage.abilities.effects.common.DamagePlayersEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.TargetController; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; - -/** - * - * @author ciaccona007 - */ -public class FirebrandArcher extends CardImpl { - - private static final FilterSpell filter = new FilterSpell("a noncreature spell"); - - static { - filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); - } - - public FirebrandArcher(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - - this.subtype.add("Human"); - this.subtype.add("Archer"); - this.power = new MageInt(2); - this.toughness = new MageInt(1); - - // Whenever you cast a noncreature spell, Firebrand Archer deals 1 damage to each opponent. - addAbility(new SpellCastControllerTriggeredAbility(new DamagePlayersEffect(1, TargetController.OPPONENT), filter, false)); - } - - public FirebrandArcher(final FirebrandArcher card) { - super(card); - } - - @Override - public FirebrandArcher copy() { - return new FirebrandArcher(this); - } -} +/* + * 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.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.DamagePlayersEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author ciaccona007 + */ +public class FirebrandArcher extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("a noncreature spell"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); + } + + public FirebrandArcher(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARCHER); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Whenever you cast a noncreature spell, Firebrand Archer deals 1 damage to each opponent. + addAbility(new SpellCastControllerTriggeredAbility(new DamagePlayersEffect(1, TargetController.OPPONENT), filter, false)); + } + + public FirebrandArcher(final FirebrandArcher card) { + super(card); + } + + @Override + public FirebrandArcher copy() { + return new FirebrandArcher(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FirebrandRanger.java b/Mage.Sets/src/mage/cards/f/FirebrandRanger.java index 178362e7c9..3c335a7fd5 100644 --- a/Mage.Sets/src/mage/cards/f/FirebrandRanger.java +++ b/Mage.Sets/src/mage/cards/f/FirebrandRanger.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -56,9 +57,9 @@ import mage.target.common.TargetCardInHand; public class FirebrandRanger extends CardImpl { public FirebrandRanger(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); @@ -79,7 +80,7 @@ public class FirebrandRanger extends CardImpl { } class PutLandOnBattlefieldEffect extends OneShotEffect { - + private static final FilterCard filter = new FilterCard("basic land card"); static { @@ -90,7 +91,7 @@ class PutLandOnBattlefieldEffect extends OneShotEffect { public PutLandOnBattlefieldEffect() { super(Outcome.PutLandInPlay); - this.staticText = "put a basic land card from your hand onto the battlefield"; + this.staticText = "you may put a basic land card from your hand onto the battlefield"; } public PutLandOnBattlefieldEffect(final PutLandOnBattlefieldEffect effect) { @@ -119,4 +120,4 @@ class PutLandOnBattlefieldEffect extends OneShotEffect { } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/f/Firebreathing.java b/Mage.Sets/src/mage/cards/f/Firebreathing.java index 76deea4df3..ea823a4d15 100644 --- a/Mage.Sets/src/mage/cards/f/Firebreathing.java +++ b/Mage.Sets/src/mage/cards/f/Firebreathing.java @@ -48,7 +48,7 @@ public class Firebreathing extends CardImpl { public Firebreathing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FirecannonBlast.java b/Mage.Sets/src/mage/cards/f/FirecannonBlast.java new file mode 100644 index 0000000000..9078ed3743 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FirecannonBlast.java @@ -0,0 +1,72 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.abilities.condition.InvertCondition; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * + * @author LevelX2 + */ +public class FirecannonBlast extends CardImpl { + + public FirecannonBlast(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}{R}"); + + // Firecannon Blast deals 3 damage to target creature. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new DamageTargetEffect(3), + new InvertCondition(RaidCondition.instance), + "{this} deals 3 damage to target creature")); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + // Raid - Firecannon Blast deals 6 damage to that creature instead if you attacked with a creature this turn. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new DamageTargetEffect(6, false), + RaidCondition.instance, + "

Raid — {this} deals 6 damage to that creature instead if you attacked with a creature this turn")); + this.getSpellAbility().addWatcher(new PlayerAttackedWatcher()); + } + + public FirecannonBlast(final FirecannonBlast card) { + super(card); + } + + @Override + public FirecannonBlast copy() { + return new FirecannonBlast(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FirecatBlitz.java b/Mage.Sets/src/mage/cards/f/FirecatBlitz.java index 3fd8608e47..2fd3e0f0b9 100644 --- a/Mage.Sets/src/mage/cards/f/FirecatBlitz.java +++ b/Mage.Sets/src/mage/cards/f/FirecatBlitz.java @@ -1,127 +1,127 @@ -/* - * 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.cards.f; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; -import mage.abilities.costs.Cost; -import mage.abilities.costs.common.SacrificeTargetCost; -import mage.abilities.costs.common.SacrificeXTargetCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.keyword.FlashbackAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.*; -import mage.filter.common.FilterControlledLandPermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.game.permanent.token.ElementalCatToken; -import mage.players.Player; -import mage.target.targetpointer.FixedTarget; - -/** - * - * @author Styxo - */ -public class FirecatBlitz extends CardImpl { - - private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("Mountains"); - - static { - filter.add(new SubtypePredicate(SubType.MOUNTAIN)); - } - - public FirecatBlitz(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}{R}"); - - // Put X 1/1 red Elemental Cat creature tokens with haste onto the battlefield. Exile them at the beginning of the next end step. - this.getSpellAbility().addEffect(new FirecatBlitzEffect()); - - // Flashback-{R}{R}, Sacrifice X Mountains. - Ability ability = new FlashbackAbility(new SacrificeXTargetCost(filter), TimingRule.SORCERY); - ability.addManaCost(new ManaCostsImpl("{R}{R}")); - this.addAbility(ability); - } - - public FirecatBlitz(final FirecatBlitz card) { - super(card); - } - - @Override - public FirecatBlitz copy() { - return new FirecatBlitz(this); - } -} - -class FirecatBlitzEffect extends OneShotEffect { - - public FirecatBlitzEffect() { - super(Outcome.PutCreatureInPlay); - this.staticText = "Create X 1/1 red Elemental Cat creature tokens with haste. Exile them at the beginning of the next end step"; - } - - public FirecatBlitzEffect(final FirecatBlitzEffect effect) { - super(effect); - } - - @Override - public FirecatBlitzEffect copy() { - return new FirecatBlitzEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - int xValue = source.getManaCostsToPay().getX(); - for (Cost cost : source.getCosts()) { - if (cost instanceof SacrificeTargetCost) { - xValue = ((SacrificeTargetCost) cost).getPermanents().size(); - } - } - CreateTokenEffect effect = new CreateTokenEffect(new ElementalCatToken(), xValue); - effect.apply(game, source); - for (UUID tokenId : effect.getLastAddedTokenIds()) { - Permanent tokenPermanent = game.getPermanent(tokenId); - if (tokenPermanent != null) { - ExileTargetEffect exileEffect = new ExileTargetEffect(null, "", Zone.BATTLEFIELD); - exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); - game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect), source); - } - } - return true; - } - - return false; - } -} +/* + * 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.cards.f; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.common.SacrificeXTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.ElementalCatToken; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author Styxo + */ +public class FirecatBlitz extends CardImpl { + + private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("Mountains"); + + static { + filter.add(new SubtypePredicate(SubType.MOUNTAIN)); + } + + public FirecatBlitz(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}{R}"); + + // Put X 1/1 red Elemental Cat creature tokens with haste onto the battlefield. Exile them at the beginning of the next end step. + this.getSpellAbility().addEffect(new FirecatBlitzEffect()); + + // Flashback-{R}{R}, Sacrifice X Mountains. + Ability ability = new FlashbackAbility(new SacrificeXTargetCost(filter), TimingRule.SORCERY); + ability.addManaCost(new ManaCostsImpl("{R}{R}")); + this.addAbility(ability); + } + + public FirecatBlitz(final FirecatBlitz card) { + super(card); + } + + @Override + public FirecatBlitz copy() { + return new FirecatBlitz(this); + } +} + +class FirecatBlitzEffect extends OneShotEffect { + + public FirecatBlitzEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "Create X 1/1 red Elemental Cat creature tokens with haste. Exile them at the beginning of the next end step"; + } + + public FirecatBlitzEffect(final FirecatBlitzEffect effect) { + super(effect); + } + + @Override + public FirecatBlitzEffect copy() { + return new FirecatBlitzEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int xValue = source.getManaCostsToPay().getX(); + for (Cost cost : source.getCosts()) { + if (cost instanceof SacrificeTargetCost) { + xValue = ((SacrificeTargetCost) cost).getPermanents().size(); + } + } + CreateTokenEffect effect = new CreateTokenEffect(new ElementalCatToken(), xValue); + effect.apply(game, source); + for (UUID tokenId : effect.getLastAddedTokenIds()) { + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + ExileTargetEffect exileEffect = new ExileTargetEffect(null, "", Zone.BATTLEFIELD); + exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect), source); + } + } + return true; + } + + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/f/FiredrinkerSatyr.java b/Mage.Sets/src/mage/cards/f/FiredrinkerSatyr.java index cf96572ae4..e7e045dd2d 100644 --- a/Mage.Sets/src/mage/cards/f/FiredrinkerSatyr.java +++ b/Mage.Sets/src/mage/cards/f/FiredrinkerSatyr.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,17 +54,17 @@ import mage.players.Player; public class FiredrinkerSatyr extends CardImpl { public FiredrinkerSatyr(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Satyr"); - this.subtype.add("Shaman"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); + this.subtype.add(SubType.SATYR); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); // Whenever Firedrinker Satyr is dealt damage, it deals that much damage to you. - this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new FiredrinkerSatyrDealDamageEffect(), false)); + this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new FiredrinkerSatyrDealDamageEffect(), false, false, true)); // {1}{R}: Firedrinker Satyr gets +1/+0 until end of turn and deals 1 damage to you. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1,0, Duration.EndOfTurn), new ManaCostsImpl("{1}{R}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{1}{R}")); Effect effect = new DamageControllerEffect(1); effect.setText("and deals 1 damage to you"); ability.addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/f/FirefiendElemental.java b/Mage.Sets/src/mage/cards/f/FirefiendElemental.java index f6a7f50cc3..341d3aa35f 100644 --- a/Mage.Sets/src/mage/cards/f/FirefiendElemental.java +++ b/Mage.Sets/src/mage/cards/f/FirefiendElemental.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.RenownAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class FirefiendElemental extends CardImpl { public FirefiendElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FirefistStriker.java b/Mage.Sets/src/mage/cards/f/FirefistStriker.java index e8d81cd874..df5a3ec963 100644 --- a/Mage.Sets/src/mage/cards/f/FirefistStriker.java +++ b/Mage.Sets/src/mage/cards/f/FirefistStriker.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.BattalionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -47,8 +48,8 @@ public class FirefistStriker extends CardImpl { public FirefistStriker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/Firefly.java b/Mage.Sets/src/mage/cards/f/Firefly.java index 357560c52f..63c923c6e8 100644 --- a/Mage.Sets/src/mage/cards/f/Firefly.java +++ b/Mage.Sets/src/mage/cards/f/Firefly.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class Firefly extends CardImpl { public Firefly(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FirefrightMage.java b/Mage.Sets/src/mage/cards/f/FirefrightMage.java index f0dd8881e3..36d93f1392 100644 --- a/Mage.Sets/src/mage/cards/f/FirefrightMage.java +++ b/Mage.Sets/src/mage/cards/f/FirefrightMage.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByAllTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -65,8 +66,8 @@ public class FirefrightMage extends CardImpl { public FirefrightMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FirehoofCavalry.java b/Mage.Sets/src/mage/cards/f/FirehoofCavalry.java index cce833cf9c..1747691f09 100644 --- a/Mage.Sets/src/mage/cards/f/FirehoofCavalry.java +++ b/Mage.Sets/src/mage/cards/f/FirehoofCavalry.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class FirehoofCavalry extends CardImpl { public FirehoofCavalry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FiremaneAngel.java b/Mage.Sets/src/mage/cards/f/FiremaneAngel.java index 3f28173826..363f880c10 100644 --- a/Mage.Sets/src/mage/cards/f/FiremaneAngel.java +++ b/Mage.Sets/src/mage/cards/f/FiremaneAngel.java @@ -43,6 +43,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.PhaseStep; import mage.constants.TargetController; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class FiremaneAngel extends CardImpl { public FiremaneAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FiremaneAvenger.java b/Mage.Sets/src/mage/cards/f/FiremaneAvenger.java index e978420b65..8a7f74c448 100644 --- a/Mage.Sets/src/mage/cards/f/FiremaneAvenger.java +++ b/Mage.Sets/src/mage/cards/f/FiremaneAvenger.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; /** @@ -47,7 +48,7 @@ public class FiremaneAvenger extends CardImpl { public FiremaneAvenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FiremantleMage.java b/Mage.Sets/src/mage/cards/f/FiremantleMage.java index e1f4d3fdd4..0de938a125 100644 --- a/Mage.Sets/src/mage/cards/f/FiremantleMage.java +++ b/Mage.Sets/src/mage/cards/f/FiremantleMage.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; @@ -46,9 +47,9 @@ public class FiremantleMage extends CardImpl { public FiremantleMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FiremawKavu.java b/Mage.Sets/src/mage/cards/f/FiremawKavu.java index 73d3f97d06..abae4ff254 100644 --- a/Mage.Sets/src/mage/cards/f/FiremawKavu.java +++ b/Mage.Sets/src/mage/cards/f/FiremawKavu.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -47,7 +48,7 @@ public class FiremawKavu extends CardImpl { public FiremawKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/Firescreamer.java b/Mage.Sets/src/mage/cards/f/Firescreamer.java index 52d3bec498..556246f374 100644 --- a/Mage.Sets/src/mage/cards/f/Firescreamer.java +++ b/Mage.Sets/src/mage/cards/f/Firescreamer.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class Firescreamer extends CardImpl { public Firescreamer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/Fireshrieker.java b/Mage.Sets/src/mage/cards/f/Fireshrieker.java index fea5f332f1..7044d775d4 100644 --- a/Mage.Sets/src/mage/cards/f/Fireshrieker.java +++ b/Mage.Sets/src/mage/cards/f/Fireshrieker.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class Fireshrieker extends CardImpl { public Fireshrieker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has double strike. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(DoubleStrikeAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/f/Fireslinger.java b/Mage.Sets/src/mage/cards/f/Fireslinger.java index 37c47164ea..f2f51fedbc 100644 --- a/Mage.Sets/src/mage/cards/f/Fireslinger.java +++ b/Mage.Sets/src/mage/cards/f/Fireslinger.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class Fireslinger extends CardImpl { public Fireslinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FirestormHellkite.java b/Mage.Sets/src/mage/cards/f/FirestormHellkite.java index a9a35d7677..42d705e430 100644 --- a/Mage.Sets/src/mage/cards/f/FirestormHellkite.java +++ b/Mage.Sets/src/mage/cards/f/FirestormHellkite.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class FirestormHellkite extends CardImpl { public FirestormHellkite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/f/FirewakeSliver.java b/Mage.Sets/src/mage/cards/f/FirewakeSliver.java index 771b92b925..fe0ec2a538 100644 --- a/Mage.Sets/src/mage/cards/f/FirewakeSliver.java +++ b/Mage.Sets/src/mage/cards/f/FirewakeSliver.java @@ -53,32 +53,32 @@ import mage.target.common.TargetCreaturePermanent; */ public class FirewakeSliver extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("All sliver creatures"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("All Sliver creatures"); private static final FilterCreaturePermanent targetSliverFilter = new FilterCreaturePermanent("Sliver"); static { filter.add(new SubtypePredicate(SubType.SLIVER)); targetSliverFilter.add(new SubtypePredicate(SubType.SLIVER)); } - + public FirewakeSliver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{G}"); - this.subtype.add("Sliver"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{G}"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); // All Sliver creatures have haste. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter, false))); - + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter, false))); + // All Slivers have "{1}, Sacrifice this permanent: Target Sliver creature gets +2/+2 until end of turn." - Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2,2,Duration.EndOfTurn), new GenericManaCost(1)); + Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2, 2, Duration.EndOfTurn), new GenericManaCost(1)); gainedAbility.addCost(new SacrificeSourceCost()); gainedAbility.addTarget(new TargetCreaturePermanent(targetSliverFilter)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect( gainedAbility, Duration.WhileOnBattlefield, - filter, "All Slivers have \"{1}, Sacrifice this permanent: Target Sliver creature gets +2/+2 until end of turn.\""))); - + filter, "All Slivers have \"{1}, Sacrifice this permanent: Target Sliver creature gets +2/+2 until end of turn.\""))); + } public FirewakeSliver(final FirewakeSliver card) { diff --git a/Mage.Sets/src/mage/cards/f/FirewingPhoenix.java b/Mage.Sets/src/mage/cards/f/FirewingPhoenix.java index 281f253ebf..1e4caa31a4 100644 --- a/Mage.Sets/src/mage/cards/f/FirewingPhoenix.java +++ b/Mage.Sets/src/mage/cards/f/FirewingPhoenix.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class FirewingPhoenix extends CardImpl { public FirewingPhoenix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Phoenix"); + this.subtype.add(SubType.PHOENIX); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FishliverOil.java b/Mage.Sets/src/mage/cards/f/FishliverOil.java index 7733efa521..6f9ced94e3 100644 --- a/Mage.Sets/src/mage/cards/f/FishliverOil.java +++ b/Mage.Sets/src/mage/cards/f/FishliverOil.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -50,7 +51,7 @@ public class FishliverOil extends CardImpl { public FishliverOil(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FistsOfIronwood.java b/Mage.Sets/src/mage/cards/f/FistsOfIronwood.java index ab46a0e7c2..c87335e3c2 100644 --- a/Mage.Sets/src/mage/cards/f/FistsOfIronwood.java +++ b/Mage.Sets/src/mage/cards/f/FistsOfIronwood.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.permanent.token.SaprolingToken; @@ -54,7 +55,7 @@ public class FistsOfIronwood extends CardImpl { public FistsOfIronwood(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/f/FistsOfTheDemigod.java b/Mage.Sets/src/mage/cards/f/FistsOfTheDemigod.java index c4cc3add29..d116ee56eb 100644 --- a/Mage.Sets/src/mage/cards/f/FistsOfTheDemigod.java +++ b/Mage.Sets/src/mage/cards/f/FistsOfTheDemigod.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -56,7 +57,7 @@ public class FistsOfTheDemigod extends CardImpl { public FistsOfTheDemigod(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B/R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/f/FlagstonesOfTrokair.java b/Mage.Sets/src/mage/cards/f/FlagstonesOfTrokair.java index d9decea82e..b49857fe67 100644 --- a/Mage.Sets/src/mage/cards/f/FlagstonesOfTrokair.java +++ b/Mage.Sets/src/mage/cards/f/FlagstonesOfTrokair.java @@ -53,14 +53,14 @@ public class FlagstonesOfTrokair extends CardImpl { } public FlagstonesOfTrokair(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},""); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); addSuperType(SuperType.LEGENDARY); // {tap}: Add {W} to your mana pool. this.addAbility(new WhiteManaAbility()); // When Flagstones of Trokair is put into a graveyard from the battlefield, you may search your library for a Plains card and put it onto the battlefield tapped. If you do, shuffle your library. - this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(FILTER), true, true), true)); + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(FILTER), true, false), true)); } public FlagstonesOfTrokair(final FlagstonesOfTrokair card) { diff --git a/Mage.Sets/src/mage/cards/f/FlailingDrake.java b/Mage.Sets/src/mage/cards/f/FlailingDrake.java index 2297de3860..aa850c4f12 100644 --- a/Mage.Sets/src/mage/cards/f/FlailingDrake.java +++ b/Mage.Sets/src/mage/cards/f/FlailingDrake.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; @@ -48,7 +49,7 @@ public class FlailingDrake extends CardImpl { public FlailingDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FlailingManticore.java b/Mage.Sets/src/mage/cards/f/FlailingManticore.java index 98da1455b2..8f36eba3d6 100644 --- a/Mage.Sets/src/mage/cards/f/FlailingManticore.java +++ b/Mage.Sets/src/mage/cards/f/FlailingManticore.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class FlailingManticore extends CardImpl { public FlailingManticore(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Manticore"); + this.subtype.add(SubType.MANTICORE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FlailingOgre.java b/Mage.Sets/src/mage/cards/f/FlailingOgre.java index 9cfa6782ae..a964e4306f 100644 --- a/Mage.Sets/src/mage/cards/f/FlailingOgre.java +++ b/Mage.Sets/src/mage/cards/f/FlailingOgre.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class FlailingOgre extends CardImpl { public FlailingOgre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Ogre"); + this.subtype.add(SubType.OGRE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FlailingSoldier.java b/Mage.Sets/src/mage/cards/f/FlailingSoldier.java index 76fe9c34ff..5f401ec2ec 100644 --- a/Mage.Sets/src/mage/cards/f/FlailingSoldier.java +++ b/Mage.Sets/src/mage/cards/f/FlailingSoldier.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class FlailingSoldier extends CardImpl { public FlailingSoldier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FlameElemental.java b/Mage.Sets/src/mage/cards/f/FlameElemental.java new file mode 100644 index 0000000000..d7adadcc20 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FlameElemental.java @@ -0,0 +1,74 @@ +/* + * 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.cards.f; + +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.dynamicvalue.common.SourcePermanentPowerCount; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class FlameElemental extends CardImpl { + + public FlameElemental(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + + this.subtype.add(SubType.ELEMENTAL); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // {R}, {tap}, Sacrifice Flame Elemental: Flame Elemental deals damage equal to its power to target creature. + Ability ability = new SimpleActivatedAbility(new DamageTargetEffect(new SourcePermanentPowerCount(false)), new ManaCostsImpl("{R}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public FlameElemental(final FlameElemental card) { + super(card); + } + + @Override + public FlameElemental copy() { + return new FlameElemental(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FlameKinWarScout.java b/Mage.Sets/src/mage/cards/f/FlameKinWarScout.java index 9d94693f4a..d7c39a6ff7 100644 --- a/Mage.Sets/src/mage/cards/f/FlameKinWarScout.java +++ b/Mage.Sets/src/mage/cards/f/FlameKinWarScout.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class FlameKinWarScout extends CardImpl { public FlameKinWarScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FlameKinZealot.java b/Mage.Sets/src/mage/cards/f/FlameKinZealot.java index 2d186fc639..40243e68d2 100644 --- a/Mage.Sets/src/mage/cards/f/FlameKinZealot.java +++ b/Mage.Sets/src/mage/cards/f/FlameKinZealot.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; @@ -48,8 +49,8 @@ public class FlameKinZealot extends CardImpl { public FlameKinZealot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}{W}"); - this.subtype.add("Elemental"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FlameSpirit.java b/Mage.Sets/src/mage/cards/f/FlameSpirit.java index 726385af9d..5f52f1d7d3 100644 --- a/Mage.Sets/src/mage/cards/f/FlameSpirit.java +++ b/Mage.Sets/src/mage/cards/f/FlameSpirit.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,8 +47,8 @@ public class FlameSpirit extends CardImpl { public FlameSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FlameWreathedPhoenix.java b/Mage.Sets/src/mage/cards/f/FlameWreathedPhoenix.java index 36edda4f20..2a49ede528 100644 --- a/Mage.Sets/src/mage/cards/f/FlameWreathedPhoenix.java +++ b/Mage.Sets/src/mage/cards/f/FlameWreathedPhoenix.java @@ -43,6 +43,7 @@ import mage.abilities.keyword.TributeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -53,7 +54,7 @@ public class FlameWreathedPhoenix extends CardImpl { public FlameWreathedPhoenix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Phoenix"); + this.subtype.add(SubType.PHOENIX); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FlamebladeAdept.java b/Mage.Sets/src/mage/cards/f/FlamebladeAdept.java index abd34b126c..f464c8c133 100644 --- a/Mage.Sets/src/mage/cards/f/FlamebladeAdept.java +++ b/Mage.Sets/src/mage/cards/f/FlamebladeAdept.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,8 +47,8 @@ public class FlamebladeAdept extends CardImpl { public FlamebladeAdept(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); - this.subtype.add("Jackal"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.JACKAL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FlamebladeAngel.java b/Mage.Sets/src/mage/cards/f/FlamebladeAngel.java index db45920d0e..a8243d7df6 100644 --- a/Mage.Sets/src/mage/cards/f/FlamebladeAngel.java +++ b/Mage.Sets/src/mage/cards/f/FlamebladeAngel.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -50,7 +51,7 @@ public class FlamebladeAngel extends CardImpl { public FlamebladeAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FlameblastDragon.java b/Mage.Sets/src/mage/cards/f/FlameblastDragon.java index 879e36fc07..1ca9af2aac 100644 --- a/Mage.Sets/src/mage/cards/f/FlameblastDragon.java +++ b/Mage.Sets/src/mage/cards/f/FlameblastDragon.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -52,7 +53,7 @@ public class FlameblastDragon extends CardImpl { public FlameblastDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/f/FlamebornHellion.java b/Mage.Sets/src/mage/cards/f/FlamebornHellion.java index a80b102d21..e55fcfbabf 100644 --- a/Mage.Sets/src/mage/cards/f/FlamebornHellion.java +++ b/Mage.Sets/src/mage/cards/f/FlamebornHellion.java @@ -30,11 +30,12 @@ package mage.cards.f; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,12 +45,12 @@ public class FlamebornHellion extends CardImpl { public FlamebornHellion (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Hellion"); + this.subtype.add(SubType.HELLION); this.power = new MageInt(5); this.toughness = new MageInt(4); this.addAbility(HasteAbility.getInstance()); - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public FlamebornHellion (final FlamebornHellion card) { diff --git a/Mage.Sets/src/mage/cards/f/FlamebornViron.java b/Mage.Sets/src/mage/cards/f/FlamebornViron.java index 525163781f..af1f8be0c8 100644 --- a/Mage.Sets/src/mage/cards/f/FlamebornViron.java +++ b/Mage.Sets/src/mage/cards/f/FlamebornViron.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class FlamebornViron extends CardImpl { public FlamebornViron(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FlamecoreElemental.java b/Mage.Sets/src/mage/cards/f/FlamecoreElemental.java index a783043572..66af126570 100644 --- a/Mage.Sets/src/mage/cards/f/FlamecoreElemental.java +++ b/Mage.Sets/src/mage/cards/f/FlamecoreElemental.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class FlamecoreElemental extends CardImpl { public FlamecoreElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FlameheartWerewolf.java b/Mage.Sets/src/mage/cards/f/FlameheartWerewolf.java index 5c249df45a..5621d3b188 100644 --- a/Mage.Sets/src/mage/cards/f/FlameheartWerewolf.java +++ b/Mage.Sets/src/mage/cards/f/FlameheartWerewolf.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.StaticFilters; @@ -51,7 +52,7 @@ public class FlameheartWerewolf extends CardImpl { public FlameheartWerewolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(3); this.toughness = new MageInt(2); this.color.setRed(true); diff --git a/Mage.Sets/src/mage/cards/f/FlamekinBladewhirl.java b/Mage.Sets/src/mage/cards/f/FlamekinBladewhirl.java index 3e0af28fa3..ad1ac2714e 100644 --- a/Mage.Sets/src/mage/cards/f/FlamekinBladewhirl.java +++ b/Mage.Sets/src/mage/cards/f/FlamekinBladewhirl.java @@ -53,8 +53,8 @@ public class FlamekinBladewhirl extends CardImpl { public FlamekinBladewhirl(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FlamekinBrawler.java b/Mage.Sets/src/mage/cards/f/FlamekinBrawler.java index b164614af3..8b7efa59dc 100644 --- a/Mage.Sets/src/mage/cards/f/FlamekinBrawler.java +++ b/Mage.Sets/src/mage/cards/f/FlamekinBrawler.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class FlamekinBrawler extends CardImpl { public FlamekinBrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FlamekinHarbinger.java b/Mage.Sets/src/mage/cards/f/FlamekinHarbinger.java index adb62c5092..31d1a94b43 100644 --- a/Mage.Sets/src/mage/cards/f/FlamekinHarbinger.java +++ b/Mage.Sets/src/mage/cards/f/FlamekinHarbinger.java @@ -53,8 +53,8 @@ public class FlamekinHarbinger extends CardImpl { public FlamekinHarbinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FlamekinSpitfire.java b/Mage.Sets/src/mage/cards/f/FlamekinSpitfire.java index 4223434f2e..23038d1bff 100644 --- a/Mage.Sets/src/mage/cards/f/FlamekinSpitfire.java +++ b/Mage.Sets/src/mage/cards/f/FlamekinSpitfire.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -47,8 +48,8 @@ public class FlamekinSpitfire extends CardImpl { public FlamekinSpitfire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FlamerushRider.java b/Mage.Sets/src/mage/cards/f/FlamerushRider.java index d9f816482a..108e99c2bd 100644 --- a/Mage.Sets/src/mage/cards/f/FlamerushRider.java +++ b/Mage.Sets/src/mage/cards/f/FlamerushRider.java @@ -36,11 +36,12 @@ import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.keyword.DashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -66,8 +67,8 @@ public class FlamerushRider extends CardImpl { public FlamerushRider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -111,7 +112,7 @@ class FlamerushRiderEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); Permanent permanent = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source)); if (controller != null && permanent != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, true, 1, true, true); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), null, true, 1, true, true); effect.setTargetPointer(new FixedTarget(permanent, game)); effect.apply(game, source); for (Permanent addedToken : effect.getAddedPermanent()) { diff --git a/Mage.Sets/src/mage/cards/f/FlameshadowConjuring.java b/Mage.Sets/src/mage/cards/f/FlameshadowConjuring.java index b57cb5448b..1c017740df 100644 --- a/Mage.Sets/src/mage/cards/f/FlameshadowConjuring.java +++ b/Mage.Sets/src/mage/cards/f/FlameshadowConjuring.java @@ -36,7 +36,7 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -105,7 +105,7 @@ class FlameshadowConjuringEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = ((FixedTarget) getTargetPointer()).getTargetedPermanentOrLKIBattlefield(game); if (permanent != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(null, null, true); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(null, null, true); effect.setTargetPointer(getTargetPointer()); if (effect.apply(game, source)) { for (Permanent tokenPermanent : effect.getAddedPermanent()) { diff --git a/Mage.Sets/src/mage/cards/f/FlamespeakerAdept.java b/Mage.Sets/src/mage/cards/f/FlamespeakerAdept.java index 49dcc46ae6..918d083e7c 100644 --- a/Mage.Sets/src/mage/cards/f/FlamespeakerAdept.java +++ b/Mage.Sets/src/mage/cards/f/FlamespeakerAdept.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -50,8 +51,8 @@ public class FlamespeakerAdept extends CardImpl { public FlamespeakerAdept(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FlamespeakersWill.java b/Mage.Sets/src/mage/cards/f/FlamespeakersWill.java index 0e34744c78..17300860d3 100644 --- a/Mage.Sets/src/mage/cards/f/FlamespeakersWill.java +++ b/Mage.Sets/src/mage/cards/f/FlamespeakersWill.java @@ -52,7 +52,7 @@ public class FlamespeakersWill extends CardImpl { public FlamespeakersWill(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature you control diff --git a/Mage.Sets/src/mage/cards/f/FlamestickCourier.java b/Mage.Sets/src/mage/cards/f/FlamestickCourier.java index 7c5afe84b8..d48731c8bf 100644 --- a/Mage.Sets/src/mage/cards/f/FlamestickCourier.java +++ b/Mage.Sets/src/mage/cards/f/FlamestickCourier.java @@ -63,7 +63,7 @@ public class FlamestickCourier extends CardImpl { public FlamestickCourier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FlametongueKavu.java b/Mage.Sets/src/mage/cards/f/FlametongueKavu.java index 07bb6eac2a..5df12e5a08 100644 --- a/Mage.Sets/src/mage/cards/f/FlametongueKavu.java +++ b/Mage.Sets/src/mage/cards/f/FlametongueKavu.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -45,7 +46,7 @@ public class FlametongueKavu extends CardImpl { public FlametongueKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FlamewakePhoenix.java b/Mage.Sets/src/mage/cards/f/FlamewakePhoenix.java index d032d39a62..5dd6ddfd0f 100644 --- a/Mage.Sets/src/mage/cards/f/FlamewakePhoenix.java +++ b/Mage.Sets/src/mage/cards/f/FlamewakePhoenix.java @@ -29,7 +29,7 @@ package mage.cards.f; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.condition.common.FerociousCondition; import mage.abilities.costs.mana.ManaCostsImpl; @@ -41,6 +41,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class FlamewakePhoenix extends CardImpl { public FlamewakePhoenix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Phoenix"); + this.subtype.add(SubType.PHOENIX); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -61,7 +62,7 @@ public class FlamewakePhoenix extends CardImpl { // Haste this.addAbility(HasteAbility.getInstance()); // Flamewake Phoenix attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); // Ferocious - At the beginning of combat on your turn, if you control a creature with power 4 or greater, you may pay {R}. If you do, return Flamewake Phoenix from your graveyard to the battlefield. this.addAbility(new ConditionalTriggeredAbility( diff --git a/Mage.Sets/src/mage/cards/f/FlamewaveInvoker.java b/Mage.Sets/src/mage/cards/f/FlamewaveInvoker.java index f742462a19..cf9a716659 100644 --- a/Mage.Sets/src/mage/cards/f/FlamewaveInvoker.java +++ b/Mage.Sets/src/mage/cards/f/FlamewaveInvoker.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -47,8 +48,8 @@ public class FlamewaveInvoker extends CardImpl { public FlamewaveInvoker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/Flamewright.java b/Mage.Sets/src/mage/cards/f/Flamewright.java index 7465f3ce27..24cca2e3ce 100644 --- a/Mage.Sets/src/mage/cards/f/Flamewright.java +++ b/Mage.Sets/src/mage/cards/f/Flamewright.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -63,8 +64,8 @@ public class Flamewright extends CardImpl { public Flamewright(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{W}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FlamingSword.java b/Mage.Sets/src/mage/cards/f/FlamingSword.java new file mode 100644 index 0000000000..ee02e8ca8c --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FlamingSword.java @@ -0,0 +1,90 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.constants.SubType; +import mage.abilities.keyword.FlashAbility; +import mage.target.common.TargetCreaturePermanent; +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.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class FlamingSword extends CardImpl { + + public FlamingSword(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + + this.subtype.add(SubType.AURA); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +1/+0 and has first strike. + Effect effect = new BoostEnchantedEffect(1, 0, Duration.WhileOnBattlefield); + effect.setText("Enchanted creature gets +1/+0"); + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); + effect = new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.AURA); + effect.setText("and has first strike"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public FlamingSword(final FlamingSword card) { + super(card); + } + + @Override + public FlamingSword copy() { + return new FlamingSword(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FlankingTroops.java b/Mage.Sets/src/mage/cards/f/FlankingTroops.java index 0d2b4fe5d0..a8e4fa40e3 100644 --- a/Mage.Sets/src/mage/cards/f/FlankingTroops.java +++ b/Mage.Sets/src/mage/cards/f/FlankingTroops.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -45,8 +46,8 @@ public class FlankingTroops extends CardImpl { public FlankingTroops(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FlaringFlameKin.java b/Mage.Sets/src/mage/cards/f/FlaringFlameKin.java index 084230acb7..e29d44d789 100644 --- a/Mage.Sets/src/mage/cards/f/FlaringFlameKin.java +++ b/Mage.Sets/src/mage/cards/f/FlaringFlameKin.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -52,8 +53,8 @@ public class FlaringFlameKin extends CardImpl { public FlaringFlameKin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FlashConscription.java b/Mage.Sets/src/mage/cards/f/FlashConscription.java index 65571ff930..91e9cf345b 100644 --- a/Mage.Sets/src/mage/cards/f/FlashConscription.java +++ b/Mage.Sets/src/mage/cards/f/FlashConscription.java @@ -1,120 +1,123 @@ -/* - * 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.cards.f; - -import java.util.UUID; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.condition.common.ManaWasSpentCondition; -import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.effects.common.GainLifeEffect; -import mage.abilities.effects.common.UntapTargetEffect; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.abilities.effects.common.continuous.GainControlTargetEffect; -import mage.abilities.keyword.HasteAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.ColoredManaSymbol; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.DamagedEvent; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author LevelX2 - */ -public class FlashConscription extends CardImpl { - - public FlashConscription(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{5}{R}"); - - // Untap target creature and gain control of it until end of turn. That creature gains haste until end of turn. If {W} was spent to cast Flash Conscription, the creature gains "Whenever this creature deals combat damage, you gain that much life" until end of turn. - this.getSpellAbility().addEffect(new UntapTargetEffect()); - this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new ConditionalContinuousEffect( - new GainAbilityTargetEffect(new FlashConscriptionTriggeredAbility(), Duration.EndOfTurn), - new ManaWasSpentCondition(ColoredManaSymbol.W), "If {W} was spent to cast {this}, the creature gains \"Whenever this creature deals combat damage, you gain that much life\" until end of turn")); - - this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - } - - public FlashConscription(final FlashConscription card) { - super(card); - } - - @Override - public FlashConscription copy() { - return new FlashConscription(this); - } -} - -class FlashConscriptionTriggeredAbility extends TriggeredAbilityImpl { - - public FlashConscriptionTriggeredAbility() { - super(Zone.BATTLEFIELD, null); - } - - public FlashConscriptionTriggeredAbility(final FlashConscriptionTriggeredAbility ability) { - super(ability); - } - - @Override - public FlashConscriptionTriggeredAbility copy() { - return new FlashConscriptionTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.DAMAGED_CREATURE - || event.getType() == EventType.DAMAGED_PLAYER - || event.getType() == EventType.DAMAGED_PLANESWALKER; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - DamagedEvent damageEvent = (DamagedEvent) event; - if (damageEvent.isCombatDamage()) { - if (event.getSourceId().equals(this.sourceId)) { - this.getEffects().clear(); - this.getEffects().add(new GainLifeEffect(damageEvent.getAmount())); - return true; - } - } - return false; - } - - @Override - public String getRule() { - return "Whenever {this} deals combat damage, you gain that much life."; - } -} +/* + * 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.cards.f; + +import java.util.UUID; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.condition.common.ManaWasSpentCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.DamagedEvent; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class FlashConscription extends CardImpl { + + public FlashConscription(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{5}{R}"); + + // Untap target creature and gain control of it until end of turn. That creature gains haste until end of turn. If {W} was spent to cast Flash Conscription, the creature gains "Whenever this creature deals combat damage, you gain that much life" until end of turn. + this.getSpellAbility().addEffect(new UntapTargetEffect()); + this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn).setText("and gain control of it until end of turn")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("That creature gains haste until end of turn")); + this.getSpellAbility().addEffect(new ConditionalContinuousEffect( + new GainAbilityTargetEffect(new FlashConscriptionTriggeredAbility(), Duration.EndOfTurn), + new ManaWasSpentCondition(ColoredManaSymbol.W), + "If {W} was spent to cast {this}, the creature gains " + + "\"Whenever this creature deals combat damage, you gain that much life\" until end of turn" + )); + + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public FlashConscription(final FlashConscription card) { + super(card); + } + + @Override + public FlashConscription copy() { + return new FlashConscription(this); + } +} + +class FlashConscriptionTriggeredAbility extends TriggeredAbilityImpl { + + public FlashConscriptionTriggeredAbility() { + super(Zone.BATTLEFIELD, null); + } + + public FlashConscriptionTriggeredAbility(final FlashConscriptionTriggeredAbility ability) { + super(ability); + } + + @Override + public FlashConscriptionTriggeredAbility copy() { + return new FlashConscriptionTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.DAMAGED_CREATURE + || event.getType() == EventType.DAMAGED_PLAYER + || event.getType() == EventType.DAMAGED_PLANESWALKER; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + DamagedEvent damageEvent = (DamagedEvent) event; + if (damageEvent.isCombatDamage()) { + if (event.getSourceId().equals(this.sourceId)) { + this.getEffects().clear(); + this.getEffects().add(new GainLifeEffect(damageEvent.getAmount())); + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever {this} deals combat damage, you gain that much life."; + } +} diff --git a/Mage.Sets/src/mage/cards/f/FlayerDrone.java b/Mage.Sets/src/mage/cards/f/FlayerDrone.java index 8a395503be..2cbbe921c4 100644 --- a/Mage.Sets/src/mage/cards/f/FlayerDrone.java +++ b/Mage.Sets/src/mage/cards/f/FlayerDrone.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorlessPredicate; @@ -58,8 +59,8 @@ public class FlayerDrone extends CardImpl { public FlayerDrone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FlayerHusk.java b/Mage.Sets/src/mage/cards/f/FlayerHusk.java index f16f278cdc..c9a6bd9c07 100644 --- a/Mage.Sets/src/mage/cards/f/FlayerHusk.java +++ b/Mage.Sets/src/mage/cards/f/FlayerHusk.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.LivingWeaponAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class FlayerHusk extends CardImpl { public FlayerHusk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new LivingWeaponAbility()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); diff --git a/Mage.Sets/src/mage/cards/f/FlayerOfTheHatebound.java b/Mage.Sets/src/mage/cards/f/FlayerOfTheHatebound.java index 86e829a90e..a986e11891 100644 --- a/Mage.Sets/src/mage/cards/f/FlayerOfTheHatebound.java +++ b/Mage.Sets/src/mage/cards/f/FlayerOfTheHatebound.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.UndyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -55,7 +56,7 @@ public class FlayerOfTheHatebound extends CardImpl { public FlayerOfTheHatebound(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FledglingDjinn.java b/Mage.Sets/src/mage/cards/f/FledglingDjinn.java index 2764446bea..486ae7f73e 100644 --- a/Mage.Sets/src/mage/cards/f/FledglingDjinn.java +++ b/Mage.Sets/src/mage/cards/f/FledglingDjinn.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -45,7 +46,7 @@ public class FledglingDjinn extends CardImpl { public FledglingDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FledglingDragon.java b/Mage.Sets/src/mage/cards/f/FledglingDragon.java index 79e5e58e4e..80ac400927 100644 --- a/Mage.Sets/src/mage/cards/f/FledglingDragon.java +++ b/Mage.Sets/src/mage/cards/f/FledglingDragon.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class FledglingDragon extends CardImpl { public FledglingDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FledglingGriffin.java b/Mage.Sets/src/mage/cards/f/FledglingGriffin.java index cf35c78ec1..f0ad31eba9 100644 --- a/Mage.Sets/src/mage/cards/f/FledglingGriffin.java +++ b/Mage.Sets/src/mage/cards/f/FledglingGriffin.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,7 +47,7 @@ public class FledglingGriffin extends CardImpl { public FledglingGriffin (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.color.setWhite(true); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FledglingImp.java b/Mage.Sets/src/mage/cards/f/FledglingImp.java index 3577e09b3d..807bd1d14d 100644 --- a/Mage.Sets/src/mage/cards/f/FledglingImp.java +++ b/Mage.Sets/src/mage/cards/f/FledglingImp.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class FledglingImp extends CardImpl { public FledglingImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FledglingMawcor.java b/Mage.Sets/src/mage/cards/f/FledglingMawcor.java index 7fa1b9b8e1..6ac9a811e8 100644 --- a/Mage.Sets/src/mage/cards/f/FledglingMawcor.java +++ b/Mage.Sets/src/mage/cards/f/FledglingMawcor.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -50,7 +51,7 @@ public class FledglingMawcor extends CardImpl { public FledglingMawcor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FledglingOsprey.java b/Mage.Sets/src/mage/cards/f/FledglingOsprey.java index 603743b6b5..7faf2d98a2 100644 --- a/Mage.Sets/src/mage/cards/f/FledglingOsprey.java +++ b/Mage.Sets/src/mage/cards/f/FledglingOsprey.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class FledglingOsprey extends CardImpl { public FledglingOsprey(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FleecemaneLion.java b/Mage.Sets/src/mage/cards/f/FleecemaneLion.java index 0beb45d628..4fe26ca946 100644 --- a/Mage.Sets/src/mage/cards/f/FleecemaneLion.java +++ b/Mage.Sets/src/mage/cards/f/FleecemaneLion.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.MonstrosityAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class FleecemaneLion extends CardImpl { public FleecemaneLion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FleetFootedMonk.java b/Mage.Sets/src/mage/cards/f/FleetFootedMonk.java index 5bd365ceee..c6309715d7 100644 --- a/Mage.Sets/src/mage/cards/f/FleetFootedMonk.java +++ b/Mage.Sets/src/mage/cards/f/FleetFootedMonk.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; @@ -53,8 +54,8 @@ public class FleetFootedMonk extends CardImpl { public FleetFootedMonk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FleetSwallower.java b/Mage.Sets/src/mage/cards/f/FleetSwallower.java new file mode 100644 index 0000000000..7dca9daf93 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FleetSwallower.java @@ -0,0 +1,100 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author TheElk801 + */ +public class FleetSwallower extends CardImpl { + + public FleetSwallower(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}"); + + this.subtype.add(SubType.FISH); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Whenever Fleet Swallower attacks, target player puts the top half of his or her library, rounded up, into his or her graveyard. + Ability ability = new AttacksTriggeredAbility(new FleetSwallowerEffect(), false); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public FleetSwallower(final FleetSwallower card) { + super(card); + } + + @Override + public FleetSwallower copy() { + return new FleetSwallower(this); + } +} + +class FleetSwallowerEffect extends OneShotEffect { + + public FleetSwallowerEffect() { + super(Outcome.Detriment); + staticText = "target player puts the top half of his or her library, rounded up, into his or her graveyard"; + } + + public FleetSwallowerEffect(final FleetSwallowerEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getFirstTarget()); + if (player != null) { + int amount = (int) Math.ceil(player.getLibrary().size() * .5); + return player.moveCards(player.getLibrary().getTopCards(game, amount), Zone.GRAVEYARD, source, game); + } + return false; + } + + @Override + public FleetSwallowerEffect copy() { + return new FleetSwallowerEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/f/FleetfeatherCockatrice.java b/Mage.Sets/src/mage/cards/f/FleetfeatherCockatrice.java index 56c95e9ed5..639ba26eb9 100644 --- a/Mage.Sets/src/mage/cards/f/FleetfeatherCockatrice.java +++ b/Mage.Sets/src/mage/cards/f/FleetfeatherCockatrice.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MonstrosityAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class FleetfeatherCockatrice extends CardImpl { public FleetfeatherCockatrice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{U}"); - this.subtype.add("Cockatrice"); + this.subtype.add(SubType.COCKATRICE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FleetfeatherSandals.java b/Mage.Sets/src/mage/cards/f/FleetfeatherSandals.java index 2f8e462660..9c338d4d46 100644 --- a/Mage.Sets/src/mage/cards/f/FleetfeatherSandals.java +++ b/Mage.Sets/src/mage/cards/f/FleetfeatherSandals.java @@ -47,7 +47,7 @@ public class FleetfeatherSandals extends CardImpl { public FleetfeatherSandals(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has flying and haste. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, diff --git a/Mage.Sets/src/mage/cards/f/FleetfootPanther.java b/Mage.Sets/src/mage/cards/f/FleetfootPanther.java index 9af2e51829..bf1f17d281 100644 --- a/Mage.Sets/src/mage/cards/f/FleetfootPanther.java +++ b/Mage.Sets/src/mage/cards/f/FleetfootPanther.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -56,7 +57,7 @@ public class FleetfootPanther extends CardImpl { public FleetfootPanther(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FleetingAven.java b/Mage.Sets/src/mage/cards/f/FleetingAven.java new file mode 100644 index 0000000000..1a42f82425 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FleetingAven.java @@ -0,0 +1,69 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CycleAllTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class FleetingAven extends CardImpl { + + public FleetingAven(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); + + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever a player cycles a card, return Fleeting Aven to its owner's hand. + this.addAbility(new CycleAllTriggeredAbility(new ReturnToHandSourceEffect(true), true)); + } + + public FleetingAven(final FleetingAven card) { + super(card); + } + + @Override + public FleetingAven copy() { + return new FleetingAven(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FleetingImage.java b/Mage.Sets/src/mage/cards/f/FleetingImage.java index 32d2aab2be..414715bd55 100644 --- a/Mage.Sets/src/mage/cards/f/FleetingImage.java +++ b/Mage.Sets/src/mage/cards/f/FleetingImage.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class FleetingImage extends CardImpl { public FleetingImage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FleetingMemories.java b/Mage.Sets/src/mage/cards/f/FleetingMemories.java index e091defeeb..47577f15e7 100644 --- a/Mage.Sets/src/mage/cards/f/FleetingMemories.java +++ b/Mage.Sets/src/mage/cards/f/FleetingMemories.java @@ -103,7 +103,7 @@ class FleetingMemoriesTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { return event.getPlayerId().equals(this.getControllerId()) - && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).getSubtype(game).contains("Clue"); + && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).hasSubtype(SubType.CLUE, game); } @Override diff --git a/Mage.Sets/src/mage/cards/f/Flensermite.java b/Mage.Sets/src/mage/cards/f/Flensermite.java index 02e0d3a910..6b59bda9f8 100644 --- a/Mage.Sets/src/mage/cards/f/Flensermite.java +++ b/Mage.Sets/src/mage/cards/f/Flensermite.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class Flensermite extends CardImpl { public Flensermite (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Gremlin"); + this.subtype.add(SubType.GREMLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FleshCarver.java b/Mage.Sets/src/mage/cards/f/FleshCarver.java index ccde49e610..3a99fac51a 100644 --- a/Mage.Sets/src/mage/cards/f/FleshCarver.java +++ b/Mage.Sets/src/mage/cards/f/FleshCarver.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.IntimidateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -61,8 +62,8 @@ public class FleshCarver extends CardImpl { public FleshCarver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FleshEaterImp.java b/Mage.Sets/src/mage/cards/f/FleshEaterImp.java index 7fefc7ddc6..91cc0f9c40 100644 --- a/Mage.Sets/src/mage/cards/f/FleshEaterImp.java +++ b/Mage.Sets/src/mage/cards/f/FleshEaterImp.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -50,7 +51,7 @@ public class FleshEaterImp extends CardImpl { public FleshEaterImp (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FleshReaver.java b/Mage.Sets/src/mage/cards/f/FleshReaver.java new file mode 100644 index 0000000000..eb5448509d --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FleshReaver.java @@ -0,0 +1,146 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class FleshReaver extends CardImpl { + + public FleshReaver(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.HORROR); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Whenever Flesh Reaver deals damage to a creature or opponent, Flesh Reaver deals that much damage to you. + this.addAbility(new FleshReaverTriggeredAbility()); + } + + public FleshReaver(final FleshReaver card) { + super(card); + } + + @Override + public FleshReaver copy() { + return new FleshReaver(this); + } +} + +class FleshReaverTriggeredAbility extends TriggeredAbilityImpl { + + FleshReaverTriggeredAbility() { + super(Zone.BATTLEFIELD, new FleshReaverEffect()); + } + + FleshReaverTriggeredAbility(final FleshReaverTriggeredAbility effect) { + super(effect); + } + + @Override + public FleshReaverTriggeredAbility copy() { + return new FleshReaverTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DAMAGED_CREATURE || event.getType() == GameEvent.EventType.DAMAGED_PLAYER; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (!event.getSourceId().equals(sourceId)) { + return false; + } + if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) { + if (event.getTargetId().equals(controllerId)) { + return false; + } + } + for (Effect effect : this.getEffects()) { + effect.setValue("damage", event.getAmount()); + } + return true; + } + + @Override + public String getRule() { + return "Whenever {this} deals damage to a creature or opponent, {this} deals that much damage to you."; + } + +} + +class FleshReaverEffect extends OneShotEffect { + + FleshReaverEffect() { + super(Outcome.Detriment); + this.staticText = "{this} deals that much damage to you."; + } + + FleshReaverEffect(final FleshReaverEffect effect) { + super(effect); + } + + @Override + public FleshReaverEffect copy() { + return new FleshReaverEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent creature = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (creature == null || controller == null) { + return false; + } + int damageToDeal = (Integer) getValue("damage"); + if (damageToDeal > 0) { + controller.damage(damageToDeal, source.getSourceId(), game, false, true); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/f/FleshbagMarauder.java b/Mage.Sets/src/mage/cards/f/FleshbagMarauder.java index 3b52229155..e7b4c863f3 100644 --- a/Mage.Sets/src/mage/cards/f/FleshbagMarauder.java +++ b/Mage.Sets/src/mage/cards/f/FleshbagMarauder.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; /** @@ -44,8 +45,8 @@ public class FleshbagMarauder extends CardImpl { public FleshbagMarauder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/Fleshformer.java b/Mage.Sets/src/mage/cards/f/Fleshformer.java index e3430b2606..196bc37ad2 100644 --- a/Mage.Sets/src/mage/cards/f/Fleshformer.java +++ b/Mage.Sets/src/mage/cards/f/Fleshformer.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -53,8 +54,8 @@ public class Fleshformer extends CardImpl { public Fleshformer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/Fleshgrafter.java b/Mage.Sets/src/mage/cards/f/Fleshgrafter.java index fe6ab881e1..42542f719a 100644 --- a/Mage.Sets/src/mage/cards/f/Fleshgrafter.java +++ b/Mage.Sets/src/mage/cards/f/Fleshgrafter.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterArtifactCard; @@ -47,8 +48,8 @@ public class Fleshgrafter extends CardImpl { public Fleshgrafter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FleshmadSteed.java b/Mage.Sets/src/mage/cards/f/FleshmadSteed.java index db0d2ee11f..01908e9a6f 100644 --- a/Mage.Sets/src/mage/cards/f/FleshmadSteed.java +++ b/Mage.Sets/src/mage/cards/f/FleshmadSteed.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.TapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -50,7 +51,7 @@ public class FleshmadSteed extends CardImpl { public FleshmadSteed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Horse"); + this.subtype.add(SubType.HORSE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FleshpulperGiant.java b/Mage.Sets/src/mage/cards/f/FleshpulperGiant.java index 5dfbfdad0f..45b4ae9211 100644 --- a/Mage.Sets/src/mage/cards/f/FleshpulperGiant.java +++ b/Mage.Sets/src/mage/cards/f/FleshpulperGiant.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ToughnessPredicate; @@ -54,7 +55,7 @@ public class FleshpulperGiant extends CardImpl { public FleshpulperGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/Fleshwrither.java b/Mage.Sets/src/mage/cards/f/Fleshwrither.java index df1c4489e0..532aaa1bd9 100644 --- a/Mage.Sets/src/mage/cards/f/Fleshwrither.java +++ b/Mage.Sets/src/mage/cards/f/Fleshwrither.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.TimingRule; @@ -58,7 +59,7 @@ public class Fleshwrither extends CardImpl { public Fleshwrither(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/Flickerform.java b/Mage.Sets/src/mage/cards/f/Flickerform.java index 02d5c81b38..391d965e99 100644 --- a/Mage.Sets/src/mage/cards/f/Flickerform.java +++ b/Mage.Sets/src/mage/cards/f/Flickerform.java @@ -63,7 +63,7 @@ public class Flickerform extends CardImpl { public Flickerform(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FlickeringSpirit.java b/Mage.Sets/src/mage/cards/f/FlickeringSpirit.java index ab47d970f2..442e307844 100644 --- a/Mage.Sets/src/mage/cards/f/FlickeringSpirit.java +++ b/Mage.Sets/src/mage/cards/f/FlickeringSpirit.java @@ -32,13 +32,17 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.ExileSourceEffect; -import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlSourceEffect; +import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; /** * @@ -47,19 +51,17 @@ import mage.constants.Zone; public class FlickeringSpirit extends CardImpl { public FlickeringSpirit(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Spirit"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); // Flying this.addAbility(FlyingAbility.getInstance()); - + // {3}{W}: Exile Flickering Spirit, then return it to the battlefield under its owner's control. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileSourceEffect(true), new ManaCostsImpl("{3}{W}")); - ability.addEffect(new ReturnToBattlefieldUnderOwnerControlSourceEffect()); - this.addAbility(ability); - + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new FlickeringSpiritEffect(), new ManaCostsImpl("{3}{W}"))); + } public FlickeringSpirit(final FlickeringSpirit card) { @@ -71,3 +73,34 @@ public class FlickeringSpirit extends CardImpl { return new FlickeringSpirit(this); } } + +class FlickeringSpiritEffect extends OneShotEffect { + + public FlickeringSpiritEffect() { + super(Outcome.Neutral); + this.staticText = "Exile {this}, then return it to the battlefield under its owner's control"; + } + + public FlickeringSpiritEffect(final FlickeringSpiritEffect effect) { + super(effect); + } + + @Override + public FlickeringSpiritEffect copy() { + return new FlickeringSpiritEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + if (permanent.moveToExile(source.getSourceId(), "Flickering Spirit", source.getSourceId(), game)) { + Card card = game.getExile().getCard(source.getSourceId(), game); + if (card != null) { + return card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, false); + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/f/FlickeringWard.java b/Mage.Sets/src/mage/cards/f/FlickeringWard.java index 04c339f1f3..2df3ba02ce 100644 --- a/Mage.Sets/src/mage/cards/f/FlickeringWard.java +++ b/Mage.Sets/src/mage/cards/f/FlickeringWard.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -53,7 +54,7 @@ public class FlickeringWard extends CardImpl { public FlickeringWard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/Flickerwisp.java b/Mage.Sets/src/mage/cards/f/Flickerwisp.java index c406608cef..54f7e33386 100644 --- a/Mage.Sets/src/mage/cards/f/Flickerwisp.java +++ b/Mage.Sets/src/mage/cards/f/Flickerwisp.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -63,7 +64,7 @@ public class Flickerwisp extends CardImpl { public Flickerwisp(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/Flight.java b/Mage.Sets/src/mage/cards/f/Flight.java index e0a70ee248..fa6f415f7e 100644 --- a/Mage.Sets/src/mage/cards/f/Flight.java +++ b/Mage.Sets/src/mage/cards/f/Flight.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class Flight extends CardImpl { public Flight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FlightOfFancy.java b/Mage.Sets/src/mage/cards/f/FlightOfFancy.java index 1101356b1b..b20e1d5a19 100644 --- a/Mage.Sets/src/mage/cards/f/FlightOfFancy.java +++ b/Mage.Sets/src/mage/cards/f/FlightOfFancy.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -53,7 +54,7 @@ public class FlightOfFancy extends CardImpl { public FlightOfFancy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/f/FlinthoofBoar.java b/Mage.Sets/src/mage/cards/f/FlinthoofBoar.java index 2946e9c114..bd2c19e66e 100644 --- a/Mage.Sets/src/mage/cards/f/FlinthoofBoar.java +++ b/Mage.Sets/src/mage/cards/f/FlinthoofBoar.java @@ -58,7 +58,7 @@ public class FlinthoofBoar extends CardImpl { public FlinthoofBoar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Boar"); + this.subtype.add(SubType.BOAR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FlitterstepEidolon.java b/Mage.Sets/src/mage/cards/f/FlitterstepEidolon.java index b5db599fa7..8c7ff65732 100644 --- a/Mage.Sets/src/mage/cards/f/FlitterstepEidolon.java +++ b/Mage.Sets/src/mage/cards/f/FlitterstepEidolon.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class FlitterstepEidolon extends CardImpl { public FlitterstepEidolon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FloatingDreamZubera.java b/Mage.Sets/src/mage/cards/f/FloatingDreamZubera.java index 0a1f8a9b8e..247ce3c394 100644 --- a/Mage.Sets/src/mage/cards/f/FloatingDreamZubera.java +++ b/Mage.Sets/src/mage/cards/f/FloatingDreamZubera.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.watchers.common.ZuberasDiedWatcher; /** @@ -45,8 +46,8 @@ public class FloatingDreamZubera extends CardImpl { public FloatingDreamZubera(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Zubera"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.ZUBERA); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/Floodbringer.java b/Mage.Sets/src/mage/cards/f/Floodbringer.java index 8795f6113b..378e426813 100644 --- a/Mage.Sets/src/mage/cards/f/Floodbringer.java +++ b/Mage.Sets/src/mage/cards/f/Floodbringer.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; @@ -54,8 +55,8 @@ public class Floodbringer extends CardImpl { public Floodbringer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Moonfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MOONFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/Floodchaser.java b/Mage.Sets/src/mage/cards/f/Floodchaser.java index 51c2f65e84..476d121309 100644 --- a/Mage.Sets/src/mage/cards/f/Floodchaser.java +++ b/Mage.Sets/src/mage/cards/f/Floodchaser.java @@ -57,7 +57,7 @@ public class Floodchaser extends CardImpl { public Floodchaser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/f/FloodedWoodlands.java b/Mage.Sets/src/mage/cards/f/FloodedWoodlands.java index 7e5a16edd1..7487b3fa22 100644 --- a/Mage.Sets/src/mage/cards/f/FloodedWoodlands.java +++ b/Mage.Sets/src/mage/cards/f/FloodedWoodlands.java @@ -1,98 +1,98 @@ -/* - * 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.cards.f; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.common.SacrificeTargetCost; -import mage.abilities.effects.PayCostToAttackBlockEffectImpl; -import mage.abilities.effects.PayCostToAttackBlockEffectImpl.RestrictType; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.common.FilterControlledLandPermanent; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; -import mage.target.common.TargetControlledPermanent; - -/** - * - * @author jeffwadsworth - */ -public class FloodedWoodlands extends CardImpl { - - public FloodedWoodlands(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{B}"); - - - // Green creatures can't attack unless their controller sacrifices a land for each green creature he or she controls that's attacking. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new FloodedWoodlandsCostToAttackBlockEffect())); - - } - - public FloodedWoodlands(final FloodedWoodlands card) { - super(card); - } - - @Override - public FloodedWoodlands copy() { - return new FloodedWoodlands(this); - } -} - -class FloodedWoodlandsCostToAttackBlockEffect extends PayCostToAttackBlockEffectImpl { - - FloodedWoodlandsCostToAttackBlockEffect() { - super(Duration.WhileOnBattlefield, Outcome.Detriment, RestrictType.ATTACK, - new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land")))); - staticText = "Green creatures can't attack unless their controller sacrifices a land (This cost is paid as attackers are declared.)"; - } - - FloodedWoodlandsCostToAttackBlockEffect(FloodedWoodlandsCostToAttackBlockEffect effect) { - super(effect); - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - Permanent permanent = game.getPermanent(event.getSourceId()); - return (permanent != null - && permanent.isCreature() - && permanent.getColor(game).isGreen()); - } - - @Override - public FloodedWoodlandsCostToAttackBlockEffect copy() { - return new FloodedWoodlandsCostToAttackBlockEffect(this); - } - -} +/* + * 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.cards.f; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.PayCostToAttackBlockEffectImpl; +import mage.abilities.effects.PayCostToAttackBlockEffectImpl.RestrictType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterControlledLandPermanent; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author jeffwadsworth + */ +public class FloodedWoodlands extends CardImpl { + + public FloodedWoodlands(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{B}"); + + + // Green creatures can't attack unless their controller sacrifices a land for each green creature he or she controls that's attacking. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new FloodedWoodlandsCostToAttackBlockEffect())); + + } + + public FloodedWoodlands(final FloodedWoodlands card) { + super(card); + } + + @Override + public FloodedWoodlands copy() { + return new FloodedWoodlands(this); + } +} + +class FloodedWoodlandsCostToAttackBlockEffect extends PayCostToAttackBlockEffectImpl { + + FloodedWoodlandsCostToAttackBlockEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment, RestrictType.ATTACK, + new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land")))); + staticText = "Green creatures can't attack unless their controller sacrifices a land (This cost is paid as attackers are declared.)"; + } + + FloodedWoodlandsCostToAttackBlockEffect(FloodedWoodlandsCostToAttackBlockEffect effect) { + super(effect); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + Permanent permanent = game.getPermanent(event.getSourceId()); + return (permanent != null + && permanent.isCreature() + && permanent.getColor(game).isGreen()); + } + + @Override + public FloodedWoodlandsCostToAttackBlockEffect copy() { + return new FloodedWoodlandsCostToAttackBlockEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/f/FloodtideSerpent.java b/Mage.Sets/src/mage/cards/f/FloodtideSerpent.java index cad6510719..3bb6d4354e 100644 --- a/Mage.Sets/src/mage/cards/f/FloodtideSerpent.java +++ b/Mage.Sets/src/mage/cards/f/FloodtideSerpent.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.combat.CantAttackBlockUnlessPaysSourceEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -55,7 +56,7 @@ public class FloodtideSerpent extends CardImpl { public FloodtideSerpent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FloodwaterDam.java b/Mage.Sets/src/mage/cards/f/FloodwaterDam.java index dc1340b577..fad71572e0 100644 --- a/Mage.Sets/src/mage/cards/f/FloodwaterDam.java +++ b/Mage.Sets/src/mage/cards/f/FloodwaterDam.java @@ -38,42 +38,29 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterLandPermanent; -import mage.game.Game; -import mage.target.common.TargetLandPermanent; +import mage.filter.StaticFilters; +import mage.target.TargetPermanent; /** * * @author fireshoes */ public class FloodwaterDam extends CardImpl { - - private final UUID originalId; public FloodwaterDam(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); // {X}{X}{1}, {tap}: Tap X target lands. Effect effect = new TapTargetEffect(); effect.setText("tap X target lands"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}{X}{1}")); ability.addCost(new TapSourceCost()); - originalId = ability.getOriginalId(); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_LANDS)); this.addAbility(ability); } - - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(originalId)){ - int xValue = ability.getManaCostsToPay().getX(); - ability.getTargets().clear(); - ability.addTarget(new TargetLandPermanent(xValue, xValue, new FilterLandPermanent(), false)); - } - } public FloodwaterDam(final FloodwaterDam card) { super(card); - this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/cards/f/FloralSpuzzem.java b/Mage.Sets/src/mage/cards/f/FloralSpuzzem.java new file mode 100644 index 0000000000..6b0be265b7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FloralSpuzzem.java @@ -0,0 +1,81 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.continuous.AssignNoCombatDamageSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.permanent.DefendingPlayerControlsPredicate; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public class FloralSpuzzem extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("artifact defending player controls"); + + static { + filter.add(new CardTypePredicate(CardType.ARTIFACT)); + filter.add(new DefendingPlayerControlsPredicate()); + } + + public FloralSpuzzem(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + + this.subtype.add(SubType.ELEMENTAL); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Floral Spuzzem attacks and isn't blocked, you may destroy target artifact defending player controls. If you do, Floral Spuzzem assigns no combat damage this turn. + Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(new DestroyTargetEffect(), true); + ability.addEffect(new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn, true)); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + public FloralSpuzzem(final FloralSpuzzem card) { + super(card); + } + + @Override + public FloralSpuzzem copy() { + return new FloralSpuzzem(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FlowOfMaggots.java b/Mage.Sets/src/mage/cards/f/FlowOfMaggots.java index 26b0b9d775..c212f15330 100644 --- a/Mage.Sets/src/mage/cards/f/FlowOfMaggots.java +++ b/Mage.Sets/src/mage/cards/f/FlowOfMaggots.java @@ -56,7 +56,7 @@ public class FlowOfMaggots extends CardImpl { public FlowOfMaggots(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FloweringField.java b/Mage.Sets/src/mage/cards/f/FloweringField.java index 35f06051be..6103554d2a 100644 --- a/Mage.Sets/src/mage/cards/f/FloweringField.java +++ b/Mage.Sets/src/mage/cards/f/FloweringField.java @@ -52,7 +52,7 @@ public class FloweringField extends CardImpl { public FloweringField(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FloweringLumberknot.java b/Mage.Sets/src/mage/cards/f/FloweringLumberknot.java index e7a7341bb2..4d41437048 100644 --- a/Mage.Sets/src/mage/cards/f/FloweringLumberknot.java +++ b/Mage.Sets/src/mage/cards/f/FloweringLumberknot.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SoulbondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -48,7 +49,7 @@ public class FloweringLumberknot extends CardImpl { public FloweringLumberknot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneBlade.java b/Mage.Sets/src/mage/cards/f/FlowstoneBlade.java index 2e58b720dc..0ca854baf4 100644 --- a/Mage.Sets/src/mage/cards/f/FlowstoneBlade.java +++ b/Mage.Sets/src/mage/cards/f/FlowstoneBlade.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class FlowstoneBlade extends CardImpl { public FlowstoneBlade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneChanneler.java b/Mage.Sets/src/mage/cards/f/FlowstoneChanneler.java new file mode 100644 index 0000000000..b70542b911 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FlowstoneChanneler.java @@ -0,0 +1,83 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class FlowstoneChanneler extends CardImpl { + + public FlowstoneChanneler(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {1}{R}, {tap}, Discard a card: Target creature gets +1/-1 and gains haste until end of turn. + Effect effect = new BoostTargetEffect(1, -1, Duration.EndOfTurn); + effect.setText("Target creature gets +1/-1"); + Ability ability = new SimpleActivatedAbility(effect, new ManaCostsImpl("{1}{R}")); + effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains haste until end of turn"); + ability.addEffect(effect); + ability.addTarget(new TargetCreaturePermanent()); + ability.addCost(new TapSourceCost()); + ability.addCost(new DiscardCardCost()); + this.addAbility(ability); + } + + public FlowstoneChanneler(final FlowstoneChanneler card) { + super(card); + } + + @Override + public FlowstoneChanneler copy() { + return new FlowstoneChanneler(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneCharger.java b/Mage.Sets/src/mage/cards/f/FlowstoneCharger.java index 6e814c637c..f90c839911 100644 --- a/Mage.Sets/src/mage/cards/f/FlowstoneCharger.java +++ b/Mage.Sets/src/mage/cards/f/FlowstoneCharger.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class FlowstoneCharger extends CardImpl { public FlowstoneCharger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{W}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneCrusher.java b/Mage.Sets/src/mage/cards/f/FlowstoneCrusher.java index b19d24b496..533c6f568b 100644 --- a/Mage.Sets/src/mage/cards/f/FlowstoneCrusher.java +++ b/Mage.Sets/src/mage/cards/f/FlowstoneCrusher.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class FlowstoneCrusher extends CardImpl { public FlowstoneCrusher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneEmbrace.java b/Mage.Sets/src/mage/cards/f/FlowstoneEmbrace.java index 3d67204473..ba4a5ef7be 100644 --- a/Mage.Sets/src/mage/cards/f/FlowstoneEmbrace.java +++ b/Mage.Sets/src/mage/cards/f/FlowstoneEmbrace.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class FlowstoneEmbrace extends CardImpl { public FlowstoneEmbrace(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneGiant.java b/Mage.Sets/src/mage/cards/f/FlowstoneGiant.java index b1a84cd14f..5fd17888b9 100644 --- a/Mage.Sets/src/mage/cards/f/FlowstoneGiant.java +++ b/Mage.Sets/src/mage/cards/f/FlowstoneGiant.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class FlowstoneGiant extends CardImpl { public FlowstoneGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneHellion.java b/Mage.Sets/src/mage/cards/f/FlowstoneHellion.java index d4b14a27d6..077822abd9 100644 --- a/Mage.Sets/src/mage/cards/f/FlowstoneHellion.java +++ b/Mage.Sets/src/mage/cards/f/FlowstoneHellion.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class FlowstoneHellion extends CardImpl { public FlowstoneHellion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Hellion"); - this.subtype.add("Beast"); + this.subtype.add(SubType.HELLION); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneMauler.java b/Mage.Sets/src/mage/cards/f/FlowstoneMauler.java index be1c8cd3b7..56f1d578d8 100644 --- a/Mage.Sets/src/mage/cards/f/FlowstoneMauler.java +++ b/Mage.Sets/src/mage/cards/f/FlowstoneMauler.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class FlowstoneMauler extends CardImpl { public FlowstoneMauler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneOverseer.java b/Mage.Sets/src/mage/cards/f/FlowstoneOverseer.java index 61dde0bab9..5825fa4561 100644 --- a/Mage.Sets/src/mage/cards/f/FlowstoneOverseer.java +++ b/Mage.Sets/src/mage/cards/f/FlowstoneOverseer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class FlowstoneOverseer extends CardImpl { public FlowstoneOverseer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneSalamander.java b/Mage.Sets/src/mage/cards/f/FlowstoneSalamander.java index 0b9009a84a..a8d771c648 100644 --- a/Mage.Sets/src/mage/cards/f/FlowstoneSalamander.java +++ b/Mage.Sets/src/mage/cards/f/FlowstoneSalamander.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.BlockingAttackerIdPredicate; @@ -49,7 +50,7 @@ public class FlowstoneSalamander extends CardImpl { public FlowstoneSalamander(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Salamander"); + this.subtype.add(SubType.SALAMANDER); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneSculpture.java b/Mage.Sets/src/mage/cards/f/FlowstoneSculpture.java index 0d80865b79..aec33e5ae7 100644 --- a/Mage.Sets/src/mage/cards/f/FlowstoneSculpture.java +++ b/Mage.Sets/src/mage/cards/f/FlowstoneSculpture.java @@ -43,6 +43,7 @@ import mage.cards.CardSetInfo; import mage.choices.Choice; import mage.choices.ChoiceImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -62,7 +63,7 @@ public class FlowstoneSculpture extends CardImpl { public FlowstoneSculpture(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneShambler.java b/Mage.Sets/src/mage/cards/f/FlowstoneShambler.java index be104103ef..12fb6c7295 100644 --- a/Mage.Sets/src/mage/cards/f/FlowstoneShambler.java +++ b/Mage.Sets/src/mage/cards/f/FlowstoneShambler.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class FlowstoneShambler extends CardImpl { public FlowstoneShambler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneStrike.java b/Mage.Sets/src/mage/cards/f/FlowstoneStrike.java new file mode 100644 index 0000000000..3e0b8f605c --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FlowstoneStrike.java @@ -0,0 +1,68 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class FlowstoneStrike extends CardImpl { + + public FlowstoneStrike(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); + + // Target creature gets +1/-1 and gains haste until end of turn. + Effect effect = new BoostTargetEffect(1, -1, Duration.EndOfTurn); + effect.setText("Target creature gets +1/-1"); + this.getSpellAbility().addEffect(effect); + effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains haste until end of turn"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public FlowstoneStrike(final FlowstoneStrike card) { + super(card); + } + + @Override + public FlowstoneStrike copy() { + return new FlowstoneStrike(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneSurge.java b/Mage.Sets/src/mage/cards/f/FlowstoneSurge.java new file mode 100644 index 0000000000..8fcf9781eb --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FlowstoneSurge.java @@ -0,0 +1,61 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.StaticFilters; + +/** + * + * @author TheElk801 + */ +public class FlowstoneSurge extends CardImpl { + + public FlowstoneSurge(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + + // Creatures you control get +1/-1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, -1, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE, false))); + } + + public FlowstoneSurge(final FlowstoneSurge card) { + super(card); + } + + @Override + public FlowstoneSurge copy() { + return new FlowstoneSurge(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneThopter.java b/Mage.Sets/src/mage/cards/f/FlowstoneThopter.java index 187ff53ce8..c84180b75e 100644 --- a/Mage.Sets/src/mage/cards/f/FlowstoneThopter.java +++ b/Mage.Sets/src/mage/cards/f/FlowstoneThopter.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class FlowstoneThopter extends CardImpl { public FlowstoneThopter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{7}"); - this.subtype.add("Thopter"); + this.subtype.add(SubType.THOPTER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneWall.java b/Mage.Sets/src/mage/cards/f/FlowstoneWall.java index 762323688a..176d44cd63 100644 --- a/Mage.Sets/src/mage/cards/f/FlowstoneWall.java +++ b/Mage.Sets/src/mage/cards/f/FlowstoneWall.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class FlowstoneWall extends CardImpl { public FlowstoneWall(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneWyvern.java b/Mage.Sets/src/mage/cards/f/FlowstoneWyvern.java index 7837478a6d..947afa5b76 100644 --- a/Mage.Sets/src/mage/cards/f/FlowstoneWyvern.java +++ b/Mage.Sets/src/mage/cards/f/FlowstoneWyvern.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class FlowstoneWyvern extends CardImpl { public FlowstoneWyvern(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/Fluxcharger.java b/Mage.Sets/src/mage/cards/f/Fluxcharger.java index 473eb61425..925a627189 100644 --- a/Mage.Sets/src/mage/cards/f/Fluxcharger.java +++ b/Mage.Sets/src/mage/cards/f/Fluxcharger.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; @@ -46,7 +47,7 @@ public class Fluxcharger extends CardImpl { public Fluxcharger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{R}"); - this.subtype.add("Weird"); + this.subtype.add(SubType.WEIRD); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/f/FlyingMen.java b/Mage.Sets/src/mage/cards/f/FlyingMen.java index 10eec9de53..4288d6c23f 100644 --- a/Mage.Sets/src/mage/cards/f/FlyingMen.java +++ b/Mage.Sets/src/mage/cards/f/FlyingMen.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class FlyingMen extends CardImpl { public FlyingMen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FodderLaunch.java b/Mage.Sets/src/mage/cards/f/FodderLaunch.java index 70586006d9..7968eff44a 100644 --- a/Mage.Sets/src/mage/cards/f/FodderLaunch.java +++ b/Mage.Sets/src/mage/cards/f/FodderLaunch.java @@ -47,7 +47,7 @@ public class FodderLaunch extends CardImpl { public FodderLaunch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.SORCERY},"{3}{B}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); //As an additional cost to cast Fodder Launch, sacrifice a Goblin. this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent(SubType.GOBLIN, "a Goblin"), true))); diff --git a/Mage.Sets/src/mage/cards/f/FoeRazerRegent.java b/Mage.Sets/src/mage/cards/f/FoeRazerRegent.java index 1461b35269..888a7e4ca1 100644 --- a/Mage.Sets/src/mage/cards/f/FoeRazerRegent.java +++ b/Mage.Sets/src/mage/cards/f/FoeRazerRegent.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; @@ -66,8 +67,8 @@ public class FoeRazerRegent extends CardImpl { } public FoeRazerRegent(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Dragon"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(5); @@ -117,8 +118,8 @@ class FoeRazerRegentTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId()); if (permanent != null && permanent.getControllerId().equals(getControllerId())) { - for (Effect effect: this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getSourceId())); + for (Effect effect : this.getEffects()) { + effect.setTargetPointer(new FixedTarget(permanent, game)); } return true; } diff --git a/Mage.Sets/src/mage/cards/f/FogBank.java b/Mage.Sets/src/mage/cards/f/FogBank.java index 4de777ef47..a031f046ed 100644 --- a/Mage.Sets/src/mage/cards/f/FogBank.java +++ b/Mage.Sets/src/mage/cards/f/FogBank.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class FogBank extends CardImpl { public FogBank(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FogElemental.java b/Mage.Sets/src/mage/cards/f/FogElemental.java index 55b066a0d9..4bf1b0d01c 100644 --- a/Mage.Sets/src/mage/cards/f/FogElemental.java +++ b/Mage.Sets/src/mage/cards/f/FogElemental.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class FogElemental extends CardImpl { public FogElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FogOfGnats.java b/Mage.Sets/src/mage/cards/f/FogOfGnats.java index dece8b3752..9507d2f086 100644 --- a/Mage.Sets/src/mage/cards/f/FogOfGnats.java +++ b/Mage.Sets/src/mage/cards/f/FogOfGnats.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class FogOfGnats extends CardImpl { public FogOfGnats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/Fogwalker.java b/Mage.Sets/src/mage/cards/f/Fogwalker.java index 956342727c..eaf42be950 100644 --- a/Mage.Sets/src/mage/cards/f/Fogwalker.java +++ b/Mage.Sets/src/mage/cards/f/Fogwalker.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SkulkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -54,7 +55,7 @@ public class Fogwalker extends CardImpl { public Fogwalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FolkOfAnHavva.java b/Mage.Sets/src/mage/cards/f/FolkOfAnHavva.java index f76fe2744e..5fb7036f57 100644 --- a/Mage.Sets/src/mage/cards/f/FolkOfAnHavva.java +++ b/Mage.Sets/src/mage/cards/f/FolkOfAnHavva.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class FolkOfAnHavva extends CardImpl { public FolkOfAnHavva(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FolkOfThePines.java b/Mage.Sets/src/mage/cards/f/FolkOfThePines.java index 7db0a5d4ad..ca3a2a9269 100644 --- a/Mage.Sets/src/mage/cards/f/FolkOfThePines.java +++ b/Mage.Sets/src/mage/cards/f/FolkOfThePines.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class FolkOfThePines extends CardImpl { public FolkOfThePines(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Dryad"); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/f/FollowedFootsteps.java b/Mage.Sets/src/mage/cards/f/FollowedFootsteps.java index dc214e80eb..576477571e 100644 --- a/Mage.Sets/src/mage/cards/f/FollowedFootsteps.java +++ b/Mage.Sets/src/mage/cards/f/FollowedFootsteps.java @@ -33,11 +33,12 @@ import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.events.GameEvent; @@ -55,7 +56,7 @@ public class FollowedFootsteps extends CardImpl { public FollowedFootsteps(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); @@ -99,7 +100,7 @@ class FollowedFootstepsEffect extends OneShotEffect { Permanent enchantment = game.getPermanentOrLKIBattlefield(source.getSourceId()); Permanent target = game.getPermanentOrLKIBattlefield(enchantment.getAttachedTo()); if (target != null) { - Effect effect = new PutTokenOntoBattlefieldCopyTargetEffect(); + Effect effect = new CreateTokenCopyTargetEffect(); effect.setTargetPointer(new FixedTarget(enchantment.getAttachedTo())); return effect.apply(game, source); } diff --git a/Mage.Sets/src/mage/cards/f/FomoriNomad.java b/Mage.Sets/src/mage/cards/f/FomoriNomad.java index 2df4842bbd..e2fd916106 100644 --- a/Mage.Sets/src/mage/cards/f/FomoriNomad.java +++ b/Mage.Sets/src/mage/cards/f/FomoriNomad.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class FomoriNomad extends CardImpl { public FomoriNomad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Nomad"); - this.subtype.add("Giant"); + this.subtype.add(SubType.NOMAD); + this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FoolsDemise.java b/Mage.Sets/src/mage/cards/f/FoolsDemise.java index 066f18a9a1..6d8f41b36b 100644 --- a/Mage.Sets/src/mage/cards/f/FoolsDemise.java +++ b/Mage.Sets/src/mage/cards/f/FoolsDemise.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -50,7 +51,7 @@ public class FoolsDemise extends CardImpl { public FoolsDemise(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/f/FootSoldiers.java b/Mage.Sets/src/mage/cards/f/FootSoldiers.java index 1c5a48db1e..161073b08f 100644 --- a/Mage.Sets/src/mage/cards/f/FootSoldiers.java +++ b/Mage.Sets/src/mage/cards/f/FootSoldiers.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class FootSoldiers extends CardImpl { public FootSoldiers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FoothillGuide.java b/Mage.Sets/src/mage/cards/f/FoothillGuide.java index b0c7dac316..970932dbc3 100644 --- a/Mage.Sets/src/mage/cards/f/FoothillGuide.java +++ b/Mage.Sets/src/mage/cards/f/FoothillGuide.java @@ -53,8 +53,8 @@ public class FoothillGuide extends CardImpl { public FoothillGuide(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/Foratog.java b/Mage.Sets/src/mage/cards/f/Foratog.java index 55287663bb..f44aac7c49 100644 --- a/Mage.Sets/src/mage/cards/f/Foratog.java +++ b/Mage.Sets/src/mage/cards/f/Foratog.java @@ -56,7 +56,7 @@ public class Foratog extends CardImpl { } public Foratog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Atog"); + this.subtype.add(SubType.ATOG); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/ForbiddenLore.java b/Mage.Sets/src/mage/cards/f/ForbiddenLore.java index d414df21a8..154e6d0ae6 100644 --- a/Mage.Sets/src/mage/cards/f/ForbiddenLore.java +++ b/Mage.Sets/src/mage/cards/f/ForbiddenLore.java @@ -51,7 +51,7 @@ public class ForbiddenLore extends CardImpl { public ForbiddenLore(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/f/ForbiddingWatchtower.java b/Mage.Sets/src/mage/cards/f/ForbiddingWatchtower.java index 656a174f0e..ec251ae86a 100644 --- a/Mage.Sets/src/mage/cards/f/ForbiddingWatchtower.java +++ b/Mage.Sets/src/mage/cards/f/ForbiddingWatchtower.java @@ -37,6 +37,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -74,7 +75,7 @@ class ForbiddingWatchtowerToken extends Token { ForbiddingWatchtowerToken() { super("Soldier", "1/5 white Soldier creature"); cardType.add(CardType.CREATURE); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SOLDIER); color.setWhite(true); power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/ForceOfNature.java b/Mage.Sets/src/mage/cards/f/ForceOfNature.java index f90ede3add..2f976b49ed 100644 --- a/Mage.Sets/src/mage/cards/f/ForceOfNature.java +++ b/Mage.Sets/src/mage/cards/f/ForceOfNature.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.game.Game; @@ -51,7 +52,7 @@ public class ForceOfNature extends CardImpl { public ForceOfNature(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/f/ForceOfSavagery.java b/Mage.Sets/src/mage/cards/f/ForceOfSavagery.java index 2b7f2f805c..4ec6faf641 100644 --- a/Mage.Sets/src/mage/cards/f/ForceOfSavagery.java +++ b/Mage.Sets/src/mage/cards/f/ForceOfSavagery.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class ForceOfSavagery extends CardImpl { public ForceOfSavagery(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(8); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/f/ForcedAdaptation.java b/Mage.Sets/src/mage/cards/f/ForcedAdaptation.java index f81570e901..9a6a5b844b 100644 --- a/Mage.Sets/src/mage/cards/f/ForcedAdaptation.java +++ b/Mage.Sets/src/mage/cards/f/ForcedAdaptation.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class ForcedAdaptation extends CardImpl { public ForcedAdaptation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/f/ForcedWorship.java b/Mage.Sets/src/mage/cards/f/ForcedWorship.java index 28461f8ad2..3d0e475187 100644 --- a/Mage.Sets/src/mage/cards/f/ForcedWorship.java +++ b/Mage.Sets/src/mage/cards/f/ForcedWorship.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -54,7 +55,7 @@ public class ForcedWorship extends CardImpl { public ForcedWorship (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/f/ForerunnerOfSlaughter.java b/Mage.Sets/src/mage/cards/f/ForerunnerOfSlaughter.java index 8a987107cd..0d3c772b32 100644 --- a/Mage.Sets/src/mage/cards/f/ForerunnerOfSlaughter.java +++ b/Mage.Sets/src/mage/cards/f/ForerunnerOfSlaughter.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -58,8 +59,8 @@ public class ForerunnerOfSlaughter extends CardImpl { public ForerunnerOfSlaughter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{R}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/Foresight.java b/Mage.Sets/src/mage/cards/f/Foresight.java new file mode 100644 index 0000000000..19bd5aa71e --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/Foresight.java @@ -0,0 +1,109 @@ +/* + * 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.cards.f; + +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.SearchEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author TheElk801 + */ +public class Foresight extends CardImpl { + + public Foresight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{U}"); + + // Search your library for three cards, exile them, then shuffle your library. + this.getSpellAbility().addEffect(new ForesightEffect()); + + // Draw a card at the beginning of the next turn's upkeep. + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)), false)); + } + + public Foresight(final Foresight card) { + super(card); + } + + @Override + public Foresight copy() { + return new Foresight(this); + } +} + +class ForesightEffect extends SearchEffect { + + ForesightEffect() { + super(new TargetCardInLibrary(3, new FilterCard()), Outcome.Benefit); + staticText = "Search your library for three cards, exile them, then shuffle your library."; + } + + ForesightEffect(final ForesightEffect effect) { + super(effect); + } + + @Override + public ForesightEffect copy() { + return new ForesightEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player.searchLibrary(target, game)) { + for (UUID targetId : getTargets()) { + Card card = player.getLibrary().getCard(targetId, game); + if (card != null) { + card.moveToExile(null, null, targetId, game); + } + } + return true; + } + player.shuffleLibrary(source, game); + return false; + } + + public List getTargets() { + return target.getTargets(); + } + +} diff --git a/Mage.Sets/src/mage/cards/f/ForestBear.java b/Mage.Sets/src/mage/cards/f/ForestBear.java index d612381208..decec6aa71 100644 --- a/Mage.Sets/src/mage/cards/f/ForestBear.java +++ b/Mage.Sets/src/mage/cards/f/ForestBear.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class ForestBear extends CardImpl { public ForestBear(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Bear"); + this.subtype.add(SubType.BEAR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/ForgeDevil.java b/Mage.Sets/src/mage/cards/f/ForgeDevil.java index 5f1d141736..1d5342dd9b 100644 --- a/Mage.Sets/src/mage/cards/f/ForgeDevil.java +++ b/Mage.Sets/src/mage/cards/f/ForgeDevil.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -47,7 +48,7 @@ public class ForgeDevil extends CardImpl { public ForgeDevil(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/ForgebornOreads.java b/Mage.Sets/src/mage/cards/f/ForgebornOreads.java index e17213678e..0772f07379 100644 --- a/Mage.Sets/src/mage/cards/f/ForgebornOreads.java +++ b/Mage.Sets/src/mage/cards/f/ForgebornOreads.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; /** @@ -45,7 +46,7 @@ public class ForgebornOreads extends CardImpl { public ForgebornOreads(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Nymph"); + this.subtype.add(SubType.NYMPH); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/ForgestokerDragon.java b/Mage.Sets/src/mage/cards/f/ForgestokerDragon.java index 426ee53cf6..7cfeecabcf 100644 --- a/Mage.Sets/src/mage/cards/f/ForgestokerDragon.java +++ b/Mage.Sets/src/mage/cards/f/ForgestokerDragon.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -52,7 +53,7 @@ public class ForgestokerDragon extends CardImpl { public ForgestokerDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/ForgottenAncient.java b/Mage.Sets/src/mage/cards/f/ForgottenAncient.java index e8fd0ea974..bd8e7d0298 100644 --- a/Mage.Sets/src/mage/cards/f/ForgottenAncient.java +++ b/Mage.Sets/src/mage/cards/f/ForgottenAncient.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -65,7 +66,7 @@ public class ForgottenAncient extends CardImpl { public ForgottenAncient(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/ForgottenCreation.java b/Mage.Sets/src/mage/cards/f/ForgottenCreation.java index 5ebebee7ba..37bfc59efe 100644 --- a/Mage.Sets/src/mage/cards/f/ForgottenCreation.java +++ b/Mage.Sets/src/mage/cards/f/ForgottenCreation.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SkulkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.game.Game; @@ -49,8 +50,8 @@ public class ForgottenCreation extends CardImpl { public ForgottenCreation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/ForgottenHarvest.java b/Mage.Sets/src/mage/cards/f/ForgottenHarvest.java new file mode 100644 index 0000000000..c698fea613 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/ForgottenHarvest.java @@ -0,0 +1,74 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.costs.common.ExileFromGraveCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.filter.common.FilterLandCard; +import mage.target.common.TargetCardInYourGraveyard; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class ForgottenHarvest extends CardImpl { + + public ForgottenHarvest(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); + + // At the beginning of your upkeep, you may exile a land card from your graveyard. If you do, put a +1/+1 counter on target creature. + Ability ability = new BeginningOfUpkeepTriggeredAbility( + new DoIfCostPaid( + new AddCountersTargetEffect(CounterType.P1P1.createInstance()), + new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterLandCard("land card from your graveyard"))) + ), + TargetController.YOU, false + ); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public ForgottenHarvest(final ForgottenHarvest card) { + super(card); + } + + @Override + public ForgottenHarvest copy() { + return new ForgottenHarvest(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/ForiysianBrigade.java b/Mage.Sets/src/mage/cards/f/ForiysianBrigade.java index 2bc1e85efa..617a5c2b89 100644 --- a/Mage.Sets/src/mage/cards/f/ForiysianBrigade.java +++ b/Mage.Sets/src/mage/cards/f/ForiysianBrigade.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.CanBlockAdditionalCreatureEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -44,8 +45,8 @@ public class ForiysianBrigade extends CardImpl { public ForiysianBrigade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/ForiysianInterceptor.java b/Mage.Sets/src/mage/cards/f/ForiysianInterceptor.java index a6cdb72f20..4f34b19759 100644 --- a/Mage.Sets/src/mage/cards/f/ForiysianInterceptor.java +++ b/Mage.Sets/src/mage/cards/f/ForiysianInterceptor.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class ForiysianInterceptor extends CardImpl { public ForiysianInterceptor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/f/ForiysianTotem.java b/Mage.Sets/src/mage/cards/f/ForiysianTotem.java index 9a8f02d683..501aefb947 100644 --- a/Mage.Sets/src/mage/cards/f/ForiysianTotem.java +++ b/Mage.Sets/src/mage/cards/f/ForiysianTotem.java @@ -41,6 +41,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -84,7 +85,7 @@ class ForiysianTotemToken extends Token { super("", "4/4 red Giant artifact creature with trample"); cardType.add(CardType.CREATURE); cardType.add(CardType.ARTIFACT); - subtype.add("Giant"); + subtype.add(SubType.GIANT); color.setRed(true); power = new MageInt(4); toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/Fork.java b/Mage.Sets/src/mage/cards/f/Fork.java index 84bcec8ee7..ceabe8744d 100644 --- a/Mage.Sets/src/mage/cards/f/Fork.java +++ b/Mage.Sets/src/mage/cards/f/Fork.java @@ -27,7 +27,6 @@ */ package mage.cards.f; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.OneShotEffect; @@ -35,34 +34,28 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.stack.Spell; import mage.players.Player; import mage.target.TargetSpell; +import java.util.UUID; + /** * * @author jeffwadsworth */ public class Fork extends CardImpl { - private static final FilterSpell filter = new FilterSpell("target instant or sorcery spell"); - - static { - filter.add(Predicates.or(new CardTypePredicate(CardType.INSTANT), - new CardTypePredicate(CardType.SORCERY))); - } public Fork(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}{R}"); // Copy target instant or sorcery spell, except that the copy is red. You may choose new targets for the copy. this.getSpellAbility().addEffect(new ForkEffect()); - this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_INSTANT_OR_SORCERY_SPELL)); } diff --git a/Mage.Sets/src/mage/cards/f/ForkedBranchGarami.java b/Mage.Sets/src/mage/cards/f/ForkedBranchGarami.java index afd37e20bc..6b8246fb99 100644 --- a/Mage.Sets/src/mage/cards/f/ForkedBranchGarami.java +++ b/Mage.Sets/src/mage/cards/f/ForkedBranchGarami.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class ForkedBranchGarami extends CardImpl { public ForkedBranchGarami(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/ForlornPseudamma.java b/Mage.Sets/src/mage/cards/f/ForlornPseudamma.java index 521ca507a2..ea3e3223f7 100644 --- a/Mage.Sets/src/mage/cards/f/ForlornPseudamma.java +++ b/Mage.Sets/src/mage/cards/f/ForlornPseudamma.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.IntimidateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.ForlornPseudammaZombieToken; /** @@ -47,7 +48,7 @@ public class ForlornPseudamma extends CardImpl { public ForlornPseudamma(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/ForsakenDrifters.java b/Mage.Sets/src/mage/cards/f/ForsakenDrifters.java index e9cd712576..7b93b40e72 100644 --- a/Mage.Sets/src/mage/cards/f/ForsakenDrifters.java +++ b/Mage.Sets/src/mage/cards/f/ForsakenDrifters.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class ForsakenDrifters extends CardImpl { public ForsakenDrifters(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FortifiedRampart.java b/Mage.Sets/src/mage/cards/f/FortifiedRampart.java index 32f5ec4ae4..b4bd0d1314 100644 --- a/Mage.Sets/src/mage/cards/f/FortifiedRampart.java +++ b/Mage.Sets/src/mage/cards/f/FortifiedRampart.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class FortifiedRampart extends CardImpl { public FortifiedRampart(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/f/Fortitude.java b/Mage.Sets/src/mage/cards/f/Fortitude.java index fa6c04c662..386ee64ff9 100644 --- a/Mage.Sets/src/mage/cards/f/Fortitude.java +++ b/Mage.Sets/src/mage/cards/f/Fortitude.java @@ -59,7 +59,7 @@ public class Fortitude extends CardImpl { public Fortitude(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FortressCrab.java b/Mage.Sets/src/mage/cards/f/FortressCrab.java index f435e79c07..36a6457885 100644 --- a/Mage.Sets/src/mage/cards/f/FortressCrab.java +++ b/Mage.Sets/src/mage/cards/f/FortressCrab.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class FortressCrab extends CardImpl { public FortressCrab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Crab"); + this.subtype.add(SubType.CRAB); this.power = new MageInt(1); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/f/FortressCyclops.java b/Mage.Sets/src/mage/cards/f/FortressCyclops.java index 190e144d0a..137ab7758b 100644 --- a/Mage.Sets/src/mage/cards/f/FortressCyclops.java +++ b/Mage.Sets/src/mage/cards/f/FortressCyclops.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class FortressCyclops extends CardImpl { public FortressCyclops(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{W}"); - this.subtype.add("Cyclops"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.CYCLOPS); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FortuneThief.java b/Mage.Sets/src/mage/cards/f/FortuneThief.java index db975be43d..ef5d02f133 100644 --- a/Mage.Sets/src/mage/cards/f/FortuneThief.java +++ b/Mage.Sets/src/mage/cards/f/FortuneThief.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,8 +54,8 @@ public class FortuneThief extends CardImpl { public FortuneThief(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FoulEmissary.java b/Mage.Sets/src/mage/cards/f/FoulEmissary.java index f98b53d26c..7429ff84fe 100644 --- a/Mage.Sets/src/mage/cards/f/FoulEmissary.java +++ b/Mage.Sets/src/mage/cards/f/FoulEmissary.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EmergeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.Game; @@ -60,8 +61,8 @@ public class FoulEmissary extends CardImpl { public FoulEmissary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.HORROR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FoulFamiliar.java b/Mage.Sets/src/mage/cards/f/FoulFamiliar.java index 2deb64e023..77ab1b7e88 100644 --- a/Mage.Sets/src/mage/cards/f/FoulFamiliar.java +++ b/Mage.Sets/src/mage/cards/f/FoulFamiliar.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,7 +49,7 @@ public class FoulFamiliar extends CardImpl { public FoulFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FoulImp.java b/Mage.Sets/src/mage/cards/f/FoulImp.java index 0fee882822..0296b5be68 100644 --- a/Mage.Sets/src/mage/cards/f/FoulImp.java +++ b/Mage.Sets/src/mage/cards/f/FoulImp.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class FoulImp extends CardImpl { public FoulImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FoulPresence.java b/Mage.Sets/src/mage/cards/f/FoulPresence.java index d152603232..9a4e4a9f89 100644 --- a/Mage.Sets/src/mage/cards/f/FoulPresence.java +++ b/Mage.Sets/src/mage/cards/f/FoulPresence.java @@ -52,7 +52,7 @@ public class FoulPresence extends CardImpl { public FoulPresence(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FoulSpirit.java b/Mage.Sets/src/mage/cards/f/FoulSpirit.java index 6d6142151b..a32c0b511e 100644 --- a/Mage.Sets/src/mage/cards/f/FoulSpirit.java +++ b/Mage.Sets/src/mage/cards/f/FoulSpirit.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; /** @@ -45,7 +46,7 @@ public class FoulSpirit extends CardImpl { public FoulSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FoundryAssembler.java b/Mage.Sets/src/mage/cards/f/FoundryAssembler.java index 4e38c4dd81..9fc65cad74 100644 --- a/Mage.Sets/src/mage/cards/f/FoundryAssembler.java +++ b/Mage.Sets/src/mage/cards/f/FoundryAssembler.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ImproviseAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class FoundryAssembler extends CardImpl { public FoundryAssembler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}"); - this.subtype.add("Assembly-Worker"); + this.subtype.add(SubType.ASSEMBLY_WORKER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FoundryChampion.java b/Mage.Sets/src/mage/cards/f/FoundryChampion.java index 4ee966622c..48487db89d 100644 --- a/Mage.Sets/src/mage/cards/f/FoundryChampion.java +++ b/Mage.Sets/src/mage/cards/f/FoundryChampion.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -53,8 +54,8 @@ public class FoundryChampion extends CardImpl { public FoundryChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{W}"); - this.subtype.add("Elemental"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FoundryHornet.java b/Mage.Sets/src/mage/cards/f/FoundryHornet.java index 537f32fdee..29813f49c1 100644 --- a/Mage.Sets/src/mage/cards/f/FoundryHornet.java +++ b/Mage.Sets/src/mage/cards/f/FoundryHornet.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.counters.CounterType; @@ -65,7 +66,7 @@ public class FoundryHornet extends CardImpl { public FoundryHornet(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FoundryInspector.java b/Mage.Sets/src/mage/cards/f/FoundryInspector.java index 65b8dc549f..54d041ecd6 100644 --- a/Mage.Sets/src/mage/cards/f/FoundryInspector.java +++ b/Mage.Sets/src/mage/cards/f/FoundryInspector.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -52,7 +53,7 @@ public class FoundryInspector extends CardImpl { public FoundryInspector(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FoundryScreecher.java b/Mage.Sets/src/mage/cards/f/FoundryScreecher.java index 92815bf8cf..4866a35335 100644 --- a/Mage.Sets/src/mage/cards/f/FoundryScreecher.java +++ b/Mage.Sets/src/mage/cards/f/FoundryScreecher.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -49,7 +50,7 @@ public class FoundryScreecher extends CardImpl { public FoundryScreecher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Bat"); + this.subtype.add(SubType.BAT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FoundryStreetDenizen.java b/Mage.Sets/src/mage/cards/f/FoundryStreetDenizen.java index febc45dda5..bc016d1ceb 100644 --- a/Mage.Sets/src/mage/cards/f/FoundryStreetDenizen.java +++ b/Mage.Sets/src/mage/cards/f/FoundryStreetDenizen.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -59,8 +60,8 @@ public class FoundryStreetDenizen extends CardImpl { public FoundryStreetDenizen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FountainWatch.java b/Mage.Sets/src/mage/cards/f/FountainWatch.java index 3e83f7f1af..b4dc2f240b 100644 --- a/Mage.Sets/src/mage/cards/f/FountainWatch.java +++ b/Mage.Sets/src/mage/cards/f/FountainWatch.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -57,8 +58,8 @@ public class FountainWatch extends CardImpl { public FountainWatch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FourthBridgeProwler.java b/Mage.Sets/src/mage/cards/f/FourthBridgeProwler.java index 057a809c44..ba442bce45 100644 --- a/Mage.Sets/src/mage/cards/f/FourthBridgeProwler.java +++ b/Mage.Sets/src/mage/cards/f/FourthBridgeProwler.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class FourthBridgeProwler extends CardImpl { public FourthBridgeProwler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/Foxfire.java b/Mage.Sets/src/mage/cards/f/Foxfire.java new file mode 100644 index 0000000000..b7a5409ee3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/Foxfire.java @@ -0,0 +1,75 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.PreventDamageByTargetEffect; +import mage.abilities.effects.common.PreventDamageToTargetEffect; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.target.common.TargetAttackingCreature; + +/** + * + * @author L_J + */ +public class Foxfire extends CardImpl { + + public Foxfire(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{G}"); + + // Untap target attacking creature. Prevent all combat damage that would be dealt to and dealt by that creature this turn. + this.getSpellAbility().addTarget(new TargetAttackingCreature()); + this.getSpellAbility().addEffect(new UntapTargetEffect()); + this.getSpellAbility().addEffect(new PreventDamageByTargetEffect(Duration.EndOfTurn, true).setText("Prevent all combat damage that would be dealt to ")); + this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, true).setText("and dealt by that creature this turn.")); + + // Draw a card at the beginning of the next turn's upkeep. + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)),false)); + + + } + + public Foxfire(final Foxfire card) { + super(card); + } + + @Override + public Foxfire copy() { + return new Foxfire(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FoxfireOak.java b/Mage.Sets/src/mage/cards/f/FoxfireOak.java index a3910dc45c..705e1cbb85 100644 --- a/Mage.Sets/src/mage/cards/f/FoxfireOak.java +++ b/Mage.Sets/src/mage/cards/f/FoxfireOak.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,8 +47,8 @@ public class FoxfireOak extends CardImpl { public FoxfireOak(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/f/FracturedIdentity.java b/Mage.Sets/src/mage/cards/f/FracturedIdentity.java index 49ae7d81c0..7a7d532aa4 100644 --- a/Mage.Sets/src/mage/cards/f/FracturedIdentity.java +++ b/Mage.Sets/src/mage/cards/f/FracturedIdentity.java @@ -30,7 +30,7 @@ package mage.cards.f; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -90,7 +90,7 @@ class FracturedIdentityEffect extends OneShotEffect { permanent.moveToExile(null, null, source.getSourceId(), game); UUID controllerId = permanent.getControllerId(); for (UUID opponentId : game.getOpponents(controllerId)) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(opponentId, null, false); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(opponentId, null, false); effect.setTargetPointer(new FixedTarget(permanent, game)); effect.apply(game, source); } diff --git a/Mage.Sets/src/mage/cards/f/FracturedLoyalty.java b/Mage.Sets/src/mage/cards/f/FracturedLoyalty.java new file mode 100644 index 0000000000..2ce91ccbe8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FracturedLoyalty.java @@ -0,0 +1,157 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +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.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author L_J (significantly based on wetterlicht) + */ +public class FracturedLoyalty extends CardImpl { + + public FracturedLoyalty(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Whenever enchanted creature becomes the target of a spell or ability, that spell or ability's controller gains control of that creature. + this.addAbility(new FracturedLoyaltyTriggeredAbility()); + } + + public FracturedLoyalty(final FracturedLoyalty card) { + super(card); + } + + @Override + public FracturedLoyalty copy() { + return new FracturedLoyalty(this); + } + + private static class FracturedLoyaltyEffect extends OneShotEffect { + + public FracturedLoyaltyEffect() { + super(Outcome.GainControl); + this.staticText = "that spell or ability's controller gains control of that creature"; + } + + private FracturedLoyaltyEffect(FracturedLoyaltyEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent enchantment = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (enchantment != null) { + Permanent enchantedCreature = game.getPermanent(enchantment.getAttachedTo()); + if (enchantedCreature != null) { + Player controller = game.getPlayer(enchantedCreature.getControllerId()); + if (enchantment.getAttachedTo() != null) { + if (controller != null && !enchantedCreature.getControllerId().equals(this.getTargetPointer().getFirst(game, source))) { + ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, this.getTargetPointer().getFirst(game, source)); + effect.setTargetPointer(new FixedTarget(enchantment.getAttachedTo())); + game.addEffect(effect, source); + return true; + } + } + } + } + return false; + } + + @Override + public Effect copy() { + return new FracturedLoyaltyEffect(this); + } + + } + + class FracturedLoyaltyTriggeredAbility extends TriggeredAbilityImpl { + + public FracturedLoyaltyTriggeredAbility() { + super(Zone.BATTLEFIELD, new FracturedLoyaltyEffect(), false); + } + + public FracturedLoyaltyTriggeredAbility(final FracturedLoyaltyTriggeredAbility ability) { + super(ability); + } + + @Override + public FracturedLoyaltyTriggeredAbility copy() { + return new FracturedLoyaltyTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.TARGETED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent enchantment = game.getPermanentOrLKIBattlefield(this.getSourceId()); + if (enchantment != null && enchantment.getAttachedTo() != null) { + Permanent enchantedCreature = game.getPermanent(enchantment.getAttachedTo()); + if (enchantedCreature != null && event.getTargetId().equals(enchantment.getAttachedTo())) { + getEffects().get(0).setTargetPointer(new FixedTarget(event.getPlayerId())); + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever enchanted creature becomes the target of a spell or ability, that spell or ability's controller gains control of that creature."; + } + } +} diff --git a/Mage.Sets/src/mage/cards/f/FreedFromTheReal.java b/Mage.Sets/src/mage/cards/f/FreedFromTheReal.java index 8338ea81ea..7bb3201dc3 100644 --- a/Mage.Sets/src/mage/cards/f/FreedFromTheReal.java +++ b/Mage.Sets/src/mage/cards/f/FreedFromTheReal.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class FreedFromTheReal extends CardImpl { public FreedFromTheReal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/cards/f/FreejamRegent.java b/Mage.Sets/src/mage/cards/f/FreejamRegent.java index ee720b9aad..48f838680c 100644 --- a/Mage.Sets/src/mage/cards/f/FreejamRegent.java +++ b/Mage.Sets/src/mage/cards/f/FreejamRegent.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ImproviseAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class FreejamRegent extends CardImpl { public FreejamRegent(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FreewindEquenaut.java b/Mage.Sets/src/mage/cards/f/FreewindEquenaut.java index 849df52fcf..493059fa71 100644 --- a/Mage.Sets/src/mage/cards/f/FreewindEquenaut.java +++ b/Mage.Sets/src/mage/cards/f/FreewindEquenaut.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterAttackingOrBlockingCreature; @@ -53,8 +54,8 @@ public class FreewindEquenaut extends CardImpl { public FreewindEquenaut(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FreewindFalcon.java b/Mage.Sets/src/mage/cards/f/FreewindFalcon.java index 92017c98a7..4770881972 100644 --- a/Mage.Sets/src/mage/cards/f/FreewindFalcon.java +++ b/Mage.Sets/src/mage/cards/f/FreewindFalcon.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** @@ -45,7 +46,7 @@ public class FreewindFalcon extends CardImpl { public FreewindFalcon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FreneticEfreet.java b/Mage.Sets/src/mage/cards/f/FreneticEfreet.java index 37b2bd3252..bc43ecad87 100644 --- a/Mage.Sets/src/mage/cards/f/FreneticEfreet.java +++ b/Mage.Sets/src/mage/cards/f/FreneticEfreet.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class FreneticEfreet extends CardImpl { public FreneticEfreet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{R}"); - this.subtype.add("Efreet"); + this.subtype.add(SubType.EFREET); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FreneticOgre.java b/Mage.Sets/src/mage/cards/f/FreneticOgre.java index e73840be64..95238e976f 100644 --- a/Mage.Sets/src/mage/cards/f/FreneticOgre.java +++ b/Mage.Sets/src/mage/cards/f/FreneticOgre.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class FreneticOgre extends CardImpl { public FreneticOgre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Ogre"); + this.subtype.add(SubType.OGRE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FreneticRaptor.java b/Mage.Sets/src/mage/cards/f/FreneticRaptor.java new file mode 100644 index 0000000000..af8f9fd011 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FreneticRaptor.java @@ -0,0 +1,70 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.combat.CantBlockAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class FreneticRaptor extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.BEAST, "Beasts"); + + public FreneticRaptor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}"); + + this.subtype.add(SubType.DINOSAUR); + this.subtype.add(SubType.BEAST); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Beasts can't block. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockAllEffect(filter, Duration.WhileOnBattlefield))); + } + + public FreneticRaptor(final FreneticRaptor card) { + super(card); + } + + @Override + public FreneticRaptor copy() { + return new FreneticRaptor(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FreneticSliver.java b/Mage.Sets/src/mage/cards/f/FreneticSliver.java index 8a800ae398..c0a638c1c2 100644 --- a/Mage.Sets/src/mage/cards/f/FreneticSliver.java +++ b/Mage.Sets/src/mage/cards/f/FreneticSliver.java @@ -55,7 +55,7 @@ public class FreneticSliver extends CardImpl { public FreneticSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{R}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FrenziedFugue.java b/Mage.Sets/src/mage/cards/f/FrenziedFugue.java index d9bc7f24a4..9a253f0b25 100644 --- a/Mage.Sets/src/mage/cards/f/FrenziedFugue.java +++ b/Mage.Sets/src/mage/cards/f/FrenziedFugue.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class FrenziedFugue extends CardImpl { public FrenziedFugue(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant permanent TargetPermanent auraTarget = new TargetPermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FrenziedGoblin.java b/Mage.Sets/src/mage/cards/f/FrenziedGoblin.java index fbaae28128..99f86958f7 100644 --- a/Mage.Sets/src/mage/cards/f/FrenziedGoblin.java +++ b/Mage.Sets/src/mage/cards/f/FrenziedGoblin.java @@ -27,7 +27,6 @@ */ package mage.cards.f; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; @@ -37,10 +36,13 @@ import mage.abilities.effects.common.combat.CantBlockTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.Target; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -49,15 +51,15 @@ public class FrenziedGoblin extends CardImpl { public FrenziedGoblin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(1); this.toughness = new MageInt(1); // Whenever Frenzied Goblin attacks, you may pay {R}. If you do, target creature can't block this turn. Ability ability = new AttacksTriggeredAbility(new DoIfCostPaid(new CantBlockTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{R}")),false, - "Whenever {this} attacks you may pay {R}. If you do, target creature can't block this turn."); + "Whenever {this} attacks you, may pay {R}. If you do, target creature can't block this turn."); Target target = new TargetCreaturePermanent(); ability.addTarget(target); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/f/FrenziedRaptor.java b/Mage.Sets/src/mage/cards/f/FrenziedRaptor.java new file mode 100644 index 0000000000..6d9cc0760c --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FrenziedRaptor.java @@ -0,0 +1,59 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class FrenziedRaptor extends CardImpl { + + public FrenziedRaptor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(4); + this.toughness = new MageInt(2); + } + + public FrenziedRaptor(final FrenziedRaptor card) { + super(card); + } + + @Override + public FrenziedRaptor copy() { + return new FrenziedRaptor(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FrenzySliver.java b/Mage.Sets/src/mage/cards/f/FrenzySliver.java index dfc2477615..9bc78c4589 100644 --- a/Mage.Sets/src/mage/cards/f/FrenzySliver.java +++ b/Mage.Sets/src/mage/cards/f/FrenzySliver.java @@ -64,7 +64,7 @@ public class FrenzySliver extends CardImpl { public FrenzySliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FreshVolunteers.java b/Mage.Sets/src/mage/cards/f/FreshVolunteers.java index ff6f550ba5..2effcf718a 100644 --- a/Mage.Sets/src/mage/cards/f/FreshVolunteers.java +++ b/Mage.Sets/src/mage/cards/f/FreshVolunteers.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class FreshVolunteers extends CardImpl { public FreshVolunteers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FretworkColony.java b/Mage.Sets/src/mage/cards/f/FretworkColony.java index cc920ef427..dae02d66f3 100644 --- a/Mage.Sets/src/mage/cards/f/FretworkColony.java +++ b/Mage.Sets/src/mage/cards/f/FretworkColony.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.counters.CounterType; @@ -49,7 +50,7 @@ public class FretworkColony extends CardImpl { public FretworkColony(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FreyaliseLlanowarsFury.java b/Mage.Sets/src/mage/cards/f/FreyaliseLlanowarsFury.java index c07e21cc26..d602acecb6 100644 --- a/Mage.Sets/src/mage/cards/f/FreyaliseLlanowarsFury.java +++ b/Mage.Sets/src/mage/cards/f/FreyaliseLlanowarsFury.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -62,7 +63,7 @@ public class FreyaliseLlanowarsFury extends CardImpl { public FreyaliseLlanowarsFury(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{G}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Freyalise"); + this.subtype.add(SubType.FREYALISE); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/f/FreyalisesCharm.java b/Mage.Sets/src/mage/cards/f/FreyalisesCharm.java new file mode 100644 index 0000000000..026fd10f2c --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FreyalisesCharm.java @@ -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.cards.f; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author TheElk801 + */ +public class FreyalisesCharm extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("black spell"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public FreyalisesCharm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}{G}"); + + // Whenever an opponent casts a black spell, you may pay {G}{G}. If you do, you draw a card. + this.addAbility(new SpellCastOpponentTriggeredAbility( + new DoIfCostPaid( + new DrawCardSourceControllerEffect(1), + new ManaCostsImpl("{G}{G}") + ), filter, false + )); + + // {G}{G}: Return Freyalise's Charm to its owner's hand. + this.addAbility(new SimpleActivatedAbility(new ReturnToHandSourceEffect(true), new ManaCostsImpl("{G}{G}"))); + } + + public FreyalisesCharm(final FreyalisesCharm card) { + super(card); + } + + @Override + public FreyalisesCharm copy() { + return new FreyalisesCharm(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FreyalisesRadiance.java b/Mage.Sets/src/mage/cards/f/FreyalisesRadiance.java index f1beb8ac1e..ab44a4e85f 100644 --- a/Mage.Sets/src/mage/cards/f/FreyalisesRadiance.java +++ b/Mage.Sets/src/mage/cards/f/FreyalisesRadiance.java @@ -48,7 +48,7 @@ import mage.filter.predicate.mageobject.SupertypePredicate; */ public class FreyalisesRadiance extends CardImpl { - private static final FilterPermanent filter = new FilterPermanent(); + private static final FilterPermanent filter = new FilterPermanent("snow permanents"); static { filter.add(new SupertypePredicate(SuperType.SNOW)); diff --git a/Mage.Sets/src/mage/cards/f/Frightcrawler.java b/Mage.Sets/src/mage/cards/f/Frightcrawler.java index bbaeb3e3aa..124e8611aa 100644 --- a/Mage.Sets/src/mage/cards/f/Frightcrawler.java +++ b/Mage.Sets/src/mage/cards/f/Frightcrawler.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class Frightcrawler extends CardImpl { public Frightcrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FrightshroudCourier.java b/Mage.Sets/src/mage/cards/f/FrightshroudCourier.java index 6ecd1cfb15..6202b16053 100644 --- a/Mage.Sets/src/mage/cards/f/FrightshroudCourier.java +++ b/Mage.Sets/src/mage/cards/f/FrightshroudCourier.java @@ -63,7 +63,7 @@ public class FrightshroudCourier extends CardImpl { public FrightshroudCourier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FrilledOculus.java b/Mage.Sets/src/mage/cards/f/FrilledOculus.java index 5f0cfa7979..418ff4b2a3 100644 --- a/Mage.Sets/src/mage/cards/f/FrilledOculus.java +++ b/Mage.Sets/src/mage/cards/f/FrilledOculus.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class FrilledOculus extends CardImpl { public FrilledOculus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Homunculus"); + this.subtype.add(SubType.HOMUNCULUS); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FrilledSandwalla.java b/Mage.Sets/src/mage/cards/f/FrilledSandwalla.java index 95207ba272..c7982c785d 100644 --- a/Mage.Sets/src/mage/cards/f/FrilledSandwalla.java +++ b/Mage.Sets/src/mage/cards/f/FrilledSandwalla.java @@ -1,67 +1,68 @@ -/* - * 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.cards.f; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; - -/** - * - * @author ciaccona007 - */ -public class FrilledSandwalla extends CardImpl { - - public FrilledSandwalla(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); - - this.subtype.add("Lizard"); - this.power = new MageInt(1); - this.toughness = new MageInt(1); - - // {1}{G}: Frilled Sandwalla gets +2/+2 until end of turn. Activate this ability only once each turn. - this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, - new BoostSourceEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl("{1}{G}"))); - } - - public FrilledSandwalla(final FrilledSandwalla card) { - super(card); - } - - @Override - public FrilledSandwalla copy() { - return new FrilledSandwalla(this); - } -} +/* + * 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.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author ciaccona007 + */ +public class FrilledSandwalla extends CardImpl { + + public FrilledSandwalla(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); + + this.subtype.add(SubType.LIZARD); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}{G}: Frilled Sandwalla gets +2/+2 until end of turn. Activate this ability only once each turn. + this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, + new BoostSourceEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl("{1}{G}"))); + } + + public FrilledSandwalla(final FrilledSandwalla card) { + super(card); + } + + @Override + public FrilledSandwalla copy() { + return new FrilledSandwalla(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FrogTongue.java b/Mage.Sets/src/mage/cards/f/FrogTongue.java index ff20f3e9c8..f764604a80 100644 --- a/Mage.Sets/src/mage/cards/f/FrogTongue.java +++ b/Mage.Sets/src/mage/cards/f/FrogTongue.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -52,7 +53,7 @@ public class FrogTongue extends CardImpl { public FrogTongue(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/cards/f/Frogmite.java b/Mage.Sets/src/mage/cards/f/Frogmite.java index 0a4a95aa77..469d3f97a4 100644 --- a/Mage.Sets/src/mage/cards/f/Frogmite.java +++ b/Mage.Sets/src/mage/cards/f/Frogmite.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.AffinityForArtifactsAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class Frogmite extends CardImpl { public Frogmite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Frog"); + this.subtype.add(SubType.FROG); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FrogtosserBanneret.java b/Mage.Sets/src/mage/cards/f/FrogtosserBanneret.java index 4ffe41bbc7..16206fa414 100644 --- a/Mage.Sets/src/mage/cards/f/FrogtosserBanneret.java +++ b/Mage.Sets/src/mage/cards/f/FrogtosserBanneret.java @@ -57,8 +57,8 @@ public class FrogtosserBanneret extends CardImpl { public FrogtosserBanneret(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FrontierGuide.java b/Mage.Sets/src/mage/cards/f/FrontierGuide.java index 49e247b2a6..f8fe545043 100644 --- a/Mage.Sets/src/mage/cards/f/FrontierGuide.java +++ b/Mage.Sets/src/mage/cards/f/FrontierGuide.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; @@ -49,8 +50,8 @@ public class FrontierGuide extends CardImpl { public FrontierGuide(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FrontierMastodon.java b/Mage.Sets/src/mage/cards/f/FrontierMastodon.java index be476d413e..afecb7cbd4 100644 --- a/Mage.Sets/src/mage/cards/f/FrontierMastodon.java +++ b/Mage.Sets/src/mage/cards/f/FrontierMastodon.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,7 +46,7 @@ public class FrontierMastodon extends CardImpl { public FrontierMastodon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FrontlineDevastator.java b/Mage.Sets/src/mage/cards/f/FrontlineDevastator.java index 0136a47452..8cd9ed4f2c 100644 --- a/Mage.Sets/src/mage/cards/f/FrontlineDevastator.java +++ b/Mage.Sets/src/mage/cards/f/FrontlineDevastator.java @@ -1,71 +1,72 @@ -/* - * 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.cards.f; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.abilities.keyword.AfflictAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; - -/** - * - * @author ciaccona007 - */ -public class FrontlineDevastator extends CardImpl { - - public FrontlineDevastator(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - - this.subtype.add("Zombie"); - this.subtype.add("Minotaur"); - this.subtype.add("Warrior"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // Afflict 2 - addAbility(new AfflictAbility(2)); - // {1}{R}: Frontline Devastator gets +1/+0 until end of turn. - addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1,0,Duration.EndOfTurn), new ManaCostsImpl("{1}{R}"))); - } - - public FrontlineDevastator(final FrontlineDevastator card) { - super(card); - } - - @Override - public FrontlineDevastator copy() { - return new FrontlineDevastator(this); - } -} +/* + * 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.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.AfflictAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author ciaccona007 + */ +public class FrontlineDevastator extends CardImpl { + + public FrontlineDevastator(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Afflict 2 + addAbility(new AfflictAbility(2)); + // {1}{R}: Frontline Devastator gets +1/+0 until end of turn. + addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1,0,Duration.EndOfTurn), new ManaCostsImpl("{1}{R}"))); + } + + public FrontlineDevastator(final FrontlineDevastator card) { + super(card); + } + + @Override + public FrontlineDevastator copy() { + return new FrontlineDevastator(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FrontlineMedic.java b/Mage.Sets/src/mage/cards/f/FrontlineMedic.java index e3bf290bbd..be32ec3018 100644 --- a/Mage.Sets/src/mage/cards/f/FrontlineMedic.java +++ b/Mage.Sets/src/mage/cards/f/FrontlineMedic.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterSpell; @@ -62,8 +63,8 @@ public class FrontlineMedic extends CardImpl { public FrontlineMedic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.color.setWhite(true); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FrontlineRebel.java b/Mage.Sets/src/mage/cards/f/FrontlineRebel.java index 48bb65cace..086561af94 100644 --- a/Mage.Sets/src/mage/cards/f/FrontlineRebel.java +++ b/Mage.Sets/src/mage/cards/f/FrontlineRebel.java @@ -33,6 +33,7 @@ import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class FrontlineRebel extends CardImpl { public FrontlineRebel(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FrontlineSage.java b/Mage.Sets/src/mage/cards/f/FrontlineSage.java index 764fc56926..2a583ceab7 100644 --- a/Mage.Sets/src/mage/cards/f/FrontlineSage.java +++ b/Mage.Sets/src/mage/cards/f/FrontlineSage.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ExaltedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -49,8 +50,8 @@ public class FrontlineSage extends CardImpl { public FrontlineSage (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FrostGiant.java b/Mage.Sets/src/mage/cards/f/FrostGiant.java index 474d080424..b2fb297ccd 100644 --- a/Mage.Sets/src/mage/cards/f/FrostGiant.java +++ b/Mage.Sets/src/mage/cards/f/FrostGiant.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.RampageAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class FrostGiant extends CardImpl { public FrostGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FrostLynx.java b/Mage.Sets/src/mage/cards/f/FrostLynx.java index 999165d068..9e41f7feaa 100644 --- a/Mage.Sets/src/mage/cards/f/FrostLynx.java +++ b/Mage.Sets/src/mage/cards/f/FrostLynx.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -55,8 +56,8 @@ public class FrostLynx extends CardImpl { public FrostLynx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Elemental"); - this.subtype.add("Cat"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FrostOgre.java b/Mage.Sets/src/mage/cards/f/FrostOgre.java index 64cd4c385d..d063acfd45 100644 --- a/Mage.Sets/src/mage/cards/f/FrostOgre.java +++ b/Mage.Sets/src/mage/cards/f/FrostOgre.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class FrostOgre extends CardImpl { public FrostOgre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FrostRaptor.java b/Mage.Sets/src/mage/cards/f/FrostRaptor.java index 0c87c581f6..03134e47c5 100644 --- a/Mage.Sets/src/mage/cards/f/FrostRaptor.java +++ b/Mage.Sets/src/mage/cards/f/FrostRaptor.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class FrostRaptor extends CardImpl { public FrostRaptor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); addSuperType(SuperType.SNOW); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FrostTitan.java b/Mage.Sets/src/mage/cards/f/FrostTitan.java index 884dfe097e..478ea43d37 100644 --- a/Mage.Sets/src/mage/cards/f/FrostTitan.java +++ b/Mage.Sets/src/mage/cards/f/FrostTitan.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -54,7 +55,7 @@ public class FrostTitan extends CardImpl { public FrostTitan(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{U}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/f/FrostWalker.java b/Mage.Sets/src/mage/cards/f/FrostWalker.java index c26bb144dd..6247235689 100644 --- a/Mage.Sets/src/mage/cards/f/FrostWalker.java +++ b/Mage.Sets/src/mage/cards/f/FrostWalker.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class FrostWalker extends CardImpl { public FrostWalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FrostburnWeird.java b/Mage.Sets/src/mage/cards/f/FrostburnWeird.java index 39dd855155..2ffe19551c 100644 --- a/Mage.Sets/src/mage/cards/f/FrostburnWeird.java +++ b/Mage.Sets/src/mage/cards/f/FrostburnWeird.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class FrostburnWeird extends CardImpl { public FrostburnWeird(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U/R}{U/R}"); - this.subtype.add("Weird"); + this.subtype.add(SubType.WEIRD); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/Frostling.java b/Mage.Sets/src/mage/cards/f/Frostling.java index a797f8913f..26ca49a0cd 100644 --- a/Mage.Sets/src/mage/cards/f/Frostling.java +++ b/Mage.Sets/src/mage/cards/f/Frostling.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class Frostling extends CardImpl { public Frostling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/Frostwielder.java b/Mage.Sets/src/mage/cards/f/Frostwielder.java index 4ac3d613b8..d8f755e4ee 100644 --- a/Mage.Sets/src/mage/cards/f/Frostwielder.java +++ b/Mage.Sets/src/mage/cards/f/Frostwielder.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.replacement.DealtDamageToCreatureBySourceDi import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -51,8 +52,8 @@ public class Frostwielder extends CardImpl { public Frostwielder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FrostwindInvoker.java b/Mage.Sets/src/mage/cards/f/FrostwindInvoker.java index d0a270723f..088156fc13 100644 --- a/Mage.Sets/src/mage/cards/f/FrostwindInvoker.java +++ b/Mage.Sets/src/mage/cards/f/FrostwindInvoker.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class FrostwindInvoker extends CardImpl { public FrostwindInvoker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FrozenShade.java b/Mage.Sets/src/mage/cards/f/FrozenShade.java index 589c56bc4b..92b3be3951 100644 --- a/Mage.Sets/src/mage/cards/f/FrozenShade.java +++ b/Mage.Sets/src/mage/cards/f/FrozenShade.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class FrozenShade extends CardImpl { public FrozenShade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Shade"); + this.subtype.add(SubType.SHADE); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FrozenSolid.java b/Mage.Sets/src/mage/cards/f/FrozenSolid.java index 0b488e17ac..ef8a563a3c 100644 --- a/Mage.Sets/src/mage/cards/f/FrozenSolid.java +++ b/Mage.Sets/src/mage/cards/f/FrozenSolid.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class FrozenSolid extends CardImpl { public FrozenSolid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FruitOfTheFirstTree.java b/Mage.Sets/src/mage/cards/f/FruitOfTheFirstTree.java index 07f1795b5e..ff42e706e8 100644 --- a/Mage.Sets/src/mage/cards/f/FruitOfTheFirstTree.java +++ b/Mage.Sets/src/mage/cards/f/FruitOfTheFirstTree.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -52,7 +53,7 @@ public class FruitOfTheFirstTree extends CardImpl { public FruitOfTheFirstTree(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FugitiveDruid.java b/Mage.Sets/src/mage/cards/f/FugitiveDruid.java index 92b4337ca3..f1df594318 100644 --- a/Mage.Sets/src/mage/cards/f/FugitiveDruid.java +++ b/Mage.Sets/src/mage/cards/f/FugitiveDruid.java @@ -52,8 +52,8 @@ public class FugitiveDruid extends CardImpl { public FugitiveDruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FugitiveWizard.java b/Mage.Sets/src/mage/cards/f/FugitiveWizard.java index a076457756..7de16a8203 100644 --- a/Mage.Sets/src/mage/cards/f/FugitiveWizard.java +++ b/Mage.Sets/src/mage/cards/f/FugitiveWizard.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class FugitiveWizard extends CardImpl { public FugitiveWizard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FulminatorMage.java b/Mage.Sets/src/mage/cards/f/FulminatorMage.java index 2b848c00ca..9a0d5892f7 100644 --- a/Mage.Sets/src/mage/cards/f/FulminatorMage.java +++ b/Mage.Sets/src/mage/cards/f/FulminatorMage.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetNonBasicLandPermanent; @@ -47,8 +48,8 @@ public class FulminatorMage extends CardImpl { public FulminatorMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B/R}{B/R}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FumeSpitter.java b/Mage.Sets/src/mage/cards/f/FumeSpitter.java index 31aa6dedd2..3e12c160b4 100644 --- a/Mage.Sets/src/mage/cards/f/FumeSpitter.java +++ b/Mage.Sets/src/mage/cards/f/FumeSpitter.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class FumeSpitter extends CardImpl { public FumeSpitter (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FumikoTheLowblood.java b/Mage.Sets/src/mage/cards/f/FumikoTheLowblood.java index bea87a3300..f15a50256b 100644 --- a/Mage.Sets/src/mage/cards/f/FumikoTheLowblood.java +++ b/Mage.Sets/src/mage/cards/f/FumikoTheLowblood.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.BushidoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.constants.Zone; @@ -52,8 +53,8 @@ public class FumikoTheLowblood extends CardImpl { public FumikoTheLowblood(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FuneralPyre.java b/Mage.Sets/src/mage/cards/f/FuneralPyre.java index c9fa645b89..b0459e80a2 100644 --- a/Mage.Sets/src/mage/cards/f/FuneralPyre.java +++ b/Mage.Sets/src/mage/cards/f/FuneralPyre.java @@ -1,102 +1,102 @@ -/* - * 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.cards.f; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.game.Game; -import mage.game.permanent.token.SpiritWhiteToken; -import mage.game.permanent.token.Token; -import mage.players.Player; -import mage.target.common.TargetCardInGraveyard; -import mage.util.CardUtil; - -/** - * - * @author jeffwadsworth - */ -public class FuneralPyre extends CardImpl { - - public FuneralPyre(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); - - - // Exile target card from a graveyard. Its owner puts a 1/1 white Spirit creature token with flying onto the battlefield. - this.getSpellAbility().addEffect(new FuneralPyreEffect()); - this.getSpellAbility().addTarget(new TargetCardInGraveyard()); - - } - - public FuneralPyre(final FuneralPyre card) { - super(card); - } - - @Override - public FuneralPyre copy() { - return new FuneralPyre(this); - } -} - -class FuneralPyreEffect extends OneShotEffect { - - public FuneralPyreEffect() { - super(Outcome.Benefit); - this.staticText = "Exile target card from a graveyard. Its owner puts a 1/1 white Spirit creature token with flying onto the battlefield"; - } - - public FuneralPyreEffect(final FuneralPyreEffect effect) { - super(effect); - } - - @Override - public FuneralPyreEffect copy() { - return new FuneralPyreEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Card exiledCard = game.getCard(source.getTargets().getFirstTarget()); - if (exiledCard != null) { - UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), 0); - if (exiledCard.moveToExile(exileId, "Funeral Pyre", source.getSourceId(), game)) { - Player owner = game.getPlayer(exiledCard.getOwnerId()); - if (owner != null) { - Token token = new SpiritWhiteToken(); - return token.putOntoBattlefield(1, game, source.getSourceId(), owner.getId()); - } - } - } - return false; - } -} +/* + * 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.cards.f; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.token.SpiritWhiteToken; +import mage.game.permanent.token.Token; +import mage.players.Player; +import mage.target.common.TargetCardInGraveyard; +import mage.util.CardUtil; + +/** + * + * @author jeffwadsworth + */ +public class FuneralPyre extends CardImpl { + + public FuneralPyre(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); + + + // Exile target card from a graveyard. Its owner puts a 1/1 white Spirit creature token with flying onto the battlefield. + this.getSpellAbility().addEffect(new FuneralPyreEffect()); + this.getSpellAbility().addTarget(new TargetCardInGraveyard()); + + } + + public FuneralPyre(final FuneralPyre card) { + super(card); + } + + @Override + public FuneralPyre copy() { + return new FuneralPyre(this); + } +} + +class FuneralPyreEffect extends OneShotEffect { + + public FuneralPyreEffect() { + super(Outcome.Benefit); + this.staticText = "Exile target card from a graveyard. Its owner puts a 1/1 white Spirit creature token with flying onto the battlefield"; + } + + public FuneralPyreEffect(final FuneralPyreEffect effect) { + super(effect); + } + + @Override + public FuneralPyreEffect copy() { + return new FuneralPyreEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Card exiledCard = game.getCard(source.getTargets().getFirstTarget()); + if (exiledCard != null) { + UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), 0); + if (exiledCard.moveToExile(exileId, "Funeral Pyre", source.getSourceId(), game)) { + Player owner = game.getPlayer(exiledCard.getOwnerId()); + if (owner != null) { + Token token = new SpiritWhiteToken(); + return token.putOntoBattlefield(1, game, source.getSourceId(), owner.getId()); + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/f/FungalBehemoth.java b/Mage.Sets/src/mage/cards/f/FungalBehemoth.java index d862fef1ae..2b3ad70f4b 100644 --- a/Mage.Sets/src/mage/cards/f/FungalBehemoth.java +++ b/Mage.Sets/src/mage/cards/f/FungalBehemoth.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -59,7 +60,7 @@ public class FungalBehemoth extends CardImpl { public FungalBehemoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/f/FungalShambler.java b/Mage.Sets/src/mage/cards/f/FungalShambler.java index d1b8633cec..2dde7bb447 100644 --- a/Mage.Sets/src/mage/cards/f/FungalShambler.java +++ b/Mage.Sets/src/mage/cards/f/FungalShambler.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,8 +48,8 @@ public class FungalShambler extends CardImpl { public FungalShambler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{U}{B}"); - this.subtype.add("Fungus"); - this.subtype.add("Beast"); + this.subtype.add(SubType.FUNGUS); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/f/FungusSliver.java b/Mage.Sets/src/mage/cards/f/FungusSliver.java index b5e692c08c..d649a091fb 100644 --- a/Mage.Sets/src/mage/cards/f/FungusSliver.java +++ b/Mage.Sets/src/mage/cards/f/FungusSliver.java @@ -56,8 +56,8 @@ public class FungusSliver extends CardImpl { public FungusSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Fungus"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.FUNGUS); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/Fungusaur.java b/Mage.Sets/src/mage/cards/f/Fungusaur.java index 54595e11b2..9b8690c443 100644 --- a/Mage.Sets/src/mage/cards/f/Fungusaur.java +++ b/Mage.Sets/src/mage/cards/f/Fungusaur.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -44,9 +45,9 @@ import mage.counters.CounterType; public class Fungusaur extends CardImpl { public Fungusaur(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Fungus"); - this.subtype.add("Lizard"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.subtype.add(SubType.FUNGUS); + this.subtype.add(SubType.DINOSAUR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FurnaceBrood.java b/Mage.Sets/src/mage/cards/f/FurnaceBrood.java index fb468bccba..ae4f5f3910 100644 --- a/Mage.Sets/src/mage/cards/f/FurnaceBrood.java +++ b/Mage.Sets/src/mage/cards/f/FurnaceBrood.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.CantBeRegeneratedTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class FurnaceBrood extends CardImpl { public FurnaceBrood(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FurnaceDragon.java b/Mage.Sets/src/mage/cards/f/FurnaceDragon.java index 5c04b45763..ef70af3df6 100644 --- a/Mage.Sets/src/mage/cards/f/FurnaceDragon.java +++ b/Mage.Sets/src/mage/cards/f/FurnaceDragon.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.watchers.common.CastFromHandWatcher; @@ -56,7 +57,7 @@ public class FurnaceDragon extends CardImpl { public FurnaceDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{R}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/f/FurnaceScamp.java b/Mage.Sets/src/mage/cards/f/FurnaceScamp.java index 8d30f77c17..dbe118d5b9 100644 --- a/Mage.Sets/src/mage/cards/f/FurnaceScamp.java +++ b/Mage.Sets/src/mage/cards/f/FurnaceScamp.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class FurnaceScamp extends CardImpl { public FurnaceScamp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FurnaceSpirit.java b/Mage.Sets/src/mage/cards/f/FurnaceSpirit.java index eeff4ec9a8..51ddbd3b09 100644 --- a/Mage.Sets/src/mage/cards/f/FurnaceSpirit.java +++ b/Mage.Sets/src/mage/cards/f/FurnaceSpirit.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class FurnaceSpirit extends CardImpl { public FurnaceSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FurnaceWhelp.java b/Mage.Sets/src/mage/cards/f/FurnaceWhelp.java index 4d43266118..4442077b8d 100644 --- a/Mage.Sets/src/mage/cards/f/FurnaceWhelp.java +++ b/Mage.Sets/src/mage/cards/f/FurnaceWhelp.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class FurnaceWhelp extends CardImpl { public FurnaceWhelp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FurorOfTheBitten.java b/Mage.Sets/src/mage/cards/f/FurorOfTheBitten.java index 5683f03ff7..cc60809ae1 100644 --- a/Mage.Sets/src/mage/cards/f/FurorOfTheBitten.java +++ b/Mage.Sets/src/mage/cards/f/FurorOfTheBitten.java @@ -49,7 +49,7 @@ public class FurorOfTheBitten extends CardImpl { public FurorOfTheBitten(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/f/FurtiveHomunculus.java b/Mage.Sets/src/mage/cards/f/FurtiveHomunculus.java index 4743b0b69f..de4abdb094 100644 --- a/Mage.Sets/src/mage/cards/f/FurtiveHomunculus.java +++ b/Mage.Sets/src/mage/cards/f/FurtiveHomunculus.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SkulkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class FurtiveHomunculus extends CardImpl { public FurtiveHomunculus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Homunculus"); + this.subtype.add(SubType.HOMUNCULUS); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FurySliver.java b/Mage.Sets/src/mage/cards/f/FurySliver.java index 4ae3869fc2..558be9ecc3 100644 --- a/Mage.Sets/src/mage/cards/f/FurySliver.java +++ b/Mage.Sets/src/mage/cards/f/FurySliver.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -47,7 +48,7 @@ public class FurySliver extends CardImpl { public FurySliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FurybladeVampire.java b/Mage.Sets/src/mage/cards/f/FurybladeVampire.java index f2527644a3..2c4ceb3d01 100644 --- a/Mage.Sets/src/mage/cards/f/FurybladeVampire.java +++ b/Mage.Sets/src/mage/cards/f/FurybladeVampire.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class FurybladeVampire extends CardImpl { public FurybladeVampire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Vampire"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/f/FurybornHellkite.java b/Mage.Sets/src/mage/cards/f/FurybornHellkite.java index 80439feccb..bafafe3623 100644 --- a/Mage.Sets/src/mage/cards/f/FurybornHellkite.java +++ b/Mage.Sets/src/mage/cards/f/FurybornHellkite.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class FurybornHellkite extends CardImpl { public FurybornHellkite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/f/FurystokeGiant.java b/Mage.Sets/src/mage/cards/f/FurystokeGiant.java index 664346631f..6f59dde457 100644 --- a/Mage.Sets/src/mage/cards/f/FurystokeGiant.java +++ b/Mage.Sets/src/mage/cards/f/FurystokeGiant.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.PersistAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -52,8 +53,8 @@ public class FurystokeGiant extends CardImpl { public FurystokeGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FusionElemental.java b/Mage.Sets/src/mage/cards/f/FusionElemental.java index fc75210f8f..970c3aac0f 100644 --- a/Mage.Sets/src/mage/cards/f/FusionElemental.java +++ b/Mage.Sets/src/mage/cards/f/FusionElemental.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class FusionElemental extends CardImpl { public FusionElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}{B}{R}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/f/Fylamarid.java b/Mage.Sets/src/mage/cards/f/Fylamarid.java index b3dc20a579..ca9d037edf 100644 --- a/Mage.Sets/src/mage/cards/f/Fylamarid.java +++ b/Mage.Sets/src/mage/cards/f/Fylamarid.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -60,8 +61,8 @@ public class Fylamarid extends CardImpl { public Fylamarid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Squid"); - this.subtype.add("Beast"); + this.subtype.add(SubType.SQUID); + this.subtype.add(SubType.BEAST); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FyndhornBrownie.java b/Mage.Sets/src/mage/cards/f/FyndhornBrownie.java index 043e7242dc..dbb4c64445 100644 --- a/Mage.Sets/src/mage/cards/f/FyndhornBrownie.java +++ b/Mage.Sets/src/mage/cards/f/FyndhornBrownie.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class FyndhornBrownie extends CardImpl { public FyndhornBrownie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Ouphe"); + this.subtype.add(SubType.OUPHE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FyndhornElder.java b/Mage.Sets/src/mage/cards/f/FyndhornElder.java index da0cc09f9f..9fb35cad97 100644 --- a/Mage.Sets/src/mage/cards/f/FyndhornElder.java +++ b/Mage.Sets/src/mage/cards/f/FyndhornElder.java @@ -35,6 +35,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class FyndhornElder extends CardImpl { public FyndhornElder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FyndhornElves.java b/Mage.Sets/src/mage/cards/f/FyndhornElves.java index a2aeefafa1..9e20a41c23 100644 --- a/Mage.Sets/src/mage/cards/f/FyndhornElves.java +++ b/Mage.Sets/src/mage/cards/f/FyndhornElves.java @@ -33,6 +33,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class FyndhornElves extends CardImpl { public FyndhornElves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/f/FyndhornPollen.java b/Mage.Sets/src/mage/cards/f/FyndhornPollen.java new file mode 100644 index 0000000000..df43a5cd5c --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FyndhornPollen.java @@ -0,0 +1,72 @@ +/* + * 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.cards.f; + +import java.util.UUID; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class FyndhornPollen extends CardImpl { + + private static FilterCreaturePermanent filter = new FilterCreaturePermanent("All creatures"); + + public FyndhornPollen(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + + // Cumulative upkeep {1} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{1}"))); + + // All creatures get -1/-0. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(-1, 0, Duration.WhileOnBattlefield, filter, false))); + + // {1}{G}: All creatures get -1/-0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(-1, 0, Duration.EndOfTurn, filter, false), new ManaCostsImpl("{1}{G}"))); + } + + public FyndhornPollen(final FyndhornPollen card) { + super(card); + } + + @Override + public FyndhornPollen copy() { + return new FyndhornPollen(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GaddockTeeg.java b/Mage.Sets/src/mage/cards/g/GaddockTeeg.java index 45477dec95..5aeb452739 100644 --- a/Mage.Sets/src/mage/cards/g/GaddockTeeg.java +++ b/Mage.Sets/src/mage/cards/g/GaddockTeeg.java @@ -48,8 +48,8 @@ public class GaddockTeeg extends CardImpl { public GaddockTeeg(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Kithkin"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GaeasAvenger.java b/Mage.Sets/src/mage/cards/g/GaeasAvenger.java index 3935fd38f4..99f6c196d5 100644 --- a/Mage.Sets/src/mage/cards/g/GaeasAvenger.java +++ b/Mage.Sets/src/mage/cards/g/GaeasAvenger.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class GaeasAvenger extends CardImpl { public GaeasAvenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GaeasCradle.java b/Mage.Sets/src/mage/cards/g/GaeasCradle.java index ec8e6eb47f..8c3ee57f19 100644 --- a/Mage.Sets/src/mage/cards/g/GaeasCradle.java +++ b/Mage.Sets/src/mage/cards/g/GaeasCradle.java @@ -35,8 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SuperType; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.common.FilterControlledCreaturePermanent; /** * @@ -44,18 +43,15 @@ import mage.filter.predicate.mageobject.CardTypePredicate; */ public class GaeasCradle extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("creature you control"); - - static { - filter.add(new CardTypePredicate(CardType.CREATURE)); - } - public GaeasCradle(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); addSuperType(SuperType.LEGENDARY); // {T}: Add {G} to your mana pool for each creature you control. - DynamicManaAbility ability = new DynamicManaAbility(Mana.GreenMana(1), new PermanentsOnBattlefieldCount(filter)); + DynamicManaAbility ability = new DynamicManaAbility( + Mana.GreenMana(1), + new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent("creature you control")) + ); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GaeasEmbrace.java b/Mage.Sets/src/mage/cards/g/GaeasEmbrace.java index f1d845ff98..cbcfce04e3 100644 --- a/Mage.Sets/src/mage/cards/g/GaeasEmbrace.java +++ b/Mage.Sets/src/mage/cards/g/GaeasEmbrace.java @@ -52,7 +52,7 @@ public class GaeasEmbrace extends CardImpl { public GaeasEmbrace(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GaeasHerald.java b/Mage.Sets/src/mage/cards/g/GaeasHerald.java index f21a71668c..5292518c55 100644 --- a/Mage.Sets/src/mage/cards/g/GaeasHerald.java +++ b/Mage.Sets/src/mage/cards/g/GaeasHerald.java @@ -35,6 +35,7 @@ import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class GaeasHerald extends CardImpl { public GaeasHerald(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GaeasLiege.java b/Mage.Sets/src/mage/cards/g/GaeasLiege.java index c4ef418b79..95b957fbf3 100644 --- a/Mage.Sets/src/mage/cards/g/GaeasLiege.java +++ b/Mage.Sets/src/mage/cards/g/GaeasLiege.java @@ -71,7 +71,7 @@ public class GaeasLiege extends CardImpl { public GaeasLiege(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}{G}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/g/GaeasMight.java b/Mage.Sets/src/mage/cards/g/GaeasMight.java index ad18c3dc5e..52daaeeabc 100644 --- a/Mage.Sets/src/mage/cards/g/GaeasMight.java +++ b/Mage.Sets/src/mage/cards/g/GaeasMight.java @@ -32,6 +32,7 @@ import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -43,12 +44,12 @@ import mage.target.common.TargetCreaturePermanent; public class GaeasMight extends CardImpl { public GaeasMight(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}"); // Domain - Target creature gets +1/+1 until end of turn for each basic land type among lands you control. this.getSpellAbility().addEffect(new BoostTargetEffect(new DomainValue(), new DomainValue(), Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN); } public GaeasMight(final GaeasMight card) { diff --git a/Mage.Sets/src/mage/cards/g/GaeasRevenge.java b/Mage.Sets/src/mage/cards/g/GaeasRevenge.java index b0a5b9b1d1..48d02976a4 100644 --- a/Mage.Sets/src/mage/cards/g/GaeasRevenge.java +++ b/Mage.Sets/src/mage/cards/g/GaeasRevenge.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterObject; @@ -58,7 +59,7 @@ public class GaeasRevenge extends CardImpl { public GaeasRevenge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(8); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GaeasSkyfolk.java b/Mage.Sets/src/mage/cards/g/GaeasSkyfolk.java index c7117f1014..b45d1b4cea 100644 --- a/Mage.Sets/src/mage/cards/g/GaeasSkyfolk.java +++ b/Mage.Sets/src/mage/cards/g/GaeasSkyfolk.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class GaeasSkyfolk extends CardImpl { public GaeasSkyfolk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{U}"); - this.subtype.add("Elf"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GahijiHonoredOne.java b/Mage.Sets/src/mage/cards/g/GahijiHonoredOne.java index 863d104f60..2ee393cf1a 100644 --- a/Mage.Sets/src/mage/cards/g/GahijiHonoredOne.java +++ b/Mage.Sets/src/mage/cards/g/GahijiHonoredOne.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class GahijiHonoredOne extends CardImpl { public GahijiHonoredOne(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GalecasterColossus.java b/Mage.Sets/src/mage/cards/g/GalecasterColossus.java index 5bf40b9c85..acdd3f8cdf 100644 --- a/Mage.Sets/src/mage/cards/g/GalecasterColossus.java +++ b/Mage.Sets/src/mage/cards/g/GalecasterColossus.java @@ -66,8 +66,8 @@ public class GalecasterColossus extends CardImpl { public GalecasterColossus(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}"); - this.subtype.add("Giant"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/g/GalepowderMage.java b/Mage.Sets/src/mage/cards/g/GalepowderMage.java index acc87936eb..e4fdf235c6 100644 --- a/Mage.Sets/src/mage/cards/g/GalepowderMage.java +++ b/Mage.Sets/src/mage/cards/g/GalepowderMage.java @@ -41,6 +41,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -65,8 +66,8 @@ public class GalepowderMage extends CardImpl { public GalepowderMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GaleriderSliver.java b/Mage.Sets/src/mage/cards/g/GaleriderSliver.java index a02809d7a8..98d2129264 100644 --- a/Mage.Sets/src/mage/cards/g/GaleriderSliver.java +++ b/Mage.Sets/src/mage/cards/g/GaleriderSliver.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -47,7 +48,7 @@ public class GaleriderSliver extends CardImpl { public GaleriderSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/Galestrike.java b/Mage.Sets/src/mage/cards/g/Galestrike.java index e1e87e3276..fa60d8b665 100644 --- a/Mage.Sets/src/mage/cards/g/Galestrike.java +++ b/Mage.Sets/src/mage/cards/g/Galestrike.java @@ -1,72 +1,72 @@ -/* - * 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.cards.g; - -import java.util.UUID; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.ReturnToHandTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.TappedPredicate; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Styxo - */ -public class Galestrike extends CardImpl { - - private static FilterCreaturePermanent filter = new FilterCreaturePermanent("tapped creature"); - - static { - filter.add(new TappedPredicate()); - } - - public Galestrike(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}"); - - // Return target tapped creature to its owner's hand. - this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); - this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); - - // Draw a card. - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); - - } - - public Galestrike(final Galestrike card) { - super(card); - } - - @Override - public Galestrike copy() { - return new Galestrike(this); - } -} +/* + * 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.cards.g; + +import java.util.UUID; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Styxo + */ +public class Galestrike extends CardImpl { + + private static FilterCreaturePermanent filter = new FilterCreaturePermanent("tapped creature"); + + static { + filter.add(new TappedPredicate()); + } + + public Galestrike(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}"); + + // Return target tapped creature to its owner's hand. + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + + } + + public Galestrike(final Galestrike card) { + super(card); + } + + @Override + public Galestrike copy() { + return new Galestrike(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GalinasKnight.java b/Mage.Sets/src/mage/cards/g/GalinasKnight.java index 1677b250a3..5026f38484 100644 --- a/Mage.Sets/src/mage/cards/g/GalinasKnight.java +++ b/Mage.Sets/src/mage/cards/g/GalinasKnight.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class GalinasKnight extends CardImpl { public GalinasKnight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Knight"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/Gallowbraid.java b/Mage.Sets/src/mage/cards/g/Gallowbraid.java index ba1a41d99e..b5d195f94d 100644 --- a/Mage.Sets/src/mage/cards/g/Gallowbraid.java +++ b/Mage.Sets/src/mage/cards/g/Gallowbraid.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -46,7 +47,7 @@ public class Gallowbraid extends CardImpl { public Gallowbraid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GallowsWarden.java b/Mage.Sets/src/mage/cards/g/GallowsWarden.java index 9d41e9f36f..ea7a2e7c75 100644 --- a/Mage.Sets/src/mage/cards/g/GallowsWarden.java +++ b/Mage.Sets/src/mage/cards/g/GallowsWarden.java @@ -54,7 +54,7 @@ public class GallowsWarden extends CardImpl { public GallowsWarden(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GalvanicAlchemist.java b/Mage.Sets/src/mage/cards/g/GalvanicAlchemist.java index 9e4ccd33ea..e0005de091 100644 --- a/Mage.Sets/src/mage/cards/g/GalvanicAlchemist.java +++ b/Mage.Sets/src/mage/cards/g/GalvanicAlchemist.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.SoulbondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -50,8 +51,8 @@ public class GalvanicAlchemist extends CardImpl { public GalvanicAlchemist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GalvanicArc.java b/Mage.Sets/src/mage/cards/g/GalvanicArc.java index 57e4f73206..379942c452 100644 --- a/Mage.Sets/src/mage/cards/g/GalvanicArc.java +++ b/Mage.Sets/src/mage/cards/g/GalvanicArc.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -54,7 +55,7 @@ public class GalvanicArc extends CardImpl { public GalvanicArc(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/g/GalvanicJuggernaut.java b/Mage.Sets/src/mage/cards/g/GalvanicJuggernaut.java index 64e38bb466..f2a696e81a 100644 --- a/Mage.Sets/src/mage/cards/g/GalvanicJuggernaut.java +++ b/Mage.Sets/src/mage/cards/g/GalvanicJuggernaut.java @@ -29,7 +29,7 @@ package mage.cards.g; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.DontUntapInControllersUntapStepSourceEffect; @@ -37,6 +37,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,13 +48,13 @@ public class GalvanicJuggernaut extends CardImpl { public GalvanicJuggernaut(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Juggernaut"); + this.subtype.add(SubType.JUGGERNAUT); this.power = new MageInt(5); this.toughness = new MageInt(5); // Galvanic Juggernaut attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); // Galvanic Juggernaut doesn't untap during your untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepSourceEffect())); // Whenever another creature dies, untap Galvanic Juggernaut. diff --git a/Mage.Sets/src/mage/cards/g/Galvanoth.java b/Mage.Sets/src/mage/cards/g/Galvanoth.java index b001701f0c..0885c89ff7 100644 --- a/Mage.Sets/src/mage/cards/g/Galvanoth.java +++ b/Mage.Sets/src/mage/cards/g/Galvanoth.java @@ -34,6 +34,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.game.Game; @@ -46,7 +47,7 @@ public class Galvanoth extends CardImpl { public Galvanoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GamePreserve.java b/Mage.Sets/src/mage/cards/g/GamePreserve.java new file mode 100644 index 0000000000..300ed6a40a --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GamePreserve.java @@ -0,0 +1,113 @@ +/* + * 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.cards.g; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class GamePreserve extends CardImpl { + + public GamePreserve(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + + // At the beginning of your upkeep, each player reveals the top card of his or her library. If all cards revealed this way are creature cards, put those cards onto the battlefield under their owners' control. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new DuskmarEffect(), TargetController.YOU, false)); + } + + public GamePreserve(final GamePreserve card) { + super(card); + } + + @Override + public GamePreserve copy() { + return new GamePreserve(this); + } +} + +class DuskmarEffect extends OneShotEffect { + + public DuskmarEffect() { + super(Outcome.Detriment); + this.staticText = "each player reveals the top card of his or her library. If all cards revealed this way are creature cards, put those cards onto the battlefield under their owners' control"; + } + + public DuskmarEffect(final DuskmarEffect effect) { + super(effect); + } + + @Override + public DuskmarEffect copy() { + return new DuskmarEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent sourceCard = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (sourceCard == null) { + return false; + } + boolean putToPlay = true; + Cards cards = new CardsImpl(); + for (Player player : game.getPlayers().values()) { + if (player.getLibrary().hasCards()) { + Card card = player.getLibrary().removeFromTop(game); + if (card != null) { + cards.add(card); + if (!card.isCreature()) { + putToPlay = false; + } + player.revealCards(sourceCard.getName() + ": Revealed by " + player.getName(), cards, game); + } + } else { + putToPlay = false; + } + } + if (putToPlay) { + game.getPlayers().values().iterator().next().moveCards(cards.getCards(game), Zone.BATTLEFIELD, source, game, false, false, true, null); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/g/GameTrailChangeling.java b/Mage.Sets/src/mage/cards/g/GameTrailChangeling.java index ada40ea6de..32ebbbd740 100644 --- a/Mage.Sets/src/mage/cards/g/GameTrailChangeling.java +++ b/Mage.Sets/src/mage/cards/g/GameTrailChangeling.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class GameTrailChangeling extends CardImpl { public GameTrailChangeling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/Gamekeeper.java b/Mage.Sets/src/mage/cards/g/Gamekeeper.java index d37853a9c3..48a2a5418c 100644 --- a/Mage.Sets/src/mage/cards/g/Gamekeeper.java +++ b/Mage.Sets/src/mage/cards/g/Gamekeeper.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.RevealCardsFromLibraryUntilEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -48,7 +49,7 @@ public class Gamekeeper extends CardImpl { public Gamekeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GamorreanPrisonGuard.java b/Mage.Sets/src/mage/cards/g/GamorreanPrisonGuard.java index dd2ae3849e..0098a17b71 100644 --- a/Mage.Sets/src/mage/cards/g/GamorreanPrisonGuard.java +++ b/Mage.Sets/src/mage/cards/g/GamorreanPrisonGuard.java @@ -56,8 +56,8 @@ public class GamorreanPrisonGuard extends CardImpl { public GamorreanPrisonGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Gamorrean"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GAMORREAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GangOfDevils.java b/Mage.Sets/src/mage/cards/g/GangOfDevils.java index faeffab576..0323f03e6f 100644 --- a/Mage.Sets/src/mage/cards/g/GangOfDevils.java +++ b/Mage.Sets/src/mage/cards/g/GangOfDevils.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageMultiEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayerAmount; /** @@ -46,7 +47,7 @@ public class GangOfDevils extends CardImpl { public GangOfDevils(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GangOfElk.java b/Mage.Sets/src/mage/cards/g/GangOfElk.java index 546e267a55..c47c952e07 100644 --- a/Mage.Sets/src/mage/cards/g/GangOfElk.java +++ b/Mage.Sets/src/mage/cards/g/GangOfElk.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -48,8 +49,8 @@ public class GangOfElk extends CardImpl { public GangOfElk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Elk"); - this.subtype.add("Beast"); + this.subtype.add(SubType.ELK); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GangrenousGoliath.java b/Mage.Sets/src/mage/cards/g/GangrenousGoliath.java index 3e0ece5877..0d39a593c9 100644 --- a/Mage.Sets/src/mage/cards/g/GangrenousGoliath.java +++ b/Mage.Sets/src/mage/cards/g/GangrenousGoliath.java @@ -55,8 +55,8 @@ public class GangrenousGoliath extends CardImpl { public GangrenousGoliath(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Giant"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GangrenousZombies.java b/Mage.Sets/src/mage/cards/g/GangrenousZombies.java index d6c3c6a9d2..309f13bb20 100644 --- a/Mage.Sets/src/mage/cards/g/GangrenousZombies.java +++ b/Mage.Sets/src/mage/cards/g/GangrenousZombies.java @@ -1,90 +1,90 @@ -/* - * 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.cards.g; - -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.costs.common.SacrificeSourceCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.decorator.ConditionalOneShotEffect; -import mage.abilities.effects.common.DamageEverythingEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.SuperType; -import mage.constants.Zone; -import mage.filter.common.FilterLandPermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.filter.predicate.mageobject.SupertypePredicate; - -import java.util.UUID; - -/** - * - * @author LevelX2 - */ -public class GangrenousZombies extends CardImpl { - - private final static FilterLandPermanent filter = new FilterLandPermanent(); - - static { - filter.add(new SupertypePredicate(SuperType.SNOW)); - filter.add(new SubtypePredicate(SubType.SWAMP)); - } - - public GangrenousZombies(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); - - this.subtype.add("Zombie"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // {T}, Sacrifice Gangrenous Zombies: Gangrenous Zombies deals 1 damage to each creature and each player. If you control a snow Swamp, Gangrenous Zombies deals 2 damage to each creature and each player instead. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalOneShotEffect( - new DamageEverythingEffect(2), - new DamageEverythingEffect(1), - new PermanentsOnTheBattlefieldCondition(filter), - "{this} deals 1 damage to each creature and each player. If you control a snow Swamp, {this} deals 2 damage to each creature and each player instead"), - new TapSourceCost()); - ability.addCost(new SacrificeSourceCost()); - this.addAbility(ability); - - } - - public GangrenousZombies(final GangrenousZombies card) { - super(card); - } - - @Override - public GangrenousZombies copy() { - return new GangrenousZombies(this); - } -} +/* + * 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.cards.g; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DamageEverythingEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.mageobject.SupertypePredicate; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class GangrenousZombies extends CardImpl { + + private final static FilterLandPermanent filter = new FilterLandPermanent(); + + static { + filter.add(new SupertypePredicate(SuperType.SNOW)); + filter.add(new SubtypePredicate(SubType.SWAMP)); + } + + public GangrenousZombies(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); + + this.subtype.add(SubType.ZOMBIE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {T}, Sacrifice Gangrenous Zombies: Gangrenous Zombies deals 1 damage to each creature and each player. If you control a snow Swamp, Gangrenous Zombies deals 2 damage to each creature and each player instead. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalOneShotEffect( + new DamageEverythingEffect(2), + new DamageEverythingEffect(1), + new PermanentsOnTheBattlefieldCondition(filter), + "{this} deals 1 damage to each creature and each player. If you control a snow Swamp, {this} deals 2 damage to each creature and each player instead"), + new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + + } + + public GangrenousZombies(final GangrenousZombies card) { + super(card); + } + + @Override + public GangrenousZombies copy() { + return new GangrenousZombies(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GargoyleCastle.java b/Mage.Sets/src/mage/cards/g/GargoyleCastle.java index 69ab8a9efa..56ec46d63c 100644 --- a/Mage.Sets/src/mage/cards/g/GargoyleCastle.java +++ b/Mage.Sets/src/mage/cards/g/GargoyleCastle.java @@ -28,10 +28,11 @@ package mage.cards.g; import java.util.UUID; -import mage.abilities.ActivatedAbilityImpl; +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.GenericManaCost; +import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; @@ -52,7 +53,13 @@ public class GargoyleCastle extends CardImpl { this.addAbility(new ColorlessManaAbility()); // {T}, {5}, Sacrifice Gargoyle Castle: Put a 3/4 colorless Gargoyle artifact creature token with flying onto the battlefield. - this.addAbility(new GargoyleCastleAbility()); + Ability ability = new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new CreateTokenEffect(new GargoyleToken()), + new ManaCostsImpl("{5}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); } public GargoyleCastle(final GargoyleCastle card) { @@ -64,25 +71,4 @@ public class GargoyleCastle extends CardImpl { return new GargoyleCastle(this); } -} - -class GargoyleCastleAbility extends ActivatedAbilityImpl { - - public GargoyleCastleAbility() { - super(Zone.BATTLEFIELD, null); - addCost(new TapSourceCost()); - addCost(new GenericManaCost(5)); - addCost(new SacrificeSourceCost()); - addEffect(new CreateTokenEffect(new GargoyleToken())); - } - - public GargoyleCastleAbility(final GargoyleCastleAbility ability) { - super(ability); - } - - @Override - public GargoyleCastleAbility copy() { - return new GargoyleCastleAbility(this); - } - -} +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/g/GargoyleSentinel.java b/Mage.Sets/src/mage/cards/g/GargoyleSentinel.java index ce2ffca49f..81afe661ec 100644 --- a/Mage.Sets/src/mage/cards/g/GargoyleSentinel.java +++ b/Mage.Sets/src/mage/cards/g/GargoyleSentinel.java @@ -50,7 +50,7 @@ public class GargoyleSentinel extends CardImpl { public GargoyleSentinel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Gargoyle"); + this.subtype.add(SubType.GARGOYLE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GarrukApexPredator.java b/Mage.Sets/src/mage/cards/g/GarrukApexPredator.java index 850f5145cd..32224d2b76 100644 --- a/Mage.Sets/src/mage/cards/g/GarrukApexPredator.java +++ b/Mage.Sets/src/mage/cards/g/GarrukApexPredator.java @@ -67,7 +67,7 @@ public class GarrukApexPredator extends CardImpl { public GarrukApexPredator(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{5}{B}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Garruk"); + this.subtype.add(SubType.GARRUK); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); diff --git a/Mage.Sets/src/mage/cards/g/GarrukCallerOfBeasts.java b/Mage.Sets/src/mage/cards/g/GarrukCallerOfBeasts.java index f3ff89bc88..23fbd9a95d 100644 --- a/Mage.Sets/src/mage/cards/g/GarrukCallerOfBeasts.java +++ b/Mage.Sets/src/mage/cards/g/GarrukCallerOfBeasts.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.RevealLibraryPutIntoHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -58,7 +59,7 @@ public class GarrukCallerOfBeasts extends CardImpl { public GarrukCallerOfBeasts(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{G}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Garruk"); + this.subtype.add(SubType.GARRUK); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/g/GarrukPrimalHunter.java b/Mage.Sets/src/mage/cards/g/GarrukPrimalHunter.java index 58f947aee7..e36b192e1e 100644 --- a/Mage.Sets/src/mage/cards/g/GarrukPrimalHunter.java +++ b/Mage.Sets/src/mage/cards/g/GarrukPrimalHunter.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.filter.common.FilterControlledCreaturePermanent; @@ -59,7 +60,7 @@ public class GarrukPrimalHunter extends CardImpl { public GarrukPrimalHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{2}{G}{G}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Garruk"); + this.subtype.add(SubType.GARRUK); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/g/GarrukRelentless.java b/Mage.Sets/src/mage/cards/g/GarrukRelentless.java index 8f784f208b..d5eb63d3e9 100644 --- a/Mage.Sets/src/mage/cards/g/GarrukRelentless.java +++ b/Mage.Sets/src/mage/cards/g/GarrukRelentless.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class GarrukRelentless extends CardImpl { public GarrukRelentless(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{3}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Garruk"); + this.subtype.add(SubType.GARRUK); this.transformable = true; this.secondSideCardClazz = GarrukTheVeilCursed.class; diff --git a/Mage.Sets/src/mage/cards/g/GarrukTheVeilCursed.java b/Mage.Sets/src/mage/cards/g/GarrukTheVeilCursed.java index 7d0abf12a4..bbae92a50e 100644 --- a/Mage.Sets/src/mage/cards/g/GarrukTheVeilCursed.java +++ b/Mage.Sets/src/mage/cards/g/GarrukTheVeilCursed.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SuperType; @@ -63,7 +64,7 @@ public class GarrukTheVeilCursed extends CardImpl { public GarrukTheVeilCursed(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, ""); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Garruk"); + this.subtype.add(SubType.GARRUK); // this card is the second face of double-faced card this.nightCard = true; diff --git a/Mage.Sets/src/mage/cards/g/GarrukWildspeaker.java b/Mage.Sets/src/mage/cards/g/GarrukWildspeaker.java index 8667d6e249..47a0869430 100644 --- a/Mage.Sets/src/mage/cards/g/GarrukWildspeaker.java +++ b/Mage.Sets/src/mage/cards/g/GarrukWildspeaker.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.filter.common.FilterCreaturePermanent; @@ -57,7 +58,7 @@ public class GarrukWildspeaker extends CardImpl { public GarrukWildspeaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{2}{G}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Garruk"); + this.subtype.add(SubType.GARRUK); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/g/GarruksCompanion.java b/Mage.Sets/src/mage/cards/g/GarruksCompanion.java index eb11e3fe24..ff6c975abd 100644 --- a/Mage.Sets/src/mage/cards/g/GarruksCompanion.java +++ b/Mage.Sets/src/mage/cards/g/GarruksCompanion.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class GarruksCompanion extends CardImpl { public GarruksCompanion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GarruksHorde.java b/Mage.Sets/src/mage/cards/g/GarruksHorde.java index e1e568dd9b..4603967446 100644 --- a/Mage.Sets/src/mage/cards/g/GarruksHorde.java +++ b/Mage.Sets/src/mage/cards/g/GarruksHorde.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -47,7 +48,7 @@ public class GarruksHorde extends CardImpl { public GarruksHorde(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/g/GarruksPackleader.java b/Mage.Sets/src/mage/cards/g/GarruksPackleader.java index 2f29876e41..0ab46a0ce8 100644 --- a/Mage.Sets/src/mage/cards/g/GarruksPackleader.java +++ b/Mage.Sets/src/mage/cards/g/GarruksPackleader.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -56,7 +57,7 @@ public class GarruksPackleader extends CardImpl { public GarruksPackleader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GarrulousSycophant.java b/Mage.Sets/src/mage/cards/g/GarrulousSycophant.java index 020bbd6109..ceb3dcdc23 100644 --- a/Mage.Sets/src/mage/cards/g/GarrulousSycophant.java +++ b/Mage.Sets/src/mage/cards/g/GarrulousSycophant.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.LoseLifeOpponentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class GarrulousSycophant extends CardImpl { public GarrulousSycophant(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GarzaZolPlagueQueen.java b/Mage.Sets/src/mage/cards/g/GarzaZolPlagueQueen.java index cfb66de79e..0b7f8f7526 100644 --- a/Mage.Sets/src/mage/cards/g/GarzaZolPlagueQueen.java +++ b/Mage.Sets/src/mage/cards/g/GarzaZolPlagueQueen.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.counters.CounterType; @@ -50,7 +51,7 @@ public class GarzaZolPlagueQueen extends CardImpl { public GarzaZolPlagueQueen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GaseousForm.java b/Mage.Sets/src/mage/cards/g/GaseousForm.java index e92210a037..f933a18a30 100644 --- a/Mage.Sets/src/mage/cards/g/GaseousForm.java +++ b/Mage.Sets/src/mage/cards/g/GaseousForm.java @@ -34,10 +34,7 @@ import mage.abilities.effects.common.PreventAllDamageToAndByAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -48,16 +45,15 @@ import mage.target.common.TargetCreaturePermanent; public class GaseousForm extends CardImpl { public GaseousForm(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); - + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.Neutral)); this.addAbility(new EnchantAbility(auraTarget.getTargetName())); - + // Prevent all combat damage that would be dealt to and dealt by enchanted creature. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventAllDamageToAndByAttachedEffect(Duration.WhileOnBattlefield, "enchanted creature", true))); } diff --git a/Mage.Sets/src/mage/cards/g/GateHound.java b/Mage.Sets/src/mage/cards/g/GateHound.java index 7d5eb5be56..35f829b220 100644 --- a/Mage.Sets/src/mage/cards/g/GateHound.java +++ b/Mage.Sets/src/mage/cards/g/GateHound.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -49,7 +50,7 @@ public class GateHound extends CardImpl { public GateHound(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GateSmasher.java b/Mage.Sets/src/mage/cards/g/GateSmasher.java index 337547e62b..f8b0b896bc 100644 --- a/Mage.Sets/src/mage/cards/g/GateSmasher.java +++ b/Mage.Sets/src/mage/cards/g/GateSmasher.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,15 +56,15 @@ import mage.target.common.TargetControlledCreaturePermanent; */ public class GateSmasher extends CardImpl { - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature with 3 or more power"); + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature with toughness 4 or greater"); static { filter.add(new ToughnessPredicate(ComparisonType.MORE_THAN, 3)); } public GateSmasher(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + this.subtype.add(SubType.EQUIPMENT); Target target = new TargetControlledCreaturePermanent(1, 1, filter, false); // Gate Smasher can be attached only to a creature with toughness 4 or greater. diff --git a/Mage.Sets/src/mage/cards/g/GateToTheAfterlife.java b/Mage.Sets/src/mage/cards/g/GateToTheAfterlife.java index bae5b782c8..1f1879647e 100644 --- a/Mage.Sets/src/mage/cards/g/GateToTheAfterlife.java +++ b/Mage.Sets/src/mage/cards/g/GateToTheAfterlife.java @@ -29,7 +29,7 @@ package mage.cards.g; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility; +import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.condition.common.CardsInControllerGraveCondition; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; @@ -75,15 +75,17 @@ public class GateToTheAfterlife extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); // Whenever a nontoken creature you control dies, you gain 1 life. Then you may draw a card. If you do, discard a card. - Ability ability = new PutIntoGraveFromBattlefieldAllTriggeredAbility(new GainLifeEffect(1), false, filter, false, true); + Ability ability = new DiesCreatureTriggeredAbility(new GainLifeEffect(1), false, filter, false); Effect effect = new DrawDiscardControllerEffect(1, 1, true); effect.setText("Then you may draw a card. If you do, discard a card"); ability.addEffect(effect); this.addAbility(ability); // {2}, {T}, Sacrifice Gate to the Afterlife: Search your graveyard, hand, and/or library for a card named God-Pharaoh's Gift and put it onto the battlefield. If you seearch your library this way, shuffle it. Activate this ability only if there are six or more creature cards in your graveyard. - ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, - new GateToTheAfterlifeEffect(), new GenericManaCost(2), new CardsInControllerGraveCondition(6, new FilterCreatureCard())); + ability = new ConditionalActivatedAbility( + Zone.BATTLEFIELD, new GateToTheAfterlifeEffect(), new GenericManaCost(2), + new CardsInControllerGraveCondition(6, new FilterCreatureCard()) + ); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/g/GatecreeperVine.java b/Mage.Sets/src/mage/cards/g/GatecreeperVine.java index ab493ef564..7cb613c6d1 100644 --- a/Mage.Sets/src/mage/cards/g/GatecreeperVine.java +++ b/Mage.Sets/src/mage/cards/g/GatecreeperVine.java @@ -27,7 +27,6 @@ */ package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; @@ -44,6 +43,8 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SupertypePredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -62,7 +63,7 @@ public class GatecreeperVine extends CardImpl { public GatecreeperVine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Plant"); + this.subtype.add(SubType.PLANT); this.power = new MageInt(0); this.toughness = new MageInt(2); @@ -72,7 +73,7 @@ public class GatecreeperVine extends CardImpl { // When Gatecreeper Vine enters the battlefield, you may search your library for a basic land card or a Gate card, reveal it, put it into your hand, then shuffle your library. TargetCardInLibrary target = new TargetCardInLibrary(filter); - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(target, true, true))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(target, true, true), true)); } public GatecreeperVine(final GatecreeperVine card) { diff --git a/Mage.Sets/src/mage/cards/g/GatekeeperOfMalakir.java b/Mage.Sets/src/mage/cards/g/GatekeeperOfMalakir.java index 7ec3b3182b..c221375f4d 100644 --- a/Mage.Sets/src/mage/cards/g/GatekeeperOfMalakir.java +++ b/Mage.Sets/src/mage/cards/g/GatekeeperOfMalakir.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.TargetPlayer; @@ -57,8 +58,8 @@ public class GatekeeperOfMalakir extends CardImpl { public GatekeeperOfMalakir(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GatewayShade.java b/Mage.Sets/src/mage/cards/g/GatewayShade.java index 6c2b33d4f5..9345dd0544 100644 --- a/Mage.Sets/src/mage/cards/g/GatewayShade.java +++ b/Mage.Sets/src/mage/cards/g/GatewayShade.java @@ -59,7 +59,7 @@ public class GatewayShade extends CardImpl { public GatewayShade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Shade"); + this.subtype.add(SubType.SHADE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GathanRaiders.java b/Mage.Sets/src/mage/cards/g/GathanRaiders.java index a38b24948f..27d2ff7a17 100644 --- a/Mage.Sets/src/mage/cards/g/GathanRaiders.java +++ b/Mage.Sets/src/mage/cards/g/GathanRaiders.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class GathanRaiders extends CardImpl { public GathanRaiders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GathererOfGraces.java b/Mage.Sets/src/mage/cards/g/GathererOfGraces.java index dd552a61bd..a7f891f67d 100644 --- a/Mage.Sets/src/mage/cards/g/GathererOfGraces.java +++ b/Mage.Sets/src/mage/cards/g/GathererOfGraces.java @@ -59,8 +59,8 @@ public class GathererOfGraces extends CardImpl { public GathererOfGraces(UUID ownerId, CardSetInfo cardSetInfo) { super(ownerId, cardSetInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GatstafArsonists.java b/Mage.Sets/src/mage/cards/g/GatstafArsonists.java index c11628265e..4e9d294e45 100644 --- a/Mage.Sets/src/mage/cards/g/GatstafArsonists.java +++ b/Mage.Sets/src/mage/cards/g/GatstafArsonists.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -48,8 +49,8 @@ public class GatstafArsonists extends CardImpl { public GatstafArsonists(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Human"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GatstafHowler.java b/Mage.Sets/src/mage/cards/g/GatstafHowler.java index 4fc15b9253..9f91fbaa10 100644 --- a/Mage.Sets/src/mage/cards/g/GatstafHowler.java +++ b/Mage.Sets/src/mage/cards/g/GatstafHowler.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -48,7 +49,7 @@ public class GatstafHowler extends CardImpl { public GatstafHowler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.color.setGreen(true); // this card is the second face of double-faced card diff --git a/Mage.Sets/src/mage/cards/g/GatstafRavagers.java b/Mage.Sets/src/mage/cards/g/GatstafRavagers.java index f457507824..f84e3cf6b4 100644 --- a/Mage.Sets/src/mage/cards/g/GatstafRavagers.java +++ b/Mage.Sets/src/mage/cards/g/GatstafRavagers.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -49,7 +50,7 @@ public class GatstafRavagers extends CardImpl { public GatstafRavagers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GatstafShepherd.java b/Mage.Sets/src/mage/cards/g/GatstafShepherd.java index 3221abd3a4..da825b113e 100644 --- a/Mage.Sets/src/mage/cards/g/GatstafShepherd.java +++ b/Mage.Sets/src/mage/cards/g/GatstafShepherd.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -47,8 +48,8 @@ public class GatstafShepherd extends CardImpl { public GatstafShepherd(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WEREWOLF); this.transformable = true; this.secondSideCardClazz = GatstafHowler.class; diff --git a/Mage.Sets/src/mage/cards/g/GavonyIronwright.java b/Mage.Sets/src/mage/cards/g/GavonyIronwright.java index 87477d5de1..f2a6b7c46a 100644 --- a/Mage.Sets/src/mage/cards/g/GavonyIronwright.java +++ b/Mage.Sets/src/mage/cards/g/GavonyIronwright.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class GavonyIronwright extends CardImpl { public GavonyIronwright(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GavonyUnhallowed.java b/Mage.Sets/src/mage/cards/g/GavonyUnhallowed.java index 28d75cc085..8296f1dcd0 100644 --- a/Mage.Sets/src/mage/cards/g/GavonyUnhallowed.java +++ b/Mage.Sets/src/mage/cards/g/GavonyUnhallowed.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -55,7 +56,7 @@ public class GavonyUnhallowed extends CardImpl { public GavonyUnhallowed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GazeOfAdamaro.java b/Mage.Sets/src/mage/cards/g/GazeOfAdamaro.java index 9be95c1649..0303b2208d 100644 --- a/Mage.Sets/src/mage/cards/g/GazeOfAdamaro.java +++ b/Mage.Sets/src/mage/cards/g/GazeOfAdamaro.java @@ -33,6 +33,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -46,7 +47,7 @@ public class GazeOfAdamaro extends CardImpl { public GazeOfAdamaro(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Gaze of Adamaro deals damage to target player equal to the number of cards in that player's hand. diff --git a/Mage.Sets/src/mage/cards/g/GazeOfTheGorgon.java b/Mage.Sets/src/mage/cards/g/GazeOfTheGorgon.java index 201d44b02b..ca7d2159fd 100644 --- a/Mage.Sets/src/mage/cards/g/GazeOfTheGorgon.java +++ b/Mage.Sets/src/mage/cards/g/GazeOfTheGorgon.java @@ -1,117 +1,117 @@ -/* - * 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.cards.g; - -import mage.abilities.Ability; -import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; -import mage.abilities.effects.common.RegenerateTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.filter.StaticFilters; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.common.TargetCreaturePermanent; -import mage.watchers.common.BlockedAttackerWatcher; - -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -/** - * - * @author LevelX2 - */ -public class GazeOfTheGorgon extends CardImpl { - - public GazeOfTheGorgon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{B/G}"); - - // ({BG} can be paid with either {B} or {G}.) - // Regenerate target creature. At end of combat, destroy all creatures that blocked or were blocked by that creature this turn. - this.getSpellAbility().addEffect(new RegenerateTargetEffect()); - this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( - new AtTheEndOfCombatDelayedTriggeredAbility(new GazeOfTheGorgonEffect()))); - this.getSpellAbility().addWatcher(new BlockedAttackerWatcher()); - } - - public GazeOfTheGorgon(final GazeOfTheGorgon card) { - super(card); - } - - @Override - public GazeOfTheGorgon copy() { - return new GazeOfTheGorgon(this); - } -} - -class GazeOfTheGorgonEffect extends OneShotEffect { - - public GazeOfTheGorgonEffect() { - super(Outcome.DestroyPermanent); - this.staticText = "destroy all creatures that blocked or were blocked by that creature this turn"; - } - - public GazeOfTheGorgonEffect(final GazeOfTheGorgonEffect effect) { - super(effect); - } - - @Override - public GazeOfTheGorgonEffect copy() { - return new GazeOfTheGorgonEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - Permanent targetCreature = game.getPermanentOrLKIBattlefield(source.getTargets().getFirstTarget()); - if (controller != null && targetCreature != null) { - BlockedAttackerWatcher watcher = (BlockedAttackerWatcher) game.getState().getWatchers().get(BlockedAttackerWatcher.class.getSimpleName()); - if (watcher != null) { - List toDestroy = new ArrayList<>(); - for (Permanent creature : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), source.getSourceId(), game)) { - if (!creature.getId().equals(targetCreature.getId())) { - if (watcher.creatureHasBlockedAttacker(creature, targetCreature, game) || watcher.creatureHasBlockedAttacker(targetCreature, creature, game)) { - toDestroy.add(creature); - } - } - } - for (Permanent creature : toDestroy) { - creature.destroy(source.getSourceId(), game, false); - } - return true; - } - } - return false; - } -} +/* + * 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.cards.g; + +import mage.abilities.Ability; +import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.RegenerateTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.common.BlockedAttackerWatcher; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class GazeOfTheGorgon extends CardImpl { + + public GazeOfTheGorgon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{B/G}"); + + // ({BG} can be paid with either {B} or {G}.) + // Regenerate target creature. At end of combat, destroy all creatures that blocked or were blocked by that creature this turn. + this.getSpellAbility().addEffect(new RegenerateTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( + new AtTheEndOfCombatDelayedTriggeredAbility(new GazeOfTheGorgonEffect()))); + this.getSpellAbility().addWatcher(new BlockedAttackerWatcher()); + } + + public GazeOfTheGorgon(final GazeOfTheGorgon card) { + super(card); + } + + @Override + public GazeOfTheGorgon copy() { + return new GazeOfTheGorgon(this); + } +} + +class GazeOfTheGorgonEffect extends OneShotEffect { + + public GazeOfTheGorgonEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "destroy all creatures that blocked or were blocked by that creature this turn"; + } + + public GazeOfTheGorgonEffect(final GazeOfTheGorgonEffect effect) { + super(effect); + } + + @Override + public GazeOfTheGorgonEffect copy() { + return new GazeOfTheGorgonEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent targetCreature = game.getPermanentOrLKIBattlefield(source.getTargets().getFirstTarget()); + if (controller != null && targetCreature != null) { + BlockedAttackerWatcher watcher = (BlockedAttackerWatcher) game.getState().getWatchers().get(BlockedAttackerWatcher.class.getSimpleName()); + if (watcher != null) { + List toDestroy = new ArrayList<>(); + for (Permanent creature : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), source.getSourceId(), game)) { + if (!creature.getId().equals(targetCreature.getId())) { + if (watcher.creatureHasBlockedAttacker(creature, targetCreature, game) || watcher.creatureHasBlockedAttacker(targetCreature, creature, game)) { + toDestroy.add(creature); + } + } + } + for (Permanent creature : toDestroy) { + creature.destroy(source.getSourceId(), game, false); + } + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/g/GearseekerSerpent.java b/Mage.Sets/src/mage/cards/g/GearseekerSerpent.java index 7e3af135f6..89ae8bcd01 100644 --- a/Mage.Sets/src/mage/cards/g/GearseekerSerpent.java +++ b/Mage.Sets/src/mage/cards/g/GearseekerSerpent.java @@ -51,7 +51,7 @@ public class GearseekerSerpent extends CardImpl { public GearseekerSerpent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/g/GearshiftAce.java b/Mage.Sets/src/mage/cards/g/GearshiftAce.java index 0b2355c60b..499713d761 100644 --- a/Mage.Sets/src/mage/cards/g/GearshiftAce.java +++ b/Mage.Sets/src/mage/cards/g/GearshiftAce.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class GearshiftAce extends CardImpl { public GearshiftAce(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Dwarf"); - this.subtype.add("Pilot"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.PILOT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GeierReachBandit.java b/Mage.Sets/src/mage/cards/g/GeierReachBandit.java index d3ed3eb880..5246e74324 100644 --- a/Mage.Sets/src/mage/cards/g/GeierReachBandit.java +++ b/Mage.Sets/src/mage/cards/g/GeierReachBandit.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.v.VildinPackAlpha; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -50,9 +51,9 @@ public class GeierReachBandit extends CardImpl { public GeierReachBandit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GeistFueledScarecrow.java b/Mage.Sets/src/mage/cards/g/GeistFueledScarecrow.java index eb6de9876e..0c1714358e 100644 --- a/Mage.Sets/src/mage/cards/g/GeistFueledScarecrow.java +++ b/Mage.Sets/src/mage/cards/g/GeistFueledScarecrow.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.cost.SpellsCostIncreasementControllerEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -53,7 +54,7 @@ public class GeistFueledScarecrow extends CardImpl { public GeistFueledScarecrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GeistHonoredMonk.java b/Mage.Sets/src/mage/cards/g/GeistHonoredMonk.java index aacc72c6c7..996e5b3827 100644 --- a/Mage.Sets/src/mage/cards/g/GeistHonoredMonk.java +++ b/Mage.Sets/src/mage/cards/g/GeistHonoredMonk.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -50,8 +51,8 @@ public class GeistHonoredMonk extends CardImpl { public GeistHonoredMonk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/g/GeistOfSaintTraft.java b/Mage.Sets/src/mage/cards/g/GeistOfSaintTraft.java index 49f909f302..6877cb62d1 100644 --- a/Mage.Sets/src/mage/cards/g/GeistOfSaintTraft.java +++ b/Mage.Sets/src/mage/cards/g/GeistOfSaintTraft.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.game.Game; @@ -51,8 +52,8 @@ public class GeistOfSaintTraft extends CardImpl { public GeistOfSaintTraft(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GeistOfTheArchives.java b/Mage.Sets/src/mage/cards/g/GeistOfTheArchives.java index 01daffca70..320bd0e79a 100644 --- a/Mage.Sets/src/mage/cards/g/GeistOfTheArchives.java +++ b/Mage.Sets/src/mage/cards/g/GeistOfTheArchives.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class GeistOfTheArchives extends CardImpl { public GeistOfTheArchives(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GeistOfTheLonelyVigil.java b/Mage.Sets/src/mage/cards/g/GeistOfTheLonelyVigil.java index b039ef7eee..716e220f26 100644 --- a/Mage.Sets/src/mage/cards/g/GeistOfTheLonelyVigil.java +++ b/Mage.Sets/src/mage/cards/g/GeistOfTheLonelyVigil.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class GeistOfTheLonelyVigil extends CardImpl { public GeistOfTheLonelyVigil(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Spirit"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GeistOfTheMoors.java b/Mage.Sets/src/mage/cards/g/GeistOfTheMoors.java index 47bd744c64..1e1f6a86af 100644 --- a/Mage.Sets/src/mage/cards/g/GeistOfTheMoors.java +++ b/Mage.Sets/src/mage/cards/g/GeistOfTheMoors.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class GeistOfTheMoors extends CardImpl { public GeistOfTheMoors(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GeistTrappers.java b/Mage.Sets/src/mage/cards/g/GeistTrappers.java index 8e8b7ef652..459dec7f12 100644 --- a/Mage.Sets/src/mage/cards/g/GeistTrappers.java +++ b/Mage.Sets/src/mage/cards/g/GeistTrappers.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SoulbondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class GeistTrappers extends CardImpl { public GeistTrappers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GeistcatchersRig.java b/Mage.Sets/src/mage/cards/g/GeistcatchersRig.java index eda97360db..9e1325a3b8 100644 --- a/Mage.Sets/src/mage/cards/g/GeistcatchersRig.java +++ b/Mage.Sets/src/mage/cards/g/GeistcatchersRig.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; import mage.target.common.TargetCreaturePermanent; @@ -54,7 +55,7 @@ public class GeistcatchersRig extends CardImpl { public GeistcatchersRig(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/Gelectrode.java b/Mage.Sets/src/mage/cards/g/Gelectrode.java index 972debfaca..1c2a692841 100644 --- a/Mage.Sets/src/mage/cards/g/Gelectrode.java +++ b/Mage.Sets/src/mage/cards/g/Gelectrode.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterInstantOrSorcerySpell; import mage.target.common.TargetCreatureOrPlayer; @@ -50,7 +51,7 @@ public class Gelectrode extends CardImpl { public Gelectrode(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{R}"); - this.subtype.add("Weird"); + this.subtype.add(SubType.WEIRD); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GelidShackles.java b/Mage.Sets/src/mage/cards/g/GelidShackles.java index 841ccaf59c..3113b6e38f 100644 --- a/Mage.Sets/src/mage/cards/g/GelidShackles.java +++ b/Mage.Sets/src/mage/cards/g/GelidShackles.java @@ -52,7 +52,7 @@ public class GelidShackles extends CardImpl { public GelidShackles(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); addSuperType(SuperType.SNOW); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GemhideSliver.java b/Mage.Sets/src/mage/cards/g/GemhideSliver.java index 8781894c3e..a5392a0d31 100644 --- a/Mage.Sets/src/mage/cards/g/GemhideSliver.java +++ b/Mage.Sets/src/mage/cards/g/GemhideSliver.java @@ -51,7 +51,7 @@ public class GemhideSliver extends CardImpl { public GemhideSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GeminiEngine.java b/Mage.Sets/src/mage/cards/g/GeminiEngine.java new file mode 100644 index 0000000000..d7939a3a13 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GeminiEngine.java @@ -0,0 +1,117 @@ +/* + * 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.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.GeminiEngineTwinToken; +import mage.game.permanent.token.Token; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public class GeminiEngine extends CardImpl { + + public GeminiEngine(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}"); + + this.subtype.add(SubType.CONSTRUCT); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Whenever Gemini Engine attacks, create a colorless Construct artifact creature token named Twin that's attacking. Its power is equal to Gemini Engine's power and its toughness is equal to Gemini Engine's toughness. Sacrifice the token at end of combat. + this.addAbility(new AttacksTriggeredAbility(new GeminiEngineCreateTokenEffect(), false)); + } + + public GeminiEngine(final GeminiEngine card) { + super(card); + } + + @Override + public GeminiEngine copy() { + return new GeminiEngine(this); + } +} + +class GeminiEngineCreateTokenEffect extends OneShotEffect { + + GeminiEngineCreateTokenEffect() { + super(Outcome.Benefit); + this.staticText = "create a colorless Construct artifact creature token named Twin that's attacking. Its power is equal to {this}'s power and its toughness is equal to {this}'s toughness. Sacrifice the token at end of combat."; + } + + GeminiEngineCreateTokenEffect(final GeminiEngineCreateTokenEffect effect) { + super(effect); + } + + @Override + public GeminiEngineCreateTokenEffect copy() { + return new GeminiEngineCreateTokenEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + Token token; + if (permanent != null) { + token = new GeminiEngineTwinToken(permanent.getPower().getValue(), permanent.getToughness().getValue()); + } else { + token = new GeminiEngineTwinToken(0, 0); + } + token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId(), false, true); + for (UUID tokenId : token.getLastAddedTokenIds()) { + Permanent tokenPerm = game.getPermanent(tokenId); + if (tokenPerm != null) { + Effect effect = new SacrificeTargetEffect("sacrifice " + tokenPerm.getLogName(), player.getId()); + effect.setTargetPointer(new FixedTarget(tokenPerm, game)); + game.addDelayedTriggeredAbility(new AtTheEndOfCombatDelayedTriggeredAbility(effect), source); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/g/GempalmAvenger.java b/Mage.Sets/src/mage/cards/g/GempalmAvenger.java index f3317014a3..94a1da4abc 100644 --- a/Mage.Sets/src/mage/cards/g/GempalmAvenger.java +++ b/Mage.Sets/src/mage/cards/g/GempalmAvenger.java @@ -50,7 +50,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; * @author fireshoes */ public class GempalmAvenger extends CardImpl { - + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Soldier creatures"); static { @@ -58,18 +58,21 @@ public class GempalmAvenger extends CardImpl { } public GempalmAvenger(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(5); // Cycling {2}{W} this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}{W}"))); - + // When you cycle Gempalm Avenger, Soldier creatures get +1/+1 and gain first strike until end of turn. - Ability ability = new CycleTriggeredAbility(new BoostAllEffect(1,1,Duration.EndOfTurn, filter, false)); + Ability ability = new CycleTriggeredAbility( + new BoostAllEffect(1, 1, Duration.EndOfTurn, filter, false).setText("Soldier creatures get +1/+1") + ); Effect effect = new GainAbilityAllEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, filter); + effect.setText("and gain first strike until end of turn"); ability.addEffect(effect); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GempalmIncinerator.java b/Mage.Sets/src/mage/cards/g/GempalmIncinerator.java index c470b72862..549a2b1143 100644 --- a/Mage.Sets/src/mage/cards/g/GempalmIncinerator.java +++ b/Mage.Sets/src/mage/cards/g/GempalmIncinerator.java @@ -56,7 +56,7 @@ public class GempalmIncinerator extends CardImpl { public GempalmIncinerator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GempalmPolluter.java b/Mage.Sets/src/mage/cards/g/GempalmPolluter.java index aef07c6149..130047562f 100644 --- a/Mage.Sets/src/mage/cards/g/GempalmPolluter.java +++ b/Mage.Sets/src/mage/cards/g/GempalmPolluter.java @@ -58,7 +58,7 @@ public class GempalmPolluter extends CardImpl { public GempalmPolluter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GempalmSorcerer.java b/Mage.Sets/src/mage/cards/g/GempalmSorcerer.java new file mode 100644 index 0000000000..92de9eac80 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GempalmSorcerer.java @@ -0,0 +1,82 @@ +/* + * 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.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.CycleTriggeredAbility; +import mage.constants.SubType; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.CyclingAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author TheElk801 + */ +public class GempalmSorcerer extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Wizard creatures"); + + static { + filter.add(new SubtypePredicate(SubType.WIZARD)); + } + + public GempalmSorcerer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Cycling {2}{U} + this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}{U}"))); + + // When you cycle Gempalm Sorcerer, Wizard creatures gain flying until end of turn. + Ability ability = new CycleTriggeredAbility(new GainAbilityAllEffect(FlyingAbility.getInstance(), Duration.EndOfTurn, filter)); + this.addAbility(ability); + } + + public GempalmSorcerer(final GempalmSorcerer card) { + super(card); + } + + @Override + public GempalmSorcerer copy() { + return new GempalmSorcerer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GempalmStrider.java b/Mage.Sets/src/mage/cards/g/GempalmStrider.java index b62e8f5c3c..ad0eb4d8be 100644 --- a/Mage.Sets/src/mage/cards/g/GempalmStrider.java +++ b/Mage.Sets/src/mage/cards/g/GempalmStrider.java @@ -55,7 +55,7 @@ public class GempalmStrider extends CardImpl { public GempalmStrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GeneralGrievous.java b/Mage.Sets/src/mage/cards/g/GeneralGrievous.java index bc5ae95b8c..5c7b7cab39 100644 --- a/Mage.Sets/src/mage/cards/g/GeneralGrievous.java +++ b/Mage.Sets/src/mage/cards/g/GeneralGrievous.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.counters.CounterType; @@ -51,7 +52,7 @@ public class GeneralGrievous extends CardImpl { public GeneralGrievous(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{W}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Kaleesh"); + this.subtype.add(SubType.KALEESH); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GeneralTazri.java b/Mage.Sets/src/mage/cards/g/GeneralTazri.java index 5b97b82439..0d547a284d 100644 --- a/Mage.Sets/src/mage/cards/g/GeneralTazri.java +++ b/Mage.Sets/src/mage/cards/g/GeneralTazri.java @@ -63,8 +63,8 @@ public class GeneralTazri extends CardImpl { public GeneralTazri(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ALLY); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GeneralsKabuto.java b/Mage.Sets/src/mage/cards/g/GeneralsKabuto.java index 3b8aa811c3..fdc414c058 100644 --- a/Mage.Sets/src/mage/cards/g/GeneralsKabuto.java +++ b/Mage.Sets/src/mage/cards/g/GeneralsKabuto.java @@ -47,7 +47,7 @@ public class GeneralsKabuto extends CardImpl { public GeneralsKabuto (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has shroud. (It can't be the target of spells or abilities.) this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ShroudAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/g/GeneratorServant.java b/Mage.Sets/src/mage/cards/g/GeneratorServant.java index a89b9c1679..a9e95a6264 100644 --- a/Mage.Sets/src/mage/cards/g/GeneratorServant.java +++ b/Mage.Sets/src/mage/cards/g/GeneratorServant.java @@ -58,7 +58,7 @@ public class GeneratorServant extends CardImpl { public GeneratorServant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/Genesis.java b/Mage.Sets/src/mage/cards/g/Genesis.java index 73f256ea69..3e4fbe07d4 100644 --- a/Mage.Sets/src/mage/cards/g/Genesis.java +++ b/Mage.Sets/src/mage/cards/g/Genesis.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -50,7 +51,7 @@ public class Genesis extends CardImpl { public Genesis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Incarnation"); + this.subtype.add(SubType.INCARNATION); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GenesisChamber.java b/Mage.Sets/src/mage/cards/g/GenesisChamber.java index 9c32f0ff6d..50eb8c1dfa 100644 --- a/Mage.Sets/src/mage/cards/g/GenesisChamber.java +++ b/Mage.Sets/src/mage/cards/g/GenesisChamber.java @@ -29,8 +29,10 @@ package mage.cards.g; import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; -import mage.abilities.effects.Effect; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -38,7 +40,6 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.constants.Zone; -import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.permanent.TokenPredicate; @@ -53,14 +54,21 @@ import mage.game.permanent.token.MyrToken; public class GenesisChamber extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nontoken creature"); - static{ + + static { filter.add(Predicates.not(new TokenPredicate())); } + public GenesisChamber(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); // Whenever a nontoken creature enters the battlefield, if Genesis Chamber is untapped, that creature's controller creates a 1/1 colorless Myr artifact creature token. - this.addAbility(new GenesisChamberTriggeredAbility(new GenesisChamberEffect(), filter)); + TriggeredAbility ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new GenesisChamberEffect(), filter, false, SetTargetPointer.PERMANENT, ""); + this.addAbility(new ConditionalTriggeredAbility(ability, + SourceUntappedCondition.instance, + "Whenever a nontoken creature enters the battlefield, " + + "if {this} is untapped, " + + "that creature's controller creates a 1/1 colorless Myr artifact creature token")); } public GenesisChamber(final GenesisChamber card) { @@ -73,37 +81,24 @@ public class GenesisChamber extends CardImpl { } } -class GenesisChamberTriggeredAbility extends EntersBattlefieldAllTriggeredAbility -{ - private static final String rule = "Whenever a nontoken creature enters the battlefield, if {this} is untapped, that creature's controller creates a 1/1 colorless Myr artifact creature token"; - public GenesisChamberTriggeredAbility(Effect effect, FilterPermanent filter) - { - super(Zone.BATTLEFIELD, effect, filter, false, SetTargetPointer.PERMANENT, rule); - } - - public GenesisChamberTriggeredAbility(final GenesisChamberTriggeredAbility ability) { - super(ability); - } - @Override - public GenesisChamberTriggeredAbility copy() { - return new GenesisChamberTriggeredAbility(this); - } +enum SourceUntappedCondition implements Condition { + instance; @Override - public boolean checkInterveningIfClause(Game game) { - Permanent permanent = game.getPermanent(this.sourceId); - if(permanent == null){ - permanent = (Permanent)game.getLastKnownInformation(sourceId, Zone.BATTLEFIELD); - } - if(permanent != null){ + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (permanent != null) { return !permanent.isTapped(); } return false; } - -} + @Override + public String toString() { + return "if {this} is untapped"; + } +} class GenesisChamberEffect extends OneShotEffect { @@ -123,14 +118,11 @@ class GenesisChamberEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); - if(permanent == null){ - permanent = (Permanent)game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.BATTLEFIELD); - } + Permanent permanent = game.getPermanentOrLKIBattlefield(targetPointer.getFirst(game, source)); if (permanent != null) { MyrToken token = new MyrToken(); token.putOntoBattlefield(1, game, source.getSourceId(), permanent.getControllerId()); } return true; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/g/GenesisHydra.java b/Mage.Sets/src/mage/cards/g/GenesisHydra.java index beb3176e30..4eccc30e83 100644 --- a/Mage.Sets/src/mage/cards/g/GenesisHydra.java +++ b/Mage.Sets/src/mage/cards/g/GenesisHydra.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CastSourceTriggeredAbility; import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.Zone; @@ -58,8 +59,8 @@ public class GenesisHydra extends CardImpl { public GenesisHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{X}{G}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/g/GenjuOfTheCedars.java b/Mage.Sets/src/mage/cards/g/GenjuOfTheCedars.java index 8bd191b123..0153a52c20 100644 --- a/Mage.Sets/src/mage/cards/g/GenjuOfTheCedars.java +++ b/Mage.Sets/src/mage/cards/g/GenjuOfTheCedars.java @@ -56,7 +56,7 @@ public class GenjuOfTheCedars extends CardImpl { public GenjuOfTheCedars(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant Forest TargetPermanent auraTarget = new TargetLandPermanent(filter); @@ -91,7 +91,7 @@ public class GenjuOfTheCedars extends CardImpl { super("", "4/4 green Spirit creature"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); power = new MageInt(4); toughness = new MageInt(4); } diff --git a/Mage.Sets/src/mage/cards/g/GenjuOfTheFalls.java b/Mage.Sets/src/mage/cards/g/GenjuOfTheFalls.java index f4be715bd9..bed91096ec 100644 --- a/Mage.Sets/src/mage/cards/g/GenjuOfTheFalls.java +++ b/Mage.Sets/src/mage/cards/g/GenjuOfTheFalls.java @@ -56,7 +56,7 @@ public class GenjuOfTheFalls extends CardImpl { public GenjuOfTheFalls(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant Island TargetPermanent auraTarget = new TargetLandPermanent(FILTER); @@ -89,7 +89,7 @@ public class GenjuOfTheFalls extends CardImpl { super("Spirit", "3/2 blue Spirit creature with flying"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); power = new MageInt(3); toughness = new MageInt(2); addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/g/GenjuOfTheFens.java b/Mage.Sets/src/mage/cards/g/GenjuOfTheFens.java index e377268d4e..7f0fc40ab7 100644 --- a/Mage.Sets/src/mage/cards/g/GenjuOfTheFens.java +++ b/Mage.Sets/src/mage/cards/g/GenjuOfTheFens.java @@ -57,7 +57,7 @@ public class GenjuOfTheFens extends CardImpl { public GenjuOfTheFens(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant Swamp TargetPermanent auraTarget = new TargetLandPermanent(FILTER); @@ -90,7 +90,7 @@ public class GenjuOfTheFens extends CardImpl { super("Spirit", "2/2 black Spirit creature with \"{B}: This creature gets +1/+1 until end of turn.\""); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); power = new MageInt(2); toughness = new MageInt(2); addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{B}"))); diff --git a/Mage.Sets/src/mage/cards/g/GenjuOfTheFields.java b/Mage.Sets/src/mage/cards/g/GenjuOfTheFields.java index 4e3725c7f2..c73a4bfd1a 100644 --- a/Mage.Sets/src/mage/cards/g/GenjuOfTheFields.java +++ b/Mage.Sets/src/mage/cards/g/GenjuOfTheFields.java @@ -58,7 +58,7 @@ public class GenjuOfTheFields extends CardImpl { public GenjuOfTheFields(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant Plains TargetPermanent auraTarget = new TargetLandPermanent(FILTER); @@ -96,7 +96,7 @@ public class GenjuOfTheFields extends CardImpl { super("Spirit", "2/5 white Spirit creature"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); power = new MageInt(2); toughness = new MageInt(5); } diff --git a/Mage.Sets/src/mage/cards/g/GenjuOfTheRealm.java b/Mage.Sets/src/mage/cards/g/GenjuOfTheRealm.java index e31ee8a911..8840c596d8 100644 --- a/Mage.Sets/src/mage/cards/g/GenjuOfTheRealm.java +++ b/Mage.Sets/src/mage/cards/g/GenjuOfTheRealm.java @@ -53,7 +53,7 @@ public class GenjuOfTheRealm extends CardImpl { public GenjuOfTheRealm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}{U}{B}{R}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); addSuperType(SuperType.LEGENDARY); // Enchant Land @@ -92,7 +92,7 @@ public class GenjuOfTheRealm extends CardImpl { this.color.setBlack(true); this.color.setRed(true); this.color.setGreen(true); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); power = new MageInt(8); toughness = new MageInt(12); this.addAbility(TrampleAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/g/GenjuOfTheSpires.java b/Mage.Sets/src/mage/cards/g/GenjuOfTheSpires.java index f51ae31b2c..721d237917 100644 --- a/Mage.Sets/src/mage/cards/g/GenjuOfTheSpires.java +++ b/Mage.Sets/src/mage/cards/g/GenjuOfTheSpires.java @@ -55,7 +55,7 @@ public class GenjuOfTheSpires extends CardImpl { public GenjuOfTheSpires(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant Mountain TargetPermanent auraTarget = new TargetLandPermanent(FILTER); @@ -88,7 +88,7 @@ public class GenjuOfTheSpires extends CardImpl { super("Spirit", "6/1 red Spirit creature"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); power = new MageInt(6); toughness = new MageInt(1); } diff --git a/Mage.Sets/src/mage/cards/g/GeralfsMasterpiece.java b/Mage.Sets/src/mage/cards/g/GeralfsMasterpiece.java index 2cb5c6ffab..92dd7e0bcc 100644 --- a/Mage.Sets/src/mage/cards/g/GeralfsMasterpiece.java +++ b/Mage.Sets/src/mage/cards/g/GeralfsMasterpiece.java @@ -44,6 +44,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterCard; @@ -57,8 +58,8 @@ public class GeralfsMasterpiece extends CardImpl { public GeralfsMasterpiece(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/g/GeralfsMessenger.java b/Mage.Sets/src/mage/cards/g/GeralfsMessenger.java index a54b8f03cc..1803af8e02 100644 --- a/Mage.Sets/src/mage/cards/g/GeralfsMessenger.java +++ b/Mage.Sets/src/mage/cards/g/GeralfsMessenger.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.UndyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetOpponent; /** @@ -47,7 +48,7 @@ public class GeralfsMessenger extends CardImpl { public GeralfsMessenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GeralfsMindcrusher.java b/Mage.Sets/src/mage/cards/g/GeralfsMindcrusher.java index 03fe9a21a1..90795de2a1 100644 --- a/Mage.Sets/src/mage/cards/g/GeralfsMindcrusher.java +++ b/Mage.Sets/src/mage/cards/g/GeralfsMindcrusher.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.UndyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -46,8 +47,8 @@ public class GeralfsMindcrusher extends CardImpl { public GeralfsMindcrusher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GerrardCapashen.java b/Mage.Sets/src/mage/cards/g/GerrardCapashen.java index 0e31acebf3..a487b53a31 100644 --- a/Mage.Sets/src/mage/cards/g/GerrardCapashen.java +++ b/Mage.Sets/src/mage/cards/g/GerrardCapashen.java @@ -53,8 +53,8 @@ public class GerrardCapashen extends CardImpl { public GerrardCapashen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GerrardsIrregulars.java b/Mage.Sets/src/mage/cards/g/GerrardsIrregulars.java index 593ed58257..a530cd6d49 100644 --- a/Mage.Sets/src/mage/cards/g/GerrardsIrregulars.java +++ b/Mage.Sets/src/mage/cards/g/GerrardsIrregulars.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class GerrardsIrregulars extends CardImpl { public GerrardsIrregulars(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GethLordOfTheVault.java b/Mage.Sets/src/mage/cards/g/GethLordOfTheVault.java index 573eb4721b..e375d2631d 100644 --- a/Mage.Sets/src/mage/cards/g/GethLordOfTheVault.java +++ b/Mage.Sets/src/mage/cards/g/GethLordOfTheVault.java @@ -38,17 +38,16 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; +import mage.constants.TargetAdjustment; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.players.Player; -import mage.target.Target; import mage.target.common.TargetCardInOpponentsGraveyard; /** @@ -56,12 +55,18 @@ import mage.target.common.TargetCardInOpponentsGraveyard; */ public class GethLordOfTheVault extends CardImpl { - private final UUID originalId; + private static final FilterCard filter = new FilterCard("artifact or creature card with converted mana cost X from an opponent's graveyard"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.CREATURE))); + } public GethLordOfTheVault(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(5); this.toughness = new MageInt(5); @@ -71,29 +76,13 @@ public class GethLordOfTheVault extends CardImpl { // {X}{B}: Put target artifact or creature card with converted mana cost X from an opponent's graveyard onto the battlefield under your control tapped. // Then that player puts the top X cards of his or her library into his or her graveyard. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GethLordOfTheVaultEffect(), new ManaCostsImpl("{X}{B}")); - originalId = ability.getOriginalId(); - ability.addTarget(new TargetCardInOpponentsGraveyard(new FilterCard("artifact or creature card with converted mana cost X from an opponent's graveyard"))); + ability.setTargetAdjustment(TargetAdjustment.X_CMC_EQUAL_GY_CARD); + ability.addTarget(new TargetCardInOpponentsGraveyard(filter)); this.addAbility(ability); } - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(originalId)) { - int xValue = ability.getManaCostsToPay().getX(); - ability.getTargets().clear(); - FilterCard filter = new FilterCard("artifact or creature card with converted mana cost " + xValue + " from an opponent's graveyard"); - filter.add(Predicates.or( - new CardTypePredicate(CardType.ARTIFACT), - new CardTypePredicate(CardType.CREATURE))); - filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, xValue)); - Target target = new TargetCardInOpponentsGraveyard(filter); - ability.addTarget(target); - } - } - public GethLordOfTheVault(final GethLordOfTheVault card) { super(card); - this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/cards/g/GeyserGlider.java b/Mage.Sets/src/mage/cards/g/GeyserGlider.java index 712a53474d..d2bb2310f0 100644 --- a/Mage.Sets/src/mage/cards/g/GeyserGlider.java +++ b/Mage.Sets/src/mage/cards/g/GeyserGlider.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class GeyserGlider extends CardImpl { public GeyserGlider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Beast"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GeyserfieldStalker.java b/Mage.Sets/src/mage/cards/g/GeyserfieldStalker.java index 07fb2cbb53..265d515e2c 100644 --- a/Mage.Sets/src/mage/cards/g/GeyserfieldStalker.java +++ b/Mage.Sets/src/mage/cards/g/GeyserfieldStalker.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,7 +46,7 @@ public class GeyserfieldStalker extends CardImpl { public GeyserfieldStalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GhalmasWarden.java b/Mage.Sets/src/mage/cards/g/GhalmasWarden.java index 00aa4a4b87..b2c831d9de 100644 --- a/Mage.Sets/src/mage/cards/g/GhalmasWarden.java +++ b/Mage.Sets/src/mage/cards/g/GhalmasWarden.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class GhalmasWarden extends CardImpl { public GhalmasWarden (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Elephant"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ELEPHANT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GhastlordOfFugue.java b/Mage.Sets/src/mage/cards/g/GhastlordOfFugue.java index 577d06be7b..077fff3119 100644 --- a/Mage.Sets/src/mage/cards/g/GhastlordOfFugue.java +++ b/Mage.Sets/src/mage/cards/g/GhastlordOfFugue.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class GhastlordOfFugue extends CardImpl { public GhastlordOfFugue(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U/B}{U/B}{U/B}{U/B}{U/B}"); - this.subtype.add("Spirit"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GhastlyHaunting.java b/Mage.Sets/src/mage/cards/g/GhastlyHaunting.java index 1d59f90474..5e74a2d3aa 100644 --- a/Mage.Sets/src/mage/cards/g/GhastlyHaunting.java +++ b/Mage.Sets/src/mage/cards/g/GhastlyHaunting.java @@ -33,6 +33,7 @@ import mage.abilities.effects.common.continuous.ControlEnchantedEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -45,7 +46,7 @@ public class GhastlyHaunting extends CardImpl { public GhastlyHaunting(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},""); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); this.color.setBlue(true); // this card is the second face of double-faced card diff --git a/Mage.Sets/src/mage/cards/g/GhastlyRemains.java b/Mage.Sets/src/mage/cards/g/GhastlyRemains.java index 91fe01a5b5..678f881442 100644 --- a/Mage.Sets/src/mage/cards/g/GhastlyRemains.java +++ b/Mage.Sets/src/mage/cards/g/GhastlyRemains.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.AmplifyAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.game.Game; @@ -52,7 +53,7 @@ public class GhastlyRemains extends CardImpl { public GhastlyRemains(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/g/GhaveGuruOfSpores.java b/Mage.Sets/src/mage/cards/g/GhaveGuruOfSpores.java index cca16cb0ee..bae40f6943 100644 --- a/Mage.Sets/src/mage/cards/g/GhaveGuruOfSpores.java +++ b/Mage.Sets/src/mage/cards/g/GhaveGuruOfSpores.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.counters.CounterType; @@ -67,8 +68,8 @@ public class GhaveGuruOfSpores extends CardImpl { public GhaveGuruOfSpores(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Fungus"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.FUNGUS); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/g/GhazbanOgre.java b/Mage.Sets/src/mage/cards/g/GhazbanOgre.java index 084da558ae..90183ebaf4 100644 --- a/Mage.Sets/src/mage/cards/g/GhazbanOgre.java +++ b/Mage.Sets/src/mage/cards/g/GhazbanOgre.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -54,7 +55,7 @@ public class GhazbanOgre extends CardImpl { public GhazbanOgre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Ogre"); + this.subtype.add(SubType.OGRE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GhirapurGearcrafter.java b/Mage.Sets/src/mage/cards/g/GhirapurGearcrafter.java index 8bf41e4cbe..811d702b11 100644 --- a/Mage.Sets/src/mage/cards/g/GhirapurGearcrafter.java +++ b/Mage.Sets/src/mage/cards/g/GhirapurGearcrafter.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.ThopterColorlessToken; /** @@ -44,8 +45,8 @@ public class GhirapurGearcrafter extends CardImpl { public GhirapurGearcrafter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GhirapurGuide.java b/Mage.Sets/src/mage/cards/g/GhirapurGuide.java index ded66f9a14..fac5524a78 100644 --- a/Mage.Sets/src/mage/cards/g/GhirapurGuide.java +++ b/Mage.Sets/src/mage/cards/g/GhirapurGuide.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByAllTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; @@ -57,8 +58,8 @@ public class GhirapurGuide extends CardImpl { public GhirapurGuide(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GhirapurOsprey.java b/Mage.Sets/src/mage/cards/g/GhirapurOsprey.java index d9e823d6be..0baef5d036 100644 --- a/Mage.Sets/src/mage/cards/g/GhirapurOsprey.java +++ b/Mage.Sets/src/mage/cards/g/GhirapurOsprey.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class GhirapurOsprey extends CardImpl { public GhirapurOsprey(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GhituEncampment.java b/Mage.Sets/src/mage/cards/g/GhituEncampment.java index 0910e6274f..55d061891d 100644 --- a/Mage.Sets/src/mage/cards/g/GhituEncampment.java +++ b/Mage.Sets/src/mage/cards/g/GhituEncampment.java @@ -38,6 +38,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -73,7 +74,7 @@ class GhituEncampmentToken extends Token { public GhituEncampmentToken() { super("Warrior", "2/1 red Warrior creature with first strike"); cardType.add(CardType.CREATURE); - this.subtype.add("Warrior"); + this.subtype.add(SubType.WARRIOR); this.color.setRed(true); power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GhituFire.java b/Mage.Sets/src/mage/cards/g/GhituFire.java index ff3fe2b8fe..833cf73397 100644 --- a/Mage.Sets/src/mage/cards/g/GhituFire.java +++ b/Mage.Sets/src/mage/cards/g/GhituFire.java @@ -42,18 +42,19 @@ import mage.target.common.TargetCreatureOrPlayer; /** * * @author LoneFox - + * */ public class GhituFire extends CardImpl { public GhituFire(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}"); Effect effect = new DamageTargetEffect(new ManacostVariableValue()); // You may cast Ghitu Fire as though it had flash if you pay {2} more to cast it. Ability ability = new PayMoreToCastAsThoughtItHadFlashAbility(this, new ManaCostsImpl("{2}")); ability.addEffect(effect); ability.addTarget(new TargetCreatureOrPlayer()); + ability.setRuleAtTheTop(true); this.addAbility(ability); // Ghitu Fire deals X damage to target creature or player. this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/g/GhituFireEater.java b/Mage.Sets/src/mage/cards/g/GhituFireEater.java index 7ebf7d0acc..57c9a1761c 100644 --- a/Mage.Sets/src/mage/cards/g/GhituFireEater.java +++ b/Mage.Sets/src/mage/cards/g/GhituFireEater.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -50,8 +51,8 @@ public class GhituFireEater extends CardImpl { public GhituFireEater(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GhituFirebreathing.java b/Mage.Sets/src/mage/cards/g/GhituFirebreathing.java index 8bf5a7e3b9..859915cb21 100644 --- a/Mage.Sets/src/mage/cards/g/GhituFirebreathing.java +++ b/Mage.Sets/src/mage/cards/g/GhituFirebreathing.java @@ -51,7 +51,7 @@ public class GhituFirebreathing extends CardImpl { public GhituFirebreathing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/g/GhituSlinger.java b/Mage.Sets/src/mage/cards/g/GhituSlinger.java index 44a89ee460..dbcc7361d3 100644 --- a/Mage.Sets/src/mage/cards/g/GhituSlinger.java +++ b/Mage.Sets/src/mage/cards/g/GhituSlinger.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; /** @@ -46,8 +47,8 @@ public class GhituSlinger extends CardImpl { public GhituSlinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GhorClanBloodscale.java b/Mage.Sets/src/mage/cards/g/GhorClanBloodscale.java index 455db85eff..efed9bf386 100644 --- a/Mage.Sets/src/mage/cards/g/GhorClanBloodscale.java +++ b/Mage.Sets/src/mage/cards/g/GhorClanBloodscale.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class GhorClanBloodscale extends CardImpl { public GhorClanBloodscale(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Viashino"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GhorClanRampager.java b/Mage.Sets/src/mage/cards/g/GhorClanRampager.java index 12ad8eae2a..b6e418b10c 100644 --- a/Mage.Sets/src/mage/cards/g/GhorClanRampager.java +++ b/Mage.Sets/src/mage/cards/g/GhorClanRampager.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -47,7 +48,7 @@ public class GhorClanRampager extends CardImpl { public GhorClanRampager(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GhorClanSavage.java b/Mage.Sets/src/mage/cards/g/GhorClanSavage.java index 0940c70ba0..c15dd59ffe 100644 --- a/Mage.Sets/src/mage/cards/g/GhorClanSavage.java +++ b/Mage.Sets/src/mage/cards/g/GhorClanSavage.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.BloodthirstAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class GhorClanSavage extends CardImpl { public GhorClanSavage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GhostCouncilOfOrzhova.java b/Mage.Sets/src/mage/cards/g/GhostCouncilOfOrzhova.java index 92d0ab81be..3e1e41b733 100644 --- a/Mage.Sets/src/mage/cards/g/GhostCouncilOfOrzhova.java +++ b/Mage.Sets/src/mage/cards/g/GhostCouncilOfOrzhova.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.ExileReturnBattlefieldOwnerNextEndStepSourc import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class GhostCouncilOfOrzhova extends CardImpl { public GhostCouncilOfOrzhova(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GhostHounds.java b/Mage.Sets/src/mage/cards/g/GhostHounds.java index 5dbef9e482..957b29b27c 100644 --- a/Mage.Sets/src/mage/cards/g/GhostHounds.java +++ b/Mage.Sets/src/mage/cards/g/GhostHounds.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -56,8 +57,8 @@ public class GhostHounds extends CardImpl { public GhostHounds(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Hound"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.HOUND); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GhostLitNourisher.java b/Mage.Sets/src/mage/cards/g/GhostLitNourisher.java index d753b67f01..0fb1b83b05 100644 --- a/Mage.Sets/src/mage/cards/g/GhostLitNourisher.java +++ b/Mage.Sets/src/mage/cards/g/GhostLitNourisher.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ChannelAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,7 +51,7 @@ public class GhostLitNourisher extends CardImpl { public GhostLitNourisher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GhostLitRaider.java b/Mage.Sets/src/mage/cards/g/GhostLitRaider.java index f611a3284e..ee7b709cf7 100644 --- a/Mage.Sets/src/mage/cards/g/GhostLitRaider.java +++ b/Mage.Sets/src/mage/cards/g/GhostLitRaider.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ChannelAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class GhostLitRaider extends CardImpl { public GhostLitRaider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GhostLitRedeemer.java b/Mage.Sets/src/mage/cards/g/GhostLitRedeemer.java index 42c78c0881..d20792088c 100644 --- a/Mage.Sets/src/mage/cards/g/GhostLitRedeemer.java +++ b/Mage.Sets/src/mage/cards/g/GhostLitRedeemer.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ChannelAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,7 +49,7 @@ public class GhostLitRedeemer extends CardImpl { public GhostLitRedeemer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GhostLitStalker.java b/Mage.Sets/src/mage/cards/g/GhostLitStalker.java index 0e5a80b0ea..41ec573224 100644 --- a/Mage.Sets/src/mage/cards/g/GhostLitStalker.java +++ b/Mage.Sets/src/mage/cards/g/GhostLitStalker.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ChannelAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TimingRule; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -50,7 +51,7 @@ public class GhostLitStalker extends CardImpl { public GhostLitStalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GhostLitWarder.java b/Mage.Sets/src/mage/cards/g/GhostLitWarder.java index 5c7d5b0821..d26128d296 100644 --- a/Mage.Sets/src/mage/cards/g/GhostLitWarder.java +++ b/Mage.Sets/src/mage/cards/g/GhostLitWarder.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ChannelAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetSpell; @@ -49,7 +50,7 @@ public class GhostLitWarder extends CardImpl { public GhostLitWarder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GhostShip.java b/Mage.Sets/src/mage/cards/g/GhostShip.java index 5de640ddb5..1c52de8202 100644 --- a/Mage.Sets/src/mage/cards/g/GhostShip.java +++ b/Mage.Sets/src/mage/cards/g/GhostShip.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class GhostShip extends CardImpl { public GhostShip(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GhostTactician.java b/Mage.Sets/src/mage/cards/g/GhostTactician.java index b49be28085..706f24373b 100644 --- a/Mage.Sets/src/mage/cards/g/GhostTactician.java +++ b/Mage.Sets/src/mage/cards/g/GhostTactician.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class GhostTactician extends CardImpl { public GhostTactician(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Spirit"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GhostWarden.java b/Mage.Sets/src/mage/cards/g/GhostWarden.java index 106ff77219..829c3f3296 100644 --- a/Mage.Sets/src/mage/cards/g/GhostWarden.java +++ b/Mage.Sets/src/mage/cards/g/GhostWarden.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class GhostWarden extends CardImpl { public GhostWarden(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GhostbladeEidolon.java b/Mage.Sets/src/mage/cards/g/GhostbladeEidolon.java index 7a9e692773..535664951e 100644 --- a/Mage.Sets/src/mage/cards/g/GhostbladeEidolon.java +++ b/Mage.Sets/src/mage/cards/g/GhostbladeEidolon.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class GhostbladeEidolon extends CardImpl { public GhostbladeEidolon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GhostfireBlade.java b/Mage.Sets/src/mage/cards/g/GhostfireBlade.java index 19c999adf7..08e83ad17f 100644 --- a/Mage.Sets/src/mage/cards/g/GhostfireBlade.java +++ b/Mage.Sets/src/mage/cards/g/GhostfireBlade.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class GhostfireBlade extends CardImpl { public GhostfireBlade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+2 this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2))); diff --git a/Mage.Sets/src/mage/cards/g/GhostflameSliver.java b/Mage.Sets/src/mage/cards/g/GhostflameSliver.java index 2aaed1f06c..94fd6d1940 100644 --- a/Mage.Sets/src/mage/cards/g/GhostflameSliver.java +++ b/Mage.Sets/src/mage/cards/g/GhostflameSliver.java @@ -48,7 +48,7 @@ public class GhostflameSliver extends CardImpl { public GhostflameSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{R}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GhosthelmCourier.java b/Mage.Sets/src/mage/cards/g/GhosthelmCourier.java index fccd565db5..ea3e110abd 100644 --- a/Mage.Sets/src/mage/cards/g/GhosthelmCourier.java +++ b/Mage.Sets/src/mage/cards/g/GhosthelmCourier.java @@ -63,8 +63,8 @@ public class GhosthelmCourier extends CardImpl { public GhosthelmCourier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GhostlyChangeling.java b/Mage.Sets/src/mage/cards/g/GhostlyChangeling.java index a39b57e080..8fc88e22b1 100644 --- a/Mage.Sets/src/mage/cards/g/GhostlyChangeling.java +++ b/Mage.Sets/src/mage/cards/g/GhostlyChangeling.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ChangelingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class GhostlyChangeling extends CardImpl { public GhostlyChangeling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GhostlyPossession.java b/Mage.Sets/src/mage/cards/g/GhostlyPossession.java index 91f7179ebd..fc7b5f5b7a 100644 --- a/Mage.Sets/src/mage/cards/g/GhostlyPossession.java +++ b/Mage.Sets/src/mage/cards/g/GhostlyPossession.java @@ -30,18 +30,14 @@ package mage.cards.g; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.PreventionEffectImpl; import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.PreventAllDamageToAndByAttachedEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import mage.game.Game; -import mage.game.events.DamageEvent; -import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -52,9 +48,8 @@ import mage.target.common.TargetCreaturePermanent; public class GhostlyPossession extends CardImpl { public GhostlyPossession(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); - + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); @@ -66,7 +61,7 @@ public class GhostlyPossession extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA))); //Prevent all combat damage that would be dealt to and dealt by enchanted creature - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GhostlyPossessionEffect())); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventAllDamageToAndByAttachedEffect(Duration.WhileOnBattlefield, "enchanted creature", true))); } public GhostlyPossession(final GhostlyPossession card) { @@ -78,42 +73,3 @@ public class GhostlyPossession extends CardImpl { return new GhostlyPossession(this); } } - -class GhostlyPossessionEffect extends PreventionEffectImpl { - - public GhostlyPossessionEffect() { - super(Duration.WhileOnBattlefield, Integer.MAX_VALUE, true); - staticText = "Prevent all combat damage that would be dealt to and dealt by enchanted creature"; - } - - public GhostlyPossessionEffect(final GhostlyPossessionEffect effect) { - super(effect); - } - - @Override - public GhostlyPossessionEffect copy() { - return new GhostlyPossessionEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - if (super.applies(event, source, game) && event instanceof DamageEvent) { - DamageEvent damageEvent = (DamageEvent) event; - if (damageEvent.isCombatDamage()) { - Permanent aura = game.getPermanent(source.getSourceId()); - if (aura != null && aura.getAttachedTo() != null) { - if (event.getSourceId().equals(aura.getAttachedTo()) || event.getTargetId().equals(aura.getAttachedTo())) { - return true; - } - } - } - } - return false; - } - -} diff --git a/Mage.Sets/src/mage/cards/g/GhostlySentinel.java b/Mage.Sets/src/mage/cards/g/GhostlySentinel.java index d55aa2ba9d..b3409455a5 100644 --- a/Mage.Sets/src/mage/cards/g/GhostlySentinel.java +++ b/Mage.Sets/src/mage/cards/g/GhostlySentinel.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class GhostlySentinel extends CardImpl { public GhostlySentinel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GhostlyTouch.java b/Mage.Sets/src/mage/cards/g/GhostlyTouch.java index f3a49ba05e..997a64f16e 100644 --- a/Mage.Sets/src/mage/cards/g/GhostlyTouch.java +++ b/Mage.Sets/src/mage/cards/g/GhostlyTouch.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -53,7 +54,7 @@ public class GhostlyTouch extends CardImpl { public GhostlyTouch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/g/GhostlyWings.java b/Mage.Sets/src/mage/cards/g/GhostlyWings.java index e560c83a5d..4a31fe90c7 100644 --- a/Mage.Sets/src/mage/cards/g/GhostlyWings.java +++ b/Mage.Sets/src/mage/cards/g/GhostlyWings.java @@ -56,7 +56,7 @@ public class GhostlyWings extends CardImpl { public GhostlyWings(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GhostsOfTheDamned.java b/Mage.Sets/src/mage/cards/g/GhostsOfTheDamned.java index 2f357094b9..5b3052de14 100644 --- a/Mage.Sets/src/mage/cards/g/GhostsOfTheDamned.java +++ b/Mage.Sets/src/mage/cards/g/GhostsOfTheDamned.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class GhostsOfTheDamned extends CardImpl { public GhostsOfTheDamned(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GhostsOfTheInnocent.java b/Mage.Sets/src/mage/cards/g/GhostsOfTheInnocent.java index 71fc366019..a60482359a 100644 --- a/Mage.Sets/src/mage/cards/g/GhostsOfTheInnocent.java +++ b/Mage.Sets/src/mage/cards/g/GhostsOfTheInnocent.java @@ -1,115 +1,116 @@ -/* - * 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.cards.g; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.PreventionEffect; -import mage.abilities.effects.ReplacementEffectImpl; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; - -/** - * - * @author LevelX2 - */ -public class GhostsOfTheInnocent extends CardImpl { - - public GhostsOfTheInnocent(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}{W}"); - - this.subtype.add("Spirit"); - this.power = new MageInt(4); - this.toughness = new MageInt(5); - - // If a source would deal damage to a creature or player, it deals half that damage, rounded down, to that creature or player instead. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GhostsOfTheInnocentPreventDamageEffect())); - } - - public GhostsOfTheInnocent(final GhostsOfTheInnocent card) { - super(card); - } - - @Override - public GhostsOfTheInnocent copy() { - return new GhostsOfTheInnocent(this); - } -} - -class GhostsOfTheInnocentPreventDamageEffect extends ReplacementEffectImpl implements PreventionEffect { - - public GhostsOfTheInnocentPreventDamageEffect() { - super(Duration.WhileOnBattlefield, Outcome.Damage); - staticText = "If a source would deal damage to a creature or player, it deals half that damage, rounded down, to that creature or player instead"; - } - - public GhostsOfTheInnocentPreventDamageEffect(final GhostsOfTheInnocentPreventDamageEffect effect) { - super(effect); - } - - @Override - public GhostsOfTheInnocentPreventDamageEffect copy() { - return new GhostsOfTheInnocentPreventDamageEffect(this); - } - - @Override - public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == EventType.DAMAGE_CREATURE - || event.getType() == EventType.DAMAGE_PLAYER; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - return true; - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } - - @Override - public boolean replaceEvent(GameEvent event, Ability source, Game game) { - int amount = (int) Math.ceil(event.getAmount() / 2.0); - GameEvent preventEvent = new GameEvent(GameEvent.EventType.PREVENT_DAMAGE, event.getTargetId(), source.getSourceId(), source.getControllerId(), amount, false); - if (!game.replaceEvent(preventEvent)) { - event.setAmount(event.getAmount() - amount); - game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, event.getTargetId(), source.getSourceId(), source.getControllerId(), amount)); - } - return false; - } -} +/* + * 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.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.PreventionEffect; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author LevelX2 + */ +public class GhostsOfTheInnocent extends CardImpl { + + public GhostsOfTheInnocent(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}{W}"); + + this.subtype.add(SubType.SPIRIT); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // If a source would deal damage to a creature or player, it deals half that damage, rounded down, to that creature or player instead. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GhostsOfTheInnocentPreventDamageEffect())); + } + + public GhostsOfTheInnocent(final GhostsOfTheInnocent card) { + super(card); + } + + @Override + public GhostsOfTheInnocent copy() { + return new GhostsOfTheInnocent(this); + } +} + +class GhostsOfTheInnocentPreventDamageEffect extends ReplacementEffectImpl implements PreventionEffect { + + public GhostsOfTheInnocentPreventDamageEffect() { + super(Duration.WhileOnBattlefield, Outcome.Damage); + staticText = "If a source would deal damage to a creature or player, it deals half that damage, rounded down, to that creature or player instead"; + } + + public GhostsOfTheInnocentPreventDamageEffect(final GhostsOfTheInnocentPreventDamageEffect effect) { + super(effect); + } + + @Override + public GhostsOfTheInnocentPreventDamageEffect copy() { + return new GhostsOfTheInnocentPreventDamageEffect(this); + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == EventType.DAMAGE_CREATURE + || event.getType() == EventType.DAMAGE_PLAYER; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + int amount = (int) Math.ceil(event.getAmount() / 2.0); + GameEvent preventEvent = new GameEvent(GameEvent.EventType.PREVENT_DAMAGE, event.getTargetId(), source.getSourceId(), source.getControllerId(), amount, false); + if (!game.replaceEvent(preventEvent)) { + event.setAmount(event.getAmount() - amount); + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, event.getTargetId(), source.getSourceId(), source.getControllerId(), amount)); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/g/GhoulcallerGisa.java b/Mage.Sets/src/mage/cards/g/GhoulcallerGisa.java index 2cdb362ff9..3066f94535 100644 --- a/Mage.Sets/src/mage/cards/g/GhoulcallerGisa.java +++ b/Mage.Sets/src/mage/cards/g/GhoulcallerGisa.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -57,8 +58,8 @@ public class GhoulcallerGisa extends CardImpl { public GhoulcallerGisa(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GhoulcallersAccomplice.java b/Mage.Sets/src/mage/cards/g/GhoulcallersAccomplice.java index 4acbe24e4c..821b0c6f89 100644 --- a/Mage.Sets/src/mage/cards/g/GhoulcallersAccomplice.java +++ b/Mage.Sets/src/mage/cards/g/GhoulcallersAccomplice.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.ZombieToken; @@ -48,8 +49,8 @@ public class GhoulcallersAccomplice extends CardImpl { public GhoulcallersAccomplice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GhoulcallersChant.java b/Mage.Sets/src/mage/cards/g/GhoulcallersChant.java index c15fe75d3a..8246863f23 100644 --- a/Mage.Sets/src/mage/cards/g/GhoulcallersChant.java +++ b/Mage.Sets/src/mage/cards/g/GhoulcallersChant.java @@ -52,8 +52,7 @@ public class GhoulcallersChant extends CardImpl { } public GhoulcallersChant(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{B}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}"); // Choose one - Return target creature card from your graveyard to your hand this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); diff --git a/Mage.Sets/src/mage/cards/g/Ghoulflesh.java b/Mage.Sets/src/mage/cards/g/Ghoulflesh.java index 4ceb506398..37249ac3a8 100644 --- a/Mage.Sets/src/mage/cards/g/Ghoulflesh.java +++ b/Mage.Sets/src/mage/cards/g/Ghoulflesh.java @@ -48,7 +48,7 @@ public class Ghoulflesh extends CardImpl { public Ghoulflesh(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/g/Ghoulraiser.java b/Mage.Sets/src/mage/cards/g/Ghoulraiser.java index 50a64822bd..b23a86e966 100644 --- a/Mage.Sets/src/mage/cards/g/Ghoulraiser.java +++ b/Mage.Sets/src/mage/cards/g/Ghoulraiser.java @@ -53,7 +53,7 @@ public class Ghoulraiser extends CardImpl { public Ghoulraiser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/Ghoulsteed.java b/Mage.Sets/src/mage/cards/g/Ghoulsteed.java index 5ad8389250..16e819fed9 100644 --- a/Mage.Sets/src/mage/cards/g/Ghoulsteed.java +++ b/Mage.Sets/src/mage/cards/g/Ghoulsteed.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.target.common.TargetCardInHand; @@ -49,8 +50,8 @@ public class Ghoulsteed extends CardImpl { public Ghoulsteed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Horse"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HORSE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/Ghoultree.java b/Mage.Sets/src/mage/cards/g/Ghoultree.java index 8a8bc52c3e..e4b7c71c59 100644 --- a/Mage.Sets/src/mage/cards/g/Ghoultree.java +++ b/Mage.Sets/src/mage/cards/g/Ghoultree.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.cost.SourceCostReductionForEachCardInGravey import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -45,8 +46,8 @@ public class Ghoultree extends CardImpl { public Ghoultree(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{7}{G}"); - this.subtype.add("Zombie"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(10); this.toughness = new MageInt(10); diff --git a/Mage.Sets/src/mage/cards/g/GiantAdephage.java b/Mage.Sets/src/mage/cards/g/GiantAdephage.java index 813a91faa2..babd4150a9 100644 --- a/Mage.Sets/src/mage/cards/g/GiantAdephage.java +++ b/Mage.Sets/src/mage/cards/g/GiantAdephage.java @@ -30,11 +30,12 @@ package mage.cards.g; import java.util.UUID; import mage.MageInt; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; -import mage.abilities.effects.PutTokenOntoBattlefieldCopySourceEffect; +import mage.abilities.effects.CreateTokenCopySourceEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class GiantAdephage extends CardImpl { public GiantAdephage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(7); this.toughness = new MageInt(7); @@ -53,7 +54,7 @@ public class GiantAdephage extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // Whenever Giant Adephage deals combat damage to a player, create a token that is a copy of Giant Adephage. - this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new PutTokenOntoBattlefieldCopySourceEffect(), false)); + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new CreateTokenCopySourceEffect(), false)); } diff --git a/Mage.Sets/src/mage/cards/g/GiantAmbushBeetle.java b/Mage.Sets/src/mage/cards/g/GiantAmbushBeetle.java index da264682fa..c3f8059363 100644 --- a/Mage.Sets/src/mage/cards/g/GiantAmbushBeetle.java +++ b/Mage.Sets/src/mage/cards/g/GiantAmbushBeetle.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class GiantAmbushBeetle extends CardImpl { public GiantAmbushBeetle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B/G}{R}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); diff --git a/Mage.Sets/src/mage/cards/g/GiantBadger.java b/Mage.Sets/src/mage/cards/g/GiantBadger.java index 776ad09953..162446aa96 100644 --- a/Mage.Sets/src/mage/cards/g/GiantBadger.java +++ b/Mage.Sets/src/mage/cards/g/GiantBadger.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class GiantBadger extends CardImpl { public GiantBadger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Badger"); + this.subtype.add(SubType.BADGER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GiantCaterpillar.java b/Mage.Sets/src/mage/cards/g/GiantCaterpillar.java index 5ab647da3b..5ffa4bf51d 100644 --- a/Mage.Sets/src/mage/cards/g/GiantCaterpillar.java +++ b/Mage.Sets/src/mage/cards/g/GiantCaterpillar.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.ButterflyToken; @@ -50,7 +51,7 @@ public class GiantCaterpillar extends CardImpl { public GiantCaterpillar(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GiantCockroach.java b/Mage.Sets/src/mage/cards/g/GiantCockroach.java index 6dab2f7c12..3040c6ffb8 100644 --- a/Mage.Sets/src/mage/cards/g/GiantCockroach.java +++ b/Mage.Sets/src/mage/cards/g/GiantCockroach.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class GiantCockroach extends CardImpl { public GiantCockroach(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GiantCrab.java b/Mage.Sets/src/mage/cards/g/GiantCrab.java index f19968bfaf..04aecaa32b 100644 --- a/Mage.Sets/src/mage/cards/g/GiantCrab.java +++ b/Mage.Sets/src/mage/cards/g/GiantCrab.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class GiantCrab extends CardImpl { public GiantCrab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Crab"); + this.subtype.add(SubType.CRAB); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GiantDustwasp.java b/Mage.Sets/src/mage/cards/g/GiantDustwasp.java index e910fff5c1..34bdd2d4b6 100644 --- a/Mage.Sets/src/mage/cards/g/GiantDustwasp.java +++ b/Mage.Sets/src/mage/cards/g/GiantDustwasp.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class GiantDustwasp extends CardImpl { public GiantDustwasp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GiantHarbinger.java b/Mage.Sets/src/mage/cards/g/GiantHarbinger.java index 07ac10808e..3986903a28 100644 --- a/Mage.Sets/src/mage/cards/g/GiantHarbinger.java +++ b/Mage.Sets/src/mage/cards/g/GiantHarbinger.java @@ -52,8 +52,8 @@ public class GiantHarbinger extends CardImpl { public GiantHarbinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GiantMantis.java b/Mage.Sets/src/mage/cards/g/GiantMantis.java index b385239367..c03174c64c 100644 --- a/Mage.Sets/src/mage/cards/g/GiantMantis.java +++ b/Mage.Sets/src/mage/cards/g/GiantMantis.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class GiantMantis extends CardImpl { public GiantMantis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GiantOctopus.java b/Mage.Sets/src/mage/cards/g/GiantOctopus.java index e6b7fcd1f0..88a8507d73 100644 --- a/Mage.Sets/src/mage/cards/g/GiantOctopus.java +++ b/Mage.Sets/src/mage/cards/g/GiantOctopus.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class GiantOctopus extends CardImpl { public GiantOctopus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Octopus"); + this.subtype.add(SubType.OCTOPUS); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GiantScorpion.java b/Mage.Sets/src/mage/cards/g/GiantScorpion.java index e1afef6175..75bc631b7a 100644 --- a/Mage.Sets/src/mage/cards/g/GiantScorpion.java +++ b/Mage.Sets/src/mage/cards/g/GiantScorpion.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class GiantScorpion extends CardImpl { public GiantScorpion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Scorpion"); + this.subtype.add(SubType.SCORPION); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GiantSolifuge.java b/Mage.Sets/src/mage/cards/g/GiantSolifuge.java index fb981fb396..46894e8927 100644 --- a/Mage.Sets/src/mage/cards/g/GiantSolifuge.java +++ b/Mage.Sets/src/mage/cards/g/GiantSolifuge.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class GiantSolifuge extends CardImpl { public GiantSolifuge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R/G}{R/G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GiantSpectacle.java b/Mage.Sets/src/mage/cards/g/GiantSpectacle.java index 36206726f7..230a5d5b69 100644 --- a/Mage.Sets/src/mage/cards/g/GiantSpectacle.java +++ b/Mage.Sets/src/mage/cards/g/GiantSpectacle.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -53,7 +54,7 @@ public class GiantSpectacle extends CardImpl { public GiantSpectacle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant Creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GiantSpider.java b/Mage.Sets/src/mage/cards/g/GiantSpider.java index 1195f8275b..2c396cf37e 100644 --- a/Mage.Sets/src/mage/cards/g/GiantSpider.java +++ b/Mage.Sets/src/mage/cards/g/GiantSpider.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class GiantSpider extends CardImpl { public GiantSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GiantStrength.java b/Mage.Sets/src/mage/cards/g/GiantStrength.java index 7f7e0e37e1..5ff6a3f65e 100644 --- a/Mage.Sets/src/mage/cards/g/GiantStrength.java +++ b/Mage.Sets/src/mage/cards/g/GiantStrength.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class GiantStrength extends CardImpl { public GiantStrength(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GiantTortoise.java b/Mage.Sets/src/mage/cards/g/GiantTortoise.java index 88b3d5bffc..202a639fce 100644 --- a/Mage.Sets/src/mage/cards/g/GiantTortoise.java +++ b/Mage.Sets/src/mage/cards/g/GiantTortoise.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class GiantTortoise extends CardImpl { public GiantTortoise(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Turtle"); + this.subtype.add(SubType.TURTLE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GiantTrapDoorSpider.java b/Mage.Sets/src/mage/cards/g/GiantTrapDoorSpider.java index 4c89ccb329..6c0ed14e87 100644 --- a/Mage.Sets/src/mage/cards/g/GiantTrapDoorSpider.java +++ b/Mage.Sets/src/mage/cards/g/GiantTrapDoorSpider.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterAttackingCreature; import mage.filter.predicate.Predicates; @@ -63,7 +64,7 @@ public class GiantTrapDoorSpider extends CardImpl { public GiantTrapDoorSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GiantTurtle.java b/Mage.Sets/src/mage/cards/g/GiantTurtle.java new file mode 100644 index 0000000000..350400ee20 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GiantTurtle.java @@ -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.cards.g; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import mage.MageInt; +import mage.MageObjectReference; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.RestrictionEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.WatcherScope; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.watchers.Watcher; + +/** + * + * @author TheElk801 + */ +public class GiantTurtle extends CardImpl { + + public GiantTurtle(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + + this.subtype.add(SubType.TURTLE); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Giant Turtle can't attack if it attacked during your last turn. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GiantTurtleCantAttackEffect()), new GiantTurtleWatcher()); + } + + public GiantTurtle(final GiantTurtle card) { + super(card); + } + + @Override + public GiantTurtle copy() { + return new GiantTurtle(this); + } +} + +class GiantTurtleCantAttackEffect extends RestrictionEffect { + + public GiantTurtleCantAttackEffect() { + super(Duration.WhileOnBattlefield); + staticText = "{this} can't attack if it attacked during your last turn"; + } + + public GiantTurtleCantAttackEffect(final GiantTurtleCantAttackEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return permanent.getId().equals(source.getSourceId()); + } + + @Override + public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) { + GiantTurtleWatcher watcher = (GiantTurtleWatcher) game.getState().getWatchers().get(GiantTurtleWatcher.class.getSimpleName()); + for (MageObjectReference mor : watcher.getAttackedLastTurnCreatures()) { + if (attacker.equals(mor.getPermanent(game)) && attacker.getZoneChangeCounter(game) == mor.getZoneChangeCounter()) { + return false; + } + } + return false; + } + + @Override + public GiantTurtleCantAttackEffect copy() { + return new GiantTurtleCantAttackEffect(this); + } + +} + +class GiantTurtleWatcher extends Watcher { + + public final Set attackedLastTurnCreatures = new HashSet<>(); + + public GiantTurtleWatcher() { + super(GiantTurtleWatcher.class.getSimpleName(), WatcherScope.GAME); + } + + public GiantTurtleWatcher(final GiantTurtleWatcher watcher) { + super(watcher); + this.attackedLastTurnCreatures.addAll(watcher.attackedLastTurnCreatures); + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.ATTACKER_DECLARED) { + this.attackedLastTurnCreatures.add(new MageObjectReference(event.getSourceId(), game)); + } + if (event.getType() == GameEvent.EventType.BEGINNING_PHASE_PRE) { + this.attackedLastTurnCreatures.clear(); + } + } + + public Set getAttackedLastTurnCreatures() { + return this.attackedLastTurnCreatures; + } + + @Override + public GiantTurtleWatcher copy() { + return new GiantTurtleWatcher(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GiantWarthog.java b/Mage.Sets/src/mage/cards/g/GiantWarthog.java index f404224fdc..2c31e63e11 100644 --- a/Mage.Sets/src/mage/cards/g/GiantWarthog.java +++ b/Mage.Sets/src/mage/cards/g/GiantWarthog.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class GiantWarthog extends CardImpl { public GiantWarthog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Boar"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BOAR); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GiantsIre.java b/Mage.Sets/src/mage/cards/g/GiantsIre.java index de706f871d..58f170e401 100644 --- a/Mage.Sets/src/mage/cards/g/GiantsIre.java +++ b/Mage.Sets/src/mage/cards/g/GiantsIre.java @@ -54,7 +54,7 @@ public class GiantsIre extends CardImpl { public GiantsIre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.SORCERY},"{3}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); // Giant's Ire deals 4 damage to target player. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); diff --git a/Mage.Sets/src/mage/cards/g/GibberingFiend.java b/Mage.Sets/src/mage/cards/g/GibberingFiend.java index 1cc08becfc..d6e3400efa 100644 --- a/Mage.Sets/src/mage/cards/g/GibberingFiend.java +++ b/Mage.Sets/src/mage/cards/g/GibberingFiend.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class GibberingFiend extends CardImpl { public GibberingFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GibberingHyenas.java b/Mage.Sets/src/mage/cards/g/GibberingHyenas.java new file mode 100644 index 0000000000..390a1559c8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GibberingHyenas.java @@ -0,0 +1,74 @@ +/* + * 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.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.combat.CantBlockCreaturesSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author TheElk801 + */ +public class GibberingHyenas extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("black creatures"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public GibberingHyenas(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.HYENA); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Gibbering Hyenas can't block black creatures. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockCreaturesSourceEffect(filter))); + } + + public GibberingHyenas(final GibberingHyenas card) { + super(card); + } + + @Override + public GibberingHyenas copy() { + return new GibberingHyenas(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GibberingKami.java b/Mage.Sets/src/mage/cards/g/GibberingKami.java index ae94f9eb8b..fb1c21e0fa 100644 --- a/Mage.Sets/src/mage/cards/g/GibberingKami.java +++ b/Mage.Sets/src/mage/cards/g/GibberingKami.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -43,7 +44,7 @@ public class GibberingKami extends CardImpl { public GibberingKami(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GideonAllyOfZendikar.java b/Mage.Sets/src/mage/cards/g/GideonAllyOfZendikar.java index 67e84f3345..4fe5badfd8 100644 --- a/Mage.Sets/src/mage/cards/g/GideonAllyOfZendikar.java +++ b/Mage.Sets/src/mage/cards/g/GideonAllyOfZendikar.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.game.command.emblems.GideonAllyOfZendikarEmblem; @@ -55,7 +56,7 @@ public class GideonAllyOfZendikar extends CardImpl { public GideonAllyOfZendikar(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{W}{W}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Gideon"); + this.subtype.add(SubType.GIDEON); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); @@ -88,9 +89,9 @@ class GideonAllyOfZendikarToken extends Token { public GideonAllyOfZendikarToken() { super("", "5/5 Human Soldier Ally creature with indestructible"); cardType.add(CardType.CREATURE); - subtype.add("Human"); - subtype.add("Soldier"); - subtype.add("Ally"); + subtype.add(SubType.HUMAN); + subtype.add(SubType.SOLDIER); + subtype.add(SubType.ALLY); power = new MageInt(5); toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GideonBattleForged.java b/Mage.Sets/src/mage/cards/g/GideonBattleForged.java index 3711c14cc4..e048e7dcea 100644 --- a/Mage.Sets/src/mage/cards/g/GideonBattleForged.java +++ b/Mage.Sets/src/mage/cards/g/GideonBattleForged.java @@ -43,6 +43,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.TargetController; @@ -69,7 +70,7 @@ public class GideonBattleForged extends CardImpl { public GideonBattleForged(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},""); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Gideon"); + this.subtype.add(SubType.GIDEON); this.color.setWhite(true); @@ -117,8 +118,8 @@ class GideonBattleForgedToken extends Token { public GideonBattleForgedToken() { super("", "4/4 Human Soldier creature with indestructible"); cardType.add(CardType.CREATURE); - subtype.add("Human"); - subtype.add("Soldier"); + subtype.add(SubType.HUMAN); + subtype.add(SubType.SOLDIER); power = new MageInt(4); toughness = new MageInt(4); this.addAbility(IndestructibleAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/g/GideonChampionOfJustice.java b/Mage.Sets/src/mage/cards/g/GideonChampionOfJustice.java index 2abb462a8f..f6f82329c6 100644 --- a/Mage.Sets/src/mage/cards/g/GideonChampionOfJustice.java +++ b/Mage.Sets/src/mage/cards/g/GideonChampionOfJustice.java @@ -43,6 +43,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SuperType; @@ -62,7 +63,7 @@ public class GideonChampionOfJustice extends CardImpl { public GideonChampionOfJustice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{2}{W}{W}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Gideon"); + this.subtype.add(SubType.GIDEON); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); @@ -126,8 +127,8 @@ class GideonChampionOfJusticeToken extends Token { public GideonChampionOfJusticeToken() { super("", "indestructible Human Soldier creature with power and toughness each equal to the number of loyalty counters on him"); cardType.add(CardType.CREATURE); - subtype.add("Human"); - subtype.add("Soldier"); + subtype.add(SubType.HUMAN); + subtype.add(SubType.SOLDIER); power = new MageInt(0); toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/g/GideonJura.java b/Mage.Sets/src/mage/cards/g/GideonJura.java index ff378a6369..8ec7dc0816 100644 --- a/Mage.Sets/src/mage/cards/g/GideonJura.java +++ b/Mage.Sets/src/mage/cards/g/GideonJura.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.TurnPhase; @@ -67,7 +68,7 @@ public class GideonJura extends CardImpl { public GideonJura(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{3}{W}{W}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Gideon"); + this.subtype.add(SubType.GIDEON); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(6)); @@ -105,8 +106,8 @@ class GideonJuraToken extends Token { public GideonJuraToken() { super("", "6/6 Human Soldier creature"); cardType.add(CardType.CREATURE); - subtype.add("Human"); - subtype.add("Soldier"); + subtype.add(SubType.HUMAN); + subtype.add(SubType.SOLDIER); power = new MageInt(6); toughness = new MageInt(6); } diff --git a/Mage.Sets/src/mage/cards/g/GideonMartialParagon.java b/Mage.Sets/src/mage/cards/g/GideonMartialParagon.java index 25089ecc1b..7610b63e3d 100644 --- a/Mage.Sets/src/mage/cards/g/GideonMartialParagon.java +++ b/Mage.Sets/src/mage/cards/g/GideonMartialParagon.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.filter.common.FilterControlledCreaturePermanent; @@ -57,7 +58,7 @@ public class GideonMartialParagon extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{W}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Gideon"); + this.subtype.add(SubType.GIDEON); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); @@ -99,8 +100,8 @@ class GideonMartialParagonToken extends Token { public GideonMartialParagonToken() { super("", "5/5 Human Soldier creature with indestructible"); cardType.add(CardType.CREATURE); - subtype.add("Human"); - subtype.add("Soldier"); + subtype.add(SubType.HUMAN); + subtype.add(SubType.SOLDIER); power = new MageInt(5); toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GideonOfTheTrials.java b/Mage.Sets/src/mage/cards/g/GideonOfTheTrials.java index 6b9dceb0f9..ef7693fd51 100644 --- a/Mage.Sets/src/mage/cards/g/GideonOfTheTrials.java +++ b/Mage.Sets/src/mage/cards/g/GideonOfTheTrials.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.game.command.emblems.GideonOfTheTrialsEmblem; @@ -55,7 +56,7 @@ public class GideonOfTheTrials extends CardImpl { public GideonOfTheTrials(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{1}{W}{W}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Gideon"); + this.subtype.add(SubType.GIDEON); //Starting Loyalty: 3 this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); @@ -94,8 +95,8 @@ class GideonOfTheTrialsToken extends Token { public GideonOfTheTrialsToken() { super("", "a 4/4 Human Soldier creature with indestructible"); cardType.add(CardType.CREATURE); - subtype.add("Human"); - subtype.add("Soldier"); + subtype.add(SubType.HUMAN); + subtype.add(SubType.SOLDIER); power = new MageInt(4); toughness = new MageInt(4); this.addAbility(IndestructibleAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/g/GideonsAvenger.java b/Mage.Sets/src/mage/cards/g/GideonsAvenger.java index dff270cbac..ce962af5f2 100644 --- a/Mage.Sets/src/mage/cards/g/GideonsAvenger.java +++ b/Mage.Sets/src/mage/cards/g/GideonsAvenger.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -53,8 +54,8 @@ public class GideonsAvenger extends CardImpl { public GideonsAvenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GideonsLawkeeper.java b/Mage.Sets/src/mage/cards/g/GideonsLawkeeper.java index 79830b448c..f14d27e175 100644 --- a/Mage.Sets/src/mage/cards/g/GideonsLawkeeper.java +++ b/Mage.Sets/src/mage/cards/g/GideonsLawkeeper.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class GideonsLawkeeper extends CardImpl { public GideonsLawkeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GiftOfGranite.java b/Mage.Sets/src/mage/cards/g/GiftOfGranite.java new file mode 100644 index 0000000000..66eac0333c --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GiftOfGranite.java @@ -0,0 +1,80 @@ +/* + * 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.cards.g; + +import java.util.UUID; +import mage.constants.SubType; +import mage.abilities.keyword.FlashAbility; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class GiftOfGranite extends CardImpl { + + public GiftOfGranite(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}"); + + this.subtype.add(SubType.AURA); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +0/+2. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 2, Duration.WhileOnBattlefield))); + } + + public GiftOfGranite(final GiftOfGranite card) { + super(card); + } + + @Override + public GiftOfGranite copy() { + return new GiftOfGranite(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GiftOfImmortality.java b/Mage.Sets/src/mage/cards/g/GiftOfImmortality.java index 2722cd935a..3360917aea 100644 --- a/Mage.Sets/src/mage/cards/g/GiftOfImmortality.java +++ b/Mage.Sets/src/mage/cards/g/GiftOfImmortality.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class GiftOfImmortality extends CardImpl { public GiftOfImmortality(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GiftOfOrzhova.java b/Mage.Sets/src/mage/cards/g/GiftOfOrzhova.java index 5255bae6d2..8348ffbe96 100644 --- a/Mage.Sets/src/mage/cards/g/GiftOfOrzhova.java +++ b/Mage.Sets/src/mage/cards/g/GiftOfOrzhova.java @@ -51,7 +51,7 @@ public class GiftOfOrzhova extends CardImpl { public GiftOfOrzhova(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W/B}{W/B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GiftOfParadise.java b/Mage.Sets/src/mage/cards/g/GiftOfParadise.java index e40d070e69..db024014da 100644 --- a/Mage.Sets/src/mage/cards/g/GiftOfParadise.java +++ b/Mage.Sets/src/mage/cards/g/GiftOfParadise.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -57,7 +58,7 @@ public class GiftOfParadise extends CardImpl { public GiftOfParadise(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GiftOfTheDeity.java b/Mage.Sets/src/mage/cards/g/GiftOfTheDeity.java index c5d608304b..331ea077c9 100644 --- a/Mage.Sets/src/mage/cards/g/GiftOfTheDeity.java +++ b/Mage.Sets/src/mage/cards/g/GiftOfTheDeity.java @@ -45,6 +45,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -58,7 +59,7 @@ public class GiftOfTheDeity extends CardImpl { public GiftOfTheDeity(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{B/G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/g/GiftedAetherborn.java b/Mage.Sets/src/mage/cards/g/GiftedAetherborn.java index 0f4f5caa1e..6bea148e69 100644 --- a/Mage.Sets/src/mage/cards/g/GiftedAetherborn.java +++ b/Mage.Sets/src/mage/cards/g/GiftedAetherborn.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class GiftedAetherborn extends CardImpl { public GiftedAetherborn(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{B}"); - this.subtype.add("Aetherborn"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.AETHERBORN); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GiftedInitiate.java b/Mage.Sets/src/mage/cards/g/GiftedInitiate.java index 67542f2778..87d77c133f 100644 --- a/Mage.Sets/src/mage/cards/g/GiftedInitiate.java +++ b/Mage.Sets/src/mage/cards/g/GiftedInitiate.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MeditateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -48,8 +49,8 @@ public class GiftedInitiate extends CardImpl { public GiftedInitiate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Jedi"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.JEDI); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/Gigantiform.java b/Mage.Sets/src/mage/cards/g/Gigantiform.java index 014304dd3a..a10b190a98 100644 --- a/Mage.Sets/src/mage/cards/g/Gigantiform.java +++ b/Mage.Sets/src/mage/cards/g/Gigantiform.java @@ -61,7 +61,7 @@ public class Gigantiform extends CardImpl { public Gigantiform(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{G}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Kicker {4} this.addAbility(new KickerAbility("{4}")); diff --git a/Mage.Sets/src/mage/cards/g/Gigantomancer.java b/Mage.Sets/src/mage/cards/g/Gigantomancer.java index b6b2db03b9..5b03b50d5e 100644 --- a/Mage.Sets/src/mage/cards/g/Gigantomancer.java +++ b/Mage.Sets/src/mage/cards/g/Gigantomancer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -49,8 +50,8 @@ public class Gigantomancer extends CardImpl { public Gigantomancer (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{7}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/Gigantoplasm.java b/Mage.Sets/src/mage/cards/g/Gigantoplasm.java index 88b0490353..e3f8abbf7d 100644 --- a/Mage.Sets/src/mage/cards/g/Gigantoplasm.java +++ b/Mage.Sets/src/mage/cards/g/Gigantoplasm.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SubLayer; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class Gigantoplasm extends CardImpl { public Gigantoplasm(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/g/Gigapede.java b/Mage.Sets/src/mage/cards/g/Gigapede.java index 3d9c841cbb..9d28424544 100644 --- a/Mage.Sets/src/mage/cards/g/Gigapede.java +++ b/Mage.Sets/src/mage/cards/g/Gigapede.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.game.Game; @@ -50,7 +51,7 @@ public class Gigapede extends CardImpl { public Gigapede(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(6); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GildedCerodon.java b/Mage.Sets/src/mage/cards/g/GildedCerodon.java index b38438b6cc..99a4a87382 100644 --- a/Mage.Sets/src/mage/cards/g/GildedCerodon.java +++ b/Mage.Sets/src/mage/cards/g/GildedCerodon.java @@ -1,108 +1,108 @@ -/* - * 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.cards.g; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.AttacksTriggeredAbility; -import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.common.combat.CantBlockTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.filter.FilterCard; -import mage.filter.FilterPermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.Game; -import mage.players.Player; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author jeffwadsworth - */ -public class GildedCerodon extends CardImpl { - - private static final String rule = "Whenever {this} attacks, if you control a Desert or there is a Desert card in your graveyard, target creature can't block this turn."; - - public GildedCerodon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); - - this.subtype.add("Beast"); - - this.power = new MageInt(4); - this.toughness = new MageInt(4); - - // Whenever Gilded Cerodon attacks, if you control a Desert or there is a Desert card in your graveyard, target creature can't block this turn. - Ability ability = new ConditionalTriggeredAbility(new AttacksTriggeredAbility(new CantBlockTargetEffect(Duration.EndOfTurn), false), new GildedCerodonCondition(), rule); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability); - - } - - public GildedCerodon(final GildedCerodon card) { - super(card); - } - - @Override - public GildedCerodon copy() { - return new GildedCerodon(this); - } -} - -class GildedCerodonCondition implements Condition { - - private static final FilterPermanent filter = new FilterPermanent(); - private static final FilterCard filter2 = new FilterCard(); - - static { - filter.add(new SubtypePredicate(SubType.DESERT)); - filter2.add(new SubtypePredicate(SubType.DESERT)); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null - && !game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game).isEmpty() - || controller.getGraveyard().count(filter2, game) > 0) { - return true; - } - return false; - } - - @Override - public String toString() { - return "if you control a Desert or there is a Desert card in your graveyard"; - } - -} +/* + * 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.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.combat.CantBlockTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author jeffwadsworth + */ +public class GildedCerodon extends CardImpl { + + private static final String rule = "Whenever {this} attacks, if you control a Desert or there is a Desert card in your graveyard, target creature can't block this turn."; + + public GildedCerodon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); + + this.subtype.add(SubType.BEAST); + + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Whenever Gilded Cerodon attacks, if you control a Desert or there is a Desert card in your graveyard, target creature can't block this turn. + Ability ability = new ConditionalTriggeredAbility(new AttacksTriggeredAbility(new CantBlockTargetEffect(Duration.EndOfTurn), false), new GildedCerodonCondition(), rule); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + } + + public GildedCerodon(final GildedCerodon card) { + super(card); + } + + @Override + public GildedCerodon copy() { + return new GildedCerodon(this); + } +} + +class GildedCerodonCondition implements Condition { + + private static final FilterPermanent filter = new FilterPermanent(); + private static final FilterCard filter2 = new FilterCard(); + + static { + filter.add(new SubtypePredicate(SubType.DESERT)); + filter2.add(new SubtypePredicate(SubType.DESERT)); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null + && !game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game).isEmpty() + || controller.getGraveyard().count(filter2, game) > 0) { + return true; + } + return false; + } + + @Override + public String toString() { + return "if you control a Desert or there is a Desert card in your graveyard"; + } + +} diff --git a/Mage.Sets/src/mage/cards/g/GildedDrake.java b/Mage.Sets/src/mage/cards/g/GildedDrake.java index be6951537f..cace6876be 100644 --- a/Mage.Sets/src/mage/cards/g/GildedDrake.java +++ b/Mage.Sets/src/mage/cards/g/GildedDrake.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -62,7 +63,7 @@ public class GildedDrake extends CardImpl { public GildedDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GildedSentinel.java b/Mage.Sets/src/mage/cards/g/GildedSentinel.java new file mode 100644 index 0000000000..1175fab4a7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GildedSentinel.java @@ -0,0 +1,60 @@ +/* + * 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.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class GildedSentinel extends CardImpl { + + public GildedSentinel(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + + this.subtype.add(SubType.GOLEM); + + this.power = new MageInt(3); + this.toughness = new MageInt(3); + } + + public GildedSentinel(final GildedSentinel card) { + super(card); + } + + @Override + public GildedSentinel copy() { + return new GildedSentinel(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GilderBairn.java b/Mage.Sets/src/mage/cards/g/GilderBairn.java index bab59c1fbd..1ce8089546 100644 --- a/Mage.Sets/src/mage/cards/g/GilderBairn.java +++ b/Mage.Sets/src/mage/cards/g/GilderBairn.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.Counter; @@ -51,8 +52,8 @@ import mage.target.TargetPermanent; public class GilderBairn extends CardImpl { public GilderBairn(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G/U}{G/U}"); - this.subtype.add("Ouphe"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G/U}{G/U}"); + this.subtype.add(SubType.OUPHE); this.power = new MageInt(1); this.toughness = new MageInt(3); @@ -79,7 +80,7 @@ class GilderBairnEffect extends OneShotEffect { public GilderBairnEffect() { super(Outcome.Benefit); - this.staticText = "For each counter on target permanent, put another of those counters on that permanent"; + this.staticText = "Double the number of each kind of counter on target permanent"; } public GilderBairnEffect(final GilderBairnEffect effect) { diff --git a/Mage.Sets/src/mage/cards/g/GiltLeafAmbush.java b/Mage.Sets/src/mage/cards/g/GiltLeafAmbush.java index dcd2788c70..bf3a92b7ba 100644 --- a/Mage.Sets/src/mage/cards/g/GiltLeafAmbush.java +++ b/Mage.Sets/src/mage/cards/g/GiltLeafAmbush.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.game.Game; @@ -54,7 +55,7 @@ public class GiltLeafAmbush extends CardImpl { public GiltLeafAmbush(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{2}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); // Create two 1/1 green Elf Warrior creature tokens into play. Clash with an opponent. If you win, those creatures gain deathtouch until end of turn this.getSpellAbility().addEffect(new GiltLeafAmbushCreateTokenEffect()); diff --git a/Mage.Sets/src/mage/cards/g/GiltLeafArchdruid.java b/Mage.Sets/src/mage/cards/g/GiltLeafArchdruid.java index 3eeed9d14d..ac375927a7 100644 --- a/Mage.Sets/src/mage/cards/g/GiltLeafArchdruid.java +++ b/Mage.Sets/src/mage/cards/g/GiltLeafArchdruid.java @@ -63,8 +63,8 @@ public class GiltLeafArchdruid extends CardImpl { public GiltLeafArchdruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GiltLeafSeer.java b/Mage.Sets/src/mage/cards/g/GiltLeafSeer.java index 97859cbe0d..40e51be847 100644 --- a/Mage.Sets/src/mage/cards/g/GiltLeafSeer.java +++ b/Mage.Sets/src/mage/cards/g/GiltLeafSeer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.LookLibraryControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class GiltLeafSeer extends CardImpl { public GiltLeafSeer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GiltLeafWinnower.java b/Mage.Sets/src/mage/cards/g/GiltLeafWinnower.java index 01cb0d6053..ccd3ff2cba 100644 --- a/Mage.Sets/src/mage/cards/g/GiltLeafWinnower.java +++ b/Mage.Sets/src/mage/cards/g/GiltLeafWinnower.java @@ -60,8 +60,8 @@ public class GiltLeafWinnower extends CardImpl { public GiltLeafWinnower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GiltspireAvenger.java b/Mage.Sets/src/mage/cards/g/GiltspireAvenger.java index dbd2dc9637..06bfe35979 100644 --- a/Mage.Sets/src/mage/cards/g/GiltspireAvenger.java +++ b/Mage.Sets/src/mage/cards/g/GiltspireAvenger.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.ExaltedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.game.Game; @@ -54,8 +55,8 @@ public class GiltspireAvenger extends CardImpl { public GiltspireAvenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{W}{U}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GisaAndGeralf.java b/Mage.Sets/src/mage/cards/g/GisaAndGeralf.java index 1aec0799de..99b0dca375 100644 --- a/Mage.Sets/src/mage/cards/g/GisaAndGeralf.java +++ b/Mage.Sets/src/mage/cards/g/GisaAndGeralf.java @@ -59,8 +59,8 @@ public class GisaAndGeralf extends CardImpl { public GisaAndGeralf(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GiselaBladeOfGoldnight.java b/Mage.Sets/src/mage/cards/g/GiselaBladeOfGoldnight.java index c8882e07bb..7556ea36de 100644 --- a/Mage.Sets/src/mage/cards/g/GiselaBladeOfGoldnight.java +++ b/Mage.Sets/src/mage/cards/g/GiselaBladeOfGoldnight.java @@ -50,7 +50,7 @@ public class GiselaBladeOfGoldnight extends CardImpl { public GiselaBladeOfGoldnight(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GiselaTheBrokenBlade.java b/Mage.Sets/src/mage/cards/g/GiselaTheBrokenBlade.java index 529a1016dc..07e7a25f33 100644 --- a/Mage.Sets/src/mage/cards/g/GiselaTheBrokenBlade.java +++ b/Mage.Sets/src/mage/cards/g/GiselaTheBrokenBlade.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.b.BriselaVoiceOfNightmares; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Rarity; import mage.constants.SuperType; import mage.constants.TargetController; @@ -53,8 +54,8 @@ public class GiselaTheBrokenBlade extends CardImpl { public GiselaTheBrokenBlade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Angel"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ANGEL); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GishathSunsAvatar.java b/Mage.Sets/src/mage/cards/g/GishathSunsAvatar.java new file mode 100644 index 0000000000..8fbb575e14 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GishathSunsAvatar.java @@ -0,0 +1,149 @@ +/* + * 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.cards.g; + +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; + +/** + * + * @author TheElk801 + */ +public class GishathSunsAvatar extends CardImpl { + + public GishathSunsAvatar(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}{G}{W}"); + + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.DINOSAUR); + this.subtype.add(SubType.AVATAR); + this.power = new MageInt(7); + this.toughness = new MageInt(6); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // Whenever Gishath, Sun's Avatar deals combat damage to a player, reveal that many cards from the top of your library. Put any number of Dinosaur creature cards from among them onto the battlefield and the rest on the bottom of your library in a random order. + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new GishathSunsAvatarEffect(), false, true)); + } + + public GishathSunsAvatar(final GishathSunsAvatar card) { + super(card); + } + + @Override + public GishathSunsAvatar copy() { + return new GishathSunsAvatar(this); + } +} + +class GishathSunsAvatarEffect extends OneShotEffect { + + private static final FilterCreatureCard filter = new FilterCreatureCard("Dinosaur creature cards"); + + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + } + + GishathSunsAvatarEffect() { + super(Outcome.Benefit); + this.staticText = "reveal that many cards from the top of your library. Put any number of Dinosaur creature cards from among them onto the battlefield and the rest on the bottom of your library in a random order"; + } + + GishathSunsAvatarEffect(final GishathSunsAvatarEffect effect) { + super(effect); + } + + @Override + public GishathSunsAvatarEffect copy() { + return new GishathSunsAvatarEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (controller == null || sourceObject == null) { + return false; + } + Cards cards = new CardsImpl(); + int xValue = (Integer) getValue("damage"); + int numberCards = Math.min(controller.getLibrary().size(), xValue); + for (int i = 0; i < numberCards; i++) { + Card card = controller.getLibrary().removeFromTop(game); + cards.add(card); + } + if (!cards.isEmpty()) { + controller.revealCards(sourceObject.getIdName(), cards, game); + TargetCard target1 = new TargetCard(0, Integer.MAX_VALUE, Zone.LIBRARY, filter); + target1.setRequired(false); + controller.choose(Outcome.PutCardInPlay, cards, target1, game); + Set toBattlefield = new LinkedHashSet<>(); + for (UUID cardId : target1.getTargets()) { + Card card = cards.get(cardId, game); + if (card != null) { + cards.remove(card); + toBattlefield.add(card); + } + } + controller.moveCards(toBattlefield, Zone.BATTLEFIELD, source, game, false, false, false, null); + controller.putCardsOnBottomOfLibrary(cards, game, source, false); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/g/GlacialCrasher.java b/Mage.Sets/src/mage/cards/g/GlacialCrasher.java index 2f810560e4..db8f858d5a 100644 --- a/Mage.Sets/src/mage/cards/g/GlacialCrasher.java +++ b/Mage.Sets/src/mage/cards/g/GlacialCrasher.java @@ -52,7 +52,7 @@ public class GlacialCrasher extends CardImpl { public GlacialCrasher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GlacialFortress.java b/Mage.Sets/src/mage/cards/g/GlacialFortress.java index 10cd5ec9de..0090555fb2 100644 --- a/Mage.Sets/src/mage/cards/g/GlacialFortress.java +++ b/Mage.Sets/src/mage/cards/g/GlacialFortress.java @@ -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.cards.g; import mage.abilities.common.EntersBattlefieldAbility; @@ -59,10 +58,10 @@ public class GlacialFortress extends CardImpl { } public GlacialFortress(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); - String abilityText = "tap it unless you control a Plains or an Island"; + String abilityText = " tapped unless you control a Plains or an Island"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlueManaAbility()); this.addAbility(new WhiteManaAbility()); diff --git a/Mage.Sets/src/mage/cards/g/GlacialPlating.java b/Mage.Sets/src/mage/cards/g/GlacialPlating.java new file mode 100644 index 0000000000..7860fbb220 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GlacialPlating.java @@ -0,0 +1,91 @@ +/* + * 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.cards.g; + +import java.util.UUID; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.MultipliedValue; +import mage.abilities.dynamicvalue.common.CountersSourceCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author TheElk801 + */ +public class GlacialPlating extends CardImpl { + + public GlacialPlating(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); + + this.addSuperType(SuperType.SNOW); + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Cumulative upkeep {snow} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{S}"))); + + // Enchanted creature gets +3/+3 for each age counter on Glacial Plating. + DynamicValue boostValue = new MultipliedValue(new CountersSourceCount(CounterType.AGE), 3); + Effect effect = new BoostEnchantedEffect(boostValue, boostValue, Duration.WhileOnBattlefield); + effect.setText("Enchanted creature gets +3/+3 for each age counter on {this}"); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + } + + public GlacialPlating(final GlacialPlating card) { + super(card); + } + + @Override + public GlacialPlating copy() { + return new GlacialPlating(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GlacialStalker.java b/Mage.Sets/src/mage/cards/g/GlacialStalker.java index 94336d1021..72767418e9 100644 --- a/Mage.Sets/src/mage/cards/g/GlacialStalker.java +++ b/Mage.Sets/src/mage/cards/g/GlacialStalker.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class GlacialStalker extends CardImpl { public GlacialStalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GlacialWall.java b/Mage.Sets/src/mage/cards/g/GlacialWall.java index bb26c70ed4..46ad492d7b 100644 --- a/Mage.Sets/src/mage/cards/g/GlacialWall.java +++ b/Mage.Sets/src/mage/cards/g/GlacialWall.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class GlacialWall extends CardImpl { public GlacialWall(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/g/GladeGnarr.java b/Mage.Sets/src/mage/cards/g/GladeGnarr.java index ca91dda24a..a6be035579 100644 --- a/Mage.Sets/src/mage/cards/g/GladeGnarr.java +++ b/Mage.Sets/src/mage/cards/g/GladeGnarr.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -52,7 +53,7 @@ public class GladeGnarr extends CardImpl { public GladeGnarr(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GladeWatcher.java b/Mage.Sets/src/mage/cards/g/GladeWatcher.java index 2657406267..8f44492647 100644 --- a/Mage.Sets/src/mage/cards/g/GladeWatcher.java +++ b/Mage.Sets/src/mage/cards/g/GladeWatcher.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class GladeWatcher extends CardImpl { public GladeWatcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GladecoverScout.java b/Mage.Sets/src/mage/cards/g/GladecoverScout.java index fa3196b5de..566820b190 100644 --- a/Mage.Sets/src/mage/cards/g/GladecoverScout.java +++ b/Mage.Sets/src/mage/cards/g/GladecoverScout.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -42,8 +43,8 @@ public class GladecoverScout extends CardImpl { public GladecoverScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GladehartCavalry.java b/Mage.Sets/src/mage/cards/g/GladehartCavalry.java index 8335c7afea..09a824ac78 100644 --- a/Mage.Sets/src/mage/cards/g/GladehartCavalry.java +++ b/Mage.Sets/src/mage/cards/g/GladehartCavalry.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SupportAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -51,8 +52,8 @@ public class GladehartCavalry extends CardImpl { public GladehartCavalry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/g/GlamerSpinners.java b/Mage.Sets/src/mage/cards/g/GlamerSpinners.java index 3f1f320977..5e11364562 100644 --- a/Mage.Sets/src/mage/cards/g/GlamerSpinners.java +++ b/Mage.Sets/src/mage/cards/g/GlamerSpinners.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; @@ -58,8 +59,8 @@ public class GlamerSpinners extends CardImpl { public GlamerSpinners(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W/U}"); - this.subtype.add("Faerie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/Glarewielder.java b/Mage.Sets/src/mage/cards/g/Glarewielder.java index 6b2098bafa..cedd15b166 100644 --- a/Mage.Sets/src/mage/cards/g/Glarewielder.java +++ b/Mage.Sets/src/mage/cards/g/Glarewielder.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class Glarewielder extends CardImpl { public Glarewielder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GlaringAegis.java b/Mage.Sets/src/mage/cards/g/GlaringAegis.java index 28d8d38a13..70cdb50343 100644 --- a/Mage.Sets/src/mage/cards/g/GlaringAegis.java +++ b/Mage.Sets/src/mage/cards/g/GlaringAegis.java @@ -57,7 +57,7 @@ public class GlaringAegis extends CardImpl { public GlaringAegis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GlassAsp.java b/Mage.Sets/src/mage/cards/g/GlassAsp.java index f25907f7a4..acca910b0e 100644 --- a/Mage.Sets/src/mage/cards/g/GlassAsp.java +++ b/Mage.Sets/src/mage/cards/g/GlassAsp.java @@ -29,13 +29,14 @@ package mage.cards.g; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.UnlessPaysDelayedEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.PhaseStep; /** @@ -45,16 +46,16 @@ import mage.constants.PhaseStep; public class GlassAsp extends CardImpl { public GlassAsp(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Snake"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(2); this.toughness = new MageInt(1); // Whenever Glass Asp deals combat damage to a player, that player loses 2 life at the beginning of his or her next draw step unless he or she pays {2} before that step. - this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new UnlessPaysDelayedEffect( - new ManaCostsImpl("{2}"), new LoseLifeTargetEffect(2), PhaseStep.DRAW, true, - "that player loses 2 life at the beginning of his or her next draw step unless he or she pays {2} before that draw step."), - false, true)); + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new UnlessPaysDelayedEffect( + new ManaCostsImpl("{2}"), new LoseLifeTargetEffect(2), PhaseStep.DRAW, true, + "that player loses 2 life at the beginning of his or her next draw step unless he or she pays {2} before that draw step."), + false, true)); } public GlassAsp(final GlassAsp card) { diff --git a/Mage.Sets/src/mage/cards/g/GlassGolem.java b/Mage.Sets/src/mage/cards/g/GlassGolem.java index 390317805a..83a95ef278 100644 --- a/Mage.Sets/src/mage/cards/g/GlassGolem.java +++ b/Mage.Sets/src/mage/cards/g/GlassGolem.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class GlassGolem extends CardImpl { public GlassGolem (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(6); this.toughness = new MageInt(2); } diff --git a/Mage.Sets/src/mage/cards/g/GlassblowersPuzzleknot.java b/Mage.Sets/src/mage/cards/g/GlassblowersPuzzleknot.java index 89d91a2c03..f0beb42c9a 100644 --- a/Mage.Sets/src/mage/cards/g/GlassblowersPuzzleknot.java +++ b/Mage.Sets/src/mage/cards/g/GlassblowersPuzzleknot.java @@ -1,77 +1,77 @@ -/* - * 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.cards.g; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.SacrificeSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; -import mage.abilities.effects.keyword.ScryEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; - -/** - * - * @author emerald000 - */ -public class GlassblowersPuzzleknot extends CardImpl { - - public GlassblowersPuzzleknot(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - - // When Glassblower's Puzzleknot enters the battlefield, scry 2, then you get {E}{E}. - Effect scryEffect = new ScryEffect(2); - scryEffect.setText("scry 2"); - Ability ability = new EntersBattlefieldTriggeredAbility(scryEffect); - Effect energyEffect = new GetEnergyCountersControllerEffect(2); - energyEffect.setText(", then you get {E}{E}"); - ability.addEffect(energyEffect); - this.addAbility(ability); - - // {2}{U}, Sacrifice Glassblower's Puzzleknot: Scry 2, then you get {E}{E}. - ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, scryEffect, new ManaCostsImpl<>("{2}{U}")); - ability.addCost(new SacrificeSourceCost()); - ability.addEffect(energyEffect); - this.addAbility(ability); - } - - public GlassblowersPuzzleknot(final GlassblowersPuzzleknot card) { - super(card); - } - - @Override - public GlassblowersPuzzleknot copy() { - return new GlassblowersPuzzleknot(this); - } -} +/* + * 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.cards.g; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * + * @author emerald000 + */ +public class GlassblowersPuzzleknot extends CardImpl { + + public GlassblowersPuzzleknot(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + + // When Glassblower's Puzzleknot enters the battlefield, scry 2, then you get {E}{E}. + Effect scryEffect = new ScryEffect(2); + scryEffect.setText("scry 2"); + Ability ability = new EntersBattlefieldTriggeredAbility(scryEffect); + Effect energyEffect = new GetEnergyCountersControllerEffect(2); + energyEffect.setText(", then you get {E}{E}"); + ability.addEffect(energyEffect); + this.addAbility(ability); + + // {2}{U}, Sacrifice Glassblower's Puzzleknot: Scry 2, then you get {E}{E}. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, scryEffect, new ManaCostsImpl<>("{2}{U}")); + ability.addCost(new SacrificeSourceCost()); + ability.addEffect(energyEffect); + this.addAbility(ability); + } + + public GlassblowersPuzzleknot(final GlassblowersPuzzleknot card) { + super(card); + } + + @Override + public GlassblowersPuzzleknot copy() { + return new GlassblowersPuzzleknot(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GlassdustHulk.java b/Mage.Sets/src/mage/cards/g/GlassdustHulk.java index 0236c0e15a..0d9beee325 100644 --- a/Mage.Sets/src/mage/cards/g/GlassdustHulk.java +++ b/Mage.Sets/src/mage/cards/g/GlassdustHulk.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.FilterPermanent; @@ -60,7 +61,7 @@ public class GlassdustHulk extends CardImpl { public GlassdustHulk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{W}{U}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GlazeFiend.java b/Mage.Sets/src/mage/cards/g/GlazeFiend.java index fc7598a6c8..4f5739ef11 100644 --- a/Mage.Sets/src/mage/cards/g/GlazeFiend.java +++ b/Mage.Sets/src/mage/cards/g/GlazeFiend.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.common.FilterArtifactPermanent; @@ -55,7 +56,7 @@ public class GlazeFiend extends CardImpl { public GlazeFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}{B}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GleamOfAuthority.java b/Mage.Sets/src/mage/cards/g/GleamOfAuthority.java index 3aa800f52b..669c69b48f 100644 --- a/Mage.Sets/src/mage/cards/g/GleamOfAuthority.java +++ b/Mage.Sets/src/mage/cards/g/GleamOfAuthority.java @@ -58,8 +58,8 @@ import mage.target.common.TargetCreaturePermanent; public class GleamOfAuthority extends CardImpl { public GleamOfAuthority(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); @@ -67,16 +67,19 @@ public class GleamOfAuthority extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - + // Enchanted creature gets +1/+1 for each +1/+1 counter on other creatures you control DynamicValue amount = new CountersOnControlledCount(); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(amount, amount, Duration.WhileOnBattlefield))); - + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(amount, amount, Duration.WhileOnBattlefield) + .setText("Enchanted creature gets +1/+1 for each +1/+1 counter on other creatures you control.") + )); + // Enchanted creature has vigilance and "{W}, {T}: Bloster 1." - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA))); - ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BolsterEffect(1), new ManaCostsImpl("{W}")); - ability.addCost(new TapSourceCost()); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.AURA))); + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA)); + Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BolsterEffect(1), new ManaCostsImpl("{W}")); + gainedAbility.addCost(new TapSourceCost()); + ability.addEffect(new GainAbilityAttachedEffect(ability, AttachmentType.AURA).setText("and \"{W}, {T}: Bloster 1.\"")); + this.addAbility(ability); } public GleamOfAuthority(final GleamOfAuthority card) { @@ -92,7 +95,7 @@ public class GleamOfAuthority extends CardImpl { class CountersOnControlledCount implements DynamicValue { static FilterCreaturePermanent filter = new FilterCreaturePermanent(); - + public CountersOnControlledCount() { } diff --git a/Mage.Sets/src/mage/cards/g/Gleancrawler.java b/Mage.Sets/src/mage/cards/g/Gleancrawler.java index 17c2ddf205..dee75f9b76 100644 --- a/Mage.Sets/src/mage/cards/g/Gleancrawler.java +++ b/Mage.Sets/src/mage/cards/g/Gleancrawler.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.InfoEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class Gleancrawler extends CardImpl { public Gleancrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B/G}{B/G}{B/G}"); - this.subtype.add("Insect"); - this.subtype.add("Horror"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.HORROR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/g/GlenElendraArchmage.java b/Mage.Sets/src/mage/cards/g/GlenElendraArchmage.java index 5d6161e864..3962d79804 100644 --- a/Mage.Sets/src/mage/cards/g/GlenElendraArchmage.java +++ b/Mage.Sets/src/mage/cards/g/GlenElendraArchmage.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.PersistAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -59,8 +60,8 @@ public class GlenElendraArchmage extends CardImpl { public GlenElendraArchmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GlenElendraLiege.java b/Mage.Sets/src/mage/cards/g/GlenElendraLiege.java index 50f5f868b3..53cbc92863 100644 --- a/Mage.Sets/src/mage/cards/g/GlenElendraLiege.java +++ b/Mage.Sets/src/mage/cards/g/GlenElendraLiege.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -57,8 +58,8 @@ public class GlenElendraLiege extends CardImpl { public GlenElendraLiege(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U/B}{U/B}{U/B}"); - this.subtype.add("Faerie"); - this.subtype.add("Knight"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GlenElendraPranksters.java b/Mage.Sets/src/mage/cards/g/GlenElendraPranksters.java index e7cfdfaa03..3a12d76299 100644 --- a/Mage.Sets/src/mage/cards/g/GlenElendraPranksters.java +++ b/Mage.Sets/src/mage/cards/g/GlenElendraPranksters.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetControlledCreaturePermanent; /** @@ -48,8 +49,8 @@ public class GlenElendraPranksters extends CardImpl { public GlenElendraPranksters(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GlidingLicid.java b/Mage.Sets/src/mage/cards/g/GlidingLicid.java index 0619a12975..e96e59d88c 100644 --- a/Mage.Sets/src/mage/cards/g/GlidingLicid.java +++ b/Mage.Sets/src/mage/cards/g/GlidingLicid.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class GlidingLicid extends CardImpl { public GlidingLicid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Licid"); + this.subtype.add(SubType.LICID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GlimmerdustNap.java b/Mage.Sets/src/mage/cards/g/GlimmerdustNap.java index 0485158d79..80950f0b43 100644 --- a/Mage.Sets/src/mage/cards/g/GlimmerdustNap.java +++ b/Mage.Sets/src/mage/cards/g/GlimmerdustNap.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -56,7 +57,7 @@ public class GlimmerdustNap extends CardImpl { public GlimmerdustNap(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant tapped creature diff --git a/Mage.Sets/src/mage/cards/g/GlimmeringAngel.java b/Mage.Sets/src/mage/cards/g/GlimmeringAngel.java index 56612281bb..d13fcc320d 100644 --- a/Mage.Sets/src/mage/cards/g/GlimmeringAngel.java +++ b/Mage.Sets/src/mage/cards/g/GlimmeringAngel.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class GlimmeringAngel extends CardImpl { public GlimmeringAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GlimmerpointStag.java b/Mage.Sets/src/mage/cards/g/GlimmerpointStag.java index b43a8c46cb..18408fe688 100644 --- a/Mage.Sets/src/mage/cards/g/GlimmerpointStag.java +++ b/Mage.Sets/src/mage/cards/g/GlimmerpointStag.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -63,7 +64,7 @@ public class GlimmerpointStag extends CardImpl { public GlimmerpointStag(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Elk"); + this.subtype.add(SubType.ELK); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GlintEyeNephilim.java b/Mage.Sets/src/mage/cards/g/GlintEyeNephilim.java index 29d9b317ed..532ebb61ad 100644 --- a/Mage.Sets/src/mage/cards/g/GlintEyeNephilim.java +++ b/Mage.Sets/src/mage/cards/g/GlintEyeNephilim.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class GlintEyeNephilim extends CardImpl { public GlintEyeNephilim(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}{R}{G}"); - this.subtype.add("Nephilim"); + this.subtype.add(SubType.NEPHILIM); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GlintHawk.java b/Mage.Sets/src/mage/cards/g/GlintHawk.java index 36fc5e4bec..ef80a561a0 100644 --- a/Mage.Sets/src/mage/cards/g/GlintHawk.java +++ b/Mage.Sets/src/mage/cards/g/GlintHawk.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -54,7 +55,7 @@ public class GlintHawk extends CardImpl { public GlintHawk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GlintHawkIdol.java b/Mage.Sets/src/mage/cards/g/GlintHawkIdol.java index 3388aa72d7..da48620449 100644 --- a/Mage.Sets/src/mage/cards/g/GlintHawkIdol.java +++ b/Mage.Sets/src/mage/cards/g/GlintHawkIdol.java @@ -83,7 +83,7 @@ class GlintHawkIdolToken extends Token { super("", "2/2 Bird artifact creature with flying"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Bird"); + subtype.add(SubType.BIRD); power = new MageInt(2); toughness = new MageInt(2); addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/g/GlintNestCrane.java b/Mage.Sets/src/mage/cards/g/GlintNestCrane.java index 4261ffcaf2..5689101c07 100644 --- a/Mage.Sets/src/mage/cards/g/GlintNestCrane.java +++ b/Mage.Sets/src/mage/cards/g/GlintNestCrane.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -54,7 +55,7 @@ public class GlintNestCrane extends CardImpl { public GlintNestCrane(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GlintSleeveArtisan.java b/Mage.Sets/src/mage/cards/g/GlintSleeveArtisan.java index c82f28a8e2..bf57293c06 100644 --- a/Mage.Sets/src/mage/cards/g/GlintSleeveArtisan.java +++ b/Mage.Sets/src/mage/cards/g/GlintSleeveArtisan.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FabricateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class GlintSleeveArtisan extends CardImpl { public GlintSleeveArtisan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Dwarf"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GlintSleeveSiphoner.java b/Mage.Sets/src/mage/cards/g/GlintSleeveSiphoner.java index 8b1d885e02..826eda1504 100644 --- a/Mage.Sets/src/mage/cards/g/GlintSleeveSiphoner.java +++ b/Mage.Sets/src/mage/cards/g/GlintSleeveSiphoner.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -53,8 +54,8 @@ public class GlintSleeveSiphoner extends CardImpl { public GlintSleeveSiphoner(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GlintwingInvoker.java b/Mage.Sets/src/mage/cards/g/GlintwingInvoker.java index de5259cfa3..0d447f8df8 100644 --- a/Mage.Sets/src/mage/cards/g/GlintwingInvoker.java +++ b/Mage.Sets/src/mage/cards/g/GlintwingInvoker.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,9 +51,9 @@ public class GlintwingInvoker extends CardImpl { public GlintwingInvoker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GlissaSunseeker.java b/Mage.Sets/src/mage/cards/g/GlissaSunseeker.java index 5d60571b4c..11c68921bb 100644 --- a/Mage.Sets/src/mage/cards/g/GlissaSunseeker.java +++ b/Mage.Sets/src/mage/cards/g/GlissaSunseeker.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class GlissaSunseeker extends CardImpl { public GlissaSunseeker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GlissaTheTraitor.java b/Mage.Sets/src/mage/cards/g/GlissaTheTraitor.java index 9e21942cb8..26ba2fb15a 100644 --- a/Mage.Sets/src/mage/cards/g/GlissaTheTraitor.java +++ b/Mage.Sets/src/mage/cards/g/GlissaTheTraitor.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterCard; @@ -56,8 +57,8 @@ public class GlissaTheTraitor extends CardImpl { public GlissaTheTraitor (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Zombie"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.ELF); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GlissasCourier.java b/Mage.Sets/src/mage/cards/g/GlissasCourier.java index 81c3075232..db2bad5d04 100644 --- a/Mage.Sets/src/mage/cards/g/GlissasCourier.java +++ b/Mage.Sets/src/mage/cards/g/GlissasCourier.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class GlissasCourier extends CardImpl { public GlissasCourier (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GlistenerElf.java b/Mage.Sets/src/mage/cards/g/GlistenerElf.java index 5b6fafd4ca..2d0cd99d80 100644 --- a/Mage.Sets/src/mage/cards/g/GlistenerElf.java +++ b/Mage.Sets/src/mage/cards/g/GlistenerElf.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class GlistenerElf extends CardImpl { public GlistenerElf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GlisteningOil.java b/Mage.Sets/src/mage/cards/g/GlisteningOil.java index 9529dfd1e7..122feba70d 100644 --- a/Mage.Sets/src/mage/cards/g/GlisteningOil.java +++ b/Mage.Sets/src/mage/cards/g/GlisteningOil.java @@ -55,7 +55,7 @@ public class GlisteningOil extends CardImpl { public GlisteningOil(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/g/Glitterfang.java b/Mage.Sets/src/mage/cards/g/Glitterfang.java index 029dc6208b..e26e16f3da 100644 --- a/Mage.Sets/src/mage/cards/g/Glitterfang.java +++ b/Mage.Sets/src/mage/cards/g/Glitterfang.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -45,7 +46,7 @@ public class Glitterfang extends CardImpl { public Glitterfang(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GloomSurgeon.java b/Mage.Sets/src/mage/cards/g/GloomSurgeon.java index e6550f29d2..00a4ca41e0 100644 --- a/Mage.Sets/src/mage/cards/g/GloomSurgeon.java +++ b/Mage.Sets/src/mage/cards/g/GloomSurgeon.java @@ -35,6 +35,7 @@ import mage.abilities.effects.ReplacementEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class GloomSurgeon extends CardImpl { public GloomSurgeon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/Gloomdrifter.java b/Mage.Sets/src/mage/cards/g/Gloomdrifter.java index 4bf7fdccbe..ee872f4c74 100644 --- a/Mage.Sets/src/mage/cards/g/Gloomdrifter.java +++ b/Mage.Sets/src/mage/cards/g/Gloomdrifter.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -62,8 +63,8 @@ public class Gloomdrifter extends CardImpl { public Gloomdrifter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Minion"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.MINION); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/Gloomhunter.java b/Mage.Sets/src/mage/cards/g/Gloomhunter.java index bf453e9bfa..674ee933ac 100644 --- a/Mage.Sets/src/mage/cards/g/Gloomhunter.java +++ b/Mage.Sets/src/mage/cards/g/Gloomhunter.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class Gloomhunter extends CardImpl { public Gloomhunter (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Bat"); + this.subtype.add(SubType.BAT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/Gloomwidow.java b/Mage.Sets/src/mage/cards/g/Gloomwidow.java index 12dc2d702a..d6e91a5f02 100644 --- a/Mage.Sets/src/mage/cards/g/Gloomwidow.java +++ b/Mage.Sets/src/mage/cards/g/Gloomwidow.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class Gloomwidow extends CardImpl { public Gloomwidow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GlorifierOfDusk.java b/Mage.Sets/src/mage/cards/g/GlorifierOfDusk.java new file mode 100644 index 0000000000..6e27e1ee5e --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GlorifierOfDusk.java @@ -0,0 +1,73 @@ +/* + * 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.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class GlorifierOfDusk extends CardImpl { + + public GlorifierOfDusk(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Pay 2 life: Glorifier of Dusk gains flying until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new PayLifeCost(2))); + + // Pay 2 life: Glorifier of Dusk gains vigilance until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn), new PayLifeCost(2))); + } + + public GlorifierOfDusk(final GlorifierOfDusk card) { + super(card); + } + + @Override + public GlorifierOfDusk copy() { + return new GlorifierOfDusk(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/Glory.java b/Mage.Sets/src/mage/cards/g/Glory.java index 6419d72adc..cfcbec2b52 100644 --- a/Mage.Sets/src/mage/cards/g/Glory.java +++ b/Mage.Sets/src/mage/cards/g/Glory.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -49,7 +50,7 @@ public class Glory extends CardImpl { public Glory(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Incarnation"); + this.subtype.add(SubType.INCARNATION); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GloryBoundInitiate.java b/Mage.Sets/src/mage/cards/g/GloryBoundInitiate.java index cb00e8d7b0..6aafc34105 100644 --- a/Mage.Sets/src/mage/cards/g/GloryBoundInitiate.java +++ b/Mage.Sets/src/mage/cards/g/GloryBoundInitiate.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -49,8 +50,8 @@ public class GloryBoundInitiate extends CardImpl { public GloryBoundInitiate(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GlorySeeker.java b/Mage.Sets/src/mage/cards/g/GlorySeeker.java index 4568ce4199..1806f7a168 100644 --- a/Mage.Sets/src/mage/cards/g/GlorySeeker.java +++ b/Mage.Sets/src/mage/cards/g/GlorySeeker.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class GlorySeeker extends CardImpl { public GlorySeeker (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/Glorybringer.java b/Mage.Sets/src/mage/cards/g/Glorybringer.java index c8f0e9a6f0..f69964e97b 100644 --- a/Mage.Sets/src/mage/cards/g/Glorybringer.java +++ b/Mage.Sets/src/mage/cards/g/Glorybringer.java @@ -62,7 +62,7 @@ public class Glorybringer extends CardImpl { public Glorybringer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GloryscaleViashino.java b/Mage.Sets/src/mage/cards/g/GloryscaleViashino.java index d186df38e9..1c05281808 100644 --- a/Mage.Sets/src/mage/cards/g/GloryscaleViashino.java +++ b/Mage.Sets/src/mage/cards/g/GloryscaleViashino.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.MulticoloredPredicate; @@ -53,8 +54,8 @@ public class GloryscaleViashino extends CardImpl { public GloryscaleViashino (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{G}{W}"); - this.subtype.add("Viashino"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GloweringRogon.java b/Mage.Sets/src/mage/cards/g/GloweringRogon.java index 42373913e1..bd46bdf1c3 100644 --- a/Mage.Sets/src/mage/cards/g/GloweringRogon.java +++ b/Mage.Sets/src/mage/cards/g/GloweringRogon.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.AmplifyAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class GloweringRogon extends CardImpl { public GloweringRogon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GlowingAnemone.java b/Mage.Sets/src/mage/cards/g/GlowingAnemone.java new file mode 100644 index 0000000000..eb5722d7ef --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GlowingAnemone.java @@ -0,0 +1,69 @@ +/* + * 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.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author TheElk801 + */ +public class GlowingAnemone extends CardImpl { + + public GlowingAnemone(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.JELLYFISH); + this.subtype.add(SubType.BEAST); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // When Glowing Anemone enters the battlefield, you may return target land to its owner's hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true); + ability.addTarget(new TargetLandPermanent()); + this.addAbility(ability); + } + + public GlowingAnemone(final GlowingAnemone card) { + super(card); + } + + @Override + public GlowingAnemone copy() { + return new GlowingAnemone(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/Glowrider.java b/Mage.Sets/src/mage/cards/g/Glowrider.java index 21b3f2c7b5..530d3be270 100644 --- a/Mage.Sets/src/mage/cards/g/Glowrider.java +++ b/Mage.Sets/src/mage/cards/g/Glowrider.java @@ -49,8 +49,8 @@ public class Glowrider extends CardImpl { public Glowrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GluttonousCyclops.java b/Mage.Sets/src/mage/cards/g/GluttonousCyclops.java index 3f69e793b9..4f732dceac 100644 --- a/Mage.Sets/src/mage/cards/g/GluttonousCyclops.java +++ b/Mage.Sets/src/mage/cards/g/GluttonousCyclops.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.MonstrosityAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class GluttonousCyclops extends CardImpl { public GluttonousCyclops(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Cyclops"); + this.subtype.add(SubType.CYCLOPS); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GluttonousSlime.java b/Mage.Sets/src/mage/cards/g/GluttonousSlime.java index c1b7d664fb..6d8e7681c8 100644 --- a/Mage.Sets/src/mage/cards/g/GluttonousSlime.java +++ b/Mage.Sets/src/mage/cards/g/GluttonousSlime.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class GluttonousSlime extends CardImpl { public GluttonousSlime(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Ooze"); + this.subtype.add(SubType.OOZE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GluttonousZombie.java b/Mage.Sets/src/mage/cards/g/GluttonousZombie.java index 2925e4494d..9798dfebc4 100644 --- a/Mage.Sets/src/mage/cards/g/GluttonousZombie.java +++ b/Mage.Sets/src/mage/cards/g/GluttonousZombie.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class GluttonousZombie extends CardImpl { public GluttonousZombie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GlyphKeeper.java b/Mage.Sets/src/mage/cards/g/GlyphKeeper.java index 081b797bae..b99153d9a5 100644 --- a/Mage.Sets/src/mage/cards/g/GlyphKeeper.java +++ b/Mage.Sets/src/mage/cards/g/GlyphKeeper.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -54,7 +55,7 @@ public class GlyphKeeper extends CardImpl { public GlyphKeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GnarledMass.java b/Mage.Sets/src/mage/cards/g/GnarledMass.java index 587c1c84a1..81aa13de2d 100644 --- a/Mage.Sets/src/mage/cards/g/GnarledMass.java +++ b/Mage.Sets/src/mage/cards/g/GnarledMass.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class GnarledMass extends CardImpl { public GnarledMass(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GnarledScarhide.java b/Mage.Sets/src/mage/cards/g/GnarledScarhide.java index 9a16eee3ec..afe83006e8 100644 --- a/Mage.Sets/src/mage/cards/g/GnarledScarhide.java +++ b/Mage.Sets/src/mage/cards/g/GnarledScarhide.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class GnarledScarhide extends CardImpl { public GnarledScarhide(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{B}"); - this.subtype.add("Minotaur"); + this.subtype.add(SubType.MINOTAUR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GnarlidPack.java b/Mage.Sets/src/mage/cards/g/GnarlidPack.java index 34af0830f0..3048a81c00 100644 --- a/Mage.Sets/src/mage/cards/g/GnarlidPack.java +++ b/Mage.Sets/src/mage/cards/g/GnarlidPack.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MultikickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -46,7 +47,7 @@ public class GnarlidPack extends CardImpl { public GnarlidPack(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GnarlrootTrapper.java b/Mage.Sets/src/mage/cards/g/GnarlrootTrapper.java index 8eb55a52c0..1f54f8ff18 100644 --- a/Mage.Sets/src/mage/cards/g/GnarlrootTrapper.java +++ b/Mage.Sets/src/mage/cards/g/GnarlrootTrapper.java @@ -70,8 +70,8 @@ public class GnarlrootTrapper extends CardImpl { public GnarlrootTrapper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GnarlwoodDryad.java b/Mage.Sets/src/mage/cards/g/GnarlwoodDryad.java index 28b6619c96..993fff2a29 100644 --- a/Mage.Sets/src/mage/cards/g/GnarlwoodDryad.java +++ b/Mage.Sets/src/mage/cards/g/GnarlwoodDryad.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class GnarlwoodDryad extends CardImpl { public GnarlwoodDryad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Dryad"); - this.subtype.add("Horror"); + this.subtype.add(SubType.DRYAD); + this.subtype.add(SubType.HORROR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GnatAlleyCreeper.java b/Mage.Sets/src/mage/cards/g/GnatAlleyCreeper.java index 50d340c11e..9fe23cf8af 100644 --- a/Mage.Sets/src/mage/cards/g/GnatAlleyCreeper.java +++ b/Mage.Sets/src/mage/cards/g/GnatAlleyCreeper.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -53,8 +54,8 @@ public class GnatAlleyCreeper extends CardImpl { public GnatAlleyCreeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GnatMiser.java b/Mage.Sets/src/mage/cards/g/GnatMiser.java index fc45ed0df6..29b0e8e2a0 100644 --- a/Mage.Sets/src/mage/cards/g/GnatMiser.java +++ b/Mage.Sets/src/mage/cards/g/GnatMiser.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect. import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class GnatMiser extends CardImpl { public GnatMiser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Rat"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.RAT); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/Gnathosaur.java b/Mage.Sets/src/mage/cards/g/Gnathosaur.java index 7ed4b2d594..b2d043e6f2 100644 --- a/Mage.Sets/src/mage/cards/g/Gnathosaur.java +++ b/Mage.Sets/src/mage/cards/g/Gnathosaur.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -56,7 +57,7 @@ public class Gnathosaur extends CardImpl { public Gnathosaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GnawingZombie.java b/Mage.Sets/src/mage/cards/g/GnawingZombie.java index a43b14afe2..6ec00a3910 100644 --- a/Mage.Sets/src/mage/cards/g/GnawingZombie.java +++ b/Mage.Sets/src/mage/cards/g/GnawingZombie.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; import mage.target.common.TargetControlledCreaturePermanent; @@ -50,7 +51,7 @@ public class GnawingZombie extends CardImpl { public GnawingZombie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/Goatnapper.java b/Mage.Sets/src/mage/cards/g/Goatnapper.java index 90936071f2..aaed048196 100644 --- a/Mage.Sets/src/mage/cards/g/Goatnapper.java +++ b/Mage.Sets/src/mage/cards/g/Goatnapper.java @@ -57,16 +57,16 @@ public class Goatnapper extends CardImpl { } public Goatnapper(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); Ability ability = new EntersBattlefieldTriggeredAbility(new UntapTargetEffect(), false); ability.addTarget(new TargetPermanent(filter)); - ability.addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); - ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); + ability.addEffect(new GainControlTargetEffect(Duration.EndOfTurn).setText("and gain control of it until end of turn")); + ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("It gains haste until end of turn")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GobblingOoze.java b/Mage.Sets/src/mage/cards/g/GobblingOoze.java index 38233634b8..c380e4aee5 100644 --- a/Mage.Sets/src/mage/cards/g/GobblingOoze.java +++ b/Mage.Sets/src/mage/cards/g/GobblingOoze.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.StaticFilters; @@ -50,7 +51,7 @@ public class GobblingOoze extends CardImpl { public GobblingOoze(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); - this.subtype.add("Ooze"); + this.subtype.add(SubType.OOZE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GobhobblerRats.java b/Mage.Sets/src/mage/cards/g/GobhobblerRats.java index 77333a1ba0..76ec6cdd07 100644 --- a/Mage.Sets/src/mage/cards/g/GobhobblerRats.java +++ b/Mage.Sets/src/mage/cards/g/GobhobblerRats.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class GobhobblerRats extends CardImpl { public GobhobblerRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{R}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinArchaeologist.java b/Mage.Sets/src/mage/cards/g/GoblinArchaeologist.java index 9ed3358eed..488700f248 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinArchaeologist.java +++ b/Mage.Sets/src/mage/cards/g/GoblinArchaeologist.java @@ -16,6 +16,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -31,8 +32,8 @@ public class GoblinArchaeologist extends CardImpl { public GoblinArchaeologist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinArsonist.java b/Mage.Sets/src/mage/cards/g/GoblinArsonist.java index f357c31f8a..ad0e68fefc 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinArsonist.java +++ b/Mage.Sets/src/mage/cards/g/GoblinArsonist.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; /** @@ -45,8 +46,8 @@ public class GoblinArsonist extends CardImpl { public GoblinArsonist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinArtillery.java b/Mage.Sets/src/mage/cards/g/GoblinArtillery.java index 7128cd1295..1668e5e3d1 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinArtillery.java +++ b/Mage.Sets/src/mage/cards/g/GoblinArtillery.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class GoblinArtillery extends CardImpl { public GoblinArtillery(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GoblinArtisans.java b/Mage.Sets/src/mage/cards/g/GoblinArtisans.java index b078845e02..8c5e249696 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinArtisans.java +++ b/Mage.Sets/src/mage/cards/g/GoblinArtisans.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -62,8 +63,8 @@ public class GoblinArtisans extends CardImpl { public GoblinArtisans(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinAssassin.java b/Mage.Sets/src/mage/cards/g/GoblinAssassin.java index a5d4cc1311..5f76c8f032 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinAssassin.java +++ b/Mage.Sets/src/mage/cards/g/GoblinAssassin.java @@ -54,8 +54,8 @@ public class GoblinAssassin extends CardImpl { public GoblinAssassin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinBalloonBrigade.java b/Mage.Sets/src/mage/cards/g/GoblinBalloonBrigade.java index dc3119925c..45a3c6e26f 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinBalloonBrigade.java +++ b/Mage.Sets/src/mage/cards/g/GoblinBalloonBrigade.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class GoblinBalloonBrigade extends CardImpl { public GoblinBalloonBrigade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinBangchuckers.java b/Mage.Sets/src/mage/cards/g/GoblinBangchuckers.java index b737295789..b2de386b84 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinBangchuckers.java +++ b/Mage.Sets/src/mage/cards/g/GoblinBangchuckers.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -51,8 +52,8 @@ public class GoblinBangchuckers extends CardImpl { public GoblinBangchuckers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinBattleJester.java b/Mage.Sets/src/mage/cards/g/GoblinBattleJester.java index 6d0577d9eb..c50c8653a2 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinBattleJester.java +++ b/Mage.Sets/src/mage/cards/g/GoblinBattleJester.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.combat.CantBlockTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -55,7 +56,7 @@ public class GoblinBattleJester extends CardImpl { public GoblinBattleJester(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinBerserker.java b/Mage.Sets/src/mage/cards/g/GoblinBerserker.java index 6136799bd1..8f7136f170 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinBerserker.java +++ b/Mage.Sets/src/mage/cards/g/GoblinBerserker.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class GoblinBerserker extends CardImpl { public GoblinBerserker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinBrawler.java b/Mage.Sets/src/mage/cards/g/GoblinBrawler.java index 0e085dee1e..299548a83a 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinBrawler.java +++ b/Mage.Sets/src/mage/cards/g/GoblinBrawler.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class GoblinBrawler extends CardImpl { public GoblinBrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -98,7 +99,7 @@ class CantBeEquippedSourceEffect extends ContinuousRuleModifyingEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { if (event.getTargetId().equals(source.getSourceId())) { Permanent permanent = game.getPermanent(event.getSourceId()); - if (permanent != null && permanent.getSubtype(game).contains("Equipment")) { + if (permanent != null && permanent.hasSubtype(SubType.EQUIPMENT, game)) { return true; } } diff --git a/Mage.Sets/src/mage/cards/g/GoblinBrigand.java b/Mage.Sets/src/mage/cards/g/GoblinBrigand.java index 77b17115f7..e93813fd6c 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinBrigand.java +++ b/Mage.Sets/src/mage/cards/g/GoblinBrigand.java @@ -29,10 +29,11 @@ package mage.cards.g; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,13 +43,13 @@ public class GoblinBrigand extends CardImpl { public GoblinBrigand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); // Goblin Brigand attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public GoblinBrigand(final GoblinBrigand card) { diff --git a/Mage.Sets/src/mage/cards/g/GoblinBully.java b/Mage.Sets/src/mage/cards/g/GoblinBully.java index 2d9acb14b7..4ed750fd9d 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinBully.java +++ b/Mage.Sets/src/mage/cards/g/GoblinBully.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class GoblinBully extends CardImpl { public GoblinBully(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinBushwhacker.java b/Mage.Sets/src/mage/cards/g/GoblinBushwhacker.java index ac6c7839b2..f98ac39ade 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinBushwhacker.java +++ b/Mage.Sets/src/mage/cards/g/GoblinBushwhacker.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -49,8 +50,8 @@ public class GoblinBushwhacker extends CardImpl { public GoblinBushwhacker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinCadets.java b/Mage.Sets/src/mage/cards/g/GoblinCadets.java index 7aab7cd068..281d5bf409 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinCadets.java +++ b/Mage.Sets/src/mage/cards/g/GoblinCadets.java @@ -47,7 +47,7 @@ public class GoblinCadets extends CardImpl { public GoblinCadets(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinCavaliers.java b/Mage.Sets/src/mage/cards/g/GoblinCavaliers.java index 504a4a53f6..87573becad 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinCavaliers.java +++ b/Mage.Sets/src/mage/cards/g/GoblinCavaliers.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class GoblinCavaliers extends CardImpl { public GoblinCavaliers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinCaves.java b/Mage.Sets/src/mage/cards/g/GoblinCaves.java index fd91e053e3..cea705ca57 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinCaves.java +++ b/Mage.Sets/src/mage/cards/g/GoblinCaves.java @@ -53,7 +53,7 @@ public class GoblinCaves extends CardImpl { public GoblinCaves(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GoblinCharbelcher.java b/Mage.Sets/src/mage/cards/g/GoblinCharbelcher.java index c8306018dd..beb3cd4068 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinCharbelcher.java +++ b/Mage.Sets/src/mage/cards/g/GoblinCharbelcher.java @@ -27,7 +27,6 @@ */ package mage.cards.g; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -37,12 +36,15 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCreatureOrPlayer; +import java.util.UUID; + /** * * @author Plopman @@ -101,7 +103,7 @@ class GoblinCharbelcherEffect extends OneShotEffect { cards.add(card); if (card.isLand()){ landFound = true; - if(card.getSubtype(game).contains("Mountain")){ + if(card.hasSubtype(SubType.MOUNTAIN, game)){ isMountain = true; } break; @@ -116,7 +118,7 @@ class GoblinCharbelcherEffect extends OneShotEffect { if (landFound) { damage--; } - if(isMountain == true){ + if(isMountain){ damage *= 2; } diff --git a/Mage.Sets/src/mage/cards/g/GoblinChariot.java b/Mage.Sets/src/mage/cards/g/GoblinChariot.java index ed73e9e96b..66bd1cecbe 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinChariot.java +++ b/Mage.Sets/src/mage/cards/g/GoblinChariot.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class GoblinChariot extends CardImpl { public GoblinChariot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinChieftain.java b/Mage.Sets/src/mage/cards/g/GoblinChieftain.java index 2b15368cdf..672e651c45 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinChieftain.java +++ b/Mage.Sets/src/mage/cards/g/GoblinChieftain.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -50,7 +51,7 @@ public class GoblinChieftain extends CardImpl { public GoblinChieftain(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinChirurgeon.java b/Mage.Sets/src/mage/cards/g/GoblinChirurgeon.java index 70ddd4cbae..4fb6a13842 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinChirurgeon.java +++ b/Mage.Sets/src/mage/cards/g/GoblinChirurgeon.java @@ -50,8 +50,8 @@ public class GoblinChirurgeon extends CardImpl { public GoblinChirurgeon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinClearcutter.java b/Mage.Sets/src/mage/cards/g/GoblinClearcutter.java index 27b2530789..0c4b014354 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinClearcutter.java +++ b/Mage.Sets/src/mage/cards/g/GoblinClearcutter.java @@ -64,7 +64,7 @@ public class GoblinClearcutter extends CardImpl { public GoblinClearcutter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GoblinCohort.java b/Mage.Sets/src/mage/cards/g/GoblinCohort.java index ce4b7c5533..8f16f6b996 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinCohort.java +++ b/Mage.Sets/src/mage/cards/g/GoblinCohort.java @@ -35,6 +35,7 @@ import mage.abilities.effects.RestrictionEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -49,8 +50,8 @@ public class GoblinCohort extends CardImpl { public GoblinCohort(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinCommando.java b/Mage.Sets/src/mage/cards/g/GoblinCommando.java index 6028ccc9df..7dba905b8a 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinCommando.java +++ b/Mage.Sets/src/mage/cards/g/GoblinCommando.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -45,7 +46,7 @@ public class GoblinCommando extends CardImpl { public GoblinCommando(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinDarkDwellers.java b/Mage.Sets/src/mage/cards/g/GoblinDarkDwellers.java index 99788b033d..31b558779c 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinDarkDwellers.java +++ b/Mage.Sets/src/mage/cards/g/GoblinDarkDwellers.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Outcome; @@ -66,7 +67,7 @@ public class GoblinDarkDwellers extends CardImpl { public GoblinDarkDwellers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GoblinDeathraiders.java b/Mage.Sets/src/mage/cards/g/GoblinDeathraiders.java index 67474a2638..af90b94112 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinDeathraiders.java +++ b/Mage.Sets/src/mage/cards/g/GoblinDeathraiders.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class GoblinDeathraiders extends CardImpl { public GoblinDeathraiders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinDiggingTeam.java b/Mage.Sets/src/mage/cards/g/GoblinDiggingTeam.java index 6b09a8f92d..eedc2d43b9 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinDiggingTeam.java +++ b/Mage.Sets/src/mage/cards/g/GoblinDiggingTeam.java @@ -56,7 +56,7 @@ public class GoblinDiggingTeam extends CardImpl { public GoblinDiggingTeam(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinDiplomats.java b/Mage.Sets/src/mage/cards/g/GoblinDiplomats.java index e9f16f655d..107131ae4f 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinDiplomats.java +++ b/Mage.Sets/src/mage/cards/g/GoblinDiplomats.java @@ -36,6 +36,7 @@ import mage.abilities.effects.RequirementEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -49,7 +50,7 @@ public class GoblinDiplomats extends CardImpl { public GoblinDiplomats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinDirigible.java b/Mage.Sets/src/mage/cards/g/GoblinDirigible.java index e676c1a949..be3afc6da8 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinDirigible.java +++ b/Mage.Sets/src/mage/cards/g/GoblinDirigible.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class GoblinDirigible extends CardImpl { public GoblinDirigible(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GoblinDynamo.java b/Mage.Sets/src/mage/cards/g/GoblinDynamo.java index f7b047658d..889ebeff62 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinDynamo.java +++ b/Mage.Sets/src/mage/cards/g/GoblinDynamo.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class GoblinDynamo extends CardImpl { public GoblinDynamo(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GoblinElectromancer.java b/Mage.Sets/src/mage/cards/g/GoblinElectromancer.java index 84b75f5118..4ac64f03ca 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinElectromancer.java +++ b/Mage.Sets/src/mage/cards/g/GoblinElectromancer.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; @@ -55,8 +56,8 @@ public class GoblinElectromancer extends CardImpl { public GoblinElectromancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinEliteInfantry.java b/Mage.Sets/src/mage/cards/g/GoblinEliteInfantry.java index c71ea10830..84694d6518 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinEliteInfantry.java +++ b/Mage.Sets/src/mage/cards/g/GoblinEliteInfantry.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,8 +45,8 @@ public class GoblinEliteInfantry extends CardImpl { public GoblinEliteInfantry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinFestival.java b/Mage.Sets/src/mage/cards/g/GoblinFestival.java new file mode 100644 index 0000000000..8a12d1021a --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GoblinFestival.java @@ -0,0 +1,147 @@ +/* + * 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.cards.g; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetOpponent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author L_J + */ +public class GoblinFestival extends CardImpl { + + public GoblinFestival(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); + + // {2}: Goblin Festival deals 1 damage to target creature or player. Flip a coin. If you lose the flip, choose one of your opponents. That player gains control of Goblin Festival. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{2}")); + ability.addTarget(new TargetCreatureOrPlayer()); + ability.addEffect(new GoblinFestivalChangeControlEffect()); + this.addAbility(ability); + } + + public GoblinFestival(final GoblinFestival card) { + super(card); + } + + @Override + public GoblinFestival copy() { + return new GoblinFestival(this); + } +} + +class GoblinFestivalChangeControlEffect extends OneShotEffect { + + public GoblinFestivalChangeControlEffect() { + super(Outcome.Benefit); + this.staticText = "Flip a coin. If you lose the flip, choose one of your opponents. That player gains control of {this}"; + } + + public GoblinFestivalChangeControlEffect(final GoblinFestivalChangeControlEffect effect) { + super(effect); + } + + @Override + public GoblinFestivalChangeControlEffect copy() { + return new GoblinFestivalChangeControlEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + if (!controller.flipCoin(game)) { + Target target = new TargetOpponent(); + target.setNotTarget(true); + if (controller.chooseTarget(outcome, target, source, game)) { + ContinuousEffect effect = new GoblinFestivalGainControlEffect(Duration.Custom, target.getFirstTarget()); + effect.setTargetPointer(new FixedTarget(source.getSourceId())); + game.addEffect(effect, source); + return true; + } + } + } + return false; + } +} + +class GoblinFestivalGainControlEffect extends ContinuousEffectImpl { + + UUID controller; + + public GoblinFestivalGainControlEffect(Duration duration, UUID controller) { + super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl); + this.controller = controller; + } + + public GoblinFestivalGainControlEffect(final GoblinFestivalGainControlEffect effect) { + super(effect); + this.controller = effect.controller; + } + + @Override + public GoblinFestivalGainControlEffect copy() { + return new GoblinFestivalGainControlEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (targetPointer != null) { + permanent = game.getPermanent(targetPointer.getFirst(game, source)); + } + if (permanent != null) { + return permanent.changeControllerId(controller, game); + } + return false; + } + + @Override + public String getText(Mode mode) { + return "That player gains control of {this}"; + } +} diff --git a/Mage.Sets/src/mage/cards/g/GoblinFireFiend.java b/Mage.Sets/src/mage/cards/g/GoblinFireFiend.java index cbfa9591a7..9e86eab09d 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinFireFiend.java +++ b/Mage.Sets/src/mage/cards/g/GoblinFireFiend.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class GoblinFireFiend extends CardImpl { public GoblinFireFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinFirebug.java b/Mage.Sets/src/mage/cards/g/GoblinFirebug.java index e2cbf5d66d..9dee0228e2 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinFirebug.java +++ b/Mage.Sets/src/mage/cards/g/GoblinFirebug.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; /** @@ -44,7 +45,7 @@ public class GoblinFirebug extends CardImpl { public GoblinFirebug(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinFireslinger.java b/Mage.Sets/src/mage/cards/g/GoblinFireslinger.java index 092d70475d..d417c1ac96 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinFireslinger.java +++ b/Mage.Sets/src/mage/cards/g/GoblinFireslinger.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -47,8 +48,8 @@ public class GoblinFireslinger extends CardImpl { public GoblinFireslinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinFirestarter.java b/Mage.Sets/src/mage/cards/g/GoblinFirestarter.java index 6311f7d666..7f0afb2fe7 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinFirestarter.java +++ b/Mage.Sets/src/mage/cards/g/GoblinFirestarter.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,7 +49,7 @@ public class GoblinFirestarter extends CardImpl { public GoblinFirestarter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinFlectomancer.java b/Mage.Sets/src/mage/cards/g/GoblinFlectomancer.java index e8c7b47edc..e2993c0d9c 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinFlectomancer.java +++ b/Mage.Sets/src/mage/cards/g/GoblinFlectomancer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.ChooseNewTargetsTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterInstantOrSorcerySpell; import mage.target.TargetSpell; @@ -49,8 +50,8 @@ public class GoblinFlectomancer extends CardImpl { public GoblinFlectomancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{R}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinFlotilla.java b/Mage.Sets/src/mage/cards/g/GoblinFlotilla.java index e8ebd078bb..31673be49d 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinFlotilla.java +++ b/Mage.Sets/src/mage/cards/g/GoblinFlotilla.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.IslandwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; @@ -51,7 +52,7 @@ public class GoblinFlotilla extends CardImpl { public GoblinFlotilla(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinFreerunner.java b/Mage.Sets/src/mage/cards/g/GoblinFreerunner.java index 729c032514..a35e8f22c7 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinFreerunner.java +++ b/Mage.Sets/src/mage/cards/g/GoblinFreerunner.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.SurgeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,9 +44,9 @@ public class GoblinFreerunner extends CardImpl { public GoblinFreerunner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); - this.subtype.add("Ally"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinGame.java b/Mage.Sets/src/mage/cards/g/GoblinGame.java new file mode 100644 index 0000000000..5c58cafc2f --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GoblinGame.java @@ -0,0 +1,125 @@ +/* + * 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.cards.g; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author L_J + */ +public class GoblinGame extends CardImpl { + + public GoblinGame(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{R}{R}"); + + // Each player hides at least one item, then all players reveal them simultaneously. Each player loses life equal to the number of items he or she revealed. The player who revealed the fewest items then loses half his or her life, rounded up. If two or more players are tied for fewest, each loses half his or her life, rounded up. + // Reinterpreted as: Each player secretly chooses a number greater than 0. Then those numbers are revealed. Each player loses life equal to his or her chosen number. The player who revealed the lowest number then loses half his or her life, rounded up. If two or more players are tied for lowest, each loses half his or her life, rounded up. + this.getSpellAbility().addEffect(new GoblinGameEffect()); + + } + + public GoblinGame(final GoblinGame card) { + super(card); + } + + @Override + public GoblinGame copy() { + return new GoblinGame(this); + } +} + +class GoblinGameEffect extends OneShotEffect { + + public GoblinGameEffect() { + super(Outcome.Detriment); + this.staticText = "Each player hides at least one item, then all players reveal them simultaneously. Each player loses life equal to the number of items he or she revealed. The player who revealed the fewest items then loses half his or her life, rounded up. If two or more players are tied for fewest, each loses half his or her life, rounded up."; + } + + public GoblinGameEffect(final GoblinGameEffect effect) { + super(effect); + } + + @Override + public GoblinGameEffect copy() { + return new GoblinGameEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + int lowestNumber = 0; + int number = 0; + String message = "Choose a number of objects to hide."; + Map numberChosen = new HashMap<>(); + + //players choose numbers + for (Player player : game.getPlayers().values()) { + if (player != null) { + // TODO: consider changing 1000 to another cap, or even Integer.MAX_VALUE if the Volcano Hellion binary wraparound gets addressed (although hiding over two billions of items would be rather difficult IRL) + number = player.getAmount(1, 1000, message, game); + numberChosen.put(player, number); + } + } + //get lowest number + for (Player player : numberChosen.keySet()) { + if (lowestNumber == 0 || lowestNumber > numberChosen.get(player)) { + lowestNumber = numberChosen.get(player); + } + } + //reveal numbers to players and follow through with effects + for (Player player : game.getPlayers().values()) { + if (player != null) { + game.informPlayers(player.getLogName() + " chose number " + numberChosen.get(player)); + player.loseLife(numberChosen.get(player), game, false); + } + } + for (Player player : game.getPlayers().values()) { + if (player != null) { + if (numberChosen.get(player) <= lowestNumber) { + game.informPlayers(player.getLogName() + " chose the lowest number"); + Integer amount = (int) Math.ceil(player.getLife() / 2f); + if (amount > 0) { + player.loseLife(amount, game, false); + } + } + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/g/GoblinGardener.java b/Mage.Sets/src/mage/cards/g/GoblinGardener.java index 0885514f8d..82d042824c 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinGardener.java +++ b/Mage.Sets/src/mage/cards/g/GoblinGardener.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetLandPermanent; /** @@ -46,7 +47,7 @@ public class GoblinGardener extends CardImpl { public GoblinGardener(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinGaveleer.java b/Mage.Sets/src/mage/cards/g/GoblinGaveleer.java index e208a69386..c68e16118e 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinGaveleer.java +++ b/Mage.Sets/src/mage/cards/g/GoblinGaveleer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class GoblinGaveleer extends CardImpl { public GoblinGaveleer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinGeneral.java b/Mage.Sets/src/mage/cards/g/GoblinGeneral.java index 1dd8687f41..05c8f161c4 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinGeneral.java +++ b/Mage.Sets/src/mage/cards/g/GoblinGeneral.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; @@ -45,8 +46,8 @@ public class GoblinGeneral extends CardImpl { public GoblinGeneral(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinGlider.java b/Mage.Sets/src/mage/cards/g/GoblinGlider.java index 02ba4b7c09..5b0824b84e 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinGlider.java +++ b/Mage.Sets/src/mage/cards/g/GoblinGlider.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class GoblinGlider extends CardImpl { public GoblinGlider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinGloryChaser.java b/Mage.Sets/src/mage/cards/g/GoblinGloryChaser.java index 18891f770b..d63dd615c1 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinGloryChaser.java +++ b/Mage.Sets/src/mage/cards/g/GoblinGloryChaser.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.RenownAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class GoblinGloryChaser extends CardImpl { public GoblinGloryChaser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinGoon.java b/Mage.Sets/src/mage/cards/g/GoblinGoon.java index 4f077ebd6c..817d09611b 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinGoon.java +++ b/Mage.Sets/src/mage/cards/g/GoblinGoon.java @@ -35,6 +35,7 @@ import mage.abilities.effects.RestrictionEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -50,8 +51,8 @@ public class GoblinGoon extends CardImpl { public GoblinGoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/g/GoblinGrappler.java b/Mage.Sets/src/mage/cards/g/GoblinGrappler.java index 51715f4b53..77c1914d31 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinGrappler.java +++ b/Mage.Sets/src/mage/cards/g/GoblinGrappler.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ProvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class GoblinGrappler extends CardImpl { public GoblinGrappler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinGrenadiers.java b/Mage.Sets/src/mage/cards/g/GoblinGrenadiers.java index 9f3e699093..cea2cb9d8e 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinGrenadiers.java +++ b/Mage.Sets/src/mage/cards/g/GoblinGrenadiers.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DoIfCostPaid; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetLandPermanent; @@ -49,7 +50,7 @@ public class GoblinGrenadiers extends CardImpl { public GoblinGrenadiers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinGuide.java b/Mage.Sets/src/mage/cards/g/GoblinGuide.java index b960989318..29d7431054 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinGuide.java +++ b/Mage.Sets/src/mage/cards/g/GoblinGuide.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.HasteAbility; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -54,8 +55,8 @@ public class GoblinGuide extends CardImpl { public GoblinGuide(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Scout"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinHeelcutter.java b/Mage.Sets/src/mage/cards/g/GoblinHeelcutter.java index 90e3d7c92e..71276fe015 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinHeelcutter.java +++ b/Mage.Sets/src/mage/cards/g/GoblinHeelcutter.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -47,8 +48,8 @@ public class GoblinHeelcutter extends CardImpl { public GoblinHeelcutter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinHero.java b/Mage.Sets/src/mage/cards/g/GoblinHero.java index 7dff572498..6f77876f96 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinHero.java +++ b/Mage.Sets/src/mage/cards/g/GoblinHero.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class GoblinHero extends CardImpl { public GoblinHero(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinKaboomist.java b/Mage.Sets/src/mage/cards/g/GoblinKaboomist.java index 09f1662157..a214ef0208 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinKaboomist.java +++ b/Mage.Sets/src/mage/cards/g/GoblinKaboomist.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.game.Game; @@ -51,8 +52,8 @@ public class GoblinKaboomist extends CardImpl { public GoblinKaboomist(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinKing.java b/Mage.Sets/src/mage/cards/g/GoblinKing.java index cf36624101..66f139a525 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinKing.java +++ b/Mage.Sets/src/mage/cards/g/GoblinKing.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -49,7 +50,7 @@ public class GoblinKing extends CardImpl { public GoblinKing(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinLackey.java b/Mage.Sets/src/mage/cards/g/GoblinLackey.java index 1067ad692a..f937117f0a 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinLackey.java +++ b/Mage.Sets/src/mage/cards/g/GoblinLackey.java @@ -52,7 +52,7 @@ public class GoblinLackey extends CardImpl { public GoblinLackey(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinLegionnaire.java b/Mage.Sets/src/mage/cards/g/GoblinLegionnaire.java index b406e706f3..cd3c43e80b 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinLegionnaire.java +++ b/Mage.Sets/src/mage/cards/g/GoblinLegionnaire.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class GoblinLegionnaire extends CardImpl { public GoblinLegionnaire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{W}"); - this.subtype.add("Goblin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinLookout.java b/Mage.Sets/src/mage/cards/g/GoblinLookout.java index 87d3b55792..22c84498a4 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinLookout.java +++ b/Mage.Sets/src/mage/cards/g/GoblinLookout.java @@ -59,7 +59,7 @@ public class GoblinLookout extends CardImpl { public GoblinLookout(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinMarshal.java b/Mage.Sets/src/mage/cards/g/GoblinMarshal.java index 7af33b214c..4b8b4d302e 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinMarshal.java +++ b/Mage.Sets/src/mage/cards/g/GoblinMarshal.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.GoblinToken; /** @@ -46,8 +47,8 @@ public class GoblinMarshal extends CardImpl { public GoblinMarshal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GoblinMasons.java b/Mage.Sets/src/mage/cards/g/GoblinMasons.java index 39e5c83309..80e02c5cb4 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinMasons.java +++ b/Mage.Sets/src/mage/cards/g/GoblinMasons.java @@ -54,7 +54,7 @@ public class GoblinMasons extends CardImpl { public GoblinMasons(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinMatron.java b/Mage.Sets/src/mage/cards/g/GoblinMatron.java index 1ea58b524d..8bdf08c654 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinMatron.java +++ b/Mage.Sets/src/mage/cards/g/GoblinMatron.java @@ -53,7 +53,7 @@ public class GoblinMatron extends CardImpl { public GoblinMatron(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinMedics.java b/Mage.Sets/src/mage/cards/g/GoblinMedics.java index e1fdd72a6c..a3a1cb6b13 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinMedics.java +++ b/Mage.Sets/src/mage/cards/g/GoblinMedics.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; /** @@ -45,8 +46,8 @@ public class GoblinMedics extends CardImpl { public GoblinMedics(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinMountaineer.java b/Mage.Sets/src/mage/cards/g/GoblinMountaineer.java index 8249211e2d..f8dd9b9050 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinMountaineer.java +++ b/Mage.Sets/src/mage/cards/g/GoblinMountaineer.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class GoblinMountaineer extends CardImpl { public GoblinMountaineer (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Scout"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinMutant.java b/Mage.Sets/src/mage/cards/g/GoblinMutant.java index a4475309e0..81a01f7a77 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinMutant.java +++ b/Mage.Sets/src/mage/cards/g/GoblinMutant.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -61,8 +62,8 @@ public class GoblinMutant extends CardImpl { public GoblinMutant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GoblinOutlander.java b/Mage.Sets/src/mage/cards/g/GoblinOutlander.java index 2a3c5aca77..7a0704fd3f 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinOutlander.java +++ b/Mage.Sets/src/mage/cards/g/GoblinOutlander.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class GoblinOutlander extends CardImpl { public GoblinOutlander(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Scout"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinPatrol.java b/Mage.Sets/src/mage/cards/g/GoblinPatrol.java index 72891e55a2..1ed585acff 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinPatrol.java +++ b/Mage.Sets/src/mage/cards/g/GoblinPatrol.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class GoblinPatrol extends CardImpl { public GoblinPatrol(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinPiker.java b/Mage.Sets/src/mage/cards/g/GoblinPiker.java index eada94914a..dbd40b533e 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinPiker.java +++ b/Mage.Sets/src/mage/cards/g/GoblinPiker.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class GoblinPiker extends CardImpl { public GoblinPiker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinPiledriver.java b/Mage.Sets/src/mage/cards/g/GoblinPiledriver.java index 1295e7096f..97b34fbc38 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinPiledriver.java +++ b/Mage.Sets/src/mage/cards/g/GoblinPiledriver.java @@ -59,8 +59,8 @@ public class GoblinPiledriver extends CardImpl { public GoblinPiledriver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinPyromancer.java b/Mage.Sets/src/mage/cards/g/GoblinPyromancer.java index a9e460b84a..b8a7103955 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinPyromancer.java +++ b/Mage.Sets/src/mage/cards/g/GoblinPyromancer.java @@ -57,8 +57,8 @@ public class GoblinPyromancer extends CardImpl { public GoblinPyromancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinRabblemaster.java b/Mage.Sets/src/mage/cards/g/GoblinRabblemaster.java index 2cdc58b259..6ab00da64a 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinRabblemaster.java +++ b/Mage.Sets/src/mage/cards/g/GoblinRabblemaster.java @@ -67,8 +67,8 @@ public class GoblinRabblemaster extends CardImpl { public GoblinRabblemaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinRacketeer.java b/Mage.Sets/src/mage/cards/g/GoblinRacketeer.java index c08e55657d..4445a2d8f7 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinRacketeer.java +++ b/Mage.Sets/src/mage/cards/g/GoblinRacketeer.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.GoadTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.Game; @@ -51,8 +52,8 @@ public class GoblinRacketeer extends CardImpl { public GoblinRacketeer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinRaider.java b/Mage.Sets/src/mage/cards/g/GoblinRaider.java index 75a3900282..1a16ff6c92 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinRaider.java +++ b/Mage.Sets/src/mage/cards/g/GoblinRaider.java @@ -33,6 +33,7 @@ import mage.abilities.common.CantBlockAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class GoblinRaider extends CardImpl { public GoblinRaider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinRazerunners.java b/Mage.Sets/src/mage/cards/g/GoblinRazerunners.java index 358beb0ff7..9b0398b985 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinRazerunners.java +++ b/Mage.Sets/src/mage/cards/g/GoblinRazerunners.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterControlledLandPermanent; @@ -58,8 +59,8 @@ public class GoblinRazerunners extends CardImpl { public GoblinRazerunners (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GoblinRecruiter.java b/Mage.Sets/src/mage/cards/g/GoblinRecruiter.java index d286872bf8..1a0e005e4c 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinRecruiter.java +++ b/Mage.Sets/src/mage/cards/g/GoblinRecruiter.java @@ -53,7 +53,7 @@ public class GoblinRecruiter extends CardImpl { public GoblinRecruiter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinReplica.java b/Mage.Sets/src/mage/cards/g/GoblinReplica.java index 13ba293f32..8161e8e072 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinReplica.java +++ b/Mage.Sets/src/mage/cards/g/GoblinReplica.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -56,7 +57,7 @@ public class GoblinReplica extends CardImpl { public GoblinReplica(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{3}{R}")); diff --git a/Mage.Sets/src/mage/cards/g/GoblinRimerunner.java b/Mage.Sets/src/mage/cards/g/GoblinRimerunner.java new file mode 100644 index 0000000000..a1574b4caa --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GoblinRimerunner.java @@ -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.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.combat.CantBlockTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.HasteAbility; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class GoblinRimerunner extends CardImpl { + + public GoblinRimerunner(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + + this.addSuperType(SuperType.SNOW); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {T}: Target creature can't block this turn. + Ability ability = new SimpleActivatedAbility(new CantBlockTargetEffect(Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // {snow}: Goblin Rimerunner gains haste until end of turn. + this.addAbility(new SimpleActivatedAbility(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{S}"))); + } + + public GoblinRimerunner(final GoblinRimerunner card) { + super(card); + } + + @Override + public GoblinRimerunner copy() { + return new GoblinRimerunner(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GoblinRingleader.java b/Mage.Sets/src/mage/cards/g/GoblinRingleader.java index 7036c20cba..f62d672e04 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinRingleader.java +++ b/Mage.Sets/src/mage/cards/g/GoblinRingleader.java @@ -54,7 +54,7 @@ public class GoblinRingleader extends CardImpl { public GoblinRingleader(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinRoughrider.java b/Mage.Sets/src/mage/cards/g/GoblinRoughrider.java index ea2bffad23..890e60e763 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinRoughrider.java +++ b/Mage.Sets/src/mage/cards/g/GoblinRoughrider.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class GoblinRoughrider extends CardImpl { public GoblinRoughrider (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Knight"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.KNIGHT); this.color.setRed(true); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinRuinblaster.java b/Mage.Sets/src/mage/cards/g/GoblinRuinblaster.java index c500204f6b..f42c1ff93f 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinRuinblaster.java +++ b/Mage.Sets/src/mage/cards/g/GoblinRuinblaster.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetNonBasicLandPermanent; /** @@ -50,8 +51,8 @@ public class GoblinRuinblaster extends CardImpl { public GoblinRuinblaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinSettler.java b/Mage.Sets/src/mage/cards/g/GoblinSettler.java index 529915b2bb..cd00783051 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinSettler.java +++ b/Mage.Sets/src/mage/cards/g/GoblinSettler.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetLandPermanent; /** @@ -45,7 +46,7 @@ public class GoblinSettler extends CardImpl { public GoblinSettler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinSharpshooter.java b/Mage.Sets/src/mage/cards/g/GoblinSharpshooter.java index 9102875ff6..211c1d81cc 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinSharpshooter.java +++ b/Mage.Sets/src/mage/cards/g/GoblinSharpshooter.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -51,7 +52,7 @@ public class GoblinSharpshooter extends CardImpl { public GoblinSharpshooter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinShortcutter.java b/Mage.Sets/src/mage/cards/g/GoblinShortcutter.java index 1c3d60ed12..34d27463d0 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinShortcutter.java +++ b/Mage.Sets/src/mage/cards/g/GoblinShortcutter.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CantBlockTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -46,8 +47,8 @@ public class GoblinShortcutter extends CardImpl { public GoblinShortcutter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Scout"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinShrine.java b/Mage.Sets/src/mage/cards/g/GoblinShrine.java index e0ad3013dc..bba9f70d00 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinShrine.java +++ b/Mage.Sets/src/mage/cards/g/GoblinShrine.java @@ -68,7 +68,7 @@ public class GoblinShrine extends CardImpl { public GoblinShrine(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GoblinSkyRaider.java b/Mage.Sets/src/mage/cards/g/GoblinSkyRaider.java index 10d1a363e5..c913f68005 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinSkyRaider.java +++ b/Mage.Sets/src/mage/cards/g/GoblinSkyRaider.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class GoblinSkyRaider extends CardImpl { public GoblinSkyRaider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinSkycutter.java b/Mage.Sets/src/mage/cards/g/GoblinSkycutter.java index c43f5b17d7..112f0a02ca 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinSkycutter.java +++ b/Mage.Sets/src/mage/cards/g/GoblinSkycutter.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -47,7 +48,7 @@ import mage.target.common.TargetCreaturePermanent; /** * * @author LoneFox - + * */ public class GoblinSkycutter extends CardImpl { @@ -58,15 +59,15 @@ public class GoblinSkycutter extends CardImpl { } public GoblinSkycutter(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); // Sacrifice Goblin Skycutter: Goblin Skycutter deals 2 damage to target creature with flying. That creature loses flying until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new SacrificeSourceCost()); - ability.addEffect(new LoseAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn)); + ability.addEffect(new LoseAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn).setText("that creature loses flying until end of turn")); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinSledder.java b/Mage.Sets/src/mage/cards/g/GoblinSledder.java index fa1a11cc9e..2c247cd989 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinSledder.java +++ b/Mage.Sets/src/mage/cards/g/GoblinSledder.java @@ -58,7 +58,7 @@ public class GoblinSledder extends CardImpl { public GoblinSledder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinSnowman.java b/Mage.Sets/src/mage/cards/g/GoblinSnowman.java index 3e24c11aeb..bb9ea0649f 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinSnowman.java +++ b/Mage.Sets/src/mage/cards/g/GoblinSnowman.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.PreventCombatDamageToSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterAttackingCreature; @@ -54,7 +55,7 @@ public class GoblinSnowman extends CardImpl { public GoblinSnowman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinSoothsayer.java b/Mage.Sets/src/mage/cards/g/GoblinSoothsayer.java index b22d897958..fd560f1d6e 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinSoothsayer.java +++ b/Mage.Sets/src/mage/cards/g/GoblinSoothsayer.java @@ -64,8 +64,8 @@ public class GoblinSoothsayer extends CardImpl { public GoblinSoothsayer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinSpelunkers.java b/Mage.Sets/src/mage/cards/g/GoblinSpelunkers.java index f0fbfdc067..1f663e3192 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinSpelunkers.java +++ b/Mage.Sets/src/mage/cards/g/GoblinSpelunkers.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class GoblinSpelunkers extends CardImpl { public GoblinSpelunkers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinSpy.java b/Mage.Sets/src/mage/cards/g/GoblinSpy.java index a3462e7b6e..f72bd32bdd 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinSpy.java +++ b/Mage.Sets/src/mage/cards/g/GoblinSpy.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.PlayWithTheTopCardRevealedEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -44,8 +45,8 @@ public class GoblinSpy extends CardImpl { public GoblinSpy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinSpymaster.java b/Mage.Sets/src/mage/cards/g/GoblinSpymaster.java index c82cca951d..cd4448de52 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinSpymaster.java +++ b/Mage.Sets/src/mage/cards/g/GoblinSpymaster.java @@ -50,8 +50,8 @@ public class GoblinSpymaster extends CardImpl { public GoblinSpymaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinStriker.java b/Mage.Sets/src/mage/cards/g/GoblinStriker.java index 04ccbdfe96..d26540b8f3 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinStriker.java +++ b/Mage.Sets/src/mage/cards/g/GoblinStriker.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class GoblinStriker extends CardImpl { public GoblinStriker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinSwineRider.java b/Mage.Sets/src/mage/cards/g/GoblinSwineRider.java index b2cda8071a..28c954a59a 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinSwineRider.java +++ b/Mage.Sets/src/mage/cards/g/GoblinSwineRider.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterAttackingOrBlockingCreature; /** @@ -44,7 +45,7 @@ public class GoblinSwineRider extends CardImpl { public GoblinSwineRider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinTaskmaster.java b/Mage.Sets/src/mage/cards/g/GoblinTaskmaster.java index 5e1ffdfe3d..ef93d186ba 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinTaskmaster.java +++ b/Mage.Sets/src/mage/cards/g/GoblinTaskmaster.java @@ -58,7 +58,7 @@ public class GoblinTaskmaster extends CardImpl { public GoblinTaskmaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinTestPilot.java b/Mage.Sets/src/mage/cards/g/GoblinTestPilot.java index e0125233ed..247d7a51d1 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinTestPilot.java +++ b/Mage.Sets/src/mage/cards/g/GoblinTestPilot.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.Target; import mage.target.common.TargetCreatureOrPlayer; @@ -49,9 +50,9 @@ public class GoblinTestPilot extends CardImpl { public GoblinTestPilot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Pilot"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.PILOT); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinTinkerer.java b/Mage.Sets/src/mage/cards/g/GoblinTinkerer.java index 6bd70ac464..f12b67014e 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinTinkerer.java +++ b/Mage.Sets/src/mage/cards/g/GoblinTinkerer.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -53,8 +54,8 @@ public class GoblinTinkerer extends CardImpl { public GoblinTinkerer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinTunneler.java b/Mage.Sets/src/mage/cards/g/GoblinTunneler.java index 51823c744e..faf3f434a0 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinTunneler.java +++ b/Mage.Sets/src/mage/cards/g/GoblinTunneler.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -57,8 +58,8 @@ public class GoblinTunneler extends CardImpl { public GoblinTunneler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinTurncoat.java b/Mage.Sets/src/mage/cards/g/GoblinTurncoat.java index 4e3cb371b2..214fd862be 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinTurncoat.java +++ b/Mage.Sets/src/mage/cards/g/GoblinTurncoat.java @@ -56,8 +56,8 @@ public class GoblinTurncoat extends CardImpl { public GoblinTurncoat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Goblin"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinVandal.java b/Mage.Sets/src/mage/cards/g/GoblinVandal.java index 4b41cd7c31..0f35d9b082 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinVandal.java +++ b/Mage.Sets/src/mage/cards/g/GoblinVandal.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.AssignNoCombatDamageSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -59,8 +60,8 @@ public class GoblinVandal extends CardImpl { public GoblinVandal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinWarBuggy.java b/Mage.Sets/src/mage/cards/g/GoblinWarBuggy.java index 9e8ffb278e..32a5a9bb0d 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinWarBuggy.java +++ b/Mage.Sets/src/mage/cards/g/GoblinWarBuggy.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class GoblinWarBuggy extends CardImpl { public GoblinWarBuggy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinWarPaint.java b/Mage.Sets/src/mage/cards/g/GoblinWarPaint.java index 518191a528..69b6013ca7 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinWarPaint.java +++ b/Mage.Sets/src/mage/cards/g/GoblinWarPaint.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -53,7 +54,7 @@ public class GoblinWarPaint extends CardImpl { public GoblinWarPaint(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/g/GoblinWarWagon.java b/Mage.Sets/src/mage/cards/g/GoblinWarWagon.java index b076fa4e56..a16fd04480 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinWarWagon.java +++ b/Mage.Sets/src/mage/cards/g/GoblinWarWagon.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class GoblinWarWagon extends CardImpl { public GoblinWarWagon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Juggernaut"); + this.subtype.add(SubType.JUGGERNAUT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GoblinWarchief.java b/Mage.Sets/src/mage/cards/g/GoblinWarchief.java index 849c64cd93..0b0fa0f4be 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinWarchief.java +++ b/Mage.Sets/src/mage/cards/g/GoblinWarchief.java @@ -27,7 +27,6 @@ */ package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; @@ -43,6 +42,8 @@ import mage.filter.FilterCard; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author jonubuu @@ -50,7 +51,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; public class GoblinWarchief extends CardImpl { private static final FilterCard filterSpells = new FilterCard("Goblin spells"); - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblins"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin creatures"); static { filterSpells.add(new SubtypePredicate(SubType.GOBLIN)); @@ -59,8 +60,8 @@ public class GoblinWarchief extends CardImpl { public GoblinWarchief(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinWardriver.java b/Mage.Sets/src/mage/cards/g/GoblinWardriver.java index dd730b63cc..5b6bbc18e2 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinWardriver.java +++ b/Mage.Sets/src/mage/cards/g/GoblinWardriver.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.BattleCryAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class GoblinWardriver extends CardImpl { public GoblinWardriver (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoblinWelder.java b/Mage.Sets/src/mage/cards/g/GoblinWelder.java index 3d16302718..646f298948 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinWelder.java +++ b/Mage.Sets/src/mage/cards/g/GoblinWelder.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterArtifactCard; @@ -55,8 +56,8 @@ public class GoblinWelder extends CardImpl { public GoblinWelder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinWizard.java b/Mage.Sets/src/mage/cards/g/GoblinWizard.java index 71d4a16844..755c51e88b 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinWizard.java +++ b/Mage.Sets/src/mage/cards/g/GoblinWizard.java @@ -64,8 +64,8 @@ public class GoblinWizard extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); this.rarity = Rarity.RARE; - this.subtype.add("Goblin"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoblinsOfTheFlarg.java b/Mage.Sets/src/mage/cards/g/GoblinsOfTheFlarg.java index 38033ea0e9..5e217e9f2c 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinsOfTheFlarg.java +++ b/Mage.Sets/src/mage/cards/g/GoblinsOfTheFlarg.java @@ -53,8 +53,8 @@ public class GoblinsOfTheFlarg extends CardImpl { public GoblinsOfTheFlarg(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GodFavoredGeneral.java b/Mage.Sets/src/mage/cards/g/GodFavoredGeneral.java index 96f61d8c6a..18e71fe745 100644 --- a/Mage.Sets/src/mage/cards/g/GodFavoredGeneral.java +++ b/Mage.Sets/src/mage/cards/g/GodFavoredGeneral.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.InspiredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.GodFavoredGeneralSoldierToken; /** @@ -46,8 +47,8 @@ public class GodFavoredGeneral extends CardImpl { public GodFavoredGeneral(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GodPharaohsFaithful.java b/Mage.Sets/src/mage/cards/g/GodPharaohsFaithful.java index 43028a4b0f..3f11c73617 100644 --- a/Mage.Sets/src/mage/cards/g/GodPharaohsFaithful.java +++ b/Mage.Sets/src/mage/cards/g/GodPharaohsFaithful.java @@ -1,73 +1,74 @@ -/* - * 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.cards.g; - -import java.util.UUID; -import mage.MageInt; -import mage.ObjectColor; -import mage.abilities.common.SpellCastControllerTriggeredAbility; -import mage.abilities.effects.common.GainLifeEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.ColorPredicate; - -/** - * - * @author emerald000 - */ -public class GodPharaohsFaithful extends CardImpl { - - private static final FilterSpell filter = new FilterSpell("a blue, black or red spell"); - static { - filter.add(Predicates.or(new ColorPredicate(ObjectColor.BLUE), new ColorPredicate(ObjectColor.BLACK), new ColorPredicate(ObjectColor.RED))); - } - - public GodPharaohsFaithful(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); - - this.subtype.add("Human"); - this.subtype.add("Wizard"); - this.power = new MageInt(0); - this.toughness = new MageInt(4); - - // Whenever you cast a blue, black or red spell, you gain 1 life. - this.addAbility(new SpellCastControllerTriggeredAbility(new GainLifeEffect(1), filter, false)); - } - - public GodPharaohsFaithful(final GodPharaohsFaithful card) { - super(card); - } - - @Override - public GodPharaohsFaithful copy() { - return new GodPharaohsFaithful(this); - } -} +/* + * 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.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author emerald000 + */ +public class GodPharaohsFaithful extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("a blue, black or red spell"); + static { + filter.add(Predicates.or(new ColorPredicate(ObjectColor.BLUE), new ColorPredicate(ObjectColor.BLACK), new ColorPredicate(ObjectColor.RED))); + } + + public GodPharaohsFaithful(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // Whenever you cast a blue, black or red spell, you gain 1 life. + this.addAbility(new SpellCastControllerTriggeredAbility(new GainLifeEffect(1), filter, false)); + } + + public GodPharaohsFaithful(final GodPharaohsFaithful card) { + super(card); + } + + @Override + public GodPharaohsFaithful copy() { + return new GodPharaohsFaithful(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GodPharaohsGift.java b/Mage.Sets/src/mage/cards/g/GodPharaohsGift.java index 3cf278b592..6f7c8d0ccc 100644 --- a/Mage.Sets/src/mage/cards/g/GodPharaohsGift.java +++ b/Mage.Sets/src/mage/cards/g/GodPharaohsGift.java @@ -42,6 +42,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -110,11 +111,12 @@ class GodPharaohsGiftEffect extends OneShotEffect { && cardChosen.moveToExile(exileId, sourceObject.getIdName(), source.getSourceId(), game)) { EmptyToken token = new EmptyToken(); CardUtil.copyTo(token).from(cardChosen); + token.removePTCDA(); token.getPower().modifyBaseValue(4); token.getToughness().modifyBaseValue(4); token.getColor(game).setColor(ObjectColor.BLACK); token.getSubtype(game).clear(); - token.getSubtype(game).add("Zombie"); + token.getSubtype(game).add(SubType.ZOMBIE); if (token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId())) { Permanent tokenPermanent = game.getPermanent(token.getLastAddedToken()); if (tokenPermanent != null) { diff --git a/Mage.Sets/src/mage/cards/g/GodheadOfAwe.java b/Mage.Sets/src/mage/cards/g/GodheadOfAwe.java index 1ff3e3541a..1526f1791d 100644 --- a/Mage.Sets/src/mage/cards/g/GodheadOfAwe.java +++ b/Mage.Sets/src/mage/cards/g/GodheadOfAwe.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -57,8 +58,8 @@ public class GodheadOfAwe extends CardImpl { public GodheadOfAwe(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W/U}{W/U}{W/U}{W/U}{W/U}"); - this.subtype.add("Spirit"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GodhunterOctopus.java b/Mage.Sets/src/mage/cards/g/GodhunterOctopus.java index 20ab963c61..0b96005bec 100644 --- a/Mage.Sets/src/mage/cards/g/GodhunterOctopus.java +++ b/Mage.Sets/src/mage/cards/g/GodhunterOctopus.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.CantAttackUnlessDefenderControllsPer import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; @@ -56,7 +57,7 @@ public class GodhunterOctopus extends CardImpl { public GodhunterOctopus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Octopus"); + this.subtype.add(SubType.OCTOPUS); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GodlessShrine.java b/Mage.Sets/src/mage/cards/g/GodlessShrine.java index f2cff2b36a..dc091dadd2 100644 --- a/Mage.Sets/src/mage/cards/g/GodlessShrine.java +++ b/Mage.Sets/src/mage/cards/g/GodlessShrine.java @@ -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.cards.g; import java.util.UUID; @@ -37,6 +36,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,16 +44,17 @@ import mage.constants.CardType; */ public class GodlessShrine extends CardImpl { - public GodlessShrine (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - this.subtype.add("Plains"); - this.subtype.add("Swamp"); + public GodlessShrine(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); + this.subtype.add(SubType.PLAINS); + this.subtype.add(SubType.SWAMP); + + this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); this.addAbility(new WhiteManaAbility()); this.addAbility(new BlackManaAbility()); - this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, Godless Shrine enters the battlefield tapped")); } - public GodlessShrine (final GodlessShrine card) { + public GodlessShrine(final GodlessShrine card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/g/GodoBanditWarlord.java b/Mage.Sets/src/mage/cards/g/GodoBanditWarlord.java index d50ca31fdd..0cc73b3cb0 100644 --- a/Mage.Sets/src/mage/cards/g/GodoBanditWarlord.java +++ b/Mage.Sets/src/mage/cards/g/GodoBanditWarlord.java @@ -69,8 +69,8 @@ public class GodoBanditWarlord extends CardImpl { public GodoBanditWarlord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Barbarian"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BARBARIAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GodosIrregulars.java b/Mage.Sets/src/mage/cards/g/GodosIrregulars.java index 1aeeb8e990..9feacc74f6 100644 --- a/Mage.Sets/src/mage/cards/g/GodosIrregulars.java +++ b/Mage.Sets/src/mage/cards/g/GodosIrregulars.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.BlockingAttackerIdPredicate; @@ -49,8 +50,8 @@ public class GodosIrregulars extends CardImpl { public GodosIrregulars(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/Godsend.java b/Mage.Sets/src/mage/cards/g/Godsend.java index 9581b518b5..c47dbf04cb 100644 --- a/Mage.Sets/src/mage/cards/g/Godsend.java +++ b/Mage.Sets/src/mage/cards/g/Godsend.java @@ -63,9 +63,9 @@ import mage.util.CardUtil; public class Godsend extends CardImpl { public Godsend(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +3/+3. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 3, Duration.WhileOnBattlefield))); @@ -195,7 +195,7 @@ class GodsendRuleModifyingEffect extends ContinuousRuleModifyingEffectImpl { public GodsendRuleModifyingEffect() { super(Duration.WhileOnBattlefield, Outcome.Detriment); - staticText = "Opponents can't cast cards with the same name as cards exiled with {this}"; + staticText = "Your opponents can't cast cards with the same name as cards exiled with {this}"; } public GodsendRuleModifyingEffect(final GodsendRuleModifyingEffect effect) { diff --git a/Mage.Sets/src/mage/cards/g/Godsire.java b/Mage.Sets/src/mage/cards/g/Godsire.java index 938b99c8a7..76bcf5f3ec 100644 --- a/Mage.Sets/src/mage/cards/g/Godsire.java +++ b/Mage.Sets/src/mage/cards/g/Godsire.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.GodSireBeastToken; @@ -47,7 +48,7 @@ public class Godsire extends CardImpl { public Godsire(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{G}{G}{W}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/g/Godtoucher.java b/Mage.Sets/src/mage/cards/g/Godtoucher.java index a9e88fdbf5..1f077b3d02 100644 --- a/Mage.Sets/src/mage/cards/g/Godtoucher.java +++ b/Mage.Sets/src/mage/cards/g/Godtoucher.java @@ -37,6 +37,7 @@ import mage.abilities.effects.PreventionEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class Godtoucher extends CardImpl { public Godtoucher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GodtrackerOfJund.java b/Mage.Sets/src/mage/cards/g/GodtrackerOfJund.java index 91703767e3..3c300ec464 100644 --- a/Mage.Sets/src/mage/cards/g/GodtrackerOfJund.java +++ b/Mage.Sets/src/mage/cards/g/GodtrackerOfJund.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.counters.CounterType; @@ -56,8 +57,8 @@ public class GodtrackerOfJund extends CardImpl { public GodtrackerOfJund(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); diff --git a/Mage.Sets/src/mage/cards/g/GohamDjinn.java b/Mage.Sets/src/mage/cards/g/GohamDjinn.java index 69122228ca..412d5d98d8 100644 --- a/Mage.Sets/src/mage/cards/g/GohamDjinn.java +++ b/Mage.Sets/src/mage/cards/g/GohamDjinn.java @@ -30,13 +30,17 @@ package mage.cards.g; import java.util.UUID; import mage.MageInt; import mage.ObjectColor; +import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.MostCommonColorCondition; +import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.RegenerateSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,11 +53,13 @@ public class GohamDjinn extends CardImpl { public GohamDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(5); this.toughness = new MageInt(5); // {1}{B}: Regenerate Goham Djinn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{1}{B}"))); + // Goham Djinn gets -2/-2 as long as black is the most common color among all permanents or is tied for most common. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new BoostSourceEffect(-2, -2, Duration.WhileOnBattlefield), diff --git a/Mage.Sets/src/mage/cards/g/GoldForgedSentinel.java b/Mage.Sets/src/mage/cards/g/GoldForgedSentinel.java index 03529ec53d..075126de39 100644 --- a/Mage.Sets/src/mage/cards/g/GoldForgedSentinel.java +++ b/Mage.Sets/src/mage/cards/g/GoldForgedSentinel.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class GoldForgedSentinel extends CardImpl { public GoldForgedSentinel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Chimera"); + this.subtype.add(SubType.CHIMERA); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GoldMyr.java b/Mage.Sets/src/mage/cards/g/GoldMyr.java index ba5d68e30a..19f8b62846 100644 --- a/Mage.Sets/src/mage/cards/g/GoldMyr.java +++ b/Mage.Sets/src/mage/cards/g/GoldMyr.java @@ -34,6 +34,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class GoldMyr extends CardImpl { public GoldMyr (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(1); this.addAbility(new WhiteManaAbility()); diff --git a/Mage.Sets/src/mage/cards/g/GoldenBear.java b/Mage.Sets/src/mage/cards/g/GoldenBear.java index 39ca9922bc..930d9c10ae 100644 --- a/Mage.Sets/src/mage/cards/g/GoldenBear.java +++ b/Mage.Sets/src/mage/cards/g/GoldenBear.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class GoldenBear extends CardImpl { public GoldenBear(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Bear"); + this.subtype.add(SubType.BEAR); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GoldenHind.java b/Mage.Sets/src/mage/cards/g/GoldenHind.java index 2f629db8fd..6461a839b0 100644 --- a/Mage.Sets/src/mage/cards/g/GoldenHind.java +++ b/Mage.Sets/src/mage/cards/g/GoldenHind.java @@ -33,6 +33,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class GoldenHind extends CardImpl { public GoldenHind(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elk"); + this.subtype.add(SubType.ELK); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoldenglowMoth.java b/Mage.Sets/src/mage/cards/g/GoldenglowMoth.java index 6cf1af85bd..5cfb209682 100644 --- a/Mage.Sets/src/mage/cards/g/GoldenglowMoth.java +++ b/Mage.Sets/src/mage/cards/g/GoldenglowMoth.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class GoldenglowMoth extends CardImpl { public GoldenglowMoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoldenhideOx.java b/Mage.Sets/src/mage/cards/g/GoldenhideOx.java index b9b489604d..05cf71f016 100644 --- a/Mage.Sets/src/mage/cards/g/GoldenhideOx.java +++ b/Mage.Sets/src/mage/cards/g/GoldenhideOx.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.MustBeBlockedByAtLeastOneTargetEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -46,7 +47,7 @@ public class GoldenhideOx extends CardImpl { public GoldenhideOx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{5}{G}"); - this.subtype.add("Ox"); + this.subtype.add(SubType.OX); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GoldmeadowDodger.java b/Mage.Sets/src/mage/cards/g/GoldmeadowDodger.java index 1e1b4a2290..e14cd8654c 100644 --- a/Mage.Sets/src/mage/cards/g/GoldmeadowDodger.java +++ b/Mage.Sets/src/mage/cards/g/GoldmeadowDodger.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; @@ -53,8 +54,8 @@ public class GoldmeadowDodger extends CardImpl { public GoldmeadowDodger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoldmeadowHarrier.java b/Mage.Sets/src/mage/cards/g/GoldmeadowHarrier.java index d0a7f44094..7492916ddd 100644 --- a/Mage.Sets/src/mage/cards/g/GoldmeadowHarrier.java +++ b/Mage.Sets/src/mage/cards/g/GoldmeadowHarrier.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class GoldmeadowHarrier extends CardImpl { public GoldmeadowHarrier (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoldmeadowLookout.java b/Mage.Sets/src/mage/cards/g/GoldmeadowLookout.java index 9a925176ca..792b65ef03 100644 --- a/Mage.Sets/src/mage/cards/g/GoldmeadowLookout.java +++ b/Mage.Sets/src/mage/cards/g/GoldmeadowLookout.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.GoldmeadowHarrierToken; @@ -49,8 +50,8 @@ public class GoldmeadowLookout extends CardImpl { public GoldmeadowLookout(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoldmeadowStalwart.java b/Mage.Sets/src/mage/cards/g/GoldmeadowStalwart.java index 8cff0405be..73ee2b1273 100644 --- a/Mage.Sets/src/mage/cards/g/GoldmeadowStalwart.java +++ b/Mage.Sets/src/mage/cards/g/GoldmeadowStalwart.java @@ -53,8 +53,8 @@ public class GoldmeadowStalwart extends CardImpl { public GoldmeadowStalwart(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoldnightCastigator.java b/Mage.Sets/src/mage/cards/g/GoldnightCastigator.java index 8ac451994e..9411b61bbf 100644 --- a/Mage.Sets/src/mage/cards/g/GoldnightCastigator.java +++ b/Mage.Sets/src/mage/cards/g/GoldnightCastigator.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class GoldnightCastigator extends CardImpl { public GoldnightCastigator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/g/GoldnightCommander.java b/Mage.Sets/src/mage/cards/g/GoldnightCommander.java index c660f321b7..56f03170be 100644 --- a/Mage.Sets/src/mage/cards/g/GoldnightCommander.java +++ b/Mage.Sets/src/mage/cards/g/GoldnightCommander.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -45,9 +46,9 @@ public class GoldnightCommander extends CardImpl { public GoldnightCommander(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoldnightRedeemer.java b/Mage.Sets/src/mage/cards/g/GoldnightRedeemer.java index cfadb2b101..633c5ec444 100644 --- a/Mage.Sets/src/mage/cards/g/GoldnightRedeemer.java +++ b/Mage.Sets/src/mage/cards/g/GoldnightRedeemer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -54,7 +55,7 @@ public class GoldnightRedeemer extends CardImpl { public GoldnightRedeemer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GolemArtisan.java b/Mage.Sets/src/mage/cards/g/GolemArtisan.java index 0511f65436..8647d6ede6 100644 --- a/Mage.Sets/src/mage/cards/g/GolemArtisan.java +++ b/Mage.Sets/src/mage/cards/g/GolemArtisan.java @@ -46,6 +46,7 @@ import mage.cards.CardSetInfo; import mage.choices.Choice; import mage.choices.ChoiceImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -62,7 +63,7 @@ public class GolemArtisan extends CardImpl { public GolemArtisan(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GolemSkinGauntlets.java b/Mage.Sets/src/mage/cards/g/GolemSkinGauntlets.java index 4add2a0d10..8dbcccd31d 100644 --- a/Mage.Sets/src/mage/cards/g/GolemSkinGauntlets.java +++ b/Mage.Sets/src/mage/cards/g/GolemSkinGauntlets.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class GolemSkinGauntlets extends CardImpl { public GolemSkinGauntlets(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new GolemSkinGauntletsAttachedCount(), new StaticValue(0), Duration.WhileOnBattlefield))); this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2))); @@ -90,7 +91,7 @@ class GolemSkinGauntletsAttachedCount implements DynamicValue { List attachments = permanent.getAttachments(); for (UUID attachmentId : attachments) { Permanent attached = game.getPermanent(attachmentId); - if (attached != null && attached.getSubtype(game).contains("Equipment")) { + if (attached != null && attached.hasSubtype(SubType.EQUIPMENT, game)) { count++; } } diff --git a/Mage.Sets/src/mage/cards/g/GolgariBrownscale.java b/Mage.Sets/src/mage/cards/g/GolgariBrownscale.java index 85fe9f3120..2c546fbc93 100644 --- a/Mage.Sets/src/mage/cards/g/GolgariBrownscale.java +++ b/Mage.Sets/src/mage/cards/g/GolgariBrownscale.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DredgeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class GolgariBrownscale extends CardImpl { public GolgariBrownscale(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GolgariDecoy.java b/Mage.Sets/src/mage/cards/g/GolgariDecoy.java index 73847b195b..b9edac6a7b 100644 --- a/Mage.Sets/src/mage/cards/g/GolgariDecoy.java +++ b/Mage.Sets/src/mage/cards/g/GolgariDecoy.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ScavengeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class GolgariDecoy extends CardImpl { public GolgariDecoy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GolgariGraveTroll.java b/Mage.Sets/src/mage/cards/g/GolgariGraveTroll.java index 65ff855217..0f2570e33e 100644 --- a/Mage.Sets/src/mage/cards/g/GolgariGraveTroll.java +++ b/Mage.Sets/src/mage/cards/g/GolgariGraveTroll.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.DredgeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -57,8 +58,8 @@ public class GolgariGraveTroll extends CardImpl { public GolgariGraveTroll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Troll"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.TROLL); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/g/GolgariGuildmage.java b/Mage.Sets/src/mage/cards/g/GolgariGuildmage.java index 1bc7c7b59b..2398c625ff 100644 --- a/Mage.Sets/src/mage/cards/g/GolgariGuildmage.java +++ b/Mage.Sets/src/mage/cards/g/GolgariGuildmage.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterCreatureCard; @@ -54,8 +55,8 @@ public class GolgariGuildmage extends CardImpl { public GolgariGuildmage (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B/G}{B/G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GolgariKeyrune.java b/Mage.Sets/src/mage/cards/g/GolgariKeyrune.java index cf26b5ae5b..830bdad8e9 100644 --- a/Mage.Sets/src/mage/cards/g/GolgariKeyrune.java +++ b/Mage.Sets/src/mage/cards/g/GolgariKeyrune.java @@ -38,6 +38,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -74,7 +75,7 @@ public class GolgariKeyrune extends CardImpl { cardType.add(CardType.CREATURE); color.setGreen(true); color.setBlack(true); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); power = new MageInt(2); toughness = new MageInt(2); this.addAbility(DeathtouchAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/g/GolgariLonglegs.java b/Mage.Sets/src/mage/cards/g/GolgariLonglegs.java index ef2e4b1f9a..3f631fc077 100644 --- a/Mage.Sets/src/mage/cards/g/GolgariLonglegs.java +++ b/Mage.Sets/src/mage/cards/g/GolgariLonglegs.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class GolgariLonglegs extends CardImpl { public GolgariLonglegs(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B/G}{B/G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GolgariRotwurm.java b/Mage.Sets/src/mage/cards/g/GolgariRotwurm.java index dfc5ce1271..2f0ded16b8 100644 --- a/Mage.Sets/src/mage/cards/g/GolgariRotwurm.java +++ b/Mage.Sets/src/mage/cards/g/GolgariRotwurm.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -50,8 +51,8 @@ public class GolgariRotwurm extends CardImpl { public GolgariRotwurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{G}"); - this.subtype.add("Zombie"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WURM); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GolgariThug.java b/Mage.Sets/src/mage/cards/g/GolgariThug.java index 02d95dcc5a..242c626047 100644 --- a/Mage.Sets/src/mage/cards/g/GolgariThug.java +++ b/Mage.Sets/src/mage/cards/g/GolgariThug.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DredgeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetCardInYourGraveyard; @@ -54,8 +55,8 @@ public class GolgariThug extends CardImpl { public GolgariThug(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoliathBeetle.java b/Mage.Sets/src/mage/cards/g/GoliathBeetle.java index 0fa29f339f..6425a636ea 100644 --- a/Mage.Sets/src/mage/cards/g/GoliathBeetle.java +++ b/Mage.Sets/src/mage/cards/g/GoliathBeetle.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class GoliathBeetle extends CardImpl { public GoliathBeetle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GoliathSphinx.java b/Mage.Sets/src/mage/cards/g/GoliathSphinx.java index 86e6f88446..79412133e2 100644 --- a/Mage.Sets/src/mage/cards/g/GoliathSphinx.java +++ b/Mage.Sets/src/mage/cards/g/GoliathSphinx.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class GoliathSphinx extends CardImpl { public GoliathSphinx (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(8); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/g/GoliathSpider.java b/Mage.Sets/src/mage/cards/g/GoliathSpider.java index d9183937d3..0412425285 100644 --- a/Mage.Sets/src/mage/cards/g/GoliathSpider.java +++ b/Mage.Sets/src/mage/cards/g/GoliathSpider.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class GoliathSpider extends CardImpl { public GoliathSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(7); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/g/Gomazoa.java b/Mage.Sets/src/mage/cards/g/Gomazoa.java index b7ef22b2c8..0d8bc788fe 100644 --- a/Mage.Sets/src/mage/cards/g/Gomazoa.java +++ b/Mage.Sets/src/mage/cards/g/Gomazoa.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.WatcherScope; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class Gomazoa extends CardImpl { public Gomazoa(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Jellyfish"); + this.subtype.add(SubType.JELLYFISH); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GontiLordOfLuxury.java b/Mage.Sets/src/mage/cards/g/GontiLordOfLuxury.java index a18b694b0b..328db4a180 100644 --- a/Mage.Sets/src/mage/cards/g/GontiLordOfLuxury.java +++ b/Mage.Sets/src/mage/cards/g/GontiLordOfLuxury.java @@ -63,8 +63,8 @@ public class GontiLordOfLuxury extends CardImpl { public GontiLordOfLuxury(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Aetherborn"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.AETHERBORN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GoreHouseChainwalker.java b/Mage.Sets/src/mage/cards/g/GoreHouseChainwalker.java index 7055635816..3254084ba9 100644 --- a/Mage.Sets/src/mage/cards/g/GoreHouseChainwalker.java +++ b/Mage.Sets/src/mage/cards/g/GoreHouseChainwalker.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.UnleashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class GoreHouseChainwalker extends CardImpl { public GoreHouseChainwalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoreSwine.java b/Mage.Sets/src/mage/cards/g/GoreSwine.java index ef17a5cf02..bf3364d156 100644 --- a/Mage.Sets/src/mage/cards/g/GoreSwine.java +++ b/Mage.Sets/src/mage/cards/g/GoreSwine.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class GoreSwine extends CardImpl { public GoreSwine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Boar"); + this.subtype.add(SubType.BOAR); this.power = new MageInt(4); this.toughness = new MageInt(1); } diff --git a/Mage.Sets/src/mage/cards/g/GoreVassal.java b/Mage.Sets/src/mage/cards/g/GoreVassal.java index 8a2f7738fb..475f5d5c38 100644 --- a/Mage.Sets/src/mage/cards/g/GoreVassal.java +++ b/Mage.Sets/src/mage/cards/g/GoreVassal.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class GoreVassal extends CardImpl { public GoreVassal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GorehornMinotaurs.java b/Mage.Sets/src/mage/cards/g/GorehornMinotaurs.java index 8b5fc560ac..3212e0ba53 100644 --- a/Mage.Sets/src/mage/cards/g/GorehornMinotaurs.java +++ b/Mage.Sets/src/mage/cards/g/GorehornMinotaurs.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.BloodthirstAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class GorehornMinotaurs extends CardImpl { public GorehornMinotaurs(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GoretuskFirebeast.java b/Mage.Sets/src/mage/cards/g/GoretuskFirebeast.java index d3e6da6512..aff052e1ab 100644 --- a/Mage.Sets/src/mage/cards/g/GoretuskFirebeast.java +++ b/Mage.Sets/src/mage/cards/g/GoretuskFirebeast.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -45,9 +46,9 @@ public class GoretuskFirebeast extends CardImpl { public GoretuskFirebeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Boar"); - this.subtype.add("Beast"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.BOAR); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GorgerWurm.java b/Mage.Sets/src/mage/cards/g/GorgerWurm.java index 1056606ff7..cf6f5b3000 100644 --- a/Mage.Sets/src/mage/cards/g/GorgerWurm.java +++ b/Mage.Sets/src/mage/cards/g/GorgerWurm.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.DevourAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class GorgerWurm extends CardImpl { public GorgerWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GorgonFlail.java b/Mage.Sets/src/mage/cards/g/GorgonFlail.java index 64409d8a9f..43acd3fc4d 100644 --- a/Mage.Sets/src/mage/cards/g/GorgonFlail.java +++ b/Mage.Sets/src/mage/cards/g/GorgonFlail.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class GorgonFlail extends CardImpl { public GorgonFlail(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(DeathtouchAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/g/GorgonRecluse.java b/Mage.Sets/src/mage/cards/g/GorgonRecluse.java index fda81d4cb0..b12a05f9c4 100644 --- a/Mage.Sets/src/mage/cards/g/GorgonRecluse.java +++ b/Mage.Sets/src/mage/cards/g/GorgonRecluse.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.MadnessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -58,7 +59,7 @@ public class GorgonRecluse extends CardImpl { public GorgonRecluse(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); - this.subtype.add("Gorgon"); + this.subtype.add(SubType.GORGON); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GorgonsHead.java b/Mage.Sets/src/mage/cards/g/GorgonsHead.java index 01d263ade5..3188daa4d7 100644 --- a/Mage.Sets/src/mage/cards/g/GorgonsHead.java +++ b/Mage.Sets/src/mage/cards/g/GorgonsHead.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class GorgonsHead extends CardImpl { public GorgonsHead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has deathtouch. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(DeathtouchAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/g/GorillaBerserkers.java b/Mage.Sets/src/mage/cards/g/GorillaBerserkers.java index 0e7945d28e..6862b37de7 100644 --- a/Mage.Sets/src/mage/cards/g/GorillaBerserkers.java +++ b/Mage.Sets/src/mage/cards/g/GorillaBerserkers.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class GorillaBerserkers extends CardImpl { public GorillaBerserkers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Ape"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.APE); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GorillaChieftain.java b/Mage.Sets/src/mage/cards/g/GorillaChieftain.java index 87a38ec395..86c7b44b0a 100644 --- a/Mage.Sets/src/mage/cards/g/GorillaChieftain.java +++ b/Mage.Sets/src/mage/cards/g/GorillaChieftain.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class GorillaChieftain extends CardImpl { public GorillaChieftain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Ape"); + this.subtype.add(SubType.APE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GorillaPack.java b/Mage.Sets/src/mage/cards/g/GorillaPack.java index 9eb27397f9..d82ff45891 100644 --- a/Mage.Sets/src/mage/cards/g/GorillaPack.java +++ b/Mage.Sets/src/mage/cards/g/GorillaPack.java @@ -49,7 +49,7 @@ public class GorillaPack extends CardImpl { public GorillaPack(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Ape"); + this.subtype.add(SubType.APE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GorillaShaman.java b/Mage.Sets/src/mage/cards/g/GorillaShaman.java index 2f66fc9fcb..751fed34d6 100644 --- a/Mage.Sets/src/mage/cards/g/GorillaShaman.java +++ b/Mage.Sets/src/mage/cards/g/GorillaShaman.java @@ -36,14 +36,12 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; +import mage.constants.SubType; +import mage.constants.TargetAdjustment; import mage.constants.Zone; -import mage.filter.common.FilterArtifactPermanent; +import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; -import mage.game.Game; -import mage.target.Target; import mage.target.TargetPermanent; /** @@ -52,38 +50,29 @@ import mage.target.TargetPermanent; */ public class GorillaShaman extends CardImpl { - private final UUID originalId; + private static final FilterPermanent filter = new FilterPermanent("noncreature artifact with converted mana cost X"); + + static { + filter.add(new CardTypePredicate(CardType.ARTIFACT)); + filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); + } public GorillaShaman(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Ape"); - this.subtype.add("Shaman"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); + this.subtype.add(SubType.APE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); // {X}{X}{1}: Destroy target noncreature artifact with converted mana cost X. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{X}{X}{1}")); - ability.addTarget(new TargetPermanent(new FilterArtifactPermanent("noncreature artifact with converted mana cost X"))); - originalId = ability.getOriginalId(); + ability.addTarget(new TargetPermanent(filter)); + ability.setTargetAdjustment(TargetAdjustment.X_CMC_EQUAL_PERM); this.addAbility(ability); } - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(originalId)) { - int xValue = ability.getManaCostsToPay().getX(); - ability.getTargets().clear(); - FilterArtifactPermanent filter = new FilterArtifactPermanent(new StringBuilder("noncreature artifact with converted mana cost ").append(xValue).toString()); - filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, xValue)); - filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); - Target target = new TargetPermanent(filter); - ability.addTarget(target); - } - } - public GorillaShaman(final GorillaShaman card) { super(card); - this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/cards/g/GorillaTitan.java b/Mage.Sets/src/mage/cards/g/GorillaTitan.java index ee2c8ef373..4806542fe9 100644 --- a/Mage.Sets/src/mage/cards/g/GorillaTitan.java +++ b/Mage.Sets/src/mage/cards/g/GorillaTitan.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class GorillaTitan extends CardImpl { public GorillaTitan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Ape"); + this.subtype.add(SubType.APE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GorillaWarrior.java b/Mage.Sets/src/mage/cards/g/GorillaWarrior.java index 82d0c53627..f3c3ba24f1 100644 --- a/Mage.Sets/src/mage/cards/g/GorillaWarrior.java +++ b/Mage.Sets/src/mage/cards/g/GorillaWarrior.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class GorillaWarrior extends CardImpl { public GorillaWarrior (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Ape"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.APE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GoringCeratops.java b/Mage.Sets/src/mage/cards/g/GoringCeratops.java new file mode 100644 index 0000000000..b8a30f1a26 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GoringCeratops.java @@ -0,0 +1,75 @@ +/* + * 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.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.StaticFilters; + +/** + * + * @author caldover + */ +public class GoringCeratops extends CardImpl { + + public GoringCeratops(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Double Strike + this.addAbility(DoubleStrikeAbility.getInstance()); + + // Whenever Goring Ceratops attacks, other creatures you control gain double strike until end of turn. + Effect effect = new GainAbilityControlledEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, true); + effect.setText("other creatures you control gain double strike until end of turn"); + Ability ability = new AttacksTriggeredAbility(effect, false); + this.addAbility(ability); + } + + public GoringCeratops(final GoringCeratops card) { + super(card); + } + + @Override + public GoringCeratops copy() { + return new GoringCeratops(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GossamerPhantasm.java b/Mage.Sets/src/mage/cards/g/GossamerPhantasm.java index 280d997d4c..5771bc1638 100644 --- a/Mage.Sets/src/mage/cards/g/GossamerPhantasm.java +++ b/Mage.Sets/src/mage/cards/g/GossamerPhantasm.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class GossamerPhantasm extends CardImpl { public GossamerPhantasm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GracebladeArtisan.java b/Mage.Sets/src/mage/cards/g/GracebladeArtisan.java index 218afdd85b..a4d50f7e2e 100644 --- a/Mage.Sets/src/mage/cards/g/GracebladeArtisan.java +++ b/Mage.Sets/src/mage/cards/g/GracebladeArtisan.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,8 +47,8 @@ public class GracebladeArtisan extends CardImpl { public GracebladeArtisan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GracefulAdept.java b/Mage.Sets/src/mage/cards/g/GracefulAdept.java index caceeaf3bd..fd8c4e5dae 100644 --- a/Mage.Sets/src/mage/cards/g/GracefulAdept.java +++ b/Mage.Sets/src/mage/cards/g/GracefulAdept.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect. import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class GracefulAdept extends CardImpl { public GracefulAdept(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GracefulAntelope.java b/Mage.Sets/src/mage/cards/g/GracefulAntelope.java index 31384ee670..d05f1044d4 100644 --- a/Mage.Sets/src/mage/cards/g/GracefulAntelope.java +++ b/Mage.Sets/src/mage/cards/g/GracefulAntelope.java @@ -50,7 +50,7 @@ public class GracefulAntelope extends CardImpl { public GracefulAntelope(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Antelope"); + this.subtype.add(SubType.ANTELOPE); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GracefulCat.java b/Mage.Sets/src/mage/cards/g/GracefulCat.java index 7980497b0d..69f7b9abd3 100644 --- a/Mage.Sets/src/mage/cards/g/GracefulCat.java +++ b/Mage.Sets/src/mage/cards/g/GracefulCat.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,7 +47,7 @@ public class GracefulCat extends CardImpl { public GracefulCat(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GrafMole.java b/Mage.Sets/src/mage/cards/g/GrafMole.java index 050fa143b1..90acdffb6d 100644 --- a/Mage.Sets/src/mage/cards/g/GrafMole.java +++ b/Mage.Sets/src/mage/cards/g/GrafMole.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -47,8 +48,8 @@ public class GrafMole extends CardImpl { public GrafMole(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Mole"); - this.subtype.add("Beast"); + this.subtype.add(SubType.MOLE); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(4); @@ -90,7 +91,7 @@ class GrafMoleTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { return event.getPlayerId().equals(this.getControllerId()) - && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).getSubtype(game).contains("Clue"); + && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).hasSubtype(SubType.CLUE, game); } @Override diff --git a/Mage.Sets/src/mage/cards/g/GrafRats.java b/Mage.Sets/src/mage/cards/g/GrafRats.java index 991160c000..4792cc5fd7 100644 --- a/Mage.Sets/src/mage/cards/g/GrafRats.java +++ b/Mage.Sets/src/mage/cards/g/GrafRats.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.c.ChitteringHost; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Rarity; import mage.constants.TargetController; @@ -48,7 +49,7 @@ public class GrafRats extends CardImpl { public GrafRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GraftedExoskeleton.java b/Mage.Sets/src/mage/cards/g/GraftedExoskeleton.java index 9ad0c63db4..9f505348c7 100644 --- a/Mage.Sets/src/mage/cards/g/GraftedExoskeleton.java +++ b/Mage.Sets/src/mage/cards/g/GraftedExoskeleton.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class GraftedExoskeleton extends CardImpl { public GraftedExoskeleton(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+2 and has infect. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(InfectAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/g/GraftedWargear.java b/Mage.Sets/src/mage/cards/g/GraftedWargear.java index d3194e1de8..ed24eb5a89 100644 --- a/Mage.Sets/src/mage/cards/g/GraftedWargear.java +++ b/Mage.Sets/src/mage/cards/g/GraftedWargear.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class GraftedWargear extends CardImpl { public GraftedWargear(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +3/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 2))); diff --git a/Mage.Sets/src/mage/cards/g/GrandAbolisher.java b/Mage.Sets/src/mage/cards/g/GrandAbolisher.java index df26b49d40..2eec9adc1a 100644 --- a/Mage.Sets/src/mage/cards/g/GrandAbolisher.java +++ b/Mage.Sets/src/mage/cards/g/GrandAbolisher.java @@ -36,6 +36,7 @@ import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class GrandAbolisher extends CardImpl { public GrandAbolisher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GrandArbiterAugustinIV.java b/Mage.Sets/src/mage/cards/g/GrandArbiterAugustinIV.java index c91e672fbd..cb9efb4234 100644 --- a/Mage.Sets/src/mage/cards/g/GrandArbiterAugustinIV.java +++ b/Mage.Sets/src/mage/cards/g/GrandArbiterAugustinIV.java @@ -59,8 +59,8 @@ public class GrandArbiterAugustinIV extends CardImpl { public GrandArbiterAugustinIV(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GrandArchitect.java b/Mage.Sets/src/mage/cards/g/GrandArchitect.java index 2d492873c0..8432486c0a 100644 --- a/Mage.Sets/src/mage/cards/g/GrandArchitect.java +++ b/Mage.Sets/src/mage/cards/g/GrandArchitect.java @@ -69,8 +69,8 @@ public class GrandArchitect extends CardImpl { public GrandArchitect(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GrandMoffTarkin.java b/Mage.Sets/src/mage/cards/g/GrandMoffTarkin.java index 4b0232a594..2dc8e873cc 100644 --- a/Mage.Sets/src/mage/cards/g/GrandMoffTarkin.java +++ b/Mage.Sets/src/mage/cards/g/GrandMoffTarkin.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -57,8 +58,8 @@ public class GrandMoffTarkin extends CardImpl { public GrandMoffTarkin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GrandmotherSengir.java b/Mage.Sets/src/mage/cards/g/GrandmotherSengir.java index 844ec41602..f16364cd88 100644 --- a/Mage.Sets/src/mage/cards/g/GrandmotherSengir.java +++ b/Mage.Sets/src/mage/cards/g/GrandmotherSengir.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class GrandmotherSengir extends CardImpl { public GrandmotherSengir(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GrangerGuildmage.java b/Mage.Sets/src/mage/cards/g/GrangerGuildmage.java index 5ef84eb0b5..c5cdbce274 100644 --- a/Mage.Sets/src/mage/cards/g/GrangerGuildmage.java +++ b/Mage.Sets/src/mage/cards/g/GrangerGuildmage.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -53,8 +54,8 @@ public class GrangerGuildmage extends CardImpl { public GrangerGuildmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GraniteGargoyle.java b/Mage.Sets/src/mage/cards/g/GraniteGargoyle.java index 994d4ca8c1..fe6f118a16 100644 --- a/Mage.Sets/src/mage/cards/g/GraniteGargoyle.java +++ b/Mage.Sets/src/mage/cards/g/GraniteGargoyle.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class GraniteGargoyle extends CardImpl { public GraniteGargoyle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Gargoyle"); + this.subtype.add(SubType.GARGOYLE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GraniteGrip.java b/Mage.Sets/src/mage/cards/g/GraniteGrip.java index b87be14984..d834234b9a 100644 --- a/Mage.Sets/src/mage/cards/g/GraniteGrip.java +++ b/Mage.Sets/src/mage/cards/g/GraniteGrip.java @@ -57,7 +57,7 @@ public class GraniteGrip extends CardImpl { public GraniteGrip(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/g/GraniticTitan.java b/Mage.Sets/src/mage/cards/g/GraniticTitan.java index 92810fc34d..22fd617fe8 100644 --- a/Mage.Sets/src/mage/cards/g/GraniticTitan.java +++ b/Mage.Sets/src/mage/cards/g/GraniticTitan.java @@ -8,12 +8,13 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; public class GraniticTitan extends CardImpl { public GraniticTitan(UUID ownerId, CardSetInfo cardSetInfo){ super(ownerId, cardSetInfo, new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(5); toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GrapeshotCatapult.java b/Mage.Sets/src/mage/cards/g/GrapeshotCatapult.java index f8d715a5c1..e3a70e9749 100644 --- a/Mage.Sets/src/mage/cards/g/GrapeshotCatapult.java +++ b/Mage.Sets/src/mage/cards/g/GrapeshotCatapult.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -56,7 +57,7 @@ public class GrapeshotCatapult extends CardImpl { public GrapeshotCatapult(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GrapplerSpider.java b/Mage.Sets/src/mage/cards/g/GrapplerSpider.java index f092f589bf..c5888ffb73 100644 --- a/Mage.Sets/src/mage/cards/g/GrapplerSpider.java +++ b/Mage.Sets/src/mage/cards/g/GrapplerSpider.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class GrapplerSpider extends CardImpl { public GrapplerSpider (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.color.setGreen(true); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GrapplingHook.java b/Mage.Sets/src/mage/cards/g/GrapplingHook.java index 1ed16470e0..54065b2299 100644 --- a/Mage.Sets/src/mage/cards/g/GrapplingHook.java +++ b/Mage.Sets/src/mage/cards/g/GrapplingHook.java @@ -51,7 +51,7 @@ public class GrapplingHook extends CardImpl { public GrapplingHook(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has double strike. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(DoubleStrikeAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/g/GraspOfTheHieromancer.java b/Mage.Sets/src/mage/cards/g/GraspOfTheHieromancer.java index 7abb17e3e6..cab1e73f0f 100644 --- a/Mage.Sets/src/mage/cards/g/GraspOfTheHieromancer.java +++ b/Mage.Sets/src/mage/cards/g/GraspOfTheHieromancer.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class GraspOfTheHieromancer extends CardImpl { public GraspOfTheHieromancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GraspingCurrent.java b/Mage.Sets/src/mage/cards/g/GraspingCurrent.java new file mode 100644 index 0000000000..cbc5d71444 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GraspingCurrent.java @@ -0,0 +1,71 @@ +/* + * 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.cards.g; + +import java.util.UUID; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.search.SearchLibraryGraveyardPutInHandEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class GraspingCurrent extends CardImpl { + + private final static FilterCard filter = new FilterCard("Jace, Ingenious Mind-Mage"); + + static { + filter.add(new NamePredicate("Jace, Ingenious Mind-Mage")); + } + + public GraspingCurrent(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}"); + + // Return up to two target creatures to their owner's hand. + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2)); + + // Search your library and/or graveyard for a card named Jace, Ingenious Mind-Mage, reveal it, then put it into your hand. If you searched your library this way, shuffle it. + this.getSpellAbility().addEffect(new SearchLibraryGraveyardPutInHandEffect(filter)); + } + + public GraspingCurrent(final GraspingCurrent card) { + super(card); + } + + @Override + public GraspingCurrent copy() { + return new GraspingCurrent(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GraspingDunes.java b/Mage.Sets/src/mage/cards/g/GraspingDunes.java index afbbb355cd..9771c12c81 100644 --- a/Mage.Sets/src/mage/cards/g/GraspingDunes.java +++ b/Mage.Sets/src/mage/cards/g/GraspingDunes.java @@ -1,76 +1,77 @@ -/* - * 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.cards.g; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.ActivateAsSorceryActivatedAbility; -import mage.abilities.costs.common.SacrificeSourceCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.abilities.mana.ColorlessManaAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.counters.CounterType; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author jeffwadsworth - */ -public class GraspingDunes extends CardImpl { - - public GraspingDunes(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - - this.subtype.add("Desert"); - - // {T}: Add {C} to your mana pool. - this.addAbility(new ColorlessManaAbility()); - - // {1}, {T}, Sacrifice Grasping Dunes: Put a -1/-1 counter on target creature. Activate this ability only any time you could cast a sorcery. - Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.M1M1.createInstance()), new ManaCostsImpl("{1}")); - ability.addCost(new TapSourceCost()); - ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability); - - } - - public GraspingDunes(final GraspingDunes card) { - super(card); - } - - @Override - public GraspingDunes copy() { - return new GraspingDunes(this); - } -} +/* + * 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.cards.g; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author jeffwadsworth + */ +public class GraspingDunes extends CardImpl { + + public GraspingDunes(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + this.subtype.add(SubType.DESERT); + + // {T}: Add {C} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {1}, {T}, Sacrifice Grasping Dunes: Put a -1/-1 counter on target creature. Activate this ability only any time you could cast a sorcery. + Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.M1M1.createInstance()), new ManaCostsImpl("{1}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + } + + public GraspingDunes(final GraspingDunes card) { + super(card); + } + + @Override + public GraspingDunes copy() { + return new GraspingDunes(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GrasslandCrusader.java b/Mage.Sets/src/mage/cards/g/GrasslandCrusader.java index 31af29807d..39031d19de 100644 --- a/Mage.Sets/src/mage/cards/g/GrasslandCrusader.java +++ b/Mage.Sets/src/mage/cards/g/GrasslandCrusader.java @@ -58,9 +58,9 @@ public class GrasslandCrusader extends CardImpl { public GrasslandCrusader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GraveBramble.java b/Mage.Sets/src/mage/cards/g/GraveBramble.java index 9706ef4786..93d54e9621 100644 --- a/Mage.Sets/src/mage/cards/g/GraveBramble.java +++ b/Mage.Sets/src/mage/cards/g/GraveBramble.java @@ -53,7 +53,7 @@ public class GraveBramble extends CardImpl { public GraveBramble(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Plant"); + this.subtype.add(SubType.PLANT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GraveDefiler.java b/Mage.Sets/src/mage/cards/g/GraveDefiler.java index 628a7455b1..2df5dba5dd 100644 --- a/Mage.Sets/src/mage/cards/g/GraveDefiler.java +++ b/Mage.Sets/src/mage/cards/g/GraveDefiler.java @@ -56,7 +56,7 @@ public class GraveDefiler extends CardImpl { public GraveDefiler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GraveRobbers.java b/Mage.Sets/src/mage/cards/g/GraveRobbers.java index 57933c7598..3178cd6e03 100644 --- a/Mage.Sets/src/mage/cards/g/GraveRobbers.java +++ b/Mage.Sets/src/mage/cards/g/GraveRobbers.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterArtifactCard; import mage.target.common.TargetCardInGraveyard; @@ -50,8 +51,8 @@ public class GraveRobbers extends CardImpl { public GraveRobbers(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GraveScrabbler.java b/Mage.Sets/src/mage/cards/g/GraveScrabbler.java index b21fed93bc..ccb3b459e7 100644 --- a/Mage.Sets/src/mage/cards/g/GraveScrabbler.java +++ b/Mage.Sets/src/mage/cards/g/GraveScrabbler.java @@ -14,6 +14,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.game.Game; import mage.target.common.TargetCardInGraveyard; @@ -22,7 +23,7 @@ public class GraveScrabbler extends CardImpl { public GraveScrabbler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GraveServitude.java b/Mage.Sets/src/mage/cards/g/GraveServitude.java index 60d917cd8c..604c6a0439 100644 --- a/Mage.Sets/src/mage/cards/g/GraveServitude.java +++ b/Mage.Sets/src/mage/cards/g/GraveServitude.java @@ -52,7 +52,7 @@ public class GraveServitude extends CardImpl { public GraveServitude(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // You may cast Grave Servitude as though it had flash. If you cast it any time a sorcery couldn't have been cast, the controller of the permanent it becomes sacrifices it at the beginning of the next cleanup step. this.addAbility(new SimpleStaticAbility(Zone.ALL, new CastAsThoughItHadFlashSourceEffect(Duration.EndOfGame))); diff --git a/Mage.Sets/src/mage/cards/g/GraveShellScarab.java b/Mage.Sets/src/mage/cards/g/GraveShellScarab.java index 3725dea164..ff94416347 100644 --- a/Mage.Sets/src/mage/cards/g/GraveShellScarab.java +++ b/Mage.Sets/src/mage/cards/g/GraveShellScarab.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DredgeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,7 +49,7 @@ public class GraveShellScarab extends CardImpl { public GraveShellScarab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{G}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GraveSifter.java b/Mage.Sets/src/mage/cards/g/GraveSifter.java index 5e571c0381..df5c373f73 100644 --- a/Mage.Sets/src/mage/cards/g/GraveSifter.java +++ b/Mage.Sets/src/mage/cards/g/GraveSifter.java @@ -57,8 +57,8 @@ public class GraveSifter extends CardImpl { public GraveSifter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Elemental"); - this.subtype.add("Beast"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/g/GraveTitan.java b/Mage.Sets/src/mage/cards/g/GraveTitan.java index fb8e7b2de3..5595709b33 100644 --- a/Mage.Sets/src/mage/cards/g/GraveTitan.java +++ b/Mage.Sets/src/mage/cards/g/GraveTitan.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.ZombieToken; /** @@ -45,7 +46,7 @@ public class GraveTitan extends CardImpl { public GraveTitan(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/g/GravebaneZombie.java b/Mage.Sets/src/mage/cards/g/GravebaneZombie.java index 28758bd654..e75b37cace 100644 --- a/Mage.Sets/src/mage/cards/g/GravebaneZombie.java +++ b/Mage.Sets/src/mage/cards/g/GravebaneZombie.java @@ -35,6 +35,7 @@ import mage.abilities.effects.ReplacementEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class GravebaneZombie extends CardImpl { public GravebaneZombie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GravebladeMarauder.java b/Mage.Sets/src/mage/cards/g/GravebladeMarauder.java index 197968846e..00ac88abfa 100644 --- a/Mage.Sets/src/mage/cards/g/GravebladeMarauder.java +++ b/Mage.Sets/src/mage/cards/g/GravebladeMarauder.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterCreatureCard; import mage.game.Game; @@ -49,8 +50,8 @@ public class GravebladeMarauder extends CardImpl { public GravebladeMarauder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GravebornMuse.java b/Mage.Sets/src/mage/cards/g/GravebornMuse.java index daf49fb367..fe13ffc675 100644 --- a/Mage.Sets/src/mage/cards/g/GravebornMuse.java +++ b/Mage.Sets/src/mage/cards/g/GravebornMuse.java @@ -55,8 +55,8 @@ public class GravebornMuse extends CardImpl { public GravebornMuse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/Gravecrawler.java b/Mage.Sets/src/mage/cards/g/Gravecrawler.java index e54a6c7ecf..3b5fb152d5 100644 --- a/Mage.Sets/src/mage/cards/g/Gravecrawler.java +++ b/Mage.Sets/src/mage/cards/g/Gravecrawler.java @@ -49,7 +49,7 @@ public class Gravecrawler extends CardImpl { public Gravecrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/Gravedigger.java b/Mage.Sets/src/mage/cards/g/Gravedigger.java index d18ae21063..0147ecc0fa 100644 --- a/Mage.Sets/src/mage/cards/g/Gravedigger.java +++ b/Mage.Sets/src/mage/cards/g/Gravedigger.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; @@ -47,7 +48,7 @@ public class Gravedigger extends CardImpl { public Gravedigger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/Gravegouger.java b/Mage.Sets/src/mage/cards/g/Gravegouger.java index 01d53eea37..0f7864bc80 100644 --- a/Mage.Sets/src/mage/cards/g/Gravegouger.java +++ b/Mage.Sets/src/mage/cards/g/Gravegouger.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnFromExileForSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.target.common.TargetCardInASingleGraveyard; @@ -50,8 +51,8 @@ public class Gravegouger extends CardImpl { public Gravegouger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Nightmare"); - this.subtype.add("Horror"); + this.subtype.add(SubType.NIGHTMARE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GravelSlinger.java b/Mage.Sets/src/mage/cards/g/GravelSlinger.java index 9b5517b14a..22f6fd8a62 100644 --- a/Mage.Sets/src/mage/cards/g/GravelSlinger.java +++ b/Mage.Sets/src/mage/cards/g/GravelSlinger.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterAttackingOrBlockingCreature; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class GravelSlinger extends CardImpl { public GravelSlinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GravelgillAxeshark.java b/Mage.Sets/src/mage/cards/g/GravelgillAxeshark.java index ab16e09900..60e9d90476 100644 --- a/Mage.Sets/src/mage/cards/g/GravelgillAxeshark.java +++ b/Mage.Sets/src/mage/cards/g/GravelgillAxeshark.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.PersistAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class GravelgillAxeshark extends CardImpl { public GravelgillAxeshark(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U/B}"); - this.subtype.add("Merfolk"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GravelgillDuo.java b/Mage.Sets/src/mage/cards/g/GravelgillDuo.java index 76a09baa12..bb51e40bc5 100644 --- a/Mage.Sets/src/mage/cards/g/GravelgillDuo.java +++ b/Mage.Sets/src/mage/cards/g/GravelgillDuo.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,9 +58,9 @@ public class GravelgillDuo extends CardImpl { public GravelgillDuo(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U/B}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GravenAbomination.java b/Mage.Sets/src/mage/cards/g/GravenAbomination.java index f5ab49b21b..a4cf6bc27a 100644 --- a/Mage.Sets/src/mage/cards/g/GravenAbomination.java +++ b/Mage.Sets/src/mage/cards/g/GravenAbomination.java @@ -1,93 +1,94 @@ -/* - * 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.cards.g; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.AttacksTriggeredAbility; -import mage.abilities.effects.common.ExileTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.FilterCard; -import mage.filter.predicate.other.OwnerIdPredicate; -import mage.game.Game; -import mage.players.Player; -import mage.target.common.TargetCardInGraveyard; - -/** - * - * @author jeffwadsworth - */ -public class GravenAbomination extends CardImpl { - - private final UUID originalId; - - private final static String rule = "Whenever {this} attacks, exile target card from defending player's graveyard."; - - public GravenAbomination(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); - - this.subtype.add("Horror"); - this.power = new MageInt(3); - this.toughness = new MageInt(1); - - // Whenever Graven Abomination attacks, exile target card from defending player's graveyard. - Ability ability = new AttacksTriggeredAbility(new ExileTargetEffect(), false, rule); - ability.addTarget(new TargetCardInGraveyard()); - this.addAbility(ability); - originalId = ability.getOriginalId(); - - } - - @Override - public void adjustTargets(Ability ability, Game game) { - UUID gravenAbominationId = ability.getSourceId(); - FilterCard filter = new FilterCard("target card from defending player's graveyard"); - if (ability.getOriginalId().equals(originalId)) { - UUID defendingPlayerId = game.getCombat().getDefendingPlayerId(gravenAbominationId, game); - Player defendingPlayer = game.getPlayer(defendingPlayerId); - if (defendingPlayer != null) { - filter.add(new OwnerIdPredicate(defendingPlayerId)); - ability.getTargets().clear(); - ability.getTargets().add(new TargetCardInGraveyard(filter)); - } - } - } - - public GravenAbomination(final GravenAbomination card) { - super(card); - this.originalId = card.originalId; - } - - @Override - public GravenAbomination copy() { - return new GravenAbomination(this); - } -} +/* + * 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.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.predicate.other.OwnerIdPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInGraveyard; + +/** + * + * @author jeffwadsworth + */ +public class GravenAbomination extends CardImpl { + + private final UUID originalId; + + private final static String rule = "Whenever {this} attacks, exile target card from defending player's graveyard."; + + public GravenAbomination(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); + + this.subtype.add(SubType.HORROR); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Whenever Graven Abomination attacks, exile target card from defending player's graveyard. + Ability ability = new AttacksTriggeredAbility(new ExileTargetEffect(), false, rule); + ability.addTarget(new TargetCardInGraveyard()); + this.addAbility(ability); + originalId = ability.getOriginalId(); + + } + + @Override + public void adjustTargets(Ability ability, Game game) { + UUID gravenAbominationId = ability.getSourceId(); + FilterCard filter = new FilterCard("target card from defending player's graveyard"); + if (ability.getOriginalId().equals(originalId)) { + UUID defendingPlayerId = game.getCombat().getDefendingPlayerId(gravenAbominationId, game); + Player defendingPlayer = game.getPlayer(defendingPlayerId); + if (defendingPlayer != null) { + filter.add(new OwnerIdPredicate(defendingPlayerId)); + ability.getTargets().clear(); + ability.getTargets().add(new TargetCardInGraveyard(filter)); + } + } + } + + public GravenAbomination(final GravenAbomination card) { + super(card); + this.originalId = card.originalId; + } + + @Override + public GravenAbomination copy() { + return new GravenAbomination(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GravenDominator.java b/Mage.Sets/src/mage/cards/g/GravenDominator.java index dbc7e61c6a..6ecb7b9971 100644 --- a/Mage.Sets/src/mage/cards/g/GravenDominator.java +++ b/Mage.Sets/src/mage/cards/g/GravenDominator.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HauntAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -53,7 +54,7 @@ public class GravenDominator extends CardImpl { public GravenDominator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Gargoyle"); + this.subtype.add(SubType.GARGOYLE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GraverobberSpider.java b/Mage.Sets/src/mage/cards/g/GraverobberSpider.java index 01c5d92c16..4d72b26050 100644 --- a/Mage.Sets/src/mage/cards/g/GraverobberSpider.java +++ b/Mage.Sets/src/mage/cards/g/GraverobberSpider.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -51,7 +52,7 @@ public class GraverobberSpider extends CardImpl { public GraverobberSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GravespawnSovereign.java b/Mage.Sets/src/mage/cards/g/GravespawnSovereign.java index 7c3223e67d..a8c3d029d0 100644 --- a/Mage.Sets/src/mage/cards/g/GravespawnSovereign.java +++ b/Mage.Sets/src/mage/cards/g/GravespawnSovereign.java @@ -61,7 +61,7 @@ public class GravespawnSovereign extends CardImpl { public GravespawnSovereign(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GravetillerWurm.java b/Mage.Sets/src/mage/cards/g/GravetillerWurm.java index a08d3c96d8..4de5743045 100644 --- a/Mage.Sets/src/mage/cards/g/GravetillerWurm.java +++ b/Mage.Sets/src/mage/cards/g/GravetillerWurm.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -47,7 +48,7 @@ public class GravetillerWurm extends CardImpl { public GravetillerWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GravityNegator.java b/Mage.Sets/src/mage/cards/g/GravityNegator.java index 8295039662..bcad645c71 100644 --- a/Mage.Sets/src/mage/cards/g/GravityNegator.java +++ b/Mage.Sets/src/mage/cards/g/GravityNegator.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -58,8 +59,8 @@ public class GravityNegator extends CardImpl { public GravityNegator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GrayMerchantOfAsphodel.java b/Mage.Sets/src/mage/cards/g/GrayMerchantOfAsphodel.java index 6864ac82d4..12e96452d7 100644 --- a/Mage.Sets/src/mage/cards/g/GrayMerchantOfAsphodel.java +++ b/Mage.Sets/src/mage/cards/g/GrayMerchantOfAsphodel.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Outcome; import mage.game.Game; @@ -49,7 +50,7 @@ public class GrayMerchantOfAsphodel extends CardImpl { public GrayMerchantOfAsphodel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GrayOgre.java b/Mage.Sets/src/mage/cards/g/GrayOgre.java index 883dac4c78..666df32067 100644 --- a/Mage.Sets/src/mage/cards/g/GrayOgre.java +++ b/Mage.Sets/src/mage/cards/g/GrayOgre.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class GrayOgre extends CardImpl { public GrayOgre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Ogre"); + this.subtype.add(SubType.OGRE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GraypeltHunter.java b/Mage.Sets/src/mage/cards/g/GraypeltHunter.java index 1b0c30b13f..efbc7fcaa9 100644 --- a/Mage.Sets/src/mage/cards/g/GraypeltHunter.java +++ b/Mage.Sets/src/mage/cards/g/GraypeltHunter.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,9 +46,9 @@ public class GraypeltHunter extends CardImpl { public GraypeltHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GrayscaledGharial.java b/Mage.Sets/src/mage/cards/g/GrayscaledGharial.java index b68da285e7..6ce0192671 100644 --- a/Mage.Sets/src/mage/cards/g/GrayscaledGharial.java +++ b/Mage.Sets/src/mage/cards/g/GrayscaledGharial.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.IslandwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class GrayscaledGharial extends CardImpl { public GrayscaledGharial (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Crocodile"); + this.subtype.add(SubType.CROCODILE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GrazingGladehart.java b/Mage.Sets/src/mage/cards/g/GrazingGladehart.java index db706d1361..3b12e2bbe8 100644 --- a/Mage.Sets/src/mage/cards/g/GrazingGladehart.java +++ b/Mage.Sets/src/mage/cards/g/GrazingGladehart.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class GrazingGladehart extends CardImpl { public GrazingGladehart(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Antelope"); + this.subtype.add(SubType.ANTELOPE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GrazingKelpie.java b/Mage.Sets/src/mage/cards/g/GrazingKelpie.java index 0be2a4c561..a143ff626b 100644 --- a/Mage.Sets/src/mage/cards/g/GrazingKelpie.java +++ b/Mage.Sets/src/mage/cards/g/GrazingKelpie.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.PersistAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCardInGraveyard; @@ -50,7 +51,7 @@ public class GrazingKelpie extends CardImpl { public GrazingKelpie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G/U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GrazingWhiptail.java b/Mage.Sets/src/mage/cards/g/GrazingWhiptail.java new file mode 100644 index 0000000000..acaf2265dd --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GrazingWhiptail.java @@ -0,0 +1,63 @@ +/* + * 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.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.ReachAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class GrazingWhiptail extends CardImpl { + + public GrazingWhiptail(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Reach + this.addAbility(ReachAbility.getInstance()); + } + + public GrazingWhiptail(final GrazingWhiptail card) { + super(card); + } + + @Override + public GrazingWhiptail copy() { + return new GrazingWhiptail(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GreatDefender.java b/Mage.Sets/src/mage/cards/g/GreatDefender.java index d7c8a83240..101c127b17 100644 --- a/Mage.Sets/src/mage/cards/g/GreatDefender.java +++ b/Mage.Sets/src/mage/cards/g/GreatDefender.java @@ -48,7 +48,9 @@ public class GreatDefender extends CardImpl { // Target creature gets +0/+X until end of turn, where X is its converted mana cost. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - this.getSpellAbility().addEffect(new BoostTargetEffect(new StaticValue(0), new TargetConvertedManaCost(), Duration.EndOfTurn, true)); + this.getSpellAbility().addEffect(new BoostTargetEffect(new StaticValue(0), new TargetConvertedManaCost(), Duration.EndOfTurn, true) + .setText("Target creature gets +0/+X until end of turn, where X is its converted mana cost.") + ); } public GreatDefender(final GreatDefender card) { diff --git a/Mage.Sets/src/mage/cards/g/GreatHart.java b/Mage.Sets/src/mage/cards/g/GreatHart.java index 47d57675ef..bade0beb8a 100644 --- a/Mage.Sets/src/mage/cards/g/GreatHart.java +++ b/Mage.Sets/src/mage/cards/g/GreatHart.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class GreatHart extends CardImpl { public GreatHart(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Elk"); + this.subtype.add(SubType.ELK); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GreatHornKrushok.java b/Mage.Sets/src/mage/cards/g/GreatHornKrushok.java index e5c6192256..925423aa8d 100644 --- a/Mage.Sets/src/mage/cards/g/GreatHornKrushok.java +++ b/Mage.Sets/src/mage/cards/g/GreatHornKrushok.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class GreatHornKrushok extends CardImpl { public GreatHornKrushok(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(5); } diff --git a/Mage.Sets/src/mage/cards/g/GreatOakGuardian.java b/Mage.Sets/src/mage/cards/g/GreatOakGuardian.java index 4ebdd46afd..9446172a30 100644 --- a/Mage.Sets/src/mage/cards/g/GreatOakGuardian.java +++ b/Mage.Sets/src/mage/cards/g/GreatOakGuardian.java @@ -55,7 +55,7 @@ public class GreatOakGuardian extends CardImpl { public GreatOakGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GreatSableStag.java b/Mage.Sets/src/mage/cards/g/GreatSableStag.java index 70d7cbf134..9b8fe22828 100644 --- a/Mage.Sets/src/mage/cards/g/GreatSableStag.java +++ b/Mage.Sets/src/mage/cards/g/GreatSableStag.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class GreatSableStag extends CardImpl { public GreatSableStag(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Elk"); + this.subtype.add(SubType.ELK); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GreatWhale.java b/Mage.Sets/src/mage/cards/g/GreatWhale.java index 8b4cce91f7..61ba5c826d 100644 --- a/Mage.Sets/src/mage/cards/g/GreatWhale.java +++ b/Mage.Sets/src/mage/cards/g/GreatWhale.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.UntapLandsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class GreatWhale extends CardImpl { public GreatWhale(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); - this.subtype.add("Whale"); + this.subtype.add(SubType.WHALE); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GreatbowDoyen.java b/Mage.Sets/src/mage/cards/g/GreatbowDoyen.java index 5eb4505648..435c572c9f 100644 --- a/Mage.Sets/src/mage/cards/g/GreatbowDoyen.java +++ b/Mage.Sets/src/mage/cards/g/GreatbowDoyen.java @@ -62,8 +62,8 @@ public class GreatbowDoyen extends CardImpl { public GreatbowDoyen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Archer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GreaterBasilisk.java b/Mage.Sets/src/mage/cards/g/GreaterBasilisk.java index 6045494c6f..9de4815549 100644 --- a/Mage.Sets/src/mage/cards/g/GreaterBasilisk.java +++ b/Mage.Sets/src/mage/cards/g/GreaterBasilisk.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class GreaterBasilisk extends CardImpl { public GreaterBasilisk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Basilisk"); + this.subtype.add(SubType.BASILISK); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GreaterForgeling.java b/Mage.Sets/src/mage/cards/g/GreaterForgeling.java index a6431008d9..9d1cf6378b 100644 --- a/Mage.Sets/src/mage/cards/g/GreaterForgeling.java +++ b/Mage.Sets/src/mage/cards/g/GreaterForgeling.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class GreaterForgeling extends CardImpl { public GreaterForgeling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GreaterGargadon.java b/Mage.Sets/src/mage/cards/g/GreaterGargadon.java index 0550cb6839..d7f6fd5b34 100644 --- a/Mage.Sets/src/mage/cards/g/GreaterGargadon.java +++ b/Mage.Sets/src/mage/cards/g/GreaterGargadon.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterControlledPermanent; @@ -56,7 +57,7 @@ public class GreaterGargadon extends CardImpl { public GreaterGargadon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{9}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(9); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/g/GreaterHarvester.java b/Mage.Sets/src/mage/cards/g/GreaterHarvester.java index eaf4cef016..929b56a5ef 100644 --- a/Mage.Sets/src/mage/cards/g/GreaterHarvester.java +++ b/Mage.Sets/src/mage/cards/g/GreaterHarvester.java @@ -14,6 +14,7 @@ import mage.abilities.effects.common.SacrificeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -43,7 +44,7 @@ public class GreaterHarvester extends CardImpl { public GreaterHarvester(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/g/GreaterKraytDragon.java b/Mage.Sets/src/mage/cards/g/GreaterKraytDragon.java index 8142e3b7b6..eeee4e0c3e 100644 --- a/Mage.Sets/src/mage/cards/g/GreaterKraytDragon.java +++ b/Mage.Sets/src/mage/cards/g/GreaterKraytDragon.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterControlledCreaturePermanent; @@ -48,7 +49,7 @@ public class GreaterKraytDragon extends CardImpl { public GreaterKraytDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{G}{W}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/g/GreaterMossdog.java b/Mage.Sets/src/mage/cards/g/GreaterMossdog.java index 2b91bb4937..cfd8ba56f7 100644 --- a/Mage.Sets/src/mage/cards/g/GreaterMossdog.java +++ b/Mage.Sets/src/mage/cards/g/GreaterMossdog.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DredgeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class GreaterMossdog extends CardImpl { public GreaterMossdog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Hound"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.HOUND); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GreaterRealmOfPreservation.java b/Mage.Sets/src/mage/cards/g/GreaterRealmOfPreservation.java new file mode 100644 index 0000000000..de7fa75b94 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GreaterRealmOfPreservation.java @@ -0,0 +1,73 @@ +/* + * 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.cards.g; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.PreventNextDamageFromChosenSourceToYouEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.FilterObject; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author L_J + */ +public class GreaterRealmOfPreservation extends CardImpl { + + private static final FilterObject filter = new FilterObject("black or red source"); + static{ + filter.add(Predicates.or(new ColorPredicate(ObjectColor.BLACK), new ColorPredicate(ObjectColor.RED))); + } + + public GreaterRealmOfPreservation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); + + + // {1}{W}: The next time a black or red source of your choice would deal damage to you this turn, prevent that damage. + Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{W}"))); + } + + public GreaterRealmOfPreservation(final GreaterRealmOfPreservation card) { + super(card); + } + + @Override + public GreaterRealmOfPreservation copy() { + return new GreaterRealmOfPreservation(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GreaterSandwurm.java b/Mage.Sets/src/mage/cards/g/GreaterSandwurm.java index 55a0e07958..2c59da4235 100644 --- a/Mage.Sets/src/mage/cards/g/GreaterSandwurm.java +++ b/Mage.Sets/src/mage/cards/g/GreaterSandwurm.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; @@ -56,7 +57,7 @@ public class GreaterSandwurm extends CardImpl { public GreaterSandwurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/g/GreaterStoneSpirit.java b/Mage.Sets/src/mage/cards/g/GreaterStoneSpirit.java index 8e4f9cdbb1..a9a59aefb1 100644 --- a/Mage.Sets/src/mage/cards/g/GreaterStoneSpirit.java +++ b/Mage.Sets/src/mage/cards/g/GreaterStoneSpirit.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -53,25 +54,29 @@ import mage.target.common.TargetCreaturePermanent; * @author fireshoes */ public class GreaterStoneSpirit extends CardImpl { - + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with flying"); + static { filter.add(new AbilityPredicate(FlyingAbility.class)); } public GreaterStoneSpirit(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Spirit"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(4); // Greater Stone Spirit can't be blocked by creatures with flying. this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); - + // {2}{R}: Until end of turn, target creature gets +0/+2 and gains "{R}: This creature gets +1/+0 until end of turn." Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}")); + new BoostSourceEffect(1, 0, Duration.EndOfTurn) + .setText("until end of turn, target creature gets +0/+2"), + new ManaCostsImpl("{R}") + ); Effect effect = new GainAbilityTargetEffect(gainedAbility, Duration.EndOfTurn); effect.setText("and gains \"{R}: This creature gets +1/+0 until end of turn.\""); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(0, 2, Duration.EndOfTurn), new ManaCostsImpl("{2}{R}")); diff --git a/Mage.Sets/src/mage/cards/g/Greatsword.java b/Mage.Sets/src/mage/cards/g/Greatsword.java index d41085d15d..1041f7d255 100644 --- a/Mage.Sets/src/mage/cards/g/Greatsword.java +++ b/Mage.Sets/src/mage/cards/g/Greatsword.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class Greatsword extends CardImpl { public Greatsword(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 0))); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3))); } diff --git a/Mage.Sets/src/mage/cards/g/Greedo.java b/Mage.Sets/src/mage/cards/g/Greedo.java index be945e10b6..a7d5c81e6f 100644 --- a/Mage.Sets/src/mage/cards/g/Greedo.java +++ b/Mage.Sets/src/mage/cards/g/Greedo.java @@ -61,8 +61,8 @@ public class Greedo extends CardImpl { public Greedo(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Rodian"); - this.subtype.add("Hunter"); + this.subtype.add(SubType.RODIAN); + this.subtype.add(SubType.HUNTER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GreelMindRaker.java b/Mage.Sets/src/mage/cards/g/GreelMindRaker.java index 702454ffbb..668f5f307d 100644 --- a/Mage.Sets/src/mage/cards/g/GreelMindRaker.java +++ b/Mage.Sets/src/mage/cards/g/GreelMindRaker.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterCard; @@ -55,8 +56,8 @@ public class GreelMindRaker extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Horror"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HORROR); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GreelsCaress.java b/Mage.Sets/src/mage/cards/g/GreelsCaress.java index 2ad1e4688e..a9957886e8 100644 --- a/Mage.Sets/src/mage/cards/g/GreelsCaress.java +++ b/Mage.Sets/src/mage/cards/g/GreelsCaress.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class GreelsCaress extends CardImpl { public GreelsCaress(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/g/GreenManaBattery.java b/Mage.Sets/src/mage/cards/g/GreenManaBattery.java index 7a407edcc5..2106d125af 100644 --- a/Mage.Sets/src/mage/cards/g/GreenManaBattery.java +++ b/Mage.Sets/src/mage/cards/g/GreenManaBattery.java @@ -64,10 +64,10 @@ public class GreenManaBattery extends CardImpl { Mana.GreenMana(1), new IntPlusDynamicValue(1, new RemovedCountersForCostValue()), new TapSourceCost(), - "Add {G} to your mana pool, then add {G} to your mana pool for each storage counter removed this way", - true, new CountersSourceCount(CounterType.STORAGE)); - ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(), - "Remove X storage counters from {this}")); + "Add {G} to your mana pool, then add {G} to your mana pool for each charge counter removed this way", + true, new CountersSourceCount(CounterType.CHARGE)); + ability.addCost(new RemoveVariableCountersSourceCost(CounterType.CHARGE.createInstance(), + "Remove any number of charge counters from {this}")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GreenScarab.java b/Mage.Sets/src/mage/cards/g/GreenScarab.java index bc03793036..eec5731a31 100644 --- a/Mage.Sets/src/mage/cards/g/GreenScarab.java +++ b/Mage.Sets/src/mage/cards/g/GreenScarab.java @@ -63,7 +63,7 @@ public class GreenScarab extends CardImpl { public GreenScarab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GreenWard.java b/Mage.Sets/src/mage/cards/g/GreenWard.java index 657c123239..e470781718 100644 --- a/Mage.Sets/src/mage/cards/g/GreenWard.java +++ b/Mage.Sets/src/mage/cards/g/GreenWard.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -60,7 +61,7 @@ public class GreenWard extends CardImpl { public GreenWard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GreenbeltRampager.java b/Mage.Sets/src/mage/cards/g/GreenbeltRampager.java index 155229c81d..e7f78f9695 100644 --- a/Mage.Sets/src/mage/cards/g/GreenbeltRampager.java +++ b/Mage.Sets/src/mage/cards/g/GreenbeltRampager.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -51,7 +52,7 @@ public class GreenbeltRampager extends CardImpl { public GreenbeltRampager(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GreenerPastures.java b/Mage.Sets/src/mage/cards/g/GreenerPastures.java new file mode 100644 index 0000000000..83af2758f6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GreenerPastures.java @@ -0,0 +1,109 @@ +/* + * 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.cards.g; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.CreateTokenTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterLandPermanent; +import mage.game.Game; +import mage.game.permanent.token.SaprolingToken; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class GreenerPastures extends CardImpl { + + public GreenerPastures(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + + // At the beginning of each player's upkeep, if that player controls more lands than each other player, the player creates a 1/1 green Saproling creature token. + this.addAbility(new ConditionalTriggeredAbility( + new BeginningOfUpkeepTriggeredAbility( + Zone.BATTLEFIELD, + new CreateTokenTargetEffect(new SaprolingToken()), + TargetController.ANY, false, true + ), + ActivePlayerMostLandsCondition.instance, + "At the beginning of each player's upkeep, " + + "if that player controls more lands than each other player, " + + "the player creates a 1/1 green Saproling creature token." + )); + } + + public GreenerPastures(final GreenerPastures card) { + super(card); + } + + @Override + public GreenerPastures copy() { + return new GreenerPastures(this); + } +} + +enum ActivePlayerMostLandsCondition implements Condition { + + instance; + private static final FilterLandPermanent filter = new FilterLandPermanent(); + + @Override + public boolean apply(Game game, Ability source) { + Player activePlayer = game.getPlayer(game.getActivePlayerId()); + if (activePlayer == null) { + return false; + } + int landCount = game.getBattlefield().getAllActivePermanents(filter, activePlayer.getId(), game).size(); + if (landCount == 0) { + return false; + } + for (UUID playerId : game.getPlayerList()) { + if (playerId != activePlayer.getId()) { + if (game.getBattlefield().getAllActivePermanents(filter, playerId, game).size() >= landCount) { + return false; + } + } + } + return true; + } + + @Override + public String toString() { + return "that player controls more lands than each other player"; + } + +} diff --git a/Mage.Sets/src/mage/cards/g/GreenhiltTrainee.java b/Mage.Sets/src/mage/cards/g/GreenhiltTrainee.java index b64e17bc5a..541d8d887b 100644 --- a/Mage.Sets/src/mage/cards/g/GreenhiltTrainee.java +++ b/Mage.Sets/src/mage/cards/g/GreenhiltTrainee.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -53,8 +54,8 @@ public class GreenhiltTrainee extends CardImpl { public GreenhiltTrainee (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/Greenseeker.java b/Mage.Sets/src/mage/cards/g/Greenseeker.java index b95ea6b023..4b873b29bb 100644 --- a/Mage.Sets/src/mage/cards/g/Greenseeker.java +++ b/Mage.Sets/src/mage/cards/g/Greenseeker.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; @@ -50,16 +51,16 @@ import java.util.UUID; public class Greenseeker extends CardImpl { public Greenseeker(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Spellshaper"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); // {G}, {tap}, Discard a card: Search your library for a basic land card, reveal it, and put it into your hand. Then shuffle your library. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_BASIC_LAND_CARD), true, true), - new ManaCostsImpl("{G}")); + new SearchLibraryPutInHandEffect(new TargetCardInLibrary(1, 1, StaticFilters.FILTER_BASIC_LAND_CARD), true, true), + new ManaCostsImpl("{G}")); ability.addCost(new TapSourceCost()); ability.addCost(new DiscardCardCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/g/GreensideWatcher.java b/Mage.Sets/src/mage/cards/g/GreensideWatcher.java index fbde6d43f3..da02126931 100644 --- a/Mage.Sets/src/mage/cards/g/GreensideWatcher.java +++ b/Mage.Sets/src/mage/cards/g/GreensideWatcher.java @@ -55,8 +55,8 @@ public class GreensideWatcher extends CardImpl { public GreensideWatcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GreenwardenOfMurasa.java b/Mage.Sets/src/mage/cards/g/GreenwardenOfMurasa.java index 54eb44fa38..26bf8fa207 100644 --- a/Mage.Sets/src/mage/cards/g/GreenwardenOfMurasa.java +++ b/Mage.Sets/src/mage/cards/g/GreenwardenOfMurasa.java @@ -42,6 +42,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -56,7 +57,7 @@ public class GreenwardenOfMurasa extends CardImpl { public GreenwardenOfMurasa(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GreenweaverDruid.java b/Mage.Sets/src/mage/cards/g/GreenweaverDruid.java index 40e04acc5e..4a6038bc8d 100644 --- a/Mage.Sets/src/mage/cards/g/GreenweaverDruid.java +++ b/Mage.Sets/src/mage/cards/g/GreenweaverDruid.java @@ -35,6 +35,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class GreenweaverDruid extends CardImpl { public GreenweaverDruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GreenwheelLiberator.java b/Mage.Sets/src/mage/cards/g/GreenwheelLiberator.java index 7660b787a2..6af6a496bc 100644 --- a/Mage.Sets/src/mage/cards/g/GreenwheelLiberator.java +++ b/Mage.Sets/src/mage/cards/g/GreenwheelLiberator.java @@ -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.cards.g; import java.util.UUID; @@ -37,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.watchers.common.RevoltWatcher; @@ -48,8 +48,8 @@ public class GreenwheelLiberator extends CardImpl { public GreenwheelLiberator(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); @@ -57,7 +57,7 @@ public class GreenwheelLiberator extends CardImpl { // permanent you controlled left the battlefield this turn. Ability ability = new EntersBattlefieldAbility( new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), false, RevoltCondition.instance, - "Revolt — enters the battlefield with two +1/+1 counters on it if a permanent you controlled left the battlefield this turn", null); + "Revolt — {this} enters the battlefield with two +1/+1 counters on it if a permanent you controlled left the battlefield this turn", null); ability.addWatcher(new RevoltWatcher()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GremlinInfestation.java b/Mage.Sets/src/mage/cards/g/GremlinInfestation.java index 6aae9b9f78..9b1aa50b4a 100644 --- a/Mage.Sets/src/mage/cards/g/GremlinInfestation.java +++ b/Mage.Sets/src/mage/cards/g/GremlinInfestation.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.game.permanent.token.GremlinToken; @@ -54,7 +55,7 @@ public class GremlinInfestation extends CardImpl { public GremlinInfestation(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant artifact TargetPermanent auraTarget = new TargetArtifactPermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GrenzoDungeonWarden.java b/Mage.Sets/src/mage/cards/g/GrenzoDungeonWarden.java index 0ad0e219e5..18b16527ea 100644 --- a/Mage.Sets/src/mage/cards/g/GrenzoDungeonWarden.java +++ b/Mage.Sets/src/mage/cards/g/GrenzoDungeonWarden.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -56,8 +57,8 @@ public class GrenzoDungeonWarden extends CardImpl { public GrenzoDungeonWarden(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{X}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GrenzoHavocRaiser.java b/Mage.Sets/src/mage/cards/g/GrenzoHavocRaiser.java index bf163641dc..ed3818b390 100644 --- a/Mage.Sets/src/mage/cards/g/GrenzoHavocRaiser.java +++ b/Mage.Sets/src/mage/cards/g/GrenzoHavocRaiser.java @@ -45,6 +45,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.ManaType; import mage.constants.Outcome; @@ -54,7 +55,7 @@ import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.ExileZone; import mage.game.Game; -import mage.game.events.DamageEvent; +import mage.game.events.DamagedEvent; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.players.ManaPoolItem; @@ -73,8 +74,8 @@ public class GrenzoHavocRaiser extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -125,7 +126,7 @@ class GrenzoHavocRaiserTriggeredAbility extends TriggeredAbilityImpl { Player damagedPlayer = game.getPlayer(event.getPlayerId()); Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId()); if (damagedPlayer != null && permanent != null - && ((DamageEvent) event).isCombatDamage() + && ((DamagedEvent) event).isCombatDamage() && getControllerId().equals(permanent.getControllerId())) { FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + damagedPlayer.getLogName() + " controls"); filter.add(new ControllerIdPredicate(damagedPlayer.getId())); diff --git a/Mage.Sets/src/mage/cards/g/GrenzosCutthroat.java b/Mage.Sets/src/mage/cards/g/GrenzosCutthroat.java index 836ee24689..a28997cb2b 100644 --- a/Mage.Sets/src/mage/cards/g/GrenzosCutthroat.java +++ b/Mage.Sets/src/mage/cards/g/GrenzosCutthroat.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class GrenzosCutthroat extends CardImpl { public GrenzosCutthroat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GrenzosRuffians.java b/Mage.Sets/src/mage/cards/g/GrenzosRuffians.java new file mode 100644 index 0000000000..05aeff2296 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GrenzosRuffians.java @@ -0,0 +1,111 @@ +/* + * 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.cards.g; + +import java.util.Objects; +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.DealsDamageToOpponentTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.constants.SubType; +import mage.abilities.keyword.MeleeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class GrenzosRuffians extends CardImpl { + + public GrenzosRuffians(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + + this.subtype.add(SubType.GOBLIN); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Melee + this.addAbility(new MeleeAbility()); + + // Whenever Grenzo's Ruffians deals combat damage to a opponent, it deals that much damage to each other opponent. + this.addAbility(new DealsDamageToOpponentTriggeredAbility(new GrenzosRuffiansEffect(), false, true, true)); + } + + public GrenzosRuffians(final GrenzosRuffians card) { + super(card); + } + + @Override + public GrenzosRuffians copy() { + return new GrenzosRuffians(this); + } +} + +class GrenzosRuffiansEffect extends OneShotEffect { + + public GrenzosRuffiansEffect() { + super(Outcome.Benefit); + this.staticText = "it deals that much damage to each other opponent"; + } + + public GrenzosRuffiansEffect(final GrenzosRuffiansEffect effect) { + super(effect); + } + + @Override + public GrenzosRuffiansEffect copy() { + return new GrenzosRuffiansEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + UUID damagedOpponent = this.getTargetPointer().getFirst(game, source); + int amount = (Integer) getValue("damage"); + MageObject object = game.getObject(source.getSourceId()); + if (object != null && amount > 0 && damagedOpponent != null) { + for (UUID playerId : game.getOpponents(source.getControllerId())) { + if (!Objects.equals(playerId, damagedOpponent)) { + Player opponent = game.getPlayer(playerId); + if (opponent != null) { + int dealtDamage = opponent.damage(amount, source.getSourceId(), game, false, true); + game.informPlayers(object.getLogName() + " deals " + dealtDamage + " damage to " + opponent.getLogName()); + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/g/GridMonitor.java b/Mage.Sets/src/mage/cards/g/GridMonitor.java index bc2aee4dd2..3ddaf2e2ff 100644 --- a/Mage.Sets/src/mage/cards/g/GridMonitor.java +++ b/Mage.Sets/src/mage/cards/g/GridMonitor.java @@ -36,6 +36,7 @@ import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class GridMonitor extends CardImpl { public GridMonitor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/g/GriefTyrant.java b/Mage.Sets/src/mage/cards/g/GriefTyrant.java index 180849399b..a85815bff4 100644 --- a/Mage.Sets/src/mage/cards/g/GriefTyrant.java +++ b/Mage.Sets/src/mage/cards/g/GriefTyrant.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.game.Game; @@ -51,7 +52,7 @@ public class GriefTyrant extends CardImpl { public GriefTyrant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B/R}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/g/GriffinDreamfinder.java b/Mage.Sets/src/mage/cards/g/GriffinDreamfinder.java index e34fbf8bd4..cd65bc29ed 100644 --- a/Mage.Sets/src/mage/cards/g/GriffinDreamfinder.java +++ b/Mage.Sets/src/mage/cards/g/GriffinDreamfinder.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetCardInYourGraveyard; @@ -54,7 +55,7 @@ public class GriffinDreamfinder extends CardImpl { public GriffinDreamfinder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GriffinGuide.java b/Mage.Sets/src/mage/cards/g/GriffinGuide.java index dc31ae3ab0..ee322eefa9 100644 --- a/Mage.Sets/src/mage/cards/g/GriffinGuide.java +++ b/Mage.Sets/src/mage/cards/g/GriffinGuide.java @@ -52,7 +52,7 @@ public class GriffinGuide extends CardImpl { public GriffinGuide(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GriffinProtector.java b/Mage.Sets/src/mage/cards/g/GriffinProtector.java index 407c39d775..1e22119095 100644 --- a/Mage.Sets/src/mage/cards/g/GriffinProtector.java +++ b/Mage.Sets/src/mage/cards/g/GriffinProtector.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -47,7 +48,7 @@ public class GriffinProtector extends CardImpl { public GriffinProtector(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GriffinRider.java b/Mage.Sets/src/mage/cards/g/GriffinRider.java index 3916257428..e3a417e981 100644 --- a/Mage.Sets/src/mage/cards/g/GriffinRider.java +++ b/Mage.Sets/src/mage/cards/g/GriffinRider.java @@ -61,8 +61,8 @@ public class GriffinRider extends CardImpl { public GriffinRider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.color.setWhite(true); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GriffinSentinel.java b/Mage.Sets/src/mage/cards/g/GriffinSentinel.java index 522b9cf4e2..88f0b4b0a4 100644 --- a/Mage.Sets/src/mage/cards/g/GriffinSentinel.java +++ b/Mage.Sets/src/mage/cards/g/GriffinSentinel.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -43,7 +44,7 @@ public class GriffinSentinel extends CardImpl { public GriffinSentinel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.addAbility(FlyingAbility.getInstance()); this.addAbility(VigilanceAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/g/GriftersBlade.java b/Mage.Sets/src/mage/cards/g/GriftersBlade.java index 856be7a4e9..b9c867bb2a 100644 --- a/Mage.Sets/src/mage/cards/g/GriftersBlade.java +++ b/Mage.Sets/src/mage/cards/g/GriftersBlade.java @@ -1,118 +1,119 @@ -/* - * 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.cards.g; - -import java.util.UUID; -import mage.MageObject; -import mage.abilities.Ability; -import mage.abilities.common.AsEntersBattlefieldAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.continuous.BoostEquippedEffect; -import mage.abilities.keyword.EquipAbility; -import mage.abilities.keyword.FlashAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.common.TargetControlledCreaturePermanent; - -/** - * - * @author LevelX2 - */ -public class GriftersBlade extends CardImpl { - - public GriftersBlade(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); - - this.subtype.add("Equipment"); - - // Flash - this.addAbility(FlashAbility.getInstance()); - - // As Grifter's Blade enters the battlefield, choose a creature you control it could be attached to. If you do, it enters the battlefield attached to that creature. - this.addAbility(new AsEntersBattlefieldAbility(new GriftersBladeChooseCreatureEffect(Outcome.BoostCreature))); - - // Equipped creature gets +1/+1. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); - - // Equip {1} - this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1))); - - } - - public GriftersBlade(final GriftersBlade card) { - super(card); - } - - @Override - public GriftersBlade copy() { - return new GriftersBlade(this); - } -} - -class GriftersBladeChooseCreatureEffect extends OneShotEffect { - - public GriftersBladeChooseCreatureEffect(Outcome outcome) { - super(outcome); - this.staticText = "choose a creature you control it could be attached to. If you do, it enters the battlefield attached to that creature"; - } - - public GriftersBladeChooseCreatureEffect(final GriftersBladeChooseCreatureEffect effect) { - super(effect); - } - - @Override - public GriftersBladeChooseCreatureEffect copy() { - return new GriftersBladeChooseCreatureEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - MageObject mageObject = game.getPermanentEntering(source.getSourceId()); - if (controller != null && mageObject != null) { - TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent(); - target.setNotTarget(true); - if (controller.choose(this.outcome, target, source.getSourceId(), game)) { - Permanent attachToCreature = game.getPermanent(target.getFirstTarget()); - if (attachToCreature != null) { - attachToCreature.addAttachment(mageObject.getId(), game); - } - } - return true; - } - return false; - } -} +/* + * 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.cards.g; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class GriftersBlade extends CardImpl { + + public GriftersBlade(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + this.subtype.add(SubType.EQUIPMENT); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // As Grifter's Blade enters the battlefield, choose a creature you control it could be attached to. If you do, it enters the battlefield attached to that creature. + this.addAbility(new AsEntersBattlefieldAbility(new GriftersBladeChooseCreatureEffect(Outcome.BoostCreature))); + + // Equipped creature gets +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); + + // Equip {1} + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1))); + + } + + public GriftersBlade(final GriftersBlade card) { + super(card); + } + + @Override + public GriftersBlade copy() { + return new GriftersBlade(this); + } +} + +class GriftersBladeChooseCreatureEffect extends OneShotEffect { + + public GriftersBladeChooseCreatureEffect(Outcome outcome) { + super(outcome); + this.staticText = "choose a creature you control it could be attached to. If you do, it enters the battlefield attached to that creature"; + } + + public GriftersBladeChooseCreatureEffect(final GriftersBladeChooseCreatureEffect effect) { + super(effect); + } + + @Override + public GriftersBladeChooseCreatureEffect copy() { + return new GriftersBladeChooseCreatureEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject mageObject = game.getPermanentEntering(source.getSourceId()); + if (controller != null && mageObject != null) { + TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent(); + target.setNotTarget(true); + if (controller.choose(this.outcome, target, source.getSourceId(), game)) { + Permanent attachToCreature = game.getPermanent(target.getFirstTarget()); + if (attachToCreature != null) { + attachToCreature.addAttachment(mageObject.getId(), game); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/g/GrimCaptainsCall.java b/Mage.Sets/src/mage/cards/g/GrimCaptainsCall.java new file mode 100644 index 0000000000..df3bb98dff --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GrimCaptainsCall.java @@ -0,0 +1,111 @@ +/* + * 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.cards.g; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LevelX2 + */ +public class GrimCaptainsCall extends CardImpl { + + public GrimCaptainsCall(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}"); + + // Return a Pirate card from your graveyard to your hand, then do the same for Vampire, Dinosaur, and Merfolk. + this.getSpellAbility().addEffect(new GrimCaptainsCallEffect()); + } + + public GrimCaptainsCall(final GrimCaptainsCall card) { + super(card); + } + + @Override + public GrimCaptainsCall copy() { + return new GrimCaptainsCall(this); + } +} + +class GrimCaptainsCallEffect extends OneShotEffect { + + public GrimCaptainsCallEffect() { + super(Outcome.Benefit); + this.staticText = "Return a Pirate card from your graveyard to your hand, then do the same for Vampire, Dinosaur, and Merfolk"; + } + + public GrimCaptainsCallEffect(final GrimCaptainsCallEffect effect) { + super(effect); + } + + @Override + public GrimCaptainsCallEffect copy() { + return new GrimCaptainsCallEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + returnToHand(game, SubType.PIRATE, controller, source); + returnToHand(game, SubType.VAMPIRE, controller, source); + returnToHand(game, SubType.DINOSAUR, controller, source); + returnToHand(game, SubType.MERFOLK, controller, source); + return true; + } + return false; + } + + private void returnToHand(Game game, SubType subType, Player controller, Ability source) { + FilterCreatureCard filter = new FilterCreatureCard(subType.getDescription() + " card"); + filter.add(new SubtypePredicate(subType)); + TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(new FilterCreatureCard(filter)); + if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) { + if (controller.chooseTarget(outcome, target, source, game)) { + Card card = game.getCard(target.getFirstTarget()); + if (card != null) { + controller.moveCards(card, Zone.HAND, source, game); + } + } + } + } +} diff --git a/Mage.Sets/src/mage/cards/g/GrimFlayer.java b/Mage.Sets/src/mage/cards/g/GrimFlayer.java index c72ef0bed1..dca28bd503 100644 --- a/Mage.Sets/src/mage/cards/g/GrimFlayer.java +++ b/Mage.Sets/src/mage/cards/g/GrimFlayer.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterCard; @@ -53,8 +54,8 @@ public class GrimFlayer extends CardImpl { public GrimFlayer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GrimGuardian.java b/Mage.Sets/src/mage/cards/g/GrimGuardian.java index f1d2fd399d..36d78bb51d 100644 --- a/Mage.Sets/src/mage/cards/g/GrimGuardian.java +++ b/Mage.Sets/src/mage/cards/g/GrimGuardian.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.LoseLifeOpponentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class GrimGuardian extends CardImpl { public GrimGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GrimHaruspex.java b/Mage.Sets/src/mage/cards/g/GrimHaruspex.java index b8c5d4372e..3b00ad9100 100644 --- a/Mage.Sets/src/mage/cards/g/GrimHaruspex.java +++ b/Mage.Sets/src/mage/cards/g/GrimHaruspex.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -59,8 +60,8 @@ public class GrimHaruspex extends CardImpl { public GrimHaruspex(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GrimLavamancer.java b/Mage.Sets/src/mage/cards/g/GrimLavamancer.java index 19a8681579..b38a2b3e7a 100644 --- a/Mage.Sets/src/mage/cards/g/GrimLavamancer.java +++ b/Mage.Sets/src/mage/cards/g/GrimLavamancer.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.filter.FilterCard; @@ -52,8 +53,8 @@ public class GrimLavamancer extends CardImpl { public GrimLavamancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GrimPoppet.java b/Mage.Sets/src/mage/cards/g/GrimPoppet.java index 7c25f31ac4..9ea36ebc92 100644 --- a/Mage.Sets/src/mage/cards/g/GrimPoppet.java +++ b/Mage.Sets/src/mage/cards/g/GrimPoppet.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -58,7 +59,7 @@ public class GrimPoppet extends CardImpl { public GrimPoppet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GrimRoustabout.java b/Mage.Sets/src/mage/cards/g/GrimRoustabout.java index a0a2911b42..17a2ff91dd 100644 --- a/Mage.Sets/src/mage/cards/g/GrimRoustabout.java +++ b/Mage.Sets/src/mage/cards/g/GrimRoustabout.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.UnleashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class GrimRoustabout extends CardImpl { public GrimRoustabout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Skeleton"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.SKELETON); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GrimStrider.java b/Mage.Sets/src/mage/cards/g/GrimStrider.java index 273f53fda9..68f10048e2 100644 --- a/Mage.Sets/src/mage/cards/g/GrimStrider.java +++ b/Mage.Sets/src/mage/cards/g/GrimStrider.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class GrimStrider extends CardImpl { public GrimStrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/g/GrimclawBats.java b/Mage.Sets/src/mage/cards/g/GrimclawBats.java index 669a440c30..49332c57bc 100644 --- a/Mage.Sets/src/mage/cards/g/GrimclawBats.java +++ b/Mage.Sets/src/mage/cards/g/GrimclawBats.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class GrimclawBats extends CardImpl { public GrimclawBats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Bat"); + this.subtype.add(SubType.BAT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GrimgrinCorpseBorn.java b/Mage.Sets/src/mage/cards/g/GrimgrinCorpseBorn.java index 42717ea0af..d0b56be7d7 100644 --- a/Mage.Sets/src/mage/cards/g/GrimgrinCorpseBorn.java +++ b/Mage.Sets/src/mage/cards/g/GrimgrinCorpseBorn.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.counters.CounterType; @@ -62,8 +63,8 @@ public class GrimgrinCorpseBorn extends CardImpl { public GrimgrinCorpseBorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Zombie"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GrimoireOfTheDead.java b/Mage.Sets/src/mage/cards/g/GrimoireOfTheDead.java index ae19f36ff7..625f2dbc6c 100644 --- a/Mage.Sets/src/mage/cards/g/GrimoireOfTheDead.java +++ b/Mage.Sets/src/mage/cards/g/GrimoireOfTheDead.java @@ -153,7 +153,7 @@ class GrimoireOfTheDeadEffect2 extends ContinuousEffectImpl { break; case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { - permanent.getSubtype(game).add("Zombie"); + permanent.getSubtype(game).add(SubType.ZOMBIE); } break; } diff --git a/Mage.Sets/src/mage/cards/g/GrimoireThief.java b/Mage.Sets/src/mage/cards/g/GrimoireThief.java index 213be68ec1..47e0db88f0 100644 --- a/Mage.Sets/src/mage/cards/g/GrimoireThief.java +++ b/Mage.Sets/src/mage/cards/g/GrimoireThief.java @@ -61,8 +61,8 @@ public class GrimoireThief extends CardImpl { public GrimoireThief(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GrinningDemon.java b/Mage.Sets/src/mage/cards/g/GrinningDemon.java index 8ac9858356..ebf0cda68c 100644 --- a/Mage.Sets/src/mage/cards/g/GrinningDemon.java +++ b/Mage.Sets/src/mage/cards/g/GrinningDemon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -46,7 +47,7 @@ public class GrinningDemon extends CardImpl { public GrinningDemon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/g/GrinningIgnus.java b/Mage.Sets/src/mage/cards/g/GrinningIgnus.java index 225cc96eb2..ae0828bbc3 100644 --- a/Mage.Sets/src/mage/cards/g/GrinningIgnus.java +++ b/Mage.Sets/src/mage/cards/g/GrinningIgnus.java @@ -37,6 +37,7 @@ import mage.abilities.mana.ActivateAsSorceryManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class GrinningIgnus extends CardImpl { public GrinningIgnus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/Griselbrand.java b/Mage.Sets/src/mage/cards/g/Griselbrand.java index 24bc595829..a4adbd6a73 100644 --- a/Mage.Sets/src/mage/cards/g/Griselbrand.java +++ b/Mage.Sets/src/mage/cards/g/Griselbrand.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class Griselbrand extends CardImpl { public Griselbrand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/g/GrislyAnglerfish.java b/Mage.Sets/src/mage/cards/g/GrislyAnglerfish.java index 798d4254dd..9b4daf1d1d 100644 --- a/Mage.Sets/src/mage/cards/g/GrislyAnglerfish.java +++ b/Mage.Sets/src/mage/cards/g/GrislyAnglerfish.java @@ -36,6 +36,7 @@ import mage.abilities.effects.RequirementEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -49,8 +50,8 @@ public class GrislyAnglerfish extends CardImpl { public GrislyAnglerfish(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Eldrazi"); - this.subtype.add("Fish"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.FISH); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GrislySurvivor.java b/Mage.Sets/src/mage/cards/g/GrislySurvivor.java index 4460e10db9..203f0f250a 100644 --- a/Mage.Sets/src/mage/cards/g/GrislySurvivor.java +++ b/Mage.Sets/src/mage/cards/g/GrislySurvivor.java @@ -1,65 +1,66 @@ -/* - * 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.cards.g; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.CycleOrDiscardControllerTriggeredAbility; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; - -/** - * - * @author ciaccona007 - */ -public class GrislySurvivor extends CardImpl { - - public GrislySurvivor(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - - this.subtype.add("Minotaur"); - this.subtype.add("Warrior"); - this.power = new MageInt(2); - this.toughness = new MageInt(3); - - // Whenever you cycle or discard a card, Grisly Survivor gets +2/+0 until end of turn. - addAbility(new CycleOrDiscardControllerTriggeredAbility(new BoostSourceEffect(2,0,Duration.EndOfTurn))); - } - - public GrislySurvivor(final GrislySurvivor card) { - super(card); - } - - @Override - public GrislySurvivor copy() { - return new GrislySurvivor(this); - } -} +/* + * 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.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CycleOrDiscardControllerTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; + +/** + * + * @author ciaccona007 + */ +public class GrislySurvivor extends CardImpl { + + public GrislySurvivor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Whenever you cycle or discard a card, Grisly Survivor gets +2/+0 until end of turn. + addAbility(new CycleOrDiscardControllerTriggeredAbility(new BoostSourceEffect(2,0,Duration.EndOfTurn))); + } + + public GrislySurvivor(final GrislySurvivor card) { + super(card); + } + + @Override + public GrislySurvivor copy() { + return new GrislySurvivor(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GrislyTransformation.java b/Mage.Sets/src/mage/cards/g/GrislyTransformation.java index 621c23740c..62d9ab5216 100644 --- a/Mage.Sets/src/mage/cards/g/GrislyTransformation.java +++ b/Mage.Sets/src/mage/cards/g/GrislyTransformation.java @@ -50,7 +50,7 @@ public class GrislyTransformation extends CardImpl { public GrislyTransformation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/g/GristleGrinner.java b/Mage.Sets/src/mage/cards/g/GristleGrinner.java index cb96fad59f..c727935781 100644 --- a/Mage.Sets/src/mage/cards/g/GristleGrinner.java +++ b/Mage.Sets/src/mage/cards/g/GristleGrinner.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class GristleGrinner extends CardImpl { public GristleGrinner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/Gristleback.java b/Mage.Sets/src/mage/cards/g/Gristleback.java index a63ef91af5..c0a83dd7c3 100644 --- a/Mage.Sets/src/mage/cards/g/Gristleback.java +++ b/Mage.Sets/src/mage/cards/g/Gristleback.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.BloodthirstAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class Gristleback extends CardImpl { public Gristleback(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Boar"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BOAR); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GrixisBattlemage.java b/Mage.Sets/src/mage/cards/g/GrixisBattlemage.java index c0cfd8cd42..7f8e7af34a 100644 --- a/Mage.Sets/src/mage/cards/g/GrixisBattlemage.java +++ b/Mage.Sets/src/mage/cards/g/GrixisBattlemage.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.combat.CantBlockTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class GrixisBattlemage extends CardImpl { public GrixisBattlemage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GrixisGrimblade.java b/Mage.Sets/src/mage/cards/g/GrixisGrimblade.java index 2423bd3aa5..39e638c25b 100644 --- a/Mage.Sets/src/mage/cards/g/GrixisGrimblade.java +++ b/Mage.Sets/src/mage/cards/g/GrixisGrimblade.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -60,8 +61,8 @@ public class GrixisGrimblade extends CardImpl { public GrixisGrimblade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U/R}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WARRIOR); diff --git a/Mage.Sets/src/mage/cards/g/GrixisIllusionist.java b/Mage.Sets/src/mage/cards/g/GrixisIllusionist.java index cd2829e663..c3a3d63d61 100644 --- a/Mage.Sets/src/mage/cards/g/GrixisIllusionist.java +++ b/Mage.Sets/src/mage/cards/g/GrixisIllusionist.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -49,8 +50,8 @@ public class GrixisIllusionist extends CardImpl { public GrixisIllusionist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GrixisSlavedriver.java b/Mage.Sets/src/mage/cards/g/GrixisSlavedriver.java index 42a26885e7..e7b93f7f17 100644 --- a/Mage.Sets/src/mage/cards/g/GrixisSlavedriver.java +++ b/Mage.Sets/src/mage/cards/g/GrixisSlavedriver.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.ZombieToken; /** @@ -46,8 +47,8 @@ public class GrixisSlavedriver extends CardImpl { public GrixisSlavedriver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Giant"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(4); this.addAbility(new LeavesBattlefieldTriggeredAbility(new CreateTokenEffect(new ZombieToken()), false)); diff --git a/Mage.Sets/src/mage/cards/g/GrixisSojourners.java b/Mage.Sets/src/mage/cards/g/GrixisSojourners.java index e1081b1b23..0afcc9b662 100644 --- a/Mage.Sets/src/mage/cards/g/GrixisSojourners.java +++ b/Mage.Sets/src/mage/cards/g/GrixisSojourners.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.target.common.TargetCardInASingleGraveyard; @@ -49,8 +50,8 @@ public class GrixisSojourners extends CardImpl { public GrixisSojourners(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}{R}"); - this.subtype.add("Zombie"); - this.subtype.add("Ogre"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.OGRE); diff --git a/Mage.Sets/src/mage/cards/g/GrizzledAngler.java b/Mage.Sets/src/mage/cards/g/GrizzledAngler.java index 0f00a5174d..06d5cd047d 100644 --- a/Mage.Sets/src/mage/cards/g/GrizzledAngler.java +++ b/Mage.Sets/src/mage/cards/g/GrizzledAngler.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -53,7 +54,7 @@ public class GrizzledAngler extends CardImpl { public GrizzledAngler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GrizzledLeotau.java b/Mage.Sets/src/mage/cards/g/GrizzledLeotau.java index 458c9e2ca4..8363a5da3e 100644 --- a/Mage.Sets/src/mage/cards/g/GrizzledLeotau.java +++ b/Mage.Sets/src/mage/cards/g/GrizzledLeotau.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class GrizzledLeotau extends CardImpl { public GrizzledLeotau(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); diff --git a/Mage.Sets/src/mage/cards/g/GrizzledOutcasts.java b/Mage.Sets/src/mage/cards/g/GrizzledOutcasts.java index c15b3ab2b8..31631d9f2c 100644 --- a/Mage.Sets/src/mage/cards/g/GrizzledOutcasts.java +++ b/Mage.Sets/src/mage/cards/g/GrizzledOutcasts.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.k.KrallenhordeWantons; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -48,8 +49,8 @@ public class GrizzledOutcasts extends CardImpl { public GrizzledOutcasts(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Human"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WEREWOLF); this.transformable = true; this.secondSideCardClazz = KrallenhordeWantons.class; diff --git a/Mage.Sets/src/mage/cards/g/GrizzlyBears.java b/Mage.Sets/src/mage/cards/g/GrizzlyBears.java index fa87558a05..f01ea495de 100644 --- a/Mage.Sets/src/mage/cards/g/GrizzlyBears.java +++ b/Mage.Sets/src/mage/cards/g/GrizzlyBears.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class GrizzlyBears extends CardImpl { public GrizzlyBears(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Bear"); + this.subtype.add(SubType.BEAR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/Groffskithur.java b/Mage.Sets/src/mage/cards/g/Groffskithur.java index e84cf75847..00c3aaa9b8 100644 --- a/Mage.Sets/src/mage/cards/g/Groffskithur.java +++ b/Mage.Sets/src/mage/cards/g/Groffskithur.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.NamePredicate; import mage.target.common.TargetCardInYourGraveyard; @@ -53,7 +54,7 @@ public class Groffskithur extends CardImpl { public Groffskithur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GrotagSiegeRunner.java b/Mage.Sets/src/mage/cards/g/GrotagSiegeRunner.java index b34b0438b7..b637ff4023 100644 --- a/Mage.Sets/src/mage/cards/g/GrotagSiegeRunner.java +++ b/Mage.Sets/src/mage/cards/g/GrotagSiegeRunner.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -59,8 +60,8 @@ public class GrotagSiegeRunner extends CardImpl { public GrotagSiegeRunner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GrotagThrasher.java b/Mage.Sets/src/mage/cards/g/GrotagThrasher.java index f9bd2cdf60..a03ee7b8a1 100644 --- a/Mage.Sets/src/mage/cards/g/GrotagThrasher.java +++ b/Mage.Sets/src/mage/cards/g/GrotagThrasher.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.CantBlockTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -45,7 +46,7 @@ public class GrotagThrasher extends CardImpl { public GrotagThrasher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GrotesqueHybrid.java b/Mage.Sets/src/mage/cards/g/GrotesqueHybrid.java index d19e45098e..74c916a226 100644 --- a/Mage.Sets/src/mage/cards/g/GrotesqueHybrid.java +++ b/Mage.Sets/src/mage/cards/g/GrotesqueHybrid.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class GrotesqueHybrid extends CardImpl { public GrotesqueHybrid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/Groundbreaker.java b/Mage.Sets/src/mage/cards/g/Groundbreaker.java index 9d6037f89c..4c6870841c 100644 --- a/Mage.Sets/src/mage/cards/g/Groundbreaker.java +++ b/Mage.Sets/src/mage/cards/g/Groundbreaker.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -46,7 +47,7 @@ public class Groundbreaker extends CardImpl { public Groundbreaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/Grounded.java b/Mage.Sets/src/mage/cards/g/Grounded.java index 40d49e09c2..d25db29ceb 100644 --- a/Mage.Sets/src/mage/cards/g/Grounded.java +++ b/Mage.Sets/src/mage/cards/g/Grounded.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -50,7 +51,7 @@ public class Grounded extends CardImpl { public Grounded(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/g/GroundlingPouncer.java b/Mage.Sets/src/mage/cards/g/GroundlingPouncer.java index 7fbc45d40c..c03cd462e1 100644 --- a/Mage.Sets/src/mage/cards/g/GroundlingPouncer.java +++ b/Mage.Sets/src/mage/cards/g/GroundlingPouncer.java @@ -43,6 +43,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.EffectType; import mage.constants.Zone; @@ -64,8 +65,8 @@ public class GroundlingPouncer extends CardImpl { } public GroundlingPouncer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G/U}"); - this.subtype.add("Faerie"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G/U}"); + this.subtype.add(SubType.FAERIE); this.power = new MageInt(2); this.toughness = new MageInt(1); @@ -96,7 +97,6 @@ class GroundlingPouncerAbility extends LimitedTimesPerTurnActivatedAbility { private static final Effects emptyEffects = new Effects(); - private final Condition condition; private final String ruleText; public GroundlingPouncerAbility(Zone zone, Effect effect, Cost cost, Condition condition, String rule) { @@ -107,7 +107,6 @@ class GroundlingPouncerAbility extends LimitedTimesPerTurnActivatedAbility { public GroundlingPouncerAbility(GroundlingPouncerAbility ability) { super(ability); - this.condition = ability.condition; this.ruleText = ability.ruleText; } @@ -119,14 +118,6 @@ class GroundlingPouncerAbility extends LimitedTimesPerTurnActivatedAbility { return super.getEffects(game, effectType); } - @Override - public boolean canActivate(UUID playerId, Game game) { - if (!condition.apply(game, this)) { - return false; - } - return super.canActivate(playerId, game); - } - @Override public GroundlingPouncerAbility copy() { return new GroundlingPouncerAbility(this); diff --git a/Mage.Sets/src/mage/cards/g/GroundshakerSliver.java b/Mage.Sets/src/mage/cards/g/GroundshakerSliver.java index 68e51292e0..b4e9d81561 100644 --- a/Mage.Sets/src/mage/cards/g/GroundshakerSliver.java +++ b/Mage.Sets/src/mage/cards/g/GroundshakerSliver.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -47,7 +48,7 @@ public class GroundshakerSliver extends CardImpl { public GroundshakerSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{G}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/Groundskeeper.java b/Mage.Sets/src/mage/cards/g/Groundskeeper.java index ebeac04e5a..4b3d127ae9 100644 --- a/Mage.Sets/src/mage/cards/g/Groundskeeper.java +++ b/Mage.Sets/src/mage/cards/g/Groundskeeper.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterBasicLandCard; import mage.target.common.TargetCardInYourGraveyard; @@ -48,8 +49,8 @@ public class Groundskeeper extends CardImpl { public Groundskeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GroveOfTheGuardian.java b/Mage.Sets/src/mage/cards/g/GroveOfTheGuardian.java index 0dc31db480..fa34c809a4 100644 --- a/Mage.Sets/src/mage/cards/g/GroveOfTheGuardian.java +++ b/Mage.Sets/src/mage/cards/g/GroveOfTheGuardian.java @@ -42,6 +42,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; @@ -91,7 +92,7 @@ public class GroveOfTheGuardian extends CardImpl { cardType.add(CardType.CREATURE); color.setGreen(true); color.setWhite(true); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); power = new MageInt(8); toughness = new MageInt(8); this.addAbility(VigilanceAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/g/GroveRumbler.java b/Mage.Sets/src/mage/cards/g/GroveRumbler.java index 5fc2d177db..27880c8ea6 100644 --- a/Mage.Sets/src/mage/cards/g/GroveRumbler.java +++ b/Mage.Sets/src/mage/cards/g/GroveRumbler.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,7 +46,7 @@ public class GroveRumbler extends CardImpl { public GroveRumbler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GrovetenderDruids.java b/Mage.Sets/src/mage/cards/g/GrovetenderDruids.java index 51d504c9a0..b4125b1081 100644 --- a/Mage.Sets/src/mage/cards/g/GrovetenderDruids.java +++ b/Mage.Sets/src/mage/cards/g/GrovetenderDruids.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.token.GrovetenderDruidsPlantToken; @@ -51,9 +52,9 @@ public class GrovetenderDruids extends CardImpl { public GrovetenderDruids(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{W}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); - this.subtype.add("Ally"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); + this.subtype.add(SubType.ALLY); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GrowingRitesOfItlimoc.java b/Mage.Sets/src/mage/cards/g/GrowingRitesOfItlimoc.java new file mode 100644 index 0000000000..bd78168fff --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GrowingRitesOfItlimoc.java @@ -0,0 +1,92 @@ +/* + * 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.cards.g; + +import java.util.UUID; + +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.i.ItlimocCradleOfTheSun; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.SuperType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author JRHerlehy + */ +public class GrowingRitesOfItlimoc extends CardImpl { + + private static final FilterCard filter = new FilterCard("a creature card"); + + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); + } + + public GrowingRitesOfItlimoc(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + + this.addSuperType(SuperType.LEGENDARY); + + this.transformable = true; + this.secondSideCardClazz = ItlimocCradleOfTheSun.class; + + // When Growing Rites of Itlimoc enters the battlefield, look at the top four cards of your library. + // You may reveal a creature card from among them and put it into your hand. + // Put the rest on the bottom of your library in any order. + this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(4, 1, filter, true, true, Zone.HAND, false))); + + // At the beginning of your end step, if you control four or more creatures, transform Growing Rites of Itlimoc. + this.addAbility(new TransformAbility()); + this.addAbility(new ConditionalTriggeredAbility( + new BeginningOfEndStepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, false), + new PermanentsOnTheBattlefieldCondition(new FilterControlledCreaturePermanent(), ComparisonType.MORE_THAN, 3), + "At the beginning of your end step, if you control four or more creatures, transform {this}")); + } + + public GrowingRitesOfItlimoc(final GrowingRitesOfItlimoc card) { + super(card); + } + + @Override + public GrowingRitesOfItlimoc copy() { + return new GrowingRitesOfItlimoc(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/Grozoth.java b/Mage.Sets/src/mage/cards/g/Grozoth.java index 4ad0dec04f..5a9aa95201 100644 --- a/Mage.Sets/src/mage/cards/g/Grozoth.java +++ b/Mage.Sets/src/mage/cards/g/Grozoth.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.abilities.keyword.TransmuteAbility; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Outcome; @@ -57,7 +58,7 @@ public class Grozoth extends CardImpl { public Grozoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{U}{U}{U}"); - this.subtype.add("Leviathan"); + this.subtype.add(SubType.LEVIATHAN); this.power = new MageInt(9); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/g/GruesomeDeformity.java b/Mage.Sets/src/mage/cards/g/GruesomeDeformity.java index e44d43591f..262c453b28 100644 --- a/Mage.Sets/src/mage/cards/g/GruesomeDeformity.java +++ b/Mage.Sets/src/mage/cards/g/GruesomeDeformity.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class GruesomeDeformity extends CardImpl { public GruesomeDeformity(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/g/GruulGuildmage.java b/Mage.Sets/src/mage/cards/g/GruulGuildmage.java index b462e2c976..cd35a78f78 100644 --- a/Mage.Sets/src/mage/cards/g/GruulGuildmage.java +++ b/Mage.Sets/src/mage/cards/g/GruulGuildmage.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -55,8 +56,8 @@ public class GruulGuildmage extends CardImpl { public GruulGuildmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R/G}{R/G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GruulKeyrune.java b/Mage.Sets/src/mage/cards/g/GruulKeyrune.java index aef7e8b078..515f2dd219 100644 --- a/Mage.Sets/src/mage/cards/g/GruulKeyrune.java +++ b/Mage.Sets/src/mage/cards/g/GruulKeyrune.java @@ -38,6 +38,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -75,7 +76,7 @@ public class GruulKeyrune extends CardImpl { cardType.add(CardType.CREATURE); color.setRed(true); color.setGreen(true); - subtype.add("Beast"); + subtype.add(SubType.BEAST); power = new MageInt(3); toughness = new MageInt(2); this.addAbility(TrampleAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/g/GruulNodorog.java b/Mage.Sets/src/mage/cards/g/GruulNodorog.java index 3ce6d14bbc..961d2d966b 100644 --- a/Mage.Sets/src/mage/cards/g/GruulNodorog.java +++ b/Mage.Sets/src/mage/cards/g/GruulNodorog.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class GruulNodorog extends CardImpl { public GruulNodorog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GruulRagebeast.java b/Mage.Sets/src/mage/cards/g/GruulRagebeast.java index 77c4f2b1b9..b2f9c291f6 100644 --- a/Mage.Sets/src/mage/cards/g/GruulRagebeast.java +++ b/Mage.Sets/src/mage/cards/g/GruulRagebeast.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -62,7 +63,7 @@ public class GruulRagebeast extends CardImpl { public GruulRagebeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/g/GruulScrapper.java b/Mage.Sets/src/mage/cards/g/GruulScrapper.java index c2de880a2d..a3c45542ff 100644 --- a/Mage.Sets/src/mage/cards/g/GruulScrapper.java +++ b/Mage.Sets/src/mage/cards/g/GruulScrapper.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.watchers.common.ManaSpentToCastWatcher; @@ -49,8 +50,8 @@ public class GruulScrapper extends CardImpl { public GruulScrapper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Human"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GruulWarPlow.java b/Mage.Sets/src/mage/cards/g/GruulWarPlow.java index fd27a0f0b4..c48adefaa9 100644 --- a/Mage.Sets/src/mage/cards/g/GruulWarPlow.java +++ b/Mage.Sets/src/mage/cards/g/GruulWarPlow.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -74,7 +75,7 @@ class GruulWarPlowToken extends Token { super("Juggernaut", "4/4 Juggernaut artifact creature"); cardType.add(CardType.CREATURE); cardType.add(CardType.ARTIFACT); - subtype.add("Juggernaut"); + subtype.add(SubType.JUGGERNAUT); power = new MageInt(4); toughness = new MageInt(4); } diff --git a/Mage.Sets/src/mage/cards/g/GryffVanguard.java b/Mage.Sets/src/mage/cards/g/GryffVanguard.java index 815a4d58f5..5b676e4578 100644 --- a/Mage.Sets/src/mage/cards/g/GryffVanguard.java +++ b/Mage.Sets/src/mage/cards/g/GryffVanguard.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class GryffVanguard extends CardImpl { public GryffVanguard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GryffsBoon.java b/Mage.Sets/src/mage/cards/g/GryffsBoon.java index 702e577977..171fc5c063 100644 --- a/Mage.Sets/src/mage/cards/g/GryffsBoon.java +++ b/Mage.Sets/src/mage/cards/g/GryffsBoon.java @@ -56,7 +56,7 @@ public class GryffsBoon extends CardImpl { public GryffsBoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GuanYuSaintedWarrior.java b/Mage.Sets/src/mage/cards/g/GuanYuSaintedWarrior.java index 89dff96fee..a4500b9f30 100644 --- a/Mage.Sets/src/mage/cards/g/GuanYuSaintedWarrior.java +++ b/Mage.Sets/src/mage/cards/g/GuanYuSaintedWarrior.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -46,9 +47,9 @@ public class GuanYuSaintedWarrior extends CardImpl { public GuanYuSaintedWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GuardDuty.java b/Mage.Sets/src/mage/cards/g/GuardDuty.java index 4409b9d111..34b8948bf0 100644 --- a/Mage.Sets/src/mage/cards/g/GuardDuty.java +++ b/Mage.Sets/src/mage/cards/g/GuardDuty.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -52,7 +53,7 @@ public class GuardDuty extends CardImpl { public GuardDuty (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GuardGomazoa.java b/Mage.Sets/src/mage/cards/g/GuardGomazoa.java index 0ad19da71d..d74d4dd210 100644 --- a/Mage.Sets/src/mage/cards/g/GuardGomazoa.java +++ b/Mage.Sets/src/mage/cards/g/GuardGomazoa.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class GuardGomazoa extends CardImpl { public GuardGomazoa(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Jellyfish"); + this.subtype.add(SubType.JELLYFISH); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GuardianAutomaton.java b/Mage.Sets/src/mage/cards/g/GuardianAutomaton.java index 9adf862bda..b1e724a2ac 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianAutomaton.java +++ b/Mage.Sets/src/mage/cards/g/GuardianAutomaton.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class GuardianAutomaton extends CardImpl { public GuardianAutomaton(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GuardianBeast.java b/Mage.Sets/src/mage/cards/g/GuardianBeast.java index d22497cbd5..72c83b9654 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianBeast.java +++ b/Mage.Sets/src/mage/cards/g/GuardianBeast.java @@ -71,7 +71,7 @@ public class GuardianBeast extends CardImpl { public GuardianBeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(4); @@ -142,7 +142,7 @@ class GuardianBeastConditionalEffect extends ContinuousRuleModifyingEffectImpl { } StackObject spell = game.getStack().getStackObject(event.getSourceId()); - if (event.getType() == EventType.LOSE_CONTROL || event.getType() == EventType.ATTACH || event.getType() == EventType.TARGET && spell != null && spell.isEnchantment() && spell.getSubtype(game).contains("Aura")) { + if (event.getType() == EventType.LOSE_CONTROL || event.getType() == EventType.ATTACH || event.getType() == EventType.TARGET && spell != null && spell.isEnchantment() && spell.hasSubtype(SubType.AURA, game)) { for (Permanent perm : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) { if (perm != null && Objects.equals(perm.getId(), targetPermanent.getId()) && !perm.isCreature()) { return true; diff --git a/Mage.Sets/src/mage/cards/g/GuardianIdol.java b/Mage.Sets/src/mage/cards/g/GuardianIdol.java index e4c2392009..13e0f88aae 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianIdol.java +++ b/Mage.Sets/src/mage/cards/g/GuardianIdol.java @@ -37,6 +37,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -74,7 +75,7 @@ class GuardianIdolGolemToken extends Token { super("Golem", "2/2 Golem artifact creature token"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Golem"); + subtype.add(SubType.GOLEM); power = new MageInt(2); toughness = new MageInt(2); } diff --git a/Mage.Sets/src/mage/cards/g/GuardianLions.java b/Mage.Sets/src/mage/cards/g/GuardianLions.java index 79b79a6c1a..a1ec8bf518 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianLions.java +++ b/Mage.Sets/src/mage/cards/g/GuardianLions.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class GuardianLions extends CardImpl { public GuardianLions(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(1); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/g/GuardianOfCloverdell.java b/Mage.Sets/src/mage/cards/g/GuardianOfCloverdell.java index a120b848b8..15be302352 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianOfCloverdell.java +++ b/Mage.Sets/src/mage/cards/g/GuardianOfCloverdell.java @@ -61,8 +61,8 @@ public class GuardianOfCloverdell extends CardImpl { public GuardianOfCloverdell(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GuardianOfPilgrims.java b/Mage.Sets/src/mage/cards/g/GuardianOfPilgrims.java index 9427a8be5c..741ae00c3d 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianOfPilgrims.java +++ b/Mage.Sets/src/mage/cards/g/GuardianOfPilgrims.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -45,8 +46,8 @@ public class GuardianOfPilgrims extends CardImpl { public GuardianOfPilgrims(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Spirit"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GuardianOfSolitude.java b/Mage.Sets/src/mage/cards/g/GuardianOfSolitude.java index 61ef6d9c27..eb01d6288c 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianOfSolitude.java +++ b/Mage.Sets/src/mage/cards/g/GuardianOfSolitude.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class GuardianOfSolitude extends CardImpl { public GuardianOfSolitude(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GuardianOfTazeem.java b/Mage.Sets/src/mage/cards/g/GuardianOfTazeem.java index 27427e6bca..64996b3853 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianOfTazeem.java +++ b/Mage.Sets/src/mage/cards/g/GuardianOfTazeem.java @@ -62,7 +62,7 @@ public class GuardianOfTazeem extends CardImpl { public GuardianOfTazeem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GuardianOfTheAges.java b/Mage.Sets/src/mage/cards/g/GuardianOfTheAges.java index 0f53216b5a..6a56a11e70 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianOfTheAges.java +++ b/Mage.Sets/src/mage/cards/g/GuardianOfTheAges.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; @@ -53,7 +54,7 @@ import mage.game.permanent.Permanent; public class GuardianOfTheAges extends CardImpl { public GuardianOfTheAges(UUID ownerId, CardSetInfo setInfo){ super(ownerId,setInfo,new CardType[]{CardType.CREATURE,CardType.ARTIFACT},"{7}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/g/GuardianOfTheGateless.java b/Mage.Sets/src/mage/cards/g/GuardianOfTheGateless.java index 2326d53179..1f51f2ae2b 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianOfTheGateless.java +++ b/Mage.Sets/src/mage/cards/g/GuardianOfTheGateless.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class GuardianOfTheGateless extends CardImpl { public GuardianOfTheGateless(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GuardianOfTheGreatConduit.java b/Mage.Sets/src/mage/cards/g/GuardianOfTheGreatConduit.java index d198fae7a2..f85962c599 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianOfTheGreatConduit.java +++ b/Mage.Sets/src/mage/cards/g/GuardianOfTheGreatConduit.java @@ -63,7 +63,7 @@ public class GuardianOfTheGreatConduit extends CardImpl { public GuardianOfTheGreatConduit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GuardianOfTheGuildpact.java b/Mage.Sets/src/mage/cards/g/GuardianOfTheGuildpact.java index 7ee04b64b0..00168cbba0 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianOfTheGuildpact.java +++ b/Mage.Sets/src/mage/cards/g/GuardianOfTheGuildpact.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.MonocoloredPredicate; @@ -50,7 +51,7 @@ public class GuardianOfTheGuildpact extends CardImpl { public GuardianOfTheGuildpact(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GuardianOfVituGhazi.java b/Mage.Sets/src/mage/cards/g/GuardianOfVituGhazi.java index 75f22af91d..a81372fbea 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianOfVituGhazi.java +++ b/Mage.Sets/src/mage/cards/g/GuardianOfVituGhazi.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class GuardianOfVituGhazi extends CardImpl { public GuardianOfVituGhazi(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/g/GuardianSeraph.java b/Mage.Sets/src/mage/cards/g/GuardianSeraph.java index 47170ad7c0..193560c24c 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianSeraph.java +++ b/Mage.Sets/src/mage/cards/g/GuardianSeraph.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -49,7 +50,7 @@ public class GuardianSeraph extends CardImpl { public GuardianSeraph(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GuardianShieldBearer.java b/Mage.Sets/src/mage/cards/g/GuardianShieldBearer.java index 22f57a3f62..7543ac20cf 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianShieldBearer.java +++ b/Mage.Sets/src/mage/cards/g/GuardianShieldBearer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -56,8 +57,8 @@ public class GuardianShieldBearer extends CardImpl { public GuardianShieldBearer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GuardianZendikon.java b/Mage.Sets/src/mage/cards/g/GuardianZendikon.java index 4476cfcb62..8401aec9cd 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianZendikon.java +++ b/Mage.Sets/src/mage/cards/g/GuardianZendikon.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class GuardianZendikon extends CardImpl { public GuardianZendikon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land @@ -91,7 +92,7 @@ class WallToken extends Token { super("", "2/6 white wall creature with defender"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Wall"); + subtype.add(SubType.WALL); power = new MageInt(2); toughness = new MageInt(6); this.addAbility(DefenderAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/g/GuardiansMagemark.java b/Mage.Sets/src/mage/cards/g/GuardiansMagemark.java index 6192728252..9255cb069b 100644 --- a/Mage.Sets/src/mage/cards/g/GuardiansMagemark.java +++ b/Mage.Sets/src/mage/cards/g/GuardiansMagemark.java @@ -57,7 +57,7 @@ public class GuardiansMagemark extends CardImpl { public GuardiansMagemark(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/g/GuardiansOfAkrasa.java b/Mage.Sets/src/mage/cards/g/GuardiansOfAkrasa.java index 508811276c..b83ee0cdc1 100644 --- a/Mage.Sets/src/mage/cards/g/GuardiansOfAkrasa.java +++ b/Mage.Sets/src/mage/cards/g/GuardiansOfAkrasa.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ExaltedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class GuardiansOfAkrasa extends CardImpl { public GuardiansOfAkrasa (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GuardiansOfMeletis.java b/Mage.Sets/src/mage/cards/g/GuardiansOfMeletis.java index 77255a0445..f21d9775cf 100644 --- a/Mage.Sets/src/mage/cards/g/GuardiansOfMeletis.java +++ b/Mage.Sets/src/mage/cards/g/GuardiansOfMeletis.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class GuardiansOfMeletis extends CardImpl { public GuardiansOfMeletis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(0); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/g/GudulLurker.java b/Mage.Sets/src/mage/cards/g/GudulLurker.java index 77aacb4f30..d0d2fb4532 100644 --- a/Mage.Sets/src/mage/cards/g/GudulLurker.java +++ b/Mage.Sets/src/mage/cards/g/GudulLurker.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class GudulLurker extends CardImpl { public GudulLurker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Salamander"); + this.subtype.add(SubType.SALAMANDER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GuidedPassage.java b/Mage.Sets/src/mage/cards/g/GuidedPassage.java new file mode 100644 index 0000000000..fb04a3237b --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GuidedPassage.java @@ -0,0 +1,149 @@ +/* + * 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.cards.g; + +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.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreatureCard; +import mage.filter.common.FilterLandCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.Target; +import mage.target.TargetCard; +import mage.target.common.TargetOpponent; + +/** + * + * @author TheElk801 + */ +public class GuidedPassage extends CardImpl { + + public GuidedPassage(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{U}{R}{G}"); + + // Reveal the cards in your library. An opponent chooses from among them a creature card, a land card, and a noncreature, nonland card. You put the chosen cards into your hand. Then shuffle your library. + this.getSpellAbility().addEffect(new GuidedPassageEffect()); + } + + public GuidedPassage(final GuidedPassage card) { + super(card); + } + + @Override + public GuidedPassage copy() { + return new GuidedPassage(this); + } +} + +class GuidedPassageEffect extends OneShotEffect { + + private static final FilterCard filter = new FilterCard("noncreature, nonland card"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); + filter.add(Predicates.not(new CardTypePredicate(CardType.LAND))); + } + + GuidedPassageEffect() { + super(Outcome.Benefit); + this.staticText = "Reveal the cards in your library. An opponent chooses from among them a creature card, a land card, and a noncreature, nonland card. You put the chosen cards into your hand. Then shuffle your library."; + } + + GuidedPassageEffect(final GuidedPassageEffect effect) { + super(effect); + } + + @Override + public GuidedPassageEffect copy() { + return new GuidedPassageEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (controller == null || sourceObject == null) { + return false; + } + int libSize = controller.getLibrary().size(); + if (libSize == 0) { + controller.shuffleLibrary(source, game); + return true; + } + CardsImpl cards = new CardsImpl(); + cards.addAll(controller.getLibrary().getTopCards(game, libSize)); + controller.revealCards(sourceObject.getIdName(), cards, game); + + Player opponent; + Set opponents = game.getOpponents(controller.getId()); + if (opponents.size() == 1) { + opponent = game.getPlayer(opponents.iterator().next()); + } else { + Target target = new TargetOpponent(true); + controller.chooseTarget(Outcome.Detriment, target, source, game); + opponent = game.getPlayer(target.getFirstTarget()); + } + TargetCard target1 = new TargetCard(1, Zone.LIBRARY, new FilterCreatureCard()); + TargetCard target2 = new TargetCard(1, Zone.LIBRARY, new FilterLandCard()); + TargetCard target3 = new TargetCard(1, Zone.LIBRARY, new FilterCard(filter)); + opponent.chooseTarget(Outcome.Detriment, cards, target1, source, game); + opponent.chooseTarget(Outcome.Detriment, cards, target2, source, game); + opponent.chooseTarget(Outcome.Detriment, cards, target3, source, game); + Cards cardsToHand = new CardsImpl(); + Card cardToHand; + cardToHand = game.getCard(target1.getFirstTarget()); + if (cardToHand != null) { + cardsToHand.add(cardToHand); + } + cardToHand = game.getCard(target2.getFirstTarget()); + if (cardToHand != null) { + cardsToHand.add(cardToHand); + } + cardToHand = game.getCard(target3.getFirstTarget()); + if (cardToHand != null) { + cardsToHand.add(cardToHand); + } + controller.moveCards(cardsToHand, Zone.HAND, source, game); + controller.shuffleLibrary(source, game); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/g/GuildFeud.java b/Mage.Sets/src/mage/cards/g/GuildFeud.java index 8147774664..ac73640d59 100644 --- a/Mage.Sets/src/mage/cards/g/GuildFeud.java +++ b/Mage.Sets/src/mage/cards/g/GuildFeud.java @@ -27,7 +27,6 @@ */ package mage.cards.g; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; @@ -44,6 +43,8 @@ import mage.players.Player; import mage.target.TargetCard; import mage.target.common.TargetOpponent; +import java.util.UUID; + /** * * @author LevelX2 @@ -58,7 +59,7 @@ public class GuildFeud extends CardImpl { // then puts the rest into his or her graveyard. You do the same with the top three // cards of your library. If two creatures are put onto the battlefield this way, // those creatures fight each other. - Ability ability = new BeginningOfUpkeepTriggeredAbility(new GuildFeudEffect(), TargetController.YOU, true); + Ability ability = new BeginningOfUpkeepTriggeredAbility(new GuildFeudEffect(), TargetController.YOU, false); ability.addTarget(new TargetOpponent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GuildscornWard.java b/Mage.Sets/src/mage/cards/g/GuildscornWard.java index 691d657aae..ee076e6fb1 100644 --- a/Mage.Sets/src/mage/cards/g/GuildscornWard.java +++ b/Mage.Sets/src/mage/cards/g/GuildscornWard.java @@ -56,7 +56,7 @@ public class GuildscornWard extends CardImpl { public GuildscornWard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/g/Guile.java b/Mage.Sets/src/mage/cards/g/Guile.java index 21e6d4bf06..33c35bd6b3 100644 --- a/Mage.Sets/src/mage/cards/g/Guile.java +++ b/Mage.Sets/src/mage/cards/g/Guile.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,8 +58,8 @@ public class Guile extends CardImpl { public Guile(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}{U}"); - this.subtype.add("Elemental"); - this.subtype.add("Incarnation"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.INCARNATION); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/g/Guiltfeeder.java b/Mage.Sets/src/mage/cards/g/Guiltfeeder.java index 6b869f8fae..c9f737e170 100644 --- a/Mage.Sets/src/mage/cards/g/Guiltfeeder.java +++ b/Mage.Sets/src/mage/cards/g/Guiltfeeder.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class Guiltfeeder extends CardImpl { public Guiltfeeder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GuiltyConscience.java b/Mage.Sets/src/mage/cards/g/GuiltyConscience.java index bdcf893bc0..eee1b27f83 100644 --- a/Mage.Sets/src/mage/cards/g/GuiltyConscience.java +++ b/Mage.Sets/src/mage/cards/g/GuiltyConscience.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class GuiltyConscience extends CardImpl { public GuiltyConscience(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GuiseOfFire.java b/Mage.Sets/src/mage/cards/g/GuiseOfFire.java index d260e428cc..259c716386 100644 --- a/Mage.Sets/src/mage/cards/g/GuiseOfFire.java +++ b/Mage.Sets/src/mage/cards/g/GuiseOfFire.java @@ -48,7 +48,7 @@ public class GuiseOfFire extends CardImpl { public GuiseOfFire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/g/GulfSquid.java b/Mage.Sets/src/mage/cards/g/GulfSquid.java index 19fa89291c..33a457a835 100644 --- a/Mage.Sets/src/mage/cards/g/GulfSquid.java +++ b/Mage.Sets/src/mage/cards/g/GulfSquid.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.TapAllTargetPlayerControlsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.TargetPlayer; @@ -46,8 +47,8 @@ public class GulfSquid extends CardImpl { public GulfSquid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Squid"); - this.subtype.add("Beast"); + this.subtype.add(SubType.SQUID); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/Guma.java b/Mage.Sets/src/mage/cards/g/Guma.java index f1e4c1a63a..4c18ea316b 100644 --- a/Mage.Sets/src/mage/cards/g/Guma.java +++ b/Mage.Sets/src/mage/cards/g/Guma.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class Guma extends CardImpl { public Guma(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/Gundark.java b/Mage.Sets/src/mage/cards/g/Gundark.java index 9be8054e71..fa7881bd45 100644 --- a/Mage.Sets/src/mage/cards/g/Gundark.java +++ b/Mage.Sets/src/mage/cards/g/Gundark.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MonstrosityAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,7 +47,7 @@ public class Gundark extends CardImpl { public Gundark(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GunganCaptain.java b/Mage.Sets/src/mage/cards/g/GunganCaptain.java index 683feea880..836a33429a 100644 --- a/Mage.Sets/src/mage/cards/g/GunganCaptain.java +++ b/Mage.Sets/src/mage/cards/g/GunganCaptain.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class GunganCaptain extends CardImpl { public GunganCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Gungan"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GUNGAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GurmagAngler.java b/Mage.Sets/src/mage/cards/g/GurmagAngler.java index d25de20064..4a65221c25 100644 --- a/Mage.Sets/src/mage/cards/g/GurmagAngler.java +++ b/Mage.Sets/src/mage/cards/g/GurmagAngler.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DelveAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class GurmagAngler extends CardImpl { public GurmagAngler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Fish"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.FISH); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GurmagDrowner.java b/Mage.Sets/src/mage/cards/g/GurmagDrowner.java index 2db41a75d2..e7bd738fa8 100644 --- a/Mage.Sets/src/mage/cards/g/GurmagDrowner.java +++ b/Mage.Sets/src/mage/cards/g/GurmagDrowner.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.ExploitAbility; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -51,8 +52,8 @@ public class GurmagDrowner extends CardImpl { public GurmagDrowner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Naga"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GurmagSwiftwing.java b/Mage.Sets/src/mage/cards/g/GurmagSwiftwing.java index 6c83f6555e..707115e529 100644 --- a/Mage.Sets/src/mage/cards/g/GurmagSwiftwing.java +++ b/Mage.Sets/src/mage/cards/g/GurmagSwiftwing.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class GurmagSwiftwing extends CardImpl { public GurmagSwiftwing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Bat"); + this.subtype.add(SubType.BAT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GustSkimmer.java b/Mage.Sets/src/mage/cards/g/GustSkimmer.java index 3ec5efa5c8..4e5c9acea4 100644 --- a/Mage.Sets/src/mage/cards/g/GustSkimmer.java +++ b/Mage.Sets/src/mage/cards/g/GustSkimmer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class GustSkimmer extends CardImpl { public GustSkimmer (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(2); this.toughness = new MageInt(1); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{U}"))); diff --git a/Mage.Sets/src/mage/cards/g/GustWalker.java b/Mage.Sets/src/mage/cards/g/GustWalker.java index 3734b0c311..be7b0fe9e4 100644 --- a/Mage.Sets/src/mage/cards/g/GustWalker.java +++ b/Mage.Sets/src/mage/cards/g/GustWalker.java @@ -1,75 +1,76 @@ -/* - * 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.cards.g; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.BecomesExertSourceTriggeredAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; -import mage.abilities.keyword.ExertAbility; -import mage.abilities.keyword.FlyingAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; - -/** - * - * @author Styxo - */ -public class GustWalker extends CardImpl { - - public GustWalker(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - - this.subtype.add("Human"); - this.subtype.add("Wizard"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // You may exert Gust Walker as it attacks. When you do, it gets +1/+1 and gains flying until end of turn. - Effect effect = new BoostSourceEffect(1, 1, Duration.EndOfTurn); - effect.setText("it gets +1/+1"); - BecomesExertSourceTriggeredAbility ability = new BecomesExertSourceTriggeredAbility(effect); - effect = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn); - effect.setText("and gains flying until end of turn"); - ability.addEffect(effect); - this.addAbility(new ExertAbility(ability)); - } - - public GustWalker(final GustWalker card) { - super(card); - } - - @Override - public GustWalker copy() { - return new GustWalker(this); - } -} +/* + * 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.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesExertSourceTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.ExertAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; + +/** + * + * @author Styxo + */ +public class GustWalker extends CardImpl { + + public GustWalker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // You may exert Gust Walker as it attacks. When you do, it gets +1/+1 and gains flying until end of turn. + Effect effect = new BoostSourceEffect(1, 1, Duration.EndOfTurn); + effect.setText("it gets +1/+1"); + BecomesExertSourceTriggeredAbility ability = new BecomesExertSourceTriggeredAbility(effect); + effect = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains flying until end of turn"); + ability.addEffect(effect); + this.addAbility(new ExertAbility(ability)); + } + + public GustWalker(final GustWalker card) { + super(card); + } + + @Override + public GustWalker copy() { + return new GustWalker(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GustcloakCavalier.java b/Mage.Sets/src/mage/cards/g/GustcloakCavalier.java index 79220e0ff9..e09e59319c 100644 --- a/Mage.Sets/src/mage/cards/g/GustcloakCavalier.java +++ b/Mage.Sets/src/mage/cards/g/GustcloakCavalier.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlankingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -50,8 +51,8 @@ public class GustcloakCavalier extends CardImpl { public GustcloakCavalier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GustcloakHarrier.java b/Mage.Sets/src/mage/cards/g/GustcloakHarrier.java index 4d8b409c26..fc126900cc 100644 --- a/Mage.Sets/src/mage/cards/g/GustcloakHarrier.java +++ b/Mage.Sets/src/mage/cards/g/GustcloakHarrier.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,8 +48,8 @@ public class GustcloakHarrier extends CardImpl { public GustcloakHarrier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GustcloakRunner.java b/Mage.Sets/src/mage/cards/g/GustcloakRunner.java index 0b548c5fe5..492f45c81c 100644 --- a/Mage.Sets/src/mage/cards/g/GustcloakRunner.java +++ b/Mage.Sets/src/mage/cards/g/GustcloakRunner.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class GustcloakRunner extends CardImpl { public GustcloakRunner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GustcloakSavior.java b/Mage.Sets/src/mage/cards/g/GustcloakSavior.java index 40771391a1..3ab4b8408b 100644 --- a/Mage.Sets/src/mage/cards/g/GustcloakSavior.java +++ b/Mage.Sets/src/mage/cards/g/GustcloakSavior.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -56,8 +57,8 @@ public class GustcloakSavior extends CardImpl { public GustcloakSavior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GustcloakSentinel.java b/Mage.Sets/src/mage/cards/g/GustcloakSentinel.java index 5a5883f0cd..e206b10dee 100644 --- a/Mage.Sets/src/mage/cards/g/GustcloakSentinel.java +++ b/Mage.Sets/src/mage/cards/g/GustcloakSentinel.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class GustcloakSentinel extends CardImpl { public GustcloakSentinel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GustcloakSkirmisher.java b/Mage.Sets/src/mage/cards/g/GustcloakSkirmisher.java index d07a927264..900a57bae5 100644 --- a/Mage.Sets/src/mage/cards/g/GustcloakSkirmisher.java +++ b/Mage.Sets/src/mage/cards/g/GustcloakSkirmisher.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,8 +48,8 @@ public class GustcloakSkirmisher extends CardImpl { public GustcloakSkirmisher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/g/GustriderExuberant.java b/Mage.Sets/src/mage/cards/g/GustriderExuberant.java index 6c35dd99f1..e78dbe6fdd 100644 --- a/Mage.Sets/src/mage/cards/g/GustriderExuberant.java +++ b/Mage.Sets/src/mage/cards/g/GustriderExuberant.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; @@ -56,8 +57,8 @@ public class GustriderExuberant extends CardImpl { public GustriderExuberant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GutlessGhoul.java b/Mage.Sets/src/mage/cards/g/GutlessGhoul.java index ca391e4e3c..122a06b0bd 100644 --- a/Mage.Sets/src/mage/cards/g/GutlessGhoul.java +++ b/Mage.Sets/src/mage/cards/g/GutlessGhoul.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -51,7 +52,7 @@ public class GutlessGhoul extends CardImpl { public GutlessGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); this.addSuperType(SuperType.SNOW); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GutterSkulk.java b/Mage.Sets/src/mage/cards/g/GutterSkulk.java index 33cab3e89d..d0195cea07 100644 --- a/Mage.Sets/src/mage/cards/g/GutterSkulk.java +++ b/Mage.Sets/src/mage/cards/g/GutterSkulk.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class GutterSkulk extends CardImpl { public GutterSkulk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Rat"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.RAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/Guttersnipe.java b/Mage.Sets/src/mage/cards/g/Guttersnipe.java index d9fb8022d4..cb5c32b282 100644 --- a/Mage.Sets/src/mage/cards/g/Guttersnipe.java +++ b/Mage.Sets/src/mage/cards/g/Guttersnipe.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamagePlayersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -56,8 +57,8 @@ public class Guttersnipe extends CardImpl { public Guttersnipe (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GutwrencherOni.java b/Mage.Sets/src/mage/cards/g/GutwrencherOni.java index fed9056fba..fe42b35e82 100644 --- a/Mage.Sets/src/mage/cards/g/GutwrencherOni.java +++ b/Mage.Sets/src/mage/cards/g/GutwrencherOni.java @@ -58,8 +58,8 @@ public class GutwrencherOni extends CardImpl { public GutwrencherOni(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Demon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DEMON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/g/GuulDrazAssassin.java b/Mage.Sets/src/mage/cards/g/GuulDrazAssassin.java index dc07373f91..17f66ee1b2 100644 --- a/Mage.Sets/src/mage/cards/g/GuulDrazAssassin.java +++ b/Mage.Sets/src/mage/cards/g/GuulDrazAssassin.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.LevelerCardBuilder; import mage.cards.CardSetInfo; import mage.cards.LevelerCard; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -54,8 +55,8 @@ public class GuulDrazAssassin extends LevelerCard { public GuulDrazAssassin (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.ASSASSIN); this.color.setBlack(true); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GuulDrazOverseer.java b/Mage.Sets/src/mage/cards/g/GuulDrazOverseer.java index 3009451876..19d3ebb499 100644 --- a/Mage.Sets/src/mage/cards/g/GuulDrazOverseer.java +++ b/Mage.Sets/src/mage/cards/g/GuulDrazOverseer.java @@ -27,7 +27,6 @@ */ package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.LandfallAbility; @@ -41,6 +40,8 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import java.util.UUID; + /** * * @author LevelX2 @@ -49,7 +50,7 @@ public class GuulDrazOverseer extends CardImpl { public GuulDrazOverseer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(3); this.toughness = new MageInt(4); @@ -91,7 +92,7 @@ class GuulDrazOverseerEffect extends OneShotEffect { Permanent land = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source)); if (controller != null && land != null) { int boost = 1; - if (land.getSubtype(game).contains("Swamp")) { + if (land.hasSubtype(SubType.SWAMP, game)) { boost = 2; } game.addEffect(new BoostControlledEffect(boost, 0, Duration.EndOfTurn, true), source); diff --git a/Mage.Sets/src/mage/cards/g/GuulDrazSpecter.java b/Mage.Sets/src/mage/cards/g/GuulDrazSpecter.java index 45ae3c8cd0..c9b676597a 100644 --- a/Mage.Sets/src/mage/cards/g/GuulDrazSpecter.java +++ b/Mage.Sets/src/mage/cards/g/GuulDrazSpecter.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -54,7 +55,7 @@ public class GuulDrazSpecter extends CardImpl { public GuulDrazSpecter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); - this.subtype.add("Specter"); + this.subtype.add(SubType.SPECTER); this.color.setBlack(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GuulDrazVampire.java b/Mage.Sets/src/mage/cards/g/GuulDrazVampire.java index 23aa351266..8eb4be5cdf 100644 --- a/Mage.Sets/src/mage/cards/g/GuulDrazVampire.java +++ b/Mage.Sets/src/mage/cards/g/GuulDrazVampire.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.IntimidateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class GuulDrazVampire extends CardImpl { public GuulDrazVampire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.ROGUE); this.color.setBlack(true); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/g/GwafaHazidProfiteer.java b/Mage.Sets/src/mage/cards/g/GwafaHazidProfiteer.java index ee0975160d..8ea4c2f062 100644 --- a/Mage.Sets/src/mage/cards/g/GwafaHazidProfiteer.java +++ b/Mage.Sets/src/mage/cards/g/GwafaHazidProfiteer.java @@ -62,8 +62,8 @@ public class GwafaHazidProfiteer extends CardImpl { public GwafaHazidProfiteer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GwendlynDiCorci.java b/Mage.Sets/src/mage/cards/g/GwendlynDiCorci.java index dbdfb5714a..b5e5aa88fb 100644 --- a/Mage.Sets/src/mage/cards/g/GwendlynDiCorci.java +++ b/Mage.Sets/src/mage/cards/g/GwendlynDiCorci.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -50,8 +51,8 @@ public class GwendlynDiCorci extends CardImpl { public GwendlynDiCorci(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}{B}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/g/GwyllionHedgeMage.java b/Mage.Sets/src/mage/cards/g/GwyllionHedgeMage.java index e41cb4afa6..60f6534efc 100644 --- a/Mage.Sets/src/mage/cards/g/GwyllionHedgeMage.java +++ b/Mage.Sets/src/mage/cards/g/GwyllionHedgeMage.java @@ -66,8 +66,8 @@ public class GwyllionHedgeMage extends CardImpl { public GwyllionHedgeMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W/B}"); - this.subtype.add("Hag"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HAG); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/g/GyreSage.java b/Mage.Sets/src/mage/cards/g/GyreSage.java index 03362bd3ff..43ab4978b9 100644 --- a/Mage.Sets/src/mage/cards/g/GyreSage.java +++ b/Mage.Sets/src/mage/cards/g/GyreSage.java @@ -37,6 +37,7 @@ package mage.cards.g; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -47,8 +48,8 @@ public class GyreSage extends CardImpl { public GyreSage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HaakonStromgaldScourge.java b/Mage.Sets/src/mage/cards/h/HaakonStromgaldScourge.java index cf1151ef9b..85d1b276fa 100644 --- a/Mage.Sets/src/mage/cards/h/HaakonStromgaldScourge.java +++ b/Mage.Sets/src/mage/cards/h/HaakonStromgaldScourge.java @@ -52,8 +52,8 @@ public class HaakonStromgaldScourge extends CardImpl { public HaakonStromgaldScourge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Zombie"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HaazdaExonerator.java b/Mage.Sets/src/mage/cards/h/HaazdaExonerator.java index 59607448e2..83a05a3d9f 100644 --- a/Mage.Sets/src/mage/cards/h/HaazdaExonerator.java +++ b/Mage.Sets/src/mage/cards/h/HaazdaExonerator.java @@ -57,8 +57,8 @@ public class HaazdaExonerator extends CardImpl { public HaazdaExonerator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HaazdaShieldMate.java b/Mage.Sets/src/mage/cards/h/HaazdaShieldMate.java index 615e342068..18ac054bd0 100644 --- a/Mage.Sets/src/mage/cards/h/HaazdaShieldMate.java +++ b/Mage.Sets/src/mage/cards/h/HaazdaShieldMate.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class HaazdaShieldMate extends CardImpl { public HaazdaShieldMate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HaazdaSnareSquad.java b/Mage.Sets/src/mage/cards/h/HaazdaSnareSquad.java index e5fb1f46ed..4ad47a36fb 100644 --- a/Mage.Sets/src/mage/cards/h/HaazdaSnareSquad.java +++ b/Mage.Sets/src/mage/cards/h/HaazdaSnareSquad.java @@ -28,7 +28,6 @@ package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; @@ -38,12 +37,15 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.Target; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -59,15 +61,15 @@ public class HaazdaSnareSquad extends CardImpl { public HaazdaSnareSquad (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(4); // Whenever Haazda Snare Squad attacks you may pay {W}. If you do, tap target creature an opponent controls. Ability ability = new AttacksTriggeredAbility(new DoIfCostPaid(new TapTargetEffect(""), new ManaCostsImpl("{W}")),false, - "Whenever {this} attacks you may pay {W}. If you do, tap target creature an opponent controls."); + "Whenever {this} attacks, you may pay {W}. If you do, tap target creature an opponent controls."); Target target = new TargetCreaturePermanent(filter); ability.addTarget(target); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/h/HadaFreeblade.java b/Mage.Sets/src/mage/cards/h/HadaFreeblade.java index 28f51c21d3..e6e316c67f 100644 --- a/Mage.Sets/src/mage/cards/h/HadaFreeblade.java +++ b/Mage.Sets/src/mage/cards/h/HadaFreeblade.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -44,9 +45,9 @@ public class HadaFreeblade extends CardImpl { public HadaFreeblade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ALLY); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HadaSpyPatrol.java b/Mage.Sets/src/mage/cards/h/HadaSpyPatrol.java index fd5de3b973..542383aa7e 100644 --- a/Mage.Sets/src/mage/cards/h/HadaSpyPatrol.java +++ b/Mage.Sets/src/mage/cards/h/HadaSpyPatrol.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardSetInfo; import mage.cards.LevelerCard; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -49,8 +50,8 @@ public class HadaSpyPatrol extends LevelerCard { public HadaSpyPatrol(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.color.setBlue(true); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HagHedgeMage.java b/Mage.Sets/src/mage/cards/h/HagHedgeMage.java index cd7985f1e2..fd4e6efce0 100644 --- a/Mage.Sets/src/mage/cards/h/HagHedgeMage.java +++ b/Mage.Sets/src/mage/cards/h/HagHedgeMage.java @@ -65,8 +65,8 @@ public class HagHedgeMage extends CardImpl { public HagHedgeMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B/G}"); - this.subtype.add("Hag"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HAG); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HagraCrocodile.java b/Mage.Sets/src/mage/cards/h/HagraCrocodile.java index 21def9fd02..f79074ad2e 100644 --- a/Mage.Sets/src/mage/cards/h/HagraCrocodile.java +++ b/Mage.Sets/src/mage/cards/h/HagraCrocodile.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,7 +46,7 @@ public class HagraCrocodile extends CardImpl { public HagraCrocodile(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Crocodile"); + this.subtype.add(SubType.CROCODILE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HagraDiabolist.java b/Mage.Sets/src/mage/cards/h/HagraDiabolist.java index 72af0535ac..49aa2cf355 100644 --- a/Mage.Sets/src/mage/cards/h/HagraDiabolist.java +++ b/Mage.Sets/src/mage/cards/h/HagraDiabolist.java @@ -58,9 +58,9 @@ public class HagraDiabolist extends CardImpl { public HagraDiabolist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Ogre"); - this.subtype.add("Shaman"); - this.subtype.add("Ally"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.SHAMAN); + this.subtype.add(SubType.ALLY); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HagraSharpshooter.java b/Mage.Sets/src/mage/cards/h/HagraSharpshooter.java index c5ea611632..ac7436e372 100644 --- a/Mage.Sets/src/mage/cards/h/HagraSharpshooter.java +++ b/Mage.Sets/src/mage/cards/h/HagraSharpshooter.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,9 +49,9 @@ public class HagraSharpshooter extends CardImpl { public HagraSharpshooter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Assassin"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ASSASSIN); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HailStorm.java b/Mage.Sets/src/mage/cards/h/HailStorm.java new file mode 100644 index 0000000000..5ee3672332 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HailStorm.java @@ -0,0 +1,69 @@ +/* + * 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.cards.h; + +import java.util.UUID; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.effects.common.DamageControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author L_J + */ +public class HailStorm extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you control"); + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public HailStorm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}{G}"); + + // Hail Storm deals 2 damage to each attacking creature and 1 damage to you and each creature you control. + this.getSpellAbility().addEffect(new DamageAllEffect(2, new FilterAttackingCreature())); + this.getSpellAbility().addEffect(new DamageControllerEffect(1).setText("and 1 damage to you ")); + this.getSpellAbility().addEffect(new DamageAllEffect(1, filter).setText("and each creature you control.")); + } + + public HailStorm(final HailStorm card) { + super(card); + } + + @Override + public HailStorm copy() { + return new HailStorm(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HakimLoreweaver.java b/Mage.Sets/src/mage/cards/h/HakimLoreweaver.java index 760b9bbc0b..348472d02a 100644 --- a/Mage.Sets/src/mage/cards/h/HakimLoreweaver.java +++ b/Mage.Sets/src/mage/cards/h/HakimLoreweaver.java @@ -1,190 +1,183 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.condition.Condition; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalActivatedAbility; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.DestroyAllEffect; -import mage.abilities.keyword.FlyingAbility; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.PhaseStep; -import mage.constants.SubType; -import mage.constants.SuperType; -import mage.constants.Zone; -import mage.filter.FilterCard; -import mage.filter.FilterPermanent; -import mage.filter.predicate.mageobject.CardIdPredicate; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.filter.predicate.other.AuraCardCanAttachToPermanentId; -import mage.filter.predicate.permanent.AttachedToPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.Target; -import mage.target.common.TargetCardInYourGraveyard; - -/** - * - * @author jeffwadsworth - */ -public class HakimLoreweaver extends CardImpl { - - private final static String rule = "Return target Aura card from your graveyard to the battlefield attached to Hakim, Loreweaver. Activate this ability only during your upkeep and only if Hakim isn't enchanted."; - UUID originalId; - - public HakimLoreweaver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); - - addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); - this.power = new MageInt(2); - this.toughness = new MageInt(4); - - // Flying - this.addAbility(FlyingAbility.getInstance()); - - // {U}{U}: Return target Aura card from your graveyard to the battlefield attached to Hakim, Loreweaver. Activate this ability only during your upkeep and only if Hakim isn't enchanted. - Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new HakimLoreweaverEffect(), new ManaCostsImpl("{U}{U}"), new HakimLoreweaverCondition(), rule); - ability.addTarget(new TargetCardInYourGraveyard()); - originalId = ability.getOriginalId(); - this.addAbility(ability); - - // {U}{U}, {tap}: Destroy all Auras attached to Hakim. - FilterPermanent filterAurasOnHakim = new FilterPermanent("Auras attached to Hakim"); - filterAurasOnHakim.add(new CardTypePredicate(CardType.ENCHANTMENT)); - filterAurasOnHakim.add(new SubtypePredicate(SubType.AURA)); - FilterPermanent filterSourceId = new FilterPermanent(); - filterSourceId.add(new CardIdPredicate(this.getId())); - filterAurasOnHakim.add(new AttachedToPredicate(filterSourceId)); - Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyAllEffect(filterAurasOnHakim), new ManaCostsImpl("{U}{U}")); - ability2.addCost(new TapSourceCost()); - this.addAbility(ability2); - - } - - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(originalId)) { - Player controller = game.getPlayer(ability.getControllerId()); - if (controller != null) { - ability.getTargets().clear(); - FilterCard filterAuraCard = new FilterCard("target Aura card from your graveyard"); - filterAuraCard.add(new CardTypePredicate(CardType.ENCHANTMENT)); - filterAuraCard.add(new SubtypePredicate(SubType.AURA)); - filterAuraCard.add(new AuraCardCanAttachToPermanentId(ability.getSourceId())); - TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(filterAuraCard); - ability.addTarget(target); - } - } - - } - - public HakimLoreweaver(final HakimLoreweaver card) { - super(card); - this.originalId = card.originalId; - } - - @Override - public HakimLoreweaver copy() { - return new HakimLoreweaver(this); - } -} - -class HakimLoreweaverEffect extends OneShotEffect { - - public HakimLoreweaverEffect() { - super(Outcome.Benefit); - this.staticText = "Return target Aura card from your graveyard to the battlefield attached to {this}. Activate this ability only during your upkeep and only if Hakim isn't enchanted"; - } - - public HakimLoreweaverEffect(final HakimLoreweaverEffect effect) { - super(effect); - } - - @Override - public HakimLoreweaverEffect copy() { - return new HakimLoreweaverEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - Permanent hakimLoreweaver = game.getPermanent(source.getSourceId()); - Card targetAuraCard = game.getCard(source.getFirstTarget()); - if (controller != null - && hakimLoreweaver != null - && controller.canRespond() - && targetAuraCard != null) { - Target target = targetAuraCard.getSpellAbility().getTargets().get(0); - if (target != null) { - game.getState().setValue("attachTo:" + targetAuraCard.getId(), hakimLoreweaver); - controller.moveCards(targetAuraCard, Zone.BATTLEFIELD, source, game); - return hakimLoreweaver.addAttachment(targetAuraCard.getId(), game); - } - } - return false; - } -} - -class HakimLoreweaverCondition implements Condition { - - static private final FilterPermanent auras = new FilterPermanent(); - - static { - auras.add(new CardTypePredicate(CardType.ENCHANTMENT)); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent hakimLoreweaver = game.getPermanent(source.getSourceId()); - if (hakimLoreweaver != null) { - for (Permanent permanent : game.getBattlefield().getAllActivePermanents(auras, game)) { - if (permanent != null - && hakimLoreweaver.getAttachments().contains(permanent.getId())) { - return false; - } - } - return PhaseStep.UPKEEP == game.getStep().getType() - && game.getActivePlayerId().equals(source.getControllerId()); - } - return false; - } -} +/* + * 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.cards.h; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.Condition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.FilterCard; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.CardIdPredicate; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.other.AuraCardCanAttachToPermanentId; +import mage.filter.predicate.other.OwnerPredicate; +import mage.filter.predicate.permanent.AttachedToPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCardInYourGraveyard; + +import java.util.UUID; + +/** + * + * @author jeffwadsworth, TheElk801 + */ +public class HakimLoreweaver extends CardImpl { + + private static final FilterCard filter = new FilterCard("target Aura card from your graveyard"); + + static { + filter.add(new CardTypePredicate(CardType.ENCHANTMENT)); + filter.add(new SubtypePredicate(SubType.AURA)); + filter.add(new OwnerPredicate(TargetController.YOU)); + } + + public HakimLoreweaver(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); + + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {U}{U}: Return target Aura card from your graveyard to the battlefield attached to Hakim, Loreweaver. Activate this ability only during your upkeep and only if Hakim isn't enchanted. + Ability ability = new ConditionalActivatedAbility( + Zone.BATTLEFIELD, + new HakimLoreweaverEffect(), + new ManaCostsImpl("{U}{U}"), + new HakimLoreweaverCondition()); + ability.addTarget(new TargetCardInYourGraveyard(filter)); + this.addAbility(ability); + + // {U}{U}, {tap}: Destroy all Auras attached to Hakim. + FilterPermanent filterAurasOnHakim = new FilterPermanent("Auras attached to Hakim"); + filterAurasOnHakim.add(new CardTypePredicate(CardType.ENCHANTMENT)); + filterAurasOnHakim.add(new SubtypePredicate(SubType.AURA)); + FilterPermanent filterSourceId = new FilterPermanent(); + filterSourceId.add(new CardIdPredicate(this.getId())); + filterAurasOnHakim.add(new AttachedToPredicate(filterSourceId)); + Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyAllEffect(filterAurasOnHakim), new ManaCostsImpl("{U}{U}")); + ability2.addCost(new TapSourceCost()); + this.addAbility(ability2); + + } + + public HakimLoreweaver(final HakimLoreweaver card) { + super(card); + } + + @Override + public HakimLoreweaver copy() { + return new HakimLoreweaver(this); + } +} + +class HakimLoreweaverEffect extends OneShotEffect { + + public HakimLoreweaverEffect() { + super(Outcome.Benefit); + this.staticText = "Return target Aura card from your graveyard to the battlefield attached to {this}."; + } + + public HakimLoreweaverEffect(final HakimLoreweaverEffect effect) { + super(effect); + } + + @Override + public HakimLoreweaverEffect copy() { + return new HakimLoreweaverEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent hakimLoreweaver = game.getPermanent(source.getSourceId()); + Card targetAuraCard = game.getCard(source.getFirstTarget()); + if (controller != null + && hakimLoreweaver != null + && controller.canRespond() + && targetAuraCard != null + && new AuraCardCanAttachToPermanentId(hakimLoreweaver.getId()).apply(targetAuraCard, game)) { + Target target = targetAuraCard.getSpellAbility().getTargets().get(0); + if (target != null) { + game.getState().setValue("attachTo:" + targetAuraCard.getId(), hakimLoreweaver); + controller.moveCards(targetAuraCard, Zone.BATTLEFIELD, source, game); + return hakimLoreweaver.addAttachment(targetAuraCard.getId(), game); + } + } + return false; + } +} + +class HakimLoreweaverCondition implements Condition { + + static private final FilterPermanent auras = new FilterPermanent(); + + static { + auras.add(new CardTypePredicate(CardType.ENCHANTMENT)); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent hakimLoreweaver = game.getPermanent(source.getSourceId()); + if (hakimLoreweaver != null) { + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(auras, game)) { + if (permanent != null + && hakimLoreweaver.getAttachments().contains(permanent.getId())) { + return false; + } + } + return PhaseStep.UPKEEP == game.getStep().getType() + && game.getActivePlayerId().equals(source.getControllerId()); + } + return false; + } + + @Override + public String toString() { + return "only during your upkeep and only if {this} isn't enchanted"; + } +} diff --git a/Mage.Sets/src/mage/cards/h/HalamDjinn.java b/Mage.Sets/src/mage/cards/h/HalamDjinn.java index 337c546d59..1328c5a993 100644 --- a/Mage.Sets/src/mage/cards/h/HalamDjinn.java +++ b/Mage.Sets/src/mage/cards/h/HalamDjinn.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class HalamDjinn extends CardImpl { public HalamDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/Halberdier.java b/Mage.Sets/src/mage/cards/h/Halberdier.java index c676d0dfe9..7b4491b1b5 100644 --- a/Mage.Sets/src/mage/cards/h/Halberdier.java +++ b/Mage.Sets/src/mage/cards/h/Halberdier.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class Halberdier extends CardImpl { public Halberdier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Barbarian"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BARBARIAN); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HalcyonGlaze.java b/Mage.Sets/src/mage/cards/h/HalcyonGlaze.java index a289374348..c6dd8430de 100644 --- a/Mage.Sets/src/mage/cards/h/HalcyonGlaze.java +++ b/Mage.Sets/src/mage/cards/h/HalcyonGlaze.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; import mage.game.permanent.token.Token; @@ -70,7 +71,7 @@ class HalcyonGlazeToken extends Token { HalcyonGlazeToken() { super("", "4/4 Illusion creature with flying"); cardType.add(CardType.CREATURE); - subtype.add("Illusion"); + subtype.add(SubType.ILLUSION); power = new MageInt(4); toughness = new MageInt(4); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/h/HalimarExcavator.java b/Mage.Sets/src/mage/cards/h/HalimarExcavator.java index ac9e4e33b9..a20d9c7cef 100644 --- a/Mage.Sets/src/mage/cards/h/HalimarExcavator.java +++ b/Mage.Sets/src/mage/cards/h/HalimarExcavator.java @@ -58,9 +58,9 @@ public class HalimarExcavator extends CardImpl { public HalimarExcavator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.subtype.add(SubType.ALLY); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HalimarTidecaller.java b/Mage.Sets/src/mage/cards/h/HalimarTidecaller.java index e720b3afcd..af1bd02e13 100644 --- a/Mage.Sets/src/mage/cards/h/HalimarTidecaller.java +++ b/Mage.Sets/src/mage/cards/h/HalimarTidecaller.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterCard; @@ -64,9 +65,9 @@ public class HalimarTidecaller extends CardImpl { public HalimarTidecaller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HalimarWavewatch.java b/Mage.Sets/src/mage/cards/h/HalimarWavewatch.java index bca24be116..12c84f4376 100644 --- a/Mage.Sets/src/mage/cards/h/HalimarWavewatch.java +++ b/Mage.Sets/src/mage/cards/h/HalimarWavewatch.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.LevelerCardBuilder; import mage.cards.CardSetInfo; import mage.cards.LevelerCard; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -48,8 +49,8 @@ public class HalimarWavewatch extends LevelerCard { public HalimarWavewatch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SOLDIER); this.color.setBlue(true); this.power = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/h/HallowedFountain.java b/Mage.Sets/src/mage/cards/h/HallowedFountain.java index c8e5802f52..27a81923fe 100644 --- a/Mage.Sets/src/mage/cards/h/HallowedFountain.java +++ b/Mage.Sets/src/mage/cards/h/HallowedFountain.java @@ -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.cards.h; import java.util.UUID; @@ -37,6 +36,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,16 +44,17 @@ import mage.constants.CardType; */ public class HallowedFountain extends CardImpl { - public HallowedFountain (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - this.subtype.add("Plains"); - this.subtype.add("Island"); + public HallowedFountain(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); + this.subtype.add(SubType.PLAINS); + this.subtype.add(SubType.ISLAND); + + this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); this.addAbility(new WhiteManaAbility()); this.addAbility(new BlueManaAbility()); - this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, Hallowed Fountain enters the battlefield tapped")); } - public HallowedFountain (final HallowedFountain card) { + public HallowedFountain(final HallowedFountain card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/h/HallowedHealer.java b/Mage.Sets/src/mage/cards/h/HallowedHealer.java index a5dcba5199..853b507b6b 100644 --- a/Mage.Sets/src/mage/cards/h/HallowedHealer.java +++ b/Mage.Sets/src/mage/cards/h/HallowedHealer.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -52,8 +53,8 @@ public class HallowedHealer extends CardImpl { public HallowedHealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HallowedSpiritkeeper.java b/Mage.Sets/src/mage/cards/h/HallowedSpiritkeeper.java index db632a988a..13195d023a 100644 --- a/Mage.Sets/src/mage/cards/h/HallowedSpiritkeeper.java +++ b/Mage.Sets/src/mage/cards/h/HallowedSpiritkeeper.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.game.permanent.token.SpiritWhiteToken; @@ -48,7 +49,7 @@ public class HallowedSpiritkeeper extends CardImpl { public HallowedSpiritkeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HaloHunter.java b/Mage.Sets/src/mage/cards/h/HaloHunter.java index 1f1b9755e5..02ee0dbf51 100644 --- a/Mage.Sets/src/mage/cards/h/HaloHunter.java +++ b/Mage.Sets/src/mage/cards/h/HaloHunter.java @@ -55,7 +55,7 @@ public class HaloHunter extends CardImpl { public HaloHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(6); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HamletCaptain.java b/Mage.Sets/src/mage/cards/h/HamletCaptain.java index 6a66aaf101..9ac4b0e87b 100644 --- a/Mage.Sets/src/mage/cards/h/HamletCaptain.java +++ b/Mage.Sets/src/mage/cards/h/HamletCaptain.java @@ -53,8 +53,8 @@ public class HamletCaptain extends CardImpl { public HamletCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HamletbackGoliath.java b/Mage.Sets/src/mage/cards/h/HamletbackGoliath.java index 8739c60d5c..9d5092fd7b 100644 --- a/Mage.Sets/src/mage/cards/h/HamletbackGoliath.java +++ b/Mage.Sets/src/mage/cards/h/HamletbackGoliath.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -53,8 +54,8 @@ public class HamletbackGoliath extends CardImpl { public HamletbackGoliath(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/h/HammerMage.java b/Mage.Sets/src/mage/cards/h/HammerMage.java index d2bfad3ca3..13805e64d7 100644 --- a/Mage.Sets/src/mage/cards/h/HammerMage.java +++ b/Mage.Sets/src/mage/cards/h/HammerMage.java @@ -38,6 +38,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class HammerMage extends CardImpl { public HammerMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HammerOfRuin.java b/Mage.Sets/src/mage/cards/h/HammerOfRuin.java index 9bcc37db29..5af5d8c6f5 100644 --- a/Mage.Sets/src/mage/cards/h/HammerOfRuin.java +++ b/Mage.Sets/src/mage/cards/h/HammerOfRuin.java @@ -59,7 +59,7 @@ public class HammerOfRuin extends CardImpl { public HammerOfRuin (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0))); diff --git a/Mage.Sets/src/mage/cards/h/HammerfistGiant.java b/Mage.Sets/src/mage/cards/h/HammerfistGiant.java index 9e3768cd17..ec8413a817 100644 --- a/Mage.Sets/src/mage/cards/h/HammerfistGiant.java +++ b/Mage.Sets/src/mage/cards/h/HammerfistGiant.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -55,8 +56,8 @@ public class HammerfistGiant extends CardImpl { public HammerfistGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/Hammerhand.java b/Mage.Sets/src/mage/cards/h/Hammerhand.java index 2c89daf918..6eccc4e9a2 100644 --- a/Mage.Sets/src/mage/cards/h/Hammerhand.java +++ b/Mage.Sets/src/mage/cards/h/Hammerhand.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class Hammerhand extends CardImpl { public Hammerhand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/h/HammerheadShark.java b/Mage.Sets/src/mage/cards/h/HammerheadShark.java index b9083c2ac2..c638c1153d 100644 --- a/Mage.Sets/src/mage/cards/h/HammerheadShark.java +++ b/Mage.Sets/src/mage/cards/h/HammerheadShark.java @@ -46,7 +46,7 @@ public class HammerheadShark extends CardImpl { public HammerheadShark(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Fish"); + this.subtype.add(SubType.FISH); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/Hammerheim.java b/Mage.Sets/src/mage/cards/h/Hammerheim.java new file mode 100644 index 0000000000..0ce0f09fdb --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/Hammerheim.java @@ -0,0 +1,115 @@ +/* + * 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.cards.h; + +import java.util.Iterator; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.keyword.LandwalkAbility; +import mage.abilities.mana.RedManaAbility; +import mage.constants.SuperType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class Hammerheim extends CardImpl { + + public Hammerheim(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + this.addSuperType(SuperType.LEGENDARY); + + // {tap}: Add {R} to your mana pool. + this.addAbility(new RedManaAbility()); + + // {tap}: Target creature loses all landwalk abilities until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HammerheimEffect(), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public Hammerheim(final Hammerheim card) { + super(card); + } + + @Override + public Hammerheim copy() { + return new Hammerheim(this); + } +} + +class HammerheimEffect extends ContinuousEffectImpl { + + public HammerheimEffect() { + super(Duration.EndOfTurn, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.LoseAbility); + } + + public HammerheimEffect(final HammerheimEffect effect) { + super(effect); + } + + @Override + public HammerheimEffect copy() { + return new HammerheimEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (permanent != null) { + for (Iterator iter = permanent.getAbilities().iterator(); iter.hasNext();) { + Ability ab = iter.next(); + if (ab instanceof LandwalkAbility) { + iter.remove(); + } + } + } + return true; + } + + @Override + public String getText(Mode mode) { + return "Target creature loses all landwalk abilities until end of turn."; + } +} diff --git a/Mage.Sets/src/mage/cards/h/HammerheimDeadeye.java b/Mage.Sets/src/mage/cards/h/HammerheimDeadeye.java index 1b65c39da8..1b80635f2a 100644 --- a/Mage.Sets/src/mage/cards/h/HammerheimDeadeye.java +++ b/Mage.Sets/src/mage/cards/h/HammerheimDeadeye.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; import mage.target.Target; @@ -55,8 +56,8 @@ public class HammerheimDeadeye extends CardImpl { public HammerheimDeadeye(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HanSolo.java b/Mage.Sets/src/mage/cards/h/HanSolo.java index 4a2d38e89f..5fc30658fc 100644 --- a/Mage.Sets/src/mage/cards/h/HanSolo.java +++ b/Mage.Sets/src/mage/cards/h/HanSolo.java @@ -59,8 +59,8 @@ public class HanSolo extends CardImpl { public HanSolo(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HanaKami.java b/Mage.Sets/src/mage/cards/h/HanaKami.java index 2b16e7090f..e951508c6e 100644 --- a/Mage.Sets/src/mage/cards/h/HanaKami.java +++ b/Mage.Sets/src/mage/cards/h/HanaKami.java @@ -57,7 +57,7 @@ public class HanaKami extends CardImpl { public HanaKami(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HandOfCruelty.java b/Mage.Sets/src/mage/cards/h/HandOfCruelty.java index 10ed8678d9..7699e8be92 100644 --- a/Mage.Sets/src/mage/cards/h/HandOfCruelty.java +++ b/Mage.Sets/src/mage/cards/h/HandOfCruelty.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class HandOfCruelty extends CardImpl { public HandOfCruelty(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HandOfEmrakul.java b/Mage.Sets/src/mage/cards/h/HandOfEmrakul.java index 2a9c782906..044a0e0d7d 100644 --- a/Mage.Sets/src/mage/cards/h/HandOfEmrakul.java +++ b/Mage.Sets/src/mage/cards/h/HandOfEmrakul.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.AnnihilatorAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.NamePredicate; import mage.target.common.TargetControlledPermanent; @@ -53,7 +54,7 @@ public class HandOfEmrakul extends CardImpl { public HandOfEmrakul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{9}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/h/HandOfHonor.java b/Mage.Sets/src/mage/cards/h/HandOfHonor.java index 82fc5043e3..3a05ec6074 100644 --- a/Mage.Sets/src/mage/cards/h/HandOfHonor.java +++ b/Mage.Sets/src/mage/cards/h/HandOfHonor.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author anonymous @@ -43,8 +44,8 @@ public class HandOfHonor extends CardImpl { public HandOfHonor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HandOfJustice.java b/Mage.Sets/src/mage/cards/h/HandOfJustice.java index f9fe68567d..eba96bdd62 100644 --- a/Mage.Sets/src/mage/cards/h/HandOfJustice.java +++ b/Mage.Sets/src/mage/cards/h/HandOfJustice.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; @@ -61,7 +62,7 @@ public class HandOfJustice extends CardImpl { public HandOfJustice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(2); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/h/HandOfSilumgar.java b/Mage.Sets/src/mage/cards/h/HandOfSilumgar.java index d6401fab8f..94b25ea97c 100644 --- a/Mage.Sets/src/mage/cards/h/HandOfSilumgar.java +++ b/Mage.Sets/src/mage/cards/h/HandOfSilumgar.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class HandOfSilumgar extends CardImpl { public HandOfSilumgar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HandOfThePraetors.java b/Mage.Sets/src/mage/cards/h/HandOfThePraetors.java index 518e791fa9..fe94655a45 100644 --- a/Mage.Sets/src/mage/cards/h/HandOfThePraetors.java +++ b/Mage.Sets/src/mage/cards/h/HandOfThePraetors.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterSpell; @@ -63,7 +64,7 @@ public class HandOfThePraetors extends CardImpl { public HandOfThePraetors (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HangarbackWalker.java b/Mage.Sets/src/mage/cards/h/HangarbackWalker.java index 2e9a1cc223..b58bd63b1d 100644 --- a/Mage.Sets/src/mage/cards/h/HangarbackWalker.java +++ b/Mage.Sets/src/mage/cards/h/HangarbackWalker.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.permanent.token.ThopterColorlessToken; @@ -54,7 +55,7 @@ public class HangarbackWalker extends CardImpl { public HangarbackWalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{X}{X}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/h/Hankyu.java b/Mage.Sets/src/mage/cards/h/Hankyu.java index 0dcc4d008c..4e5fd9c14b 100644 --- a/Mage.Sets/src/mage/cards/h/Hankyu.java +++ b/Mage.Sets/src/mage/cards/h/Hankyu.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -58,7 +59,7 @@ public class Hankyu extends CardImpl { public Hankyu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); /* Equipped creature has "{T}: Put an aim counter on Hankyu" and */ SimpleActivatedAbility ability1 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HankyuAddCounterEffect(this.getId()), new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/h/HannaShipsNavigator.java b/Mage.Sets/src/mage/cards/h/HannaShipsNavigator.java index 37b864cd3f..8d92772566 100644 --- a/Mage.Sets/src/mage/cards/h/HannaShipsNavigator.java +++ b/Mage.Sets/src/mage/cards/h/HannaShipsNavigator.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.constants.Zone; @@ -62,8 +63,8 @@ public class HannaShipsNavigator extends CardImpl { public HannaShipsNavigator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HanweirGarrison.java b/Mage.Sets/src/mage/cards/h/HanweirGarrison.java index acb1cd7567..b91654c870 100644 --- a/Mage.Sets/src/mage/cards/h/HanweirGarrison.java +++ b/Mage.Sets/src/mage/cards/h/HanweirGarrison.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.InfoEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.RedHumanToken; @@ -47,8 +48,8 @@ public class HanweirGarrison extends CardImpl { public HanweirGarrison(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HanweirLancer.java b/Mage.Sets/src/mage/cards/h/HanweirLancer.java index 6e66019762..2b801e7f85 100644 --- a/Mage.Sets/src/mage/cards/h/HanweirLancer.java +++ b/Mage.Sets/src/mage/cards/h/HanweirLancer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SoulbondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class HanweirLancer extends CardImpl { public HanweirLancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HanweirMilitiaCaptain.java b/Mage.Sets/src/mage/cards/h/HanweirMilitiaCaptain.java index a09d880a28..72120b760e 100644 --- a/Mage.Sets/src/mage/cards/h/HanweirMilitiaCaptain.java +++ b/Mage.Sets/src/mage/cards/h/HanweirMilitiaCaptain.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.w.WestvaleCultLeader; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.TargetController; import mage.filter.common.FilterControlledCreaturePermanent; @@ -52,8 +53,8 @@ public class HanweirMilitiaCaptain extends CardImpl { public HanweirMilitiaCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HanweirTheWrithingTownship.java b/Mage.Sets/src/mage/cards/h/HanweirTheWrithingTownship.java index 3b2ca87b2d..d3270036d6 100644 --- a/Mage.Sets/src/mage/cards/h/HanweirTheWrithingTownship.java +++ b/Mage.Sets/src/mage/cards/h/HanweirTheWrithingTownship.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardSetInfo; import mage.cards.MeldCard; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.game.permanent.token.EldraziHorrorToken; @@ -47,8 +48,8 @@ public class HanweirTheWrithingTownship extends MeldCard { public HanweirTheWrithingTownship(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Eldrazi"); - this.subtype.add("Ooze"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.OOZE); this.power = new MageInt(7); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HanweirWatchkeep.java b/Mage.Sets/src/mage/cards/h/HanweirWatchkeep.java index e3f91d128f..005fbbd114 100644 --- a/Mage.Sets/src/mage/cards/h/HanweirWatchkeep.java +++ b/Mage.Sets/src/mage/cards/h/HanweirWatchkeep.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.b.BaneOfHanweir; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -49,9 +50,9 @@ public class HanweirWatchkeep extends CardImpl { public HanweirWatchkeep(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.WEREWOLF); this.transformable = true; this.secondSideCardClazz = BaneOfHanweir.class; diff --git a/Mage.Sets/src/mage/cards/h/HapatraVizierOfPoisons.java b/Mage.Sets/src/mage/cards/h/HapatraVizierOfPoisons.java index 79eee4b62a..2d63496710 100644 --- a/Mage.Sets/src/mage/cards/h/HapatraVizierOfPoisons.java +++ b/Mage.Sets/src/mage/cards/h/HapatraVizierOfPoisons.java @@ -1,124 +1,125 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SuperType; -import mage.constants.Zone; -import mage.counters.CounterType; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; -import mage.game.permanent.token.DeathtouchSnakeToken; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Styxo - */ -public class HapatraVizierOfPoisons extends CardImpl { - - public HapatraVizierOfPoisons(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{G}"); - - addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // Whenever Hapatra, Vizier of Poisons deals combat damage to a player, you may put a -1/-1 counter on target creature. - Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new AddCountersTargetEffect(CounterType.M1M1.createInstance()), true); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability); - - // Whenever you put one or more -1/-1 counters on a creature, create a 1/1 green Snake creature token with deathtouch. - this.addAbility(new HapatraVizierOfPoisonsTriggeredAbility(new CreateTokenEffect(new DeathtouchSnakeToken()), false)); - - } - - public HapatraVizierOfPoisons(final HapatraVizierOfPoisons card) { - super(card); - } - - @Override - public HapatraVizierOfPoisons copy() { - return new HapatraVizierOfPoisons(this); - } -} - -class HapatraVizierOfPoisonsTriggeredAbility extends TriggeredAbilityImpl { - - public HapatraVizierOfPoisonsTriggeredAbility(Effect effect, boolean optional) { - super(Zone.BATTLEFIELD, effect, optional); - } - - public HapatraVizierOfPoisonsTriggeredAbility(HapatraVizierOfPoisonsTriggeredAbility ability) { - super(ability); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.COUNTERS_ADDED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - if (event.getData().equals(CounterType.M1M1.getName()) - && controllerId.equals(game.getControllerId(event.getSourceId()))) { - Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId()); - if (permanent == null) { - permanent = game.getPermanentEntering(event.getTargetId()); - } - return (permanent != null - && permanent.isCreature()); - } - return false; - - } - - @Override - public HapatraVizierOfPoisonsTriggeredAbility copy() { - return new HapatraVizierOfPoisonsTriggeredAbility(this); - } - - @Override - public String getRule() { - return "Whenever you put one or more -1/-1 counters on a creature, " + super.getRule(); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.DeathtouchSnakeToken; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Styxo + */ +public class HapatraVizierOfPoisons extends CardImpl { + + public HapatraVizierOfPoisons(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{G}"); + + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Hapatra, Vizier of Poisons deals combat damage to a player, you may put a -1/-1 counter on target creature. + Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new AddCountersTargetEffect(CounterType.M1M1.createInstance()), true); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // Whenever you put one or more -1/-1 counters on a creature, create a 1/1 green Snake creature token with deathtouch. + this.addAbility(new HapatraVizierOfPoisonsTriggeredAbility(new CreateTokenEffect(new DeathtouchSnakeToken()), false)); + + } + + public HapatraVizierOfPoisons(final HapatraVizierOfPoisons card) { + super(card); + } + + @Override + public HapatraVizierOfPoisons copy() { + return new HapatraVizierOfPoisons(this); + } +} + +class HapatraVizierOfPoisonsTriggeredAbility extends TriggeredAbilityImpl { + + public HapatraVizierOfPoisonsTriggeredAbility(Effect effect, boolean optional) { + super(Zone.BATTLEFIELD, effect, optional); + } + + public HapatraVizierOfPoisonsTriggeredAbility(HapatraVizierOfPoisonsTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.COUNTERS_ADDED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getData().equals(CounterType.M1M1.getName()) + && controllerId.equals(game.getControllerId(event.getSourceId()))) { + Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId()); + if (permanent == null) { + permanent = game.getPermanentEntering(event.getTargetId()); + } + return (permanent != null + && permanent.isCreature()); + } + return false; + + } + + @Override + public HapatraVizierOfPoisonsTriggeredAbility copy() { + return new HapatraVizierOfPoisonsTriggeredAbility(this); + } + + @Override + public String getRule() { + return "Whenever you put one or more -1/-1 counters on a creature, " + super.getRule(); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HaplessResearcher.java b/Mage.Sets/src/mage/cards/h/HaplessResearcher.java index 7147470dd3..e44ee7ea5d 100644 --- a/Mage.Sets/src/mage/cards/h/HaplessResearcher.java +++ b/Mage.Sets/src/mage/cards/h/HaplessResearcher.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class HaplessResearcher extends CardImpl { public HaplessResearcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HarabazDruid.java b/Mage.Sets/src/mage/cards/h/HarabazDruid.java index 75ad52d1ec..4e456780d1 100644 --- a/Mage.Sets/src/mage/cards/h/HarabazDruid.java +++ b/Mage.Sets/src/mage/cards/h/HarabazDruid.java @@ -53,9 +53,9 @@ public class HarabazDruid extends CardImpl { public HarabazDruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); + this.subtype.add(SubType.ALLY); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HarbingerOfNight.java b/Mage.Sets/src/mage/cards/h/HarbingerOfNight.java index 3c062f20cf..bd318a65d8 100644 --- a/Mage.Sets/src/mage/cards/h/HarbingerOfNight.java +++ b/Mage.Sets/src/mage/cards/h/HarbingerOfNight.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -47,7 +48,7 @@ public class HarbingerOfNight extends CardImpl { public HarbingerOfNight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HarbingerOfSpring.java b/Mage.Sets/src/mage/cards/h/HarbingerOfSpring.java index 351a09fb6d..0d5ffc8ad0 100644 --- a/Mage.Sets/src/mage/cards/h/HarbingerOfSpring.java +++ b/Mage.Sets/src/mage/cards/h/HarbingerOfSpring.java @@ -52,7 +52,7 @@ public class HarbingerOfSpring extends CardImpl { public HarbingerOfSpring(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HarbingerOfTheHunt.java b/Mage.Sets/src/mage/cards/h/HarbingerOfTheHunt.java index 9658eaa3f4..fda9b47135 100644 --- a/Mage.Sets/src/mage/cards/h/HarbingerOfTheHunt.java +++ b/Mage.Sets/src/mage/cards/h/HarbingerOfTheHunt.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -59,7 +60,7 @@ public class HarbingerOfTheHunt extends CardImpl { public HarbingerOfTheHunt(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{G}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HarbingerOfTheTides.java b/Mage.Sets/src/mage/cards/h/HarbingerOfTheTides.java index d5d617f046..ca60f7928c 100644 --- a/Mage.Sets/src/mage/cards/h/HarbingerOfTheTides.java +++ b/Mage.Sets/src/mage/cards/h/HarbingerOfTheTides.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -58,8 +59,8 @@ public class HarbingerOfTheTides extends CardImpl { public HarbingerOfTheTides(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HarborBandit.java b/Mage.Sets/src/mage/cards/h/HarborBandit.java index 8209cc44e5..4dc458279f 100644 --- a/Mage.Sets/src/mage/cards/h/HarborBandit.java +++ b/Mage.Sets/src/mage/cards/h/HarborBandit.java @@ -60,8 +60,8 @@ public class HarborBandit extends CardImpl { public HarborBandit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.color.setBlack(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HarborGuardian.java b/Mage.Sets/src/mage/cards/h/HarborGuardian.java new file mode 100644 index 0000000000..ef4c8b3819 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HarborGuardian.java @@ -0,0 +1,101 @@ +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.constants.SubType; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class HarborGuardian extends CardImpl { + + public HarborGuardian(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{U}"); + + this.subtype.add(SubType.GARGOYLE); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Reach + this.addAbility(ReachAbility.getInstance()); + + // Whenever Harbor Guardian attacks, defending player may draw a card. + this.addAbility(new AttacksTriggeredAbility(new HarborGuardianEffect(), false)); + } + + public HarborGuardian(final HarborGuardian card) { + super(card); + } + + @Override + public HarborGuardian copy() { + return new HarborGuardian(this); + } +} + +class HarborGuardianEffect extends OneShotEffect { + + public HarborGuardianEffect() { + super(Outcome.DrawCard); + staticText = "defending player may draw a card"; + } + + public HarborGuardianEffect(final HarborGuardianEffect effect) { + super(effect); + } + + @Override + public HarborGuardianEffect copy() { + return new HarborGuardianEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + UUID defenderId = game.getCombat().getDefenderId(source.getSourceId()); + Player defender = game.getPlayer(defenderId); + if (defender != null) { + if (defender.chooseUse(outcome, "Draw a card?", source, game)) { + defender.drawCards(1, game); + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/h/HarborSerpent.java b/Mage.Sets/src/mage/cards/h/HarborSerpent.java index afeb7a9b87..6f09e87b0b 100644 --- a/Mage.Sets/src/mage/cards/h/HarborSerpent.java +++ b/Mage.Sets/src/mage/cards/h/HarborSerpent.java @@ -52,7 +52,7 @@ public class HarborSerpent extends CardImpl { public HarborSerpent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HardenedBerserker.java b/Mage.Sets/src/mage/cards/h/HardenedBerserker.java index f8ddd497bc..080faf805e 100644 --- a/Mage.Sets/src/mage/cards/h/HardenedBerserker.java +++ b/Mage.Sets/src/mage/cards/h/HardenedBerserker.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.cost.CostModificationEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.CostModificationType; import mage.constants.Duration; import mage.constants.Outcome; @@ -51,8 +52,8 @@ public class HardenedBerserker extends CardImpl { public HardenedBerserker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HarmattanEfreet.java b/Mage.Sets/src/mage/cards/h/HarmattanEfreet.java index 14bbcebc8c..d4b176d853 100644 --- a/Mage.Sets/src/mage/cards/h/HarmattanEfreet.java +++ b/Mage.Sets/src/mage/cards/h/HarmattanEfreet.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class HarmattanEfreet extends CardImpl { public HarmattanEfreet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Efreet"); + this.subtype.add(SubType.EFREET); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HarmonicSliver.java b/Mage.Sets/src/mage/cards/h/HarmonicSliver.java index 393353e2b2..fa650b2983 100644 --- a/Mage.Sets/src/mage/cards/h/HarmonicSliver.java +++ b/Mage.Sets/src/mage/cards/h/HarmonicSliver.java @@ -59,7 +59,7 @@ public class HarmonicSliver extends CardImpl { public HarmonicSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HarpoonSniper.java b/Mage.Sets/src/mage/cards/h/HarpoonSniper.java index e9b876a0cd..efc29f9657 100644 --- a/Mage.Sets/src/mage/cards/h/HarpoonSniper.java +++ b/Mage.Sets/src/mage/cards/h/HarpoonSniper.java @@ -59,8 +59,8 @@ public class HarpoonSniper extends CardImpl { public HarpoonSniper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Merfolk"); - this.subtype.add("Archer"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HarrierGriffin.java b/Mage.Sets/src/mage/cards/h/HarrierGriffin.java index 0ad48bed6b..bce47a4d4d 100644 --- a/Mage.Sets/src/mage/cards/h/HarrierGriffin.java +++ b/Mage.Sets/src/mage/cards/h/HarrierGriffin.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class HarrierGriffin extends CardImpl { public HarrierGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HarrierNaga.java b/Mage.Sets/src/mage/cards/h/HarrierNaga.java index 4754f89806..c51a1d7252 100644 --- a/Mage.Sets/src/mage/cards/h/HarrierNaga.java +++ b/Mage.Sets/src/mage/cards/h/HarrierNaga.java @@ -1,59 +1,60 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.MageInt; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author ciaccona007 - */ -public class HarrierNaga extends CardImpl { - - public HarrierNaga(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - - this.subtype.add("Naga"); - this.subtype.add("Warrior"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - } - - public HarrierNaga(final HarrierNaga card) { - super(card); - } - - @Override - public HarrierNaga copy() { - return new HarrierNaga(this); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author ciaccona007 + */ +public class HarrierNaga extends CardImpl { + + public HarrierNaga(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + } + + public HarrierNaga(final HarrierNaga card) { + super(card); + } + + @Override + public HarrierNaga copy() { + return new HarrierNaga(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HarshDeceiver.java b/Mage.Sets/src/mage/cards/h/HarshDeceiver.java index 899595c418..af887e3e3b 100644 --- a/Mage.Sets/src/mage/cards/h/HarshDeceiver.java +++ b/Mage.Sets/src/mage/cards/h/HarshDeceiver.java @@ -29,19 +29,28 @@ package mage.cards.h; import java.util.UUID; import mage.MageInt; +import mage.MageObject; import mage.abilities.Ability; -import mage.abilities.common.FeralDeceiverAbility; +import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.LookLibraryControllerEffect; import mage.abilities.effects.common.UntapSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; +import mage.constants.Outcome; import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; /** * @@ -50,19 +59,17 @@ import mage.constants.Zone; public class HarshDeceiver extends CardImpl { public HarshDeceiver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Spirit"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(4); // {1}: Look at the top card of your library. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(), new GenericManaCost(1))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(), new GenericManaCost(1))); // {2}: Reveal the top card of your library. If it's a land card, untap {this} and it gets +1/+1 until end of turn. - Ability ability = new FeralDeceiverAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new ManaCostsImpl("{2}")); - ability.addEffect(new BoostSourceEffect(1,1,Duration.EndOfTurn)); - this.addAbility(ability); + this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new HarshDeceiverEffect(), new ManaCostsImpl("{2}"))); } public HarshDeceiver(final HarshDeceiver card) { @@ -74,3 +81,40 @@ public class HarshDeceiver extends CardImpl { return new HarshDeceiver(this); } } + +class HarshDeceiverEffect extends OneShotEffect { + + public HarshDeceiverEffect() { + super(Outcome.BoostCreature); + this.staticText = "Reveal the top card of your library. If it's a land card, untap {this} and it gets +1/+1 until end of turn"; + } + + public HarshDeceiverEffect(final HarshDeceiverEffect effect) { + super(effect); + } + + @Override + public HarshDeceiverEffect copy() { + return new HarshDeceiverEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null) { + Cards cards = new CardsImpl(); + Card card = controller.getLibrary().getFromTop(game); + if (card != null) { + cards.add(card); + controller.revealCards(sourceObject.getIdName(), cards, game); + if (card.isLand()) { + new UntapSourceEffect().apply(game, source); + game.addEffect(new BoostSourceEffect(1, 1, Duration.EndOfTurn), source); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/h/HarshMentor.java b/Mage.Sets/src/mage/cards/h/HarshMentor.java index b12f48fbe8..5deb5e80ad 100644 --- a/Mage.Sets/src/mage/cards/h/HarshMentor.java +++ b/Mage.Sets/src/mage/cards/h/HarshMentor.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -54,8 +55,8 @@ public class HarshMentor extends CardImpl { public HarshMentor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HaruOnna.java b/Mage.Sets/src/mage/cards/h/HaruOnna.java index a30c6299e1..c5a8ab1469 100644 --- a/Mage.Sets/src/mage/cards/h/HaruOnna.java +++ b/Mage.Sets/src/mage/cards/h/HaruOnna.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; /** @@ -46,7 +47,7 @@ public class HaruOnna extends CardImpl { public HaruOnna(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HarvestGwyllion.java b/Mage.Sets/src/mage/cards/h/HarvestGwyllion.java index 0432e1792d..080bb56c89 100644 --- a/Mage.Sets/src/mage/cards/h/HarvestGwyllion.java +++ b/Mage.Sets/src/mage/cards/h/HarvestGwyllion.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class HarvestGwyllion extends CardImpl { public HarvestGwyllion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W/B}{W/B}"); - this.subtype.add("Hag"); + this.subtype.add(SubType.HAG); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HarvestHand.java b/Mage.Sets/src/mage/cards/h/HarvestHand.java index a62c27fb76..db84738344 100644 --- a/Mage.Sets/src/mage/cards/h/HarvestHand.java +++ b/Mage.Sets/src/mage/cards/h/HarvestHand.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.s.ScroungedScythe; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class HarvestHand extends CardImpl { public HarvestHand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HarvestWurm.java b/Mage.Sets/src/mage/cards/h/HarvestWurm.java index feeb1087a6..aa7e3ef1d5 100644 --- a/Mage.Sets/src/mage/cards/h/HarvestWurm.java +++ b/Mage.Sets/src/mage/cards/h/HarvestWurm.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetCardInYourGraveyard; @@ -47,7 +48,7 @@ public class HarvestWurm extends CardImpl { public HarvestWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HarvesterDruid.java b/Mage.Sets/src/mage/cards/h/HarvesterDruid.java index 2b2f07bf5b..7d88f211ba 100644 --- a/Mage.Sets/src/mage/cards/h/HarvesterDruid.java +++ b/Mage.Sets/src/mage/cards/h/HarvesterDruid.java @@ -33,6 +33,7 @@ import mage.abilities.mana.AnyColorLandsProduceManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -43,8 +44,8 @@ public class HarvesterDruid extends CardImpl { public HarvesterDruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HarvesterOfSouls.java b/Mage.Sets/src/mage/cards/h/HarvesterOfSouls.java index be848556fb..6dcceed3a9 100644 --- a/Mage.Sets/src/mage/cards/h/HarvesterOfSouls.java +++ b/Mage.Sets/src/mage/cards/h/HarvesterOfSouls.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.permanent.AnotherPredicate; @@ -54,7 +55,7 @@ public class HarvesterOfSouls extends CardImpl { public HarvesterOfSouls(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HarvesterTroll.java b/Mage.Sets/src/mage/cards/h/HarvesterTroll.java index b81347f41a..ad4414ef64 100644 --- a/Mage.Sets/src/mage/cards/h/HarvesterTroll.java +++ b/Mage.Sets/src/mage/cards/h/HarvesterTroll.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.Predicates; @@ -56,7 +57,7 @@ public class HarvesterTroll extends CardImpl { public HarvesterTroll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Troll"); + this.subtype.add(SubType.TROLL); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HarvestguardAlseids.java b/Mage.Sets/src/mage/cards/h/HarvestguardAlseids.java index 729ff361ed..20cc6ec90d 100644 --- a/Mage.Sets/src/mage/cards/h/HarvestguardAlseids.java +++ b/Mage.Sets/src/mage/cards/h/HarvestguardAlseids.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -46,7 +47,7 @@ public class HarvestguardAlseids extends CardImpl { public HarvestguardAlseids(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{W}"); - this.subtype.add("Nymph"); + this.subtype.add(SubType.NYMPH); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HashepOasis.java b/Mage.Sets/src/mage/cards/h/HashepOasis.java index c1da7b1a3a..0ddba4a798 100644 --- a/Mage.Sets/src/mage/cards/h/HashepOasis.java +++ b/Mage.Sets/src/mage/cards/h/HashepOasis.java @@ -62,7 +62,7 @@ public class HashepOasis extends CardImpl { public HashepOasis(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Desert"); + this.subtype.add(SubType.DESERT); // {t}: Add {C} to your mana pool. addAbility(new ColorlessManaAbility()); diff --git a/Mage.Sets/src/mage/cards/h/HasranOgress.java b/Mage.Sets/src/mage/cards/h/HasranOgress.java index 9086ea6143..d0669f18e7 100644 --- a/Mage.Sets/src/mage/cards/h/HasranOgress.java +++ b/Mage.Sets/src/mage/cards/h/HasranOgress.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -50,7 +51,7 @@ public class HasranOgress extends CardImpl { public HasranOgress(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Ogre"); + this.subtype.add(SubType.OGRE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HatchetBully.java b/Mage.Sets/src/mage/cards/h/HatchetBully.java index 84787a811a..df412ac14e 100644 --- a/Mage.Sets/src/mage/cards/h/HatchetBully.java +++ b/Mage.Sets/src/mage/cards/h/HatchetBully.java @@ -39,6 +39,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -57,8 +58,8 @@ public class HatchetBully extends CardImpl { public HatchetBully(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HateWeaver.java b/Mage.Sets/src/mage/cards/h/HateWeaver.java index e3557c9347..f584155e60 100644 --- a/Mage.Sets/src/mage/cards/h/HateWeaver.java +++ b/Mage.Sets/src/mage/cards/h/HateWeaver.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -60,8 +61,8 @@ public class HateWeaver extends CardImpl { public HateWeaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/Hateflayer.java b/Mage.Sets/src/mage/cards/h/Hateflayer.java index dae8ad8a69..6450c5785c 100644 --- a/Mage.Sets/src/mage/cards/h/Hateflayer.java +++ b/Mage.Sets/src/mage/cards/h/Hateflayer.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -50,7 +51,7 @@ public class Hateflayer extends CardImpl { public Hateflayer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HauntedAngel.java b/Mage.Sets/src/mage/cards/h/HauntedAngel.java index 81678aeb7d..60a2810b31 100644 --- a/Mage.Sets/src/mage/cards/h/HauntedAngel.java +++ b/Mage.Sets/src/mage/cards/h/HauntedAngel.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.token.HauntedAngelToken; @@ -50,7 +51,7 @@ public class HauntedAngel extends CardImpl { public HauntedAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HauntedCadaver.java b/Mage.Sets/src/mage/cards/h/HauntedCadaver.java index 3da9e8e6bf..0699c21545 100644 --- a/Mage.Sets/src/mage/cards/h/HauntedCadaver.java +++ b/Mage.Sets/src/mage/cards/h/HauntedCadaver.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,7 +48,7 @@ public class HauntedCadaver extends CardImpl { public HauntedCadaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HauntedCloak.java b/Mage.Sets/src/mage/cards/h/HauntedCloak.java index d4d0508e8b..a938b37a2a 100644 --- a/Mage.Sets/src/mage/cards/h/HauntedCloak.java +++ b/Mage.Sets/src/mage/cards/h/HauntedCloak.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class HauntedCloak extends CardImpl { public HauntedCloak(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has vigilance, trample, and haste. Effect effect = new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.EQUIPMENT); diff --git a/Mage.Sets/src/mage/cards/h/HauntedDead.java b/Mage.Sets/src/mage/cards/h/HauntedDead.java index 49f5cd5845..8e4e2abf51 100644 --- a/Mage.Sets/src/mage/cards/h/HauntedDead.java +++ b/Mage.Sets/src/mage/cards/h/HauntedDead.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.game.permanent.token.SpiritWhiteToken; @@ -52,7 +53,7 @@ public class HauntedDead extends CardImpl { public HauntedDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HauntedGuardian.java b/Mage.Sets/src/mage/cards/h/HauntedGuardian.java index 98cff90b4b..80cab5d909 100644 --- a/Mage.Sets/src/mage/cards/h/HauntedGuardian.java +++ b/Mage.Sets/src/mage/cards/h/HauntedGuardian.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class HauntedGuardian extends CardImpl { public HauntedGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HauntedPlateMail.java b/Mage.Sets/src/mage/cards/h/HauntedPlateMail.java index 31725db8e4..0bd7fd330b 100644 --- a/Mage.Sets/src/mage/cards/h/HauntedPlateMail.java +++ b/Mage.Sets/src/mage/cards/h/HauntedPlateMail.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Outcome; @@ -55,7 +56,7 @@ public class HauntedPlateMail extends CardImpl { public HauntedPlateMail(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +4/+4. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(4, 4))); @@ -87,7 +88,7 @@ class HauntedPlateMailToken extends Token { super("Spirit", "4/4 Spirit artifact creature that's no longer an Equipment"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); power = new MageInt(4); toughness = new MageInt(4); } diff --git a/Mage.Sets/src/mage/cards/h/HaunterOfNightveil.java b/Mage.Sets/src/mage/cards/h/HaunterOfNightveil.java index f58409d8fd..c026173052 100644 --- a/Mage.Sets/src/mage/cards/h/HaunterOfNightveil.java +++ b/Mage.Sets/src/mage/cards/h/HaunterOfNightveil.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostOpponentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -45,7 +46,7 @@ public class HaunterOfNightveil extends CardImpl { public HaunterOfNightveil(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HauntingWind.java b/Mage.Sets/src/mage/cards/h/HauntingWind.java index 447bded4d1..4533661fbb 100644 --- a/Mage.Sets/src/mage/cards/h/HauntingWind.java +++ b/Mage.Sets/src/mage/cards/h/HauntingWind.java @@ -29,7 +29,10 @@ package mage.cards.h; import java.util.UUID; import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.common.DamageControllerEffect; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -37,19 +40,20 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; +import mage.game.stack.StackAbility; +import mage.target.targetpointer.FixedTarget; /** * - * @author MarcoMarin + * @author TheElk801 */ public class HauntingWind extends CardImpl { public HauntingWind(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}"); // Whenever an artifact becomes tapped or a player activates an artifact's ability without {tap} in its activation cost, Haunting Wind deals 1 damage to that artifact's controller. - - this.addAbility(new AbilityActivatedTriggeredAbility2()); + this.addAbility(new HauntingWindTriggeredAbility()); } public HauntingWind(final HauntingWind card) { @@ -62,36 +66,68 @@ public class HauntingWind extends CardImpl { } } -class AbilityActivatedTriggeredAbility2 extends TriggeredAbilityImpl { +class HauntingWindTriggeredAbility extends TriggeredAbilityImpl { - AbilityActivatedTriggeredAbility2() { - super(Zone.BATTLEFIELD, new DamageControllerEffect(1)); + HauntingWindTriggeredAbility() { + super(Zone.BATTLEFIELD, new DamageTargetEffect(1)); } - AbilityActivatedTriggeredAbility2(final AbilityActivatedTriggeredAbility2 ability) { + HauntingWindTriggeredAbility(final HauntingWindTriggeredAbility ability) { super(ability); } @Override - public AbilityActivatedTriggeredAbility2 copy() { - return new AbilityActivatedTriggeredAbility2(this); + public HauntingWindTriggeredAbility copy() { + return new HauntingWindTriggeredAbility(this); } @Override public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.ACTIVATED_ABILITY || - event.getType() == GameEvent.EventType.TAPPED; + return event.getType() == GameEvent.EventType.ACTIVATED_ABILITY + || event.getType() == GameEvent.EventType.TAPPED; } @Override public boolean checkTrigger(GameEvent event, Game game) { - Permanent isArtifact = game.getPermanent(event.getSourceId()); - return isArtifact != null && isArtifact.isArtifact(); - + if (event.getType() == GameEvent.EventType.ACTIVATED_ABILITY) { + Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId()); + if (permanent == null || !permanent.isArtifact()) { + return false; + } + StackAbility stackAbility = (StackAbility) game.getStack().getStackObject(event.getSourceId()); + if (stackAbility == null) { + return false; + } + boolean triggerable = true; + for (Cost cost : stackAbility.getCosts()) { + if (cost instanceof TapSourceCost) { + triggerable = false; + break; + } + } + if (!triggerable) { + return false; + } + for (Effect effect : this.getEffects()) { + effect.setTargetPointer(new FixedTarget(permanent.getControllerId(), game)); + } + return true; + } + if (event.getType() == GameEvent.EventType.TAPPED) { + Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId()); + if (permanent == null || !permanent.isArtifact()) { + return false; + } + for (Effect effect : this.getEffects()) { + effect.setTargetPointer(new FixedTarget(permanent.getControllerId(), game)); + } + return true; + } + return false; } @Override public String getRule() { - return "Whenever an artifact becomes tapped or a player activates an artifact's ability without {tap} in its activation cost, Haunting Wind deals 1 damage to that artifact's controller."; + return "Whenever an artifact becomes tapped or a player activates an artifact's ability without {T} in its activation cost, {this} deals 1 damage to that artifact's controller."; } } diff --git a/Mage.Sets/src/mage/cards/h/HavenOfTheSpiritDragon.java b/Mage.Sets/src/mage/cards/h/HavenOfTheSpiritDragon.java index d823b2c503..a5b164951f 100644 --- a/Mage.Sets/src/mage/cards/h/HavenOfTheSpiritDragon.java +++ b/Mage.Sets/src/mage/cards/h/HavenOfTheSpiritDragon.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.ConditionalMana; import mage.MageObject; import mage.Mana; @@ -54,6 +53,8 @@ import mage.filter.predicate.Predicates; import mage.game.Game; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -158,7 +159,7 @@ class UginPlaneswalkerCardPredicate implements Predicate { @Override public boolean apply(Card input, Game game) { return input.isPlaneswalker() - && input.getName().contains("Ugin, the Spirit Dragon"); + && input.hasSubtype(SubType.UGIN, game); } @Override diff --git a/Mage.Sets/src/mage/cards/h/HavengulLich.java b/Mage.Sets/src/mage/cards/h/HavengulLich.java index e52f632b64..9bfe17d21e 100644 --- a/Mage.Sets/src/mage/cards/h/HavengulLich.java +++ b/Mage.Sets/src/mage/cards/h/HavengulLich.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -65,8 +66,8 @@ public class HavengulLich extends CardImpl { public HavengulLich(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HavengulRunebinder.java b/Mage.Sets/src/mage/cards/h/HavengulRunebinder.java index 0a6173e459..74b68560d0 100644 --- a/Mage.Sets/src/mage/cards/h/HavengulRunebinder.java +++ b/Mage.Sets/src/mage/cards/h/HavengulRunebinder.java @@ -62,8 +62,8 @@ public class HavengulRunebinder extends CardImpl { public HavengulRunebinder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HavengulSkaab.java b/Mage.Sets/src/mage/cards/h/HavengulSkaab.java index 68d0a3826f..cba977e67b 100644 --- a/Mage.Sets/src/mage/cards/h/HavengulSkaab.java +++ b/Mage.Sets/src/mage/cards/h/HavengulSkaab.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -50,8 +51,8 @@ public class HavengulSkaab extends CardImpl { public HavengulSkaab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HavengulVampire.java b/Mage.Sets/src/mage/cards/h/HavengulVampire.java index 4c01b69d57..2bc0c549ea 100644 --- a/Mage.Sets/src/mage/cards/h/HavengulVampire.java +++ b/Mage.Sets/src/mage/cards/h/HavengulVampire.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,7 +46,7 @@ public class HavengulVampire extends CardImpl { public HavengulVampire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HavenwoodWurm.java b/Mage.Sets/src/mage/cards/h/HavenwoodWurm.java index 338037cbe4..26e2d18b19 100644 --- a/Mage.Sets/src/mage/cards/h/HavenwoodWurm.java +++ b/Mage.Sets/src/mage/cards/h/HavenwoodWurm.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class HavenwoodWurm extends CardImpl { public HavenwoodWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/h/HavocDemon.java b/Mage.Sets/src/mage/cards/h/HavocDemon.java index ec3102afee..c7fd339a41 100644 --- a/Mage.Sets/src/mage/cards/h/HavocDemon.java +++ b/Mage.Sets/src/mage/cards/h/HavocDemon.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,7 +46,7 @@ public class HavocDemon extends CardImpl { public HavocDemon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HavocSower.java b/Mage.Sets/src/mage/cards/h/HavocSower.java index 9c434dc61f..d06022831b 100644 --- a/Mage.Sets/src/mage/cards/h/HavocSower.java +++ b/Mage.Sets/src/mage/cards/h/HavocSower.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class HavocSower extends CardImpl { public HavocSower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HawkeaterMoth.java b/Mage.Sets/src/mage/cards/h/HawkeaterMoth.java index e1d7285553..a028644207 100644 --- a/Mage.Sets/src/mage/cards/h/HawkeaterMoth.java +++ b/Mage.Sets/src/mage/cards/h/HawkeaterMoth.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class HawkeaterMoth extends CardImpl { public HawkeaterMoth (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HazardTrooper.java b/Mage.Sets/src/mage/cards/h/HazardTrooper.java index ec5b6f79ac..f6dad5883f 100644 --- a/Mage.Sets/src/mage/cards/h/HazardTrooper.java +++ b/Mage.Sets/src/mage/cards/h/HazardTrooper.java @@ -1,77 +1,77 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; -import mage.abilities.keyword.IntimidateAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; - -/** - * - * @author Styxo - */ -public class HazardTrooper extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures"); - - static { - filter.add(new SubtypePredicate(SubType.TROOPER)); - } - - public HazardTrooper(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cyborg"); - this.subtype.add("Trooper"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // Trooper creatures you control have intimidate. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(IntimidateAbility.getInstance(), Duration.WhileOnBattlefield, filter, false))); - - } - - public HazardTrooper(final HazardTrooper card) { - super(card); - } - - @Override - public HazardTrooper copy() { - return new HazardTrooper(this); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.IntimidateAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author Styxo + */ +public class HazardTrooper extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures"); + + static { + filter.add(new SubtypePredicate(SubType.TROOPER)); + } + + public HazardTrooper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CYBORG); + this.subtype.add(SubType.TROOPER); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Trooper creatures you control have intimidate. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(IntimidateAbility.getInstance(), Duration.WhileOnBattlefield, filter, false))); + + } + + public HazardTrooper(final HazardTrooper card) { + super(card); + } + + @Override + public HazardTrooper copy() { + return new HazardTrooper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HazeFrog.java b/Mage.Sets/src/mage/cards/h/HazeFrog.java index 0fe94611b5..fdffcdb4b7 100644 --- a/Mage.Sets/src/mage/cards/h/HazeFrog.java +++ b/Mage.Sets/src/mage/cards/h/HazeFrog.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.game.Game; import mage.game.events.DamageEvent; @@ -50,7 +51,7 @@ public class HazeFrog extends CardImpl { public HazeFrog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Frog"); + this.subtype.add(SubType.FROG); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HazeriderDrake.java b/Mage.Sets/src/mage/cards/h/HazeriderDrake.java index 936cbddb41..d047b6e7e0 100644 --- a/Mage.Sets/src/mage/cards/h/HazeriderDrake.java +++ b/Mage.Sets/src/mage/cards/h/HazeriderDrake.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class HazeriderDrake extends CardImpl { public HazeriderDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HazezonTamar.java b/Mage.Sets/src/mage/cards/h/HazezonTamar.java index de4b97b579..b51dea533f 100644 --- a/Mage.Sets/src/mage/cards/h/HazezonTamar.java +++ b/Mage.Sets/src/mage/cards/h/HazezonTamar.java @@ -68,8 +68,8 @@ public class HazezonTamar extends CardImpl { public HazezonTamar(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HazoretTheFervent.java b/Mage.Sets/src/mage/cards/h/HazoretTheFervent.java index e27c5eef16..962a0346f5 100644 --- a/Mage.Sets/src/mage/cards/h/HazoretTheFervent.java +++ b/Mage.Sets/src/mage/cards/h/HazoretTheFervent.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.TargetController; @@ -59,7 +60,7 @@ public class HazoretTheFervent extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HazyHomunculus.java b/Mage.Sets/src/mage/cards/h/HazyHomunculus.java index 33a824e0e6..3bc28e3cf3 100644 --- a/Mage.Sets/src/mage/cards/h/HazyHomunculus.java +++ b/Mage.Sets/src/mage/cards/h/HazyHomunculus.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.common.FilterLandPermanent; @@ -57,8 +58,8 @@ public class HazyHomunculus extends CardImpl { public HazyHomunculus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Homunculus"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.HOMUNCULUS); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HeWhoHungers.java b/Mage.Sets/src/mage/cards/h/HeWhoHungers.java index 845a5042f2..8c882c88d6 100644 --- a/Mage.Sets/src/mage/cards/h/HeWhoHungers.java +++ b/Mage.Sets/src/mage/cards/h/HeWhoHungers.java @@ -67,7 +67,7 @@ public class HeWhoHungers extends CardImpl { public HeWhoHungers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HeadHunting.java b/Mage.Sets/src/mage/cards/h/HeadHunting.java index 9be52b9d51..fbf076891e 100644 --- a/Mage.Sets/src/mage/cards/h/HeadHunting.java +++ b/Mage.Sets/src/mage/cards/h/HeadHunting.java @@ -1,68 +1,68 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.LoseLifeOpponentsEffect; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.counters.CounterType; -import mage.target.common.TargetOpponentsCreaturePermanent; - -/** - * - * @author Styxo - */ -public class HeadHunting extends CardImpl { - - public HeadHunting(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}"); - - // Put a bounty counter on target creature an opponent controls. - this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent()); - this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance())); - - // Each opponent loses 1 life. - this.getSpellAbility().addEffect(new LoseLifeOpponentsEffect(1)); - - // Draw a card. - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); - } - - public HeadHunting(final HeadHunting card) { - super(card); - } - - @Override - public HeadHunting copy() { - return new HeadHunting(this); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; +import mage.target.common.TargetOpponentsCreaturePermanent; + +/** + * + * @author Styxo + */ +public class HeadHunting extends CardImpl { + + public HeadHunting(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}"); + + // Put a bounty counter on target creature an opponent controls. + this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent()); + this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance())); + + // Each opponent loses 1 life. + this.getSpellAbility().addEffect(new LoseLifeOpponentsEffect(1)); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public HeadHunting(final HeadHunting card) { + super(card); + } + + @Override + public HeadHunting copy() { + return new HeadHunting(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/Headhunter.java b/Mage.Sets/src/mage/cards/h/Headhunter.java index 16d0fa4fa9..c819740281 100644 --- a/Mage.Sets/src/mage/cards/h/Headhunter.java +++ b/Mage.Sets/src/mage/cards/h/Headhunter.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class Headhunter extends CardImpl { public Headhunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HeadlessHorseman.java b/Mage.Sets/src/mage/cards/h/HeadlessHorseman.java index cde3a469bb..a68dec8c00 100644 --- a/Mage.Sets/src/mage/cards/h/HeadlessHorseman.java +++ b/Mage.Sets/src/mage/cards/h/HeadlessHorseman.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class HeadlessHorseman extends CardImpl { public HeadlessHorseman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HeadlessSkaab.java b/Mage.Sets/src/mage/cards/h/HeadlessSkaab.java index 86ad965742..385aa312ab 100644 --- a/Mage.Sets/src/mage/cards/h/HeadlessSkaab.java +++ b/Mage.Sets/src/mage/cards/h/HeadlessSkaab.java @@ -34,6 +34,7 @@ import mage.abilities.costs.common.ExileFromGraveCost; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; @@ -45,8 +46,8 @@ public class HeadlessSkaab extends CardImpl { public HeadlessSkaab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/h/HeadlongRush.java b/Mage.Sets/src/mage/cards/h/HeadlongRush.java new file mode 100644 index 0000000000..c762b13a2a --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HeadlongRush.java @@ -0,0 +1,60 @@ +/* + * 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.cards.h; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterAttackingCreature; + +/** + * + * @author TheElk801 + */ +public class HeadlongRush extends CardImpl { + + public HeadlongRush(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); + + // Attacking creatures gain first strike until end of turn. + this.getSpellAbility().addEffect(new GainAbilityAllEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, new FilterAttackingCreature())); + } + + public HeadlongRush(final HeadlongRush card) { + super(card); + } + + @Override + public HeadlongRush copy() { + return new HeadlongRush(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HeadstrongBrute.java b/Mage.Sets/src/mage/cards/h/HeadstrongBrute.java new file mode 100644 index 0000000000..c70577694a --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HeadstrongBrute.java @@ -0,0 +1,86 @@ +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CantBlockAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.MenaceAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author TheElk801 + */ +public class HeadstrongBrute extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("another Pirate"); + + static { + filter.add(new SubtypePredicate(SubType.PIRATE)); + filter.add(new AnotherPredicate()); + } + + public HeadstrongBrute(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Headstrong Brute can't block. + this.addAbility(new CantBlockAbility()); + + // Headstrong Brute has menace as long as you control another Pirate. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new ConditionalContinuousEffect(new GainAbilitySourceEffect(new MenaceAbility(), Duration.WhileOnBattlefield), + new PermanentsOnTheBattlefieldCondition(filter), "{this} has menace as long as you control another Pirate"))); + } + + public HeadstrongBrute(final HeadstrongBrute card) { + super(card); + } + + @Override + public HeadstrongBrute copy() { + return new HeadstrongBrute(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HeadwaterSentries.java b/Mage.Sets/src/mage/cards/h/HeadwaterSentries.java new file mode 100644 index 0000000000..2d75bd73c8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HeadwaterSentries.java @@ -0,0 +1,60 @@ +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author TheElk801 + */ +public class HeadwaterSentries extends CardImpl { + + public HeadwaterSentries(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(2); + this.toughness = new MageInt(5); + } + + public HeadwaterSentries(final HeadwaterSentries card) { + super(card); + } + + @Override + public HeadwaterSentries copy() { + return new HeadwaterSentries(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HealerOfThePride.java b/Mage.Sets/src/mage/cards/h/HealerOfThePride.java index 42a0dca5f6..026611d152 100644 --- a/Mage.Sets/src/mage/cards/h/HealerOfThePride.java +++ b/Mage.Sets/src/mage/cards/h/HealerOfThePride.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -45,8 +46,8 @@ public class HealerOfThePride extends CardImpl { public HealerOfThePride(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HealersHeaddress.java b/Mage.Sets/src/mage/cards/h/HealersHeaddress.java index df9dd0825c..32d74de446 100644 --- a/Mage.Sets/src/mage/cards/h/HealersHeaddress.java +++ b/Mage.Sets/src/mage/cards/h/HealersHeaddress.java @@ -44,6 +44,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class HealersHeaddress extends CardImpl { public HealersHeaddress(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +0/+2 and has "{tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn." Ability gainAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/h/HeapDoll.java b/Mage.Sets/src/mage/cards/h/HeapDoll.java index ae1d72ae9f..d7c713f81a 100644 --- a/Mage.Sets/src/mage/cards/h/HeapDoll.java +++ b/Mage.Sets/src/mage/cards/h/HeapDoll.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCardInGraveyard; @@ -46,7 +47,7 @@ public class HeapDoll extends CardImpl { public HeapDoll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HeartOfLight.java b/Mage.Sets/src/mage/cards/h/HeartOfLight.java index d30734bf5f..cbddc79849 100644 --- a/Mage.Sets/src/mage/cards/h/HeartOfLight.java +++ b/Mage.Sets/src/mage/cards/h/HeartOfLight.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class HeartOfLight extends CardImpl { public HeartOfLight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/h/HeartPiercerBow.java b/Mage.Sets/src/mage/cards/h/HeartPiercerBow.java index 50a8f356a8..3980aa4514 100644 --- a/Mage.Sets/src/mage/cards/h/HeartPiercerBow.java +++ b/Mage.Sets/src/mage/cards/h/HeartPiercerBow.java @@ -36,6 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; @@ -52,7 +53,7 @@ public class HeartPiercerBow extends CardImpl { public HeartPiercerBow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Whenever equipped creature attacks, Heart-Piercer Bow deals 1 damage to target creature defending player controls. this.addAbility(new HeartPiercerBowAbility()); diff --git a/Mage.Sets/src/mage/cards/h/HeartPiercerManticore.java b/Mage.Sets/src/mage/cards/h/HeartPiercerManticore.java index 0ec3b29b51..745c124ccb 100644 --- a/Mage.Sets/src/mage/cards/h/HeartPiercerManticore.java +++ b/Mage.Sets/src/mage/cards/h/HeartPiercerManticore.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.EmbalmAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -62,7 +63,7 @@ public class HeartPiercerManticore extends CardImpl { public HeartPiercerManticore(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); - this.subtype.add("Manticore"); + this.subtype.add(SubType.MANTICORE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HeartSliver.java b/Mage.Sets/src/mage/cards/h/HeartSliver.java index 9caf59d659..41f11e35c9 100644 --- a/Mage.Sets/src/mage/cards/h/HeartSliver.java +++ b/Mage.Sets/src/mage/cards/h/HeartSliver.java @@ -54,7 +54,7 @@ public class HeartSliver extends CardImpl { public HeartSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HeartWarden.java b/Mage.Sets/src/mage/cards/h/HeartWarden.java index 6b10b70a1f..bb1f941da8 100644 --- a/Mage.Sets/src/mage/cards/h/HeartWarden.java +++ b/Mage.Sets/src/mage/cards/h/HeartWarden.java @@ -38,6 +38,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,8 +49,8 @@ public class HeartWarden extends CardImpl { public HeartWarden(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HearthKami.java b/Mage.Sets/src/mage/cards/h/HearthKami.java index 023712920d..40d3cf2b6d 100644 --- a/Mage.Sets/src/mage/cards/h/HearthKami.java +++ b/Mage.Sets/src/mage/cards/h/HearthKami.java @@ -37,12 +37,11 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; +import mage.constants.SubType; +import mage.constants.TargetAdjustment; import mage.constants.Zone; -import mage.filter.common.FilterArtifactPermanent; -import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; -import mage.game.Game; -import mage.target.Target; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.TargetPermanent; /** @@ -50,11 +49,15 @@ import mage.target.TargetPermanent; */ public class HearthKami extends CardImpl { - private final UUID originalId; + private static final FilterPermanent filter = new FilterPermanent("artifact with converted mana cost X"); + + static { + filter.add(new CardTypePredicate(CardType.ARTIFACT)); + } public HearthKami(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); @@ -62,26 +65,13 @@ public class HearthKami extends CardImpl { // {X}, Sacrifice Hearth Kami: Destroy target artifact with converted mana cost X. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{X}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(new FilterArtifactPermanent("artifact with converted mana cost X"))); - originalId = ability.getOriginalId(); + ability.addTarget(new TargetPermanent(filter)); + ability.setTargetAdjustment(TargetAdjustment.X_CMC_EQUAL_PERM); this.addAbility(ability); } - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(originalId)) { - int xValue = ability.getManaCostsToPay().getX(); - ability.getTargets().clear(); - FilterArtifactPermanent filter = new FilterArtifactPermanent(new StringBuilder("artifact with converted mana cost ").append(xValue).toString()); - filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, xValue)); - Target target = new TargetPermanent(filter); - ability.addTarget(target); - } - } - public HearthKami(final HearthKami card) { super(card); - this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/cards/h/HearthcageGiant.java b/Mage.Sets/src/mage/cards/h/HearthcageGiant.java index 227515f3a4..9ed75757bb 100644 --- a/Mage.Sets/src/mage/cards/h/HearthcageGiant.java +++ b/Mage.Sets/src/mage/cards/h/HearthcageGiant.java @@ -64,8 +64,8 @@ public class HearthcageGiant extends CardImpl { public HearthcageGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{R}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HearthfireHobgoblin.java b/Mage.Sets/src/mage/cards/h/HearthfireHobgoblin.java index 395a7252eb..f7a8f29c99 100644 --- a/Mage.Sets/src/mage/cards/h/HearthfireHobgoblin.java +++ b/Mage.Sets/src/mage/cards/h/HearthfireHobgoblin.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class HearthfireHobgoblin extends CardImpl { public HearthfireHobgoblin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R/W}{R/W}{R/W}"); - this.subtype.add("Goblin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HeartlashCinder.java b/Mage.Sets/src/mage/cards/h/HeartlashCinder.java index 9d1c891f1e..0606066095 100644 --- a/Mage.Sets/src/mage/cards/h/HeartlashCinder.java +++ b/Mage.Sets/src/mage/cards/h/HeartlashCinder.java @@ -42,6 +42,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterControlledPermanent; import mage.game.Game; @@ -55,8 +56,8 @@ public class HeartlashCinder extends CardImpl { public HeartlashCinder(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HeartlessHidetsugu.java b/Mage.Sets/src/mage/cards/h/HeartlessHidetsugu.java index 90ab60360e..901a50b669 100644 --- a/Mage.Sets/src/mage/cards/h/HeartlessHidetsugu.java +++ b/Mage.Sets/src/mage/cards/h/HeartlessHidetsugu.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class HeartlessHidetsugu extends CardImpl { public HeartlessHidetsugu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Ogre"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HeartlessPillage.java b/Mage.Sets/src/mage/cards/h/HeartlessPillage.java new file mode 100644 index 0000000000..82d888547a --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HeartlessPillage.java @@ -0,0 +1,71 @@ +/* + * 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.cards.h; + +import java.util.UUID; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.permanent.token.TreasureToken; +import mage.target.common.TargetOpponent; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * + * @author LevelX2 + */ +public class HeartlessPillage extends CardImpl { + + public HeartlessPillage(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}"); + + // Target opponent discards two cards. + this.getSpellAbility().addTarget(new TargetOpponent()); + this.getSpellAbility().addEffect(new DiscardTargetEffect(2)); + + // Raid — If you attacked with a creature this turn, create a colorless Treasure artifact token with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool." + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new CreateTokenEffect(new TreasureToken()), + RaidCondition.instance, + "

Raid — If you attacked with a creature this turn, create a colorless Treasure artifact token with \"{T}, Sacrifice this artifact: Add one mana of any color to your mana pool.\"")); + this.getSpellAbility().addWatcher(new PlayerAttackedWatcher()); + } + + public HeartlessPillage(final HeartlessPillage card) { + super(card); + } + + @Override + public HeartlessPillage copy() { + return new HeartlessPillage(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/Heartmender.java b/Mage.Sets/src/mage/cards/h/Heartmender.java index 05b9db5c38..1c3a6dda5a 100644 --- a/Mage.Sets/src/mage/cards/h/Heartmender.java +++ b/Mage.Sets/src/mage/cards/h/Heartmender.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.PersistAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.counters.Counter; @@ -52,7 +53,7 @@ public class Heartmender extends CardImpl { public Heartmender(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G/W}{G/W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/Heartseeker.java b/Mage.Sets/src/mage/cards/h/Heartseeker.java index 5fd6d89de9..498bccc1e0 100644 --- a/Mage.Sets/src/mage/cards/h/Heartseeker.java +++ b/Mage.Sets/src/mage/cards/h/Heartseeker.java @@ -53,7 +53,7 @@ public class Heartseeker extends CardImpl { public Heartseeker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+1 and has "{tap}, Unattach Heartseeker: Destroy target creature." Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 1, Duration.WhileOnBattlefield)); diff --git a/Mage.Sets/src/mage/cards/h/HeartstabberMosquito.java b/Mage.Sets/src/mage/cards/h/HeartstabberMosquito.java index cbcf75456a..4575eec3da 100644 --- a/Mage.Sets/src/mage/cards/h/HeartstabberMosquito.java +++ b/Mage.Sets/src/mage/cards/h/HeartstabberMosquito.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -48,7 +49,7 @@ public class HeartstabberMosquito extends CardImpl { public HeartstabberMosquito(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HeartwoodDryad.java b/Mage.Sets/src/mage/cards/h/HeartwoodDryad.java index d7c1440b48..50e42752e6 100644 --- a/Mage.Sets/src/mage/cards/h/HeartwoodDryad.java +++ b/Mage.Sets/src/mage/cards/h/HeartwoodDryad.java @@ -36,6 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class HeartwoodDryad extends CardImpl { public HeartwoodDryad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Dryad"); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HeartwoodGiant.java b/Mage.Sets/src/mage/cards/h/HeartwoodGiant.java index c8423952c8..1b9dafabae 100644 --- a/Mage.Sets/src/mage/cards/h/HeartwoodGiant.java +++ b/Mage.Sets/src/mage/cards/h/HeartwoodGiant.java @@ -58,7 +58,7 @@ public class HeartwoodGiant extends CardImpl { public HeartwoodGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HeartwoodStoryteller.java b/Mage.Sets/src/mage/cards/h/HeartwoodStoryteller.java index ad7bd8b223..3803b02b64 100644 --- a/Mage.Sets/src/mage/cards/h/HeartwoodStoryteller.java +++ b/Mage.Sets/src/mage/cards/h/HeartwoodStoryteller.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -53,7 +54,7 @@ public class HeartwoodStoryteller extends CardImpl { public HeartwoodStoryteller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HeartwoodTreefolk.java b/Mage.Sets/src/mage/cards/h/HeartwoodTreefolk.java index b1c8433261..3078b7d745 100644 --- a/Mage.Sets/src/mage/cards/h/HeartwoodTreefolk.java +++ b/Mage.Sets/src/mage/cards/h/HeartwoodTreefolk.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class HeartwoodTreefolk extends CardImpl { public HeartwoodTreefolk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HeatShimmer.java b/Mage.Sets/src/mage/cards/h/HeatShimmer.java index 76e1cacb42..68967ad6ab 100644 --- a/Mage.Sets/src/mage/cards/h/HeatShimmer.java +++ b/Mage.Sets/src/mage/cards/h/HeatShimmer.java @@ -34,7 +34,7 @@ import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -90,7 +90,7 @@ class HeatShimmerEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); Permanent permanent = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source)); if (controller != null && permanent != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, true); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), null, true); effect.setTargetPointer(new FixedTarget(permanent, game)); effect.apply(game, source); for (Permanent addedToken : effect.getAddedPermanent()) { diff --git a/Mage.Sets/src/mage/cards/h/HeavyArbalest.java b/Mage.Sets/src/mage/cards/h/HeavyArbalest.java index 23b3b114f5..5296ca5f8b 100644 --- a/Mage.Sets/src/mage/cards/h/HeavyArbalest.java +++ b/Mage.Sets/src/mage/cards/h/HeavyArbalest.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.PhaseStep; @@ -59,7 +60,7 @@ public class HeavyArbalest extends CardImpl { public HeavyArbalest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature doesn't untap during its controller's untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new HeavyArbalestEffect())); diff --git a/Mage.Sets/src/mage/cards/h/HeavyBallista.java b/Mage.Sets/src/mage/cards/h/HeavyBallista.java index dc9f3953e1..31df971b46 100644 --- a/Mage.Sets/src/mage/cards/h/HeavyBallista.java +++ b/Mage.Sets/src/mage/cards/h/HeavyBallista.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetAttackingOrBlockingCreature; @@ -47,8 +48,8 @@ public class HeavyBallista extends CardImpl { public HeavyBallista(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HeavyInfantry.java b/Mage.Sets/src/mage/cards/h/HeavyInfantry.java index 773baa3cb2..e094d443c2 100644 --- a/Mage.Sets/src/mage/cards/h/HeavyInfantry.java +++ b/Mage.Sets/src/mage/cards/h/HeavyInfantry.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -54,8 +55,8 @@ public class HeavyInfantry extends CardImpl { public HeavyInfantry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HeavyMattock.java b/Mage.Sets/src/mage/cards/h/HeavyMattock.java index 8ff7345d5f..232a0db4c2 100644 --- a/Mage.Sets/src/mage/cards/h/HeavyMattock.java +++ b/Mage.Sets/src/mage/cards/h/HeavyMattock.java @@ -51,7 +51,7 @@ public class HeavyMattock extends CardImpl { public HeavyMattock(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); diff --git a/Mage.Sets/src/mage/cards/h/HeavyTrooper.java b/Mage.Sets/src/mage/cards/h/HeavyTrooper.java index d4cf4c2150..714c207862 100644 --- a/Mage.Sets/src/mage/cards/h/HeavyTrooper.java +++ b/Mage.Sets/src/mage/cards/h/HeavyTrooper.java @@ -1,74 +1,74 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.continuous.BoostControlledEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; - -/** - * - * @author Styxo - */ -public class HeavyTrooper extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures"); - - static { - filter.add(new SubtypePredicate(SubType.TROOPER)); - } - - public HeavyTrooper(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Trooper"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // Trooper creatures you control get +0/+1. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(0, 1, Duration.WhileOnBattlefield, filter, false))); - } - - public HeavyTrooper(final HeavyTrooper card) { - super(card); - } - - @Override - public HeavyTrooper copy() { - return new HeavyTrooper(this); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author Styxo + */ +public class HeavyTrooper extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures"); + + static { + filter.add(new SubtypePredicate(SubType.TROOPER)); + } + + public HeavyTrooper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.TROOPER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Trooper creatures you control get +0/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(0, 1, Duration.WhileOnBattlefield, filter, false))); + } + + public HeavyTrooper(final HeavyTrooper card) { + super(card); + } + + @Override + public HeavyTrooper copy() { + return new HeavyTrooper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HecklingFiends.java b/Mage.Sets/src/mage/cards/h/HecklingFiends.java index 82ab5b7ca5..e9e4fdc127 100644 --- a/Mage.Sets/src/mage/cards/h/HecklingFiends.java +++ b/Mage.Sets/src/mage/cards/h/HecklingFiends.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.AttacksIfAbleTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class HecklingFiends extends CardImpl { public HecklingFiends(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HedgeTroll.java b/Mage.Sets/src/mage/cards/h/HedgeTroll.java index 757f53be4f..6b54bc5147 100644 --- a/Mage.Sets/src/mage/cards/h/HedgeTroll.java +++ b/Mage.Sets/src/mage/cards/h/HedgeTroll.java @@ -56,8 +56,8 @@ public class HedgeTroll extends CardImpl { public HedgeTroll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Troll"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.TROLL); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HedonistsTrove.java b/Mage.Sets/src/mage/cards/h/HedonistsTrove.java index a024d4458a..44aa5b482b 100644 --- a/Mage.Sets/src/mage/cards/h/HedonistsTrove.java +++ b/Mage.Sets/src/mage/cards/h/HedonistsTrove.java @@ -54,7 +54,7 @@ import java.util.UUID; public class HedonistsTrove extends CardImpl { public HedonistsTrove(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{5}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{5}{B}{B}"); // When Hedonist's Trove enters the battlefield, exile all cards from target opponent's graveyard. Ability ability = new EntersBattlefieldTriggeredAbility(new HedonistsTroveExileEffect()); @@ -115,7 +115,7 @@ class HedonistsTrovePlayLandEffect extends AsThoughEffectImpl { public HedonistsTrovePlayLandEffect() { super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit); - staticText = "You may play land cards exiled by {this}"; + staticText = "You may play land cards exiled with {this}"; } public HedonistsTrovePlayLandEffect(final HedonistsTrovePlayLandEffect effect) { diff --git a/Mage.Sets/src/mage/cards/h/HedronBlade.java b/Mage.Sets/src/mage/cards/h/HedronBlade.java index 22269b9a7a..0f47c1405d 100644 --- a/Mage.Sets/src/mage/cards/h/HedronBlade.java +++ b/Mage.Sets/src/mage/cards/h/HedronBlade.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class HedronBlade extends CardImpl { public HedronBlade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); diff --git a/Mage.Sets/src/mage/cards/h/HedronCrab.java b/Mage.Sets/src/mage/cards/h/HedronCrab.java index ea01a22ca3..fb16298044 100644 --- a/Mage.Sets/src/mage/cards/h/HedronCrab.java +++ b/Mage.Sets/src/mage/cards/h/HedronCrab.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -44,7 +45,7 @@ public class HedronCrab extends CardImpl { public HedronCrab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Crab"); + this.subtype.add(SubType.CRAB); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HedronCrawler.java b/Mage.Sets/src/mage/cards/h/HedronCrawler.java index db97f0df7e..8337f17113 100644 --- a/Mage.Sets/src/mage/cards/h/HedronCrawler.java +++ b/Mage.Sets/src/mage/cards/h/HedronCrawler.java @@ -33,6 +33,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class HedronCrawler extends CardImpl { public HedronCrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HedronFieldPurists.java b/Mage.Sets/src/mage/cards/h/HedronFieldPurists.java index fc5851309d..0f16e1febf 100644 --- a/Mage.Sets/src/mage/cards/h/HedronFieldPurists.java +++ b/Mage.Sets/src/mage/cards/h/HedronFieldPurists.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.LevelerCardBuilder; import mage.cards.CardSetInfo; import mage.cards.LevelerCard; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -54,8 +55,8 @@ public class HedronFieldPurists extends LevelerCard { public HedronFieldPurists(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.color.setWhite(true); this.power = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/h/HedronMatrix.java b/Mage.Sets/src/mage/cards/h/HedronMatrix.java index 99950ef20d..73a4e04461 100644 --- a/Mage.Sets/src/mage/cards/h/HedronMatrix.java +++ b/Mage.Sets/src/mage/cards/h/HedronMatrix.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -53,7 +54,7 @@ public class HedronMatrix extends CardImpl { public HedronMatrix (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(4))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new HedronMatrixEffect())); } diff --git a/Mage.Sets/src/mage/cards/h/HedronRover.java b/Mage.Sets/src/mage/cards/h/HedronRover.java index 9068bdbb93..a60a8060fa 100644 --- a/Mage.Sets/src/mage/cards/h/HedronRover.java +++ b/Mage.Sets/src/mage/cards/h/HedronRover.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,7 +46,7 @@ public class HedronRover extends CardImpl { public HedronRover (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(2); this.addAbility(new LandfallAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn), false)); diff --git a/Mage.Sets/src/mage/cards/h/HedronScrabbler.java b/Mage.Sets/src/mage/cards/h/HedronScrabbler.java index f4892afd25..1bb3b5aa36 100644 --- a/Mage.Sets/src/mage/cards/h/HedronScrabbler.java +++ b/Mage.Sets/src/mage/cards/h/HedronScrabbler.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class HedronScrabbler extends CardImpl { public HedronScrabbler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HeedTheMists.java b/Mage.Sets/src/mage/cards/h/HeedTheMists.java index 2f7110ba60..5134c17ca4 100644 --- a/Mage.Sets/src/mage/cards/h/HeedTheMists.java +++ b/Mage.Sets/src/mage/cards/h/HeedTheMists.java @@ -34,6 +34,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -47,7 +48,7 @@ public class HeedTheMists extends CardImpl { public HeedTheMists(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{U}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Put the top card of your library into your graveyard, then draw cards equal to that card's converted mana cost. diff --git a/Mage.Sets/src/mage/cards/h/HeedlessOne.java b/Mage.Sets/src/mage/cards/h/HeedlessOne.java index eef539dc68..d2442fa93f 100644 --- a/Mage.Sets/src/mage/cards/h/HeedlessOne.java +++ b/Mage.Sets/src/mage/cards/h/HeedlessOne.java @@ -56,8 +56,8 @@ public class HeedlessOne extends CardImpl { public HeedlessOne(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/h/HeidarRimewindMaster.java b/Mage.Sets/src/mage/cards/h/HeidarRimewindMaster.java index d8f2615748..822f87b4e3 100644 --- a/Mage.Sets/src/mage/cards/h/HeidarRimewindMaster.java +++ b/Mage.Sets/src/mage/cards/h/HeidarRimewindMaster.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.SuperType; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class HeidarRimewindMaster extends CardImpl { public HeidarRimewindMaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HeirOfFalkenrath.java b/Mage.Sets/src/mage/cards/h/HeirOfFalkenrath.java index 2f2aedba5a..b46c190642 100644 --- a/Mage.Sets/src/mage/cards/h/HeirOfFalkenrath.java +++ b/Mage.Sets/src/mage/cards/h/HeirOfFalkenrath.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class HeirOfFalkenrath extends CardImpl { public HeirOfFalkenrath(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HeirOfTheWilds.java b/Mage.Sets/src/mage/cards/h/HeirOfTheWilds.java index 66c1b778a8..0b78fed34f 100644 --- a/Mage.Sets/src/mage/cards/h/HeirOfTheWilds.java +++ b/Mage.Sets/src/mage/cards/h/HeirOfTheWilds.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -48,8 +49,8 @@ public class HeirOfTheWilds extends CardImpl { public HeirOfTheWilds(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HeirToTheNight.java b/Mage.Sets/src/mage/cards/h/HeirToTheNight.java index 4e7a135d29..17fb353f54 100644 --- a/Mage.Sets/src/mage/cards/h/HeirToTheNight.java +++ b/Mage.Sets/src/mage/cards/h/HeirToTheNight.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class HeirToTheNight extends CardImpl { public HeirToTheNight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Vampire"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(3); this.toughness = new MageInt(2); this.color.setBlack(true); diff --git a/Mage.Sets/src/mage/cards/h/HeirsOfStromkirk.java b/Mage.Sets/src/mage/cards/h/HeirsOfStromkirk.java index bbbd47cead..43d47b9071 100644 --- a/Mage.Sets/src/mage/cards/h/HeirsOfStromkirk.java +++ b/Mage.Sets/src/mage/cards/h/HeirsOfStromkirk.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.IntimidateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,7 +46,7 @@ public class HeirsOfStromkirk extends CardImpl { public HeirsOfStromkirk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HekmaSentinels.java b/Mage.Sets/src/mage/cards/h/HekmaSentinels.java index bd6bed738c..c99fcda940 100644 --- a/Mage.Sets/src/mage/cards/h/HekmaSentinels.java +++ b/Mage.Sets/src/mage/cards/h/HekmaSentinels.java @@ -1,65 +1,66 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.CycleOrDiscardControllerTriggeredAbility; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; - -/** - * - * @author Styxo - */ -public class HekmaSentinels extends CardImpl { - - public HekmaSentinels(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.power = new MageInt(2); - this.toughness = new MageInt(3); - - // Whenever you cycle or discard a card, Hekma Sentinels gets +1/+1 until end of turn. - this.addAbility(new CycleOrDiscardControllerTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn))); - } - - public HekmaSentinels(final HekmaSentinels card) { - super(card); - } - - @Override - public HekmaSentinels copy() { - return new HekmaSentinels(this); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CycleOrDiscardControllerTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; + +/** + * + * @author Styxo + */ +public class HekmaSentinels extends CardImpl { + + public HekmaSentinels(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Whenever you cycle or discard a card, Hekma Sentinels gets +1/+1 until end of turn. + this.addAbility(new CycleOrDiscardControllerTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn))); + } + + public HekmaSentinels(final HekmaSentinels card) { + super(card); + } + + @Override + public HekmaSentinels copy() { + return new HekmaSentinels(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HeliodGodOfTheSun.java b/Mage.Sets/src/mage/cards/h/HeliodGodOfTheSun.java index 09453d133b..32a5ccc015 100644 --- a/Mage.Sets/src/mage/cards/h/HeliodGodOfTheSun.java +++ b/Mage.Sets/src/mage/cards/h/HeliodGodOfTheSun.java @@ -54,7 +54,7 @@ public class HeliodGodOfTheSun extends CardImpl { public HeliodGodOfTheSun(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/h/HeliodsEmissary.java b/Mage.Sets/src/mage/cards/h/HeliodsEmissary.java index 65c4cacb35..5da7c23ad3 100644 --- a/Mage.Sets/src/mage/cards/h/HeliodsEmissary.java +++ b/Mage.Sets/src/mage/cards/h/HeliodsEmissary.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -61,7 +62,7 @@ public class HeliodsEmissary extends CardImpl { public HeliodsEmissary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{W}"); - this.subtype.add("Elk"); + this.subtype.add(SubType.ELK); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HeliodsPilgrim.java b/Mage.Sets/src/mage/cards/h/HeliodsPilgrim.java index 24de8d6381..0668f94067 100644 --- a/Mage.Sets/src/mage/cards/h/HeliodsPilgrim.java +++ b/Mage.Sets/src/mage/cards/h/HeliodsPilgrim.java @@ -55,8 +55,8 @@ public class HeliodsPilgrim extends CardImpl { public HeliodsPilgrim(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/Helionaut.java b/Mage.Sets/src/mage/cards/h/Helionaut.java index e0dd9a1873..19e1deb397 100644 --- a/Mage.Sets/src/mage/cards/h/Helionaut.java +++ b/Mage.Sets/src/mage/cards/h/Helionaut.java @@ -37,6 +37,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class Helionaut extends CardImpl { public Helionaut(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HeliumSquirter.java b/Mage.Sets/src/mage/cards/h/HeliumSquirter.java index fecb3823cf..8fad0ada4b 100644 --- a/Mage.Sets/src/mage/cards/h/HeliumSquirter.java +++ b/Mage.Sets/src/mage/cards/h/HeliumSquirter.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.GraftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -58,8 +59,8 @@ public class HeliumSquirter extends CardImpl { public HeliumSquirter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Beast"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.BEAST); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/h/HelixPinnacle.java b/Mage.Sets/src/mage/cards/h/HelixPinnacle.java index 5a5501bfb6..c4fe64e45a 100644 --- a/Mage.Sets/src/mage/cards/h/HelixPinnacle.java +++ b/Mage.Sets/src/mage/cards/h/HelixPinnacle.java @@ -50,7 +50,7 @@ import mage.counters.CounterType; */ public class HelixPinnacle extends CardImpl { - static final String rule = "if there are 100 or more tower counters on Helix Pinnacle, you win the game"; + static final String rule = "at the beginning of your upkeep, if there are 100 or more tower counters on Helix Pinnacle, you win the game"; public HelixPinnacle(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); diff --git a/Mage.Sets/src/mage/cards/h/HellBentRaider.java b/Mage.Sets/src/mage/cards/h/HellBentRaider.java index 50afeec8be..9b35381bec 100644 --- a/Mage.Sets/src/mage/cards/h/HellBentRaider.java +++ b/Mage.Sets/src/mage/cards/h/HellBentRaider.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class HellBentRaider extends CardImpl { public HellBentRaider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Barbarian"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BARBARIAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HellSwarm.java b/Mage.Sets/src/mage/cards/h/HellSwarm.java new file mode 100644 index 0000000000..520e063daa --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HellSwarm.java @@ -0,0 +1,59 @@ +/* + * 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.cards.h; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class HellSwarm extends CardImpl { + + public HellSwarm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}"); + + // All creatures get -1/-0 until end of turn. + this.getSpellAbility().addEffect(new BoostAllEffect(-1, 0, Duration.EndOfTurn, new FilterCreaturePermanent("All creatures"), false)); + } + + public HellSwarm(final HellSwarm card) { + super(card); + } + + @Override + public HellSwarm copy() { + return new HellSwarm(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HellcarverDemon.java b/Mage.Sets/src/mage/cards/h/HellcarverDemon.java index 130af45760..1032ae1f69 100644 --- a/Mage.Sets/src/mage/cards/h/HellcarverDemon.java +++ b/Mage.Sets/src/mage/cards/h/HellcarverDemon.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -60,7 +61,7 @@ public class HellcarverDemon extends CardImpl { public HellcarverDemon(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/h/Helldozer.java b/Mage.Sets/src/mage/cards/h/Helldozer.java index ca170bc8d7..ab85df4c08 100644 --- a/Mage.Sets/src/mage/cards/h/Helldozer.java +++ b/Mage.Sets/src/mage/cards/h/Helldozer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -51,8 +52,8 @@ public class Helldozer extends CardImpl { public Helldozer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Giant"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.GIANT); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HellfireMongrel.java b/Mage.Sets/src/mage/cards/h/HellfireMongrel.java index c0efe596d4..b9d589a6d3 100644 --- a/Mage.Sets/src/mage/cards/h/HellfireMongrel.java +++ b/Mage.Sets/src/mage/cards/h/HellfireMongrel.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.game.Game; @@ -50,8 +51,8 @@ public class HellfireMongrel extends CardImpl { public HellfireMongrel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Hound"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.HOUND); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HellholeFlailer.java b/Mage.Sets/src/mage/cards/h/HellholeFlailer.java index e45beac47c..a649adf8c5 100644 --- a/Mage.Sets/src/mage/cards/h/HellholeFlailer.java +++ b/Mage.Sets/src/mage/cards/h/HellholeFlailer.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.UnleashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -50,8 +51,8 @@ public class HellholeFlailer extends CardImpl { public HellholeFlailer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); diff --git a/Mage.Sets/src/mage/cards/h/HellholeRats.java b/Mage.Sets/src/mage/cards/h/HellholeRats.java index 17f2435f71..2830a93812 100644 --- a/Mage.Sets/src/mage/cards/h/HellholeRats.java +++ b/Mage.Sets/src/mage/cards/h/HellholeRats.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -51,7 +52,7 @@ public class HellholeRats extends CardImpl { public HellholeRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{R}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HellkiteCharger.java b/Mage.Sets/src/mage/cards/h/HellkiteCharger.java index 373b46ca1d..ce8862d4d2 100644 --- a/Mage.Sets/src/mage/cards/h/HellkiteCharger.java +++ b/Mage.Sets/src/mage/cards/h/HellkiteCharger.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TurnPhase; import mage.filter.common.FilterAttackingCreature; @@ -55,7 +56,7 @@ public class HellkiteCharger extends CardImpl { public HellkiteCharger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HellkiteHatchling.java b/Mage.Sets/src/mage/cards/h/HellkiteHatchling.java index 68a36c1814..a595cef323 100644 --- a/Mage.Sets/src/mage/cards/h/HellkiteHatchling.java +++ b/Mage.Sets/src/mage/cards/h/HellkiteHatchling.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class HellkiteHatchling extends CardImpl { public HellkiteHatchling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HellkiteIgniter.java b/Mage.Sets/src/mage/cards/h/HellkiteIgniter.java index 8850d97a1d..a8186bbf52 100644 --- a/Mage.Sets/src/mage/cards/h/HellkiteIgniter.java +++ b/Mage.Sets/src/mage/cards/h/HellkiteIgniter.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class HellkiteIgniter extends CardImpl { public HellkiteIgniter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HellkiteOverlord.java b/Mage.Sets/src/mage/cards/h/HellkiteOverlord.java index 49b150b8be..ac880e3d99 100644 --- a/Mage.Sets/src/mage/cards/h/HellkiteOverlord.java +++ b/Mage.Sets/src/mage/cards/h/HellkiteOverlord.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class HellkiteOverlord extends CardImpl { public HellkiteOverlord (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{R}{R}{G}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/h/HellkiteTyrant.java b/Mage.Sets/src/mage/cards/h/HellkiteTyrant.java index fd4b9dc1e1..b8ef07cd06 100644 --- a/Mage.Sets/src/mage/cards/h/HellkiteTyrant.java +++ b/Mage.Sets/src/mage/cards/h/HellkiteTyrant.java @@ -45,6 +45,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Layer; @@ -67,7 +68,7 @@ public class HellkiteTyrant extends CardImpl { public HellkiteTyrant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HellraiserGoblin.java b/Mage.Sets/src/mage/cards/h/HellraiserGoblin.java index 4b3a75976c..20a3074e6a 100644 --- a/Mage.Sets/src/mage/cards/h/HellraiserGoblin.java +++ b/Mage.Sets/src/mage/cards/h/HellraiserGoblin.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -55,8 +56,8 @@ public class HellraiserGoblin extends CardImpl { public HellraiserGoblin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/Hellrider.java b/Mage.Sets/src/mage/cards/h/Hellrider.java index ee690b7c1b..8afaea91ea 100644 --- a/Mage.Sets/src/mage/cards/h/Hellrider.java +++ b/Mage.Sets/src/mage/cards/h/Hellrider.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -50,7 +51,7 @@ public class Hellrider extends CardImpl { public Hellrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HellsCaretaker.java b/Mage.Sets/src/mage/cards/h/HellsCaretaker.java index bd9a503d6f..428ed7b6eb 100644 --- a/Mage.Sets/src/mage/cards/h/HellsCaretaker.java +++ b/Mage.Sets/src/mage/cards/h/HellsCaretaker.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.PhaseStep; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -52,7 +53,7 @@ public class HellsCaretaker extends CardImpl { public HellsCaretaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HellsThunder.java b/Mage.Sets/src/mage/cards/h/HellsThunder.java index 8f78678c45..72a3544ced 100644 --- a/Mage.Sets/src/mage/cards/h/HellsThunder.java +++ b/Mage.Sets/src/mage/cards/h/HellsThunder.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.events.GameEvent.EventType; /** @@ -49,7 +50,7 @@ public class HellsThunder extends CardImpl { public HellsThunder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HellsparkElemental.java b/Mage.Sets/src/mage/cards/h/HellsparkElemental.java index 613caedf53..d6509e5566 100644 --- a/Mage.Sets/src/mage/cards/h/HellsparkElemental.java +++ b/Mage.Sets/src/mage/cards/h/HellsparkElemental.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.events.GameEvent.EventType; @@ -49,7 +50,7 @@ public class HellsparkElemental extends CardImpl { public HellsparkElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HelmOfKaldra.java b/Mage.Sets/src/mage/cards/h/HelmOfKaldra.java index 16f560c354..309d21d56f 100644 --- a/Mage.Sets/src/mage/cards/h/HelmOfKaldra.java +++ b/Mage.Sets/src/mage/cards/h/HelmOfKaldra.java @@ -70,7 +70,7 @@ public class HelmOfKaldra extends CardImpl { public HelmOfKaldra(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has first strike, trample, and haste. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT)); diff --git a/Mage.Sets/src/mage/cards/h/HelmOfTheGhastlord.java b/Mage.Sets/src/mage/cards/h/HelmOfTheGhastlord.java index bda3b70f13..b145e71cba 100644 --- a/Mage.Sets/src/mage/cards/h/HelmOfTheGhastlord.java +++ b/Mage.Sets/src/mage/cards/h/HelmOfTheGhastlord.java @@ -44,6 +44,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -57,7 +58,7 @@ public class HelmOfTheGhastlord extends CardImpl { public HelmOfTheGhastlord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U/B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/h/HelmOfTheGods.java b/Mage.Sets/src/mage/cards/h/HelmOfTheGods.java index 7498069113..1d0878e68b 100644 --- a/Mage.Sets/src/mage/cards/h/HelmOfTheGods.java +++ b/Mage.Sets/src/mage/cards/h/HelmOfTheGods.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class HelmOfTheGods extends CardImpl { public HelmOfTheGods(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1 for each enchantment you control. PermanentsOnBattlefieldCount countEnchantments = new PermanentsOnBattlefieldCount(new FilterEnchantmentPermanent(filter)); diff --git a/Mage.Sets/src/mage/cards/h/HematiteGolem.java b/Mage.Sets/src/mage/cards/h/HematiteGolem.java index 86f1ec6a84..85fa91a299 100644 --- a/Mage.Sets/src/mage/cards/h/HematiteGolem.java +++ b/Mage.Sets/src/mage/cards/h/HematiteGolem.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class HematiteGolem extends CardImpl { public HematiteGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HenchfiendOfUkor.java b/Mage.Sets/src/mage/cards/h/HenchfiendOfUkor.java index 66e70edb1d..5cc44ae2c8 100644 --- a/Mage.Sets/src/mage/cards/h/HenchfiendOfUkor.java +++ b/Mage.Sets/src/mage/cards/h/HenchfiendOfUkor.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class HenchfiendOfUkor extends CardImpl { public HenchfiendOfUkor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Ogre"); + this.subtype.add(SubType.OGRE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HengeGuardian.java b/Mage.Sets/src/mage/cards/h/HengeGuardian.java index 425d609c9c..4dc33ef524 100644 --- a/Mage.Sets/src/mage/cards/h/HengeGuardian.java +++ b/Mage.Sets/src/mage/cards/h/HengeGuardian.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class HengeGuardian extends CardImpl { public HengeGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Dragon"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.DRAGON); + this.subtype.add(SubType.WURM); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HeraldOfAnafenza.java b/Mage.Sets/src/mage/cards/h/HeraldOfAnafenza.java index eec92a6fe3..29ad93d933 100644 --- a/Mage.Sets/src/mage/cards/h/HeraldOfAnafenza.java +++ b/Mage.Sets/src/mage/cards/h/HeraldOfAnafenza.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.OutlastAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -50,8 +51,8 @@ public class HeraldOfAnafenza extends CardImpl { public HeraldOfAnafenza(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HeraldOfAnguish.java b/Mage.Sets/src/mage/cards/h/HeraldOfAnguish.java index 00a42ce34d..88aedd5323 100644 --- a/Mage.Sets/src/mage/cards/h/HeraldOfAnguish.java +++ b/Mage.Sets/src/mage/cards/h/HeraldOfAnguish.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.ImproviseAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class HeraldOfAnguish extends CardImpl { public HeraldOfAnguish(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HeraldOfDromoka.java b/Mage.Sets/src/mage/cards/h/HeraldOfDromoka.java index 43ed2077b0..598c457eab 100644 --- a/Mage.Sets/src/mage/cards/h/HeraldOfDromoka.java +++ b/Mage.Sets/src/mage/cards/h/HeraldOfDromoka.java @@ -59,8 +59,8 @@ public class HeraldOfDromoka extends CardImpl { public HeraldOfDromoka(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HeraldOfKozilek.java b/Mage.Sets/src/mage/cards/h/HeraldOfKozilek.java index a881ddbd06..f04b62b810 100644 --- a/Mage.Sets/src/mage/cards/h/HeraldOfKozilek.java +++ b/Mage.Sets/src/mage/cards/h/HeraldOfKozilek.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ColorlessPredicate; @@ -53,8 +54,8 @@ public class HeraldOfKozilek extends CardImpl { public HeraldOfKozilek(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{R}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HeraldOfLeshrac.java b/Mage.Sets/src/mage/cards/h/HeraldOfLeshrac.java index b3b2365e91..a04f5f3682 100644 --- a/Mage.Sets/src/mage/cards/h/HeraldOfLeshrac.java +++ b/Mage.Sets/src/mage/cards/h/HeraldOfLeshrac.java @@ -1,177 +1,178 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.LeavesBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.Cost; -import mage.abilities.costs.CostImpl; -import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.effects.ContinuousEffect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.abilities.effects.common.continuous.GainControlTargetEffect; -import mage.abilities.keyword.CumulativeUpkeepAbility; -import mage.abilities.keyword.FlyingAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.filter.FilterPermanent; -import mage.filter.common.FilterControlledLandPermanent; -import mage.filter.common.FilterLandPermanent; -import mage.filter.predicate.other.OwnerIdPredicate; -import mage.filter.predicate.other.OwnerPredicate; -import mage.filter.predicate.permanent.ControllerIdPredicate; -import mage.filter.predicate.permanent.ControllerPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.target.Target; -import mage.target.TargetPermanent; -import mage.target.targetpointer.FixedTarget; - -/** - * - * @author emerald000 - */ -public class HeraldOfLeshrac extends CardImpl { - - private static final FilterPermanent filter = new FilterControlledLandPermanent("land you control but don't own"); - static { - filter.add(new OwnerPredicate(TargetController.NOT_YOU)); - } - - public HeraldOfLeshrac(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{B}"); - - this.subtype.add("Avatar"); - this.power = new MageInt(2); - this.toughness = new MageInt(4); - - // Flying - this.addAbility(FlyingAbility.getInstance()); - - // Cumulative upkeep-Gain control of a land you don't control. - this.addAbility(new CumulativeUpkeepAbility(new HeraldOfLeshracCumulativeCost())); - - // Herald of Leshrac gets +1/+1 for each land you control but don't own. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), new PermanentsOnBattlefieldCount(filter), Duration.WhileOnBattlefield))); - - // When Herald of Leshrac leaves the battlefield, each player gains control of each land he or she owns that you control. - this.addAbility(new LeavesBattlefieldTriggeredAbility(new HeraldOfLeshracLeavesEffect(), false)); - } - - public HeraldOfLeshrac(final HeraldOfLeshrac card) { - super(card); - } - - @Override - public HeraldOfLeshrac copy() { - return new HeraldOfLeshrac(this); - } -} - -class HeraldOfLeshracCumulativeCost extends CostImpl { - - private static final FilterPermanent filter = new FilterLandPermanent("land you don't control"); - static { - filter.add(new ControllerPredicate(TargetController.NOT_YOU)); - } - - HeraldOfLeshracCumulativeCost() { - this.text = "Gain control of a land you don't control"; - } - - HeraldOfLeshracCumulativeCost(final HeraldOfLeshracCumulativeCost cost) { - super(cost); - } - - @Override - public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) { - Target target = new TargetPermanent(filter); - if (target.choose(Outcome.GainControl, controllerId, sourceId, game)) { - ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfGame); - effect.setTargetPointer(new FixedTarget(target.getFirstTarget())); - game.addEffect(effect, ability); - game.applyEffects(); - paid = true; - } - return paid; - } - - @Override - public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { - return game.getBattlefield().contains(filter, controllerId, game, 1); - } - - @Override - public HeraldOfLeshracCumulativeCost copy() { - return new HeraldOfLeshracCumulativeCost(this); - } -} - -class HeraldOfLeshracLeavesEffect extends OneShotEffect { - - HeraldOfLeshracLeavesEffect() { - super(Outcome.Detriment); - this.staticText = "each player gains control of each land he or she owns that you control"; - } - - HeraldOfLeshracLeavesEffect(final HeraldOfLeshracLeavesEffect effect) { - super(effect); - } - - @Override - public HeraldOfLeshracLeavesEffect copy() { - return new HeraldOfLeshracLeavesEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { - if (playerId.equals(source.getControllerId())) { - continue; - } - FilterPermanent filter = new FilterLandPermanent(); - filter.add(new OwnerIdPredicate(playerId)); - filter.add(new ControllerIdPredicate(source.getControllerId())); - for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { - ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfGame, playerId); - effect.setTargetPointer(new FixedTarget(permanent.getId())); - game.addEffect(effect, source); - } - } - return true; - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.CostImpl; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.other.OwnerIdPredicate; +import mage.filter.predicate.other.OwnerPredicate; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.Target; +import mage.target.TargetPermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author emerald000 + */ +public class HeraldOfLeshrac extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledLandPermanent("land you control but don't own"); + static { + filter.add(new OwnerPredicate(TargetController.NOT_YOU)); + } + + public HeraldOfLeshrac(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{B}"); + + this.subtype.add(SubType.AVATAR); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Cumulative upkeep-Gain control of a land you don't control. + this.addAbility(new CumulativeUpkeepAbility(new HeraldOfLeshracCumulativeCost())); + + // Herald of Leshrac gets +1/+1 for each land you control but don't own. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), new PermanentsOnBattlefieldCount(filter), Duration.WhileOnBattlefield))); + + // When Herald of Leshrac leaves the battlefield, each player gains control of each land he or she owns that you control. + this.addAbility(new LeavesBattlefieldTriggeredAbility(new HeraldOfLeshracLeavesEffect(), false)); + } + + public HeraldOfLeshrac(final HeraldOfLeshrac card) { + super(card); + } + + @Override + public HeraldOfLeshrac copy() { + return new HeraldOfLeshrac(this); + } +} + +class HeraldOfLeshracCumulativeCost extends CostImpl { + + private static final FilterPermanent filter = new FilterLandPermanent("land you don't control"); + static { + filter.add(new ControllerPredicate(TargetController.NOT_YOU)); + } + + HeraldOfLeshracCumulativeCost() { + this.text = "Gain control of a land you don't control"; + } + + HeraldOfLeshracCumulativeCost(final HeraldOfLeshracCumulativeCost cost) { + super(cost); + } + + @Override + public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) { + Target target = new TargetPermanent(filter); + if (target.choose(Outcome.GainControl, controllerId, sourceId, game)) { + ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfGame); + effect.setTargetPointer(new FixedTarget(target.getFirstTarget())); + game.addEffect(effect, ability); + game.applyEffects(); + paid = true; + } + return paid; + } + + @Override + public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { + return game.getBattlefield().contains(filter, controllerId, game, 1); + } + + @Override + public HeraldOfLeshracCumulativeCost copy() { + return new HeraldOfLeshracCumulativeCost(this); + } +} + +class HeraldOfLeshracLeavesEffect extends OneShotEffect { + + HeraldOfLeshracLeavesEffect() { + super(Outcome.Detriment); + this.staticText = "each player gains control of each land he or she owns that you control"; + } + + HeraldOfLeshracLeavesEffect(final HeraldOfLeshracLeavesEffect effect) { + super(effect); + } + + @Override + public HeraldOfLeshracLeavesEffect copy() { + return new HeraldOfLeshracLeavesEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { + if (playerId.equals(source.getControllerId())) { + continue; + } + FilterPermanent filter = new FilterLandPermanent(); + filter.add(new OwnerIdPredicate(playerId)); + filter.add(new ControllerIdPredicate(source.getControllerId())); + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { + ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfGame, playerId); + effect.setTargetPointer(new FixedTarget(permanent.getId())); + game.addEffect(effect, source); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/h/HeraldOfSecretStreams.java b/Mage.Sets/src/mage/cards/h/HeraldOfSecretStreams.java new file mode 100644 index 0000000000..b05d2cab39 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HeraldOfSecretStreams.java @@ -0,0 +1,76 @@ +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.combat.CantBeBlockedAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.permanent.CounterPredicate; + +/** + * + * @author TheElk801 + */ +public class HeraldOfSecretStreams extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creatures you control with +1/+1 counters on them"); + + static { + filter.add(new CounterPredicate(CounterType.P1P1)); + } + + public HeraldOfSecretStreams(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Creatures you control with +1/+1 counters on them can't be blocked. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedAllEffect(filter, Duration.WhileOnBattlefield))); + } + + public HeraldOfSecretStreams(final HeraldOfSecretStreams card) { + super(card); + } + + @Override + public HeraldOfSecretStreams copy() { + return new HeraldOfSecretStreams(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HeraldOfSerra.java b/Mage.Sets/src/mage/cards/h/HeraldOfSerra.java index d5a5cc459d..c3505419a2 100644 --- a/Mage.Sets/src/mage/cards/h/HeraldOfSerra.java +++ b/Mage.Sets/src/mage/cards/h/HeraldOfSerra.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class HeraldOfSerra extends CardImpl { public HeraldOfSerra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HeraldOfTheFair.java b/Mage.Sets/src/mage/cards/h/HeraldOfTheFair.java index 7a0d19444d..80be5265f4 100644 --- a/Mage.Sets/src/mage/cards/h/HeraldOfTheFair.java +++ b/Mage.Sets/src/mage/cards/h/HeraldOfTheFair.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetControlledCreaturePermanent; @@ -46,7 +47,7 @@ public class HeraldOfTheFair extends CardImpl { public HeraldOfTheFair(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HeraldOfTheHost.java b/Mage.Sets/src/mage/cards/h/HeraldOfTheHost.java index cbf8068e59..59b3434f15 100644 --- a/Mage.Sets/src/mage/cards/h/HeraldOfTheHost.java +++ b/Mage.Sets/src/mage/cards/h/HeraldOfTheHost.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class HeraldOfTheHost extends CardImpl { public HeraldOfTheHost(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HeraldOfThePantheon.java b/Mage.Sets/src/mage/cards/h/HeraldOfThePantheon.java index 428d9e1de6..6c31a6de0a 100644 --- a/Mage.Sets/src/mage/cards/h/HeraldOfThePantheon.java +++ b/Mage.Sets/src/mage/cards/h/HeraldOfThePantheon.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.FilterSpell; @@ -57,8 +58,8 @@ public class HeraldOfThePantheon extends CardImpl { public HeraldOfThePantheon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HeraldOfTorment.java b/Mage.Sets/src/mage/cards/h/HeraldOfTorment.java index 8102c0c5aa..938c723ee4 100644 --- a/Mage.Sets/src/mage/cards/h/HeraldOfTorment.java +++ b/Mage.Sets/src/mage/cards/h/HeraldOfTorment.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class HeraldOfTorment extends CardImpl { public HeraldOfTorment(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HeraldOfWar.java b/Mage.Sets/src/mage/cards/h/HeraldOfWar.java index 81bf874dba..853e0b7bbd 100644 --- a/Mage.Sets/src/mage/cards/h/HeraldOfWar.java +++ b/Mage.Sets/src/mage/cards/h/HeraldOfWar.java @@ -52,7 +52,7 @@ public class HeraldOfWar extends CardImpl { public HeraldOfWar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HerdGnarr.java b/Mage.Sets/src/mage/cards/h/HerdGnarr.java index 1197003d9a..0bf680e245 100644 --- a/Mage.Sets/src/mage/cards/h/HerdGnarr.java +++ b/Mage.Sets/src/mage/cards/h/HerdGnarr.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; @@ -53,7 +54,7 @@ public class HerdGnarr extends CardImpl { public HerdGnarr(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HerdchaserDragon.java b/Mage.Sets/src/mage/cards/h/HerdchaserDragon.java index 34a845e1d4..a5c7b8ceda 100644 --- a/Mage.Sets/src/mage/cards/h/HerdchaserDragon.java +++ b/Mage.Sets/src/mage/cards/h/HerdchaserDragon.java @@ -49,8 +49,8 @@ import mage.filter.predicate.permanent.AnotherPredicate; * @author fireshoes */ public class HerdchaserDragon extends CardImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("each other Dragon creature you control"); + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other Dragon creature you control"); static { filter.add(new AnotherPredicate()); @@ -58,20 +58,20 @@ public class HerdchaserDragon extends CardImpl { } public HerdchaserDragon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Dragon"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(3); this.toughness = new MageInt(3); // Flying this.addAbility(FlyingAbility.getInstance()); - + // Trample this.addAbility(TrampleAbility.getInstance()); - + // Megamorph {5}{G}{G} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{5}{G}{G}"), true)); - + // When Herdchaser Dragon is turned face up, put a +1/+1 counter on each other Dragon creature you control. this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), false, false)); } diff --git a/Mage.Sets/src/mage/cards/h/HeritageDruid.java b/Mage.Sets/src/mage/cards/h/HeritageDruid.java index ece03c40eb..c3a419a43f 100644 --- a/Mage.Sets/src/mage/cards/h/HeritageDruid.java +++ b/Mage.Sets/src/mage/cards/h/HeritageDruid.java @@ -57,8 +57,8 @@ public class HeritageDruid extends CardImpl { public HeritageDruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HermeticStudy.java b/Mage.Sets/src/mage/cards/h/HermeticStudy.java index 29982b3495..b1284707c4 100644 --- a/Mage.Sets/src/mage/cards/h/HermeticStudy.java +++ b/Mage.Sets/src/mage/cards/h/HermeticStudy.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class HermeticStudy extends CardImpl { public HermeticStudy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/h/HermitDruid.java b/Mage.Sets/src/mage/cards/h/HermitDruid.java index 87cd74a24f..940ea218ae 100644 --- a/Mage.Sets/src/mage/cards/h/HermitDruid.java +++ b/Mage.Sets/src/mage/cards/h/HermitDruid.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.RevealCardsFromLibraryUntilEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -49,8 +50,8 @@ public class HermitDruid extends CardImpl { public HermitDruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HermitOfTheNatterknolls.java b/Mage.Sets/src/mage/cards/h/HermitOfTheNatterknolls.java index 7575a6c6a8..a632f6b575 100644 --- a/Mage.Sets/src/mage/cards/h/HermitOfTheNatterknolls.java +++ b/Mage.Sets/src/mage/cards/h/HermitOfTheNatterknolls.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.l.LoneWolfOfTheNatterknolls; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.FilterSpell; @@ -53,8 +54,8 @@ public class HermitOfTheNatterknolls extends CardImpl { public HermitOfTheNatterknolls(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HeroOfBladehold.java b/Mage.Sets/src/mage/cards/h/HeroOfBladehold.java index 67debf92ca..703afbdf90 100644 --- a/Mage.Sets/src/mage/cards/h/HeroOfBladehold.java +++ b/Mage.Sets/src/mage/cards/h/HeroOfBladehold.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.BattleCryAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.SoldierToken; /** @@ -45,8 +46,8 @@ public class HeroOfBladehold extends CardImpl { public HeroOfBladehold(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HeroOfGomaFada.java b/Mage.Sets/src/mage/cards/h/HeroOfGomaFada.java index 7f31aca54c..96233fd4d1 100644 --- a/Mage.Sets/src/mage/cards/h/HeroOfGomaFada.java +++ b/Mage.Sets/src/mage/cards/h/HeroOfGomaFada.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterControlledCreaturePermanent; @@ -47,9 +48,9 @@ public class HeroOfGomaFada extends CardImpl { public HeroOfGomaFada(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.subtype.add(SubType.ALLY); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HeroOfIroas.java b/Mage.Sets/src/mage/cards/h/HeroOfIroas.java index b95601205a..a30f1f21fe 100644 --- a/Mage.Sets/src/mage/cards/h/HeroOfIroas.java +++ b/Mage.Sets/src/mage/cards/h/HeroOfIroas.java @@ -55,8 +55,8 @@ public class HeroOfIroas extends CardImpl { public HeroOfIroas(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HeroOfLeinaTower.java b/Mage.Sets/src/mage/cards/h/HeroOfLeinaTower.java index 04631672bf..0acf76c40b 100644 --- a/Mage.Sets/src/mage/cards/h/HeroOfLeinaTower.java +++ b/Mage.Sets/src/mage/cards/h/HeroOfLeinaTower.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.game.Game; @@ -53,8 +54,8 @@ public class HeroOfLeinaTower extends CardImpl { public HeroOfLeinaTower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HeroOfOxidRidge.java b/Mage.Sets/src/mage/cards/h/HeroOfOxidRidge.java index b33c1b0a96..4c5fe73ec0 100644 --- a/Mage.Sets/src/mage/cards/h/HeroOfOxidRidge.java +++ b/Mage.Sets/src/mage/cards/h/HeroOfOxidRidge.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.game.Game; import mage.game.permanent.Permanent; @@ -49,8 +50,8 @@ public class HeroOfOxidRidge extends CardImpl { public HeroOfOxidRidge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HeroesBane.java b/Mage.Sets/src/mage/cards/h/HeroesBane.java index 21db062d38..39baf77dba 100644 --- a/Mage.Sets/src/mage/cards/h/HeroesBane.java +++ b/Mage.Sets/src/mage/cards/h/HeroesBane.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -49,7 +50,7 @@ public class HeroesBane extends CardImpl { public HeroesBane(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/h/HeroicDefiance.java b/Mage.Sets/src/mage/cards/h/HeroicDefiance.java index 48cf3fa128..ce4a9ed6a0 100644 --- a/Mage.Sets/src/mage/cards/h/HeroicDefiance.java +++ b/Mage.Sets/src/mage/cards/h/HeroicDefiance.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class HeroicDefiance extends CardImpl { public HeroicDefiance(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/h/HeronsGraceChampion.java b/Mage.Sets/src/mage/cards/h/HeronsGraceChampion.java index 062a0c57d3..d3129daac1 100644 --- a/Mage.Sets/src/mage/cards/h/HeronsGraceChampion.java +++ b/Mage.Sets/src/mage/cards/h/HeronsGraceChampion.java @@ -58,8 +58,8 @@ public class HeronsGraceChampion extends CardImpl { public HeronsGraceChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HerosBlade.java b/Mage.Sets/src/mage/cards/h/HerosBlade.java index 778aea45ee..88b2829350 100644 --- a/Mage.Sets/src/mage/cards/h/HerosBlade.java +++ b/Mage.Sets/src/mage/cards/h/HerosBlade.java @@ -57,7 +57,7 @@ public class HerosBlade extends CardImpl { public HerosBlade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +3/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 2))); diff --git a/Mage.Sets/src/mage/cards/h/HerosResolve.java b/Mage.Sets/src/mage/cards/h/HerosResolve.java index f90dd677b2..6958444e5d 100644 --- a/Mage.Sets/src/mage/cards/h/HerosResolve.java +++ b/Mage.Sets/src/mage/cards/h/HerosResolve.java @@ -47,7 +47,7 @@ public class HerosResolve extends CardImpl { public HerosResolve(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/cards/h/HewedStoneRetainers.java b/Mage.Sets/src/mage/cards/h/HewedStoneRetainers.java index a3375819af..9162149b2f 100644 --- a/Mage.Sets/src/mage/cards/h/HewedStoneRetainers.java +++ b/Mage.Sets/src/mage/cards/h/HewedStoneRetainers.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ruleModifying.CastOnlyIfYouHaveCastAnotherS import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -44,7 +45,7 @@ public class HewedStoneRetainers extends CardImpl { public HewedStoneRetainers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HexParasite.java b/Mage.Sets/src/mage/cards/h/HexParasite.java index e57539bbf1..4e6ee90f6a 100644 --- a/Mage.Sets/src/mage/cards/h/HexParasite.java +++ b/Mage.Sets/src/mage/cards/h/HexParasite.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class HexParasite extends CardImpl { public HexParasite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HexplateGolem.java b/Mage.Sets/src/mage/cards/h/HexplateGolem.java index 57c0824bdb..fce93af4e7 100644 --- a/Mage.Sets/src/mage/cards/h/HexplateGolem.java +++ b/Mage.Sets/src/mage/cards/h/HexplateGolem.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class HexplateGolem extends CardImpl { public HexplateGolem (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(5); this.toughness = new MageInt(7); } diff --git a/Mage.Sets/src/mage/cards/h/HibernationSliver.java b/Mage.Sets/src/mage/cards/h/HibernationSliver.java index 8711f199d5..168760dc7e 100644 --- a/Mage.Sets/src/mage/cards/h/HibernationSliver.java +++ b/Mage.Sets/src/mage/cards/h/HibernationSliver.java @@ -52,7 +52,7 @@ public class HibernationSliver extends CardImpl { public HibernationSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HiddenAncients.java b/Mage.Sets/src/mage/cards/h/HiddenAncients.java index c06782ef74..f4c4e79309 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenAncients.java +++ b/Mage.Sets/src/mage/cards/h/HiddenAncients.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.StaticFilters; @@ -82,7 +83,7 @@ class HiddenAncientsTreefolk extends Token { public HiddenAncientsTreefolk() { super("Treefolk", "5/5 Treefolk creature"); cardType.add(CardType.CREATURE); - subtype.add("Treefolk"); + subtype.add(SubType.TREEFOLK); power = new MageInt(5); toughness = new MageInt(5); } diff --git a/Mage.Sets/src/mage/cards/h/HiddenDragonslayer.java b/Mage.Sets/src/mage/cards/h/HiddenDragonslayer.java index 2c4dea5460..98b3fcec85 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenDragonslayer.java +++ b/Mage.Sets/src/mage/cards/h/HiddenDragonslayer.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -60,8 +61,8 @@ public class HiddenDragonslayer extends CardImpl { public HiddenDragonslayer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HiddenGibbons.java b/Mage.Sets/src/mage/cards/h/HiddenGibbons.java index 3f22244325..7902b14874 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenGibbons.java +++ b/Mage.Sets/src/mage/cards/h/HiddenGibbons.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.StaticFilters; @@ -82,7 +83,7 @@ class HiddenGibbonsApe extends Token { public HiddenGibbonsApe() { super("Ape", "4/4 Ape creature"); cardType.add(CardType.CREATURE); - subtype.add("Ape"); + subtype.add(SubType.APE); power = new MageInt(4); toughness = new MageInt(4); } diff --git a/Mage.Sets/src/mage/cards/h/HiddenGuerrillas.java b/Mage.Sets/src/mage/cards/h/HiddenGuerrillas.java index dcf74336f2..ad43c6217b 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenGuerrillas.java +++ b/Mage.Sets/src/mage/cards/h/HiddenGuerrillas.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; import mage.filter.common.FilterArtifactSpell; @@ -76,7 +77,7 @@ class HiddenGuerrillasSoldier extends Token { public HiddenGuerrillasSoldier() { super("Soldier", "5/3 Soldier creature with trample"); cardType.add(CardType.CREATURE); - subtype.add("Soldier"); + subtype.add(SubType.SOLDIER); power = new MageInt(5); toughness = new MageInt(3); this.addAbility(TrampleAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/h/HiddenHerbalists.java b/Mage.Sets/src/mage/cards/h/HiddenHerbalists.java index c6f29e0b07..0fb3cc18fc 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenHerbalists.java +++ b/Mage.Sets/src/mage/cards/h/HiddenHerbalists.java @@ -1,74 +1,75 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.MageInt; -import mage.Mana; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.condition.common.RevoltCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.common.BasicManaEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.watchers.common.RevoltWatcher; - -/** - * - * @author Styxo - */ -public class HiddenHerbalists extends CardImpl { - - public HiddenHerbalists(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - - this.subtype.add("Human"); - this.subtype.add("Druid"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // Revolt &mdash When Hidden Herbalists enters the battlefield, if a permanent you controlled left the battlefield this turn, add {G}{G} to your mana pool; - this.addAbility( - new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility( - new BasicManaEffect(Mana.GreenMana(2)), false), RevoltCondition.instance, - "Revolt — When {this} enters the battlefield, if a permanent you controlled left" - + " the battlefield this turn, add {G}{G} to your mana pool."), - new RevoltWatcher() - ); - } - - public HiddenHerbalists(final HiddenHerbalists card) { - super(card); - } - - @Override - public HiddenHerbalists copy() { - return new HiddenHerbalists(this); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.Mana; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.RevoltCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.BasicManaEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.watchers.common.RevoltWatcher; + +/** + * + * @author Styxo + */ +public class HiddenHerbalists extends CardImpl { + + public HiddenHerbalists(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Revolt &mdash When Hidden Herbalists enters the battlefield, if a permanent you controlled left the battlefield this turn, add {G}{G} to your mana pool; + this.addAbility( + new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility( + new BasicManaEffect(Mana.GreenMana(2)), false), RevoltCondition.instance, + "Revolt — When {this} enters the battlefield, if a permanent you controlled left" + + " the battlefield this turn, add {G}{G} to your mana pool."), + new RevoltWatcher() + ); + } + + public HiddenHerbalists(final HiddenHerbalists card) { + super(card); + } + + @Override + public HiddenHerbalists copy() { + return new HiddenHerbalists(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HiddenHerd.java b/Mage.Sets/src/mage/cards/h/HiddenHerd.java new file mode 100644 index 0000000000..ec6cd0c0b1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HiddenHerd.java @@ -0,0 +1,117 @@ +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.condition.common.SourceMatchesFilterCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.Token; + +/** + * + * @author TheElk801 + */ +public class HiddenHerd extends CardImpl { + + public HiddenHerd(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + + // When an opponent plays a nonbasic land, if Hidden Herd is an enchantment, Hidden Herd becomes a 3/3 Beast creature. + this.addAbility(new ConditionalTriggeredAbility( + new HiddenHerdAbility(), + new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), + "When an opponent plays a nonbasic land, if {this} is an enchantment, {this} becomes a 3/3 Beast creature." + )); + } + + public HiddenHerd(final HiddenHerd card) { + super(card); + } + + @Override + public HiddenHerd copy() { + return new HiddenHerd(this); + } +} + +class HiddenHerdAbility extends TriggeredAbilityImpl { + + public HiddenHerdAbility() { + super(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new HiddenHerdBeast(), "", Duration.WhileOnBattlefield, true, false), false); + } + + public HiddenHerdAbility(final HiddenHerdAbility ability) { + super(ability); + } + + @Override + public HiddenHerdAbility copy() { + return new HiddenHerdAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.LAND_PLAYED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent land = game.getPermanentOrLKIBattlefield(event.getTargetId()); + return game.getOpponents(controllerId).contains(event.getPlayerId()) && !land.getSuperType().contains(SuperType.BASIC); + } + + @Override + public String getRule() { + return "When an opponent plays a nonbasic land, if {this} is an enchantment, {this} becomes a 3/3 Beast creature."; + } +} + +class HiddenHerdBeast extends Token { + + public HiddenHerdBeast() { + super("Beast", "3/3 Beast creature"); + cardType.add(CardType.CREATURE); + subtype.add(SubType.BEAST); + power = new MageInt(3); + toughness = new MageInt(3); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HiddenHorror.java b/Mage.Sets/src/mage/cards/h/HiddenHorror.java index 65239ad14e..c1805c5310 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenHorror.java +++ b/Mage.Sets/src/mage/cards/h/HiddenHorror.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInHand; @@ -46,7 +47,7 @@ public class HiddenHorror extends CardImpl { public HiddenHorror(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HiddenSpider.java b/Mage.Sets/src/mage/cards/h/HiddenSpider.java index e63dce9233..04213732d8 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenSpider.java +++ b/Mage.Sets/src/mage/cards/h/HiddenSpider.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; @@ -84,7 +85,7 @@ class HiddenSpiderToken extends Token { public HiddenSpiderToken() { super("Spider", "3/5 Spider creature with reach"); cardType.add(CardType.CREATURE); - subtype.add("Spider"); + subtype.add(SubType.SPIDER); power = new MageInt(3); toughness = new MageInt(5); this.addAbility(ReachAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/h/HideousLaughter.java b/Mage.Sets/src/mage/cards/h/HideousLaughter.java index c5212c26d0..d81c2d180f 100644 --- a/Mage.Sets/src/mage/cards/h/HideousLaughter.java +++ b/Mage.Sets/src/mage/cards/h/HideousLaughter.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SpliceOntoArcaneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -43,7 +44,7 @@ public class HideousLaughter extends CardImpl { public HideousLaughter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{B}{B}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // All creatures get -2/-2 until end of turn. diff --git a/Mage.Sets/src/mage/cards/h/HierophantsChalice.java b/Mage.Sets/src/mage/cards/h/HierophantsChalice.java new file mode 100644 index 0000000000..73e175fd7c --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HierophantsChalice.java @@ -0,0 +1,70 @@ +/* + * 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.cards.h; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.Target; +import mage.target.common.TargetOpponent; + +/** + * + * @author TheElk801 + */ +public class HierophantsChalice extends CardImpl { + + public HierophantsChalice(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + // When Hierophant's Chalice enters the battlefield, target opponent loses 1 life and you gain 1 life. + Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(1), false); + ability.addEffect(new GainLifeEffect(1).setText("and you gain one life.")); + Target target = new TargetOpponent(); + ability.addTarget(target); + this.addAbility(ability); + + // {t}: Add {c} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + } + + public HierophantsChalice(final HierophantsChalice card) { + super(card); + } + + @Override + public HierophantsChalice copy() { + return new HierophantsChalice(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HighPriestOfPenance.java b/Mage.Sets/src/mage/cards/h/HighPriestOfPenance.java index cce5342043..6f50c18ff6 100644 --- a/Mage.Sets/src/mage/cards/h/HighPriestOfPenance.java +++ b/Mage.Sets/src/mage/cards/h/HighPriestOfPenance.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -49,8 +50,8 @@ public class HighPriestOfPenance extends CardImpl { public HighPriestOfPenance(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HighSentinelsOfArashin.java b/Mage.Sets/src/mage/cards/h/HighSentinelsOfArashin.java index 5cd572221b..454f81cc43 100644 --- a/Mage.Sets/src/mage/cards/h/HighSentinelsOfArashin.java +++ b/Mage.Sets/src/mage/cards/h/HighSentinelsOfArashin.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -63,8 +64,8 @@ public class HighSentinelsOfArashin extends CardImpl { public HighSentinelsOfArashin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HighbornGhoul.java b/Mage.Sets/src/mage/cards/h/HighbornGhoul.java index c11a4aad77..db025dbc05 100644 --- a/Mage.Sets/src/mage/cards/h/HighbornGhoul.java +++ b/Mage.Sets/src/mage/cards/h/HighbornGhoul.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.IntimidateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class HighbornGhoul extends CardImpl { public HighbornGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HighlandBerserker.java b/Mage.Sets/src/mage/cards/h/HighlandBerserker.java index 36192bd3f5..7230e3cb26 100644 --- a/Mage.Sets/src/mage/cards/h/HighlandBerserker.java +++ b/Mage.Sets/src/mage/cards/h/HighlandBerserker.java @@ -58,9 +58,9 @@ public class HighlandBerserker extends CardImpl { public HighlandBerserker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Berserker"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BERSERKER); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HighlandGame.java b/Mage.Sets/src/mage/cards/h/HighlandGame.java index 236284e820..976c0bc3e9 100644 --- a/Mage.Sets/src/mage/cards/h/HighlandGame.java +++ b/Mage.Sets/src/mage/cards/h/HighlandGame.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class HighlandGame extends CardImpl { public HighlandGame(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elk"); + this.subtype.add(SubType.ELK); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HighlandGiant.java b/Mage.Sets/src/mage/cards/h/HighlandGiant.java index 8d51737796..446c86a4b3 100644 --- a/Mage.Sets/src/mage/cards/h/HighlandGiant.java +++ b/Mage.Sets/src/mage/cards/h/HighlandGiant.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class HighlandGiant extends CardImpl { public HighlandGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HighspireArtisan.java b/Mage.Sets/src/mage/cards/h/HighspireArtisan.java index 66e6bc48fd..18a2753930 100644 --- a/Mage.Sets/src/mage/cards/h/HighspireArtisan.java +++ b/Mage.Sets/src/mage/cards/h/HighspireArtisan.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class HighspireArtisan extends CardImpl { public HighspireArtisan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HighspireMantis.java b/Mage.Sets/src/mage/cards/h/HighspireMantis.java index 6927c07606..49bf7ad424 100644 --- a/Mage.Sets/src/mage/cards/h/HighspireMantis.java +++ b/Mage.Sets/src/mage/cards/h/HighspireMantis.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class HighspireMantis extends CardImpl { public HighspireMantis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{W}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HightideHermit.java b/Mage.Sets/src/mage/cards/h/HightideHermit.java index 877c2984e3..dd259147c7 100644 --- a/Mage.Sets/src/mage/cards/h/HightideHermit.java +++ b/Mage.Sets/src/mage/cards/h/HightideHermit.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class HightideHermit extends CardImpl { public HightideHermit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Crab"); + this.subtype.add(SubType.CRAB); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HighwayRobber.java b/Mage.Sets/src/mage/cards/h/HighwayRobber.java index 2bc28c7dc4..1cffc4f4a6 100644 --- a/Mage.Sets/src/mage/cards/h/HighwayRobber.java +++ b/Mage.Sets/src/mage/cards/h/HighwayRobber.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetOpponent; /** @@ -46,8 +47,8 @@ public class HighwayRobber extends CardImpl { public HighwayRobber(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HigureTheStillWind.java b/Mage.Sets/src/mage/cards/h/HigureTheStillWind.java index cce7fc6090..04ed7cd866 100644 --- a/Mage.Sets/src/mage/cards/h/HigureTheStillWind.java +++ b/Mage.Sets/src/mage/cards/h/HigureTheStillWind.java @@ -65,8 +65,8 @@ public class HigureTheStillWind extends CardImpl { public HigureTheStillWind(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Ninja"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NINJA); addSuperType(SuperType.LEGENDARY); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HikariTwilightGuardian.java b/Mage.Sets/src/mage/cards/h/HikariTwilightGuardian.java index 88410ff715..9ab00f0348 100644 --- a/Mage.Sets/src/mage/cards/h/HikariTwilightGuardian.java +++ b/Mage.Sets/src/mage/cards/h/HikariTwilightGuardian.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.StaticFilters; @@ -48,7 +49,7 @@ public class HikariTwilightGuardian extends CardImpl { public HikariTwilightGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HillGiant.java b/Mage.Sets/src/mage/cards/h/HillGiant.java index 441fc13599..b133585a89 100644 --- a/Mage.Sets/src/mage/cards/h/HillGiant.java +++ b/Mage.Sets/src/mage/cards/h/HillGiant.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class HillGiant extends CardImpl { public HillGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HillcomberGiant.java b/Mage.Sets/src/mage/cards/h/HillcomberGiant.java index b299ad6629..04133437de 100644 --- a/Mage.Sets/src/mage/cards/h/HillcomberGiant.java +++ b/Mage.Sets/src/mage/cards/h/HillcomberGiant.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class HillcomberGiant extends CardImpl { public HillcomberGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Giant"); - this.subtype.add("Scout"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HinterlandDrake.java b/Mage.Sets/src/mage/cards/h/HinterlandDrake.java index 6cc40c4dde..3caafdb4fd 100644 --- a/Mage.Sets/src/mage/cards/h/HinterlandDrake.java +++ b/Mage.Sets/src/mage/cards/h/HinterlandDrake.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -48,7 +49,7 @@ public class HinterlandDrake extends CardImpl { public HinterlandDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HinterlandHarbor.java b/Mage.Sets/src/mage/cards/h/HinterlandHarbor.java index ab412ebbad..62aaa79382 100644 --- a/Mage.Sets/src/mage/cards/h/HinterlandHarbor.java +++ b/Mage.Sets/src/mage/cards/h/HinterlandHarbor.java @@ -24,8 +24,7 @@ * 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.cards.h; import mage.abilities.common.EntersBattlefieldAbility; @@ -58,10 +57,10 @@ public class HinterlandHarbor extends CardImpl { } public HinterlandHarbor(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); - String abilityText = "tapped unless you control a Forest or an Island"; + String abilityText = " tapped unless you control a Forest or an Island"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new GreenManaAbility()); this.addAbility(new BlueManaAbility()); diff --git a/Mage.Sets/src/mage/cards/h/HinterlandHermit.java b/Mage.Sets/src/mage/cards/h/HinterlandHermit.java index 475d0b42c2..f4db5cdc9f 100644 --- a/Mage.Sets/src/mage/cards/h/HinterlandHermit.java +++ b/Mage.Sets/src/mage/cards/h/HinterlandHermit.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -48,8 +49,8 @@ public class HinterlandHermit extends CardImpl { public HinterlandHermit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WEREWOLF); this.transformable = true; this.secondSideCardClazz = HinterlandScourge.class; diff --git a/Mage.Sets/src/mage/cards/h/HinterlandLogger.java b/Mage.Sets/src/mage/cards/h/HinterlandLogger.java index 352bcf668d..6737ae18bd 100644 --- a/Mage.Sets/src/mage/cards/h/HinterlandLogger.java +++ b/Mage.Sets/src/mage/cards/h/HinterlandLogger.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.t.TimberShredder; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -49,8 +50,8 @@ public class HinterlandLogger extends CardImpl { public HinterlandLogger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HinterlandScourge.java b/Mage.Sets/src/mage/cards/h/HinterlandScourge.java index d4dfb492a6..3cdac983f4 100644 --- a/Mage.Sets/src/mage/cards/h/HinterlandScourge.java +++ b/Mage.Sets/src/mage/cards/h/HinterlandScourge.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class HinterlandScourge extends CardImpl { public HinterlandScourge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.color.setRed(true); // this card is the second face of double-faced card of Hinterland Hermit diff --git a/Mage.Sets/src/mage/cards/h/HiredMuscle.java b/Mage.Sets/src/mage/cards/h/HiredMuscle.java index 16e95ee688..d1de460eff 100644 --- a/Mage.Sets/src/mage/cards/h/HiredMuscle.java +++ b/Mage.Sets/src/mage/cards/h/HiredMuscle.java @@ -43,6 +43,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class HiredMuscle extends CardImpl { public HiredMuscle(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -95,7 +96,7 @@ class Scarmaker extends Token { addSuperType(SuperType.LEGENDARY); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); power = new MageInt(4); toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HiredTorturer.java b/Mage.Sets/src/mage/cards/h/HiredTorturer.java index 31b8fd0576..2fa36a930b 100644 --- a/Mage.Sets/src/mage/cards/h/HiredTorturer.java +++ b/Mage.Sets/src/mage/cards/h/HiredTorturer.java @@ -42,6 +42,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -58,8 +59,8 @@ public class HiredTorturer extends CardImpl { public HiredTorturer (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HisokaMinamoSensei.java b/Mage.Sets/src/mage/cards/h/HisokaMinamoSensei.java index 753af9c0a2..7ba8e94c27 100644 --- a/Mage.Sets/src/mage/cards/h/HisokaMinamoSensei.java +++ b/Mage.Sets/src/mage/cards/h/HisokaMinamoSensei.java @@ -40,6 +40,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -58,8 +59,8 @@ public class HisokaMinamoSensei extends CardImpl { public HisokaMinamoSensei(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HisokasGuard.java b/Mage.Sets/src/mage/cards/h/HisokasGuard.java index 5f37bc0ed5..ace3a16599 100644 --- a/Mage.Sets/src/mage/cards/h/HisokasGuard.java +++ b/Mage.Sets/src/mage/cards/h/HisokasGuard.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -59,8 +60,8 @@ public class HisokasGuard extends CardImpl { public HisokasGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HissingIguanar.java b/Mage.Sets/src/mage/cards/h/HissingIguanar.java index 416d57ed7f..fcc909a103 100644 --- a/Mage.Sets/src/mage/cards/h/HissingIguanar.java +++ b/Mage.Sets/src/mage/cards/h/HissingIguanar.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -44,7 +45,7 @@ public class HissingIguanar extends CardImpl { public HissingIguanar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HissingQuagmire.java b/Mage.Sets/src/mage/cards/h/HissingQuagmire.java index ab631b852d..1b9b123d88 100644 --- a/Mage.Sets/src/mage/cards/h/HissingQuagmire.java +++ b/Mage.Sets/src/mage/cards/h/HissingQuagmire.java @@ -40,6 +40,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -81,7 +82,7 @@ class HissingQuagmireToken extends Token { public HissingQuagmireToken() { super("", "2/2 black and green Elemental creature with deathtouch"); cardType.add(CardType.CREATURE); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); color.setBlack(true); color.setGreen(true); power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HitchclawRecluse.java b/Mage.Sets/src/mage/cards/h/HitchclawRecluse.java index fe807950b1..4fbded4a39 100644 --- a/Mage.Sets/src/mage/cards/h/HitchclawRecluse.java +++ b/Mage.Sets/src/mage/cards/h/HitchclawRecluse.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class HitchclawRecluse extends CardImpl { public HitchclawRecluse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HiveMind.java b/Mage.Sets/src/mage/cards/h/HiveMind.java index d0694c3801..6b3a7c0b79 100644 --- a/Mage.Sets/src/mage/cards/h/HiveMind.java +++ b/Mage.Sets/src/mage/cards/h/HiveMind.java @@ -41,6 +41,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.stack.Spell; import mage.players.Player; +import mage.players.PlayerList; import mage.target.targetpointer.FixedTarget; /** @@ -50,7 +51,7 @@ import mage.target.targetpointer.FixedTarget; public class HiveMind extends CardImpl { public HiveMind(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{5}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{5}{U}"); // Whenever a player casts an instant or sorcery spell, each other player copies that spell. Each of those players may choose new targets for his or her copy. this.addAbility(new HiveMindTriggeredAbility()); @@ -125,15 +126,12 @@ class HiveMindEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Spell spell; - spell = game.getStack().getSpell(((FixedTarget) getTargetPointer()).getTarget()); - if (spell == null) { // if spell e.g. was countered - spell = (Spell) game.getLastKnownInformation(((FixedTarget) getTargetPointer()).getTarget(), Zone.STACK); - } + Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source)); Player player = game.getPlayer(source.getControllerId()); if (spell != null && player != null) { - for (UUID playerId : game.getState().getPlayersInRange(player.getId(), game)) { - if (!playerId.equals(spell.getControllerId())) { + PlayerList range = game.getState().getPlayersInRange(player.getId(), game); + for (UUID playerId : game.getState().getPlayerList(spell.getControllerId())) { + if (!playerId.equals(spell.getControllerId()) && range.contains(playerId)) { spell.createCopyOnStack(game, source, playerId, true); } } diff --git a/Mage.Sets/src/mage/cards/h/HivisOfTheScale.java b/Mage.Sets/src/mage/cards/h/HivisOfTheScale.java index ce04f521de..74e8546c33 100644 --- a/Mage.Sets/src/mage/cards/h/HivisOfTheScale.java +++ b/Mage.Sets/src/mage/cards/h/HivisOfTheScale.java @@ -1,100 +1,100 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.common.SkipUntapOptionalAbility; -import mage.abilities.condition.Condition; -import mage.abilities.condition.common.SourceMatchesFilterCondition; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.continuous.GainControlTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.constants.SuperType; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.filter.FilterPermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.filter.predicate.permanent.ControllerPredicate; -import mage.filter.predicate.permanent.TappedPredicate; -import mage.target.TargetPermanent; - -/** - * - * @author jeffwadsworth - */ -public class HivisOfTheScale extends CardImpl { - - private static final FilterPermanent filter = new FilterPermanent(); - private static final FilterPermanent filterDragon = new FilterPermanent(); - private static final String rule = "Gain control of target Dragon for as long as you control Hivis and Hivis remains tapped."; - - static { - filter.add(new TappedPredicate()); - filter.add(new ControllerPredicate(TargetController.YOU)); - filterDragon.add(new SubtypePredicate(SubType.DRAGON)); - } - - public HivisOfTheScale(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); - - addSuperType(SuperType.LEGENDARY); - this.subtype.add("Viashino"); - this.subtype.add("Shaman"); - this.power = new MageInt(3); - this.toughness = new MageInt(4); - - // You may choose not to untap Hivis of the Scale during your untap step. - this.addAbility(new SkipUntapOptionalAbility()); - - // {tap}: Gain control of target Dragon for as long as you control Hivis and Hivis remains tapped. - Condition condition = new SourceMatchesFilterCondition(filter); - Effect effect = new ConditionalContinuousEffect(new GainControlTargetEffect(Duration.Custom), condition, rule); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); - ability.addTarget(new TargetPermanent(filterDragon)); - this.addAbility(ability); - - } - - public HivisOfTheScale(final HivisOfTheScale card) { - super(card); - } - - @Override - public HivisOfTheScale copy() { - return new HivisOfTheScale(this); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SkipUntapOptionalAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.SourceMatchesFilterCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.TargetPermanent; + +/** + * + * @author jeffwadsworth + */ +public class HivisOfTheScale extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent(); + private static final FilterPermanent filterDragon = new FilterPermanent(); + private static final String rule = "Gain control of target Dragon for as long as you control Hivis and Hivis remains tapped."; + + static { + filter.add(new TappedPredicate()); + filter.add(new ControllerPredicate(TargetController.YOU)); + filterDragon.add(new SubtypePredicate(SubType.DRAGON)); + } + + public HivisOfTheScale(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.SHAMAN); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // You may choose not to untap Hivis of the Scale during your untap step. + this.addAbility(new SkipUntapOptionalAbility()); + + // {tap}: Gain control of target Dragon for as long as you control Hivis and Hivis remains tapped. + Condition condition = new SourceMatchesFilterCondition(filter); + Effect effect = new ConditionalContinuousEffect(new GainControlTargetEffect(Duration.Custom), condition, rule); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); + ability.addTarget(new TargetPermanent(filterDragon)); + this.addAbility(ability); + + } + + public HivisOfTheScale(final HivisOfTheScale card) { + super(card); + } + + @Override + public HivisOfTheScale copy() { + return new HivisOfTheScale(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HixusPrisonWarden.java b/Mage.Sets/src/mage/cards/h/HixusPrisonWarden.java index acc15a42fd..6ac2db3717 100644 --- a/Mage.Sets/src/mage/cards/h/HixusPrisonWarden.java +++ b/Mage.Sets/src/mage/cards/h/HixusPrisonWarden.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class HixusPrisonWarden extends CardImpl { public HixusPrisonWarden(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HoarShade.java b/Mage.Sets/src/mage/cards/h/HoarShade.java index 0fef257f87..7bc5a3f623 100644 --- a/Mage.Sets/src/mage/cards/h/HoarShade.java +++ b/Mage.Sets/src/mage/cards/h/HoarShade.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class HoarShade extends CardImpl { public HoarShade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Shade"); + this.subtype.add(SubType.SHADE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HoardSmelterDragon.java b/Mage.Sets/src/mage/cards/h/HoardSmelterDragon.java index 451284ff09..ca9cd332f0 100644 --- a/Mage.Sets/src/mage/cards/h/HoardSmelterDragon.java +++ b/Mage.Sets/src/mage/cards/h/HoardSmelterDragon.java @@ -59,7 +59,7 @@ public class HoardSmelterDragon extends CardImpl { public HoardSmelterDragon (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HoardingDragon.java b/Mage.Sets/src/mage/cards/h/HoardingDragon.java index 6f378c83f1..c56d42c4a1 100644 --- a/Mage.Sets/src/mage/cards/h/HoardingDragon.java +++ b/Mage.Sets/src/mage/cards/h/HoardingDragon.java @@ -41,6 +41,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterArtifactCard; @@ -58,7 +59,7 @@ public class HoardingDragon extends CardImpl { public HoardingDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/Hobble.java b/Mage.Sets/src/mage/cards/h/Hobble.java index 5057a3e611..0104168f21 100644 --- a/Mage.Sets/src/mage/cards/h/Hobble.java +++ b/Mage.Sets/src/mage/cards/h/Hobble.java @@ -44,6 +44,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -57,7 +58,7 @@ public class Hobble extends CardImpl { public Hobble(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/h/HobgoblinDragoon.java b/Mage.Sets/src/mage/cards/h/HobgoblinDragoon.java index 5bb6413996..353efe87bc 100644 --- a/Mage.Sets/src/mage/cards/h/HobgoblinDragoon.java +++ b/Mage.Sets/src/mage/cards/h/HobgoblinDragoon.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class HobgoblinDragoon extends CardImpl { public HobgoblinDragoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R/W}"); - this.subtype.add("Goblin"); - this.subtype.add("Knight"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HokoriDustDrinker.java b/Mage.Sets/src/mage/cards/h/HokoriDustDrinker.java index 28d3293b11..14e6a8121f 100644 --- a/Mage.Sets/src/mage/cards/h/HokoriDustDrinker.java +++ b/Mage.Sets/src/mage/cards/h/HokoriDustDrinker.java @@ -54,7 +54,7 @@ public class HokoriDustDrinker extends CardImpl { public HokoriDustDrinker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HollowDogs.java b/Mage.Sets/src/mage/cards/h/HollowDogs.java index bb3ae7f230..8adcf12e9a 100644 --- a/Mage.Sets/src/mage/cards/h/HollowDogs.java +++ b/Mage.Sets/src/mage/cards/h/HollowDogs.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,8 +45,8 @@ public class HollowDogs extends CardImpl { public HollowDogs(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Hound"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HOUND); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HollowOne.java b/Mage.Sets/src/mage/cards/h/HollowOne.java index 8c994f38b6..3232b89925 100644 --- a/Mage.Sets/src/mage/cards/h/HollowOne.java +++ b/Mage.Sets/src/mage/cards/h/HollowOne.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.CostModificationType; import mage.constants.Duration; import mage.constants.Outcome; @@ -57,7 +58,7 @@ public class HollowOne extends CardImpl { public HollowOne(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HollowSpecter.java b/Mage.Sets/src/mage/cards/h/HollowSpecter.java index 48d7f0e356..009c4da276 100644 --- a/Mage.Sets/src/mage/cards/h/HollowSpecter.java +++ b/Mage.Sets/src/mage/cards/h/HollowSpecter.java @@ -42,6 +42,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -58,7 +59,7 @@ public class HollowSpecter extends CardImpl { public HollowSpecter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); - this.subtype.add("Specter"); + this.subtype.add(SubType.SPECTER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HollowbornBarghest.java b/Mage.Sets/src/mage/cards/h/HollowbornBarghest.java index 596b88e39a..5fe56f264d 100644 --- a/Mage.Sets/src/mage/cards/h/HollowbornBarghest.java +++ b/Mage.Sets/src/mage/cards/h/HollowbornBarghest.java @@ -40,6 +40,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.TargetController; @@ -59,8 +60,8 @@ public class HollowbornBarghest extends CardImpl { public HollowbornBarghest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}"); - this.subtype.add("Demon"); - this.subtype.add("Hound"); + this.subtype.add(SubType.DEMON); + this.subtype.add(SubType.HOUND); this.power = new MageInt(7); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/h/HollowhengeBeast.java b/Mage.Sets/src/mage/cards/h/HollowhengeBeast.java index 7765ed017d..9820d32aa7 100644 --- a/Mage.Sets/src/mage/cards/h/HollowhengeBeast.java +++ b/Mage.Sets/src/mage/cards/h/HollowhengeBeast.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class HollowhengeBeast extends CardImpl { public HollowhengeBeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HollowhengeScavenger.java b/Mage.Sets/src/mage/cards/h/HollowhengeScavenger.java index da8c333aac..c1c715273a 100644 --- a/Mage.Sets/src/mage/cards/h/HollowhengeScavenger.java +++ b/Mage.Sets/src/mage/cards/h/HollowhengeScavenger.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -49,7 +50,7 @@ public class HollowhengeScavenger extends CardImpl { public HollowhengeScavenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); this.color.setGreen(true); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HollowhengeSpirit.java b/Mage.Sets/src/mage/cards/h/HollowhengeSpirit.java index c11b3ea54c..33edf02712 100644 --- a/Mage.Sets/src/mage/cards/h/HollowhengeSpirit.java +++ b/Mage.Sets/src/mage/cards/h/HollowhengeSpirit.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.Target; import mage.target.common.TargetAttackingOrBlockingCreature; @@ -48,7 +49,7 @@ public class HollowhengeSpirit extends CardImpl { public HollowhengeSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/Hollowsage.java b/Mage.Sets/src/mage/cards/h/Hollowsage.java index 3db14c2ede..8a8196fdbf 100644 --- a/Mage.Sets/src/mage/cards/h/Hollowsage.java +++ b/Mage.Sets/src/mage/cards/h/Hollowsage.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -50,8 +51,8 @@ public class Hollowsage extends CardImpl { public Hollowsage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HolyArmor.java b/Mage.Sets/src/mage/cards/h/HolyArmor.java index b8ba0fad30..f9d6b09ff7 100644 --- a/Mage.Sets/src/mage/cards/h/HolyArmor.java +++ b/Mage.Sets/src/mage/cards/h/HolyArmor.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Outcome; @@ -53,7 +54,7 @@ public class HolyArmor extends CardImpl { public HolyArmor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/h/HolyJusticiar.java b/Mage.Sets/src/mage/cards/h/HolyJusticiar.java index 156ab4628f..61192dfa63 100644 --- a/Mage.Sets/src/mage/cards/h/HolyJusticiar.java +++ b/Mage.Sets/src/mage/cards/h/HolyJusticiar.java @@ -52,8 +52,8 @@ public class HolyJusticiar extends CardImpl { public HolyJusticiar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HolyMantle.java b/Mage.Sets/src/mage/cards/h/HolyMantle.java index 8273414f7f..5eeabc68ee 100644 --- a/Mage.Sets/src/mage/cards/h/HolyMantle.java +++ b/Mage.Sets/src/mage/cards/h/HolyMantle.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class HolyMantle extends CardImpl { public HolyMantle(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/h/HolyStrength.java b/Mage.Sets/src/mage/cards/h/HolyStrength.java index 1e424c371b..18c755ad89 100644 --- a/Mage.Sets/src/mage/cards/h/HolyStrength.java +++ b/Mage.Sets/src/mage/cards/h/HolyStrength.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class HolyStrength extends CardImpl { public HolyStrength(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/cards/h/Homarid.java b/Mage.Sets/src/mage/cards/h/Homarid.java index 098c2aeba5..039243ea54 100644 --- a/Mage.Sets/src/mage/cards/h/Homarid.java +++ b/Mage.Sets/src/mage/cards/h/Homarid.java @@ -43,6 +43,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class Homarid extends CardImpl { public Homarid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Homarid"); + this.subtype.add(SubType.HOMARID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HomaridShaman.java b/Mage.Sets/src/mage/cards/h/HomaridShaman.java index 338de316f6..d6e1581088 100644 --- a/Mage.Sets/src/mage/cards/h/HomaridShaman.java +++ b/Mage.Sets/src/mage/cards/h/HomaridShaman.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -56,8 +57,8 @@ public class HomaridShaman extends CardImpl { public HomaridShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Homarid"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HOMARID); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HomaridWarrior.java b/Mage.Sets/src/mage/cards/h/HomaridWarrior.java index 251ab096e1..7f57bfd64c 100644 --- a/Mage.Sets/src/mage/cards/h/HomaridWarrior.java +++ b/Mage.Sets/src/mage/cards/h/HomaridWarrior.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class HomaridWarrior extends CardImpl { public HomaridWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Homarid"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HOMARID); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HomicidalBrute.java b/Mage.Sets/src/mage/cards/h/HomicidalBrute.java index 52505746ca..f8810aa4ed 100644 --- a/Mage.Sets/src/mage/cards/h/HomicidalBrute.java +++ b/Mage.Sets/src/mage/cards/h/HomicidalBrute.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.TransformSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -48,8 +49,8 @@ public class HomicidalBrute extends CardImpl { public HomicidalBrute(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Human"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MUTANT); // this card is the second face of double-faced card this.nightCard = true; diff --git a/Mage.Sets/src/mage/cards/h/HomingSliver.java b/Mage.Sets/src/mage/cards/h/HomingSliver.java index 1c789daa13..31b2223080 100644 --- a/Mage.Sets/src/mage/cards/h/HomingSliver.java +++ b/Mage.Sets/src/mage/cards/h/HomingSliver.java @@ -59,7 +59,7 @@ public class HomingSliver extends CardImpl { public HomingSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HomuraHumanAscendant.java b/Mage.Sets/src/mage/cards/h/HomuraHumanAscendant.java index 8500fdeaa5..78ab35045f 100644 --- a/Mage.Sets/src/mage/cards/h/HomuraHumanAscendant.java +++ b/Mage.Sets/src/mage/cards/h/HomuraHumanAscendant.java @@ -64,8 +64,8 @@ public class HomuraHumanAscendant extends CardImpl { public HomuraHumanAscendant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HonedKhopesh.java b/Mage.Sets/src/mage/cards/h/HonedKhopesh.java index 58d3114165..7e3e99134d 100644 --- a/Mage.Sets/src/mage/cards/h/HonedKhopesh.java +++ b/Mage.Sets/src/mage/cards/h/HonedKhopesh.java @@ -1,67 +1,68 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.common.continuous.BoostEquippedEffect; -import mage.abilities.keyword.EquipAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; - -/** - * - * @author Styxo - */ -public class HonedKhopesh extends CardImpl { - - public HonedKhopesh(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); - - this.subtype.add("Equipment"); - - // Equipped creature gets +1/+1. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); - - // Equip {1} - this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1))); - } - - public HonedKhopesh(final HonedKhopesh card) { - super(card); - } - - @Override - public HonedKhopesh copy() { - return new HonedKhopesh(this); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; + +/** + * + * @author Styxo + */ +public class HonedKhopesh extends CardImpl { + + public HonedKhopesh(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); + + this.subtype.add(SubType.EQUIPMENT); + + // Equipped creature gets +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); + + // Equip {1} + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1))); + } + + public HonedKhopesh(final HonedKhopesh card) { + super(card); + } + + @Override + public HonedKhopesh copy() { + return new HonedKhopesh(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HonorGuard.java b/Mage.Sets/src/mage/cards/h/HonorGuard.java index 4d0f86db62..aedfd9c76d 100644 --- a/Mage.Sets/src/mage/cards/h/HonorGuard.java +++ b/Mage.Sets/src/mage/cards/h/HonorGuard.java @@ -44,8 +44,8 @@ public class HonorGuard extends CardImpl { public HonorGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HonorableScout.java b/Mage.Sets/src/mage/cards/h/HonorableScout.java index ad6caa70d9..3322c3b816 100644 --- a/Mage.Sets/src/mage/cards/h/HonorableScout.java +++ b/Mage.Sets/src/mage/cards/h/HonorableScout.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -56,9 +57,9 @@ public class HonorableScout extends CardImpl { public HonorableScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HonoredCropCaptain.java b/Mage.Sets/src/mage/cards/h/HonoredCropCaptain.java index a948ede332..c7272a8891 100644 --- a/Mage.Sets/src/mage/cards/h/HonoredCropCaptain.java +++ b/Mage.Sets/src/mage/cards/h/HonoredCropCaptain.java @@ -1,67 +1,68 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.AttacksTriggeredAbility; -import mage.abilities.effects.common.continuous.BoostAllEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.filter.common.FilterAttackingCreature; - -/** - * - * @author Styxo - */ -public class HonoredCropCaptain extends CardImpl { - - public HonoredCropCaptain(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{W}"); - - this.subtype.add("Human"); - this.subtype.add("Warrior"); - this.power = new MageInt(3); - this.toughness = new MageInt(2); - - // Whenever Honored Crop-Captain attacks, other attacking creatures get +1/+0 until end of turn. - this.addAbility(new AttacksTriggeredAbility(new BoostAllEffect(1, 0, Duration.EndOfTurn, new FilterAttackingCreature(), true), false)); - - } - - public HonoredCropCaptain(final HonoredCropCaptain card) { - super(card); - } - - @Override - public HonoredCropCaptain copy() { - return new HonoredCropCaptain(this); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.filter.common.FilterAttackingCreature; + +/** + * + * @author Styxo + */ +public class HonoredCropCaptain extends CardImpl { + + public HonoredCropCaptain(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Whenever Honored Crop-Captain attacks, other attacking creatures get +1/+0 until end of turn. + this.addAbility(new AttacksTriggeredAbility(new BoostAllEffect(1, 0, Duration.EndOfTurn, new FilterAttackingCreature(), true), false)); + + } + + public HonoredCropCaptain(final HonoredCropCaptain card) { + super(card); + } + + @Override + public HonoredCropCaptain copy() { + return new HonoredCropCaptain(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HonoredHierarch.java b/Mage.Sets/src/mage/cards/h/HonoredHierarch.java index ada60bb291..4cf11658bb 100644 --- a/Mage.Sets/src/mage/cards/h/HonoredHierarch.java +++ b/Mage.Sets/src/mage/cards/h/HonoredHierarch.java @@ -41,6 +41,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -52,8 +53,8 @@ public class HonoredHierarch extends CardImpl { public HonoredHierarch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HonoredHydra.java b/Mage.Sets/src/mage/cards/h/HonoredHydra.java index b0c220e552..5df7ccd53f 100644 --- a/Mage.Sets/src/mage/cards/h/HonoredHydra.java +++ b/Mage.Sets/src/mage/cards/h/HonoredHydra.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class HonoredHydra extends CardImpl { public HonoredHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}"); - this.subtype.add("Snake"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/h/HoodedAssassin.java b/Mage.Sets/src/mage/cards/h/HoodedAssassin.java index 0da61fca3d..f594604cb9 100644 --- a/Mage.Sets/src/mage/cards/h/HoodedAssassin.java +++ b/Mage.Sets/src/mage/cards/h/HoodedAssassin.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.WasDealtDamageThisTurnPredicate; @@ -56,8 +57,8 @@ public class HoodedAssassin extends CardImpl { public HoodedAssassin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HoodedBrawler.java b/Mage.Sets/src/mage/cards/h/HoodedBrawler.java index b23dab8929..cc37fb0d04 100644 --- a/Mage.Sets/src/mage/cards/h/HoodedBrawler.java +++ b/Mage.Sets/src/mage/cards/h/HoodedBrawler.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ExertAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,8 +47,8 @@ public class HoodedBrawler extends CardImpl { public HoodedBrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Naga"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HoodedHorror.java b/Mage.Sets/src/mage/cards/h/HoodedHorror.java index 3be8a40567..f8123791b2 100644 --- a/Mage.Sets/src/mage/cards/h/HoodedHorror.java +++ b/Mage.Sets/src/mage/cards/h/HoodedHorror.java @@ -35,6 +35,7 @@ import mage.abilities.effects.RestrictionEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; @@ -49,7 +50,7 @@ public class HoodedHorror extends CardImpl { public HoodedHorror(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HoodedHydra.java b/Mage.Sets/src/mage/cards/h/HoodedHydra.java index 0d7477c459..bb64d54256 100644 --- a/Mage.Sets/src/mage/cards/h/HoodedHydra.java +++ b/Mage.Sets/src/mage/cards/h/HoodedHydra.java @@ -44,6 +44,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.permanent.token.SnakeToken; @@ -56,8 +57,8 @@ public class HoodedHydra extends CardImpl { public HoodedHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{X}{G}{G}"); - this.subtype.add("Snake"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/h/HoodedKavu.java b/Mage.Sets/src/mage/cards/h/HoodedKavu.java index d4dddede1b..b120c0d394 100644 --- a/Mage.Sets/src/mage/cards/h/HoodedKavu.java +++ b/Mage.Sets/src/mage/cards/h/HoodedKavu.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class HoodedKavu extends CardImpl { public HoodedKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HoofSkulkin.java b/Mage.Sets/src/mage/cards/h/HoofSkulkin.java index d9d9905e5e..e29bc1abf0 100644 --- a/Mage.Sets/src/mage/cards/h/HoofSkulkin.java +++ b/Mage.Sets/src/mage/cards/h/HoofSkulkin.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -56,7 +57,7 @@ public class HoofSkulkin extends CardImpl { public HoofSkulkin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HoofprintsOfTheStag.java b/Mage.Sets/src/mage/cards/h/HoofprintsOfTheStag.java index dd1e4d8468..3328b5dcc6 100644 --- a/Mage.Sets/src/mage/cards/h/HoofprintsOfTheStag.java +++ b/Mage.Sets/src/mage/cards/h/HoofprintsOfTheStag.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.permanent.token.WhiteElementalToken; @@ -51,7 +52,7 @@ public class HoofprintsOfTheStag extends CardImpl { public HoofprintsOfTheStag(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.ENCHANTMENT}, "{1}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); // Whenever you draw a card, you may put a hoofprint counter on Hoofprints of the Stag. this.addAbility(new DrawCardControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.HOOFPRINT.createInstance(1)), true)); diff --git a/Mage.Sets/src/mage/cards/h/HootingMandrills.java b/Mage.Sets/src/mage/cards/h/HootingMandrills.java index b09ef33b26..f8635f3897 100644 --- a/Mage.Sets/src/mage/cards/h/HootingMandrills.java +++ b/Mage.Sets/src/mage/cards/h/HootingMandrills.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class HootingMandrills extends CardImpl { public HootingMandrills(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Ape"); + this.subtype.add(SubType.APE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HopeAgainstHope.java b/Mage.Sets/src/mage/cards/h/HopeAgainstHope.java index c883b8cd08..d06fa08ab1 100644 --- a/Mage.Sets/src/mage/cards/h/HopeAgainstHope.java +++ b/Mage.Sets/src/mage/cards/h/HopeAgainstHope.java @@ -52,7 +52,7 @@ public class HopeAgainstHope extends CardImpl { public HopeAgainstHope(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java b/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java index 9dcc7bfffc..9bfc1de65a 100644 --- a/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java +++ b/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java @@ -44,11 +44,14 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.filter.FilterPlayer; -import mage.filter.predicate.Predicate; +import mage.filter.predicate.ObjectSourcePlayer; +import mage.filter.predicate.ObjectSourcePlayerPredicate; import mage.game.Game; import mage.game.events.DamagedPlayerEvent; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; +import mage.game.stack.StackAbility; +import mage.game.stack.StackObject; import mage.players.Player; import mage.target.TargetPlayer; import mage.watchers.Watcher; @@ -59,11 +62,17 @@ import mage.watchers.Watcher; */ public class HopeOfGhirapur extends CardImpl { + private static final FilterPlayer filter = new FilterPlayer("player who was dealt combat damage by {this} this turn"); + + static { + filter.add(new HopeOfGhirapurPlayerLostLifePredicate()); + } + public HopeOfGhirapur(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Thopter"); + this.subtype.add(SubType.THOPTER); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -72,25 +81,8 @@ public class HopeOfGhirapur extends CardImpl { // Sacrifice Hope of Ghirapur: Until your next turn, target player who was dealt combat damage by Hope of Ghirapur this turn can't cast noncreature spells. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HopeOfGhirapurCantCastEffect(), new SacrificeSourceCost()); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayer(1, 1, false, filter)); this.addAbility(ability, new HopeOfGhirapurCombatDamageWatcher()); - - } - - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability instanceof SimpleActivatedAbility) { - if (!ability.getEffects().isEmpty() && (ability.getEffects().get(0) instanceof HopeOfGhirapurCantCastEffect)) { - MageObject sourceObject = ability.getSourceObject(game); - if (sourceObject != null) { - ability.getTargets().clear(); - FilterPlayer playerFilter = new FilterPlayer("player who was dealt combat damage by " + sourceObject.getIdName() + " this turn"); - MageObjectReference sourceReference = new MageObjectReference(ability.getSourceId(), ability.getSourceObjectZoneChangeCounter(), game); - playerFilter.add(new HopeOfGhirapurPlayerLostLifePredicate(sourceReference)); - ability.addTarget(new TargetPlayer(1, 1, false, playerFilter)); - } - } - } } public HopeOfGhirapur(final HopeOfGhirapur card) { @@ -126,7 +118,7 @@ class HopeOfGhirapurCantCastEffect extends ContinuousRuleModifyingEffectImpl { @Override public String getInfoMessage(Ability source, GameEvent event, Game game) { - MageObject mageObject = game.getObject(source.getSourceId()); + MageObject mageObject = source.getSourceObject(game); if (mageObject != null) { return "You can't cast noncreature spells this turn (you were dealt damage by " + mageObject.getLogName() + ')'; } @@ -151,19 +143,20 @@ class HopeOfGhirapurCantCastEffect extends ContinuousRuleModifyingEffectImpl { } } -class HopeOfGhirapurPlayerLostLifePredicate implements Predicate { +class HopeOfGhirapurPlayerLostLifePredicate implements ObjectSourcePlayerPredicate> { - private final MageObjectReference sourceReference; - - public HopeOfGhirapurPlayerLostLifePredicate(MageObjectReference sourceReference) { - this.sourceReference = sourceReference; + public HopeOfGhirapurPlayerLostLifePredicate() { } @Override - public boolean apply(Player input, Game game) { + public boolean apply(ObjectSourcePlayer input, Game game) { + Player targetPlayer = input.getObject(); + if (targetPlayer == null) { + return false; + } HopeOfGhirapurCombatDamageWatcher watcher = (HopeOfGhirapurCombatDamageWatcher) game.getState().getWatchers().get(HopeOfGhirapurCombatDamageWatcher.class.getSimpleName()); if (watcher != null) { - return watcher.playerGotCombatDamage(sourceReference, input.getId()); + return watcher.playerGotCombatDamage(input.getSourceId(), input.getObject().getId(), game); } return false; } @@ -179,10 +172,10 @@ class HopeOfGhirapurCombatDamageWatcher extends Watcher { public HopeOfGhirapurCombatDamageWatcher(final HopeOfGhirapurCombatDamageWatcher watcher) { super(watcher); - for (MageObjectReference sourceReference : watcher.combatDamagedPlayers.keySet()) { + for (MageObjectReference damager : watcher.combatDamagedPlayers.keySet()) { Set players = new HashSet<>(); - players.addAll(watcher.combatDamagedPlayers.get(sourceReference)); - this.combatDamagedPlayers.put(sourceReference, players); + players.addAll(watcher.combatDamagedPlayers.get(damager)); + this.combatDamagedPlayers.put(damager, players); } } @@ -194,29 +187,37 @@ class HopeOfGhirapurCombatDamageWatcher extends Watcher { @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.DAMAGED_PLAYER && ((DamagedPlayerEvent) event).isCombatDamage()) { - MageObjectReference sourceReference = new MageObjectReference(event.getSourceId(), game); + MageObjectReference damager = new MageObjectReference(event.getSourceId(), game); Set players; - if (combatDamagedPlayers.containsKey(sourceReference)) { - players = combatDamagedPlayers.get(sourceReference); + if (combatDamagedPlayers.containsKey(damager)) { + players = combatDamagedPlayers.get(damager); } else { players = new HashSet<>(); - combatDamagedPlayers.put(sourceReference, players); + combatDamagedPlayers.put(damager, players); } players.add(event.getTargetId()); } } /** - * Checks if the current object has damaged the player during - * the current turn. + * Checks if the current object has damaged the player during the current + * turn. * - * @param objectReference + * @param objectId * @param playerId * @return */ - public boolean playerGotCombatDamage(MageObjectReference objectReference, UUID playerId) { - if (combatDamagedPlayers.containsKey(objectReference)) { - return combatDamagedPlayers.get(objectReference).contains(playerId); + public boolean playerGotCombatDamage(UUID objectId, UUID playerId, Game game) { + StackObject stackObject = game.getState().getStack().getStackObject(objectId); + MageObjectReference mor; + if (stackObject != null && stackObject instanceof StackAbility) { + // This is neccessary because the source object was sacrificed as cost and the correct zone change counter for target calid check can only be get from stack + mor = new MageObjectReference(objectId, ((StackAbility) stackObject).getSourceObjectZoneChangeCounter(), game); + } else { + mor = new MageObjectReference(objectId, game); + } + if (combatDamagedPlayers.containsKey(mor)) { + return combatDamagedPlayers.get(mor).contains(playerId); } return false; } diff --git a/Mage.Sets/src/mage/cards/h/HopeTender.java b/Mage.Sets/src/mage/cards/h/HopeTender.java index 492fb58d25..b859754e53 100644 --- a/Mage.Sets/src/mage/cards/h/HopeTender.java +++ b/Mage.Sets/src/mage/cards/h/HopeTender.java @@ -1,80 +1,81 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ExertSourceCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.common.UntapTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.target.common.TargetLandPermanent; - -/** - * - * @author ciaccona007 - */ -public class HopeTender extends CardImpl { - - public HopeTender(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - - this.subtype.add("Human"); - this.subtype.add("Druid"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // {1}, {T}: Untap target land. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new GenericManaCost(1)); - ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetLandPermanent()); - this.addAbility(ability); - - // {1}, {T}, Exert Hope Tender: Untap two target lands. - ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new GenericManaCost(1)); - ability.addCost(new TapSourceCost()); - ability.addCost(new ExertSourceCost()); - ability.addTarget(new TargetLandPermanent(2)); - addAbility(ability); - } - - public HopeTender(final HopeTender card) { - super(card); - } - - @Override - public HopeTender copy() { - return new HopeTender(this); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExertSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author ciaccona007 + */ +public class HopeTender extends CardImpl { + + public HopeTender(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {1}, {T}: Untap target land. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new GenericManaCost(1)); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetLandPermanent()); + this.addAbility(ability); + + // {1}, {T}, Exert Hope Tender: Untap two target lands. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new GenericManaCost(1)); + ability.addCost(new TapSourceCost()); + ability.addCost(new ExertSourceCost()); + ability.addTarget(new TargetLandPermanent(2)); + addAbility(ability); + } + + public HopeTender(final HopeTender card) { + super(card); + } + + @Override + public HopeTender copy() { + return new HopeTender(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HopefulEidolon.java b/Mage.Sets/src/mage/cards/h/HopefulEidolon.java index b04f96902c..47b5660390 100644 --- a/Mage.Sets/src/mage/cards/h/HopefulEidolon.java +++ b/Mage.Sets/src/mage/cards/h/HopefulEidolon.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class HopefulEidolon extends CardImpl { public HopefulEidolon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HoppingAutomaton.java b/Mage.Sets/src/mage/cards/h/HoppingAutomaton.java new file mode 100644 index 0000000000..952ed10227 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HoppingAutomaton.java @@ -0,0 +1,76 @@ +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; + +/** + * + * @author TheElk801 + */ +public class HoppingAutomaton extends CardImpl { + + public HoppingAutomaton(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); + + this.subtype.add(SubType.CONSTRUCT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {0}: Hopping Automaton gets -1/-1 and gains flying until end of turn. + Effect effect = new BoostSourceEffect(-1, -1, Duration.EndOfTurn); + effect.setText("{this} gets -1/-1"); + Ability ability = new SimpleActivatedAbility(effect, new ManaCostsImpl("{0}")); + effect = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains flying until end of turn"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public HoppingAutomaton(final HoppingAutomaton card) { + super(card); + } + + @Override + public HoppingAutomaton copy() { + return new HoppingAutomaton(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HordeAmbusher.java b/Mage.Sets/src/mage/cards/h/HordeAmbusher.java index cab3183468..707b73e3ab 100644 --- a/Mage.Sets/src/mage/cards/h/HordeAmbusher.java +++ b/Mage.Sets/src/mage/cards/h/HordeAmbusher.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ColorPredicate; @@ -60,8 +61,8 @@ public class HordeAmbusher extends CardImpl { public HordeAmbusher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HordeOfBoggarts.java b/Mage.Sets/src/mage/cards/h/HordeOfBoggarts.java index 9aead0aa2c..06d1816e65 100644 --- a/Mage.Sets/src/mage/cards/h/HordeOfBoggarts.java +++ b/Mage.Sets/src/mage/cards/h/HordeOfBoggarts.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -56,7 +57,7 @@ public class HordeOfBoggarts extends CardImpl { public HordeOfBoggarts(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/h/HordeOfNotions.java b/Mage.Sets/src/mage/cards/h/HordeOfNotions.java index 5a3ecb9b6d..641dcf7b2f 100644 --- a/Mage.Sets/src/mage/cards/h/HordeOfNotions.java +++ b/Mage.Sets/src/mage/cards/h/HordeOfNotions.java @@ -61,7 +61,7 @@ public class HordeOfNotions extends CardImpl { public HordeOfNotions(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HorizonChimera.java b/Mage.Sets/src/mage/cards/h/HorizonChimera.java index 4ea775cff8..3138b5911b 100644 --- a/Mage.Sets/src/mage/cards/h/HorizonChimera.java +++ b/Mage.Sets/src/mage/cards/h/HorizonChimera.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class HorizonChimera extends CardImpl { public HorizonChimera(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{U}"); - this.subtype.add("Chimera"); + this.subtype.add(SubType.CHIMERA); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HorizonDrake.java b/Mage.Sets/src/mage/cards/h/HorizonDrake.java index 5fa586a074..aca5dd5a84 100644 --- a/Mage.Sets/src/mage/cards/h/HorizonDrake.java +++ b/Mage.Sets/src/mage/cards/h/HorizonDrake.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterLandCard; /** @@ -46,7 +47,7 @@ public class HorizonDrake extends CardImpl { public HorizonDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HorizonScholar.java b/Mage.Sets/src/mage/cards/h/HorizonScholar.java index 951c15da06..fbdf144838 100644 --- a/Mage.Sets/src/mage/cards/h/HorizonScholar.java +++ b/Mage.Sets/src/mage/cards/h/HorizonScholar.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class HorizonScholar extends CardImpl { public HorizonScholar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HorizonSeed.java b/Mage.Sets/src/mage/cards/h/HorizonSeed.java index d3b8f3f08e..59db17dfdd 100644 --- a/Mage.Sets/src/mage/cards/h/HorizonSeed.java +++ b/Mage.Sets/src/mage/cards/h/HorizonSeed.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.RegenerateTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetCreaturePermanent; @@ -46,7 +47,7 @@ public class HorizonSeed extends CardImpl { public HorizonSeed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HornedCheetah.java b/Mage.Sets/src/mage/cards/h/HornedCheetah.java index f676767a8d..d2fe43df2a 100644 --- a/Mage.Sets/src/mage/cards/h/HornedCheetah.java +++ b/Mage.Sets/src/mage/cards/h/HornedCheetah.java @@ -33,6 +33,7 @@ import mage.abilities.common.DealsDamageGainLifeSourceTriggeredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class HornedCheetah extends CardImpl { public HornedCheetah(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{W}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HornedHelm.java b/Mage.Sets/src/mage/cards/h/HornedHelm.java index 5845e67aba..53003f2bba 100644 --- a/Mage.Sets/src/mage/cards/h/HornedHelm.java +++ b/Mage.Sets/src/mage/cards/h/HornedHelm.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -55,7 +56,7 @@ public class HornedHelm extends CardImpl { public HornedHelm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1 and has trample. Effect effect = new BoostEquippedEffect(1, 1); diff --git a/Mage.Sets/src/mage/cards/h/HornedKavu.java b/Mage.Sets/src/mage/cards/h/HornedKavu.java index 486c8020f1..a570ed90d8 100644 --- a/Mage.Sets/src/mage/cards/h/HornedKavu.java +++ b/Mage.Sets/src/mage/cards/h/HornedKavu.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -54,7 +55,7 @@ public class HornedKavu extends CardImpl { public HornedKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HornedSliver.java b/Mage.Sets/src/mage/cards/h/HornedSliver.java index 8fd5d08c11..076e6b6772 100644 --- a/Mage.Sets/src/mage/cards/h/HornedSliver.java +++ b/Mage.Sets/src/mage/cards/h/HornedSliver.java @@ -54,7 +54,7 @@ public class HornedSliver extends CardImpl { public HornedSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HornedTroll.java b/Mage.Sets/src/mage/cards/h/HornedTroll.java index 1a261974be..217fbd8469 100644 --- a/Mage.Sets/src/mage/cards/h/HornedTroll.java +++ b/Mage.Sets/src/mage/cards/h/HornedTroll.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class HornedTroll extends CardImpl { public HornedTroll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Troll"); + this.subtype.add(SubType.TROLL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HornedTurtle.java b/Mage.Sets/src/mage/cards/h/HornedTurtle.java index cc6f13f6bf..fde62036d4 100644 --- a/Mage.Sets/src/mage/cards/h/HornedTurtle.java +++ b/Mage.Sets/src/mage/cards/h/HornedTurtle.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -42,7 +43,7 @@ public class HornedTurtle extends CardImpl { public HornedTurtle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Turtle"); + this.subtype.add(SubType.TURTLE); this.power = new MageInt(1); this.toughness = new MageInt(4); } diff --git a/Mage.Sets/src/mage/cards/h/HornetCobra.java b/Mage.Sets/src/mage/cards/h/HornetCobra.java index 17a1edf780..c8b1a5c2d2 100644 --- a/Mage.Sets/src/mage/cards/h/HornetCobra.java +++ b/Mage.Sets/src/mage/cards/h/HornetCobra.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class HornetCobra extends CardImpl { public HornetCobra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HornetHarasser.java b/Mage.Sets/src/mage/cards/h/HornetHarasser.java index 3372ec9e72..49ea178ecb 100644 --- a/Mage.Sets/src/mage/cards/h/HornetHarasser.java +++ b/Mage.Sets/src/mage/cards/h/HornetHarasser.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -46,8 +47,8 @@ public class HornetHarasser extends CardImpl { public HornetHarasser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HornetNest.java b/Mage.Sets/src/mage/cards/h/HornetNest.java index 9665ed4aa8..b8bb917844 100644 --- a/Mage.Sets/src/mage/cards/h/HornetNest.java +++ b/Mage.Sets/src/mage/cards/h/HornetNest.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class HornetNest extends CardImpl { public HornetNest(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(0); this.toughness = new MageInt(2); @@ -59,7 +60,7 @@ public class HornetNest extends CardImpl { // Defender this.addAbility(DefenderAbility.getInstance()); // Whenever Hornet Nest is dealt damage, create that many 1/1 green Insect creature tokens with flying and deathtouch. - this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new HornetNestDealDamageEffect(), false)); + this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new HornetNestDealDamageEffect(), false, false, true)); } public HornetNest(final HornetNest card) { diff --git a/Mage.Sets/src/mage/cards/h/HornetQueen.java b/Mage.Sets/src/mage/cards/h/HornetQueen.java index a4136e6d15..ce7b1baa49 100644 --- a/Mage.Sets/src/mage/cards/h/HornetQueen.java +++ b/Mage.Sets/src/mage/cards/h/HornetQueen.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.HornetQueenInsectToken; /** @@ -46,7 +47,7 @@ public class HornetQueen extends CardImpl { public HornetQueen(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HorobiDeathsWail.java b/Mage.Sets/src/mage/cards/h/HorobiDeathsWail.java index be5cb75965..c827407585 100644 --- a/Mage.Sets/src/mage/cards/h/HorobiDeathsWail.java +++ b/Mage.Sets/src/mage/cards/h/HorobiDeathsWail.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.game.Game; @@ -53,7 +54,7 @@ public class HorobiDeathsWail extends CardImpl { public HorobiDeathsWail(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HorribleHordes.java b/Mage.Sets/src/mage/cards/h/HorribleHordes.java index 814a3892ec..d962ee780c 100644 --- a/Mage.Sets/src/mage/cards/h/HorribleHordes.java +++ b/Mage.Sets/src/mage/cards/h/HorribleHordes.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.RampageAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class HorribleHordes extends CardImpl { public HorribleHordes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HorrorOfTheBrokenLands.java b/Mage.Sets/src/mage/cards/h/HorrorOfTheBrokenLands.java index 413a3030c8..9a13928397 100644 --- a/Mage.Sets/src/mage/cards/h/HorrorOfTheBrokenLands.java +++ b/Mage.Sets/src/mage/cards/h/HorrorOfTheBrokenLands.java @@ -1,70 +1,71 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.CycleOrDiscardControllerTriggeredAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.abilities.keyword.CyclingAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; - -/** - * - * @author Styxo - */ -public class HorrorOfTheBrokenLands extends CardImpl { - - public HorrorOfTheBrokenLands(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); - - this.subtype.add("Horror"); - this.power = new MageInt(4); - this.toughness = new MageInt(4); - - // Whenever you cycle or discard another card, Horror of the Broken Lands gets +2/+1 until end of turn. - this.addAbility(new CycleOrDiscardControllerTriggeredAbility(new BoostSourceEffect(2, 1, Duration.EndOfTurn))); - - // Cycling {B} - this.addAbility(new CyclingAbility(new ManaCostsImpl("{B}"))); - - } - - public HorrorOfTheBrokenLands(final HorrorOfTheBrokenLands card) { - super(card); - } - - @Override - public HorrorOfTheBrokenLands copy() { - return new HorrorOfTheBrokenLands(this); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CycleOrDiscardControllerTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.CyclingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; + +/** + * + * @author Styxo + */ +public class HorrorOfTheBrokenLands extends CardImpl { + + public HorrorOfTheBrokenLands(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); + + this.subtype.add(SubType.HORROR); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Whenever you cycle or discard another card, Horror of the Broken Lands gets +2/+1 until end of turn. + this.addAbility(new CycleOrDiscardControllerTriggeredAbility(new BoostSourceEffect(2, 1, Duration.EndOfTurn))); + + // Cycling {B} + this.addAbility(new CyclingAbility(new ManaCostsImpl("{B}"))); + + } + + public HorrorOfTheBrokenLands(final HorrorOfTheBrokenLands card) { + super(card); + } + + @Override + public HorrorOfTheBrokenLands copy() { + return new HorrorOfTheBrokenLands(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HorrorOfTheDim.java b/Mage.Sets/src/mage/cards/h/HorrorOfTheDim.java index a85a0f84d8..4030ea9a99 100644 --- a/Mage.Sets/src/mage/cards/h/HorrorOfTheDim.java +++ b/Mage.Sets/src/mage/cards/h/HorrorOfTheDim.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class HorrorOfTheDim extends CardImpl { public HorrorOfTheDim(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HorseshoeCrab.java b/Mage.Sets/src/mage/cards/h/HorseshoeCrab.java index 521ba264af..378404f074 100644 --- a/Mage.Sets/src/mage/cards/h/HorseshoeCrab.java +++ b/Mage.Sets/src/mage/cards/h/HorseshoeCrab.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class HorseshoeCrab extends CardImpl { public HorseshoeCrab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Crab"); + this.subtype.add(SubType.CRAB); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HostageTaker.java b/Mage.Sets/src/mage/cards/h/HostageTaker.java new file mode 100644 index 0000000000..92605814ab --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HostageTaker.java @@ -0,0 +1,226 @@ +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.delayed.OnLeaveReturnExiledToBattlefieldAbility; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.AsThoughManaEffect; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AsThoughEffectType; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.ManaType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.ManaPoolItem; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.target.targetpointer.FixedTarget; +import mage.util.CardUtil; + +/** + * + * @author TheElk801 + */ +public class HostageTaker extends CardImpl { + + private final static FilterPermanent filter = new FilterPermanent("another target artifact or creature"); + + static { + filter.add(new AnotherPredicate()); + filter.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.CREATURE))); + } + + public HostageTaker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // When Hostage Taker enters the battlefield, exile another target artifact or creature until Hostage Taker leaves the battlefield. You may cast that card as long as it remains exiled, and you may spend mana as though it were mana of any type to cast that spell. + Ability ability = new EntersBattlefieldTriggeredAbility(new HostageTakerExileEffect(filter.getMessage())); + ability.addTarget(new TargetPermanent(filter)); + ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility())); + this.addAbility(ability); + } + + public HostageTaker(final HostageTaker card) { + super(card); + } + + @Override + public HostageTaker copy() { + return new HostageTaker(this); + } +} + +class HostageTakerExileEffect extends OneShotEffect { + + public HostageTakerExileEffect(String targetName) { + super(Outcome.Benefit); + this.staticText = "exile another target artifact or creature until {this} leaves the battlefield. " + + "You may cast that card as long as it remains exiled, " + + "and you may spend mana as though it were mana of any type to cast that spell"; + } + + public HostageTakerExileEffect(final HostageTakerExileEffect effect) { + super(effect); + } + + @Override + public HostageTakerExileEffect copy() { + return new HostageTakerExileEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent card = game.getPermanent(targetPointer.getFirst(game, source)); + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null && card != null) { + Player controller = game.getPlayer(card.getControllerId()); + if (controller != null) { + // move card to exile + UUID exileId = CardUtil.getCardExileZoneId(game, source); + controller.moveCardToExileWithInfo(card, exileId, permanent.getIdName(), source.getSourceId(), game, Zone.BATTLEFIELD, true); + // allow to cast the card + ContinuousEffect effect = new HostageTakerCastFromExileEffect(); + effect.setTargetPointer(new FixedTarget(card.getId())); + game.addEffect(effect, source); + // and you may spend mana as though it were mana of any color to cast it + effect = new HostageTakerSpendAnyManaEffect(); + effect.setTargetPointer(new FixedTarget(card.getId())); + game.addEffect(effect, source); + } + } + return false; + } +} + +class HostageTakerCastFromExileEffect extends AsThoughEffectImpl { + + public HostageTakerCastFromExileEffect() { + super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit); + staticText = "You may cast that card for as long as it remains exiled, and you may spend mana as though it were mana of any color to cast that spell"; + } + + public HostageTakerCastFromExileEffect(final HostageTakerCastFromExileEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public HostageTakerCastFromExileEffect copy() { + return new HostageTakerCastFromExileEffect(this); + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + if (objectId.equals(getTargetPointer().getFirst(game, source))) { + if (affectedControllerId.equals(source.getControllerId())) { + return true; + } + } else { + if (((FixedTarget) getTargetPointer()).getTarget().equals(objectId)) { + // object has moved zone so effect can be discarted + this.discard(); + } + } + return false; + } +} + +class HostageTakerSpendAnyManaEffect extends AsThoughEffectImpl implements AsThoughManaEffect { + + public HostageTakerSpendAnyManaEffect() { + super(AsThoughEffectType.SPEND_OTHER_MANA, Duration.Custom, Outcome.Benefit); + staticText = "you may spend mana as though it were mana of any color to cast it"; + } + + public HostageTakerSpendAnyManaEffect(final HostageTakerSpendAnyManaEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public HostageTakerSpendAnyManaEffect copy() { + return new HostageTakerSpendAnyManaEffect(this); + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + if (objectId.equals(((FixedTarget) getTargetPointer()).getTarget()) + && game.getState().getZoneChangeCounter(objectId) <= ((FixedTarget) getTargetPointer()).getZoneChangeCounter() + 1) { + + if (affectedControllerId.equals(source.getControllerId())) { + // if the card moved from exile to spell the zone change counter is increased by 1 + if (game.getState().getZoneChangeCounter(objectId) == ((FixedTarget) getTargetPointer()).getZoneChangeCounter() + 1) { + return true; + } + } + + } else { + if (((FixedTarget) getTargetPointer()).getTarget().equals(objectId)) { + // object has moved zone so effect can be discarted + this.discard(); + } + } + return false; + } + + @Override + public ManaType getAsThoughManaType(ManaType manaType, ManaPoolItem mana, UUID affectedControllerId, Ability source, Game game) { + return mana.getFirstAvailable(); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HostileDesert.java b/Mage.Sets/src/mage/cards/h/HostileDesert.java index ad3baa98a3..5b6155a5da 100644 --- a/Mage.Sets/src/mage/cards/h/HostileDesert.java +++ b/Mage.Sets/src/mage/cards/h/HostileDesert.java @@ -1,85 +1,86 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ExileFromGraveCost; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; -import mage.abilities.mana.ColorlessManaAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.filter.common.FilterLandCard; -import mage.game.permanent.token.Token; -import mage.target.common.TargetCardInYourGraveyard; - -/** - * - * @author ciaccona007 - */ -public class HostileDesert extends CardImpl { - - public HostileDesert(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - - this.subtype.add("Desert"); - - // {T}: Add {C} to your mana pool. - addAbility(new ColorlessManaAbility()); - // {2}, Exile a land card from your graveyard: Hostile Desert becomes a 3/4 Elemental creature until end of turn. It's still a land. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new HostileDesertToken(), "land", Duration.EndOfTurn), new GenericManaCost(2)); - ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterLandCard("land card from your graveyard")))); - addAbility(ability); - } - - public HostileDesert(final HostileDesert card) { - super(card); - } - - @Override - public HostileDesert copy() { - return new HostileDesert(this); - } -} - -class HostileDesertToken extends Token { - - public HostileDesertToken() { - super("", "3/4 elemental creature"); - cardType.add(CardType.CREATURE); - subtype.add("Elemental"); - power = new MageInt(3); - toughness = new MageInt(4); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileFromGraveCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterLandCard; +import mage.game.permanent.token.Token; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author ciaccona007 + */ +public class HostileDesert extends CardImpl { + + public HostileDesert(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + this.subtype.add(SubType.DESERT); + + // {T}: Add {C} to your mana pool. + addAbility(new ColorlessManaAbility()); + // {2}, Exile a land card from your graveyard: Hostile Desert becomes a 3/4 Elemental creature until end of turn. It's still a land. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new HostileDesertToken(), "land", Duration.EndOfTurn), new GenericManaCost(2)); + ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterLandCard("land card from your graveyard")))); + addAbility(ability); + } + + public HostileDesert(final HostileDesert card) { + super(card); + } + + @Override + public HostileDesert copy() { + return new HostileDesert(this); + } +} + +class HostileDesertToken extends Token { + + public HostileDesertToken() { + super("", "3/4 elemental creature"); + cardType.add(CardType.CREATURE); + subtype.add(SubType.ELEMENTAL); + power = new MageInt(3); + toughness = new MageInt(4); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HostileRealm.java b/Mage.Sets/src/mage/cards/h/HostileRealm.java index fede939274..93b72a7471 100644 --- a/Mage.Sets/src/mage/cards/h/HostileRealm.java +++ b/Mage.Sets/src/mage/cards/h/HostileRealm.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class HostileRealm extends CardImpl { public HostileRealm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/h/Hostility.java b/Mage.Sets/src/mage/cards/h/Hostility.java index 24a14ba8ae..75e98069f3 100644 --- a/Mage.Sets/src/mage/cards/h/Hostility.java +++ b/Mage.Sets/src/mage/cards/h/Hostility.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -55,8 +56,8 @@ public class Hostility extends CardImpl { public Hostility(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Incarnation"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.INCARNATION); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/h/HotPursuit.java b/Mage.Sets/src/mage/cards/h/HotPursuit.java index ac4e6bd0de..7cdda72edc 100644 --- a/Mage.Sets/src/mage/cards/h/HotPursuit.java +++ b/Mage.Sets/src/mage/cards/h/HotPursuit.java @@ -1,78 +1,78 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.continuous.BoostOpponentsEffect; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.abilities.keyword.BountyAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.counters.CounterType; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.CounterPredicate; -import mage.target.common.TargetOpponentsCreaturePermanent; - -/** - * - * @author Styxo - */ -public class HotPursuit extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Each creature with a bounty counter on it"); - - static { - filter.add(new CounterPredicate(CounterType.BOUNTY)); - } - - public HotPursuit(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}{R}{G}"); - - // Each creature your opponent's control with a bounty counter on it gets -1/-1. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostOpponentsEffect(-1, -1, Duration.WhileOnBattlefield, filter))); - - // Bounty — Whenever a creature an opponent controls with a bounty counter on it dies, you may put a bounty counter on target creature an opponent controls. - Ability ability = new BountyAbility(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()), true); - ability.addTarget(new TargetOpponentsCreaturePermanent()); - this.addAbility(ability); - } - - public HotPursuit(final HotPursuit card) { - super(card); - } - - @Override - public HotPursuit copy() { - return new HotPursuit(this); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostOpponentsEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.BountyAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.CounterPredicate; +import mage.target.common.TargetOpponentsCreaturePermanent; + +/** + * + * @author Styxo + */ +public class HotPursuit extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Each creature with a bounty counter on it"); + + static { + filter.add(new CounterPredicate(CounterType.BOUNTY)); + } + + public HotPursuit(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}{R}{G}"); + + // Each creature your opponent's control with a bounty counter on it gets -1/-1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostOpponentsEffect(-1, -1, Duration.WhileOnBattlefield, filter))); + + // Bounty — Whenever a creature an opponent controls with a bounty counter on it dies, you may put a bounty counter on target creature an opponent controls. + Ability ability = new BountyAbility(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()), true); + ability.addTarget(new TargetOpponentsCreaturePermanent()); + this.addAbility(ability); + } + + public HotPursuit(final HotPursuit card) { + super(card); + } + + @Override + public HotPursuit copy() { + return new HotPursuit(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HotSoup.java b/Mage.Sets/src/mage/cards/h/HotSoup.java index 41c6a54bc4..149fc23d68 100644 --- a/Mage.Sets/src/mage/cards/h/HotSoup.java +++ b/Mage.Sets/src/mage/cards/h/HotSoup.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class HotSoup extends CardImpl { public HotSoup(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature can't be blocked. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedAttachedEffect(AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/h/HotSprings.java b/Mage.Sets/src/mage/cards/h/HotSprings.java index c04010e5a7..03b392d8b3 100644 --- a/Mage.Sets/src/mage/cards/h/HotSprings.java +++ b/Mage.Sets/src/mage/cards/h/HotSprings.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class HotSprings extends CardImpl { public HotSprings(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land you control TargetPermanent auraTarget = new TargetPermanent(new FilterControlledLandPermanent()); diff --git a/Mage.Sets/src/mage/cards/h/HotheadedGiant.java b/Mage.Sets/src/mage/cards/h/HotheadedGiant.java index fc6cc5d12f..7b6e2c9a3a 100644 --- a/Mage.Sets/src/mage/cards/h/HotheadedGiant.java +++ b/Mage.Sets/src/mage/cards/h/HotheadedGiant.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.WatcherScope; import mage.counters.CounterType; import mage.filter.FilterSpell; @@ -58,8 +59,8 @@ public class HotheadedGiant extends CardImpl { public HotheadedGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HoundOfGriselbrand.java b/Mage.Sets/src/mage/cards/h/HoundOfGriselbrand.java index 75acdb04f1..ddd9b57afc 100644 --- a/Mage.Sets/src/mage/cards/h/HoundOfGriselbrand.java +++ b/Mage.Sets/src/mage/cards/h/HoundOfGriselbrand.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.UndyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class HoundOfGriselbrand extends CardImpl { public HoundOfGriselbrand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Hound"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.HOUND); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HoundOfTheFarbogs.java b/Mage.Sets/src/mage/cards/h/HoundOfTheFarbogs.java index c1ecf30c9b..71772a177c 100644 --- a/Mage.Sets/src/mage/cards/h/HoundOfTheFarbogs.java +++ b/Mage.Sets/src/mage/cards/h/HoundOfTheFarbogs.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -52,8 +53,8 @@ public class HoundOfTheFarbogs extends CardImpl { public HoundOfTheFarbogs(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Hound"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HOUND); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HourOfDevastation.java b/Mage.Sets/src/mage/cards/h/HourOfDevastation.java index 2a041ccfee..a232c91702 100644 --- a/Mage.Sets/src/mage/cards/h/HourOfDevastation.java +++ b/Mage.Sets/src/mage/cards/h/HourOfDevastation.java @@ -1,82 +1,82 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.DamageAllEffect; -import mage.abilities.effects.common.continuous.LoseAbilityAllEffect; -import mage.abilities.keyword.IndestructibleAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.filter.FilterPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.filter.predicate.mageobject.SubtypePredicate; - -/** - * - * @author ciaccona007 - */ -public class HourOfDevastation extends CardImpl { - - private static FilterPermanent filter = new FilterPermanent("creature and each non-Bolas planeswalker"); - - static { - filter.add(Predicates.or( - new CardTypePredicate(CardType.CREATURE), - Predicates.and( - new CardTypePredicate(CardType.PLANESWALKER), - Predicates.not(new SubtypePredicate(SubType.BOLAS))))); - } - - public HourOfDevastation(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); - - // All creatures lose indestructible until end of turn. - Effect effect = new LoseAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn); - effect.setText("All creatures lose indestructible until end of turn"); - getSpellAbility().addEffect(effect); - - //Hour of Devastation deals 5 damage to each creature and each non-Bolas planeswalker. - getSpellAbility().addEffect(new DamageAllEffect(5, filter)); - - } - - public HourOfDevastation(final HourOfDevastation card) { - super(card); - } - - @Override - public HourOfDevastation copy() { - return new HourOfDevastation(this); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.effects.common.continuous.LoseAbilityAllEffect; +import mage.abilities.keyword.IndestructibleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author ciaccona007 + */ +public class HourOfDevastation extends CardImpl { + + private static FilterPermanent filter = new FilterPermanent("creature and each non-Bolas planeswalker"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.CREATURE), + Predicates.and( + new CardTypePredicate(CardType.PLANESWALKER), + Predicates.not(new SubtypePredicate(SubType.BOLAS))))); + } + + public HourOfDevastation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); + + // All creatures lose indestructible until end of turn. + Effect effect = new LoseAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn); + effect.setText("All creatures lose indestructible until end of turn"); + getSpellAbility().addEffect(effect); + + //Hour of Devastation deals 5 damage to each creature and each non-Bolas planeswalker. + getSpellAbility().addEffect(new DamageAllEffect(5, filter)); + + } + + public HourOfDevastation(final HourOfDevastation card) { + super(card); + } + + @Override + public HourOfDevastation copy() { + return new HourOfDevastation(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HourOfEternity.java b/Mage.Sets/src/mage/cards/h/HourOfEternity.java index b17f9b8189..51c6c012fe 100644 --- a/Mage.Sets/src/mage/cards/h/HourOfEternity.java +++ b/Mage.Sets/src/mage/cards/h/HourOfEternity.java @@ -1,117 +1,131 @@ -/* - * 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.cards.h; - -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; -import mage.ObjectColor; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.common.FilterCreatureCard; -import mage.game.Game; -import mage.game.permanent.token.EmptyToken; -import mage.players.Player; -import mage.target.common.TargetCardInYourGraveyard; -import mage.util.CardUtil; - -/** - * - * @author emerald000 - */ -public class HourOfEternity extends CardImpl { - - public HourOfEternity(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{U}{U}{U}"); - - // Exile X target creature cards from your graveyard. For each card exiled this way, create a token that's a copy of that card, except it's a 4/4 black Zombie. - this.getSpellAbility().addEffect(new HourOfEternityEffect()); - this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, Integer.MAX_VALUE, new FilterCreatureCard("creature cards from your graveyard"))); - } - - public HourOfEternity(final HourOfEternity card) { - super(card); - } - - @Override - public HourOfEternity copy() { - return new HourOfEternity(this); - } -} - -class HourOfEternityEffect extends OneShotEffect { - - HourOfEternityEffect() { - super(Outcome.PutCreatureInPlay); - this.staticText = "Exile X target creature cards from your graveyard. For each card exiled this way, create a token that's a copy of that card, except it's a 4/4 black Zombie"; - } - - HourOfEternityEffect(final HourOfEternityEffect effect) { - super(effect); - } - - @Override - public HourOfEternityEffect copy() { - return new HourOfEternityEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Set cardsToExile = new HashSet<>(this.getTargetPointer().getTargets(game, source).size()); - for (UUID targetId : this.getTargetPointer().getTargets(game, source)) { - Card card = controller.getGraveyard().get(targetId, game); - if (card != null) { - cardsToExile.add(card); - } - } - controller.moveCardsToExile(cardsToExile, source, game, true, null, ""); - for (Card card : cardsToExile) { - if (game.getState().getZone(card.getId()) == Zone.EXILED) { - EmptyToken token = new EmptyToken(); - CardUtil.copyTo(token).from(card); - token.getPower().modifyBaseValue(4); - token.getToughness().modifyBaseValue(4); - token.getColor(game).setColor(ObjectColor.BLACK); - token.getSubtype(game).clear(); - token.getSubtype(game).add("Zombie"); - token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); - } - } - return true; - } - return false; - } -} +/* + * 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.cards.h; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.game.Game; +import mage.game.permanent.token.EmptyToken; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCardInYourGraveyard; +import mage.util.CardUtil; + +/** + * + * @author emerald000 + */ +public class HourOfEternity extends CardImpl { + + public HourOfEternity(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{U}{U}{U}"); + + // Exile X target creature cards from your graveyard. For each card exiled this way, create a token that's a copy of that card, except it's a 4/4 black Zombie. + this.getSpellAbility().addEffect(new HourOfEternityEffect()); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, Integer.MAX_VALUE, new FilterCreatureCard("creature cards from your graveyard"))); + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability instanceof SpellAbility) { + ability.getTargets().clear(); + int xValue = ability.getManaCostsToPay().getX(); + Target target = new TargetCardInYourGraveyard(xValue, new FilterCreatureCard(new StringBuilder(xValue).append(xValue != 1 ? " creature cards" : "creature card").append(" from your graveyard").toString())); + ability.addTarget(target); + } + } + + public HourOfEternity(final HourOfEternity card) { + super(card); + } + + @Override + public HourOfEternity copy() { + return new HourOfEternity(this); + } +} + +class HourOfEternityEffect extends OneShotEffect { + + HourOfEternityEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "Exile X target creature cards from your graveyard. For each card exiled this way, create a token that's a copy of that card, except it's a 4/4 black Zombie"; + } + + HourOfEternityEffect(final HourOfEternityEffect effect) { + super(effect); + } + + @Override + public HourOfEternityEffect copy() { + return new HourOfEternityEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Set cardsToExile = new HashSet<>(this.getTargetPointer().getTargets(game, source).size()); + for (UUID targetId : this.getTargetPointer().getTargets(game, source)) { + Card card = controller.getGraveyard().get(targetId, game); + if (card != null) { + cardsToExile.add(card); + } + } + controller.moveCardsToExile(cardsToExile, source, game, true, null, ""); + for (Card card : cardsToExile) { + if (game.getState().getZone(card.getId()) == Zone.EXILED) { + EmptyToken token = new EmptyToken(); + CardUtil.copyTo(token).from(card); + token.removePTCDA(); + token.getPower().modifyBaseValue(4); + token.getToughness().modifyBaseValue(4); + token.getColor(game).setColor(ObjectColor.BLACK); + token.getSubtype(game).clear(); + token.getSubtype(game).add(SubType.ZOMBIE); + token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/h/HourOfPromise.java b/Mage.Sets/src/mage/cards/h/HourOfPromise.java index 678a446aea..627c8382ac 100644 --- a/Mage.Sets/src/mage/cards/h/HourOfPromise.java +++ b/Mage.Sets/src/mage/cards/h/HourOfPromise.java @@ -1,71 +1,71 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalOneShotEffect; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.ComparisonType; -import mage.constants.SubType; -import mage.filter.FilterPermanent; -import mage.filter.common.FilterLandCard; -import mage.game.permanent.token.ZombieToken; -import mage.target.common.TargetCardInLibrary; - -/** - * - * @author LevelX2 - */ -public class HourOfPromise extends CardImpl { - - public HourOfPromise(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}"); - - // Search your library for up to two land cards and put them onto the battlefield tapped, then shuffle your library. - this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 2, new FilterLandCard("land cards")), true)); - // Then if you control three or more Deserts, create two 2/2 black Zombie creature tokens. - this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new CreateTokenEffect(new ZombieToken(), 2), - new PermanentsOnTheBattlefieldCondition(new FilterPermanent(SubType.DESERT, "three or more Deserts"), ComparisonType.MORE_THAN, 2, true), - "Then if you control three or more Deserts, create two 2/2 black Zombie creature tokens")); - - } - - public HourOfPromise(final HourOfPromise card) { - super(card); - } - - @Override - public HourOfPromise copy() { - return new HourOfPromise(this); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterLandCard; +import mage.game.permanent.token.ZombieToken; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author LevelX2 + */ +public class HourOfPromise extends CardImpl { + + public HourOfPromise(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}"); + + // Search your library for up to two land cards and put them onto the battlefield tapped, then shuffle your library. + this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 2, new FilterLandCard("land cards")), true)); + // Then if you control three or more Deserts, create two 2/2 black Zombie creature tokens. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new CreateTokenEffect(new ZombieToken(), 2), + new PermanentsOnTheBattlefieldCondition(new FilterPermanent(SubType.DESERT, "three or more Deserts"), ComparisonType.MORE_THAN, 2, true), + "Then if you control three or more Deserts, create two 2/2 black Zombie creature tokens")); + + } + + public HourOfPromise(final HourOfPromise card) { + super(card); + } + + @Override + public HourOfPromise copy() { + return new HourOfPromise(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HoverBarrier.java b/Mage.Sets/src/mage/cards/h/HoverBarrier.java index e8d7b444f4..2ba9569e74 100644 --- a/Mage.Sets/src/mage/cards/h/HoverBarrier.java +++ b/Mage.Sets/src/mage/cards/h/HoverBarrier.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class HoverBarrier extends CardImpl { public HoverBarrier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Illusion"); - this.subtype.add("Wall"); + this.subtype.add(SubType.ILLUSION); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/h/HoverguardObserver.java b/Mage.Sets/src/mage/cards/h/HoverguardObserver.java index 0eefbd772d..30b74c4ec8 100644 --- a/Mage.Sets/src/mage/cards/h/HoverguardObserver.java +++ b/Mage.Sets/src/mage/cards/h/HoverguardObserver.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class HoverguardObserver extends CardImpl { public HoverguardObserver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Drone"); + this.subtype.add(SubType.DRONE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HoverguardSweepers.java b/Mage.Sets/src/mage/cards/h/HoverguardSweepers.java index 3297288f47..d484c2e499 100644 --- a/Mage.Sets/src/mage/cards/h/HoverguardSweepers.java +++ b/Mage.Sets/src/mage/cards/h/HoverguardSweepers.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -46,7 +47,7 @@ public class HoverguardSweepers extends CardImpl { public HoverguardSweepers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{U}{U}"); - this.subtype.add("Drone"); + this.subtype.add(SubType.DRONE); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/h/Hovermyr.java b/Mage.Sets/src/mage/cards/h/Hovermyr.java index 3265dcbad0..c6992232c0 100644 --- a/Mage.Sets/src/mage/cards/h/Hovermyr.java +++ b/Mage.Sets/src/mage/cards/h/Hovermyr.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class Hovermyr extends CardImpl { public Hovermyr (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1 ); this.toughness = new MageInt( 2); diff --git a/Mage.Sets/src/mage/cards/h/HowlOfTheHorde.java b/Mage.Sets/src/mage/cards/h/HowlOfTheHorde.java index 5dba37f4c3..d6e46210fa 100644 --- a/Mage.Sets/src/mage/cards/h/HowlOfTheHorde.java +++ b/Mage.Sets/src/mage/cards/h/HowlOfTheHorde.java @@ -77,7 +77,7 @@ public class HowlOfTheHorde extends CardImpl { class HowlOfTheHordeDelayedTriggeredAbility extends DelayedTriggeredAbility { HowlOfTheHordeDelayedTriggeredAbility() { - super(new CopyTargetSpellEffect(), Duration.EndOfTurn); + super(new CopyTargetSpellEffect(true), Duration.EndOfTurn); } HowlOfTheHordeDelayedTriggeredAbility(final HowlOfTheHordeDelayedTriggeredAbility ability) { diff --git a/Mage.Sets/src/mage/cards/h/Howlgeist.java b/Mage.Sets/src/mage/cards/h/Howlgeist.java index 88674c53a0..9f61a24579 100644 --- a/Mage.Sets/src/mage/cards/h/Howlgeist.java +++ b/Mage.Sets/src/mage/cards/h/Howlgeist.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.UndyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class Howlgeist extends CardImpl { public Howlgeist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Spirit"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.WOLF); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HowlingBanshee.java b/Mage.Sets/src/mage/cards/h/HowlingBanshee.java index 1cc07dff50..315dd28093 100644 --- a/Mage.Sets/src/mage/cards/h/HowlingBanshee.java +++ b/Mage.Sets/src/mage/cards/h/HowlingBanshee.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class HowlingBanshee extends CardImpl { public HowlingBanshee(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HowlingChorus.java b/Mage.Sets/src/mage/cards/h/HowlingChorus.java index d7c6b35024..9896474e05 100644 --- a/Mage.Sets/src/mage/cards/h/HowlingChorus.java +++ b/Mage.Sets/src/mage/cards/h/HowlingChorus.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesWithLessPowe import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.EldraziHorrorToken; @@ -47,8 +48,8 @@ public class HowlingChorus extends CardImpl { public HowlingChorus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Eldrazi"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HowlingWolf.java b/Mage.Sets/src/mage/cards/h/HowlingWolf.java index 1207158871..27fd7a098f 100644 --- a/Mage.Sets/src/mage/cards/h/HowlingWolf.java +++ b/Mage.Sets/src/mage/cards/h/HowlingWolf.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.NamePredicate; import mage.target.common.TargetCardInLibrary; @@ -52,7 +53,7 @@ public class HowlingWolf extends CardImpl { public HowlingWolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HowlpackAlpha.java b/Mage.Sets/src/mage/cards/h/HowlpackAlpha.java index 95a7f64955..e48241869c 100644 --- a/Mage.Sets/src/mage/cards/h/HowlpackAlpha.java +++ b/Mage.Sets/src/mage/cards/h/HowlpackAlpha.java @@ -66,7 +66,7 @@ public class HowlpackAlpha extends CardImpl { public HowlpackAlpha(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); // this card is the second face of double-faced card this.nightCard = true; diff --git a/Mage.Sets/src/mage/cards/h/HowlpackOfEstwald.java b/Mage.Sets/src/mage/cards/h/HowlpackOfEstwald.java index d4567552eb..1fdc240c75 100644 --- a/Mage.Sets/src/mage/cards/h/HowlpackOfEstwald.java +++ b/Mage.Sets/src/mage/cards/h/HowlpackOfEstwald.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -47,7 +48,7 @@ public class HowlpackOfEstwald extends CardImpl { public HowlpackOfEstwald(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.color.setGreen(true); // this card is the second face of double-faced card diff --git a/Mage.Sets/src/mage/cards/h/HowlpackWolf.java b/Mage.Sets/src/mage/cards/h/HowlpackWolf.java index e48fee85f2..dda751fd02 100644 --- a/Mage.Sets/src/mage/cards/h/HowlpackWolf.java +++ b/Mage.Sets/src/mage/cards/h/HowlpackWolf.java @@ -56,7 +56,7 @@ public class HowlpackWolf extends CardImpl { public HowlpackWolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HuaTuoHonoredPhysician.java b/Mage.Sets/src/mage/cards/h/HuaTuoHonoredPhysician.java index d2c5394c24..785dcb8ac7 100644 --- a/Mage.Sets/src/mage/cards/h/HuaTuoHonoredPhysician.java +++ b/Mage.Sets/src/mage/cards/h/HuaTuoHonoredPhysician.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.PutOnLibraryTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -51,7 +52,7 @@ public class HuaTuoHonoredPhysician extends CardImpl { public HuaTuoHonoredPhysician(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HuangZhongShuGeneral.java b/Mage.Sets/src/mage/cards/h/HuangZhongShuGeneral.java index 07db4b23c1..d5044c1ce9 100644 --- a/Mage.Sets/src/mage/cards/h/HuangZhongShuGeneral.java +++ b/Mage.Sets/src/mage/cards/h/HuangZhongShuGeneral.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByMoreThanOneSourceEffe import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; @@ -46,8 +47,8 @@ public class HuangZhongShuGeneral extends CardImpl { public HuangZhongShuGeneral(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HuatliDinosaurKnight.java b/Mage.Sets/src/mage/cards/h/HuatliDinosaurKnight.java new file mode 100644 index 0000000000..593d385681 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HuatliDinosaurKnight.java @@ -0,0 +1,101 @@ +/* + * 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.cards.h; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.LoyaltyAbility; +import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; +import mage.abilities.effects.common.DamageWithPowerTargetEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class HuatliDinosaurKnight extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Dinosaur you control"); + private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creature you don't control"); + private static final FilterCreaturePermanent filter3 = new FilterCreaturePermanent("Dinosaurs you control"); + + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + filter.add(new ControllerPredicate(TargetController.YOU)); + filter2.add(new ControllerPredicate(TargetController.NOT_YOU)); + filter3.add(new SubtypePredicate(SubType.DINOSAUR)); + filter3.add(new ControllerPredicate(TargetController.YOU)); + } + + public HuatliDinosaurKnight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{R}{W}"); + + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUATLI); + + this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); + + // +2: Put two +1/+1 counters on up to one target Dinosaur you control. + Ability ability = new LoyaltyAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance(2)) + .setText("Put two +1/+1 counters on up to one target Dinosaur you control."), 2 + ); + ability.addTarget(new TargetCreaturePermanent(0, 1, filter, false)); + this.addAbility(ability); + + // -3: Target Dinosaur you control deals damage equal to its power to target creature you don't control. + ability = new LoyaltyAbility(new DamageWithPowerTargetEffect(), -3); + ability.addTarget(new TargetCreaturePermanent(filter)); + ability.addTarget(new TargetCreaturePermanent(filter2)); + this.addAbility(ability); + + // -7: Dinosaurs you control get +4/+4 until end of turn. + this.addAbility(new LoyaltyAbility(new BoostControlledEffect(4, 4, Duration.EndOfTurn, filter3), -7)); + } + + public HuatliDinosaurKnight(final HuatliDinosaurKnight card) { + super(card); + } + + @Override + public HuatliDinosaurKnight copy() { + return new HuatliDinosaurKnight(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HuatliWarriorPoet.java b/Mage.Sets/src/mage/cards/h/HuatliWarriorPoet.java new file mode 100644 index 0000000000..51fa9e6ecd --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HuatliWarriorPoet.java @@ -0,0 +1,176 @@ +/* + * 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.cards.h; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.LoyaltyAbility; +import mage.abilities.Mode; +import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.PayVariableLoyaltyCost; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.GreatestPowerAmongControlledCreaturesValue; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.combat.CantBlockTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.DinosaurToken; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanentAmount; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public class HuatliWarriorPoet extends CardImpl { + + public HuatliWarriorPoet(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{R}{W}"); + + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUATLI); + + this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); + + // +2: You gain life equal to the greatest power among creatures you control. + this.addAbility(new LoyaltyAbility(new GainLifeEffect(new GreatestPowerAmongControlledCreaturesValue(), "You gain life equal to the greatest power among creatures you control"), 2)); + + // 0: Create a 3/3 green Dinosaur creature token with trample. + this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new DinosaurToken()), 0)); + + // -X: Huatli, Warrior Poet deals X damage divided as you choose among any number of target creatures. Creatures dealt damage this way can't block this turn. + Ability ability = new LoyaltyAbility(new HuatliWarriorPoetDamageEffect(new HuatliXValue())); + ability.addTarget(new TargetCreaturePermanentAmount(new HuatliXValue())); + this.addAbility(ability); + } + + public HuatliWarriorPoet(final HuatliWarriorPoet card) { + super(card); + } + + @Override + public HuatliWarriorPoet copy() { + return new HuatliWarriorPoet(this); + } +} + +class HuatliXValue implements DynamicValue { + + private static final HuatliXValue defaultValue = new HuatliXValue(); + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + for (Cost cost : sourceAbility.getCosts()) { + if (cost instanceof PayVariableLoyaltyCost) { + return ((PayVariableLoyaltyCost) cost).getAmount(); + } + } + return 0; + } + + @Override + public DynamicValue copy() { + return defaultValue; + } + + @Override + public String getMessage() { + return ""; + } + + @Override + public String toString() { + return "X"; + } + + public static HuatliXValue getDefault() { + return defaultValue; + } +} + +class HuatliWarriorPoetDamageEffect extends OneShotEffect { + + protected DynamicValue amount; + + public HuatliWarriorPoetDamageEffect(DynamicValue amount) { + super(Outcome.Damage); + this.amount = amount; + } + + public HuatliWarriorPoetDamageEffect(final HuatliWarriorPoetDamageEffect effect) { + super(effect); + this.amount = effect.amount; + } + + @Override + public HuatliWarriorPoetDamageEffect copy() { + return new HuatliWarriorPoetDamageEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + if (!source.getTargets().isEmpty()) { + Target multiTarget = source.getTargets().get(0); + for (UUID target : multiTarget.getTargets()) { + Permanent permanent = game.getPermanent(target); + if (permanent != null && permanent.damage(multiTarget.getTargetAmount(target), source.getSourceId(), game, false, true) > 0) { + ContinuousEffect effect = new CantBlockTargetEffect(Duration.EndOfTurn); + effect.setTargetPointer(new FixedTarget(permanent, game)); + game.addEffect(effect, source); + } + } + } + return true; + } + + @Override + public String getText(Mode mode) { + if (staticText != null && !staticText.isEmpty()) { + return staticText; + } + return "{source} deals " + + amount.toString() + + " damage divided as you choose among any number of target " + + mode.getTargets().get(0).getTargetName() + + ". Creatures dealt damage this way can't block this turn"; + } +} diff --git a/Mage.Sets/src/mage/cards/h/HuatlisSnubhorn.java b/Mage.Sets/src/mage/cards/h/HuatlisSnubhorn.java new file mode 100644 index 0000000000..74a2c6ea24 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HuatlisSnubhorn.java @@ -0,0 +1,64 @@ +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.constants.SubType; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class HuatlisSnubhorn extends CardImpl { + + public HuatlisSnubhorn(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + } + + public HuatlisSnubhorn(final HuatlisSnubhorn card) { + super(card); + } + + @Override + public HuatlisSnubhorn copy() { + return new HuatlisSnubhorn(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HuatlisSpurring.java b/Mage.Sets/src/mage/cards/h/HuatlisSpurring.java new file mode 100644 index 0000000000..0346ac0dc4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HuatlisSpurring.java @@ -0,0 +1,80 @@ +/* + * 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.cards.h; + +import java.util.UUID; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class HuatlisSpurring extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("a Jace planeswalker"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + filter.add(new CardTypePredicate(CardType.PLANESWALKER)); + filter.add(new SubtypePredicate(SubType.HUATLI)); + } + + public HuatlisSpurring(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}"); + + // Target creature gets +2/+0 until end of turn. If you control a Huatli planeswalker, that creature gets +4/+0 until end of turn instead. + this.getSpellAbility().addEffect(new ConditionalContinuousEffect( + new BoostTargetEffect(4, 0, Duration.EndOfTurn), + new BoostTargetEffect(2, 0, Duration.EndOfTurn), + new PermanentsOnTheBattlefieldCondition(filter), + "Target creature gets +2/+0 until end of turn. If you control a Huatli planeswalker, that creature gets +4/+0 until end of turn instead.")); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public HuatlisSpurring(final HuatlisSpurring card) { + super(card); + } + + @Override + public HuatlisSpurring copy() { + return new HuatlisSpurring(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/Hubris.java b/Mage.Sets/src/mage/cards/h/Hubris.java index 0c8751cc88..cb4cb55983 100644 --- a/Mage.Sets/src/mage/cards/h/Hubris.java +++ b/Mage.Sets/src/mage/cards/h/Hubris.java @@ -52,7 +52,7 @@ import mage.target.common.TargetCreaturePermanent; public class Hubris extends CardImpl { public Hubris(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); // Return target creature and all Auras attached to it to their owners' hand. this.getSpellAbility().addEffect(new HubrisReturnEffect()); @@ -80,7 +80,7 @@ class HubrisReturnEffect extends OneShotEffect { public HubrisReturnEffect() { super(Outcome.Benefit); - this.staticText = "Return target creature and all Auras attached to it to their owners' hand"; + this.staticText = "Return target creature and all Auras attached to it to their owners' hands"; } public HubrisReturnEffect(final HubrisReturnEffect effect) { diff --git a/Mage.Sets/src/mage/cards/h/HulkingCyclops.java b/Mage.Sets/src/mage/cards/h/HulkingCyclops.java index c4ce0271c4..62951a9d66 100644 --- a/Mage.Sets/src/mage/cards/h/HulkingCyclops.java +++ b/Mage.Sets/src/mage/cards/h/HulkingCyclops.java @@ -33,6 +33,7 @@ import mage.abilities.common.CantBlockAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class HulkingCyclops extends CardImpl { public HulkingCyclops(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Cyclops"); + this.subtype.add(SubType.CYCLOPS); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HulkingDevil.java b/Mage.Sets/src/mage/cards/h/HulkingDevil.java index 22671e46a6..fd66e1233d 100644 --- a/Mage.Sets/src/mage/cards/h/HulkingDevil.java +++ b/Mage.Sets/src/mage/cards/h/HulkingDevil.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class HulkingDevil extends CardImpl { public HulkingDevil(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); this.power = new MageInt(5); this.toughness = new MageInt(2); } diff --git a/Mage.Sets/src/mage/cards/h/HulkingGoblin.java b/Mage.Sets/src/mage/cards/h/HulkingGoblin.java index 66cb8e47a1..48ee1ef354 100644 --- a/Mage.Sets/src/mage/cards/h/HulkingGoblin.java +++ b/Mage.Sets/src/mage/cards/h/HulkingGoblin.java @@ -33,6 +33,7 @@ import mage.abilities.common.CantBlockAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class HulkingGoblin extends CardImpl { public HulkingGoblin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HulkingOgre.java b/Mage.Sets/src/mage/cards/h/HulkingOgre.java index c7bd3fc164..741bae28ad 100644 --- a/Mage.Sets/src/mage/cards/h/HulkingOgre.java +++ b/Mage.Sets/src/mage/cards/h/HulkingOgre.java @@ -33,6 +33,7 @@ import mage.abilities.common.CantBlockAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class HulkingOgre extends CardImpl { public HulkingOgre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Ogre"); + this.subtype.add(SubType.OGRE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HumbleBudoka.java b/Mage.Sets/src/mage/cards/h/HumbleBudoka.java index 68b451b6de..5b2bb7d410 100644 --- a/Mage.Sets/src/mage/cards/h/HumbleBudoka.java +++ b/Mage.Sets/src/mage/cards/h/HumbleBudoka.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class HumbleBudoka extends CardImpl { public HumbleBudoka (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HumbleDefector.java b/Mage.Sets/src/mage/cards/h/HumbleDefector.java index 3f716ac0b2..afe4c94d86 100644 --- a/Mage.Sets/src/mage/cards/h/HumbleDefector.java +++ b/Mage.Sets/src/mage/cards/h/HumbleDefector.java @@ -39,6 +39,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -57,8 +58,8 @@ public class HumbleDefector extends CardImpl { public HumbleDefector(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HumblerOfMortals.java b/Mage.Sets/src/mage/cards/h/HumblerOfMortals.java index 325c66ae54..aa74a0e010 100644 --- a/Mage.Sets/src/mage/cards/h/HumblerOfMortals.java +++ b/Mage.Sets/src/mage/cards/h/HumblerOfMortals.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterControlledCreaturePermanent; @@ -46,7 +47,7 @@ public class HumblerOfMortals extends CardImpl { public HumblerOfMortals(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HundingGjornersen.java b/Mage.Sets/src/mage/cards/h/HundingGjornersen.java index 06ddf2f22d..0b6a422451 100644 --- a/Mage.Sets/src/mage/cards/h/HundingGjornersen.java +++ b/Mage.Sets/src/mage/cards/h/HundingGjornersen.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.RampageAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -44,8 +45,8 @@ public class HundingGjornersen extends CardImpl { public HundingGjornersen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HundredHandedOne.java b/Mage.Sets/src/mage/cards/h/HundredHandedOne.java index 8b41af1bbc..aae18886d6 100644 --- a/Mage.Sets/src/mage/cards/h/HundredHandedOne.java +++ b/Mage.Sets/src/mage/cards/h/HundredHandedOne.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class HundredHandedOne extends CardImpl { public HundredHandedOne(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HundredTalonKami.java b/Mage.Sets/src/mage/cards/h/HundredTalonKami.java index 1cf574779e..693459cb0b 100644 --- a/Mage.Sets/src/mage/cards/h/HundredTalonKami.java +++ b/Mage.Sets/src/mage/cards/h/HundredTalonKami.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class HundredTalonKami extends CardImpl { public HundredTalonKami (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/Hundroog.java b/Mage.Sets/src/mage/cards/h/Hundroog.java index 24851f6a31..dae333666d 100644 --- a/Mage.Sets/src/mage/cards/h/Hundroog.java +++ b/Mage.Sets/src/mage/cards/h/Hundroog.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class Hundroog extends CardImpl { public Hundroog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/h/HungeringYeti.java b/Mage.Sets/src/mage/cards/h/HungeringYeti.java index 56377610f5..7851f64d3c 100644 --- a/Mage.Sets/src/mage/cards/h/HungeringYeti.java +++ b/Mage.Sets/src/mage/cards/h/HungeringYeti.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashSourceEffe import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -58,7 +59,7 @@ public class HungeringYeti extends CardImpl { public HungeringYeti(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Yeti"); + this.subtype.add(SubType.YETI); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HungryDragonsnake.java b/Mage.Sets/src/mage/cards/h/HungryDragonsnake.java index fc1e8d9312..424118e3a1 100644 --- a/Mage.Sets/src/mage/cards/h/HungryDragonsnake.java +++ b/Mage.Sets/src/mage/cards/h/HungryDragonsnake.java @@ -1,80 +1,81 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.abilities.keyword.TrampleAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.counters.CounterType; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.ControllerPredicate; - -/** - * - * @author Styxo - */ -public class HungryDragonsnake extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("under an opponents's control"); - - static { - filter.add(new ControllerPredicate(TargetController.OPPONENT)); - } - - public HungryDragonsnake(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Snake"); - this.subtype.add("Beast"); - this.power = new MageInt(4); - this.toughness = new MageInt(4); - - // Trample - this.addAbility(TrampleAbility.getInstance()); - - // Whenever a creature enters the battlefield under an opponents's control, put a +1/+1 counter on Hungry Dragonsnake. - this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, - new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter, false, - "Whenever a creature enters the battlefield under an opponents's control, put a +1/+1 counter on {this}.", false)); - } - - public HungryDragonsnake(final HungryDragonsnake card) { - super(card); - } - - @Override - public HungryDragonsnake copy() { - return new HungryDragonsnake(this); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author Styxo + */ +public class HungryDragonsnake extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("under an opponents's control"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public HungryDragonsnake(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.BEAST); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Whenever a creature enters the battlefield under an opponents's control, put a +1/+1 counter on Hungry Dragonsnake. + this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, + new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter, false, + "Whenever a creature enters the battlefield under an opponents's control, put a +1/+1 counter on {this}.", false)); + } + + public HungryDragonsnake(final HungryDragonsnake card) { + super(card); + } + + @Override + public HungryDragonsnake copy() { + return new HungryDragonsnake(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HungryMist.java b/Mage.Sets/src/mage/cards/h/HungryMist.java index 89b6e36c69..ebd836557f 100644 --- a/Mage.Sets/src/mage/cards/h/HungryMist.java +++ b/Mage.Sets/src/mage/cards/h/HungryMist.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -45,7 +46,7 @@ public class HungryMist extends CardImpl { public HungryMist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HungrySpriggan.java b/Mage.Sets/src/mage/cards/h/HungrySpriggan.java index 9de9a29914..d63be94035 100644 --- a/Mage.Sets/src/mage/cards/h/HungrySpriggan.java +++ b/Mage.Sets/src/mage/cards/h/HungrySpriggan.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class HungrySpriggan extends CardImpl { public HungrySpriggan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HuntDown.java b/Mage.Sets/src/mage/cards/h/HuntDown.java index a4a35c20ed..e2c40487b0 100644 --- a/Mage.Sets/src/mage/cards/h/HuntDown.java +++ b/Mage.Sets/src/mage/cards/h/HuntDown.java @@ -1,134 +1,134 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.RequirementEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.filter.common.FilterCreaturePermanent; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.target.common.TargetCreaturePermanent; -import mage.watchers.common.BlockedAttackerWatcher; - -/** - * - * @author jeffwadsworth - */ -public class HuntDown extends CardImpl { - - private static final FilterCreaturePermanent filterMustBlock = new FilterCreaturePermanent("Creature that must block"); - private static final FilterCreaturePermanent filterToBeBlocked = new FilterCreaturePermanent("Creature that is to be blocked"); - - - - public HuntDown(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}"); - - - // Target creature blocks target creature this turn if able. - this.getSpellAbility().addEffect(new HuntDownEffect()); - this.getSpellAbility().addTarget(new TargetCreaturePermanent(filterMustBlock)); - this.getSpellAbility().addTarget(new TargetCreaturePermanent(filterToBeBlocked)); - this.getSpellAbility().addWatcher(new BlockedAttackerWatcher()); - - } - - public HuntDown(final HuntDown card) { - super(card); - } - - @Override - public HuntDown copy() { - return new HuntDown(this); - } -} - -class HuntDownEffect extends RequirementEffect { - - public HuntDownEffect() { - this(Duration.EndOfTurn); - } - - public HuntDownEffect(Duration duration) { - super(duration); - staticText = "Target creature blocks target creature this turn if able"; - } - - public HuntDownEffect(final HuntDownEffect effect) { - super(effect); - } - - @Override - public boolean applies(Permanent permanent, Ability source, Game game) { - if (permanent.getId().equals(source.getTargets().get(0).getFirstTarget())) { - Permanent blocker = game.getPermanent(source.getTargets().get(0).getFirstTarget()); - if (blocker != null - && blocker.canBlock(source.getTargets().get(1).getFirstTarget(), game)) { - Permanent attacker = (Permanent) game.getPermanent(source.getTargets().get(1).getFirstTarget()); - if (attacker != null) { - BlockedAttackerWatcher blockedAttackerWatcher = (BlockedAttackerWatcher) game.getState().getWatchers().get(BlockedAttackerWatcher.class.getSimpleName()); - if (blockedAttackerWatcher != null - && blockedAttackerWatcher.creatureHasBlockedAttacker(attacker, blocker, game)) { - // has already blocked this turn, so no need to do again - return false; - } - return true; - } else { - discard(); - } - } - } - return false; - } - - @Override - public boolean mustAttack(Game game) { - return false; - } - - @Override - public boolean mustBlock(Game game) { - return true; - } - - @Override - public UUID mustBlockAttacker(Ability source, Game game) { - return source.getTargets().get(1).getFirstTarget(); - } - - @Override - public HuntDownEffect copy() { - return new HuntDownEffect(this); - } - -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.RequirementEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.common.BlockedAttackerWatcher; + +/** + * + * @author jeffwadsworth + */ +public class HuntDown extends CardImpl { + + private static final FilterCreaturePermanent filterMustBlock = new FilterCreaturePermanent("Creature that must block"); + private static final FilterCreaturePermanent filterToBeBlocked = new FilterCreaturePermanent("Creature that is to be blocked"); + + + + public HuntDown(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}"); + + + // Target creature blocks target creature this turn if able. + this.getSpellAbility().addEffect(new HuntDownEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filterMustBlock)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filterToBeBlocked)); + this.getSpellAbility().addWatcher(new BlockedAttackerWatcher()); + + } + + public HuntDown(final HuntDown card) { + super(card); + } + + @Override + public HuntDown copy() { + return new HuntDown(this); + } +} + +class HuntDownEffect extends RequirementEffect { + + public HuntDownEffect() { + this(Duration.EndOfTurn); + } + + public HuntDownEffect(Duration duration) { + super(duration); + staticText = "Target creature blocks target creature this turn if able"; + } + + public HuntDownEffect(final HuntDownEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + if (permanent.getId().equals(source.getTargets().get(0).getFirstTarget())) { + Permanent blocker = game.getPermanent(source.getTargets().get(0).getFirstTarget()); + if (blocker != null + && blocker.canBlock(source.getTargets().get(1).getFirstTarget(), game)) { + Permanent attacker = (Permanent) game.getPermanent(source.getTargets().get(1).getFirstTarget()); + if (attacker != null) { + BlockedAttackerWatcher blockedAttackerWatcher = (BlockedAttackerWatcher) game.getState().getWatchers().get(BlockedAttackerWatcher.class.getSimpleName()); + if (blockedAttackerWatcher != null + && blockedAttackerWatcher.creatureHasBlockedAttacker(attacker, blocker, game)) { + // has already blocked this turn, so no need to do again + return false; + } + return true; + } else { + discard(); + } + } + } + return false; + } + + @Override + public boolean mustAttack(Game game) { + return false; + } + + @Override + public boolean mustBlock(Game game) { + return true; + } + + @Override + public UUID mustBlockAttacker(Ability source, Game game) { + return source.getTargets().get(1).getFirstTarget(); + } + + @Override + public HuntDownEffect copy() { + return new HuntDownEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/h/HuntToExtinction.java b/Mage.Sets/src/mage/cards/h/HuntToExtinction.java index 91fb2c2505..205813b07d 100644 --- a/Mage.Sets/src/mage/cards/h/HuntToExtinction.java +++ b/Mage.Sets/src/mage/cards/h/HuntToExtinction.java @@ -1,80 +1,80 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.abilities.dynamicvalue.common.ManacostVariableValue; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.DamageAllEffect; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.counters.CounterType; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.CounterPredicate; -import mage.target.common.TargetOpponentsCreaturePermanent; - -/** - * - * @author Styxo - */ -public class HuntToExtinction extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with a bounty counter on it"); - - static { - filter.add(new CounterPredicate(CounterType.BOUNTY)); - } - - public HuntToExtinction(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{B}{R}{G}"); - - // Put a bounty counter on up to one target creature an opponent controls. - this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance())); - this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent(0, 1)); - - // Hunt to Extinction deals X damage to each creature. - this.getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), new FilterCreaturePermanent())); - - // Hunt to Exctinction deals an additional X damage to each creature with a bounty counter on it. - Effect effect = new DamageAllEffect(new ManacostVariableValue(), new FilterCreaturePermanent(filter)); - effect.setText("Hunt to Exctinction deals an additional X damage to each creature with a bounty counter on it"); - this.getSpellAbility().addEffect(effect); - - } - - public HuntToExtinction(final HuntToExtinction card) { - super(card); - } - - @Override - public HuntToExtinction copy() { - return new HuntToExtinction(this); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.CounterPredicate; +import mage.target.common.TargetOpponentsCreaturePermanent; + +/** + * + * @author Styxo + */ +public class HuntToExtinction extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with a bounty counter on it"); + + static { + filter.add(new CounterPredicate(CounterType.BOUNTY)); + } + + public HuntToExtinction(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{B}{R}{G}"); + + // Put a bounty counter on up to one target creature an opponent controls. + this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance())); + this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent(0, 1)); + + // Hunt to Extinction deals X damage to each creature. + this.getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), new FilterCreaturePermanent())); + + // Hunt to Exctinction deals an additional X damage to each creature with a bounty counter on it. + Effect effect = new DamageAllEffect(new ManacostVariableValue(), new FilterCreaturePermanent(filter)); + effect.setText("Hunt to Exctinction deals an additional X damage to each creature with a bounty counter on it"); + this.getSpellAbility().addEffect(effect); + + } + + public HuntToExtinction(final HuntToExtinction card) { + super(card); + } + + @Override + public HuntToExtinction copy() { + return new HuntToExtinction(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HuntedDragon.java b/Mage.Sets/src/mage/cards/h/HuntedDragon.java index 18b3eb91c4..83c3ed88ff 100644 --- a/Mage.Sets/src/mage/cards/h/HuntedDragon.java +++ b/Mage.Sets/src/mage/cards/h/HuntedDragon.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.HuntedDragonKnightToken; import mage.target.Target; import mage.target.common.TargetOpponent; @@ -49,7 +50,7 @@ public class HuntedDragon extends CardImpl { public HuntedDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/h/HuntedGhoul.java b/Mage.Sets/src/mage/cards/h/HuntedGhoul.java index fc38855d1b..98bff42edd 100644 --- a/Mage.Sets/src/mage/cards/h/HuntedGhoul.java +++ b/Mage.Sets/src/mage/cards/h/HuntedGhoul.java @@ -44,7 +44,7 @@ public class HuntedGhoul extends CardImpl { public HuntedGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HuntedHorror.java b/Mage.Sets/src/mage/cards/h/HuntedHorror.java index 6f8483bcf2..e3c1d71135 100644 --- a/Mage.Sets/src/mage/cards/h/HuntedHorror.java +++ b/Mage.Sets/src/mage/cards/h/HuntedHorror.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.HuntedCentaurToken; import mage.target.Target; import mage.target.common.TargetOpponent; @@ -48,7 +49,7 @@ public class HuntedHorror extends CardImpl { public HuntedHorror(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/h/HuntedLammasu.java b/Mage.Sets/src/mage/cards/h/HuntedLammasu.java index ee29b16217..303a69696b 100644 --- a/Mage.Sets/src/mage/cards/h/HuntedLammasu.java +++ b/Mage.Sets/src/mage/cards/h/HuntedLammasu.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.HorrorToken; import mage.target.Target; import mage.target.common.TargetOpponent; @@ -47,7 +48,7 @@ public class HuntedLammasu extends CardImpl { public HuntedLammasu(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); - this.subtype.add("Lammasu"); + this.subtype.add(SubType.LAMMASU); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/h/HuntedPhantasm.java b/Mage.Sets/src/mage/cards/h/HuntedPhantasm.java index 2d11591c43..a48c5a3fb6 100644 --- a/Mage.Sets/src/mage/cards/h/HuntedPhantasm.java +++ b/Mage.Sets/src/mage/cards/h/HuntedPhantasm.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.GoblinToken; import mage.target.Target; import mage.target.common.TargetOpponent; @@ -48,7 +49,7 @@ public class HuntedPhantasm extends CardImpl { public HuntedPhantasm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/h/HuntedTroll.java b/Mage.Sets/src/mage/cards/h/HuntedTroll.java index 32510549c5..7662cf4c86 100644 --- a/Mage.Sets/src/mage/cards/h/HuntedTroll.java +++ b/Mage.Sets/src/mage/cards/h/HuntedTroll.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.game.permanent.token.FaerieToken; @@ -52,8 +53,8 @@ public class HuntedTroll extends CardImpl { public HuntedTroll(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); - this.subtype.add("Troll"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.TROLL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(8); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HuntedWumpus.java b/Mage.Sets/src/mage/cards/h/HuntedWumpus.java index 4a9c36862f..b306db8235 100644 --- a/Mage.Sets/src/mage/cards/h/HuntedWumpus.java +++ b/Mage.Sets/src/mage/cards/h/HuntedWumpus.java @@ -36,6 +36,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -51,7 +52,7 @@ public class HuntedWumpus extends CardImpl { public HuntedWumpus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/h/HunterOfEyeblights.java b/Mage.Sets/src/mage/cards/h/HunterOfEyeblights.java index 72ac6fc431..f690e240b3 100644 --- a/Mage.Sets/src/mage/cards/h/HunterOfEyeblights.java +++ b/Mage.Sets/src/mage/cards/h/HunterOfEyeblights.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; @@ -64,8 +65,8 @@ public class HunterOfEyeblights extends CardImpl { public HunterOfEyeblights(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Elf"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HunterSliver.java b/Mage.Sets/src/mage/cards/h/HunterSliver.java index 04b36f8141..52f8a63685 100644 --- a/Mage.Sets/src/mage/cards/h/HunterSliver.java +++ b/Mage.Sets/src/mage/cards/h/HunterSliver.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -47,7 +48,7 @@ public class HunterSliver extends CardImpl { public HunterSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HuntingCheetah.java b/Mage.Sets/src/mage/cards/h/HuntingCheetah.java index 899b334c6a..9117c89a46 100644 --- a/Mage.Sets/src/mage/cards/h/HuntingCheetah.java +++ b/Mage.Sets/src/mage/cards/h/HuntingCheetah.java @@ -53,7 +53,7 @@ public class HuntingCheetah extends CardImpl { public HuntingCheetah(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HuntingDrake.java b/Mage.Sets/src/mage/cards/h/HuntingDrake.java index 0a939e180e..7493033fd2 100644 --- a/Mage.Sets/src/mage/cards/h/HuntingDrake.java +++ b/Mage.Sets/src/mage/cards/h/HuntingDrake.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,7 +58,7 @@ public class HuntingDrake extends CardImpl { public HuntingDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HuntingKavu.java b/Mage.Sets/src/mage/cards/h/HuntingKavu.java index 441bc89658..c6541cbc9d 100644 --- a/Mage.Sets/src/mage/cards/h/HuntingKavu.java +++ b/Mage.Sets/src/mage/cards/h/HuntingKavu.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterAttackingCreature; import mage.filter.predicate.Predicates; @@ -63,7 +64,7 @@ public class HuntingKavu extends CardImpl { public HuntingKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{G}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HuntingMoa.java b/Mage.Sets/src/mage/cards/h/HuntingMoa.java index eac6601ba1..a22e4fe801 100644 --- a/Mage.Sets/src/mage/cards/h/HuntingMoa.java +++ b/Mage.Sets/src/mage/cards/h/HuntingMoa.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -47,8 +48,8 @@ public class HuntingMoa extends CardImpl { public HuntingMoa(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Bird"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HuntingTriad.java b/Mage.Sets/src/mage/cards/h/HuntingTriad.java index e45c2f2249..f10c106639 100644 --- a/Mage.Sets/src/mage/cards/h/HuntingTriad.java +++ b/Mage.Sets/src/mage/cards/h/HuntingTriad.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ReinforceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.ElfToken; /** @@ -44,7 +45,7 @@ public class HuntingTriad extends CardImpl { public HuntingTriad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.SORCERY},"{3}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.getSpellAbility().addEffect(new CreateTokenEffect(new ElfToken(), 3)); this.addAbility(new ReinforceAbility(3, new ManaCostsImpl("{3}{G}"))); diff --git a/Mage.Sets/src/mage/cards/h/HuntmasterOfTheFells.java b/Mage.Sets/src/mage/cards/h/HuntmasterOfTheFells.java index bc22b4d34b..58627d0bbd 100644 --- a/Mage.Sets/src/mage/cards/h/HuntmasterOfTheFells.java +++ b/Mage.Sets/src/mage/cards/h/HuntmasterOfTheFells.java @@ -55,8 +55,8 @@ public class HuntmasterOfTheFells extends CardImpl { public HuntmasterOfTheFells(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}"); - this.subtype.add("Human"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WEREWOLF); this.transformable = true; this.secondSideCardClazz = RavagerOfTheFells.class; diff --git a/Mage.Sets/src/mage/cards/h/HurkylsRecall.java b/Mage.Sets/src/mage/cards/h/HurkylsRecall.java index baeab7390e..76785338f7 100644 --- a/Mage.Sets/src/mage/cards/h/HurkylsRecall.java +++ b/Mage.Sets/src/mage/cards/h/HurkylsRecall.java @@ -36,7 +36,7 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterArtifactPermanent; -import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.filter.predicate.other.OwnerIdPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.TargetPlayer; @@ -48,8 +48,7 @@ import mage.target.TargetPlayer; public class HurkylsRecall extends CardImpl { public HurkylsRecall(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); // Return all artifacts target player owns to his or her hand. this.getSpellAbility().addEffect(new HurkylsRecallReturnToHandEffect()); @@ -81,7 +80,7 @@ class HurkylsRecallReturnToHandEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { if (targetPointer.getFirst(game, source) != null) { FilterArtifactPermanent filter = new FilterArtifactPermanent(); - filter.add(new ControllerIdPredicate(targetPointer.getFirst(game, source))); + filter.add(new OwnerIdPredicate(targetPointer.getFirst(game, source))); for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { permanent.moveToZone(Zone.HAND, source.getSourceId(), game, true); } diff --git a/Mage.Sets/src/mage/cards/h/HurloonMinotaur.java b/Mage.Sets/src/mage/cards/h/HurloonMinotaur.java index 9dafcfb26e..f1cba6b3af 100644 --- a/Mage.Sets/src/mage/cards/h/HurloonMinotaur.java +++ b/Mage.Sets/src/mage/cards/h/HurloonMinotaur.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class HurloonMinotaur extends CardImpl { public HurloonMinotaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Minotaur"); + this.subtype.add(SubType.MINOTAUR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HurloonShaman.java b/Mage.Sets/src/mage/cards/h/HurloonShaman.java index 3e530d81d0..c94e0a3bc5 100644 --- a/Mage.Sets/src/mage/cards/h/HurloonShaman.java +++ b/Mage.Sets/src/mage/cards/h/HurloonShaman.java @@ -1,64 +1,65 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.DiesTriggeredAbility; -import mage.abilities.effects.common.SacrificeAllEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.common.FilterControlledLandPermanent; - -/** - * - * @author Derpthemeus - */ -public class HurloonShaman extends CardImpl { - - public HurloonShaman(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Shaman"); - this.power = new MageInt(2); - this.toughness = new MageInt(3); - - // When Hurloon Shaman dies, each player sacrifices a land. - this.addAbility(new DiesTriggeredAbility(new SacrificeAllEffect(new FilterControlledLandPermanent("land")))); - } - - public HurloonShaman(final HurloonShaman card) { - super(card); - } - - @Override - public HurloonShaman copy() { - return new HurloonShaman(this); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.SacrificeAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterControlledLandPermanent; + +/** + * + * @author Derpthemeus + */ +public class HurloonShaman extends CardImpl { + + public HurloonShaman(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.SHAMAN); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // When Hurloon Shaman dies, each player sacrifices a land. + this.addAbility(new DiesTriggeredAbility(new SacrificeAllEffect(new FilterControlledLandPermanent("land")))); + } + + public HurloonShaman(final HurloonShaman card) { + super(card); + } + + @Override + public HurloonShaman copy() { + return new HurloonShaman(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HurrJackal.java b/Mage.Sets/src/mage/cards/h/HurrJackal.java index 874cb66d41..4659a59a04 100644 --- a/Mage.Sets/src/mage/cards/h/HurrJackal.java +++ b/Mage.Sets/src/mage/cards/h/HurrJackal.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.CantBeRegeneratedTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class HurrJackal extends CardImpl { public HurrJackal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Jackal"); + this.subtype.add(SubType.JACKAL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HushwingGryff.java b/Mage.Sets/src/mage/cards/h/HushwingGryff.java index bc35dd89e6..b3316468dc 100644 --- a/Mage.Sets/src/mage/cards/h/HushwingGryff.java +++ b/Mage.Sets/src/mage/cards/h/HushwingGryff.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class HushwingGryff extends CardImpl { public HushwingGryff(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Hippogriff"); + this.subtype.add(SubType.HIPPOGRIFF); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HussarPatrol.java b/Mage.Sets/src/mage/cards/h/HussarPatrol.java index 22dcdee51e..a8f5e41218 100644 --- a/Mage.Sets/src/mage/cards/h/HussarPatrol.java +++ b/Mage.Sets/src/mage/cards/h/HussarPatrol.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class HussarPatrol extends CardImpl { public HussarPatrol(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{U}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HuttCrimeLord.java b/Mage.Sets/src/mage/cards/h/HuttCrimeLord.java index ee231dac49..07873dafe7 100644 --- a/Mage.Sets/src/mage/cards/h/HuttCrimeLord.java +++ b/Mage.Sets/src/mage/cards/h/HuttCrimeLord.java @@ -1,69 +1,70 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.AttacksTriggeredAbility; -import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.effects.common.DontUntapInControllersNextUntapStepSourceEffect; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.counters.CounterType; - -/** - * - * @author Styxo - */ -public class HuttCrimeLord extends CardImpl { - - public HuttCrimeLord(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); - this.subtype.add("Hutt"); - this.subtype.add("Rogue"); - this.power = new MageInt(5); - this.toughness = new MageInt(5); - - // Hutt Crime Lord enters the battlefield with a bounty counter on it. - this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.BOUNTY.createInstance()), "with a bounty counter on it")); - - // Whenever Hutt Crime Lord attacks, it does not untap during its controller's next untap step - this.addAbility(new AttacksTriggeredAbility(new DontUntapInControllersNextUntapStepSourceEffect(), false)); - } - - public HuttCrimeLord(final HuttCrimeLord card) { - super(card); - } - - @Override - public HuttCrimeLord copy() { - return new HuttCrimeLord(this); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; + +/** + * + * @author Styxo + */ +public class HuttCrimeLord extends CardImpl { + + public HuttCrimeLord(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.subtype.add(SubType.HUTT); + this.subtype.add(SubType.ROGUE); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Hutt Crime Lord enters the battlefield with a bounty counter on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.BOUNTY.createInstance()), "with a bounty counter on it")); + + // Whenever Hutt Crime Lord attacks, it does not untap during its controller's next untap step + this.addAbility(new AttacksTriggeredAbility(new DontUntapInControllersNextUntapStepSourceEffect(), false)); + } + + public HuttCrimeLord(final HuttCrimeLord card) { + super(card); + } + + @Override + public HuttCrimeLord copy() { + return new HuttCrimeLord(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HuttPalace.java b/Mage.Sets/src/mage/cards/h/HuttPalace.java index e6898be37f..b76630ef65 100644 --- a/Mage.Sets/src/mage/cards/h/HuttPalace.java +++ b/Mage.Sets/src/mage/cards/h/HuttPalace.java @@ -1,69 +1,69 @@ -/* - * 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.cards.h; - -import java.util.UUID; -import mage.Mana; -import mage.abilities.common.EntersBattlefieldTappedAbility; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.AddManaToManaPoolSourceControllerEffect; -import mage.abilities.mana.BlackManaAbility; -import mage.abilities.mana.GreenManaAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class HuttPalace extends CardImpl { - - public HuttPalace(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - - // Hutt Palace enters the battlefield tapped. - this.addAbility(new EntersBattlefieldTappedAbility()); - - // When Hutt Palace enters the battlefield , add {R} to your mana pool. - this.addAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(Mana.RedMana(1)))); - - // {T}: Add {B} or {G} to you mana pool. - this.addAbility(new BlackManaAbility()); - this.addAbility(new GreenManaAbility()); - } - - public HuttPalace(final HuttPalace card) { - super(card); - } - - @Override - public HuttPalace copy() { - return new HuttPalace(this); - } -} +/* + * 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.cards.h; + +import java.util.UUID; +import mage.Mana; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.AddManaToManaPoolSourceControllerEffect; +import mage.abilities.mana.BlackManaAbility; +import mage.abilities.mana.GreenManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author Styxo + */ +public class HuttPalace extends CardImpl { + + public HuttPalace(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.LAND},""); + + // Hutt Palace enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + + // When Hutt Palace enters the battlefield , add {R} to your mana pool. + this.addAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(Mana.RedMana(1)))); + + // {T}: Add {B} or {G} to you mana pool. + this.addAbility(new BlackManaAbility()); + this.addAbility(new GreenManaAbility()); + } + + public HuttPalace(final HuttPalace card) { + super(card); + } + + @Override + public HuttPalace copy() { + return new HuttPalace(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HyalopterousLemure.java b/Mage.Sets/src/mage/cards/h/HyalopterousLemure.java index d4f0f245b8..aabf97d2a0 100644 --- a/Mage.Sets/src/mage/cards/h/HyalopterousLemure.java +++ b/Mage.Sets/src/mage/cards/h/HyalopterousLemure.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class HyalopterousLemure extends CardImpl { public HyalopterousLemure(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HydraBroodmaster.java b/Mage.Sets/src/mage/cards/h/HydraBroodmaster.java index 5f1d5866bb..716230b447 100644 --- a/Mage.Sets/src/mage/cards/h/HydraBroodmaster.java +++ b/Mage.Sets/src/mage/cards/h/HydraBroodmaster.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MonstrosityAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.token.HydraBroodmasterToken; @@ -50,7 +51,7 @@ public class HydraBroodmaster extends CardImpl { public HydraBroodmaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/h/HydraOmnivore.java b/Mage.Sets/src/mage/cards/h/HydraOmnivore.java index b057b58f7d..a03324fa44 100644 --- a/Mage.Sets/src/mage/cards/h/HydraOmnivore.java +++ b/Mage.Sets/src/mage/cards/h/HydraOmnivore.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -49,7 +50,7 @@ public class HydraOmnivore extends CardImpl { public HydraOmnivore(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/h/Hydroform.java b/Mage.Sets/src/mage/cards/h/Hydroform.java index 7842d055b2..66428d6c02 100644 --- a/Mage.Sets/src/mage/cards/h/Hydroform.java +++ b/Mage.Sets/src/mage/cards/h/Hydroform.java @@ -35,6 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.game.permanent.token.Token; import mage.target.common.TargetLandPermanent; @@ -68,7 +69,7 @@ class HydroformToken extends Token { public HydroformToken() { super("", "3/3 Elemental creature with flying"); this.cardType.add(CardType.CREATURE); - this.getSubtype(null).add("Elemental"); + this.getSubtype(null).add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HydromorphGuardian.java b/Mage.Sets/src/mage/cards/h/HydromorphGuardian.java index 50b110ed54..5034fd42cc 100644 --- a/Mage.Sets/src/mage/cards/h/HydromorphGuardian.java +++ b/Mage.Sets/src/mage/cards/h/HydromorphGuardian.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.filter.FilterSpell; @@ -58,7 +59,7 @@ public class HydromorphGuardian extends CardImpl { public HydromorphGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HydromorphGull.java b/Mage.Sets/src/mage/cards/h/HydromorphGull.java index e0b6273e27..5a3b02c477 100644 --- a/Mage.Sets/src/mage/cards/h/HydromorphGull.java +++ b/Mage.Sets/src/mage/cards/h/HydromorphGull.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.filter.FilterSpell; @@ -59,8 +60,8 @@ public class HydromorphGull extends CardImpl { public HydromorphGull(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Elemental"); - this.subtype.add("Bird"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.BIRD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/h/HyenaPack.java b/Mage.Sets/src/mage/cards/h/HyenaPack.java index 91111a56d3..a3af08db3a 100644 --- a/Mage.Sets/src/mage/cards/h/HyenaPack.java +++ b/Mage.Sets/src/mage/cards/h/HyenaPack.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class HyenaPack extends CardImpl { public HyenaPack(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); - this.subtype.add("Hyena"); + this.subtype.add(SubType.HYENA); this.power = new MageInt(3); this.toughness = new MageInt(4); } diff --git a/Mage.Sets/src/mage/cards/h/HyenaUmbra.java b/Mage.Sets/src/mage/cards/h/HyenaUmbra.java index 641ecd71b6..47e5c89e6b 100644 --- a/Mage.Sets/src/mage/cards/h/HyenaUmbra.java +++ b/Mage.Sets/src/mage/cards/h/HyenaUmbra.java @@ -50,7 +50,7 @@ public class HyenaUmbra extends CardImpl { public HyenaUmbra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/h/HyperionBlacksmith.java b/Mage.Sets/src/mage/cards/h/HyperionBlacksmith.java index 578a732d53..af8d44aaeb 100644 --- a/Mage.Sets/src/mage/cards/h/HyperionBlacksmith.java +++ b/Mage.Sets/src/mage/cards/h/HyperionBlacksmith.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.MayTapOrUntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterArtifactPermanent; @@ -56,8 +57,8 @@ public class HyperionBlacksmith extends CardImpl { public HyperionBlacksmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/HypersonicDragon.java b/Mage.Sets/src/mage/cards/h/HypersonicDragon.java index 78b1e59fa9..b86d59bc34 100644 --- a/Mage.Sets/src/mage/cards/h/HypersonicDragon.java +++ b/Mage.Sets/src/mage/cards/h/HypersonicDragon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterCard; @@ -54,7 +55,7 @@ public class HypersonicDragon extends CardImpl { public HypersonicDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HypervoltGrasp.java b/Mage.Sets/src/mage/cards/h/HypervoltGrasp.java index 468c524dc5..353481c35e 100644 --- a/Mage.Sets/src/mage/cards/h/HypervoltGrasp.java +++ b/Mage.Sets/src/mage/cards/h/HypervoltGrasp.java @@ -53,7 +53,7 @@ public class HypervoltGrasp extends CardImpl { public HypervoltGrasp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); diff --git a/Mage.Sets/src/mage/cards/h/HypnoticSiren.java b/Mage.Sets/src/mage/cards/h/HypnoticSiren.java index 166e7174d9..89c7f52d20 100644 --- a/Mage.Sets/src/mage/cards/h/HypnoticSiren.java +++ b/Mage.Sets/src/mage/cards/h/HypnoticSiren.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class HypnoticSiren extends CardImpl { public HypnoticSiren(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{U}"); - this.subtype.add("Siren"); + this.subtype.add(SubType.SIREN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/h/HypnoticSpecter.java b/Mage.Sets/src/mage/cards/h/HypnoticSpecter.java index 2f5e36eed6..c5a621eb96 100644 --- a/Mage.Sets/src/mage/cards/h/HypnoticSpecter.java +++ b/Mage.Sets/src/mage/cards/h/HypnoticSpecter.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class HypnoticSpecter extends CardImpl { public HypnoticSpecter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Specter"); + this.subtype.add(SubType.SPECTER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/h/Hypnox.java b/Mage.Sets/src/mage/cards/h/Hypnox.java new file mode 100644 index 0000000000..c5e78cce38 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/Hypnox.java @@ -0,0 +1,149 @@ +/* + * 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.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.condition.common.CastFromHandSourceCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.ExileZone; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetOpponent; +import mage.watchers.common.CastFromHandWatcher; + +/** + * + * @author L_J + */ +public class Hypnox extends CardImpl { + + public Hypnox(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{8}{B}{B}{B}"); + this.subtype.add(SubType.NIGHTMARE); + this.subtype.add(SubType.HORROR); + this.power = new MageInt(8); + this.toughness = new MageInt(8); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Hypnox enters the battlefield, if you cast it from your hand, exile all cards from target opponent's hand. + TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new HypnoxExileEffect()); + ability.addTarget(new TargetOpponent()); + this.addAbility(new ConditionalTriggeredAbility(ability, CastFromHandSourceCondition.instance, + "When {this} enters the battlefield, if you cast it from your hand, exile all cards from target opponent's hand."), new CastFromHandWatcher()); + + // When Hypnox leaves the battlefield, return the exiled cards to their owner's hand. + this.addAbility(new LeavesBattlefieldTriggeredAbility(new HypnoxReturnEffect(), false)); + } + + public Hypnox(final Hypnox card) { + super(card); + } + + @Override + public Hypnox copy() { + return new Hypnox(this); + } +} + +class HypnoxExileEffect extends OneShotEffect { + HypnoxExileEffect() { + super(Outcome.Exile); + staticText = "Exile all cards from target opponent's hand"; + } + + HypnoxExileEffect(final HypnoxExileEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getFirstTarget()); + if (player != null) { + for (UUID cid : player.getHand().copy()) { + Card c = game.getCard(cid); + if (c != null) { + c.moveToExile(source.getSourceId(), "Hypnox", source.getSourceId(), game); + } + } + return true; + } + return false; + } + + @Override + public HypnoxExileEffect copy() { + return new HypnoxExileEffect(this); + } + + } + +class HypnoxReturnEffect extends OneShotEffect { + + public HypnoxReturnEffect() { + super(Outcome.ReturnToHand); + this.staticText = "return the exiled cards to their owner's hand"; + } + + public HypnoxReturnEffect(final HypnoxReturnEffect effect) { + super(effect); + } + + @Override + public HypnoxReturnEffect copy() { + return new HypnoxReturnEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + ExileZone exZone = game.getExile().getExileZone(source.getSourceId()); + if (exZone != null) { + return controller.moveCards(exZone.getCards(game), Zone.HAND, source, game); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/h/Hystrodon.java b/Mage.Sets/src/mage/cards/h/Hystrodon.java index acf3ad10d4..3578429c86 100644 --- a/Mage.Sets/src/mage/cards/h/Hystrodon.java +++ b/Mage.Sets/src/mage/cards/h/Hystrodon.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class Hystrodon extends CardImpl { public Hystrodon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HythoniaTheCruel.java b/Mage.Sets/src/mage/cards/h/HythoniaTheCruel.java index 38b5c04e26..f2b93c2b1f 100644 --- a/Mage.Sets/src/mage/cards/h/HythoniaTheCruel.java +++ b/Mage.Sets/src/mage/cards/h/HythoniaTheCruel.java @@ -56,7 +56,7 @@ public class HythoniaTheCruel extends CardImpl { public HythoniaTheCruel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Gorgon"); + this.subtype.add(SubType.GORGON); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/i/IG88B.java b/Mage.Sets/src/mage/cards/i/IG88B.java index 364db23966..d0c5fb1154 100644 --- a/Mage.Sets/src/mage/cards/i/IG88B.java +++ b/Mage.Sets/src/mage/cards/i/IG88B.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.RepairAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.counters.CounterType; import mage.filter.StaticFilters; @@ -54,8 +55,8 @@ public class IG88B extends CardImpl { public IG88B(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Droid"); - this.subtype.add("Hunter"); + this.subtype.add(SubType.DROID); + this.subtype.add(SubType.HUNTER); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/IbHalfheartGoblinTactician.java b/Mage.Sets/src/mage/cards/i/IbHalfheartGoblinTactician.java index 500142eeb9..153ac95aef 100644 --- a/Mage.Sets/src/mage/cards/i/IbHalfheartGoblinTactician.java +++ b/Mage.Sets/src/mage/cards/i/IbHalfheartGoblinTactician.java @@ -70,8 +70,8 @@ public class IbHalfheartGoblinTactician extends CardImpl { public IbHalfheartGoblinTactician(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Goblin"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/IcatianCrier.java b/Mage.Sets/src/mage/cards/i/IcatianCrier.java index c156e6b7f9..9c032111aa 100644 --- a/Mage.Sets/src/mage/cards/i/IcatianCrier.java +++ b/Mage.Sets/src/mage/cards/i/IcatianCrier.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.CitizenToken; @@ -49,8 +50,8 @@ public class IcatianCrier extends CardImpl { public IcatianCrier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/IcatianJavelineers.java b/Mage.Sets/src/mage/cards/i/IcatianJavelineers.java index 994790ea1d..de8dfee17f 100644 --- a/Mage.Sets/src/mage/cards/i/IcatianJavelineers.java +++ b/Mage.Sets/src/mage/cards/i/IcatianJavelineers.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreatureOrPlayer; @@ -51,8 +52,8 @@ public class IcatianJavelineers extends CardImpl { public IcatianJavelineers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/IcatianLieutenant.java b/Mage.Sets/src/mage/cards/i/IcatianLieutenant.java index 77b34a1d67..3869836737 100644 --- a/Mage.Sets/src/mage/cards/i/IcatianLieutenant.java +++ b/Mage.Sets/src/mage/cards/i/IcatianLieutenant.java @@ -57,8 +57,8 @@ public class IcatianLieutenant extends CardImpl { public IcatianLieutenant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/IcatianMoneychanger.java b/Mage.Sets/src/mage/cards/i/IcatianMoneychanger.java index 9713007f98..6d413e107a 100644 --- a/Mage.Sets/src/mage/cards/i/IcatianMoneychanger.java +++ b/Mage.Sets/src/mage/cards/i/IcatianMoneychanger.java @@ -43,6 +43,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.PhaseStep; import mage.constants.TargetController; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class IcatianMoneychanger extends CardImpl { public IcatianMoneychanger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/IcatianPriest.java b/Mage.Sets/src/mage/cards/i/IcatianPriest.java index 95537d23bd..56080ddc2c 100644 --- a/Mage.Sets/src/mage/cards/i/IcatianPriest.java +++ b/Mage.Sets/src/mage/cards/i/IcatianPriest.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class IcatianPriest extends CardImpl { public IcatianPriest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/IcatianScout.java b/Mage.Sets/src/mage/cards/i/IcatianScout.java index 7be4145112..64f54a6d08 100644 --- a/Mage.Sets/src/mage/cards/i/IcatianScout.java +++ b/Mage.Sets/src/mage/cards/i/IcatianScout.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,9 +51,9 @@ public class IcatianScout extends CardImpl { public IcatianScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/IceCage.java b/Mage.Sets/src/mage/cards/i/IceCage.java index ff01bf7750..6944db4415 100644 --- a/Mage.Sets/src/mage/cards/i/IceCage.java +++ b/Mage.Sets/src/mage/cards/i/IceCage.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -53,7 +54,7 @@ public class IceCage extends CardImpl { public IceCage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/i/IceCave.java b/Mage.Sets/src/mage/cards/i/IceCave.java index 4a8234f99a..188f79f42b 100644 --- a/Mage.Sets/src/mage/cards/i/IceCave.java +++ b/Mage.Sets/src/mage/cards/i/IceCave.java @@ -52,11 +52,10 @@ import mage.players.Player; public class IceCave extends CardImpl { public IceCave(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}{U}"); - + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}{U}"); // Whenever a player casts a spell, any other player may pay that spell's mana cost. If a player does, counter the spell. (Mana cost includes color.) - this.addAbility(new SpellCastAllTriggeredAbility(Zone.BATTLEFIELD, new IceCaveEffect(), StaticFilters.FILTER_SPELL, false, SetTargetPointer.SPELL)); + this.addAbility(new SpellCastAllTriggeredAbility(Zone.BATTLEFIELD, new IceCaveEffect(), StaticFilters.FILTER_A_SPELL, false, SetTargetPointer.SPELL)); } public IceCave(final IceCave card) { @@ -90,17 +89,17 @@ class IceCaveEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); Spell spell = (Spell) game.getStack().getStackObject(targetPointer.getFirst(game, source)); - if(sourcePermanent != null && spell != null && controller != null) { + if (sourcePermanent != null && spell != null && controller != null) { Player spellController = game.getPlayer(spell.getControllerId()); Cost cost = new ManaCostsImpl(spell.getSpellAbility().getManaCosts().getText()); - if(spellController != null) { + if (spellController != null) { for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { Player player = game.getPlayer(playerId); - if(player != null && player != spellController) { + if (player != null && player != spellController) { cost.clearPaid(); - if(cost.canPay(source, source.getSourceId(), player.getId(), game) + if (cost.canPay(source, source.getSourceId(), player.getId(), game) && player.chooseUse(outcome, "Pay " + cost.getText() + " to counter " + spell.getIdName() + '?', source, game)) { - if(cost.pay(source, game, source.getSourceId(), playerId, false, null)) { + if (cost.pay(source, game, source.getSourceId(), playerId, false, null)) { game.informPlayers(player.getLogName() + " pays" + cost.getText() + " to counter " + spell.getIdName() + '.'); game.getStack().counter(spell.getId(), source.getSourceId(), game); return true; diff --git a/Mage.Sets/src/mage/cards/i/IceOver.java b/Mage.Sets/src/mage/cards/i/IceOver.java index cddb697697..8062c01a75 100644 --- a/Mage.Sets/src/mage/cards/i/IceOver.java +++ b/Mage.Sets/src/mage/cards/i/IceOver.java @@ -1,75 +1,76 @@ -/* - * 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.cards.i; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect; -import mage.abilities.keyword.EnchantAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.StaticFilters; -import mage.target.TargetPermanent; - -/** - * - * @author Styxo - */ -public class IceOver extends CardImpl { - - public IceOver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); - - this.subtype.add("Aura"); - - // Enchant artifact or creature - TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE); - this.getSpellAbility().addTarget(auraTarget); - this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit)); - Ability ability = new EnchantAbility(auraTarget.getTargetName()); - this.addAbility(ability); - - // Enchanted permanent doesn't untap during its controller's untap step. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect("permanent"))); - - } - - public IceOver(final IceOver card) { - super(card); - } - - @Override - public IceOver copy() { - return new IceOver(this); - } -} +/* + * 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.cards.i; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.target.TargetPermanent; + +/** + * + * @author Styxo + */ +public class IceOver extends CardImpl { + + public IceOver(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + + this.subtype.add(SubType.AURA); + + // Enchant artifact or creature + TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted permanent doesn't untap during its controller's untap step. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect("permanent"))); + + } + + public IceOver(final IceOver card) { + super(card); + } + + @Override + public IceOver copy() { + return new IceOver(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/IcefallRegent.java b/Mage.Sets/src/mage/cards/i/IcefallRegent.java index bdcf724104..bd44a074f8 100644 --- a/Mage.Sets/src/mage/cards/i/IcefallRegent.java +++ b/Mage.Sets/src/mage/cards/i/IcefallRegent.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.CostModificationType; import mage.constants.Duration; import mage.constants.Outcome; @@ -73,7 +74,7 @@ public class IcefallRegent extends CardImpl { public IcefallRegent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/IcefeatherAven.java b/Mage.Sets/src/mage/cards/i/IcefeatherAven.java index df243d7028..2451f867a1 100644 --- a/Mage.Sets/src/mage/cards/i/IcefeatherAven.java +++ b/Mage.Sets/src/mage/cards/i/IcefeatherAven.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.common.TargetCreaturePermanent; @@ -56,8 +57,8 @@ public class IcefeatherAven extends CardImpl { public IcefeatherAven(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/IchorRats.java b/Mage.Sets/src/mage/cards/i/IchorRats.java index 5b9233e7ee..814ae5cac7 100644 --- a/Mage.Sets/src/mage/cards/i/IchorRats.java +++ b/Mage.Sets/src/mage/cards/i/IchorRats.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.game.Game; @@ -49,7 +50,7 @@ public class IchorRats extends CardImpl { public IchorRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/IchorclawMyr.java b/Mage.Sets/src/mage/cards/i/IchorclawMyr.java index 5457ef8dde..073861c991 100644 --- a/Mage.Sets/src/mage/cards/i/IchorclawMyr.java +++ b/Mage.Sets/src/mage/cards/i/IchorclawMyr.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,7 +46,7 @@ public class IchorclawMyr extends CardImpl { public IchorclawMyr(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/Ichorid.java b/Mage.Sets/src/mage/cards/i/Ichorid.java index 4c53d78988..e5ba87ab0e 100644 --- a/Mage.Sets/src/mage/cards/i/Ichorid.java +++ b/Mage.Sets/src/mage/cards/i/Ichorid.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.FilterCard; @@ -60,7 +61,7 @@ public class Ichorid extends CardImpl { public Ichorid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/IdentityThief.java b/Mage.Sets/src/mage/cards/i/IdentityThief.java index 015f185e49..0aa01daccf 100644 --- a/Mage.Sets/src/mage/cards/i/IdentityThief.java +++ b/Mage.Sets/src/mage/cards/i/IdentityThief.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetE import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -67,7 +68,7 @@ public class IdentityThief extends CardImpl { public IdentityThief(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/IfhBiffEfreet.java b/Mage.Sets/src/mage/cards/i/IfhBiffEfreet.java index 8463342cfd..60e432e4ab 100644 --- a/Mage.Sets/src/mage/cards/i/IfhBiffEfreet.java +++ b/Mage.Sets/src/mage/cards/i/IfhBiffEfreet.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -58,7 +59,7 @@ public class IfhBiffEfreet extends CardImpl { public IfhBiffEfreet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Efreet"); + this.subtype.add(SubType.EFREET); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/IfnirDeadlands.java b/Mage.Sets/src/mage/cards/i/IfnirDeadlands.java index 86dc112fce..d044cd47f7 100644 --- a/Mage.Sets/src/mage/cards/i/IfnirDeadlands.java +++ b/Mage.Sets/src/mage/cards/i/IfnirDeadlands.java @@ -1,93 +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.cards.i; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.ActivateAsSorceryActivatedAbility; -import mage.abilities.costs.common.PayLifeCost; -import mage.abilities.costs.common.SacrificeTargetCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.abilities.mana.BlackManaAbility; -import mage.abilities.mana.ColorlessManaAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.counters.CounterType; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetOpponentsCreaturePermanent; - -/** - * - * @author jeffwadsworth - */ -public class IfnirDeadlands extends CardImpl { - - private static final FilterControlledPermanent filter = new FilterControlledPermanent("Desert"); - - static { - filter.add(new SubtypePredicate(SubType.DESERT)); - } - - public IfnirDeadlands(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - - this.subtype.add("Desert"); - - // {t}: Add {C} to your mana pool. - this.addAbility(new ColorlessManaAbility()); - - // {t}, Pay 1 life: Add {B} to your mana pool. - Ability manaAbility = new BlackManaAbility(); - manaAbility.addCost(new PayLifeCost(1)); - this.addAbility(manaAbility); - - // {2}{B}{B}, {t}, Sacrifice a Desert: Put two -1/-1 counters on target creature an opponent controls. Activate this ability only any time you could cast a sorcery. - Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.M1M1.createInstance(2)), new ManaCostsImpl("{2}{B}{B}")); - ability.addCost(new TapSourceCost()); - ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, true))); - ability.addTarget(new TargetOpponentsCreaturePermanent()); - this.addAbility(ability); - - } - - public IfnirDeadlands(final IfnirDeadlands card) { - super(card); - } - - @Override - public IfnirDeadlands copy() { - return new IfnirDeadlands(this); - } +/* + * 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.cards.i; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.mana.BlackManaAbility; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetOpponentsCreaturePermanent; + +/** + * + * @author jeffwadsworth + */ +public class IfnirDeadlands extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Desert"); + + static { + filter.add(new SubtypePredicate(SubType.DESERT)); + } + + public IfnirDeadlands(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + this.subtype.add(SubType.DESERT); + + // {t}: Add {C} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {t}, Pay 1 life: Add {B} to your mana pool. + Ability manaAbility = new BlackManaAbility(); + manaAbility.addCost(new PayLifeCost(1)); + this.addAbility(manaAbility); + + // {2}{B}{B}, {t}, Sacrifice a Desert: Put two -1/-1 counters on target creature an opponent controls. Activate this ability only any time you could cast a sorcery. + Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.M1M1.createInstance(2)), new ManaCostsImpl("{2}{B}{B}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, true))); + ability.addTarget(new TargetOpponentsCreaturePermanent()); + this.addAbility(ability); + + } + + public IfnirDeadlands(final IfnirDeadlands card) { + super(card); + } + + @Override + public IfnirDeadlands copy() { + return new IfnirDeadlands(this); + } } \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/i/IgneousGolem.java b/Mage.Sets/src/mage/cards/i/IgneousGolem.java index 03caf517ff..a1107878ce 100644 --- a/Mage.Sets/src/mage/cards/i/IgneousGolem.java +++ b/Mage.Sets/src/mage/cards/i/IgneousGolem.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class IgneousGolem extends CardImpl { public IgneousGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/IgneousPouncer.java b/Mage.Sets/src/mage/cards/i/IgneousPouncer.java index 2c716c6068..cf646a7d31 100644 --- a/Mage.Sets/src/mage/cards/i/IgneousPouncer.java +++ b/Mage.Sets/src/mage/cards/i/IgneousPouncer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SwampcyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class IgneousPouncer extends CardImpl { public IgneousPouncer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); diff --git a/Mage.Sets/src/mage/cards/i/IgniteMemories.java b/Mage.Sets/src/mage/cards/i/IgniteMemories.java index a797cac294..30b01dd623 100644 --- a/Mage.Sets/src/mage/cards/i/IgniteMemories.java +++ b/Mage.Sets/src/mage/cards/i/IgniteMemories.java @@ -28,6 +28,7 @@ package mage.cards.i; import java.util.UUID; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.StormAbility; @@ -49,8 +50,7 @@ import mage.target.TargetPlayer; public class IgniteMemories extends CardImpl { public IgniteMemories(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{R}"); // Target player reveals a card at random from his or her hand. Ignite Memories deals damage to that player equal to that card's converted mana cost. this.getSpellAbility().addTarget(new TargetPlayer()); @@ -69,7 +69,6 @@ public class IgniteMemories extends CardImpl { } } - class IgniteMemoriesEffect extends OneShotEffect { public IgniteMemoriesEffect() { @@ -83,13 +82,17 @@ class IgniteMemoriesEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(targetPointer.getFirst(game, source)); - if (player != null && !player.getHand().isEmpty()) { - Cards revealed = new CardsImpl(); - Card card = player.getHand().getRandom(game); - revealed.add(card); - player.revealCards("Ignite Memories", revealed, game); - player.damage(card.getConvertedManaCost(), id, game, false, true); + Player controller = game.getPlayer(targetPointer.getFirst(game, source)); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null) { + if (!controller.getHand().isEmpty()) { + Cards revealed = new CardsImpl(); + Card card = controller.getHand().getRandom(game); + revealed.add(card); + controller.revealCards(sourceObject.getIdName(), revealed, game); + controller.damage(card.getConvertedManaCost(), source.getSourceId(), game, false, true); + + } return true; } return false; @@ -100,4 +103,4 @@ class IgniteMemoriesEffect extends OneShotEffect { return new IgniteMemoriesEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/i/IgnitionTeam.java b/Mage.Sets/src/mage/cards/i/IgnitionTeam.java index 1b5a5a3c26..6ccdb84dbd 100644 --- a/Mage.Sets/src/mage/cards/i/IgnitionTeam.java +++ b/Mage.Sets/src/mage/cards/i/IgnitionTeam.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -58,8 +59,8 @@ public class IgnitionTeam extends CardImpl { public IgnitionTeam(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(0); this.toughness = new MageInt(0); @@ -120,7 +121,7 @@ class IgnitionTeamToken extends Token { public IgnitionTeamToken() { super("", "4/4 red Elemental creature"); this.cardType.add(CardType.CREATURE); - this.getSubtype(null).add("Elemental"); + this.getSubtype(null).add(SubType.ELEMENTAL); this.color.setRed(true); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/IgnobleSoldier.java b/Mage.Sets/src/mage/cards/i/IgnobleSoldier.java index 3a04355ff6..c463f86462 100644 --- a/Mage.Sets/src/mage/cards/i/IgnobleSoldier.java +++ b/Mage.Sets/src/mage/cards/i/IgnobleSoldier.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.PreventCombatDamageBySourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class IgnobleSoldier extends CardImpl { public IgnobleSoldier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/IgnorantBliss.java b/Mage.Sets/src/mage/cards/i/IgnorantBliss.java index 1b7bee6dac..afc4bcde0f 100644 --- a/Mage.Sets/src/mage/cards/i/IgnorantBliss.java +++ b/Mage.Sets/src/mage/cards/i/IgnorantBliss.java @@ -1,141 +1,141 @@ -/* - * 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.cards.i; - -import java.util.UUID; -import mage.MageObject; -import mage.abilities.Ability; -import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.ReturnFromExileEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.ExileZone; -import mage.game.Game; -import mage.players.Player; -import mage.util.CardUtil; - -/** - * - * @author jeffwadsworth - */ -public class IgnorantBliss extends CardImpl { - - public IgnorantBliss(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); - - // Exile all cards from your hand face down. At the beginning of the next end step, return those cards to your hand, then draw a card. - this.getSpellAbility().addEffect(new IgnorantBlissExileEffect()); - this.getSpellAbility().addEffect(new IgnorantBlissReturnEffect()); - - } - - public IgnorantBliss(final IgnorantBliss card) { - super(card); - } - - @Override - public IgnorantBliss copy() { - return new IgnorantBliss(this); - } -} - -class IgnorantBlissExileEffect extends OneShotEffect { - - IgnorantBlissExileEffect() { - super(Outcome.Exile); - this.staticText = "Exile all cards from your hand face down"; - } - - IgnorantBlissExileEffect(final IgnorantBlissExileEffect effect) { - super(effect); - } - - @Override - public IgnorantBlissExileEffect copy() { - return new IgnorantBlissExileEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - MageObject sourceObject = source.getSourceObject(game); - if (controller != null - && sourceObject != null) { - Cards hand = controller.getHand(); - hand.getCards(game).stream().filter((card) -> (card != null)).map((card) -> { - UUID exileZoneId = CardUtil.getExileZoneId(game, source.getSourceId(), 0); - controller.moveCardsToExile(card, source, game, false, exileZoneId, sourceObject.getIdName()); - return card; - }).forEachOrdered((card) -> { - card.setFaceDown(true, game); - }); - return true; - } - return false; - } -} - -class IgnorantBlissReturnEffect extends OneShotEffect { - - IgnorantBlissReturnEffect() { - super(Outcome.DrawCard); - this.staticText = "At the beginning of the next end step, return those cards to your hand, then draw a card"; - } - - IgnorantBlissReturnEffect(final IgnorantBlissReturnEffect effect) { - super(effect); - } - - @Override - public IgnorantBlissReturnEffect copy() { - return new IgnorantBlissReturnEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - ExileZone exileZone = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(), 0)); - if (exileZone != null) { - Effect effect = new ReturnFromExileEffect(exileZone.getId(), Zone.HAND); - AtTheBeginOfNextEndStepDelayedTriggeredAbility ability = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect); - ability.addEffect(new DrawCardSourceControllerEffect(1)); - game.addDelayedTriggeredAbility(ability, source); - return true; - } - } - return false; - } -} +/* + * 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.cards.i; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.ReturnFromExileEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.ExileZone; +import mage.game.Game; +import mage.players.Player; +import mage.util.CardUtil; + +/** + * + * @author jeffwadsworth + */ +public class IgnorantBliss extends CardImpl { + + public IgnorantBliss(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); + + // Exile all cards from your hand face down. At the beginning of the next end step, return those cards to your hand, then draw a card. + this.getSpellAbility().addEffect(new IgnorantBlissExileEffect()); + this.getSpellAbility().addEffect(new IgnorantBlissReturnEffect()); + + } + + public IgnorantBliss(final IgnorantBliss card) { + super(card); + } + + @Override + public IgnorantBliss copy() { + return new IgnorantBliss(this); + } +} + +class IgnorantBlissExileEffect extends OneShotEffect { + + IgnorantBlissExileEffect() { + super(Outcome.Exile); + this.staticText = "Exile all cards from your hand face down"; + } + + IgnorantBlissExileEffect(final IgnorantBlissExileEffect effect) { + super(effect); + } + + @Override + public IgnorantBlissExileEffect copy() { + return new IgnorantBlissExileEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null + && sourceObject != null) { + Cards hand = controller.getHand(); + hand.getCards(game).stream().filter((card) -> (card != null)).map((card) -> { + UUID exileZoneId = CardUtil.getExileZoneId(game, source.getSourceId(), 0); + controller.moveCardsToExile(card, source, game, false, exileZoneId, sourceObject.getIdName()); + return card; + }).forEachOrdered((card) -> { + card.setFaceDown(true, game); + }); + return true; + } + return false; + } +} + +class IgnorantBlissReturnEffect extends OneShotEffect { + + IgnorantBlissReturnEffect() { + super(Outcome.DrawCard); + this.staticText = "At the beginning of the next end step, return those cards to your hand, then draw a card"; + } + + IgnorantBlissReturnEffect(final IgnorantBlissReturnEffect effect) { + super(effect); + } + + @Override + public IgnorantBlissReturnEffect copy() { + return new IgnorantBlissReturnEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + ExileZone exileZone = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(), 0)); + if (exileZone != null) { + Effect effect = new ReturnFromExileEffect(exileZone.getId(), Zone.HAND); + AtTheBeginOfNextEndStepDelayedTriggeredAbility ability = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect); + ability.addEffect(new DrawCardSourceControllerEffect(1)); + game.addDelayedTriggeredAbility(ability, source); + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/i/IhsansShade.java b/Mage.Sets/src/mage/cards/i/IhsansShade.java index c00a525243..841881c9fd 100644 --- a/Mage.Sets/src/mage/cards/i/IhsansShade.java +++ b/Mage.Sets/src/mage/cards/i/IhsansShade.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -45,8 +46,8 @@ public class IhsansShade extends CardImpl { public IhsansShade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Shade"); - this.subtype.add("Knight"); + this.subtype.add(SubType.SHADE); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/i/IizukaTheRuthless.java b/Mage.Sets/src/mage/cards/i/IizukaTheRuthless.java index c5260456e0..392fa2ea14 100644 --- a/Mage.Sets/src/mage/cards/i/IizukaTheRuthless.java +++ b/Mage.Sets/src/mage/cards/i/IizukaTheRuthless.java @@ -58,8 +58,8 @@ public class IizukaTheRuthless extends CardImpl { public IizukaTheRuthless(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/IkiralOutrider.java b/Mage.Sets/src/mage/cards/i/IkiralOutrider.java index c2aed702bf..25391cdbbd 100644 --- a/Mage.Sets/src/mage/cards/i/IkiralOutrider.java +++ b/Mage.Sets/src/mage/cards/i/IkiralOutrider.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardSetInfo; import mage.cards.LevelerCard; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -49,8 +50,8 @@ public class IkiralOutrider extends LevelerCard { public IkiralOutrider (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.color.setWhite(true); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/IkraShidiqiTheUsurper.java b/Mage.Sets/src/mage/cards/i/IkraShidiqiTheUsurper.java index 7491c51874..cb990d4622 100644 --- a/Mage.Sets/src/mage/cards/i/IkraShidiqiTheUsurper.java +++ b/Mage.Sets/src/mage/cards/i/IkraShidiqiTheUsurper.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.PartnerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.game.Game; @@ -54,8 +55,8 @@ public class IkraShidiqiTheUsurper extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Naga"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/i/IllTemperedCyclops.java b/Mage.Sets/src/mage/cards/i/IllTemperedCyclops.java index faed092b4f..c9364cd75c 100644 --- a/Mage.Sets/src/mage/cards/i/IllTemperedCyclops.java +++ b/Mage.Sets/src/mage/cards/i/IllTemperedCyclops.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class IllTemperedCyclops extends CardImpl { public IllTemperedCyclops(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Cyclops"); + this.subtype.add(SubType.CYCLOPS); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/IllicitAuction.java b/Mage.Sets/src/mage/cards/i/IllicitAuction.java index 32b4742e69..bb87c8d63c 100644 --- a/Mage.Sets/src/mage/cards/i/IllicitAuction.java +++ b/Mage.Sets/src/mage/cards/i/IllicitAuction.java @@ -137,18 +137,19 @@ class CreatureEvaluator { public int evaluate(Permanent creature, Game game) { if (!values.containsKey(creature.getId())) { int value = 0; - if (creature.canAttack(game)) + if (creature.canAttack(null, game)) { value += 2; + } value += creature.getPower().getValue(); value += creature.getToughness().getValue(); value += creature.getAbilities().getEvasionAbilities().size(); value += creature.getAbilities().getProtectionAbilities().size(); - value += creature.getAbilities().containsKey(FirstStrikeAbility.getInstance().getId())?1:0; - value += creature.getAbilities().containsKey(DoubleStrikeAbility.getInstance().getId())?2:0; - value += creature.getAbilities().containsKey(TrampleAbility.getInstance().getId())?1:0; + value += creature.getAbilities().containsKey(FirstStrikeAbility.getInstance().getId()) ? 1 : 0; + value += creature.getAbilities().containsKey(DoubleStrikeAbility.getInstance().getId()) ? 2 : 0; + value += creature.getAbilities().containsKey(TrampleAbility.getInstance().getId()) ? 1 : 0; values.put(creature.getId(), value); } return values.get(creature.getId()); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/i/Illuminate.java b/Mage.Sets/src/mage/cards/i/Illuminate.java index a357d8f9a4..9ee484a69a 100644 --- a/Mage.Sets/src/mage/cards/i/Illuminate.java +++ b/Mage.Sets/src/mage/cards/i/Illuminate.java @@ -47,7 +47,7 @@ import mage.target.common.TargetCreaturePermanent; public class Illuminate extends CardImpl { public Illuminate(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}"); // Kicker {2}{R} and/or {3}{U} KickerAbility kickerAbility = new KickerAbility("{2}{R}"); @@ -57,13 +57,13 @@ public class Illuminate extends CardImpl { this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new ConditionalOneShotEffect( - new DamageTargetControllerEffect(new ManacostVariableValue()), - new KickedCostCondition("{2}{R}"), - "If {this} was kicked with its {2}{R} kicker, it deals X damage to that creature's controller.")); + new DamageTargetControllerEffect(new ManacostVariableValue()), + new KickedCostCondition("{2}{R}"), + "If {this} was kicked with its {2}{R} kicker, it deals X damage to that creature's controller.")); this.getSpellAbility().addEffect(new ConditionalOneShotEffect( - new DrawCardSourceControllerEffect(new ManacostVariableValue()), - new KickedCostCondition("{3}{U}"), - "If {this} was kicked with its {3}{U} kicker, you draw X cards.")); + new DrawCardSourceControllerEffect(new ManacostVariableValue()), + new KickedCostCondition("{3}{U}"), + " If {this} was kicked with its {3}{U} kicker, you draw X cards.")); } diff --git a/Mage.Sets/src/mage/cards/i/IlluminatedWings.java b/Mage.Sets/src/mage/cards/i/IlluminatedWings.java index d18e219113..292d9ed095 100644 --- a/Mage.Sets/src/mage/cards/i/IlluminatedWings.java +++ b/Mage.Sets/src/mage/cards/i/IlluminatedWings.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -55,7 +56,7 @@ public class IlluminatedWings extends CardImpl { public IlluminatedWings(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/i/IllusionaryArmor.java b/Mage.Sets/src/mage/cards/i/IllusionaryArmor.java index e109521a37..8c3a2927bb 100644 --- a/Mage.Sets/src/mage/cards/i/IllusionaryArmor.java +++ b/Mage.Sets/src/mage/cards/i/IllusionaryArmor.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class IllusionaryArmor extends CardImpl { public IllusionaryArmor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant Creature diff --git a/Mage.Sets/src/mage/cards/i/IllusionaryForces.java b/Mage.Sets/src/mage/cards/i/IllusionaryForces.java index 3c1648cf7b..a6e6ebe9f0 100644 --- a/Mage.Sets/src/mage/cards/i/IllusionaryForces.java +++ b/Mage.Sets/src/mage/cards/i/IllusionaryForces.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class IllusionaryForces extends CardImpl { public IllusionaryForces(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/IllusionaryServant.java b/Mage.Sets/src/mage/cards/i/IllusionaryServant.java index 1979efdbe9..db30aede78 100644 --- a/Mage.Sets/src/mage/cards/i/IllusionaryServant.java +++ b/Mage.Sets/src/mage/cards/i/IllusionaryServant.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class IllusionaryServant extends CardImpl { public IllusionaryServant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/IllusionaryWall.java b/Mage.Sets/src/mage/cards/i/IllusionaryWall.java index 3bc030720e..862b899ae7 100644 --- a/Mage.Sets/src/mage/cards/i/IllusionaryWall.java +++ b/Mage.Sets/src/mage/cards/i/IllusionaryWall.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class IllusionaryWall extends CardImpl { public IllusionaryWall(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Illusion"); - this.subtype.add("Wall"); + this.subtype.add(SubType.ILLUSION); + this.subtype.add(SubType.WALL); this.power = new MageInt(7); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/IllusionistsBracers.java b/Mage.Sets/src/mage/cards/i/IllusionistsBracers.java index 4bfb89106b..c5de31a6ab 100644 --- a/Mage.Sets/src/mage/cards/i/IllusionistsBracers.java +++ b/Mage.Sets/src/mage/cards/i/IllusionistsBracers.java @@ -38,6 +38,7 @@ import mage.abilities.mana.ActivatedManaAbilityImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -55,7 +56,7 @@ public class IllusionistsBracers extends CardImpl { public IllusionistsBracers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Whenever an ability of equipped creature is activated, if it isn't a mana ability, copy that ability. You may choose new targets for the copy. this.addAbility(new AbilityActivatedTriggeredAbility()); diff --git a/Mage.Sets/src/mage/cards/i/IllusionistsStratagem.java b/Mage.Sets/src/mage/cards/i/IllusionistsStratagem.java index 5a2386763e..8d4addc91e 100644 --- a/Mage.Sets/src/mage/cards/i/IllusionistsStratagem.java +++ b/Mage.Sets/src/mage/cards/i/IllusionistsStratagem.java @@ -1,71 +1,71 @@ -/* - * 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.cards.i; - -import java.util.UUID; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.ExileTargetForSourceEffect; -import mage.abilities.effects.common.ReturnToBattlefieldUnderYourControlTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.target.common.TargetControlledCreaturePermanent; - -/** - * - * @author Styxo - */ -public class IllusionistsStratagem extends CardImpl { - - public IllusionistsStratagem(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}"); - - // Exile up to two target creatures you control, then return those cards to the battlefield under their owner's control. - this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, 2, new FilterControlledCreaturePermanent("creatures you control"), false)); - Effect effect = new ExileTargetForSourceEffect(); - effect.setText("Exile up to two target creatures you control"); - this.getSpellAbility().addEffect(effect); - effect = new ReturnToBattlefieldUnderYourControlTargetEffect(true); - effect.setText(", then return those cards to the battlefield under their owner's control"); - this.getSpellAbility().addEffect(effect); - - // Draw a card. - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); - } - - public IllusionistsStratagem(final IllusionistsStratagem card) { - super(card); - } - - @Override - public IllusionistsStratagem copy() { - return new IllusionistsStratagem(this); - } -} +/* + * 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.cards.i; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.ExileTargetForSourceEffect; +import mage.abilities.effects.common.ReturnToBattlefieldUnderYourControlTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author Styxo + */ +public class IllusionistsStratagem extends CardImpl { + + public IllusionistsStratagem(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}"); + + // Exile up to two target creatures you control, then return those cards to the battlefield under their owner's control. + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, 2, new FilterControlledCreaturePermanent("creatures you control"), false)); + Effect effect = new ExileTargetForSourceEffect(); + effect.setText("Exile up to two target creatures you control"); + this.getSpellAbility().addEffect(effect); + effect = new ReturnToBattlefieldUnderYourControlTargetEffect(true); + effect.setText(", then return those cards to the battlefield under their owner's control"); + this.getSpellAbility().addEffect(effect); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public IllusionistsStratagem(final IllusionistsStratagem card) { + super(card); + } + + @Override + public IllusionistsStratagem copy() { + return new IllusionistsStratagem(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/IllusoryAmbusher.java b/Mage.Sets/src/mage/cards/i/IllusoryAmbusher.java index 0519311b4a..e41b9a464f 100644 --- a/Mage.Sets/src/mage/cards/i/IllusoryAmbusher.java +++ b/Mage.Sets/src/mage/cards/i/IllusoryAmbusher.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -48,17 +49,17 @@ import mage.players.Player; public class IllusoryAmbusher extends CardImpl { public IllusoryAmbusher(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Cat"); - this.subtype.add("Illusion"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(4); this.toughness = new MageInt(1); // Flash this.addAbility(FlashAbility.getInstance()); - + // Whenever Illusory Ambusher is dealt damage, draw that many cards. - this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new IllusoryAmbusherDealtDamageEffect(), false)); + this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new IllusoryAmbusherDealtDamageEffect(), false, false, true)); } public IllusoryAmbusher(final IllusoryAmbusher card) { @@ -99,4 +100,4 @@ class IllusoryAmbusherDealtDamageEffect extends OneShotEffect { } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/i/IllusoryAngel.java b/Mage.Sets/src/mage/cards/i/IllusoryAngel.java index df0fe9b111..3b084fe5dc 100644 --- a/Mage.Sets/src/mage/cards/i/IllusoryAngel.java +++ b/Mage.Sets/src/mage/cards/i/IllusoryAngel.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class IllusoryAngel extends CardImpl { public IllusoryAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Angel"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ANGEL); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/IllusoryDemon.java b/Mage.Sets/src/mage/cards/i/IllusoryDemon.java index 033b5fffc6..e5db8d487f 100644 --- a/Mage.Sets/src/mage/cards/i/IllusoryDemon.java +++ b/Mage.Sets/src/mage/cards/i/IllusoryDemon.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class IllusoryDemon extends CardImpl { public IllusoryDemon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}"); - this.subtype.add("Demon"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.DEMON); + this.subtype.add(SubType.ILLUSION); diff --git a/Mage.Sets/src/mage/cards/i/IllusoryGains.java b/Mage.Sets/src/mage/cards/i/IllusoryGains.java index 5e40297746..d2b7f01df0 100644 --- a/Mage.Sets/src/mage/cards/i/IllusoryGains.java +++ b/Mage.Sets/src/mage/cards/i/IllusoryGains.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.constants.TargetController; @@ -64,8 +65,8 @@ public class IllusoryGains extends CardImpl { } public IllusoryGains(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}{U}"); - this.subtype.add("Aura"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}{U}"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); @@ -79,7 +80,7 @@ public class IllusoryGains extends CardImpl { // Whenever a creature enters the battlefield under an opponent's control, attach Illusory Gains to that creature. this.addAbility(new EntersBattlefieldAllTriggeredAbility( - Zone.BATTLEFIELD, new IllusoryGainsEffect(), filter, false, SetTargetPointer.PERMANENT, "Whenever a creature enters the battlefield under an opponent's control, you attach Illusory Gains to that creature.")); + Zone.BATTLEFIELD, new IllusoryGainsEffect(), filter, false, SetTargetPointer.PERMANENT, "Whenever a creature enters the battlefield under an opponent's control, attach Illusory Gains to that creature.")); } public IllusoryGains(final IllusoryGains card) { diff --git a/Mage.Sets/src/mage/cards/i/IllusoryWrappings.java b/Mage.Sets/src/mage/cards/i/IllusoryWrappings.java index 45b5b6c343..e305bb678c 100644 --- a/Mage.Sets/src/mage/cards/i/IllusoryWrappings.java +++ b/Mage.Sets/src/mage/cards/i/IllusoryWrappings.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -50,7 +51,7 @@ public class IllusoryWrappings extends CardImpl { public IllusoryWrappings(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/i/Imagecrafter.java b/Mage.Sets/src/mage/cards/i/Imagecrafter.java index 8c7f7bcced..52aca24e9b 100644 --- a/Mage.Sets/src/mage/cards/i/Imagecrafter.java +++ b/Mage.Sets/src/mage/cards/i/Imagecrafter.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BecomesChosenCreatureTypeTargetE import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -47,8 +48,8 @@ public class Imagecrafter extends CardImpl { public Imagecrafter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/ImagesOfThePast.java b/Mage.Sets/src/mage/cards/i/ImagesOfThePast.java index 047427d8bb..f8fd54d611 100644 --- a/Mage.Sets/src/mage/cards/i/ImagesOfThePast.java +++ b/Mage.Sets/src/mage/cards/i/ImagesOfThePast.java @@ -1,102 +1,102 @@ -/* - * 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.cards.i; - -import java.util.List; -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.common.FilterCreatureCard; -import mage.game.Game; -import mage.players.Player; -import mage.target.common.TargetCardInYourGraveyard; - -/** - * - * @author Styxo - */ -public class ImagesOfThePast extends CardImpl { - - public ImagesOfThePast(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}{W}"); - - // Return up to two target creature cards from your graveyard to the battlefield, then exile those creatures. - this.getSpellAbility().addEffect(new ImagesOfThePastEffect()); - this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 2, new FilterCreatureCard("creature cards from your graveyard"))); - - } - - public ImagesOfThePast(final ImagesOfThePast card) { - super(card); - } - - @Override - public ImagesOfThePast copy() { - return new ImagesOfThePast(this); - } -} - -class ImagesOfThePastEffect extends OneShotEffect { - - ImagesOfThePastEffect() { - super(Outcome.PutCreatureInPlay); - this.staticText = "Return up to two target creature cards from your graveyard to the battlefield, then exile those creatures"; - } - - ImagesOfThePastEffect(final ImagesOfThePastEffect effect) { - super(effect); - } - - @Override - public ImagesOfThePastEffect copy() { - return new ImagesOfThePastEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { - List targets = source.getTargets().get(0).getTargets(); - for (UUID targetId : targets) { - Card card = game.getCard(targetId); - if (card != null) { - player.moveCards(card, Zone.BATTLEFIELD, source, game); - player.moveCards(card, Zone.EXILED, source, game); - } - } - return true; - } - return false; - } -} +/* + * 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.cards.i; + +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author Styxo + */ +public class ImagesOfThePast extends CardImpl { + + public ImagesOfThePast(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}{W}"); + + // Return up to two target creature cards from your graveyard to the battlefield, then exile those creatures. + this.getSpellAbility().addEffect(new ImagesOfThePastEffect()); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 2, new FilterCreatureCard("creature cards from your graveyard"))); + + } + + public ImagesOfThePast(final ImagesOfThePast card) { + super(card); + } + + @Override + public ImagesOfThePast copy() { + return new ImagesOfThePast(this); + } +} + +class ImagesOfThePastEffect extends OneShotEffect { + + ImagesOfThePastEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "Return up to two target creature cards from your graveyard to the battlefield, then exile those creatures"; + } + + ImagesOfThePastEffect(final ImagesOfThePastEffect effect) { + super(effect); + } + + @Override + public ImagesOfThePastEffect copy() { + return new ImagesOfThePastEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + List targets = source.getTargets().get(0).getTargets(); + for (UUID targetId : targets) { + Card card = game.getCard(targetId); + if (card != null) { + player.moveCards(card, Zone.BATTLEFIELD, source, game); + player.moveCards(card, Zone.EXILED, source, game); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/i/ImaginaryPet.java b/Mage.Sets/src/mage/cards/i/ImaginaryPet.java index a1d474638d..8d20c701ad 100644 --- a/Mage.Sets/src/mage/cards/i/ImaginaryPet.java +++ b/Mage.Sets/src/mage/cards/i/ImaginaryPet.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.TargetController; @@ -48,7 +49,7 @@ public class ImaginaryPet extends CardImpl { public ImaginaryPet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/ImmaculateMagistrate.java b/Mage.Sets/src/mage/cards/i/ImmaculateMagistrate.java index 8debf39ecf..6354abe13c 100644 --- a/Mage.Sets/src/mage/cards/i/ImmaculateMagistrate.java +++ b/Mage.Sets/src/mage/cards/i/ImmaculateMagistrate.java @@ -54,8 +54,8 @@ public class ImmaculateMagistrate extends CardImpl { public ImmaculateMagistrate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/Immerwolf.java b/Mage.Sets/src/mage/cards/i/Immerwolf.java index ba779f9ce8..05ebd73ae7 100644 --- a/Mage.Sets/src/mage/cards/i/Immerwolf.java +++ b/Mage.Sets/src/mage/cards/i/Immerwolf.java @@ -59,7 +59,7 @@ public class Immerwolf extends CardImpl { public Immerwolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{G}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/ImmobilizerEldrazi.java b/Mage.Sets/src/mage/cards/i/ImmobilizerEldrazi.java index 052436c03e..710547162d 100644 --- a/Mage.Sets/src/mage/cards/i/ImmobilizerEldrazi.java +++ b/Mage.Sets/src/mage/cards/i/ImmobilizerEldrazi.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -58,8 +59,8 @@ public class ImmobilizerEldrazi extends CardImpl { public ImmobilizerEldrazi(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/ImmobilizingInk.java b/Mage.Sets/src/mage/cards/i/ImmobilizingInk.java index 98fdc7e7cd..91648cbf4c 100644 --- a/Mage.Sets/src/mage/cards/i/ImmobilizingInk.java +++ b/Mage.Sets/src/mage/cards/i/ImmobilizingInk.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class ImmobilizingInk extends CardImpl { public ImmobilizingInk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/i/ImmolatingSouleater.java b/Mage.Sets/src/mage/cards/i/ImmolatingSouleater.java index 3b61af85fe..dfaf9a7229 100644 --- a/Mage.Sets/src/mage/cards/i/ImmolatingSouleater.java +++ b/Mage.Sets/src/mage/cards/i/ImmolatingSouleater.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class ImmolatingSouleater extends CardImpl { public ImmolatingSouleater(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/Immolation.java b/Mage.Sets/src/mage/cards/i/Immolation.java index d72ba41728..a66c785ef1 100644 --- a/Mage.Sets/src/mage/cards/i/Immolation.java +++ b/Mage.Sets/src/mage/cards/i/Immolation.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -49,7 +50,7 @@ public class Immolation extends CardImpl { public Immolation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/i/ImpalerShrike.java b/Mage.Sets/src/mage/cards/i/ImpalerShrike.java index f03a622939..90348bd9ad 100644 --- a/Mage.Sets/src/mage/cards/i/ImpalerShrike.java +++ b/Mage.Sets/src/mage/cards/i/ImpalerShrike.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class ImpalerShrike extends CardImpl { public ImpalerShrike(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/ImpelledGiant.java b/Mage.Sets/src/mage/cards/i/ImpelledGiant.java index 7c9cb6d2fa..5bec4dc3ec 100644 --- a/Mage.Sets/src/mage/cards/i/ImpelledGiant.java +++ b/Mage.Sets/src/mage/cards/i/ImpelledGiant.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -71,8 +72,8 @@ public class ImpelledGiant extends CardImpl { public ImpelledGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/ImperialAerosaur.java b/Mage.Sets/src/mage/cards/i/ImperialAerosaur.java new file mode 100644 index 0000000000..a40cf227aa --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/ImperialAerosaur.java @@ -0,0 +1,90 @@ +/* + * 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.cards.i; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class ImperialAerosaur extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + filter.add(new AnotherPredicate()); + } + + public ImperialAerosaur(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Imperial Aerosaur enters the battlefield, another target creature you control gets +1/+1 and gains flying until end of turn. + Effect effect = new BoostTargetEffect(1, 1, Duration.EndOfTurn); + effect.setText("another target creature you control gets +1/+1"); + EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(effect); + effect = new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains flying until end of turn"); + ability.addEffect(effect); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public ImperialAerosaur(final ImperialAerosaur card) { + super(card); + } + + @Override + public ImperialAerosaur copy() { + return new ImperialAerosaur(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/ImperialEdict.java b/Mage.Sets/src/mage/cards/i/ImperialEdict.java new file mode 100644 index 0000000000..90179d846b --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/ImperialEdict.java @@ -0,0 +1,106 @@ +/* + * 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.cards.i; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.TargetPermanent; +import mage.target.common.TargetOpponent; + +/** + * + * @author TheElk801 + */ +public class ImperialEdict extends CardImpl { + + public ImperialEdict(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}"); + + // Target opponent chooses a creature he or she controls. Destroy it. + this.getSpellAbility().addEffect(new ImperialEdictEffect()); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public ImperialEdict(final ImperialEdict card) { + super(card); + } + + @Override + public ImperialEdict copy() { + return new ImperialEdict(this); + } +} + +class ImperialEdictEffect extends OneShotEffect { + + ImperialEdictEffect() { + super(Outcome.Benefit); + this.staticText = "Target opponent chooses a creature he or she controls. Destroy it."; + } + + ImperialEdictEffect(final ImperialEdictEffect effect) { + super(effect); + } + + @Override + public ImperialEdictEffect copy() { + return new ImperialEdictEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getFirstTarget()); + if (player == null) { + return false; + } + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you control"); + filter.add(new ControllerIdPredicate(player.getId())); + Target target = new TargetPermanent(1, 1, filter, true); + if (target.canChoose(source.getSourceId(), player.getId(), game)) { + while (!target.isChosen() && target.canChoose(player.getId(), game) && player.canRespond()) { + player.chooseTarget(Outcome.DestroyPermanent, target, source, game); + } + Permanent permanent = game.getPermanent(target.getFirstTarget()); + if (permanent != null) { + permanent.destroy(source.getSourceId(), game, false); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/i/ImperialGunner.java b/Mage.Sets/src/mage/cards/i/ImperialGunner.java index e49d39b797..9ca9bffa95 100644 --- a/Mage.Sets/src/mage/cards/i/ImperialGunner.java +++ b/Mage.Sets/src/mage/cards/i/ImperialGunner.java @@ -1,80 +1,80 @@ -/* - * 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.cards.i; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.DamageTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterCreatureOrPlayer; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetCreatureOrPlayer; - -/** - * - * @author Styxo - */ -public class ImperialGunner extends CardImpl { - - private static final FilterCreatureOrPlayer filter = new FilterCreatureOrPlayer("target player or Starship creature"); - - static { - filter.getCreatureFilter().add(new SubtypePredicate(SubType.STARSHIP)); - } - - public ImperialGunner(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.power = new MageInt(1); - this.toughness = new MageInt(2); - - // {1},{T}:Imperial Gunner deals 1 damage to target player or Starship creature. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}")); - ability.addTarget(new TargetCreatureOrPlayer(filter)); - ability.addCost(new TapSourceCost()); - this.addAbility(ability); - } - - public ImperialGunner(final ImperialGunner card) { - super(card); - } - - @Override - public ImperialGunner copy() { - return new ImperialGunner(this); - } -} +/* + * 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.cards.i; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureOrPlayer; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author Styxo + */ +public class ImperialGunner extends CardImpl { + + private static final FilterCreatureOrPlayer filter = new FilterCreatureOrPlayer("target player or Starship creature"); + + static { + filter.getCreatureFilter().add(new SubtypePredicate(SubType.STARSHIP)); + } + + public ImperialGunner(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {1},{T}:Imperial Gunner deals 1 damage to target player or Starship creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}")); + ability.addTarget(new TargetCreatureOrPlayer(filter)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public ImperialGunner(final ImperialGunner card) { + super(card); + } + + @Override + public ImperialGunner copy() { + return new ImperialGunner(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/ImperialHellkite.java b/Mage.Sets/src/mage/cards/i/ImperialHellkite.java index a70861b715..0728eec05d 100644 --- a/Mage.Sets/src/mage/cards/i/ImperialHellkite.java +++ b/Mage.Sets/src/mage/cards/i/ImperialHellkite.java @@ -50,7 +50,7 @@ public class ImperialHellkite extends CardImpl { public ImperialHellkite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/i/ImperialLancer.java b/Mage.Sets/src/mage/cards/i/ImperialLancer.java new file mode 100644 index 0000000000..feb477524f --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/ImperialLancer.java @@ -0,0 +1,80 @@ +/* + * 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.cards.i; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author TheElk801 + */ +public class ImperialLancer extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Dinosaur"); + + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + } + + public ImperialLancer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Imperial Lancer has double strike as long as you control a Dinosaur. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new ConditionalContinuousEffect(new GainAbilitySourceEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield), + new PermanentsOnTheBattlefieldCondition(filter), "{this} has double strike as long as you control a Dinosaur"))); + } + + public ImperialLancer(final ImperialLancer card) { + super(card); + } + + @Override + public ImperialLancer copy() { + return new ImperialLancer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/ImperialMask.java b/Mage.Sets/src/mage/cards/i/ImperialMask.java new file mode 100644 index 0000000000..d2e64525d3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/ImperialMask.java @@ -0,0 +1,82 @@ +/* + * 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.cards.i; + +import java.util.UUID; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.SourceMatchesFilterCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.InfoEffect; +import mage.abilities.effects.common.continuous.GainAbilityControllerEffect; +import mage.abilities.keyword.HexproofAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.TokenPredicate; + +/** + * + * @author TheElk801 + */ +public class ImperialMask extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent(); + + static { + filter.add(Predicates.not(new TokenPredicate())); + } + + public ImperialMask(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}"); + + // When Imperial Mask enters the battlefield, if it's not a token, each of your teammates puts a token that's a copy of Imperial Mask onto the battlefield. + // No implementation of teammates currently, so no effect needed + this.addAbility(new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new InfoEffect("each of your teammates puts a token that's a copy of {this} onto the battlefield"), false), + new SourceMatchesFilterCondition(filter), + "When {this} enters the battlefield, if it's not a token, " + + "each of your teammates puts a token that's a copy of {this} onto the battlefield" + )); + + // You have hexproof. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControllerEffect(HexproofAbility.getInstance()))); + } + + public ImperialMask(final ImperialMask card) { + super(card); + } + + @Override + public ImperialMask copy() { + return new ImperialMask(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/ImperialRecruiter.java b/Mage.Sets/src/mage/cards/i/ImperialRecruiter.java index be76ce4c3a..1f4bd609b4 100644 --- a/Mage.Sets/src/mage/cards/i/ImperialRecruiter.java +++ b/Mage.Sets/src/mage/cards/i/ImperialRecruiter.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.PowerPredicate; @@ -53,8 +54,8 @@ public class ImperialRecruiter extends CardImpl { public ImperialRecruiter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/Imperiosaur.java b/Mage.Sets/src/mage/cards/i/Imperiosaur.java index 785a643cd3..a630c9a3f9 100644 --- a/Mage.Sets/src/mage/cards/i/Imperiosaur.java +++ b/Mage.Sets/src/mage/cards/i/Imperiosaur.java @@ -33,6 +33,7 @@ import mage.abilities.StaticAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; @@ -45,13 +46,14 @@ import mage.filter.predicate.mageobject.SupertypePredicate; public class Imperiosaur extends CardImpl { private static final FilterLandPermanent filter = new FilterLandPermanent(); + static { filter.add(new SupertypePredicate(SuperType.BASIC)); } public Imperiosaur(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Lizard"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.subtype.add(SubType.DINOSAUR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/i/ImperiousPerfect.java b/Mage.Sets/src/mage/cards/i/ImperiousPerfect.java index 717b11c820..9d7a4caa23 100644 --- a/Mage.Sets/src/mage/cards/i/ImperiousPerfect.java +++ b/Mage.Sets/src/mage/cards/i/ImperiousPerfect.java @@ -57,8 +57,8 @@ public class ImperiousPerfect extends CardImpl { public ImperiousPerfect(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/ImpetuousDevils.java b/Mage.Sets/src/mage/cards/i/ImpetuousDevils.java index 133c61cc27..141e0d1df4 100644 --- a/Mage.Sets/src/mage/cards/i/ImpetuousDevils.java +++ b/Mage.Sets/src/mage/cards/i/ImpetuousDevils.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class ImpetuousDevils extends CardImpl { public ImpetuousDevils(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); this.power = new MageInt(6); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/ImpetuousSunchaser.java b/Mage.Sets/src/mage/cards/i/ImpetuousSunchaser.java index 83629e0231..5fbee7c4c0 100644 --- a/Mage.Sets/src/mage/cards/i/ImpetuousSunchaser.java +++ b/Mage.Sets/src/mage/cards/i/ImpetuousSunchaser.java @@ -29,12 +29,13 @@ package mage.cards.i; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class ImpetuousSunchaser extends CardImpl { public ImpetuousSunchaser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -55,7 +56,7 @@ public class ImpetuousSunchaser extends CardImpl { // Haste this.addAbility(HasteAbility.getInstance()); // Impetuous Sunchaser attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public ImpetuousSunchaser(final ImpetuousSunchaser card) { diff --git a/Mage.Sets/src/mage/cards/i/ImposingSovereign.java b/Mage.Sets/src/mage/cards/i/ImposingSovereign.java index fa86368d26..1b4fa6f0d2 100644 --- a/Mage.Sets/src/mage/cards/i/ImposingSovereign.java +++ b/Mage.Sets/src/mage/cards/i/ImposingSovereign.java @@ -35,6 +35,7 @@ import mage.abilities.effects.ReplacementEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class ImposingSovereign extends CardImpl { public ImposingSovereign(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/ImposingVisage.java b/Mage.Sets/src/mage/cards/i/ImposingVisage.java index 737bba29a2..8e3d76dd72 100644 --- a/Mage.Sets/src/mage/cards/i/ImposingVisage.java +++ b/Mage.Sets/src/mage/cards/i/ImposingVisage.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class ImposingVisage extends CardImpl { public ImposingVisage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/i/ImprisonedInTheMoon.java b/Mage.Sets/src/mage/cards/i/ImprisonedInTheMoon.java index 1afecae365..a3b7bd8e9b 100644 --- a/Mage.Sets/src/mage/cards/i/ImprisonedInTheMoon.java +++ b/Mage.Sets/src/mage/cards/i/ImprisonedInTheMoon.java @@ -37,6 +37,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -65,7 +66,7 @@ public class ImprisonedInTheMoon extends CardImpl { public ImprisonedInTheMoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature, land, or planeswalker TargetPermanent auraTarget = new TargetPermanent(filter); diff --git a/Mage.Sets/src/mage/cards/i/ImprovisedArmor.java b/Mage.Sets/src/mage/cards/i/ImprovisedArmor.java index 8a7fe8fa15..4230a8f4c5 100644 --- a/Mage.Sets/src/mage/cards/i/ImprovisedArmor.java +++ b/Mage.Sets/src/mage/cards/i/ImprovisedArmor.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class ImprovisedArmor extends CardImpl { public ImprovisedArmor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/i/ImpulsiveWager.java b/Mage.Sets/src/mage/cards/i/ImpulsiveWager.java index 3026668273..b023a00e57 100644 --- a/Mage.Sets/src/mage/cards/i/ImpulsiveWager.java +++ b/Mage.Sets/src/mage/cards/i/ImpulsiveWager.java @@ -1,110 +1,110 @@ -/* - * 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.cards.i; - -import java.util.List; -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.costs.common.DiscardCardCost; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.counters.CounterType; -import mage.game.Game; -import mage.players.Player; -import mage.target.common.TargetOpponentsCreaturePermanent; - -/** - * - * @author Styxo - */ -public class ImpulsiveWager extends CardImpl { - - public ImpulsiveWager(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{R}"); - - // As an additional cost to cast Irresponsible Gambling, discard a card at random. - this.getSpellAbility().addCost(new DiscardCardCost(true)); - - // If the discarded card was a nonland card, draw two cards. Otherwise, put a bounty counter on target creature. - this.getSpellAbility().addEffect(new ImpulsiveWagerEffect()); - this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent()); - } - - public ImpulsiveWager(final ImpulsiveWager card) { - super(card); - } - - @Override - public ImpulsiveWager copy() { - return new ImpulsiveWager(this); - } -} - -class ImpulsiveWagerEffect extends OneShotEffect { - - public ImpulsiveWagerEffect() { - super(Outcome.Benefit); - staticText = "If the discarded card was a nonland card, draw two cards. Otherwise, put a bounty counter on target creature"; - } - - public ImpulsiveWagerEffect(final ImpulsiveWagerEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { - DiscardCardCost cost = (DiscardCardCost) source.getCosts().get(0); - if (cost != null) { - List cards = cost.getCards(); - if (cards.size() == 1 && cards.get(0).isLand()) { - Effect effect = new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()); - effect.setTargetPointer(getTargetPointer()); - effect.apply(game, source); - } else { - player.drawCards(2, game); - } - - } - return true; - } - return false; - } - - @Override - public ImpulsiveWagerEffect copy() { - return new ImpulsiveWagerEffect(this); - } -} +/* + * 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.cards.i; + +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.counters.CounterType; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetOpponentsCreaturePermanent; + +/** + * + * @author Styxo + */ +public class ImpulsiveWager extends CardImpl { + + public ImpulsiveWager(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{R}"); + + // As an additional cost to cast Irresponsible Gambling, discard a card at random. + this.getSpellAbility().addCost(new DiscardCardCost(true)); + + // If the discarded card was a nonland card, draw two cards. Otherwise, put a bounty counter on target creature. + this.getSpellAbility().addEffect(new ImpulsiveWagerEffect()); + this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent()); + } + + public ImpulsiveWager(final ImpulsiveWager card) { + super(card); + } + + @Override + public ImpulsiveWager copy() { + return new ImpulsiveWager(this); + } +} + +class ImpulsiveWagerEffect extends OneShotEffect { + + public ImpulsiveWagerEffect() { + super(Outcome.Benefit); + staticText = "If the discarded card was a nonland card, draw two cards. Otherwise, put a bounty counter on target creature"; + } + + public ImpulsiveWagerEffect(final ImpulsiveWagerEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + DiscardCardCost cost = (DiscardCardCost) source.getCosts().get(0); + if (cost != null) { + List cards = cost.getCards(); + if (cards.size() == 1 && cards.get(0).isLand()) { + Effect effect = new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()); + effect.setTargetPointer(getTargetPointer()); + effect.apply(game, source); + } else { + player.drawCards(2, game); + } + + } + return true; + } + return false; + } + + @Override + public ImpulsiveWagerEffect copy() { + return new ImpulsiveWagerEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/InallaArchmageRitualist.java b/Mage.Sets/src/mage/cards/i/InallaArchmageRitualist.java index b5748d102e..b425301391 100644 --- a/Mage.Sets/src/mage/cards/i/InallaArchmageRitualist.java +++ b/Mage.Sets/src/mage/cards/i/InallaArchmageRitualist.java @@ -42,7 +42,7 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.effects.common.LoseLifeTargetEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; @@ -85,8 +85,8 @@ public class InallaArchmageRitualist extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(5); @@ -139,7 +139,7 @@ class InallaArchmageRitualistEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = ((FixedTarget) getTargetPointer()).getTargetedPermanentOrLKIBattlefield(game); if (permanent != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(null, null, true); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(null, null, true); effect.setTargetPointer(getTargetPointer()); if (effect.apply(game, source)) { for (Permanent tokenPermanent : effect.getAddedPermanent()) { diff --git a/Mage.Sets/src/mage/cards/i/InameAsOne.java b/Mage.Sets/src/mage/cards/i/InameAsOne.java index eda1e5a376..09b917e651 100644 --- a/Mage.Sets/src/mage/cards/i/InameAsOne.java +++ b/Mage.Sets/src/mage/cards/i/InameAsOne.java @@ -71,7 +71,7 @@ public class InameAsOne extends CardImpl { public InameAsOne(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{8}{B}{B}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/i/InameDeathAspect.java b/Mage.Sets/src/mage/cards/i/InameDeathAspect.java index bc20befdd1..dc985f6553 100644 --- a/Mage.Sets/src/mage/cards/i/InameDeathAspect.java +++ b/Mage.Sets/src/mage/cards/i/InameDeathAspect.java @@ -51,7 +51,7 @@ public class InameDeathAspect extends CardImpl { public InameDeathAspect(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/InameLifeAspect.java b/Mage.Sets/src/mage/cards/i/InameLifeAspect.java index 393d210fc0..83c33b9c44 100644 --- a/Mage.Sets/src/mage/cards/i/InameLifeAspect.java +++ b/Mage.Sets/src/mage/cards/i/InameLifeAspect.java @@ -63,7 +63,7 @@ public class InameLifeAspect extends CardImpl { public InameLifeAspect(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/IncandescentSoulstoke.java b/Mage.Sets/src/mage/cards/i/IncandescentSoulstoke.java index 1b598083da..99f152e846 100644 --- a/Mage.Sets/src/mage/cards/i/IncandescentSoulstoke.java +++ b/Mage.Sets/src/mage/cards/i/IncandescentSoulstoke.java @@ -69,8 +69,8 @@ public class IncandescentSoulstoke extends CardImpl { public IncandescentSoulstoke(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/IncitedRabble.java b/Mage.Sets/src/mage/cards/i/IncitedRabble.java index 42ff05b106..ff2cd7bc76 100644 --- a/Mage.Sets/src/mage/cards/i/IncitedRabble.java +++ b/Mage.Sets/src/mage/cards/i/IncitedRabble.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class IncitedRabble extends CardImpl { public IncitedRabble(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(2); this.toughness = new MageInt(3); this.color.setRed(true); diff --git a/Mage.Sets/src/mage/cards/i/IncorrigibleYouths.java b/Mage.Sets/src/mage/cards/i/IncorrigibleYouths.java index 294d206966..afc03f2d9c 100644 --- a/Mage.Sets/src/mage/cards/i/IncorrigibleYouths.java +++ b/Mage.Sets/src/mage/cards/i/IncorrigibleYouths.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MadnessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class IncorrigibleYouths extends CardImpl { public IncorrigibleYouths(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/IncubatorDrone.java b/Mage.Sets/src/mage/cards/i/IncubatorDrone.java index 8d18e1abcc..824744b2ab 100644 --- a/Mage.Sets/src/mage/cards/i/IncubatorDrone.java +++ b/Mage.Sets/src/mage/cards/i/IncubatorDrone.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.EldraziScionToken; /** @@ -46,8 +47,8 @@ public class IncubatorDrone extends CardImpl { public IncubatorDrone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/IncurableOgre.java b/Mage.Sets/src/mage/cards/i/IncurableOgre.java index 546d6031a9..02ed8e68da 100644 --- a/Mage.Sets/src/mage/cards/i/IncurableOgre.java +++ b/Mage.Sets/src/mage/cards/i/IncurableOgre.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class IncurableOgre extends CardImpl { public IncurableOgre (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(5); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/IncursionSpecialist.java b/Mage.Sets/src/mage/cards/i/IncursionSpecialist.java index e9a6151aae..3d1720c92d 100644 --- a/Mage.Sets/src/mage/cards/i/IncursionSpecialist.java +++ b/Mage.Sets/src/mage/cards/i/IncursionSpecialist.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -50,8 +51,8 @@ public class IncursionSpecialist extends CardImpl { public IncursionSpecialist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/IndebtedSamurai.java b/Mage.Sets/src/mage/cards/i/IndebtedSamurai.java index 038d750faa..65dfe635e1 100644 --- a/Mage.Sets/src/mage/cards/i/IndebtedSamurai.java +++ b/Mage.Sets/src/mage/cards/i/IndebtedSamurai.java @@ -56,8 +56,8 @@ public class IndebtedSamurai extends CardImpl { public IndebtedSamurai(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/IndenturedOaf.java b/Mage.Sets/src/mage/cards/i/IndenturedOaf.java index d023f950f7..5bc219da76 100644 --- a/Mage.Sets/src/mage/cards/i/IndenturedOaf.java +++ b/Mage.Sets/src/mage/cards/i/IndenturedOaf.java @@ -1,99 +1,100 @@ -/* - * 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.cards.i; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.PreventionEffectImpl; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; - -/** - * - * @author LevelX2 - */ -public class IndenturedOaf extends CardImpl { - - public IndenturedOaf(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); - this.power = new MageInt(4); - this.toughness = new MageInt(3); - - // Prevent all damage that Indentured Oaf would deal to red creatures. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new IndenturedOafPreventEffectEffect(Duration.WhileOnBattlefield))); - } - - public IndenturedOaf(final IndenturedOaf card) { - super(card); - } - - @Override - public IndenturedOaf copy() { - return new IndenturedOaf(this); - } -} - -class IndenturedOafPreventEffectEffect extends PreventionEffectImpl { - - public IndenturedOafPreventEffectEffect(Duration duration) { - super(duration, Integer.MAX_VALUE, false); - staticText = "Prevent all damage that {this} would deal to red creatures"; - } - - public IndenturedOafPreventEffectEffect(final IndenturedOafPreventEffectEffect effect) { - super(effect); - } - - @Override - public IndenturedOafPreventEffectEffect copy() { - return new IndenturedOafPreventEffectEffect(this); - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - if (super.applies(event, source, game)) { - if (event.getSourceId().equals(source.getSourceId())) { - Permanent damageTo = game.getPermanent(event.getTargetId()); - return damageTo != null && damageTo.getColor(game).isRed(); - } - } - return false; - } - -} +/* + * 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.cards.i; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.PreventionEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author LevelX2 + */ +public class IndenturedOaf extends CardImpl { + + public IndenturedOaf(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Prevent all damage that Indentured Oaf would deal to red creatures. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new IndenturedOafPreventEffectEffect(Duration.WhileOnBattlefield))); + } + + public IndenturedOaf(final IndenturedOaf card) { + super(card); + } + + @Override + public IndenturedOaf copy() { + return new IndenturedOaf(this); + } +} + +class IndenturedOafPreventEffectEffect extends PreventionEffectImpl { + + public IndenturedOafPreventEffectEffect(Duration duration) { + super(duration, Integer.MAX_VALUE, false); + staticText = "Prevent all damage that {this} would deal to red creatures"; + } + + public IndenturedOafPreventEffectEffect(final IndenturedOafPreventEffectEffect effect) { + super(effect); + } + + @Override + public IndenturedOafPreventEffectEffect copy() { + return new IndenturedOafPreventEffectEffect(this); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (super.applies(event, source, game)) { + if (event.getSourceId().equals(source.getSourceId())) { + Permanent damageTo = game.getPermanent(event.getTargetId()); + return damageTo != null && damageTo.getColor(game).isRed(); + } + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/cards/i/IndependentTroops.java b/Mage.Sets/src/mage/cards/i/IndependentTroops.java index a716970ff8..603fafc50e 100644 --- a/Mage.Sets/src/mage/cards/i/IndependentTroops.java +++ b/Mage.Sets/src/mage/cards/i/IndependentTroops.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class IndependentTroops extends CardImpl { public IndependentTroops(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/Indestructibility.java b/Mage.Sets/src/mage/cards/i/Indestructibility.java index 412bc6ec7c..afcad5bfcd 100644 --- a/Mage.Sets/src/mage/cards/i/Indestructibility.java +++ b/Mage.Sets/src/mage/cards/i/Indestructibility.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class Indestructibility extends CardImpl { public Indestructibility(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant permanent diff --git a/Mage.Sets/src/mage/cards/i/IndestructibleAura.java b/Mage.Sets/src/mage/cards/i/IndestructibleAura.java new file mode 100644 index 0000000000..54f3da3375 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/IndestructibleAura.java @@ -0,0 +1,60 @@ +/* + * 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.cards.i; + +import java.util.UUID; +import mage.abilities.effects.common.PreventDamageToTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class IndestructibleAura extends CardImpl { + + public IndestructibleAura(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); + + // Prevent all damage that would be dealt to target creature this turn. + this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, Integer.MAX_VALUE)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public IndestructibleAura(final IndestructibleAura card) { + super(card); + } + + @Override + public IndestructibleAura copy() { + return new IndestructibleAura(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/IndigoFaerie.java b/Mage.Sets/src/mage/cards/i/IndigoFaerie.java index b8db45db2b..7c54bd546b 100644 --- a/Mage.Sets/src/mage/cards/i/IndigoFaerie.java +++ b/Mage.Sets/src/mage/cards/i/IndigoFaerie.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -54,8 +55,8 @@ public class IndigoFaerie extends CardImpl { public IndigoFaerie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/IndomitableAncients.java b/Mage.Sets/src/mage/cards/i/IndomitableAncients.java index 536fee44e3..8ac5abae9c 100644 --- a/Mage.Sets/src/mage/cards/i/IndomitableAncients.java +++ b/Mage.Sets/src/mage/cards/i/IndomitableAncients.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class IndomitableAncients extends CardImpl { public IndomitableAncients(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Treefolk"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(10); diff --git a/Mage.Sets/src/mage/cards/i/IndomitableArchangel.java b/Mage.Sets/src/mage/cards/i/IndomitableArchangel.java index c48a499e2f..452ecae6f1 100644 --- a/Mage.Sets/src/mage/cards/i/IndomitableArchangel.java +++ b/Mage.Sets/src/mage/cards/i/IndomitableArchangel.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -60,7 +61,7 @@ public class IndomitableArchangel extends CardImpl { public IndomitableArchangel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/IndomitableWill.java b/Mage.Sets/src/mage/cards/i/IndomitableWill.java index 6a8ca89b9d..aa67acafc3 100644 --- a/Mage.Sets/src/mage/cards/i/IndomitableWill.java +++ b/Mage.Sets/src/mage/cards/i/IndomitableWill.java @@ -49,7 +49,7 @@ public class IndomitableWill extends CardImpl { public IndomitableWill (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/i/IndrikStomphowler.java b/Mage.Sets/src/mage/cards/i/IndrikStomphowler.java index 4ba730da6e..ca867e6a46 100644 --- a/Mage.Sets/src/mage/cards/i/IndrikStomphowler.java +++ b/Mage.Sets/src/mage/cards/i/IndrikStomphowler.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.TargetPermanent; @@ -46,7 +47,7 @@ public class IndrikStomphowler extends CardImpl { public IndrikStomphowler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/IndrikUmbra.java b/Mage.Sets/src/mage/cards/i/IndrikUmbra.java index 6989ce5728..f54734d2f6 100644 --- a/Mage.Sets/src/mage/cards/i/IndrikUmbra.java +++ b/Mage.Sets/src/mage/cards/i/IndrikUmbra.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class IndrikUmbra extends CardImpl { public IndrikUmbra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{G}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/i/IndulgentAristocrat.java b/Mage.Sets/src/mage/cards/i/IndulgentAristocrat.java index 2da37a70b4..01af997ac0 100644 --- a/Mage.Sets/src/mage/cards/i/IndulgentAristocrat.java +++ b/Mage.Sets/src/mage/cards/i/IndulgentAristocrat.java @@ -60,7 +60,7 @@ public class IndulgentAristocrat extends CardImpl { public IndulgentAristocrat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/IndulgentTormentor.java b/Mage.Sets/src/mage/cards/i/IndulgentTormentor.java index 9329f88174..03db8583cc 100644 --- a/Mage.Sets/src/mage/cards/i/IndulgentTormentor.java +++ b/Mage.Sets/src/mage/cards/i/IndulgentTormentor.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.game.Game; @@ -54,7 +55,7 @@ public class IndulgentTormentor extends CardImpl { public IndulgentTormentor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/InertiaBubble.java b/Mage.Sets/src/mage/cards/i/InertiaBubble.java index 23c8d4b954..0cd76bcd38 100644 --- a/Mage.Sets/src/mage/cards/i/InertiaBubble.java +++ b/Mage.Sets/src/mage/cards/i/InertiaBubble.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -48,7 +49,7 @@ public class InertiaBubble extends CardImpl { public InertiaBubble(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant artifact TargetPermanent auraTarget = new TargetArtifactPermanent(); diff --git a/Mage.Sets/src/mage/cards/i/InescapableBrute.java b/Mage.Sets/src/mage/cards/i/InescapableBrute.java index c91b93ef7b..0b0605e121 100644 --- a/Mage.Sets/src/mage/cards/i/InescapableBrute.java +++ b/Mage.Sets/src/mage/cards/i/InescapableBrute.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class InescapableBrute extends CardImpl { public InescapableBrute(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/InexorableBlob.java b/Mage.Sets/src/mage/cards/i/InexorableBlob.java index 17ad43f7aa..8ed15040e5 100644 --- a/Mage.Sets/src/mage/cards/i/InexorableBlob.java +++ b/Mage.Sets/src/mage/cards/i/InexorableBlob.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.InexorableBlobOozeToken; /** @@ -46,7 +47,7 @@ public class InexorableBlob extends CardImpl { public InexorableBlob(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Ooze"); + this.subtype.add(SubType.OOZE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/InfantryVeteran.java b/Mage.Sets/src/mage/cards/i/InfantryVeteran.java index 50e5812d41..5885edac14 100644 --- a/Mage.Sets/src/mage/cards/i/InfantryVeteran.java +++ b/Mage.Sets/src/mage/cards/i/InfantryVeteran.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetAttackingCreature; @@ -49,8 +50,8 @@ public class InfantryVeteran extends CardImpl { public InfantryVeteran(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/InfectedVermin.java b/Mage.Sets/src/mage/cards/i/InfectedVermin.java index dc7d9b0993..b0508395d5 100644 --- a/Mage.Sets/src/mage/cards/i/InfectedVermin.java +++ b/Mage.Sets/src/mage/cards/i/InfectedVermin.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -49,7 +50,7 @@ public class InfectedVermin extends CardImpl { public InfectedVermin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/InfectiousBloodlust.java b/Mage.Sets/src/mage/cards/i/InfectiousBloodlust.java index 44005993cd..db6573bd21 100644 --- a/Mage.Sets/src/mage/cards/i/InfectiousBloodlust.java +++ b/Mage.Sets/src/mage/cards/i/InfectiousBloodlust.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -66,7 +67,7 @@ public class InfectiousBloodlust extends CardImpl { public InfectiousBloodlust(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/i/InfectiousHorror.java b/Mage.Sets/src/mage/cards/i/InfectiousHorror.java index 1e97705e2a..bc51df378c 100644 --- a/Mage.Sets/src/mage/cards/i/InfectiousHorror.java +++ b/Mage.Sets/src/mage/cards/i/InfectiousHorror.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -48,8 +49,8 @@ public class InfectiousHorror extends CardImpl { public InfectiousHorror (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/InfectiousHost.java b/Mage.Sets/src/mage/cards/i/InfectiousHost.java index 6f94b04053..9c659651cf 100644 --- a/Mage.Sets/src/mage/cards/i/InfectiousHost.java +++ b/Mage.Sets/src/mage/cards/i/InfectiousHost.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -45,7 +46,7 @@ public class InfectiousHost extends CardImpl { public InfectiousHost(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/InfernalCaretaker.java b/Mage.Sets/src/mage/cards/i/InfernalCaretaker.java index a448e0b18a..bad19aaabe 100644 --- a/Mage.Sets/src/mage/cards/i/InfernalCaretaker.java +++ b/Mage.Sets/src/mage/cards/i/InfernalCaretaker.java @@ -1,76 +1,76 @@ -/* - * 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.cards.i; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.ReturnToHandFromGraveyardAllEffect; -import mage.abilities.keyword.MorphAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.filter.FilterCard; -import mage.filter.common.FilterBySubtypeCard; - -/** - * - * @author cg5 - */ -public class InfernalCaretaker extends CardImpl { - - private static FilterCard zombieCard = new FilterBySubtypeCard(SubType.ZOMBIE); - - public InfernalCaretaker(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // Morph {3}{B} - this.addAbility(new MorphAbility(this, new ManaCostsImpl("{3}{B}"))); - - // When Infernal Caretaker is turned face up, return all Zombie cards from all graveyards to their owners' hands. - Effect effect = new ReturnToHandFromGraveyardAllEffect(zombieCard); - effect.setText("return all Zombie cards from all graveyards to their owners' hands"); - this.addAbility(new TurnedFaceUpSourceTriggeredAbility(effect)); - } - - public InfernalCaretaker(final InfernalCaretaker card) { - super(card); - } - - @Override - public InfernalCaretaker copy() { - return new InfernalCaretaker(this); - } +/* + * 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.cards.i; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ReturnToHandFromGraveyardAllEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.common.FilterBySubtypeCard; + +/** + * + * @author cg5 + */ +public class InfernalCaretaker extends CardImpl { + + private static FilterCard zombieCard = new FilterBySubtypeCard(SubType.ZOMBIE); + + public InfernalCaretaker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Morph {3}{B} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{3}{B}"))); + + // When Infernal Caretaker is turned face up, return all Zombie cards from all graveyards to their owners' hands. + Effect effect = new ReturnToHandFromGraveyardAllEffect(zombieCard); + effect.setText("return all Zombie cards from all graveyards to their owners' hands"); + this.addAbility(new TurnedFaceUpSourceTriggeredAbility(effect)); + } + + public InfernalCaretaker(final InfernalCaretaker card) { + super(card); + } + + @Override + public InfernalCaretaker copy() { + return new InfernalCaretaker(this); + } } \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/i/InfernalDenizen.java b/Mage.Sets/src/mage/cards/i/InfernalDenizen.java new file mode 100644 index 0000000000..b1526dbe9c --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/InfernalDenizen.java @@ -0,0 +1,164 @@ +/* + * 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.cards.i; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.SourceOnBattlefieldCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.SacrificeControllerEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetOpponent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public class InfernalDenizen extends CardImpl { + + public InfernalDenizen(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{7}{B}"); + + this.subtype.add(SubType.DEMON); + this.power = new MageInt(5); + this.toughness = new MageInt(7); + + // At the beginning of your upkeep, sacrifice two Swamps. If you can't, tap Infernal Denizen, and an opponent may gain control of a creature you control of his or her choice for as long as Infernal Denizen remains on the battlefield. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new InfernalDenizenEffect(), TargetController.YOU, false)); + + // {tap}: Gain control of target creature for as long as Infernal Denizen remains on the battlefield. + ConditionalContinuousEffect effect = new ConditionalContinuousEffect( + new GainControlTargetEffect(Duration.Custom, true), + SourceOnBattlefieldCondition.instance, + "gain control of target creature for as long as {this} remains on the battlefield"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public InfernalDenizen(final InfernalDenizen card) { + super(card); + } + + @Override + public InfernalDenizen copy() { + return new InfernalDenizen(this); + } +} + +class InfernalDenizenEffect extends OneShotEffect { + + private static final FilterPermanent filter = new FilterPermanent(); + + static { + filter.add(new SubtypePredicate(SubType.SWAMP)); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + InfernalDenizenEffect() { + super(Outcome.Benefit); + this.staticText = "sacrifice two Swamps. If you can't, tap {this}, " + + "and an opponent may gain control of a creature you control of his or her choice " + + "for as long as {this} remains on the battlefield"; + } + + InfernalDenizenEffect(final InfernalDenizenEffect effect) { + super(effect); + } + + @Override + public InfernalDenizenEffect copy() { + return new InfernalDenizenEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent creature = game.getPermanent(source.getSourceId()); + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + DynamicValue swamps = new PermanentsOnBattlefieldCount(filter); + boolean canSac = swamps.calculate(game, source, this) > 1; + Effect effect = new SacrificeControllerEffect(filter, 2, "Sacrifice two Swamps"); + effect.apply(game, source); + if (!canSac) { + if (creature != null) { + creature.tap(game); + } + TargetOpponent targetOpp = new TargetOpponent(true); + if (targetOpp.canChoose(player.getId(), game) + && targetOpp.choose(Outcome.Detriment, player.getId(), source.getSourceId(), game)) { + Player opponent = game.getPlayer(targetOpp.getFirstTarget()); + if (opponent != null) { + FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creature controlled by " + player.getLogName()); + filter2.add(new ControllerIdPredicate(player.getId())); + TargetCreaturePermanent targetCreature = new TargetCreaturePermanent(1, 1, filter2, true); + targetCreature.setTargetController(opponent.getId()); + if (targetCreature.canChoose(id, game) + && opponent.chooseUse(Outcome.GainControl, "Gain control of a creature?", source, game) + && opponent.chooseTarget(Outcome.GainControl, targetCreature, source, game)) { + ConditionalContinuousEffect giveEffect = new ConditionalContinuousEffect( + new GainControlTargetEffect(Duration.Custom, true, opponent.getId()), + SourceOnBattlefieldCondition.instance, + ""); + giveEffect.setTargetPointer(new FixedTarget(targetCreature.getFirstTarget())); + game.addEffect(giveEffect, source); + return true; + } + } + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/i/InfernalKirin.java b/Mage.Sets/src/mage/cards/i/InfernalKirin.java index 46387f037c..8ac95b840b 100644 --- a/Mage.Sets/src/mage/cards/i/InfernalKirin.java +++ b/Mage.Sets/src/mage/cards/i/InfernalKirin.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -54,10 +55,10 @@ import mage.target.TargetPlayer; public class InfernalKirin extends CardImpl { public InfernalKirin(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Kirin"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.KIRIN); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -99,11 +100,11 @@ class InfernalKirinEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source)); + Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source)); if (spell != null) { int cmc = spell.getConvertedManaCost(); Player targetPlayer = null; - for(Target target: source.getTargets()) { + for (Target target : source.getTargets()) { if (target instanceof TargetPlayer) { targetPlayer = game.getPlayer(target.getFirstTarget()); } @@ -111,7 +112,7 @@ class InfernalKirinEffect extends OneShotEffect { if (targetPlayer != null) { if (!targetPlayer.getHand().isEmpty()) { targetPlayer.revealCards("Infernal Kirin", targetPlayer.getHand(), game); - for (UUID uuid: targetPlayer.getHand().copy()) { + for (UUID uuid : targetPlayer.getHand().copy()) { Card card = game.getCard(uuid); if (card != null && card.getConvertedManaCost() == cmc) { targetPlayer.discard(card, source, game); diff --git a/Mage.Sets/src/mage/cards/i/InfernalScarring.java b/Mage.Sets/src/mage/cards/i/InfernalScarring.java index b16122c031..06010c36c8 100644 --- a/Mage.Sets/src/mage/cards/i/InfernalScarring.java +++ b/Mage.Sets/src/mage/cards/i/InfernalScarring.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class InfernalScarring extends CardImpl { public InfernalScarring(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/i/InfernalTribute.java b/Mage.Sets/src/mage/cards/i/InfernalTribute.java index f03784ad07..9c67b41b53 100644 --- a/Mage.Sets/src/mage/cards/i/InfernalTribute.java +++ b/Mage.Sets/src/mage/cards/i/InfernalTribute.java @@ -1,74 +1,74 @@ -/* - * 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.cards.i; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.SacrificeTargetCost; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.permanent.TokenPredicate; -import mage.target.common.TargetControlledPermanent; - -/** - * - * @author Styxo - */ -public class InfernalTribute extends CardImpl { - - private final static FilterControlledPermanent filter = new FilterControlledPermanent("a nontoken permanent"); - - static { - filter.add(Predicates.not(new TokenPredicate())); - } - - public InfernalTribute(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}{B}{B}"); - - // {2}, Sacrifice a nontoken permanent: Draw a card. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(2)); - ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); - this.addAbility(ability); - } - - public InfernalTribute(final InfernalTribute card) { - super(card); - } - - @Override - public InfernalTribute copy() { - return new InfernalTribute(this); - } -} +/* + * 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.cards.i; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author Styxo + */ +public class InfernalTribute extends CardImpl { + + private final static FilterControlledPermanent filter = new FilterControlledPermanent("a nontoken permanent"); + + static { + filter.add(Predicates.not(new TokenPredicate())); + } + + public InfernalTribute(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}{B}{B}"); + + // {2}, Sacrifice a nontoken permanent: Draw a card. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(2)); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); + this.addAbility(ability); + } + + public InfernalTribute(final InfernalTribute card) { + super(card); + } + + @Override + public InfernalTribute copy() { + return new InfernalTribute(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/InfernoElemental.java b/Mage.Sets/src/mage/cards/i/InfernoElemental.java index 3ed93470c5..3df8502ea8 100644 --- a/Mage.Sets/src/mage/cards/i/InfernoElemental.java +++ b/Mage.Sets/src/mage/cards/i/InfernoElemental.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class InfernoElemental extends CardImpl { public InfernoElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/InfernoFist.java b/Mage.Sets/src/mage/cards/i/InfernoFist.java index 1f4aed609f..c7461dd06d 100644 --- a/Mage.Sets/src/mage/cards/i/InfernoFist.java +++ b/Mage.Sets/src/mage/cards/i/InfernoFist.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -54,7 +55,7 @@ public class InfernoFist extends CardImpl { public InfernoFist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature you control diff --git a/Mage.Sets/src/mage/cards/i/InfernoTitan.java b/Mage.Sets/src/mage/cards/i/InfernoTitan.java index 49d3308bc8..9bc6f6b876 100644 --- a/Mage.Sets/src/mage/cards/i/InfernoTitan.java +++ b/Mage.Sets/src/mage/cards/i/InfernoTitan.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayerAmount; @@ -50,7 +51,7 @@ public class InfernoTitan extends CardImpl { public InfernoTitan(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/i/InfestedRoothold.java b/Mage.Sets/src/mage/cards/i/InfestedRoothold.java index 44461f3d08..3370e9bffc 100644 --- a/Mage.Sets/src/mage/cards/i/InfestedRoothold.java +++ b/Mage.Sets/src/mage/cards/i/InfestedRoothold.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterSpell; import mage.filter.common.FilterArtifactCard; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -56,7 +57,7 @@ public class InfestedRoothold extends CardImpl { public InfestedRoothold(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/InfiltrationLens.java b/Mage.Sets/src/mage/cards/i/InfiltrationLens.java index 26d3044824..366518bd51 100644 --- a/Mage.Sets/src/mage/cards/i/InfiltrationLens.java +++ b/Mage.Sets/src/mage/cards/i/InfiltrationLens.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class InfiltrationLens extends CardImpl { public InfiltrationLens(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Whenever equipped creature becomes blocked by a creature, you may draw two cards. this.addAbility(new EquippedBecomesBlockedTriggeredAbility(new DrawCardSourceControllerEffect(2), true)); diff --git a/Mage.Sets/src/mage/cards/i/InfiltratorIlKor.java b/Mage.Sets/src/mage/cards/i/InfiltratorIlKor.java index a2e3c55537..89a92ab2ef 100644 --- a/Mage.Sets/src/mage/cards/i/InfiltratorIlKor.java +++ b/Mage.Sets/src/mage/cards/i/InfiltratorIlKor.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class InfiltratorIlKor extends CardImpl { public InfiltratorIlKor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Kor"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/InfiltratorsMagemark.java b/Mage.Sets/src/mage/cards/i/InfiltratorsMagemark.java index 605f85a36c..5719425a29 100644 --- a/Mage.Sets/src/mage/cards/i/InfiltratorsMagemark.java +++ b/Mage.Sets/src/mage/cards/i/InfiltratorsMagemark.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -66,7 +67,7 @@ public class InfiltratorsMagemark extends CardImpl { public InfiltratorsMagemark(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/i/InfiniteHourglass.java b/Mage.Sets/src/mage/cards/i/InfiniteHourglass.java new file mode 100644 index 0000000000..458f1f1ec6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/InfiniteHourglass.java @@ -0,0 +1,92 @@ +/* + * 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.cards.i; + +import java.util.UUID; +import mage.abilities.ActivatedAbility; +import mage.abilities.common.ActivateIfConditionActivatedAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.IsStepCondition; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.dynamicvalue.common.CountersSourceCount; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.PhaseStep; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author TheElk801 + */ +public class InfiniteHourglass extends CardImpl { + + public InfiniteHourglass(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); + + // At the beginning of your upkeep, put a time counter on Infinite Hourglass. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.TIME.createInstance()), TargetController.YOU, false)); + + // All creatures get +1/+0 for each time counter on Infinite Hourglass. + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, + new BoostAllEffect( + new CountersSourceCount(CounterType.TIME), + new StaticValue(0), + Duration.WhileOnBattlefield + ) + )); + + // {3}: Remove a time counter from Infinite Hourglass. Any player may activate this ability but only during any upkeep step. + ActivatedAbility ability = new ActivateIfConditionActivatedAbility( + Zone.BATTLEFIELD, + new RemoveCounterSourceEffect(CounterType.TIME.createInstance()), + new GenericManaCost(3), + new IsStepCondition(PhaseStep.UPKEEP, false) + ); + ability.setMayActivate(TargetController.ANY); + this.addAbility(ability); + } + + public InfiniteHourglass(final InfiniteHourglass card) { + super(card); + } + + @Override + public InfiniteHourglass copy() { + return new InfiniteHourglass(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/InfiniteReflection.java b/Mage.Sets/src/mage/cards/i/InfiniteReflection.java index 2e05b9a688..74b1b8894a 100644 --- a/Mage.Sets/src/mage/cards/i/InfiniteReflection.java +++ b/Mage.Sets/src/mage/cards/i/InfiniteReflection.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -62,7 +63,7 @@ public class InfiniteReflection extends CardImpl { public InfiniteReflection(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{5}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/i/InformationDealer.java b/Mage.Sets/src/mage/cards/i/InformationDealer.java index ac832d3a3d..c1871efa6d 100644 --- a/Mage.Sets/src/mage/cards/i/InformationDealer.java +++ b/Mage.Sets/src/mage/cards/i/InformationDealer.java @@ -56,8 +56,8 @@ public class InformationDealer extends CardImpl { public InformationDealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/IngeniousSkaab.java b/Mage.Sets/src/mage/cards/i/IngeniousSkaab.java index 17295b8668..49ca95fc19 100644 --- a/Mage.Sets/src/mage/cards/i/IngeniousSkaab.java +++ b/Mage.Sets/src/mage/cards/i/IngeniousSkaab.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class IngeniousSkaab extends CardImpl { public IngeniousSkaab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/IngeniousThief.java b/Mage.Sets/src/mage/cards/i/IngeniousThief.java index 4efa38216d..9a7c46f4ca 100644 --- a/Mage.Sets/src/mage/cards/i/IngeniousThief.java +++ b/Mage.Sets/src/mage/cards/i/IngeniousThief.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -46,8 +47,8 @@ public class IngeniousThief extends CardImpl { public IngeniousThief(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/IngotChewer.java b/Mage.Sets/src/mage/cards/i/IngotChewer.java index d0a4b678ae..cb744eb20b 100644 --- a/Mage.Sets/src/mage/cards/i/IngotChewer.java +++ b/Mage.Sets/src/mage/cards/i/IngotChewer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.Target; import mage.target.common.TargetArtifactPermanent; @@ -47,7 +48,7 @@ public class IngotChewer extends CardImpl { public IngotChewer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/InitiateOfBlood.java b/Mage.Sets/src/mage/cards/i/InitiateOfBlood.java index 86a972e7a5..a49b7ae8d8 100644 --- a/Mage.Sets/src/mage/cards/i/InitiateOfBlood.java +++ b/Mage.Sets/src/mage/cards/i/InitiateOfBlood.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.FlipSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -60,8 +61,8 @@ public class InitiateOfBlood extends CardImpl { public InitiateOfBlood(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -101,8 +102,8 @@ class GokaTheUnjust extends Token { addSuperType(SuperType.LEGENDARY); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Ogre"); - subtype.add("Shaman"); + subtype.add(SubType.OGRE); + subtype.add(SubType.SHAMAN); power = new MageInt(4); toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/InitiatesCompanion.java b/Mage.Sets/src/mage/cards/i/InitiatesCompanion.java index 522ff492bb..a15191ce9d 100644 --- a/Mage.Sets/src/mage/cards/i/InitiatesCompanion.java +++ b/Mage.Sets/src/mage/cards/i/InitiatesCompanion.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -56,7 +57,7 @@ public class InitiatesCompanion extends CardImpl { public InitiatesCompanion(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/InitiatesOfTheEbonHand.java b/Mage.Sets/src/mage/cards/i/InitiatesOfTheEbonHand.java index cc19a83bd6..585e907b6c 100644 --- a/Mage.Sets/src/mage/cards/i/InitiatesOfTheEbonHand.java +++ b/Mage.Sets/src/mage/cards/i/InitiatesOfTheEbonHand.java @@ -41,6 +41,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -53,7 +54,7 @@ public class InitiatesOfTheEbonHand extends CardImpl { public InitiatesOfTheEbonHand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/InkDissolver.java b/Mage.Sets/src/mage/cards/i/InkDissolver.java index cff7ff46a0..d07d0a735b 100644 --- a/Mage.Sets/src/mage/cards/i/InkDissolver.java +++ b/Mage.Sets/src/mage/cards/i/InkDissolver.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveEachPlayerEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -44,8 +45,8 @@ public class InkDissolver extends CardImpl { public InkDissolver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/InkEyesServantOfOni.java b/Mage.Sets/src/mage/cards/i/InkEyesServantOfOni.java index 957660e76f..59593ef498 100644 --- a/Mage.Sets/src/mage/cards/i/InkEyesServantOfOni.java +++ b/Mage.Sets/src/mage/cards/i/InkEyesServantOfOni.java @@ -40,6 +40,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -58,8 +59,8 @@ public class InkEyesServantOfOni extends CardImpl { public InkEyesServantOfOni(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Rat"); - this.subtype.add("Ninja"); + this.subtype.add(SubType.RAT); + this.subtype.add(SubType.NINJA); addSuperType(SuperType.LEGENDARY); this.power = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/i/InkTreaderNephilim.java b/Mage.Sets/src/mage/cards/i/InkTreaderNephilim.java index be0798a552..69b10175a9 100644 --- a/Mage.Sets/src/mage/cards/i/InkTreaderNephilim.java +++ b/Mage.Sets/src/mage/cards/i/InkTreaderNephilim.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.CopySpellForEachItCouldTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterInPlay; import mage.filter.common.FilterCreaturePermanent; @@ -55,7 +56,7 @@ public class InkTreaderNephilim extends CardImpl { public InkTreaderNephilim(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}{W}{U}"); - this.subtype.add("Nephilim"); + this.subtype.add(SubType.NEPHILIM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/InkfathomDivers.java b/Mage.Sets/src/mage/cards/i/InkfathomDivers.java index a9ea5df857..3d1868cfb6 100644 --- a/Mage.Sets/src/mage/cards/i/InkfathomDivers.java +++ b/Mage.Sets/src/mage/cards/i/InkfathomDivers.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.IslandwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class InkfathomDivers extends CardImpl { public InkfathomDivers (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/InkfathomInfiltrator.java b/Mage.Sets/src/mage/cards/i/InkfathomInfiltrator.java index 265a1e1384..3d98d27c2f 100644 --- a/Mage.Sets/src/mage/cards/i/InkfathomInfiltrator.java +++ b/Mage.Sets/src/mage/cards/i/InkfathomInfiltrator.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class InkfathomInfiltrator extends CardImpl { public InkfathomInfiltrator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U/B}{U/B}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/InkfathomWitch.java b/Mage.Sets/src/mage/cards/i/InkfathomWitch.java index 1c623fa3ea..cb12404612 100644 --- a/Mage.Sets/src/mage/cards/i/InkfathomWitch.java +++ b/Mage.Sets/src/mage/cards/i/InkfathomWitch.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -54,8 +55,8 @@ public class InkfathomWitch extends CardImpl { public InkfathomWitch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U/B}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/InkmothNexus.java b/Mage.Sets/src/mage/cards/i/InkmothNexus.java index 70c86b07e5..55f03caa4e 100644 --- a/Mage.Sets/src/mage/cards/i/InkmothNexus.java +++ b/Mage.Sets/src/mage/cards/i/InkmothNexus.java @@ -40,6 +40,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -77,7 +78,7 @@ class InkmothNexusToken extends Token { super("Blinkmoth", "1/1 Blinkmoth artifact creature with flying and infect"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - this.subtype.add("Blinkmoth"); + this.subtype.add(SubType.BLINKMOTH); power = new MageInt(1); toughness = new MageInt(1); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/i/InkwellLeviathan.java b/Mage.Sets/src/mage/cards/i/InkwellLeviathan.java index 92298ccf7d..38d79219de 100644 --- a/Mage.Sets/src/mage/cards/i/InkwellLeviathan.java +++ b/Mage.Sets/src/mage/cards/i/InkwellLeviathan.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class InkwellLeviathan extends CardImpl { public InkwellLeviathan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}{U}{U}"); - this.subtype.add("Leviathan"); + this.subtype.add(SubType.LEVIATHAN); this.power = new MageInt(7); this.toughness = new MageInt(11); diff --git a/Mage.Sets/src/mage/cards/i/InnerChamberGuard.java b/Mage.Sets/src/mage/cards/i/InnerChamberGuard.java index b7e6ca6a11..84c8021233 100644 --- a/Mage.Sets/src/mage/cards/i/InnerChamberGuard.java +++ b/Mage.Sets/src/mage/cards/i/InnerChamberGuard.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.BushidoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class InnerChamberGuard extends CardImpl { public InnerChamberGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/InnerFlameAcolyte.java b/Mage.Sets/src/mage/cards/i/InnerFlameAcolyte.java index 5962debcbe..d5319483b0 100644 --- a/Mage.Sets/src/mage/cards/i/InnerFlameAcolyte.java +++ b/Mage.Sets/src/mage/cards/i/InnerFlameAcolyte.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class InnerFlameAcolyte extends CardImpl { public InnerFlameAcolyte(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/InnerFlameIgniter.java b/Mage.Sets/src/mage/cards/i/InnerFlameIgniter.java index d5e3c613a2..a0a5f0569c 100644 --- a/Mage.Sets/src/mage/cards/i/InnerFlameIgniter.java +++ b/Mage.Sets/src/mage/cards/i/InnerFlameIgniter.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class InnerFlameIgniter extends CardImpl { public InnerFlameIgniter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/InnerSanctum.java b/Mage.Sets/src/mage/cards/i/InnerSanctum.java new file mode 100644 index 0000000000..4f9c90ffa6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/InnerSanctum.java @@ -0,0 +1,68 @@ +/* + * 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.cards.i; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.effects.common.PreventAllDamageToAllEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreatureInPlay; + +/** + * + * @author TheElk801 + */ +public class InnerSanctum extends CardImpl { + + public InnerSanctum(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{W}"); + + // Cumulative upkeep-Pay 2 life. + this.addAbility(new CumulativeUpkeepAbility(new PayLifeCost(2))); + + // Prevent all damage that would be dealt to creatures you control. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new PreventAllDamageToAllEffect(Duration.WhileOnBattlefield, new FilterControlledCreatureInPlay("creatures you control")) + )); + } + + public InnerSanctum(final InnerSanctum card) { + super(card); + } + + @Override + public InnerSanctum copy() { + return new InnerSanctum(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/InnocenceKami.java b/Mage.Sets/src/mage/cards/i/InnocenceKami.java index b58374d2d0..c3b2897b22 100644 --- a/Mage.Sets/src/mage/cards/i/InnocenceKami.java +++ b/Mage.Sets/src/mage/cards/i/InnocenceKami.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -52,7 +53,7 @@ public class InnocenceKami extends CardImpl { public InnocenceKami(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/InquisitorExarch.java b/Mage.Sets/src/mage/cards/i/InquisitorExarch.java index 6b78b51863..c50e16b391 100644 --- a/Mage.Sets/src/mage/cards/i/InquisitorExarch.java +++ b/Mage.Sets/src/mage/cards/i/InquisitorExarch.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -47,7 +48,7 @@ public class InquisitorExarch extends CardImpl { public InquisitorExarch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/InquisitorsFlail.java b/Mage.Sets/src/mage/cards/i/InquisitorsFlail.java index fcc6e67ef2..fe38f01aba 100644 --- a/Mage.Sets/src/mage/cards/i/InquisitorsFlail.java +++ b/Mage.Sets/src/mage/cards/i/InquisitorsFlail.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class InquisitorsFlail extends CardImpl { public InquisitorsFlail(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // If equipped creature would deal combat damage, it deals double that damage instead. // If another creature would deal combat damage to equipped creature, it deals double that damage to equipped creature instead. diff --git a/Mage.Sets/src/mage/cards/i/InquisitorsOx.java b/Mage.Sets/src/mage/cards/i/InquisitorsOx.java index e3f2f4bb21..558b49ec6d 100644 --- a/Mage.Sets/src/mage/cards/i/InquisitorsOx.java +++ b/Mage.Sets/src/mage/cards/i/InquisitorsOx.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class InquisitorsOx extends CardImpl { public InquisitorsOx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Ox"); + this.subtype.add(SubType.OX); this.power = new MageInt(2); this.toughness = new MageInt(5); this.color.setWhite(true); diff --git a/Mage.Sets/src/mage/cards/i/InsatiableGorgers.java b/Mage.Sets/src/mage/cards/i/InsatiableGorgers.java index e201908b85..c2894bab95 100644 --- a/Mage.Sets/src/mage/cards/i/InsatiableGorgers.java +++ b/Mage.Sets/src/mage/cards/i/InsatiableGorgers.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MadnessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class InsatiableGorgers extends CardImpl { public InsatiableGorgers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Vampire"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/InsatiableHarpy.java b/Mage.Sets/src/mage/cards/i/InsatiableHarpy.java index 04732734ad..ff75b8f2d8 100644 --- a/Mage.Sets/src/mage/cards/i/InsatiableHarpy.java +++ b/Mage.Sets/src/mage/cards/i/InsatiableHarpy.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class InsatiableHarpy extends CardImpl { public InsatiableHarpy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Harpy"); + this.subtype.add(SubType.HARPY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/InsatiableRakghoul.java b/Mage.Sets/src/mage/cards/i/InsatiableRakghoul.java index 4d43d1b7b6..68347665e6 100644 --- a/Mage.Sets/src/mage/cards/i/InsatiableRakghoul.java +++ b/Mage.Sets/src/mage/cards/i/InsatiableRakghoul.java @@ -1,135 +1,136 @@ -/* - * 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.cards.i; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.effects.OneShotEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.WatcherScope; -import mage.counters.CounterType; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.ZoneChangeEvent; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.watchers.Watcher; - -/** - * - * @author Styxo - */ -public class InsatiableRakghoul extends CardImpl { - - public InsatiableRakghoul(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Mutant"); - this.power = new MageInt(4); - this.toughness = new MageInt(6); - - // Insatiable Rakghoul enters the battlefield with a +1/+1 counter on it, if a non-artifact creature died this turn. - this.addAbility(new EntersBattlefieldAbility(new InsatiableRakghoulEffect(), false), new NonArtifactCreaturesDiedWatcher()); - } - - public InsatiableRakghoul(final InsatiableRakghoul card) { - super(card); - } - - @Override - public InsatiableRakghoul copy() { - return new InsatiableRakghoul(this); - } -} - -class InsatiableRakghoulEffect extends OneShotEffect { - - InsatiableRakghoulEffect() { - super(Outcome.BoostCreature); - staticText = "with a +1/+1 counter on it if a non-artifact creature died this turn"; - } - - InsatiableRakghoulEffect(final InsatiableRakghoulEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - NonArtifactCreaturesDiedWatcher watcher = (NonArtifactCreaturesDiedWatcher) game.getState().getWatchers().get(NonArtifactCreaturesDiedWatcher.class.getSimpleName()); - if (watcher != null && watcher.conditionMet()) { - Permanent permanent = game.getPermanentEntering(source.getSourceId()); - if (permanent != null) { - permanent.addCounters(CounterType.P1P1.createInstance(1), source, game); - } - } - return true; - } - return false; - } - - @Override - public InsatiableRakghoulEffect copy() { - return new InsatiableRakghoulEffect(this); - } -} - -class NonArtifactCreaturesDiedWatcher extends Watcher { - - public NonArtifactCreaturesDiedWatcher() { - super(NonArtifactCreaturesDiedWatcher.class.getSimpleName(), WatcherScope.GAME); - } - - public NonArtifactCreaturesDiedWatcher(final NonArtifactCreaturesDiedWatcher watcher) { - super(watcher); - } - - @Override - public void watch(GameEvent event, Game game) { - if (event.getType() == GameEvent.EventType.ZONE_CHANGE) { - ZoneChangeEvent zEvent = (ZoneChangeEvent) event; - if (zEvent.isDiesEvent() && zEvent.getTarget() != null - && zEvent.getTarget().isCreature() - && !zEvent.getTarget().isArtifact()) { - condition = true; - } - } - } - - @Override - public NonArtifactCreaturesDiedWatcher copy() { - return new NonArtifactCreaturesDiedWatcher(this); - } - -} +/* + * 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.cards.i; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.WatcherScope; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.ZoneChangeEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.watchers.Watcher; + +/** + * + * @author Styxo + */ +public class InsatiableRakghoul extends CardImpl { + + public InsatiableRakghoul(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.MUTANT); + this.power = new MageInt(4); + this.toughness = new MageInt(6); + + // Insatiable Rakghoul enters the battlefield with a +1/+1 counter on it, if a non-artifact creature died this turn. + this.addAbility(new EntersBattlefieldAbility(new InsatiableRakghoulEffect(), false), new NonArtifactCreaturesDiedWatcher()); + } + + public InsatiableRakghoul(final InsatiableRakghoul card) { + super(card); + } + + @Override + public InsatiableRakghoul copy() { + return new InsatiableRakghoul(this); + } +} + +class InsatiableRakghoulEffect extends OneShotEffect { + + InsatiableRakghoulEffect() { + super(Outcome.BoostCreature); + staticText = "with a +1/+1 counter on it if a non-artifact creature died this turn"; + } + + InsatiableRakghoulEffect(final InsatiableRakghoulEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + NonArtifactCreaturesDiedWatcher watcher = (NonArtifactCreaturesDiedWatcher) game.getState().getWatchers().get(NonArtifactCreaturesDiedWatcher.class.getSimpleName()); + if (watcher != null && watcher.conditionMet()) { + Permanent permanent = game.getPermanentEntering(source.getSourceId()); + if (permanent != null) { + permanent.addCounters(CounterType.P1P1.createInstance(1), source, game); + } + } + return true; + } + return false; + } + + @Override + public InsatiableRakghoulEffect copy() { + return new InsatiableRakghoulEffect(this); + } +} + +class NonArtifactCreaturesDiedWatcher extends Watcher { + + public NonArtifactCreaturesDiedWatcher() { + super(NonArtifactCreaturesDiedWatcher.class.getSimpleName(), WatcherScope.GAME); + } + + public NonArtifactCreaturesDiedWatcher(final NonArtifactCreaturesDiedWatcher watcher) { + super(watcher); + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.ZONE_CHANGE) { + ZoneChangeEvent zEvent = (ZoneChangeEvent) event; + if (zEvent.isDiesEvent() && zEvent.getTarget() != null + && zEvent.getTarget().isCreature() + && !zEvent.getTarget().isArtifact()) { + condition = true; + } + } + } + + @Override + public NonArtifactCreaturesDiedWatcher copy() { + return new NonArtifactCreaturesDiedWatcher(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/i/InsatiableSouleater.java b/Mage.Sets/src/mage/cards/i/InsatiableSouleater.java index 4f91ea4972..3993327b86 100644 --- a/Mage.Sets/src/mage/cards/i/InsatiableSouleater.java +++ b/Mage.Sets/src/mage/cards/i/InsatiableSouleater.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class InsatiableSouleater extends CardImpl { public InsatiableSouleater(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/InsectileAberration.java b/Mage.Sets/src/mage/cards/i/InsectileAberration.java index 0566043ab4..a9491c2570 100644 --- a/Mage.Sets/src/mage/cards/i/InsectileAberration.java +++ b/Mage.Sets/src/mage/cards/i/InsectileAberration.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class InsectileAberration extends CardImpl { public InsectileAberration(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Human"); - this.subtype.add("Insect"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.INSECT); this.color.setBlue(true); diff --git a/Mage.Sets/src/mage/cards/i/InsidiousBookworms.java b/Mage.Sets/src/mage/cards/i/InsidiousBookworms.java index 141692a222..2773da4741 100644 --- a/Mage.Sets/src/mage/cards/i/InsidiousBookworms.java +++ b/Mage.Sets/src/mage/cards/i/InsidiousBookworms.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -47,7 +48,7 @@ public class InsidiousBookworms extends CardImpl { public InsidiousBookworms(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Worm"); + this.subtype.add(SubType.WORM); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/InsidiousMist.java b/Mage.Sets/src/mage/cards/i/InsidiousMist.java index b3407f535c..f9d54d26ea 100644 --- a/Mage.Sets/src/mage/cards/i/InsidiousMist.java +++ b/Mage.Sets/src/mage/cards/i/InsidiousMist.java @@ -44,6 +44,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class InsidiousMist extends CardImpl { public InsidiousMist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(1); this.color.setBlue(true); diff --git a/Mage.Sets/src/mage/cards/i/Insolence.java b/Mage.Sets/src/mage/cards/i/Insolence.java index 9737fd79be..00a662601d 100644 --- a/Mage.Sets/src/mage/cards/i/Insolence.java +++ b/Mage.Sets/src/mage/cards/i/Insolence.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class Insolence extends CardImpl { public Insolence(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/i/InsolentNeonate.java b/Mage.Sets/src/mage/cards/i/InsolentNeonate.java index 73665338e7..b7c186a823 100644 --- a/Mage.Sets/src/mage/cards/i/InsolentNeonate.java +++ b/Mage.Sets/src/mage/cards/i/InsolentNeonate.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,7 +49,7 @@ public class InsolentNeonate extends CardImpl { public InsolentNeonate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/InspiredSprite.java b/Mage.Sets/src/mage/cards/i/InspiredSprite.java index 80659c2026..cf53ed6fab 100644 --- a/Mage.Sets/src/mage/cards/i/InspiredSprite.java +++ b/Mage.Sets/src/mage/cards/i/InspiredSprite.java @@ -58,8 +58,8 @@ public class InspiredSprite extends CardImpl { public InspiredSprite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/InspiringCaptain.java b/Mage.Sets/src/mage/cards/i/InspiringCaptain.java index df08a07a0f..dcd3beda09 100644 --- a/Mage.Sets/src/mage/cards/i/InspiringCaptain.java +++ b/Mage.Sets/src/mage/cards/i/InspiringCaptain.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; @@ -45,8 +46,8 @@ public class InspiringCaptain extends CardImpl { public InspiringCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/InspiringCleric.java b/Mage.Sets/src/mage/cards/i/InspiringCleric.java new file mode 100644 index 0000000000..765707130d --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/InspiringCleric.java @@ -0,0 +1,65 @@ +/* + * 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.cards.i; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class InspiringCleric extends CardImpl { + + public InspiringCleric(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // When Inspiring Cleric enters the battlefield, you gain 4 life. + this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(4))); + } + + public InspiringCleric(final InspiringCleric card) { + super(card); + } + + @Override + public InspiringCleric copy() { + return new InspiringCleric(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/InspiringStatuary.java b/Mage.Sets/src/mage/cards/i/InspiringStatuary.java index e1c3671d2c..8f6dc21dfe 100644 --- a/Mage.Sets/src/mage/cards/i/InspiringStatuary.java +++ b/Mage.Sets/src/mage/cards/i/InspiringStatuary.java @@ -1,70 +1,70 @@ -/* - * 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.cards.i; - -import java.util.UUID; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.continuous.GainAbilityControlledSpellsEffect; -import mage.abilities.keyword.ImproviseAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; - -/** - * - * @author Styxo - */ -public class InspiringStatuary extends CardImpl { - - private static final FilterSpell filter = new FilterSpell("non-artifact spells you cast"); - - static { - filter.add(Predicates.not(new CardTypePredicate(CardType.ARTIFACT))); - } - - public InspiringStatuary(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); - - // Non-artifact spells you cast have improvise. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledSpellsEffect(new ImproviseAbility(), filter))); - - } - - public InspiringStatuary(final InspiringStatuary card) { - super(card); - } - - @Override - public InspiringStatuary copy() { - return new InspiringStatuary(this); - } -} +/* + * 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.cards.i; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledSpellsEffect; +import mage.abilities.keyword.ImproviseAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author Styxo + */ +public class InspiringStatuary extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("non-artifact spells you cast"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.ARTIFACT))); + } + + public InspiringStatuary(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + // Non-artifact spells you cast have improvise. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledSpellsEffect(new ImproviseAbility(), filter))); + + } + + public InspiringStatuary(final InspiringStatuary card) { + super(card); + } + + @Override + public InspiringStatuary copy() { + return new InspiringStatuary(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/InspiringVantage.java b/Mage.Sets/src/mage/cards/i/InspiringVantage.java index 1f715cb8a6..38ca08c163 100644 --- a/Mage.Sets/src/mage/cards/i/InspiringVantage.java +++ b/Mage.Sets/src/mage/cards/i/InspiringVantage.java @@ -52,7 +52,7 @@ public class InspiringVantage extends CardImpl { // Inspiring Vantage enters the battlefield tapped unless you control two or fewer other lands. Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3)); - String abilityText = "tapped unless you control fewer than 3 lands"; + String abilityText = " tapped unless you control two or fewer other lands"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); // {T}: Add {R} or {W} to your mana pool. diff --git a/Mage.Sets/src/mage/cards/i/Instigator.java b/Mage.Sets/src/mage/cards/i/Instigator.java index 22d0b1a9c1..02eba17dbf 100644 --- a/Mage.Sets/src/mage/cards/i/Instigator.java +++ b/Mage.Sets/src/mage/cards/i/Instigator.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.combat.AttacksIfAbleAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -58,8 +59,8 @@ public class Instigator extends CardImpl { public Instigator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/InstigatorGang.java b/Mage.Sets/src/mage/cards/i/InstigatorGang.java index f251bb22c9..10530b4a25 100644 --- a/Mage.Sets/src/mage/cards/i/InstigatorGang.java +++ b/Mage.Sets/src/mage/cards/i/InstigatorGang.java @@ -52,8 +52,8 @@ public class InstigatorGang extends CardImpl { public InstigatorGang(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WEREWOLF); this.transformable = true; this.secondSideCardClazz = WildbloodPack.class; diff --git a/Mage.Sets/src/mage/cards/i/InstillEnergy.java b/Mage.Sets/src/mage/cards/i/InstillEnergy.java index cf96fb09ec..79c7748635 100644 --- a/Mage.Sets/src/mage/cards/i/InstillEnergy.java +++ b/Mage.Sets/src/mage/cards/i/InstillEnergy.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class InstillEnergy extends CardImpl { public InstillEnergy(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/i/InstillFuror.java b/Mage.Sets/src/mage/cards/i/InstillFuror.java index b90215157c..1290546a71 100644 --- a/Mage.Sets/src/mage/cards/i/InstillFuror.java +++ b/Mage.Sets/src/mage/cards/i/InstillFuror.java @@ -1,90 +1,91 @@ -/* - * 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.cards.i; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.BeginningOfEndStepTriggeredAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.condition.InvertCondition; -import mage.abilities.condition.common.AttackedThisTurnSourceCondition; -import mage.abilities.decorator.ConditionalOneShotEffect; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.SacrificeSourceEffect; -import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; -import mage.abilities.keyword.EnchantAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.target.TargetPermanent; -import mage.target.common.TargetCreaturePermanent; -import mage.watchers.common.AttackedThisTurnWatcher; - -/** - * - * @author LevelX2 - */ -public class InstillFuror extends CardImpl { - - public InstillFuror(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); - - this.subtype.add("Aura"); - - // Enchant creature - TargetPermanent auraTarget = new TargetCreaturePermanent(); - this.getSpellAbility().addTarget(auraTarget); - this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); - Ability ability = new EnchantAbility(auraTarget.getTargetName()); - this.addAbility(ability); - - // Enchanted creature has "At the beginning of your end step, sacrifice this creature unless it attacked this turn." - Ability gainedAbility = new BeginningOfEndStepTriggeredAbility( - new ConditionalOneShotEffect(new SacrificeSourceEffect(), new InvertCondition(AttackedThisTurnSourceCondition.instance), - "sacrifice this creature unless it attacked this turn"), TargetController.YOU, false); - Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield); - effect.setText("Enchanted creature has \"At the beginning of your upkeep, sacrifice this creature unless it attacked this turn.\""); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect), new AttackedThisTurnWatcher()); - - } - - public InstillFuror(final InstillFuror card) { - super(card); - } - - @Override - public InstillFuror copy() { - return new InstillFuror(this); - } -} +/* + * 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.cards.i; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.InvertCondition; +import mage.abilities.condition.common.AttackedThisTurnSourceCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.common.AttackedThisTurnWatcher; + +/** + * + * @author LevelX2 + */ +public class InstillFuror extends CardImpl { + + public InstillFuror(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature has "At the beginning of your end step, sacrifice this creature unless it attacked this turn." + Ability gainedAbility = new BeginningOfEndStepTriggeredAbility( + new ConditionalOneShotEffect(new SacrificeSourceEffect(), new InvertCondition(AttackedThisTurnSourceCondition.instance), + "sacrifice this creature unless it attacked this turn"), TargetController.YOU, false); + Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield); + effect.setText("Enchanted creature has \"At the beginning of your upkeep, sacrifice this creature unless it attacked this turn.\""); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect), new AttackedThisTurnWatcher()); + + } + + public InstillFuror(final InstillFuror card) { + super(card); + } + + @Override + public InstillFuror copy() { + return new InstillFuror(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/Interdict.java b/Mage.Sets/src/mage/cards/i/Interdict.java new file mode 100644 index 0000000000..5fcc1c5244 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/Interdict.java @@ -0,0 +1,159 @@ +/* + * 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.cards.i; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.RestrictionEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.filter.FilterStackObject; +import mage.filter.predicate.Predicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.stack.StackAbility; +import mage.game.stack.StackObject; +import mage.target.common.TargetActivatedOrTriggeredAbility; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public class Interdict extends CardImpl { + + private static final FilterStackObject filter = new FilterStackObject("activated ability from an artifact, creature, enchantment, or land"); + + static { + filter.add(new InterdictPredicate()); + } + + public Interdict(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); + + // Counter target activated ability from an artifact, creature, enchantment, or land. That permanent's activated abilities can't be activated this turn. + this.getSpellAbility().addEffect(new InterdictCounterEffect()); + this.getSpellAbility().addTarget(new TargetActivatedOrTriggeredAbility(filter)); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).setText("

Draw a card")); + } + + public Interdict(final Interdict card) { + super(card); + } + + @Override + public Interdict copy() { + return new Interdict(this); + } +} + +class InterdictPredicate implements Predicate { + + public InterdictPredicate() { + } + + @Override + public boolean apply(Ability input, Game game) { + if (input instanceof StackAbility && input.getAbilityType() == AbilityType.ACTIVATED) { + Permanent sourceObject = game.getPermanentOrLKIBattlefield(input.getSourceId()); + if (sourceObject != null) { + return (sourceObject.isArtifact() + || sourceObject.isEnchantment() + || sourceObject.isCreature() + || sourceObject.isLand()); + } + } + return false; + } +} + +class InterdictCounterEffect extends OneShotEffect { + + public InterdictCounterEffect() { + super(Outcome.Detriment); + staticText = "Counter target activated ability from an artifact, creature, enchantment, or land. That permanent's activated abilities can't be activated this turn."; + } + + public InterdictCounterEffect(final InterdictCounterEffect effect) { + super(effect); + } + + @Override + public InterdictCounterEffect copy() { + return new InterdictCounterEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + StackObject stackObject = game.getStack().getStackObject(source.getFirstTarget()); + if (stackObject != null && game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game)) { + InterdictCantActivateEffect effect = new InterdictCantActivateEffect(); + effect.setTargetPointer(new FixedTarget(stackObject.getSourceId())); + game.getContinuousEffects().addEffect(effect, source); + return true; + } + return false; + } + +} + +class InterdictCantActivateEffect extends RestrictionEffect { + + public InterdictCantActivateEffect() { + super(Duration.EndOfTurn); + staticText = "That permanent's activated abilities can't be activated this turn"; + } + + public InterdictCantActivateEffect(final InterdictCantActivateEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return getTargetPointer().getFirst(game, source).equals(permanent.getId()); + } + + @Override + public boolean canUseActivatedAbilities(Permanent permanent, Ability source, Game game) { + return false; + } + + @Override + public InterdictCantActivateEffect copy() { + return new InterdictCantActivateEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/i/Interrogation.java b/Mage.Sets/src/mage/cards/i/Interrogation.java index 1f34713e1d..d38299731d 100644 --- a/Mage.Sets/src/mage/cards/i/Interrogation.java +++ b/Mage.Sets/src/mage/cards/i/Interrogation.java @@ -1,99 +1,99 @@ -/* - * 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.cards.i; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.costs.Cost; -import mage.abilities.costs.common.PayLifeCost; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.discard.DiscardTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.game.Game; -import mage.players.Player; -import mage.target.TargetPlayer; - -/** - * - * @author Styxo - */ -public class Interrogation extends CardImpl { - - public Interrogation(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}"); - - // Target player discards a card. Then that player discards another card unless he or she pays 3 life. - this.getSpellAbility().addTarget(new TargetPlayer()); - this.getSpellAbility().addEffect(new DiscardTargetEffect(1)); - this.getSpellAbility().addEffect(new InterrogationEffect()); - } - - public Interrogation(final Interrogation card) { - super(card); - } - - @Override - public Interrogation copy() { - return new Interrogation(this); - } -} - -class InterrogationEffect extends OneShotEffect { - - InterrogationEffect() { - super(Outcome.Discard); - this.staticText = "Then that player discards another card unless he or she pays 3 life"; - } - - InterrogationEffect(final InterrogationEffect effect) { - super(effect); - } - - @Override - public InterrogationEffect copy() { - return new InterrogationEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source)); - if (player != null) { - Cost cost = new PayLifeCost(3); - if (!cost.canPay(source, source.getSourceId(), player.getId(), game) - || !player.chooseUse(Outcome.LoseLife, "Pay 3 life?", source, game) - || !cost.pay(source, game, source.getSourceId(), player.getId(), false, null)) { - player.discardOne(false, source, game); - } - return true; - } - return false; - } -} +/* + * 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.cards.i; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author Styxo + */ +public class Interrogation extends CardImpl { + + public Interrogation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}"); + + // Target player discards a card. Then that player discards another card unless he or she pays 3 life. + this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addEffect(new DiscardTargetEffect(1)); + this.getSpellAbility().addEffect(new InterrogationEffect()); + } + + public Interrogation(final Interrogation card) { + super(card); + } + + @Override + public Interrogation copy() { + return new Interrogation(this); + } +} + +class InterrogationEffect extends OneShotEffect { + + InterrogationEffect() { + super(Outcome.Discard); + this.staticText = "Then that player discards another card unless he or she pays 3 life"; + } + + InterrogationEffect(final InterrogationEffect effect) { + super(effect); + } + + @Override + public InterrogationEffect copy() { + return new InterrogationEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source)); + if (player != null) { + Cost cost = new PayLifeCost(3); + if (!cost.canPay(source, source.getSourceId(), player.getId(), game) + || !player.chooseUse(Outcome.LoseLife, "Pay 3 life?", source, game) + || !cost.pay(source, game, source.getSourceId(), player.getId(), false, null)) { + player.discardOne(false, source, game); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/i/IntetTheDreamer.java b/Mage.Sets/src/mage/cards/i/IntetTheDreamer.java index f743bff47f..531dd08a2d 100644 --- a/Mage.Sets/src/mage/cards/i/IntetTheDreamer.java +++ b/Mage.Sets/src/mage/cards/i/IntetTheDreamer.java @@ -60,7 +60,7 @@ public class IntetTheDreamer extends CardImpl { public IntetTheDreamer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/i/IntimidatorInitiate.java b/Mage.Sets/src/mage/cards/i/IntimidatorInitiate.java index 2272a72560..7874a2a5b0 100644 --- a/Mage.Sets/src/mage/cards/i/IntimidatorInitiate.java +++ b/Mage.Sets/src/mage/cards/i/IntimidatorInitiate.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.combat.CantBlockTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -59,8 +60,8 @@ public class IntimidatorInitiate extends CardImpl { public IntimidatorInitiate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/IntrepidHero.java b/Mage.Sets/src/mage/cards/i/IntrepidHero.java index a35a52bbc0..e5de581ca9 100644 --- a/Mage.Sets/src/mage/cards/i/IntrepidHero.java +++ b/Mage.Sets/src/mage/cards/i/IntrepidHero.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -56,8 +57,8 @@ public class IntrepidHero extends CardImpl { public IntrepidHero(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/IntrepidProvisioner.java b/Mage.Sets/src/mage/cards/i/IntrepidProvisioner.java index 0263961e41..0fa405ad8a 100644 --- a/Mage.Sets/src/mage/cards/i/IntrepidProvisioner.java +++ b/Mage.Sets/src/mage/cards/i/IntrepidProvisioner.java @@ -56,8 +56,8 @@ public class IntrepidProvisioner extends CardImpl { public IntrepidProvisioner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/InvaderParasite.java b/Mage.Sets/src/mage/cards/i/InvaderParasite.java index 96995cc295..689411e878 100644 --- a/Mage.Sets/src/mage/cards/i/InvaderParasite.java +++ b/Mage.Sets/src/mage/cards/i/InvaderParasite.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -55,7 +56,7 @@ public class InvaderParasite extends CardImpl { public InvaderParasite(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/InvasionPlans.java b/Mage.Sets/src/mage/cards/i/InvasionPlans.java new file mode 100644 index 0000000000..eda59d9a81 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/InvasionPlans.java @@ -0,0 +1,106 @@ +/* + * 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.cards.i; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.abilities.effects.common.combat.BlocksIfAbleAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +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.players.PlayerList; +import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; + +/** + * + * @author L_J + */ +public class InvasionPlans extends CardImpl { + + public InvasionPlans(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + + // All creatures block each turn if able. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BlocksIfAbleAllEffect(FILTER_PERMANENT_CREATURES))); + // The attacking player chooses how each creature blocks each turn. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new InvasionPlansEffect())); + } + + public InvasionPlans(final InvasionPlans card) { + super(card); + } + + @Override + public InvasionPlans copy() { + return new InvasionPlans(this); + } +} + +class InvasionPlansEffect extends ContinuousRuleModifyingEffectImpl { + + public InvasionPlansEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit, true, false); + } + + public InvasionPlansEffect(final InvasionPlansEffect effect) { + super(effect); + } + + @Override + public InvasionPlansEffect copy() { + return new InvasionPlansEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DECLARING_BLOCKERS; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + Player blockController = game.getPlayer(game.getCombat().getAttackingPlayerId()); + if (blockController != null) { + game.getCombat().selectBlockers(blockController, game); + return event.getPlayerId().equals(game.getCombat().getAttackingPlayerId()); + } + return false; + } +} + diff --git a/Mage.Sets/src/mage/cards/i/InvasiveSpecies.java b/Mage.Sets/src/mage/cards/i/InvasiveSpecies.java index d0373c564e..68a37b0292 100644 --- a/Mage.Sets/src/mage/cards/i/InvasiveSpecies.java +++ b/Mage.Sets/src/mage/cards/i/InvasiveSpecies.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -51,7 +52,7 @@ public class InvasiveSpecies extends CardImpl { public InvasiveSpecies(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/InventorsApprentice.java b/Mage.Sets/src/mage/cards/i/InventorsApprentice.java index 3fbdf34fe8..420630a13d 100644 --- a/Mage.Sets/src/mage/cards/i/InventorsApprentice.java +++ b/Mage.Sets/src/mage/cards/i/InventorsApprentice.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; @@ -50,8 +51,8 @@ public class InventorsApprentice extends CardImpl { public InventorsApprentice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/InventorsGoggles.java b/Mage.Sets/src/mage/cards/i/InventorsGoggles.java index f5102000bc..8a8d9e7514 100644 --- a/Mage.Sets/src/mage/cards/i/InventorsGoggles.java +++ b/Mage.Sets/src/mage/cards/i/InventorsGoggles.java @@ -47,7 +47,7 @@ public class InventorsGoggles extends CardImpl { public InventorsGoggles(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 2, Duration.WhileOnBattlefield))); diff --git a/Mage.Sets/src/mage/cards/i/InverterOfTruth.java b/Mage.Sets/src/mage/cards/i/InverterOfTruth.java index 2efb0ddf62..a330de3767 100644 --- a/Mage.Sets/src/mage/cards/i/InverterOfTruth.java +++ b/Mage.Sets/src/mage/cards/i/InverterOfTruth.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class InverterOfTruth extends CardImpl { public InverterOfTruth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/i/InvigoratedRampage.java b/Mage.Sets/src/mage/cards/i/InvigoratedRampage.java index 02c4be8e86..d70a71bd5d 100644 --- a/Mage.Sets/src/mage/cards/i/InvigoratedRampage.java +++ b/Mage.Sets/src/mage/cards/i/InvigoratedRampage.java @@ -1,81 +1,81 @@ -/* - * 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.cards.i; - -import java.util.UUID; -import mage.abilities.Mode; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.continuous.BoostTargetEffect; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.abilities.keyword.TrampleAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Styxo - */ -public class InvigoratedRampage extends CardImpl { - - public InvigoratedRampage(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); - - // Choose one - // Target creature gets +4/+0 and gains trample until end of turn. - Effect effect = new BoostTargetEffect(4, 0, Duration.EndOfTurn); - effect.setText("Target creature gets +4/+0"); - this.getSpellAbility().addEffect(effect); - effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn); - effect.setText("and gains trample until end of turn"); - this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - - // Two target creatures each get +2/+0 and gain trample until end of turn. - Mode mode = new Mode(); - effect = new BoostTargetEffect(2, 0, Duration.EndOfTurn); - effect.setText("Two target creatures each get +2/+0"); - mode.getEffects().add(effect); - effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn); - effect.setText("and gain trample until end of turn"); - mode.getEffects().add(effect); - mode.getTargets().add(new TargetCreaturePermanent(2)); - this.getSpellAbility().addMode(mode); - } - - public InvigoratedRampage(final InvigoratedRampage card) { - super(card); - } - - @Override - public InvigoratedRampage copy() { - return new InvigoratedRampage(this); - } -} +/* + * 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.cards.i; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Styxo + */ +public class InvigoratedRampage extends CardImpl { + + public InvigoratedRampage(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); + + // Choose one + // Target creature gets +4/+0 and gains trample until end of turn. + Effect effect = new BoostTargetEffect(4, 0, Duration.EndOfTurn); + effect.setText("Target creature gets +4/+0"); + this.getSpellAbility().addEffect(effect); + effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains trample until end of turn"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Two target creatures each get +2/+0 and gain trample until end of turn. + Mode mode = new Mode(); + effect = new BoostTargetEffect(2, 0, Duration.EndOfTurn); + effect.setText("Two target creatures each get +2/+0"); + mode.getEffects().add(effect); + effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gain trample until end of turn"); + mode.getEffects().add(effect); + mode.getTargets().add(new TargetCreaturePermanent(2)); + this.getSpellAbility().addMode(mode); + } + + public InvigoratedRampage(final InvigoratedRampage card) { + super(card); + } + + @Override + public InvigoratedRampage copy() { + return new InvigoratedRampage(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/InvigoratingBoon.java b/Mage.Sets/src/mage/cards/i/InvigoratingBoon.java index 9b0da289b9..74b2b51f2b 100644 --- a/Mage.Sets/src/mage/cards/i/InvigoratingBoon.java +++ b/Mage.Sets/src/mage/cards/i/InvigoratingBoon.java @@ -1,63 +1,63 @@ -/* - * 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.cards.i; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.CycleAllTriggeredAbility; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.counters.CounterType; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Styxo - */ -public class InvigoratingBoon extends CardImpl { - - public InvigoratingBoon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); - - // Whenever a player cycles a card, you may put a +1/+1 counter on target creature. - Ability ability = new CycleAllTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), true); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability); - } - - public InvigoratingBoon(final InvigoratingBoon card) { - super(card); - } - - @Override - public InvigoratingBoon copy() { - return new InvigoratingBoon(this); - } -} +/* + * 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.cards.i; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.CycleAllTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Styxo + */ +public class InvigoratingBoon extends CardImpl { + + public InvigoratingBoon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); + + // Whenever a player cycles a card, you may put a +1/+1 counter on target creature. + Ability ability = new CycleAllTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), true); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public InvigoratingBoon(final InvigoratingBoon card) { + super(card); + } + + @Override + public InvigoratingBoon copy() { + return new InvigoratingBoon(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/Invisibility.java b/Mage.Sets/src/mage/cards/i/Invisibility.java index bcbc6310be..40fcd6aba5 100644 --- a/Mage.Sets/src/mage/cards/i/Invisibility.java +++ b/Mage.Sets/src/mage/cards/i/Invisibility.java @@ -55,7 +55,7 @@ public class Invisibility extends CardImpl { public Invisibility(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/i/InvisibleStalker.java b/Mage.Sets/src/mage/cards/i/InvisibleStalker.java index 86157b0da4..e06875a4a3 100644 --- a/Mage.Sets/src/mage/cards/i/InvisibleStalker.java +++ b/Mage.Sets/src/mage/cards/i/InvisibleStalker.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class InvisibleStalker extends CardImpl { public InvisibleStalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/InvocationOfSaintTraft.java b/Mage.Sets/src/mage/cards/i/InvocationOfSaintTraft.java index 17a6278ea3..4169859e96 100644 --- a/Mage.Sets/src/mage/cards/i/InvocationOfSaintTraft.java +++ b/Mage.Sets/src/mage/cards/i/InvocationOfSaintTraft.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class InvocationOfSaintTraft extends CardImpl { public InvocationOfSaintTraft(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant Creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/i/IonCannon.java b/Mage.Sets/src/mage/cards/i/IonCannon.java index 4b27694f4e..956420497a 100644 --- a/Mage.Sets/src/mage/cards/i/IonCannon.java +++ b/Mage.Sets/src/mage/cards/i/IonCannon.java @@ -1,74 +1,75 @@ -/* - * 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.cards.i; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.continuous.LoseAbilityTargetEffect; -import mage.abilities.keyword.DefenderAbility; -import mage.abilities.keyword.SpaceflightAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.target.common.TargetOpponentsCreaturePermanent; - -/** - * - * @author Styxo - */ -public class IonCannon extends CardImpl { - - public IonCannon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{W}"); - this.subtype.add("Construct"); - this.power = new MageInt(4); - this.toughness = new MageInt(4); - - // Defender - this.addAbility(DefenderAbility.getInstance()); - - // {T}: Target creature an opponent control loses spaceflight until end of turn. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseAbilityTargetEffect(SpaceflightAbility.getInstance(), Duration.EndOfTurn), new TapSourceCost()); - ability.addTarget(new TargetOpponentsCreaturePermanent()); - this.addAbility(ability); - } - - public IonCannon(final IonCannon card) { - super(card); - } - - @Override - public IonCannon copy() { - return new IonCannon(this); - } -} +/* + * 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.cards.i; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.continuous.LoseAbilityTargetEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.abilities.keyword.SpaceflightAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.target.common.TargetOpponentsCreaturePermanent; + +/** + * + * @author Styxo + */ +public class IonCannon extends CardImpl { + + public IonCannon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{W}"); + this.subtype.add(SubType.CONSTRUCT); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + + // {T}: Target creature an opponent control loses spaceflight until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseAbilityTargetEffect(SpaceflightAbility.getInstance(), Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetOpponentsCreaturePermanent()); + this.addAbility(ability); + } + + public IonCannon(final IonCannon card) { + super(card); + } + + @Override + public IonCannon copy() { + return new IonCannon(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/IonaShieldOfEmeria.java b/Mage.Sets/src/mage/cards/i/IonaShieldOfEmeria.java index 7163a64877..a01955b929 100644 --- a/Mage.Sets/src/mage/cards/i/IonaShieldOfEmeria.java +++ b/Mage.Sets/src/mage/cards/i/IonaShieldOfEmeria.java @@ -53,7 +53,7 @@ public class IonaShieldOfEmeria extends CardImpl { public IonaShieldOfEmeria(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{W}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/i/IonasBlessing.java b/Mage.Sets/src/mage/cards/i/IonasBlessing.java index d5b00a2d93..248914a1b0 100644 --- a/Mage.Sets/src/mage/cards/i/IonasBlessing.java +++ b/Mage.Sets/src/mage/cards/i/IonasBlessing.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -59,7 +60,7 @@ public class IonasBlessing extends CardImpl { public IonasBlessing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/i/IpnuRivulet.java b/Mage.Sets/src/mage/cards/i/IpnuRivulet.java index 1d63f3d292..ca767ac01a 100644 --- a/Mage.Sets/src/mage/cards/i/IpnuRivulet.java +++ b/Mage.Sets/src/mage/cards/i/IpnuRivulet.java @@ -62,7 +62,7 @@ public class IpnuRivulet extends CardImpl { public IpnuRivulet(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Desert"); + this.subtype.add(SubType.DESERT); // {t}: Add {C} to your mana pool. this.addAbility(new ColorlessManaAbility()); diff --git a/Mage.Sets/src/mage/cards/i/IreShaman.java b/Mage.Sets/src/mage/cards/i/IreShaman.java index 42c812734a..e58fe28962 100644 --- a/Mage.Sets/src/mage/cards/i/IreShaman.java +++ b/Mage.Sets/src/mage/cards/i/IreShaman.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.game.Game; @@ -57,8 +58,8 @@ public class IreShaman extends CardImpl { public IreShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Orc"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/IridescentAngel.java b/Mage.Sets/src/mage/cards/i/IridescentAngel.java index 80573a0085..6ce689b931 100644 --- a/Mage.Sets/src/mage/cards/i/IridescentAngel.java +++ b/Mage.Sets/src/mage/cards/i/IridescentAngel.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -58,7 +59,7 @@ public class IridescentAngel extends CardImpl { public IridescentAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{U}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/IridescentDrake.java b/Mage.Sets/src/mage/cards/i/IridescentDrake.java new file mode 100644 index 0000000000..223ddb3276 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/IridescentDrake.java @@ -0,0 +1,117 @@ +/* + * 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.cards.i; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.predicate.other.AuraCardCanAttachToPermanentId; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCardInGraveyard; + +/** + * + * @author TheElk801 + */ +public class IridescentDrake extends CardImpl { + + public IridescentDrake(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.DRAKE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Iridescent Drake enters the battlefield, put target Aura card from a graveyard onto the battlefield under your control attached to Iridescent Drake. + Ability ability = new EntersBattlefieldTriggeredAbility(new IridescentDrakeEffect()); + ability.addTarget(new TargetCardInGraveyard()); + this.addAbility(ability); + } + + public IridescentDrake(final IridescentDrake card) { + super(card); + } + + @Override + public IridescentDrake copy() { + return new IridescentDrake(this); + } +} + +class IridescentDrakeEffect extends OneShotEffect { + + public IridescentDrakeEffect() { + super(Outcome.Benefit); + this.staticText = "put target Aura card from a graveyard onto the battlefield under your control attached to {this}"; + } + + public IridescentDrakeEffect(final IridescentDrakeEffect effect) { + super(effect); + } + + @Override + public IridescentDrakeEffect copy() { + return new IridescentDrakeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(source.getSourceId()); + Card targetAuraCard = game.getCard(source.getFirstTarget()); + if (controller != null + && permanent != null + && controller.canRespond() + && targetAuraCard != null + && new AuraCardCanAttachToPermanentId(permanent.getId()).apply(targetAuraCard, game)) { + Target target = targetAuraCard.getSpellAbility().getTargets().get(0); + if (target != null) { + game.getState().setValue("attachTo:" + targetAuraCard.getId(), permanent); + controller.moveCards(targetAuraCard, Zone.BATTLEFIELD, source, game); + return permanent.addAttachment(targetAuraCard.getId(), game); + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/i/IriniSengir.java b/Mage.Sets/src/mage/cards/i/IriniSengir.java index 52fcb97f3c..619b16ca19 100644 --- a/Mage.Sets/src/mage/cards/i/IriniSengir.java +++ b/Mage.Sets/src/mage/cards/i/IriniSengir.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.cost.SpellsCostIncreasementAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterEnchantmentCard; @@ -56,8 +57,8 @@ public class IriniSengir extends CardImpl { public IriniSengir(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vampire"); - this.subtype.add("Dwarf"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.DWARF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/IroasGodOfVictory.java b/Mage.Sets/src/mage/cards/i/IroasGodOfVictory.java index 97b217f554..00b036f9d9 100644 --- a/Mage.Sets/src/mage/cards/i/IroasGodOfVictory.java +++ b/Mage.Sets/src/mage/cards/i/IroasGodOfVictory.java @@ -61,7 +61,7 @@ public class IroasGodOfVictory extends CardImpl { public IroasGodOfVictory(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{R}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(7); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/IroassChampion.java b/Mage.Sets/src/mage/cards/i/IroassChampion.java index b38559408d..040a733652 100644 --- a/Mage.Sets/src/mage/cards/i/IroassChampion.java +++ b/Mage.Sets/src/mage/cards/i/IroassChampion.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class IroassChampion extends CardImpl { public IroassChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/IronBarbHellion.java b/Mage.Sets/src/mage/cards/i/IronBarbHellion.java index 3c55183d9c..a1b513dbfa 100644 --- a/Mage.Sets/src/mage/cards/i/IronBarbHellion.java +++ b/Mage.Sets/src/mage/cards/i/IronBarbHellion.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class IronBarbHellion extends CardImpl { public IronBarbHellion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Hellion"); - this.subtype.add("Beast"); + this.subtype.add(SubType.HELLION); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/IronFistOfTheEmpire.java b/Mage.Sets/src/mage/cards/i/IronFistOfTheEmpire.java index 87c9c3e822..7384e11853 100644 --- a/Mage.Sets/src/mage/cards/i/IronFistOfTheEmpire.java +++ b/Mage.Sets/src/mage/cards/i/IronFistOfTheEmpire.java @@ -1,72 +1,72 @@ -/* - * 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.cards.i; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.TriggeredAbility; -import mage.abilities.common.BeginningOfEndStepTriggeredAbility; -import mage.abilities.condition.common.HateCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.GainLifeEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.TargetController; -import mage.game.permanent.token.RoyalGuardToken; -import mage.watchers.common.LifeLossOtherFromCombatWatcher; - -/** - * - * @author Styxo - */ -public class IronFistOfTheEmpire extends CardImpl { - - public IronFistOfTheEmpire(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{B}{R}"); - - // Hate — At the beggining of each end step, if opponent lost life from a source other than combat damage this turn, you gain 2 life and create a 2/2 red Soldier creature token with first strike name Royal Guard. - TriggeredAbility triggeredAbility = new BeginningOfEndStepTriggeredAbility(new GainLifeEffect(2), TargetController.ANY, false); - triggeredAbility.addEffect(new CreateTokenEffect(new RoyalGuardToken())); - Ability ability = new ConditionalTriggeredAbility( - triggeredAbility, - HateCondition.instance, - "Hate — At the beggining of each end step, if opponent lost life from a source other than combat damage this turn, you gain 1 life and create a 2/2 red Soldier creature token with first strike named Royal Guard."); - this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); - } - - public IronFistOfTheEmpire(final IronFistOfTheEmpire card) { - super(card); - } - - @Override - public IronFistOfTheEmpire copy() { - return new IronFistOfTheEmpire(this); - } -} +/* + * 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.cards.i; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.condition.common.HateCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.game.permanent.token.RoyalGuardToken; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; + +/** + * + * @author Styxo + */ +public class IronFistOfTheEmpire extends CardImpl { + + public IronFistOfTheEmpire(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{B}{R}"); + + // Hate — At the beggining of each end step, if opponent lost life from a source other than combat damage this turn, you gain 2 life and create a 2/2 red Soldier creature token with first strike name Royal Guard. + TriggeredAbility triggeredAbility = new BeginningOfEndStepTriggeredAbility(new GainLifeEffect(2), TargetController.ANY, false); + triggeredAbility.addEffect(new CreateTokenEffect(new RoyalGuardToken())); + Ability ability = new ConditionalTriggeredAbility( + triggeredAbility, + HateCondition.instance, + "Hate — At the beggining of each end step, if opponent lost life from a source other than combat damage this turn, you gain 1 life and create a 2/2 red Soldier creature token with first strike named Royal Guard."); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); + } + + public IronFistOfTheEmpire(final IronFistOfTheEmpire card) { + super(card); + } + + @Override + public IronFistOfTheEmpire copy() { + return new IronFistOfTheEmpire(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/IronHeartChimera.java b/Mage.Sets/src/mage/cards/i/IronHeartChimera.java new file mode 100644 index 0000000000..0ed742e319 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/IronHeartChimera.java @@ -0,0 +1,87 @@ +/* + * 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.cards.i; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * + * @author TheElk801 + */ +public class IronHeartChimera extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Chimera creature you control"); + + static { + filter.add(new SubtypePredicate(SubType.CHIMERA)); + } + + public IronHeartChimera(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + + this.subtype.add(SubType.CHIMERA); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Sacrifice Iron-Heart Chimera: Put a +2/+2 counter on target Chimera creature. It gains vigilance. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P2P2.createInstance()), new SacrificeSourceCost()); + ability.addEffect(new GainAbilityTargetEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield)); + ability.addTarget(new TargetCreaturePermanent(filter)); + addAbility(ability); + } + + public IronHeartChimera(final IronHeartChimera card) { + super(card); + } + + @Override + public IronHeartChimera copy() { + return new IronHeartChimera(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/IronLance.java b/Mage.Sets/src/mage/cards/i/IronLance.java index 610bd67cad..f2d691de04 100644 --- a/Mage.Sets/src/mage/cards/i/IronLance.java +++ b/Mage.Sets/src/mage/cards/i/IronLance.java @@ -1,68 +1,68 @@ -/* - * 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.cards.i; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.abilities.keyword.FirstStrikeAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Derpthemeus - */ -public class IronLance extends CardImpl { - - public IronLance(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - - // {3}, {tap}: Target creature gains first strike until end of turn. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{3}")); - ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability); - } - - public IronLance(final IronLance card) { - super(card); - } - - @Override - public IronLance copy() { - return new IronLance(this); - } -} +/* + * 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.cards.i; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Derpthemeus + */ +public class IronLance extends CardImpl { + + public IronLance(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + + // {3}, {tap}: Target creature gains first strike until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{3}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public IronLance(final IronLance card) { + super(card); + } + + @Override + public IronLance copy() { + return new IronLance(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/IronLeagueSteed.java b/Mage.Sets/src/mage/cards/i/IronLeagueSteed.java index 340fa2ee3f..f582666dff 100644 --- a/Mage.Sets/src/mage/cards/i/IronLeagueSteed.java +++ b/Mage.Sets/src/mage/cards/i/IronLeagueSteed.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class IronLeagueSteed extends CardImpl { public IronLeagueSteed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/IronMyr.java b/Mage.Sets/src/mage/cards/i/IronMyr.java index 621e771877..1ac8b11278 100644 --- a/Mage.Sets/src/mage/cards/i/IronMyr.java +++ b/Mage.Sets/src/mage/cards/i/IronMyr.java @@ -34,6 +34,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class IronMyr extends CardImpl { public IronMyr (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(1); this.addAbility(new RedManaAbility()); diff --git a/Mage.Sets/src/mage/cards/i/IronTuskElephant.java b/Mage.Sets/src/mage/cards/i/IronTuskElephant.java index 644411e46e..f559187aee 100644 --- a/Mage.Sets/src/mage/cards/i/IronTuskElephant.java +++ b/Mage.Sets/src/mage/cards/i/IronTuskElephant.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class IronTuskElephant extends CardImpl { public IronTuskElephant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/IroncladRevolutionary.java b/Mage.Sets/src/mage/cards/i/IroncladRevolutionary.java index 83c99fb04f..dcf36b510c 100644 --- a/Mage.Sets/src/mage/cards/i/IroncladRevolutionary.java +++ b/Mage.Sets/src/mage/cards/i/IroncladRevolutionary.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterControlledArtifactPermanent; import mage.target.common.TargetControlledPermanent; @@ -51,8 +52,8 @@ public class IroncladRevolutionary extends CardImpl { public IroncladRevolutionary(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); - this.subtype.add("Aetherborn"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.AETHERBORN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/IroncladSlayer.java b/Mage.Sets/src/mage/cards/i/IroncladSlayer.java index 0d39839e7f..5c992df469 100644 --- a/Mage.Sets/src/mage/cards/i/IroncladSlayer.java +++ b/Mage.Sets/src/mage/cards/i/IroncladSlayer.java @@ -56,8 +56,8 @@ public class IroncladSlayer extends CardImpl { public IroncladSlayer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/IronclawBuzzardiers.java b/Mage.Sets/src/mage/cards/i/IronclawBuzzardiers.java index 66079182b3..2248049ca3 100644 --- a/Mage.Sets/src/mage/cards/i/IronclawBuzzardiers.java +++ b/Mage.Sets/src/mage/cards/i/IronclawBuzzardiers.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; @@ -57,8 +58,8 @@ public class IronclawBuzzardiers extends CardImpl { public IronclawBuzzardiers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Orc"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/IronclawOrcs.java b/Mage.Sets/src/mage/cards/i/IronclawOrcs.java index 8208a368a0..db7841c5d8 100644 --- a/Mage.Sets/src/mage/cards/i/IronclawOrcs.java +++ b/Mage.Sets/src/mage/cards/i/IronclawOrcs.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.CantBlockCreaturesSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -52,7 +53,7 @@ public class IronclawOrcs extends CardImpl { public IronclawOrcs(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Orc"); + this.subtype.add(SubType.ORC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/Ironfang.java b/Mage.Sets/src/mage/cards/i/Ironfang.java index ece14aff66..e85c4b0a5b 100644 --- a/Mage.Sets/src/mage/cards/i/Ironfang.java +++ b/Mage.Sets/src/mage/cards/i/Ironfang.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -48,7 +49,7 @@ public class Ironfang extends CardImpl { public Ironfang(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.color.setRed(true); // this card is the second face of double-faced card diff --git a/Mage.Sets/src/mage/cards/i/IronfistCrusher.java b/Mage.Sets/src/mage/cards/i/IronfistCrusher.java index 40563dd7a9..2972f2f87d 100644 --- a/Mage.Sets/src/mage/cards/i/IronfistCrusher.java +++ b/Mage.Sets/src/mage/cards/i/IronfistCrusher.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class IronfistCrusher extends CardImpl { public IronfistCrusher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/IronhoofOx.java b/Mage.Sets/src/mage/cards/i/IronhoofOx.java index 2a5f838d09..bbc4585d85 100644 --- a/Mage.Sets/src/mage/cards/i/IronhoofOx.java +++ b/Mage.Sets/src/mage/cards/i/IronhoofOx.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByMoreThanOneSourceEffe import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -44,7 +45,7 @@ public class IronhoofOx extends CardImpl { public IronhoofOx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Ox"); + this.subtype.add(SubType.OX); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/IronrootTreefolk.java b/Mage.Sets/src/mage/cards/i/IronrootTreefolk.java index dcd2eaefdf..23356729ee 100644 --- a/Mage.Sets/src/mage/cards/i/IronrootTreefolk.java +++ b/Mage.Sets/src/mage/cards/i/IronrootTreefolk.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class IronrootTreefolk extends CardImpl { public IronrootTreefolk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/i/IronshellBeetle.java b/Mage.Sets/src/mage/cards/i/IronshellBeetle.java index fbfb4b9f48..b33437d8c8 100644 --- a/Mage.Sets/src/mage/cards/i/IronshellBeetle.java +++ b/Mage.Sets/src/mage/cards/i/IronshellBeetle.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -46,7 +47,7 @@ public class IronshellBeetle extends CardImpl { public IronshellBeetle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/IrontreadCrusher.java b/Mage.Sets/src/mage/cards/i/IrontreadCrusher.java index 1b3cd4fdd5..9905127fc0 100644 --- a/Mage.Sets/src/mage/cards/i/IrontreadCrusher.java +++ b/Mage.Sets/src/mage/cards/i/IrontreadCrusher.java @@ -1,64 +1,64 @@ -/* - * 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.cards.i; - -import mage.MageInt; -import mage.abilities.keyword.CrewAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; - -import java.util.UUID; - -/** - * - * @author Styxo - */ -public class IrontreadCrusher extends CardImpl { - - public IrontreadCrusher(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); - - this.subtype.add(SubType.VEHICLE); - this.power = new MageInt(6); - this.toughness = new MageInt(6); - - // Crew 3 - this.addAbility(new CrewAbility(3)); - } - - public IrontreadCrusher(final IrontreadCrusher card) { - super(card); - } - - @Override - public IrontreadCrusher copy() { - return new IrontreadCrusher(this); - } -} +/* + * 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.cards.i; + +import mage.MageInt; +import mage.abilities.keyword.CrewAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * + * @author Styxo + */ +public class IrontreadCrusher extends CardImpl { + + public IrontreadCrusher(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); + + this.subtype.add(SubType.VEHICLE); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Crew 3 + this.addAbility(new CrewAbility(3)); + } + + public IrontreadCrusher(final IrontreadCrusher card) { + super(card); + } + + @Override + public IrontreadCrusher copy() { + return new IrontreadCrusher(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/IrrigatedFarmland.java b/Mage.Sets/src/mage/cards/i/IrrigatedFarmland.java index 83afd63f0a..c2b81bd904 100644 --- a/Mage.Sets/src/mage/cards/i/IrrigatedFarmland.java +++ b/Mage.Sets/src/mage/cards/i/IrrigatedFarmland.java @@ -36,6 +36,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class IrrigatedFarmland extends CardImpl { public IrrigatedFarmland(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Plains"); - this.subtype.add("Island"); + this.subtype.add(SubType.PLAINS); + this.subtype.add(SubType.ISLAND); // ({T}: Add {W} or {U} to your mana pool.) this.addAbility(new WhiteManaAbility()); diff --git a/Mage.Sets/src/mage/cards/i/IsamaruHoundofKonda.java b/Mage.Sets/src/mage/cards/i/IsamaruHoundofKonda.java index 93f6b6e393..1837c0246e 100644 --- a/Mage.Sets/src/mage/cards/i/IsamaruHoundofKonda.java +++ b/Mage.Sets/src/mage/cards/i/IsamaruHoundofKonda.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -44,7 +45,7 @@ public class IsamaruHoundofKonda extends CardImpl { public IsamaruHoundofKonda (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/IsaoEnlightenedBushi.java b/Mage.Sets/src/mage/cards/i/IsaoEnlightenedBushi.java index 4edebb19c3..f097912879 100644 --- a/Mage.Sets/src/mage/cards/i/IsaoEnlightenedBushi.java +++ b/Mage.Sets/src/mage/cards/i/IsaoEnlightenedBushi.java @@ -60,8 +60,8 @@ public class IsaoEnlightenedBushi extends CardImpl { public IsaoEnlightenedBushi(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/IshaiOjutaiDragonspeaker.java b/Mage.Sets/src/mage/cards/i/IshaiOjutaiDragonspeaker.java index 76535d0092..b7956ee5d1 100644 --- a/Mage.Sets/src/mage/cards/i/IshaiOjutaiDragonspeaker.java +++ b/Mage.Sets/src/mage/cards/i/IshaiOjutaiDragonspeaker.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.PartnerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.counters.CounterType; @@ -49,8 +50,8 @@ public class IshaiOjutaiDragonspeaker extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Bird"); - this.subtype.add("Monk"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.MONK); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/IshiIshiAkkiCrackshot.java b/Mage.Sets/src/mage/cards/i/IshiIshiAkkiCrackshot.java index 782e4e6e63..8553572ced 100644 --- a/Mage.Sets/src/mage/cards/i/IshiIshiAkkiCrackshot.java +++ b/Mage.Sets/src/mage/cards/i/IshiIshiAkkiCrackshot.java @@ -52,8 +52,8 @@ public class IshiIshiAkkiCrackshot extends CardImpl { public IshiIshiAkkiCrackshot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/IshkanahGrafwidow.java b/Mage.Sets/src/mage/cards/i/IshkanahGrafwidow.java index 09615b70bc..dbe4f450ac 100644 --- a/Mage.Sets/src/mage/cards/i/IshkanahGrafwidow.java +++ b/Mage.Sets/src/mage/cards/i/IshkanahGrafwidow.java @@ -65,7 +65,7 @@ public class IshkanahGrafwidow extends CardImpl { public IshkanahGrafwidow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/i/IslandFishJasconius.java b/Mage.Sets/src/mage/cards/i/IslandFishJasconius.java index 3d238e930e..7411e0c51e 100644 --- a/Mage.Sets/src/mage/cards/i/IslandFishJasconius.java +++ b/Mage.Sets/src/mage/cards/i/IslandFishJasconius.java @@ -51,7 +51,7 @@ public class IslandFishJasconius extends CardImpl { public IslandFishJasconius(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}{U}"); - this.subtype.add("Fish"); + this.subtype.add(SubType.FISH); this.power = new MageInt(6); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/i/IslandOfWakWak.java b/Mage.Sets/src/mage/cards/i/IslandOfWakWak.java index fea3f88ec4..e027cfcc87 100644 --- a/Mage.Sets/src/mage/cards/i/IslandOfWakWak.java +++ b/Mage.Sets/src/mage/cards/i/IslandOfWakWak.java @@ -62,7 +62,7 @@ public class IslandOfWakWak extends CardImpl { public IslandOfWakWak(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - // {tap}: The power of target creature with flying becomes 0 until end of turn. + // {tap}: Target creature with flying has base power 0 until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new IslandOfWakWakEffect(), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent(filterWithFlying)); this.addAbility(ability); @@ -82,7 +82,7 @@ class IslandOfWakWakEffect extends OneShotEffect { public IslandOfWakWakEffect() { super(Outcome.Detriment); - staticText = "The power of target creature with flying becomes 0 until end of turn"; + staticText = "Target creature with flying has base power 0 until end of turn."; } public IslandOfWakWakEffect(final IslandOfWakWakEffect effect) { diff --git a/Mage.Sets/src/mage/cards/i/IslebackSpawn.java b/Mage.Sets/src/mage/cards/i/IslebackSpawn.java index 3207a3ca02..36be349498 100644 --- a/Mage.Sets/src/mage/cards/i/IslebackSpawn.java +++ b/Mage.Sets/src/mage/cards/i/IslebackSpawn.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class IslebackSpawn extends CardImpl { public IslebackSpawn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); - this.subtype.add("Kraken"); + this.subtype.add(SubType.KRAKEN); this.power = new MageInt(4); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/i/IsolatedChapel.java b/Mage.Sets/src/mage/cards/i/IsolatedChapel.java index 761a102a52..f002742ff3 100644 --- a/Mage.Sets/src/mage/cards/i/IsolatedChapel.java +++ b/Mage.Sets/src/mage/cards/i/IsolatedChapel.java @@ -61,7 +61,7 @@ public class IsolatedChapel extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.LAND},null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); - String abilityText = "tap it unless you control a Plains or a Swamp"; + String abilityText = " tapped unless you control a Plains or a Swamp"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new WhiteManaAbility()); this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/cards/i/IsperiaSupremeJudge.java b/Mage.Sets/src/mage/cards/i/IsperiaSupremeJudge.java index 6d98b613e9..060562ae10 100644 --- a/Mage.Sets/src/mage/cards/i/IsperiaSupremeJudge.java +++ b/Mage.Sets/src/mage/cards/i/IsperiaSupremeJudge.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -46,7 +47,7 @@ public class IsperiaSupremeJudge extends CardImpl { public IsperiaSupremeJudge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); addSuperType(SuperType.LEGENDARY); diff --git a/Mage.Sets/src/mage/cards/i/IsperiaTheInscrutable.java b/Mage.Sets/src/mage/cards/i/IsperiaTheInscrutable.java index a3030b8774..e179e1342a 100644 --- a/Mage.Sets/src/mage/cards/i/IsperiaTheInscrutable.java +++ b/Mage.Sets/src/mage/cards/i/IsperiaTheInscrutable.java @@ -40,6 +40,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.filter.FilterCard; @@ -58,7 +59,7 @@ public class IsperiaTheInscrutable extends CardImpl { public IsperiaTheInscrutable(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}{U}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/i/IsperiasSkywatch.java b/Mage.Sets/src/mage/cards/i/IsperiasSkywatch.java index a383f35486..85859d4bda 100644 --- a/Mage.Sets/src/mage/cards/i/IsperiasSkywatch.java +++ b/Mage.Sets/src/mage/cards/i/IsperiasSkywatch.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -55,8 +56,8 @@ public class IsperiasSkywatch extends CardImpl { public IsperiasSkywatch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Knight"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/ItOfTheHorridSwarm.java b/Mage.Sets/src/mage/cards/i/ItOfTheHorridSwarm.java index 4a565c8133..374ac0b954 100644 --- a/Mage.Sets/src/mage/cards/i/ItOfTheHorridSwarm.java +++ b/Mage.Sets/src/mage/cards/i/ItOfTheHorridSwarm.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EmergeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.InsectToken; /** @@ -46,8 +47,8 @@ public class ItOfTheHorridSwarm extends CardImpl { public ItOfTheHorridSwarm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{8}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Insect"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.INSECT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/ItThatBetrays.java b/Mage.Sets/src/mage/cards/i/ItThatBetrays.java index b6ed914c1a..507e7ca2c5 100644 --- a/Mage.Sets/src/mage/cards/i/ItThatBetrays.java +++ b/Mage.Sets/src/mage/cards/i/ItThatBetrays.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.AnnihilatorAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.permanent.TokenPredicate; @@ -53,7 +54,7 @@ public class ItThatBetrays extends CardImpl { public ItThatBetrays(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{12}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(11); this.toughness = new MageInt(11); diff --git a/Mage.Sets/src/mage/cards/i/ItThatRidesAsOne.java b/Mage.Sets/src/mage/cards/i/ItThatRidesAsOne.java index d2ba94dcc7..3574e01211 100644 --- a/Mage.Sets/src/mage/cards/i/ItThatRidesAsOne.java +++ b/Mage.Sets/src/mage/cards/i/ItThatRidesAsOne.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class ItThatRidesAsOne extends CardImpl { public ItThatRidesAsOne(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Eldrazi"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/IthHighArcanist.java b/Mage.Sets/src/mage/cards/i/IthHighArcanist.java index 1eddda6891..5ff259dfce 100644 --- a/Mage.Sets/src/mage/cards/i/IthHighArcanist.java +++ b/Mage.Sets/src/mage/cards/i/IthHighArcanist.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -56,8 +57,8 @@ public class IthHighArcanist extends CardImpl { public IthHighArcanist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/i/IthorianInitiate.java b/Mage.Sets/src/mage/cards/i/IthorianInitiate.java index e2f964bd2e..e3bcf12b88 100644 --- a/Mage.Sets/src/mage/cards/i/IthorianInitiate.java +++ b/Mage.Sets/src/mage/cards/i/IthorianInitiate.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MeditateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; @@ -48,8 +49,8 @@ public class IthorianInitiate extends CardImpl { public IthorianInitiate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Ithorian"); - this.subtype.add("Jedi"); + this.subtype.add(SubType.ITHORIAN); + this.subtype.add(SubType.JEDI); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/i/ItlimocCradleOfTheSun.java b/Mage.Sets/src/mage/cards/i/ItlimocCradleOfTheSun.java new file mode 100644 index 0000000000..2253f43765 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/ItlimocCradleOfTheSun.java @@ -0,0 +1,78 @@ +/* + * 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.cards.i; + +import java.util.UUID; + +import mage.Mana; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.mana.DynamicManaAbility; +import mage.abilities.mana.GreenManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SuperType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author JRHerlehy + */ +public class ItlimocCradleOfTheSun extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("creature you control"); + + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); + } + + public ItlimocCradleOfTheSun(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + this.addSuperType(SuperType.LEGENDARY); + + // (Transforms from Growing Rites of Itlimoc.)/ + this.nightCard = true; + + // {T}: Add {G} to your mana pool. + this.addAbility(new GreenManaAbility()); + + // {T}: Add {G} to your mana pool for each creature you control. + this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), new PermanentsOnBattlefieldCount(filter))); + } + + public ItlimocCradleOfTheSun(final ItlimocCradleOfTheSun card) { + super(card); + } + + @Override + public ItlimocCradleOfTheSun copy() { + return new ItlimocCradleOfTheSun(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/IvoryGiant.java b/Mage.Sets/src/mage/cards/i/IvoryGiant.java index dbc61291c0..f539b37192 100644 --- a/Mage.Sets/src/mage/cards/i/IvoryGiant.java +++ b/Mage.Sets/src/mage/cards/i/IvoryGiant.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -54,7 +55,7 @@ public class IvoryGiant extends CardImpl { public IvoryGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/i/IvoryGuardians.java b/Mage.Sets/src/mage/cards/i/IvoryGuardians.java index 5d93e0dde1..248fcd02bd 100644 --- a/Mage.Sets/src/mage/cards/i/IvoryGuardians.java +++ b/Mage.Sets/src/mage/cards/i/IvoryGuardians.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -64,8 +65,8 @@ public class IvoryGuardians extends CardImpl { public IvoryGuardians(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Giant"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/IvorytuskFortress.java b/Mage.Sets/src/mage/cards/i/IvorytuskFortress.java index 32cb48faa3..c8709612d2 100644 --- a/Mage.Sets/src/mage/cards/i/IvorytuskFortress.java +++ b/Mage.Sets/src/mage/cards/i/IvorytuskFortress.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.UntapAllDuringEachOtherPlayersUn import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -53,7 +54,7 @@ public class IvorytuskFortress extends CardImpl { public IvorytuskFortress(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{B}{G}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(5); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/i/IvyDancer.java b/Mage.Sets/src/mage/cards/i/IvyDancer.java index 9062daf172..799a813a4d 100644 --- a/Mage.Sets/src/mage/cards/i/IvyDancer.java +++ b/Mage.Sets/src/mage/cards/i/IvyDancer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class IvyDancer extends CardImpl { public IvyDancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Dryad"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.DRYAD); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/IvyElemental.java b/Mage.Sets/src/mage/cards/i/IvyElemental.java index 83311bac02..89df135c4f 100644 --- a/Mage.Sets/src/mage/cards/i/IvyElemental.java +++ b/Mage.Sets/src/mage/cards/i/IvyElemental.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -44,7 +45,7 @@ public class IvyElemental extends CardImpl { public IvyElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{X}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/i/IvyLaneDenizen.java b/Mage.Sets/src/mage/cards/i/IvyLaneDenizen.java index 356d5ac9f2..e4871b512d 100644 --- a/Mage.Sets/src/mage/cards/i/IvyLaneDenizen.java +++ b/Mage.Sets/src/mage/cards/i/IvyLaneDenizen.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterControlledCreaturePermanent; @@ -57,8 +58,8 @@ public class IvyLaneDenizen extends CardImpl { public IvyLaneDenizen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/IwamoriOfTheOpenFist.java b/Mage.Sets/src/mage/cards/i/IwamoriOfTheOpenFist.java index 8cd186dd23..de24a43106 100644 --- a/Mage.Sets/src/mage/cards/i/IwamoriOfTheOpenFist.java +++ b/Mage.Sets/src/mage/cards/i/IwamoriOfTheOpenFist.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class IwamoriOfTheOpenFist extends CardImpl { public IwamoriOfTheOpenFist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/i/IxalansBinding.java b/Mage.Sets/src/mage/cards/i/IxalansBinding.java new file mode 100644 index 0000000000..1e41ce332e --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/IxalansBinding.java @@ -0,0 +1,145 @@ +/* + * 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.cards.i; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.delayed.OnLeaveReturnExiledToBattlefieldAbility; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.ExileUntilSourceLeavesEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterNonlandPermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.ExileZone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.util.CardUtil; + +/** + * + * @author TheElk801 + */ +public class IxalansBinding extends CardImpl { + + private final static FilterNonlandPermanent filter = new FilterNonlandPermanent(); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public IxalansBinding(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + + // When Ixalan's Binding enters the battlefield, exile target nonland permanent an opponent controls until Ixalan's Binding leaves the battlefield. + Ability ability = new EntersBattlefieldTriggeredAbility(new ExileUntilSourceLeavesEffect(filter.getMessage())); + ability.addTarget(new TargetPermanent(filter)); + ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility())); + this.addAbility(ability); + + // Your opponents can't cast spells with the same name as the exiled card. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new IxalansBindingReplacementEffect())); + } + + public IxalansBinding(final IxalansBinding card) { + super(card); + } + + @Override + public IxalansBinding copy() { + return new IxalansBinding(this); + } +} + +class IxalansBindingReplacementEffect extends ContinuousRuleModifyingEffectImpl { + + IxalansBindingReplacementEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + staticText = "Your opponents can't cast spells with the same name as the exiled card"; + } + + IxalansBindingReplacementEffect(final IxalansBindingReplacementEffect effect) { + super(effect); + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.CAST_SPELL_LATE; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + Permanent sourcePermanent = game.getPermanent(source.getSourceId()); + Card card = game.getCard(event.getSourceId()); + if(event.getPlayerId().equals(source.getControllerId())){ + return false; + } + if (sourcePermanent != null && card != null) { + UUID exileZone = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); + if (exileZone != null) { + ExileZone exile = game.getExile().getExileZone(exileZone); + if (exile == null) { + // try without ZoneChangeCounter - that is useful for tokens + exileZone = CardUtil.getCardExileZoneId(game, source); + if (exileZone != null) { + exile = game.getExile().getExileZone(exileZone); + } + } + if (exile != null) { + for (Card crad : exile.getCards(game)) { + if (crad.getName().equals(card.getName())) { + return true; + } + } + } + } + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public IxalansBindingReplacementEffect copy() { + return new IxalansBindingReplacementEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/IxallisDiviner.java b/Mage.Sets/src/mage/cards/i/IxallisDiviner.java new file mode 100644 index 0000000000..f8b9eafbe7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/IxallisDiviner.java @@ -0,0 +1,65 @@ +/* + * 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.cards.i; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.keyword.ExploreSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class IxallisDiviner extends CardImpl { + + public IxallisDiviner(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); + this.power = new MageInt(0); + this.toughness = new MageInt(3); + + // When Ixalli's Diviner enters the battlefield, it explores. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ExploreSourceEffect())); + } + + public IxallisDiviner(final IxallisDiviner card) { + super(card); + } + + @Override + public IxallisDiviner copy() { + return new IxallisDiviner(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/IxallisKeeper.java b/Mage.Sets/src/mage/cards/i/IxallisKeeper.java new file mode 100644 index 0000000000..289076e484 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/IxallisKeeper.java @@ -0,0 +1,81 @@ +/* + * 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.cards.i; + +import java.util.UUID; +import mage.MageInt; +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.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class IxallisKeeper extends CardImpl { + + public IxallisKeeper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {7}{G}, {T}, Sacrifice Ixalli's Keeper: Target creature gets +5/+5 and gains trample until end of turn. + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new BoostTargetEffect(5, 5, Duration.EndOfTurn) + .setText("Target creature gets +5/+5"), new ManaCostsImpl("{7}{G}")); + ability.addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn) + .setText("and gains trample until end of turn")); + ability.addTarget(new TargetCreaturePermanent()); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public IxallisKeeper(final IxallisKeeper card) { + super(card); + } + + @Override + public IxallisKeeper copy() { + return new IxallisKeeper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/IxidorRealitySculptor.java b/Mage.Sets/src/mage/cards/i/IxidorRealitySculptor.java index dd3e46633a..dc7f4e618b 100644 --- a/Mage.Sets/src/mage/cards/i/IxidorRealitySculptor.java +++ b/Mage.Sets/src/mage/cards/i/IxidorRealitySculptor.java @@ -33,15 +33,13 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.TurnFaceUpTargetEffect; import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.other.FaceDownPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; /** @@ -51,25 +49,25 @@ import mage.target.common.TargetCreaturePermanent; public class IxidorRealitySculptor extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Face-down creatures"); - private static final FilterCreaturePermanent filterTarget = new FilterCreaturePermanent("Face-down creature"); + private static final FilterCreaturePermanent filterTarget = new FilterCreaturePermanent("face-down creature"); static { filter.add(new FaceDownPredicate()); filterTarget.add(new FaceDownPredicate()); } - + public IxidorRealitySculptor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); - + addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(4); // Face-down creatures get +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, false))); - + // {2}{U}: Turn target face-down creature face up. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TurnFaceUpTargetEffect(), new ManaCostsImpl("{2}{U}")); ability.addTarget(new TargetCreaturePermanent(filterTarget)); @@ -85,32 +83,3 @@ public class IxidorRealitySculptor extends CardImpl { return new IxidorRealitySculptor(this); } } - -class TurnFaceUpTargetEffect extends OneShotEffect { - - public TurnFaceUpTargetEffect() { - super(Outcome.Benefit); - this.staticText = "Turn target face-down creature face up."; - } - - public TurnFaceUpTargetEffect(final TurnFaceUpTargetEffect effect) { - super(effect); - } - - @Override - public TurnFaceUpTargetEffect copy() { - return new TurnFaceUpTargetEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - UUID target = targetPointer.getFirst(game, source); - if (target != null) { - Permanent permanent = game.getPermanent(target); - if (permanent != null) { - return permanent.turnFaceUp(game, source.getControllerId()); - } - } - return false; - } -} diff --git a/Mage.Sets/src/mage/cards/i/Ixidron.java b/Mage.Sets/src/mage/cards/i/Ixidron.java index 247e107eeb..ec2c4b368e 100644 --- a/Mage.Sets/src/mage/cards/i/Ixidron.java +++ b/Mage.Sets/src/mage/cards/i/Ixidron.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -63,7 +64,7 @@ public class Ixidron extends CardImpl { public Ixidron(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/i/IzzetChemister.java b/Mage.Sets/src/mage/cards/i/IzzetChemister.java index b131d44322..ec022d586e 100644 --- a/Mage.Sets/src/mage/cards/i/IzzetChemister.java +++ b/Mage.Sets/src/mage/cards/i/IzzetChemister.java @@ -43,6 +43,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -64,8 +65,8 @@ public class IzzetChemister extends CardImpl { public IzzetChemister(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/i/IzzetChronarch.java b/Mage.Sets/src/mage/cards/i/IzzetChronarch.java index 6a4fcf5c4e..85a49bce4f 100644 --- a/Mage.Sets/src/mage/cards/i/IzzetChronarch.java +++ b/Mage.Sets/src/mage/cards/i/IzzetChronarch.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -56,8 +57,8 @@ public class IzzetChronarch extends CardImpl { public IzzetChronarch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/IzzetGuildmage.java b/Mage.Sets/src/mage/cards/i/IzzetGuildmage.java index 4e3d993c20..1133b99107 100644 --- a/Mage.Sets/src/mage/cards/i/IzzetGuildmage.java +++ b/Mage.Sets/src/mage/cards/i/IzzetGuildmage.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.CopyTargetSpellEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.TargetController; import mage.constants.Zone; @@ -65,8 +66,8 @@ public class IzzetGuildmage extends CardImpl { public IzzetGuildmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U/R}{U/R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/i/IzzetKeyrune.java b/Mage.Sets/src/mage/cards/i/IzzetKeyrune.java index 3a5beccc2a..ed143a5c97 100644 --- a/Mage.Sets/src/mage/cards/i/IzzetKeyrune.java +++ b/Mage.Sets/src/mage/cards/i/IzzetKeyrune.java @@ -40,6 +40,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -111,7 +112,7 @@ public class IzzetKeyrune extends CardImpl { cardType.add(CardType.CREATURE); color.setBlue(true); color.setRed(true); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); power = new MageInt(2); toughness = new MageInt(1); } diff --git a/Mage.Sets/src/mage/cards/i/IzzetStaticaster.java b/Mage.Sets/src/mage/cards/i/IzzetStaticaster.java index 93d4a0c816..d8852b24de 100644 --- a/Mage.Sets/src/mage/cards/i/IzzetStaticaster.java +++ b/Mage.Sets/src/mage/cards/i/IzzetStaticaster.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -55,8 +56,8 @@ public class IzzetStaticaster extends CardImpl { public IzzetStaticaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JabbaTheHutt.java b/Mage.Sets/src/mage/cards/j/JabbaTheHutt.java index f50e788741..ad95825546 100644 --- a/Mage.Sets/src/mage/cards/j/JabbaTheHutt.java +++ b/Mage.Sets/src/mage/cards/j/JabbaTheHutt.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -70,8 +71,8 @@ public class JabbaTheHutt extends CardImpl { public JabbaTheHutt(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Hutt"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUTT); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/j/JaceArchitectOfThought.java b/Mage.Sets/src/mage/cards/j/JaceArchitectOfThought.java index 4bd194c5f6..a0b7f28c86 100644 --- a/Mage.Sets/src/mage/cards/j/JaceArchitectOfThought.java +++ b/Mage.Sets/src/mage/cards/j/JaceArchitectOfThought.java @@ -44,6 +44,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SuperType; @@ -73,7 +74,7 @@ public class JaceArchitectOfThought extends CardImpl { public JaceArchitectOfThought(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{2}{U}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Jace"); + this.subtype.add(SubType.JACE); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/j/JaceBeleren.java b/Mage.Sets/src/mage/cards/j/JaceBeleren.java index 0522627a37..657dabb79a 100644 --- a/Mage.Sets/src/mage/cards/j/JaceBeleren.java +++ b/Mage.Sets/src/mage/cards/j/JaceBeleren.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.target.TargetPlayer; @@ -48,7 +49,7 @@ public class JaceBeleren extends CardImpl { public JaceBeleren(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{1}{U}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Jace"); + this.subtype.add(SubType.JACE); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/j/JaceCunningCastaway.java b/Mage.Sets/src/mage/cards/j/JaceCunningCastaway.java new file mode 100644 index 0000000000..501657b9a6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/j/JaceCunningCastaway.java @@ -0,0 +1,187 @@ +/* + * 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.cards.j; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.LoyaltyAbility; +import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DrawDiscardControllerEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SuperType; +import mage.game.Game; +import mage.game.events.DamagedPlayerEvent; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.JaceCunningCastawayIllusionToken; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public class JaceCunningCastaway extends CardImpl { + + public JaceCunningCastaway(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{1}{U}{U}"); + + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.JACE); + + this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); + + // +1: Whenever one or more creatures you control deal combat damage to a player this turn, draw a card, then discard a card. + this.addAbility(new LoyaltyAbility(new JaceCunningCastawayEffect1(), 1)); + + // -2: Create a 2/2 blue Illusion creature token with "When this creature becomes the target of a spell, sacrifice it." + this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new JaceCunningCastawayIllusionToken()), -2)); + + // -5: Create two tokens that are copies of Jace, Cunning Castaway, except they're not legendary. + this.addAbility(new LoyaltyAbility(new JaceCunningCastawayCopyEffect(), -5)); + } + + public JaceCunningCastaway(final JaceCunningCastaway card) { + super(card); + } + + @Override + public JaceCunningCastaway copy() { + return new JaceCunningCastaway(this); + } +} + +class JaceCunningCastawayEffect1 extends OneShotEffect { + + public JaceCunningCastawayEffect1() { + super(Outcome.DrawCard); + this.staticText = "Whenever one or more creatures you control deal combat damage to a player this turn, draw a card, then discard a card"; + } + + public JaceCunningCastawayEffect1(final JaceCunningCastawayEffect1 effect) { + super(effect); + } + + @Override + public JaceCunningCastawayEffect1 copy() { + return new JaceCunningCastawayEffect1(this); + } + + @Override + public boolean apply(Game game, Ability source) { + DelayedTriggeredAbility delayedAbility = new JaceCunningCastawayDamageTriggeredAbility(); + game.addDelayedTriggeredAbility(delayedAbility, source); + return true; + } +} + +class JaceCunningCastawayDamageTriggeredAbility extends DelayedTriggeredAbility { + + List damagedPlayerIds = new ArrayList<>(); + + public JaceCunningCastawayDamageTriggeredAbility() { + super(new DrawDiscardControllerEffect(1, 1), Duration.EndOfTurn, false); + } + + public JaceCunningCastawayDamageTriggeredAbility(final JaceCunningCastawayDamageTriggeredAbility ability) { + super(ability); + } + + @Override + public JaceCunningCastawayDamageTriggeredAbility copy() { + return new JaceCunningCastawayDamageTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DAMAGED_PLAYER + || event.getType() == GameEvent.EventType.END_COMBAT_STEP_POST; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) { + if (((DamagedPlayerEvent) event).isCombatDamage()) { + Permanent creature = game.getPermanent(event.getSourceId()); + if (creature != null && creature.getControllerId().equals(controllerId) + && !damagedPlayerIds.contains(event.getTargetId())) { + damagedPlayerIds.add(event.getTargetId()); + return true; + } + } + } + if (event.getType() == GameEvent.EventType.END_COMBAT_STEP_POST) { + damagedPlayerIds.clear(); + } + return false; + } + + @Override + public String getRule() { + return "Whenever one or more creatures you control deal combat damage to a player this turn, draw a card, then discard a card"; + } +} + +class JaceCunningCastawayCopyEffect extends OneShotEffect { + + JaceCunningCastawayCopyEffect() { + super(Outcome.Benefit); + this.staticText = "Create two tokens that are copies of {this}, except they're not legendary"; + } + + JaceCunningCastawayCopyEffect(final JaceCunningCastawayCopyEffect effect) { + super(effect); + } + + @Override + public JaceCunningCastawayCopyEffect copy() { + return new JaceCunningCastawayCopyEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (permanent != null) { + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), null, false, 2); + effect.setTargetPointer(new FixedTarget(source.getSourceId(), game)); + effect.setIsntLegendary(true); + return effect.apply(game, source); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/j/JaceIngeniousMindMage.java b/Mage.Sets/src/mage/cards/j/JaceIngeniousMindMage.java new file mode 100644 index 0000000000..5d8fdb57f0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/j/JaceIngeniousMindMage.java @@ -0,0 +1,80 @@ +/* + * 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.cards.j; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.LoyaltyAbility; +import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.UntapAllControllerEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.SuperType; +import mage.filter.StaticFilters; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class JaceIngeniousMindMage extends CardImpl { + + public JaceIngeniousMindMage(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{U}{U}"); + + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.JACE); + + this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); + + // +1: Draw a card. + this.addAbility(new LoyaltyAbility(new DrawCardSourceControllerEffect(1), 1)); + + // +1: Untap all creatures you control. + this.addAbility(new LoyaltyAbility(new UntapAllControllerEffect(StaticFilters.FILTER_PERMANENT_CREATURES), 1)); + + // -9: Gain control of up to three target creatures. + Ability ability = new LoyaltyAbility(new GainControlTargetEffect(Duration.Custom), -9); + ability.addTarget(new TargetCreaturePermanent(0, 3, StaticFilters.FILTER_PERMANENT_CREATURES, false)); + this.addAbility(ability); + } + + public JaceIngeniousMindMage(final JaceIngeniousMindMage card) { + super(card); + } + + @Override + public JaceIngeniousMindMage copy() { + return new JaceIngeniousMindMage(this); + } +} diff --git a/Mage.Sets/src/mage/cards/j/JaceMemoryAdept.java b/Mage.Sets/src/mage/cards/j/JaceMemoryAdept.java index 199a9e6275..d58d51ecf2 100644 --- a/Mage.Sets/src/mage/cards/j/JaceMemoryAdept.java +++ b/Mage.Sets/src/mage/cards/j/JaceMemoryAdept.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.game.Game; import mage.players.Player; @@ -51,7 +52,7 @@ public class JaceMemoryAdept extends CardImpl { public JaceMemoryAdept(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{3}{U}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Jace"); + this.subtype.add(SubType.JACE); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/j/JaceTelepathUnbound.java b/Mage.Sets/src/mage/cards/j/JaceTelepathUnbound.java index 51724d82ef..8378a26328 100644 --- a/Mage.Sets/src/mage/cards/j/JaceTelepathUnbound.java +++ b/Mage.Sets/src/mage/cards/j/JaceTelepathUnbound.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SuperType; @@ -66,7 +67,7 @@ public class JaceTelepathUnbound extends CardImpl { public JaceTelepathUnbound(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, ""); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Jace"); + this.subtype.add(SubType.JACE); this.color.setBlue(true); this.nightCard = true; diff --git a/Mage.Sets/src/mage/cards/j/JaceTheLivingGuildpact.java b/Mage.Sets/src/mage/cards/j/JaceTheLivingGuildpact.java index d096b622f8..498d999b87 100644 --- a/Mage.Sets/src/mage/cards/j/JaceTheLivingGuildpact.java +++ b/Mage.Sets/src/mage/cards/j/JaceTheLivingGuildpact.java @@ -40,6 +40,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -66,7 +67,7 @@ public class JaceTheLivingGuildpact extends CardImpl { public JaceTheLivingGuildpact(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{2}{U}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Jace"); + this.subtype.add(SubType.JACE); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); diff --git a/Mage.Sets/src/mage/cards/j/JaceTheMindSculptor.java b/Mage.Sets/src/mage/cards/j/JaceTheMindSculptor.java index 120a9fe157..bd6a19f2ba 100644 --- a/Mage.Sets/src/mage/cards/j/JaceTheMindSculptor.java +++ b/Mage.Sets/src/mage/cards/j/JaceTheMindSculptor.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class JaceTheMindSculptor extends CardImpl { public JaceTheMindSculptor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{2}{U}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Jace"); + this.subtype.add(SubType.JACE); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/j/JaceUnravelerOfSecrets.java b/Mage.Sets/src/mage/cards/j/JaceUnravelerOfSecrets.java index b3d85832c3..c2ddc9c34c 100644 --- a/Mage.Sets/src/mage/cards/j/JaceUnravelerOfSecrets.java +++ b/Mage.Sets/src/mage/cards/j/JaceUnravelerOfSecrets.java @@ -39,6 +39,7 @@ import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.game.command.emblems.JaceUnravelerOfSecretsEmblem; import mage.target.common.TargetCreaturePermanent; @@ -54,7 +55,7 @@ public class JaceUnravelerOfSecrets extends CardImpl { public JaceUnravelerOfSecrets(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{U}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Jace"); + this.subtype.add(SubType.JACE); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); diff --git a/Mage.Sets/src/mage/cards/j/JaceVrynsProdigy.java b/Mage.Sets/src/mage/cards/j/JaceVrynsProdigy.java index 84ad153226..d5a1dab264 100644 --- a/Mage.Sets/src/mage/cards/j/JaceVrynsProdigy.java +++ b/Mage.Sets/src/mage/cards/j/JaceVrynsProdigy.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class JaceVrynsProdigy extends CardImpl { public JaceVrynsProdigy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JacesArchivist.java b/Mage.Sets/src/mage/cards/j/JacesArchivist.java index d6695b32bf..6d46b5460f 100644 --- a/Mage.Sets/src/mage/cards/j/JacesArchivist.java +++ b/Mage.Sets/src/mage/cards/j/JacesArchivist.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class JacesArchivist extends CardImpl { public JacesArchivist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JacesMindseeker.java b/Mage.Sets/src/mage/cards/j/JacesMindseeker.java index e23e7587b5..1f89f789f7 100644 --- a/Mage.Sets/src/mage/cards/j/JacesMindseeker.java +++ b/Mage.Sets/src/mage/cards/j/JacesMindseeker.java @@ -41,6 +41,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -58,8 +59,8 @@ public class JacesMindseeker extends CardImpl { public JacesMindseeker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{U}"); - this.subtype.add("Fish"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.FISH); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/j/JacesPhantasm.java b/Mage.Sets/src/mage/cards/j/JacesPhantasm.java index 3f168606c6..ec79be5a20 100644 --- a/Mage.Sets/src/mage/cards/j/JacesPhantasm.java +++ b/Mage.Sets/src/mage/cards/j/JacesPhantasm.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class JacesPhantasm extends CardImpl { public JacesPhantasm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JacesSentinel.java b/Mage.Sets/src/mage/cards/j/JacesSentinel.java new file mode 100644 index 0000000000..5d27ac6b60 --- /dev/null +++ b/Mage.Sets/src/mage/cards/j/JacesSentinel.java @@ -0,0 +1,92 @@ +/* + * 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.cards.j; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author TheElk801 + */ +public class JacesSentinel extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("a Jace planeswalker"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + filter.add(new CardTypePredicate(CardType.PLANESWALKER)); + filter.add(new SubtypePredicate(SubType.JACE)); + } + + public JacesSentinel(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // As long as you control a Jace planeswalker, Jace's Sentinel gets +1/+0 and can't be blocked. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostSourceEffect(1, 0, Duration.WhileOnBattlefield), + new PermanentsOnTheBattlefieldCondition(filter), + "As long as you control a Jace planeswalker, {this} gets +1/+0")); + ability.addEffect(new ConditionalContinuousEffect( + new CantBeBlockedSourceEffect(), + new PermanentsOnTheBattlefieldCondition(filter), + "and can't be blocked")); + this.addAbility(ability); + } + + public JacesSentinel(final JacesSentinel card) { + super(card); + } + + @Override + public JacesSentinel copy() { + return new JacesSentinel(this); + } +} diff --git a/Mage.Sets/src/mage/cards/j/JackalFamiliar.java b/Mage.Sets/src/mage/cards/j/JackalFamiliar.java index 1ae0c0426b..0df2a26a27 100644 --- a/Mage.Sets/src/mage/cards/j/JackalFamiliar.java +++ b/Mage.Sets/src/mage/cards/j/JackalFamiliar.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.CantBlockAloneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author magenoxx_at_gmail.com @@ -42,7 +43,7 @@ public class JackalFamiliar extends CardImpl { public JackalFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Jackal"); + this.subtype.add(SubType.JACKAL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JackalPup.java b/Mage.Sets/src/mage/cards/j/JackalPup.java index 3af2a677d8..f4984ef300 100644 --- a/Mage.Sets/src/mage/cards/j/JackalPup.java +++ b/Mage.Sets/src/mage/cards/j/JackalPup.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -48,14 +49,14 @@ import mage.players.Player; public class JackalPup extends CardImpl { public JackalPup(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Jackal"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); + this.subtype.add(SubType.JACKAL); this.power = new MageInt(2); this.toughness = new MageInt(1); // Whenever Jackal Pup is dealt damage, it deals that much damage to you. - this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new JackalPupEffect(), false)); + this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new JackalPupEffect(), false, false, true)); } diff --git a/Mage.Sets/src/mage/cards/j/JackalopeHerd.java b/Mage.Sets/src/mage/cards/j/JackalopeHerd.java index b2187aad67..b0dd86ccd9 100644 --- a/Mage.Sets/src/mage/cards/j/JackalopeHerd.java +++ b/Mage.Sets/src/mage/cards/j/JackalopeHerd.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterSpell; /** @@ -44,8 +45,8 @@ public class JackalopeHerd extends CardImpl { public JackalopeHerd(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Rabbit"); - this.subtype.add("Beast"); + this.subtype.add(SubType.RABBIT); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/j/JacquesLeVert.java b/Mage.Sets/src/mage/cards/j/JacquesLeVert.java index ed54c35520..68e70f7197 100644 --- a/Mage.Sets/src/mage/cards/j/JacquesLeVert.java +++ b/Mage.Sets/src/mage/cards/j/JacquesLeVert.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -56,8 +57,8 @@ public class JacquesLeVert extends CardImpl { public JacquesLeVert(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{G}{W}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JaddiLifestrider.java b/Mage.Sets/src/mage/cards/j/JaddiLifestrider.java index 3a0ba8d7f4..07965c1d4b 100644 --- a/Mage.Sets/src/mage/cards/j/JaddiLifestrider.java +++ b/Mage.Sets/src/mage/cards/j/JaddiLifestrider.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -53,7 +54,7 @@ public class JaddiLifestrider extends CardImpl { public JaddiLifestrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/j/JaddiOffshoot.java b/Mage.Sets/src/mage/cards/j/JaddiOffshoot.java index edb6b75ea8..d9a7965529 100644 --- a/Mage.Sets/src/mage/cards/j/JaddiOffshoot.java +++ b/Mage.Sets/src/mage/cards/j/JaddiOffshoot.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class JaddiOffshoot extends CardImpl { public JaddiOffshoot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Plant"); + this.subtype.add(SubType.PLANT); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JadeGuardian.java b/Mage.Sets/src/mage/cards/j/JadeGuardian.java new file mode 100644 index 0000000000..00ec9d541e --- /dev/null +++ b/Mage.Sets/src/mage/cards/j/JadeGuardian.java @@ -0,0 +1,75 @@ +/* + * 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.cards.j; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.HexproofAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class JadeGuardian extends CardImpl { + + public JadeGuardian(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SHAMAN); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Hexproof + this.addAbility(HexproofAbility.getInstance()); + + // When Jade Guardian enters the battlefield, put a +1/+1 counter on target Merfolk you control. + Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance())); + ability.addTarget(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent(SubType.MERFOLK, "Merfolk you control"))); + this.addAbility(ability); + } + + public JadeGuardian(final JadeGuardian card) { + super(card); + } + + @Override + public JadeGuardian copy() { + return new JadeGuardian(this); + } +} diff --git a/Mage.Sets/src/mage/cards/j/JadeIdol.java b/Mage.Sets/src/mage/cards/j/JadeIdol.java index ee56c212e6..3fa6bed3e8 100644 --- a/Mage.Sets/src/mage/cards/j/JadeIdol.java +++ b/Mage.Sets/src/mage/cards/j/JadeIdol.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; import mage.game.permanent.token.Token; @@ -65,7 +66,7 @@ class JadeIdolToken extends Token { super("", "4/4 Spirit artifact creature"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); power = new MageInt(4); toughness = new MageInt(4); } diff --git a/Mage.Sets/src/mage/cards/j/JadeLeech.java b/Mage.Sets/src/mage/cards/j/JadeLeech.java index 86058268d4..ffa3fae640 100644 --- a/Mage.Sets/src/mage/cards/j/JadeLeech.java +++ b/Mage.Sets/src/mage/cards/j/JadeLeech.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.cost.SpellsCostIncreasementControllerEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ColorPredicate; @@ -54,7 +55,7 @@ public class JadeLeech extends CardImpl { public JadeLeech(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Leech"); + this.subtype.add(SubType.LEECH); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/j/JadeMage.java b/Mage.Sets/src/mage/cards/j/JadeMage.java index 0eb1d812c9..cf6f0e6775 100644 --- a/Mage.Sets/src/mage/cards/j/JadeMage.java +++ b/Mage.Sets/src/mage/cards/j/JadeMage.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.SaprolingToken; @@ -46,8 +47,8 @@ public class JadeMage extends CardImpl { public JadeMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JadeStatue.java b/Mage.Sets/src/mage/cards/j/JadeStatue.java index 5c1ff5d524..36d5ae7e5b 100644 --- a/Mage.Sets/src/mage/cards/j/JadeStatue.java +++ b/Mage.Sets/src/mage/cards/j/JadeStatue.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TurnPhase; import mage.constants.Zone; @@ -69,7 +70,7 @@ public class JadeStatue extends CardImpl { super("", "3/6 Golem artifact creature"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); power = new MageInt(3); toughness = new MageInt(6); } diff --git a/Mage.Sets/src/mage/cards/j/JaggedScarArchers.java b/Mage.Sets/src/mage/cards/j/JaggedScarArchers.java index d567471fa8..32a0895072 100644 --- a/Mage.Sets/src/mage/cards/j/JaggedScarArchers.java +++ b/Mage.Sets/src/mage/cards/j/JaggedScarArchers.java @@ -65,8 +65,8 @@ public class JaggedScarArchers extends CardImpl { public JaggedScarArchers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Archer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/j/JagwaspSwarm.java b/Mage.Sets/src/mage/cards/j/JagwaspSwarm.java index 0b630c5eb3..699ecc167d 100644 --- a/Mage.Sets/src/mage/cards/j/JagwaspSwarm.java +++ b/Mage.Sets/src/mage/cards/j/JagwaspSwarm.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class JagwaspSwarm extends CardImpl { public JagwaspSwarm (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.color.setBlack(true); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JaliraMasterPolymorphist.java b/Mage.Sets/src/mage/cards/j/JaliraMasterPolymorphist.java index b4fd0f97ba..f4d2c67dab 100644 --- a/Mage.Sets/src/mage/cards/j/JaliraMasterPolymorphist.java +++ b/Mage.Sets/src/mage/cards/j/JaliraMasterPolymorphist.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.RevealCardsFromLibraryUntilEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -61,8 +62,8 @@ public class JaliraMasterPolymorphist extends CardImpl { public JaliraMasterPolymorphist(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JamuraanLion.java b/Mage.Sets/src/mage/cards/j/JamuraanLion.java index 49a24a693a..12086ccabc 100644 --- a/Mage.Sets/src/mage/cards/j/JamuraanLion.java +++ b/Mage.Sets/src/mage/cards/j/JamuraanLion.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.combat.CantBlockTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class JamuraanLion extends CardImpl { public JamuraanLion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JangoFett.java b/Mage.Sets/src/mage/cards/j/JangoFett.java index deca5b1739..1f62423053 100644 --- a/Mage.Sets/src/mage/cards/j/JangoFett.java +++ b/Mage.Sets/src/mage/cards/j/JangoFett.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -64,8 +65,8 @@ public class JangoFett extends CardImpl { public JangoFett(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Hunter"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.HUNTER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JanjeetSentry.java b/Mage.Sets/src/mage/cards/j/JanjeetSentry.java index 24ed67124b..99f1f6ec3b 100644 --- a/Mage.Sets/src/mage/cards/j/JanjeetSentry.java +++ b/Mage.Sets/src/mage/cards/j/JanjeetSentry.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.TargetPermanent; @@ -51,8 +52,8 @@ public class JanjeetSentry extends CardImpl { public JanjeetSentry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JarJarBinks.java b/Mage.Sets/src/mage/cards/j/JarJarBinks.java index f6876c1a69..228e7879d7 100644 --- a/Mage.Sets/src/mage/cards/j/JarJarBinks.java +++ b/Mage.Sets/src/mage/cards/j/JarJarBinks.java @@ -57,7 +57,7 @@ public class JarJarBinks extends CardImpl { public JarJarBinks(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Gungan"); + this.subtype.add(SubType.GUNGAN); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JaradGolgariLichLord.java b/Mage.Sets/src/mage/cards/j/JaradGolgariLichLord.java index c740f2f32e..bee51ab341 100644 --- a/Mage.Sets/src/mage/cards/j/JaradGolgariLichLord.java +++ b/Mage.Sets/src/mage/cards/j/JaradGolgariLichLord.java @@ -67,8 +67,8 @@ public class JaradGolgariLichLord extends CardImpl { public JaradGolgariLichLord(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{B}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Zombie"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.ELF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JarethLeonineTitan.java b/Mage.Sets/src/mage/cards/j/JarethLeonineTitan.java index 89b69ca470..9fbf0d29d2 100644 --- a/Mage.Sets/src/mage/cards/j/JarethLeonineTitan.java +++ b/Mage.Sets/src/mage/cards/j/JarethLeonineTitan.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.GainProtectionFromColorSourceEff import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class JarethLeonineTitan extends CardImpl { public JarethLeonineTitan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Cat"); - this.subtype.add("Giant"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/j/JasmineBoreal.java b/Mage.Sets/src/mage/cards/j/JasmineBoreal.java index f127407a6f..7407546e63 100644 --- a/Mage.Sets/src/mage/cards/j/JasmineBoreal.java +++ b/Mage.Sets/src/mage/cards/j/JasmineBoreal.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -43,7 +44,7 @@ public class JasmineBoreal extends CardImpl { public JasmineBoreal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/j/JawboneSkulkin.java b/Mage.Sets/src/mage/cards/j/JawboneSkulkin.java index bcf9ecaeda..546810503a 100644 --- a/Mage.Sets/src/mage/cards/j/JawboneSkulkin.java +++ b/Mage.Sets/src/mage/cards/j/JawboneSkulkin.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -57,7 +58,7 @@ public class JawboneSkulkin extends CardImpl { public JawboneSkulkin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(1); this.toughness = new MageInt(1); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new GenericManaCost(2)); diff --git a/Mage.Sets/src/mage/cards/j/JayaBallardTaskMage.java b/Mage.Sets/src/mage/cards/j/JayaBallardTaskMage.java index 4e2855cb18..087d61809d 100644 --- a/Mage.Sets/src/mage/cards/j/JayaBallardTaskMage.java +++ b/Mage.Sets/src/mage/cards/j/JayaBallardTaskMage.java @@ -66,8 +66,8 @@ public class JayaBallardTaskMage extends CardImpl { public JayaBallardTaskMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JazalGoldmane.java b/Mage.Sets/src/mage/cards/j/JazalGoldmane.java index 3feacf65f5..799f5d2d71 100644 --- a/Mage.Sets/src/mage/cards/j/JazalGoldmane.java +++ b/Mage.Sets/src/mage/cards/j/JazalGoldmane.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -52,8 +53,8 @@ public class JazalGoldmane extends CardImpl { public JazalGoldmane(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Cat"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/j/JediBattleHealer.java b/Mage.Sets/src/mage/cards/j/JediBattleHealer.java index 8d6a7b140e..f5109fcb02 100644 --- a/Mage.Sets/src/mage/cards/j/JediBattleHealer.java +++ b/Mage.Sets/src/mage/cards/j/JediBattleHealer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MeditateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class JediBattleHealer extends CardImpl { public JediBattleHealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Mirialan"); - this.subtype.add("Jedi"); + this.subtype.add(SubType.MIRIALAN); + this.subtype.add(SubType.JEDI); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JediBattleMage.java b/Mage.Sets/src/mage/cards/j/JediBattleMage.java index c830aaa8b4..0b6f5145e2 100644 --- a/Mage.Sets/src/mage/cards/j/JediBattleMage.java +++ b/Mage.Sets/src/mage/cards/j/JediBattleMage.java @@ -1,73 +1,74 @@ -/* - * 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.cards.j; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; -import mage.abilities.effects.common.TapTargetEffect; -import mage.abilities.keyword.MeditateAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.target.common.TargetOpponentsCreaturePermanent; - -/** - * - * @author Styxo - */ -public class JediBattleMage extends CardImpl { - - public JediBattleMage(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Jedi"); - this.power = new MageInt(2); - this.toughness = new MageInt(4); - - // When Jedi Battle Mage enters the battlefield, tap target creature an opponent controls. That creature doesn't untap during its controles's next untap step. - EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect()); - ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect("That creature")); - ability.addTarget(new TargetOpponentsCreaturePermanent()); - this.addAbility(ability); - - // Meditate {1}{U} - this.addAbility(new MeditateAbility(new ManaCostsImpl("{1}{U}"))); - } - - public JediBattleMage(final JediBattleMage card) { - super(card); - } - - @Override - public JediBattleMage copy() { - return new JediBattleMage(this); - } -} +/* + * 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.cards.j; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.MeditateAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.target.common.TargetOpponentsCreaturePermanent; + +/** + * + * @author Styxo + */ +public class JediBattleMage extends CardImpl { + + public JediBattleMage(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.JEDI); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // When Jedi Battle Mage enters the battlefield, tap target creature an opponent controls. That creature doesn't untap during its controles's next untap step. + EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect()); + ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect("That creature")); + ability.addTarget(new TargetOpponentsCreaturePermanent()); + this.addAbility(ability); + + // Meditate {1}{U} + this.addAbility(new MeditateAbility(new ManaCostsImpl("{1}{U}"))); + } + + public JediBattleMage(final JediBattleMage card) { + super(card); + } + + @Override + public JediBattleMage copy() { + return new JediBattleMage(this); + } +} diff --git a/Mage.Sets/src/mage/cards/j/JediBattleSage.java b/Mage.Sets/src/mage/cards/j/JediBattleSage.java index b785566247..c5b88ae492 100644 --- a/Mage.Sets/src/mage/cards/j/JediBattleSage.java +++ b/Mage.Sets/src/mage/cards/j/JediBattleSage.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MeditateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class JediBattleSage extends CardImpl { public JediBattleSage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Sullustan"); - this.subtype.add("Jedi"); + this.subtype.add(SubType.SULLUSTAN); + this.subtype.add(SubType.JEDI); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JediHolocron.java b/Mage.Sets/src/mage/cards/j/JediHolocron.java index 69cadc3f8d..869037925f 100644 --- a/Mage.Sets/src/mage/cards/j/JediHolocron.java +++ b/Mage.Sets/src/mage/cards/j/JediHolocron.java @@ -1,94 +1,94 @@ -/* - * 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.cards.j; - -import java.util.UUID; -import mage.Mana; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.Cost; -import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.abilities.mana.BlueManaAbility; -import mage.abilities.mana.GreenManaAbility; -import mage.abilities.mana.SimpleManaAbility; -import mage.abilities.mana.WhiteManaAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.counters.CounterType; - -/** - * - * @author Styxo - */ -public class JediHolocron extends CardImpl { - - public JediHolocron(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); - - // {T}: Put a charge counter on Jedi Holocron. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance(1)), new TapSourceCost())); - - // {T}, Remove a charge counter from Jedi Holocron: Add {G}, {W} or {U} to your mana pool. - Cost cost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(1)); - Ability ability = new GreenManaAbility(); - ability.addCost(cost); - this.addAbility(ability); - - ability = new WhiteManaAbility(); - ability.addCost(cost); - this.addAbility(ability); - - ability = new BlueManaAbility(); - ability.addCost(cost); - this.addAbility(ability); - - // {T}, Remove two charge counters from Jedi Holocron: Add GW or WU to your mana pool. - cost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(2)); - - ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 0, 1, 0, 0, 0, 0), new TapSourceCost()); - ability.addCost(cost); - this.addAbility(ability); - - ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 1, 0, 0, 0, 0), new TapSourceCost()); - ability.addCost(cost); - this.addAbility(ability); - } - - public JediHolocron(final JediHolocron card) { - super(card); - } - - @Override - public JediHolocron copy() { - return new JediHolocron(this); - } -} +/* + * 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.cards.j; + +import java.util.UUID; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.mana.BlueManaAbility; +import mage.abilities.mana.GreenManaAbility; +import mage.abilities.mana.SimpleManaAbility; +import mage.abilities.mana.WhiteManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author Styxo + */ +public class JediHolocron extends CardImpl { + + public JediHolocron(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + // {T}: Put a charge counter on Jedi Holocron. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance(1)), new TapSourceCost())); + + // {T}, Remove a charge counter from Jedi Holocron: Add {G}, {W} or {U} to your mana pool. + Cost cost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(1)); + Ability ability = new GreenManaAbility(); + ability.addCost(cost); + this.addAbility(ability); + + ability = new WhiteManaAbility(); + ability.addCost(cost); + this.addAbility(ability); + + ability = new BlueManaAbility(); + ability.addCost(cost); + this.addAbility(ability); + + // {T}, Remove two charge counters from Jedi Holocron: Add GW or WU to your mana pool. + cost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(2)); + + ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 0, 1, 0, 0, 0, 0), new TapSourceCost()); + ability.addCost(cost); + this.addAbility(ability); + + ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 1, 0, 0, 0, 0), new TapSourceCost()); + ability.addCost(cost); + this.addAbility(ability); + } + + public JediHolocron(final JediHolocron card) { + super(card); + } + + @Override + public JediHolocron copy() { + return new JediHolocron(this); + } +} diff --git a/Mage.Sets/src/mage/cards/j/JediInquirer.java b/Mage.Sets/src/mage/cards/j/JediInquirer.java index 82a865d67f..1a26367a25 100644 --- a/Mage.Sets/src/mage/cards/j/JediInquirer.java +++ b/Mage.Sets/src/mage/cards/j/JediInquirer.java @@ -1,71 +1,72 @@ -/* - * 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.cards.j; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.LeavesBattlefieldTriggeredAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.keyword.MeditateAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.target.common.TargetEnchantmentPermanent; - -/** - * - * @author Styxo - */ -public class JediInquirer extends CardImpl { - - public JediInquirer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Jedi"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // When Jedi Inquirer leaves the battlefield, you may exile target enchantment. - LeavesBattlefieldTriggeredAbility ability = new LeavesBattlefieldTriggeredAbility(new ExileTargetEffect(), true); - ability.addTarget(new TargetEnchantmentPermanent()); - this.addAbility(ability); - - // Meditate {1}{W} - this.addAbility(new MeditateAbility(new ManaCostsImpl("{1}{W}"))); - } - - public JediInquirer(final JediInquirer card) { - super(card); - } - - @Override - public JediInquirer copy() { - return new JediInquirer(this); - } -} +/* + * 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.cards.j; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.keyword.MeditateAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.target.common.TargetEnchantmentPermanent; + +/** + * + * @author Styxo + */ +public class JediInquirer extends CardImpl { + + public JediInquirer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.JEDI); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Jedi Inquirer leaves the battlefield, you may exile target enchantment. + LeavesBattlefieldTriggeredAbility ability = new LeavesBattlefieldTriggeredAbility(new ExileTargetEffect(), true); + ability.addTarget(new TargetEnchantmentPermanent()); + this.addAbility(ability); + + // Meditate {1}{W} + this.addAbility(new MeditateAbility(new ManaCostsImpl("{1}{W}"))); + } + + public JediInquirer(final JediInquirer card) { + super(card); + } + + @Override + public JediInquirer copy() { + return new JediInquirer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/j/JediInstructor.java b/Mage.Sets/src/mage/cards/j/JediInstructor.java index b3cda2f633..ca004227e6 100644 --- a/Mage.Sets/src/mage/cards/j/JediInstructor.java +++ b/Mage.Sets/src/mage/cards/j/JediInstructor.java @@ -1,80 +1,81 @@ -/* - * 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.cards.j; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.abilities.keyword.MeditateAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.counters.CounterType; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.AnotherPredicate; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Styxo - */ -public class JediInstructor extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another target creature"); - - static { - filter.add(new AnotherPredicate()); - } - - public JediInstructor(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Twi'lek"); - this.subtype.add("Jedi"); - this.power = new MageInt(4); - this.toughness = new MageInt(4); - - // When Jedi Instructor enters the battlefield, you may put a +1/+1 counter on another target creature. - EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), true); - ability.addTarget(new TargetCreaturePermanent(filter)); - this.addAbility(ability); - - // Meditate {1}{W} - this.addAbility(new MeditateAbility(new ManaCostsImpl("{1}{W}"))); - } - - public JediInstructor(final JediInstructor card) { - super(card); - } - - @Override - public JediInstructor copy() { - return new JediInstructor(this); - } -} +/* + * 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.cards.j; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.MeditateAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Styxo + */ +public class JediInstructor extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another target creature"); + + static { + filter.add(new AnotherPredicate()); + } + + public JediInstructor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); + this.subtype.add(SubType.TWILEK); + this.subtype.add(SubType.JEDI); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // When Jedi Instructor enters the battlefield, you may put a +1/+1 counter on another target creature. + EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), true); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + + // Meditate {1}{W} + this.addAbility(new MeditateAbility(new ManaCostsImpl("{1}{W}"))); + } + + public JediInstructor(final JediInstructor card) { + super(card); + } + + @Override + public JediInstructor copy() { + return new JediInstructor(this); + } +} diff --git a/Mage.Sets/src/mage/cards/j/JediKnight.java b/Mage.Sets/src/mage/cards/j/JediKnight.java index 7b9550ea46..495ff88655 100644 --- a/Mage.Sets/src/mage/cards/j/JediKnight.java +++ b/Mage.Sets/src/mage/cards/j/JediKnight.java @@ -1,82 +1,83 @@ -/* - * 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.cards.j; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.LeavesBattlefieldTriggeredAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.ReturnToHandTargetEffect; -import mage.abilities.keyword.MeditateAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.TargetController; -import mage.filter.common.FilterNonlandPermanent; -import mage.filter.predicate.permanent.ControllerPredicate; -import mage.target.common.TargetNonlandPermanent; - -/** - * - * @author Styxo - */ -public class JediKnight extends CardImpl { - - private static final FilterNonlandPermanent filter = new FilterNonlandPermanent("nonland permanent you don't control"); - - static { - filter.add(new ControllerPredicate(TargetController.NOT_YOU)); - } - - public JediKnight(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{U}{W}"); - this.subtype.add("Human"); - this.subtype.add("Jedi"); - this.subtype.add("Knight"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // When Jedi Knight leaves the battlefield, return target nonland permanent you don't control to its owner's hands. - Ability ability = new LeavesBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false); - ability.addTarget(new TargetNonlandPermanent(filter)); - this.addAbility(ability); - - // Meditate {1}{U} - this.addAbility(new MeditateAbility(new ManaCostsImpl("{1}{U}"))); - } - - public JediKnight(final JediKnight card) { - super(card); - } - - @Override - public JediKnight copy() { - return new JediKnight(this); - } -} +/* + * 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.cards.j; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.MeditateAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.common.FilterNonlandPermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetNonlandPermanent; + +/** + * + * @author Styxo + */ +public class JediKnight extends CardImpl { + + private static final FilterNonlandPermanent filter = new FilterNonlandPermanent("nonland permanent you don't control"); + + static { + filter.add(new ControllerPredicate(TargetController.NOT_YOU)); + } + + public JediKnight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{U}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.JEDI); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Jedi Knight leaves the battlefield, return target nonland permanent you don't control to its owner's hands. + Ability ability = new LeavesBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false); + ability.addTarget(new TargetNonlandPermanent(filter)); + this.addAbility(ability); + + // Meditate {1}{U} + this.addAbility(new MeditateAbility(new ManaCostsImpl("{1}{U}"))); + } + + public JediKnight(final JediKnight card) { + super(card); + } + + @Override + public JediKnight copy() { + return new JediKnight(this); + } +} diff --git a/Mage.Sets/src/mage/cards/j/JediMindTrick.java b/Mage.Sets/src/mage/cards/j/JediMindTrick.java index a2a60169bf..07c2fe731d 100644 --- a/Mage.Sets/src/mage/cards/j/JediMindTrick.java +++ b/Mage.Sets/src/mage/cards/j/JediMindTrick.java @@ -1,60 +1,60 @@ -/* - * 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.cards.j; - -import java.util.UUID; -import mage.abilities.effects.common.turn.ControlTargetPlayerNextTurnEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.target.TargetPlayer; - -/** - * - * @author Styxo - */ -public class JediMindTrick extends CardImpl { - - public JediMindTrick(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{6}{U}"); - - // You control target player during that player's next turn. - this.getSpellAbility().addEffect(new ControlTargetPlayerNextTurnEffect()); - this.getSpellAbility().addTarget(new TargetPlayer()); - - } - - public JediMindTrick(final JediMindTrick card) { - super(card); - } - - @Override - public JediMindTrick copy() { - return new JediMindTrick(this); - } -} +/* + * 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.cards.j; + +import java.util.UUID; +import mage.abilities.effects.common.turn.ControlTargetPlayerNextTurnEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.TargetPlayer; + +/** + * + * @author Styxo + */ +public class JediMindTrick extends CardImpl { + + public JediMindTrick(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{6}{U}"); + + // You control target player during that player's next turn. + this.getSpellAbility().addEffect(new ControlTargetPlayerNextTurnEffect()); + this.getSpellAbility().addTarget(new TargetPlayer()); + + } + + public JediMindTrick(final JediMindTrick card) { + super(card); + } + + @Override + public JediMindTrick copy() { + return new JediMindTrick(this); + } +} diff --git a/Mage.Sets/src/mage/cards/j/JediSentinel.java b/Mage.Sets/src/mage/cards/j/JediSentinel.java index 1c84b79807..e0e663c02c 100644 --- a/Mage.Sets/src/mage/cards/j/JediSentinel.java +++ b/Mage.Sets/src/mage/cards/j/JediSentinel.java @@ -1,90 +1,91 @@ -/* - * 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.cards.j; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.ReturnToHandTargetEffect; -import mage.abilities.keyword.FlashAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.TargetController; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.AnotherPredicate; -import mage.filter.predicate.permanent.ControllerPredicate; -import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Styxo - */ -public class JediSentinel extends CardImpl { - - private static final FilterControlledCreaturePermanent filter1 = new FilterControlledCreaturePermanent("another target creature you control"); - private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creature you don't control"); - - static { - filter1.add(new AnotherPredicate()); - filter2.add(new ControllerPredicate(TargetController.NOT_YOU)); - } - - public JediSentinel(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{U}{W}"); - this.subtype.add("Twi'lek"); - this.subtype.add("Jedi"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // Flash - this.addAbility(FlashAbility.getInstance()); - - // When Jedi Sentinel enters the battlefield, return another target creature you control and target creature you don't control to their owners' hands. - Effect effect = new ReturnToHandTargetEffect(true); - effect.setText("return another target creature you control and target creature you don't control to their owners' hands"); - Ability ability = new EntersBattlefieldTriggeredAbility(effect); - ability.addTarget(new TargetControlledCreaturePermanent(filter1)); - ability.addTarget(new TargetCreaturePermanent(filter2)); - this.addAbility(ability); - - } - - public JediSentinel(final JediSentinel card) { - super(card); - } - - @Override - public JediSentinel copy() { - return new JediSentinel(this); - } -} +/* + * 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.cards.j; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Styxo + */ +public class JediSentinel extends CardImpl { + + private static final FilterControlledCreaturePermanent filter1 = new FilterControlledCreaturePermanent("another target creature you control"); + private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creature you don't control"); + + static { + filter1.add(new AnotherPredicate()); + filter2.add(new ControllerPredicate(TargetController.NOT_YOU)); + } + + public JediSentinel(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{U}{W}"); + this.subtype.add(SubType.TWILEK); + this.subtype.add(SubType.JEDI); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // When Jedi Sentinel enters the battlefield, return another target creature you control and target creature you don't control to their owners' hands. + Effect effect = new ReturnToHandTargetEffect(true); + effect.setText("return another target creature you control and target creature you don't control to their owners' hands"); + Ability ability = new EntersBattlefieldTriggeredAbility(effect); + ability.addTarget(new TargetControlledCreaturePermanent(filter1)); + ability.addTarget(new TargetCreaturePermanent(filter2)); + this.addAbility(ability); + + } + + public JediSentinel(final JediSentinel card) { + super(card); + } + + @Override + public JediSentinel copy() { + return new JediSentinel(this); + } +} diff --git a/Mage.Sets/src/mage/cards/j/JediStarfighter.java b/Mage.Sets/src/mage/cards/j/JediStarfighter.java index 22d8ab9262..aff6412efa 100644 --- a/Mage.Sets/src/mage/cards/j/JediStarfighter.java +++ b/Mage.Sets/src/mage/cards/j/JediStarfighter.java @@ -60,8 +60,8 @@ public class JediStarfighter extends CardImpl { public JediStarfighter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Jedi"); - this.subtype.add("Starship"); + this.subtype.add(SubType.JEDI); + this.subtype.add(SubType.STARSHIP); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JediTemple.java b/Mage.Sets/src/mage/cards/j/JediTemple.java index c443353898..fcd8444f5a 100644 --- a/Mage.Sets/src/mage/cards/j/JediTemple.java +++ b/Mage.Sets/src/mage/cards/j/JediTemple.java @@ -1,70 +1,70 @@ -/* - * 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.cards.j; - -import java.util.UUID; -import mage.Mana; -import mage.abilities.common.EntersBattlefieldTappedAbility; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.AddManaToManaPoolSourceControllerEffect; -import mage.abilities.mana.BlueManaAbility; -import mage.abilities.mana.GreenManaAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class JediTemple extends CardImpl { - - public JediTemple(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - - // Jedi Temple enters the battlefield tapped. - this.addAbility(new EntersBattlefieldTappedAbility()); - - // When Jedi Temple enters the battlefield , add {W} to your mana pool. - this.addAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(Mana.WhiteMana(1)))); - - // {T}: Add {G} or {U} to you mana pool. - this.addAbility(new GreenManaAbility()); - this.addAbility(new BlueManaAbility()); - - } - - public JediTemple(final JediTemple card) { - super(card); - } - - @Override - public JediTemple copy() { - return new JediTemple(this); - } -} +/* + * 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.cards.j; + +import java.util.UUID; +import mage.Mana; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.AddManaToManaPoolSourceControllerEffect; +import mage.abilities.mana.BlueManaAbility; +import mage.abilities.mana.GreenManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author Styxo + */ +public class JediTemple extends CardImpl { + + public JediTemple(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.LAND},""); + + // Jedi Temple enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + + // When Jedi Temple enters the battlefield , add {W} to your mana pool. + this.addAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(Mana.WhiteMana(1)))); + + // {T}: Add {G} or {U} to you mana pool. + this.addAbility(new GreenManaAbility()); + this.addAbility(new BlueManaAbility()); + + } + + public JediTemple(final JediTemple card) { + super(card); + } + + @Override + public JediTemple copy() { + return new JediTemple(this); + } +} diff --git a/Mage.Sets/src/mage/cards/j/JediTraining.java b/Mage.Sets/src/mage/cards/j/JediTraining.java index 0cfce93bb1..0244b9f3c9 100644 --- a/Mage.Sets/src/mage/cards/j/JediTraining.java +++ b/Mage.Sets/src/mage/cards/j/JediTraining.java @@ -1,109 +1,109 @@ -/* - * 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.cards.j; - -import java.util.UUID; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.cost.AbilitiesCostReductionControllerEffect; -import mage.abilities.effects.keyword.ScryEffect; -import mage.abilities.keyword.MeditateAbility; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.FilterCard; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; - -/** - * - * @author Styxo - */ -public class JediTraining extends CardImpl { - - protected static final FilterCard filter = new FilterCard("Jedi spells"); - - static { - filter.add(new SubtypePredicate(SubType.JEDI)); - } - - public JediTraining(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - - // Meditate abilities you activate costs {1} less to activate. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AbilitiesCostReductionControllerEffect(MeditateAbility.class, "Meditate"))); - - // Whenever a Jedi creature you control meditates, scry 1. - this.addAbility(new JediTrainingTriggeredAbility()); - } - - public JediTraining(final JediTraining card) { - super(card); - } - - @Override - public JediTraining copy() { - return new JediTraining(this); - } -} - -class JediTrainingTriggeredAbility extends TriggeredAbilityImpl { - - public JediTrainingTriggeredAbility() { - super(Zone.BATTLEFIELD, new ScryEffect(1)); - } - - public JediTrainingTriggeredAbility(final JediTrainingTriggeredAbility ability) { - super(ability); - } - - @Override - public JediTrainingTriggeredAbility copy() { - return new JediTrainingTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.MEDITATED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Card source = game.getPermanentOrLKIBattlefield(event.getSourceId()); - return event.getPlayerId().equals(getControllerId()) && source != null && JediTraining.filter.match(source, game); - } - - public String getRule() { - return "Whenever a Jedi creature you control meditates, scry 1"; - } -} +/* + * 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.cards.j; + +import java.util.UUID; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.cost.AbilitiesCostReductionControllerEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.abilities.keyword.MeditateAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author Styxo + */ +public class JediTraining extends CardImpl { + + protected static final FilterCard filter = new FilterCard("Jedi spells"); + + static { + filter.add(new SubtypePredicate(SubType.JEDI)); + } + + public JediTraining(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); + + // Meditate abilities you activate costs {1} less to activate. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AbilitiesCostReductionControllerEffect(MeditateAbility.class, "Meditate"))); + + // Whenever a Jedi creature you control meditates, scry 1. + this.addAbility(new JediTrainingTriggeredAbility()); + } + + public JediTraining(final JediTraining card) { + super(card); + } + + @Override + public JediTraining copy() { + return new JediTraining(this); + } +} + +class JediTrainingTriggeredAbility extends TriggeredAbilityImpl { + + public JediTrainingTriggeredAbility() { + super(Zone.BATTLEFIELD, new ScryEffect(1)); + } + + public JediTrainingTriggeredAbility(final JediTrainingTriggeredAbility ability) { + super(ability); + } + + @Override + public JediTrainingTriggeredAbility copy() { + return new JediTrainingTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.MEDITATED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Card source = game.getPermanentOrLKIBattlefield(event.getSourceId()); + return event.getPlayerId().equals(getControllerId()) && source != null && JediTraining.filter.match(source, game); + } + + public String getRule() { + return "Whenever a Jedi creature you control meditates, scry 1"; + } +} diff --git a/Mage.Sets/src/mage/cards/j/JeditOjanen.java b/Mage.Sets/src/mage/cards/j/JeditOjanen.java index 564acb6f38..6880ad6be4 100644 --- a/Mage.Sets/src/mage/cards/j/JeditOjanen.java +++ b/Mage.Sets/src/mage/cards/j/JeditOjanen.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -43,8 +44,8 @@ public class JeditOjanen extends CardImpl { public JeditOjanen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Cat"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/j/JeditOjanenOfEfrava.java b/Mage.Sets/src/mage/cards/j/JeditOjanenOfEfrava.java index c22c95a085..815bb7607d 100644 --- a/Mage.Sets/src/mage/cards/j/JeditOjanenOfEfrava.java +++ b/Mage.Sets/src/mage/cards/j/JeditOjanenOfEfrava.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.game.permanent.token.CatWarriorToken; @@ -47,8 +48,8 @@ public class JeditOjanenOfEfrava extends CardImpl { public JeditOjanenOfEfrava(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Cat"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/j/JeditsDragoons.java b/Mage.Sets/src/mage/cards/j/JeditsDragoons.java index 3356fb4afa..5297df21d1 100644 --- a/Mage.Sets/src/mage/cards/j/JeditsDragoons.java +++ b/Mage.Sets/src/mage/cards/j/JeditsDragoons.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class JeditsDragoons extends CardImpl { public JeditsDragoons(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/j/JeeringHomunculus.java b/Mage.Sets/src/mage/cards/j/JeeringHomunculus.java index 8e8e55d3e4..7e3bdea8a4 100644 --- a/Mage.Sets/src/mage/cards/j/JeeringHomunculus.java +++ b/Mage.Sets/src/mage/cards/j/JeeringHomunculus.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.GoadTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -46,7 +47,7 @@ public class JeeringHomunculus extends CardImpl { public JeeringHomunculus(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Homunculus"); + this.subtype.add(SubType.HOMUNCULUS); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/j/JeeringInstigator.java b/Mage.Sets/src/mage/cards/j/JeeringInstigator.java index 94b56fbabd..ae54e0cf80 100644 --- a/Mage.Sets/src/mage/cards/j/JeeringInstigator.java +++ b/Mage.Sets/src/mage/cards/j/JeeringInstigator.java @@ -43,6 +43,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -61,8 +62,8 @@ public class JeeringInstigator extends CardImpl { public JeeringInstigator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JelennSphinx.java b/Mage.Sets/src/mage/cards/j/JelennSphinx.java index 049d2a0869..52bec18ec6 100644 --- a/Mage.Sets/src/mage/cards/j/JelennSphinx.java +++ b/Mage.Sets/src/mage/cards/j/JelennSphinx.java @@ -27,7 +27,6 @@ */ package mage.cards.j; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.effects.common.continuous.BoostAllEffect; @@ -37,17 +36,19 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.common.FilterAttackingCreature; +import mage.constants.SubType; +import mage.filter.StaticFilters; + +import java.util.UUID; /** - * * @author LevelX2 */ public class JelennSphinx extends CardImpl { public JelennSphinx(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{U}"); - this.subtype.add("Sphinx"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{U}"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(1); this.toughness = new MageInt(5); @@ -57,7 +58,7 @@ public class JelennSphinx extends CardImpl { // Vigilance this.addAbility(VigilanceAbility.getInstance()); // Whenever Jelenn Sphinx attacks, other attacking creatures get +1/+1 until end of turn. - this.addAbility(new AttacksTriggeredAbility(new BoostAllEffect(1,1, Duration.EndOfTurn,new FilterAttackingCreature(),true), false)); + this.addAbility(new AttacksTriggeredAbility(new BoostAllEffect(1, 1, Duration.EndOfTurn, StaticFilters.FILTER_ATTACKING_CREATURES, true), false)); } public JelennSphinx(final JelennSphinx card) { diff --git a/Mage.Sets/src/mage/cards/j/JelevaNephaliasScourge.java b/Mage.Sets/src/mage/cards/j/JelevaNephaliasScourge.java index 6a3417fa05..673c16d08e 100644 --- a/Mage.Sets/src/mage/cards/j/JelevaNephaliasScourge.java +++ b/Mage.Sets/src/mage/cards/j/JelevaNephaliasScourge.java @@ -41,6 +41,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.WatcherScope; @@ -64,8 +65,8 @@ public class JelevaNephaliasScourge extends CardImpl { public JelevaNephaliasScourge(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vampire"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JenaraAsuraOfWar.java b/Mage.Sets/src/mage/cards/j/JenaraAsuraOfWar.java index 690afd0db6..2354cf527f 100644 --- a/Mage.Sets/src/mage/cards/j/JenaraAsuraOfWar.java +++ b/Mage.Sets/src/mage/cards/j/JenaraAsuraOfWar.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.counters.CounterType; @@ -49,7 +50,7 @@ public class JenaraAsuraOfWar extends CardImpl { public JenaraAsuraOfWar (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}{U}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); addSuperType(SuperType.LEGENDARY); diff --git a/Mage.Sets/src/mage/cards/j/JerrardOfTheClosedFist.java b/Mage.Sets/src/mage/cards/j/JerrardOfTheClosedFist.java index ca05aa90fe..138158540a 100644 --- a/Mage.Sets/src/mage/cards/j/JerrardOfTheClosedFist.java +++ b/Mage.Sets/src/mage/cards/j/JerrardOfTheClosedFist.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -43,8 +44,8 @@ public class JerrardOfTheClosedFist extends CardImpl { public JerrardOfTheClosedFist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/j/JeskaWarriorAdept.java b/Mage.Sets/src/mage/cards/j/JeskaWarriorAdept.java index 85c61007b6..540868fdf2 100644 --- a/Mage.Sets/src/mage/cards/j/JeskaWarriorAdept.java +++ b/Mage.Sets/src/mage/cards/j/JeskaWarriorAdept.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -51,9 +52,9 @@ public class JeskaWarriorAdept extends CardImpl { public JeskaWarriorAdept(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Barbarian"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BARBARIAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JeskaiBarricade.java b/Mage.Sets/src/mage/cards/j/JeskaiBarricade.java index 90432119e2..e8a24c9ccb 100644 --- a/Mage.Sets/src/mage/cards/j/JeskaiBarricade.java +++ b/Mage.Sets/src/mage/cards/j/JeskaiBarricade.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -58,7 +59,7 @@ public class JeskaiBarricade extends CardImpl { public JeskaiBarricade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/j/JeskaiElder.java b/Mage.Sets/src/mage/cards/j/JeskaiElder.java index 39537216f9..799b4c623b 100644 --- a/Mage.Sets/src/mage/cards/j/JeskaiElder.java +++ b/Mage.Sets/src/mage/cards/j/JeskaiElder.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class JeskaiElder extends CardImpl { public JeskaiElder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JeskaiInfiltrator.java b/Mage.Sets/src/mage/cards/j/JeskaiInfiltrator.java index dc2324f9f6..ca33fc5076 100644 --- a/Mage.Sets/src/mage/cards/j/JeskaiInfiltrator.java +++ b/Mage.Sets/src/mage/cards/j/JeskaiInfiltrator.java @@ -51,6 +51,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -67,8 +68,8 @@ public class JeskaiInfiltrator extends CardImpl { public JeskaiInfiltrator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JeskaiRunemark.java b/Mage.Sets/src/mage/cards/j/JeskaiRunemark.java index f9cf2d3ed4..50a34438d1 100644 --- a/Mage.Sets/src/mage/cards/j/JeskaiRunemark.java +++ b/Mage.Sets/src/mage/cards/j/JeskaiRunemark.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -65,7 +66,7 @@ public class JeskaiRunemark extends CardImpl { public JeskaiRunemark(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/j/JeskaiSage.java b/Mage.Sets/src/mage/cards/j/JeskaiSage.java index 671cd11ae5..ff0d855048 100644 --- a/Mage.Sets/src/mage/cards/j/JeskaiSage.java +++ b/Mage.Sets/src/mage/cards/j/JeskaiSage.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class JeskaiSage extends CardImpl { public JeskaiSage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JeskaiStudent.java b/Mage.Sets/src/mage/cards/j/JeskaiStudent.java index d90a850406..14a6b27641 100644 --- a/Mage.Sets/src/mage/cards/j/JeskaiStudent.java +++ b/Mage.Sets/src/mage/cards/j/JeskaiStudent.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class JeskaiStudent extends CardImpl { public JeskaiStudent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JeskaiWindscout.java b/Mage.Sets/src/mage/cards/j/JeskaiWindscout.java index 98c194934a..cc555470e2 100644 --- a/Mage.Sets/src/mage/cards/j/JeskaiWindscout.java +++ b/Mage.Sets/src/mage/cards/j/JeskaiWindscout.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class JeskaiWindscout extends CardImpl { public JeskaiWindscout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Scout"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JettingGlasskite.java b/Mage.Sets/src/mage/cards/j/JettingGlasskite.java index 14552fcdad..30ea01320c 100644 --- a/Mage.Sets/src/mage/cards/j/JettingGlasskite.java +++ b/Mage.Sets/src/mage/cards/j/JettingGlasskite.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -49,7 +50,7 @@ public class JettingGlasskite extends CardImpl { public JettingGlasskite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/j/JeweledAmulet.java b/Mage.Sets/src/mage/cards/j/JeweledAmulet.java index da6cb14839..aba6e0614d 100644 --- a/Mage.Sets/src/mage/cards/j/JeweledAmulet.java +++ b/Mage.Sets/src/mage/cards/j/JeweledAmulet.java @@ -1,159 +1,159 @@ -/* - * 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.cards.j; - -import java.util.UUID; -import mage.Mana; -import mage.abilities.Ability; -import mage.abilities.condition.common.SourceHasCounterCondition; -import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalActivatedAbility; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.ManaEffect; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.abilities.mana.SimpleManaAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.util.CardUtil; - -/** - * - * @author jeffwadsworth - */ -public class JeweledAmulet extends CardImpl { - - private static final String rule = "Put a charge counter on {this}. Note the type of mana spent to pay this activation cost. Activate this ability only if there are no charge counters on {this}"; - - public JeweledAmulet(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{0}"); - - // {1}, {tap}: Put a charge counter on Jeweled Amulet. Note the type of mana spent to pay this activation cost. Activate this ability only if there are no charge counters on Jeweled Amulet. - ConditionalActivatedAbility ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new JeweledAmuletAddCounterEffect(), new ManaCostsImpl("{1}"), new SourceHasCounterCondition(CounterType.CHARGE, 0), rule); - ability.addEffect(new AddCountersSourceEffect(CounterType.CHARGE.createInstance(), true)); - ability.addCost(new TapSourceCost()); - this.addAbility(ability); - - // {tap}, Remove a charge counter from Jeweled Amulet: Add one mana of Jeweled Amulet's last noted type to your mana pool. - Ability ability2 = new SimpleManaAbility(Zone.BATTLEFIELD, new JeweledAmuletAddManaEffect(), new TapSourceCost()); - ability2.addCost(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance())); - this.addAbility(ability2); - - } - - public JeweledAmulet(final JeweledAmulet card) { - super(card); - } - - @Override - public JeweledAmulet copy() { - return new JeweledAmulet(this); - } -} - -class JeweledAmuletAddCounterEffect extends OneShotEffect { - - private static String manaUsedString; - - public JeweledAmuletAddCounterEffect() { - super(Outcome.Benefit); - this.staticText = "Note the type of mana spent to pay this activation cost. Activate this ability only if there are no charge counters on {this}"; - } - - public JeweledAmuletAddCounterEffect(final JeweledAmuletAddCounterEffect effect) { - super(effect); - } - - @Override - public JeweledAmuletAddCounterEffect copy() { - return new JeweledAmuletAddCounterEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - Permanent jeweledAmulet = game.getPermanent(source.getSourceId()); - if (controller != null - && jeweledAmulet != null) { - game.getState().setValue("JeweledAmulet" + source.getSourceId().toString(), source.getManaCostsToPay().getUsedManaToPay()); //store the mana used to pay - manaUsedString = source.getManaCostsToPay().getUsedManaToPay().toString(); - jeweledAmulet.addInfo("MANA USED", CardUtil.addToolTipMarkTags("Mana used last: " + manaUsedString), game); - return true; - } - return false; - } -} - -class JeweledAmuletAddManaEffect extends ManaEffect { - - private static Mana storedMana; - - JeweledAmuletAddManaEffect() { - super(); - staticText = "Add one mana of {this}'s last noted type to your mana pool"; - } - - JeweledAmuletAddManaEffect(JeweledAmuletAddManaEffect effect) { - super(effect); - } - - @Override - public JeweledAmuletAddManaEffect copy() { - return new JeweledAmuletAddManaEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent jeweledAmulet = game.getPermanent(source.getSourceId()); - Player controller = game.getPlayer(source.getControllerId()); - if (jeweledAmulet != null - && controller != null) { - storedMana = (Mana) game.getState().getValue("JeweledAmulet" + source.getSourceId().toString()); - if (storedMana != null) { - checkToFirePossibleEvents(storedMana, game, source); - controller.getManaPool().addMana(storedMana, game, source); - return true; - } - } - return false; - } - - @Override - public Mana getMana(Game game, Ability source) { - return null; - } - -} +/* + * 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.cards.j; + +import java.util.UUID; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.condition.common.SourceHasCounterCondition; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.util.CardUtil; + +/** + * + * @author jeffwadsworth + */ +public class JeweledAmulet extends CardImpl { + + private static final String rule = "Put a charge counter on {this}. Note the type of mana spent to pay this activation cost. Activate this ability only if there are no charge counters on {this}"; + + public JeweledAmulet(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{0}"); + + // {1}, {tap}: Put a charge counter on Jeweled Amulet. Note the type of mana spent to pay this activation cost. Activate this ability only if there are no charge counters on Jeweled Amulet. + ConditionalActivatedAbility ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new JeweledAmuletAddCounterEffect(), new ManaCostsImpl("{1}"), new SourceHasCounterCondition(CounterType.CHARGE, 0), rule); + ability.addEffect(new AddCountersSourceEffect(CounterType.CHARGE.createInstance(), true)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + // {tap}, Remove a charge counter from Jeweled Amulet: Add one mana of Jeweled Amulet's last noted type to your mana pool. + Ability ability2 = new SimpleManaAbility(Zone.BATTLEFIELD, new JeweledAmuletAddManaEffect(), new TapSourceCost()); + ability2.addCost(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance())); + this.addAbility(ability2); + + } + + public JeweledAmulet(final JeweledAmulet card) { + super(card); + } + + @Override + public JeweledAmulet copy() { + return new JeweledAmulet(this); + } +} + +class JeweledAmuletAddCounterEffect extends OneShotEffect { + + private static String manaUsedString; + + public JeweledAmuletAddCounterEffect() { + super(Outcome.Benefit); + this.staticText = "Note the type of mana spent to pay this activation cost. Activate this ability only if there are no charge counters on {this}"; + } + + public JeweledAmuletAddCounterEffect(final JeweledAmuletAddCounterEffect effect) { + super(effect); + } + + @Override + public JeweledAmuletAddCounterEffect copy() { + return new JeweledAmuletAddCounterEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent jeweledAmulet = game.getPermanent(source.getSourceId()); + if (controller != null + && jeweledAmulet != null) { + game.getState().setValue("JeweledAmulet" + source.getSourceId().toString(), source.getManaCostsToPay().getUsedManaToPay()); //store the mana used to pay + manaUsedString = source.getManaCostsToPay().getUsedManaToPay().toString(); + jeweledAmulet.addInfo("MANA USED", CardUtil.addToolTipMarkTags("Mana used last: " + manaUsedString), game); + return true; + } + return false; + } +} + +class JeweledAmuletAddManaEffect extends ManaEffect { + + private static Mana storedMana; + + JeweledAmuletAddManaEffect() { + super(); + staticText = "Add one mana of {this}'s last noted type to your mana pool"; + } + + JeweledAmuletAddManaEffect(JeweledAmuletAddManaEffect effect) { + super(effect); + } + + @Override + public JeweledAmuletAddManaEffect copy() { + return new JeweledAmuletAddManaEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent jeweledAmulet = game.getPermanent(source.getSourceId()); + Player controller = game.getPlayer(source.getControllerId()); + if (jeweledAmulet != null + && controller != null) { + storedMana = (Mana) game.getState().getValue("JeweledAmulet" + source.getSourceId().toString()); + if (storedMana != null) { + checkToFirePossibleEvents(storedMana, game, source); + controller.getManaPool().addMana(storedMana, game, source); + return true; + } + } + return false; + } + + @Override + public Mana getMana(Game game, Ability source) { + return null; + } + +} diff --git a/Mage.Sets/src/mage/cards/j/JeweledSpirit.java b/Mage.Sets/src/mage/cards/j/JeweledSpirit.java index b89ecdfc97..08b98eca1a 100644 --- a/Mage.Sets/src/mage/cards/j/JeweledSpirit.java +++ b/Mage.Sets/src/mage/cards/j/JeweledSpirit.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.choices.ChoiceColorOrArtifact; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -60,7 +61,7 @@ public class JeweledSpirit extends CardImpl { public JeweledSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JhessianBalmgiver.java b/Mage.Sets/src/mage/cards/j/JhessianBalmgiver.java index 65a1eed49e..6a12411892 100644 --- a/Mage.Sets/src/mage/cards/j/JhessianBalmgiver.java +++ b/Mage.Sets/src/mage/cards/j/JhessianBalmgiver.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -50,8 +51,8 @@ public class JhessianBalmgiver extends CardImpl { public JhessianBalmgiver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{U}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JhessianInfiltrator.java b/Mage.Sets/src/mage/cards/j/JhessianInfiltrator.java index 027ecaec04..c3e5c4830e 100644 --- a/Mage.Sets/src/mage/cards/j/JhessianInfiltrator.java +++ b/Mage.Sets/src/mage/cards/j/JhessianInfiltrator.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class JhessianInfiltrator extends CardImpl { public JhessianInfiltrator (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JhessianLookout.java b/Mage.Sets/src/mage/cards/j/JhessianLookout.java index 38551f0756..a1acc4ddec 100644 --- a/Mage.Sets/src/mage/cards/j/JhessianLookout.java +++ b/Mage.Sets/src/mage/cards/j/JhessianLookout.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class JhessianLookout extends CardImpl { public JhessianLookout (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JhessianThief.java b/Mage.Sets/src/mage/cards/j/JhessianThief.java index 1fe95665e0..3358efbe58 100644 --- a/Mage.Sets/src/mage/cards/j/JhessianThief.java +++ b/Mage.Sets/src/mage/cards/j/JhessianThief.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class JhessianThief extends CardImpl { public JhessianThief(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JhessianZombies.java b/Mage.Sets/src/mage/cards/j/JhessianZombies.java index becece3f28..97a08d932d 100644 --- a/Mage.Sets/src/mage/cards/j/JhessianZombies.java +++ b/Mage.Sets/src/mage/cards/j/JhessianZombies.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SwampcyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class JhessianZombies extends CardImpl { public JhessianZombies(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); diff --git a/Mage.Sets/src/mage/cards/j/JhoiraOfTheGhitu.java b/Mage.Sets/src/mage/cards/j/JhoiraOfTheGhitu.java index e5655bd785..c999a97f04 100644 --- a/Mage.Sets/src/mage/cards/j/JhoiraOfTheGhitu.java +++ b/Mage.Sets/src/mage/cards/j/JhoiraOfTheGhitu.java @@ -44,6 +44,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -62,8 +63,8 @@ public class JhoiraOfTheGhitu extends CardImpl { public JhoiraOfTheGhitu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JhoirasTimebug.java b/Mage.Sets/src/mage/cards/j/JhoirasTimebug.java index e0335333e9..1eb094198c 100644 --- a/Mage.Sets/src/mage/cards/j/JhoirasTimebug.java +++ b/Mage.Sets/src/mage/cards/j/JhoirasTimebug.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -63,7 +64,7 @@ public class JhoirasTimebug extends CardImpl { public JhoirasTimebug(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JhoirasToolbox.java b/Mage.Sets/src/mage/cards/j/JhoirasToolbox.java index 257b8175e9..38c0cabb5e 100644 --- a/Mage.Sets/src/mage/cards/j/JhoirasToolbox.java +++ b/Mage.Sets/src/mage/cards/j/JhoirasToolbox.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.RegenerateTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -55,7 +56,7 @@ public class JhoirasToolbox extends CardImpl { public JhoirasToolbox(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JhovallQueen.java b/Mage.Sets/src/mage/cards/j/JhovallQueen.java index 102476f8c7..1f6d8501d9 100644 --- a/Mage.Sets/src/mage/cards/j/JhovallQueen.java +++ b/Mage.Sets/src/mage/cards/j/JhovallQueen.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class JhovallQueen extends CardImpl { public JhovallQueen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.REBEL); this.power = new MageInt(4); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/j/JhovallRider.java b/Mage.Sets/src/mage/cards/j/JhovallRider.java index 28e2a02bd9..6edc54d64b 100644 --- a/Mage.Sets/src/mage/cards/j/JhovallRider.java +++ b/Mage.Sets/src/mage/cards/j/JhovallRider.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class JhovallRider extends CardImpl { public JhovallRider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/Jilt.java b/Mage.Sets/src/mage/cards/j/Jilt.java index 799208d43d..2f3d30c68e 100644 --- a/Mage.Sets/src/mage/cards/j/Jilt.java +++ b/Mage.Sets/src/mage/cards/j/Jilt.java @@ -53,11 +53,11 @@ import mage.target.targetpointer.SecondTargetPointer; public class Jilt extends CardImpl { public Jilt(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); // Kicker {1}{R} this.addAbility(new KickerAbility("{1}{R}")); - + // Return target creature to its owner's hand. If Jilt was kicked, it deals 2 damage to another target creature. this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); Effect effect = new ConditionalOneShotEffect( @@ -66,11 +66,11 @@ public class Jilt extends CardImpl { "If {this} was kicked, it deals 2 damage to another target creature"); effect.setTargetPointer(new SecondTargetPointer()); this.getSpellAbility().addEffect(effect); - Target target = new TargetCreaturePermanent(new FilterCreaturePermanent("Target Creature: returned to Hand")); + Target target = new TargetCreaturePermanent(); target.setTargetTag(1); this.getSpellAbility().addTarget(target); } - + @Override public void adjustTargets(Ability ability, Game game) { if (ability instanceof SpellAbility && KickedCondition.instance.apply(game, ability)) { diff --git a/Mage.Sets/src/mage/cards/j/JinGitaxiasCoreAugur.java b/Mage.Sets/src/mage/cards/j/JinGitaxiasCoreAugur.java index ec0a52d28b..e8eec650be 100644 --- a/Mage.Sets/src/mage/cards/j/JinGitaxiasCoreAugur.java +++ b/Mage.Sets/src/mage/cards/j/JinGitaxiasCoreAugur.java @@ -48,7 +48,7 @@ public class JinGitaxiasCoreAugur extends CardImpl { public JinGitaxiasCoreAugur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{8}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Praetor"); + this.subtype.add(SubType.PRAETOR); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/j/JiwariTheEarthAflame.java b/Mage.Sets/src/mage/cards/j/JiwariTheEarthAflame.java index 1c3722d8cc..4c21b54877 100644 --- a/Mage.Sets/src/mage/cards/j/JiwariTheEarthAflame.java +++ b/Mage.Sets/src/mage/cards/j/JiwariTheEarthAflame.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -63,7 +64,7 @@ public class JiwariTheEarthAflame extends CardImpl { public JiwariTheEarthAflame(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JodahsAvenger.java b/Mage.Sets/src/mage/cards/j/JodahsAvenger.java index f8aa0ac350..80e2299360 100644 --- a/Mage.Sets/src/mage/cards/j/JodahsAvenger.java +++ b/Mage.Sets/src/mage/cards/j/JodahsAvenger.java @@ -1,145 +1,145 @@ -/* - * 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.cards.j; - -import mage.MageInt; -import mage.ObjectColor; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.ContinuousEffectImpl; -import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; -import mage.abilities.keyword.DoubleStrikeAbility; -import mage.abilities.keyword.ProtectionAbility; -import mage.abilities.keyword.ShadowAbility; -import mage.abilities.keyword.VigilanceAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.choices.Choice; -import mage.choices.ChoiceImpl; -import mage.constants.*; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; - -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; - -/** - * - * @author Styxo - */ -public class JodahsAvenger extends CardImpl { - - public JodahsAvenger(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}"); - - this.subtype.add("Shapeshifter"); - this.power = new MageInt(4); - this.toughness = new MageInt(4); - - // {0}: Until end of turn, Jodah's Avenger gets -1/-1 and gains your choice of double strike, protection from red, vigilance, or shadow. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new JodahsAvengerEffect(), new ManaCostsImpl("{0}"))); - } - - public JodahsAvenger(final JodahsAvenger card) { - super(card); - } - - @Override - public JodahsAvenger copy() { - return new JodahsAvenger(this); - } -} - -class JodahsAvengerEffect extends ContinuousEffectImpl { - - private static final Set choices = new HashSet<>(); - private Ability gainedAbility; - - static { - choices.add("Double strike"); - choices.add("Protection from red"); - choices.add("Vigilance"); - choices.add("Shadow"); - } - - public JodahsAvengerEffect() { - super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.AddAbility); - this.staticText = "Until end of turn, {this} gets -1/-1 and gains your choice of double strike, protection from red, vigilance, or shadow"; - } - - public JodahsAvengerEffect(final JodahsAvengerEffect effect) { - super(effect); - } - - @Override - public JodahsAvengerEffect copy() { - return new JodahsAvengerEffect(this); - } - - @Override - public void init(Ability source, Game game) { - super.init(source, game); - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Choice choice = new ChoiceImpl(true); - choice.setMessage("Choose one"); - choice.setChoices(choices); - if (controller.choose(outcome, choice, game)) { - switch (choice.getChoice()) { - case "Double strike": - gainedAbility = DoubleStrikeAbility.getInstance(); - break; - case "Vigilance": - gainedAbility = VigilanceAbility.getInstance(); - break; - case "Shadow": - gainedAbility = ShadowAbility.getInstance(); - break; - default: - gainedAbility = ProtectionAbility.from(ObjectColor.RED); - break; - } - } - } - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent sourceObject = game.getPermanent(source.getSourceId()); - if (sourceObject != null) { - sourceObject.addPower(-1); - sourceObject.addToughness(-1); - game.addEffect(new GainAbilitySourceEffect(gainedAbility, Duration.EndOfTurn), source); - return true; - } - return false; - } -} +/* + * 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.cards.j; + +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.abilities.keyword.ShadowAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; +import mage.constants.*; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + +/** + * + * @author Styxo + */ +public class JodahsAvenger extends CardImpl { + + public JodahsAvenger(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}"); + + this.subtype.add(SubType.SHAPESHIFTER); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // {0}: Until end of turn, Jodah's Avenger gets -1/-1 and gains your choice of double strike, protection from red, vigilance, or shadow. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new JodahsAvengerEffect(), new ManaCostsImpl("{0}"))); + } + + public JodahsAvenger(final JodahsAvenger card) { + super(card); + } + + @Override + public JodahsAvenger copy() { + return new JodahsAvenger(this); + } +} + +class JodahsAvengerEffect extends ContinuousEffectImpl { + + private static final Set choices = new HashSet<>(); + private Ability gainedAbility; + + static { + choices.add("Double strike"); + choices.add("Protection from red"); + choices.add("Vigilance"); + choices.add("Shadow"); + } + + public JodahsAvengerEffect() { + super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.AddAbility); + this.staticText = "Until end of turn, {this} gets -1/-1 and gains your choice of double strike, protection from red, vigilance, or shadow"; + } + + public JodahsAvengerEffect(final JodahsAvengerEffect effect) { + super(effect); + } + + @Override + public JodahsAvengerEffect copy() { + return new JodahsAvengerEffect(this); + } + + @Override + public void init(Ability source, Game game) { + super.init(source, game); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Choice choice = new ChoiceImpl(true); + choice.setMessage("Choose one"); + choice.setChoices(choices); + if (controller.choose(outcome, choice, game)) { + switch (choice.getChoice()) { + case "Double strike": + gainedAbility = DoubleStrikeAbility.getInstance(); + break; + case "Vigilance": + gainedAbility = VigilanceAbility.getInstance(); + break; + case "Shadow": + gainedAbility = ShadowAbility.getInstance(); + break; + default: + gainedAbility = ProtectionAbility.from(ObjectColor.RED); + break; + } + } + } + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent sourceObject = game.getPermanent(source.getSourceId()); + if (sourceObject != null) { + sourceObject.addPower(-1); + sourceObject.addToughness(-1); + game.addEffect(new GainAbilitySourceEffect(gainedAbility, Duration.EndOfTurn), source); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/j/JohtullWurm.java b/Mage.Sets/src/mage/cards/j/JohtullWurm.java index 1339931868..99a34270f8 100644 --- a/Mage.Sets/src/mage/cards/j/JohtullWurm.java +++ b/Mage.Sets/src/mage/cards/j/JohtullWurm.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -48,7 +49,7 @@ public class JohtullWurm extends CardImpl { public JohtullWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/j/JoinerAdept.java b/Mage.Sets/src/mage/cards/j/JoinerAdept.java index 04fe1aea1b..ef2c3c9041 100644 --- a/Mage.Sets/src/mage/cards/j/JoinerAdept.java +++ b/Mage.Sets/src/mage/cards/j/JoinerAdept.java @@ -35,6 +35,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -47,8 +48,8 @@ public class JoinerAdept extends CardImpl { public JoinerAdept(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/Jokulmorder.java b/Mage.Sets/src/mage/cards/j/Jokulmorder.java index bd297a8f0c..99c8ba7525 100644 --- a/Mage.Sets/src/mage/cards/j/Jokulmorder.java +++ b/Mage.Sets/src/mage/cards/j/Jokulmorder.java @@ -27,7 +27,6 @@ */ package mage.cards.j; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.EntersBattlefieldTappedAbility; @@ -42,6 +41,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.game.Game; @@ -50,6 +50,8 @@ import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -57,26 +59,26 @@ import mage.target.common.TargetControlledPermanent; public class Jokulmorder extends CardImpl { public Jokulmorder(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}{U}"); - this.subtype.add("Leviathan"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{U}{U}"); + this.subtype.add(SubType.LEVIATHAN); this.power = new MageInt(12); this.toughness = new MageInt(12); // Trample this.addAbility(TrampleAbility.getInstance()); - + // Jokulmorder enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); - + // When Jokulmorder enters the battlefield, sacrifice it unless you sacrifice five lands. Effect effect = new SacrificeSourceUnlessPaysEffect( new SacrificeTargetCost(new TargetControlledPermanent(5, 5, new FilterControlledLandPermanent("five lands"), true))); effect.setText("sacrifice it unless you sacrifice five lands"); this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false)); - + // Jokulmorder doesn't untap during your untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepSourceEffect())); - + // Whenever you play an Island, you may untap Jokulmorder. this.addAbility(new JokulmorderTriggeredAbility()); } @@ -109,7 +111,7 @@ class JokulmorderTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent land = game.getPermanent(event.getTargetId()); - return land.getSubtype(game).contains("Island") + return land.hasSubtype(SubType.ISLAND, game) && land.getControllerId().equals(this.controllerId); } @@ -120,6 +122,6 @@ class JokulmorderTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "When you play an Island, you may untap {this}"; + return "Whenever you play an Island, you may untap {this}."; } } diff --git a/Mage.Sets/src/mage/cards/j/JolraelEmpressOfBeasts.java b/Mage.Sets/src/mage/cards/j/JolraelEmpressOfBeasts.java index f6f38e4c93..6460529d80 100644 --- a/Mage.Sets/src/mage/cards/j/JolraelEmpressOfBeasts.java +++ b/Mage.Sets/src/mage/cards/j/JolraelEmpressOfBeasts.java @@ -58,8 +58,8 @@ public class JolraelEmpressOfBeasts extends CardImpl { public JolraelEmpressOfBeasts(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JolraelsCentaur.java b/Mage.Sets/src/mage/cards/j/JolraelsCentaur.java index 6ffd4216f8..d4dc295726 100644 --- a/Mage.Sets/src/mage/cards/j/JolraelsCentaur.java +++ b/Mage.Sets/src/mage/cards/j/JolraelsCentaur.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class JolraelsCentaur extends CardImpl { public JolraelsCentaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Archer"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JolraelsFavor.java b/Mage.Sets/src/mage/cards/j/JolraelsFavor.java index 6d827634f5..ace94c2790 100644 --- a/Mage.Sets/src/mage/cards/j/JolraelsFavor.java +++ b/Mage.Sets/src/mage/cards/j/JolraelsFavor.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -52,7 +53,7 @@ public class JolraelsFavor extends CardImpl { public JolraelsFavor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/j/JoltingMerfolk.java b/Mage.Sets/src/mage/cards/j/JoltingMerfolk.java index ee4a8d723f..f38d3766af 100644 --- a/Mage.Sets/src/mage/cards/j/JoltingMerfolk.java +++ b/Mage.Sets/src/mage/cards/j/JoltingMerfolk.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FadingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class JoltingMerfolk extends CardImpl { public JoltingMerfolk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JorKadeenThePrevailer.java b/Mage.Sets/src/mage/cards/j/JorKadeenThePrevailer.java index 6730b5662d..b06947f817 100644 --- a/Mage.Sets/src/mage/cards/j/JorKadeenThePrevailer.java +++ b/Mage.Sets/src/mage/cards/j/JorKadeenThePrevailer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -53,8 +54,8 @@ public class JorKadeenThePrevailer extends CardImpl { public JorKadeenThePrevailer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/j/JoragaAuxiliary.java b/Mage.Sets/src/mage/cards/j/JoragaAuxiliary.java index e86eb5c40d..e8444bde27 100644 --- a/Mage.Sets/src/mage/cards/j/JoragaAuxiliary.java +++ b/Mage.Sets/src/mage/cards/j/JoragaAuxiliary.java @@ -36,6 +36,7 @@ import mage.abilities.effects.keyword.SupportEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -55,9 +56,9 @@ public class JoragaAuxiliary extends CardImpl { public JoragaAuxiliary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}"); - this.subtype.add("Elf"); - this.subtype.add("Soldier"); - this.subtype.add("Ally"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JoragaBard.java b/Mage.Sets/src/mage/cards/j/JoragaBard.java index 8faccc529a..fc7ff79a21 100644 --- a/Mage.Sets/src/mage/cards/j/JoragaBard.java +++ b/Mage.Sets/src/mage/cards/j/JoragaBard.java @@ -57,9 +57,9 @@ public class JoragaBard extends CardImpl { public JoragaBard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Rogue"); - this.subtype.add("Ally"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ROGUE); + this.subtype.add(SubType.ALLY); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/j/JoragaTreespeaker.java b/Mage.Sets/src/mage/cards/j/JoragaTreespeaker.java index 68121bebb5..798b3ddf62 100644 --- a/Mage.Sets/src/mage/cards/j/JoragaTreespeaker.java +++ b/Mage.Sets/src/mage/cards/j/JoragaTreespeaker.java @@ -65,8 +65,8 @@ public class JoragaTreespeaker extends LevelerCard { public JoragaTreespeaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.color.setGreen(true); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JoragaWarcaller.java b/Mage.Sets/src/mage/cards/j/JoragaWarcaller.java index 32ccb911cb..6e1d6ea033 100644 --- a/Mage.Sets/src/mage/cards/j/JoragaWarcaller.java +++ b/Mage.Sets/src/mage/cards/j/JoragaWarcaller.java @@ -63,8 +63,8 @@ public class JoragaWarcaller extends CardImpl { public JoragaWarcaller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JoriEnRuinDiver.java b/Mage.Sets/src/mage/cards/j/JoriEnRuinDiver.java index 8cfc240a89..510a90a4b8 100644 --- a/Mage.Sets/src/mage/cards/j/JoriEnRuinDiver.java +++ b/Mage.Sets/src/mage/cards/j/JoriEnRuinDiver.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.game.Game; @@ -50,8 +51,8 @@ public class JoriEnRuinDiver extends CardImpl { public JoriEnRuinDiver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JorubaiMurkLurker.java b/Mage.Sets/src/mage/cards/j/JorubaiMurkLurker.java index 9c69b05b83..4bc0864adc 100644 --- a/Mage.Sets/src/mage/cards/j/JorubaiMurkLurker.java +++ b/Mage.Sets/src/mage/cards/j/JorubaiMurkLurker.java @@ -63,7 +63,7 @@ public class JorubaiMurkLurker extends CardImpl { public JorubaiMurkLurker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Leech"); + this.subtype.add(SubType.LEECH); this.color.setBlue(true); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JotunGrunt.java b/Mage.Sets/src/mage/cards/j/JotunGrunt.java index 025eac7b28..2bff40dd6e 100644 --- a/Mage.Sets/src/mage/cards/j/JotunGrunt.java +++ b/Mage.Sets/src/mage/cards/j/JotunGrunt.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -52,8 +53,8 @@ public class JotunGrunt extends CardImpl { public JotunGrunt(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Giant"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/j/JotunOwlKeeper.java b/Mage.Sets/src/mage/cards/j/JotunOwlKeeper.java new file mode 100644 index 0000000000..0e47d8117e --- /dev/null +++ b/Mage.Sets/src/mage/cards/j/JotunOwlKeeper.java @@ -0,0 +1,77 @@ +/* + * 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.cards.j; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.costs.OrCost; +import mage.constants.SubType; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.CountersSourceCount; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; +import mage.game.permanent.token.BirdToken; + +/** + * + * @author TheElk801 + */ +public class JotunOwlKeeper extends CardImpl { + + public JotunOwlKeeper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.GIANT); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Cumulative upkeep {W} or {U} + this.addAbility(new CumulativeUpkeepAbility(new OrCost( + new ManaCostsImpl("{W}"), + new ManaCostsImpl("{U}"), + "{W} or {U}" + ))); + + // When Jötun Owl Keeper dies, put a 1/1 white Bird creature token with flying onto the battlefield for each age counter on it. + this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new BirdToken(), new CountersSourceCount(CounterType.AGE)))); + } + + public JotunOwlKeeper(final JotunOwlKeeper card) { + super(card); + } + + @Override + public JotunOwlKeeper copy() { + return new JotunOwlKeeper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/j/Joven.java b/Mage.Sets/src/mage/cards/j/Joven.java index d079e1552a..2b66cea978 100644 --- a/Mage.Sets/src/mage/cards/j/Joven.java +++ b/Mage.Sets/src/mage/cards/j/Joven.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterArtifactPermanent; @@ -58,8 +59,8 @@ public class Joven extends CardImpl { public Joven(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JudgeOfCurrents.java b/Mage.Sets/src/mage/cards/j/JudgeOfCurrents.java index 5a73bb8330..22bd74a42a 100644 --- a/Mage.Sets/src/mage/cards/j/JudgeOfCurrents.java +++ b/Mage.Sets/src/mage/cards/j/JudgeOfCurrents.java @@ -45,8 +45,8 @@ public class JudgeOfCurrents extends CardImpl { public JudgeOfCurrents(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JudgesFamiliar.java b/Mage.Sets/src/mage/cards/j/JudgesFamiliar.java index 548b59556b..233e78d7cd 100644 --- a/Mage.Sets/src/mage/cards/j/JudgesFamiliar.java +++ b/Mage.Sets/src/mage/cards/j/JudgesFamiliar.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.TargetSpell; @@ -49,7 +50,7 @@ public class JudgesFamiliar extends CardImpl { public JudgesFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W/U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JuganTheRisingStar.java b/Mage.Sets/src/mage/cards/j/JuganTheRisingStar.java index bf7ed62f31..95dce944f1 100644 --- a/Mage.Sets/src/mage/cards/j/JuganTheRisingStar.java +++ b/Mage.Sets/src/mage/cards/j/JuganTheRisingStar.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanentAmount; @@ -49,8 +50,8 @@ public class JuganTheRisingStar extends CardImpl { public JuganTheRisingStar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DRAGON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/j/Juggernaut.java b/Mage.Sets/src/mage/cards/j/Juggernaut.java index 69a9a850a0..9f40456495 100644 --- a/Mage.Sets/src/mage/cards/j/Juggernaut.java +++ b/Mage.Sets/src/mage/cards/j/Juggernaut.java @@ -25,12 +25,11 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.j; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.common.SimpleEvasionAbility; import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; import mage.cards.CardImpl; @@ -48,18 +47,20 @@ import mage.filter.predicate.mageobject.SubtypePredicate; public class Juggernaut extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Walls"); + static { filter.add(new SubtypePredicate(SubType.WALL)); } public Juggernaut(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Juggernaut"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + this.subtype.add(SubType.JUGGERNAUT); this.power = new MageInt(5); this.toughness = new MageInt(3); // Juggernaut attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); + // Juggernaut can't be blocked by Walls. this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); } diff --git a/Mage.Sets/src/mage/cards/j/JukaiMessenger.java b/Mage.Sets/src/mage/cards/j/JukaiMessenger.java index 24d4c6f975..596bf94747 100644 --- a/Mage.Sets/src/mage/cards/j/JukaiMessenger.java +++ b/Mage.Sets/src/mage/cards/j/JukaiMessenger.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class JukaiMessenger extends CardImpl { public JukaiMessenger (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JumpTrooper.java b/Mage.Sets/src/mage/cards/j/JumpTrooper.java index f46e350095..506677b8ba 100644 --- a/Mage.Sets/src/mage/cards/j/JumpTrooper.java +++ b/Mage.Sets/src/mage/cards/j/JumpTrooper.java @@ -1,128 +1,128 @@ -/* - * 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.cards.j; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.CounterUnlessPaysEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.common.FilterCreatureCard; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; -import mage.target.TargetStackObject; - -/** - * - * @author Styxo - */ -public class JumpTrooper extends CardImpl { - - private static final FilterCreatureCard filter = new FilterCreatureCard("Trooper creatures"); - - static { - filter.add(new SubtypePredicate(SubType.TROOPER)); - } - - public JumpTrooper(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Trooper"); - this.power = new MageInt(1); - this.toughness = new MageInt(1); - - // Whenever a Trooper creature you control becomes the target of a spell or ability an opponent controls, counter that spell or abitlity unless its controller pays {2}. - this.addAbility(new JumpTrooperTriggeredAbility(new CounterUnlessPaysEffect(new GenericManaCost(2)))); - - } - - public JumpTrooper(final JumpTrooper card) { - super(card); - } - - @Override - public JumpTrooper copy() { - return new JumpTrooper(this); - } -} - -class JumpTrooperTriggeredAbility extends TriggeredAbilityImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Trooper creature you control"); - - static { - filter.add(new SubtypePredicate(SubType.TROOPER)); - } - - public JumpTrooperTriggeredAbility(Effect effect) { - super(Zone.BATTLEFIELD, effect); - } - - public JumpTrooperTriggeredAbility(final JumpTrooperTriggeredAbility ability) { - super(ability); - } - - @Override - public JumpTrooperTriggeredAbility copy() { - return new JumpTrooperTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.TARGETED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - if (game.getOpponents(this.controllerId).contains(event.getPlayerId())) { - Permanent creature = game.getPermanent(event.getTargetId()); - if (creature != null && filter.match(creature, getSourceId(), getControllerId(), game)) { - this.getTargets().clear(); - TargetStackObject target = new TargetStackObject(); - target.add(event.getSourceId(), game); - this.addTarget(target); - return true; - } - } - return false; - } - - @Override - public String getRule() { - return "Whenever a Trooper creature you control becomes the target of a spell or ability an opponent controls, counter that spell or ability unless its controller pays {2}."; - } -} +/* + * 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.cards.j; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.TargetStackObject; + +/** + * + * @author Styxo + */ +public class JumpTrooper extends CardImpl { + + private static final FilterCreatureCard filter = new FilterCreatureCard("Trooper creatures"); + + static { + filter.add(new SubtypePredicate(SubType.TROOPER)); + } + + public JumpTrooper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.TROOPER); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever a Trooper creature you control becomes the target of a spell or ability an opponent controls, counter that spell or abitlity unless its controller pays {2}. + this.addAbility(new JumpTrooperTriggeredAbility(new CounterUnlessPaysEffect(new GenericManaCost(2)))); + + } + + public JumpTrooper(final JumpTrooper card) { + super(card); + } + + @Override + public JumpTrooper copy() { + return new JumpTrooper(this); + } +} + +class JumpTrooperTriggeredAbility extends TriggeredAbilityImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Trooper creature you control"); + + static { + filter.add(new SubtypePredicate(SubType.TROOPER)); + } + + public JumpTrooperTriggeredAbility(Effect effect) { + super(Zone.BATTLEFIELD, effect); + } + + public JumpTrooperTriggeredAbility(final JumpTrooperTriggeredAbility ability) { + super(ability); + } + + @Override + public JumpTrooperTriggeredAbility copy() { + return new JumpTrooperTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.TARGETED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (game.getOpponents(this.controllerId).contains(event.getPlayerId())) { + Permanent creature = game.getPermanent(event.getTargetId()); + if (creature != null && filter.match(creature, getSourceId(), getControllerId(), game)) { + this.getTargets().clear(); + TargetStackObject target = new TargetStackObject(); + target.add(event.getSourceId(), game); + this.addTarget(target); + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a Trooper creature you control becomes the target of a spell or ability an opponent controls, counter that spell or ability unless its controller pays {2}."; + } +} diff --git a/Mage.Sets/src/mage/cards/j/JundBattlemage.java b/Mage.Sets/src/mage/cards/j/JundBattlemage.java index e290f5c4b7..3086ec4202 100644 --- a/Mage.Sets/src/mage/cards/j/JundBattlemage.java +++ b/Mage.Sets/src/mage/cards/j/JundBattlemage.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.SaprolingToken; import mage.target.TargetPlayer; @@ -51,8 +52,8 @@ public class JundBattlemage extends CardImpl { public JundBattlemage (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JundHackblade.java b/Mage.Sets/src/mage/cards/j/JundHackblade.java index ec862cdc85..706f5cb8d3 100644 --- a/Mage.Sets/src/mage/cards/j/JundHackblade.java +++ b/Mage.Sets/src/mage/cards/j/JundHackblade.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -60,8 +61,8 @@ public class JundHackblade extends CardImpl { public JundHackblade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B/G}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.BERSERKER); diff --git a/Mage.Sets/src/mage/cards/j/JundSojourners.java b/Mage.Sets/src/mage/cards/j/JundSojourners.java index 91b26eacaa..d6d52d90e3 100644 --- a/Mage.Sets/src/mage/cards/j/JundSojourners.java +++ b/Mage.Sets/src/mage/cards/j/JundSojourners.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; /** @@ -48,8 +49,8 @@ public class JundSojourners extends CardImpl { public JundSojourners(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{R}{G}"); - this.subtype.add("Viashino"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.SHAMAN); diff --git a/Mage.Sets/src/mage/cards/j/JungleBarrier.java b/Mage.Sets/src/mage/cards/j/JungleBarrier.java index 419b792939..5f0d04b8e4 100644 --- a/Mage.Sets/src/mage/cards/j/JungleBarrier.java +++ b/Mage.Sets/src/mage/cards/j/JungleBarrier.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class JungleBarrier extends CardImpl { public JungleBarrier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{U}"); - this.subtype.add("Plant"); - this.subtype.add("Wall"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.WALL); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JungleDelver.java b/Mage.Sets/src/mage/cards/j/JungleDelver.java new file mode 100644 index 0000000000..ddeee1ba8b --- /dev/null +++ b/Mage.Sets/src/mage/cards/j/JungleDelver.java @@ -0,0 +1,69 @@ +/* + * 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.cards.j; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author LevelX2 + */ +public class JungleDelver extends CardImpl { + + public JungleDelver(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {3}{G}: Put a +1/+1 counter on Jungle Delver. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{3}{G}"))); + } + + public JungleDelver(final JungleDelver card) { + super(card); + } + + @Override + public JungleDelver copy() { + return new JungleDelver(this); + } +} diff --git a/Mage.Sets/src/mage/cards/j/JungleLion.java b/Mage.Sets/src/mage/cards/j/JungleLion.java index 83353f56d5..f6f26de25a 100644 --- a/Mage.Sets/src/mage/cards/j/JungleLion.java +++ b/Mage.Sets/src/mage/cards/j/JungleLion.java @@ -33,6 +33,7 @@ import mage.abilities.common.CantBlockAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class JungleLion extends CardImpl { public JungleLion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JunglePatrol.java b/Mage.Sets/src/mage/cards/j/JunglePatrol.java index 476403510d..6545647893 100644 --- a/Mage.Sets/src/mage/cards/j/JunglePatrol.java +++ b/Mage.Sets/src/mage/cards/j/JunglePatrol.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.NamePredicate; @@ -62,8 +63,8 @@ public class JunglePatrol extends CardImpl { public JunglePatrol(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JungleTroll.java b/Mage.Sets/src/mage/cards/j/JungleTroll.java index 4498a352e6..f4e3f563da 100644 --- a/Mage.Sets/src/mage/cards/j/JungleTroll.java +++ b/Mage.Sets/src/mage/cards/j/JungleTroll.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class JungleTroll extends CardImpl { public JungleTroll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{G}"); - this.subtype.add("Troll"); + this.subtype.add(SubType.TROLL); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JungleWeaver.java b/Mage.Sets/src/mage/cards/j/JungleWeaver.java index 290f3947ec..39f97db510 100644 --- a/Mage.Sets/src/mage/cards/j/JungleWeaver.java +++ b/Mage.Sets/src/mage/cards/j/JungleWeaver.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class JungleWeaver extends CardImpl { public JungleWeaver (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/j/JungleWurm.java b/Mage.Sets/src/mage/cards/j/JungleWurm.java index 21a1806c87..72b7762b14 100644 --- a/Mage.Sets/src/mage/cards/j/JungleWurm.java +++ b/Mage.Sets/src/mage/cards/j/JungleWurm.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -48,7 +49,7 @@ public class JungleWurm extends CardImpl { public JungleWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/j/JuniperOrderAdvocate.java b/Mage.Sets/src/mage/cards/j/JuniperOrderAdvocate.java index 213cba387e..71a24fd35f 100644 --- a/Mage.Sets/src/mage/cards/j/JuniperOrderAdvocate.java +++ b/Mage.Sets/src/mage/cards/j/JuniperOrderAdvocate.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class JuniperOrderAdvocate extends CardImpl { public JuniperOrderAdvocate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/j/JuniperOrderDruid.java b/Mage.Sets/src/mage/cards/j/JuniperOrderDruid.java index f53634f73c..af842a4441 100644 --- a/Mage.Sets/src/mage/cards/j/JuniperOrderDruid.java +++ b/Mage.Sets/src/mage/cards/j/JuniperOrderDruid.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetLandPermanent; @@ -47,9 +48,9 @@ public class JuniperOrderDruid extends CardImpl { public JuniperOrderDruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JuniperOrderRanger.java b/Mage.Sets/src/mage/cards/j/JuniperOrderRanger.java index b5ab166c2f..4331c0b076 100644 --- a/Mage.Sets/src/mage/cards/j/JuniperOrderRanger.java +++ b/Mage.Sets/src/mage/cards/j/JuniperOrderRanger.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SetTargetPointer; import mage.constants.Zone; import mage.counters.CounterType; @@ -55,8 +56,8 @@ public class JuniperOrderRanger extends CardImpl { public JuniperOrderRanger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/j/JunkDiver.java b/Mage.Sets/src/mage/cards/j/JunkDiver.java index e18bb67912..2e223c70cc 100644 --- a/Mage.Sets/src/mage/cards/j/JunkDiver.java +++ b/Mage.Sets/src/mage/cards/j/JunkDiver.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterArtifactCard; import mage.filter.predicate.mageobject.AnotherCardPredicate; import mage.target.common.TargetCardInYourGraveyard; @@ -55,7 +56,7 @@ public class JunkDiver extends CardImpl { public JunkDiver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/j/JunkGolem.java b/Mage.Sets/src/mage/cards/j/JunkGolem.java new file mode 100644 index 0000000000..73bb7f1c6d --- /dev/null +++ b/Mage.Sets/src/mage/cards/j/JunkGolem.java @@ -0,0 +1,85 @@ +/* + * 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.cards.j; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.counters.CounterType; + +/** + * + * @author TheElk801 + */ +public class JunkGolem extends CardImpl { + + public JunkGolem(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + + this.subtype.add(SubType.GOLEM); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Junk Golem enters the battlefield with three +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), "with three +1/+1 counters on it")); + + // At the beginning of your upkeep, sacrifice Junk Golem unless you remove a +1/+1 counter from it. + this.addAbility(new BeginningOfUpkeepTriggeredAbility( + new SacrificeSourceUnlessPaysEffect( + new RemoveCountersSourceCost(CounterType.P1P1.createInstance()) + ), TargetController.YOU, false + )); + + // {1}, Discard a card: Put a +1/+1 counter on Junk Golem. + Ability ability = new SimpleActivatedAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{1}")); + ability.addCost(new DiscardCardCost()); + this.addAbility(ability); + } + + public JunkGolem(final JunkGolem card) { + super(card); + } + + @Override + public JunkGolem copy() { + return new JunkGolem(this); + } +} diff --git a/Mage.Sets/src/mage/cards/j/Junktroller.java b/Mage.Sets/src/mage/cards/j/Junktroller.java index 02f9d10e87..0930c7988f 100644 --- a/Mage.Sets/src/mage/cards/j/Junktroller.java +++ b/Mage.Sets/src/mage/cards/j/Junktroller.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCardInGraveyard; @@ -48,7 +49,7 @@ public class Junktroller extends CardImpl { public Junktroller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(0); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/j/JununEfreet.java b/Mage.Sets/src/mage/cards/j/JununEfreet.java index 0dacc38564..7e578a379b 100644 --- a/Mage.Sets/src/mage/cards/j/JununEfreet.java +++ b/Mage.Sets/src/mage/cards/j/JununEfreet.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -46,7 +47,7 @@ public class JununEfreet extends CardImpl { public JununEfreet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Efreet"); + this.subtype.add(SubType.EFREET); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JushiApprentice.java b/Mage.Sets/src/mage/cards/j/JushiApprentice.java index 88af92d1f9..ea198e2564 100644 --- a/Mage.Sets/src/mage/cards/j/JushiApprentice.java +++ b/Mage.Sets/src/mage/cards/j/JushiApprentice.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.FlipSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.SuperType; import mage.constants.Zone; @@ -56,8 +57,8 @@ public class JushiApprentice extends CardImpl { public JushiApprentice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); @@ -89,8 +90,8 @@ class TomoyaTheRevealer extends Token { addSuperType(SuperType.LEGENDARY); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Human"); - subtype.add("Wizard"); + subtype.add(SubType.HUMAN); + subtype.add(SubType.WIZARD); power = new MageInt(2); toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JuvenileGloomwidow.java b/Mage.Sets/src/mage/cards/j/JuvenileGloomwidow.java index 74bed146b4..0036b759de 100644 --- a/Mage.Sets/src/mage/cards/j/JuvenileGloomwidow.java +++ b/Mage.Sets/src/mage/cards/j/JuvenileGloomwidow.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class JuvenileGloomwidow extends CardImpl { public JuvenileGloomwidow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JuzamDjinn.java b/Mage.Sets/src/mage/cards/j/JuzamDjinn.java index 9ade89b3ae..6ed1f650c0 100644 --- a/Mage.Sets/src/mage/cards/j/JuzamDjinn.java +++ b/Mage.Sets/src/mage/cards/j/JuzamDjinn.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -44,7 +45,7 @@ public class JuzamDjinn extends CardImpl { public JuzamDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/j/JwarIsleAvenger.java b/Mage.Sets/src/mage/cards/j/JwarIsleAvenger.java index 392841abc6..bf5538fddd 100644 --- a/Mage.Sets/src/mage/cards/j/JwarIsleAvenger.java +++ b/Mage.Sets/src/mage/cards/j/JwarIsleAvenger.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.SurgeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class JwarIsleAvenger extends CardImpl { public JwarIsleAvenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JwariScuttler.java b/Mage.Sets/src/mage/cards/j/JwariScuttler.java index 8ee8cbb419..5160a22efa 100644 --- a/Mage.Sets/src/mage/cards/j/JwariScuttler.java +++ b/Mage.Sets/src/mage/cards/j/JwariScuttler.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class JwariScuttler extends CardImpl { public JwariScuttler (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Crab"); + this.subtype.add(SubType.CRAB); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/j/JwariShapeshifter.java b/Mage.Sets/src/mage/cards/j/JwariShapeshifter.java index 29aee88784..32c0ac74c6 100644 --- a/Mage.Sets/src/mage/cards/j/JwariShapeshifter.java +++ b/Mage.Sets/src/mage/cards/j/JwariShapeshifter.java @@ -56,8 +56,8 @@ public class JwariShapeshifter extends CardImpl { public JwariShapeshifter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Shapeshifter"); - this.subtype.add("Ally"); + this.subtype.add(SubType.SHAPESHIFTER); + this.subtype.add(SubType.ALLY); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/k/KaaliaOfTheVast.java b/Mage.Sets/src/mage/cards/k/KaaliaOfTheVast.java index 0bb2a01ec5..2d84618ba0 100644 --- a/Mage.Sets/src/mage/cards/k/KaaliaOfTheVast.java +++ b/Mage.Sets/src/mage/cards/k/KaaliaOfTheVast.java @@ -56,8 +56,8 @@ public class KaaliaOfTheVast extends CardImpl { public KaaliaOfTheVast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KabiraEvangel.java b/Mage.Sets/src/mage/cards/k/KabiraEvangel.java index 568c269662..e05440f5bc 100644 --- a/Mage.Sets/src/mage/cards/k/KabiraEvangel.java +++ b/Mage.Sets/src/mage/cards/k/KabiraEvangel.java @@ -58,9 +58,9 @@ public class KabiraEvangel extends CardImpl { public KabiraEvangel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KabiraVindicator.java b/Mage.Sets/src/mage/cards/k/KabiraVindicator.java index 55c1be1ca2..66b2a6ee8b 100644 --- a/Mage.Sets/src/mage/cards/k/KabiraVindicator.java +++ b/Mage.Sets/src/mage/cards/k/KabiraVindicator.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.LevelerCardBuilder; import mage.cards.CardSetInfo; import mage.cards.LevelerCard; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -52,8 +53,8 @@ public class KabiraVindicator extends LevelerCard { public KabiraVindicator(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.color.setWhite(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KabutoMoth.java b/Mage.Sets/src/mage/cards/k/KabutoMoth.java index 348cc42a8b..36253db222 100644 --- a/Mage.Sets/src/mage/cards/k/KabutoMoth.java +++ b/Mage.Sets/src/mage/cards/k/KabutoMoth.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class KabutoMoth extends CardImpl { public KabutoMoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KaervekTheMerciless.java b/Mage.Sets/src/mage/cards/k/KaervekTheMerciless.java index 34d973ae45..a196c1f169 100644 --- a/Mage.Sets/src/mage/cards/k/KaervekTheMerciless.java +++ b/Mage.Sets/src/mage/cards/k/KaervekTheMerciless.java @@ -29,7 +29,6 @@ package mage.cards.k; import java.util.UUID; import mage.MageInt; -import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.effects.OneShotEffect; @@ -51,10 +50,10 @@ import mage.target.common.TargetCreatureOrPlayer; public class KaervekTheMerciless extends CardImpl { public KaervekTheMerciless(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(5); this.toughness = new MageInt(4); @@ -94,9 +93,9 @@ class KaervekTheMercilessEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - MageObject spellCast = game.getObject(getTargetPointer().getFirst(game, source)); - if (spellCast instanceof Spell) { - int cost = ((Spell) spellCast).getConvertedManaCost(); + Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source)); + if (spell != null) { + int cost = spell.getConvertedManaCost(); Player target = game.getPlayer(source.getFirstTarget()); if (target != null) { target.damage(cost, source.getSourceId(), game, false, true); diff --git a/Mage.Sets/src/mage/cards/k/KaerveksHex.java b/Mage.Sets/src/mage/cards/k/KaerveksHex.java new file mode 100644 index 0000000000..e4953bb153 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KaerveksHex.java @@ -0,0 +1,70 @@ +/* + * 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.cards.k; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.effects.common.DamageAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author TheElk801 + */ +public class KaerveksHex extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature"); + private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("green creature"); + + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + filter2.add(new ColorPredicate(ObjectColor.GREEN)); + } + + public KaerveksHex(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}"); + + // Kaervek's Hex deals 1 damage to each nonblack creature and an additional 1 damage to each green creature. + this.getSpellAbility().addEffect(new DamageAllEffect(1, filter)); + this.getSpellAbility().addEffect(new DamageAllEffect(1, filter2).setText("and an additional 1 damage to each green creature")); + } + + public KaerveksHex(final KaerveksHex card) { + super(card); + } + + @Override + public KaerveksHex copy() { + return new KaerveksHex(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KagemaroFirstToSuffer.java b/Mage.Sets/src/mage/cards/k/KagemaroFirstToSuffer.java index 8295e2c6a2..0004cc860b 100644 --- a/Mage.Sets/src/mage/cards/k/KagemaroFirstToSuffer.java +++ b/Mage.Sets/src/mage/cards/k/KagemaroFirstToSuffer.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -56,8 +57,8 @@ public class KagemaroFirstToSuffer extends CardImpl { public KagemaroFirstToSuffer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Demon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DEMON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/k/KagemarosClutch.java b/Mage.Sets/src/mage/cards/k/KagemarosClutch.java index e031975983..cf73cb11fa 100644 --- a/Mage.Sets/src/mage/cards/k/KagemarosClutch.java +++ b/Mage.Sets/src/mage/cards/k/KagemarosClutch.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class KagemarosClutch extends CardImpl { public KagemarosClutch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/k/KahoMinamoHistorian.java b/Mage.Sets/src/mage/cards/k/KahoMinamoHistorian.java index c1b2d8f254..e9d1f218fb 100644 --- a/Mage.Sets/src/mage/cards/k/KahoMinamoHistorian.java +++ b/Mage.Sets/src/mage/cards/k/KahoMinamoHistorian.java @@ -39,6 +39,7 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.SearchEffect; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.SuperType; @@ -61,8 +62,8 @@ public class KahoMinamoHistorian extends CardImpl { public KahoMinamoHistorian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KaijinOfTheVanishingTouch.java b/Mage.Sets/src/mage/cards/k/KaijinOfTheVanishingTouch.java index 1d2edb9eff..7401ad0dfc 100644 --- a/Mage.Sets/src/mage/cards/k/KaijinOfTheVanishingTouch.java +++ b/Mage.Sets/src/mage/cards/k/KaijinOfTheVanishingTouch.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,7 +48,7 @@ public class KaijinOfTheVanishingTouch extends CardImpl { public KaijinOfTheVanishingTouch(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KalastriaHealer.java b/Mage.Sets/src/mage/cards/k/KalastriaHealer.java index 16f749fc50..df0c5a46b0 100644 --- a/Mage.Sets/src/mage/cards/k/KalastriaHealer.java +++ b/Mage.Sets/src/mage/cards/k/KalastriaHealer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.LoseLifeOpponentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,9 +47,9 @@ public class KalastriaHealer extends CardImpl { public KalastriaHealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Cleric"); - this.subtype.add("Ally"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.ALLY); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KalastriaHighborn.java b/Mage.Sets/src/mage/cards/k/KalastriaHighborn.java index b1f72d5731..f18e162c6f 100644 --- a/Mage.Sets/src/mage/cards/k/KalastriaHighborn.java +++ b/Mage.Sets/src/mage/cards/k/KalastriaHighborn.java @@ -29,37 +29,48 @@ package mage.cards.k; import java.util.UUID; import mage.MageInt; -import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.Ability; +import mage.abilities.common.DiesThisOrAnotherCreatureTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.GainLifeEffect; -import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DoIfCostPaid; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.Outcome; import mage.constants.SubType; -import mage.constants.Zone; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; 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.TargetPlayer; /** * - * @author maurer.it_at_gmail.com + * @author maurer.it_at_gmail.com, TheElk801 */ public class KalastriaHighborn extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Vampire you control"); + + static { + filter.add(new SubtypePredicate(SubType.VAMPIRE)); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + public KalastriaHighborn(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Shaman"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{B}"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); - this.addAbility(new KalastriaHighbornTriggeredAbility()); + Ability ability = new DiesThisOrAnotherCreatureTriggeredAbility(new DoIfCostPaid(new LoseGainEffect(), new ManaCostsImpl("{B}")), false, filter); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); } public KalastriaHighborn(final KalastriaHighborn card) { @@ -72,52 +83,35 @@ public class KalastriaHighborn extends CardImpl { } } -class KalastriaHighbornTriggeredAbility extends TriggeredAbilityImpl { - KalastriaHighbornTriggeredAbility ( ) { - super(Zone.ALL, new LoseLifeTargetEffect(2), false); - this.addCost(new ManaCostsImpl("{B}")); - this.addTarget(new TargetPlayer()); - this.getEffects().add(new GainLifeEffect(2)); +class LoseGainEffect extends OneShotEffect { + + LoseGainEffect() { + super(Outcome.Benefit); + this.staticText = "target player loses 2 life and you gain 2 life"; } - KalastriaHighbornTriggeredAbility ( KalastriaHighbornTriggeredAbility ability ) { - super(ability); + LoseGainEffect(final LoseGainEffect effect) { + super(effect); } @Override - public KalastriaHighbornTriggeredAbility copy() { - return new KalastriaHighbornTriggeredAbility(this); + public LoseGainEffect copy() { + return new LoseGainEffect(this); } @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.ZONE_CHANGE; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - // ayrat: make sure Kalastria Highborn is on battlefield - if (game.getPermanent(this.getSourceId()) == null) { - // or it is being removed - if (game.getLastKnownInformation(this.getSourceId(), Zone.BATTLEFIELD) == null) { - return false; - } - } - - ZoneChangeEvent zEvent = (ZoneChangeEvent)event; - Permanent permanent = zEvent.getTarget(); - - return permanent != null && - zEvent.getToZone() == Zone.GRAVEYARD && - zEvent.getFromZone() == Zone.BATTLEFIELD && - (permanent.getControllerId().equals(this.getControllerId()) && - permanent.hasSubtype(SubType.VAMPIRE, game) || permanent.getId().equals(this.getSourceId())); - } - - @Override - public String getRule() { - return "Whenever {this} or another Vampire you control is put" - + " into a graveyard from the battlefield, you may pay {B}. If you" - + " do, target player loses 2 life and you gain 2 life."; + public boolean apply(Game game, Ability source) { + Player you = game.getPlayer(source.getControllerId()); + Player them = game.getPlayer(source.getFirstTarget()); + if (you == null && them == null) { + return false; + } + if (you != null) { + you.gainLife(2, game); + } + if (them != null) { + them.loseLife(2, game, false); + } + return true; } } diff --git a/Mage.Sets/src/mage/cards/k/KalastriaNightwatch.java b/Mage.Sets/src/mage/cards/k/KalastriaNightwatch.java index d321d3cf66..a83fbe19f5 100644 --- a/Mage.Sets/src/mage/cards/k/KalastriaNightwatch.java +++ b/Mage.Sets/src/mage/cards/k/KalastriaNightwatch.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,9 +46,9 @@ public class KalastriaNightwatch extends CardImpl { public KalastriaNightwatch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Warrior"); - this.subtype.add("Ally"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KalemneDiscipleOfIroas.java b/Mage.Sets/src/mage/cards/k/KalemneDiscipleOfIroas.java index d1a63c4963..b53abea157 100644 --- a/Mage.Sets/src/mage/cards/k/KalemneDiscipleOfIroas.java +++ b/Mage.Sets/src/mage/cards/k/KalemneDiscipleOfIroas.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.SuperType; @@ -68,8 +69,8 @@ public class KalemneDiscipleOfIroas extends CardImpl { public KalemneDiscipleOfIroas(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Giant"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KalemnesCaptain.java b/Mage.Sets/src/mage/cards/k/KalemnesCaptain.java index b5914dd6d9..cf0c2767cc 100644 --- a/Mage.Sets/src/mage/cards/k/KalemnesCaptain.java +++ b/Mage.Sets/src/mage/cards/k/KalemnesCaptain.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -56,8 +57,8 @@ public class KalemnesCaptain extends CardImpl { public KalemnesCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Giant"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KalitasBloodchiefOfGhet.java b/Mage.Sets/src/mage/cards/k/KalitasBloodchiefOfGhet.java index 345edea0a4..c2c90c033c 100644 --- a/Mage.Sets/src/mage/cards/k/KalitasBloodchiefOfGhet.java +++ b/Mage.Sets/src/mage/cards/k/KalitasBloodchiefOfGhet.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -56,8 +57,8 @@ public class KalitasBloodchiefOfGhet extends CardImpl { public KalitasBloodchiefOfGhet(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vampire"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WARRIOR); // {B}{B}{B}, {T}: Destroy target creature. If that creature dies this way, create a black Vampire creature token. Its power is equal to that creature's power and its toughness is equal to that creature's toughness. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new KalitasDestroyEffect(), new ManaCostsImpl("{B}{B}{B}")); diff --git a/Mage.Sets/src/mage/cards/k/KalitasTraitorOfGhet.java b/Mage.Sets/src/mage/cards/k/KalitasTraitorOfGhet.java index 846eb69b09..35bf71b2f3 100644 --- a/Mage.Sets/src/mage/cards/k/KalitasTraitorOfGhet.java +++ b/Mage.Sets/src/mage/cards/k/KalitasTraitorOfGhet.java @@ -71,8 +71,8 @@ public class KalitasTraitorOfGhet extends CardImpl { public KalitasTraitorOfGhet(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vampire"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KalonianBehemoth.java b/Mage.Sets/src/mage/cards/k/KalonianBehemoth.java index 098e2009a0..2e47484912 100644 --- a/Mage.Sets/src/mage/cards/k/KalonianBehemoth.java +++ b/Mage.Sets/src/mage/cards/k/KalonianBehemoth.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class KalonianBehemoth extends CardImpl { public KalonianBehemoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(9); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/k/KalonianHydra.java b/Mage.Sets/src/mage/cards/k/KalonianHydra.java index 366914ba04..4321c9e20b 100644 --- a/Mage.Sets/src/mage/cards/k/KalonianHydra.java +++ b/Mage.Sets/src/mage/cards/k/KalonianHydra.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.counters.CounterType; @@ -56,7 +57,7 @@ public class KalonianHydra extends CardImpl { public KalonianHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/k/KalonianTusker.java b/Mage.Sets/src/mage/cards/k/KalonianTusker.java index f738b3831c..f91100d055 100644 --- a/Mage.Sets/src/mage/cards/k/KalonianTusker.java +++ b/Mage.Sets/src/mage/cards/k/KalonianTusker.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class KalonianTusker extends CardImpl { public KalonianTusker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KalonianTwingrove.java b/Mage.Sets/src/mage/cards/k/KalonianTwingrove.java index 337e2e2878..3bac921e35 100644 --- a/Mage.Sets/src/mage/cards/k/KalonianTwingrove.java +++ b/Mage.Sets/src/mage/cards/k/KalonianTwingrove.java @@ -60,8 +60,8 @@ public class KalonianTwingrove extends CardImpl { public KalonianTwingrove(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/k/KamahlFistOfKrosa.java b/Mage.Sets/src/mage/cards/k/KamahlFistOfKrosa.java index 0cea4a0713..3d7ffda3fe 100644 --- a/Mage.Sets/src/mage/cards/k/KamahlFistOfKrosa.java +++ b/Mage.Sets/src/mage/cards/k/KamahlFistOfKrosa.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class KamahlFistOfKrosa extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KamahlPitFighter.java b/Mage.Sets/src/mage/cards/k/KamahlPitFighter.java index 20ce810c69..76a2a36e2d 100644 --- a/Mage.Sets/src/mage/cards/k/KamahlPitFighter.java +++ b/Mage.Sets/src/mage/cards/k/KamahlPitFighter.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -50,8 +51,8 @@ public class KamahlPitFighter extends CardImpl { public KamahlPitFighter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Barbarian"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BARBARIAN); this.power = new MageInt(6); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KamahlsDesire.java b/Mage.Sets/src/mage/cards/k/KamahlsDesire.java index ef315ef666..f965a1e5e0 100644 --- a/Mage.Sets/src/mage/cards/k/KamahlsDesire.java +++ b/Mage.Sets/src/mage/cards/k/KamahlsDesire.java @@ -42,6 +42,7 @@ import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class KamahlsDesire extends CardImpl { public KamahlsDesire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/k/KambalConsulOfAllocation.java b/Mage.Sets/src/mage/cards/k/KambalConsulOfAllocation.java index e9b9fe739b..5147ea4705 100644 --- a/Mage.Sets/src/mage/cards/k/KambalConsulOfAllocation.java +++ b/Mage.Sets/src/mage/cards/k/KambalConsulOfAllocation.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SetTargetPointer; import mage.constants.SuperType; import mage.constants.Zone; @@ -58,8 +59,8 @@ public class KambalConsulOfAllocation extends CardImpl { public KambalConsulOfAllocation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KamiOfAncientLaw.java b/Mage.Sets/src/mage/cards/k/KamiOfAncientLaw.java index 037af83413..1f3c771813 100644 --- a/Mage.Sets/src/mage/cards/k/KamiOfAncientLaw.java +++ b/Mage.Sets/src/mage/cards/k/KamiOfAncientLaw.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetEnchantmentPermanent; @@ -48,7 +49,7 @@ public class KamiOfAncientLaw extends CardImpl { public KamiOfAncientLaw (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KamiOfEmptyGraves.java b/Mage.Sets/src/mage/cards/k/KamiOfEmptyGraves.java index 00cebb71d5..af26c02633 100644 --- a/Mage.Sets/src/mage/cards/k/KamiOfEmptyGraves.java +++ b/Mage.Sets/src/mage/cards/k/KamiOfEmptyGraves.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class KamiOfEmptyGraves extends CardImpl { public KamiOfEmptyGraves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KamiOfFalseHope.java b/Mage.Sets/src/mage/cards/k/KamiOfFalseHope.java index 125d097cb7..8ea37664a6 100644 --- a/Mage.Sets/src/mage/cards/k/KamiOfFalseHope.java +++ b/Mage.Sets/src/mage/cards/k/KamiOfFalseHope.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class KamiOfFalseHope extends CardImpl { public KamiOfFalseHope(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KamiOfFiresRoar.java b/Mage.Sets/src/mage/cards/k/KamiOfFiresRoar.java index 657455cf15..73e7bdb1fb 100644 --- a/Mage.Sets/src/mage/cards/k/KamiOfFiresRoar.java +++ b/Mage.Sets/src/mage/cards/k/KamiOfFiresRoar.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.combat.CantBlockTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class KamiOfFiresRoar extends CardImpl { public KamiOfFiresRoar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KamiOfLunacy.java b/Mage.Sets/src/mage/cards/k/KamiOfLunacy.java index 11c147a9ef..1d823e0860 100644 --- a/Mage.Sets/src/mage/cards/k/KamiOfLunacy.java +++ b/Mage.Sets/src/mage/cards/k/KamiOfLunacy.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -43,7 +44,7 @@ public class KamiOfLunacy extends CardImpl { public KamiOfLunacy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KamiOfOldStone.java b/Mage.Sets/src/mage/cards/k/KamiOfOldStone.java index 6897da74c2..3c9b93bd36 100644 --- a/Mage.Sets/src/mage/cards/k/KamiOfOldStone.java +++ b/Mage.Sets/src/mage/cards/k/KamiOfOldStone.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class KamiOfOldStone extends CardImpl { public KamiOfOldStone (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/k/KamiOfTatteredShoji.java b/Mage.Sets/src/mage/cards/k/KamiOfTatteredShoji.java index a73607affa..3ce1dd011e 100644 --- a/Mage.Sets/src/mage/cards/k/KamiOfTatteredShoji.java +++ b/Mage.Sets/src/mage/cards/k/KamiOfTatteredShoji.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; @@ -46,7 +47,7 @@ public class KamiOfTatteredShoji extends CardImpl { public KamiOfTatteredShoji(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KamiOfTheCrescentMoon.java b/Mage.Sets/src/mage/cards/k/KamiOfTheCrescentMoon.java index ba00215bdc..4c9ec6101a 100644 --- a/Mage.Sets/src/mage/cards/k/KamiOfTheCrescentMoon.java +++ b/Mage.Sets/src/mage/cards/k/KamiOfTheCrescentMoon.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; @@ -46,7 +47,7 @@ public class KamiOfTheCrescentMoon extends CardImpl { public KamiOfTheCrescentMoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KamiOfTheHonoredDead.java b/Mage.Sets/src/mage/cards/k/KamiOfTheHonoredDead.java index 5fb97b2982..ecbc915e16 100644 --- a/Mage.Sets/src/mage/cards/k/KamiOfTheHonoredDead.java +++ b/Mage.Sets/src/mage/cards/k/KamiOfTheHonoredDead.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -52,7 +53,7 @@ public class KamiOfTheHonoredDead extends CardImpl { public KamiOfTheHonoredDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KamiOfTheHunt.java b/Mage.Sets/src/mage/cards/k/KamiOfTheHunt.java index 97331f215f..4fe8db8ea1 100644 --- a/Mage.Sets/src/mage/cards/k/KamiOfTheHunt.java +++ b/Mage.Sets/src/mage/cards/k/KamiOfTheHunt.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; @@ -45,7 +46,7 @@ public class KamiOfTheHunt extends CardImpl { public KamiOfTheHunt(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KamiOfThePaintedRoad.java b/Mage.Sets/src/mage/cards/k/KamiOfThePaintedRoad.java index 16020202ac..cff8750ebc 100644 --- a/Mage.Sets/src/mage/cards/k/KamiOfThePaintedRoad.java +++ b/Mage.Sets/src/mage/cards/k/KamiOfThePaintedRoad.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.GainProtectionFromColorSourceEff import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; @@ -45,7 +46,7 @@ public class KamiOfThePaintedRoad extends CardImpl { public KamiOfThePaintedRoad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KamiOfThePalaceFields.java b/Mage.Sets/src/mage/cards/k/KamiOfThePalaceFields.java index 7143dc3742..2a08474b47 100644 --- a/Mage.Sets/src/mage/cards/k/KamiOfThePalaceFields.java +++ b/Mage.Sets/src/mage/cards/k/KamiOfThePalaceFields.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -44,7 +45,7 @@ public class KamiOfThePalaceFields extends CardImpl { public KamiOfThePalaceFields(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KamiOfTheTendedGarden.java b/Mage.Sets/src/mage/cards/k/KamiOfTheTendedGarden.java index 84164305a6..f434041695 100644 --- a/Mage.Sets/src/mage/cards/k/KamiOfTheTendedGarden.java +++ b/Mage.Sets/src/mage/cards/k/KamiOfTheTendedGarden.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.TargetController; @@ -47,7 +48,7 @@ public class KamiOfTheTendedGarden extends CardImpl { public KamiOfTheTendedGarden(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KamiOfTheWaningMoon.java b/Mage.Sets/src/mage/cards/k/KamiOfTheWaningMoon.java index f46c364da1..08fb310087 100644 --- a/Mage.Sets/src/mage/cards/k/KamiOfTheWaningMoon.java +++ b/Mage.Sets/src/mage/cards/k/KamiOfTheWaningMoon.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class KamiOfTheWaningMoon extends CardImpl { public KamiOfTheWaningMoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KamiOfTwistedReflection.java b/Mage.Sets/src/mage/cards/k/KamiOfTwistedReflection.java index 4e9fcccedd..3458d3e5df 100644 --- a/Mage.Sets/src/mage/cards/k/KamiOfTwistedReflection.java +++ b/Mage.Sets/src/mage/cards/k/KamiOfTwistedReflection.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -47,7 +48,7 @@ public class KamiOfTwistedReflection extends CardImpl { public KamiOfTwistedReflection(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KaminoCloningFacility.java b/Mage.Sets/src/mage/cards/k/KaminoCloningFacility.java index 8ce1d3b45b..01d8b4d696 100644 --- a/Mage.Sets/src/mage/cards/k/KaminoCloningFacility.java +++ b/Mage.Sets/src/mage/cards/k/KaminoCloningFacility.java @@ -1,83 +1,83 @@ -/* - * 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.cards.k; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.mana.ColorlessManaAbility; -import mage.abilities.mana.ConditionalAnyColorManaAbility; -import mage.abilities.mana.conditional.ConditionalSpellManaBuilder; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.FilterSpell; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.permanent.token.TrooperToken; - -/** - * - * @author Styxo - */ -public class KaminoCloningFacility extends CardImpl { - - private static final FilterSpell FILTER = new FilterSpell("a Trooper spell"); - - static { - FILTER.add(new SubtypePredicate(SubType.TROOPER)); - } - - public KaminoCloningFacility(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - - // {T}: Add {C} to your mana pool. - this.addAbility(new ColorlessManaAbility()); - - // {T} Add one mana of any color to your mana pool. Spend this mana only to cast a Trooper spell. - this.addAbility(new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new ConditionalSpellManaBuilder(FILTER), true)); - - // {5}, {T}: Create a 1/1 white Trooper creature tokens. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new TrooperToken(), 1), new ManaCostsImpl("{5}")); - ability.addCost(new TapSourceCost()); - this.addAbility(ability); - } - - public KaminoCloningFacility(final KaminoCloningFacility card) { - super(card); - } - - @Override - public KaminoCloningFacility copy() { - return new KaminoCloningFacility(this); - } -} +/* + * 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.cards.k; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.abilities.mana.ConditionalAnyColorManaAbility; +import mage.abilities.mana.conditional.ConditionalSpellManaBuilder; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.TrooperToken; + +/** + * + * @author Styxo + */ +public class KaminoCloningFacility extends CardImpl { + + private static final FilterSpell FILTER = new FilterSpell("a Trooper spell"); + + static { + FILTER.add(new SubtypePredicate(SubType.TROOPER)); + } + + public KaminoCloningFacility(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.LAND},""); + + // {T}: Add {C} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {T} Add one mana of any color to your mana pool. Spend this mana only to cast a Trooper spell. + this.addAbility(new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new ConditionalSpellManaBuilder(FILTER), true)); + + // {5}, {T}: Create a 1/1 white Trooper creature tokens. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new TrooperToken(), 1), new ManaCostsImpl("{5}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public KaminoCloningFacility(final KaminoCloningFacility card) { + super(card); + } + + @Override + public KaminoCloningFacility copy() { + return new KaminoCloningFacility(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KangeeAerieKeeper.java b/Mage.Sets/src/mage/cards/k/KangeeAerieKeeper.java index 155266cccb..6c2bf15440 100644 --- a/Mage.Sets/src/mage/cards/k/KangeeAerieKeeper.java +++ b/Mage.Sets/src/mage/cards/k/KangeeAerieKeeper.java @@ -57,33 +57,33 @@ import mage.game.Game; * @author emerald000 */ public class KangeeAerieKeeper extends CardImpl { - + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Bird creatures"); - + static { filter.add(new SubtypePredicate(SubType.BIRD)); filter.add(new AnotherPredicate()); } public KangeeAerieKeeper(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Bird"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); // Kicker {X}{2} - this.addAbility(new KickerAbility("{X}{2}")); - + this.addAbility(new KickerAbility("{2}{X}")); + // Flying this.addAbility(FlyingAbility.getInstance()); - + // When Kangee, Aerie Keeper enters the battlefield, if it was kicked, put X feather counters on it. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.FEATHER.createInstance(), new KangeeAerieKeeperGetKickerXValue(), true)); this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, put X feather counters on it.")); - + // Other Bird creatures get +1/+1 for each feather counter on Kangee, Aerie Keeper. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(new CountersSourceCount(CounterType.FEATHER), new CountersSourceCount(CounterType.FEATHER), Duration.WhileOnBattlefield, filter, true, "Other Bird creatures get +1/+1 for each feather counter on {this}."))); } @@ -108,7 +108,7 @@ class KangeeAerieKeeperGetKickerXValue implements DynamicValue { int count = 0; Card card = game.getCard(source.getSourceId()); if (card != null) { - for (Ability ability: card.getAbilities()) { + for (Ability ability : card.getAbilities()) { if (ability instanceof KickerAbility) { count += ((KickerAbility) ability).getXManaValue(); } @@ -131,4 +131,4 @@ class KangeeAerieKeeperGetKickerXValue implements DynamicValue { public String getMessage() { return "X"; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/k/KapshoKitefins.java b/Mage.Sets/src/mage/cards/k/KapshoKitefins.java index 53bbb6000a..7c12c19a07 100644 --- a/Mage.Sets/src/mage/cards/k/KapshoKitefins.java +++ b/Mage.Sets/src/mage/cards/k/KapshoKitefins.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -58,7 +59,7 @@ public class KapshoKitefins extends CardImpl { public KapshoKitefins(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Fish"); + this.subtype.add(SubType.FISH); this.color.setBlue(true); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KaradorGhostChieftain.java b/Mage.Sets/src/mage/cards/k/KaradorGhostChieftain.java index dbb7a28ea8..52ee34cc38 100644 --- a/Mage.Sets/src/mage/cards/k/KaradorGhostChieftain.java +++ b/Mage.Sets/src/mage/cards/k/KaradorGhostChieftain.java @@ -58,8 +58,8 @@ public class KaradorGhostChieftain extends CardImpl { public KaradorGhostChieftain(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Centaur"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KarametraGodOfHarvests.java b/Mage.Sets/src/mage/cards/k/KarametraGodOfHarvests.java index 6a4ec5115b..54567ed659 100644 --- a/Mage.Sets/src/mage/cards/k/KarametraGodOfHarvests.java +++ b/Mage.Sets/src/mage/cards/k/KarametraGodOfHarvests.java @@ -62,7 +62,7 @@ public class KarametraGodOfHarvests extends CardImpl { public KarametraGodOfHarvests(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(6); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/k/KarametrasAcolyte.java b/Mage.Sets/src/mage/cards/k/KarametrasAcolyte.java index 2b00dc0a9a..40c08ea3db 100644 --- a/Mage.Sets/src/mage/cards/k/KarametrasAcolyte.java +++ b/Mage.Sets/src/mage/cards/k/KarametrasAcolyte.java @@ -35,6 +35,7 @@ import mage.abilities.mana.DynamicManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; /** @@ -45,8 +46,8 @@ public class KarametrasAcolyte extends CardImpl { public KarametrasAcolyte(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KarametrasFavor.java b/Mage.Sets/src/mage/cards/k/KarametrasFavor.java index 9d7a76419e..a1558d6e4a 100644 --- a/Mage.Sets/src/mage/cards/k/KarametrasFavor.java +++ b/Mage.Sets/src/mage/cards/k/KarametrasFavor.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class KarametrasFavor extends CardImpl { public KarametrasFavor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/k/KarganDragonlord.java b/Mage.Sets/src/mage/cards/k/KarganDragonlord.java index 03af603a32..9975ff801b 100644 --- a/Mage.Sets/src/mage/cards/k/KarganDragonlord.java +++ b/Mage.Sets/src/mage/cards/k/KarganDragonlord.java @@ -43,6 +43,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardSetInfo; import mage.cards.LevelerCard; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class KarganDragonlord extends LevelerCard { public KarganDragonlord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.color.setRed(true); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KariZevSkyshipRaider.java b/Mage.Sets/src/mage/cards/k/KariZevSkyshipRaider.java index 4ece97bb7e..43c4993629 100644 --- a/Mage.Sets/src/mage/cards/k/KariZevSkyshipRaider.java +++ b/Mage.Sets/src/mage/cards/k/KariZevSkyshipRaider.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.game.Game; @@ -54,8 +55,8 @@ public class KariZevSkyshipRaider extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Pirate"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KariZevsExpertise.java b/Mage.Sets/src/mage/cards/k/KariZevsExpertise.java index 44def69dd4..3d978e13d6 100644 --- a/Mage.Sets/src/mage/cards/k/KariZevsExpertise.java +++ b/Mage.Sets/src/mage/cards/k/KariZevsExpertise.java @@ -63,8 +63,8 @@ public class KariZevsExpertise extends CardImpl { // Gain control of target creature or Vehicle until end of turn. Untap it. It gains haste until end of turn. this.getSpellAbility().addTarget(new TargetPermanent(filter)); this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new UntapTargetEffect()); - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap it")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("It gans haste until end of turn.")); // You may cast a card with converted mana cost 2 or less from your hand without paying its mana cost. this.getSpellAbility().addEffect(new CastWithoutPayingManaCostEffect(2)); diff --git a/Mage.Sets/src/mage/cards/k/KarlovOfTheGhostCouncil.java b/Mage.Sets/src/mage/cards/k/KarlovOfTheGhostCouncil.java index e309a972a8..aa6094958e 100644 --- a/Mage.Sets/src/mage/cards/k/KarlovOfTheGhostCouncil.java +++ b/Mage.Sets/src/mage/cards/k/KarlovOfTheGhostCouncil.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.counters.CounterType; @@ -53,8 +54,8 @@ public class KarlovOfTheGhostCouncil extends CardImpl { public KarlovOfTheGhostCouncil(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KarmicGuide.java b/Mage.Sets/src/mage/cards/k/KarmicGuide.java index 2a7d5e9b0a..0de8cdfe90 100644 --- a/Mage.Sets/src/mage/cards/k/KarmicGuide.java +++ b/Mage.Sets/src/mage/cards/k/KarmicGuide.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; @@ -50,8 +51,8 @@ public class KarmicGuide extends CardImpl { public KarmicGuide(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Angel"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.ANGEL); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KarnLiberated.java b/Mage.Sets/src/mage/cards/k/KarnLiberated.java index a3fa466c85..3f5b40282d 100644 --- a/Mage.Sets/src/mage/cards/k/KarnLiberated.java +++ b/Mage.Sets/src/mage/cards/k/KarnLiberated.java @@ -44,6 +44,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -70,7 +71,7 @@ public class KarnLiberated extends CardImpl { public KarnLiberated(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{7}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Karn"); + this.subtype.add(SubType.KARN); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(6)); // +4: Target player exiles a card from his or her hand. @@ -122,7 +123,7 @@ class KarnLiberatedEffect extends OneShotEffect { for (ExileZone zone : game.getExile().getExileZones()) { if (zone.getId().equals(exileId)) { for (Card card : zone.getCards(game)) { - if (!card.getSubtype(game).contains("Aura") && card.isPermanent()) { + if (!card.hasSubtype(SubType.AURA, game) && card.isPermanent()) { cards.add(card); } } @@ -154,7 +155,7 @@ class KarnLiberatedEffect extends OneShotEffect { } for (Card card : cards) { game.getState().setZone(card.getId(), Zone.EXILED); - if (card.isPermanent() && !card.getSubtype(game).contains("Aura")) { + if (card.isPermanent() && !card.hasSubtype(SubType.AURA, game)) { game.getExile().add(exileId, sourceObject.getIdName(), card); } } diff --git a/Mage.Sets/src/mage/cards/k/KarnSilverGolem.java b/Mage.Sets/src/mage/cards/k/KarnSilverGolem.java index 40608203af..528fb93e77 100644 --- a/Mage.Sets/src/mage/cards/k/KarnSilverGolem.java +++ b/Mage.Sets/src/mage/cards/k/KarnSilverGolem.java @@ -60,7 +60,7 @@ public class KarnSilverGolem extends CardImpl { public KarnSilverGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KarnsTouch.java b/Mage.Sets/src/mage/cards/k/KarnsTouch.java new file mode 100644 index 0000000000..1d108e1261 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KarnsTouch.java @@ -0,0 +1,127 @@ +/* + * 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.cards.k; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.filter.common.FilterArtifactPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public class KarnsTouch extends CardImpl { + + private static final FilterArtifactPermanent filter = new FilterArtifactPermanent("noncreature artifact"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); + } + + public KarnsTouch(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}{U}"); + + // Target noncreature artifact becomes an artifact creature with power and toughness each equal to its converted mana cost until end of turn. + this.getSpellAbility().addEffect(new KarnsTouchEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + } + + public KarnsTouch(final KarnsTouch card) { + super(card); + } + + @Override + public KarnsTouch copy() { + return new KarnsTouch(this); + } +} + +class KarnsTouchEffect extends ContinuousEffectImpl { + + public KarnsTouchEffect() { + super(Duration.EndOfTurn, Outcome.BecomeCreature); + staticText = "Target noncreature artifact becomes an artifact creature with power and toughness each equal to its converted mana cost until end of turn"; + } + + public KarnsTouchEffect(final KarnsTouchEffect effect) { + super(effect); + } + + @Override + public KarnsTouchEffect copy() { + return new KarnsTouchEffect(this); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + Permanent artifact = game.getPermanent(this.getTargetPointer().getFirst(game, source)); + if (artifact == null) { + return false; + } + switch (layer) { + case TypeChangingEffects_4: + if (sublayer == SubLayer.NA) { + if (!artifact.isCreature()) { + artifact.addCardType(CardType.CREATURE); + } + } + break; + + case PTChangingEffects_7: + if (sublayer == SubLayer.SetPT_7b) { + int cmc = artifact.getConvertedManaCost(); + artifact.getPower().setValue(cmc); + artifact.getToughness().setValue(cmc); + } + } + return true; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public boolean hasLayer(Layer layer) { + return layer == Layer.PTChangingEffects_7 || layer == Layer.TypeChangingEffects_4; + } +} diff --git a/Mage.Sets/src/mage/cards/k/KarooMeerkat.java b/Mage.Sets/src/mage/cards/k/KarooMeerkat.java index 25007ea947..bbe5b1cab0 100644 --- a/Mage.Sets/src/mage/cards/k/KarooMeerkat.java +++ b/Mage.Sets/src/mage/cards/k/KarooMeerkat.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class KarooMeerkat extends CardImpl { public KarooMeerkat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Mongoose"); + this.subtype.add(SubType.MONGOOSE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KarplusanGiant.java b/Mage.Sets/src/mage/cards/k/KarplusanGiant.java new file mode 100644 index 0000000000..586ef2025b --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KarplusanGiant.java @@ -0,0 +1,82 @@ +/* + * 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.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SuperType; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author TheElk801 + */ +public class KarplusanGiant extends CardImpl { + + private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("untapped snow land you control"); + + static { + filter.add(Predicates.not(new TappedPredicate())); + filter.add(new SupertypePredicate(SuperType.SNOW)); + } + + public KarplusanGiant(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{R}"); + + this.subtype.add(SubType.GIANT); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Tap an untapped snow land you control: Karplusan Giant gets +1/+1 until end of turn. + this.addAbility(new SimpleActivatedAbility( + new BoostSourceEffect(1, 1, Duration.EndOfTurn), + new TapTargetCost(new TargetControlledPermanent(filter)) + )); + } + + public KarplusanGiant(final KarplusanGiant card) { + super(card); + } + + @Override + public KarplusanGiant copy() { + return new KarplusanGiant(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KarplusanMinotaur.java b/Mage.Sets/src/mage/cards/k/KarplusanMinotaur.java new file mode 100644 index 0000000000..a244cd23b1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KarplusanMinotaur.java @@ -0,0 +1,204 @@ +/* + * 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.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.costs.Cost; +import mage.abilities.costs.CostImpl; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetOpponent; + +/** + * + * @author L_J + */ +public class KarplusanMinotaur extends CardImpl { + + public KarplusanMinotaur(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Cumulative upkeep-Flip a coin. + this.addAbility(new CumulativeUpkeepAbility(new KarplusanMinotaurCost())); + + // Whenever you win a coin flip, Karplusan Minotaur deals 1 damage to target creature or player. + Ability abilityWin = new KarplusanMinotaurFlipWinTriggeredAbility(); + abilityWin.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(abilityWin); + + //TODO: Make ability properly copiable + // Whenever you lose a coin flip, Karplusan Minotaur deals 1 damage to target creature or player of an opponent's choice. + Ability abilityLose = new KarplusanMinotaurFlipLoseTriggeredAbility(); + abilityLose.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(abilityLose); + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability instanceof KarplusanMinotaurFlipLoseTriggeredAbility) { + Player controller = game.getPlayer(ability.getControllerId()); + if (controller != null) { + UUID opponentId = null; + if (game.getOpponents(controller.getId()).size() > 1) { + Target target = new TargetOpponent(true); + if (controller.chooseTarget(Outcome.Neutral, target, ability, game)) { + opponentId = target.getFirstTarget(); + } + } else { + opponentId = game.getOpponents(controller.getId()).iterator().next(); + } + if (opponentId != null) { + ability.getTargets().get(0).setTargetController(opponentId); + } + } + } + } + + public KarplusanMinotaur(final KarplusanMinotaur card) { + super(card); + } + + @Override + public KarplusanMinotaur copy() { + return new KarplusanMinotaur(this); + } +} + +class KarplusanMinotaurFlipWinTriggeredAbility extends TriggeredAbilityImpl { + + public KarplusanMinotaurFlipWinTriggeredAbility() { + super(Zone.BATTLEFIELD, new DamageTargetEffect(1), false); + } + + public KarplusanMinotaurFlipWinTriggeredAbility(final KarplusanMinotaurFlipWinTriggeredAbility ability) { + super(ability); + } + + @Override + public KarplusanMinotaurFlipWinTriggeredAbility copy() { + return new KarplusanMinotaurFlipWinTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.COIN_FLIPPED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return this.getControllerId().equals(event.getPlayerId()) && event.getFlag(); + } + + @Override + public String getRule() { + return "Whenever you win a coin flip, {this} deals 1 damage to target creature or player"; + } +} + +class KarplusanMinotaurFlipLoseTriggeredAbility extends TriggeredAbilityImpl { + + public KarplusanMinotaurFlipLoseTriggeredAbility() { + super(Zone.BATTLEFIELD, new DamageTargetEffect(1), false); + } + + public KarplusanMinotaurFlipLoseTriggeredAbility(final KarplusanMinotaurFlipLoseTriggeredAbility ability) { + super(ability); + } + + @Override + public KarplusanMinotaurFlipLoseTriggeredAbility copy() { + return new KarplusanMinotaurFlipLoseTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.COIN_FLIPPED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return this.getControllerId().equals(event.getPlayerId()) && !event.getFlag(); + } + + @Override + public String getRule() { + return "Whenever you lose a coin flip, {this} deals 1 damage to target creature or player of an opponent's choice."; + } +} + +class KarplusanMinotaurCost extends CostImpl { + + KarplusanMinotaurCost() { + this.text = "Flip a coin"; + } + + @Override + public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) { + Player controller = game.getPlayer(controllerId); + if (controller != null) { + controller.flipCoin(game); + this.paid = true; + return true; + } + return false; + } + + @Override + public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { + Player controller = game.getPlayer(controllerId); + if (controller != null) { + if (!game.getOpponents(controllerId).isEmpty()) { + return true; + } + } + return false; + } + + @Override + public KarplusanMinotaurCost copy() { + return new KarplusanMinotaurCost(); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KarplusanStrider.java b/Mage.Sets/src/mage/cards/k/KarplusanStrider.java index 20a8726cfd..479eee0318 100644 --- a/Mage.Sets/src/mage/cards/k/KarplusanStrider.java +++ b/Mage.Sets/src/mage/cards/k/KarplusanStrider.java @@ -35,6 +35,7 @@ import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class KarplusanStrider extends CardImpl { public KarplusanStrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Yeti"); + this.subtype.add(SubType.YETI); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KarplusanWolverine.java b/Mage.Sets/src/mage/cards/k/KarplusanWolverine.java index fa63b73f1a..3229b5635d 100644 --- a/Mage.Sets/src/mage/cards/k/KarplusanWolverine.java +++ b/Mage.Sets/src/mage/cards/k/KarplusanWolverine.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.target.common.TargetCreatureOrPlayer; @@ -47,8 +48,8 @@ public class KarplusanWolverine extends CardImpl { public KarplusanWolverine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); addSuperType(SuperType.SNOW); - this.subtype.add("Wolverine"); - this.subtype.add("Beast"); + this.subtype.add(SubType.WOLVERINE); + this.subtype.add(SubType.BEAST); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KarplusanYeti.java b/Mage.Sets/src/mage/cards/k/KarplusanYeti.java index 81bb5e1070..ab83fea3b4 100644 --- a/Mage.Sets/src/mage/cards/k/KarplusanYeti.java +++ b/Mage.Sets/src/mage/cards/k/KarplusanYeti.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageEachOtherEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class KarplusanYeti extends CardImpl { public KarplusanYeti(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Yeti"); + this.subtype.add(SubType.YETI); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KarrthusTyrantOfJund.java b/Mage.Sets/src/mage/cards/k/KarrthusTyrantOfJund.java index fd60e7eab5..1f678c9cae 100644 --- a/Mage.Sets/src/mage/cards/k/KarrthusTyrantOfJund.java +++ b/Mage.Sets/src/mage/cards/k/KarrthusTyrantOfJund.java @@ -66,7 +66,7 @@ public class KarrthusTyrantOfJund extends CardImpl { public KarrthusTyrantOfJund(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/k/Karstoderm.java b/Mage.Sets/src/mage/cards/k/Karstoderm.java index 5eb405a70b..f2e8456f87 100644 --- a/Mage.Sets/src/mage/cards/k/Karstoderm.java +++ b/Mage.Sets/src/mage/cards/k/Karstoderm.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterArtifactPermanent; @@ -48,7 +49,7 @@ public class Karstoderm extends CardImpl { public Karstoderm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/k/KasetoOrochiArchmage.java b/Mage.Sets/src/mage/cards/k/KasetoOrochiArchmage.java index 7d3302bc4f..9025539491 100644 --- a/Mage.Sets/src/mage/cards/k/KasetoOrochiArchmage.java +++ b/Mage.Sets/src/mage/cards/k/KasetoOrochiArchmage.java @@ -51,8 +51,8 @@ public class KasetoOrochiArchmage extends CardImpl { public KasetoOrochiArchmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Snake"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KashiTribeElite.java b/Mage.Sets/src/mage/cards/k/KashiTribeElite.java index 6feefdf792..6321947cbe 100644 --- a/Mage.Sets/src/mage/cards/k/KashiTribeElite.java +++ b/Mage.Sets/src/mage/cards/k/KashiTribeElite.java @@ -58,8 +58,8 @@ public class KashiTribeElite extends CardImpl { public KashiTribeElite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Snake"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KashiTribeReaver.java b/Mage.Sets/src/mage/cards/k/KashiTribeReaver.java index 1a5b57b553..661d24ff67 100644 --- a/Mage.Sets/src/mage/cards/k/KashiTribeReaver.java +++ b/Mage.Sets/src/mage/cards/k/KashiTribeReaver.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -49,8 +50,8 @@ public class KashiTribeReaver extends CardImpl { public KashiTribeReaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Snake"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KashiTribeWarriors.java b/Mage.Sets/src/mage/cards/k/KashiTribeWarriors.java index ca32ecf7c4..dc79757e66 100644 --- a/Mage.Sets/src/mage/cards/k/KashiTribeWarriors.java +++ b/Mage.Sets/src/mage/cards/k/KashiTribeWarriors.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class KashiTribeWarriors extends CardImpl { public KashiTribeWarriors(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Snake"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KasimirTheLoneWolf.java b/Mage.Sets/src/mage/cards/k/KasimirTheLoneWolf.java index faad3c0d0a..c7efbf86ed 100644 --- a/Mage.Sets/src/mage/cards/k/KasimirTheLoneWolf.java +++ b/Mage.Sets/src/mage/cards/k/KasimirTheLoneWolf.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -43,8 +44,8 @@ public class KasimirTheLoneWolf extends CardImpl { public KasimirTheLoneWolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KatabaticWinds.java b/Mage.Sets/src/mage/cards/k/KatabaticWinds.java index f61aeda5c3..6dbcf40b42 100644 --- a/Mage.Sets/src/mage/cards/k/KatabaticWinds.java +++ b/Mage.Sets/src/mage/cards/k/KatabaticWinds.java @@ -1,165 +1,166 @@ -/* - * 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.cards.k; - -import java.util.Optional; -import java.util.UUID; -import mage.MageObject; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; -import mage.abilities.effects.RestrictionEffect; -import mage.abilities.keyword.FlyingAbility; -import mage.abilities.keyword.PhasingAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.AbilityPredicate; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; - -/** - * - * @author jeffwadsworth - */ -public class KatabaticWinds extends CardImpl { - - public KatabaticWinds(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); - - // Phasing - this.addAbility(PhasingAbility.getInstance()); - - // Creatures with flying can't attack or block, and their activated abilities with {tap} in their costs can't be activated. - Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new KatabaticWindsRestrictionEffect()); - ability.addEffect(new KatabaticWindsRuleModifyingEffect()); - this.addAbility(ability); - - } - - public KatabaticWinds(final KatabaticWinds card) { - super(card); - } - - @Override - public KatabaticWinds copy() { - return new KatabaticWinds(this); - } -} - -class KatabaticWindsRestrictionEffect extends RestrictionEffect { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); - - static { - filter.add(new AbilityPredicate(FlyingAbility.class)); - } - - public KatabaticWindsRestrictionEffect() { - super(Duration.WhileOnBattlefield); - staticText = "Creatures with flying can't attack or block"; - } - - public KatabaticWindsRestrictionEffect(final KatabaticWindsRestrictionEffect effect) { - super(effect); - } - - @Override - public KatabaticWindsRestrictionEffect copy() { - return new KatabaticWindsRestrictionEffect(this); - } - - @Override - public boolean canAttack(Game game) { - return false; - } - - @Override - public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { - return false; - } - - @Override - public boolean applies(Permanent permanent, Ability source, Game game) { - return filter.match(permanent, source.getSourceId(), source.getControllerId(), game); - } -} - -class KatabaticWindsRuleModifyingEffect extends ContinuousRuleModifyingEffectImpl { - - public KatabaticWindsRuleModifyingEffect() { - super(Duration.WhileOnBattlefield, Outcome.Detriment); - staticText = ", and their activated abilities with {tap} in their costs can't be activated"; - } - - public KatabaticWindsRuleModifyingEffect(final KatabaticWindsRuleModifyingEffect effect) { - super(effect); - } - - @Override - public KatabaticWindsRuleModifyingEffect copy() { - return new KatabaticWindsRuleModifyingEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } - - @Override - public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.ACTIVATE_ABILITY; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - MageObject object = game.getObject(event.getSourceId()); - Optional ability = game.getAbility(event.getTargetId(), event.getSourceId()); - if (ability.isPresent() - && object != null - && object.isCreature() - && object.getAbilities().contains(FlyingAbility.getInstance()) - && game.getState().getPlayersInRange(source.getControllerId(), game).contains(event.getPlayerId())) { - if (ability.get().getCosts().stream().anyMatch((cost) -> (cost instanceof TapSourceCost))) { - return true; - } - } - return false; - } - - @Override - public String getInfoMessage(Ability source, GameEvent event, Game game) { - return "Creatures with flying can't use their activated abilities that use {tap} in their costs."; - } -} +/* + * 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.cards.k; + +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.abilities.effects.RestrictionEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.PhasingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +import java.util.Optional; +import java.util.UUID; + +/** + * + * @author jeffwadsworth + */ +public class KatabaticWinds extends CardImpl { + + public KatabaticWinds(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + + // Phasing + this.addAbility(PhasingAbility.getInstance()); + + // Creatures with flying can't attack or block, and their activated abilities with {tap} in their costs can't be activated. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new KatabaticWindsRestrictionEffect()); + ability.addEffect(new KatabaticWindsRuleModifyingEffect()); + this.addAbility(ability); + + } + + public KatabaticWinds(final KatabaticWinds card) { + super(card); + } + + @Override + public KatabaticWinds copy() { + return new KatabaticWinds(this); + } +} + +class KatabaticWindsRestrictionEffect extends RestrictionEffect { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public KatabaticWindsRestrictionEffect() { + super(Duration.WhileOnBattlefield); + staticText = "Creatures with flying can't attack or block"; + } + + public KatabaticWindsRestrictionEffect(final KatabaticWindsRestrictionEffect effect) { + super(effect); + } + + @Override + public KatabaticWindsRestrictionEffect copy() { + return new KatabaticWindsRestrictionEffect(this); + } + + @Override + public boolean canAttack(Game game) { + return false; + } + + @Override + public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { + return false; + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return filter.match(permanent, source.getSourceId(), source.getControllerId(), game); + } +} + +class KatabaticWindsRuleModifyingEffect extends ContinuousRuleModifyingEffectImpl { + + public KatabaticWindsRuleModifyingEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + staticText = ", and their activated abilities with {T} in their costs can't be activated"; + } + + public KatabaticWindsRuleModifyingEffect(final KatabaticWindsRuleModifyingEffect effect) { + super(effect); + } + + @Override + public KatabaticWindsRuleModifyingEffect copy() { + return new KatabaticWindsRuleModifyingEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.ACTIVATE_ABILITY; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + MageObject object = game.getObject(event.getSourceId()); + Optional ability = game.getAbility(event.getTargetId(), event.getSourceId()); + if (ability.isPresent() + && object != null + && object.isCreature() + && object.getAbilities().contains(FlyingAbility.getInstance()) + && game.getState().getPlayersInRange(source.getControllerId(), game).contains(event.getPlayerId())) { + if (ability.get().getCosts().stream().anyMatch((cost) -> (cost instanceof TapSourceCost))) { + return true; + } + } + return false; + } + + @Override + public String getInfoMessage(Ability source, GameEvent event, Game game) { + return "Creatures with flying can't use their activated abilities that use {tap} in their costs."; + } +} diff --git a/Mage.Sets/src/mage/cards/k/KatakiWarsWage.java b/Mage.Sets/src/mage/cards/k/KatakiWarsWage.java index e514824670..208606cd60 100644 --- a/Mage.Sets/src/mage/cards/k/KatakiWarsWage.java +++ b/Mage.Sets/src/mage/cards/k/KatakiWarsWage.java @@ -57,7 +57,7 @@ public class KatakiWarsWage extends CardImpl { public KatakiWarsWage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KathariBomber.java b/Mage.Sets/src/mage/cards/k/KathariBomber.java index 2409e7dc1e..1aa7295626 100644 --- a/Mage.Sets/src/mage/cards/k/KathariBomber.java +++ b/Mage.Sets/src/mage/cards/k/KathariBomber.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.GoblinToken; /** @@ -49,8 +50,8 @@ public class KathariBomber extends CardImpl { public KathariBomber(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}"); - this.subtype.add("Bird"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SHAMAN); diff --git a/Mage.Sets/src/mage/cards/k/KathariRemnant.java b/Mage.Sets/src/mage/cards/k/KathariRemnant.java index 1b7ff594c7..58b7fb0be1 100644 --- a/Mage.Sets/src/mage/cards/k/KathariRemnant.java +++ b/Mage.Sets/src/mage/cards/k/KathariRemnant.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,8 +49,8 @@ public class KathariRemnant extends CardImpl { public KathariRemnant (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{B}"); - this.subtype.add("Bird"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/k/KathariScreecher.java b/Mage.Sets/src/mage/cards/k/KathariScreecher.java index 0cbff31369..0f7880bbff 100644 --- a/Mage.Sets/src/mage/cards/k/KathariScreecher.java +++ b/Mage.Sets/src/mage/cards/k/KathariScreecher.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class KathariScreecher extends CardImpl { public KathariScreecher (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KavuAggressor.java b/Mage.Sets/src/mage/cards/k/KavuAggressor.java index 73544bb651..211631a262 100644 --- a/Mage.Sets/src/mage/cards/k/KavuAggressor.java +++ b/Mage.Sets/src/mage/cards/k/KavuAggressor.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -48,7 +49,7 @@ public class KavuAggressor extends CardImpl { public KavuAggressor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KavuChameleon.java b/Mage.Sets/src/mage/cards/k/KavuChameleon.java index c5bb3ea7ce..f4be5699ca 100644 --- a/Mage.Sets/src/mage/cards/k/KavuChameleon.java +++ b/Mage.Sets/src/mage/cards/k/KavuChameleon.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BecomesColorSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class KavuChameleon extends CardImpl { public KavuChameleon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KavuClimber.java b/Mage.Sets/src/mage/cards/k/KavuClimber.java index a73ac5c7c4..070a0ae1d3 100644 --- a/Mage.Sets/src/mage/cards/k/KavuClimber.java +++ b/Mage.Sets/src/mage/cards/k/KavuClimber.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class KavuClimber extends CardImpl { public KavuClimber(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KavuGlider.java b/Mage.Sets/src/mage/cards/k/KavuGlider.java index 012c3b0fb7..2f2b241cfa 100644 --- a/Mage.Sets/src/mage/cards/k/KavuGlider.java +++ b/Mage.Sets/src/mage/cards/k/KavuGlider.java @@ -46,7 +46,7 @@ public class KavuGlider extends CardImpl { public KavuGlider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KavuHowler.java b/Mage.Sets/src/mage/cards/k/KavuHowler.java index e9155e15b1..0752f3fb8b 100644 --- a/Mage.Sets/src/mage/cards/k/KavuHowler.java +++ b/Mage.Sets/src/mage/cards/k/KavuHowler.java @@ -53,7 +53,7 @@ public class KavuHowler extends CardImpl { public KavuHowler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KavuMauler.java b/Mage.Sets/src/mage/cards/k/KavuMauler.java index 450bd2f8d9..7a014a16ef 100644 --- a/Mage.Sets/src/mage/cards/k/KavuMauler.java +++ b/Mage.Sets/src/mage/cards/k/KavuMauler.java @@ -57,7 +57,7 @@ public class KavuMauler extends CardImpl { public KavuMauler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KavuMonarch.java b/Mage.Sets/src/mage/cards/k/KavuMonarch.java index a1da4db707..6d701273dc 100644 --- a/Mage.Sets/src/mage/cards/k/KavuMonarch.java +++ b/Mage.Sets/src/mage/cards/k/KavuMonarch.java @@ -62,7 +62,7 @@ public class KavuMonarch extends CardImpl { public KavuMonarch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KavuPredator.java b/Mage.Sets/src/mage/cards/k/KavuPredator.java index e9ca37dbe9..421cafa687 100644 --- a/Mage.Sets/src/mage/cards/k/KavuPredator.java +++ b/Mage.Sets/src/mage/cards/k/KavuPredator.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -53,7 +54,7 @@ public class KavuPredator extends CardImpl { public KavuPredator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KavuPrimarch.java b/Mage.Sets/src/mage/cards/k/KavuPrimarch.java index 0631ff46c5..7f19fb332a 100644 --- a/Mage.Sets/src/mage/cards/k/KavuPrimarch.java +++ b/Mage.Sets/src/mage/cards/k/KavuPrimarch.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -47,7 +48,7 @@ public class KavuPrimarch extends CardImpl { public KavuPrimarch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KavuRecluse.java b/Mage.Sets/src/mage/cards/k/KavuRecluse.java index 91d2c9406f..5a89d3e82d 100644 --- a/Mage.Sets/src/mage/cards/k/KavuRecluse.java +++ b/Mage.Sets/src/mage/cards/k/KavuRecluse.java @@ -50,7 +50,7 @@ public class KavuRecluse extends CardImpl { public KavuRecluse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KavuRunner.java b/Mage.Sets/src/mage/cards/k/KavuRunner.java index 5a6347a135..7eac03339a 100644 --- a/Mage.Sets/src/mage/cards/k/KavuRunner.java +++ b/Mage.Sets/src/mage/cards/k/KavuRunner.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.TargetController; @@ -63,7 +64,7 @@ public class KavuRunner extends CardImpl { public KavuRunner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KavuScout.java b/Mage.Sets/src/mage/cards/k/KavuScout.java index 3b7bbe7df4..f9a94eadcc 100644 --- a/Mage.Sets/src/mage/cards/k/KavuScout.java +++ b/Mage.Sets/src/mage/cards/k/KavuScout.java @@ -29,13 +29,16 @@ package mage.cards.k; import java.util.UUID; import mage.MageInt; +import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,15 +49,17 @@ import mage.constants.Zone; public class KavuScout extends CardImpl { public KavuScout(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Kavu"); - this.subtype.add("Scout"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.subtype.add(SubType.KAVU); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(0); this.toughness = new MageInt(2); // Domain - Kavu Scout gets +1/+0 for each basic land type among lands you control. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new DomainValue(), new StaticValue(0), Duration.WhileOnBattlefield))); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new DomainValue(), new StaticValue(0), Duration.WhileOnBattlefield)); + ability.setAbilityWord(AbilityWord.DOMAIN); + this.addAbility(ability); } public KavuScout(final KavuScout card) { diff --git a/Mage.Sets/src/mage/cards/k/KavuTitan.java b/Mage.Sets/src/mage/cards/k/KavuTitan.java index 165cc69c6b..897658ec23 100644 --- a/Mage.Sets/src/mage/cards/k/KavuTitan.java +++ b/Mage.Sets/src/mage/cards/k/KavuTitan.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.counters.CounterType; @@ -50,7 +51,7 @@ public class KavuTitan extends CardImpl { public KavuTitan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KayaGhostAssassin.java b/Mage.Sets/src/mage/cards/k/KayaGhostAssassin.java index 1091755a59..658713e9fe 100644 --- a/Mage.Sets/src/mage/cards/k/KayaGhostAssassin.java +++ b/Mage.Sets/src/mage/cards/k/KayaGhostAssassin.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.TargetController; @@ -64,7 +65,7 @@ public class KayaGhostAssassin extends CardImpl { public KayaGhostAssassin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{2}{W}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Kaya"); + this.subtype.add(SubType.KAYA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); diff --git a/Mage.Sets/src/mage/cards/k/Kaysa.java b/Mage.Sets/src/mage/cards/k/Kaysa.java index 98e17a1fc9..3fdcbec908 100644 --- a/Mage.Sets/src/mage/cards/k/Kaysa.java +++ b/Mage.Sets/src/mage/cards/k/Kaysa.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -56,8 +57,8 @@ public class Kaysa extends CardImpl { public Kaysa(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KazanduBlademaster.java b/Mage.Sets/src/mage/cards/k/KazanduBlademaster.java index 17f857453e..db12c56fe2 100644 --- a/Mage.Sets/src/mage/cards/k/KazanduBlademaster.java +++ b/Mage.Sets/src/mage/cards/k/KazanduBlademaster.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -46,9 +47,9 @@ public class KazanduBlademaster extends CardImpl { public KazanduBlademaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ALLY); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KazanduTuskcaller.java b/Mage.Sets/src/mage/cards/k/KazanduTuskcaller.java index 022256268c..410129fa0e 100644 --- a/Mage.Sets/src/mage/cards/k/KazanduTuskcaller.java +++ b/Mage.Sets/src/mage/cards/k/KazanduTuskcaller.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.LevelerCardBuilder; import mage.cards.CardSetInfo; import mage.cards.LevelerCard; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.ElephantToken; @@ -51,8 +52,8 @@ public class KazanduTuskcaller extends LevelerCard { public KazanduTuskcaller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.color.setGreen(true); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KazuulTyrantOfTheCliffs.java b/Mage.Sets/src/mage/cards/k/KazuulTyrantOfTheCliffs.java index d64be2b6ea..45c499678c 100644 --- a/Mage.Sets/src/mage/cards/k/KazuulTyrantOfTheCliffs.java +++ b/Mage.Sets/src/mage/cards/k/KazuulTyrantOfTheCliffs.java @@ -38,6 +38,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -58,8 +59,8 @@ public class KazuulTyrantOfTheCliffs extends CardImpl { public KazuulTyrantOfTheCliffs(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KazuulWarlord.java b/Mage.Sets/src/mage/cards/k/KazuulWarlord.java index 19d4ae6a3a..f123a451ca 100644 --- a/Mage.Sets/src/mage/cards/k/KazuulWarlord.java +++ b/Mage.Sets/src/mage/cards/k/KazuulWarlord.java @@ -56,9 +56,9 @@ public class KazuulWarlord extends CardImpl { public KazuulWarlord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Warrior"); - this.subtype.add("Ally"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KazuulsTollCollector.java b/Mage.Sets/src/mage/cards/k/KazuulsTollCollector.java index 4be7819518..7418150791 100644 --- a/Mage.Sets/src/mage/cards/k/KazuulsTollCollector.java +++ b/Mage.Sets/src/mage/cards/k/KazuulsTollCollector.java @@ -59,8 +59,8 @@ public class KazuulsTollCollector extends CardImpl { public KazuulsTollCollector(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KederektCreeper.java b/Mage.Sets/src/mage/cards/k/KederektCreeper.java index d3d2e0a307..e806e4fafb 100644 --- a/Mage.Sets/src/mage/cards/k/KederektCreeper.java +++ b/Mage.Sets/src/mage/cards/k/KederektCreeper.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class KederektCreeper extends CardImpl { public KederektCreeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}{R}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KederektLeviathan.java b/Mage.Sets/src/mage/cards/k/KederektLeviathan.java index c2e02f235e..5362b8bc3e 100644 --- a/Mage.Sets/src/mage/cards/k/KederektLeviathan.java +++ b/Mage.Sets/src/mage/cards/k/KederektLeviathan.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterNonlandPermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -52,7 +53,7 @@ public class KederektLeviathan extends CardImpl { public KederektLeviathan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{U}{U}"); - this.subtype.add("Leviathan"); + this.subtype.add(SubType.LEVIATHAN); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KederektParasite.java b/Mage.Sets/src/mage/cards/k/KederektParasite.java index b177954b63..5033645889 100644 --- a/Mage.Sets/src/mage/cards/k/KederektParasite.java +++ b/Mage.Sets/src/mage/cards/k/KederektParasite.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -49,7 +50,7 @@ public class KederektParasite extends CardImpl { public KederektParasite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KeenEyedArchers.java b/Mage.Sets/src/mage/cards/k/KeenEyedArchers.java index 766053a717..d2f45d48d3 100644 --- a/Mage.Sets/src/mage/cards/k/KeenEyedArchers.java +++ b/Mage.Sets/src/mage/cards/k/KeenEyedArchers.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class KeenEyedArchers extends CardImpl { public KeenEyedArchers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Elf"); - this.subtype.add("Archer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KeenSense.java b/Mage.Sets/src/mage/cards/k/KeenSense.java index 2f979b61c1..e06883aa0f 100644 --- a/Mage.Sets/src/mage/cards/k/KeenSense.java +++ b/Mage.Sets/src/mage/cards/k/KeenSense.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.target.TargetPermanent; @@ -49,7 +50,7 @@ public class KeenSense extends CardImpl { public KeenSense(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/k/KeeneyeAven.java b/Mage.Sets/src/mage/cards/k/KeeneyeAven.java index 1d56789c60..9a3d271ff7 100644 --- a/Mage.Sets/src/mage/cards/k/KeeneyeAven.java +++ b/Mage.Sets/src/mage/cards/k/KeeneyeAven.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class KeeneyeAven extends CardImpl { public KeeneyeAven(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KeeningApparition.java b/Mage.Sets/src/mage/cards/k/KeeningApparition.java index 5304b5a749..a4b339880b 100644 --- a/Mage.Sets/src/mage/cards/k/KeeningApparition.java +++ b/Mage.Sets/src/mage/cards/k/KeeningApparition.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetEnchantmentPermanent; @@ -46,7 +47,7 @@ public class KeeningApparition extends CardImpl { public KeeningApparition(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KeeningBanshee.java b/Mage.Sets/src/mage/cards/k/KeeningBanshee.java index ef92f6864f..ad0f118bd6 100644 --- a/Mage.Sets/src/mage/cards/k/KeeningBanshee.java +++ b/Mage.Sets/src/mage/cards/k/KeeningBanshee.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class KeeningBanshee extends CardImpl { public KeeningBanshee(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KeeperOfKeys.java b/Mage.Sets/src/mage/cards/k/KeeperOfKeys.java index 44ae6b8110..fb12d97005 100644 --- a/Mage.Sets/src/mage/cards/k/KeeperOfKeys.java +++ b/Mage.Sets/src/mage/cards/k/KeeperOfKeys.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -52,9 +53,9 @@ public class KeeperOfKeys extends CardImpl { public KeeperOfKeys(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KeeperOfKookus.java b/Mage.Sets/src/mage/cards/k/KeeperOfKookus.java index b0409c6f43..a393e09802 100644 --- a/Mage.Sets/src/mage/cards/k/KeeperOfKookus.java +++ b/Mage.Sets/src/mage/cards/k/KeeperOfKookus.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class KeeperOfKookus extends CardImpl { public KeeperOfKookus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KeeperOfProgenitus.java b/Mage.Sets/src/mage/cards/k/KeeperOfProgenitus.java index ed5c85aca3..4fc6232acf 100644 --- a/Mage.Sets/src/mage/cards/k/KeeperOfProgenitus.java +++ b/Mage.Sets/src/mage/cards/k/KeeperOfProgenitus.java @@ -58,8 +58,8 @@ public class KeeperOfProgenitus extends CardImpl { public KeeperOfProgenitus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KeeperOfTheLens.java b/Mage.Sets/src/mage/cards/k/KeeperOfTheLens.java index 3fecb04471..fb28be85dd 100644 --- a/Mage.Sets/src/mage/cards/k/KeeperOfTheLens.java +++ b/Mage.Sets/src/mage/cards/k/KeeperOfTheLens.java @@ -39,6 +39,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class KeeperOfTheLens extends CardImpl { public KeeperOfTheLens(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KeeperOfTheNineGales.java b/Mage.Sets/src/mage/cards/k/KeeperOfTheNineGales.java index 26a702ef21..0aef787491 100644 --- a/Mage.Sets/src/mage/cards/k/KeeperOfTheNineGales.java +++ b/Mage.Sets/src/mage/cards/k/KeeperOfTheNineGales.java @@ -62,8 +62,8 @@ public class KeeperOfTheNineGales extends CardImpl { public KeeperOfTheNineGales(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KeeperOfTresserhorn.java b/Mage.Sets/src/mage/cards/k/KeeperOfTresserhorn.java index 8af58bc6c4..6d860db5d1 100644 --- a/Mage.Sets/src/mage/cards/k/KeeperOfTresserhorn.java +++ b/Mage.Sets/src/mage/cards/k/KeeperOfTresserhorn.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.AssignNoCombatDamageSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -47,7 +48,7 @@ public class KeeperOfTresserhorn extends CardImpl { public KeeperOfTresserhorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/k/KeepersOfTheFaith.java b/Mage.Sets/src/mage/cards/k/KeepersOfTheFaith.java index 112094488e..ee8bf18787 100644 --- a/Mage.Sets/src/mage/cards/k/KeepersOfTheFaith.java +++ b/Mage.Sets/src/mage/cards/k/KeepersOfTheFaith.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class KeepersOfTheFaith extends CardImpl { public KeepersOfTheFaith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KeepsakeGorgon.java b/Mage.Sets/src/mage/cards/k/KeepsakeGorgon.java index c970cc04e2..f3274bcf1e 100644 --- a/Mage.Sets/src/mage/cards/k/KeepsakeGorgon.java +++ b/Mage.Sets/src/mage/cards/k/KeepsakeGorgon.java @@ -60,7 +60,7 @@ public class KeepsakeGorgon extends CardImpl { public KeepsakeGorgon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Gorgon"); + this.subtype.add(SubType.GORGON); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KefnetTheMindful.java b/Mage.Sets/src/mage/cards/k/KefnetTheMindful.java index 619f592b0b..c8ad595ec9 100644 --- a/Mage.Sets/src/mage/cards/k/KefnetTheMindful.java +++ b/Mage.Sets/src/mage/cards/k/KefnetTheMindful.java @@ -1,164 +1,165 @@ -/* - * 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.cards.k; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.RestrictionEffect; -import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect; -import mage.abilities.keyword.FlyingAbility; -import mage.abilities.keyword.IndestructibleAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.SuperType; -import mage.constants.Zone; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; - -/** - * - * @author jeffwadsworth - */ -public class KefnetTheMindful extends CardImpl { - - public KefnetTheMindful(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - - this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); - this.power = new MageInt(5); - this.toughness = new MageInt(5); - - // Flying - this.addAbility(FlyingAbility.getInstance()); - - // Indestructible - this.addAbility(IndestructibleAbility.getInstance()); - - // Kefnet the Mindful can't attack or block unless you have seven or more cards in your hand. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KefnetTheMindfulRestrictionEffect())); - - // {3}{U}: Draw a card, then you may return a land you control to its owner's hand. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new KefnetTheMindfulEffect(), new ManaCostsImpl("{3}{U}")); - this.addAbility(ability); - - } - - public KefnetTheMindful(final KefnetTheMindful card) { - super(card); - } - - @Override - public KefnetTheMindful copy() { - return new KefnetTheMindful(this); - } -} - -class KefnetTheMindfulRestrictionEffect extends RestrictionEffect { - - public KefnetTheMindfulRestrictionEffect() { - super(Duration.WhileOnBattlefield); - staticText = "{this} can't attack or block unless you have seven or more cards in your hand"; - } - - public KefnetTheMindfulRestrictionEffect(final KefnetTheMindfulRestrictionEffect effect) { - super(effect); - } - - @Override - public KefnetTheMindfulRestrictionEffect copy() { - return new KefnetTheMindfulRestrictionEffect(this); - } - - @Override - public boolean canAttack(Game game) { - return false; - } - - @Override - public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { - return false; - } - - @Override - public boolean applies(Permanent permanent, Ability source, Game game) { - if (permanent.getId().equals(source.getSourceId())) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - return (controller.getHand().size() < 7); - } - return true; - } // do not apply to other creatures. - return false; - } -} - -class KefnetTheMindfulEffect extends OneShotEffect { - - KefnetTheMindfulEffect() { - super(Outcome.Benefit); - staticText = "Draw a card, then you may return a land you control to its owner's hand"; - } - - KefnetTheMindfulEffect(final KefnetTheMindfulEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - FilterControlledPermanent filterControlledLand = new FilterControlledPermanent("land you control"); - filterControlledLand.add(new CardTypePredicate(CardType.LAND)); - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - controller.drawCards(1, game); - if (controller.chooseUse(Outcome.AIDontUseIt, "Do you want to return a land you control to its owner's hand?", null, "Yes", "No", source, game)) { - Effect effect = new ReturnToHandChosenControlledPermanentEffect(filterControlledLand); - effect.apply(game, source); - } - return true; - } - return false; - } - - @Override - public KefnetTheMindfulEffect copy() { - return new KefnetTheMindfulEffect(this); - } -} +/* + * 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.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.RestrictionEffect; +import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.IndestructibleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author jeffwadsworth + */ +public class KefnetTheMindful extends CardImpl { + + public KefnetTheMindful(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.GOD); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Indestructible + this.addAbility(IndestructibleAbility.getInstance()); + + // Kefnet the Mindful can't attack or block unless you have seven or more cards in your hand. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KefnetTheMindfulRestrictionEffect())); + + // {3}{U}: Draw a card, then you may return a land you control to its owner's hand. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new KefnetTheMindfulEffect(), new ManaCostsImpl("{3}{U}")); + this.addAbility(ability); + + } + + public KefnetTheMindful(final KefnetTheMindful card) { + super(card); + } + + @Override + public KefnetTheMindful copy() { + return new KefnetTheMindful(this); + } +} + +class KefnetTheMindfulRestrictionEffect extends RestrictionEffect { + + public KefnetTheMindfulRestrictionEffect() { + super(Duration.WhileOnBattlefield); + staticText = "{this} can't attack or block unless you have seven or more cards in your hand"; + } + + public KefnetTheMindfulRestrictionEffect(final KefnetTheMindfulRestrictionEffect effect) { + super(effect); + } + + @Override + public KefnetTheMindfulRestrictionEffect copy() { + return new KefnetTheMindfulRestrictionEffect(this); + } + + @Override + public boolean canAttack(Game game) { + return false; + } + + @Override + public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { + return false; + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + if (permanent.getId().equals(source.getSourceId())) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + return (controller.getHand().size() < 7); + } + return true; + } // do not apply to other creatures. + return false; + } +} + +class KefnetTheMindfulEffect extends OneShotEffect { + + KefnetTheMindfulEffect() { + super(Outcome.Benefit); + staticText = "Draw a card, then you may return a land you control to its owner's hand"; + } + + KefnetTheMindfulEffect(final KefnetTheMindfulEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + FilterControlledPermanent filterControlledLand = new FilterControlledPermanent("land you control"); + filterControlledLand.add(new CardTypePredicate(CardType.LAND)); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + controller.drawCards(1, game); + if (controller.chooseUse(Outcome.AIDontUseIt, "Do you want to return a land you control to its owner's hand?", null, "Yes", "No", source, game)) { + Effect effect = new ReturnToHandChosenControlledPermanentEffect(filterControlledLand); + effect.apply(game, source); + } + return true; + } + return false; + } + + @Override + public KefnetTheMindfulEffect copy() { + return new KefnetTheMindfulEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KeiTakahashi.java b/Mage.Sets/src/mage/cards/k/KeiTakahashi.java index 1eb8c455a8..42393196ff 100644 --- a/Mage.Sets/src/mage/cards/k/KeiTakahashi.java +++ b/Mage.Sets/src/mage/cards/k/KeiTakahashi.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class KeiTakahashi extends CardImpl { public KeiTakahashi(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KeigaTheTideStar.java b/Mage.Sets/src/mage/cards/k/KeigaTheTideStar.java index 042cace243..a9c4203677 100644 --- a/Mage.Sets/src/mage/cards/k/KeigaTheTideStar.java +++ b/Mage.Sets/src/mage/cards/k/KeigaTheTideStar.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class KeigaTheTideStar extends CardImpl { public KeigaTheTideStar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DRAGON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KeldonArsonist.java b/Mage.Sets/src/mage/cards/k/KeldonArsonist.java index 0f1870f31a..4015d76390 100644 --- a/Mage.Sets/src/mage/cards/k/KeldonArsonist.java +++ b/Mage.Sets/src/mage/cards/k/KeldonArsonist.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.target.common.TargetControlledPermanent; @@ -50,8 +51,8 @@ public class KeldonArsonist extends CardImpl { public KeldonArsonist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KeldonBerserker.java b/Mage.Sets/src/mage/cards/k/KeldonBerserker.java new file mode 100644 index 0000000000..0760a23147 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KeldonBerserker.java @@ -0,0 +1,83 @@ +/* + * 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.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.condition.InvertCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.TappedPredicate; + +/** + * + * @author TheElk801 + */ +public class KeldonBerserker extends CardImpl { + + private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("untapped lands"); + + static { + filter.add(Predicates.not(new TappedPredicate())); + } + + public KeldonBerserker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.BERSERKER); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Whenever Keldon Berserker attacks, if you control no untapped lands, it gets +3/+0 until end of turn. + this.addAbility(new ConditionalTriggeredAbility( + new AttacksTriggeredAbility(new BoostSourceEffect(3, 0, Duration.EndOfTurn), false), + new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)), + "Whenever {this} attacks, if you control no untapped lands, it gets +3/+0 until end of turn." + )); + } + + public KeldonBerserker(final KeldonBerserker card) { + super(card); + } + + @Override + public KeldonBerserker copy() { + return new KeldonBerserker(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KeldonChampion.java b/Mage.Sets/src/mage/cards/k/KeldonChampion.java index 2d05001b63..e91da00a2a 100644 --- a/Mage.Sets/src/mage/cards/k/KeldonChampion.java +++ b/Mage.Sets/src/mage/cards/k/KeldonChampion.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -47,8 +48,8 @@ public class KeldonChampion extends CardImpl { public KeldonChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Barbarian"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BARBARIAN); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KeldonFirebombers.java b/Mage.Sets/src/mage/cards/k/KeldonFirebombers.java index d05001205a..5e2eda6c09 100644 --- a/Mage.Sets/src/mage/cards/k/KeldonFirebombers.java +++ b/Mage.Sets/src/mage/cards/k/KeldonFirebombers.java @@ -1,122 +1,123 @@ -/* - * 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.cards.k; - -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.OneShotEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.filter.common.FilterLandPermanent; -import mage.filter.predicate.permanent.ControllerIdPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.Target; -import mage.target.common.TargetLandPermanent; - -/** - * - * @author jeffwadsworth - */ -public class KeldonFirebombers extends CardImpl { - - public KeldonFirebombers(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); - - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // When Keldon Firebombers enters the battlefield, each player sacrifices all lands he or she controls except for three. - this.addAbility(new EntersBattlefieldTriggeredAbility(new KeldonFirebombersEffect())); - - } - - public KeldonFirebombers(final KeldonFirebombers card) { - super(card); - } - - @Override - public KeldonFirebombers copy() { - return new KeldonFirebombers(this); - } -} - -class KeldonFirebombersEffect extends OneShotEffect { - - private static final FilterLandPermanent filter = new FilterLandPermanent(); - - public KeldonFirebombersEffect() { - super(Outcome.AIDontUseIt); - this.staticText = "each player sacrifices all lands he or she controls except for three"; - } - - public KeldonFirebombersEffect(final KeldonFirebombersEffect effect) { - super(effect); - } - - @Override - public KeldonFirebombersEffect copy() { - return new KeldonFirebombersEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - List landsToSacrifice = new ArrayList<>(); - for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { - Player player = game.getPlayer(playerId); - if (player != null) { - int amount = game.getBattlefield().getAllActivePermanents(filter, playerId, game).size() - 3; - if (amount > 0) { - FilterLandPermanent playerFilter = filter.copy(); - playerFilter.add(new ControllerIdPredicate(playerId)); - Target target = new TargetLandPermanent(amount, amount, playerFilter, true); - player.choose(outcome.Sacrifice, target, source.getSourceId(), game); - for (UUID landId : target.getTargets()) { - Permanent land = game.getPermanent(landId); - if (land != null) { - landsToSacrifice.add(land); - } - } - } - } - } - for (Permanent land : landsToSacrifice) { - land.sacrifice(source.getSourceId(), game); - } - return true; - } -} +/* + * 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.cards.k; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author jeffwadsworth + */ +public class KeldonFirebombers extends CardImpl { + + public KeldonFirebombers(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Keldon Firebombers enters the battlefield, each player sacrifices all lands he or she controls except for three. + this.addAbility(new EntersBattlefieldTriggeredAbility(new KeldonFirebombersEffect())); + + } + + public KeldonFirebombers(final KeldonFirebombers card) { + super(card); + } + + @Override + public KeldonFirebombers copy() { + return new KeldonFirebombers(this); + } +} + +class KeldonFirebombersEffect extends OneShotEffect { + + private static final FilterLandPermanent filter = new FilterLandPermanent(); + + public KeldonFirebombersEffect() { + super(Outcome.AIDontUseIt); + this.staticText = "each player sacrifices all lands he or she controls except for three"; + } + + public KeldonFirebombersEffect(final KeldonFirebombersEffect effect) { + super(effect); + } + + @Override + public KeldonFirebombersEffect copy() { + return new KeldonFirebombersEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + List landsToSacrifice = new ArrayList<>(); + for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + int amount = game.getBattlefield().getAllActivePermanents(filter, playerId, game).size() - 3; + if (amount > 0) { + FilterLandPermanent playerFilter = filter.copy(); + playerFilter.add(new ControllerIdPredicate(playerId)); + Target target = new TargetLandPermanent(amount, amount, playerFilter, true); + player.choose(outcome.Sacrifice, target, source.getSourceId(), game); + for (UUID landId : target.getTargets()) { + Permanent land = game.getPermanent(landId); + if (land != null) { + landsToSacrifice.add(land); + } + } + } + } + } + for (Permanent land : landsToSacrifice) { + land.sacrifice(source.getSourceId(), game); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/k/KeldonHalberdier.java b/Mage.Sets/src/mage/cards/k/KeldonHalberdier.java index 8290be40c6..a430221b11 100644 --- a/Mage.Sets/src/mage/cards/k/KeldonHalberdier.java +++ b/Mage.Sets/src/mage/cards/k/KeldonHalberdier.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class KeldonHalberdier extends CardImpl { public KeldonHalberdier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KeldonMantle.java b/Mage.Sets/src/mage/cards/k/KeldonMantle.java index dbd84886d2..9abc2abc76 100644 --- a/Mage.Sets/src/mage/cards/k/KeldonMantle.java +++ b/Mage.Sets/src/mage/cards/k/KeldonMantle.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class KeldonMantle extends CardImpl { public KeldonMantle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/k/KeldonMarauders.java b/Mage.Sets/src/mage/cards/k/KeldonMarauders.java index d68344b534..a36293ed4c 100644 --- a/Mage.Sets/src/mage/cards/k/KeldonMarauders.java +++ b/Mage.Sets/src/mage/cards/k/KeldonMarauders.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.VanishingUpkeepAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.TargetPlayer; @@ -50,8 +51,8 @@ public class KeldonMarauders extends CardImpl { public KeldonMarauders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KeldonVandals.java b/Mage.Sets/src/mage/cards/k/KeldonVandals.java index 7721a4e9ee..50a67bbcf6 100644 --- a/Mage.Sets/src/mage/cards/k/KeldonVandals.java +++ b/Mage.Sets/src/mage/cards/k/KeldonVandals.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.TargetPermanent; @@ -54,8 +55,8 @@ public class KeldonVandals extends CardImpl { public KeldonVandals(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KeldonWarlord.java b/Mage.Sets/src/mage/cards/k/KeldonWarlord.java index b7b143dd0b..6bc21f8263 100644 --- a/Mage.Sets/src/mage/cards/k/KeldonWarlord.java +++ b/Mage.Sets/src/mage/cards/k/KeldonWarlord.java @@ -56,8 +56,8 @@ public class KeldonWarlord extends CardImpl { public KeldonWarlord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Barbarian"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BARBARIAN); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/k/KelinoreBat.java b/Mage.Sets/src/mage/cards/k/KelinoreBat.java index 67cb860331..65d5675f64 100644 --- a/Mage.Sets/src/mage/cards/k/KelinoreBat.java +++ b/Mage.Sets/src/mage/cards/k/KelinoreBat.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class KelinoreBat extends CardImpl { public KelinoreBat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Bat"); + this.subtype.add(SubType.BAT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KelsinkoRanger.java b/Mage.Sets/src/mage/cards/k/KelsinkoRanger.java new file mode 100644 index 0000000000..3ba4fd3c08 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KelsinkoRanger.java @@ -0,0 +1,85 @@ +/* + * 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.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class KelsinkoRanger extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("green creature"); + + static { + filter.add(new ColorPredicate(ObjectColor.GREEN)); + } + + public KelsinkoRanger(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.HUMAN); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}{W}: Target green creature gains first strike until end of turn. + Ability ability = new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), + new ManaCostsImpl("{1}{W}") + ); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public KelsinkoRanger(final KelsinkoRanger card) { + super(card); + } + + @Override + public KelsinkoRanger copy() { + return new KelsinkoRanger(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KembaKhaRegent.java b/Mage.Sets/src/mage/cards/k/KembaKhaRegent.java index 75d8173b49..0bc45d42e1 100644 --- a/Mage.Sets/src/mage/cards/k/KembaKhaRegent.java +++ b/Mage.Sets/src/mage/cards/k/KembaKhaRegent.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.game.permanent.token.CatToken; @@ -48,8 +49,8 @@ public class KembaKhaRegent extends CardImpl { public KembaKhaRegent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Cat"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KembasLegion.java b/Mage.Sets/src/mage/cards/k/KembasLegion.java index 4af154c322..973326de89 100644 --- a/Mage.Sets/src/mage/cards/k/KembasLegion.java +++ b/Mage.Sets/src/mage/cards/k/KembasLegion.java @@ -49,8 +49,8 @@ public class KembasLegion extends CardImpl { public KembasLegion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/k/KembasSkyguard.java b/Mage.Sets/src/mage/cards/k/KembasSkyguard.java index e2843956ab..8ba36f0f70 100644 --- a/Mage.Sets/src/mage/cards/k/KembasSkyguard.java +++ b/Mage.Sets/src/mage/cards/k/KembasSkyguard.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class KembasSkyguard extends CardImpl { public KembasSkyguard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Knight"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KemuriOnna.java b/Mage.Sets/src/mage/cards/k/KemuriOnna.java index 0bf26a0346..18f3435b47 100644 --- a/Mage.Sets/src/mage/cards/k/KemuriOnna.java +++ b/Mage.Sets/src/mage/cards/k/KemuriOnna.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.TargetPlayer; @@ -48,7 +49,7 @@ public class KemuriOnna extends CardImpl { public KemuriOnna(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KentaroTheSmilingCat.java b/Mage.Sets/src/mage/cards/k/KentaroTheSmilingCat.java index 2841336baa..ed84de2ef0 100644 --- a/Mage.Sets/src/mage/cards/k/KentaroTheSmilingCat.java +++ b/Mage.Sets/src/mage/cards/k/KentaroTheSmilingCat.java @@ -54,8 +54,8 @@ public class KentaroTheSmilingCat extends CardImpl { public KentaroTheSmilingCat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KeranosGodOfStorms.java b/Mage.Sets/src/mage/cards/k/KeranosGodOfStorms.java index 343a5c5b3e..beb304ebd9 100644 --- a/Mage.Sets/src/mage/cards/k/KeranosGodOfStorms.java +++ b/Mage.Sets/src/mage/cards/k/KeranosGodOfStorms.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.SuperType; import mage.constants.Zone; @@ -64,7 +65,7 @@ public class KeranosGodOfStorms extends CardImpl { public KeranosGodOfStorms(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{U}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KessDissidentMage.java b/Mage.Sets/src/mage/cards/k/KessDissidentMage.java index 936b0be89e..52150c9419 100644 --- a/Mage.Sets/src/mage/cards/k/KessDissidentMage.java +++ b/Mage.Sets/src/mage/cards/k/KessDissidentMage.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -72,8 +73,8 @@ public class KessDissidentMage extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KessigCagebreakers.java b/Mage.Sets/src/mage/cards/k/KessigCagebreakers.java index 4eaa4ff073..9dbff9d82a 100644 --- a/Mage.Sets/src/mage/cards/k/KessigCagebreakers.java +++ b/Mage.Sets/src/mage/cards/k/KessigCagebreakers.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterCreatureCard; import mage.game.Game; @@ -49,8 +50,8 @@ public class KessigCagebreakers extends CardImpl { public KessigCagebreakers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KessigDireSwine.java b/Mage.Sets/src/mage/cards/k/KessigDireSwine.java index c742afb2b1..12ef7f8248 100644 --- a/Mage.Sets/src/mage/cards/k/KessigDireSwine.java +++ b/Mage.Sets/src/mage/cards/k/KessigDireSwine.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class KessigDireSwine extends CardImpl { public KessigDireSwine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Boar"); - this.subtype.add("Horror"); + this.subtype.add(SubType.BOAR); + this.subtype.add(SubType.HORROR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/k/KessigForgemaster.java b/Mage.Sets/src/mage/cards/k/KessigForgemaster.java index 861ed8fd8b..9a42a06a60 100644 --- a/Mage.Sets/src/mage/cards/k/KessigForgemaster.java +++ b/Mage.Sets/src/mage/cards/k/KessigForgemaster.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.f.FlameheartWerewolf; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.StaticFilters; @@ -52,9 +53,9 @@ public class KessigForgemaster extends CardImpl { public KessigForgemaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KessigMalcontents.java b/Mage.Sets/src/mage/cards/k/KessigMalcontents.java index 2e7aa5c82e..b740242d69 100644 --- a/Mage.Sets/src/mage/cards/k/KessigMalcontents.java +++ b/Mage.Sets/src/mage/cards/k/KessigMalcontents.java @@ -54,8 +54,8 @@ public class KessigMalcontents extends CardImpl { public KessigMalcontents(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KessigProwler.java b/Mage.Sets/src/mage/cards/k/KessigProwler.java index 72baf118be..5d7332a23d 100644 --- a/Mage.Sets/src/mage/cards/k/KessigProwler.java +++ b/Mage.Sets/src/mage/cards/k/KessigProwler.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.s.SinuousPredator; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class KessigProwler extends CardImpl { public KessigProwler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Werewolf"); - this.subtype.add("Horror"); + this.subtype.add(SubType.WEREWOLF); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KessigRecluse.java b/Mage.Sets/src/mage/cards/k/KessigRecluse.java index aaea76ead6..19caceca1e 100644 --- a/Mage.Sets/src/mage/cards/k/KessigRecluse.java +++ b/Mage.Sets/src/mage/cards/k/KessigRecluse.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class KessigRecluse extends CardImpl { public KessigRecluse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KessigWolf.java b/Mage.Sets/src/mage/cards/k/KessigWolf.java index 7e83e2f47f..17ccc414f7 100644 --- a/Mage.Sets/src/mage/cards/k/KessigWolf.java +++ b/Mage.Sets/src/mage/cards/k/KessigWolf.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class KessigWolf extends CardImpl { public KessigWolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KeyToTheCity.java b/Mage.Sets/src/mage/cards/k/KeyToTheCity.java index 9fd4a05e69..ffeb698cd4 100644 --- a/Mage.Sets/src/mage/cards/k/KeyToTheCity.java +++ b/Mage.Sets/src/mage/cards/k/KeyToTheCity.java @@ -1,108 +1,108 @@ -/* - * 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.cards.k; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.DiscardCardCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.common.DoIfCostPaid; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author emerald000 - */ -public class KeyToTheCity extends CardImpl { - - public KeyToTheCity(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - - // {T}, Discard a card: Up to one target creature can't be blocked this turn. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(), new TapSourceCost()); - ability.addCost(new DiscardCardCost()); - ability.addTarget(new TargetCreaturePermanent(0, 1)); - this.addAbility(ability); - - // Whenever Key to the City becomes untapped, you may pay {2}. If you do, draw a card. - this.addAbility(new KeyToTheCityTriggeredAbility()); - } - - public KeyToTheCity(final KeyToTheCity card) { - super(card); - } - - @Override - public KeyToTheCity copy() { - return new KeyToTheCity(this); - } -} - -class KeyToTheCityTriggeredAbility extends TriggeredAbilityImpl{ - - KeyToTheCityTriggeredAbility() { - super(Zone.BATTLEFIELD, new DoIfCostPaid(new DrawCardSourceControllerEffect(1), new GenericManaCost(2))); - } - - KeyToTheCityTriggeredAbility(final KeyToTheCityTriggeredAbility ability) { - super(ability); - } - - @Override - public KeyToTheCityTriggeredAbility copy() { - return new KeyToTheCityTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.UNTAPPED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - return event.getTargetId().equals(this.getSourceId()); - } - - @Override - public String getRule() { - return "Whenever Key to the City becomes untapped, you may pay {2}. If you do, draw a card."; - } - -} +/* + * 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.cards.k; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author emerald000 + */ +public class KeyToTheCity extends CardImpl { + + public KeyToTheCity(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + + // {T}, Discard a card: Up to one target creature can't be blocked this turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(), new TapSourceCost()); + ability.addCost(new DiscardCardCost()); + ability.addTarget(new TargetCreaturePermanent(0, 1)); + this.addAbility(ability); + + // Whenever Key to the City becomes untapped, you may pay {2}. If you do, draw a card. + this.addAbility(new KeyToTheCityTriggeredAbility()); + } + + public KeyToTheCity(final KeyToTheCity card) { + super(card); + } + + @Override + public KeyToTheCity copy() { + return new KeyToTheCity(this); + } +} + +class KeyToTheCityTriggeredAbility extends TriggeredAbilityImpl{ + + KeyToTheCityTriggeredAbility() { + super(Zone.BATTLEFIELD, new DoIfCostPaid(new DrawCardSourceControllerEffect(1), new GenericManaCost(2))); + } + + KeyToTheCityTriggeredAbility(final KeyToTheCityTriggeredAbility ability) { + super(ability); + } + + @Override + public KeyToTheCityTriggeredAbility copy() { + return new KeyToTheCityTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.UNTAPPED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return event.getTargetId().equals(this.getSourceId()); + } + + @Override + public String getRule() { + return "Whenever Key to the City becomes untapped, you may pay {2}. If you do, draw a card."; + } + +} diff --git a/Mage.Sets/src/mage/cards/k/KeymasterRogue.java b/Mage.Sets/src/mage/cards/k/KeymasterRogue.java index 1cde914e47..270d63f99f 100644 --- a/Mage.Sets/src/mage/cards/k/KeymasterRogue.java +++ b/Mage.Sets/src/mage/cards/k/KeymasterRogue.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; /** @@ -45,8 +46,8 @@ public class KeymasterRogue extends CardImpl { public KeymasterRogue(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/Kezzerdrix.java b/Mage.Sets/src/mage/cards/k/Kezzerdrix.java index b5ad62e0ac..6e4f61b433 100644 --- a/Mage.Sets/src/mage/cards/k/Kezzerdrix.java +++ b/Mage.Sets/src/mage/cards/k/Kezzerdrix.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class Kezzerdrix extends CardImpl { public Kezzerdrix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Rabbit"); - this.subtype.add("Beast"); + this.subtype.add(SubType.RABBIT); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KhabalGhoul.java b/Mage.Sets/src/mage/cards/k/KhabalGhoul.java index 887f21dbc2..75594a5596 100644 --- a/Mage.Sets/src/mage/cards/k/KhabalGhoul.java +++ b/Mage.Sets/src/mage/cards/k/KhabalGhoul.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.counters.CounterType; import mage.watchers.common.CreaturesDiedWatcher; @@ -47,7 +48,7 @@ public class KhabalGhoul extends CardImpl { public KhabalGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KhalniHydra.java b/Mage.Sets/src/mage/cards/k/KhalniHydra.java index 0694812be2..91edc5d7e5 100644 --- a/Mage.Sets/src/mage/cards/k/KhalniHydra.java +++ b/Mage.Sets/src/mage/cards/k/KhalniHydra.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -60,7 +61,7 @@ public class KhalniHydra extends CardImpl { public KhalniHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}{G}{G}{G}{G}{G}{G}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/k/KhenraCharioteer.java b/Mage.Sets/src/mage/cards/k/KhenraCharioteer.java index 4241a73888..de993e7f59 100644 --- a/Mage.Sets/src/mage/cards/k/KhenraCharioteer.java +++ b/Mage.Sets/src/mage/cards/k/KhenraCharioteer.java @@ -1,72 +1,73 @@ -/* - * 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.cards.k; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; -import mage.abilities.keyword.TrampleAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.filter.common.FilterControlledCreaturePermanent; - -/** - * - * @author Styxo - */ -public class KhenraCharioteer extends CardImpl { - - public KhenraCharioteer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{G}"); - - this.subtype.add("Jackal"); - this.subtype.add("Warrior"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // Trample - this.addAbility(TrampleAbility.getInstance()); - - // Other creatures you control have trample. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("creatures"), true))); - - } - - public KhenraCharioteer(final KhenraCharioteer card) { - super(card); - } - - @Override - public KhenraCharioteer copy() { - return new KhenraCharioteer(this); - } -} +/* + * 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.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author Styxo + */ +public class KhenraCharioteer extends CardImpl { + + public KhenraCharioteer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{G}"); + + this.subtype.add(SubType.JACKAL); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Other creatures you control have trample. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("creatures"), true))); + + } + + public KhenraCharioteer(final KhenraCharioteer card) { + super(card); + } + + @Override + public KhenraCharioteer copy() { + return new KhenraCharioteer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KhenraEternal.java b/Mage.Sets/src/mage/cards/k/KhenraEternal.java index b5dc4b92a0..0450c72c18 100644 --- a/Mage.Sets/src/mage/cards/k/KhenraEternal.java +++ b/Mage.Sets/src/mage/cards/k/KhenraEternal.java @@ -6,14 +6,15 @@ import mage.abilities.keyword.AfflictAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; public class KhenraEternal extends CardImpl { public KhenraEternal(UUID ownerId, CardSetInfo cardSetInfo) { super(ownerId, cardSetInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - subtype.add("Zombie"); - subtype.add("Jackal"); - subtype.add("Warrior"); + subtype.add(SubType.ZOMBIE); + subtype.add(SubType.JACKAL); + subtype.add(SubType.WARRIOR); power = new MageInt(2); toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KhenraScrapper.java b/Mage.Sets/src/mage/cards/k/KhenraScrapper.java index 1e28362db5..df5a4af154 100644 --- a/Mage.Sets/src/mage/cards/k/KhenraScrapper.java +++ b/Mage.Sets/src/mage/cards/k/KhenraScrapper.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -47,8 +48,8 @@ public class KhenraScrapper extends CardImpl { public KhenraScrapper(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Jackal"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.JACKAL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KheruBloodsucker.java b/Mage.Sets/src/mage/cards/k/KheruBloodsucker.java index 6e5f5c734b..ccd42966ac 100644 --- a/Mage.Sets/src/mage/cards/k/KheruBloodsucker.java +++ b/Mage.Sets/src/mage/cards/k/KheruBloodsucker.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.TargetController; import mage.constants.Zone; @@ -66,7 +67,7 @@ public class KheruBloodsucker extends CardImpl { public KheruBloodsucker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KheruDreadmaw.java b/Mage.Sets/src/mage/cards/k/KheruDreadmaw.java index 4b8e881ca9..bd40c30c1a 100644 --- a/Mage.Sets/src/mage/cards/k/KheruDreadmaw.java +++ b/Mage.Sets/src/mage/cards/k/KheruDreadmaw.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.common.TargetControlledPermanent; @@ -52,8 +53,8 @@ public class KheruDreadmaw extends CardImpl { public KheruDreadmaw(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Crocodile"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.CROCODILE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KheruLichLord.java b/Mage.Sets/src/mage/cards/k/KheruLichLord.java index f1b90e5c62..34086bd9fe 100644 --- a/Mage.Sets/src/mage/cards/k/KheruLichLord.java +++ b/Mage.Sets/src/mage/cards/k/KheruLichLord.java @@ -49,6 +49,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -69,8 +70,8 @@ public class KheruLichLord extends CardImpl { public KheruLichLord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{G}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KheruMindEater.java b/Mage.Sets/src/mage/cards/k/KheruMindEater.java index 3717cc6216..c1e26dd4c6 100644 --- a/Mage.Sets/src/mage/cards/k/KheruMindEater.java +++ b/Mage.Sets/src/mage/cards/k/KheruMindEater.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; -import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.OneShotEffect; @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -61,7 +62,7 @@ public class KheruMindEater extends CardImpl { public KheruMindEater(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(1); this.toughness = new MageInt(3); @@ -69,7 +70,7 @@ public class KheruMindEater extends CardImpl { this.addAbility(new MenaceAbility()); // Whenever Kheru Mind-Eater deals combat damage to a player, that player exiles a card from his or her hand face down. - this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new KheruMindEaterExileEffect(), false, true)); + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new KheruMindEaterExileEffect(), false, true)); // You may look at and play cards exiled with Kheru Mind-Eater. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KheruMindEaterEffect())); diff --git a/Mage.Sets/src/mage/cards/k/KheruSpellsnatcher.java b/Mage.Sets/src/mage/cards/k/KheruSpellsnatcher.java index e7de43168b..4d5b7a0c09 100644 --- a/Mage.Sets/src/mage/cards/k/KheruSpellsnatcher.java +++ b/Mage.Sets/src/mage/cards/k/KheruSpellsnatcher.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -61,8 +62,8 @@ public class KheruSpellsnatcher extends CardImpl { public KheruSpellsnatcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Naga"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KiAdiMundi.java b/Mage.Sets/src/mage/cards/k/KiAdiMundi.java index 9b17d73ae9..a6c1deec47 100644 --- a/Mage.Sets/src/mage/cards/k/KiAdiMundi.java +++ b/Mage.Sets/src/mage/cards/k/KiAdiMundi.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MeditateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.counters.CounterType; @@ -59,8 +60,8 @@ public class KiAdiMundi extends CardImpl { public KiAdiMundi(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Cerean"); - this.subtype.add("Jedi"); + this.subtype.add(SubType.CEREAN); + this.subtype.add(SubType.JEDI); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KikiJikiMirrorBreaker.java b/Mage.Sets/src/mage/cards/k/KikiJikiMirrorBreaker.java index 6e56f122b0..8cfb48536a 100644 --- a/Mage.Sets/src/mage/cards/k/KikiJikiMirrorBreaker.java +++ b/Mage.Sets/src/mage/cards/k/KikiJikiMirrorBreaker.java @@ -34,12 +34,13 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.effects.common.SacrificeTargetEffect; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -66,8 +67,8 @@ public class KikiJikiMirrorBreaker extends CardImpl { public KikiJikiMirrorBreaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -111,7 +112,7 @@ class KikiJikiMirrorBreakerEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanentOrLKIBattlefield(source.getFirstTarget()); if (permanent != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, true); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), null, true); effect.setTargetPointer(new FixedTarget(permanent, game)); effect.apply(game, source); for (Permanent addedToken : effect.getAddedPermanent()) { diff --git a/Mage.Sets/src/mage/cards/k/KikuNightsFlower.java b/Mage.Sets/src/mage/cards/k/KikuNightsFlower.java index e66705d6f7..b93cfdbb64 100644 --- a/Mage.Sets/src/mage/cards/k/KikuNightsFlower.java +++ b/Mage.Sets/src/mage/cards/k/KikuNightsFlower.java @@ -38,6 +38,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class KikuNightsFlower extends CardImpl { public KikuNightsFlower (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KillSuitCultist.java b/Mage.Sets/src/mage/cards/k/KillSuitCultist.java index 6c6679733a..7a48931c1a 100644 --- a/Mage.Sets/src/mage/cards/k/KillSuitCultist.java +++ b/Mage.Sets/src/mage/cards/k/KillSuitCultist.java @@ -30,7 +30,7 @@ package mage.cards.k; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; @@ -38,6 +38,7 @@ import mage.abilities.effects.ReplacementEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,13 +56,13 @@ public class KillSuitCultist extends CardImpl { public KillSuitCultist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(1); this.toughness = new MageInt(1); // Kill-Suit Cultist attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); // {B}, Sacrifice Kill-Suit Cultist: The next time damage would be dealt to target creature this turn, destroy that creature instead. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new KillSuitCultistEffect(), new ManaCostsImpl("{B}")); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/k/KillerBees.java b/Mage.Sets/src/mage/cards/k/KillerBees.java index 22b4d3afea..92fde6fd30 100644 --- a/Mage.Sets/src/mage/cards/k/KillerBees.java +++ b/Mage.Sets/src/mage/cards/k/KillerBees.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class KillerBees extends CardImpl { public KillerBees(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KillerInstinct.java b/Mage.Sets/src/mage/cards/k/KillerInstinct.java new file mode 100644 index 0000000000..ca6d7f785d --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KillerInstinct.java @@ -0,0 +1,126 @@ +/* + * 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.cards.k; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Library; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public class KillerInstinct extends CardImpl { + + public KillerInstinct(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{R}{G}"); + + // At the beginning of your upkeep, reveal the top card of your library. If it's a creature card, put it onto the battlefield. That creature gains haste until end of turn. Sacrifice it at the beginning of the next end step. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new KillerInstinctEffect(), TargetController.YOU, false)); + } + + public KillerInstinct(final KillerInstinct card) { + super(card); + } + + @Override + public KillerInstinct copy() { + return new KillerInstinct(this); + } +} + +class KillerInstinctEffect extends OneShotEffect { + + KillerInstinctEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "reveal the top card of your library. If it's a creature card, put it onto the battlefield. That creature gains haste until end of turn. Sacrifice it at the beginning of the next end step."; + } + + KillerInstinctEffect(final KillerInstinctEffect effect) { + super(effect); + } + + @Override + public KillerInstinctEffect copy() { + return new KillerInstinctEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObjectIfItStillExists(game); + if (player == null || sourceObject == null) { + return false; + } + Library library = player.getLibrary(); + if (library == null || !library.hasCards()) { + return false; + } + Card card = library.getFromTop(game); + if (card == null) { + return false; + } + player.revealCards(sourceObject.getIdName(), new CardsImpl(card), game); + if (card.isCreature() && player.moveCards(card, Zone.BATTLEFIELD, source, game)) { + Permanent permanent = game.getPermanent(card.getId()); + if (permanent != null) { + FixedTarget ft = new FixedTarget(permanent, game); + ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn); + effect.setTargetPointer(ft); + game.addEffect(effect, source); + Effect sacrificeEffect = new SacrificeTargetEffect("Sacrifice it at the beginning of the next end step", source.getControllerId()); + sacrificeEffect.setTargetPointer(ft); + game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect), source); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/k/KillerWhale.java b/Mage.Sets/src/mage/cards/k/KillerWhale.java index acd2ea5072..9af7bc4798 100644 --- a/Mage.Sets/src/mage/cards/k/KillerWhale.java +++ b/Mage.Sets/src/mage/cards/k/KillerWhale.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class KillerWhale extends CardImpl { public KillerWhale(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Whale"); + this.subtype.add(SubType.WHALE); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KilnFiend.java b/Mage.Sets/src/mage/cards/k/KilnFiend.java index ac17c2df9b..0538815f10 100644 --- a/Mage.Sets/src/mage/cards/k/KilnFiend.java +++ b/Mage.Sets/src/mage/cards/k/KilnFiend.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -54,8 +55,8 @@ public class KilnFiend extends CardImpl { public KilnFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Beast"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.BEAST); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KilnWalker.java b/Mage.Sets/src/mage/cards/k/KilnWalker.java index 041439733f..a2ec6761eb 100644 --- a/Mage.Sets/src/mage/cards/k/KilnWalker.java +++ b/Mage.Sets/src/mage/cards/k/KilnWalker.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class KilnWalker extends CardImpl { public KilnWalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KilnmouthDragon.java b/Mage.Sets/src/mage/cards/k/KilnmouthDragon.java index f1fd4cf23a..ccd1da4b3e 100644 --- a/Mage.Sets/src/mage/cards/k/KilnmouthDragon.java +++ b/Mage.Sets/src/mage/cards/k/KilnmouthDragon.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreatureOrPlayer; @@ -52,7 +53,7 @@ public class KilnmouthDragon extends CardImpl { public KilnmouthDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KinTreeInvocation.java b/Mage.Sets/src/mage/cards/k/KinTreeInvocation.java index 39c8ede38a..ce2d9bad3c 100644 --- a/Mage.Sets/src/mage/cards/k/KinTreeInvocation.java +++ b/Mage.Sets/src/mage/cards/k/KinTreeInvocation.java @@ -36,6 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; @@ -92,8 +93,8 @@ class KinTreeInvocationCreateTokenEffect extends OneShotEffect { } SubTypeList list = new SubTypeList(); - list.add("Spirit"); - list.add("Warrior"); + list.add(SubType.SPIRIT); + list.add(SubType.WARRIOR); ObjectColor objectColor = new ObjectColor(); objectColor.setBlack(true); objectColor.setGreen(true); diff --git a/Mage.Sets/src/mage/cards/k/KinTreeWarden.java b/Mage.Sets/src/mage/cards/k/KinTreeWarden.java index b63054611d..7257dcfba5 100644 --- a/Mage.Sets/src/mage/cards/k/KinTreeWarden.java +++ b/Mage.Sets/src/mage/cards/k/KinTreeWarden.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class KinTreeWarden extends CardImpl { public KinTreeWarden(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/Kindercatch.java b/Mage.Sets/src/mage/cards/k/Kindercatch.java index 063ab89efd..1695def63c 100644 --- a/Mage.Sets/src/mage/cards/k/Kindercatch.java +++ b/Mage.Sets/src/mage/cards/k/Kindercatch.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class Kindercatch extends CardImpl { public Kindercatch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/k/KindlyStranger.java b/Mage.Sets/src/mage/cards/k/KindlyStranger.java index 07425ff210..30f7961d5d 100644 --- a/Mage.Sets/src/mage/cards/k/KindlyStranger.java +++ b/Mage.Sets/src/mage/cards/k/KindlyStranger.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.d.DemonPossessedWitch; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,7 +49,7 @@ public class KindlyStranger extends CardImpl { public KindlyStranger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KindredCharge.java b/Mage.Sets/src/mage/cards/k/KindredCharge.java index bc93536051..46ef8164c3 100644 --- a/Mage.Sets/src/mage/cards/k/KindredCharge.java +++ b/Mage.Sets/src/mage/cards/k/KindredCharge.java @@ -37,7 +37,7 @@ import mage.abilities.effects.common.ChooseCreatureTypeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SubType; @@ -100,7 +100,7 @@ class KindredChargeEffect extends OneShotEffect { filter.add(new SubtypePredicate(SubType.byDescription(creatureType))); for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, controller.getId(), game)) { if (permanent != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, true); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), null, true); effect.setTargetPointer(new FixedTarget(permanent, game)); effect.apply(game, source); for (Permanent addedToken : effect.getAddedPermanent()) { diff --git a/Mage.Sets/src/mage/cards/k/KingCheetah.java b/Mage.Sets/src/mage/cards/k/KingCheetah.java index e5240f9da3..2a9dce7d91 100644 --- a/Mage.Sets/src/mage/cards/k/KingCheetah.java +++ b/Mage.Sets/src/mage/cards/k/KingCheetah.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class KingCheetah extends CardImpl { public KingCheetah(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KingCrab.java b/Mage.Sets/src/mage/cards/k/KingCrab.java index 792b1c149b..7e4abce70e 100644 --- a/Mage.Sets/src/mage/cards/k/KingCrab.java +++ b/Mage.Sets/src/mage/cards/k/KingCrab.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.PutOnLibraryTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,7 +58,7 @@ public class KingCrab extends CardImpl { public KingCrab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Crab"); + this.subtype.add(SubType.CRAB); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KingMacarTheGoldCursed.java b/Mage.Sets/src/mage/cards/k/KingMacarTheGoldCursed.java index 9af28f9736..27b5d479bb 100644 --- a/Mage.Sets/src/mage/cards/k/KingMacarTheGoldCursed.java +++ b/Mage.Sets/src/mage/cards/k/KingMacarTheGoldCursed.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.InspiredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.game.permanent.token.GoldToken; import mage.target.common.TargetCreaturePermanent; @@ -50,7 +51,7 @@ public class KingMacarTheGoldCursed extends CardImpl { public KingMacarTheGoldCursed(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KingSuleiman.java b/Mage.Sets/src/mage/cards/k/KingSuleiman.java index 4d54c4037e..7b48ec7c27 100644 --- a/Mage.Sets/src/mage/cards/k/KingSuleiman.java +++ b/Mage.Sets/src/mage/cards/k/KingSuleiman.java @@ -59,7 +59,7 @@ public class KingSuleiman extends CardImpl { public KingSuleiman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/Kingfisher.java b/Mage.Sets/src/mage/cards/k/Kingfisher.java index 0de5cf38e8..08be8a5483 100644 --- a/Mage.Sets/src/mage/cards/k/Kingfisher.java +++ b/Mage.Sets/src/mage/cards/k/Kingfisher.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class Kingfisher extends CardImpl { public Kingfisher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KingpinsPet.java b/Mage.Sets/src/mage/cards/k/KingpinsPet.java index e21b2397ba..f66ca88a44 100644 --- a/Mage.Sets/src/mage/cards/k/KingpinsPet.java +++ b/Mage.Sets/src/mage/cards/k/KingpinsPet.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class KingpinsPet extends CardImpl { public KingpinsPet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{B}"); - this.subtype.add("Thrull"); + this.subtype.add(SubType.THRULL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KingsAssassin.java b/Mage.Sets/src/mage/cards/k/KingsAssassin.java index 0461b0701e..856686ef79 100644 --- a/Mage.Sets/src/mage/cards/k/KingsAssassin.java +++ b/Mage.Sets/src/mage/cards/k/KingsAssassin.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.TappedPredicate; @@ -56,8 +57,8 @@ public class KingsAssassin extends CardImpl { public KingsAssassin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KinjallisCaller.java b/Mage.Sets/src/mage/cards/k/KinjallisCaller.java new file mode 100644 index 0000000000..7be71ff7d4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KinjallisCaller.java @@ -0,0 +1,74 @@ +/* + * 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.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author TheElk801 + */ +public class KinjallisCaller extends CardImpl { + + private static final FilterCard filter = new FilterCard("Dinosaur spells"); + + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + } + + public KinjallisCaller(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(0); + this.toughness = new MageInt(3); + + // Dinosaur spells you cast cost {1} less to cast. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostReductionControllerEffect(filter, 1))); + } + + public KinjallisCaller(final KinjallisCaller card) { + super(card); + } + + @Override + public KinjallisCaller copy() { + return new KinjallisCaller(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KinjallisSunwing.java b/Mage.Sets/src/mage/cards/k/KinjallisSunwing.java new file mode 100644 index 0000000000..6fde2f046e --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KinjallisSunwing.java @@ -0,0 +1,118 @@ +/* + * 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.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.EntersTheBattlefieldEvent; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author TheElk801 + */ +public class KinjallisSunwing extends CardImpl { + + public KinjallisSunwing(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Creatures your opponents control enter the battlefield tapped. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KinjallisSunwingEffect())); + } + + public KinjallisSunwing(final KinjallisSunwing card) { + super(card); + } + + @Override + public KinjallisSunwing copy() { + return new KinjallisSunwing(this); + } +} + +class KinjallisSunwingEffect extends ReplacementEffectImpl { + + KinjallisSunwingEffect() { + super(Duration.WhileOnBattlefield, Outcome.Tap); + staticText = "Creatures your opponents control enter the battlefield tapped"; + } + + KinjallisSunwingEffect(final KinjallisSunwingEffect effect) { + super(effect); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Permanent target = ((EntersTheBattlefieldEvent) event).getTarget(); + if (target != null) { + target.tap(game); + } + 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) { + if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { + Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget(); + if (permanent != null && permanent.isCreature()) { + return true; + } + } + return false; + } + + @Override + public KinjallisSunwingEffect copy() { + return new KinjallisSunwingEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KinsbaileBalloonist.java b/Mage.Sets/src/mage/cards/k/KinsbaileBalloonist.java index 1b3ca0c1a4..9292e76e9b 100644 --- a/Mage.Sets/src/mage/cards/k/KinsbaileBalloonist.java +++ b/Mage.Sets/src/mage/cards/k/KinsbaileBalloonist.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -47,8 +48,8 @@ public class KinsbaileBalloonist extends CardImpl { public KinsbaileBalloonist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KinsbaileBorderguard.java b/Mage.Sets/src/mage/cards/k/KinsbaileBorderguard.java index 2fb7082cd6..d87d9f79ee 100644 --- a/Mage.Sets/src/mage/cards/k/KinsbaileBorderguard.java +++ b/Mage.Sets/src/mage/cards/k/KinsbaileBorderguard.java @@ -63,8 +63,8 @@ public class KinsbaileBorderguard extends CardImpl { public KinsbaileBorderguard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KinsbaileCavalier.java b/Mage.Sets/src/mage/cards/k/KinsbaileCavalier.java index fa533068be..39b9e5a7d9 100644 --- a/Mage.Sets/src/mage/cards/k/KinsbaileCavalier.java +++ b/Mage.Sets/src/mage/cards/k/KinsbaileCavalier.java @@ -55,8 +55,8 @@ public class KinsbaileCavalier extends CardImpl { public KinsbaileCavalier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Knight"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KinsbaileSkirmisher.java b/Mage.Sets/src/mage/cards/k/KinsbaileSkirmisher.java index bc0b5e5941..a5dc99b377 100644 --- a/Mage.Sets/src/mage/cards/k/KinsbaileSkirmisher.java +++ b/Mage.Sets/src/mage/cards/k/KinsbaileSkirmisher.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -46,8 +47,8 @@ public class KinsbaileSkirmisher extends CardImpl { public KinsbaileSkirmisher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KinscaerHarpoonist.java b/Mage.Sets/src/mage/cards/k/KinscaerHarpoonist.java index e5bbd131d9..011a077f36 100644 --- a/Mage.Sets/src/mage/cards/k/KinscaerHarpoonist.java +++ b/Mage.Sets/src/mage/cards/k/KinscaerHarpoonist.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class KinscaerHarpoonist extends CardImpl { public KinscaerHarpoonist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Kithkin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KioraMasterOfTheDepths.java b/Mage.Sets/src/mage/cards/k/KioraMasterOfTheDepths.java index 23deb6e282..ed63448884 100644 --- a/Mage.Sets/src/mage/cards/k/KioraMasterOfTheDepths.java +++ b/Mage.Sets/src/mage/cards/k/KioraMasterOfTheDepths.java @@ -42,6 +42,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -67,7 +68,7 @@ public class KioraMasterOfTheDepths extends CardImpl { public KioraMasterOfTheDepths(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{G}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Kiora"); + this.subtype.add(SubType.KIORA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/k/KioraTheCrashingWave.java b/Mage.Sets/src/mage/cards/k/KioraTheCrashingWave.java index a40db76c08..d210730285 100644 --- a/Mage.Sets/src/mage/cards/k/KioraTheCrashingWave.java +++ b/Mage.Sets/src/mage/cards/k/KioraTheCrashingWave.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.PlayAdditionalLandsControllerEff import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.TargetController; @@ -66,7 +67,7 @@ public class KioraTheCrashingWave extends CardImpl { public KioraTheCrashingWave(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{G}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Kiora"); + this.subtype.add(SubType.KIORA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(2)); diff --git a/Mage.Sets/src/mage/cards/k/KiorasFollower.java b/Mage.Sets/src/mage/cards/k/KiorasFollower.java index e2edeab982..270e11bc33 100644 --- a/Mage.Sets/src/mage/cards/k/KiorasFollower.java +++ b/Mage.Sets/src/mage/cards/k/KiorasFollower.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -54,7 +55,7 @@ public class KiorasFollower extends CardImpl { } public KiorasFollower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KiraGreatGlassSpinner.java b/Mage.Sets/src/mage/cards/k/KiraGreatGlassSpinner.java index 499f7c9861..1a99c59074 100644 --- a/Mage.Sets/src/mage/cards/k/KiraGreatGlassSpinner.java +++ b/Mage.Sets/src/mage/cards/k/KiraGreatGlassSpinner.java @@ -54,7 +54,7 @@ public class KiraGreatGlassSpinner extends CardImpl { public KiraGreatGlassSpinner(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); addSuperType(SuperType.LEGENDARY); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KirdApe.java b/Mage.Sets/src/mage/cards/k/KirdApe.java index 557faed25f..9178fe0ca3 100644 --- a/Mage.Sets/src/mage/cards/k/KirdApe.java +++ b/Mage.Sets/src/mage/cards/k/KirdApe.java @@ -57,7 +57,7 @@ public class KirdApe extends CardImpl { public KirdApe(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Ape"); + this.subtype.add(SubType.APE); this.color.setRed(true); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KirdChieftain.java b/Mage.Sets/src/mage/cards/k/KirdChieftain.java index edfdf3c4bf..5c80a54221 100644 --- a/Mage.Sets/src/mage/cards/k/KirdChieftain.java +++ b/Mage.Sets/src/mage/cards/k/KirdChieftain.java @@ -65,7 +65,7 @@ public class KirdChieftain extends CardImpl { public KirdChieftain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Ape"); + this.subtype.add(SubType.APE); this.color.setRed(true); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KiriOnna.java b/Mage.Sets/src/mage/cards/k/KiriOnna.java index 36e6bd21ad..7c82248bb6 100644 --- a/Mage.Sets/src/mage/cards/k/KiriOnna.java +++ b/Mage.Sets/src/mage/cards/k/KiriOnna.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class KiriOnna extends CardImpl { public KiriOnna(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KirtarsDesire.java b/Mage.Sets/src/mage/cards/k/KirtarsDesire.java index 6e0055b507..1906384c88 100644 --- a/Mage.Sets/src/mage/cards/k/KirtarsDesire.java +++ b/Mage.Sets/src/mage/cards/k/KirtarsDesire.java @@ -44,6 +44,7 @@ import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -55,7 +56,7 @@ public class KirtarsDesire extends CardImpl { public KirtarsDesire(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/k/KitchenFinks.java b/Mage.Sets/src/mage/cards/k/KitchenFinks.java index 1ba1766963..2ae886f594 100644 --- a/Mage.Sets/src/mage/cards/k/KitchenFinks.java +++ b/Mage.Sets/src/mage/cards/k/KitchenFinks.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.PersistAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class KitchenFinks extends CardImpl { public KitchenFinks(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G/W}{G/W}"); - this.subtype.add("Ouphe"); + this.subtype.add(SubType.OUPHE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KiteShield.java b/Mage.Sets/src/mage/cards/k/KiteShield.java index 3e1eb10cf9..d2c10259a5 100644 --- a/Mage.Sets/src/mage/cards/k/KiteShield.java +++ b/Mage.Sets/src/mage/cards/k/KiteShield.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class KiteShield extends CardImpl { public KiteShield (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{0}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(0, 3))); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3))); diff --git a/Mage.Sets/src/mage/cards/k/Kitesail.java b/Mage.Sets/src/mage/cards/k/Kitesail.java index 27acc30558..73125167aa 100644 --- a/Mage.Sets/src/mage/cards/k/Kitesail.java +++ b/Mage.Sets/src/mage/cards/k/Kitesail.java @@ -46,7 +46,7 @@ public class Kitesail extends CardImpl { public Kitesail(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 0))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/k/KitesailApprentice.java b/Mage.Sets/src/mage/cards/k/KitesailApprentice.java index 127a99cbfa..1b06f9e103 100644 --- a/Mage.Sets/src/mage/cards/k/KitesailApprentice.java +++ b/Mage.Sets/src/mage/cards/k/KitesailApprentice.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -52,8 +53,8 @@ public class KitesailApprentice extends CardImpl { public KitesailApprentice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Kor"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SOLDIER); this.color.setWhite(true); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KitesailFreebooter.java b/Mage.Sets/src/mage/cards/k/KitesailFreebooter.java new file mode 100644 index 0000000000..f4a359a71b --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KitesailFreebooter.java @@ -0,0 +1,207 @@ +/* + * 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.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.common.FilterNonlandCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.ExileZone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.ZoneChangeEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetCard; +import mage.target.common.TargetOpponent; +import mage.util.CardUtil; + +/** + * + * @author TheElk801 + */ +public class KitesailFreebooter extends CardImpl { + + public KitesailFreebooter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Kitesail Freebooter enters the battlefield, target opponent reveals his or her hand. You choose a noncreature, nonland card from it. Exile that card until Kitesail Freebooter leaves the battlefield. + Ability ability = new EntersBattlefieldTriggeredAbility(new KitesailFreebooterExileEffect()); + ability.addTarget(new TargetOpponent()); + ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new KitesailFreebooterReturnExiledCardAbility())); + this.addAbility(ability); + } + + public KitesailFreebooter(final KitesailFreebooter card) { + super(card); + } + + @Override + public KitesailFreebooter copy() { + return new KitesailFreebooter(this); + } +} + +class KitesailFreebooterExileEffect extends OneShotEffect { + + public KitesailFreebooterExileEffect() { + super(Outcome.Benefit); + this.staticText = "target opponent reveals his or her hand. You choose a noncreature, nonland card from it. Exile that card until {this} leaves the battlefield"; + } + + public KitesailFreebooterExileEffect(final KitesailFreebooterExileEffect effect) { + super(effect); + } + + @Override + public KitesailFreebooterExileEffect copy() { + return new KitesailFreebooterExileEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Player opponent = game.getPlayer(this.getTargetPointer().getFirst(game, source)); + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (controller != null && opponent != null && sourcePermanent != null) { + if (!opponent.getHand().isEmpty()) { + opponent.revealCards(sourcePermanent.getIdName(), opponent.getHand(), game); + + FilterCard filter = new FilterNonlandCard("noncreature, nonland card to exile"); + filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); + TargetCard target = new TargetCard(Zone.HAND, filter); + if (opponent.getHand().count(filter, game) > 0 && controller.choose(Outcome.Exile, opponent.getHand(), target, game)) { + Card card = opponent.getHand().get(target.getFirstTarget(), game); + // If source permanent leaves the battlefield before its triggered ability resolves, the target card won't be exiled. + if (card != null && game.getState().getZone(source.getSourceId()) == Zone.BATTLEFIELD) { + controller.moveCardToExileWithInfo(card, CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()), sourcePermanent.getIdName(), source.getSourceId(), game, Zone.HAND, true); + } + } + } + return true; + } + return false; + + } +} + +/** + * Returns the exiled card as source permanent leaves battlefield Uses no stack + * + * @author LevelX2 + */ +class KitesailFreebooterReturnExiledCardAbility extends DelayedTriggeredAbility { + + public KitesailFreebooterReturnExiledCardAbility() { + super(new KitesailFreebooterReturnExiledCardEffect(), Duration.OneUse); + this.usesStack = false; + this.setRuleVisible(false); + } + + public KitesailFreebooterReturnExiledCardAbility(final KitesailFreebooterReturnExiledCardAbility ability) { + super(ability); + } + + @Override + public KitesailFreebooterReturnExiledCardAbility copy() { + return new KitesailFreebooterReturnExiledCardAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.ZONE_CHANGE; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getTargetId().equals(this.getSourceId())) { + ZoneChangeEvent zEvent = (ZoneChangeEvent) event; + if (zEvent.getFromZone() == Zone.BATTLEFIELD) { + return true; + } + } + return false; + } +} + +class KitesailFreebooterReturnExiledCardEffect extends OneShotEffect { + + public KitesailFreebooterReturnExiledCardEffect() { + super(Outcome.Benefit); + this.staticText = "Return exiled nonland card to its owner's hand"; + } + + public KitesailFreebooterReturnExiledCardEffect(final KitesailFreebooterReturnExiledCardEffect effect) { + super(effect); + } + + @Override + public KitesailFreebooterReturnExiledCardEffect copy() { + return new KitesailFreebooterReturnExiledCardEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (sourceObject != null && controller != null) { + ExileZone exile = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter())); + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (exile != null && sourcePermanent != null) { + controller.moveCards(exile, Zone.HAND, source, game); + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/k/KitesailScout.java b/Mage.Sets/src/mage/cards/k/KitesailScout.java index 9a56e75eef..90d320b2c2 100644 --- a/Mage.Sets/src/mage/cards/k/KitesailScout.java +++ b/Mage.Sets/src/mage/cards/k/KitesailScout.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class KitesailScout extends CardImpl { public KitesailScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Kor"); - this.subtype.add("Scout"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KithkinDaggerdare.java b/Mage.Sets/src/mage/cards/k/KithkinDaggerdare.java index 9828c927de..c5dd967804 100644 --- a/Mage.Sets/src/mage/cards/k/KithkinDaggerdare.java +++ b/Mage.Sets/src/mage/cards/k/KithkinDaggerdare.java @@ -47,8 +47,8 @@ public class KithkinDaggerdare extends CardImpl { public KithkinDaggerdare(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Kithkin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KithkinGreatheart.java b/Mage.Sets/src/mage/cards/k/KithkinGreatheart.java index 3a3532b4b6..0858e87341 100644 --- a/Mage.Sets/src/mage/cards/k/KithkinGreatheart.java +++ b/Mage.Sets/src/mage/cards/k/KithkinGreatheart.java @@ -58,8 +58,8 @@ public class KithkinGreatheart extends CardImpl { public KithkinGreatheart(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SOLDIER); this.color.setWhite(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KithkinHarbinger.java b/Mage.Sets/src/mage/cards/k/KithkinHarbinger.java index ca4dcf1b01..f630bf9b8e 100644 --- a/Mage.Sets/src/mage/cards/k/KithkinHarbinger.java +++ b/Mage.Sets/src/mage/cards/k/KithkinHarbinger.java @@ -53,8 +53,8 @@ public class KithkinHarbinger extends CardImpl { public KithkinHarbinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KithkinHealer.java b/Mage.Sets/src/mage/cards/k/KithkinHealer.java index e8375ffafa..44bd43f692 100644 --- a/Mage.Sets/src/mage/cards/k/KithkinHealer.java +++ b/Mage.Sets/src/mage/cards/k/KithkinHealer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class KithkinHealer extends CardImpl { public KithkinHealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KithkinMourncaller.java b/Mage.Sets/src/mage/cards/k/KithkinMourncaller.java index 24c1d1841f..a0a5fa779f 100644 --- a/Mage.Sets/src/mage/cards/k/KithkinMourncaller.java +++ b/Mage.Sets/src/mage/cards/k/KithkinMourncaller.java @@ -53,8 +53,8 @@ public class KithkinMourncaller extends CardImpl { public KithkinMourncaller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Kithkin"); - this.subtype.add("Scout"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KithkinRabble.java b/Mage.Sets/src/mage/cards/k/KithkinRabble.java index 7007589c66..ef371e7e11 100644 --- a/Mage.Sets/src/mage/cards/k/KithkinRabble.java +++ b/Mage.Sets/src/mage/cards/k/KithkinRabble.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -56,7 +57,7 @@ public class KithkinRabble extends CardImpl { public KithkinRabble(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Kithkin"); + this.subtype.add(SubType.KITHKIN); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/k/KithkinShielddare.java b/Mage.Sets/src/mage/cards/k/KithkinShielddare.java index f9a2f3e76d..2370625603 100644 --- a/Mage.Sets/src/mage/cards/k/KithkinShielddare.java +++ b/Mage.Sets/src/mage/cards/k/KithkinShielddare.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterBlockingCreature; @@ -52,8 +53,8 @@ public class KithkinShielddare extends CardImpl { public KithkinShielddare(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KithkinSpellduster.java b/Mage.Sets/src/mage/cards/k/KithkinSpellduster.java index 4563beb9f9..1f3f0de057 100644 --- a/Mage.Sets/src/mage/cards/k/KithkinSpellduster.java +++ b/Mage.Sets/src/mage/cards/k/KithkinSpellduster.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.PersistAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetEnchantmentPermanent; @@ -50,8 +51,8 @@ public class KithkinSpellduster extends CardImpl { public KithkinSpellduster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KithkinZealot.java b/Mage.Sets/src/mage/cards/k/KithkinZealot.java index 10c82ef244..e5ccbc0d17 100644 --- a/Mage.Sets/src/mage/cards/k/KithkinZealot.java +++ b/Mage.Sets/src/mage/cards/k/KithkinZealot.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; @@ -52,8 +53,8 @@ public class KithkinZealot extends CardImpl { public KithkinZealot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KithkinZephyrnaut.java b/Mage.Sets/src/mage/cards/k/KithkinZephyrnaut.java index b68d129287..7da57e2150 100644 --- a/Mage.Sets/src/mage/cards/k/KithkinZephyrnaut.java +++ b/Mage.Sets/src/mage/cards/k/KithkinZephyrnaut.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -48,8 +49,8 @@ public class KithkinZephyrnaut extends CardImpl { public KithkinZephyrnaut(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KitsuneBlademaster.java b/Mage.Sets/src/mage/cards/k/KitsuneBlademaster.java index 96bb5a4545..fd5d0ab1ad 100644 --- a/Mage.Sets/src/mage/cards/k/KitsuneBlademaster.java +++ b/Mage.Sets/src/mage/cards/k/KitsuneBlademaster.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class KitsuneBlademaster extends CardImpl { public KitsuneBlademaster (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Fox"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.FOX); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KitsuneBonesetter.java b/Mage.Sets/src/mage/cards/k/KitsuneBonesetter.java index 38c696ea70..f300a116d5 100644 --- a/Mage.Sets/src/mage/cards/k/KitsuneBonesetter.java +++ b/Mage.Sets/src/mage/cards/k/KitsuneBonesetter.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class KitsuneBonesetter extends CardImpl { public KitsuneBonesetter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Fox"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.FOX); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KitsuneDawnblade.java b/Mage.Sets/src/mage/cards/k/KitsuneDawnblade.java index 984dffc7eb..96f7e83328 100644 --- a/Mage.Sets/src/mage/cards/k/KitsuneDawnblade.java +++ b/Mage.Sets/src/mage/cards/k/KitsuneDawnblade.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.BushidoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -46,8 +47,8 @@ public class KitsuneDawnblade extends CardImpl { public KitsuneDawnblade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Fox"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.FOX); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KitsuneDiviner.java b/Mage.Sets/src/mage/cards/k/KitsuneDiviner.java index cfdbb1558d..10a650a486 100644 --- a/Mage.Sets/src/mage/cards/k/KitsuneDiviner.java +++ b/Mage.Sets/src/mage/cards/k/KitsuneDiviner.java @@ -57,8 +57,8 @@ public class KitsuneDiviner extends CardImpl { public KitsuneDiviner (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Fox"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.FOX); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KitsuneHealer.java b/Mage.Sets/src/mage/cards/k/KitsuneHealer.java index 036d4658c5..2ccc828cbb 100644 --- a/Mage.Sets/src/mage/cards/k/KitsuneHealer.java +++ b/Mage.Sets/src/mage/cards/k/KitsuneHealer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -58,8 +59,8 @@ public class KitsuneHealer extends CardImpl { public KitsuneHealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Fox"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.FOX); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KitsuneLoreweaver.java b/Mage.Sets/src/mage/cards/k/KitsuneLoreweaver.java index 4e7dd10bcf..b1f2789f06 100644 --- a/Mage.Sets/src/mage/cards/k/KitsuneLoreweaver.java +++ b/Mage.Sets/src/mage/cards/k/KitsuneLoreweaver.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class KitsuneLoreweaver extends CardImpl { public KitsuneLoreweaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Fox"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.FOX); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KitsuneMystic.java b/Mage.Sets/src/mage/cards/k/KitsuneMystic.java index c4b5221547..fc9f92c35c 100644 --- a/Mage.Sets/src/mage/cards/k/KitsuneMystic.java +++ b/Mage.Sets/src/mage/cards/k/KitsuneMystic.java @@ -58,8 +58,8 @@ public class KitsuneMystic extends CardImpl { public KitsuneMystic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Fox"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.FOX); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); @@ -96,8 +96,8 @@ class AutumnTailKitsuneSage extends Token { addSuperType(SuperType.LEGENDARY); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Fox"); - subtype.add("Wizard"); + subtype.add(SubType.FOX); + subtype.add(SubType.WIZARD); power = new MageInt(4); toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KitsunePalliator.java b/Mage.Sets/src/mage/cards/k/KitsunePalliator.java index b93eaff771..b2f8111a8a 100644 --- a/Mage.Sets/src/mage/cards/k/KitsunePalliator.java +++ b/Mage.Sets/src/mage/cards/k/KitsunePalliator.java @@ -52,8 +52,8 @@ public class KitsunePalliator extends CardImpl { public KitsunePalliator(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Fox"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.FOX); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KitsuneRiftwalker.java b/Mage.Sets/src/mage/cards/k/KitsuneRiftwalker.java index 4fa1b9fc28..0802cfcbce 100644 --- a/Mage.Sets/src/mage/cards/k/KitsuneRiftwalker.java +++ b/Mage.Sets/src/mage/cards/k/KitsuneRiftwalker.java @@ -52,8 +52,8 @@ public class KitsuneRiftwalker extends CardImpl { public KitsuneRiftwalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Fox"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.FOX); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KiyomaroFirstToStand.java b/Mage.Sets/src/mage/cards/k/KiyomaroFirstToStand.java index f770fa9800..807693f06a 100644 --- a/Mage.Sets/src/mage/cards/k/KiyomaroFirstToStand.java +++ b/Mage.Sets/src/mage/cards/k/KiyomaroFirstToStand.java @@ -46,6 +46,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.SuperType; @@ -63,7 +64,7 @@ public class KiyomaroFirstToStand extends CardImpl { public KiyomaroFirstToStand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/k/KjeldoranDead.java b/Mage.Sets/src/mage/cards/k/KjeldoranDead.java index ff2166291d..0a9bd0052d 100644 --- a/Mage.Sets/src/mage/cards/k/KjeldoranDead.java +++ b/Mage.Sets/src/mage/cards/k/KjeldoranDead.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.SacrificeControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -49,7 +50,7 @@ public class KjeldoranDead extends CardImpl { public KjeldoranDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KjeldoranFrostbeast.java b/Mage.Sets/src/mage/cards/k/KjeldoranFrostbeast.java index 7bb4231ec5..59f7d1d18a 100644 --- a/Mage.Sets/src/mage/cards/k/KjeldoranFrostbeast.java +++ b/Mage.Sets/src/mage/cards/k/KjeldoranFrostbeast.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.permanent.BlockedByIdPredicate; @@ -49,8 +50,8 @@ public class KjeldoranFrostbeast extends CardImpl { public KjeldoranFrostbeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{W}"); - this.subtype.add("Elemental"); - this.subtype.add("Beast"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KjeldoranGargoyle.java b/Mage.Sets/src/mage/cards/k/KjeldoranGargoyle.java index e94fea2e38..110598bc75 100644 --- a/Mage.Sets/src/mage/cards/k/KjeldoranGargoyle.java +++ b/Mage.Sets/src/mage/cards/k/KjeldoranGargoyle.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class KjeldoranGargoyle extends CardImpl { public KjeldoranGargoyle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Gargoyle"); + this.subtype.add(SubType.GARGOYLE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KjeldoranHomeGuard.java b/Mage.Sets/src/mage/cards/k/KjeldoranHomeGuard.java new file mode 100644 index 0000000000..0826886319 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KjeldoranHomeGuard.java @@ -0,0 +1,77 @@ +/* + * 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.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EndOfCombatTriggeredAbility; +import mage.abilities.condition.common.AttackedOrBlockedThisCombatSourceCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.BoostCounter; +import mage.game.permanent.token.DeserterToken; +import mage.watchers.common.AttackedOrBlockedThisCombatWatcher; + +/** + * + * @author TheElk801 + */ +public class KjeldoranHomeGuard extends CardImpl { + + public KjeldoranHomeGuard(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(1); + this.toughness = new MageInt(6); + + // At end of combat, if Kjeldoran Home Guard attacked or blocked this combat, put a -0/-1 counter on Kjeldoran Home Guard and put a 0/1 white Deserter creature token onto the battlefield. + Ability ability = new ConditionalTriggeredAbility( + new EndOfCombatTriggeredAbility(new AddCountersSourceEffect(new BoostCounter(0, -1)), false), + AttackedOrBlockedThisCombatSourceCondition.instance, + "At end of combat, if {this} attacked or blocked this combat, put a -0/-1 counter on {this} and create a 0/1 white Deserter creature token."); + ability.addEffect(new CreateTokenEffect(new DeserterToken()).setText("and create a 0/1 white Deserter creature token.")); + this.addAbility(ability, new AttackedOrBlockedThisCombatWatcher()); + } + + public KjeldoranHomeGuard(final KjeldoranHomeGuard card) { + super(card); + } + + @Override + public KjeldoranHomeGuard copy() { + return new KjeldoranHomeGuard(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KjeldoranJavelineer.java b/Mage.Sets/src/mage/cards/k/KjeldoranJavelineer.java new file mode 100644 index 0000000000..efb114d0b0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KjeldoranJavelineer.java @@ -0,0 +1,81 @@ +/* + * 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.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.constants.SubType; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.CountersSourceCount; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.common.TargetAttackingOrBlockingCreature; + +/** + * + * @author TheElk801 + */ +public class KjeldoranJavelineer extends CardImpl { + + public KjeldoranJavelineer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Cumulative upkeep {1} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{1}"))); + + // {T}: Kjeldoran Javelineer deals damage equal to the number of age counters on it to target attacking or blocking creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new DamageTargetEffect(new CountersSourceCount(CounterType.AGE)) + .setText("{this} deals damage equal to the number of age counters on it to target attacking or blocking creature."), + new TapSourceCost()); + ability.addTarget(new TargetAttackingOrBlockingCreature()); + this.addAbility(ability); + } + + public KjeldoranJavelineer(final KjeldoranJavelineer card) { + super(card); + } + + @Override + public KjeldoranJavelineer copy() { + return new KjeldoranJavelineer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KjeldoranOutrider.java b/Mage.Sets/src/mage/cards/k/KjeldoranOutrider.java index 3e78e36aaf..83d26ec838 100644 --- a/Mage.Sets/src/mage/cards/k/KjeldoranOutrider.java +++ b/Mage.Sets/src/mage/cards/k/KjeldoranOutrider.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,8 +47,8 @@ public class KjeldoranOutrider extends CardImpl { public KjeldoranOutrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KjeldoranRoyalGuard.java b/Mage.Sets/src/mage/cards/k/KjeldoranRoyalGuard.java index bfc84c3191..87b1171250 100644 --- a/Mage.Sets/src/mage/cards/k/KjeldoranRoyalGuard.java +++ b/Mage.Sets/src/mage/cards/k/KjeldoranRoyalGuard.java @@ -36,6 +36,7 @@ import mage.abilities.effects.ReplacementEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class KjeldoranRoyalGuard extends CardImpl { public KjeldoranRoyalGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KnacksawClique.java b/Mage.Sets/src/mage/cards/k/KnacksawClique.java index 65e522ef4f..8e860db8a8 100644 --- a/Mage.Sets/src/mage/cards/k/KnacksawClique.java +++ b/Mage.Sets/src/mage/cards/k/KnacksawClique.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class KnacksawClique extends CardImpl { public KnacksawClique(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KnightCaptainOfEos.java b/Mage.Sets/src/mage/cards/k/KnightCaptainOfEos.java index 9d11842b20..796e1ed2cd 100644 --- a/Mage.Sets/src/mage/cards/k/KnightCaptainOfEos.java +++ b/Mage.Sets/src/mage/cards/k/KnightCaptainOfEos.java @@ -60,8 +60,8 @@ public class KnightCaptainOfEos extends CardImpl { public KnightCaptainOfEos(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KnightErrant.java b/Mage.Sets/src/mage/cards/k/KnightErrant.java index 4febed0a39..e778ceefb6 100644 --- a/Mage.Sets/src/mage/cards/k/KnightErrant.java +++ b/Mage.Sets/src/mage/cards/k/KnightErrant.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class KnightErrant extends CardImpl { public KnightErrant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KnightExemplar.java b/Mage.Sets/src/mage/cards/k/KnightExemplar.java index 02c755419e..c3ff5eb3a7 100644 --- a/Mage.Sets/src/mage/cards/k/KnightExemplar.java +++ b/Mage.Sets/src/mage/cards/k/KnightExemplar.java @@ -58,8 +58,8 @@ public class KnightExemplar extends CardImpl { public KnightExemplar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KnightOfCliffhaven.java b/Mage.Sets/src/mage/cards/k/KnightOfCliffhaven.java index 44b3dd6a79..e569b6e1ef 100644 --- a/Mage.Sets/src/mage/cards/k/KnightOfCliffhaven.java +++ b/Mage.Sets/src/mage/cards/k/KnightOfCliffhaven.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardSetInfo; import mage.cards.LevelerCard; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -49,8 +50,8 @@ public class KnightOfCliffhaven extends LevelerCard { public KnightOfCliffhaven(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Knight"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.KNIGHT); this.color.setWhite(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KnightOfDawn.java b/Mage.Sets/src/mage/cards/k/KnightOfDawn.java index 329371d4f9..09b5620f48 100644 --- a/Mage.Sets/src/mage/cards/k/KnightOfDawn.java +++ b/Mage.Sets/src/mage/cards/k/KnightOfDawn.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class KnightOfDawn extends CardImpl { public KnightOfDawn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KnightOfDusk.java b/Mage.Sets/src/mage/cards/k/KnightOfDusk.java index 765f60fbac..52f6d613ef 100644 --- a/Mage.Sets/src/mage/cards/k/KnightOfDusk.java +++ b/Mage.Sets/src/mage/cards/k/KnightOfDusk.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.BlockingAttackerIdPredicate; @@ -49,8 +50,8 @@ public class KnightOfDusk extends CardImpl { public KnightOfDusk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KnightOfGlory.java b/Mage.Sets/src/mage/cards/k/KnightOfGlory.java index d9e4c76493..022777f4b6 100644 --- a/Mage.Sets/src/mage/cards/k/KnightOfGlory.java +++ b/Mage.Sets/src/mage/cards/k/KnightOfGlory.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class KnightOfGlory extends CardImpl { public KnightOfGlory(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KnightOfInfamy.java b/Mage.Sets/src/mage/cards/k/KnightOfInfamy.java index dfee120262..d93a9015bc 100644 --- a/Mage.Sets/src/mage/cards/k/KnightOfInfamy.java +++ b/Mage.Sets/src/mage/cards/k/KnightOfInfamy.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class KnightOfInfamy extends CardImpl { public KnightOfInfamy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KnightOfMeadowgrain.java b/Mage.Sets/src/mage/cards/k/KnightOfMeadowgrain.java index aa3711db91..cfe8be0525 100644 --- a/Mage.Sets/src/mage/cards/k/KnightOfMeadowgrain.java +++ b/Mage.Sets/src/mage/cards/k/KnightOfMeadowgrain.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class KnightOfMeadowgrain extends CardImpl { public KnightOfMeadowgrain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Knight"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KnightOfNewAlara.java b/Mage.Sets/src/mage/cards/k/KnightOfNewAlara.java index 3f522d1946..31dcc15353 100644 --- a/Mage.Sets/src/mage/cards/k/KnightOfNewAlara.java +++ b/Mage.Sets/src/mage/cards/k/KnightOfNewAlara.java @@ -35,6 +35,7 @@ import mage.abilities.effects.ContinuousEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -53,8 +54,8 @@ public class KnightOfNewAlara extends CardImpl { public KnightOfNewAlara(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); diff --git a/Mage.Sets/src/mage/cards/k/KnightOfObligation.java b/Mage.Sets/src/mage/cards/k/KnightOfObligation.java index 811b720203..c2fa88acbe 100644 --- a/Mage.Sets/src/mage/cards/k/KnightOfObligation.java +++ b/Mage.Sets/src/mage/cards/k/KnightOfObligation.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class KnightOfObligation extends CardImpl { public KnightOfObligation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KnightOfStromgald.java b/Mage.Sets/src/mage/cards/k/KnightOfStromgald.java index 1b0accc649..434e17d6af 100644 --- a/Mage.Sets/src/mage/cards/k/KnightOfStromgald.java +++ b/Mage.Sets/src/mage/cards/k/KnightOfStromgald.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class KnightOfStromgald extends CardImpl { public KnightOfStromgald(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KnightOfSursi.java b/Mage.Sets/src/mage/cards/k/KnightOfSursi.java index 4980ca8386..4ed3fceeb3 100644 --- a/Mage.Sets/src/mage/cards/k/KnightOfSursi.java +++ b/Mage.Sets/src/mage/cards/k/KnightOfSursi.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class KnightOfSursi extends CardImpl { public KnightOfSursi(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KnightOfTheHolyNimbus.java b/Mage.Sets/src/mage/cards/k/KnightOfTheHolyNimbus.java index bc3925cee3..13a9c9cb13 100644 --- a/Mage.Sets/src/mage/cards/k/KnightOfTheHolyNimbus.java +++ b/Mage.Sets/src/mage/cards/k/KnightOfTheHolyNimbus.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlankingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,9 +55,9 @@ public class KnightOfTheHolyNimbus extends CardImpl { public KnightOfTheHolyNimbus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KnightOfTheMists.java b/Mage.Sets/src/mage/cards/k/KnightOfTheMists.java new file mode 100644 index 0000000000..79d74f9de5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KnightOfTheMists.java @@ -0,0 +1,118 @@ +/* + * 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.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlankingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class KnightOfTheMists extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Knight"); + + static { + filter.add(new SubtypePredicate(SubType.KNIGHT)); + } + + public KnightOfTheMists(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flanking + this.addAbility(new FlankingAbility()); + + // When Knight of the Mists enters the battlefield, you may pay {U}. If you don't, destroy target Knight and it can't be regenerated. + Ability ability = new EntersBattlefieldTriggeredAbility(new KnightOfTheMistsEffect()); + ability.addTarget(new TargetCreaturePermanent(filter)); + } + + public KnightOfTheMists(final KnightOfTheMists card) { + super(card); + } + + @Override + public KnightOfTheMists copy() { + return new KnightOfTheMists(this); + } +} + +class KnightOfTheMistsEffect extends OneShotEffect { + + KnightOfTheMistsEffect() { + super(Outcome.Neutral); + this.staticText = "When {this} enters the battlefield, you may pay {U}. If you don't, destroy target Knight and it can't be regenerated."; + } + + KnightOfTheMistsEffect(final KnightOfTheMistsEffect effect) { + super(effect); + } + + @Override + public KnightOfTheMistsEffect copy() { + return new KnightOfTheMistsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getSourceId()); + if (player == null) { + return false; + } + Cost cost = new ManaCostsImpl("{U}"); + if (!(cost.canPay(source, source.getSourceId(), player.getId(), game) + && player.chooseUse(outcome, "Pay {U}?", source, game) + && cost.pay(source, game, source.getSourceId(), player.getId(), false))) { + return new DestroyTargetEffect(true).apply(game, source); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/k/KnightOfThePilgrimsRoad.java b/Mage.Sets/src/mage/cards/k/KnightOfThePilgrimsRoad.java index 1d0050c724..a024e9edeb 100644 --- a/Mage.Sets/src/mage/cards/k/KnightOfThePilgrimsRoad.java +++ b/Mage.Sets/src/mage/cards/k/KnightOfThePilgrimsRoad.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.RenownAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class KnightOfThePilgrimsRoad extends CardImpl { public KnightOfThePilgrimsRoad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KnightOfTheReliquary.java b/Mage.Sets/src/mage/cards/k/KnightOfTheReliquary.java index 3cdaee4474..279f3ede77 100644 --- a/Mage.Sets/src/mage/cards/k/KnightOfTheReliquary.java +++ b/Mage.Sets/src/mage/cards/k/KnightOfTheReliquary.java @@ -64,8 +64,8 @@ public class KnightOfTheReliquary extends CardImpl { public KnightOfTheReliquary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KnightOfTheSkywardEye.java b/Mage.Sets/src/mage/cards/k/KnightOfTheSkywardEye.java index 70c6dedc2a..b36d64cb66 100644 --- a/Mage.Sets/src/mage/cards/k/KnightOfTheSkywardEye.java +++ b/Mage.Sets/src/mage/cards/k/KnightOfTheSkywardEye.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,8 +47,8 @@ public class KnightOfTheSkywardEye extends CardImpl { public KnightOfTheSkywardEye(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KnightOfTheWhiteOrchid.java b/Mage.Sets/src/mage/cards/k/KnightOfTheWhiteOrchid.java index f889d9e887..3821226f3f 100644 --- a/Mage.Sets/src/mage/cards/k/KnightOfTheWhiteOrchid.java +++ b/Mage.Sets/src/mage/cards/k/KnightOfTheWhiteOrchid.java @@ -51,8 +51,8 @@ public class KnightOfTheWhiteOrchid extends CardImpl { public KnightOfTheWhiteOrchid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KnightOfValor.java b/Mage.Sets/src/mage/cards/k/KnightOfValor.java index a411a95fa3..fd1fe4293a 100644 --- a/Mage.Sets/src/mage/cards/k/KnightOfValor.java +++ b/Mage.Sets/src/mage/cards/k/KnightOfValor.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlankingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -51,8 +52,8 @@ public class KnightOfValor extends CardImpl { public KnightOfValor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KnightlyValor.java b/Mage.Sets/src/mage/cards/k/KnightlyValor.java index 4bccaeeaad..f259c6a2be 100644 --- a/Mage.Sets/src/mage/cards/k/KnightlyValor.java +++ b/Mage.Sets/src/mage/cards/k/KnightlyValor.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class KnightlyValor extends CardImpl { public KnightlyValor (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/k/KnightsOfTheBlackRose.java b/Mage.Sets/src/mage/cards/k/KnightsOfTheBlackRose.java index 277d84c153..48dbe1cf52 100644 --- a/Mage.Sets/src/mage/cards/k/KnightsOfTheBlackRose.java +++ b/Mage.Sets/src/mage/cards/k/KnightsOfTheBlackRose.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.WatcherScope; import mage.constants.Zone; import mage.game.Game; @@ -55,8 +56,8 @@ public class KnightsOfTheBlackRose extends CardImpl { public KnightsOfTheBlackRose(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{B}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KnollspineDragon.java b/Mage.Sets/src/mage/cards/k/KnollspineDragon.java index 6eaf03b6c8..4062a03440 100644 --- a/Mage.Sets/src/mage/cards/k/KnollspineDragon.java +++ b/Mage.Sets/src/mage/cards/k/KnollspineDragon.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -51,7 +52,7 @@ public class KnollspineDragon extends CardImpl { public KnollspineDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(7); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KnotvineMystic.java b/Mage.Sets/src/mage/cards/k/KnotvineMystic.java index 48aca24d50..fdec96e2f5 100644 --- a/Mage.Sets/src/mage/cards/k/KnotvineMystic.java +++ b/Mage.Sets/src/mage/cards/k/KnotvineMystic.java @@ -38,6 +38,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -50,8 +51,8 @@ public class KnotvineMystic extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}{W}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KnotvinePaladin.java b/Mage.Sets/src/mage/cards/k/KnotvinePaladin.java index f36e9fb232..76276d16a0 100644 --- a/Mage.Sets/src/mage/cards/k/KnotvinePaladin.java +++ b/Mage.Sets/src/mage/cards/k/KnotvinePaladin.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; @@ -54,8 +55,8 @@ public class KnotvinePaladin extends CardImpl { public KnotvinePaladin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); diff --git a/Mage.Sets/src/mage/cards/k/KnowledgeExploitation.java b/Mage.Sets/src/mage/cards/k/KnowledgeExploitation.java index bcfa9baee2..a46e5a5b0e 100644 --- a/Mage.Sets/src/mage/cards/k/KnowledgeExploitation.java +++ b/Mage.Sets/src/mage/cards/k/KnowledgeExploitation.java @@ -35,6 +35,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterInstantOrSorceryCard; import mage.game.Game; @@ -50,7 +51,7 @@ public class KnowledgeExploitation extends CardImpl { public KnowledgeExploitation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.SORCERY},"{5}{U}{U}"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.ROGUE); // Prowl {3}{U} this.addAbility(new ProwlAbility(this, "{3}{U}")); diff --git a/Mage.Sets/src/mage/cards/k/KnuckleboneWitch.java b/Mage.Sets/src/mage/cards/k/KnuckleboneWitch.java index 0eea55dd35..fe5f4646be 100644 --- a/Mage.Sets/src/mage/cards/k/KnuckleboneWitch.java +++ b/Mage.Sets/src/mage/cards/k/KnuckleboneWitch.java @@ -56,8 +56,8 @@ public class KnuckleboneWitch extends CardImpl { public KnuckleboneWitch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KoboldDrillSergeant.java b/Mage.Sets/src/mage/cards/k/KoboldDrillSergeant.java index b2263a153d..7626686c94 100644 --- a/Mage.Sets/src/mage/cards/k/KoboldDrillSergeant.java +++ b/Mage.Sets/src/mage/cards/k/KoboldDrillSergeant.java @@ -58,8 +58,8 @@ public class KoboldDrillSergeant extends CardImpl { public KoboldDrillSergeant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Kobold"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KOBOLD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KoboldOverlord.java b/Mage.Sets/src/mage/cards/k/KoboldOverlord.java index cdecf5bf4a..b25ddf0075 100644 --- a/Mage.Sets/src/mage/cards/k/KoboldOverlord.java +++ b/Mage.Sets/src/mage/cards/k/KoboldOverlord.java @@ -55,7 +55,7 @@ public class KoboldOverlord extends CardImpl { public KoboldOverlord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Kobold"); + this.subtype.add(SubType.KOBOLD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KoboldTaskmaster.java b/Mage.Sets/src/mage/cards/k/KoboldTaskmaster.java index 79597e38e4..3a53691f78 100644 --- a/Mage.Sets/src/mage/cards/k/KoboldTaskmaster.java +++ b/Mage.Sets/src/mage/cards/k/KoboldTaskmaster.java @@ -53,7 +53,7 @@ public class KoboldTaskmaster extends CardImpl { public KoboldTaskmaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Kobold"); + this.subtype.add(SubType.KOBOLD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KoboldsOfKherKeep.java b/Mage.Sets/src/mage/cards/k/KoboldsOfKherKeep.java index d41a64aaef..284e311564 100644 --- a/Mage.Sets/src/mage/cards/k/KoboldsOfKherKeep.java +++ b/Mage.Sets/src/mage/cards/k/KoboldsOfKherKeep.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class KoboldsOfKherKeep extends CardImpl { public KoboldsOfKherKeep(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{0}"); this.color.setRed(true); - this.subtype.add("Kobold"); + this.subtype.add(SubType.KOBOLD); this.power = new MageInt(0); this.toughness = new MageInt(1); } diff --git a/Mage.Sets/src/mage/cards/k/KodamaOfTheCenterTree.java b/Mage.Sets/src/mage/cards/k/KodamaOfTheCenterTree.java index 20ebf0185c..86305610ad 100644 --- a/Mage.Sets/src/mage/cards/k/KodamaOfTheCenterTree.java +++ b/Mage.Sets/src/mage/cards/k/KodamaOfTheCenterTree.java @@ -54,7 +54,7 @@ public class KodamaOfTheCenterTree extends CardImpl { public KodamaOfTheCenterTree(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/k/KodamaOfTheNorthTree.java b/Mage.Sets/src/mage/cards/k/KodamaOfTheNorthTree.java index 5ca35ebce3..102ed34aca 100644 --- a/Mage.Sets/src/mage/cards/k/KodamaOfTheNorthTree.java +++ b/Mage.Sets/src/mage/cards/k/KodamaOfTheNorthTree.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -46,7 +47,7 @@ public class KodamaOfTheNorthTree extends CardImpl { public KodamaOfTheNorthTree (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KodamaOfTheSouthTree.java b/Mage.Sets/src/mage/cards/k/KodamaOfTheSouthTree.java index 6615ec1742..ace1fe5736 100644 --- a/Mage.Sets/src/mage/cards/k/KodamaOfTheSouthTree.java +++ b/Mage.Sets/src/mage/cards/k/KodamaOfTheSouthTree.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.filter.StaticFilters; @@ -50,7 +51,7 @@ public class KodamaOfTheSouthTree extends CardImpl { public KodamaOfTheSouthTree(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KodamasMight.java b/Mage.Sets/src/mage/cards/k/KodamasMight.java index c2758c6501..59577d4708 100644 --- a/Mage.Sets/src/mage/cards/k/KodamasMight.java +++ b/Mage.Sets/src/mage/cards/k/KodamasMight.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SpliceOntoArcaneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -44,7 +45,7 @@ public class KodamasMight extends CardImpl { public KodamasMight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Target creature gets +2/+2 until end of turn. diff --git a/Mage.Sets/src/mage/cards/k/KokushoTheEveningStar.java b/Mage.Sets/src/mage/cards/k/KokushoTheEveningStar.java index 9947f14000..dabed449cd 100644 --- a/Mage.Sets/src/mage/cards/k/KokushoTheEveningStar.java +++ b/Mage.Sets/src/mage/cards/k/KokushoTheEveningStar.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.game.Game; @@ -49,8 +50,8 @@ public class KokushoTheEveningStar extends CardImpl { public KokushoTheEveningStar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DRAGON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KolaghanAspirant.java b/Mage.Sets/src/mage/cards/k/KolaghanAspirant.java index 59f3d23c5e..65ef670bd0 100644 --- a/Mage.Sets/src/mage/cards/k/KolaghanAspirant.java +++ b/Mage.Sets/src/mage/cards/k/KolaghanAspirant.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class KolaghanAspirant extends CardImpl { public KolaghanAspirant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KolaghanForerunners.java b/Mage.Sets/src/mage/cards/k/KolaghanForerunners.java index cb1fa32496..b5a1c8ac5f 100644 --- a/Mage.Sets/src/mage/cards/k/KolaghanForerunners.java +++ b/Mage.Sets/src/mage/cards/k/KolaghanForerunners.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -50,8 +51,8 @@ public class KolaghanForerunners extends CardImpl { public KolaghanForerunners(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KolaghanMonument.java b/Mage.Sets/src/mage/cards/k/KolaghanMonument.java index f393365e18..8353e9a578 100644 --- a/Mage.Sets/src/mage/cards/k/KolaghanMonument.java +++ b/Mage.Sets/src/mage/cards/k/KolaghanMonument.java @@ -38,6 +38,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -76,7 +77,7 @@ public class KolaghanMonument extends CardImpl { cardType.add(CardType.CREATURE); color.setBlack(true); color.setRed(true); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); power = new MageInt(4); toughness = new MageInt(4); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/k/KolaghanSkirmisher.java b/Mage.Sets/src/mage/cards/k/KolaghanSkirmisher.java index e36d1d85e7..f1ebe5d5c3 100644 --- a/Mage.Sets/src/mage/cards/k/KolaghanSkirmisher.java +++ b/Mage.Sets/src/mage/cards/k/KolaghanSkirmisher.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class KolaghanSkirmisher extends CardImpl { public KolaghanSkirmisher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KolaghanStormsinger.java b/Mage.Sets/src/mage/cards/k/KolaghanStormsinger.java index ed367d85f8..3c8b80bc06 100644 --- a/Mage.Sets/src/mage/cards/k/KolaghanStormsinger.java +++ b/Mage.Sets/src/mage/cards/k/KolaghanStormsinger.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class KolaghanStormsinger extends CardImpl { public KolaghanStormsinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KolaghanTheStormsFury.java b/Mage.Sets/src/mage/cards/k/KolaghanTheStormsFury.java index f082e538f5..1481d216ee 100644 --- a/Mage.Sets/src/mage/cards/k/KolaghanTheStormsFury.java +++ b/Mage.Sets/src/mage/cards/k/KolaghanTheStormsFury.java @@ -57,7 +57,7 @@ public class KolaghanTheStormsFury extends CardImpl { public KolaghanTheStormsFury(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KondaLordOfEiganjo.java b/Mage.Sets/src/mage/cards/k/KondaLordOfEiganjo.java index 8f7f7ea86c..a188f98bae 100644 --- a/Mage.Sets/src/mage/cards/k/KondaLordOfEiganjo.java +++ b/Mage.Sets/src/mage/cards/k/KondaLordOfEiganjo.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -45,8 +46,8 @@ public class KondaLordOfEiganjo extends CardImpl { public KondaLordOfEiganjo(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KondasBanner.java b/Mage.Sets/src/mage/cards/k/KondasBanner.java index d71cc16ceb..b0e4d987ed 100644 --- a/Mage.Sets/src/mage/cards/k/KondasBanner.java +++ b/Mage.Sets/src/mage/cards/k/KondasBanner.java @@ -62,7 +62,7 @@ public class KondasBanner extends CardImpl { public KondasBanner(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); Target target = new TargetControlledCreaturePermanent(1, 1, legendaryFilter, false); // Konda's Banner can be attached only to a legendary creature. diff --git a/Mage.Sets/src/mage/cards/k/KondasHatamoto.java b/Mage.Sets/src/mage/cards/k/KondasHatamoto.java index a6de39a36e..6a05dbbc0f 100644 --- a/Mage.Sets/src/mage/cards/k/KondasHatamoto.java +++ b/Mage.Sets/src/mage/cards/k/KondasHatamoto.java @@ -60,8 +60,8 @@ public class KondasHatamoto extends CardImpl { public KondasHatamoto (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KongmingSleepingDragon.java b/Mage.Sets/src/mage/cards/k/KongmingSleepingDragon.java index 040913e25e..3e2ab77b32 100644 --- a/Mage.Sets/src/mage/cards/k/KongmingSleepingDragon.java +++ b/Mage.Sets/src/mage/cards/k/KongmingSleepingDragon.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class KongmingSleepingDragon extends CardImpl { public KongmingSleepingDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/Kookus.java b/Mage.Sets/src/mage/cards/k/Kookus.java new file mode 100644 index 0000000000..f23bb68e14 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/Kookus.java @@ -0,0 +1,99 @@ +/* + * 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.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.InvertCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.costs.mana.ColoredManaCost; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DamageControllerEffect; +import mage.abilities.effects.common.combat.AttacksIfAbleSourceEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.NamePredicate; + +/** + * + * @author TheElk801 + */ +public class Kookus extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + static { + filter.add(new NamePredicate("Keeper of Kookus")); + } + + public Kookus(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + + this.subtype.add(SubType.DJINN); + this.power = new MageInt(3); + this.toughness = new MageInt(5); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // At the beginning of your upkeep, if you don't control a creature named Keeper of Kookus, Kookus deals 3 damage to you and attacks this turn if able. + TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new DamageControllerEffect(3), TargetController.YOU, false); + ability.addEffect(new AttacksIfAbleSourceEffect(Duration.EndOfTurn)); + this.addAbility(new ConditionalTriggeredAbility( + ability, + new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)), + "At the beginning of your upkeep, " + + "if you don't control a creature named Keeper of Kookus, " + + "{this} deals 3 damage to you and attacks this turn if able" + )); + + // {R}: Kookus gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.R))); + } + + public Kookus(final Kookus card) { + super(card); + } + + @Override + public Kookus copy() { + return new Kookus(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KopalaWardenOfWaves.java b/Mage.Sets/src/mage/cards/k/KopalaWardenOfWaves.java new file mode 100644 index 0000000000..97ccc00579 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KopalaWardenOfWaves.java @@ -0,0 +1,184 @@ +/* + * 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.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.cost.CostModificationEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityType; +import mage.constants.CardType; +import mage.constants.CostModificationType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.Target; +import mage.util.CardUtil; + +/** + * + * @author TheElk801 + */ +public class KopalaWardenOfWaves extends CardImpl { + + public KopalaWardenOfWaves(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); + + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Spells your opponents cast that target a Merfolk you control cost {2} more to cast. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KopalaWardenOfWavesCostReductionEffect())); + + // Abilities your opponents activate that target a Merfolk you control cost {2} more to activate. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KopalaWardenOfWavesCostReductionEffect2())); + } + + public KopalaWardenOfWaves(final KopalaWardenOfWaves card) { + super(card); + } + + @Override + public KopalaWardenOfWaves copy() { + return new KopalaWardenOfWaves(this); + } +} + +class KopalaWardenOfWavesCostReductionEffect extends CostModificationEffectImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a Merfolk you control"); + private static final String effectText = "Spells your opponents cast that target a Merfolk you control cost {2} more to cast"; + + static { + filter.add(new SubtypePredicate(SubType.MERFOLK)); + } + + KopalaWardenOfWavesCostReductionEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.INCREASE_COST); + staticText = effectText; + } + + KopalaWardenOfWavesCostReductionEffect(KopalaWardenOfWavesCostReductionEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source, Ability abilityToModify) { + SpellAbility spellAbility = (SpellAbility) abilityToModify; + CardUtil.adjustCost(spellAbility, -2); + return true; + } + + @Override + public boolean applies(Ability abilityToModify, Ability source, Game game) { + if (abilityToModify.getAbilityType() == AbilityType.SPELL) { + if (game.getOpponents(source.getControllerId()).contains(abilityToModify.getControllerId())) { + for (Target target : abilityToModify.getTargets()) { + for (UUID targetUUID : target.getTargets()) { + Permanent creature = game.getPermanent(targetUUID); + if (creature != null + && filter.match(creature, game) + && creature.getControllerId().equals(source.getControllerId())) { + return true; + } + } + } + } + } + return false; + } + + @Override + public KopalaWardenOfWavesCostReductionEffect copy() { + return new KopalaWardenOfWavesCostReductionEffect(this); + } + +} + +class KopalaWardenOfWavesCostReductionEffect2 extends CostModificationEffectImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a Merfolk you control"); + private static final String effectText = "Abilities your opponents activate that target a Merfolk you control cost {2} more to activate"; + + static { + filter.add(new SubtypePredicate(SubType.MERFOLK)); + } + + KopalaWardenOfWavesCostReductionEffect2() { + super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.INCREASE_COST); + staticText = effectText; + } + + KopalaWardenOfWavesCostReductionEffect2(KopalaWardenOfWavesCostReductionEffect2 effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source, Ability abilityToModify) { + CardUtil.increaseCost(abilityToModify, 2); + return true; + } + + @Override + public boolean applies(Ability abilityToModify, Ability source, Game game) { + if (abilityToModify.getAbilityType() == AbilityType.ACTIVATED) { + if (game.getOpponents(source.getControllerId()).contains(abilityToModify.getControllerId())) { + for (Target target : abilityToModify.getTargets()) { + for (UUID targetUUID : target.getTargets()) { + Permanent creature = game.getPermanent(targetUUID); + if (creature != null + && filter.match(creature, game) + && creature.getControllerId().equals(source.getControllerId())) { + return true; + } + } + } + } + } + return false; + } + + @Override + public KopalaWardenOfWavesCostReductionEffect2 copy() { + return new KopalaWardenOfWavesCostReductionEffect2(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/k/KorAeronaut.java b/Mage.Sets/src/mage/cards/k/KorAeronaut.java index 16b583073e..ae5c4bbb19 100644 --- a/Mage.Sets/src/mage/cards/k/KorAeronaut.java +++ b/Mage.Sets/src/mage/cards/k/KorAeronaut.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class KorAeronaut extends CardImpl { public KorAeronaut(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KorBladewhirl.java b/Mage.Sets/src/mage/cards/k/KorBladewhirl.java index c162f63f81..5507968208 100644 --- a/Mage.Sets/src/mage/cards/k/KorBladewhirl.java +++ b/Mage.Sets/src/mage/cards/k/KorBladewhirl.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; @@ -46,9 +47,9 @@ public class KorBladewhirl extends CardImpl { public KorBladewhirl(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Soldier"); - this.subtype.add("Ally"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KorCartographer.java b/Mage.Sets/src/mage/cards/k/KorCartographer.java index 7d0cf774f9..53c964802c 100644 --- a/Mage.Sets/src/mage/cards/k/KorCartographer.java +++ b/Mage.Sets/src/mage/cards/k/KorCartographer.java @@ -46,8 +46,8 @@ public class KorCartographer extends CardImpl { public KorCartographer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Scout"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KorCastigator.java b/Mage.Sets/src/mage/cards/k/KorCastigator.java index af2289d202..1a1a39fbbd 100644 --- a/Mage.Sets/src/mage/cards/k/KorCastigator.java +++ b/Mage.Sets/src/mage/cards/k/KorCastigator.java @@ -54,9 +54,9 @@ public class KorCastigator extends CardImpl { public KorCastigator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Wizard"); - this.subtype.add("Ally"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.WIZARD); + this.subtype.add(SubType.ALLY); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KorChant.java b/Mage.Sets/src/mage/cards/k/KorChant.java index cccec9e03d..c43f7791aa 100644 --- a/Mage.Sets/src/mage/cards/k/KorChant.java +++ b/Mage.Sets/src/mage/cards/k/KorChant.java @@ -50,7 +50,7 @@ import mage.target.common.TargetCreaturePermanent; public class KorChant extends CardImpl { public KorChant(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}"); // All damage that would be dealt this turn to target creature you control by a source of your choice is dealt to another target creature instead. this.getSpellAbility().addEffect(new KorChantEffect()); diff --git a/Mage.Sets/src/mage/cards/k/KorDirge.java b/Mage.Sets/src/mage/cards/k/KorDirge.java new file mode 100644 index 0000000000..c3020420e9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KorDirge.java @@ -0,0 +1,117 @@ +/* + * 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.cards.k; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.RedirectionEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AnotherTargetPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.target.TargetSource; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author emerald000 + */ +public class KorDirge extends CardImpl { + + public KorDirge(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}"); + + // All damage that would be dealt this turn to target creature you control by a source of your choice is dealt to another target creature instead. + this.getSpellAbility().addEffect(new KorDirgeEffect()); + TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent(); + target.setTargetTag(1); + this.getSpellAbility().addTarget(target); + + FilterCreaturePermanent filter = new FilterCreaturePermanent("another target creature"); + filter.add(new AnotherTargetPredicate(2)); + TargetCreaturePermanent target2 = new TargetCreaturePermanent(filter); + target2.setTargetTag(2); + this.getSpellAbility().addTarget(target2); + } + + public KorDirge(final KorDirge card) { + super(card); + } + + @Override + public KorDirge copy() { + return new KorDirge(this); + } +} + +class KorDirgeEffect extends RedirectionEffect { + + protected TargetSource target = new TargetSource(); + + KorDirgeEffect() { + super(Duration.EndOfTurn); + staticText = "All damage that would be dealt this turn to target creature you control by a source of your choice is dealt to another target creature instead"; + } + + KorDirgeEffect(final KorDirgeEffect effect) { + super(effect); + this.target = effect.target; + } + + @Override + public KorDirgeEffect copy() { + return new KorDirgeEffect(this); + } + + @Override + public void init(Ability source, Game game) { + super.init(source, game); + this.target.choose(Outcome.PreventDamage, source.getControllerId(), source.getSourceId(), game); + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DAMAGE_CREATURE; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getTargetId().equals(this.getTargetPointer().getFirst(game, source)) + && event.getSourceId().equals(this.target.getFirstTarget())) { + this.redirectTarget = source.getTargets().get(1); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/k/KorDuelist.java b/Mage.Sets/src/mage/cards/k/KorDuelist.java index 441cb02b49..3dad3f3d16 100644 --- a/Mage.Sets/src/mage/cards/k/KorDuelist.java +++ b/Mage.Sets/src/mage/cards/k/KorDuelist.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -54,8 +55,8 @@ public class KorDuelist extends CardImpl { public KorDuelist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Kor"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -83,7 +84,7 @@ class SourceIsEquiped implements Condition { for (UUID attachmentUUID : attachments) { Permanent attachment = game.getPermanent(attachmentUUID); if (attachment != null) { - if (attachment.getSubtype(game).contains("Equipment")) { + if (attachment.hasSubtype(SubType.EQUIPMENT, game)) { return true; } } diff --git a/Mage.Sets/src/mage/cards/k/KorEntanglers.java b/Mage.Sets/src/mage/cards/k/KorEntanglers.java index bf294fc722..c56629d60d 100644 --- a/Mage.Sets/src/mage/cards/k/KorEntanglers.java +++ b/Mage.Sets/src/mage/cards/k/KorEntanglers.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -54,9 +55,9 @@ public class KorEntanglers extends CardImpl { public KorEntanglers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Soldier"); - this.subtype.add("Ally"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ALLY); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KorFirewalker.java b/Mage.Sets/src/mage/cards/k/KorFirewalker.java index f8008bc403..f4333c061a 100644 --- a/Mage.Sets/src/mage/cards/k/KorFirewalker.java +++ b/Mage.Sets/src/mage/cards/k/KorFirewalker.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -51,8 +52,8 @@ public class KorFirewalker extends CardImpl { public KorFirewalker (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SOLDIER); this.color.setWhite(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KorHookmaster.java b/Mage.Sets/src/mage/cards/k/KorHookmaster.java index 9228efb220..adc42554b4 100644 --- a/Mage.Sets/src/mage/cards/k/KorHookmaster.java +++ b/Mage.Sets/src/mage/cards/k/KorHookmaster.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -54,8 +55,8 @@ public class KorHookmaster extends CardImpl { public KorHookmaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KorLineSlinger.java b/Mage.Sets/src/mage/cards/k/KorLineSlinger.java index 6df9cb6d24..ea944e5c53 100644 --- a/Mage.Sets/src/mage/cards/k/KorLineSlinger.java +++ b/Mage.Sets/src/mage/cards/k/KorLineSlinger.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -55,8 +56,8 @@ public class KorLineSlinger extends CardImpl { public KorLineSlinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Scout"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KorOutfitter.java b/Mage.Sets/src/mage/cards/k/KorOutfitter.java index 9c37c2639e..8183066c07 100644 --- a/Mage.Sets/src/mage/cards/k/KorOutfitter.java +++ b/Mage.Sets/src/mage/cards/k/KorOutfitter.java @@ -58,8 +58,8 @@ public class KorOutfitter extends CardImpl { public KorOutfitter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KorSanctifiers.java b/Mage.Sets/src/mage/cards/k/KorSanctifiers.java index c137f0f7ef..449aa0cd44 100644 --- a/Mage.Sets/src/mage/cards/k/KorSanctifiers.java +++ b/Mage.Sets/src/mage/cards/k/KorSanctifiers.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.TargetPermanent; @@ -49,8 +50,8 @@ public class KorSanctifiers extends CardImpl { public KorSanctifiers (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KorScythemaster.java b/Mage.Sets/src/mage/cards/k/KorScythemaster.java index 1833b779e2..113cdae3f8 100644 --- a/Mage.Sets/src/mage/cards/k/KorScythemaster.java +++ b/Mage.Sets/src/mage/cards/k/KorScythemaster.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,9 +48,9 @@ public class KorScythemaster extends CardImpl { public KorScythemaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Soldier"); - this.subtype.add("Ally"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ALLY); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KorSkyClimber.java b/Mage.Sets/src/mage/cards/k/KorSkyClimber.java index 91bedd6047..7f23dc9996 100644 --- a/Mage.Sets/src/mage/cards/k/KorSkyClimber.java +++ b/Mage.Sets/src/mage/cards/k/KorSkyClimber.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,9 +48,9 @@ public class KorSkyClimber extends CardImpl { public KorSkyClimber(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Soldier"); - this.subtype.add("Ally"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ALLY); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KorSkyfisher.java b/Mage.Sets/src/mage/cards/k/KorSkyfisher.java index 97df84ed45..476b26065d 100644 --- a/Mage.Sets/src/mage/cards/k/KorSkyfisher.java +++ b/Mage.Sets/src/mage/cards/k/KorSkyfisher.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; /** @@ -46,8 +47,8 @@ public class KorSkyfisher extends CardImpl { public KorSkyfisher (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KorSpiritdancer.java b/Mage.Sets/src/mage/cards/k/KorSpiritdancer.java index 32a55ce24c..9b26a91129 100644 --- a/Mage.Sets/src/mage/cards/k/KorSpiritdancer.java +++ b/Mage.Sets/src/mage/cards/k/KorSpiritdancer.java @@ -57,8 +57,8 @@ public class KorSpiritdancer extends CardImpl { public KorSpiritdancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KorlashHeirToBlackblade.java b/Mage.Sets/src/mage/cards/k/KorlashHeirToBlackblade.java index b63ee9bbfa..283b3d1487 100644 --- a/Mage.Sets/src/mage/cards/k/KorlashHeirToBlackblade.java +++ b/Mage.Sets/src/mage/cards/k/KorlashHeirToBlackblade.java @@ -63,8 +63,8 @@ public class KorlashHeirToBlackblade extends CardImpl { public KorlashHeirToBlackblade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Zombie"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/k/KorozdaGorgon.java b/Mage.Sets/src/mage/cards/k/KorozdaGorgon.java index 260af2baf1..fbc2acde25 100644 --- a/Mage.Sets/src/mage/cards/k/KorozdaGorgon.java +++ b/Mage.Sets/src/mage/cards/k/KorozdaGorgon.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -52,7 +53,7 @@ public class KorozdaGorgon extends CardImpl { public KorozdaGorgon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{G}"); - this.subtype.add("Gorgon"); + this.subtype.add(SubType.GORGON); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KorozdaGuildmage.java b/Mage.Sets/src/mage/cards/k/KorozdaGuildmage.java index 2420fb4d48..bd80626260 100644 --- a/Mage.Sets/src/mage/cards/k/KorozdaGuildmage.java +++ b/Mage.Sets/src/mage/cards/k/KorozdaGuildmage.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.IntimidateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -64,8 +65,8 @@ public class KorozdaGuildmage extends CardImpl { public KorozdaGuildmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KorozdaMonitor.java b/Mage.Sets/src/mage/cards/k/KorozdaMonitor.java index 9ddd7a0ff9..424577e09c 100644 --- a/Mage.Sets/src/mage/cards/k/KorozdaMonitor.java +++ b/Mage.Sets/src/mage/cards/k/KorozdaMonitor.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class KorozdaMonitor extends CardImpl { public KorozdaMonitor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KothOfTheHammer.java b/Mage.Sets/src/mage/cards/k/KothOfTheHammer.java index d063895cfe..5141763228 100644 --- a/Mage.Sets/src/mage/cards/k/KothOfTheHammer.java +++ b/Mage.Sets/src/mage/cards/k/KothOfTheHammer.java @@ -69,7 +69,7 @@ public class KothOfTheHammer extends CardImpl { public KothOfTheHammer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{R}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Koth"); + this.subtype.add(SubType.KOTH); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); @@ -101,7 +101,7 @@ class KothOfTheHammerToken extends Token { public KothOfTheHammerToken() { super("Elemental", "4/4 red Elemental"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.color.setRed(true); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KothophedSoulHoarder.java b/Mage.Sets/src/mage/cards/k/KothophedSoulHoarder.java index 0607e646df..f6752c0ed8 100644 --- a/Mage.Sets/src/mage/cards/k/KothophedSoulHoarder.java +++ b/Mage.Sets/src/mage/cards/k/KothophedSoulHoarder.java @@ -40,6 +40,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.constants.Zone; @@ -65,7 +66,7 @@ public class KothophedSoulHoarder extends CardImpl { public KothophedSoulHoarder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/k/KothsCourier.java b/Mage.Sets/src/mage/cards/k/KothsCourier.java index e3e82b7b3d..d588a1a4f7 100644 --- a/Mage.Sets/src/mage/cards/k/KothsCourier.java +++ b/Mage.Sets/src/mage/cards/k/KothsCourier.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class KothsCourier extends CardImpl { public KothsCourier (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KozilekButcherOfTruth.java b/Mage.Sets/src/mage/cards/k/KozilekButcherOfTruth.java index 5794b5f3da..1cad310e02 100644 --- a/Mage.Sets/src/mage/cards/k/KozilekButcherOfTruth.java +++ b/Mage.Sets/src/mage/cards/k/KozilekButcherOfTruth.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.AnnihilatorAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -48,7 +49,7 @@ public class KozilekButcherOfTruth extends CardImpl { public KozilekButcherOfTruth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{10}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(12); this.toughness = new MageInt(12); diff --git a/Mage.Sets/src/mage/cards/k/KozilekTheGreatDistortion.java b/Mage.Sets/src/mage/cards/k/KozilekTheGreatDistortion.java index 0199eb3c18..31db10e3dc 100644 --- a/Mage.Sets/src/mage/cards/k/KozilekTheGreatDistortion.java +++ b/Mage.Sets/src/mage/cards/k/KozilekTheGreatDistortion.java @@ -45,6 +45,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.SuperType; @@ -68,7 +69,7 @@ public class KozilekTheGreatDistortion extends CardImpl { public KozilekTheGreatDistortion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{8}{C}{C}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(12); this.toughness = new MageInt(12); diff --git a/Mage.Sets/src/mage/cards/k/KozileksChanneler.java b/Mage.Sets/src/mage/cards/k/KozileksChanneler.java index 524067c19d..f97c58e9eb 100644 --- a/Mage.Sets/src/mage/cards/k/KozileksChanneler.java +++ b/Mage.Sets/src/mage/cards/k/KozileksChanneler.java @@ -35,6 +35,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class KozileksChanneler extends CardImpl { public KozileksChanneler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KozileksPathfinder.java b/Mage.Sets/src/mage/cards/k/KozileksPathfinder.java index 64c00254ee..743231782c 100644 --- a/Mage.Sets/src/mage/cards/k/KozileksPathfinder.java +++ b/Mage.Sets/src/mage/cards/k/KozileksPathfinder.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByTargetSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class KozileksPathfinder extends CardImpl { public KozileksPathfinder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KozileksPredator.java b/Mage.Sets/src/mage/cards/k/KozileksPredator.java index be6f772583..c7be307c3f 100644 --- a/Mage.Sets/src/mage/cards/k/KozileksPredator.java +++ b/Mage.Sets/src/mage/cards/k/KozileksPredator.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.EldraziSpawnToken; /** @@ -45,8 +46,8 @@ public class KozileksPredator extends CardImpl { public KozileksPredator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KozileksSentinel.java b/Mage.Sets/src/mage/cards/k/KozileksSentinel.java index 1b81f01ed6..2a7f269e63 100644 --- a/Mage.Sets/src/mage/cards/k/KozileksSentinel.java +++ b/Mage.Sets/src/mage/cards/k/KozileksSentinel.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorlessPredicate; @@ -53,8 +54,8 @@ public class KozileksSentinel extends CardImpl { public KozileksSentinel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KozileksShrieker.java b/Mage.Sets/src/mage/cards/k/KozileksShrieker.java index f951d92096..ef2a66100c 100644 --- a/Mage.Sets/src/mage/cards/k/KozileksShrieker.java +++ b/Mage.Sets/src/mage/cards/k/KozileksShrieker.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class KozileksShrieker extends CardImpl { public KozileksShrieker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KozileksTranslator.java b/Mage.Sets/src/mage/cards/k/KozileksTranslator.java index 2aff4e0f04..d13fb7d652 100644 --- a/Mage.Sets/src/mage/cards/k/KozileksTranslator.java +++ b/Mage.Sets/src/mage/cards/k/KozileksTranslator.java @@ -37,6 +37,7 @@ import mage.abilities.mana.ActivateOncePerTurnManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class KozileksTranslator extends CardImpl { public KozileksTranslator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KragmaButcher.java b/Mage.Sets/src/mage/cards/k/KragmaButcher.java index 9a3d2a775a..bae2fbb113 100644 --- a/Mage.Sets/src/mage/cards/k/KragmaButcher.java +++ b/Mage.Sets/src/mage/cards/k/KragmaButcher.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.InspiredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class KragmaButcher extends CardImpl { public KragmaButcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KragmaWarcaller.java b/Mage.Sets/src/mage/cards/k/KragmaWarcaller.java index 9a1b09b2e1..75966a015d 100644 --- a/Mage.Sets/src/mage/cards/k/KragmaWarcaller.java +++ b/Mage.Sets/src/mage/cards/k/KragmaWarcaller.java @@ -58,8 +58,8 @@ public class KragmaWarcaller extends CardImpl { public KragmaWarcaller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KrakenHatchling.java b/Mage.Sets/src/mage/cards/k/KrakenHatchling.java index db5850fab0..d6e4663d7e 100644 --- a/Mage.Sets/src/mage/cards/k/KrakenHatchling.java +++ b/Mage.Sets/src/mage/cards/k/KrakenHatchling.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class KrakenHatchling extends CardImpl { public KrakenHatchling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Kraken"); + this.subtype.add(SubType.KRAKEN); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KrakenOfTheStraits.java b/Mage.Sets/src/mage/cards/k/KrakenOfTheStraits.java index d7939796e5..bfaffa6121 100644 --- a/Mage.Sets/src/mage/cards/k/KrakenOfTheStraits.java +++ b/Mage.Sets/src/mage/cards/k/KrakenOfTheStraits.java @@ -53,7 +53,7 @@ public class KrakenOfTheStraits extends CardImpl { public KrakenOfTheStraits(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); - this.subtype.add("Kraken"); + this.subtype.add(SubType.KRAKEN); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/k/Krakilin.java b/Mage.Sets/src/mage/cards/k/Krakilin.java index 04892f7cb7..e7ea1123b1 100644 --- a/Mage.Sets/src/mage/cards/k/Krakilin.java +++ b/Mage.Sets/src/mage/cards/k/Krakilin.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -48,7 +49,7 @@ public class Krakilin extends CardImpl { public Krakilin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{X}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/k/KrallenhordeHowler.java b/Mage.Sets/src/mage/cards/k/KrallenhordeHowler.java index e144f17d23..d47960b358 100644 --- a/Mage.Sets/src/mage/cards/k/KrallenhordeHowler.java +++ b/Mage.Sets/src/mage/cards/k/KrallenhordeHowler.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.FilterCard; @@ -60,7 +61,7 @@ public class KrallenhordeHowler extends CardImpl { public KrallenhordeHowler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(3); this.toughness = new MageInt(3); this.color.setGreen(true); diff --git a/Mage.Sets/src/mage/cards/k/KrallenhordeKiller.java b/Mage.Sets/src/mage/cards/k/KrallenhordeKiller.java index 8d8795bef0..d3d5eb3470 100644 --- a/Mage.Sets/src/mage/cards/k/KrallenhordeKiller.java +++ b/Mage.Sets/src/mage/cards/k/KrallenhordeKiller.java @@ -50,7 +50,7 @@ public class KrallenhordeKiller extends CardImpl { public KrallenhordeKiller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.color.setGreen(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KrallenhordeWantons.java b/Mage.Sets/src/mage/cards/k/KrallenhordeWantons.java index 6e1d20ed9a..bf769ffb87 100644 --- a/Mage.Sets/src/mage/cards/k/KrallenhordeWantons.java +++ b/Mage.Sets/src/mage/cards/k/KrallenhordeWantons.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -48,7 +49,7 @@ public class KrallenhordeWantons extends CardImpl { public KrallenhordeWantons(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.color.setGreen(true); // this card is the second face of double-faced card diff --git a/Mage.Sets/src/mage/cards/k/Kranioceros.java b/Mage.Sets/src/mage/cards/k/Kranioceros.java index 8613a62fad..9f03289ffc 100644 --- a/Mage.Sets/src/mage/cards/k/Kranioceros.java +++ b/Mage.Sets/src/mage/cards/k/Kranioceros.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class Kranioceros extends CardImpl { public Kranioceros(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KrarkClanEngineers.java b/Mage.Sets/src/mage/cards/k/KrarkClanEngineers.java index 227b9e71c0..49f64a4eb5 100644 --- a/Mage.Sets/src/mage/cards/k/KrarkClanEngineers.java +++ b/Mage.Sets/src/mage/cards/k/KrarkClanEngineers.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; import mage.target.common.TargetArtifactPermanent; @@ -50,8 +51,8 @@ public class KrarkClanEngineers extends CardImpl { public KrarkClanEngineers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KrarkClanGrunt.java b/Mage.Sets/src/mage/cards/k/KrarkClanGrunt.java index 34881aea4f..2c44813444 100644 --- a/Mage.Sets/src/mage/cards/k/KrarkClanGrunt.java +++ b/Mage.Sets/src/mage/cards/k/KrarkClanGrunt.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -58,8 +59,8 @@ public class KrarkClanGrunt extends CardImpl { public KrarkClanGrunt(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KrarkClanOgre.java b/Mage.Sets/src/mage/cards/k/KrarkClanOgre.java index 69ed92cc26..868a000903 100644 --- a/Mage.Sets/src/mage/cards/k/KrarkClanOgre.java +++ b/Mage.Sets/src/mage/cards/k/KrarkClanOgre.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.combat.CantBlockTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; @@ -51,7 +52,7 @@ public class KrarkClanOgre extends CardImpl { public KrarkClanOgre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Ogre"); + this.subtype.add(SubType.OGRE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KrarkClanShaman.java b/Mage.Sets/src/mage/cards/k/KrarkClanShaman.java index 3fa94ff7f1..b3f29c1107 100644 --- a/Mage.Sets/src/mage/cards/k/KrarkClanShaman.java +++ b/Mage.Sets/src/mage/cards/k/KrarkClanShaman.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterCreaturePermanent; @@ -60,8 +61,8 @@ public class KrarkClanShaman extends CardImpl { public KrarkClanShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KrarkClanStoker.java b/Mage.Sets/src/mage/cards/k/KrarkClanStoker.java index c4a3f6ebb5..8e5dadb702 100644 --- a/Mage.Sets/src/mage/cards/k/KrarkClanStoker.java +++ b/Mage.Sets/src/mage/cards/k/KrarkClanStoker.java @@ -38,6 +38,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; import mage.target.common.TargetControlledPermanent; @@ -49,8 +50,8 @@ public class KrarkClanStoker extends CardImpl { public KrarkClanStoker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KrasisIncubation.java b/Mage.Sets/src/mage/cards/k/KrasisIncubation.java index ae0d883049..eb7d2035ce 100644 --- a/Mage.Sets/src/mage/cards/k/KrasisIncubation.java +++ b/Mage.Sets/src/mage/cards/k/KrasisIncubation.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -53,7 +54,7 @@ public class KrasisIncubation extends CardImpl { public KrasisIncubation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/k/KraulWarrior.java b/Mage.Sets/src/mage/cards/k/KraulWarrior.java index edeba3cfc4..fab7a541dd 100644 --- a/Mage.Sets/src/mage/cards/k/KraulWarrior.java +++ b/Mage.Sets/src/mage/cards/k/KraulWarrior.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class KraulWarrior extends CardImpl { public KraulWarrior (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Insect"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KraumLudevicsOpus.java b/Mage.Sets/src/mage/cards/k/KraumLudevicsOpus.java index 25bb1b5c1e..bc35b0ed99 100644 --- a/Mage.Sets/src/mage/cards/k/KraumLudevicsOpus.java +++ b/Mage.Sets/src/mage/cards/k/KraumLudevicsOpus.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.PartnerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.game.Game; @@ -54,8 +55,8 @@ public class KraumLudevicsOpus extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Zombie"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KrenkoMobBoss.java b/Mage.Sets/src/mage/cards/k/KrenkoMobBoss.java index 97dfea1732..835c919e16 100644 --- a/Mage.Sets/src/mage/cards/k/KrenkoMobBoss.java +++ b/Mage.Sets/src/mage/cards/k/KrenkoMobBoss.java @@ -58,8 +58,8 @@ public class KrenkoMobBoss extends CardImpl { public KrenkoMobBoss(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KrenkosEnforcer.java b/Mage.Sets/src/mage/cards/k/KrenkosEnforcer.java index e449aa9681..de9bec8699 100644 --- a/Mage.Sets/src/mage/cards/k/KrenkosEnforcer.java +++ b/Mage.Sets/src/mage/cards/k/KrenkosEnforcer.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.IntimidateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class KrenkosEnforcer extends CardImpl { public KrenkosEnforcer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KreshTheBloodbraided.java b/Mage.Sets/src/mage/cards/k/KreshTheBloodbraided.java index f10734e036..22bf665e98 100644 --- a/Mage.Sets/src/mage/cards/k/KreshTheBloodbraided.java +++ b/Mage.Sets/src/mage/cards/k/KreshTheBloodbraided.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class KreshTheBloodbraided extends CardImpl { public KreshTheBloodbraided(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KrisMage.java b/Mage.Sets/src/mage/cards/k/KrisMage.java index 24a199a264..b68c394a9f 100644 --- a/Mage.Sets/src/mage/cards/k/KrisMage.java +++ b/Mage.Sets/src/mage/cards/k/KrisMage.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -49,8 +50,8 @@ public class KrisMage extends CardImpl { public KrisMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KrondTheDawnClad.java b/Mage.Sets/src/mage/cards/k/KrondTheDawnClad.java index e8765707fd..2f581caa99 100644 --- a/Mage.Sets/src/mage/cards/k/KrondTheDawnClad.java +++ b/Mage.Sets/src/mage/cards/k/KrondTheDawnClad.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class KrondTheDawnClad extends CardImpl { public KrondTheDawnClad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}{G}{W}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Archon"); + this.subtype.add(SubType.ARCHON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/k/KrosanArcher.java b/Mage.Sets/src/mage/cards/k/KrosanArcher.java index f45ee82503..6067977d1f 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanArcher.java +++ b/Mage.Sets/src/mage/cards/k/KrosanArcher.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class KrosanArcher extends CardImpl { public KrosanArcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Archer"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KrosanAvenger.java b/Mage.Sets/src/mage/cards/k/KrosanAvenger.java index 569843340d..e73922a908 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanAvenger.java +++ b/Mage.Sets/src/mage/cards/k/KrosanAvenger.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -49,8 +50,8 @@ public class KrosanAvenger extends CardImpl { public KrosanAvenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KrosanBeast.java b/Mage.Sets/src/mage/cards/k/KrosanBeast.java index 87a035e9a3..e9b4631037 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanBeast.java +++ b/Mage.Sets/src/mage/cards/k/KrosanBeast.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class KrosanBeast extends CardImpl { public KrosanBeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Squirrel"); - this.subtype.add("Beast"); + this.subtype.add(SubType.SQUIRREL); + this.subtype.add(SubType.BEAST); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KrosanCloudscraper.java b/Mage.Sets/src/mage/cards/k/KrosanCloudscraper.java index c7c9480bac..987ffb97d9 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanCloudscraper.java +++ b/Mage.Sets/src/mage/cards/k/KrosanCloudscraper.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -46,8 +47,8 @@ public class KrosanCloudscraper extends CardImpl { public KrosanCloudscraper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{7}{G}{G}{G}"); - this.subtype.add("Beast"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.BEAST); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(13); this.toughness = new MageInt(13); diff --git a/Mage.Sets/src/mage/cards/k/KrosanColossus.java b/Mage.Sets/src/mage/cards/k/KrosanColossus.java index d1039d154e..eef57eca2c 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanColossus.java +++ b/Mage.Sets/src/mage/cards/k/KrosanColossus.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class KrosanColossus extends CardImpl { public KrosanColossus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(9); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/k/KrosanConstrictor.java b/Mage.Sets/src/mage/cards/k/KrosanConstrictor.java index 2d009d451d..4760153f6d 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanConstrictor.java +++ b/Mage.Sets/src/mage/cards/k/KrosanConstrictor.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -58,7 +59,7 @@ public class KrosanConstrictor extends CardImpl { public KrosanConstrictor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KrosanDrover.java b/Mage.Sets/src/mage/cards/k/KrosanDrover.java index 220bed9328..b8237a2beb 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanDrover.java +++ b/Mage.Sets/src/mage/cards/k/KrosanDrover.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.FilterCard; @@ -55,7 +56,7 @@ public class KrosanDrover extends CardImpl { public KrosanDrover(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KrosanGroundshaker.java b/Mage.Sets/src/mage/cards/k/KrosanGroundshaker.java index bff9e2b0f6..f9f5c6acbb 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanGroundshaker.java +++ b/Mage.Sets/src/mage/cards/k/KrosanGroundshaker.java @@ -58,7 +58,7 @@ public class KrosanGroundshaker extends CardImpl { public KrosanGroundshaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/k/KrosanRestorer.java b/Mage.Sets/src/mage/cards/k/KrosanRestorer.java index 99a56b4894..c70b9eff3f 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanRestorer.java +++ b/Mage.Sets/src/mage/cards/k/KrosanRestorer.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; import mage.target.common.TargetLandPermanent; @@ -51,8 +52,8 @@ public class KrosanRestorer extends CardImpl { public KrosanRestorer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KrosanTusker.java b/Mage.Sets/src/mage/cards/k/KrosanTusker.java index ab6605f75b..8bfa0b8f7a 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanTusker.java +++ b/Mage.Sets/src/mage/cards/k/KrosanTusker.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.target.common.TargetCardInLibrary; @@ -48,8 +49,8 @@ public class KrosanTusker extends CardImpl { public KrosanTusker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Boar"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BOAR); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KrosanVorine.java b/Mage.Sets/src/mage/cards/k/KrosanVorine.java index 2417139768..2caacffd4a 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanVorine.java +++ b/Mage.Sets/src/mage/cards/k/KrosanVorine.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class KrosanVorine extends CardImpl { public KrosanVorine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Cat"); - this.subtype.add("Beast"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KrosanWarchief.java b/Mage.Sets/src/mage/cards/k/KrosanWarchief.java index 7e7a8c66ad..cd69b12c51 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanWarchief.java +++ b/Mage.Sets/src/mage/cards/k/KrosanWarchief.java @@ -61,7 +61,7 @@ public class KrosanWarchief extends CardImpl { public KrosanWarchief(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KrosanWayfarer.java b/Mage.Sets/src/mage/cards/k/KrosanWayfarer.java index 0faba44626..2d8ff4b391 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanWayfarer.java +++ b/Mage.Sets/src/mage/cards/k/KrosanWayfarer.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.PutLandFromHandOntoBattlefieldEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class KrosanWayfarer extends CardImpl { public KrosanWayfarer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KrovikanFetish.java b/Mage.Sets/src/mage/cards/k/KrovikanFetish.java index b769ab6104..16f946c035 100644 --- a/Mage.Sets/src/mage/cards/k/KrovikanFetish.java +++ b/Mage.Sets/src/mage/cards/k/KrovikanFetish.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class KrovikanFetish extends CardImpl { public KrovikanFetish(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/k/KrovikanMist.java b/Mage.Sets/src/mage/cards/k/KrovikanMist.java index 17b9c8f116..e937c2d8db 100644 --- a/Mage.Sets/src/mage/cards/k/KrovikanMist.java +++ b/Mage.Sets/src/mage/cards/k/KrovikanMist.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; import mage.constants.Zone; -import mage.filter.common.FilterControlledPermanent; +import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; /** @@ -47,16 +47,16 @@ import mage.filter.predicate.mageobject.SubtypePredicate; * @author LevelX2 */ public class KrovikanMist extends CardImpl { - - private static final FilterControlledPermanent controlledIllusionsFilter = new FilterControlledPermanent("Illusions you control"); - + + private static final FilterPermanent illusionsFilter = new FilterPermanent("Illusions on the battlefield"); + static { - controlledIllusionsFilter.add(new SubtypePredicate(SubType.ILLUSION)); + illusionsFilter.add(new SubtypePredicate(SubType.ILLUSION)); } public KrovikanMist(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Illusion"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(0); this.toughness = new MageInt(0); @@ -65,7 +65,7 @@ public class KrovikanMist extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Krovikan Mist's power and toughness are each equal to the number of Illusions on the battlefield. this.addAbility(new SimpleStaticAbility(Zone.ALL, - new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(controlledIllusionsFilter), Duration.EndOfGame))); + new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(illusionsFilter), Duration.EndOfGame))); } diff --git a/Mage.Sets/src/mage/cards/k/KrovikanPlague.java b/Mage.Sets/src/mage/cards/k/KrovikanPlague.java new file mode 100644 index 0000000000..7597a464d7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KrovikanPlague.java @@ -0,0 +1,102 @@ +/* + * 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.cards.k; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.ActivateIfConditionActivatedAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.condition.common.AttachedToMatchesFilterCondition; +import mage.abilities.costs.common.TapAttachedCost; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.counter.AddCountersAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.counters.BoostCounter; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author L_J + */ +public class KrovikanPlague extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("enchanted creature is untapped"); + + static { + filter.add(Predicates.not(new TappedPredicate())); + } + + public KrovikanPlague(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + this.subtype.add(SubType.AURA); + + // Enchant creature you control + TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // When Krovikan Plague enters the battlefield, draw a card at the beginning of the next turn's upkeep. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1), Duration.OneUse)), false)); + + // Tap enchanted creature: Tap enchanted creature: Krovikan Plague deals 1 damage to target creature or player. Put a -0/-1 counter on enchanted creature. Activate this ability only if enchanted creature is untapped. + Ability ability2 = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, + new DamageTargetEffect(1), new TapAttachedCost(), new AttachedToMatchesFilterCondition(filter)); + ability2.addEffect(new AddCountersAttachedEffect(new BoostCounter(0, -1),"enchanted creature")); + ability2.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability2); + + } + + public KrovikanPlague(final KrovikanPlague card) { + super(card); + } + + @Override + public KrovikanPlague copy() { + return new KrovikanPlague(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KrovikanScoundrel.java b/Mage.Sets/src/mage/cards/k/KrovikanScoundrel.java index f16482c892..9c3799b6f3 100644 --- a/Mage.Sets/src/mage/cards/k/KrovikanScoundrel.java +++ b/Mage.Sets/src/mage/cards/k/KrovikanScoundrel.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class KrovikanScoundrel extends CardImpl { public KrovikanScoundrel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KrovikanSorcerer.java b/Mage.Sets/src/mage/cards/k/KrovikanSorcerer.java index c4135aeb14..e950d3a058 100644 --- a/Mage.Sets/src/mage/cards/k/KrovikanSorcerer.java +++ b/Mage.Sets/src/mage/cards/k/KrovikanSorcerer.java @@ -42,6 +42,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -67,8 +68,8 @@ public class KrovikanSorcerer extends CardImpl { public KrovikanSorcerer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KrovikanWhispers.java b/Mage.Sets/src/mage/cards/k/KrovikanWhispers.java new file mode 100644 index 0000000000..2aee7e8829 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KrovikanWhispers.java @@ -0,0 +1,90 @@ +/* + * 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.cards.k; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.ControlEnchantedEffect; +import mage.abilities.costs.OrCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.MultipliedValue; +import mage.abilities.dynamicvalue.common.CountersSourceCount; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class KrovikanWhispers extends CardImpl { + + public KrovikanWhispers(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}"); + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.GainControl)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Cumulative upkeep-Pay {U} or {B}. + this.addAbility(new CumulativeUpkeepAbility(new OrCost(new ManaCostsImpl("{U}"), new ManaCostsImpl("{B}"), "{U} or {B}"))); + + // You control enchanted creature. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ControlEnchantedEffect())); + + // When Krovikan Whispers is put into a graveyard from the battlefield, you lose 2 life for each age counter on it. + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new LoseLifeSourceControllerEffect(new MultipliedValue(new CountersSourceCount(CounterType.AGE), 2)) + .setText("you lose 2 life for each age counter on it.") + )); + } + + public KrovikanWhispers(final KrovikanWhispers card) { + super(card); + } + + @Override + public KrovikanWhispers copy() { + return new KrovikanWhispers(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KruinOutlaw.java b/Mage.Sets/src/mage/cards/k/KruinOutlaw.java index 85c22f56c1..2a6b12b34a 100644 --- a/Mage.Sets/src/mage/cards/k/KruinOutlaw.java +++ b/Mage.Sets/src/mage/cards/k/KruinOutlaw.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.t.TerrorOfKruinPass; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -50,9 +51,9 @@ public class KruinOutlaw extends CardImpl { public KruinOutlaw(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); + this.subtype.add(SubType.WEREWOLF); this.transformable = true; this.secondSideCardClazz = TerrorOfKruinPass.class; diff --git a/Mage.Sets/src/mage/cards/k/KruinStriker.java b/Mage.Sets/src/mage/cards/k/KruinStriker.java index 10455961b7..e93d5ca133 100644 --- a/Mage.Sets/src/mage/cards/k/KruinStriker.java +++ b/Mage.Sets/src/mage/cards/k/KruinStriker.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; @@ -48,8 +49,8 @@ public class KruinStriker extends CardImpl { public KruinStriker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KrumarBondKin.java b/Mage.Sets/src/mage/cards/k/KrumarBondKin.java index c090e8a203..3712a5ea94 100644 --- a/Mage.Sets/src/mage/cards/k/KrumarBondKin.java +++ b/Mage.Sets/src/mage/cards/k/KrumarBondKin.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class KrumarBondKin extends CardImpl { public KrumarBondKin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Orc"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KruphixGodOfHorizons.java b/Mage.Sets/src/mage/cards/k/KruphixGodOfHorizons.java index 41b6e06495..c2cd7c15a7 100644 --- a/Mage.Sets/src/mage/cards/k/KruphixGodOfHorizons.java +++ b/Mage.Sets/src/mage/cards/k/KruphixGodOfHorizons.java @@ -52,7 +52,7 @@ public class KruphixGodOfHorizons extends CardImpl { public KruphixGodOfHorizons(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{G}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(4); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/k/Kudzu.java b/Mage.Sets/src/mage/cards/k/Kudzu.java index 8223cc6c1f..d15fb7dda0 100644 --- a/Mage.Sets/src/mage/cards/k/Kudzu.java +++ b/Mage.Sets/src/mage/cards/k/Kudzu.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.Filter; @@ -56,7 +57,7 @@ public class Kudzu extends CardImpl { public Kudzu(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/k/KujarSeedsculptor.java b/Mage.Sets/src/mage/cards/k/KujarSeedsculptor.java index 03112a29c4..2f5a31646f 100644 --- a/Mage.Sets/src/mage/cards/k/KujarSeedsculptor.java +++ b/Mage.Sets/src/mage/cards/k/KujarSeedsculptor.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetControlledCreaturePermanent; @@ -46,8 +47,8 @@ public class KujarSeedsculptor extends CardImpl { public KujarSeedsculptor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/k/KukemssaPirates.java b/Mage.Sets/src/mage/cards/k/KukemssaPirates.java new file mode 100644 index 0000000000..f7d123c64a --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KukemssaPirates.java @@ -0,0 +1,91 @@ +/* + * 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.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.effects.common.continuous.AssignNoCombatDamageSourceEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterArtifactPermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.target.common.TargetArtifactPermanent; + +/** + * + * @author TheElk801 + */ +public class KukemssaPirates extends CardImpl { + + private final UUID originalId; + + public KukemssaPirates(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Kukemssa Pirates attacks and isn't blocked, you may gain control of target artifact defending player controls. If you do, Kukemssa Pirates assigns no combat damage this turn. + Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(new GainControlTargetEffect(Duration.Custom), true); + ability.addEffect(new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn, true)); + ability.addTarget(new TargetArtifactPermanent(new FilterArtifactPermanent("artifact defending player controls"))); + originalId = ability.getOriginalId(); + this.addAbility(ability); + } + + public KukemssaPirates(final KukemssaPirates card) { + super(card); + this.originalId = card.originalId; + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability.getOriginalId().equals(originalId)) { + ability.getTargets().clear(); + FilterArtifactPermanent filter = new FilterArtifactPermanent("artifact defending player controls"); + UUID defenderId = game.getCombat().getDefenderId(ability.getSourceId()); + filter.add(new ControllerIdPredicate(defenderId)); + TargetArtifactPermanent target = new TargetArtifactPermanent(filter); + ability.addTarget(target); + } + } + + @Override + public KukemssaPirates copy() { + return new KukemssaPirates(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KukemssaSerpent.java b/Mage.Sets/src/mage/cards/k/KukemssaSerpent.java index 58a3669f2e..510632ae0b 100644 --- a/Mage.Sets/src/mage/cards/k/KukemssaSerpent.java +++ b/Mage.Sets/src/mage/cards/k/KukemssaSerpent.java @@ -65,7 +65,7 @@ public class KukemssaSerpent extends CardImpl { public KukemssaSerpent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KuldothaFlamefiend.java b/Mage.Sets/src/mage/cards/k/KuldothaFlamefiend.java index 69f140b0ed..4559c93812 100644 --- a/Mage.Sets/src/mage/cards/k/KuldothaFlamefiend.java +++ b/Mage.Sets/src/mage/cards/k/KuldothaFlamefiend.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DoIfCostPaid; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledArtifactPermanent; import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetCreatureOrPlayerAmount; @@ -48,7 +49,7 @@ public class KuldothaFlamefiend extends CardImpl { public KuldothaFlamefiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KuldothaForgemaster.java b/Mage.Sets/src/mage/cards/k/KuldothaForgemaster.java index 3d28603ef6..3de628d96b 100644 --- a/Mage.Sets/src/mage/cards/k/KuldothaForgemaster.java +++ b/Mage.Sets/src/mage/cards/k/KuldothaForgemaster.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterArtifactCard; import mage.filter.common.FilterControlledArtifactPermanent; @@ -50,7 +51,7 @@ public class KuldothaForgemaster extends CardImpl { public KuldothaForgemaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/k/KuldothaPhoenix.java b/Mage.Sets/src/mage/cards/k/KuldothaPhoenix.java index 2300c3d884..f75373f3ec 100644 --- a/Mage.Sets/src/mage/cards/k/KuldothaPhoenix.java +++ b/Mage.Sets/src/mage/cards/k/KuldothaPhoenix.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.PhaseStep; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class KuldothaPhoenix extends CardImpl { public KuldothaPhoenix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}{R}"); - this.subtype.add("Phoenix"); + this.subtype.add(SubType.PHOENIX); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KuldothaRingleader.java b/Mage.Sets/src/mage/cards/k/KuldothaRingleader.java index dbb1774907..f73b70b5ad 100644 --- a/Mage.Sets/src/mage/cards/k/KuldothaRingleader.java +++ b/Mage.Sets/src/mage/cards/k/KuldothaRingleader.java @@ -30,11 +30,12 @@ package mage.cards.k; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.keyword.BattleCryAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,13 +45,13 @@ public class KuldothaRingleader extends CardImpl { public KuldothaRingleader (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(4); this.toughness = new MageInt(4); this.addAbility(new BattleCryAbility()); - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public KuldothaRingleader (final KuldothaRingleader card) { diff --git a/Mage.Sets/src/mage/cards/k/KulrathKnight.java b/Mage.Sets/src/mage/cards/k/KulrathKnight.java index 78c5e2aeeb..134d82686f 100644 --- a/Mage.Sets/src/mage/cards/k/KulrathKnight.java +++ b/Mage.Sets/src/mage/cards/k/KulrathKnight.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class KulrathKnight extends CardImpl { public KulrathKnight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B/R}{B/R}"); - this.subtype.add("Elemental"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KumanoMasterYamabushi.java b/Mage.Sets/src/mage/cards/k/KumanoMasterYamabushi.java index 949b5bb379..4149e6e605 100644 --- a/Mage.Sets/src/mage/cards/k/KumanoMasterYamabushi.java +++ b/Mage.Sets/src/mage/cards/k/KumanoMasterYamabushi.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.replacement.DealtDamageToCreatureBySourceDi import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class KumanoMasterYamabushi extends CardImpl { public KumanoMasterYamabushi(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KumanosBlessing.java b/Mage.Sets/src/mage/cards/k/KumanosBlessing.java index 08a1365722..9f28b29f3b 100644 --- a/Mage.Sets/src/mage/cards/k/KumanosBlessing.java +++ b/Mage.Sets/src/mage/cards/k/KumanosBlessing.java @@ -59,7 +59,7 @@ public class KumanosBlessing extends CardImpl { public KumanosBlessing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/k/KumanosPupils.java b/Mage.Sets/src/mage/cards/k/KumanosPupils.java index d693509913..9f58cf9a74 100644 --- a/Mage.Sets/src/mage/cards/k/KumanosPupils.java +++ b/Mage.Sets/src/mage/cards/k/KumanosPupils.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.replacement.DealtDamageToCreatureBySourceDi import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.watchers.common.DamagedByWatcher; @@ -46,8 +47,8 @@ public class KumanosPupils extends CardImpl { public KumanosPupils(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KumenasSpeaker.java b/Mage.Sets/src/mage/cards/k/KumenasSpeaker.java new file mode 100644 index 0000000000..efc7441604 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KumenasSpeaker.java @@ -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.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostSourceWhileControlsEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author TheElk801 + */ +public class KumenasSpeaker extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("another Merfolk or an Island"); + + static { + filter.add(new AnotherPredicate()); + filter.add(Predicates.or( + new SubtypePredicate(SubType.ISLAND), + new SubtypePredicate(SubType.MERFOLK))); + } + + public KumenasSpeaker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SHAMAN); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Kumena's Omenspeaker gets +1/+1 as long as you control another Merfolk or Island. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceWhileControlsEffect(filter, 1, 1))); + } + + public KumenasSpeaker(final KumenasSpeaker card) { + super(card); + } + + @Override + public KumenasSpeaker copy() { + return new KumenasSpeaker(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KuonOgreAscendant.java b/Mage.Sets/src/mage/cards/k/KuonOgreAscendant.java index 5c6a9dc3d7..7fdffcc0f2 100644 --- a/Mage.Sets/src/mage/cards/k/KuonOgreAscendant.java +++ b/Mage.Sets/src/mage/cards/k/KuonOgreAscendant.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.SacrificeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class KuonOgreAscendant extends CardImpl { public KuonOgreAscendant(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Ogre"); - this.subtype.add("Monk"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/Kurgadon.java b/Mage.Sets/src/mage/cards/k/Kurgadon.java index 629c3e5df4..dd8f6954b8 100644 --- a/Mage.Sets/src/mage/cards/k/Kurgadon.java +++ b/Mage.Sets/src/mage/cards/k/Kurgadon.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.counters.CounterType; import mage.filter.FilterSpell; @@ -55,7 +56,7 @@ public class Kurgadon extends CardImpl { public Kurgadon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KurkeshOnakkeAncient.java b/Mage.Sets/src/mage/cards/k/KurkeshOnakkeAncient.java index c442b243ea..5178e6ba44 100644 --- a/Mage.Sets/src/mage/cards/k/KurkeshOnakkeAncient.java +++ b/Mage.Sets/src/mage/cards/k/KurkeshOnakkeAncient.java @@ -55,8 +55,8 @@ public class KurkeshOnakkeAncient extends CardImpl { public KurkeshOnakkeAncient(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Ogre"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/k/KuroPitlord.java b/Mage.Sets/src/mage/cards/k/KuroPitlord.java index 84d979a3bd..d4bddfa72a 100644 --- a/Mage.Sets/src/mage/cards/k/KuroPitlord.java +++ b/Mage.Sets/src/mage/cards/k/KuroPitlord.java @@ -50,8 +50,8 @@ public class KuroPitlord extends CardImpl { public KuroPitlord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{B}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Demon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DEMON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(9); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/k/KurosTaken.java b/Mage.Sets/src/mage/cards/k/KurosTaken.java index 563835836b..3940c781e8 100644 --- a/Mage.Sets/src/mage/cards/k/KurosTaken.java +++ b/Mage.Sets/src/mage/cards/k/KurosTaken.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.BushidoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class KurosTaken extends CardImpl { public KurosTaken(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Rat"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.RAT); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KusariGama.java b/Mage.Sets/src/mage/cards/k/KusariGama.java index 371718a1a2..201505ec31 100644 --- a/Mage.Sets/src/mage/cards/k/KusariGama.java +++ b/Mage.Sets/src/mage/cards/k/KusariGama.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -61,7 +62,7 @@ public class KusariGama extends CardImpl { public KusariGama(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has "{2}: This creature gets +1/+0 until end of turn." Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new GenericManaCost(2)); diff --git a/Mage.Sets/src/mage/cards/k/KydeleChosenOfKruphix.java b/Mage.Sets/src/mage/cards/k/KydeleChosenOfKruphix.java index 34469f4396..0f084a8ffb 100644 --- a/Mage.Sets/src/mage/cards/k/KydeleChosenOfKruphix.java +++ b/Mage.Sets/src/mage/cards/k/KydeleChosenOfKruphix.java @@ -39,6 +39,7 @@ import mage.abilities.mana.DynamicManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.WatcherScope; import mage.game.Game; @@ -55,8 +56,8 @@ public class KydeleChosenOfKruphix extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); @@ -83,7 +84,7 @@ class CardsDrawnThisTurnDynamicValue implements DynamicValue { @Override public int calculate(Game game, Ability sourceAbility, Effect effect) { KydeleCardsDrawnThisTurnWatcher watcher = (KydeleCardsDrawnThisTurnWatcher) game.getState().getWatchers().get(KydeleCardsDrawnThisTurnWatcher.class.getSimpleName()); - return watcher.getCardsDrawnThisTurn(sourceAbility.getControllerId()).size(); + return watcher.getCardsDrawnThisTurn(sourceAbility.getControllerId()); } @Override @@ -98,13 +99,13 @@ class CardsDrawnThisTurnDynamicValue implements DynamicValue { @Override public String getMessage() { - return "number of cards you've drawn this turn"; + return "card you've drawn this turn"; } } class KydeleCardsDrawnThisTurnWatcher extends Watcher { - private final Map> cardsDrawnThisTurn = new HashMap<>(); + private final Map cardsDrawnThisTurn = new HashMap<>(); public KydeleCardsDrawnThisTurnWatcher() { super(KydeleCardsDrawnThisTurnWatcher.class.getSimpleName(), WatcherScope.GAME); @@ -118,14 +119,13 @@ class KydeleCardsDrawnThisTurnWatcher extends Watcher { @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.DREW_CARD) { - Set cardsDrawn = getCardsDrawnThisTurn(event.getPlayerId()); - cardsDrawn.add(event.getTargetId()); - cardsDrawnThisTurn.put(event.getPlayerId(), cardsDrawn); + int cardsDrawn = getCardsDrawnThisTurn(event.getPlayerId()); + cardsDrawnThisTurn.put(event.getPlayerId(), cardsDrawn + 1); } } - public Set getCardsDrawnThisTurn(UUID playerId) { - return cardsDrawnThisTurn.getOrDefault(playerId, new LinkedHashSet<>()); + public int getCardsDrawnThisTurn(UUID playerId) { + return cardsDrawnThisTurn.getOrDefault(playerId, 0); } @Override diff --git a/Mage.Sets/src/mage/cards/k/KynaiosAndTiroOfMeletis.java b/Mage.Sets/src/mage/cards/k/KynaiosAndTiroOfMeletis.java index 08e51eed35..4e09766c15 100644 --- a/Mage.Sets/src/mage/cards/k/KynaiosAndTiroOfMeletis.java +++ b/Mage.Sets/src/mage/cards/k/KynaiosAndTiroOfMeletis.java @@ -57,8 +57,8 @@ public class KynaiosAndTiroOfMeletis extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{G}{W}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/k/KyokiSanitysEclipse.java b/Mage.Sets/src/mage/cards/k/KyokiSanitysEclipse.java index d6792cf09f..1df990a5ad 100644 --- a/Mage.Sets/src/mage/cards/k/KyokiSanitysEclipse.java +++ b/Mage.Sets/src/mage/cards/k/KyokiSanitysEclipse.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ExileFromZoneTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterCard; @@ -50,8 +51,8 @@ public class KyokiSanitysEclipse extends CardImpl { public KyokiSanitysEclipse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Demon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DEMON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/k/KyrenGlider.java b/Mage.Sets/src/mage/cards/k/KyrenGlider.java index d383583198..6294c3b1c0 100644 --- a/Mage.Sets/src/mage/cards/k/KyrenGlider.java +++ b/Mage.Sets/src/mage/cards/k/KyrenGlider.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author BursegSardaukar @@ -43,7 +44,7 @@ public class KyrenGlider extends CardImpl { public KyrenGlider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KyrenLegate.java b/Mage.Sets/src/mage/cards/k/KyrenLegate.java index 92378237c6..40d81148ab 100644 --- a/Mage.Sets/src/mage/cards/k/KyrenLegate.java +++ b/Mage.Sets/src/mage/cards/k/KyrenLegate.java @@ -58,7 +58,7 @@ public class KyrenLegate extends CardImpl { public KyrenLegate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KyrenSniper.java b/Mage.Sets/src/mage/cards/k/KyrenSniper.java index fee38c9319..40a0d91f34 100644 --- a/Mage.Sets/src/mage/cards/k/KyrenSniper.java +++ b/Mage.Sets/src/mage/cards/k/KyrenSniper.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.target.TargetPlayer; @@ -45,7 +46,7 @@ public class KyrenSniper extends CardImpl { public KyrenSniper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KyrenToy.java b/Mage.Sets/src/mage/cards/k/KyrenToy.java index dd757a25c0..0dc4decc0c 100644 --- a/Mage.Sets/src/mage/cards/k/KyrenToy.java +++ b/Mage.Sets/src/mage/cards/k/KyrenToy.java @@ -53,7 +53,7 @@ import mage.players.Player; public class KyrenToy extends CardImpl { public KyrenToy(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); // {1}, {T}: Put a charge counter on Kyren Toy. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance(1)), new GenericManaCost(1)); @@ -95,7 +95,7 @@ public class KyrenToy extends CardImpl { KyrenToyManaEffect() { super(); - staticText = "Add X mana of {C} to your mana pool, and then add {C} to your mana pool"; + staticText = "Add an amount of {C} to your mana pool equal to X plus one"; } KyrenToyManaEffect(final KyrenToyManaEffect effect) { diff --git a/Mage.Sets/src/mage/cards/k/KytheonHeroOfAkros.java b/Mage.Sets/src/mage/cards/k/KytheonHeroOfAkros.java index b96e21c506..098a8013f0 100644 --- a/Mage.Sets/src/mage/cards/k/KytheonHeroOfAkros.java +++ b/Mage.Sets/src/mage/cards/k/KytheonHeroOfAkros.java @@ -45,6 +45,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.g.GideonBattleForged; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -61,8 +62,8 @@ public class KytheonHeroOfAkros extends CardImpl { public KytheonHeroOfAkros(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/k/KytheonsIrregulars.java b/Mage.Sets/src/mage/cards/k/KytheonsIrregulars.java index 3b13f7f5f3..1ce6066159 100644 --- a/Mage.Sets/src/mage/cards/k/KytheonsIrregulars.java +++ b/Mage.Sets/src/mage/cards/k/KytheonsIrregulars.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.RenownAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class KytheonsIrregulars extends CardImpl { public KytheonsIrregulars(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LAATGunship.java b/Mage.Sets/src/mage/cards/l/LAATGunship.java index 0010f381d4..34f7cccc31 100644 --- a/Mage.Sets/src/mage/cards/l/LAATGunship.java +++ b/Mage.Sets/src/mage/cards/l/LAATGunship.java @@ -1,73 +1,74 @@ -/* - * 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.cards.l; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.ActivateAsSorceryActivatedAbility; -import mage.abilities.common.AttacksTriggeredAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; -import mage.abilities.keyword.SpaceflightAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.game.permanent.token.TrooperToken; - -/** - * - * @author Styxo - */ -public class LAATGunship extends CardImpl { - - public LAATGunship(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{W}"); - this.subtype.add("Starship"); - this.power = new MageInt(3); - this.toughness = new MageInt(2); - - // When LAAT Gunship attacks, create a 1/1 white Trooper creature token on to battlefield tapped and attacking. - this.addAbility(new AttacksTriggeredAbility(new CreateTokenEffect(new TrooperToken(), 1, true, true), false)); - - // {W}: LAAT Gunship gains spaceflight until the end of turn. Activate this ability only as a sorcery - this.addAbility(new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(SpaceflightAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{W}"))); - - } - - public LAATGunship(final LAATGunship card) { - super(card); - } - - @Override - public LAATGunship copy() { - return new LAATGunship(this); - } -} +/* + * 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.cards.l; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.game.permanent.token.TrooperToken; + +/** + * + * @author Styxo + */ +public class LAATGunship extends CardImpl { + + public LAATGunship(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{W}"); + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // When LAAT Gunship attacks, create a 1/1 white Trooper creature token on to battlefield tapped and attacking. + this.addAbility(new AttacksTriggeredAbility(new CreateTokenEffect(new TrooperToken(), 1, true, true), false)); + + // {W}: LAAT Gunship gains spaceflight until the end of turn. Activate this ability only as a sorcery + this.addAbility(new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(SpaceflightAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{W}"))); + + } + + public LAATGunship(final LAATGunship card) { + super(card); + } + + @Override + public LAATGunship copy() { + return new LAATGunship(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LaboratoryBrute.java b/Mage.Sets/src/mage/cards/l/LaboratoryBrute.java index d42990d449..d690c70db8 100644 --- a/Mage.Sets/src/mage/cards/l/LaboratoryBrute.java +++ b/Mage.Sets/src/mage/cards/l/LaboratoryBrute.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class LaboratoryBrute extends CardImpl { public LaboratoryBrute(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LaboratoryManiac.java b/Mage.Sets/src/mage/cards/l/LaboratoryManiac.java index c5d5fb87a9..e22b191093 100644 --- a/Mage.Sets/src/mage/cards/l/LaboratoryManiac.java +++ b/Mage.Sets/src/mage/cards/l/LaboratoryManiac.java @@ -35,6 +35,7 @@ import mage.abilities.effects.ReplacementEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class LaboratoryManiac extends CardImpl { public LaboratoryManiac(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LabyrinthChampion.java b/Mage.Sets/src/mage/cards/l/LabyrinthChampion.java index ab9942d85a..8c2f146127 100644 --- a/Mage.Sets/src/mage/cards/l/LabyrinthChampion.java +++ b/Mage.Sets/src/mage/cards/l/LabyrinthChampion.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; /** @@ -45,8 +46,8 @@ public class LabyrinthChampion extends CardImpl { public LabyrinthChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LabyrinthGuardian.java b/Mage.Sets/src/mage/cards/l/LabyrinthGuardian.java index 09a13cb50f..819afa3c26 100644 --- a/Mage.Sets/src/mage/cards/l/LabyrinthGuardian.java +++ b/Mage.Sets/src/mage/cards/l/LabyrinthGuardian.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EmbalmAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -53,8 +54,8 @@ public class LabyrinthGuardian extends CardImpl { public LabyrinthGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Illusion"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ILLUSION); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); @@ -99,7 +100,7 @@ class LabyrinthGuardianTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { MageObject eventSourceObject = game.getObject(event.getSourceId()); - if (eventSourceObject != null && event.getTargetId().equals(this.getSourceId())&& eventSourceObject instanceof Spell ) { + if (eventSourceObject != null && event.getTargetId().equals(this.getSourceId()) && eventSourceObject instanceof Spell) { getEffects().get(0).setTargetPointer(new FixedTarget(event.getPlayerId())); return true; } @@ -108,7 +109,7 @@ class LabyrinthGuardianTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever {this} becomes the target of a spell, sacrifice it."; + return "When {this} becomes the target of a spell, sacrifice it."; } } diff --git a/Mage.Sets/src/mage/cards/l/LabyrinthMinotaur.java b/Mage.Sets/src/mage/cards/l/LabyrinthMinotaur.java new file mode 100644 index 0000000000..bb0eddadc4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LabyrinthMinotaur.java @@ -0,0 +1,64 @@ +/* + * 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.cards.l; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class LabyrinthMinotaur extends CardImpl { + + public LabyrinthMinotaur(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.MINOTAUR); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // Whenever Labyrinth Minotaur blocks a creature, that creature doesn't untap during its controller's next untap step. + this.addAbility(new BlocksTriggeredAbility(new DontUntapInControllersNextUntapStepTargetEffect("that creature"), false, true)); + } + + public LabyrinthMinotaur(final LabyrinthMinotaur card) { + super(card); + } + + @Override + public LabyrinthMinotaur copy() { + return new LabyrinthMinotaur(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LadyCaleria.java b/Mage.Sets/src/mage/cards/l/LadyCaleria.java index 4970b8154d..fc5aa91a67 100644 --- a/Mage.Sets/src/mage/cards/l/LadyCaleria.java +++ b/Mage.Sets/src/mage/cards/l/LadyCaleria.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.target.common.TargetAttackingOrBlockingCreature; @@ -49,8 +50,8 @@ public class LadyCaleria extends CardImpl { public LadyCaleria(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/l/LadyEvangela.java b/Mage.Sets/src/mage/cards/l/LadyEvangela.java index a2f5d5d9fa..d58acea8ae 100644 --- a/Mage.Sets/src/mage/cards/l/LadyEvangela.java +++ b/Mage.Sets/src/mage/cards/l/LadyEvangela.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.PreventDamageByTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -52,8 +53,8 @@ public class LadyEvangela extends CardImpl { public LadyEvangela(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LadyOrca.java b/Mage.Sets/src/mage/cards/l/LadyOrca.java index 508beccf86..4844ebd531 100644 --- a/Mage.Sets/src/mage/cards/l/LadyOrca.java +++ b/Mage.Sets/src/mage/cards/l/LadyOrca.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -43,7 +44,7 @@ public class LadyOrca extends CardImpl { public LadyOrca(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(7); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LadySun.java b/Mage.Sets/src/mage/cards/l/LadySun.java index d1e250b31b..25643ba4cd 100644 --- a/Mage.Sets/src/mage/cards/l/LadySun.java +++ b/Mage.Sets/src/mage/cards/l/LadySun.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -59,8 +60,8 @@ public class LadySun extends CardImpl { public LadySun(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LadyZhurongWarriorQueen.java b/Mage.Sets/src/mage/cards/l/LadyZhurongWarriorQueen.java index 066e7133a3..b50046a68a 100644 --- a/Mage.Sets/src/mage/cards/l/LadyZhurongWarriorQueen.java +++ b/Mage.Sets/src/mage/cards/l/LadyZhurongWarriorQueen.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -44,9 +45,9 @@ public class LadyZhurongWarriorQueen extends CardImpl { public LadyZhurongWarriorQueen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LagacLizard.java b/Mage.Sets/src/mage/cards/l/LagacLizard.java index 7aff144448..bdd86b56c2 100644 --- a/Mage.Sets/src/mage/cards/l/LagacLizard.java +++ b/Mage.Sets/src/mage/cards/l/LagacLizard.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class LagacLizard extends CardImpl { public LagacLizard (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java b/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java index cdb9b425e3..17c73cc36e 100644 --- a/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java +++ b/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import java.util.UUID; @@ -47,8 +48,8 @@ public class LagonnaBandElder extends CardImpl { public LagonnaBandElder(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Centaur"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LagonnaBandTrailblazer.java b/Mage.Sets/src/mage/cards/l/LagonnaBandTrailblazer.java index 87f93f3fa4..af66fb9713 100644 --- a/Mage.Sets/src/mage/cards/l/LagonnaBandTrailblazer.java +++ b/Mage.Sets/src/mage/cards/l/LagonnaBandTrailblazer.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -44,8 +45,8 @@ public class LagonnaBandTrailblazer extends CardImpl { public LagonnaBandTrailblazer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Centaur"); - this.subtype.add("Scout"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LairwatchGiant.java b/Mage.Sets/src/mage/cards/l/LairwatchGiant.java index aacddc2d9f..b3c70d4e52 100644 --- a/Mage.Sets/src/mage/cards/l/LairwatchGiant.java +++ b/Mage.Sets/src/mage/cards/l/LairwatchGiant.java @@ -1,111 +1,112 @@ -/* - * 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.cards.l; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.combat.CanBlockAdditionalCreatureEffect; -import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; -import mage.abilities.keyword.FirstStrikeAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.permanent.Permanent; - -/** - * - * @author Styxo - */ -public class LairwatchGiant extends CardImpl { - - public LairwatchGiant(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}"); - - this.subtype.add("Giant"); - this.subtype.add("Warrior"); - this.power = new MageInt(5); - this.toughness = new MageInt(3); - - // Lairwatch Giant can block an additional creature each combat. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAdditionalCreatureEffect(1))); - - // Whenever Lairwatch Giant blocks two or more creatures, it gains first strike until end of turn. - this.addAbility(new LairwatchGiantTriggeredAbility()); - - } - - public LairwatchGiant(final LairwatchGiant card) { - super(card); - } - - @Override - public LairwatchGiant copy() { - return new LairwatchGiant(this); - } -} - -class LairwatchGiantTriggeredAbility extends TriggeredAbilityImpl { - - LairwatchGiantTriggeredAbility() { - super(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FirstStrikeAbility.getInstance())); - } - - LairwatchGiantTriggeredAbility(final LairwatchGiantTriggeredAbility ability) { - super(ability); - } - - @Override - public LairwatchGiantTriggeredAbility copy() { - return new LairwatchGiantTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.DECLARED_BLOCKERS; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Permanent permanent = game.getPermanent((this.getSourceId())); - if (permanent != null) { - return permanent.getBlocking() > 1; - } - return false; - } - - @Override - public String getRule() { - return "Whenever Lairwatch Giant blocks two or more creatures, it gains first strike until end of turn."; - } -} +/* + * 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.cards.l; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.combat.CanBlockAdditionalCreatureEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; + +/** + * + * @author Styxo + */ +public class LairwatchGiant extends CardImpl { + + public LairwatchGiant(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}"); + + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(5); + this.toughness = new MageInt(3); + + // Lairwatch Giant can block an additional creature each combat. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAdditionalCreatureEffect(1))); + + // Whenever Lairwatch Giant blocks two or more creatures, it gains first strike until end of turn. + this.addAbility(new LairwatchGiantTriggeredAbility()); + + } + + public LairwatchGiant(final LairwatchGiant card) { + super(card); + } + + @Override + public LairwatchGiant copy() { + return new LairwatchGiant(this); + } +} + +class LairwatchGiantTriggeredAbility extends TriggeredAbilityImpl { + + LairwatchGiantTriggeredAbility() { + super(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FirstStrikeAbility.getInstance())); + } + + LairwatchGiantTriggeredAbility(final LairwatchGiantTriggeredAbility ability) { + super(ability); + } + + @Override + public LairwatchGiantTriggeredAbility copy() { + return new LairwatchGiantTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.DECLARED_BLOCKERS; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent permanent = game.getPermanent((this.getSourceId())); + if (permanent != null) { + return permanent.getBlocking() > 1; + } + return false; + } + + @Override + public String getRule() { + return "Whenever Lairwatch Giant blocks two or more creatures, it gains first strike until end of turn."; + } +} diff --git a/Mage.Sets/src/mage/cards/l/LambholtButcher.java b/Mage.Sets/src/mage/cards/l/LambholtButcher.java index b99a48a9ff..70d5cc8998 100644 --- a/Mage.Sets/src/mage/cards/l/LambholtButcher.java +++ b/Mage.Sets/src/mage/cards/l/LambholtButcher.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -48,7 +49,7 @@ public class LambholtButcher extends CardImpl { public LambholtButcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(4); this.toughness = new MageInt(4); this.color.setGreen(true); diff --git a/Mage.Sets/src/mage/cards/l/LambholtElder.java b/Mage.Sets/src/mage/cards/l/LambholtElder.java index 998c380b5a..62f8cc4b7e 100644 --- a/Mage.Sets/src/mage/cards/l/LambholtElder.java +++ b/Mage.Sets/src/mage/cards/l/LambholtElder.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.s.SilverpeltWerewolf; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -49,8 +50,8 @@ public class LambholtElder extends CardImpl { public LambholtElder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LambholtPacifist.java b/Mage.Sets/src/mage/cards/l/LambholtPacifist.java index 73a1b32d9a..5cbd8b807a 100644 --- a/Mage.Sets/src/mage/cards/l/LambholtPacifist.java +++ b/Mage.Sets/src/mage/cards/l/LambholtPacifist.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.TargetController; @@ -58,9 +59,9 @@ public class LambholtPacifist extends CardImpl { public LambholtPacifist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LammastideWeave.java b/Mage.Sets/src/mage/cards/l/LammastideWeave.java index 9b822ebc98..afd8334d5d 100644 --- a/Mage.Sets/src/mage/cards/l/LammastideWeave.java +++ b/Mage.Sets/src/mage/cards/l/LammastideWeave.java @@ -1,109 +1,109 @@ -/* - * 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.cards.l; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.NameACardEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.Game; -import mage.players.Player; -import mage.target.TargetPlayer; - -/** - * - * @author Styxo - */ -public class LammastideWeave extends CardImpl { - - public LammastideWeave(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}"); - - // Name a card, then target player puts the top card of his or her library into his or her graveyard. If that card is the named card, you gain life equal to its converted mana cost. - this.getSpellAbility().addEffect(new NameACardEffect(NameACardEffect.TypeOfName.ALL)); - this.getSpellAbility().addEffect(new LammastideWeaveEffect()); - this.getSpellAbility().addTarget(new TargetPlayer()); - - // Draw a card. - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); - - } - - public LammastideWeave(final LammastideWeave card) { - super(card); - } - - @Override - public LammastideWeave copy() { - return new LammastideWeave(this); - } -} - -class LammastideWeaveEffect extends OneShotEffect { - - public LammastideWeaveEffect() { - super(Outcome.DrawCard); - this.staticText = ", then target player puts the top card of his or her library into his or her graveyard. " - + "If that card is the named card, you gain life equal to its converted mana cost."; - } - - public LammastideWeaveEffect(final LammastideWeaveEffect effect) { - super(effect); - } - - @Override - public LammastideWeaveEffect copy() { - return new LammastideWeaveEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - Player targetPlayer = game.getPlayer(source.getFirstTarget()); - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); - if (controller != null && targetPlayer != null && cardName != null && !cardName.isEmpty()) { - Card card = targetPlayer.getLibrary().getFromTop(game); - if (card != null) { - controller.moveCards(card, Zone.GRAVEYARD, source, game); - if (card.getName().equals(cardName)) { - controller.gainLife(card.getConvertedManaCost(), game); - } - } - return true; - } - return false; - } - -} +/* + * 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.cards.l; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.NameACardEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author Styxo + */ +public class LammastideWeave extends CardImpl { + + public LammastideWeave(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}"); + + // Name a card, then target player puts the top card of his or her library into his or her graveyard. If that card is the named card, you gain life equal to its converted mana cost. + this.getSpellAbility().addEffect(new NameACardEffect(NameACardEffect.TypeOfName.ALL)); + this.getSpellAbility().addEffect(new LammastideWeaveEffect()); + this.getSpellAbility().addTarget(new TargetPlayer()); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + + } + + public LammastideWeave(final LammastideWeave card) { + super(card); + } + + @Override + public LammastideWeave copy() { + return new LammastideWeave(this); + } +} + +class LammastideWeaveEffect extends OneShotEffect { + + public LammastideWeaveEffect() { + super(Outcome.DrawCard); + this.staticText = ", then target player puts the top card of his or her library into his or her graveyard. " + + "If that card is the named card, you gain life equal to its converted mana cost."; + } + + public LammastideWeaveEffect(final LammastideWeaveEffect effect) { + super(effect); + } + + @Override + public LammastideWeaveEffect copy() { + return new LammastideWeaveEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Player targetPlayer = game.getPlayer(source.getFirstTarget()); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + if (controller != null && targetPlayer != null && cardName != null && !cardName.isEmpty()) { + Card card = targetPlayer.getLibrary().getFromTop(game); + if (card != null) { + controller.moveCards(card, Zone.GRAVEYARD, source, game); + if (card.getName().equals(cardName)) { + controller.gainLife(card.getConvertedManaCost(), game); + } + } + return true; + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/cards/l/LamplighterOfSelhoff.java b/Mage.Sets/src/mage/cards/l/LamplighterOfSelhoff.java index 5a572855b2..e7fa70d4d4 100644 --- a/Mage.Sets/src/mage/cards/l/LamplighterOfSelhoff.java +++ b/Mage.Sets/src/mage/cards/l/LamplighterOfSelhoff.java @@ -58,8 +58,8 @@ public class LamplighterOfSelhoff extends CardImpl { public LamplighterOfSelhoff(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/l/Lance.java b/Mage.Sets/src/mage/cards/l/Lance.java index f0645e917e..0679d9551b 100644 --- a/Mage.Sets/src/mage/cards/l/Lance.java +++ b/Mage.Sets/src/mage/cards/l/Lance.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class Lance extends CardImpl { public Lance(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/l/LancersEnKor.java b/Mage.Sets/src/mage/cards/l/LancersEnKor.java index 9dcb5d2fb2..ef7c613d9c 100644 --- a/Mage.Sets/src/mage/cards/l/LancersEnKor.java +++ b/Mage.Sets/src/mage/cards/l/LancersEnKor.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -49,8 +50,8 @@ public class LancersEnKor extends CardImpl { public LancersEnKor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LandLeeches.java b/Mage.Sets/src/mage/cards/l/LandLeeches.java index 82e29b1c3a..113479378e 100644 --- a/Mage.Sets/src/mage/cards/l/LandLeeches.java +++ b/Mage.Sets/src/mage/cards/l/LandLeeches.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class LandLeeches extends CardImpl { public LandLeeches(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Leech"); + this.subtype.add(SubType.LEECH); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LandoCalrissian.java b/Mage.Sets/src/mage/cards/l/LandoCalrissian.java index 36ca4e1b0a..3742d8ed72 100644 --- a/Mage.Sets/src/mage/cards/l/LandoCalrissian.java +++ b/Mage.Sets/src/mage/cards/l/LandoCalrissian.java @@ -59,8 +59,8 @@ public class LandoCalrissian extends CardImpl { public LandoCalrissian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LandsEdge.java b/Mage.Sets/src/mage/cards/l/LandsEdge.java new file mode 100644 index 0000000000..85df17f44d --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LandsEdge.java @@ -0,0 +1,116 @@ +/* + * 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.cards.l; + +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.CostImpl; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.InfoEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SuperType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + + +/** + * @author L_J + */ +public class LandsEdge extends CardImpl { + + public LandsEdge(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}{R}"); + addSuperType(SuperType.WORLD); + + // Discard a card: If the discarded card was a land card, Land's Edge deals 2 damage to target player. Any player may activate this ability. + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LandsEdgeEffect(), new DiscardCardCost(false)); + ability.addTarget(new TargetPlayer()); + ability.setMayActivate(TargetController.ANY); + ability.addEffect(new InfoEffect("Any player may activate this ability")); + this.addAbility(ability); + } + + public LandsEdge(final LandsEdge card) { + super(card); + } + + @Override + public LandsEdge copy() { + return new LandsEdge(this); + } + +} + +class LandsEdgeEffect extends OneShotEffect { + + public LandsEdgeEffect() { + super(Outcome.Neutral); + staticText = "If the discarded card was a land card, Land's Edge deals 2 damage to target player."; + } + + public LandsEdgeEffect(final LandsEdgeEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + DiscardCardCost cost = (DiscardCardCost) source.getCosts().get(0); + if (cost != null) { + List cards = cost.getCards(); + if (cards.size() == 1 && cards.get(0).isLand()) { + Effect effect = new DamageTargetEffect(2); + effect.setTargetPointer(getTargetPointer()); + effect.apply(game, source); + } + + } + return true; + } + return false; + } + + @Override + public LandsEdgeEffect copy() { + return new LandsEdgeEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LanternKami.java b/Mage.Sets/src/mage/cards/l/LanternKami.java index 6a91fc32cd..4f4ae65d97 100644 --- a/Mage.Sets/src/mage/cards/l/LanternKami.java +++ b/Mage.Sets/src/mage/cards/l/LanternKami.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class LanternKami extends CardImpl { public LanternKami (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LanternScout.java b/Mage.Sets/src/mage/cards/l/LanternScout.java index 97e84b451b..c46ca86e3d 100644 --- a/Mage.Sets/src/mage/cards/l/LanternScout.java +++ b/Mage.Sets/src/mage/cards/l/LanternScout.java @@ -53,9 +53,9 @@ public class LanternScout extends CardImpl { public LanternScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); + this.subtype.add(SubType.ALLY); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LanternSpirit.java b/Mage.Sets/src/mage/cards/l/LanternSpirit.java index 26098d9317..131a97a532 100644 --- a/Mage.Sets/src/mage/cards/l/LanternSpirit.java +++ b/Mage.Sets/src/mage/cards/l/LanternSpirit.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class LanternSpirit extends CardImpl { public LanternSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LaquatussChampion.java b/Mage.Sets/src/mage/cards/l/LaquatussChampion.java index ea4d32094e..0e91897a87 100644 --- a/Mage.Sets/src/mage/cards/l/LaquatussChampion.java +++ b/Mage.Sets/src/mage/cards/l/LaquatussChampion.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -58,8 +59,8 @@ public class LaquatussChampion extends CardImpl { public LaquatussChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Nightmare"); - this.subtype.add("Horror"); + this.subtype.add(SubType.NIGHTMARE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(6); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LaquatussDisdain.java b/Mage.Sets/src/mage/cards/l/LaquatussDisdain.java new file mode 100644 index 0000000000..f256da53ac --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LaquatussDisdain.java @@ -0,0 +1,91 @@ +/* + * 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.cards.l; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicate; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.target.TargetSpell; + +/** + * + * @author TheElk801 + */ +public class LaquatussDisdain extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("spell cast from a graveyard"); + + static { + filter.add(new LaquatussDisdainPredicate()); + } + + public LaquatussDisdain(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); + + // Counter target spell cast from a graveyard. + this.getSpellAbility().addEffect(new CounterTargetEffect()); + this.getSpellAbility().addTarget(new TargetSpell(filter)); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public LaquatussDisdain(final LaquatussDisdain card) { + super(card); + } + + @Override + public LaquatussDisdain copy() { + return new LaquatussDisdain(this); + } +} + +class LaquatussDisdainPredicate implements Predicate { + + public LaquatussDisdainPredicate() { + } + + @Override + public boolean apply(MageObject input, Game game) { + if (input instanceof Spell) { + if (((Spell) input).getFromZone() == Zone.GRAVEYARD) { + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/l/Lashknife.java b/Mage.Sets/src/mage/cards/l/Lashknife.java new file mode 100644 index 0000000000..ef4128341c --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/Lashknife.java @@ -0,0 +1,97 @@ +/* + * 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.cards.l; + +import java.util.UUID; +import mage.constants.SubType; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.costs.AlternativeCostSourceAbility; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author TheElk801 + */ +public class Lashknife extends CardImpl { + + private static final FilterControlledPermanent plainsFilter = new FilterControlledPermanent("If you control a Plains"); + private static final FilterControlledCreaturePermanent creatureFilter = new FilterControlledCreaturePermanent("an untapped creature you control"); + + static { + plainsFilter.add(new SubtypePredicate(SubType.PLAINS)); + creatureFilter.add(Predicates.not(new TappedPredicate())); + } + + public Lashknife(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + + this.subtype.add(SubType.AURA); + + // If you control a Plains, you may tap an untapped creature you control rather than pay Lashknife's mana cost. + this.addAbility(new AlternativeCostSourceAbility(new TapTargetCost(new TargetControlledPermanent(creatureFilter)), new PermanentsOnTheBattlefieldCondition(plainsFilter))); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature has first strike. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.AURA))); + } + + public Lashknife(final Lashknife card) { + super(card); + } + + @Override + public Lashknife copy() { + return new Lashknife(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LashweedLurker.java b/Mage.Sets/src/mage/cards/l/LashweedLurker.java index 422708468b..c09868b108 100644 --- a/Mage.Sets/src/mage/cards/l/LashweedLurker.java +++ b/Mage.Sets/src/mage/cards/l/LashweedLurker.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EmergeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterNonlandPermanent; import mage.target.TargetPermanent; @@ -48,8 +49,8 @@ public class LashweedLurker extends CardImpl { public LashweedLurker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{8}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.HORROR); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/Lashwrithe.java b/Mage.Sets/src/mage/cards/l/Lashwrithe.java index 61c372969b..3fb138d5f9 100644 --- a/Mage.Sets/src/mage/cards/l/Lashwrithe.java +++ b/Mage.Sets/src/mage/cards/l/Lashwrithe.java @@ -56,7 +56,7 @@ public class Lashwrithe extends CardImpl { public Lashwrithe(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new LivingWeaponAbility()); PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(filter); diff --git a/Mage.Sets/src/mage/cards/l/LastCaress.java b/Mage.Sets/src/mage/cards/l/LastCaress.java index 3bc5473e34..e4652239ec 100644 --- a/Mage.Sets/src/mage/cards/l/LastCaress.java +++ b/Mage.Sets/src/mage/cards/l/LastCaress.java @@ -43,12 +43,12 @@ import mage.target.TargetPlayer; public class LastCaress extends CardImpl { public LastCaress(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}"); this.getSpellAbility().addEffect(new LoseLifeTargetEffect(1)); this.getSpellAbility().addTarget(new TargetPlayer()); - this.getSpellAbility().addEffect(new GainLifeEffect(1)); - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + this.getSpellAbility().addEffect(new GainLifeEffect(1).setText("and you gain 1 life")); + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).setText("

Draw a card")); } public LastCaress(final LastCaress card) { diff --git a/Mage.Sets/src/mage/cards/l/LastLaugh.java b/Mage.Sets/src/mage/cards/l/LastLaugh.java new file mode 100644 index 0000000000..2a2c1238d5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LastLaugh.java @@ -0,0 +1,105 @@ +/* + * 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.cards.l; + +import java.util.UUID; +import mage.abilities.StateTriggeredAbility; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility; +import mage.abilities.effects.common.DamageEverythingEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.ZoneChangeEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author L_J + */ +public class LastLaugh extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("a permanent other than Last Laugh"); + static { + filter.add(new AnotherPredicate()); + } + + public LastLaugh(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}{B}"); + + // Whenever a permanent other than Last Laugh is put into a graveyard from the battlefield, Last Laugh deals 1 damage to each creature and each player. + this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(new DamageEverythingEffect(1), false, filter, false)); + + // When no creatures are on the battlefield, sacrifice Last Laugh. + this.addAbility(new LastLaughStateTriggeredAbility()); + + } + + public LastLaugh(final LastLaugh card) { + super(card); + } + + @Override + public LastLaugh copy() { + return new LastLaugh(this); + } +} + +class LastLaughStateTriggeredAbility extends StateTriggeredAbility { + + public LastLaughStateTriggeredAbility() { + super(Zone.BATTLEFIELD, new SacrificeSourceEffect()); + } + + public LastLaughStateTriggeredAbility(final LastLaughStateTriggeredAbility ability) { + super(ability); + } + + @Override + public LastLaughStateTriggeredAbility copy() { + return new LastLaughStateTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return game.getBattlefield().count(new FilterCreaturePermanent(), this.getSourceId(), this.getControllerId(), game) == 0; + } + + @Override + public String getRule() { + return new StringBuilder("When no creatures are on the battlefield, ").append(super.getRule()).toString() ; + } + +} diff --git a/Mage.Sets/src/mage/cards/l/LatchSeeker.java b/Mage.Sets/src/mage/cards/l/LatchSeeker.java index 99b8d76e7f..56bba3577b 100644 --- a/Mage.Sets/src/mage/cards/l/LatchSeeker.java +++ b/Mage.Sets/src/mage/cards/l/LatchSeeker.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class LatchSeeker extends CardImpl { public LatchSeeker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LatchkeyFaerie.java b/Mage.Sets/src/mage/cards/l/LatchkeyFaerie.java index f63d4274f5..31fb055fd2 100644 --- a/Mage.Sets/src/mage/cards/l/LatchkeyFaerie.java +++ b/Mage.Sets/src/mage/cards/l/LatchkeyFaerie.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ProwlAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,8 +48,8 @@ public class LatchkeyFaerie extends CardImpl { public LatchkeyFaerie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LathnuHellion.java b/Mage.Sets/src/mage/cards/l/LathnuHellion.java index 6f28a49298..8ad0b51079 100644 --- a/Mage.Sets/src/mage/cards/l/LathnuHellion.java +++ b/Mage.Sets/src/mage/cards/l/LathnuHellion.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -50,7 +51,7 @@ public class LathnuHellion extends CardImpl { public LathnuHellion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Hellion"); + this.subtype.add(SubType.HELLION); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LathnuSailback.java b/Mage.Sets/src/mage/cards/l/LathnuSailback.java index f9102c3bbf..8f8a2e70dc 100644 --- a/Mage.Sets/src/mage/cards/l/LathnuSailback.java +++ b/Mage.Sets/src/mage/cards/l/LathnuSailback.java @@ -1,58 +1,59 @@ -/* - * 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.cards.l; - -import java.util.UUID; -import mage.MageInt; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class LathnuSailback extends CardImpl { - - public LathnuSailback(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); - - this.subtype.add("Lizard"); - this.power = new MageInt(5); - this.toughness = new MageInt(4); - } - - public LathnuSailback(final LathnuSailback card) { - super(card); - } - - @Override - public LathnuSailback copy() { - return new LathnuSailback(this); - } -} +/* + * 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.cards.l; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author Styxo + */ +public class LathnuSailback extends CardImpl { + + public LathnuSailback(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); + + this.subtype.add(SubType.LIZARD); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + } + + public LathnuSailback(final LathnuSailback card) { + super(card); + } + + @Override + public LathnuSailback copy() { + return new LathnuSailback(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LatullaKeldonOverseer.java b/Mage.Sets/src/mage/cards/l/LatullaKeldonOverseer.java index 25cb74833b..f68c923792 100644 --- a/Mage.Sets/src/mage/cards/l/LatullaKeldonOverseer.java +++ b/Mage.Sets/src/mage/cards/l/LatullaKeldonOverseer.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterCard; @@ -54,8 +55,8 @@ public class LatullaKeldonOverseer extends CardImpl { public LatullaKeldonOverseer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/Launch.java b/Mage.Sets/src/mage/cards/l/Launch.java index afb74e894a..dfd5e0e47e 100644 --- a/Mage.Sets/src/mage/cards/l/Launch.java +++ b/Mage.Sets/src/mage/cards/l/Launch.java @@ -1,77 +1,78 @@ -/* - * 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.cards.l; - -import java.util.UUID; -import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.ReturnToHandSourceEffect; -import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; -import mage.abilities.keyword.EnchantAbility; -import mage.abilities.keyword.FlyingAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Derpthemeus - */ -public class Launch extends CardImpl { - - public Launch(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); - - // Enchant creature - TargetCreaturePermanent auraTarget = new TargetCreaturePermanent(); - this.getSpellAbility().addTarget(auraTarget); - this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); - this.addAbility(new EnchantAbility(auraTarget.getTargetName())); - // Enchanted creature has flying. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield))); - // When Launch is put into a graveyard from the battlefield, return Launch to its owner's hand. - this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new ReturnToHandSourceEffect())); - - } - - public Launch(final Launch card) { - super(card); - } - - @Override - public Launch copy() { - return new Launch(this); - } -} +/* + * 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.cards.l; + +import java.util.UUID; +import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Derpthemeus + */ +public class Launch extends CardImpl { + + public Launch(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetCreaturePermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + // Enchanted creature has flying. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield))); + // When Launch is put into a graveyard from the battlefield, return Launch to its owner's hand. + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new ReturnToHandSourceEffect())); + + } + + public Launch(final Launch card) { + super(card); + } + + @Override + public Launch copy() { + return new Launch(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LaunchTheFleet.java b/Mage.Sets/src/mage/cards/l/LaunchTheFleet.java index edb409c372..8a19cbb2d2 100644 --- a/Mage.Sets/src/mage/cards/l/LaunchTheFleet.java +++ b/Mage.Sets/src/mage/cards/l/LaunchTheFleet.java @@ -55,7 +55,7 @@ public class LaunchTheFleet extends CardImpl { // Until end of turn, any number of target creatures each gain "Whenever this creature attacks, create a 1/1 white Soldier token tapped and attacking." this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, Integer.MAX_VALUE)); Effect effect = new GainAbilityTargetEffect(new AttacksTriggeredAbility(new CreateTokenEffect(new SoldierToken(), 1, true, true), false), Duration.EndOfTurn); - effect.setText("Until end of turn, any number of target creatures each gain \"Whenever this creature attacks, create a 1/1 white Soldier token tapped and attacking.\""); + effect.setText("Until end of turn, any number of target creatures each gain \"Whenever this creature attacks, create a 1/1 white Soldier creature token that's tapped and attacking.\""); this.getSpellAbility().addEffect(effect); } diff --git a/Mage.Sets/src/mage/cards/l/LavaBlister.java b/Mage.Sets/src/mage/cards/l/LavaBlister.java index d69aa24458..f5130d1ff1 100644 --- a/Mage.Sets/src/mage/cards/l/LavaBlister.java +++ b/Mage.Sets/src/mage/cards/l/LavaBlister.java @@ -1,99 +1,99 @@ -/* - * 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.cards.l; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.common.TargetNonBasicLandPermanent; - -/** - * - * @author Styxo - */ -public class LavaBlister extends CardImpl { - - public LavaBlister(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}"); - - // Destroy target nonbasic land unless its controller has Lava Blister deal 6 damage to him or her. - this.getSpellAbility().addTarget(new TargetNonBasicLandPermanent()); - this.getSpellAbility().addEffect(new LavaBlisterEffect()); - } - - public LavaBlister(final LavaBlister card) { - super(card); - } - - @Override - public LavaBlister copy() { - return new LavaBlister(this); - } -} - -class LavaBlisterEffect extends OneShotEffect { - - public LavaBlisterEffect() { - super(Outcome.Detriment); - this.staticText = "Destroy target nonbasic land unless its controller has {this} deal 6 damage to him or her"; - } - - public LavaBlisterEffect(final LavaBlisterEffect effect) { - super(effect); - } - - @Override - public LavaBlisterEffect copy() { - return new LavaBlisterEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getFirstTarget()); - if (permanent != null) { - Player player = game.getPlayer(permanent.getControllerId()); - if (player != null) { - String message = "Have Lava Blister do 6 damage to you?"; - if (player.chooseUse(Outcome.Damage, message, source, game)) { - player.damage(6, source.getSourceId(), game, false, true); - } else { - permanent.destroy(source.getId(), game, false); - } - return true; - } - } - return false; - } -} +/* + * 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.cards.l; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetNonBasicLandPermanent; + +/** + * + * @author Styxo + */ +public class LavaBlister extends CardImpl { + + public LavaBlister(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}"); + + // Destroy target nonbasic land unless its controller has Lava Blister deal 6 damage to him or her. + this.getSpellAbility().addTarget(new TargetNonBasicLandPermanent()); + this.getSpellAbility().addEffect(new LavaBlisterEffect()); + } + + public LavaBlister(final LavaBlister card) { + super(card); + } + + @Override + public LavaBlister copy() { + return new LavaBlister(this); + } +} + +class LavaBlisterEffect extends OneShotEffect { + + public LavaBlisterEffect() { + super(Outcome.Detriment); + this.staticText = "Destroy target nonbasic land unless its controller has {this} deal 6 damage to him or her"; + } + + public LavaBlisterEffect(final LavaBlisterEffect effect) { + super(effect); + } + + @Override + public LavaBlisterEffect copy() { + return new LavaBlisterEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + Player player = game.getPlayer(permanent.getControllerId()); + if (player != null) { + String message = "Have Lava Blister do 6 damage to you?"; + if (player.chooseUse(Outcome.Damage, message, source, game)) { + player.damage(6, source.getSourceId(), game, false, true); + } else { + permanent.destroy(source.getId(), game, false); + } + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/l/LavaHounds.java b/Mage.Sets/src/mage/cards/l/LavaHounds.java index d30f829293..f5ee035b66 100644 --- a/Mage.Sets/src/mage/cards/l/LavaHounds.java +++ b/Mage.Sets/src/mage/cards/l/LavaHounds.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class LavaHounds extends CardImpl { public LavaHounds(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LavaRunner.java b/Mage.Sets/src/mage/cards/l/LavaRunner.java index 4eb7fa2f23..128ab9a560 100644 --- a/Mage.Sets/src/mage/cards/l/LavaRunner.java +++ b/Mage.Sets/src/mage/cards/l/LavaRunner.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; import mage.game.Game; @@ -51,7 +52,7 @@ public class LavaRunner extends CardImpl { public LavaRunner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LavaSpike.java b/Mage.Sets/src/mage/cards/l/LavaSpike.java index 93ddc38330..acddcf89c4 100644 --- a/Mage.Sets/src/mage/cards/l/LavaSpike.java +++ b/Mage.Sets/src/mage/cards/l/LavaSpike.java @@ -33,6 +33,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -43,7 +44,7 @@ public class LavaSpike extends CardImpl { public LavaSpike (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addEffect(new DamageTargetEffect(3)); diff --git a/Mage.Sets/src/mage/cards/l/LavaZombie.java b/Mage.Sets/src/mage/cards/l/LavaZombie.java index 9996d7ccdf..560484b26e 100644 --- a/Mage.Sets/src/mage/cards/l/LavaZombie.java +++ b/Mage.Sets/src/mage/cards/l/LavaZombie.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -59,7 +60,7 @@ public class LavaZombie extends CardImpl { public LavaZombie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LavabornMuse.java b/Mage.Sets/src/mage/cards/l/LavabornMuse.java index 8adfb01b72..5e24a52165 100644 --- a/Mage.Sets/src/mage/cards/l/LavabornMuse.java +++ b/Mage.Sets/src/mage/cards/l/LavabornMuse.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.game.Game; @@ -50,7 +51,7 @@ public class LavabornMuse extends CardImpl { public LavabornMuse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LavaclawReaches.java b/Mage.Sets/src/mage/cards/l/LavaclawReaches.java index 1559b2c066..849faa0647 100644 --- a/Mage.Sets/src/mage/cards/l/LavaclawReaches.java +++ b/Mage.Sets/src/mage/cards/l/LavaclawReaches.java @@ -41,6 +41,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -79,7 +80,7 @@ class LavaclawReachesToken extends Token { public LavaclawReachesToken() { super("", "2/2 black and red Elemental creature with \"{X}: This creature gets +X/+0 until end of turn.\""); cardType.add(CardType.CREATURE); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); color.setRed(true); color.setBlack(true); power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LavacoreElemental.java b/Mage.Sets/src/mage/cards/l/LavacoreElemental.java index d3d25efad1..ad655f9500 100644 --- a/Mage.Sets/src/mage/cards/l/LavacoreElemental.java +++ b/Mage.Sets/src/mage/cards/l/LavacoreElemental.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.VanishingUpkeepAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SetTargetPointer; import mage.counters.CounterType; import mage.filter.common.FilterControlledCreaturePermanent; @@ -51,7 +52,7 @@ public class LavacoreElemental extends CardImpl { public LavacoreElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LavafumeInvoker.java b/Mage.Sets/src/mage/cards/l/LavafumeInvoker.java index c2f931ac06..d17b802a35 100644 --- a/Mage.Sets/src/mage/cards/l/LavafumeInvoker.java +++ b/Mage.Sets/src/mage/cards/l/LavafumeInvoker.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,8 +47,8 @@ public class LavafumeInvoker extends CardImpl { public LavafumeInvoker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LavamancersSkill.java b/Mage.Sets/src/mage/cards/l/LavamancersSkill.java index 974aa4c03e..3905a7dc75 100644 --- a/Mage.Sets/src/mage/cards/l/LavamancersSkill.java +++ b/Mage.Sets/src/mage/cards/l/LavamancersSkill.java @@ -54,7 +54,7 @@ public class LavamancersSkill extends CardImpl { public LavamancersSkill(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/l/LavastepRaider.java b/Mage.Sets/src/mage/cards/l/LavastepRaider.java index 10414cb034..957e8c93c4 100644 --- a/Mage.Sets/src/mage/cards/l/LavastepRaider.java +++ b/Mage.Sets/src/mage/cards/l/LavastepRaider.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,8 +47,8 @@ public class LavastepRaider extends CardImpl { public LavastepRaider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LaviniaOfTheTenth.java b/Mage.Sets/src/mage/cards/l/LaviniaOfTheTenth.java index 89e23f3515..01a3c04799 100644 --- a/Mage.Sets/src/mage/cards/l/LaviniaOfTheTenth.java +++ b/Mage.Sets/src/mage/cards/l/LaviniaOfTheTenth.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.SuperType; import mage.constants.TargetController; @@ -61,8 +62,8 @@ public class LaviniaOfTheTenth extends CardImpl { public LaviniaOfTheTenth (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{U}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.addSuperType(SuperType.LEGENDARY); diff --git a/Mage.Sets/src/mage/cards/l/Lawbringer.java b/Mage.Sets/src/mage/cards/l/Lawbringer.java index 66d6787f61..8c0fffa79a 100644 --- a/Mage.Sets/src/mage/cards/l/Lawbringer.java +++ b/Mage.Sets/src/mage/cards/l/Lawbringer.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,8 +58,8 @@ public class Lawbringer extends CardImpl { public Lawbringer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.REBEL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LawlessBroker.java b/Mage.Sets/src/mage/cards/l/LawlessBroker.java index 9f73e828eb..16c0ea911e 100644 --- a/Mage.Sets/src/mage/cards/l/LawlessBroker.java +++ b/Mage.Sets/src/mage/cards/l/LawlessBroker.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetControlledCreaturePermanent; @@ -46,8 +47,8 @@ public class LawlessBroker extends CardImpl { public LawlessBroker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Aetherborn"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.AETHERBORN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LayClaim.java b/Mage.Sets/src/mage/cards/l/LayClaim.java index e77009d44f..dd843b55e4 100644 --- a/Mage.Sets/src/mage/cards/l/LayClaim.java +++ b/Mage.Sets/src/mage/cards/l/LayClaim.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class LayClaim extends CardImpl { public LayClaim(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{5}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant permanent TargetPermanent auraTarget = new TargetPermanent(); diff --git a/Mage.Sets/src/mage/cards/l/LazavDimirMastermind.java b/Mage.Sets/src/mage/cards/l/LazavDimirMastermind.java index 229874c009..57176ba918 100644 --- a/Mage.Sets/src/mage/cards/l/LazavDimirMastermind.java +++ b/Mage.Sets/src/mage/cards/l/LazavDimirMastermind.java @@ -56,7 +56,7 @@ public class LazavDimirMastermind extends CardImpl { public LazavDimirMastermind(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{U}{B}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LeadBellyChimera.java b/Mage.Sets/src/mage/cards/l/LeadBellyChimera.java new file mode 100644 index 0000000000..c6f7d53957 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LeadBellyChimera.java @@ -0,0 +1,87 @@ +/* + * 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.cards.l; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * + * @author TheElk801 + */ +public class LeadBellyChimera extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Chimera creature you control"); + + static { + filter.add(new SubtypePredicate(SubType.CHIMERA)); + } + + public LeadBellyChimera(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + + this.subtype.add(SubType.CHIMERA); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Sacrifice Lead-Belly Chimera: Put a +2/+2 counter on target Chimera creature. It gains trample. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P2P2.createInstance()), new SacrificeSourceCost()); + ability.addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield)); + ability.addTarget(new TargetCreaturePermanent(filter)); + addAbility(ability); + } + + public LeadBellyChimera(final LeadBellyChimera card) { + super(card); + } + + @Override + public LeadBellyChimera copy() { + return new LeadBellyChimera(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LeadGolem.java b/Mage.Sets/src/mage/cards/l/LeadGolem.java index f4b4810212..1bc33273ab 100644 --- a/Mage.Sets/src/mage/cards/l/LeadGolem.java +++ b/Mage.Sets/src/mage/cards/l/LeadGolem.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DontUntapInControllersNextUntapStepSourceEf import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class LeadGolem extends CardImpl { public LeadGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/l/LeadenFists.java b/Mage.Sets/src/mage/cards/l/LeadenFists.java index da36643b00..209051ae98 100644 --- a/Mage.Sets/src/mage/cards/l/LeadenFists.java +++ b/Mage.Sets/src/mage/cards/l/LeadenFists.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class LeadenFists extends CardImpl { public LeadenFists(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/l/LeadenMyr.java b/Mage.Sets/src/mage/cards/l/LeadenMyr.java index c32270a6af..1bd9d44b92 100644 --- a/Mage.Sets/src/mage/cards/l/LeadenMyr.java +++ b/Mage.Sets/src/mage/cards/l/LeadenMyr.java @@ -34,6 +34,7 @@ import mage.abilities.mana.BlackManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class LeadenMyr extends CardImpl { public LeadenMyr (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(1); this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/cards/l/LeafCrownedElder.java b/Mage.Sets/src/mage/cards/l/LeafCrownedElder.java index 1ddaab53a3..0680363bb1 100644 --- a/Mage.Sets/src/mage/cards/l/LeafCrownedElder.java +++ b/Mage.Sets/src/mage/cards/l/LeafCrownedElder.java @@ -36,6 +36,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -48,8 +49,8 @@ public class LeafCrownedElder extends CardImpl { public LeafCrownedElder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/l/LeafDancer.java b/Mage.Sets/src/mage/cards/l/LeafDancer.java index fd35271991..6b41c5d50f 100644 --- a/Mage.Sets/src/mage/cards/l/LeafDancer.java +++ b/Mage.Sets/src/mage/cards/l/LeafDancer.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class LeafDancer extends CardImpl { public LeafDancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Centaur"); + this.subtype.add(SubType.CENTAUR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LeafGilder.java b/Mage.Sets/src/mage/cards/l/LeafGilder.java index 639b4a2f1b..201d5d5c08 100644 --- a/Mage.Sets/src/mage/cards/l/LeafGilder.java +++ b/Mage.Sets/src/mage/cards/l/LeafGilder.java @@ -33,6 +33,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class LeafGilder extends CardImpl { public LeafGilder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LeafcrownDryad.java b/Mage.Sets/src/mage/cards/l/LeafcrownDryad.java index 579df7ac54..c9368e54ad 100644 --- a/Mage.Sets/src/mage/cards/l/LeafcrownDryad.java +++ b/Mage.Sets/src/mage/cards/l/LeafcrownDryad.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -50,8 +51,8 @@ public class LeafcrownDryad extends CardImpl { public LeafcrownDryad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{G}"); - this.subtype.add("Nymph"); - this.subtype.add("Dryad"); + this.subtype.add(SubType.NYMPH); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LeafdrakeRoost.java b/Mage.Sets/src/mage/cards/l/LeafdrakeRoost.java index 86011206de..288bfb792a 100644 --- a/Mage.Sets/src/mage/cards/l/LeafdrakeRoost.java +++ b/Mage.Sets/src/mage/cards/l/LeafdrakeRoost.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class LeafdrakeRoost extends CardImpl { public LeafdrakeRoost(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/l/LeapingLizard.java b/Mage.Sets/src/mage/cards/l/LeapingLizard.java index 0a420f58b7..04d857dcce 100644 --- a/Mage.Sets/src/mage/cards/l/LeapingLizard.java +++ b/Mage.Sets/src/mage/cards/l/LeapingLizard.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class LeapingLizard extends CardImpl { public LeapingLizard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LeapingMaster.java b/Mage.Sets/src/mage/cards/l/LeapingMaster.java index fb15d4e425..1ec4f4c9f4 100644 --- a/Mage.Sets/src/mage/cards/l/LeapingMaster.java +++ b/Mage.Sets/src/mage/cards/l/LeapingMaster.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class LeapingMaster extends CardImpl { public LeapingMaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/Leashling.java b/Mage.Sets/src/mage/cards/l/Leashling.java index 0dc1975c39..7f9d242fe3 100644 --- a/Mage.Sets/src/mage/cards/l/Leashling.java +++ b/Mage.Sets/src/mage/cards/l/Leashling.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -53,7 +54,7 @@ public class Leashling extends CardImpl { public Leashling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LeatherbackBaloth.java b/Mage.Sets/src/mage/cards/l/LeatherbackBaloth.java index 2a29b093bf..5320625567 100644 --- a/Mage.Sets/src/mage/cards/l/LeatherbackBaloth.java +++ b/Mage.Sets/src/mage/cards/l/LeatherbackBaloth.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class LeatherbackBaloth extends CardImpl { public LeatherbackBaloth (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/l/LeaveChance.java b/Mage.Sets/src/mage/cards/l/LeaveChance.java index 51998a2ae8..c90da7714b 100644 --- a/Mage.Sets/src/mage/cards/l/LeaveChance.java +++ b/Mage.Sets/src/mage/cards/l/LeaveChance.java @@ -1,124 +1,124 @@ -/* - * 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.cards.l; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.ReturnToHandTargetEffect; -import mage.abilities.keyword.AftermathAbility; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.SplitCard; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.SpellAbilityType; -import mage.constants.TargetController; -import mage.filter.FilterCard; -import mage.filter.FilterPermanent; -import mage.filter.predicate.other.OwnerPredicate; -import mage.game.Game; -import mage.players.Player; -import mage.target.TargetCard; -import mage.target.TargetPermanent; -import mage.target.common.TargetCardInHand; - -/** - * - * @author LevelX2 - */ -public class LeaveChance extends SplitCard { - - public LeaveChance(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{1}{W}", "{3}{R}", SpellAbilityType.SPLIT_AFTERMATH); - - // Return any number of target permanents you own to your hand. - FilterPermanent filter = new FilterPermanent("permanents you own"); - filter.add(new OwnerPredicate(TargetController.YOU)); - getLeftHalfCard().getSpellAbility().addEffect(new ReturnToHandTargetEffect()); - getLeftHalfCard().getSpellAbility().addTarget(new TargetPermanent(0, Integer.MAX_VALUE, filter, false)); - - // Chance - // Sorcery - // Aftermath - ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true)); - // Discard any number of cards, then draw that many cards. - getRightHalfCard().getSpellAbility().addEffect(new ChanceEffect()); - - } - - public LeaveChance(final LeaveChance card) { - super(card); - } - - @Override - public LeaveChance copy() { - return new LeaveChance(this); - } -} - -class ChanceEffect extends OneShotEffect { - - ChanceEffect() { - super(Outcome.DrawCard); - this.staticText = "Discard any number of cards, then draw that many cards"; - } - - ChanceEffect(final ChanceEffect effect) { - super(effect); - } - - @Override - public ChanceEffect copy() { - return new ChanceEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Cards cardsInHand = controller.getHand().copy(); - TargetCard target = new TargetCardInHand(0, cardsInHand.size(), new FilterCard()); - controller.chooseTarget(outcome, cardsInHand, target, source, game); - if (!target.getTargets().isEmpty()) { - for (UUID cardId : target.getTargets()) { - Card card = game.getCard(cardId); - if (card != null) { - controller.discard(card, source, game); - } - } - game.applyEffects(); - controller.drawCards(target.getTargets().size(), game); - } - return true; - } - return false; - } -} +/* + * 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.cards.l; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.AftermathAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.SplitCard; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SpellAbilityType; +import mage.constants.TargetController; +import mage.filter.FilterCard; +import mage.filter.FilterPermanent; +import mage.filter.predicate.other.OwnerPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; +import mage.target.TargetPermanent; +import mage.target.common.TargetCardInHand; + +/** + * + * @author LevelX2 + */ +public class LeaveChance extends SplitCard { + + public LeaveChance(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{1}{W}", "{3}{R}", SpellAbilityType.SPLIT_AFTERMATH); + + // Return any number of target permanents you own to your hand. + FilterPermanent filter = new FilterPermanent("permanents you own"); + filter.add(new OwnerPredicate(TargetController.YOU)); + getLeftHalfCard().getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + getLeftHalfCard().getSpellAbility().addTarget(new TargetPermanent(0, Integer.MAX_VALUE, filter, false)); + + // Chance + // Sorcery + // Aftermath + ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true)); + // Discard any number of cards, then draw that many cards. + getRightHalfCard().getSpellAbility().addEffect(new ChanceEffect()); + + } + + public LeaveChance(final LeaveChance card) { + super(card); + } + + @Override + public LeaveChance copy() { + return new LeaveChance(this); + } +} + +class ChanceEffect extends OneShotEffect { + + ChanceEffect() { + super(Outcome.DrawCard); + this.staticText = "Discard any number of cards, then draw that many cards"; + } + + ChanceEffect(final ChanceEffect effect) { + super(effect); + } + + @Override + public ChanceEffect copy() { + return new ChanceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Cards cardsInHand = controller.getHand().copy(); + TargetCard target = new TargetCardInHand(0, cardsInHand.size(), new FilterCard()); + controller.chooseTarget(outcome, cardsInHand, target, source, game); + if (!target.getTargets().isEmpty()) { + for (UUID cardId : target.getTargets()) { + Card card = game.getCard(cardId); + if (card != null) { + controller.discard(card, source, game); + } + } + game.applyEffects(); + controller.drawCards(target.getTargets().size(), game); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/l/LeaveInTheDust.java b/Mage.Sets/src/mage/cards/l/LeaveInTheDust.java index fedc854565..3bc7e01ceb 100644 --- a/Mage.Sets/src/mage/cards/l/LeaveInTheDust.java +++ b/Mage.Sets/src/mage/cards/l/LeaveInTheDust.java @@ -1,64 +1,64 @@ -/* - * 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.cards.l; - -import java.util.UUID; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.ReturnToHandTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.target.common.TargetNonlandPermanent; - -/** - * - * @author Styxo - */ -public class LeaveInTheDust extends CardImpl { - - public LeaveInTheDust(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}"); - - // Return target nonland permanent to its owner's hand. - this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); - this.getSpellAbility().addTarget(new TargetNonlandPermanent()); - - // Draw a card. - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); - - } - - public LeaveInTheDust(final LeaveInTheDust card) { - super(card); - } - - @Override - public LeaveInTheDust copy() { - return new LeaveInTheDust(this); - } -} +/* + * 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.cards.l; + +import java.util.UUID; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetNonlandPermanent; + +/** + * + * @author Styxo + */ +public class LeaveInTheDust extends CardImpl { + + public LeaveInTheDust(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}"); + + // Return target nonland permanent to its owner's hand. + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetNonlandPermanent()); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + + } + + public LeaveInTheDust(final LeaveInTheDust card) { + super(card); + } + + @Override + public LeaveInTheDust copy() { + return new LeaveInTheDust(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LeechBonder.java b/Mage.Sets/src/mage/cards/l/LeechBonder.java index 13b67c6d82..06af283385 100644 --- a/Mage.Sets/src/mage/cards/l/LeechBonder.java +++ b/Mage.Sets/src/mage/cards/l/LeechBonder.java @@ -43,6 +43,7 @@ import mage.cards.CardSetInfo; import mage.choices.Choice; import mage.choices.ChoiceImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.Counter; @@ -62,8 +63,8 @@ public class LeechBonder extends CardImpl { public LeechBonder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LeechingLicid.java b/Mage.Sets/src/mage/cards/l/LeechingLicid.java index 43c4ebea0b..8f4b8fcb24 100644 --- a/Mage.Sets/src/mage/cards/l/LeechingLicid.java +++ b/Mage.Sets/src/mage/cards/l/LeechingLicid.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.TargetController; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class LeechingLicid extends CardImpl { public LeechingLicid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Licid"); + this.subtype.add(SubType.LICID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LeechingSliver.java b/Mage.Sets/src/mage/cards/l/LeechingSliver.java index 50d668c71d..b05715f373 100644 --- a/Mage.Sets/src/mage/cards/l/LeechingSliver.java +++ b/Mage.Sets/src/mage/cards/l/LeechingSliver.java @@ -55,7 +55,7 @@ public class LeechingSliver extends CardImpl { public LeechingSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LeechriddenSwamp.java b/Mage.Sets/src/mage/cards/l/LeechriddenSwamp.java index 549f3c268b..88102afc4c 100644 --- a/Mage.Sets/src/mage/cards/l/LeechriddenSwamp.java +++ b/Mage.Sets/src/mage/cards/l/LeechriddenSwamp.java @@ -41,6 +41,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.Zone; @@ -64,7 +65,7 @@ public class LeechriddenSwamp extends CardImpl { public LeechriddenSwamp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Swamp"); + this.subtype.add(SubType.SWAMP); // ({tap}: Add {B} to your mana pool.) this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(1), new TapSourceCost())); diff --git a/Mage.Sets/src/mage/cards/l/LeeringEmblem.java b/Mage.Sets/src/mage/cards/l/LeeringEmblem.java index 7d5d41da95..abed3ffa43 100644 --- a/Mage.Sets/src/mage/cards/l/LeeringEmblem.java +++ b/Mage.Sets/src/mage/cards/l/LeeringEmblem.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; @@ -46,7 +47,7 @@ public class LeeringEmblem extends CardImpl { public LeeringEmblem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new SpellCastControllerTriggeredAbility(new BoostEquippedEffect(2, 2, Duration.EndOfTurn), false)); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); } diff --git a/Mage.Sets/src/mage/cards/l/LeeringGargoyle.java b/Mage.Sets/src/mage/cards/l/LeeringGargoyle.java new file mode 100644 index 0000000000..cd481a8697 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LeeringGargoyle.java @@ -0,0 +1,81 @@ +/* + * 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.cards.l; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.LoseAbilitySourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; + +/** + * + * @author TheElk801 + */ +public class LeeringGargoyle extends CardImpl { + + public LeeringGargoyle(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{U}"); + + this.subtype.add(SubType.GARGOYLE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {tap}: Leering Gargoyle gets -2/+2 and loses flying until end of turn. + Ability ability = new SimpleActivatedAbility( + new BoostSourceEffect(-2, 2, Duration.EndOfTurn) + .setText("{this} gets -2/+2"), + new TapSourceCost() + ); + ability.addEffect( + new LoseAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn) + .setText("and loses flying until end of turn") + ); + this.addAbility(ability); + } + + public LeeringGargoyle(final LeeringGargoyle card) { + super(card); + } + + @Override + public LeeringGargoyle copy() { + return new LeeringGargoyle(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LeeryFogbeast.java b/Mage.Sets/src/mage/cards/l/LeeryFogbeast.java index 53d7fab3ac..d52cc61e44 100644 --- a/Mage.Sets/src/mage/cards/l/LeeryFogbeast.java +++ b/Mage.Sets/src/mage/cards/l/LeeryFogbeast.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class LeeryFogbeast extends CardImpl { public LeeryFogbeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LegacysAllure.java b/Mage.Sets/src/mage/cards/l/LegacysAllure.java index bd96e9f2d7..6d58e0cdfc 100644 --- a/Mage.Sets/src/mage/cards/l/LegacysAllure.java +++ b/Mage.Sets/src/mage/cards/l/LegacysAllure.java @@ -37,15 +37,12 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.Duration; +import mage.constants.TargetAdjustment; import mage.constants.TargetController; import mage.constants.Zone; -import mage.counters.Counter; +import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.PowerPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; /** @@ -53,38 +50,24 @@ import mage.target.common.TargetCreaturePermanent; */ public class LegacysAllure extends CardImpl { - private final UUID originalId; + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power less than or equal to the number of treasure counters on {this}"); public LegacysAllure(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}"); // At the beginning of your upkeep, you may put a treasure counter on Legacy's Allure. - this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(new Counter("treasure")), TargetController.YOU, true)); + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, + new AddCountersSourceEffect(CounterType.TREASURE.createInstance(), true), TargetController.YOU, true)); // Sacrifice Legacy's Allure: Gain control of target creature with power less than or equal to the number of treasure counters on Legacy's Allure. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainControlTargetEffect(Duration.EndOfGame, true), new SacrificeSourceCost()); - ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature with power less than or equal to the number of treasure counters on " + getLogName()))); - originalId = ability.getOriginalId(); + ability.addTarget(new TargetCreaturePermanent(0, 0, filter, false)); + ability.setTargetAdjustment(TargetAdjustment.TREASURE_COUNTER_POWER); this.addAbility(ability); } public LegacysAllure(final LegacysAllure card) { super(card); - this.originalId = card.originalId; - } - - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(originalId)) { - Permanent sourcePermanent = game.getPermanent(ability.getSourceId()); - if (sourcePermanent != null) { - int numbCounters = sourcePermanent.getCounters(game).getCount("treasure"); - FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power less than or equal to the number of treasure counters on " + getLogName()); - filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, numbCounters + 1)); - ability.getTargets().clear(); - ability.getTargets().add(new TargetCreaturePermanent(filter)); - } - } } @Override diff --git a/Mage.Sets/src/mage/cards/l/LegionConquistador.java b/Mage.Sets/src/mage/cards/l/LegionConquistador.java new file mode 100644 index 0000000000..0ccad7c76e --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LegionConquistador.java @@ -0,0 +1,78 @@ +/* + * 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.cards.l; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author TheElk801 + */ +public class LegionConquistador extends CardImpl { + + private static final FilterCard filter = new FilterCard("cards named Legion Conquistador"); + + static { + filter.add(new NamePredicate("Legion Conquistador")); + } + + public LegionConquistador(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Legion Conquistador enters the battlefield, you may search your library for any number of cards named Legion Conquistador, reveal them, put them into your hand, then shuffle your library + TargetCardInLibrary target = new TargetCardInLibrary(0, Integer.MAX_VALUE, filter); + Effect effect = new SearchLibraryPutInHandEffect(target, true, true); + effect.setText("you may search your library for any number of cards named Legion Conquistador, reveal them, put them into your hand, then shuffle your library"); + this.addAbility(new EntersBattlefieldTriggeredAbility(effect, true)); + } + + public LegionConquistador(final LegionConquistador card) { + super(card); + } + + @Override + public LegionConquistador copy() { + return new LegionConquistador(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LegionLoyalist.java b/Mage.Sets/src/mage/cards/l/LegionLoyalist.java index edb4d8ef2d..5cce67e556 100644 --- a/Mage.Sets/src/mage/cards/l/LegionLoyalist.java +++ b/Mage.Sets/src/mage/cards/l/LegionLoyalist.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterControlledCreaturePermanent; import mage.game.Game; @@ -55,8 +56,8 @@ public class LegionLoyalist extends CardImpl { public LegionLoyalist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LegionsJudgment.java b/Mage.Sets/src/mage/cards/l/LegionsJudgment.java new file mode 100644 index 0000000000..2f39c6af53 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LegionsJudgment.java @@ -0,0 +1,68 @@ +/* + * 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.cards.l; + +import java.util.UUID; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public class LegionsJudgment extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 4 or greater"); + + static { + filter.add(new PowerPredicate(ComparisonType.MORE_THAN, 3)); + } + + public LegionsJudgment(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{W}"); + + // Destroy target creature with power 4 or greater. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + } + + public LegionsJudgment(final LegionsJudgment card) { + super(card); + } + + @Override + public LegionsJudgment copy() { + return new LegionsJudgment(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LegionsLanding.java b/Mage.Sets/src/mage/cards/l/LegionsLanding.java new file mode 100644 index 0000000000..426e28a936 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LegionsLanding.java @@ -0,0 +1,108 @@ +/* + * 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.cards.l; + +import java.util.UUID; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.TransformAbility; +import mage.constants.SuperType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.a.AdantoTheFirstFort; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.token.IxalanVampireToken; + +/** + * + * @author TheElk801 + */ +public class LegionsLanding extends CardImpl { + + public LegionsLanding(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}"); + + this.addSuperType(SuperType.LEGENDARY); + + this.transformable = true; + this.secondSideCardClazz = AdantoTheFirstFort.class; + + // When Legion's Landing enters the battlefield, create a 1/1 white Vampire creature token with lifelink. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new IxalanVampireToken()))); + + // When you attack with three or more creatures, transform Legion's Landing. + this.addAbility(new TransformAbility()); + this.addAbility(new LegionsLandingTriggeredAbility(new TransformSourceEffect(true))); + } + + public LegionsLanding(final LegionsLanding card) { + super(card); + } + + @Override + public LegionsLanding copy() { + return new LegionsLanding(this); + } +} + +class LegionsLandingTriggeredAbility extends TriggeredAbilityImpl { + + public LegionsLandingTriggeredAbility(Effect effect) { + super(Zone.BATTLEFIELD, effect, false); + } + + public LegionsLandingTriggeredAbility(final LegionsLandingTriggeredAbility ability) { + super(ability); + } + + @Override + public LegionsLandingTriggeredAbility copy() { + return new LegionsLandingTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DECLARED_ATTACKERS; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return game.getCombat().getAttackers().size() >= 3 && game.getCombat().getAttackingPlayerId().equals(getControllerId()); + } + + @Override + public String getRule() { + return new StringBuilder("When you attack with three or more creatures, ").append(super.getRule()).toString(); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LegionsOfLimDul.java b/Mage.Sets/src/mage/cards/l/LegionsOfLimDul.java index e7f11c73c9..56ffa6a5ab 100644 --- a/Mage.Sets/src/mage/cards/l/LegionsOfLimDul.java +++ b/Mage.Sets/src/mage/cards/l/LegionsOfLimDul.java @@ -54,7 +54,7 @@ public class LegionsOfLimDul extends CardImpl { public LegionsOfLimDul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LeoninAbunas.java b/Mage.Sets/src/mage/cards/l/LeoninAbunas.java index ecff7463d5..7ed9975cc2 100644 --- a/Mage.Sets/src/mage/cards/l/LeoninAbunas.java +++ b/Mage.Sets/src/mage/cards/l/LeoninAbunas.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterArtifactPermanent; @@ -46,8 +47,8 @@ public class LeoninAbunas extends CardImpl { public LeoninAbunas(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/l/LeoninArbiter.java b/Mage.Sets/src/mage/cards/l/LeoninArbiter.java index 7d4d85efed..5ac928bdda 100644 --- a/Mage.Sets/src/mage/cards/l/LeoninArbiter.java +++ b/Mage.Sets/src/mage/cards/l/LeoninArbiter.java @@ -53,8 +53,8 @@ public class LeoninArbiter extends CardImpl { public LeoninArbiter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LeoninArmorguard.java b/Mage.Sets/src/mage/cards/l/LeoninArmorguard.java index 1b1042bc4d..ad068bb04c 100644 --- a/Mage.Sets/src/mage/cards/l/LeoninArmorguard.java +++ b/Mage.Sets/src/mage/cards/l/LeoninArmorguard.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -53,8 +54,8 @@ public class LeoninArmorguard extends CardImpl { public LeoninArmorguard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.SOLDIER); diff --git a/Mage.Sets/src/mage/cards/l/LeoninBattlemage.java b/Mage.Sets/src/mage/cards/l/LeoninBattlemage.java index c6eb47e371..4489cf6403 100644 --- a/Mage.Sets/src/mage/cards/l/LeoninBattlemage.java +++ b/Mage.Sets/src/mage/cards/l/LeoninBattlemage.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class LeoninBattlemage extends CardImpl { public LeoninBattlemage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LeoninBola.java b/Mage.Sets/src/mage/cards/l/LeoninBola.java index 50a6e08e84..f5c28fc073 100644 --- a/Mage.Sets/src/mage/cards/l/LeoninBola.java +++ b/Mage.Sets/src/mage/cards/l/LeoninBola.java @@ -50,7 +50,7 @@ public class LeoninBola extends CardImpl { public LeoninBola(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has "{tap}, Unattach Leonin Bola: Tap target creature." Ability gainAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/l/LeoninDenGuard.java b/Mage.Sets/src/mage/cards/l/LeoninDenGuard.java index c2d214825e..dd7c35cf1e 100644 --- a/Mage.Sets/src/mage/cards/l/LeoninDenGuard.java +++ b/Mage.Sets/src/mage/cards/l/LeoninDenGuard.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -52,8 +53,8 @@ public class LeoninDenGuard extends CardImpl { public LeoninDenGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.SOLDIER); this.color.setWhite(true); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LeoninElder.java b/Mage.Sets/src/mage/cards/l/LeoninElder.java index e7c23e53a9..4b070022fd 100644 --- a/Mage.Sets/src/mage/cards/l/LeoninElder.java +++ b/Mage.Sets/src/mage/cards/l/LeoninElder.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterArtifactPermanent; @@ -45,8 +46,8 @@ public class LeoninElder extends CardImpl { public LeoninElder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Cat"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LeoninIconoclast.java b/Mage.Sets/src/mage/cards/l/LeoninIconoclast.java index 9b1e0c5ca9..b0dd4681c7 100644 --- a/Mage.Sets/src/mage/cards/l/LeoninIconoclast.java +++ b/Mage.Sets/src/mage/cards/l/LeoninIconoclast.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -57,8 +58,8 @@ public class LeoninIconoclast extends CardImpl { public LeoninIconoclast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Monk"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.MONK); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LeoninRelicWarder.java b/Mage.Sets/src/mage/cards/l/LeoninRelicWarder.java index 5edadb5827..7e970e1dd6 100644 --- a/Mage.Sets/src/mage/cards/l/LeoninRelicWarder.java +++ b/Mage.Sets/src/mage/cards/l/LeoninRelicWarder.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnFromExileForSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.TargetPermanent; @@ -51,8 +52,8 @@ public class LeoninRelicWarder extends CardImpl { public LeoninRelicWarder (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LeoninScimitar.java b/Mage.Sets/src/mage/cards/l/LeoninScimitar.java index 6fb220e5ab..f4e4633b8e 100644 --- a/Mage.Sets/src/mage/cards/l/LeoninScimitar.java +++ b/Mage.Sets/src/mage/cards/l/LeoninScimitar.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -45,7 +46,7 @@ public class LeoninScimitar extends CardImpl { public LeoninScimitar(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); diff --git a/Mage.Sets/src/mage/cards/l/LeoninShikari.java b/Mage.Sets/src/mage/cards/l/LeoninShikari.java index c53b4f4965..4231cf6d65 100644 --- a/Mage.Sets/src/mage/cards/l/LeoninShikari.java +++ b/Mage.Sets/src/mage/cards/l/LeoninShikari.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class LeoninShikari extends CardImpl { public LeoninShikari(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LeoninSkyhunter.java b/Mage.Sets/src/mage/cards/l/LeoninSkyhunter.java index 7d2ad8640e..34c19b2035 100644 --- a/Mage.Sets/src/mage/cards/l/LeoninSkyhunter.java +++ b/Mage.Sets/src/mage/cards/l/LeoninSkyhunter.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class LeoninSkyhunter extends CardImpl { public LeoninSkyhunter (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Knight"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LeoninSnarecaster.java b/Mage.Sets/src/mage/cards/l/LeoninSnarecaster.java index d70b4ee5e4..a67bf103c3 100644 --- a/Mage.Sets/src/mage/cards/l/LeoninSnarecaster.java +++ b/Mage.Sets/src/mage/cards/l/LeoninSnarecaster.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -45,8 +46,8 @@ public class LeoninSnarecaster extends CardImpl { public LeoninSnarecaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LeoninSquire.java b/Mage.Sets/src/mage/cards/l/LeoninSquire.java index 89f15be92d..d96733bf63 100644 --- a/Mage.Sets/src/mage/cards/l/LeoninSquire.java +++ b/Mage.Sets/src/mage/cards/l/LeoninSquire.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.common.FilterArtifactCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -53,8 +54,8 @@ public class LeoninSquire extends CardImpl { public LeoninSquire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LeovoldEmissaryOfTrest.java b/Mage.Sets/src/mage/cards/l/LeovoldEmissaryOfTrest.java index d11cbe93eb..5cf3169c09 100644 --- a/Mage.Sets/src/mage/cards/l/LeovoldEmissaryOfTrest.java +++ b/Mage.Sets/src/mage/cards/l/LeovoldEmissaryOfTrest.java @@ -52,8 +52,8 @@ public class LeovoldEmissaryOfTrest extends CardImpl { public LeovoldEmissaryOfTrest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{G}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LeshracsRite.java b/Mage.Sets/src/mage/cards/l/LeshracsRite.java index 276df094b7..dde98d3b54 100644 --- a/Mage.Sets/src/mage/cards/l/LeshracsRite.java +++ b/Mage.Sets/src/mage/cards/l/LeshracsRite.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class LeshracsRite extends CardImpl { public LeshracsRite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/l/LesserGargadon.java b/Mage.Sets/src/mage/cards/l/LesserGargadon.java index 5387106f1d..f0cd4aba19 100644 --- a/Mage.Sets/src/mage/cards/l/LesserGargadon.java +++ b/Mage.Sets/src/mage/cards/l/LesserGargadon.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; /** @@ -44,7 +45,7 @@ public class LesserGargadon extends CardImpl { public LesserGargadon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LethalVapors.java b/Mage.Sets/src/mage/cards/l/LethalVapors.java index 72df6e7024..0ccc08e888 100644 --- a/Mage.Sets/src/mage/cards/l/LethalVapors.java +++ b/Mage.Sets/src/mage/cards/l/LethalVapors.java @@ -1,78 +1,78 @@ -/* - * 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.cards.l; - -import java.util.UUID; -import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.DestroySourceEffect; -import mage.abilities.effects.common.DestroyTargetEffect; -import mage.abilities.effects.common.InfoEffect; -import mage.abilities.effects.common.turn.SkipNextTurnSourceEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SetTargetPointer; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.filter.StaticFilters; - -/** - * - * @author LevelX2 - */ -public class LethalVapors extends CardImpl { - - public LethalVapors(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{B}"); - - // Whenever a creature enters the battlefield, destroy it. - this.addAbility(new EntersBattlefieldAllTriggeredAbility( - Zone.BATTLEFIELD, - new DestroyTargetEffect().setText("destroy it"), - StaticFilters.FILTER_PERMANENT_A_CREATURE, - false, SetTargetPointer.PERMANENT, null)); - - // {0}: Destroy Lethal Vapors. You skip your next turn. Any player may activate this ability. - SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroySourceEffect(), new ManaCostsImpl("{0}")); - ability.setMayActivate(TargetController.ANY); - ability.addEffect(new SkipNextTurnSourceEffect()); - ability.addEffect(new InfoEffect("Any player may activate this ability")); - this.addAbility(ability); - } - - public LethalVapors(final LethalVapors card) { - super(card); - } - - @Override - public LethalVapors copy() { - return new LethalVapors(this); - } -} +/* + * 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.cards.l; + +import java.util.UUID; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DestroySourceEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.InfoEffect; +import mage.abilities.effects.common.turn.SkipNextTurnSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SetTargetPointer; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.StaticFilters; + +/** + * + * @author LevelX2 + */ +public class LethalVapors extends CardImpl { + + public LethalVapors(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{B}"); + + // Whenever a creature enters the battlefield, destroy it. + this.addAbility(new EntersBattlefieldAllTriggeredAbility( + Zone.BATTLEFIELD, + new DestroyTargetEffect().setText("destroy it"), + StaticFilters.FILTER_PERMANENT_A_CREATURE, + false, SetTargetPointer.PERMANENT, null)); + + // {0}: Destroy Lethal Vapors. You skip your next turn. Any player may activate this ability. + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroySourceEffect(), new ManaCostsImpl("{0}")); + ability.setMayActivate(TargetController.ANY); + ability.addEffect(new SkipNextTurnSourceEffect()); + ability.addEffect(new InfoEffect("Any player may activate this ability")); + this.addAbility(ability); + } + + public LethalVapors(final LethalVapors card) { + super(card); + } + + @Override + public LethalVapors copy() { + return new LethalVapors(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/Leveler.java b/Mage.Sets/src/mage/cards/l/Leveler.java index c1f21a5a69..ebf4a4ca55 100644 --- a/Mage.Sets/src/mage/cards/l/Leveler.java +++ b/Mage.Sets/src/mage/cards/l/Leveler.java @@ -37,6 +37,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -50,7 +51,7 @@ public class Leveler extends CardImpl { public Leveler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Juggernaut"); + this.subtype.add(SubType.JUGGERNAUT); this.power = new MageInt(10); this.toughness = new MageInt(10); diff --git a/Mage.Sets/src/mage/cards/l/Leviathan.java b/Mage.Sets/src/mage/cards/l/Leviathan.java new file mode 100644 index 0000000000..cf79670e67 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/Leviathan.java @@ -0,0 +1,138 @@ +/* + * 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.cards.l; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.PayCostToAttackBlockEffectImpl; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.DontUntapInControllersUntapStepSourceEffect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.abilities.effects.common.combat.CantAttackUnlessPaysAttachedEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.target.common.TargetControlledPermanent; + + +//import mage.abilities.decorator.ConditionalTriggeredAbility; + +/** + * + * @author L_J + */ +public class Leviathan extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("two Islands"); + static { + filter.add(new SubtypePredicate(SubType.ISLAND)); + } + + public Leviathan(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}{U}{U}"); + this.subtype.add(SubType.LEVIATHAN); + + this.power = new MageInt(10); + this.toughness = new MageInt(10); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Leviathan enters the battlefield tapped and doesn't untap during your untap step. + Ability abilityTapped = new EntersBattlefieldTappedAbility( + "{this} enters the battlefield tapped and doesn't untap during your untap step."); + abilityTapped.addEffect(new DontUntapInControllersUntapStepSourceEffect()); + this.addAbility(abilityTapped); + + // At the beginning of your upkeep, you may sacrifice two Islands. If you do, untap Leviathan. + this.addAbility(new BeginningOfUpkeepTriggeredAbility( + Zone.BATTLEFIELD, + new DoIfCostPaid(new UntapSourceEffect(), + new SacrificeTargetCost(new TargetControlledPermanent(2, 2, filter, false))), + TargetController.YOU, + false)); + + // Leviathan can't attack unless you sacrifice two Islands. (This cost is paid as attackers are declared.) + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new LeviathanCostToAttackBlockEffect())); + + } + + public Leviathan(final Leviathan card) { + super(card); + } + + @Override + public Leviathan copy() { + return new Leviathan(this); + } +} + + +class LeviathanCostToAttackBlockEffect extends PayCostToAttackBlockEffectImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("two Islands"); + static { + filter.add(new SubtypePredicate(SubType.ISLAND)); + } + + LeviathanCostToAttackBlockEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment, RestrictType.ATTACK, + new SacrificeTargetCost(new TargetControlledPermanent(2, 2, filter, false))); + staticText = "{this} can't attack unless you sacrifice two Islands (This cost is paid as attackers are declared.)"; + } + + LeviathanCostToAttackBlockEffect(LeviathanCostToAttackBlockEffect effect) { + super(effect); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + return source.getSourceId().equals(event.getSourceId()); + } + + @Override + public LeviathanCostToAttackBlockEffect copy() { + return new LeviathanCostToAttackBlockEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/l/LeyDruid.java b/Mage.Sets/src/mage/cards/l/LeyDruid.java index 5a42cb37b5..90328786d0 100644 --- a/Mage.Sets/src/mage/cards/l/LeyDruid.java +++ b/Mage.Sets/src/mage/cards/l/LeyDruid.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetLandPermanent; @@ -48,8 +49,8 @@ public class LeyDruid extends CardImpl { public LeyDruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LeylinePhantom.java b/Mage.Sets/src/mage/cards/l/LeylinePhantom.java index 6b1b3df3a2..dc78632914 100644 --- a/Mage.Sets/src/mage/cards/l/LeylinePhantom.java +++ b/Mage.Sets/src/mage/cards/l/LeylinePhantom.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.DamagedEvent; @@ -49,7 +50,7 @@ public class LeylinePhantom extends CardImpl { public LeylinePhantom(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/l/Lhurgoyf.java b/Mage.Sets/src/mage/cards/l/Lhurgoyf.java index afb8823a0c..cd6871737a 100644 --- a/Mage.Sets/src/mage/cards/l/Lhurgoyf.java +++ b/Mage.Sets/src/mage/cards/l/Lhurgoyf.java @@ -36,6 +36,7 @@ import mage.abilities.effects.ContinuousEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -53,7 +54,7 @@ public class Lhurgoyf extends CardImpl { public Lhurgoyf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Lhurgoyf"); + this.subtype.add(SubType.LHURGOYF); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/l/Liability.java b/Mage.Sets/src/mage/cards/l/Liability.java new file mode 100644 index 0000000000..5ced06a414 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/Liability.java @@ -0,0 +1,104 @@ +/* + * 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.cards.l; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author L_J + */ +public class Liability extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("a nontoken permanent"); + + static { + filter.add(Predicates.not(new TokenPredicate())); + } + + public Liability(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}{B}"); + + // Whenever a nontoken permanent is put into a player's graveyard from the battlefield, that player loses 1 life. + this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(new LiabilityEffect(), false, filter, true)); + } + + public Liability(final Liability card) { + super(card); + } + + @Override + public Liability copy() { + return new Liability(this); + } +} + +class LiabilityEffect extends OneShotEffect { + + public LiabilityEffect() { + super(Outcome.Detriment); + this.staticText = "that player loses 1 life."; + } + + public LiabilityEffect(final LiabilityEffect effect) { + super(effect); + } + + @Override + public LiabilityEffect copy() { + return new LiabilityEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = (Permanent) game.getLastKnownInformation(this.getTargetPointer().getFirst(game, source), Zone.BATTLEFIELD); + if (permanent != null) { + Player controller = game.getPlayer(permanent.getControllerId()); + if (controller != null) { + controller.loseLife(1, game, false); + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/l/LiberatedDwarf.java b/Mage.Sets/src/mage/cards/l/LiberatedDwarf.java index d99713d75a..1c3dc66665 100644 --- a/Mage.Sets/src/mage/cards/l/LiberatedDwarf.java +++ b/Mage.Sets/src/mage/cards/l/LiberatedDwarf.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -61,7 +62,7 @@ public class LiberatedDwarf extends CardImpl { public LiberatedDwarf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Dwarf"); + this.subtype.add(SubType.DWARF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LichLordOfUnx.java b/Mage.Sets/src/mage/cards/l/LichLordOfUnx.java index 391ab999fe..fe10e1bb90 100644 --- a/Mage.Sets/src/mage/cards/l/LichLordOfUnx.java +++ b/Mage.Sets/src/mage/cards/l/LichLordOfUnx.java @@ -61,8 +61,8 @@ public class LichLordOfUnx extends CardImpl { public LichLordOfUnx(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/Lichenthrope.java b/Mage.Sets/src/mage/cards/l/Lichenthrope.java new file mode 100644 index 0000000000..d0fad87116 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/Lichenthrope.java @@ -0,0 +1,122 @@ +/* + * 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.cards.l; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.DamageCreatureEvent; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author TheElk801 + */ +public class Lichenthrope extends CardImpl { + + public Lichenthrope(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.FUNGUS); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // If damage would be dealt to Lichenthrope, put that many -1/-1 counters on it instead. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new LichenthropeEffect())); + + // At the beginning of your upkeep, remove a -1/-1 counter from Lichenthrope. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new RemoveCounterSourceEffect(CounterType.M1M1.createInstance()), TargetController.YOU, false)); + } + + public Lichenthrope(final Lichenthrope card) { + super(card); + } + + @Override + public Lichenthrope copy() { + return new Lichenthrope(this); + } +} + +class LichenthropeEffect extends ReplacementEffectImpl { + + LichenthropeEffect() { + super(Duration.WhileOnBattlefield, Outcome.BoostCreature); + staticText = "If damage would be dealt to {this}, put that many -1/-1 counters on it instead"; + } + + LichenthropeEffect(final LichenthropeEffect effect) { + super(effect); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + DamageCreatureEvent damageEvent = (DamageCreatureEvent) event; + Permanent p = game.getPermanent(source.getSourceId()); + if (p != null) { + p.addCounters(CounterType.M1M1.createInstance(damageEvent.getAmount()), source, game); + } + return true; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DAMAGE_CREATURE; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + return event.getTargetId().equals(source.getSourceId()); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public LichenthropeEffect copy() { + return new LichenthropeEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LiciaSanguineTribune.java b/Mage.Sets/src/mage/cards/l/LiciaSanguineTribune.java index 81526d2b8a..29a453b0be 100644 --- a/Mage.Sets/src/mage/cards/l/LiciaSanguineTribune.java +++ b/Mage.Sets/src/mage/cards/l/LiciaSanguineTribune.java @@ -47,6 +47,7 @@ import mage.constants.CardType; import mage.constants.CostModificationType; import mage.constants.Duration; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.counters.CounterType; @@ -65,8 +66,8 @@ public class LiciaSanguineTribune extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}{W}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vampire"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -80,7 +81,7 @@ public class LiciaSanguineTribune extends CardImpl { this.addAbility(LifelinkAbility.getInstance()); // Pay 5 life: Put three +1/+1 counters on Licia. Activate this ability only on your turn and only once each turn. - this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(5)), new PayLifeCost(5), 1, MyTurnCondition.instance)); + this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), new PayLifeCost(5), 1, MyTurnCondition.instance)); } public LiciaSanguineTribune(final LiciaSanguineTribune card) { diff --git a/Mage.Sets/src/mage/cards/l/LiegeOfTheAxe.java b/Mage.Sets/src/mage/cards/l/LiegeOfTheAxe.java index f85bbf063d..d41c06831c 100644 --- a/Mage.Sets/src/mage/cards/l/LiegeOfTheAxe.java +++ b/Mage.Sets/src/mage/cards/l/LiegeOfTheAxe.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class LiegeOfTheAxe extends CardImpl { public LiegeOfTheAxe(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LiegeOfThePit.java b/Mage.Sets/src/mage/cards/l/LiegeOfThePit.java index 8ba48215a2..10463ec4a9 100644 --- a/Mage.Sets/src/mage/cards/l/LiegeOfThePit.java +++ b/Mage.Sets/src/mage/cards/l/LiegeOfThePit.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class LiegeOfThePit extends CardImpl { public LiegeOfThePit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/l/LiegeOfTheTangle.java b/Mage.Sets/src/mage/cards/l/LiegeOfTheTangle.java index 0f30504c2d..ed2d1246b3 100644 --- a/Mage.Sets/src/mage/cards/l/LiegeOfTheTangle.java +++ b/Mage.Sets/src/mage/cards/l/LiegeOfTheTangle.java @@ -59,7 +59,7 @@ public class LiegeOfTheTangle extends CardImpl { public LiegeOfTheTangle (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(8); this.toughness = new MageInt(8); @@ -190,7 +190,7 @@ class AwakeningLandToken extends Token { super("", "8/8 green Elemental creature"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(8); toughness = new MageInt(8); } diff --git a/Mage.Sets/src/mage/cards/l/LieutenantKirtar.java b/Mage.Sets/src/mage/cards/l/LieutenantKirtar.java index 741289be36..59ee8fbd7a 100644 --- a/Mage.Sets/src/mage/cards/l/LieutenantKirtar.java +++ b/Mage.Sets/src/mage/cards/l/LieutenantKirtar.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.target.common.TargetAttackingCreature; @@ -51,8 +52,8 @@ public class LieutenantKirtar extends CardImpl { public LieutenantKirtar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LieutenantsOfTheGuard.java b/Mage.Sets/src/mage/cards/l/LieutenantsOfTheGuard.java index 7908909135..ecf1b45385 100644 --- a/Mage.Sets/src/mage/cards/l/LieutenantsOfTheGuard.java +++ b/Mage.Sets/src/mage/cards/l/LieutenantsOfTheGuard.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.game.Game; @@ -53,8 +54,8 @@ public class LieutenantsOfTheGuard extends CardImpl { public LieutenantsOfTheGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LifeChisel.java b/Mage.Sets/src/mage/cards/l/LifeChisel.java new file mode 100644 index 0000000000..e34cf1f455 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LifeChisel.java @@ -0,0 +1,112 @@ +/* + * 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.cards.l; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.condition.common.IsStepCondition; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.PhaseStep; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class LifeChisel extends CardImpl { + + public LifeChisel(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); + + // Sacrifice a creature: You gain life equal to the sacrificed creature's toughness. Activate this ability only during your upkeep. + Ability ability = new ConditionalActivatedAbility( + Zone.BATTLEFIELD, + new LifeChiselEffect(), + new SacrificeTargetCost( + new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature"), true) + ), + new IsStepCondition(PhaseStep.UPKEEP), + null + ); + this.addAbility(ability); + } + + public LifeChisel(final LifeChisel card) { + super(card); + } + + @Override + public LifeChisel copy() { + return new LifeChisel(this); + } +} + +class LifeChiselEffect extends OneShotEffect { + + public LifeChiselEffect() { + super(Outcome.GainLife); + this.staticText = "You gain life equal to the sacrificed creature's toughness"; + } + + public LifeChiselEffect(final LifeChiselEffect effect) { + super(effect); + } + + @Override + public LifeChiselEffect copy() { + return new LifeChiselEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (Cost cost : source.getCosts()) { + if (cost instanceof SacrificeTargetCost) { + int amount = ((SacrificeTargetCost) cost).getPermanents().get(0).getToughness().getValue(); + if (amount > 0) { + controller.gainLife(amount, game); + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/l/LifeGoesOn.java b/Mage.Sets/src/mage/cards/l/LifeGoesOn.java index f14fda75c1..45360e2f7b 100644 --- a/Mage.Sets/src/mage/cards/l/LifeGoesOn.java +++ b/Mage.Sets/src/mage/cards/l/LifeGoesOn.java @@ -1,62 +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.cards.l; - -import java.util.UUID; -import mage.abilities.condition.common.MorbidCondition; -import mage.abilities.decorator.ConditionalOneShotEffect; -import mage.abilities.effects.common.GainLifeEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.watchers.common.MorbidWatcher; - -/** - * - * @author ciaccona007 - */ -public class LifeGoesOn extends CardImpl { - - public LifeGoesOn(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}"); - - - // You gain 4 life. If a creature died this turn, you gain 8 life instead. - getSpellAbility().addWatcher(new MorbidWatcher()); - getSpellAbility().addEffect(new ConditionalOneShotEffect(new GainLifeEffect(8), new GainLifeEffect(4), MorbidCondition.instance, "You gain 4 life. If a creature died this turn, you gain 8 life instead")); - } - - public LifeGoesOn(final LifeGoesOn card) { - super(card); - } - - @Override - public LifeGoesOn copy() { - return new LifeGoesOn(this); - } -} +/* + * 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.cards.l; + +import java.util.UUID; +import mage.abilities.condition.common.MorbidCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.watchers.common.MorbidWatcher; + +/** + * + * @author ciaccona007 + */ +public class LifeGoesOn extends CardImpl { + + public LifeGoesOn(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}"); + + + // You gain 4 life. If a creature died this turn, you gain 8 life instead. + getSpellAbility().addWatcher(new MorbidWatcher()); + getSpellAbility().addEffect(new ConditionalOneShotEffect(new GainLifeEffect(8), new GainLifeEffect(4), MorbidCondition.instance, "You gain 4 life. If a creature died this turn, you gain 8 life instead")); + } + + public LifeGoesOn(final LifeGoesOn card) { + super(card); + } + + @Override + public LifeGoesOn copy() { + return new LifeGoesOn(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LifebaneZombie.java b/Mage.Sets/src/mage/cards/l/LifebaneZombie.java index 94dbb6e8c6..cd4c95c5b2 100644 --- a/Mage.Sets/src/mage/cards/l/LifebaneZombie.java +++ b/Mage.Sets/src/mage/cards/l/LifebaneZombie.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.IntimidateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,8 +58,8 @@ public class LifebaneZombie extends CardImpl { public LifebaneZombie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LifebloodHydra.java b/Mage.Sets/src/mage/cards/l/LifebloodHydra.java index f715ff0708..d496a1b60e 100644 --- a/Mage.Sets/src/mage/cards/l/LifebloodHydra.java +++ b/Mage.Sets/src/mage/cards/l/LifebloodHydra.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.game.Game; @@ -52,7 +53,7 @@ public class LifebloodHydra extends CardImpl { public LifebloodHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{X}{G}{G}{G}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/l/LifecraftAwakening.java b/Mage.Sets/src/mage/cards/l/LifecraftAwakening.java index 94901fb192..1cfc935515 100644 --- a/Mage.Sets/src/mage/cards/l/LifecraftAwakening.java +++ b/Mage.Sets/src/mage/cards/l/LifecraftAwakening.java @@ -27,7 +27,6 @@ */ package mage.cards.l; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.dynamicvalue.common.ManacostVariableValue; @@ -37,10 +36,7 @@ import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.TargetController; +import mage.constants.*; import mage.counters.CounterType; import mage.filter.common.FilterArtifactPermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -50,6 +46,8 @@ import mage.game.permanent.token.Token; import mage.target.common.TargetArtifactPermanent; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author fireshoes @@ -100,8 +98,8 @@ class LifecraftAwakeningEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = (Permanent) game.getPermanent(source.getTargets().getFirstTarget()); - if (!permanent.isCreature() && !permanent.getSubtype(game).contains("Vehicle")) { + Permanent permanent = game.getPermanent(source.getTargets().getFirstTarget()); + if (!permanent.isCreature() && !permanent.hasSubtype(SubType.VEHICLE, game)) { ContinuousEffect continuousEffect = new BecomesCreatureTargetEffect(new LifecraftAwakeningToken(), false, true, Duration.Custom); continuousEffect.setTargetPointer(new FixedTarget(permanent, game)); game.addEffect(continuousEffect, source); @@ -118,7 +116,7 @@ class LifecraftAwakeningToken extends Token { this.cardType.add(CardType.ARTIFACT); this.cardType.add(CardType.CREATURE); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(0); this.toughness = new MageInt(0); } diff --git a/Mage.Sets/src/mage/cards/l/LifecraftCavalry.java b/Mage.Sets/src/mage/cards/l/LifecraftCavalry.java index d14fb90f45..8d0a1ccfd0 100644 --- a/Mage.Sets/src/mage/cards/l/LifecraftCavalry.java +++ b/Mage.Sets/src/mage/cards/l/LifecraftCavalry.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.watchers.common.RevoltWatcher; @@ -48,8 +49,8 @@ public class LifecraftCavalry extends CardImpl { public LifecraftCavalry(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/Lifelink.java b/Mage.Sets/src/mage/cards/l/Lifelink.java index 01d9be7a4f..1dd4483226 100644 --- a/Mage.Sets/src/mage/cards/l/Lifelink.java +++ b/Mage.Sets/src/mage/cards/l/Lifelink.java @@ -49,7 +49,7 @@ public class Lifelink extends CardImpl { public Lifelink (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/cards/l/Lifesmith.java b/Mage.Sets/src/mage/cards/l/Lifesmith.java index a3b41c8389..59be63ada6 100644 --- a/Mage.Sets/src/mage/cards/l/Lifesmith.java +++ b/Mage.Sets/src/mage/cards/l/Lifesmith.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterArtifactSpell; import mage.game.Game; @@ -49,8 +50,8 @@ import mage.players.Player; public class Lifesmith extends CardImpl { public Lifesmith (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/Lifespinner.java b/Mage.Sets/src/mage/cards/l/Lifespinner.java index fe4651079a..36f280cd55 100644 --- a/Mage.Sets/src/mage/cards/l/Lifespinner.java +++ b/Mage.Sets/src/mage/cards/l/Lifespinner.java @@ -61,7 +61,7 @@ public class Lifespinner extends CardImpl { public Lifespinner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LifespringDruid.java b/Mage.Sets/src/mage/cards/l/LifespringDruid.java index 81fb889bef..3da3ab00b5 100644 --- a/Mage.Sets/src/mage/cards/l/LifespringDruid.java +++ b/Mage.Sets/src/mage/cards/l/LifespringDruid.java @@ -33,6 +33,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class LifespringDruid extends CardImpl { public LifespringDruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/Lightbringer.java b/Mage.Sets/src/mage/cards/l/Lightbringer.java index 73b00f2724..52f696dcbd 100644 --- a/Mage.Sets/src/mage/cards/l/Lightbringer.java +++ b/Mage.Sets/src/mage/cards/l/Lightbringer.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,8 +58,8 @@ public class Lightbringer extends CardImpl { public Lightbringer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.REBEL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LighthouseChronologist.java b/Mage.Sets/src/mage/cards/l/LighthouseChronologist.java index 9a98b9d3be..9e21797c8f 100644 --- a/Mage.Sets/src/mage/cards/l/LighthouseChronologist.java +++ b/Mage.Sets/src/mage/cards/l/LighthouseChronologist.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.LevelerCardBuilder; import mage.cards.CardSetInfo; import mage.cards.LevelerCard; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -52,8 +53,8 @@ public class LighthouseChronologist extends LevelerCard { public LighthouseChronologist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.color.setBlue(true); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LightkeeperOfEmeria.java b/Mage.Sets/src/mage/cards/l/LightkeeperOfEmeria.java index 01ab1968c6..fa2f7f2d7e 100644 --- a/Mage.Sets/src/mage/cards/l/LightkeeperOfEmeria.java +++ b/Mage.Sets/src/mage/cards/l/LightkeeperOfEmeria.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.MultikickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -48,7 +49,7 @@ public class LightkeeperOfEmeria extends CardImpl { public LightkeeperOfEmeria(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LightmineField.java b/Mage.Sets/src/mage/cards/l/LightmineField.java index 2b4b8aaf72..7f9e081f62 100644 --- a/Mage.Sets/src/mage/cards/l/LightmineField.java +++ b/Mage.Sets/src/mage/cards/l/LightmineField.java @@ -27,10 +27,15 @@ */ package mage.cards.l; +import java.util.HashSet; +import java.util.Iterator; import java.util.List; +import java.util.Set; import java.util.UUID; +import mage.MageObjectReference; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -49,7 +54,7 @@ import mage.game.permanent.Permanent; public class LightmineField extends CardImpl { public LightmineField(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); // Whenever one or more creatures attack, Lightmine Field deals damage to each of those creatures equal to the number of attacking creatures. this.addAbility(new LightmineFieldTriggeredAbility()); @@ -87,7 +92,17 @@ class LightmineFieldTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - return !game.getCombat().getAttackers().isEmpty(); + Set attackSet = new HashSet<>(); + for (UUID attackerId : game.getCombat().getAttackers()) { + Permanent attacker = game.getPermanent(attackerId); + if (attacker != null) { + attackSet.add(new MageObjectReference(attacker, game)); + } + } + for (Effect effect : getEffects()) { + effect.setValue("Lightmine Field", attackSet); + } + return !attackSet.isEmpty(); } @Override @@ -116,9 +131,11 @@ class LightmineFieldEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { List attackers = game.getCombat().getAttackers(); int damage = attackers.size(); + Set attackSet = (Set) getValue("Lightmine Field"); if (!attackers.isEmpty()) { - for (UUID attacker : attackers) { - Permanent creature = game.getPermanent(attacker); + for (Iterator it = attackSet.iterator(); it.hasNext();) { + MageObjectReference attacker = it.next(); + Permanent creature = attacker.getPermanent(game); if (creature != null) { creature.damage(damage, source.getSourceId(), game, false, true); } diff --git a/Mage.Sets/src/mage/cards/l/LightningAngel.java b/Mage.Sets/src/mage/cards/l/LightningAngel.java index 5d92e16d2c..35847d2894 100644 --- a/Mage.Sets/src/mage/cards/l/LightningAngel.java +++ b/Mage.Sets/src/mage/cards/l/LightningAngel.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class LightningAngel extends CardImpl { public LightningAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{W}{U}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LightningBerserker.java b/Mage.Sets/src/mage/cards/l/LightningBerserker.java index a83a9c2141..fc062a1edb 100644 --- a/Mage.Sets/src/mage/cards/l/LightningBerserker.java +++ b/Mage.Sets/src/mage/cards/l/LightningBerserker.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class LightningBerserker extends CardImpl { public LightningBerserker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LightningCrafter.java b/Mage.Sets/src/mage/cards/l/LightningCrafter.java index 702cd544fe..3702258898 100644 --- a/Mage.Sets/src/mage/cards/l/LightningCrafter.java +++ b/Mage.Sets/src/mage/cards/l/LightningCrafter.java @@ -50,8 +50,8 @@ public class LightningCrafter extends CardImpl { public LightningCrafter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LightningDiadem.java b/Mage.Sets/src/mage/cards/l/LightningDiadem.java index 15ad029ee7..6c7f417243 100644 --- a/Mage.Sets/src/mage/cards/l/LightningDiadem.java +++ b/Mage.Sets/src/mage/cards/l/LightningDiadem.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class LightningDiadem extends CardImpl { public LightningDiadem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{5}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/l/LightningDragon.java b/Mage.Sets/src/mage/cards/l/LightningDragon.java index f2eb0233b2..a59b548d59 100644 --- a/Mage.Sets/src/mage/cards/l/LightningDragon.java +++ b/Mage.Sets/src/mage/cards/l/LightningDragon.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class LightningDragon extends CardImpl { public LightningDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LightningElemental.java b/Mage.Sets/src/mage/cards/l/LightningElemental.java index a534e33db3..8237fcdff7 100644 --- a/Mage.Sets/src/mage/cards/l/LightningElemental.java +++ b/Mage.Sets/src/mage/cards/l/LightningElemental.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class LightningElemental extends CardImpl { public LightningElemental (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LightningGreaves.java b/Mage.Sets/src/mage/cards/l/LightningGreaves.java index 5fbb9b4a65..5528ca760c 100644 --- a/Mage.Sets/src/mage/cards/l/LightningGreaves.java +++ b/Mage.Sets/src/mage/cards/l/LightningGreaves.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class LightningGreaves extends CardImpl { public LightningGreaves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has haste and shroud. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(HasteAbility.getInstance(), AttachmentType.EQUIPMENT)); diff --git a/Mage.Sets/src/mage/cards/l/LightningHounds.java b/Mage.Sets/src/mage/cards/l/LightningHounds.java index 5e187db02a..bcfb9deca9 100644 --- a/Mage.Sets/src/mage/cards/l/LightningHounds.java +++ b/Mage.Sets/src/mage/cards/l/LightningHounds.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class LightningHounds extends CardImpl { public LightningHounds(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LightningMauler.java b/Mage.Sets/src/mage/cards/l/LightningMauler.java index 9439bf1e5d..346dfe95d3 100644 --- a/Mage.Sets/src/mage/cards/l/LightningMauler.java +++ b/Mage.Sets/src/mage/cards/l/LightningMauler.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SoulbondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -49,8 +50,8 @@ public class LightningMauler extends CardImpl { public LightningMauler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LightningProwess.java b/Mage.Sets/src/mage/cards/l/LightningProwess.java index 6ac076a267..30a0f4340a 100644 --- a/Mage.Sets/src/mage/cards/l/LightningProwess.java +++ b/Mage.Sets/src/mage/cards/l/LightningProwess.java @@ -52,7 +52,7 @@ public class LightningProwess extends CardImpl { public LightningProwess(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/l/LightningReaver.java b/Mage.Sets/src/mage/cards/l/LightningReaver.java index d483794a31..494cf7797a 100644 --- a/Mage.Sets/src/mage/cards/l/LightningReaver.java +++ b/Mage.Sets/src/mage/cards/l/LightningReaver.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.counters.CounterType; @@ -55,8 +56,8 @@ public class LightningReaver extends CardImpl { public LightningReaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{R}"); - this.subtype.add("Zombie"); - this.subtype.add("Beast"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.BEAST); diff --git a/Mage.Sets/src/mage/cards/l/LightningReflexes.java b/Mage.Sets/src/mage/cards/l/LightningReflexes.java index 6c1a78e411..96270e2492 100644 --- a/Mage.Sets/src/mage/cards/l/LightningReflexes.java +++ b/Mage.Sets/src/mage/cards/l/LightningReflexes.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class LightningReflexes extends CardImpl { public LightningReflexes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // You may cast Lightning Reflexes as though it had flash. If you cast it any time a sorcery couldn't have been cast, the controller of the permanent it becomes sacrifices it at the beginning of the next cleanup step. this.addAbility(new SimpleStaticAbility(Zone.ALL, new CastAsThoughItHadFlashSourceEffect(Duration.EndOfGame))); diff --git a/Mage.Sets/src/mage/cards/l/LightningRigCrew.java b/Mage.Sets/src/mage/cards/l/LightningRigCrew.java new file mode 100644 index 0000000000..9afcd776e5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LightningRigCrew.java @@ -0,0 +1,83 @@ +/* + * 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.cards.l; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DamagePlayersEffect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author TheElk801 + */ +public class LightningRigCrew extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("a Pirate spell"); + + static { + filter.add(new SubtypePredicate(SubType.PIRATE)); + } + + public LightningRigCrew(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(0); + this.toughness = new MageInt(5); + + // {T}: Lightning-Rig Crew deals 1 damage to each opponent. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamagePlayersEffect(1, TargetController.OPPONENT), new TapSourceCost()); + this.addAbility(ability); + + // Whenever you cast a Pirate spell, untap Lightning-Rig Crew. + this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), filter, false)); + } + + public LightningRigCrew(final LightningRigCrew card) { + super(card); + } + + @Override + public LightningRigCrew copy() { + return new LightningRigCrew(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LightningRunner.java b/Mage.Sets/src/mage/cards/l/LightningRunner.java index 3c992aee57..fe7bb2f5d1 100644 --- a/Mage.Sets/src/mage/cards/l/LightningRunner.java +++ b/Mage.Sets/src/mage/cards/l/LightningRunner.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.filter.common.FilterControlledCreaturePermanent; @@ -57,8 +58,8 @@ public class LightningRunner extends CardImpl { public LightningRunner(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LightningSerpent.java b/Mage.Sets/src/mage/cards/l/LightningSerpent.java index 72f1abf99b..c567141b31 100644 --- a/Mage.Sets/src/mage/cards/l/LightningSerpent.java +++ b/Mage.Sets/src/mage/cards/l/LightningSerpent.java @@ -29,8 +29,8 @@ package mage.cards.l; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.keyword.HasteAbility; @@ -38,8 +38,9 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.TargetController; +import mage.constants.SubType; import mage.counters.CounterType; +import mage.game.events.GameEvent; /** * @@ -48,9 +49,9 @@ import mage.counters.CounterType; public class LightningSerpent extends CardImpl { public LightningSerpent(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{X}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Serpent"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{X}{R}"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(2); this.toughness = new MageInt(1); @@ -61,7 +62,7 @@ public class LightningSerpent extends CardImpl { // Lightning Serpent enters the battlefield with X +1/+0 counters on it. this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P0.createInstance()))); // At the beginning of the end step, sacrifice Lightning Serpent. - this.addAbility(new BeginningOfEndStepTriggeredAbility(new SacrificeSourceEffect(), TargetController.ANY, false)); + this.addAbility(new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new SacrificeSourceEffect())); } public LightningSerpent(final LightningSerpent card) { diff --git a/Mage.Sets/src/mage/cards/l/LightningShrieker.java b/Mage.Sets/src/mage/cards/l/LightningShrieker.java index 76cc81edb1..2765de7bd5 100644 --- a/Mage.Sets/src/mage/cards/l/LightningShrieker.java +++ b/Mage.Sets/src/mage/cards/l/LightningShrieker.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class LightningShrieker extends CardImpl { public LightningShrieker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/l/LightningStorm.java b/Mage.Sets/src/mage/cards/l/LightningStorm.java index 9c856fcada..0c7c4cd07b 100644 --- a/Mage.Sets/src/mage/cards/l/LightningStorm.java +++ b/Mage.Sets/src/mage/cards/l/LightningStorm.java @@ -57,7 +57,7 @@ import mage.target.common.TargetCreatureOrPlayer; public class LightningStorm extends CardImpl { public LightningStorm(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}{R}"); // 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)); @@ -67,9 +67,9 @@ public class LightningStorm extends CardImpl { // 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 DiscardTargetCost(new TargetCardInHand(new FilterLandCard()))); + new DiscardTargetCost(new TargetCardInHand(new FilterLandCard("a land card")))); ability.setMayActivate(TargetController.ANY); - ability.addEffect(new InfoEffect("Any player may activate this ability but only if {this} is on the stack")); + ability.addEffect(new InfoEffect(" Any player may activate this ability but only if {this} is on the stack")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/LightningTalons.java b/Mage.Sets/src/mage/cards/l/LightningTalons.java index a905b43f7e..ebac4d2c23 100644 --- a/Mage.Sets/src/mage/cards/l/LightningTalons.java +++ b/Mage.Sets/src/mage/cards/l/LightningTalons.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class LightningTalons extends CardImpl { public LightningTalons(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/cards/l/Lightsaber.java b/Mage.Sets/src/mage/cards/l/Lightsaber.java index 6f197b4dce..210cb57129 100644 --- a/Mage.Sets/src/mage/cards/l/Lightsaber.java +++ b/Mage.Sets/src/mage/cards/l/Lightsaber.java @@ -27,7 +27,6 @@ */ package mage.cards.l; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.GenericManaCost; @@ -38,14 +37,13 @@ import mage.abilities.keyword.EquipAbility; import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; import mage.game.permanent.Permanent; import mage.util.CardUtil; +import java.util.UUID; + /** * * @author Styxo @@ -54,7 +52,7 @@ public class Lightsaber extends CardImpl { public Lightsaber(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equiped creature gets +1/+0 and has firsttrike this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 0))); @@ -72,7 +70,7 @@ public class Lightsaber extends CardImpl { public void adjustCosts(Ability ability, Game game) { if (ability instanceof EquipAbility) { Permanent targetCreature = game.getPermanent(ability.getTargets().getFirstTarget()); - if (targetCreature != null && (targetCreature.getSubtype(game).contains("Sith") || targetCreature.getSubtype(game).contains("Jedi"))) { + if (targetCreature != null && (targetCreature.hasSubtype(SubType.SITH, game) || targetCreature.hasSubtype(SubType.JEDI, game))) { CardUtil.increaseCost(ability, 1 - ability.getManaCostsToPay().convertedManaCost()); } } diff --git a/Mage.Sets/src/mage/cards/l/Lightwalker.java b/Mage.Sets/src/mage/cards/l/Lightwalker.java index 2a892ce310..5b47f648ba 100644 --- a/Mage.Sets/src/mage/cards/l/Lightwalker.java +++ b/Mage.Sets/src/mage/cards/l/Lightwalker.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -48,8 +49,8 @@ public class Lightwalker extends CardImpl { public Lightwalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LightwielderPaladin.java b/Mage.Sets/src/mage/cards/l/LightwielderPaladin.java index 16c589b9f0..1d56ead895 100644 --- a/Mage.Sets/src/mage/cards/l/LightwielderPaladin.java +++ b/Mage.Sets/src/mage/cards/l/LightwielderPaladin.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; @@ -56,8 +57,8 @@ public class LightwielderPaladin extends CardImpl { public LightwielderPaladin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/Lignify.java b/Mage.Sets/src/mage/cards/l/Lignify.java index b2875c8671..3ca08be5d5 100644 --- a/Mage.Sets/src/mage/cards/l/Lignify.java +++ b/Mage.Sets/src/mage/cards/l/Lignify.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,8 +53,8 @@ public class Lignify extends CardImpl { public Lignify(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Aura"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); @@ -85,7 +86,7 @@ class LignifyTreefolkToken extends Token { public LignifyTreefolkToken() { super("Treefolk", "a Treefolk with base power and toughness 0/4 with no abilities"); cardType.add(CardType.CREATURE); - subtype.add("Treefolk"); + subtype.add(SubType.TREEFOLK); power = new MageInt(0); toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LilianaDeathWielder.java b/Mage.Sets/src/mage/cards/l/LilianaDeathWielder.java index 293c3dfd4d..93bf9c481e 100644 --- a/Mage.Sets/src/mage/cards/l/LilianaDeathWielder.java +++ b/Mage.Sets/src/mage/cards/l/LilianaDeathWielder.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -64,7 +65,7 @@ public class LilianaDeathWielder extends CardImpl { public LilianaDeathWielder(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{5}{B}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Liliana"); + this.subtype.add(SubType.LILIANA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); diff --git a/Mage.Sets/src/mage/cards/l/LilianaDeathsMajesty.java b/Mage.Sets/src/mage/cards/l/LilianaDeathsMajesty.java index 1feff72ced..7e3ee59e20 100644 --- a/Mage.Sets/src/mage/cards/l/LilianaDeathsMajesty.java +++ b/Mage.Sets/src/mage/cards/l/LilianaDeathsMajesty.java @@ -62,7 +62,7 @@ public class LilianaDeathsMajesty extends CardImpl { public LilianaDeathsMajesty(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{B}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Liliana"); + this.subtype.add(SubType.LILIANA); //Starting Loyalty: 5 this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); diff --git a/Mage.Sets/src/mage/cards/l/LilianaDefiantNecromancer.java b/Mage.Sets/src/mage/cards/l/LilianaDefiantNecromancer.java index fc026e9552..be62977d53 100644 --- a/Mage.Sets/src/mage/cards/l/LilianaDefiantNecromancer.java +++ b/Mage.Sets/src/mage/cards/l/LilianaDefiantNecromancer.java @@ -65,7 +65,7 @@ public class LilianaDefiantNecromancer extends CardImpl { public LilianaDefiantNecromancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, ""); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Liliana"); + this.subtype.add(SubType.LILIANA); this.color.setBlack(true); this.nightCard = true; @@ -75,6 +75,7 @@ public class LilianaDefiantNecromancer extends CardImpl { // +2: Each player discards a card. this.addAbility(new LoyaltyAbility(new DiscardEachPlayerEffect(1, false), 2)); + //TODO: Make ability properly copiable // -X: Return target nonlegendary creature with converted mana cost X from your graveyard to the battlefield. Ability ability = new LoyaltyAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()); ability2Id = ability.getOriginalId(); diff --git a/Mage.Sets/src/mage/cards/l/LilianaHereticalHealer.java b/Mage.Sets/src/mage/cards/l/LilianaHereticalHealer.java index 4fe37c853a..6129939795 100644 --- a/Mage.Sets/src/mage/cards/l/LilianaHereticalHealer.java +++ b/Mage.Sets/src/mage/cards/l/LilianaHereticalHealer.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -64,8 +65,8 @@ public class LilianaHereticalHealer extends CardImpl { public LilianaHereticalHealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LilianaOfTheDarkRealms.java b/Mage.Sets/src/mage/cards/l/LilianaOfTheDarkRealms.java index e8401937c8..64ef224714 100644 --- a/Mage.Sets/src/mage/cards/l/LilianaOfTheDarkRealms.java +++ b/Mage.Sets/src/mage/cards/l/LilianaOfTheDarkRealms.java @@ -63,7 +63,7 @@ public class LilianaOfTheDarkRealms extends CardImpl { public LilianaOfTheDarkRealms(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{B}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Liliana"); + this.subtype.add(SubType.LILIANA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/l/LilianaOfTheVeil.java b/Mage.Sets/src/mage/cards/l/LilianaOfTheVeil.java index deceec9435..34c16ed54b 100644 --- a/Mage.Sets/src/mage/cards/l/LilianaOfTheVeil.java +++ b/Mage.Sets/src/mage/cards/l/LilianaOfTheVeil.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.filter.FilterPermanent; @@ -58,7 +59,7 @@ public class LilianaOfTheVeil extends CardImpl { public LilianaOfTheVeil(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{1}{B}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Liliana"); + this.subtype.add(SubType.LILIANA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/l/LilianaTheLastHope.java b/Mage.Sets/src/mage/cards/l/LilianaTheLastHope.java index 81ae924b4b..47174d5a4c 100644 --- a/Mage.Sets/src/mage/cards/l/LilianaTheLastHope.java +++ b/Mage.Sets/src/mage/cards/l/LilianaTheLastHope.java @@ -40,6 +40,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SuperType; @@ -60,7 +61,7 @@ public class LilianaTheLastHope extends CardImpl { public LilianaTheLastHope(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{1}{B}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Liliana"); + this.subtype.add(SubType.LILIANA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/l/LilianaVess.java b/Mage.Sets/src/mage/cards/l/LilianaVess.java index 193f718a78..a6b2c7d4e6 100644 --- a/Mage.Sets/src/mage/cards/l/LilianaVess.java +++ b/Mage.Sets/src/mage/cards/l/LilianaVess.java @@ -27,9 +27,6 @@ */ package mage.cards.l; -import java.util.LinkedHashSet; -import java.util.Set; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.LoyaltyAbility; import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; @@ -40,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -49,6 +47,10 @@ import mage.players.Player; import mage.target.TargetPlayer; import mage.target.common.TargetCardInLibrary; +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -58,7 +60,7 @@ public class LilianaVess extends CardImpl { public LilianaVess(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{B}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Liliana"); + this.subtype.add(SubType.LILIANA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); // +1: Target player discards a card. @@ -89,7 +91,7 @@ class LilianaVessEffect extends OneShotEffect { public LilianaVessEffect() { super(Outcome.PutCreatureInPlay); - staticText = "Put all creature cards in all graveyards onto the battlefield under your control"; + staticText = "Put all creature cards from all graveyards onto the battlefield under your control"; } public LilianaVessEffect(final LilianaVessEffect effect) { diff --git a/Mage.Sets/src/mage/cards/l/LilianasCaress.java b/Mage.Sets/src/mage/cards/l/LilianasCaress.java index 7916ba643c..ec875952fb 100644 --- a/Mage.Sets/src/mage/cards/l/LilianasCaress.java +++ b/Mage.Sets/src/mage/cards/l/LilianasCaress.java @@ -25,21 +25,15 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.l; import java.util.UUID; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.Effect; +import mage.abilities.common.DiscardsACardOpponentTriggeredAbility; import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.target.targetpointer.FixedTarget; +import mage.constants.SetTargetPointer; /** * @@ -48,11 +42,10 @@ import mage.target.targetpointer.FixedTarget; public class LilianasCaress extends CardImpl { public LilianasCaress(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); // Whenever an opponent discards a card, that player loses 2 life. - this.addAbility(new LilianasCaressAbility()); + this.addAbility(new DiscardsACardOpponentTriggeredAbility(new LoseLifeTargetEffect(2), false, SetTargetPointer.PLAYER)); } public LilianasCaress(final LilianasCaress card) { @@ -65,41 +58,3 @@ public class LilianasCaress extends CardImpl { } } - -class LilianasCaressAbility extends TriggeredAbilityImpl { - - public LilianasCaressAbility() { - super(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2), false); - } - - public LilianasCaressAbility(final LilianasCaressAbility ability) { - super(ability); - } - - @Override - public LilianasCaressAbility copy() { - return new LilianasCaressAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.DISCARDED_CARD; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - if (game.getOpponents(controllerId).contains(event.getPlayerId())) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getPlayerId())); - } - return true; - } - return false; - } - - @Override - public String getRule() { - return "Whenever an opponent discards a card, that player loses 2 life."; - } - -} diff --git a/Mage.Sets/src/mage/cards/l/LilianasDefeat.java b/Mage.Sets/src/mage/cards/l/LilianasDefeat.java index 81ba966a6e..081350eade 100644 --- a/Mage.Sets/src/mage/cards/l/LilianasDefeat.java +++ b/Mage.Sets/src/mage/cards/l/LilianasDefeat.java @@ -27,7 +27,6 @@ */ package mage.cards.l; -import java.util.UUID; import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; @@ -44,6 +43,8 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -93,7 +94,7 @@ class LilianasDefeatEffect extends OneShotEffect { if (player != null && permanent != null) { permanent.destroy(source.getSourceId(), game, true); game.applyEffects(); - if (permanent.isPlaneswalker() && permanent.getSubtype(game).contains(SubType.LILIANA.getDescription())) { + if (permanent.isPlaneswalker() && permanent.hasSubtype(SubType.LILIANA, game)) { Player permanentController = game.getPlayer(permanent.getControllerId()); if (permanentController != null) { permanentController.loseLife(3, game, false); diff --git a/Mage.Sets/src/mage/cards/l/LilianasElite.java b/Mage.Sets/src/mage/cards/l/LilianasElite.java index 6d9b184a9c..d0bcc9ff50 100644 --- a/Mage.Sets/src/mage/cards/l/LilianasElite.java +++ b/Mage.Sets/src/mage/cards/l/LilianasElite.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -49,7 +50,7 @@ public class LilianasElite extends CardImpl { public LilianasElite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LilianasReaver.java b/Mage.Sets/src/mage/cards/l/LilianasReaver.java index fe10a5da6c..9f6a7b43c0 100644 --- a/Mage.Sets/src/mage/cards/l/LilianasReaver.java +++ b/Mage.Sets/src/mage/cards/l/LilianasReaver.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.ZombieToken; /** @@ -47,7 +48,7 @@ public class LilianasReaver extends CardImpl { public LilianasReaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LilianasShade.java b/Mage.Sets/src/mage/cards/l/LilianasShade.java index 1aa40de491..10b271690a 100644 --- a/Mage.Sets/src/mage/cards/l/LilianasShade.java +++ b/Mage.Sets/src/mage/cards/l/LilianasShade.java @@ -58,7 +58,7 @@ public class LilianasShade extends CardImpl { public LilianasShade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Shade"); + this.subtype.add(SubType.SHADE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LilianasSpecter.java b/Mage.Sets/src/mage/cards/l/LilianasSpecter.java index 512cb7c5ba..94084fcaba 100644 --- a/Mage.Sets/src/mage/cards/l/LilianasSpecter.java +++ b/Mage.Sets/src/mage/cards/l/LilianasSpecter.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -46,7 +47,7 @@ public class LilianasSpecter extends CardImpl { public LilianasSpecter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Specter"); + this.subtype.add(SubType.SPECTER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LimDulTheNecromancer.java b/Mage.Sets/src/mage/cards/l/LimDulTheNecromancer.java index 4a520fde9f..c04355a0ba 100644 --- a/Mage.Sets/src/mage/cards/l/LimDulTheNecromancer.java +++ b/Mage.Sets/src/mage/cards/l/LimDulTheNecromancer.java @@ -58,7 +58,7 @@ import mage.target.targetpointer.FixedTarget; */ public class LimDulTheNecromancer extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature an opponent controls"); private static final FilterPermanent filter2 = new FilterPermanent("Zombie"); static { @@ -67,10 +67,10 @@ public class LimDulTheNecromancer extends CardImpl { } public LimDulTheNecromancer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LimDulsHighGuard.java b/Mage.Sets/src/mage/cards/l/LimDulsHighGuard.java index 2211e5d0a4..60e628c343 100644 --- a/Mage.Sets/src/mage/cards/l/LimDulsHighGuard.java +++ b/Mage.Sets/src/mage/cards/l/LimDulsHighGuard.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class LimDulsHighGuard extends CardImpl { public LimDulsHighGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LimDulsPaladin.java b/Mage.Sets/src/mage/cards/l/LimDulsPaladin.java index 6af3266003..c363f1d2d4 100644 --- a/Mage.Sets/src/mage/cards/l/LimDulsPaladin.java +++ b/Mage.Sets/src/mage/cards/l/LimDulsPaladin.java @@ -44,6 +44,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -59,8 +60,8 @@ public class LimDulsPaladin extends CardImpl { public LimDulsPaladin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{R}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LimestoneGolem.java b/Mage.Sets/src/mage/cards/l/LimestoneGolem.java new file mode 100644 index 0000000000..9362b44004 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LimestoneGolem.java @@ -0,0 +1,72 @@ +/* + * 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.cards.l; + +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.mana.ManaCostsImpl; +import mage.abilities.effects.common.DrawCardTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.target.TargetPlayer; + +/** + * + * @author TheElk801 + */ +public class LimestoneGolem extends CardImpl { + + public LimestoneGolem(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}"); + + this.subtype.add(SubType.GOLEM); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // {2}, Sacrifice Limestone Golem: Target player draws a card. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardTargetEffect(1), new ManaCostsImpl("{2}")); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public LimestoneGolem(final LimestoneGolem card) { + super(card); + } + + @Override + public LimestoneGolem copy() { + return new LimestoneGolem(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LinSivviDefiantHero.java b/Mage.Sets/src/mage/cards/l/LinSivviDefiantHero.java index b17190a587..dffe54e964 100644 --- a/Mage.Sets/src/mage/cards/l/LinSivviDefiantHero.java +++ b/Mage.Sets/src/mage/cards/l/LinSivviDefiantHero.java @@ -68,8 +68,8 @@ public class LinSivviDefiantHero extends CardImpl { public LinSivviDefiantHero(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LinessaZephyrMage.java b/Mage.Sets/src/mage/cards/l/LinessaZephyrMage.java index 7ab045d9da..097b5f3210 100644 --- a/Mage.Sets/src/mage/cards/l/LinessaZephyrMage.java +++ b/Mage.Sets/src/mage/cards/l/LinessaZephyrMage.java @@ -39,22 +39,22 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; +import mage.constants.TargetAdjustment; import mage.constants.Zone; +import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledPermanent; -import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.Target; +import mage.target.TargetPermanent; import mage.target.TargetPlayer; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreaturePermanent; /** * @@ -62,13 +62,17 @@ import mage.target.common.TargetCreaturePermanent; */ public class LinessaZephyrMage extends CardImpl { - private final UUID originalId; + private static final FilterPermanent filter = new FilterPermanent("creature with converted mana cost X"); + + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); + } public LinessaZephyrMage(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -76,8 +80,8 @@ public class LinessaZephyrMage extends CardImpl { // {X}{U}{U}, {tap}: Return target creature with converted mana cost X to its owner's hand. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{X}{U}{U}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreaturePermanent()); - originalId = ability.getOriginalId(); + ability.addTarget(new TargetPermanent(filter)); + ability.setTargetAdjustment(TargetAdjustment.X_CMC_EQUAL_PERM); this.addAbility(ability); // Grandeur - Discard another card named Linessa, Zephyr Mage: Target player returns a creature he or she controls to its owner's hand, then repeats this process for an artifact, an enchantment, and a land. @@ -88,18 +92,6 @@ public class LinessaZephyrMage extends CardImpl { public LinessaZephyrMage(final LinessaZephyrMage card) { super(card); - this.originalId = card.originalId; - } - - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(originalId)) { - int xValue = ability.getManaCostsToPay().getX(); - ability.getTargets().clear(); - FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost " + xValue); - filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, xValue)); - ability.getTargets().add(new TargetCreaturePermanent(filter)); - } } @Override diff --git a/Mage.Sets/src/mage/cards/l/LingeringMirage.java b/Mage.Sets/src/mage/cards/l/LingeringMirage.java index 6123b058aa..225a327e5b 100644 --- a/Mage.Sets/src/mage/cards/l/LingeringMirage.java +++ b/Mage.Sets/src/mage/cards/l/LingeringMirage.java @@ -53,7 +53,7 @@ public class LingeringMirage extends CardImpl { public LingeringMirage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land diff --git a/Mage.Sets/src/mage/cards/l/LingeringTormentor.java b/Mage.Sets/src/mage/cards/l/LingeringTormentor.java index 85710517d4..04d1c14cef 100644 --- a/Mage.Sets/src/mage/cards/l/LingeringTormentor.java +++ b/Mage.Sets/src/mage/cards/l/LingeringTormentor.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.PersistAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class LingeringTormentor extends CardImpl { public LingeringTormentor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LinvalaKeeperOfSilence.java b/Mage.Sets/src/mage/cards/l/LinvalaKeeperOfSilence.java index 81eff3e354..cf92b3e21d 100644 --- a/Mage.Sets/src/mage/cards/l/LinvalaKeeperOfSilence.java +++ b/Mage.Sets/src/mage/cards/l/LinvalaKeeperOfSilence.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class LinvalaKeeperOfSilence extends CardImpl { public LinvalaKeeperOfSilence(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LinvalaThePreserver.java b/Mage.Sets/src/mage/cards/l/LinvalaThePreserver.java index cd5d8193dc..5c7449909f 100644 --- a/Mage.Sets/src/mage/cards/l/LinvalaThePreserver.java +++ b/Mage.Sets/src/mage/cards/l/LinvalaThePreserver.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.common.FilterCreaturePermanent; import mage.game.permanent.token.LinvalaAngelToken; @@ -52,7 +53,7 @@ public class LinvalaThePreserver extends CardImpl { public LinvalaThePreserver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/l/LionheartMaverick.java b/Mage.Sets/src/mage/cards/l/LionheartMaverick.java index 1e5729e1e5..3ffcd7fc71 100644 --- a/Mage.Sets/src/mage/cards/l/LionheartMaverick.java +++ b/Mage.Sets/src/mage/cards/l/LionheartMaverick.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class LionheartMaverick extends CardImpl { public LionheartMaverick(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/Lithatog.java b/Mage.Sets/src/mage/cards/l/Lithatog.java index ee9e022a17..4bd4d5c01c 100644 --- a/Mage.Sets/src/mage/cards/l/Lithatog.java +++ b/Mage.Sets/src/mage/cards/l/Lithatog.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; @@ -49,7 +50,7 @@ public class Lithatog extends CardImpl { public Lithatog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{G}"); - this.subtype.add("Atog"); + this.subtype.add(SubType.ATOG); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/Lithophage.java b/Mage.Sets/src/mage/cards/l/Lithophage.java index aea5572a74..db6a944070 100644 --- a/Mage.Sets/src/mage/cards/l/Lithophage.java +++ b/Mage.Sets/src/mage/cards/l/Lithophage.java @@ -56,7 +56,7 @@ public class Lithophage extends CardImpl { public Lithophage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/l/LiuBeiLordOfShu.java b/Mage.Sets/src/mage/cards/l/LiuBeiLordOfShu.java index 389cd3e398..0f4b327f3f 100644 --- a/Mage.Sets/src/mage/cards/l/LiuBeiLordOfShu.java +++ b/Mage.Sets/src/mage/cards/l/LiuBeiLordOfShu.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class LiuBeiLordOfShu extends CardImpl { public LiuBeiLordOfShu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LivewireLash.java b/Mage.Sets/src/mage/cards/l/LivewireLash.java index bc6ffeb819..71c501cc66 100644 --- a/Mage.Sets/src/mage/cards/l/LivewireLash.java +++ b/Mage.Sets/src/mage/cards/l/LivewireLash.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -55,7 +56,7 @@ public class LivewireLash extends CardImpl { public LivewireLash(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0))); LivewireLashAbility ability = new LivewireLashAbility(); diff --git a/Mage.Sets/src/mage/cards/l/LivingAirship.java b/Mage.Sets/src/mage/cards/l/LivingAirship.java index eaa3d36b7e..bd59195e15 100644 --- a/Mage.Sets/src/mage/cards/l/LivingAirship.java +++ b/Mage.Sets/src/mage/cards/l/LivingAirship.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class LivingAirship extends CardImpl { public LivingAirship(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Metathran"); + this.subtype.add(SubType.METATHRAN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LivingArtifact.java b/Mage.Sets/src/mage/cards/l/LivingArtifact.java index 904ad74f09..815d64e950 100644 --- a/Mage.Sets/src/mage/cards/l/LivingArtifact.java +++ b/Mage.Sets/src/mage/cards/l/LivingArtifact.java @@ -43,6 +43,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -61,7 +62,7 @@ public class LivingArtifact extends CardImpl { public LivingArtifact(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant artifact TargetPermanent auraTarget = new TargetArtifactPermanent(); diff --git a/Mage.Sets/src/mage/cards/l/LivingHive.java b/Mage.Sets/src/mage/cards/l/LivingHive.java index abfd50d4ac..92df689154 100644 --- a/Mage.Sets/src/mage/cards/l/LivingHive.java +++ b/Mage.Sets/src/mage/cards/l/LivingHive.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.token.InsectToken; @@ -50,8 +51,8 @@ public class LivingHive extends CardImpl { public LivingHive(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}{G}"); - this.subtype.add("Elemental"); - this.subtype.add("Insect"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.INSECT); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/l/LivingLands.java b/Mage.Sets/src/mage/cards/l/LivingLands.java index b6abf372ea..c2e3c79e7b 100644 --- a/Mage.Sets/src/mage/cards/l/LivingLands.java +++ b/Mage.Sets/src/mage/cards/l/LivingLands.java @@ -27,7 +27,6 @@ */ package mage.cards.l; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousEffect; @@ -39,13 +38,15 @@ import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @author Quercitron */ public class LivingLands extends CardImpl { - private static final FilterLandPermanent filter = new FilterLandPermanent("All Forests"); + private static final FilterLandPermanent filter = new FilterLandPermanent("Forests"); static { filter.add(new SubtypePredicate(SubType.FOREST)); diff --git a/Mage.Sets/src/mage/cards/l/LivingLore.java b/Mage.Sets/src/mage/cards/l/LivingLore.java index 256d20650e..f9ae3d30e3 100644 --- a/Mage.Sets/src/mage/cards/l/LivingLore.java +++ b/Mage.Sets/src/mage/cards/l/LivingLore.java @@ -32,8 +32,8 @@ import mage.MageInt; import mage.MageObject; import mage.MageObjectReference; import mage.abilities.Ability; +import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.common.DealsCombatDamageTriggeredAbility; -import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.OneShotEffect; @@ -41,6 +41,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -61,13 +62,13 @@ import mage.util.CardUtil; public class LivingLore extends CardImpl { public LivingLore(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); this.subtype.add("Avatar"); this.power = new MageInt(0); this.toughness = new MageInt(0); // As Living Lore enters the battlefield, exile an instant or sorcery card from your graveyard. - this.addAbility(new EntersBattlefieldAbility(new LivingLoreExileEffect(), "exile an instant or sorcery card from your graveyard")); + this.addAbility(new AsEntersBattlefieldAbility(new LivingLoreExileEffect(), "exile an instant or sorcery card from your graveyard")); // Living Lore's power and toughness are each equal to the exiled card's converted mana cost. this.addAbility(new SimpleStaticAbility(Zone.ALL, new LivingLoreSetPowerToughnessSourceEffect())); diff --git a/Mage.Sets/src/mage/cards/l/LivingTerrain.java b/Mage.Sets/src/mage/cards/l/LivingTerrain.java index d4729b4301..481cbb393e 100644 --- a/Mage.Sets/src/mage/cards/l/LivingTerrain.java +++ b/Mage.Sets/src/mage/cards/l/LivingTerrain.java @@ -49,7 +49,7 @@ public class LivingTerrain extends CardImpl { public LivingTerrain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land @@ -78,7 +78,7 @@ class TreefolkToken extends Token { super("Treefolk", "5/6 green Treefolk creature"); cardType.add(CardType.CREATURE); this.color.setGreen(true); - subtype.add("Treefolk"); + subtype.add(SubType.TREEFOLK); power = new MageInt(5); toughness = new MageInt(6); } diff --git a/Mage.Sets/src/mage/cards/l/LivingTotem.java b/Mage.Sets/src/mage/cards/l/LivingTotem.java index 67b814e957..534e4ce696 100644 --- a/Mage.Sets/src/mage/cards/l/LivingTotem.java +++ b/Mage.Sets/src/mage/cards/l/LivingTotem.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ConvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -55,8 +56,8 @@ public class LivingTotem extends CardImpl { public LivingTotem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LivingTsunami.java b/Mage.Sets/src/mage/cards/l/LivingTsunami.java index 4b606ee6b5..b9d6e8efc3 100644 --- a/Mage.Sets/src/mage/cards/l/LivingTsunami.java +++ b/Mage.Sets/src/mage/cards/l/LivingTsunami.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -56,7 +57,7 @@ public class LivingTsunami extends CardImpl { public LivingTsunami(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LivingWall.java b/Mage.Sets/src/mage/cards/l/LivingWall.java index 26cd45ae5f..da50c0c62b 100644 --- a/Mage.Sets/src/mage/cards/l/LivingWall.java +++ b/Mage.Sets/src/mage/cards/l/LivingWall.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class LivingWall extends CardImpl { public LivingWall(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/l/LivonyaSilone.java b/Mage.Sets/src/mage/cards/l/LivonyaSilone.java index c0cfd725a9..1777443914 100644 --- a/Mage.Sets/src/mage/cards/l/LivonyaSilone.java +++ b/Mage.Sets/src/mage/cards/l/LivonyaSilone.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.LandwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SupertypePredicate; @@ -53,8 +54,8 @@ public class LivonyaSilone extends CardImpl { public LivonyaSilone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}{G}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LizardWarrior.java b/Mage.Sets/src/mage/cards/l/LizardWarrior.java index 0bd52d7259..547dc1a64a 100644 --- a/Mage.Sets/src/mage/cards/l/LizardWarrior.java +++ b/Mage.Sets/src/mage/cards/l/LizardWarrior.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class LizardWarrior extends CardImpl { public LizardWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Lizard"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.LIZARD); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LlanowarAugur.java b/Mage.Sets/src/mage/cards/l/LlanowarAugur.java index 3fb1a9f008..fdd3ae1b8c 100644 --- a/Mage.Sets/src/mage/cards/l/LlanowarAugur.java +++ b/Mage.Sets/src/mage/cards/l/LlanowarAugur.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.PhaseStep; import mage.constants.Zone; @@ -53,8 +54,8 @@ public class LlanowarAugur extends CardImpl { public LlanowarAugur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LlanowarBehemoth.java b/Mage.Sets/src/mage/cards/l/LlanowarBehemoth.java index 3d4ca5aea9..a8e8fe870d 100644 --- a/Mage.Sets/src/mage/cards/l/LlanowarBehemoth.java +++ b/Mage.Sets/src/mage/cards/l/LlanowarBehemoth.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -55,7 +56,7 @@ public class LlanowarBehemoth extends CardImpl { public LlanowarBehemoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LlanowarCavalry.java b/Mage.Sets/src/mage/cards/l/LlanowarCavalry.java index 3d7f8144ca..ca6f1f6cb2 100644 --- a/Mage.Sets/src/mage/cards/l/LlanowarCavalry.java +++ b/Mage.Sets/src/mage/cards/l/LlanowarCavalry.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class LlanowarCavalry extends CardImpl { public LlanowarCavalry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LlanowarDead.java b/Mage.Sets/src/mage/cards/l/LlanowarDead.java index c7529aa1a7..2698ba2e16 100644 --- a/Mage.Sets/src/mage/cards/l/LlanowarDead.java +++ b/Mage.Sets/src/mage/cards/l/LlanowarDead.java @@ -33,6 +33,7 @@ import mage.abilities.mana.BlackManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class LlanowarDead extends CardImpl { public LlanowarDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{G}"); - this.subtype.add("Zombie"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.ELF); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LlanowarDruid.java b/Mage.Sets/src/mage/cards/l/LlanowarDruid.java index b79505a1b5..c4b98bd94f 100644 --- a/Mage.Sets/src/mage/cards/l/LlanowarDruid.java +++ b/Mage.Sets/src/mage/cards/l/LlanowarDruid.java @@ -54,8 +54,8 @@ public class LlanowarDruid extends CardImpl { public LlanowarDruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LlanowarElite.java b/Mage.Sets/src/mage/cards/l/LlanowarElite.java index 6673c38661..100b4b6377 100644 --- a/Mage.Sets/src/mage/cards/l/LlanowarElite.java +++ b/Mage.Sets/src/mage/cards/l/LlanowarElite.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -49,7 +50,7 @@ public class LlanowarElite extends CardImpl { public LlanowarElite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LlanowarElves.java b/Mage.Sets/src/mage/cards/l/LlanowarElves.java index d181330b99..248ba74027 100644 --- a/Mage.Sets/src/mage/cards/l/LlanowarElves.java +++ b/Mage.Sets/src/mage/cards/l/LlanowarElves.java @@ -34,6 +34,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class LlanowarElves extends CardImpl { public LlanowarElves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LlanowarEmpath.java b/Mage.Sets/src/mage/cards/l/LlanowarEmpath.java index 7c00253e95..881dfabd2a 100644 --- a/Mage.Sets/src/mage/cards/l/LlanowarEmpath.java +++ b/Mage.Sets/src/mage/cards/l/LlanowarEmpath.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -54,8 +55,8 @@ public class LlanowarEmpath extends CardImpl { public LlanowarEmpath(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LlanowarKnight.java b/Mage.Sets/src/mage/cards/l/LlanowarKnight.java index 59f1eee609..73d28c83c0 100644 --- a/Mage.Sets/src/mage/cards/l/LlanowarKnight.java +++ b/Mage.Sets/src/mage/cards/l/LlanowarKnight.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class LlanowarKnight extends CardImpl { public LlanowarKnight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}"); - this.subtype.add("Elf"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LlanowarMentor.java b/Mage.Sets/src/mage/cards/l/LlanowarMentor.java index 230a0e42c7..c92afd3197 100644 --- a/Mage.Sets/src/mage/cards/l/LlanowarMentor.java +++ b/Mage.Sets/src/mage/cards/l/LlanowarMentor.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.LlanowarElvesToken; @@ -49,8 +50,8 @@ public class LlanowarMentor extends CardImpl { public LlanowarMentor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); - this.subtype.add("Elf"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LlanowarSentinel.java b/Mage.Sets/src/mage/cards/l/LlanowarSentinel.java index ea6b820a80..704d43c4d1 100644 --- a/Mage.Sets/src/mage/cards/l/LlanowarSentinel.java +++ b/Mage.Sets/src/mage/cards/l/LlanowarSentinel.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.NamePredicate; @@ -54,7 +55,7 @@ public class LlanowarSentinel extends CardImpl { public LlanowarSentinel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LlanowarVanguard.java b/Mage.Sets/src/mage/cards/l/LlanowarVanguard.java index f99fe0069c..5eb813e1c4 100644 --- a/Mage.Sets/src/mage/cards/l/LlanowarVanguard.java +++ b/Mage.Sets/src/mage/cards/l/LlanowarVanguard.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class LlanowarVanguard extends CardImpl { public LlanowarVanguard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Dryad"); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LlawanCephalidEmpress.java b/Mage.Sets/src/mage/cards/l/LlawanCephalidEmpress.java index 6731e94edf..bec6ee8551 100644 --- a/Mage.Sets/src/mage/cards/l/LlawanCephalidEmpress.java +++ b/Mage.Sets/src/mage/cards/l/LlawanCephalidEmpress.java @@ -66,7 +66,7 @@ public class LlawanCephalidEmpress extends CardImpl { public LlawanCephalidEmpress(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Cephalid"); + this.subtype.add(SubType.CEPHALID); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LoamDryad.java b/Mage.Sets/src/mage/cards/l/LoamDryad.java index 774778a365..c69fa573db 100644 --- a/Mage.Sets/src/mage/cards/l/LoamDryad.java +++ b/Mage.Sets/src/mage/cards/l/LoamDryad.java @@ -35,6 +35,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.permanent.TappedPredicate; @@ -54,8 +55,8 @@ public class LoamDryad extends CardImpl { public LoamDryad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Dryad"); - this.subtype.add("Horror"); + this.subtype.add(SubType.DRYAD); + this.subtype.add(SubType.HORROR); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LoamDweller.java b/Mage.Sets/src/mage/cards/l/LoamDweller.java index 9307cdf0ac..2f338e36cc 100644 --- a/Mage.Sets/src/mage/cards/l/LoamDweller.java +++ b/Mage.Sets/src/mage/cards/l/LoamDweller.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.PutLandFromHandOntoBattlefieldEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; /** @@ -44,7 +45,7 @@ public class LoamDweller extends CardImpl { public LoamDweller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LoamLarva.java b/Mage.Sets/src/mage/cards/l/LoamLarva.java index a832a0352c..38e0791954 100644 --- a/Mage.Sets/src/mage/cards/l/LoamLarva.java +++ b/Mage.Sets/src/mage/cards/l/LoamLarva.java @@ -33,6 +33,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutOnLibraryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; @@ -46,7 +47,7 @@ public class LoamLarva extends CardImpl { public LoamLarva(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LoamLion.java b/Mage.Sets/src/mage/cards/l/LoamLion.java index 1971989ce6..cdb4f3bf69 100644 --- a/Mage.Sets/src/mage/cards/l/LoamLion.java +++ b/Mage.Sets/src/mage/cards/l/LoamLion.java @@ -57,7 +57,7 @@ public class LoamLion extends CardImpl { public LoamLion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.color.setWhite(true); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LoamdraggerGiant.java b/Mage.Sets/src/mage/cards/l/LoamdraggerGiant.java index f91e7459d6..d8561e17c3 100644 --- a/Mage.Sets/src/mage/cards/l/LoamdraggerGiant.java +++ b/Mage.Sets/src/mage/cards/l/LoamdraggerGiant.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class LoamdraggerGiant extends CardImpl { public LoamdraggerGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R/G}{R/G}{R/G}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(7); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/l/LoamingShaman.java b/Mage.Sets/src/mage/cards/l/LoamingShaman.java index 85430feb22..9e20241042 100644 --- a/Mage.Sets/src/mage/cards/l/LoamingShaman.java +++ b/Mage.Sets/src/mage/cards/l/LoamingShaman.java @@ -38,6 +38,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -54,8 +55,8 @@ public class LoamingShaman extends CardImpl { public LoamingShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LoathsomeCatoblepas.java b/Mage.Sets/src/mage/cards/l/LoathsomeCatoblepas.java index e6e4e575d4..ac83543e0e 100644 --- a/Mage.Sets/src/mage/cards/l/LoathsomeCatoblepas.java +++ b/Mage.Sets/src/mage/cards/l/LoathsomeCatoblepas.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class LoathsomeCatoblepas extends CardImpl { public LoathsomeCatoblepas(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LobberCrew.java b/Mage.Sets/src/mage/cards/l/LobberCrew.java index 296817f87a..f2f6ea09b7 100644 --- a/Mage.Sets/src/mage/cards/l/LobberCrew.java +++ b/Mage.Sets/src/mage/cards/l/LobberCrew.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.FilterSpell; @@ -58,8 +59,8 @@ public class LobberCrew extends CardImpl { public LobberCrew (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LochKorrigan.java b/Mage.Sets/src/mage/cards/l/LochKorrigan.java index 23fd385604..ced24dbc37 100644 --- a/Mage.Sets/src/mage/cards/l/LochKorrigan.java +++ b/Mage.Sets/src/mage/cards/l/LochKorrigan.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class LochKorrigan extends CardImpl { public LochKorrigan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LockjawSnapper.java b/Mage.Sets/src/mage/cards/l/LockjawSnapper.java index a37b5850ef..846870ecf1 100644 --- a/Mage.Sets/src/mage/cards/l/LockjawSnapper.java +++ b/Mage.Sets/src/mage/cards/l/LockjawSnapper.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -51,7 +52,7 @@ public class LockjawSnapper extends CardImpl { public LockjawSnapper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LocustMiser.java b/Mage.Sets/src/mage/cards/l/LocustMiser.java index fa3cc1ad56..da93f5b00a 100644 --- a/Mage.Sets/src/mage/cards/l/LocustMiser.java +++ b/Mage.Sets/src/mage/cards/l/LocustMiser.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect. import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class LocustMiser extends CardImpl { public LocustMiser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Rat"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.RAT); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LocustSwarm.java b/Mage.Sets/src/mage/cards/l/LocustSwarm.java index 174a91472e..c594f9b283 100644 --- a/Mage.Sets/src/mage/cards/l/LocustSwarm.java +++ b/Mage.Sets/src/mage/cards/l/LocustSwarm.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,7 +49,7 @@ public class LocustSwarm extends CardImpl { public LocustSwarm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LodestoneGolem.java b/Mage.Sets/src/mage/cards/l/LodestoneGolem.java index 9043929682..a199f02e9a 100644 --- a/Mage.Sets/src/mage/cards/l/LodestoneGolem.java +++ b/Mage.Sets/src/mage/cards/l/LodestoneGolem.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.CostModificationType; import mage.constants.Duration; import mage.constants.Outcome; @@ -53,7 +54,7 @@ public class LodestoneGolem extends CardImpl { public LodestoneGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LodestoneMyr.java b/Mage.Sets/src/mage/cards/l/LodestoneMyr.java index a977710eed..a0e5730da8 100644 --- a/Mage.Sets/src/mage/cards/l/LodestoneMyr.java +++ b/Mage.Sets/src/mage/cards/l/LodestoneMyr.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; @@ -56,7 +57,7 @@ public class LodestoneMyr extends CardImpl { public LodestoneMyr(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(2); this.toughness = new MageInt(2); this.addAbility(TrampleAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/l/LoneMissionary.java b/Mage.Sets/src/mage/cards/l/LoneMissionary.java index d1621424cc..cdfb5d019f 100644 --- a/Mage.Sets/src/mage/cards/l/LoneMissionary.java +++ b/Mage.Sets/src/mage/cards/l/LoneMissionary.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class LoneMissionary extends CardImpl { public LoneMissionary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Monk"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LoneRevenant.java b/Mage.Sets/src/mage/cards/l/LoneRevenant.java index 364f7b48d3..998fdf4f4c 100644 --- a/Mage.Sets/src/mage/cards/l/LoneRevenant.java +++ b/Mage.Sets/src/mage/cards/l/LoneRevenant.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.common.FilterControlledCreaturePermanent; @@ -53,7 +54,7 @@ public class LoneRevenant extends CardImpl { public LoneRevenant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LoneRider.java b/Mage.Sets/src/mage/cards/l/LoneRider.java index 973d85ccd7..9b092ecf88 100644 --- a/Mage.Sets/src/mage/cards/l/LoneRider.java +++ b/Mage.Sets/src/mage/cards/l/LoneRider.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.i.ItThatRidesAsOne; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.game.events.GameEvent; import mage.watchers.common.PlayerGainedLifeWatcher; @@ -55,8 +56,8 @@ public class LoneRider extends CardImpl { public LoneRider(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LoneWolf.java b/Mage.Sets/src/mage/cards/l/LoneWolf.java index d3d29bd4ff..51dc9fb0e7 100644 --- a/Mage.Sets/src/mage/cards/l/LoneWolf.java +++ b/Mage.Sets/src/mage/cards/l/LoneWolf.java @@ -33,6 +33,7 @@ import mage.abilities.common.DamageAsThoughNotBlockedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class LoneWolf extends CardImpl { public LoneWolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LoneWolfOfTheNatterknolls.java b/Mage.Sets/src/mage/cards/l/LoneWolfOfTheNatterknolls.java index 9342faff79..74f9e15579 100644 --- a/Mage.Sets/src/mage/cards/l/LoneWolfOfTheNatterknolls.java +++ b/Mage.Sets/src/mage/cards/l/LoneWolfOfTheNatterknolls.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.FilterSpell; @@ -52,7 +53,7 @@ public class LoneWolfOfTheNatterknolls extends CardImpl { public LoneWolfOfTheNatterknolls(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(3); this.toughness = new MageInt(5); this.color.setGreen(true); diff --git a/Mage.Sets/src/mage/cards/l/LongFinnedSkywhale.java b/Mage.Sets/src/mage/cards/l/LongFinnedSkywhale.java index 26c61b8a82..139c356889 100644 --- a/Mage.Sets/src/mage/cards/l/LongFinnedSkywhale.java +++ b/Mage.Sets/src/mage/cards/l/LongFinnedSkywhale.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class LongFinnedSkywhale extends CardImpl { public LongFinnedSkywhale(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Whale"); + this.subtype.add(SubType.WHALE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LongbowArcher.java b/Mage.Sets/src/mage/cards/l/LongbowArcher.java index a5a9d0cd4d..baf98372dd 100644 --- a/Mage.Sets/src/mage/cards/l/LongbowArcher.java +++ b/Mage.Sets/src/mage/cards/l/LongbowArcher.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,9 +44,9 @@ public class LongbowArcher extends CardImpl { public LongbowArcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LonghornFirebeast.java b/Mage.Sets/src/mage/cards/l/LonghornFirebeast.java new file mode 100644 index 0000000000..fb0ccd56b0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LonghornFirebeast.java @@ -0,0 +1,110 @@ +/* + * 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.cards.l; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author noxx & L_J + + */ +public class LonghornFirebeast extends CardImpl { + + public LonghornFirebeast(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.OX); + this.subtype.add(SubType.BEAST); + + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // When Longhorn Firebeast enters the battlefield, any opponent may have it deal 5 damage to him or her. If a player does, sacrifice Longhorn Firebeast. + this.addAbility(new EntersBattlefieldTriggeredAbility(new LonghornFirebeastEffect(), false)); + } + + public LonghornFirebeast(final LonghornFirebeast card) { + super(card); + } + + @Override + public LonghornFirebeast copy() { + return new LonghornFirebeast(this); + } +} + +class LonghornFirebeastEffect extends OneShotEffect { + + public LonghornFirebeastEffect() { + super(Outcome.Neutral); + staticText = "any opponent may have it deal 5 damage to him or her. If a player does, sacrifice {this}"; + } + + LonghornFirebeastEffect(final LonghornFirebeastEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(source.getSourceId()); + if (controller != null && permanent != null) { + for (UUID opponentUuid : game.getOpponents(source.getControllerId())) { + Player opponent = game.getPlayer(opponentUuid); + if (opponent != null && opponent.chooseUse(Outcome.LoseLife, "Make " + permanent.getLogName() + " deal 5 damage to you?", source, game)) { + game.informPlayers(opponent.getLogName() + " has chosen to receive 5 damage from " + permanent.getLogName()); + opponent.damage(5, permanent.getId(), game, false, true); + permanent.sacrifice(source.getSourceId(), game); + return true; + } + } + game.informPlayers("5 damage wasn't dealt so " + permanent.getLogName() + " won't be sacrificed."); + return true; + } + return false; + } + + @Override + public LonghornFirebeastEffect copy() { + return new LonghornFirebeastEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/l/LongshotSquad.java b/Mage.Sets/src/mage/cards/l/LongshotSquad.java index 88aa56d2b5..e0c0c7b42b 100644 --- a/Mage.Sets/src/mage/cards/l/LongshotSquad.java +++ b/Mage.Sets/src/mage/cards/l/LongshotSquad.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -62,8 +63,8 @@ public class LongshotSquad extends CardImpl { public LongshotSquad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Hound"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HOUND); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LongtuskCub.java b/Mage.Sets/src/mage/cards/l/LongtuskCub.java index cfee0f98f6..10d3305551 100644 --- a/Mage.Sets/src/mage/cards/l/LongtuskCub.java +++ b/Mage.Sets/src/mage/cards/l/LongtuskCub.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -48,7 +49,7 @@ public class LongtuskCub extends CardImpl { public LongtuskCub(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LookoutsDispersal.java b/Mage.Sets/src/mage/cards/l/LookoutsDispersal.java new file mode 100644 index 0000000000..2aa8d97464 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LookoutsDispersal.java @@ -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.cards.l; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.TargetSpell; + +/** + * + * @author TheElk801 + */ +public class LookoutsDispersal extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Pirate"); + + static { + filter.add(new SubtypePredicate(SubType.PIRATE)); + } + + public LookoutsDispersal(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}"); + + // Lookout's Dispersal costs {1} less to cast if you control a Pirate. + Ability ability = new SimpleStaticAbility(Zone.STACK, new SpellCostReductionSourceEffect(1, new PermanentsOnTheBattlefieldCondition(filter))); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + + // Counter target spell unless its controller pays {4}. + this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new GenericManaCost(4))); + this.getSpellAbility().addTarget(new TargetSpell()); + } + + public LookoutsDispersal(final LookoutsDispersal card) { + super(card); + } + + @Override + public LookoutsDispersal copy() { + return new LookoutsDispersal(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LoomingAltisaur.java b/Mage.Sets/src/mage/cards/l/LoomingAltisaur.java new file mode 100644 index 0000000000..78a6135a42 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LoomingAltisaur.java @@ -0,0 +1,59 @@ +/* + * 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.cards.l; + +import java.util.UUID; +import mage.MageInt; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class LoomingAltisaur extends CardImpl { + + public LoomingAltisaur(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(1); + this.toughness = new MageInt(7); + } + + public LoomingAltisaur(final LoomingAltisaur card) { + super(card); + } + + @Override + public LoomingAltisaur copy() { + return new LoomingAltisaur(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LoomingHoverguard.java b/Mage.Sets/src/mage/cards/l/LoomingHoverguard.java index 75f6ba311d..52fa0f709c 100644 --- a/Mage.Sets/src/mage/cards/l/LoomingHoverguard.java +++ b/Mage.Sets/src/mage/cards/l/LoomingHoverguard.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.TargetPermanent; @@ -54,7 +55,7 @@ public class LoomingHoverguard extends CardImpl { public LoomingHoverguard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Drone"); + this.subtype.add(SubType.DRONE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LoomingShade.java b/Mage.Sets/src/mage/cards/l/LoomingShade.java index 5478f811c5..b8feb2a16c 100644 --- a/Mage.Sets/src/mage/cards/l/LoomingShade.java +++ b/Mage.Sets/src/mage/cards/l/LoomingShade.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class LoomingShade extends CardImpl { public LoomingShade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Shade"); + this.subtype.add(SubType.SHADE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LooterIlKor.java b/Mage.Sets/src/mage/cards/l/LooterIlKor.java index 59c02bb965..d28cab33fe 100644 --- a/Mage.Sets/src/mage/cards/l/LooterIlKor.java +++ b/Mage.Sets/src/mage/cards/l/LooterIlKor.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class LooterIlKor extends CardImpl { public LooterIlKor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Kor"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LordOfAtlantis.java b/Mage.Sets/src/mage/cards/l/LordOfAtlantis.java index 71af483bbb..4bd200e3e9 100644 --- a/Mage.Sets/src/mage/cards/l/LordOfAtlantis.java +++ b/Mage.Sets/src/mage/cards/l/LordOfAtlantis.java @@ -58,7 +58,7 @@ public class LordOfAtlantis extends CardImpl { public LordOfAtlantis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LordOfExtinction.java b/Mage.Sets/src/mage/cards/l/LordOfExtinction.java index a997126d41..6cbdc095cb 100644 --- a/Mage.Sets/src/mage/cards/l/LordOfExtinction.java +++ b/Mage.Sets/src/mage/cards/l/LordOfExtinction.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -50,7 +51,7 @@ public class LordOfExtinction extends CardImpl { public LordOfExtinction(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/l/LordOfLineage.java b/Mage.Sets/src/mage/cards/l/LordOfLineage.java index 77099cabf8..1b4e4ddb05 100644 --- a/Mage.Sets/src/mage/cards/l/LordOfLineage.java +++ b/Mage.Sets/src/mage/cards/l/LordOfLineage.java @@ -59,7 +59,7 @@ public class LordOfLineage extends CardImpl { public LordOfLineage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.color.setBlack(true); this.power = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/l/LordOfShatterskullPass.java b/Mage.Sets/src/mage/cards/l/LordOfShatterskullPass.java index d1482436f6..6a9f5ede9d 100644 --- a/Mage.Sets/src/mage/cards/l/LordOfShatterskullPass.java +++ b/Mage.Sets/src/mage/cards/l/LordOfShatterskullPass.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.LevelerCardBuilder; import mage.cards.CardSetInfo; import mage.cards.LevelerCard; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; @@ -55,8 +56,8 @@ public class LordOfShatterskullPass extends LevelerCard { public LordOfShatterskullPass(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.SHAMAN); this.color.setRed(true); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LordOfTheAccursed.java b/Mage.Sets/src/mage/cards/l/LordOfTheAccursed.java index 6b4c111be2..7ba04117a0 100644 --- a/Mage.Sets/src/mage/cards/l/LordOfTheAccursed.java +++ b/Mage.Sets/src/mage/cards/l/LordOfTheAccursed.java @@ -55,7 +55,7 @@ public class LordOfTheAccursed extends CardImpl { public LordOfTheAccursed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LordOfThePit.java b/Mage.Sets/src/mage/cards/l/LordOfThePit.java index bdbd22495b..3e2a945520 100644 --- a/Mage.Sets/src/mage/cards/l/LordOfThePit.java +++ b/Mage.Sets/src/mage/cards/l/LordOfThePit.java @@ -53,7 +53,7 @@ public class LordOfThePit extends CardImpl { public LordOfThePit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/l/LordOfTheUndead.java b/Mage.Sets/src/mage/cards/l/LordOfTheUndead.java index 754160ff61..9be024a3e7 100644 --- a/Mage.Sets/src/mage/cards/l/LordOfTheUndead.java +++ b/Mage.Sets/src/mage/cards/l/LordOfTheUndead.java @@ -62,7 +62,7 @@ public class LordOfTheUndead extends CardImpl { public LordOfTheUndead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LordOfTheUnreal.java b/Mage.Sets/src/mage/cards/l/LordOfTheUnreal.java index 1c71b2be78..e31d47fac0 100644 --- a/Mage.Sets/src/mage/cards/l/LordOfTheUnreal.java +++ b/Mage.Sets/src/mage/cards/l/LordOfTheUnreal.java @@ -57,8 +57,8 @@ public class LordOfTheUnreal extends CardImpl { public LordOfTheUnreal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LordOfTheVoid.java b/Mage.Sets/src/mage/cards/l/LordOfTheVoid.java index 44bf64d920..77883b2f39 100644 --- a/Mage.Sets/src/mage/cards/l/LordOfTheVoid.java +++ b/Mage.Sets/src/mage/cards/l/LordOfTheVoid.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -55,7 +56,7 @@ public class LordOfTheVoid extends CardImpl { public LordOfTheVoid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/l/LordOfTresserhorn.java b/Mage.Sets/src/mage/cards/l/LordOfTresserhorn.java index f6d1b1aa67..7d413eb0a3 100644 --- a/Mage.Sets/src/mage/cards/l/LordOfTresserhorn.java +++ b/Mage.Sets/src/mage/cards/l/LordOfTresserhorn.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.SacrificeControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -55,7 +56,7 @@ public class LordOfTresserhorn extends CardImpl { public LordOfTresserhorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(10); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LoreBroker.java b/Mage.Sets/src/mage/cards/l/LoreBroker.java index db1875d982..b0ef026091 100644 --- a/Mage.Sets/src/mage/cards/l/LoreBroker.java +++ b/Mage.Sets/src/mage/cards/l/LoreBroker.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class LoreBroker extends CardImpl { public LoreBroker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LorescaleCoatl.java b/Mage.Sets/src/mage/cards/l/LorescaleCoatl.java index e5d7ac8223..9576862cc8 100644 --- a/Mage.Sets/src/mage/cards/l/LorescaleCoatl.java +++ b/Mage.Sets/src/mage/cards/l/LorescaleCoatl.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,7 +46,7 @@ public class LorescaleCoatl extends CardImpl { public LorescaleCoatl (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{U}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); diff --git a/Mage.Sets/src/mage/cards/l/LorthosTheTidemaker.java b/Mage.Sets/src/mage/cards/l/LorthosTheTidemaker.java index 264908e2ad..527e466176 100644 --- a/Mage.Sets/src/mage/cards/l/LorthosTheTidemaker.java +++ b/Mage.Sets/src/mage/cards/l/LorthosTheTidemaker.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.FilterPermanent; import mage.target.TargetPermanent; @@ -53,7 +54,7 @@ public class LorthosTheTidemaker extends CardImpl { public LorthosTheTidemaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Octopus"); + this.subtype.add(SubType.OCTOPUS); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/l/LoseCalm.java b/Mage.Sets/src/mage/cards/l/LoseCalm.java index 7891c5c802..d64891833c 100644 --- a/Mage.Sets/src/mage/cards/l/LoseCalm.java +++ b/Mage.Sets/src/mage/cards/l/LoseCalm.java @@ -47,17 +47,17 @@ import mage.target.common.TargetCreaturePermanent; public class LoseCalm extends CardImpl { public LoseCalm(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}"); // Gain control of target creature until end of turn. Untap that creature. It gains haste and menace until end of turn. (A creature with menace can't be blocked except by two or more creatures.) this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); Effect effect = new UntapTargetEffect(); effect.setText("Untap that creature"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn, "It gains haste until end of turn")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn, "It gains haste")); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); effect = new GainAbilityTargetEffect(new MenaceAbility(), Duration.EndOfTurn); - effect.setText("and menace until end of turn. (A creature with menace can't be blocked except by two or more creatures.) "); + effect.setText("and menace until end of turn"); this.getSpellAbility().addEffect(effect); } diff --git a/Mage.Sets/src/mage/cards/l/LostAuramancers.java b/Mage.Sets/src/mage/cards/l/LostAuramancers.java index d210d14b7c..cb5133a1f5 100644 --- a/Mage.Sets/src/mage/cards/l/LostAuramancers.java +++ b/Mage.Sets/src/mage/cards/l/LostAuramancers.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.VanishingUpkeepAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterEnchantmentCard; @@ -55,8 +56,8 @@ public class LostAuramancers extends CardImpl { public LostAuramancers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LostInTheWoods.java b/Mage.Sets/src/mage/cards/l/LostInTheWoods.java index 4238c903bf..849c4c7c98 100644 --- a/Mage.Sets/src/mage/cards/l/LostInTheWoods.java +++ b/Mage.Sets/src/mage/cards/l/LostInTheWoods.java @@ -27,25 +27,19 @@ */ package mage.cards.l; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.AttacksAllTriggeredAbility; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.SetTargetPointer; -import mage.constants.Zone; +import mage.cards.*; +import mage.constants.*; import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import java.util.UUID; + /** * * @author BetaSteward @@ -94,7 +88,7 @@ class LostInTheWoodsEffect extends OneShotEffect { controller.revealCards(sourceObject.getName(), cards, game); if (card != null) { - if (card.getSubtype(game).contains("Forest")) { + if (card.hasSubtype(SubType.FOREST, game)) { Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); if (permanent != null) { permanent.removeFromCombat(game); diff --git a/Mage.Sets/src/mage/cards/l/LostLeonin.java b/Mage.Sets/src/mage/cards/l/LostLeonin.java index 7e19301b16..8ece0f2353 100644 --- a/Mage.Sets/src/mage/cards/l/LostLeonin.java +++ b/Mage.Sets/src/mage/cards/l/LostLeonin.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class LostLeonin extends CardImpl { public LostLeonin (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LostSoul.java b/Mage.Sets/src/mage/cards/l/LostSoul.java index 8ae5214410..8366968d5d 100644 --- a/Mage.Sets/src/mage/cards/l/LostSoul.java +++ b/Mage.Sets/src/mage/cards/l/LostSoul.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class LostSoul extends CardImpl { public LostSoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Spirit"); - this.subtype.add("Minion"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.MINION); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LostVale.java b/Mage.Sets/src/mage/cards/l/LostVale.java new file mode 100644 index 0000000000..1c12a906b7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LostVale.java @@ -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.cards.l; + +import java.util.UUID; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.AddManaOfAnyColorEffect; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class LostVale extends CardImpl { + + public LostVale(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + this.nightCard = true; + + // T: Add three mana of any one color to your mana pool. + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(3), new TapSourceCost())); + } + + public LostVale(final LostVale card) { + super(card); + } + + @Override + public LostVale copy() { + return new LostVale(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LotlethTroll.java b/Mage.Sets/src/mage/cards/l/LotlethTroll.java index 3217b30fa5..634a17d8c8 100644 --- a/Mage.Sets/src/mage/cards/l/LotlethTroll.java +++ b/Mage.Sets/src/mage/cards/l/LotlethTroll.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterCreatureCard; @@ -53,8 +54,8 @@ public class LotlethTroll extends CardImpl { public LotlethTroll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{G}"); - this.subtype.add("Zombie"); - this.subtype.add("Troll"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.TROLL); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LotusCobra.java b/Mage.Sets/src/mage/cards/l/LotusCobra.java index 4eaade9660..a5d1c81d94 100644 --- a/Mage.Sets/src/mage/cards/l/LotusCobra.java +++ b/Mage.Sets/src/mage/cards/l/LotusCobra.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.AddManaOfAnyColorEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class LotusCobra extends CardImpl { public LotusCobra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LotusEyeMystics.java b/Mage.Sets/src/mage/cards/l/LotusEyeMystics.java index bb607c551c..a1226aacd5 100644 --- a/Mage.Sets/src/mage/cards/l/LotusEyeMystics.java +++ b/Mage.Sets/src/mage/cards/l/LotusEyeMystics.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetCardInYourGraveyard; @@ -54,8 +55,8 @@ public class LotusEyeMystics extends CardImpl { public LotusEyeMystics(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LotusGuardian.java b/Mage.Sets/src/mage/cards/l/LotusGuardian.java index a3fc2073df..3bcf336c5a 100644 --- a/Mage.Sets/src/mage/cards/l/LotusGuardian.java +++ b/Mage.Sets/src/mage/cards/l/LotusGuardian.java @@ -34,6 +34,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class LotusGuardian extends CardImpl { public LotusGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LotusPathDjinn.java b/Mage.Sets/src/mage/cards/l/LotusPathDjinn.java index 60242970fa..148a312cb9 100644 --- a/Mage.Sets/src/mage/cards/l/LotusPathDjinn.java +++ b/Mage.Sets/src/mage/cards/l/LotusPathDjinn.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class LotusPathDjinn extends CardImpl { public LotusPathDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Djinn"); - this.subtype.add("Monk"); + this.subtype.add(SubType.DJINN); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LovisaColdeyes.java b/Mage.Sets/src/mage/cards/l/LovisaColdeyes.java index 5b6444147b..da45ba4a98 100644 --- a/Mage.Sets/src/mage/cards/l/LovisaColdeyes.java +++ b/Mage.Sets/src/mage/cards/l/LovisaColdeyes.java @@ -57,7 +57,7 @@ public class LovisaColdeyes extends CardImpl { public LovisaColdeyes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LowlandBasilisk.java b/Mage.Sets/src/mage/cards/l/LowlandBasilisk.java index 4fe4e4d245..b55f6acf14 100644 --- a/Mage.Sets/src/mage/cards/l/LowlandBasilisk.java +++ b/Mage.Sets/src/mage/cards/l/LowlandBasilisk.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class LowlandBasilisk extends CardImpl { public LowlandBasilisk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Basilisk"); + this.subtype.add(SubType.BASILISK); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LowlandGiant.java b/Mage.Sets/src/mage/cards/l/LowlandGiant.java index a370b0c44d..6bcfc47790 100644 --- a/Mage.Sets/src/mage/cards/l/LowlandGiant.java +++ b/Mage.Sets/src/mage/cards/l/LowlandGiant.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class LowlandGiant extends CardImpl { public LowlandGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LowlandOaf.java b/Mage.Sets/src/mage/cards/l/LowlandOaf.java index edeb7f8ccc..76e272edeb 100644 --- a/Mage.Sets/src/mage/cards/l/LowlandOaf.java +++ b/Mage.Sets/src/mage/cards/l/LowlandOaf.java @@ -1,124 +1,124 @@ -/* - * 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.cards.l; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.DelayedTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.SacrificeTargetEffect; -import mage.abilities.effects.common.continuous.BoostTargetEffect; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.abilities.keyword.FlyingAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.*; -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.target.common.TargetCreaturePermanent; -import mage.target.targetpointer.FixedTarget; - -/** - * - * @author Styxo - */ -public class LowlandOaf extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin creature you control"); - - static { - filter.add(new SubtypePredicate(SubType.GOBLIN)); - filter.add(new ControllerPredicate(TargetController.YOU)); - } - - public LowlandOaf(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - - this.subtype.add("Giant"); - this.subtype.add("Warrior"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // {tap}: Target Goblin creature you control gets +1/+0 and gains flying until end of turn. Sacrifice that creature at the beginning of the next end step. - Effect effect = new BoostTargetEffect(1, 0, Duration.EndOfTurn); - effect.setText("Target Goblin creature you control gets +1/+0"); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); - effect = new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn); - effect.setText("and gains flying until end of turn. "); - ability.addEffect(effect); - ability.addEffect(new LowlandOafEffect()); - ability.addTarget(new TargetCreaturePermanent(filter)); - this.addAbility(ability); - } - - public LowlandOaf(final LowlandOaf card) { - super(card); - } - - @Override - public LowlandOaf copy() { - return new LowlandOaf(this); - } -} - -class LowlandOafEffect extends OneShotEffect { - - public LowlandOafEffect() { - super(Outcome.Sacrifice); - this.staticText = "Sacrifice that creature at the beginning of the next end step"; - } - - public LowlandOafEffect(final LowlandOafEffect effect) { - super(effect); - } - - @Override - public LowlandOafEffect copy() { - return new LowlandOafEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent targetCreature = game.getPermanent(source.getFirstTarget()); - if (targetCreature != null) { - SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice this", source.getControllerId()); - sacrificeEffect.setTargetPointer(new FixedTarget(targetCreature, game)); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); - game.addDelayedTriggeredAbility(delayedAbility, source); - } - return true; - } -} +/* + * 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.cards.l; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +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.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author Styxo + */ +public class LowlandOaf extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin creature you control"); + + static { + filter.add(new SubtypePredicate(SubType.GOBLIN)); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public LowlandOaf(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {tap}: Target Goblin creature you control gets +1/+0 and gains flying until end of turn. Sacrifice that creature at the beginning of the next end step. + Effect effect = new BoostTargetEffect(1, 0, Duration.EndOfTurn); + effect.setText("Target Goblin creature you control gets +1/+0"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); + effect = new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains flying until end of turn. "); + ability.addEffect(effect); + ability.addEffect(new LowlandOafEffect()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public LowlandOaf(final LowlandOaf card) { + super(card); + } + + @Override + public LowlandOaf copy() { + return new LowlandOaf(this); + } +} + +class LowlandOafEffect extends OneShotEffect { + + public LowlandOafEffect() { + super(Outcome.Sacrifice); + this.staticText = "Sacrifice that creature at the beginning of the next end step"; + } + + public LowlandOafEffect(final LowlandOafEffect effect) { + super(effect); + } + + @Override + public LowlandOafEffect copy() { + return new LowlandOafEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent targetCreature = game.getPermanent(source.getFirstTarget()); + if (targetCreature != null) { + SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice this", source.getControllerId()); + sacrificeEffect.setTargetPointer(new FixedTarget(targetCreature, game)); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); + game.addDelayedTriggeredAbility(delayedAbility, source); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/l/LowlandTracker.java b/Mage.Sets/src/mage/cards/l/LowlandTracker.java index da465f820c..100afab5cb 100644 --- a/Mage.Sets/src/mage/cards/l/LowlandTracker.java +++ b/Mage.Sets/src/mage/cards/l/LowlandTracker.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class LowlandTracker extends CardImpl { public LowlandTracker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LoxodonAnchorite.java b/Mage.Sets/src/mage/cards/l/LoxodonAnchorite.java index d62dc9f3b8..705e751816 100644 --- a/Mage.Sets/src/mage/cards/l/LoxodonAnchorite.java +++ b/Mage.Sets/src/mage/cards/l/LoxodonAnchorite.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class LoxodonAnchorite extends CardImpl { public LoxodonAnchorite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Elephant"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.ELEPHANT); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LoxodonConvert.java b/Mage.Sets/src/mage/cards/l/LoxodonConvert.java index c2f66b599c..3ef2cec083 100644 --- a/Mage.Sets/src/mage/cards/l/LoxodonConvert.java +++ b/Mage.Sets/src/mage/cards/l/LoxodonConvert.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class LoxodonConvert extends CardImpl { public LoxodonConvert(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Elephant"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ELEPHANT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LoxodonGatekeeper.java b/Mage.Sets/src/mage/cards/l/LoxodonGatekeeper.java index d8c667ba08..b7a8f657f7 100644 --- a/Mage.Sets/src/mage/cards/l/LoxodonGatekeeper.java +++ b/Mage.Sets/src/mage/cards/l/LoxodonGatekeeper.java @@ -35,6 +35,7 @@ import mage.abilities.effects.ReplacementEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,8 +53,8 @@ public class LoxodonGatekeeper extends CardImpl { public LoxodonGatekeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Elephant"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ELEPHANT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LoxodonHierarch.java b/Mage.Sets/src/mage/cards/l/LoxodonHierarch.java index 0a34bb15ca..49eb454675 100644 --- a/Mage.Sets/src/mage/cards/l/LoxodonHierarch.java +++ b/Mage.Sets/src/mage/cards/l/LoxodonHierarch.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.RegenerateAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -58,8 +59,8 @@ public class LoxodonHierarch extends CardImpl { public LoxodonHierarch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{W}"); - this.subtype.add("Elephant"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.ELEPHANT); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LoxodonMender.java b/Mage.Sets/src/mage/cards/l/LoxodonMender.java index 829b5b189f..60ec54f776 100644 --- a/Mage.Sets/src/mage/cards/l/LoxodonMender.java +++ b/Mage.Sets/src/mage/cards/l/LoxodonMender.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.RegenerateTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -56,8 +57,8 @@ public class LoxodonMender extends CardImpl { public LoxodonMender(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Elephant"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.ELEPHANT); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LoxodonMystic.java b/Mage.Sets/src/mage/cards/l/LoxodonMystic.java index 0082f3da59..02af4fca6d 100644 --- a/Mage.Sets/src/mage/cards/l/LoxodonMystic.java +++ b/Mage.Sets/src/mage/cards/l/LoxodonMystic.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class LoxodonMystic extends CardImpl { public LoxodonMystic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Elephant"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.ELEPHANT); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LoxodonPartisan.java b/Mage.Sets/src/mage/cards/l/LoxodonPartisan.java index 5a1f0465af..cdf8482c27 100644 --- a/Mage.Sets/src/mage/cards/l/LoxodonPartisan.java +++ b/Mage.Sets/src/mage/cards/l/LoxodonPartisan.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.BattleCryAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class LoxodonPartisan extends CardImpl { public LoxodonPartisan (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Elephant"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ELEPHANT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LoxodonPunisher.java b/Mage.Sets/src/mage/cards/l/LoxodonPunisher.java index 8d7a509c71..0f3cbfe59e 100644 --- a/Mage.Sets/src/mage/cards/l/LoxodonPunisher.java +++ b/Mage.Sets/src/mage/cards/l/LoxodonPunisher.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,8 +47,8 @@ public class LoxodonPunisher extends CardImpl { public LoxodonPunisher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Elephant"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ELEPHANT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LoxodonSmiter.java b/Mage.Sets/src/mage/cards/l/LoxodonSmiter.java index 037eec9e51..28cd9e041e 100644 --- a/Mage.Sets/src/mage/cards/l/LoxodonSmiter.java +++ b/Mage.Sets/src/mage/cards/l/LoxodonSmiter.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DiscardOntoBattlefieldEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class LoxodonSmiter extends CardImpl { public LoxodonSmiter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}"); - this.subtype.add("Elephant"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ELEPHANT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LoxodonStalwart.java b/Mage.Sets/src/mage/cards/l/LoxodonStalwart.java index 082b1cf74c..ace74674e7 100644 --- a/Mage.Sets/src/mage/cards/l/LoxodonStalwart.java +++ b/Mage.Sets/src/mage/cards/l/LoxodonStalwart.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class LoxodonStalwart extends CardImpl { public LoxodonStalwart(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Elephant"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ELEPHANT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LoxodonWarhammer.java b/Mage.Sets/src/mage/cards/l/LoxodonWarhammer.java index b96354f81c..0208d39708 100644 --- a/Mage.Sets/src/mage/cards/l/LoxodonWarhammer.java +++ b/Mage.Sets/src/mage/cards/l/LoxodonWarhammer.java @@ -49,7 +49,7 @@ public class LoxodonWarhammer extends CardImpl { public LoxodonWarhammer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +3/+0 and has trample and lifelink. (If the creature would assign enough damage to its blockers to destroy them, you may have it assign the rest of its damage to defending player or planeswalker. Damage dealt by the creature also causes its controller to gain that much life.) Effect effect = new BoostEquippedEffect(3, 0); diff --git a/Mage.Sets/src/mage/cards/l/LoxodonWayfarer.java b/Mage.Sets/src/mage/cards/l/LoxodonWayfarer.java index ea0a7129bc..2ebeab069e 100644 --- a/Mage.Sets/src/mage/cards/l/LoxodonWayfarer.java +++ b/Mage.Sets/src/mage/cards/l/LoxodonWayfarer.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class LoxodonWayfarer extends CardImpl { public LoxodonWayfarer (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Elephant"); - this.subtype.add("Monk"); + this.subtype.add(SubType.ELEPHANT); + this.subtype.add(SubType.MONK); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/l/LoyalCathar.java b/Mage.Sets/src/mage/cards/l/LoyalCathar.java index ea011498f6..e0805cb145 100644 --- a/Mage.Sets/src/mage/cards/l/LoyalCathar.java +++ b/Mage.Sets/src/mage/cards/l/LoyalCathar.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.u.UnhallowedCathar; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -53,8 +54,8 @@ public class LoyalCathar extends CardImpl { public LoyalCathar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.transformable = true; this.secondSideCardClazz = UnhallowedCathar.class; diff --git a/Mage.Sets/src/mage/cards/l/LoyalGyrfalcon.java b/Mage.Sets/src/mage/cards/l/LoyalGyrfalcon.java index ce13720aac..0ccdcac699 100644 --- a/Mage.Sets/src/mage/cards/l/LoyalGyrfalcon.java +++ b/Mage.Sets/src/mage/cards/l/LoyalGyrfalcon.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.FilterSpell; @@ -60,7 +61,7 @@ public class LoyalGyrfalcon extends CardImpl { public LoyalGyrfalcon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.color.setWhite(true); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LoyalPegasus.java b/Mage.Sets/src/mage/cards/l/LoyalPegasus.java index 28bae31969..94e3f8839b 100644 --- a/Mage.Sets/src/mage/cards/l/LoyalPegasus.java +++ b/Mage.Sets/src/mage/cards/l/LoyalPegasus.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class LoyalPegasus extends CardImpl { public LoyalPegasus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Pegasus"); + this.subtype.add(SubType.PEGASUS); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LoyalRetainers.java b/Mage.Sets/src/mage/cards/l/LoyalRetainers.java index 1c218ac608..2dd42d1a94 100644 --- a/Mage.Sets/src/mage/cards/l/LoyalRetainers.java +++ b/Mage.Sets/src/mage/cards/l/LoyalRetainers.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -57,8 +58,8 @@ public class LoyalRetainers extends CardImpl { public LoyalRetainers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LoyalSentry.java b/Mage.Sets/src/mage/cards/l/LoyalSentry.java index e586749463..d7ba486a57 100644 --- a/Mage.Sets/src/mage/cards/l/LoyalSentry.java +++ b/Mage.Sets/src/mage/cards/l/LoyalSentry.java @@ -31,13 +31,12 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BlocksTriggeredAbility; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroySourceEffect; +import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.Outcome; -import mage.game.Game; -import mage.game.permanent.Permanent; +import mage.constants.SubType; /** * @@ -47,14 +46,16 @@ public class LoyalSentry extends CardImpl { public LoyalSentry(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); // When Loyal Sentry blocks a creature, destroy that creature and Loyal Sentry. - this.addAbility(new BlocksTriggeredAbility(new LoyalSentryEffect(), false, true)); + Ability ability = new BlocksTriggeredAbility(new DestroyTargetEffect().setText("destroy that creature"), false, true, true); + ability.addEffect(new DestroySourceEffect().setText("and {this}")); + this.addAbility(ability); } public LoyalSentry(final LoyalSentry card) { @@ -66,34 +67,3 @@ public class LoyalSentry extends CardImpl { return new LoyalSentry(this); } } - -class LoyalSentryEffect extends OneShotEffect { - - LoyalSentryEffect() { - super(Outcome.DestroyPermanent); - staticText = "destroy that creature and {this}"; - } - - LoyalSentryEffect(LoyalSentryEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent p = game.getPermanent(getTargetPointer().getFirst(game, source)); - if (p != null) { - p.destroy(source.getSourceId(), game, false); - } - Permanent s = game.getPermanent(source.getSourceId()); - if (s != null) { - s.destroy(source.getSourceId(), game, false); - } - return true; - } - - @Override - public LoyalSentryEffect copy() { - return new LoyalSentryEffect(this); - } - -} diff --git a/Mage.Sets/src/mage/cards/l/LoyalTauntaun.java b/Mage.Sets/src/mage/cards/l/LoyalTauntaun.java index 090153bc56..414a203125 100644 --- a/Mage.Sets/src/mage/cards/l/LoyalTauntaun.java +++ b/Mage.Sets/src/mage/cards/l/LoyalTauntaun.java @@ -1,70 +1,71 @@ -/* - * 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.cards.l; - -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.mana.ManaCostsImpl; -import mage.abilities.effects.common.RegenerateTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Styxo - */ -public class LoyalTauntaun extends CardImpl { - - public LoyalTauntaun(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Beast"); - this.power = new MageInt(2); - this.toughness = new MageInt(3); - - // {1}{G}, sacrifice Loyal Tauntaun: Regenerate target creature. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateTargetEffect(), new ManaCostsImpl("{1}{G}")); - ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability); - } - - public LoyalTauntaun(final LoyalTauntaun card) { - super(card); - } - - @Override - public LoyalTauntaun copy() { - return new LoyalTauntaun(this); - } -} +/* + * 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.cards.l; + +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.mana.ManaCostsImpl; +import mage.abilities.effects.common.RegenerateTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Styxo + */ +public class LoyalTauntaun extends CardImpl { + + public LoyalTauntaun(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.subtype.add(SubType.BEAST); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // {1}{G}, sacrifice Loyal Tauntaun: Regenerate target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateTargetEffect(), new ManaCostsImpl("{1}{G}")); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public LoyalTauntaun(final LoyalTauntaun card) { + super(card); + } + + @Override + public LoyalTauntaun copy() { + return new LoyalTauntaun(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LuBuMasterAtArms.java b/Mage.Sets/src/mage/cards/l/LuBuMasterAtArms.java index f8b3d4dad9..5020773d0c 100644 --- a/Mage.Sets/src/mage/cards/l/LuBuMasterAtArms.java +++ b/Mage.Sets/src/mage/cards/l/LuBuMasterAtArms.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -45,9 +46,9 @@ public class LuBuMasterAtArms extends CardImpl { public LuBuMasterAtArms(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LuMengWuGeneral.java b/Mage.Sets/src/mage/cards/l/LuMengWuGeneral.java index 6e65a29ef5..abb1406ee5 100644 --- a/Mage.Sets/src/mage/cards/l/LuMengWuGeneral.java +++ b/Mage.Sets/src/mage/cards/l/LuMengWuGeneral.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -44,8 +45,8 @@ public class LuMengWuGeneral extends CardImpl { public LuMengWuGeneral(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LuSuWuAdvisor.java b/Mage.Sets/src/mage/cards/l/LuSuWuAdvisor.java index df16330bc4..267fb23fd8 100644 --- a/Mage.Sets/src/mage/cards/l/LuSuWuAdvisor.java +++ b/Mage.Sets/src/mage/cards/l/LuSuWuAdvisor.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class LuSuWuAdvisor extends CardImpl { public LuSuWuAdvisor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LuXunScholarGeneral.java b/Mage.Sets/src/mage/cards/l/LuXunScholarGeneral.java index 9539aeffeb..7de1996ae1 100644 --- a/Mage.Sets/src/mage/cards/l/LuXunScholarGeneral.java +++ b/Mage.Sets/src/mage/cards/l/LuXunScholarGeneral.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -46,8 +47,8 @@ public class LuXunScholarGeneral extends CardImpl { public LuXunScholarGeneral(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LucentLiminid.java b/Mage.Sets/src/mage/cards/l/LucentLiminid.java index 45d7d8642c..79bceea88c 100644 --- a/Mage.Sets/src/mage/cards/l/LucentLiminid.java +++ b/Mage.Sets/src/mage/cards/l/LucentLiminid.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class LucentLiminid extends CardImpl { public LucentLiminid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LudevicNecroAlchemist.java b/Mage.Sets/src/mage/cards/l/LudevicNecroAlchemist.java index 30eb0c9c0f..2cdc2facce 100644 --- a/Mage.Sets/src/mage/cards/l/LudevicNecroAlchemist.java +++ b/Mage.Sets/src/mage/cards/l/LudevicNecroAlchemist.java @@ -53,8 +53,8 @@ public class LudevicNecroAlchemist extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LudevicsAbomination.java b/Mage.Sets/src/mage/cards/l/LudevicsAbomination.java index 77dd8f705b..de40cec9fc 100644 --- a/Mage.Sets/src/mage/cards/l/LudevicsAbomination.java +++ b/Mage.Sets/src/mage/cards/l/LudevicsAbomination.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class LudevicsAbomination extends CardImpl { public LudevicsAbomination(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Lizard"); - this.subtype.add("Horror"); + this.subtype.add(SubType.LIZARD); + this.subtype.add(SubType.HORROR); this.color.setBlue(true); // this card is the second face of double-faced card diff --git a/Mage.Sets/src/mage/cards/l/LudevicsTestSubject.java b/Mage.Sets/src/mage/cards/l/LudevicsTestSubject.java index ab141dbb94..941692c093 100644 --- a/Mage.Sets/src/mage/cards/l/LudevicsTestSubject.java +++ b/Mage.Sets/src/mage/cards/l/LudevicsTestSubject.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -54,7 +55,7 @@ public class LudevicsTestSubject extends CardImpl { public LudevicsTestSubject(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LukeSkywalker.java b/Mage.Sets/src/mage/cards/l/LukeSkywalker.java index 5db1df1b12..be07999a2a 100644 --- a/Mage.Sets/src/mage/cards/l/LukeSkywalker.java +++ b/Mage.Sets/src/mage/cards/l/LukeSkywalker.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class LukeSkywalker extends CardImpl { public LukeSkywalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{W}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Jedi"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.JEDI); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LullmageMentor.java b/Mage.Sets/src/mage/cards/l/LullmageMentor.java index 5ab5d7ca58..495396d8cd 100644 --- a/Mage.Sets/src/mage/cards/l/LullmageMentor.java +++ b/Mage.Sets/src/mage/cards/l/LullmageMentor.java @@ -63,8 +63,8 @@ public class LullmageMentor extends CardImpl { public LullmageMentor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LumberingFalls.java b/Mage.Sets/src/mage/cards/l/LumberingFalls.java index f112fc4c33..4e29df3460 100644 --- a/Mage.Sets/src/mage/cards/l/LumberingFalls.java +++ b/Mage.Sets/src/mage/cards/l/LumberingFalls.java @@ -39,6 +39,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -78,7 +79,7 @@ class LumberingFallsToken extends Token { public LumberingFallsToken() { super("", "3/3 green and blue Elemental creature with hexproof"); cardType.add(CardType.CREATURE); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); color.setBlue(true); color.setGreen(true); power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LumberingSatyr.java b/Mage.Sets/src/mage/cards/l/LumberingSatyr.java index 39f8c2d817..b2483f53f9 100644 --- a/Mage.Sets/src/mage/cards/l/LumberingSatyr.java +++ b/Mage.Sets/src/mage/cards/l/LumberingSatyr.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -47,8 +48,8 @@ public class LumberingSatyr extends CardImpl { public LumberingSatyr(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Satyr"); - this.subtype.add("Beast"); + this.subtype.add(SubType.SATYR); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/Lumberknot.java b/Mage.Sets/src/mage/cards/l/Lumberknot.java index c2ee2713c7..94e374aada 100644 --- a/Mage.Sets/src/mage/cards/l/Lumberknot.java +++ b/Mage.Sets/src/mage/cards/l/Lumberknot.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,7 +46,7 @@ public class Lumberknot extends CardImpl { public Lumberknot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LumengridDrake.java b/Mage.Sets/src/mage/cards/l/LumengridDrake.java index 97b92457e0..d509b645de 100644 --- a/Mage.Sets/src/mage/cards/l/LumengridDrake.java +++ b/Mage.Sets/src/mage/cards/l/LumengridDrake.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -49,7 +50,7 @@ public class LumengridDrake extends CardImpl { public LumengridDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.color.setBlue(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LumengridGargoyle.java b/Mage.Sets/src/mage/cards/l/LumengridGargoyle.java index e66649961b..aed93ba64c 100644 --- a/Mage.Sets/src/mage/cards/l/LumengridGargoyle.java +++ b/Mage.Sets/src/mage/cards/l/LumengridGargoyle.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class LumengridGargoyle extends CardImpl { public LumengridGargoyle (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Gargoyle"); + this.subtype.add(SubType.GARGOYLE); this.power = new MageInt(4); this.toughness = new MageInt(4); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/l/LumengridSentinel.java b/Mage.Sets/src/mage/cards/l/LumengridSentinel.java index 7dae06a3dd..59ea571649 100644 --- a/Mage.Sets/src/mage/cards/l/LumengridSentinel.java +++ b/Mage.Sets/src/mage/cards/l/LumengridSentinel.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; import mage.target.TargetPermanent; @@ -48,8 +49,8 @@ public class LumengridSentinel extends CardImpl { public LumengridSentinel(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LumengridWarden.java b/Mage.Sets/src/mage/cards/l/LumengridWarden.java index 7dddfef3ac..4833878ea0 100644 --- a/Mage.Sets/src/mage/cards/l/LumengridWarden.java +++ b/Mage.Sets/src/mage/cards/l/LumengridWarden.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class LumengridWarden extends CardImpl { public LumengridWarden(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LuminatePrimordial.java b/Mage.Sets/src/mage/cards/l/LuminatePrimordial.java index 25d6b64cf7..301bad1dbc 100644 --- a/Mage.Sets/src/mage/cards/l/LuminatePrimordial.java +++ b/Mage.Sets/src/mage/cards/l/LuminatePrimordial.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; @@ -53,7 +54,7 @@ public class LuminatePrimordial extends CardImpl { public LuminatePrimordial(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(4); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/l/Luminesce.java b/Mage.Sets/src/mage/cards/l/Luminesce.java index 75bee45c5c..fb8116cb48 100644 --- a/Mage.Sets/src/mage/cards/l/Luminesce.java +++ b/Mage.Sets/src/mage/cards/l/Luminesce.java @@ -1,101 +1,101 @@ -/* - * 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.cards.l; - -import java.util.UUID; -import mage.MageObject; -import mage.ObjectColor; -import mage.abilities.Ability; -import mage.abilities.effects.PreventionEffectImpl; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.game.Game; -import mage.game.events.GameEvent; - -/** - * - * @author Styxo - */ -public class Luminesce extends CardImpl { - - public Luminesce(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); - - // Prevent all damage that black sources and red sources would deal this turn. - getSpellAbility().addEffect(new LuminescePreventionEffect()); - } - - public Luminesce(final Luminesce card) { - super(card); - } - - @Override - public Luminesce copy() { - return new Luminesce(this); - } -} - -class LuminescePreventionEffect extends PreventionEffectImpl { - - public LuminescePreventionEffect() { - super(Duration.EndOfTurn, Integer.MAX_VALUE, false, false); - staticText = "Prevent all damage that black sources and red sources would deal this turn"; - } - - public LuminescePreventionEffect(LuminescePreventionEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - if (super.applies(event, source, game)) { - if (event.getType() == GameEvent.EventType.DAMAGE_PLAYER - || event.getType() == GameEvent.EventType.DAMAGE_CREATURE - || event.getType() == GameEvent.EventType.DAMAGE_PLANESWALKER) { - MageObject sourceObject = game.getObject(event.getSourceId()); - if (sourceObject != null - && (sourceObject.getColor(game).shares(ObjectColor.BLACK) || sourceObject.getColor(game).shares(ObjectColor.RED))) { - return true; - } - } - } - return false; - } - - @Override - public LuminescePreventionEffect copy() { - return new LuminescePreventionEffect(this); - } -} +/* + * 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.cards.l; + +import java.util.UUID; +import mage.MageObject; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.effects.PreventionEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author Styxo + */ +public class Luminesce extends CardImpl { + + public Luminesce(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); + + // Prevent all damage that black sources and red sources would deal this turn. + getSpellAbility().addEffect(new LuminescePreventionEffect()); + } + + public Luminesce(final Luminesce card) { + super(card); + } + + @Override + public Luminesce copy() { + return new Luminesce(this); + } +} + +class LuminescePreventionEffect extends PreventionEffectImpl { + + public LuminescePreventionEffect() { + super(Duration.EndOfTurn, Integer.MAX_VALUE, false, false); + staticText = "Prevent all damage that black sources and red sources would deal this turn"; + } + + public LuminescePreventionEffect(LuminescePreventionEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (super.applies(event, source, game)) { + if (event.getType() == GameEvent.EventType.DAMAGE_PLAYER + || event.getType() == GameEvent.EventType.DAMAGE_CREATURE + || event.getType() == GameEvent.EventType.DAMAGE_PLANESWALKER) { + MageObject sourceObject = game.getObject(event.getSourceId()); + if (sourceObject != null + && (sourceObject.getColor(game).shares(ObjectColor.BLACK) || sourceObject.getColor(game).shares(ObjectColor.RED))) { + return true; + } + } + } + return false; + } + + @Override + public LuminescePreventionEffect copy() { + return new LuminescePreventionEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LuminousAngel.java b/Mage.Sets/src/mage/cards/l/LuminousAngel.java index b0b2db57db..a7c77048d7 100644 --- a/Mage.Sets/src/mage/cards/l/LuminousAngel.java +++ b/Mage.Sets/src/mage/cards/l/LuminousAngel.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.game.permanent.token.SpiritWhiteToken; @@ -46,7 +47,7 @@ public class LuminousAngel extends CardImpl { public LuminousAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LuminousGuardian.java b/Mage.Sets/src/mage/cards/l/LuminousGuardian.java index f144ad608b..5402f0e557 100644 --- a/Mage.Sets/src/mage/cards/l/LuminousGuardian.java +++ b/Mage.Sets/src/mage/cards/l/LuminousGuardian.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class LuminousGuardian extends CardImpl { public LuminousGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LuminousWake.java b/Mage.Sets/src/mage/cards/l/LuminousWake.java index 5c749b976a..052164363a 100644 --- a/Mage.Sets/src/mage/cards/l/LuminousWake.java +++ b/Mage.Sets/src/mage/cards/l/LuminousWake.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -49,7 +50,7 @@ public class LuminousWake extends CardImpl { public LuminousWake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/l/LunarAvenger.java b/Mage.Sets/src/mage/cards/l/LunarAvenger.java index 898c98f150..03efc35ea2 100644 --- a/Mage.Sets/src/mage/cards/l/LunarAvenger.java +++ b/Mage.Sets/src/mage/cards/l/LunarAvenger.java @@ -42,6 +42,7 @@ import mage.cards.CardSetInfo; import mage.choices.Choice; import mage.choices.ChoiceImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -61,7 +62,7 @@ public class LunarAvenger extends CardImpl { public LunarAvenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LunarMystic.java b/Mage.Sets/src/mage/cards/l/LunarMystic.java index 514687f112..9ea63d9273 100644 --- a/Mage.Sets/src/mage/cards/l/LunarMystic.java +++ b/Mage.Sets/src/mage/cards/l/LunarMystic.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -53,8 +54,8 @@ public class LunarMystic extends CardImpl { public LunarMystic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LunarchInquisitors.java b/Mage.Sets/src/mage/cards/l/LunarchInquisitors.java index 742bad18d4..6ffb7ea5c6 100644 --- a/Mage.Sets/src/mage/cards/l/LunarchInquisitors.java +++ b/Mage.Sets/src/mage/cards/l/LunarchInquisitors.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,8 +57,8 @@ public class LunarchInquisitors extends CardImpl { public LunarchInquisitors(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(4); this.toughness = new MageInt(4); this.color.setWhite(true); diff --git a/Mage.Sets/src/mage/cards/l/LunarchMantle.java b/Mage.Sets/src/mage/cards/l/LunarchMantle.java index c64838a6d3..45f8820ccb 100644 --- a/Mage.Sets/src/mage/cards/l/LunarchMantle.java +++ b/Mage.Sets/src/mage/cards/l/LunarchMantle.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -60,7 +61,7 @@ public class LunarchMantle extends CardImpl { public LunarchMantle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/l/LunkErrant.java b/Mage.Sets/src/mage/cards/l/LunkErrant.java index 207a4fcc0a..bc4ce508a8 100644 --- a/Mage.Sets/src/mage/cards/l/LunkErrant.java +++ b/Mage.Sets/src/mage/cards/l/LunkErrant.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -48,8 +49,8 @@ public class LunkErrant extends CardImpl { public LunkErrant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LupinePrototype.java b/Mage.Sets/src/mage/cards/l/LupinePrototype.java index cd0e220dfb..9bb3a39acb 100644 --- a/Mage.Sets/src/mage/cards/l/LupinePrototype.java +++ b/Mage.Sets/src/mage/cards/l/LupinePrototype.java @@ -35,6 +35,7 @@ import mage.abilities.effects.RestrictionEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -49,8 +50,8 @@ public class LupinePrototype extends CardImpl { public LupinePrototype(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Wolf"); - this.subtype.add("Construct"); + this.subtype.add(SubType.WOLF); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/l/LurchingRotbeast.java b/Mage.Sets/src/mage/cards/l/LurchingRotbeast.java index 17b48c6e56..ad9bf59bc2 100644 --- a/Mage.Sets/src/mage/cards/l/LurchingRotbeast.java +++ b/Mage.Sets/src/mage/cards/l/LurchingRotbeast.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class LurchingRotbeast extends CardImpl { public LurchingRotbeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Beast"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/Lure.java b/Mage.Sets/src/mage/cards/l/Lure.java index 73fa7af480..11822bcce4 100644 --- a/Mage.Sets/src/mage/cards/l/Lure.java +++ b/Mage.Sets/src/mage/cards/l/Lure.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class Lure extends CardImpl { public Lure (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/l/LureboundScarecrow.java b/Mage.Sets/src/mage/cards/l/LureboundScarecrow.java index 0a81f3f84d..fe4b9f5b67 100644 --- a/Mage.Sets/src/mage/cards/l/LureboundScarecrow.java +++ b/Mage.Sets/src/mage/cards/l/LureboundScarecrow.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class LureboundScarecrow extends CardImpl { public LureboundScarecrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/l/LurkingArynx.java b/Mage.Sets/src/mage/cards/l/LurkingArynx.java index 6a125a2ab1..22bac9ce5b 100644 --- a/Mage.Sets/src/mage/cards/l/LurkingArynx.java +++ b/Mage.Sets/src/mage/cards/l/LurkingArynx.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class LurkingArynx extends CardImpl { public LurkingArynx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Cat"); - this.subtype.add("Beast"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/l/LurkingChupacabra.java b/Mage.Sets/src/mage/cards/l/LurkingChupacabra.java new file mode 100644 index 0000000000..8740ed771a --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LurkingChupacabra.java @@ -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.cards.l; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.effects.common.CreatureExploresTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class LurkingChupacabra extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public LurkingChupacabra(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.BEAST); + this.subtype.add(SubType.HORROR); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Whenever a creature you control explores, target creature an opponent controls gets -2/-2 until end of turn + Ability ability = new CreatureExploresTriggeredAbility(new BoostTargetEffect(-2, -2, Duration.EndOfTurn)); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public LurkingChupacabra(final LurkingChupacabra card) { + super(card); + } + + @Override + public LurkingChupacabra copy() { + return new LurkingChupacabra(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LurkingCrocodile.java b/Mage.Sets/src/mage/cards/l/LurkingCrocodile.java index 5e199e905e..2d144c1c0a 100644 --- a/Mage.Sets/src/mage/cards/l/LurkingCrocodile.java +++ b/Mage.Sets/src/mage/cards/l/LurkingCrocodile.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.IslandwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class LurkingCrocodile extends CardImpl { public LurkingCrocodile(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Crocodile"); + this.subtype.add(SubType.CROCODILE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LurkingEvil.java b/Mage.Sets/src/mage/cards/l/LurkingEvil.java index 8bd61abbd9..152b2df41f 100644 --- a/Mage.Sets/src/mage/cards/l/LurkingEvil.java +++ b/Mage.Sets/src/mage/cards/l/LurkingEvil.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -114,7 +115,7 @@ class LurkingEvilToken extends Token { super("Horror", "4/4 Horror creature with flying"); power = new MageInt(4); toughness = new MageInt(4); - subtype.add("Horror"); + subtype.add(SubType.HORROR); cardType.add(CardType.CREATURE); this.addAbility(FlyingAbility.getInstance()); } diff --git a/Mage.Sets/src/mage/cards/l/LurkingInformant.java b/Mage.Sets/src/mage/cards/l/LurkingInformant.java index d112253f10..406d773d98 100644 --- a/Mage.Sets/src/mage/cards/l/LurkingInformant.java +++ b/Mage.Sets/src/mage/cards/l/LurkingInformant.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.LookLibraryTopCardTargetPlayerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -48,8 +49,8 @@ public class LurkingInformant extends CardImpl { public LurkingInformant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U/B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LurkingNightstalker.java b/Mage.Sets/src/mage/cards/l/LurkingNightstalker.java index b96f495dba..ca75d090cc 100644 --- a/Mage.Sets/src/mage/cards/l/LurkingNightstalker.java +++ b/Mage.Sets/src/mage/cards/l/LurkingNightstalker.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class LurkingNightstalker extends CardImpl { public LurkingNightstalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Nightstalker"); + this.subtype.add(SubType.NIGHTSTALKER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LushGrowth.java b/Mage.Sets/src/mage/cards/l/LushGrowth.java index 3cfefb9d16..5e504d4f14 100644 --- a/Mage.Sets/src/mage/cards/l/LushGrowth.java +++ b/Mage.Sets/src/mage/cards/l/LushGrowth.java @@ -50,7 +50,7 @@ public class LushGrowth extends CardImpl { public LushGrowth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land diff --git a/Mage.Sets/src/mage/cards/l/LustForWar.java b/Mage.Sets/src/mage/cards/l/LustForWar.java index ad5b705d26..ea575a26b9 100644 --- a/Mage.Sets/src/mage/cards/l/LustForWar.java +++ b/Mage.Sets/src/mage/cards/l/LustForWar.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class LustForWar extends CardImpl { public LustForWar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/l/LuxaRiverShrine.java b/Mage.Sets/src/mage/cards/l/LuxaRiverShrine.java index acf3e5b15c..1bca72cf26 100644 --- a/Mage.Sets/src/mage/cards/l/LuxaRiverShrine.java +++ b/Mage.Sets/src/mage/cards/l/LuxaRiverShrine.java @@ -1,77 +1,77 @@ -/* - * 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.cards.l; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.condition.Condition; -import mage.abilities.condition.common.SourceHasCounterCondition; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalActivatedAbility; -import mage.abilities.effects.common.GainLifeEffect; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.counters.CounterType; - -/** - * - * @author jeffwadsworth - */ -public class LuxaRiverShrine extends CardImpl { - - private static final String rule = "{T}: You gain 2 life. Activate this ability only if there are three or more brick counters on {this}."; - - public LuxaRiverShrine(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); - - // {1}, {T}: You gain 1 life. Put a brick counter on Luxa River Shrine. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), new ManaCostsImpl("{1}")); - ability.addCost(new TapSourceCost()); - ability.addEffect(new AddCountersSourceEffect(CounterType.BRICK.createInstance())); - this.addAbility(ability); - - // {T}: You gain 2 life. Activate this ability only if there are three or more brick counters on Luxa River Shrine. - Condition condition = new SourceHasCounterCondition(CounterType.BRICK, 3, Integer.MAX_VALUE); - this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), new TapSourceCost(), condition, rule)); - - } - - public LuxaRiverShrine(final LuxaRiverShrine card) { - super(card); - } - - @Override - public LuxaRiverShrine copy() { - return new LuxaRiverShrine(this); - } -} +/* + * 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.cards.l; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.SourceHasCounterCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author jeffwadsworth + */ +public class LuxaRiverShrine extends CardImpl { + + private static final String rule = "{T}: You gain 2 life. Activate this ability only if there are three or more brick counters on {this}."; + + public LuxaRiverShrine(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + // {1}, {T}: You gain 1 life. Put a brick counter on Luxa River Shrine. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), new ManaCostsImpl("{1}")); + ability.addCost(new TapSourceCost()); + ability.addEffect(new AddCountersSourceEffect(CounterType.BRICK.createInstance())); + this.addAbility(ability); + + // {T}: You gain 2 life. Activate this ability only if there are three or more brick counters on Luxa River Shrine. + Condition condition = new SourceHasCounterCondition(CounterType.BRICK, 3, Integer.MAX_VALUE); + this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), new TapSourceCost(), condition, rule)); + + } + + public LuxaRiverShrine(final LuxaRiverShrine card) { + super(card); + } + + @Override + public LuxaRiverShrine copy() { + return new LuxaRiverShrine(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LyevSkyknight.java b/Mage.Sets/src/mage/cards/l/LyevSkyknight.java index d0f694a6dc..e81d3f6228 100644 --- a/Mage.Sets/src/mage/cards/l/LyevSkyknight.java +++ b/Mage.Sets/src/mage/cards/l/LyevSkyknight.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterNonlandPermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -55,8 +56,8 @@ public class LyevSkyknight extends CardImpl { public LyevSkyknight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{U}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); diff --git a/Mage.Sets/src/mage/cards/l/LymphSliver.java b/Mage.Sets/src/mage/cards/l/LymphSliver.java index f67549e7a2..a8789cf76b 100644 --- a/Mage.Sets/src/mage/cards/l/LymphSliver.java +++ b/Mage.Sets/src/mage/cards/l/LymphSliver.java @@ -53,7 +53,7 @@ public class LymphSliver extends CardImpl { public LymphSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/Lynx.java b/Mage.Sets/src/mage/cards/l/Lynx.java index 4b79a708ee..59a09ddea7 100644 --- a/Mage.Sets/src/mage/cards/l/Lynx.java +++ b/Mage.Sets/src/mage/cards/l/Lynx.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class Lynx extends CardImpl { public Lynx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LysAlanaBowmaster.java b/Mage.Sets/src/mage/cards/l/LysAlanaBowmaster.java index 8ae1a7cd17..1775d4844b 100644 --- a/Mage.Sets/src/mage/cards/l/LysAlanaBowmaster.java +++ b/Mage.Sets/src/mage/cards/l/LysAlanaBowmaster.java @@ -60,8 +60,8 @@ public class LysAlanaBowmaster extends CardImpl { public LysAlanaBowmaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Archer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/l/LysAlanaHuntmaster.java b/Mage.Sets/src/mage/cards/l/LysAlanaHuntmaster.java index cb926c43eb..fd13e01014 100644 --- a/Mage.Sets/src/mage/cards/l/LysAlanaHuntmaster.java +++ b/Mage.Sets/src/mage/cards/l/LysAlanaHuntmaster.java @@ -53,8 +53,8 @@ public class LysAlanaHuntmaster extends CardImpl { public LysAlanaHuntmaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LysAlanaScarblade.java b/Mage.Sets/src/mage/cards/l/LysAlanaScarblade.java index f252e4953b..c6075c10d7 100644 --- a/Mage.Sets/src/mage/cards/l/LysAlanaScarblade.java +++ b/Mage.Sets/src/mage/cards/l/LysAlanaScarblade.java @@ -64,8 +64,8 @@ public class LysAlanaScarblade extends CardImpl { public LysAlanaScarblade(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Elf"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/l/LyzoldaTheBloodWitch.java b/Mage.Sets/src/mage/cards/l/LyzoldaTheBloodWitch.java index 8850fd7f5d..91c7e81381 100644 --- a/Mage.Sets/src/mage/cards/l/LyzoldaTheBloodWitch.java +++ b/Mage.Sets/src/mage/cards/l/LyzoldaTheBloodWitch.java @@ -43,6 +43,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -69,8 +70,8 @@ public class LyzoldaTheBloodWitch extends CardImpl { public LyzoldaTheBloodWitch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MaChaoWesternWarrior.java b/Mage.Sets/src/mage/cards/m/MaChaoWesternWarrior.java index ba59a112e8..908f47311e 100644 --- a/Mage.Sets/src/mage/cards/m/MaChaoWesternWarrior.java +++ b/Mage.Sets/src/mage/cards/m/MaChaoWesternWarrior.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; @@ -48,9 +49,9 @@ public class MaChaoWesternWarrior extends CardImpl { public MaChaoWesternWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MaalfeldTwins.java b/Mage.Sets/src/mage/cards/m/MaalfeldTwins.java index 81e0c4e9e8..2bbea9ef2f 100644 --- a/Mage.Sets/src/mage/cards/m/MaalfeldTwins.java +++ b/Mage.Sets/src/mage/cards/m/MaalfeldTwins.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.ZombieToken; /** @@ -44,7 +45,7 @@ public class MaalfeldTwins extends CardImpl { public MaalfeldTwins(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MaceWindu.java b/Mage.Sets/src/mage/cards/m/MaceWindu.java index ca4fdf01be..3c088a1459 100644 --- a/Mage.Sets/src/mage/cards/m/MaceWindu.java +++ b/Mage.Sets/src/mage/cards/m/MaceWindu.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MeditateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.filter.common.FilterSpellOrPermanent; @@ -58,8 +59,8 @@ public class MaceWindu extends CardImpl { public MaceWindu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Jedi"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.JEDI); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MacetailHystrodon.java b/Mage.Sets/src/mage/cards/m/MacetailHystrodon.java index dfc5ce9a09..df688fe414 100644 --- a/Mage.Sets/src/mage/cards/m/MacetailHystrodon.java +++ b/Mage.Sets/src/mage/cards/m/MacetailHystrodon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class MacetailHystrodon extends CardImpl { public MacetailHystrodon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MadAuntie.java b/Mage.Sets/src/mage/cards/m/MadAuntie.java index 86f1ebcf05..dfedd9644c 100644 --- a/Mage.Sets/src/mage/cards/m/MadAuntie.java +++ b/Mage.Sets/src/mage/cards/m/MadAuntie.java @@ -62,8 +62,8 @@ public class MadAuntie extends CardImpl { public MadAuntie(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MadProphet.java b/Mage.Sets/src/mage/cards/m/MadProphet.java index c25eac7315..7427d12c56 100644 --- a/Mage.Sets/src/mage/cards/m/MadProphet.java +++ b/Mage.Sets/src/mage/cards/m/MadProphet.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCardInHand; @@ -49,8 +50,8 @@ public class MadProphet extends CardImpl { public MadProphet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MadblindMountain.java b/Mage.Sets/src/mage/cards/m/MadblindMountain.java index db1cdd3a38..e2cb98306b 100644 --- a/Mage.Sets/src/mage/cards/m/MadblindMountain.java +++ b/Mage.Sets/src/mage/cards/m/MadblindMountain.java @@ -40,6 +40,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -59,7 +60,7 @@ public class MadblindMountain extends CardImpl { public MadblindMountain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Mountain"); + this.subtype.add(SubType.MOUNTAIN); // ({tap}: Add {R} to your mana pool.) this.addAbility(new RedManaAbility()); diff --git a/Mage.Sets/src/mage/cards/m/MadcapSkills.java b/Mage.Sets/src/mage/cards/m/MadcapSkills.java index 5d43b147be..b3c89573c6 100644 --- a/Mage.Sets/src/mage/cards/m/MadcapSkills.java +++ b/Mage.Sets/src/mage/cards/m/MadcapSkills.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -52,7 +53,7 @@ public class MadcapSkills extends CardImpl { public MadcapSkills(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/m/MadrushCyclops.java b/Mage.Sets/src/mage/cards/m/MadrushCyclops.java index aed7e6fcb3..b85a0e01a6 100644 --- a/Mage.Sets/src/mage/cards/m/MadrushCyclops.java +++ b/Mage.Sets/src/mage/cards/m/MadrushCyclops.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -48,8 +49,8 @@ public class MadrushCyclops extends CardImpl { public MadrushCyclops (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}{G}"); - this.subtype.add("Cyclops"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CYCLOPS); + this.subtype.add(SubType.WARRIOR); diff --git a/Mage.Sets/src/mage/cards/m/MaelstromArchangel.java b/Mage.Sets/src/mage/cards/m/MaelstromArchangel.java index 2970660722..1c644aab71 100644 --- a/Mage.Sets/src/mage/cards/m/MaelstromArchangel.java +++ b/Mage.Sets/src/mage/cards/m/MaelstromArchangel.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.FilterCard; import mage.filter.common.FilterNonlandCard; @@ -53,7 +54,7 @@ public class MaelstromArchangel extends CardImpl { public MaelstromArchangel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}{B}{R}{G}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MaelstromDjinn.java b/Mage.Sets/src/mage/cards/m/MaelstromDjinn.java index 95c21543ad..25ed49bda1 100644 --- a/Mage.Sets/src/mage/cards/m/MaelstromDjinn.java +++ b/Mage.Sets/src/mage/cards/m/MaelstromDjinn.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.VanishingUpkeepAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.counters.CounterType; @@ -53,7 +54,7 @@ public class MaelstromDjinn extends CardImpl { public MaelstromDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{7}{U}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/m/MaelstromWanderer.java b/Mage.Sets/src/mage/cards/m/MaelstromWanderer.java index 6579d59d05..7e0b2d9765 100644 --- a/Mage.Sets/src/mage/cards/m/MaelstromWanderer.java +++ b/Mage.Sets/src/mage/cards/m/MaelstromWanderer.java @@ -53,7 +53,7 @@ public class MaelstromWanderer extends CardImpl { public MaelstromWanderer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(7); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MagaTraitorToMortals.java b/Mage.Sets/src/mage/cards/m/MagaTraitorToMortals.java index cea2aba1c9..54b1e4f4dd 100644 --- a/Mage.Sets/src/mage/cards/m/MagaTraitorToMortals.java +++ b/Mage.Sets/src/mage/cards/m/MagaTraitorToMortals.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.counters.CounterType; import mage.target.TargetPlayer; @@ -51,8 +52,8 @@ public class MagaTraitorToMortals extends CardImpl { public MagaTraitorToMortals(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{X}{B}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MageIlVec.java b/Mage.Sets/src/mage/cards/m/MageIlVec.java index 3093360f47..aa9a1571c8 100644 --- a/Mage.Sets/src/mage/cards/m/MageIlVec.java +++ b/Mage.Sets/src/mage/cards/m/MageIlVec.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class MageIlVec extends CardImpl { public MageIlVec(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MageRingBully.java b/Mage.Sets/src/mage/cards/m/MageRingBully.java index 9b36c4f563..9f919f7869 100644 --- a/Mage.Sets/src/mage/cards/m/MageRingBully.java +++ b/Mage.Sets/src/mage/cards/m/MageRingBully.java @@ -29,11 +29,12 @@ package mage.cards.m; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class MageRingBully extends CardImpl { public MageRingBully(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -52,7 +53,7 @@ public class MageRingBully extends CardImpl { this.addAbility(new ProwessAbility()); // Mage-Ring Bully attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public MageRingBully(final MageRingBully card) { diff --git a/Mage.Sets/src/mage/cards/m/MageRingResponder.java b/Mage.Sets/src/mage/cards/m/MageRingResponder.java index 11b10396d7..2c35ab315f 100644 --- a/Mage.Sets/src/mage/cards/m/MageRingResponder.java +++ b/Mage.Sets/src/mage/cards/m/MageRingResponder.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; @@ -55,7 +56,7 @@ public class MageRingResponder extends CardImpl { public MageRingResponder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/m/MageSlayer.java b/Mage.Sets/src/mage/cards/m/MageSlayer.java index a433610ca5..5846113861 100644 --- a/Mage.Sets/src/mage/cards/m/MageSlayer.java +++ b/Mage.Sets/src/mage/cards/m/MageSlayer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -50,7 +51,7 @@ public class MageSlayer extends CardImpl { public MageSlayer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{R}{G}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Whenever equipped creature attacks, it deals damage equal to its power to defending player. this.addAbility(new AttacksAttachedTriggeredAbility(new MageSlayerEffect(), false)); diff --git a/Mage.Sets/src/mage/cards/m/MagebaneArmor.java b/Mage.Sets/src/mage/cards/m/MagebaneArmor.java index a91a22f9f6..74ed3cdbd5 100644 --- a/Mage.Sets/src/mage/cards/m/MagebaneArmor.java +++ b/Mage.Sets/src/mage/cards/m/MagebaneArmor.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class MagebaneArmor extends CardImpl { public MagebaneArmor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+4 and loses flying. this.addAbility(new MagebaneArmorAbility()); diff --git a/Mage.Sets/src/mage/cards/m/MagefireWings.java b/Mage.Sets/src/mage/cards/m/MagefireWings.java index 24aae58a82..4ba11539c1 100644 --- a/Mage.Sets/src/mage/cards/m/MagefireWings.java +++ b/Mage.Sets/src/mage/cards/m/MagefireWings.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class MagefireWings extends CardImpl { public MagefireWings (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); diff --git a/Mage.Sets/src/mage/cards/m/MagetaTheLion.java b/Mage.Sets/src/mage/cards/m/MagetaTheLion.java index 21f4975ef2..cc06630f48 100644 --- a/Mage.Sets/src/mage/cards/m/MagetaTheLion.java +++ b/Mage.Sets/src/mage/cards/m/MagetaTheLion.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DestroyAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterCard; @@ -62,8 +63,8 @@ public class MagetaTheLion extends CardImpl { public MagetaTheLion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MagetasBoon.java b/Mage.Sets/src/mage/cards/m/MagetasBoon.java index 3a649fb879..1669941544 100644 --- a/Mage.Sets/src/mage/cards/m/MagetasBoon.java +++ b/Mage.Sets/src/mage/cards/m/MagetasBoon.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class MagetasBoon extends CardImpl { public MagetasBoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/m/MagewrightsStone.java b/Mage.Sets/src/mage/cards/m/MagewrightsStone.java index b76c5710f4..77ebf02c95 100644 --- a/Mage.Sets/src/mage/cards/m/MagewrightsStone.java +++ b/Mage.Sets/src/mage/cards/m/MagewrightsStone.java @@ -27,7 +27,6 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageObject; import mage.abilities.Abilities; import mage.abilities.Ability; @@ -47,12 +46,14 @@ import mage.filter.predicate.Predicate; import mage.game.Game; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * @author BursegSardaukar */ public class MagewrightsStone extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that has an ability with {T} in its cost"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that has an activated ability with {T} in its cost"); static { filter.add(new HasAbilityWithTapSymbolPredicate()); diff --git a/Mage.Sets/src/mage/cards/m/MaggotCarrier.java b/Mage.Sets/src/mage/cards/m/MaggotCarrier.java index 5d3ba19e1f..20fdc9b3dd 100644 --- a/Mage.Sets/src/mage/cards/m/MaggotCarrier.java +++ b/Mage.Sets/src/mage/cards/m/MaggotCarrier.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.LoseLifeAllPlayersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class MaggotCarrier extends CardImpl { public MaggotCarrier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MaggotTherapy.java b/Mage.Sets/src/mage/cards/m/MaggotTherapy.java index 31d1a6725f..6c7f57fdb6 100644 --- a/Mage.Sets/src/mage/cards/m/MaggotTherapy.java +++ b/Mage.Sets/src/mage/cards/m/MaggotTherapy.java @@ -49,7 +49,7 @@ public class MaggotTherapy extends CardImpl { public MaggotTherapy(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/m/MagisterOfWorth.java b/Mage.Sets/src/mage/cards/m/MagisterOfWorth.java index 958c467260..9a48ccc438 100644 --- a/Mage.Sets/src/mage/cards/m/MagisterOfWorth.java +++ b/Mage.Sets/src/mage/cards/m/MagisterOfWorth.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -56,7 +57,7 @@ public class MagisterOfWorth extends CardImpl { public MagisterOfWorth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{B}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MagisterSphinx.java b/Mage.Sets/src/mage/cards/m/MagisterSphinx.java index a636ba9ab8..3f588ddb74 100644 --- a/Mage.Sets/src/mage/cards/m/MagisterSphinx.java +++ b/Mage.Sets/src/mage/cards/m/MagisterSphinx.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -49,7 +50,7 @@ public class MagisterSphinx extends CardImpl { public MagisterSphinx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{W}{U}{B}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MagmaGiant.java b/Mage.Sets/src/mage/cards/m/MagmaGiant.java index 80c03cabca..78bca9c1fb 100644 --- a/Mage.Sets/src/mage/cards/m/MagmaGiant.java +++ b/Mage.Sets/src/mage/cards/m/MagmaGiant.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageEverythingEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class MagmaGiant extends CardImpl { public MagmaGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MagmaPhoenix.java b/Mage.Sets/src/mage/cards/m/MagmaPhoenix.java index 13e8b0df32..056ed4c24d 100644 --- a/Mage.Sets/src/mage/cards/m/MagmaPhoenix.java +++ b/Mage.Sets/src/mage/cards/m/MagmaPhoenix.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -49,7 +50,7 @@ public class MagmaPhoenix extends CardImpl { public MagmaPhoenix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Phoenix"); + this.subtype.add(SubType.PHOENIX); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MagmaSliver.java b/Mage.Sets/src/mage/cards/m/MagmaSliver.java index 21d2b0cf56..01ad8dd828 100644 --- a/Mage.Sets/src/mage/cards/m/MagmaSliver.java +++ b/Mage.Sets/src/mage/cards/m/MagmaSliver.java @@ -56,7 +56,7 @@ public class MagmaSliver extends CardImpl { public MagmaSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/Magmaroth.java b/Mage.Sets/src/mage/cards/m/Magmaroth.java index 66774866b7..a6821c005a 100644 --- a/Mage.Sets/src/mage/cards/m/Magmaroth.java +++ b/Mage.Sets/src/mage/cards/m/Magmaroth.java @@ -9,6 +9,7 @@ import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.counters.CounterType; import mage.filter.FilterSpell; @@ -25,7 +26,7 @@ public class Magmaroth extends CardImpl{ public Magmaroth(UUID ownerId, CardSetInfo cardSetInfo){ super(ownerId, cardSetInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(5); toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/Magmasaur.java b/Mage.Sets/src/mage/cards/m/Magmasaur.java index 82fe68b611..5878c29ca6 100644 --- a/Mage.Sets/src/mage/cards/m/Magmasaur.java +++ b/Mage.Sets/src/mage/cards/m/Magmasaur.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; @@ -57,9 +58,9 @@ import mage.players.Player; public class Magmasaur extends CardImpl { public Magmasaur(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Lizard"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.DINOSAUR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MagmaticCore.java b/Mage.Sets/src/mage/cards/m/MagmaticCore.java new file mode 100644 index 0000000000..7cd7f3afcb --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MagmaticCore.java @@ -0,0 +1,78 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.CountersSourceCount; +import mage.abilities.effects.common.DamageMultiEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanentAmount; + +/** + * + * @author TheElk801 + */ +public class MagmaticCore extends CardImpl { + + public MagmaticCore(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{R}"); + + // Cumulative upkeep {1} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{1}"))); + + // At the beginning of your end step, Magmatic Core deals X damage divided as you choose among any number of target creatures, where X is the number of age counters on it. + DynamicValue value = new CountersSourceCount(CounterType.AGE); + Ability ability = new BeginningOfEndStepTriggeredAbility( + new DamageMultiEffect(value) + .setText("{this} deals X damage divided as you choose " + + "among any number of target creatures," + + " where X is the number of age counters on it."), + TargetController.YOU, false + ); + ability.addTarget(new TargetCreaturePermanentAmount(value)); + this.addAbility(ability); + } + + public MagmaticCore(final MagmaticCore card) { + super(card); + } + + @Override + public MagmaticCore copy() { + return new MagmaticCore(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MagmaticForce.java b/Mage.Sets/src/mage/cards/m/MagmaticForce.java index b2a94ebd43..b017368f30 100644 --- a/Mage.Sets/src/mage/cards/m/MagmaticForce.java +++ b/Mage.Sets/src/mage/cards/m/MagmaticForce.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -47,7 +48,7 @@ public class MagmaticForce extends CardImpl { public MagmaticForce(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/m/Magmaw.java b/Mage.Sets/src/mage/cards/m/Magmaw.java index dabf0ccc1f..a4a9ed2622 100644 --- a/Mage.Sets/src/mage/cards/m/Magmaw.java +++ b/Mage.Sets/src/mage/cards/m/Magmaw.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.Predicates; @@ -57,7 +58,7 @@ public class Magmaw extends CardImpl { public Magmaw(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MagnigothTreefolk.java b/Mage.Sets/src/mage/cards/m/MagnigothTreefolk.java index ca99b08a70..e1d470b1eb 100644 --- a/Mage.Sets/src/mage/cards/m/MagnigothTreefolk.java +++ b/Mage.Sets/src/mage/cards/m/MagnigothTreefolk.java @@ -58,7 +58,7 @@ public class MagnigothTreefolk extends CardImpl { public MagnigothTreefolk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(2); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/m/Magnivore.java b/Mage.Sets/src/mage/cards/m/Magnivore.java index ab19cc55be..550708147f 100644 --- a/Mage.Sets/src/mage/cards/m/Magnivore.java +++ b/Mage.Sets/src/mage/cards/m/Magnivore.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterCard; @@ -54,7 +55,7 @@ public class Magnivore extends CardImpl { public Magnivore(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Lhurgoyf"); + this.subtype.add(SubType.LHURGOYF); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheAbyss.java b/Mage.Sets/src/mage/cards/m/MagusOfTheAbyss.java index 0856dfd782..e9ac9a63f2 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheAbyss.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheAbyss.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -53,8 +54,8 @@ public class MagusOfTheAbyss extends CardImpl { public MagusOfTheAbyss(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheArena.java b/Mage.Sets/src/mage/cards/m/MagusOfTheArena.java index 79082571e4..170d16e373 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheArena.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheArena.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.FightTargetsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -54,8 +55,8 @@ public class MagusOfTheArena extends CardImpl { public MagusOfTheArena(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheBazaar.java b/Mage.Sets/src/mage/cards/m/MagusOfTheBazaar.java index a1600b05ae..6f13d313d3 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheBazaar.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheBazaar.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class MagusOfTheBazaar extends CardImpl { public MagusOfTheBazaar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheCandelabra.java b/Mage.Sets/src/mage/cards/m/MagusOfTheCandelabra.java index 2c189a48b5..d1a5c93b32 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheCandelabra.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheCandelabra.java @@ -38,22 +38,21 @@ import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetAdjustment; import mage.constants.Zone; import mage.filter.StaticFilters; -import mage.game.Game; -import mage.target.common.TargetLandPermanent; +import mage.target.TargetPermanent; /** * @author duncant */ public class MagusOfTheCandelabra extends CardImpl { - private final UUID originalId; - public MagusOfTheCandelabra(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); @@ -63,22 +62,13 @@ public class MagusOfTheCandelabra extends CardImpl { effect.setText("untap X target lands"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}")); ability.addCost(new TapSourceCost()); - originalId = ability.getOriginalId(); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_LANDS)); + ability.setTargetAdjustment(TargetAdjustment.X_TARGETS); this.addAbility(ability); } - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(originalId)){ - int xValue = ability.getManaCostsToPay().getX(); - ability.getTargets().clear(); - ability.addTarget(new TargetLandPermanent(xValue, xValue, StaticFilters.FILTER_LANDS, false)); - } - } - public MagusOfTheCandelabra(final MagusOfTheCandelabra card) { super(card); - this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheCoffers.java b/Mage.Sets/src/mage/cards/m/MagusOfTheCoffers.java index cb9d7e6eb4..086e5595f3 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheCoffers.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheCoffers.java @@ -56,8 +56,8 @@ public class MagusOfTheCoffers extends CardImpl { public MagusOfTheCoffers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheDisk.java b/Mage.Sets/src/mage/cards/m/MagusOfTheDisk.java index 77f6d72a54..abfea2f3a5 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheDisk.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheDisk.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DestroyAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; @@ -60,8 +61,8 @@ public class MagusOfTheDisk extends CardImpl { public MagusOfTheDisk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheFuture.java b/Mage.Sets/src/mage/cards/m/MagusOfTheFuture.java index bbc107ce7f..dbe0b871bd 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheFuture.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheFuture.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.PlayWithTheTopCardRevealedEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class MagusOfTheFuture extends CardImpl { public MagusOfTheFuture(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheJar.java b/Mage.Sets/src/mage/cards/m/MagusOfTheJar.java index 221cf6a6b3..52f8960a49 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheJar.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheJar.java @@ -1,197 +1,198 @@ -/* - * 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.cards.m; - -import java.util.Iterator; -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.DelayedTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.SacrificeSourceCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.players.Player; - -/** - * - * @author HCrescent - */ -public class MagusOfTheJar extends CardImpl { - - public MagusOfTheJar(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); - - this.subtype.add("Human"); - this.subtype.add("Wizard"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // {tap}, Sacrifice Magus of the Jar: Each player exiles all cards from his or her hand face down and draws seven cards. At the beginning of the next end step, each player discards his or her hand and returns to his or her hand each card he or she exiled this way. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MagusoftheJarEffect(), new TapSourceCost()); - ability.addCost(new SacrificeSourceCost()); - this.addAbility(ability); - - } - - public MagusOfTheJar(final MagusOfTheJar card) { - super(card); - } - - @Override - public MagusOfTheJar copy() { - return new MagusOfTheJar(this); - } -} - -class MagusoftheJarEffect extends OneShotEffect { - - public MagusoftheJarEffect() { - super(Outcome.DrawCard); - staticText = "Each player exiles all cards from his or her hand face down and draws seven cards. At the beginning of the next end step, each player discards his or her hand and returns to his or her hand each card he or she exiled this way."; - } - - public MagusoftheJarEffect(final MagusoftheJarEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Cards cards = new CardsImpl(); - //Exile hand - for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { - Player player = game.getPlayer(playerId); - if (player != null) { - Cards hand = player.getHand(); - while (!hand.isEmpty()) { - Card card = hand.get(hand.iterator().next(), game); - if (card != null) { - card.moveToExile(getId(), "Magus of the Jar", source.getSourceId(), game); - card.setFaceDown(true, game); - cards.add(card); - } - } - } - } - //Draw 7 cards - for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { - Player player = game.getPlayer(playerId); - if (player != null) { - player.drawCards(7, game); - } - } - //Delayed ability - Effect effect = new MagusoftheJarDelayedEffect(); - effect.setValue("MagusoftheJarCards", cards); - game.addDelayedTriggeredAbility(new MagusoftheJarDelayedTriggeredAbility(effect), source); - return true; - } - - @Override - public MagusoftheJarEffect copy() { - return new MagusoftheJarEffect(this); - } -} - -class MagusoftheJarDelayedEffect extends OneShotEffect { - - public MagusoftheJarDelayedEffect() { - super(Outcome.DrawCard); - staticText = "At the beginning of the next end step, each player discards his or her hand and returns to his or her hand each card he or she exiled this way"; - } - - public MagusoftheJarDelayedEffect(final MagusoftheJarDelayedEffect effect) { - super(effect); - } - - @Override - public MagusoftheJarDelayedEffect copy() { - return new MagusoftheJarDelayedEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Cards cards = (Cards) this.getValue("MagusoftheJarCards"); - - if (cards != null) { - //Discard - for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { - Player player = game.getPlayer(playerId); - if (player != null) { - player.discard(player.getHand().size(), false, source, game); - } - } - //Return to hand - for (Iterator it = cards.getCards(game).iterator(); it.hasNext();) { - Card card = it.next(); - card.moveToZone(Zone.HAND, source.getSourceId(), game, true); - } - return true; - } - return false; - } - -} - -class MagusoftheJarDelayedTriggeredAbility extends DelayedTriggeredAbility { - - public MagusoftheJarDelayedTriggeredAbility(Effect effect) { - super(effect); - } - - public MagusoftheJarDelayedTriggeredAbility(final MagusoftheJarDelayedTriggeredAbility ability) { - super(ability); - } - - @Override - public MagusoftheJarDelayedTriggeredAbility copy() { - return new MagusoftheJarDelayedTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.END_TURN_STEP_PRE; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - return true; - } - -} +/* + * 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.cards.m; + +import java.util.Iterator; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.players.Player; + +/** + * + * @author HCrescent + */ +public class MagusOfTheJar extends CardImpl { + + public MagusOfTheJar(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {tap}, Sacrifice Magus of the Jar: Each player exiles all cards from his or her hand face down and draws seven cards. At the beginning of the next end step, each player discards his or her hand and returns to his or her hand each card he or she exiled this way. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MagusoftheJarEffect(), new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + + } + + public MagusOfTheJar(final MagusOfTheJar card) { + super(card); + } + + @Override + public MagusOfTheJar copy() { + return new MagusOfTheJar(this); + } +} + +class MagusoftheJarEffect extends OneShotEffect { + + public MagusoftheJarEffect() { + super(Outcome.DrawCard); + staticText = "Each player exiles all cards from his or her hand face down and draws seven cards. At the beginning of the next end step, each player discards his or her hand and returns to his or her hand each card he or she exiled this way."; + } + + public MagusoftheJarEffect(final MagusoftheJarEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Cards cards = new CardsImpl(); + //Exile hand + for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + Cards hand = player.getHand(); + while (!hand.isEmpty()) { + Card card = hand.get(hand.iterator().next(), game); + if (card != null) { + card.moveToExile(getId(), "Magus of the Jar", source.getSourceId(), game); + card.setFaceDown(true, game); + cards.add(card); + } + } + } + } + //Draw 7 cards + for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + player.drawCards(7, game); + } + } + //Delayed ability + Effect effect = new MagusoftheJarDelayedEffect(); + effect.setValue("MagusoftheJarCards", cards); + game.addDelayedTriggeredAbility(new MagusoftheJarDelayedTriggeredAbility(effect), source); + return true; + } + + @Override + public MagusoftheJarEffect copy() { + return new MagusoftheJarEffect(this); + } +} + +class MagusoftheJarDelayedEffect extends OneShotEffect { + + public MagusoftheJarDelayedEffect() { + super(Outcome.DrawCard); + staticText = "At the beginning of the next end step, each player discards his or her hand and returns to his or her hand each card he or she exiled this way"; + } + + public MagusoftheJarDelayedEffect(final MagusoftheJarDelayedEffect effect) { + super(effect); + } + + @Override + public MagusoftheJarDelayedEffect copy() { + return new MagusoftheJarDelayedEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Cards cards = (Cards) this.getValue("MagusoftheJarCards"); + + if (cards != null) { + //Discard + for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + player.discard(player.getHand().size(), false, source, game); + } + } + //Return to hand + for (Iterator it = cards.getCards(game).iterator(); it.hasNext();) { + Card card = it.next(); + card.moveToZone(Zone.HAND, source.getSourceId(), game, true); + } + return true; + } + return false; + } + +} + +class MagusoftheJarDelayedTriggeredAbility extends DelayedTriggeredAbility { + + public MagusoftheJarDelayedTriggeredAbility(Effect effect) { + super(effect); + } + + public MagusoftheJarDelayedTriggeredAbility(final MagusoftheJarDelayedTriggeredAbility ability) { + super(ability); + } + + @Override + public MagusoftheJarDelayedTriggeredAbility copy() { + return new MagusoftheJarDelayedTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.END_TURN_STEP_PRE; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return true; + } + +} diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheLibrary.java b/Mage.Sets/src/mage/cards/m/MagusOfTheLibrary.java index 462151e3a2..756a0a2a80 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheLibrary.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheLibrary.java @@ -37,6 +37,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class MagusOfTheLibrary extends CardImpl { public MagusOfTheLibrary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheMind.java b/Mage.Sets/src/mage/cards/m/MagusOfTheMind.java index eff7793c91..69594e1e54 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheMind.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheMind.java @@ -44,6 +44,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -61,8 +62,8 @@ public class MagusOfTheMind extends CardImpl { public MagusOfTheMind(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheMirror.java b/Mage.Sets/src/mage/cards/m/MagusOfTheMirror.java index 791b1cdb98..13baec7514 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheMirror.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheMirror.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ExchangeLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.PhaseStep; import mage.constants.Zone; import mage.target.common.TargetOpponent; @@ -50,8 +51,8 @@ public class MagusOfTheMirror extends CardImpl { public MagusOfTheMirror(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheMoat.java b/Mage.Sets/src/mage/cards/m/MagusOfTheMoat.java index dbd3f49ad0..8e6915977f 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheMoat.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheMoat.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -54,8 +55,8 @@ public class MagusOfTheMoat extends CardImpl { public MagusOfTheMoat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheMoon.java b/Mage.Sets/src/mage/cards/m/MagusOfTheMoon.java index 5b894a2d6d..6d358863fb 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheMoon.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheMoon.java @@ -56,8 +56,8 @@ public class MagusOfTheMoon extends CardImpl { public MagusOfTheMoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -106,7 +106,7 @@ public class MagusOfTheMoon extends CardImpl { // So the ability removing has to be done before Layer 6 land.removeAllAbilities(source.getSourceId(), game); land.getSubtype(game).removeAll(SubType.getLandTypes(false)); - land.getSubtype(game).add("Mountain"); + land.getSubtype(game).add(SubType.MOUNTAIN); break; case AbilityAddingRemovingEffects_6: land.addAbility(new RedManaAbility(), source.getSourceId(), game); diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheScroll.java b/Mage.Sets/src/mage/cards/m/MagusOfTheScroll.java index 4de52b4a1a..aab52ad541 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheScroll.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheScroll.java @@ -42,6 +42,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,9 +57,9 @@ import mage.target.common.TargetCreatureOrPlayer; public class MagusOfTheScroll extends CardImpl { public MagusOfTheScroll(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -84,7 +85,7 @@ class MagusOfTheScrollEffect extends OneShotEffect { public MagusOfTheScrollEffect() { super(Outcome.Neutral); - staticText = "Reveal a card at random from your hand. If it's the named card, {this} deals 2 damage to target creature or player"; + staticText = ", then reveal a card at random from your hand. If it's the named card, {this} deals 2 damage to target creature or player"; } public MagusOfTheScrollEffect(final MagusOfTheScrollEffect effect) { @@ -125,4 +126,4 @@ class MagusOfTheScrollEffect extends OneShotEffect { public MagusOfTheScrollEffect copy() { return new MagusOfTheScrollEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheTabernacle.java b/Mage.Sets/src/mage/cards/m/MagusOfTheTabernacle.java index 09ededc677..0fdd344d1e 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheTabernacle.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheTabernacle.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.GainAbilityAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -49,12 +50,12 @@ import mage.filter.StaticFilters; */ public class MagusOfTheTabernacle extends CardImpl { - static private final String rule = "All creatures have \"At the beginning of your upkeep, sacrifice this creature unless you pay {1}\""; + static private final String rule = "All creatures have \"At the beginning of your upkeep, sacrifice this creature unless you pay {1}.\""; public MagusOfTheTabernacle(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.color.setWhite(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheUnseen.java b/Mage.Sets/src/mage/cards/m/MagusOfTheUnseen.java index d802b68a8e..bb561dd1d9 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheUnseen.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheUnseen.java @@ -44,6 +44,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -67,8 +68,8 @@ public class MagusOfTheUnseen extends CardImpl { public MagusOfTheUnseen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheVineyard.java b/Mage.Sets/src/mage/cards/m/MagusOfTheVineyard.java index d9b0efc9cd..3a6cc09124 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheVineyard.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheVineyard.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.AddManaToManaPoolTargetControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -46,8 +47,8 @@ public class MagusOfTheVineyard extends CardImpl { public MagusOfTheVineyard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheWheel.java b/Mage.Sets/src/mage/cards/m/MagusOfTheWheel.java index f59f9775aa..2a90b3896a 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheWheel.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheWheel.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.discard.DiscardHandAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -50,8 +51,8 @@ public class MagusOfTheWheel extends CardImpl { public MagusOfTheWheel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheWill.java b/Mage.Sets/src/mage/cards/m/MagusOfTheWill.java index aec58ccc07..93661d6a64 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheWill.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheWill.java @@ -40,6 +40,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -61,8 +62,8 @@ public class MagusOfTheWill extends CardImpl { public MagusOfTheWill(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MahamotiDjinn.java b/Mage.Sets/src/mage/cards/m/MahamotiDjinn.java index 0b15ac678f..d7ec3717f8 100644 --- a/Mage.Sets/src/mage/cards/m/MahamotiDjinn.java +++ b/Mage.Sets/src/mage/cards/m/MahamotiDjinn.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class MahamotiDjinn extends CardImpl { public MahamotiDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/m/MaintenanceDroid.java b/Mage.Sets/src/mage/cards/m/MaintenanceDroid.java index d609df426f..04685f33c5 100644 --- a/Mage.Sets/src/mage/cards/m/MaintenanceDroid.java +++ b/Mage.Sets/src/mage/cards/m/MaintenanceDroid.java @@ -1,145 +1,146 @@ -/* - * 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.cards.m; - -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.abilities.effects.common.counter.RemoveCounterTargetEffect; -import mage.abilities.keyword.RepairAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.choices.Choice; -import mage.choices.ChoiceImpl; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.counters.CounterType; -import mage.filter.FilterCard; -import mage.filter.predicate.other.CounterCardPredicate; -import mage.game.Game; -import mage.players.Player; -import mage.target.common.TargetCardInYourGraveyard; - -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; - -/** - * - * @author Styxo - */ -public class MaintenanceDroid extends CardImpl { - - private static final FilterCard filter = new FilterCard("target card you own with a repair counter on it"); - - static { - filter.add(new CounterCardPredicate(CounterType.REPAIR)); - } - - public MaintenanceDroid(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{W}{U}"); - this.subtype.add("Droid"); - this.power = new MageInt(1); - this.toughness = new MageInt(2); - - // {T}: Choose target card you own with a repair counter on it. You may remove a repair counter from it or put another repair counter on it. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MaintenanceDroidEffect(), new TapSourceCost()); - ability.addTarget(new TargetCardInYourGraveyard(filter)); - this.addAbility(ability); - - // Repair 4 - this.addAbility(new RepairAbility(4)); - } - - public MaintenanceDroid(final MaintenanceDroid card) { - super(card); - } - - @Override - public MaintenanceDroid copy() { - return new MaintenanceDroid(this); - } -} - -class MaintenanceDroidEffect extends OneShotEffect { - - private static final Set choices = new HashSet<>(); - - static { - choices.add("Remove a repair counter"); - choices.add("Add another repair counter"); - } - - public MaintenanceDroidEffect() { - super(Outcome.BoostCreature); - staticText = "Choose target card you own with a repair counter on it. You may remove a repair counter from it or put another repair counter on it"; - } - - public MaintenanceDroidEffect(final MaintenanceDroidEffect effect) { - super(effect); - } - - @Override - public MaintenanceDroidEffect copy() { - return new MaintenanceDroidEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Choice choice = new ChoiceImpl(true); - choice.setMessage("Choose mode"); - choice.setChoices(choices); - while (!controller.choose(outcome, choice, game)) { - if (!controller.canRespond()) { - return false; - } - } - - String chosen = choice.getChoice(); - switch (chosen) { - case "Remove a repair counter": - new RemoveCounterTargetEffect(CounterType.REPAIR.createInstance()).apply(game, source); - break; - default: //"Add another repair counter" - new AddCountersTargetEffect(CounterType.REPAIR.createInstance()).apply(game, source); - break; - } - return true; - - } - - return false; - } - -} +/* + * 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.cards.m; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.effects.common.counter.RemoveCounterTargetEffect; +import mage.abilities.keyword.RepairAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.FilterCard; +import mage.filter.predicate.other.CounterCardPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInYourGraveyard; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + +/** + * + * @author Styxo + */ +public class MaintenanceDroid extends CardImpl { + + private static final FilterCard filter = new FilterCard("target card you own with a repair counter on it"); + + static { + filter.add(new CounterCardPredicate(CounterType.REPAIR)); + } + + public MaintenanceDroid(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{W}{U}"); + this.subtype.add(SubType.DROID); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {T}: Choose target card you own with a repair counter on it. You may remove a repair counter from it or put another repair counter on it. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MaintenanceDroidEffect(), new TapSourceCost()); + ability.addTarget(new TargetCardInYourGraveyard(filter)); + this.addAbility(ability); + + // Repair 4 + this.addAbility(new RepairAbility(4)); + } + + public MaintenanceDroid(final MaintenanceDroid card) { + super(card); + } + + @Override + public MaintenanceDroid copy() { + return new MaintenanceDroid(this); + } +} + +class MaintenanceDroidEffect extends OneShotEffect { + + private static final Set choices = new HashSet<>(); + + static { + choices.add("Remove a repair counter"); + choices.add("Add another repair counter"); + } + + public MaintenanceDroidEffect() { + super(Outcome.BoostCreature); + staticText = "Choose target card you own with a repair counter on it. You may remove a repair counter from it or put another repair counter on it"; + } + + public MaintenanceDroidEffect(final MaintenanceDroidEffect effect) { + super(effect); + } + + @Override + public MaintenanceDroidEffect copy() { + return new MaintenanceDroidEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Choice choice = new ChoiceImpl(true); + choice.setMessage("Choose mode"); + choice.setChoices(choices); + while (!controller.choose(outcome, choice, game)) { + if (!controller.canRespond()) { + return false; + } + } + + String chosen = choice.getChoice(); + switch (chosen) { + case "Remove a repair counter": + new RemoveCounterTargetEffect(CounterType.REPAIR.createInstance()).apply(game, source); + break; + default: //"Add another repair counter" + new AddCountersTargetEffect(CounterType.REPAIR.createInstance()).apply(game, source); + break; + } + return true; + + } + + return false; + } + +} diff --git a/Mage.Sets/src/mage/cards/m/MaintenanceHangar.java b/Mage.Sets/src/mage/cards/m/MaintenanceHangar.java index 99cfb25ee6..c22a64b03b 100644 --- a/Mage.Sets/src/mage/cards/m/MaintenanceHangar.java +++ b/Mage.Sets/src/mage/cards/m/MaintenanceHangar.java @@ -1,151 +1,151 @@ -/* - * 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.cards.m; - -import java.util.Set; -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.ContinuousEffectImpl; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; -import mage.abilities.keyword.RepairAbility; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.*; -import mage.filter.common.FilterCreatureCard; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.Game; -import mage.players.Player; - -/** - * - * @author Styxo - */ -public class MaintenanceHangar extends CardImpl { - - private static final FilterCreaturePermanent filterPermanent = new FilterCreaturePermanent("Starship creatures"); - - static { - filterPermanent.add(new SubtypePredicate(SubType.STARSHIP)); - } - - public MaintenanceHangar(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - - // At the beginning of your upkeep, remove an additional repair counter from each card in your graveyard. - this.addAbility(new BeginningOfUpkeepTriggeredAbility(new RemoveCounterMaintenanceHangarEffect(), TargetController.YOU, false)); - - // Starship creatures you control and starship creatures in your graveyard have Repair 6. - Effect effect = new GainAbilityControlledEffect(new RepairAbility(6), Duration.WhileOnBattlefield, filterPermanent); - effect.setText("Starship creatures you control"); - Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); - ability.addEffect(new MaintenanceHangarEffect()); - this.addAbility(ability); - } - - public MaintenanceHangar(final MaintenanceHangar card) { - super(card); - } - - @Override - public MaintenanceHangar copy() { - return new MaintenanceHangar(this); - } -} - -class RemoveCounterMaintenanceHangarEffect extends OneShotEffect { - - public RemoveCounterMaintenanceHangarEffect() { - super(Outcome.Detriment); - staticText = "remove an additional repair counter from each card in your graveyard"; - } - - public RemoveCounterMaintenanceHangarEffect(final RemoveCounterMaintenanceHangarEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - for (Card card : controller.getGraveyard().getCards(game)) { - if (card.getCounters(game).getCount("repair") > 0) { - card.removeCounters("repair", 1, game); - } - } - return true; - } - return false; - } - - @Override - public RemoveCounterMaintenanceHangarEffect copy() { - return new RemoveCounterMaintenanceHangarEffect(this); - } -} - -class MaintenanceHangarEffect extends ContinuousEffectImpl { - - private static final FilterCreatureCard filterCard = new FilterCreatureCard("Starship creatures"); - - static { - filterCard.add(new SubtypePredicate(SubType.STARSHIP)); - } - - public MaintenanceHangarEffect() { - super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); - this.staticText = "and starship creatures in your graveyard have Repair 6"; - } - - public MaintenanceHangarEffect(final MaintenanceHangarEffect effect) { - super(effect); - } - - @Override - public MaintenanceHangarEffect copy() { - return new MaintenanceHangarEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Set cards = controller.getGraveyard().getCards(filterCard, game); - cards.stream().forEach((card) -> { - game.getState().addOtherAbility(card, new RepairAbility(6)); - }); - return true; - } - return false; - } -} +/* + * 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.cards.m; + +import java.util.Set; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.RepairAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.common.FilterCreatureCard; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author Styxo + */ +public class MaintenanceHangar extends CardImpl { + + private static final FilterCreaturePermanent filterPermanent = new FilterCreaturePermanent("Starship creatures"); + + static { + filterPermanent.add(new SubtypePredicate(SubType.STARSHIP)); + } + + public MaintenanceHangar(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); + + // At the beginning of your upkeep, remove an additional repair counter from each card in your graveyard. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new RemoveCounterMaintenanceHangarEffect(), TargetController.YOU, false)); + + // Starship creatures you control and starship creatures in your graveyard have Repair 6. + Effect effect = new GainAbilityControlledEffect(new RepairAbility(6), Duration.WhileOnBattlefield, filterPermanent); + effect.setText("Starship creatures you control"); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); + ability.addEffect(new MaintenanceHangarEffect()); + this.addAbility(ability); + } + + public MaintenanceHangar(final MaintenanceHangar card) { + super(card); + } + + @Override + public MaintenanceHangar copy() { + return new MaintenanceHangar(this); + } +} + +class RemoveCounterMaintenanceHangarEffect extends OneShotEffect { + + public RemoveCounterMaintenanceHangarEffect() { + super(Outcome.Detriment); + staticText = "remove an additional repair counter from each card in your graveyard"; + } + + public RemoveCounterMaintenanceHangarEffect(final RemoveCounterMaintenanceHangarEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (Card card : controller.getGraveyard().getCards(game)) { + if (card.getCounters(game).getCount("repair") > 0) { + card.removeCounters("repair", 1, game); + } + } + return true; + } + return false; + } + + @Override + public RemoveCounterMaintenanceHangarEffect copy() { + return new RemoveCounterMaintenanceHangarEffect(this); + } +} + +class MaintenanceHangarEffect extends ContinuousEffectImpl { + + private static final FilterCreatureCard filterCard = new FilterCreatureCard("Starship creatures"); + + static { + filterCard.add(new SubtypePredicate(SubType.STARSHIP)); + } + + public MaintenanceHangarEffect() { + super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); + this.staticText = "and starship creatures in your graveyard have Repair 6"; + } + + public MaintenanceHangarEffect(final MaintenanceHangarEffect effect) { + super(effect); + } + + @Override + public MaintenanceHangarEffect copy() { + return new MaintenanceHangarEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Set cards = controller.getGraveyard().getCards(filterCard, game); + cards.stream().forEach((card) -> { + game.getState().addOtherAbility(card, new RepairAbility(6)); + }); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/m/MairsilThePretender.java b/Mage.Sets/src/mage/cards/m/MairsilThePretender.java index 1002c53067..1265793027 100644 --- a/Mage.Sets/src/mage/cards/m/MairsilThePretender.java +++ b/Mage.Sets/src/mage/cards/m/MairsilThePretender.java @@ -27,33 +27,26 @@ */ package mage.cards.m; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Optional; -import java.util.Set; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.ActivatedAbility; +import mage.abilities.ActivatedAbilityImpl; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousEffectImpl; -import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; -import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; import mage.constants.SubLayer; import mage.constants.SuperType; import mage.constants.TargetController; -import mage.constants.WatcherScope; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.FilterCard; @@ -62,15 +55,11 @@ import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.other.CounterCardPredicate; import mage.filter.predicate.other.OwnerPredicate; import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.ZoneChangeEvent; import mage.game.permanent.Permanent; -import mage.game.stack.StackAbility; import mage.players.Player; import mage.target.Target; import mage.target.common.TargetCardInHand; import mage.target.common.TargetCardInYourGraveyard; -import mage.watchers.Watcher; /** * @@ -82,8 +71,8 @@ public class MairsilThePretender extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -92,8 +81,7 @@ public class MairsilThePretender extends CardImpl { // Mairsil, the Pretender has all activated abilities of all cards you own in exile with cage counters on them. You may activate each of those abilities only once each turn. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new MairsilThePretenderGainAbilitiesEffect()); - ability.addEffect(new MairsilThePretenderRuleModifyingEffect()); - this.addAbility(ability, new MairsilThePretenderWatcher()); + this.addAbility(ability); } public MairsilThePretender(final MairsilThePretender card) { @@ -181,11 +169,8 @@ class MairsilThePretenderGainAbilitiesEffect extends ContinuousEffectImpl { if (filter.match(card, game)) { for (Ability ability : card.getAbilities()) { if (ability instanceof ActivatedAbility) { - UUID originaId = ability.getId(); - ActivatedAbility copyAbility = (ActivatedAbility) ability.copy(); - Effect effect = new DoNothingEffect(); - effect.setValue("key", originaId); - copyAbility.addEffect(effect); + ActivatedAbilityImpl copyAbility = (ActivatedAbilityImpl) ability.copy(); + copyAbility.setMaxActivationsPerTurn(1); perm.addAbility(copyAbility, card.getId(), game); } } @@ -201,135 +186,3 @@ class MairsilThePretenderGainAbilitiesEffect extends ContinuousEffectImpl { return new MairsilThePretenderGainAbilitiesEffect(this); } } - -class MairsilThePretenderWatcher extends Watcher { - - public final Map> activatedThisTurnAbilities = new HashMap<>(); - - public MairsilThePretenderWatcher() { - super(MairsilThePretenderWatcher.class.getSimpleName(), WatcherScope.GAME); - } - - public MairsilThePretenderWatcher(final MairsilThePretenderWatcher watcher) { - super(watcher); - for (Entry> entry : watcher.activatedThisTurnAbilities.entrySet()) { - activatedThisTurnAbilities.put(entry.getKey(), entry.getValue()); - } - } - - @Override - public void watch(GameEvent event, Game game) { - if (event.getType() == GameEvent.EventType.ZONE_CHANGE && event instanceof ZoneChangeEvent) { - ZoneChangeEvent zEvent = (ZoneChangeEvent) event; - if (zEvent.getFromZone() == Zone.BATTLEFIELD) { - Permanent permanent = zEvent.getTarget(); - if (permanent != null) { - this.activatedThisTurnAbilities.remove(permanent.getId()); - } - } - } - if (event.getType() == GameEvent.EventType.ACTIVATED_ABILITY) { - Set permAbilities; - if (activatedThisTurnAbilities.keySet().contains(event.getSourceId())) { - permAbilities = activatedThisTurnAbilities.get(event.getSourceId()); - } else { - permAbilities = new HashSet<>(); - } - StackAbility ability = (StackAbility) game.getStack().getStackObject(event.getSourceId()); - if (ability != null && ability.getStackAbility().isActivated()) { - for (Effect effect : ability.getAllEffects()) { - if (effect instanceof DoNothingEffect) { - permAbilities.add((UUID) effect.getValue("key")); - this.activatedThisTurnAbilities.put(event.getSourceId(), permAbilities); - } - } - } - } - } - - @Override - public void reset() { - activatedThisTurnAbilities.clear(); - } - - public Map> getActivatedThisTurnAbilities() { - return this.activatedThisTurnAbilities; - } - - @Override - public MairsilThePretenderWatcher copy() { - return new MairsilThePretenderWatcher(this); - } - -} - -class MairsilThePretenderRuleModifyingEffect extends ContinuousRuleModifyingEffectImpl { - - public MairsilThePretenderRuleModifyingEffect() { - super(Duration.WhileOnBattlefield, Outcome.Detriment); - } - - public MairsilThePretenderRuleModifyingEffect(final MairsilThePretenderRuleModifyingEffect effect) { - super(effect); - } - - @Override - public MairsilThePretenderRuleModifyingEffect copy() { - return new MairsilThePretenderRuleModifyingEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } - - @Override - public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.ACTIVATE_ABILITY; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - Optional ability = game.getAbility(event.getTargetId(), event.getSourceId()); - MairsilThePretenderWatcher watcher = (MairsilThePretenderWatcher) game.getState().getWatchers().get(MairsilThePretenderWatcher.class.getSimpleName()); - if (watcher != null && ability != null && ability.isPresent()) { - for (Effect effect : ability.get().getAllEffects()) { - if (effect instanceof DoNothingEffect) { - UUID originalID = (UUID) effect.getValue("key"); - if (watcher.getActivatedThisTurnAbilities().keySet().contains(event.getSourceId())) { - if (watcher.getActivatedThisTurnAbilities().get(event.getSourceId()).contains(originalID)) { - return true; - } - } - } - } - } - return false; - } - - @Override - public String getInfoMessage(Ability source, GameEvent event, Game game) { - return "This ability can only be activated once each turn."; - } -} - -class DoNothingEffect extends OneShotEffect { - - DoNothingEffect() { - super(Outcome.Neutral); - } - - DoNothingEffect(final DoNothingEffect effect) { - super(effect); - } - - @Override - public DoNothingEffect copy() { - return new DoNothingEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } -} diff --git a/Mage.Sets/src/mage/cards/m/MajesticMyriarch.java b/Mage.Sets/src/mage/cards/m/MajesticMyriarch.java index 506126d24e..eb20db682b 100644 --- a/Mage.Sets/src/mage/cards/m/MajesticMyriarch.java +++ b/Mage.Sets/src/mage/cards/m/MajesticMyriarch.java @@ -54,6 +54,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -71,7 +72,7 @@ public class MajesticMyriarch extends CardImpl { public MajesticMyriarch(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); - this.subtype.add("Chimera"); + this.subtype.add(SubType.CHIMERA); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MajorTeroh.java b/Mage.Sets/src/mage/cards/m/MajorTeroh.java index 904845127d..a917efc3c5 100644 --- a/Mage.Sets/src/mage/cards/m/MajorTeroh.java +++ b/Mage.Sets/src/mage/cards/m/MajorTeroh.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -58,8 +59,8 @@ public class MajorTeroh extends CardImpl { public MajorTeroh(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MakeshiftMauler.java b/Mage.Sets/src/mage/cards/m/MakeshiftMauler.java index e0658e561c..505d82b3ae 100644 --- a/Mage.Sets/src/mage/cards/m/MakeshiftMauler.java +++ b/Mage.Sets/src/mage/cards/m/MakeshiftMauler.java @@ -33,6 +33,7 @@ import mage.abilities.costs.common.ExileFromGraveCost; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; @@ -44,8 +45,8 @@ public class MakeshiftMauler extends CardImpl { public MakeshiftMauler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MakeshiftMunitions.java b/Mage.Sets/src/mage/cards/m/MakeshiftMunitions.java new file mode 100644 index 0000000000..2be6c83d59 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MakeshiftMunitions.java @@ -0,0 +1,83 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author TheElk801 + */ +public class MakeshiftMunitions extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("artifact or creature"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.CREATURE) + )); + } + + public MakeshiftMunitions(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + + // {1}, Sacrifice an artifact or creature: Makeshift Munitions deals 1 damage to target creature or player. + Ability ability = new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new DamageTargetEffect(1), + new SacrificeTargetCost(new TargetControlledPermanent(filter)) + ); + ability.addTarget(new TargetCreatureOrPlayer()); + ability.addCost(new GenericManaCost(1)); + this.addAbility(ability); + } + + public MakeshiftMunitions(final MakeshiftMunitions card) { + super(card); + } + + @Override + public MakeshiftMunitions copy() { + return new MakeshiftMunitions(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MakindiAeronaut.java b/Mage.Sets/src/mage/cards/m/MakindiAeronaut.java index 51cada1b60..e84f5a9856 100644 --- a/Mage.Sets/src/mage/cards/m/MakindiAeronaut.java +++ b/Mage.Sets/src/mage/cards/m/MakindiAeronaut.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,9 +43,9 @@ public class MakindiAeronaut extends CardImpl { public MakindiAeronaut(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Scout"); - this.subtype.add("Ally"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SCOUT); + this.subtype.add(SubType.ALLY); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MakindiGriffin.java b/Mage.Sets/src/mage/cards/m/MakindiGriffin.java index 67fdfb155c..bee6220a80 100644 --- a/Mage.Sets/src/mage/cards/m/MakindiGriffin.java +++ b/Mage.Sets/src/mage/cards/m/MakindiGriffin.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class MakindiGriffin extends CardImpl { public MakindiGriffin (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MakindiPatrol.java b/Mage.Sets/src/mage/cards/m/MakindiPatrol.java index 2c7c72f9b1..b1d7a40aef 100644 --- a/Mage.Sets/src/mage/cards/m/MakindiPatrol.java +++ b/Mage.Sets/src/mage/cards/m/MakindiPatrol.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterControlledCreaturePermanent; @@ -46,9 +47,9 @@ public class MakindiPatrol extends CardImpl { public MakindiPatrol(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MakindiShieldmate.java b/Mage.Sets/src/mage/cards/m/MakindiShieldmate.java index 10e6d980f5..c6f9212e31 100644 --- a/Mage.Sets/src/mage/cards/m/MakindiShieldmate.java +++ b/Mage.Sets/src/mage/cards/m/MakindiShieldmate.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,9 +46,9 @@ public class MakindiShieldmate extends CardImpl { public MakindiShieldmate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Soldier"); - this.subtype.add("Ally"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ALLY); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MakindiSliderunner.java b/Mage.Sets/src/mage/cards/m/MakindiSliderunner.java index c71a0c5b0c..051715953b 100644 --- a/Mage.Sets/src/mage/cards/m/MakindiSliderunner.java +++ b/Mage.Sets/src/mage/cards/m/MakindiSliderunner.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,7 +46,7 @@ public class MakindiSliderunner extends CardImpl { public MakindiSliderunner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MalachOfTheDawn.java b/Mage.Sets/src/mage/cards/m/MalachOfTheDawn.java index 2fb9ede47a..e21480e46e 100644 --- a/Mage.Sets/src/mage/cards/m/MalachOfTheDawn.java +++ b/Mage.Sets/src/mage/cards/m/MalachOfTheDawn.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class MalachOfTheDawn extends CardImpl { public MalachOfTheDawn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MalachiteGolem.java b/Mage.Sets/src/mage/cards/m/MalachiteGolem.java index 6bfef5d335..406e925c1d 100644 --- a/Mage.Sets/src/mage/cards/m/MalachiteGolem.java +++ b/Mage.Sets/src/mage/cards/m/MalachiteGolem.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class MalachiteGolem extends CardImpl { public MalachiteGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(5); this.toughness = new MageInt(3); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{1}{G}"))); diff --git a/Mage.Sets/src/mage/cards/m/MalakirBloodwitch.java b/Mage.Sets/src/mage/cards/m/MalakirBloodwitch.java index 988b32a68d..93279a028a 100644 --- a/Mage.Sets/src/mage/cards/m/MalakirBloodwitch.java +++ b/Mage.Sets/src/mage/cards/m/MalakirBloodwitch.java @@ -54,8 +54,8 @@ public class MalakirBloodwitch extends CardImpl { public MalakirBloodwitch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MalakirCullblade.java b/Mage.Sets/src/mage/cards/m/MalakirCullblade.java index bc5aad1b3e..e9eb7979ce 100644 --- a/Mage.Sets/src/mage/cards/m/MalakirCullblade.java +++ b/Mage.Sets/src/mage/cards/m/MalakirCullblade.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -53,8 +54,8 @@ public class MalakirCullblade extends CardImpl { public MalakirCullblade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MalakirFamiliar.java b/Mage.Sets/src/mage/cards/m/MalakirFamiliar.java index 553e149359..d40fc58678 100644 --- a/Mage.Sets/src/mage/cards/m/MalakirFamiliar.java +++ b/Mage.Sets/src/mage/cards/m/MalakirFamiliar.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,7 +47,7 @@ public class MalakirFamiliar extends CardImpl { public MalakirFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Bat"); + this.subtype.add(SubType.BAT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MalakirSoothsayer.java b/Mage.Sets/src/mage/cards/m/MalakirSoothsayer.java index 2ff1210968..457a9862d4 100644 --- a/Mage.Sets/src/mage/cards/m/MalakirSoothsayer.java +++ b/Mage.Sets/src/mage/cards/m/MalakirSoothsayer.java @@ -62,9 +62,9 @@ public class MalakirSoothsayer extends CardImpl { public MalakirSoothsayer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Shaman"); - this.subtype.add("Ally"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SHAMAN); + this.subtype.add(SubType.ALLY); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/Malfegor.java b/Mage.Sets/src/mage/cards/m/Malfegor.java index 808c172288..999ca60a96 100644 --- a/Mage.Sets/src/mage/cards/m/Malfegor.java +++ b/Mage.Sets/src/mage/cards/m/Malfegor.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.filter.common.FilterControlledCreaturePermanent; @@ -54,8 +55,8 @@ public class Malfegor extends CardImpl { public Malfegor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Demon"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DEMON); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/m/Malfunction.java b/Mage.Sets/src/mage/cards/m/Malfunction.java index d1eb6f3ea8..fc286bf2cb 100644 --- a/Mage.Sets/src/mage/cards/m/Malfunction.java +++ b/Mage.Sets/src/mage/cards/m/Malfunction.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -61,7 +62,7 @@ public class Malfunction extends CardImpl { public Malfunction(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant artifact or creature. TargetPermanent auraTarget = new TargetPermanent(filter); diff --git a/Mage.Sets/src/mage/cards/m/MaliciousAdvice.java b/Mage.Sets/src/mage/cards/m/MaliciousAdvice.java index a9d044d72e..05479e1007 100644 --- a/Mage.Sets/src/mage/cards/m/MaliciousAdvice.java +++ b/Mage.Sets/src/mage/cards/m/MaliciousAdvice.java @@ -59,18 +59,18 @@ public class MaliciousAdvice extends CardImpl { } public MaliciousAdvice(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{U}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{U}{B}"); // Tap X target artifacts, creatures, and/or lands. You lose X life. Effect effect = new TapTargetEffect(); - effect.setText("Tap X target artifacts, creatures, and/or lands"); + effect.setText("X target artifacts, creatures, and/or lands"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(new ManacostVariableValue())); } @Override public void adjustTargets(Ability ability, Game game) { - if(ability instanceof SpellAbility) { + if (ability instanceof SpellAbility) { ability.getTargets().clear(); ability.addTarget(new TargetPermanent(ability.getManaCostsToPay().getX(), filter)); } diff --git a/Mage.Sets/src/mage/cards/m/MaliciousIntent.java b/Mage.Sets/src/mage/cards/m/MaliciousIntent.java index 72a2d5cc57..f3ce97a07e 100644 --- a/Mage.Sets/src/mage/cards/m/MaliciousIntent.java +++ b/Mage.Sets/src/mage/cards/m/MaliciousIntent.java @@ -51,7 +51,7 @@ public class MaliciousIntent extends CardImpl { public MaliciousIntent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/m/Malignus.java b/Mage.Sets/src/mage/cards/m/Malignus.java index 01d5a0e9a0..06598dbba9 100644 --- a/Mage.Sets/src/mage/cards/m/Malignus.java +++ b/Mage.Sets/src/mage/cards/m/Malignus.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,8 +54,8 @@ public class Malignus extends CardImpl { public Malignus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MammothUmbra.java b/Mage.Sets/src/mage/cards/m/MammothUmbra.java index 0710c2cee4..922a9e704a 100644 --- a/Mage.Sets/src/mage/cards/m/MammothUmbra.java +++ b/Mage.Sets/src/mage/cards/m/MammothUmbra.java @@ -50,7 +50,7 @@ public class MammothUmbra extends CardImpl { public MammothUmbra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/m/ManOWar.java b/Mage.Sets/src/mage/cards/m/ManOWar.java index 0e14acb9c8..58fa9372d9 100644 --- a/Mage.Sets/src/mage/cards/m/ManOWar.java +++ b/Mage.Sets/src/mage/cards/m/ManOWar.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -45,7 +46,7 @@ public class ManOWar extends CardImpl { public ManOWar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Jellyfish"); + this.subtype.add(SubType.JELLYFISH); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/ManaChains.java b/Mage.Sets/src/mage/cards/m/ManaChains.java index e4555b346f..20472b3ca3 100644 --- a/Mage.Sets/src/mage/cards/m/ManaChains.java +++ b/Mage.Sets/src/mage/cards/m/ManaChains.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -52,7 +53,7 @@ public class ManaChains extends CardImpl { public ManaChains(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/m/ManaChargedDragon.java b/Mage.Sets/src/mage/cards/m/ManaChargedDragon.java index 98ee2da6f8..2b5f9c4201 100644 --- a/Mage.Sets/src/mage/cards/m/ManaChargedDragon.java +++ b/Mage.Sets/src/mage/cards/m/ManaChargedDragon.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.game.Game; @@ -55,7 +56,7 @@ public class ManaChargedDragon extends CardImpl { public ManaChargedDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/ManaCrypt.java b/Mage.Sets/src/mage/cards/m/ManaCrypt.java index 59c2ceba38..41f995be90 100644 --- a/Mage.Sets/src/mage/cards/m/ManaCrypt.java +++ b/Mage.Sets/src/mage/cards/m/ManaCrypt.java @@ -73,7 +73,7 @@ class ManaCryptEffect extends OneShotEffect { ManaCryptEffect() { super(Outcome.Damage); - staticText = "flip a coin. If you lose the flip, {this} Crypt deals 3 damage to you"; + staticText = "flip a coin. If you lose the flip, {this} deals 3 damage to you"; } ManaCryptEffect(final ManaCryptEffect effect) { diff --git a/Mage.Sets/src/mage/cards/m/ManaLeech.java b/Mage.Sets/src/mage/cards/m/ManaLeech.java index cbd05303a9..e8a855b9e1 100644 --- a/Mage.Sets/src/mage/cards/m/ManaLeech.java +++ b/Mage.Sets/src/mage/cards/m/ManaLeech.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetLandPermanent; @@ -49,7 +50,7 @@ public class ManaLeech extends CardImpl { public ManaLeech(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Leech"); + this.subtype.add(SubType.LEECH); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/ManaMaze.java b/Mage.Sets/src/mage/cards/m/ManaMaze.java index 9730300223..02038f0e61 100644 --- a/Mage.Sets/src/mage/cards/m/ManaMaze.java +++ b/Mage.Sets/src/mage/cards/m/ManaMaze.java @@ -53,11 +53,10 @@ import mage.watchers.Watcher; public class ManaMaze extends CardImpl { public ManaMaze(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); // Players can't cast spells that share a color with the spell most recently cast this turn. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ManaMazeEffect()), new LastSpellCastWatcher()); - } public ManaMaze(final ManaMaze card) { @@ -91,9 +90,8 @@ class ManaMazeEffect extends ContinuousRuleModifyingEffectImpl { Card card = game.getCard(event.getSourceId()); if (card != null) { LastSpellCastWatcher watcher = (LastSpellCastWatcher) game.getState().getWatchers().get(LastSpellCastWatcher.class.getSimpleName()); - if (watcher != null - && watcher.lastSpellCast != null) { - return card.getColor(game).contains(watcher.lastSpellCast.getColor(game)); + if (watcher != null && watcher.lastSpellCast != null) { + return !card.getColor(game).intersection(watcher.lastSpellCast.getColor(game)).isColorless(); } } return false; diff --git a/Mage.Sets/src/mage/cards/m/ManaSkimmer.java b/Mage.Sets/src/mage/cards/m/ManaSkimmer.java index 07414a2564..03da8f5896 100644 --- a/Mage.Sets/src/mage/cards/m/ManaSkimmer.java +++ b/Mage.Sets/src/mage/cards/m/ManaSkimmer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; @@ -52,7 +53,7 @@ public class ManaSkimmer extends CardImpl { public ManaSkimmer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Leech"); + this.subtype.add(SubType.LEECH); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/ManaWeb.java b/Mage.Sets/src/mage/cards/m/ManaWeb.java index af4cc8d209..094c86bbba 100644 --- a/Mage.Sets/src/mage/cards/m/ManaWeb.java +++ b/Mage.Sets/src/mage/cards/m/ManaWeb.java @@ -52,7 +52,7 @@ import mage.target.targetpointer.FixedTarget; public class ManaWeb extends CardImpl { public ManaWeb(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); // Whenever a land an opponent controls is tapped for mana, tap all lands that player controls that could produce any type of mana that land could produce. this.addAbility(new ManaWebTriggeredAbility()); @@ -155,7 +155,7 @@ class ManaWebeffect extends OneShotEffect { } } - if (mana.containsAny(opponentLandMana)) { + if (mana.containsAny(opponentLandMana, true)) { tappedLands = opponentPermanent.tap(game) || tappedLands; } } diff --git a/Mage.Sets/src/mage/cards/m/Manabond.java b/Mage.Sets/src/mage/cards/m/Manabond.java index 65a28192c7..de9097f4f7 100644 --- a/Mage.Sets/src/mage/cards/m/Manabond.java +++ b/Mage.Sets/src/mage/cards/m/Manabond.java @@ -27,9 +27,6 @@ */ package mage.cards.m; -import java.util.LinkedHashSet; -import java.util.Set; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility; @@ -43,6 +40,10 @@ import mage.constants.Zone; import mage.game.Game; import mage.players.Player; +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.UUID; + /** * * @author Plopman @@ -70,7 +71,7 @@ class ManabondEffect extends OneShotEffect { public ManabondEffect() { super(Outcome.PutCardInPlay); - staticText = "you may reveal your hand and put all land cards from it onto the battlefield. If you do, discard your hand"; + staticText = "reveal your hand and put all land cards from it onto the battlefield. If you do, discard your hand"; } public ManabondEffect(final ManabondEffect effect) { diff --git a/Mage.Sets/src/mage/cards/m/ManaclesOfDecay.java b/Mage.Sets/src/mage/cards/m/ManaclesOfDecay.java index e28f284843..ea85d17521 100644 --- a/Mage.Sets/src/mage/cards/m/ManaclesOfDecay.java +++ b/Mage.Sets/src/mage/cards/m/ManaclesOfDecay.java @@ -50,7 +50,7 @@ public class ManaclesOfDecay extends CardImpl { public ManaclesOfDecay(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/m/ManaforceMace.java b/Mage.Sets/src/mage/cards/m/ManaforceMace.java index f87083eeeb..8892ae127f 100644 --- a/Mage.Sets/src/mage/cards/m/ManaforceMace.java +++ b/Mage.Sets/src/mage/cards/m/ManaforceMace.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class ManaforceMace extends CardImpl { public ManaforceMace(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Domain - Equipped creature gets +1/+1 for each basic land type among lands you control. DomainValue value = new DomainValue(); diff --git a/Mage.Sets/src/mage/cards/m/ManaforgeCinder.java b/Mage.Sets/src/mage/cards/m/ManaforgeCinder.java index 7481e40666..4157248aa0 100644 --- a/Mage.Sets/src/mage/cards/m/ManaforgeCinder.java +++ b/Mage.Sets/src/mage/cards/m/ManaforgeCinder.java @@ -41,6 +41,7 @@ import mage.cards.CardSetInfo; import mage.choices.Choice; import mage.choices.ChoiceImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -54,8 +55,8 @@ public class ManaforgeCinder extends CardImpl { public ManaforgeCinder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B/R}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/ManagorgerHydra.java b/Mage.Sets/src/mage/cards/m/ManagorgerHydra.java index 6c3946c793..09ebc8307a 100644 --- a/Mage.Sets/src/mage/cards/m/ManagorgerHydra.java +++ b/Mage.Sets/src/mage/cards/m/ManagorgerHydra.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,7 +46,7 @@ public class ManagorgerHydra extends CardImpl { public ManagorgerHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/Manakin.java b/Mage.Sets/src/mage/cards/m/Manakin.java index f71153b8b0..2f33000a14 100644 --- a/Mage.Sets/src/mage/cards/m/Manakin.java +++ b/Mage.Sets/src/mage/cards/m/Manakin.java @@ -33,6 +33,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class Manakin extends CardImpl { public Manakin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(1); this.addAbility(new ColorlessManaAbility()); diff --git a/Mage.Sets/src/mage/cards/m/Manaplasm.java b/Mage.Sets/src/mage/cards/m/Manaplasm.java index 84b6ddd25a..0941736576 100644 --- a/Mage.Sets/src/mage/cards/m/Manaplasm.java +++ b/Mage.Sets/src/mage/cards/m/Manaplasm.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class Manaplasm extends CardImpl { public Manaplasm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Ooze"); + this.subtype.add(SubType.OOZE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/ManaweftSliver.java b/Mage.Sets/src/mage/cards/m/ManaweftSliver.java index f3f3a298fc..f26076952d 100644 --- a/Mage.Sets/src/mage/cards/m/ManaweftSliver.java +++ b/Mage.Sets/src/mage/cards/m/ManaweftSliver.java @@ -36,6 +36,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -48,7 +49,7 @@ public class ManaweftSliver extends CardImpl { public ManaweftSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MangaraOfCorondor.java b/Mage.Sets/src/mage/cards/m/MangaraOfCorondor.java index 0cd2ede443..3decdc220e 100644 --- a/Mage.Sets/src/mage/cards/m/MangaraOfCorondor.java +++ b/Mage.Sets/src/mage/cards/m/MangaraOfCorondor.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -50,15 +51,15 @@ public class MangaraOfCorondor extends CardImpl { public MangaraOfCorondor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); // {T}: Exile Mangara of Corondor and target permanent. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileSourceEffect(), new TapSourceCost()); - ability.addEffect(new ExileTargetEffect()); + ability.addEffect(new ExileTargetEffect().setText("and target permanent")); ability.addTarget(new TargetPermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MangarasTome.java b/Mage.Sets/src/mage/cards/m/MangarasTome.java index 6cf03fd2c3..43ae15ed3e 100644 --- a/Mage.Sets/src/mage/cards/m/MangarasTome.java +++ b/Mage.Sets/src/mage/cards/m/MangarasTome.java @@ -1,154 +1,154 @@ -/* - * 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.cards.m; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.ReplacementEffectImpl; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.FilterCard; -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; -import mage.util.CardUtil; - -/** - * - * @author emerald000 - */ -public class MangarasTome extends CardImpl { - - public MangarasTome(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{5}"); - - - // When Mangara's Tome enters the battlefield, search your library for five cards, exile them in a face-down pile, and shuffle that pile. Then shuffle your library. - this.addAbility(new EntersBattlefieldTriggeredAbility(new MangarasTomeSearchEffect())); - - // {2}: The next time you would draw a card this turn, instead put the top card of the exiled pile into its owner's hand. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new MangarasTomeReplacementEffect(), new GenericManaCost(2))); - } - - public MangarasTome(final MangarasTome card) { - super(card); - } - - @Override - public MangarasTome copy() { - return new MangarasTome(this); - } -} - -class MangarasTomeSearchEffect extends OneShotEffect { - - MangarasTomeSearchEffect() { - super(Outcome.Neutral); - this.staticText = "When Mangara's Tome enters the battlefield, search your library for five cards, exile them in a face-down pile, and shuffle that pile. Then shuffle your library"; - } - - MangarasTomeSearchEffect(final MangarasTomeSearchEffect effect) { - super(effect); - } - - @Override - public MangarasTomeSearchEffect copy() { - return new MangarasTomeSearchEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); - if (controller != null && permanent != null) { - TargetCardInLibrary target = new TargetCardInLibrary(5, new FilterCard()); - if (controller.searchLibrary(target, game)) { - for (UUID targetId : target.getTargets()) { - Card card = controller.getLibrary().getCard(targetId, game); - if (card != null) { - controller.moveCardsToExile(card, source, game, false, CardUtil.getCardExileZoneId(game, source), permanent.getLogName()); - card.setFaceDown(true, game); - } - } - } - return true; - } - return false; - } -} - -class MangarasTomeReplacementEffect extends ReplacementEffectImpl { - - MangarasTomeReplacementEffect() { - super(Duration.EndOfTurn, Outcome.DrawCard); - staticText = "The next time you would draw a card this turn, instead put the top card of the exiled pile into its owner's hand"; - } - - MangarasTomeReplacementEffect(final MangarasTomeReplacementEffect effect) { - super(effect); - } - - @Override - public MangarasTomeReplacementEffect copy() { - return new MangarasTomeReplacementEffect(this); - } - - @Override - public boolean replaceEvent(GameEvent event, Ability source, Game game) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Card card = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)).getRandom(game); - if (card != null) { - controller.moveCards(card, Zone.HAND, source, game); - } - } - return true; - } - - @Override - public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == EventType.DRAW_CARD; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - return source.getControllerId().equals(event.getPlayerId()); - } -} +/* + * 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.cards.m; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterCard; +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; +import mage.util.CardUtil; + +/** + * + * @author emerald000 + */ +public class MangarasTome extends CardImpl { + + public MangarasTome(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{5}"); + + + // When Mangara's Tome enters the battlefield, search your library for five cards, exile them in a face-down pile, and shuffle that pile. Then shuffle your library. + this.addAbility(new EntersBattlefieldTriggeredAbility(new MangarasTomeSearchEffect())); + + // {2}: The next time you would draw a card this turn, instead put the top card of the exiled pile into its owner's hand. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new MangarasTomeReplacementEffect(), new GenericManaCost(2))); + } + + public MangarasTome(final MangarasTome card) { + super(card); + } + + @Override + public MangarasTome copy() { + return new MangarasTome(this); + } +} + +class MangarasTomeSearchEffect extends OneShotEffect { + + MangarasTomeSearchEffect() { + super(Outcome.Neutral); + this.staticText = "When Mangara's Tome enters the battlefield, search your library for five cards, exile them in a face-down pile, and shuffle that pile. Then shuffle your library"; + } + + MangarasTomeSearchEffect(final MangarasTomeSearchEffect effect) { + super(effect); + } + + @Override + public MangarasTomeSearchEffect copy() { + return new MangarasTomeSearchEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (controller != null && permanent != null) { + TargetCardInLibrary target = new TargetCardInLibrary(5, new FilterCard()); + if (controller.searchLibrary(target, game)) { + for (UUID targetId : target.getTargets()) { + Card card = controller.getLibrary().getCard(targetId, game); + if (card != null) { + controller.moveCardsToExile(card, source, game, false, CardUtil.getCardExileZoneId(game, source), permanent.getLogName()); + card.setFaceDown(true, game); + } + } + } + return true; + } + return false; + } +} + +class MangarasTomeReplacementEffect extends ReplacementEffectImpl { + + MangarasTomeReplacementEffect() { + super(Duration.EndOfTurn, Outcome.DrawCard); + staticText = "The next time you would draw a card this turn, instead put the top card of the exiled pile into its owner's hand"; + } + + MangarasTomeReplacementEffect(final MangarasTomeReplacementEffect effect) { + super(effect); + } + + @Override + public MangarasTomeReplacementEffect copy() { + return new MangarasTomeReplacementEffect(this); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Card card = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)).getRandom(game); + if (card != null) { + controller.moveCards(card, Zone.HAND, source, game); + } + } + return true; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == EventType.DRAW_CARD; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + return source.getControllerId().equals(event.getPlayerId()); + } +} diff --git a/Mage.Sets/src/mage/cards/m/Manglehorn.java b/Mage.Sets/src/mage/cards/m/Manglehorn.java index 4119ef0a64..3f35fc0f36 100644 --- a/Mage.Sets/src/mage/cards/m/Manglehorn.java +++ b/Mage.Sets/src/mage/cards/m/Manglehorn.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class Manglehorn extends CardImpl { public Manglehorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/ManiacalRage.java b/Mage.Sets/src/mage/cards/m/ManiacalRage.java index a12be42db8..8f1eae9024 100644 --- a/Mage.Sets/src/mage/cards/m/ManiacalRage.java +++ b/Mage.Sets/src/mage/cards/m/ManiacalRage.java @@ -48,7 +48,7 @@ public class ManiacalRage extends CardImpl { public ManiacalRage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/m/ManicScribe.java b/Mage.Sets/src/mage/cards/m/ManicScribe.java index 93df92a24e..f031a12b82 100644 --- a/Mage.Sets/src/mage/cards/m/ManicScribe.java +++ b/Mage.Sets/src/mage/cards/m/ManicScribe.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class ManicScribe extends CardImpl { public ManicScribe(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/ManicVandal.java b/Mage.Sets/src/mage/cards/m/ManicVandal.java index 47ebcf7e8d..f5b374a305 100644 --- a/Mage.Sets/src/mage/cards/m/ManicVandal.java +++ b/Mage.Sets/src/mage/cards/m/ManicVandal.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetArtifactPermanent; /** @@ -45,8 +46,8 @@ public class ManicVandal extends CardImpl { public ManicVandal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MannichiTheFeveredDream.java b/Mage.Sets/src/mage/cards/m/MannichiTheFeveredDream.java index 050fe0194e..67cd74e9bd 100644 --- a/Mage.Sets/src/mage/cards/m/MannichiTheFeveredDream.java +++ b/Mage.Sets/src/mage/cards/m/MannichiTheFeveredDream.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.SwitchPowerToughnessAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class MannichiTheFeveredDream extends CardImpl { public MannichiTheFeveredDream(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/ManorGargoyle.java b/Mage.Sets/src/mage/cards/m/ManorGargoyle.java index 4085eaddc3..b65fa09074 100644 --- a/Mage.Sets/src/mage/cards/m/ManorGargoyle.java +++ b/Mage.Sets/src/mage/cards/m/ManorGargoyle.java @@ -45,6 +45,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.DependencyType; import mage.constants.Duration; import mage.constants.Zone; @@ -61,7 +62,7 @@ public class ManorGargoyle extends CardImpl { public ManorGargoyle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Gargoyle"); + this.subtype.add(SubType.GARGOYLE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/ManorSkeleton.java b/Mage.Sets/src/mage/cards/m/ManorSkeleton.java index 41a765d8c2..454d3670c7 100644 --- a/Mage.Sets/src/mage/cards/m/ManorSkeleton.java +++ b/Mage.Sets/src/mage/cards/m/ManorSkeleton.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class ManorSkeleton extends CardImpl { public ManorSkeleton(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/ManrikiGusari.java b/Mage.Sets/src/mage/cards/m/ManrikiGusari.java index b90b60db32..5f8311298c 100644 --- a/Mage.Sets/src/mage/cards/m/ManrikiGusari.java +++ b/Mage.Sets/src/mage/cards/m/ManrikiGusari.java @@ -58,7 +58,7 @@ public class ManrikiGusari extends CardImpl { public ManrikiGusari(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+2 and has "{tap}: Destroy target Equipment." this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 2))); Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/m/MantaRay.java b/Mage.Sets/src/mage/cards/m/MantaRay.java index bf8f4221b7..f2707d1fda 100644 --- a/Mage.Sets/src/mage/cards/m/MantaRay.java +++ b/Mage.Sets/src/mage/cards/m/MantaRay.java @@ -58,7 +58,7 @@ public class MantaRay extends CardImpl { public MantaRay(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Fish"); + this.subtype.add(SubType.FISH); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MantaRiders.java b/Mage.Sets/src/mage/cards/m/MantaRiders.java index bd134faea7..37468f51d8 100644 --- a/Mage.Sets/src/mage/cards/m/MantaRiders.java +++ b/Mage.Sets/src/mage/cards/m/MantaRiders.java @@ -45,7 +45,7 @@ public class MantaRiders extends CardImpl { public MantaRiders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MantellianSavrip.java b/Mage.Sets/src/mage/cards/m/MantellianSavrip.java index 75365b9c5b..5f472fc18a 100644 --- a/Mage.Sets/src/mage/cards/m/MantellianSavrip.java +++ b/Mage.Sets/src/mage/cards/m/MantellianSavrip.java @@ -1,100 +1,101 @@ -/* - * 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.cards.m; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.RestrictionEffect; -import mage.abilities.keyword.MonstrosityAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.permanent.Permanent; - -/** - * - * @author Styxo - */ -public class MantellianSavrip extends CardImpl { - - public MantellianSavrip(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); - this.subtype.add("Mantellian"); - this.subtype.add("Berserker"); - this.power = new MageInt(4); - this.toughness = new MageInt(4); - - // {5}{G}{G}: Monstrosity 2. - this.addAbility(new MonstrosityAbility("{5}{G}{G}", 2)); - - // Creatures with power less than Mantellian Savrip's power can't block it. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MantellianSavripRestrictionEffect())); - - } - - public MantellianSavrip(final MantellianSavrip card) { - super(card); - } - - @Override - public MantellianSavrip copy() { - return new MantellianSavrip(this); - } -} - -class MantellianSavripRestrictionEffect extends RestrictionEffect { - - public MantellianSavripRestrictionEffect() { - super(Duration.WhileOnBattlefield); - staticText = "Creatures with power less than {this}'s power can't block it"; - } - - public MantellianSavripRestrictionEffect(final MantellianSavripRestrictionEffect effect) { - super(effect); - } - - @Override - public boolean applies(Permanent permanent, Ability source, Game game) { - return permanent.getId().equals(source.getSourceId()); - } - - @Override - public boolean canBeBlocked(Permanent attacker, Permanent blocker, Ability source, Game game) { - return (blocker.getPower().getValue() >= attacker.getPower().getValue()); - } - - @Override - public MantellianSavripRestrictionEffect copy() { - return new MantellianSavripRestrictionEffect(this); - } -} +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.RestrictionEffect; +import mage.abilities.keyword.MonstrosityAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author Styxo + */ +public class MantellianSavrip extends CardImpl { + + public MantellianSavrip(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); + this.subtype.add(SubType.MANTELLIAN); + this.subtype.add(SubType.BERSERKER); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // {5}{G}{G}: Monstrosity 2. + this.addAbility(new MonstrosityAbility("{5}{G}{G}", 2)); + + // Creatures with power less than Mantellian Savrip's power can't block it. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MantellianSavripRestrictionEffect())); + + } + + public MantellianSavrip(final MantellianSavrip card) { + super(card); + } + + @Override + public MantellianSavrip copy() { + return new MantellianSavrip(this); + } +} + +class MantellianSavripRestrictionEffect extends RestrictionEffect { + + public MantellianSavripRestrictionEffect() { + super(Duration.WhileOnBattlefield); + staticText = "Creatures with power less than {this}'s power can't block it"; + } + + public MantellianSavripRestrictionEffect(final MantellianSavripRestrictionEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return permanent.getId().equals(source.getSourceId()); + } + + @Override + public boolean canBeBlocked(Permanent attacker, Permanent blocker, Ability source, Game game) { + return (blocker.getPower().getValue() >= attacker.getPower().getValue()); + } + + @Override + public MantellianSavripRestrictionEffect copy() { + return new MantellianSavripRestrictionEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/ManticoreEternal.java b/Mage.Sets/src/mage/cards/m/ManticoreEternal.java index 39dfeb740c..a90daf0fa3 100644 --- a/Mage.Sets/src/mage/cards/m/ManticoreEternal.java +++ b/Mage.Sets/src/mage/cards/m/ManticoreEternal.java @@ -7,13 +7,14 @@ import mage.abilities.keyword.AfflictAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; public class ManticoreEternal extends CardImpl { public ManticoreEternal(UUID ownerId, CardSetInfo cardSetInfo) { super(ownerId, cardSetInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); - subtype.add("Zombie"); - subtype.add("Manticore"); + subtype.add(SubType.ZOMBIE); + subtype.add(SubType.MANTICORE); power = new MageInt(5); toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java b/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java index 1b23ea35b6..c6371855c5 100644 --- a/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java +++ b/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetOpponent; @@ -53,7 +54,7 @@ public class ManticoreOfTheGauntlet extends CardImpl { public ManticoreOfTheGauntlet(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); - this.subtype.add("Manticore"); + this.subtype.add(SubType.MANTICORE); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MantisEngine.java b/Mage.Sets/src/mage/cards/m/MantisEngine.java index dd500e8f55..d5a2739917 100644 --- a/Mage.Sets/src/mage/cards/m/MantisEngine.java +++ b/Mage.Sets/src/mage/cards/m/MantisEngine.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class MantisEngine extends CardImpl { public MantisEngine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MantisRider.java b/Mage.Sets/src/mage/cards/m/MantisRider.java index bf415735c5..994216da12 100644 --- a/Mage.Sets/src/mage/cards/m/MantisRider.java +++ b/Mage.Sets/src/mage/cards/m/MantisRider.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class MantisRider extends CardImpl { public MantisRider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{R}{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MantleOfLeadership.java b/Mage.Sets/src/mage/cards/m/MantleOfLeadership.java new file mode 100644 index 0000000000..32846764b8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MantleOfLeadership.java @@ -0,0 +1,83 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.constants.SubType; +import mage.abilities.keyword.FlashAbility; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.StaticFilters; + +/** + * + * @author TheElk801 + */ +public class MantleOfLeadership extends CardImpl { + + public MantleOfLeadership(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + + this.subtype.add(SubType.AURA); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Whenever a creature enters the battlefield, enchanted creature gets +2/+2 until end of turn. + this.addAbility(new EntersBattlefieldAllTriggeredAbility( + new BoostEnchantedEffect(2, 2, Duration.EndOfTurn), + StaticFilters.FILTER_PERMANENT_A_CREATURE + )); + } + + public MantleOfLeadership(final MantleOfLeadership card) { + super(card); + } + + @Override + public MantleOfLeadership copy() { + return new MantleOfLeadership(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MantleOfWebs.java b/Mage.Sets/src/mage/cards/m/MantleOfWebs.java index 8007d2ed12..1a1163d22c 100644 --- a/Mage.Sets/src/mage/cards/m/MantleOfWebs.java +++ b/Mage.Sets/src/mage/cards/m/MantleOfWebs.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class MantleOfWebs extends CardImpl { public MantleOfWebs(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/m/MaralenOfTheMornsong.java b/Mage.Sets/src/mage/cards/m/MaralenOfTheMornsong.java index 728becf994..35b89caf0f 100644 --- a/Mage.Sets/src/mage/cards/m/MaralenOfTheMornsong.java +++ b/Mage.Sets/src/mage/cards/m/MaralenOfTheMornsong.java @@ -52,8 +52,8 @@ public class MaralenOfTheMornsong extends CardImpl { public MaralenOfTheMornsong(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MarangRiverProwler.java b/Mage.Sets/src/mage/cards/m/MarangRiverProwler.java index 346b0b4b7e..016ffa9765 100644 --- a/Mage.Sets/src/mage/cards/m/MarangRiverProwler.java +++ b/Mage.Sets/src/mage/cards/m/MarangRiverProwler.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,8 +58,8 @@ public class MarangRiverProwler extends CardImpl { public MarangRiverProwler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MarangRiverSkeleton.java b/Mage.Sets/src/mage/cards/m/MarangRiverSkeleton.java index cef9d743b5..3a1f983371 100644 --- a/Mage.Sets/src/mage/cards/m/MarangRiverSkeleton.java +++ b/Mage.Sets/src/mage/cards/m/MarangRiverSkeleton.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class MarangRiverSkeleton extends CardImpl { public MarangRiverSkeleton(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MarathWillOfTheWild.java b/Mage.Sets/src/mage/cards/m/MarathWillOfTheWild.java index 56584fb3ab..cac2b03bc5 100644 --- a/Mage.Sets/src/mage/cards/m/MarathWillOfTheWild.java +++ b/Mage.Sets/src/mage/cards/m/MarathWillOfTheWild.java @@ -48,6 +48,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -69,8 +70,8 @@ public class MarathWillOfTheWild extends CardImpl { public MarathWillOfTheWild(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elemental"); - this.subtype.add("Beast"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.BEAST); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MaraudingBoneslasher.java b/Mage.Sets/src/mage/cards/m/MaraudingBoneslasher.java index 80ae641bf6..4b885df290 100644 --- a/Mage.Sets/src/mage/cards/m/MaraudingBoneslasher.java +++ b/Mage.Sets/src/mage/cards/m/MaraudingBoneslasher.java @@ -56,8 +56,8 @@ public class MaraudingBoneslasher extends CardImpl { public MaraudingBoneslasher(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Minotaur"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.MINOTAUR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MaraudingKnight.java b/Mage.Sets/src/mage/cards/m/MaraudingKnight.java index 7f3957d40e..1206ab6369 100644 --- a/Mage.Sets/src/mage/cards/m/MaraudingKnight.java +++ b/Mage.Sets/src/mage/cards/m/MaraudingKnight.java @@ -55,8 +55,8 @@ public class MaraudingKnight extends CardImpl { public MaraudingKnight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MaraudingLooter.java b/Mage.Sets/src/mage/cards/m/MaraudingLooter.java new file mode 100644 index 0000000000..609f05cdab --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MaraudingLooter.java @@ -0,0 +1,76 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DrawDiscardControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * + * @author TheElk801 + */ +public class MaraudingLooter extends CardImpl { + + public MaraudingLooter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Raid - At the beginning of your end step, if you attacked with a creature this turn, you may draw a card. If you do, discard a card. + Ability ability = new ConditionalTriggeredAbility( + new BeginningOfEndStepTriggeredAbility(new DrawDiscardControllerEffect(1, 1, true), TargetController.YOU, false), + RaidCondition.instance, + "Raid — At the beginning of your end step, " + + "if you attacked with a creature this turn, " + + "you may draw a card. If you do, discard a card."); + this.addAbility(ability, new PlayerAttackedWatcher()); + } + + public MaraudingLooter(final MaraudingLooter card) { + super(card); + } + + @Override + public MaraudingLooter copy() { + return new MaraudingLooter(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MaraudingMaulhorn.java b/Mage.Sets/src/mage/cards/m/MaraudingMaulhorn.java index 7fb3df812b..ed9afee0d0 100644 --- a/Mage.Sets/src/mage/cards/m/MaraudingMaulhorn.java +++ b/Mage.Sets/src/mage/cards/m/MaraudingMaulhorn.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.combat.AttacksIfAbleSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.filter.common.FilterControlledCreaturePermanent; @@ -55,7 +56,7 @@ public class MaraudingMaulhorn extends CardImpl { public MaraudingMaulhorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MaraxusOfKeld.java b/Mage.Sets/src/mage/cards/m/MaraxusOfKeld.java index fae9beab6c..90b5e462b4 100644 --- a/Mage.Sets/src/mage/cards/m/MaraxusOfKeld.java +++ b/Mage.Sets/src/mage/cards/m/MaraxusOfKeld.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -62,8 +63,8 @@ public class MaraxusOfKeld extends CardImpl { public MaraxusOfKeld(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MarbleTitan.java b/Mage.Sets/src/mage/cards/m/MarbleTitan.java index f456f4df7d..ce78a645de 100644 --- a/Mage.Sets/src/mage/cards/m/MarbleTitan.java +++ b/Mage.Sets/src/mage/cards/m/MarbleTitan.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.TargetController; @@ -55,7 +56,7 @@ public class MarbleTitan extends CardImpl { public MarbleTitan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MarchOfTheDroids.java b/Mage.Sets/src/mage/cards/m/MarchOfTheDroids.java index 4ea357833c..60b1d2dfd5 100644 --- a/Mage.Sets/src/mage/cards/m/MarchOfTheDroids.java +++ b/Mage.Sets/src/mage/cards/m/MarchOfTheDroids.java @@ -1,113 +1,113 @@ -/* - * 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.cards.m; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.counters.CounterType; -import mage.filter.FilterPermanent; -import mage.game.Game; -import mage.game.permanent.token.DroidToken; -import mage.players.Player; - -/** - * - * @author Styxo - */ -public class MarchOfTheDroids extends CardImpl { - - public MarchOfTheDroids(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{W}{U}{B}"); - - // Remove all repair counters from all cards in your graveyard. Return each card with a repair counter removed this way from graveyard to the battlefield. - this.getSpellAbility().addEffect(new MarchOfTheDroidsEffect()); - - // Create 1/1 colorles Droid artifact creature token for each Droid you control. - this.getSpellAbility().addEffect(new CreateTokenEffect(new DroidToken(), new PermanentsOnBattlefieldCount(new FilterPermanent(SubType.DROID, "Droid you control")))); - } - - public MarchOfTheDroids(final MarchOfTheDroids card) { - super(card); - } - - @Override - public MarchOfTheDroids copy() { - return new MarchOfTheDroids(this); - } -} - -class MarchOfTheDroidsEffect extends OneShotEffect { - - public MarchOfTheDroidsEffect() { - super(Outcome.Benefit); - this.staticText = "Remove all repair counters from all cards in your graveyard. Return each card with a repair counter removed this way from graveyard to the battlefield"; - } - - public MarchOfTheDroidsEffect(final MarchOfTheDroidsEffect effect) { - super(effect); - } - - @Override - public MarchOfTheDroidsEffect copy() { - return new MarchOfTheDroidsEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Cards cardsToReturn = new CardsImpl(); - for (Card card : controller.getGraveyard().getCards(game)) { - if (card.getOwnerId().equals(controller.getId()) && card.getCounters(game).getCount(CounterType.REPAIR) > 0) { - int number = card.getCounters(game).getCount(CounterType.REPAIR); - if (number > 0) { - cardsToReturn.add(card); - card.removeCounters(CounterType.REPAIR.createInstance(number), game); - } - } - } - if (!cardsToReturn.isEmpty()) { - controller.moveCards(cardsToReturn, Zone.BATTLEFIELD, source, game); - } - return true; - } - return false; - } -} +/* + * 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.cards.m; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.game.Game; +import mage.game.permanent.token.DroidToken; +import mage.players.Player; + +/** + * + * @author Styxo + */ +public class MarchOfTheDroids extends CardImpl { + + public MarchOfTheDroids(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{W}{U}{B}"); + + // Remove all repair counters from all cards in your graveyard. Return each card with a repair counter removed this way from graveyard to the battlefield. + this.getSpellAbility().addEffect(new MarchOfTheDroidsEffect()); + + // Create 1/1 colorles Droid artifact creature token for each Droid you control. + this.getSpellAbility().addEffect(new CreateTokenEffect(new DroidToken(), new PermanentsOnBattlefieldCount(new FilterPermanent(SubType.DROID, "Droid you control")))); + } + + public MarchOfTheDroids(final MarchOfTheDroids card) { + super(card); + } + + @Override + public MarchOfTheDroids copy() { + return new MarchOfTheDroids(this); + } +} + +class MarchOfTheDroidsEffect extends OneShotEffect { + + public MarchOfTheDroidsEffect() { + super(Outcome.Benefit); + this.staticText = "Remove all repair counters from all cards in your graveyard. Return each card with a repair counter removed this way from graveyard to the battlefield"; + } + + public MarchOfTheDroidsEffect(final MarchOfTheDroidsEffect effect) { + super(effect); + } + + @Override + public MarchOfTheDroidsEffect copy() { + return new MarchOfTheDroidsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Cards cardsToReturn = new CardsImpl(); + for (Card card : controller.getGraveyard().getCards(game)) { + if (card.getOwnerId().equals(controller.getId()) && card.getCounters(game).getCount(CounterType.REPAIR) > 0) { + int number = card.getCounters(game).getCount(CounterType.REPAIR); + if (number > 0) { + cardsToReturn.add(card); + card.removeCounters(CounterType.REPAIR.createInstance(number), game); + } + } + } + if (!cardsToReturn.isEmpty()) { + controller.moveCards(cardsToReturn, Zone.BATTLEFIELD, source, game); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/m/MarchOfTheDrowned.java b/Mage.Sets/src/mage/cards/m/MarchOfTheDrowned.java new file mode 100644 index 0000000000..cd3f5d8513 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MarchOfTheDrowned.java @@ -0,0 +1,76 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author TheElk801 + */ +public class MarchOfTheDrowned extends CardImpl { + + private static final FilterCard filter = new FilterCard("Pirate cards from your graveyard"); + + static { + filter.add(new SubtypePredicate(SubType.PIRATE)); + } + + public MarchOfTheDrowned(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}"); + + // Choose one — + // &bull; Return target creature card from your graveyard to your hand. + this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))); + // &bull; Return two target Pirate cards from your graveyard to your hand. + Mode mode = new Mode(); + mode.getEffects().add(new ReturnFromGraveyardToHandTargetEffect()); + mode.getTargets().add(new TargetCardInYourGraveyard(2, filter)); + this.getSpellAbility().addMode(mode); + } + + public MarchOfTheDrowned(final MarchOfTheDrowned card) { + super(card); + } + + @Override + public MarchOfTheDrowned copy() { + return new MarchOfTheDrowned(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MarchesaTheBlackRose.java b/Mage.Sets/src/mage/cards/m/MarchesaTheBlackRose.java index 887d0a679f..15f0cdff9b 100644 --- a/Mage.Sets/src/mage/cards/m/MarchesaTheBlackRose.java +++ b/Mage.Sets/src/mage/cards/m/MarchesaTheBlackRose.java @@ -61,8 +61,8 @@ public class MarchesaTheBlackRose extends CardImpl { public MarchesaTheBlackRose(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MarchesasEmissary.java b/Mage.Sets/src/mage/cards/m/MarchesasEmissary.java index ded4670864..d6242a1194 100644 --- a/Mage.Sets/src/mage/cards/m/MarchesasEmissary.java +++ b/Mage.Sets/src/mage/cards/m/MarchesasEmissary.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class MarchesasEmissary extends CardImpl { public MarchesasEmissary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MarchesasInfiltrator.java b/Mage.Sets/src/mage/cards/m/MarchesasInfiltrator.java index d51c4059e0..d520c8a7a9 100644 --- a/Mage.Sets/src/mage/cards/m/MarchesasInfiltrator.java +++ b/Mage.Sets/src/mage/cards/m/MarchesasInfiltrator.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DethroneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class MarchesasInfiltrator extends CardImpl { public MarchesasInfiltrator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MarchesasSmuggler.java b/Mage.Sets/src/mage/cards/m/MarchesasSmuggler.java index 563bfe4956..c719c7480f 100644 --- a/Mage.Sets/src/mage/cards/m/MarchesasSmuggler.java +++ b/Mage.Sets/src/mage/cards/m/MarchesasSmuggler.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -52,8 +53,8 @@ public class MarchesasSmuggler extends CardImpl { public MarchesasSmuggler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{R}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MarduBlazebringer.java b/Mage.Sets/src/mage/cards/m/MarduBlazebringer.java index c4c3a3d460..03d61427dd 100644 --- a/Mage.Sets/src/mage/cards/m/MarduBlazebringer.java +++ b/Mage.Sets/src/mage/cards/m/MarduBlazebringer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class MarduBlazebringer extends CardImpl { public MarduBlazebringer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MarduHateblade.java b/Mage.Sets/src/mage/cards/m/MarduHateblade.java index ca802d0436..00c3569100 100644 --- a/Mage.Sets/src/mage/cards/m/MarduHateblade.java +++ b/Mage.Sets/src/mage/cards/m/MarduHateblade.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class MarduHateblade extends CardImpl { public MarduHateblade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MarduHeartPiercer.java b/Mage.Sets/src/mage/cards/m/MarduHeartPiercer.java index 65f3ff4701..78291c4edd 100644 --- a/Mage.Sets/src/mage/cards/m/MarduHeartPiercer.java +++ b/Mage.Sets/src/mage/cards/m/MarduHeartPiercer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; import mage.watchers.common.PlayerAttackedWatcher; @@ -48,8 +49,8 @@ public class MarduHeartPiercer extends CardImpl { public MarduHeartPiercer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MarduHordechief.java b/Mage.Sets/src/mage/cards/m/MarduHordechief.java index 77c0120fa2..53cd6c4d66 100644 --- a/Mage.Sets/src/mage/cards/m/MarduHordechief.java +++ b/Mage.Sets/src/mage/cards/m/MarduHordechief.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.WarriorToken; import mage.watchers.common.PlayerAttackedWatcher; @@ -46,16 +47,16 @@ import mage.watchers.common.PlayerAttackedWatcher; public class MarduHordechief extends CardImpl { public MarduHordechief(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); // Raid - When Mardu Hordechief enters the battlefield, if you attacked with a creature this turn, create a 1/1 white Warrior creature token this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WarriorToken())), RaidCondition.instance, - "Raid - When {this} enters the battlefield, if you attacked with a creature this turn, create a 1/1 white Warrior creature token."), + "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, create a 1/1 white Warrior creature token."), new PlayerAttackedWatcher()); } diff --git a/Mage.Sets/src/mage/cards/m/MarduRoughrider.java b/Mage.Sets/src/mage/cards/m/MarduRoughrider.java index 0f4bf611e0..f674be5b39 100644 --- a/Mage.Sets/src/mage/cards/m/MarduRoughrider.java +++ b/Mage.Sets/src/mage/cards/m/MarduRoughrider.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.CantBlockTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -45,8 +46,8 @@ public class MarduRoughrider extends CardImpl { public MarduRoughrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{W}{B}"); - this.subtype.add("Orc"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MarduRunemark.java b/Mage.Sets/src/mage/cards/m/MarduRunemark.java index 2d9c00df34..3e44bdaadd 100644 --- a/Mage.Sets/src/mage/cards/m/MarduRunemark.java +++ b/Mage.Sets/src/mage/cards/m/MarduRunemark.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -65,7 +66,7 @@ public class MarduRunemark extends CardImpl { public MarduRunemark(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/m/MarduScout.java b/Mage.Sets/src/mage/cards/m/MarduScout.java index f056ba9fd9..814f2c2af2 100644 --- a/Mage.Sets/src/mage/cards/m/MarduScout.java +++ b/Mage.Sets/src/mage/cards/m/MarduScout.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class MarduScout extends CardImpl { public MarduScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Scout"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MarduShadowspear.java b/Mage.Sets/src/mage/cards/m/MarduShadowspear.java index b4729f2ab9..3e66278bfb 100644 --- a/Mage.Sets/src/mage/cards/m/MarduShadowspear.java +++ b/Mage.Sets/src/mage/cards/m/MarduShadowspear.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * * @author fireshoes @@ -43,8 +44,8 @@ public class MarduShadowspear extends CardImpl { public MarduShadowspear(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MarduSkullhunter.java b/Mage.Sets/src/mage/cards/m/MarduSkullhunter.java index e8275a4417..53c90d3d2b 100644 --- a/Mage.Sets/src/mage/cards/m/MarduSkullhunter.java +++ b/Mage.Sets/src/mage/cards/m/MarduSkullhunter.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetOpponent; import mage.watchers.common.PlayerAttackedWatcher; @@ -49,8 +50,8 @@ public class MarduSkullhunter extends CardImpl { public MarduSkullhunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MarduStrikeLeader.java b/Mage.Sets/src/mage/cards/m/MarduStrikeLeader.java index d1a5142c1f..95f0888c58 100644 --- a/Mage.Sets/src/mage/cards/m/MarduStrikeLeader.java +++ b/Mage.Sets/src/mage/cards/m/MarduStrikeLeader.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.MarduStrikeLeaderWarriorToken; /** @@ -45,8 +46,8 @@ public class MarduStrikeLeader extends CardImpl { public MarduStrikeLeader(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MarduWarshrieker.java b/Mage.Sets/src/mage/cards/m/MarduWarshrieker.java index 7076d36e26..d973014e86 100644 --- a/Mage.Sets/src/mage/cards/m/MarduWarshrieker.java +++ b/Mage.Sets/src/mage/cards/m/MarduWarshrieker.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.AddManaToManaPoolSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.watchers.common.PlayerAttackedWatcher; /** @@ -46,16 +47,16 @@ import mage.watchers.common.PlayerAttackedWatcher; public class MarduWarshrieker extends CardImpl { public MarduWarshrieker(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Orc"); - this.subtype.add("Shaman"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); // Raid - When Mardu Warshrieker enters the battlefield, if you attacked with a creature this turn, add {R}{W}{B} to your mana pool. this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(new Mana(1, 0, 0, 1, 1, 0, 0, 0))), RaidCondition.instance, - "Raid - When {this} enters the battlefield, if you attacked with a creature this turn, add {R}{W}{B} to your mana pool."), + "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, add {R}{W}{B} to your mana pool."), new PlayerAttackedWatcher()); } diff --git a/Mage.Sets/src/mage/cards/m/MarduWoeReaper.java b/Mage.Sets/src/mage/cards/m/MarduWoeReaper.java index 7be5c73e3e..b64af7093a 100644 --- a/Mage.Sets/src/mage/cards/m/MarduWoeReaper.java +++ b/Mage.Sets/src/mage/cards/m/MarduWoeReaper.java @@ -54,8 +54,8 @@ public class MarduWoeReaper extends CardImpl { public MarduWoeReaper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MarhaultElsdragon.java b/Mage.Sets/src/mage/cards/m/MarhaultElsdragon.java index 71b9e20853..4a6308b947 100644 --- a/Mage.Sets/src/mage/cards/m/MarhaultElsdragon.java +++ b/Mage.Sets/src/mage/cards/m/MarhaultElsdragon.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.RampageAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -44,8 +45,8 @@ public class MarhaultElsdragon extends CardImpl { public MarhaultElsdragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/m/MarionetteMaster.java b/Mage.Sets/src/mage/cards/m/MarionetteMaster.java index 6bd1518aca..0946284659 100644 --- a/Mage.Sets/src/mage/cards/m/MarionetteMaster.java +++ b/Mage.Sets/src/mage/cards/m/MarionetteMaster.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FabricateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledArtifactPermanent; import mage.target.common.TargetOpponent; @@ -49,8 +50,8 @@ public class MarionetteMaster extends CardImpl { public MarionetteMaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MarisisTwinclaws.java b/Mage.Sets/src/mage/cards/m/MarisisTwinclaws.java index 168a7efcac..858af431a7 100644 --- a/Mage.Sets/src/mage/cards/m/MarisisTwinclaws.java +++ b/Mage.Sets/src/mage/cards/m/MarisisTwinclaws.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class MarisisTwinclaws extends CardImpl { public MarisisTwinclaws (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R/W}{G}"); - this.subtype.add("Cat"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WARRIOR); diff --git a/Mage.Sets/src/mage/cards/m/MaritimeGuard.java b/Mage.Sets/src/mage/cards/m/MaritimeGuard.java index 750398793e..42454fe01d 100644 --- a/Mage.Sets/src/mage/cards/m/MaritimeGuard.java +++ b/Mage.Sets/src/mage/cards/m/MaritimeGuard.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class MaritimeGuard extends CardImpl { public MaritimeGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(3); } diff --git a/Mage.Sets/src/mage/cards/m/Marjhan.java b/Mage.Sets/src/mage/cards/m/Marjhan.java index 550ca6f4aa..09c6170e2f 100644 --- a/Mage.Sets/src/mage/cards/m/Marjhan.java +++ b/Mage.Sets/src/mage/cards/m/Marjhan.java @@ -69,7 +69,7 @@ public class Marjhan extends CardImpl { public Marjhan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/m/MarkOfEviction.java b/Mage.Sets/src/mage/cards/m/MarkOfEviction.java index a9d77f4993..3cae064589 100644 --- a/Mage.Sets/src/mage/cards/m/MarkOfEviction.java +++ b/Mage.Sets/src/mage/cards/m/MarkOfEviction.java @@ -1,120 +1,121 @@ -/* - * 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.cards.m; - -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.AttachEffect; -import mage.abilities.keyword.EnchantAbility; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.TargetPermanent; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author LevelX2 - */ -public class MarkOfEviction extends CardImpl { - - public MarkOfEviction(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}"); - - this.subtype.add("Aura"); - - // Enchant creature - TargetPermanent auraTarget = new TargetCreaturePermanent(); - this.getSpellAbility().addTarget(auraTarget); - this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); - Ability ability = new EnchantAbility(auraTarget.getTargetName()); - this.addAbility(ability); - - // At the beginning of your upkeep, return enchanted creature and all Auras attached to that creature to their owners' hands. - this.addAbility(new BeginningOfUpkeepTriggeredAbility(new MarkOfEvictionEffect(), TargetController.YOU, false)); - } - - public MarkOfEviction(final MarkOfEviction card) { - super(card); - } - - @Override - public MarkOfEviction copy() { - return new MarkOfEviction(this); - } -} - -class MarkOfEvictionEffect extends OneShotEffect { - - public MarkOfEvictionEffect() { - super(Outcome.Benefit); - this.staticText = "return enchanted creature and all Auras attached to that creature to their owners' hands"; - } - - public MarkOfEvictionEffect(final MarkOfEvictionEffect effect) { - super(effect); - } - - @Override - public MarkOfEvictionEffect copy() { - return new MarkOfEvictionEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - Permanent sourceObject = game.getPermanentOrLKIBattlefield(source.getSourceId()); - if (controller != null && sourceObject != null && sourceObject.getAttachedTo() != null) { - Permanent enchanted = game.getPermanent(sourceObject.getAttachedTo()); - if (enchanted != null) { - Set toHand = new HashSet<>(); - toHand.add(enchanted); - for (UUID attachmentId : enchanted.getAttachments()) { - Permanent attachment = game.getPermanent(attachmentId); - if (attachment != null && attachment.getSubtype(game).contains("Aura")) { - toHand.add(attachment); - } - } - controller.moveCards(toHand, Zone.HAND, source, game); - return true; - } - } - return false; - } -} +/* + * 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.cards.m; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class MarkOfEviction extends CardImpl { + + public MarkOfEviction(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // At the beginning of your upkeep, return enchanted creature and all Auras attached to that creature to their owners' hands. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new MarkOfEvictionEffect(), TargetController.YOU, false)); + } + + public MarkOfEviction(final MarkOfEviction card) { + super(card); + } + + @Override + public MarkOfEviction copy() { + return new MarkOfEviction(this); + } +} + +class MarkOfEvictionEffect extends OneShotEffect { + + public MarkOfEvictionEffect() { + super(Outcome.Benefit); + this.staticText = "return enchanted creature and all Auras attached to that creature to their owners' hands"; + } + + public MarkOfEvictionEffect(final MarkOfEvictionEffect effect) { + super(effect); + } + + @Override + public MarkOfEvictionEffect copy() { + return new MarkOfEvictionEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent sourceObject = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (controller != null && sourceObject != null && sourceObject.getAttachedTo() != null) { + Permanent enchanted = game.getPermanent(sourceObject.getAttachedTo()); + if (enchanted != null) { + Set toHand = new HashSet<>(); + toHand.add(enchanted); + for (UUID attachmentId : enchanted.getAttachments()) { + Permanent attachment = game.getPermanent(attachmentId); + if (attachment != null && attachment.hasSubtype(SubType.AURA, game)) { + toHand.add(attachment); + } + } + controller.moveCards(toHand, Zone.HAND, source, game); + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/m/MarkOfFury.java b/Mage.Sets/src/mage/cards/m/MarkOfFury.java index 7e9909a74e..9b940774f2 100644 --- a/Mage.Sets/src/mage/cards/m/MarkOfFury.java +++ b/Mage.Sets/src/mage/cards/m/MarkOfFury.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class MarkOfFury extends CardImpl { public MarkOfFury(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/m/MarkOfSakiko.java b/Mage.Sets/src/mage/cards/m/MarkOfSakiko.java index 27932f60a8..b1c9e4b8d3 100644 --- a/Mage.Sets/src/mage/cards/m/MarkOfSakiko.java +++ b/Mage.Sets/src/mage/cards/m/MarkOfSakiko.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -59,7 +60,7 @@ public class MarkOfSakiko extends CardImpl { public MarkOfSakiko(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/m/MarkOfTheOni.java b/Mage.Sets/src/mage/cards/m/MarkOfTheOni.java index 81945fc367..6e4985da0a 100644 --- a/Mage.Sets/src/mage/cards/m/MarkOfTheOni.java +++ b/Mage.Sets/src/mage/cards/m/MarkOfTheOni.java @@ -53,7 +53,7 @@ public class MarkOfTheOni extends CardImpl { public MarkOfTheOni(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/m/MarkOfTheVampire.java b/Mage.Sets/src/mage/cards/m/MarkOfTheVampire.java index 3322c75f71..1e19206300 100644 --- a/Mage.Sets/src/mage/cards/m/MarkOfTheVampire.java +++ b/Mage.Sets/src/mage/cards/m/MarkOfTheVampire.java @@ -28,6 +28,7 @@ package mage.cards.m; import java.util.UUID; +import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; @@ -40,6 +41,7 @@ import mage.constants.AttachmentType; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -51,9 +53,8 @@ import mage.target.common.TargetCreaturePermanent; public class MarkOfTheVampire extends CardImpl { public MarkOfTheVampire(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}"); - this.subtype.add("Aura"); - + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent target = new TargetCreaturePermanent(); @@ -62,8 +63,9 @@ public class MarkOfTheVampire extends CardImpl { this.addAbility(new EnchantAbility(target.getTargetName())); // Enchanted creature gets +2/+2 and has lifelink. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(LifelinkAbility.getInstance(), AttachmentType.AURA))); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield)); + ability.addEffect(new GainAbilityAttachedEffect(LifelinkAbility.getInstance(), AttachmentType.AURA).setText("and has lifelink")); + this.addAbility(ability); } public MarkOfTheVampire(final MarkOfTheVampire card) { diff --git a/Mage.Sets/src/mage/cards/m/MarkedByHonor.java b/Mage.Sets/src/mage/cards/m/MarkedByHonor.java index c20562c1d0..4771ec5a02 100644 --- a/Mage.Sets/src/mage/cards/m/MarkedByHonor.java +++ b/Mage.Sets/src/mage/cards/m/MarkedByHonor.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class MarkedByHonor extends CardImpl { public MarkedByHonor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/m/MarkerBeetles.java b/Mage.Sets/src/mage/cards/m/MarkerBeetles.java index df26bec587..70c223a07c 100644 --- a/Mage.Sets/src/mage/cards/m/MarkerBeetles.java +++ b/Mage.Sets/src/mage/cards/m/MarkerBeetles.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -51,7 +52,7 @@ public class MarkerBeetles extends CardImpl { public MarkerBeetles(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MarketFestival.java b/Mage.Sets/src/mage/cards/m/MarketFestival.java index 8d4a7261ca..c8f0680272 100644 --- a/Mage.Sets/src/mage/cards/m/MarketFestival.java +++ b/Mage.Sets/src/mage/cards/m/MarketFestival.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.choices.ChoiceColor; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -57,7 +58,7 @@ public class MarketFestival extends CardImpl { public MarketFestival(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land diff --git a/Mage.Sets/src/mage/cards/m/MarkovBlademaster.java b/Mage.Sets/src/mage/cards/m/MarkovBlademaster.java index 126ab07259..8ed744684a 100644 --- a/Mage.Sets/src/mage/cards/m/MarkovBlademaster.java +++ b/Mage.Sets/src/mage/cards/m/MarkovBlademaster.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,8 +46,8 @@ public class MarkovBlademaster extends CardImpl { public MarkovBlademaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Vampire"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MarkovCrusader.java b/Mage.Sets/src/mage/cards/m/MarkovCrusader.java index b89690e0e7..83f256a122 100644 --- a/Mage.Sets/src/mage/cards/m/MarkovCrusader.java +++ b/Mage.Sets/src/mage/cards/m/MarkovCrusader.java @@ -61,8 +61,8 @@ public class MarkovCrusader extends CardImpl { public MarkovCrusader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Knight"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MarkovDreadknight.java b/Mage.Sets/src/mage/cards/m/MarkovDreadknight.java index 573ea6156b..27f81163a8 100644 --- a/Mage.Sets/src/mage/cards/m/MarkovDreadknight.java +++ b/Mage.Sets/src/mage/cards/m/MarkovDreadknight.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -49,8 +50,8 @@ public class MarkovDreadknight extends CardImpl { public MarkovDreadknight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Knight"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MarkovPatrician.java b/Mage.Sets/src/mage/cards/m/MarkovPatrician.java index f66ec1d128..8a03e5f4c0 100644 --- a/Mage.Sets/src/mage/cards/m/MarkovPatrician.java +++ b/Mage.Sets/src/mage/cards/m/MarkovPatrician.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class MarkovPatrician extends CardImpl { public MarkovPatrician(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MarkovWarlord.java b/Mage.Sets/src/mage/cards/m/MarkovWarlord.java index f78ca9050b..dc0fb78d41 100644 --- a/Mage.Sets/src/mage/cards/m/MarkovWarlord.java +++ b/Mage.Sets/src/mage/cards/m/MarkovWarlord.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -46,8 +47,8 @@ public class MarkovWarlord extends CardImpl { public MarkovWarlord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Vampire"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MarkovsServant.java b/Mage.Sets/src/mage/cards/m/MarkovsServant.java index d5c0ee2e9e..9310330be1 100644 --- a/Mage.Sets/src/mage/cards/m/MarkovsServant.java +++ b/Mage.Sets/src/mage/cards/m/MarkovsServant.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class MarkovsServant extends CardImpl { public MarkovsServant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},null); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.color.setBlack(true); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/Maro.java b/Mage.Sets/src/mage/cards/m/Maro.java index e2883e014e..ae80d60da9 100644 --- a/Mage.Sets/src/mage/cards/m/Maro.java +++ b/Mage.Sets/src/mage/cards/m/Maro.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class Maro extends CardImpl { public Maro(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MarrowBats.java b/Mage.Sets/src/mage/cards/m/MarrowBats.java index cc221d6d4f..7a5b89a8dc 100644 --- a/Mage.Sets/src/mage/cards/m/MarrowBats.java +++ b/Mage.Sets/src/mage/cards/m/MarrowBats.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class MarrowBats extends CardImpl { public MarrowBats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Bat"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.BAT); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MarrowChomper.java b/Mage.Sets/src/mage/cards/m/MarrowChomper.java index 088d4dc38c..55e400aa9d 100644 --- a/Mage.Sets/src/mage/cards/m/MarrowChomper.java +++ b/Mage.Sets/src/mage/cards/m/MarrowChomper.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DevourAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class MarrowChomper extends CardImpl { public MarrowChomper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{G}"); - this.subtype.add("Zombie"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.LIZARD); diff --git a/Mage.Sets/src/mage/cards/m/MarrowGnawer.java b/Mage.Sets/src/mage/cards/m/MarrowGnawer.java index 523b120917..14c7678c98 100644 --- a/Mage.Sets/src/mage/cards/m/MarrowGnawer.java +++ b/Mage.Sets/src/mage/cards/m/MarrowGnawer.java @@ -68,8 +68,8 @@ public class MarrowGnawer extends CardImpl { public MarrowGnawer (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Rat"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.RAT); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MarshBoa.java b/Mage.Sets/src/mage/cards/m/MarshBoa.java index 249932a287..c0ac88ad43 100644 --- a/Mage.Sets/src/mage/cards/m/MarshBoa.java +++ b/Mage.Sets/src/mage/cards/m/MarshBoa.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class MarshBoa extends CardImpl { public MarshBoa(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MarshCrocodile.java b/Mage.Sets/src/mage/cards/m/MarshCrocodile.java index 74ae2188e9..05e8ab7af7 100644 --- a/Mage.Sets/src/mage/cards/m/MarshCrocodile.java +++ b/Mage.Sets/src/mage/cards/m/MarshCrocodile.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -55,7 +56,7 @@ public class MarshCrocodile extends CardImpl { public MarshCrocodile(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{B}"); - this.subtype.add("Crocodile"); + this.subtype.add(SubType.CROCODILE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MarshFlitter.java b/Mage.Sets/src/mage/cards/m/MarshFlitter.java index eed3a66535..63469b07b5 100644 --- a/Mage.Sets/src/mage/cards/m/MarshFlitter.java +++ b/Mage.Sets/src/mage/cards/m/MarshFlitter.java @@ -59,8 +59,8 @@ public class MarshFlitter extends CardImpl { public MarshFlitter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Faerie"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MarshGoblins.java b/Mage.Sets/src/mage/cards/m/MarshGoblins.java index 2d4738337c..ece9e86905 100644 --- a/Mage.Sets/src/mage/cards/m/MarshGoblins.java +++ b/Mage.Sets/src/mage/cards/m/MarshGoblins.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class MarshGoblins extends CardImpl { public MarshGoblins(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MarshHulk.java b/Mage.Sets/src/mage/cards/m/MarshHulk.java index 7a1af5443a..6681f1c939 100644 --- a/Mage.Sets/src/mage/cards/m/MarshHulk.java +++ b/Mage.Sets/src/mage/cards/m/MarshHulk.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class MarshHulk extends CardImpl { public MarshHulk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Ogre"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.OGRE); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/m/MarshLurker.java b/Mage.Sets/src/mage/cards/m/MarshLurker.java index 109d9f3bf0..f57c232265 100644 --- a/Mage.Sets/src/mage/cards/m/MarshLurker.java +++ b/Mage.Sets/src/mage/cards/m/MarshLurker.java @@ -57,7 +57,7 @@ public class MarshLurker extends CardImpl { public MarshLurker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MarshThreader.java b/Mage.Sets/src/mage/cards/m/MarshThreader.java index bf3f411ab5..c27772f6be 100644 --- a/Mage.Sets/src/mage/cards/m/MarshThreader.java +++ b/Mage.Sets/src/mage/cards/m/MarshThreader.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class MarshThreader extends CardImpl { public MarshThreader (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Scout"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SCOUT); this.color.setWhite(true); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MarshViper.java b/Mage.Sets/src/mage/cards/m/MarshViper.java index bec681c6a4..0f7a48f5e0 100644 --- a/Mage.Sets/src/mage/cards/m/MarshViper.java +++ b/Mage.Sets/src/mage/cards/m/MarshViper.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddPoisonCounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class MarshViper extends CardImpl { public MarshViper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MarshdrinkerGiant.java b/Mage.Sets/src/mage/cards/m/MarshdrinkerGiant.java index d69d9b7f3d..05f6cbed93 100644 --- a/Mage.Sets/src/mage/cards/m/MarshdrinkerGiant.java +++ b/Mage.Sets/src/mage/cards/m/MarshdrinkerGiant.java @@ -60,8 +60,8 @@ public class MarshdrinkerGiant extends CardImpl { public MarshdrinkerGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MarshmistTitan.java b/Mage.Sets/src/mage/cards/m/MarshmistTitan.java index 9bb374f2de..d623f3dfbc 100644 --- a/Mage.Sets/src/mage/cards/m/MarshmistTitan.java +++ b/Mage.Sets/src/mage/cards/m/MarshmistTitan.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.cost.CostModificationEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.CostModificationType; import mage.constants.Duration; @@ -53,7 +54,7 @@ public class MarshmistTitan extends CardImpl { public MarshmistTitan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{B}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MartonStromgald.java b/Mage.Sets/src/mage/cards/m/MartonStromgald.java index 0d510b5fc6..4716cb9004 100644 --- a/Mage.Sets/src/mage/cards/m/MartonStromgald.java +++ b/Mage.Sets/src/mage/cards/m/MartonStromgald.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.filter.common.FilterAttackingCreature; @@ -59,8 +60,8 @@ public class MartonStromgald extends CardImpl { public MartonStromgald(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MartyrOfAshes.java b/Mage.Sets/src/mage/cards/m/MartyrOfAshes.java index 7801c5e738..13a8b52c9d 100644 --- a/Mage.Sets/src/mage/cards/m/MartyrOfAshes.java +++ b/Mage.Sets/src/mage/cards/m/MartyrOfAshes.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.common.FilterCreaturePermanent; @@ -66,8 +67,8 @@ public class MartyrOfAshes extends CardImpl { public MartyrOfAshes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MartyrOfBones.java b/Mage.Sets/src/mage/cards/m/MartyrOfBones.java index c12265a471..ef14fb0c7c 100644 --- a/Mage.Sets/src/mage/cards/m/MartyrOfBones.java +++ b/Mage.Sets/src/mage/cards/m/MartyrOfBones.java @@ -43,6 +43,7 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ColorPredicate; @@ -61,12 +62,13 @@ public class MartyrOfBones extends CardImpl { public MartyrOfBones(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); + //TODO: Make ability properly copiable // {1}, Reveal X black cards from your hand, Sacrifice Martyr of Bones: Exile up to X target cards from a single graveyard. Effect effect = new ExileTargetEffect(null, null, Zone.GRAVEYARD); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(1)); diff --git a/Mage.Sets/src/mage/cards/m/MartyrOfFrost.java b/Mage.Sets/src/mage/cards/m/MartyrOfFrost.java index 59c467da0f..d9de1dbe9f 100644 --- a/Mage.Sets/src/mage/cards/m/MartyrOfFrost.java +++ b/Mage.Sets/src/mage/cards/m/MartyrOfFrost.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.CounterUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ColorPredicate; @@ -60,8 +61,8 @@ public class MartyrOfFrost extends CardImpl { public MartyrOfFrost(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MartyrOfSands.java b/Mage.Sets/src/mage/cards/m/MartyrOfSands.java index 2d549dfdc7..b215a69bd5 100644 --- a/Mage.Sets/src/mage/cards/m/MartyrOfSands.java +++ b/Mage.Sets/src/mage/cards/m/MartyrOfSands.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ColorPredicate; @@ -61,8 +62,8 @@ public class MartyrOfSands extends CardImpl { public MartyrOfSands(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MartyrOfSpores.java b/Mage.Sets/src/mage/cards/m/MartyrOfSpores.java index 104c8d45ee..bfa15bc6cd 100644 --- a/Mage.Sets/src/mage/cards/m/MartyrOfSpores.java +++ b/Mage.Sets/src/mage/cards/m/MartyrOfSpores.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterCard; @@ -61,8 +62,8 @@ public class MartyrOfSpores extends CardImpl { public MartyrOfSpores(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MartyredRusalka.java b/Mage.Sets/src/mage/cards/m/MartyredRusalka.java index b661d42df3..7c307ef7fa 100644 --- a/Mage.Sets/src/mage/cards/m/MartyredRusalka.java +++ b/Mage.Sets/src/mage/cards/m/MartyredRusalka.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.combat.CantAttackTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -50,7 +51,7 @@ public class MartyredRusalka extends CardImpl { public MartyredRusalka(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MartyrsOfKorlis.java b/Mage.Sets/src/mage/cards/m/MartyrsOfKorlis.java index 051b24c495..24821e4f55 100644 --- a/Mage.Sets/src/mage/cards/m/MartyrsOfKorlis.java +++ b/Mage.Sets/src/mage/cards/m/MartyrsOfKorlis.java @@ -38,6 +38,7 @@ import mage.abilities.effects.RedirectionEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class MartyrsOfKorlis extends CardImpl { public MartyrsOfKorlis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/m/MasakoTheHumorless.java b/Mage.Sets/src/mage/cards/m/MasakoTheHumorless.java index 2c706550f7..9f1f9402f7 100644 --- a/Mage.Sets/src/mage/cards/m/MasakoTheHumorless.java +++ b/Mage.Sets/src/mage/cards/m/MasakoTheHumorless.java @@ -48,8 +48,8 @@ public class MasakoTheHumorless extends CardImpl { public MasakoTheHumorless(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MaskOfAvacyn.java b/Mage.Sets/src/mage/cards/m/MaskOfAvacyn.java index 616c237298..3dcde06944 100644 --- a/Mage.Sets/src/mage/cards/m/MaskOfAvacyn.java +++ b/Mage.Sets/src/mage/cards/m/MaskOfAvacyn.java @@ -47,7 +47,7 @@ public class MaskOfAvacyn extends CardImpl { public MaskOfAvacyn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equip {3} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3))); diff --git a/Mage.Sets/src/mage/cards/m/MaskOfLawAndGrace.java b/Mage.Sets/src/mage/cards/m/MaskOfLawAndGrace.java index 5acfcaabe6..5f413cfaf0 100644 --- a/Mage.Sets/src/mage/cards/m/MaskOfLawAndGrace.java +++ b/Mage.Sets/src/mage/cards/m/MaskOfLawAndGrace.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class MaskOfLawAndGrace extends CardImpl { public MaskOfLawAndGrace(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/m/MaskOfMemory.java b/Mage.Sets/src/mage/cards/m/MaskOfMemory.java index 47cd42820f..1bc255a504 100644 --- a/Mage.Sets/src/mage/cards/m/MaskOfMemory.java +++ b/Mage.Sets/src/mage/cards/m/MaskOfMemory.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; /** @@ -48,7 +49,7 @@ public class MaskOfMemory extends CardImpl { public MaskOfMemory(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Whenever equipped creature deals combat damage to a player, you may draw two cards. If you do, discard a card. Ability ability = new DealsDamageToAPlayerAttachedTriggeredAbility(new DrawCardSourceControllerEffect(2), "equipped creature", true); diff --git a/Mage.Sets/src/mage/cards/m/MaskOfRiddles.java b/Mage.Sets/src/mage/cards/m/MaskOfRiddles.java index 3184c3a5e6..a1363419a6 100644 --- a/Mage.Sets/src/mage/cards/m/MaskOfRiddles.java +++ b/Mage.Sets/src/mage/cards/m/MaskOfRiddles.java @@ -47,7 +47,7 @@ public class MaskOfRiddles extends CardImpl { public MaskOfRiddles(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{U}{B}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has fear. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FearAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/m/MaskedAdmirers.java b/Mage.Sets/src/mage/cards/m/MaskedAdmirers.java index aa795e0970..812374358a 100644 --- a/Mage.Sets/src/mage/cards/m/MaskedAdmirers.java +++ b/Mage.Sets/src/mage/cards/m/MaskedAdmirers.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -50,8 +51,8 @@ public class MaskedAdmirers extends CardImpl { public MaskedAdmirers(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MaskedGorgon.java b/Mage.Sets/src/mage/cards/m/MaskedGorgon.java index 7d1db8c01e..1cdd22d09b 100644 --- a/Mage.Sets/src/mage/cards/m/MaskedGorgon.java +++ b/Mage.Sets/src/mage/cards/m/MaskedGorgon.java @@ -62,7 +62,7 @@ public class MaskedGorgon extends CardImpl { public MaskedGorgon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Gorgon"); + this.subtype.add(SubType.GORGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MassOfGhouls.java b/Mage.Sets/src/mage/cards/m/MassOfGhouls.java index 4039ad73dd..801b8bc6d4 100644 --- a/Mage.Sets/src/mage/cards/m/MassOfGhouls.java +++ b/Mage.Sets/src/mage/cards/m/MassOfGhouls.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class MassOfGhouls extends CardImpl { public MassOfGhouls(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MassacreWurm.java b/Mage.Sets/src/mage/cards/m/MassacreWurm.java index 26b03ea713..adaac2f4fa 100644 --- a/Mage.Sets/src/mage/cards/m/MassacreWurm.java +++ b/Mage.Sets/src/mage/cards/m/MassacreWurm.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostOpponentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -55,7 +56,7 @@ public class MassacreWurm extends CardImpl { public MassacreWurm (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MassiffSwarm.java b/Mage.Sets/src/mage/cards/m/MassiffSwarm.java index cf5a5c1111..75058565a0 100644 --- a/Mage.Sets/src/mage/cards/m/MassiffSwarm.java +++ b/Mage.Sets/src/mage/cards/m/MassiffSwarm.java @@ -1,63 +1,64 @@ -/* - * 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.cards.m; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.keyword.MonstrosityAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class MassiffSwarm extends CardImpl { - - public MassiffSwarm(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Crocodile"); - this.subtype.add("Beast"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // {6}{G}: Monstrosity 3. - this.addAbility(new MonstrosityAbility("{6}{G}", 3)); - - } - - public MassiffSwarm(final MassiffSwarm card) { - super(card); - } - - @Override - public MassiffSwarm copy() { - return new MassiffSwarm(this); - } -} +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.MonstrosityAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author Styxo + */ +public class MassiffSwarm extends CardImpl { + + public MassiffSwarm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.subtype.add(SubType.CROCODILE); + this.subtype.add(SubType.BEAST); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {6}{G}: Monstrosity 3. + this.addAbility(new MonstrosityAbility("{6}{G}", 3)); + + } + + public MassiffSwarm(final MassiffSwarm card) { + super(card); + } + + @Override + public MassiffSwarm copy() { + return new MassiffSwarm(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MasterApothecary.java b/Mage.Sets/src/mage/cards/m/MasterApothecary.java index 7d775a8dbc..d967abe643 100644 --- a/Mage.Sets/src/mage/cards/m/MasterApothecary.java +++ b/Mage.Sets/src/mage/cards/m/MasterApothecary.java @@ -61,8 +61,8 @@ public class MasterApothecary extends CardImpl { public MasterApothecary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MasterBiomancer.java b/Mage.Sets/src/mage/cards/m/MasterBiomancer.java index 742088f455..60036c66d9 100644 --- a/Mage.Sets/src/mage/cards/m/MasterBiomancer.java +++ b/Mage.Sets/src/mage/cards/m/MasterBiomancer.java @@ -53,8 +53,8 @@ public class MasterBiomancer extends CardImpl { public MasterBiomancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{U}"); - this.subtype.add("Elf"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MasterDecoy.java b/Mage.Sets/src/mage/cards/m/MasterDecoy.java index 3849748474..0e69f8ed03 100644 --- a/Mage.Sets/src/mage/cards/m/MasterDecoy.java +++ b/Mage.Sets/src/mage/cards/m/MasterDecoy.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class MasterDecoy extends CardImpl { public MasterDecoy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MasterHealer.java b/Mage.Sets/src/mage/cards/m/MasterHealer.java index 4ee1f95575..7d9aaa733c 100644 --- a/Mage.Sets/src/mage/cards/m/MasterHealer.java +++ b/Mage.Sets/src/mage/cards/m/MasterHealer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class MasterHealer extends CardImpl { public MasterHealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MasterOfArms.java b/Mage.Sets/src/mage/cards/m/MasterOfArms.java index 42912d25d4..898a49171b 100644 --- a/Mage.Sets/src/mage/cards/m/MasterOfArms.java +++ b/Mage.Sets/src/mage/cards/m/MasterOfArms.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.BlockingAttackerIdPredicate; @@ -50,8 +51,8 @@ public class MasterOfArms extends CardImpl { public MasterOfArms(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MasterOfCruelties.java b/Mage.Sets/src/mage/cards/m/MasterOfCruelties.java index 56dc45a1e8..782e70b6e7 100644 --- a/Mage.Sets/src/mage/cards/m/MasterOfCruelties.java +++ b/Mage.Sets/src/mage/cards/m/MasterOfCruelties.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class MasterOfCruelties extends CardImpl { public MasterOfCruelties(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{R}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MasterOfDiversion.java b/Mage.Sets/src/mage/cards/m/MasterOfDiversion.java index 9d6a45cafb..ccde73ad0d 100644 --- a/Mage.Sets/src/mage/cards/m/MasterOfDiversion.java +++ b/Mage.Sets/src/mage/cards/m/MasterOfDiversion.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.Game; @@ -50,8 +51,8 @@ public class MasterOfDiversion extends CardImpl { public MasterOfDiversion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MasterOfEtherium.java b/Mage.Sets/src/mage/cards/m/MasterOfEtherium.java index 0ed32b4523..f1493ae15e 100644 --- a/Mage.Sets/src/mage/cards/m/MasterOfEtherium.java +++ b/Mage.Sets/src/mage/cards/m/MasterOfEtherium.java @@ -58,8 +58,8 @@ public class MasterOfEtherium extends CardImpl { public MasterOfEtherium(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MasterOfPearls.java b/Mage.Sets/src/mage/cards/m/MasterOfPearls.java index a3d5e9e154..1b4e2a77df 100644 --- a/Mage.Sets/src/mage/cards/m/MasterOfPearls.java +++ b/Mage.Sets/src/mage/cards/m/MasterOfPearls.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; @@ -47,8 +48,8 @@ public class MasterOfPearls extends CardImpl { public MasterOfPearls(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MasterOfPredicaments.java b/Mage.Sets/src/mage/cards/m/MasterOfPredicaments.java index a736e53bb4..67edf0fb6e 100644 --- a/Mage.Sets/src/mage/cards/m/MasterOfPredicaments.java +++ b/Mage.Sets/src/mage/cards/m/MasterOfPredicaments.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.FilterCard; import mage.game.Game; @@ -52,7 +53,7 @@ public class MasterOfPredicaments extends CardImpl { public MasterOfPredicaments(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MasterOfTheFeast.java b/Mage.Sets/src/mage/cards/m/MasterOfTheFeast.java index eb44f572fc..d7c1e7d684 100644 --- a/Mage.Sets/src/mage/cards/m/MasterOfTheFeast.java +++ b/Mage.Sets/src/mage/cards/m/MasterOfTheFeast.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -45,7 +46,7 @@ public class MasterOfTheFeast extends CardImpl { public MasterOfTheFeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MasterOfThePearlTrident.java b/Mage.Sets/src/mage/cards/m/MasterOfThePearlTrident.java index 734ca5f071..ddd4e23464 100644 --- a/Mage.Sets/src/mage/cards/m/MasterOfThePearlTrident.java +++ b/Mage.Sets/src/mage/cards/m/MasterOfThePearlTrident.java @@ -56,7 +56,7 @@ public class MasterOfThePearlTrident extends CardImpl { public MasterOfThePearlTrident(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MasterOfTheVeil.java b/Mage.Sets/src/mage/cards/m/MasterOfTheVeil.java new file mode 100644 index 0000000000..4796929231 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MasterOfTheVeil.java @@ -0,0 +1,120 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; +import mage.constants.SubType; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BecomesFaceDownCreatureAllEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicate; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.filter.predicate.permanent.PermanentIdPredicate; +import mage.game.Game; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class MasterOfTheVeil extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with a morph ability"); + + static { + filter.add(new AbilityPredicate(MorphAbility.class)); + } + + public MasterOfTheVeil(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Morph {2}{U} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{U}"))); + + // When Master of the Veil is turned face up, you may turn target creature with a morph ability face down. + Ability ability = new TurnedFaceUpSourceTriggeredAbility(new MasterOfTheVeilEffect(), false, true); + ability.addTarget(new TargetCreaturePermanent(1, 1, filter, false)); + this.addAbility(ability); + } + + public MasterOfTheVeil(final MasterOfTheVeil card) { + super(card); + } + + @Override + public MasterOfTheVeil copy() { + return new MasterOfTheVeil(this); + } +} + +class MasterOfTheVeilEffect extends OneShotEffect { + + MasterOfTheVeilEffect() { + super(Outcome.Benefit); + this.staticText = "turn target creature with a morph ability face down"; + } + + MasterOfTheVeilEffect(final MasterOfTheVeilEffect effect) { + super(effect); + } + + @Override + public MasterOfTheVeilEffect copy() { + return new MasterOfTheVeilEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Predicate pred = new PermanentIdPredicate(UUID.randomUUID()); + for (Target target : source.getTargets()) { + for (UUID targetId : target.getTargets()) { + pred = Predicates.or(pred, new PermanentIdPredicate(targetId)); + } + } + FilterCreaturePermanent filter = new FilterCreaturePermanent(); + filter.add(pred); + game.addEffect(new BecomesFaceDownCreatureAllEffect(filter), source); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/m/MasterOfTheWildHunt.java b/Mage.Sets/src/mage/cards/m/MasterOfTheWildHunt.java index 9a82b1b219..943fa398ef 100644 --- a/Mage.Sets/src/mage/cards/m/MasterOfTheWildHunt.java +++ b/Mage.Sets/src/mage/cards/m/MasterOfTheWildHunt.java @@ -64,8 +64,8 @@ public class MasterOfTheWildHunt extends CardImpl { public MasterOfTheWildHunt(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MasterOfWaves.java b/Mage.Sets/src/mage/cards/m/MasterOfWaves.java index b1a64cd4ae..336583b051 100644 --- a/Mage.Sets/src/mage/cards/m/MasterOfWaves.java +++ b/Mage.Sets/src/mage/cards/m/MasterOfWaves.java @@ -57,8 +57,8 @@ public class MasterOfWaves extends CardImpl { public MasterOfWaves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MasterSplicer.java b/Mage.Sets/src/mage/cards/m/MasterSplicer.java index 379c5b0081..2d162a219f 100644 --- a/Mage.Sets/src/mage/cards/m/MasterSplicer.java +++ b/Mage.Sets/src/mage/cards/m/MasterSplicer.java @@ -57,8 +57,8 @@ public class MasterSplicer extends CardImpl { public MasterSplicer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MasterThief.java b/Mage.Sets/src/mage/cards/m/MasterThief.java index 3df28d433e..c989f62dfe 100644 --- a/Mage.Sets/src/mage/cards/m/MasterThief.java +++ b/Mage.Sets/src/mage/cards/m/MasterThief.java @@ -25,49 +25,42 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.m; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; import mage.abilities.condition.common.SourceOnBattlefieldControlUnchangedCondition; import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; -import mage.filter.FilterPermanent; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.target.TargetPermanent; +import mage.target.common.TargetArtifactPermanent; /** * @author Loki */ public class MasterThief extends CardImpl { - private static final FilterPermanent filter = new FilterPermanent("artifact"); - static { - filter.add(new CardTypePredicate(CardType.ARTIFACT)); - } - public MasterThief(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); // When Master Thief enters the battlefield, gain control of target artifact for as long as you control Master Thief. - ConditionalContinuousEffect effect = new ConditionalContinuousEffect( + Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(new ConditionalContinuousEffect( new GainControlTargetEffect(Duration.Custom), new SourceOnBattlefieldControlUnchangedCondition(), - "gain control of target artifact for as long as you control Master Thief"); - Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); - ability.addTarget(new TargetPermanent(filter)); + "gain control of target artifact for as long as you control {this}" + ), false); + ability.addTarget(new TargetArtifactPermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MasterTransmuter.java b/Mage.Sets/src/mage/cards/m/MasterTransmuter.java index 14bb7d5fff..c9e2b9359b 100644 --- a/Mage.Sets/src/mage/cards/m/MasterTransmuter.java +++ b/Mage.Sets/src/mage/cards/m/MasterTransmuter.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.PutPermanentOnBattlefieldEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterArtifactCard; import mage.filter.common.FilterControlledArtifactPermanent; @@ -51,8 +52,8 @@ public class MasterTransmuter extends CardImpl { public MasterTransmuter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MasterTrinketeer.java b/Mage.Sets/src/mage/cards/m/MasterTrinketeer.java index afcf2ab54c..e91391e8b3 100644 --- a/Mage.Sets/src/mage/cards/m/MasterTrinketeer.java +++ b/Mage.Sets/src/mage/cards/m/MasterTrinketeer.java @@ -60,8 +60,8 @@ public class MasterTrinketeer extends CardImpl { public MasterTrinketeer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Dwarf"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MasterworkOfIngenuity.java b/Mage.Sets/src/mage/cards/m/MasterworkOfIngenuity.java index 2e00887011..7071b7734b 100644 --- a/Mage.Sets/src/mage/cards/m/MasterworkOfIngenuity.java +++ b/Mage.Sets/src/mage/cards/m/MasterworkOfIngenuity.java @@ -53,7 +53,7 @@ public class MasterworkOfIngenuity extends CardImpl { public MasterworkOfIngenuity(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // You may have Masterwork of Ingenuity enter the battlefield as a copy of any Equipment on the battlefield. this.addAbility(new EntersBattlefieldAbility(new CopyPermanentEffect(filter), true)); diff --git a/Mage.Sets/src/mage/cards/m/Masticore.java b/Mage.Sets/src/mage/cards/m/Masticore.java index 11d133686d..313797ae40 100644 --- a/Mage.Sets/src/mage/cards/m/Masticore.java +++ b/Mage.Sets/src/mage/cards/m/Masticore.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.target.common.TargetCardInHand; @@ -53,7 +54,7 @@ public class Masticore extends CardImpl { public Masticore(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Masticore"); + this.subtype.add(SubType.MASTICORE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MasumaroFirstToLive.java b/Mage.Sets/src/mage/cards/m/MasumaroFirstToLive.java index 3064e3faa9..ab9c354b35 100644 --- a/Mage.Sets/src/mage/cards/m/MasumaroFirstToLive.java +++ b/Mage.Sets/src/mage/cards/m/MasumaroFirstToLive.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class MasumaroFirstToLive extends CardImpl { public MasumaroFirstToLive(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MatcaRioters.java b/Mage.Sets/src/mage/cards/m/MatcaRioters.java index efc1f2449b..deea656978 100644 --- a/Mage.Sets/src/mage/cards/m/MatcaRioters.java +++ b/Mage.Sets/src/mage/cards/m/MatcaRioters.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class MatcaRioters extends CardImpl { public MatcaRioters(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MathasFiendSeeker.java b/Mage.Sets/src/mage/cards/m/MathasFiendSeeker.java index e123dd9db1..60a0c81692 100644 --- a/Mage.Sets/src/mage/cards/m/MathasFiendSeeker.java +++ b/Mage.Sets/src/mage/cards/m/MathasFiendSeeker.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SuperType; @@ -70,7 +71,7 @@ public class MathasFiendSeeker extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{W}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -82,9 +83,7 @@ public class MathasFiendSeeker extends CardImpl { ability.addTarget(new TargetCreaturePermanent(filter)); Ability ability2 = new DiesTriggeredAbility(new DrawCardAllEffect(1, TargetController.OPPONENT)); ability2.addEffect(new OpponentsGainLifeEffect()); - Effect effect = new MathasFiendSeekerGainAbilityEffect( - ability2, - Duration.Custom, rule); + Effect effect = new MathasFiendSeekerGainAbilityEffect(ability2, Duration.Custom, rule); ability.addEffect(effect); this.addAbility(ability); } @@ -111,8 +110,8 @@ class MathasFiendSeekerGainAbilityEffect extends GainAbilityTargetEffect { @Override public boolean isInactive(Ability source, Game game) { - Permanent land = game.getPermanent(this.targetPointer.getFirst(game, source)); - if (land != null && land.getCounters(game).getCount(CounterType.BOUNTY) < 1) { + Permanent creature = game.getPermanent(this.targetPointer.getFirst(game, source)); + if (creature != null && creature.getCounters(game).getCount(CounterType.BOUNTY) < 1) { return true; } return false; @@ -128,7 +127,7 @@ class OpponentsGainLifeEffect extends OneShotEffect { public OpponentsGainLifeEffect() { super(Outcome.GainLife); - staticText = "Each opponent gains 2 life."; + staticText = "and gains 2 life."; } public OpponentsGainLifeEffect(final OpponentsGainLifeEffect effect) { diff --git a/Mage.Sets/src/mage/cards/m/MatsuTribeBirdstalker.java b/Mage.Sets/src/mage/cards/m/MatsuTribeBirdstalker.java index f3cb95439b..89f576e0b1 100644 --- a/Mage.Sets/src/mage/cards/m/MatsuTribeBirdstalker.java +++ b/Mage.Sets/src/mage/cards/m/MatsuTribeBirdstalker.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,9 +52,9 @@ public class MatsuTribeBirdstalker extends CardImpl { public MatsuTribeBirdstalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Snake"); - this.subtype.add("Warrior"); - this.subtype.add("Archer"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MatsuTribeDecoy.java b/Mage.Sets/src/mage/cards/m/MatsuTribeDecoy.java index 597a78b719..e1fb9f15d7 100644 --- a/Mage.Sets/src/mage/cards/m/MatsuTribeDecoy.java +++ b/Mage.Sets/src/mage/cards/m/MatsuTribeDecoy.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.combat.MustBeBlockedByTargetSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class MatsuTribeDecoy extends CardImpl { public MatsuTribeDecoy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Snake"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MatsuTribeSniper.java b/Mage.Sets/src/mage/cards/m/MatsuTribeSniper.java index cec2110d82..ec3a913052 100644 --- a/Mage.Sets/src/mage/cards/m/MatsuTribeSniper.java +++ b/Mage.Sets/src/mage/cards/m/MatsuTribeSniper.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -59,9 +60,9 @@ public class MatsuTribeSniper extends CardImpl { public MatsuTribeSniper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Snake"); - this.subtype.add("Warrior"); - this.subtype.add("Archer"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MatterReshaper.java b/Mage.Sets/src/mage/cards/m/MatterReshaper.java index 22ee558551..8a7f6aef6c 100644 --- a/Mage.Sets/src/mage/cards/m/MatterReshaper.java +++ b/Mage.Sets/src/mage/cards/m/MatterReshaper.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class MatterReshaper extends CardImpl { public MatterReshaper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{C}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MaulSplicer.java b/Mage.Sets/src/mage/cards/m/MaulSplicer.java index b970375311..7477090f03 100644 --- a/Mage.Sets/src/mage/cards/m/MaulSplicer.java +++ b/Mage.Sets/src/mage/cards/m/MaulSplicer.java @@ -60,8 +60,8 @@ public class MaulSplicer extends CardImpl { public MaulSplicer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MaulfistDoorbuster.java b/Mage.Sets/src/mage/cards/m/MaulfistDoorbuster.java index 3c075ff28e..34fdba8e85 100644 --- a/Mage.Sets/src/mage/cards/m/MaulfistDoorbuster.java +++ b/Mage.Sets/src/mage/cards/m/MaulfistDoorbuster.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class MaulfistDoorbuster extends CardImpl { public MaulfistDoorbuster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MaulfistRevolutionary.java b/Mage.Sets/src/mage/cards/m/MaulfistRevolutionary.java index 499006c4b2..b580ca2f33 100644 --- a/Mage.Sets/src/mage/cards/m/MaulfistRevolutionary.java +++ b/Mage.Sets/src/mage/cards/m/MaulfistRevolutionary.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.Counter; import mage.counters.CounterType; @@ -55,8 +56,8 @@ public class MaulfistRevolutionary extends CardImpl { public MaulfistRevolutionary(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MaulfistSquad.java b/Mage.Sets/src/mage/cards/m/MaulfistSquad.java index cab8f63dac..21ba08c1b1 100644 --- a/Mage.Sets/src/mage/cards/m/MaulfistSquad.java +++ b/Mage.Sets/src/mage/cards/m/MaulfistSquad.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class MaulfistSquad extends CardImpl { public MaulfistSquad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MausoleumGuard.java b/Mage.Sets/src/mage/cards/m/MausoleumGuard.java index a6094f6f84..c9534096cd 100644 --- a/Mage.Sets/src/mage/cards/m/MausoleumGuard.java +++ b/Mage.Sets/src/mage/cards/m/MausoleumGuard.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.SpiritWhiteToken; /** @@ -43,8 +44,8 @@ public class MausoleumGuard extends CardImpl { public MausoleumGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MausoleumTurnkey.java b/Mage.Sets/src/mage/cards/m/MausoleumTurnkey.java index acf71a30fa..d703318cc3 100644 --- a/Mage.Sets/src/mage/cards/m/MausoleumTurnkey.java +++ b/Mage.Sets/src/mage/cards/m/MausoleumTurnkey.java @@ -1,124 +1,125 @@ -/* - * 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.cards.m; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.common.FilterCreatureCard; -import mage.filter.predicate.other.OwnerIdPredicate; -import mage.game.Game; -import mage.players.Player; -import mage.target.Target; -import mage.target.common.TargetCardInGraveyard; -import mage.target.common.TargetOpponent; - -/** - * - * @author LevelX2 - */ -public class MausoleumTurnkey extends CardImpl { - - public MausoleumTurnkey(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - - this.subtype.add("Ogre"); - this.subtype.add("Rogue"); - this.power = new MageInt(3); - this.toughness = new MageInt(2); - - // When Mausoleum Turnkey enters the battlefield, return target creature card of an opponent's choice from your graveyard to your hand. - this.addAbility(new EntersBattlefieldTriggeredAbility(new MausoleumTurnkeyEffect(), false)); - - } - - public MausoleumTurnkey(final MausoleumTurnkey card) { - super(card); - } - - @Override - public MausoleumTurnkey copy() { - return new MausoleumTurnkey(this); - } -} - -class MausoleumTurnkeyEffect extends OneShotEffect { - - public MausoleumTurnkeyEffect() { - super(Outcome.Benefit); - this.staticText = "return target creature card of an opponent's choice from your graveyard to your hand"; - } - - public MausoleumTurnkeyEffect(final MausoleumTurnkeyEffect effect) { - super(effect); - } - - @Override - public MausoleumTurnkeyEffect copy() { - return new MausoleumTurnkeyEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - UUID opponentId = null; - if (game.getOpponents(controller.getId()).size() > 1) { - Target target = new TargetOpponent(true); - if (controller.chooseTarget(outcome, target, source, game)) { - opponentId = target.getFirstTarget(); - } - } else { - opponentId = game.getOpponents(controller.getId()).iterator().next(); - } - if (opponentId != null) { - Player opponent = game.getPlayer(opponentId); - if (opponent != null) { - FilterCreatureCard filter = new FilterCreatureCard("creature card from " + controller.getLogName() + " graveyard"); - filter.add(new OwnerIdPredicate(controller.getId())); - Target target = new TargetCardInGraveyard(filter); - opponent.chooseTarget(outcome, target, source, game); - Card card = game.getCard(target.getFirstTarget()); - if (card != null) { - controller.moveCards(card, Zone.HAND, source, game); - } - } - } - return true; - } - return false; - } -} +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.other.OwnerIdPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCardInGraveyard; +import mage.target.common.TargetOpponent; + +/** + * + * @author LevelX2 + */ +public class MausoleumTurnkey extends CardImpl { + + public MausoleumTurnkey(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.ROGUE); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // When Mausoleum Turnkey enters the battlefield, return target creature card of an opponent's choice from your graveyard to your hand. + this.addAbility(new EntersBattlefieldTriggeredAbility(new MausoleumTurnkeyEffect(), false)); + + } + + public MausoleumTurnkey(final MausoleumTurnkey card) { + super(card); + } + + @Override + public MausoleumTurnkey copy() { + return new MausoleumTurnkey(this); + } +} + +class MausoleumTurnkeyEffect extends OneShotEffect { + + public MausoleumTurnkeyEffect() { + super(Outcome.Benefit); + this.staticText = "return target creature card of an opponent's choice from your graveyard to your hand"; + } + + public MausoleumTurnkeyEffect(final MausoleumTurnkeyEffect effect) { + super(effect); + } + + @Override + public MausoleumTurnkeyEffect copy() { + return new MausoleumTurnkeyEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + UUID opponentId = null; + if (game.getOpponents(controller.getId()).size() > 1) { + Target target = new TargetOpponent(true); + if (controller.chooseTarget(outcome, target, source, game)) { + opponentId = target.getFirstTarget(); + } + } else { + opponentId = game.getOpponents(controller.getId()).iterator().next(); + } + if (opponentId != null) { + Player opponent = game.getPlayer(opponentId); + if (opponent != null) { + FilterCreatureCard filter = new FilterCreatureCard("creature card from " + controller.getLogName() + " graveyard"); + filter.add(new OwnerIdPredicate(controller.getId())); + Target target = new TargetCardInGraveyard(filter); + opponent.chooseTarget(outcome, target, source, game); + Card card = game.getCard(target.getFirstTarget()); + if (card != null) { + controller.moveCards(card, Zone.HAND, source, game); + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/m/MausoleumWanderer.java b/Mage.Sets/src/mage/cards/m/MausoleumWanderer.java index 380bbb361a..ccac2ee281 100644 --- a/Mage.Sets/src/mage/cards/m/MausoleumWanderer.java +++ b/Mage.Sets/src/mage/cards/m/MausoleumWanderer.java @@ -63,7 +63,7 @@ public class MausoleumWanderer extends CardImpl { public MausoleumWanderer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MaverickThopterist.java b/Mage.Sets/src/mage/cards/m/MaverickThopterist.java index b7696c26be..c405cc2288 100644 --- a/Mage.Sets/src/mage/cards/m/MaverickThopterist.java +++ b/Mage.Sets/src/mage/cards/m/MaverickThopterist.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ImproviseAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.ThopterColorlessToken; /** @@ -46,8 +47,8 @@ public class MaverickThopterist extends CardImpl { public MaverickThopterist(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{R}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MavrenFeinDuskApostle.java b/Mage.Sets/src/mage/cards/m/MavrenFeinDuskApostle.java new file mode 100644 index 0000000000..5f0834f82b --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MavrenFeinDuskApostle.java @@ -0,0 +1,123 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.IxalanVampireToken; + +/** + * + * @author TheElk801 + */ +public class MavrenFeinDuskApostle extends CardImpl { + + public MavrenFeinDuskApostle(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever one or more nontoken Vampires you control attack, create a 1/1 white Vampire creature token with lifelink. + this.addAbility(new MavrenFeinDuskApostleTriggeredAbility()); + } + + public MavrenFeinDuskApostle(final MavrenFeinDuskApostle card) { + super(card); + } + + @Override + public MavrenFeinDuskApostle copy() { + return new MavrenFeinDuskApostle(this); + } +} + +class MavrenFeinDuskApostleTriggeredAbility extends TriggeredAbilityImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nontoken Vampires you control"); + + static { + filter.add(new SubtypePredicate(SubType.VAMPIRE)); + filter.add(Predicates.not(new TokenPredicate())); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public MavrenFeinDuskApostleTriggeredAbility() { + super(Zone.BATTLEFIELD, new CreateTokenEffect(new IxalanVampireToken()), false); + } + + public MavrenFeinDuskApostleTriggeredAbility(final MavrenFeinDuskApostleTriggeredAbility ability) { + super(ability); + } + + @Override + public MavrenFeinDuskApostleTriggeredAbility copy() { + return new MavrenFeinDuskApostleTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DECLARED_ATTACKERS; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + for (UUID creatureId : game.getCombat().getAttackers()) { + Permanent creature = game.getPermanent(creatureId); + if (creature != null && filter.match(creature, game) && creature.getControllerId().equals(controllerId)) { + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever one or more nontoken Vampires you control attack, " + super.getRule(); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MawOfKozilek.java b/Mage.Sets/src/mage/cards/m/MawOfKozilek.java index 00099a2d68..91cb05bedd 100644 --- a/Mage.Sets/src/mage/cards/m/MawOfKozilek.java +++ b/Mage.Sets/src/mage/cards/m/MawOfKozilek.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class MawOfKozilek extends CardImpl { public MawOfKozilek(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MawOfTheObzedat.java b/Mage.Sets/src/mage/cards/m/MawOfTheObzedat.java index ec6786ff54..eab32a37b7 100644 --- a/Mage.Sets/src/mage/cards/m/MawOfTheObzedat.java +++ b/Mage.Sets/src/mage/cards/m/MawOfTheObzedat.java @@ -53,7 +53,7 @@ public class MawOfTheObzedat extends CardImpl { public MawOfTheObzedat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{B}"); - this.subtype.add("Thrull"); + this.subtype.add(SubType.THRULL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/Mawcor.java b/Mage.Sets/src/mage/cards/m/Mawcor.java index 0a61dd33ae..939f6d7291 100644 --- a/Mage.Sets/src/mage/cards/m/Mawcor.java +++ b/Mage.Sets/src/mage/cards/m/Mawcor.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,7 +49,7 @@ public class Mawcor extends CardImpl { public Mawcor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MayaelTheAnima.java b/Mage.Sets/src/mage/cards/m/MayaelTheAnima.java index ebede6804a..67b21639b5 100644 --- a/Mage.Sets/src/mage/cards/m/MayaelTheAnima.java +++ b/Mage.Sets/src/mage/cards/m/MayaelTheAnima.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.SuperType; import mage.constants.Zone; @@ -58,8 +59,8 @@ public class MayaelTheAnima extends CardImpl { public MayaelTheAnima(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MayorOfAvabruck.java b/Mage.Sets/src/mage/cards/m/MayorOfAvabruck.java index 6bf717b6d2..4421d2dd96 100644 --- a/Mage.Sets/src/mage/cards/m/MayorOfAvabruck.java +++ b/Mage.Sets/src/mage/cards/m/MayorOfAvabruck.java @@ -64,9 +64,9 @@ public class MayorOfAvabruck extends CardImpl { public MayorOfAvabruck(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Advisor"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); + this.subtype.add(SubType.WEREWOLF); this.transformable = true; this.secondSideCardClazz = HowlpackAlpha.class; diff --git a/Mage.Sets/src/mage/cards/m/MazeAbomination.java b/Mage.Sets/src/mage/cards/m/MazeAbomination.java index 2e81b0119f..e32d4b5372 100644 --- a/Mage.Sets/src/mage/cards/m/MazeAbomination.java +++ b/Mage.Sets/src/mage/cards/m/MazeAbomination.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -56,7 +57,7 @@ public class MazeAbomination extends CardImpl { public MazeAbomination (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MazeBehemoth.java b/Mage.Sets/src/mage/cards/m/MazeBehemoth.java index 8f6ba5938e..4bd819dd2f 100644 --- a/Mage.Sets/src/mage/cards/m/MazeBehemoth.java +++ b/Mage.Sets/src/mage/cards/m/MazeBehemoth.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -56,7 +57,7 @@ public class MazeBehemoth extends CardImpl { public MazeBehemoth (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MazeGlider.java b/Mage.Sets/src/mage/cards/m/MazeGlider.java index f0850b52a8..485adfde53 100644 --- a/Mage.Sets/src/mage/cards/m/MazeGlider.java +++ b/Mage.Sets/src/mage/cards/m/MazeGlider.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -56,7 +57,7 @@ public class MazeGlider extends CardImpl { public MazeGlider (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MazeRusher.java b/Mage.Sets/src/mage/cards/m/MazeRusher.java index 75b1e4a93d..fdffb934e0 100644 --- a/Mage.Sets/src/mage/cards/m/MazeRusher.java +++ b/Mage.Sets/src/mage/cards/m/MazeRusher.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -56,7 +57,7 @@ public class MazeRusher extends CardImpl { public MazeRusher (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MazeSentinel.java b/Mage.Sets/src/mage/cards/m/MazeSentinel.java index 0db569ee59..f3b2791b8e 100644 --- a/Mage.Sets/src/mage/cards/m/MazeSentinel.java +++ b/Mage.Sets/src/mage/cards/m/MazeSentinel.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -56,7 +57,7 @@ public class MazeSentinel extends CardImpl { public MazeSentinel (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/m/MazirekKraulDeathPriest.java b/Mage.Sets/src/mage/cards/m/MazirekKraulDeathPriest.java index dc1858c7c2..1478de1d2e 100644 --- a/Mage.Sets/src/mage/cards/m/MazirekKraulDeathPriest.java +++ b/Mage.Sets/src/mage/cards/m/MazirekKraulDeathPriest.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.counters.CounterType; @@ -54,8 +55,8 @@ public class MazirekKraulDeathPriest extends CardImpl { public MazirekKraulDeathPriest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Insect"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/Meadowboon.java b/Mage.Sets/src/mage/cards/m/Meadowboon.java index 8b41df1fc4..6579404a7d 100644 --- a/Mage.Sets/src/mage/cards/m/Meadowboon.java +++ b/Mage.Sets/src/mage/cards/m/Meadowboon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.filter.StaticFilters; @@ -52,7 +53,7 @@ public class Meadowboon extends CardImpl { public Meadowboon(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MeanderingTowershell.java b/Mage.Sets/src/mage/cards/m/MeanderingTowershell.java index 250d59acf8..022073192c 100644 --- a/Mage.Sets/src/mage/cards/m/MeanderingTowershell.java +++ b/Mage.Sets/src/mage/cards/m/MeanderingTowershell.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -68,7 +69,7 @@ public class MeanderingTowershell extends CardImpl { public MeanderingTowershell(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Turtle"); + this.subtype.add(SubType.TURTLE); this.power = new MageInt(5); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/m/MechanizedProduction.java b/Mage.Sets/src/mage/cards/m/MechanizedProduction.java index b05eaaa0f8..a768b685b6 100644 --- a/Mage.Sets/src/mage/cards/m/MechanizedProduction.java +++ b/Mage.Sets/src/mage/cards/m/MechanizedProduction.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.filter.common.FilterArtifactPermanent; @@ -60,7 +61,7 @@ public class MechanizedProduction extends CardImpl { public MechanizedProduction(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant artifact you control TargetPermanent auraTarget = new TargetControlledPermanent(new FilterControlledArtifactPermanent()); diff --git a/Mage.Sets/src/mage/cards/m/MeddlingMage.java b/Mage.Sets/src/mage/cards/m/MeddlingMage.java index a38550d737..950f6f544d 100644 --- a/Mage.Sets/src/mage/cards/m/MeddlingMage.java +++ b/Mage.Sets/src/mage/cards/m/MeddlingMage.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.NameACardEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,8 +54,8 @@ public class MeddlingMage extends CardImpl { public MeddlingMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MedicineRunner.java b/Mage.Sets/src/mage/cards/m/MedicineRunner.java index 7b1f9405e0..2d1af0b1d1 100644 --- a/Mage.Sets/src/mage/cards/m/MedicineRunner.java +++ b/Mage.Sets/src/mage/cards/m/MedicineRunner.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.RemoveCounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPermanent; /** @@ -45,8 +46,8 @@ public class MedicineRunner extends CardImpl { public MedicineRunner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G/W}"); - this.subtype.add("Elf"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MedomaiTheAgeless.java b/Mage.Sets/src/mage/cards/m/MedomaiTheAgeless.java index 5ee1d614b4..149db52cd1 100644 --- a/Mage.Sets/src/mage/cards/m/MedomaiTheAgeless.java +++ b/Mage.Sets/src/mage/cards/m/MedomaiTheAgeless.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class MedomaiTheAgeless extends CardImpl { public MedomaiTheAgeless(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MeganticSliver.java b/Mage.Sets/src/mage/cards/m/MeganticSliver.java index 0df67e37f4..0ad8b1539b 100644 --- a/Mage.Sets/src/mage/cards/m/MeganticSliver.java +++ b/Mage.Sets/src/mage/cards/m/MeganticSliver.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -46,7 +47,7 @@ public class MeganticSliver extends CardImpl { public MeganticSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/Megatog.java b/Mage.Sets/src/mage/cards/m/Megatog.java index c254a98993..465793ce30 100644 --- a/Mage.Sets/src/mage/cards/m/Megatog.java +++ b/Mage.Sets/src/mage/cards/m/Megatog.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -57,7 +58,7 @@ public class Megatog extends CardImpl { public Megatog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Atog"); + this.subtype.add(SubType.ATOG); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/Meglonoth.java b/Mage.Sets/src/mage/cards/m/Meglonoth.java index 0215248f7d..f066f741e1 100644 --- a/Mage.Sets/src/mage/cards/m/Meglonoth.java +++ b/Mage.Sets/src/mage/cards/m/Meglonoth.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -49,7 +50,7 @@ public class Meglonoth extends CardImpl { public Meglonoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{G}{W}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(6); @@ -96,7 +97,7 @@ class MeglonothEffect extends OneShotEffect { Permanent meglonoth = game.getPermanent(source.getSourceId()); Permanent blocked = game.getPermanent(targetPointer.getFirst(game, source)); if (blocked != null && meglonoth != null) { - game.getPlayer(blocked.getControllerId()).damage(meglonoth.getPower().getValue(), id, game, false, true); + game.getPlayer(blocked.getControllerId()).damage(meglonoth.getPower().getValue(), source.getSourceId(), game, false, true); return true; } return false; diff --git a/Mage.Sets/src/mage/cards/m/Melancholy.java b/Mage.Sets/src/mage/cards/m/Melancholy.java index 87478866d1..069dbe2067 100644 --- a/Mage.Sets/src/mage/cards/m/Melancholy.java +++ b/Mage.Sets/src/mage/cards/m/Melancholy.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class Melancholy extends CardImpl { public Melancholy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/m/MelekIzzetParagon.java b/Mage.Sets/src/mage/cards/m/MelekIzzetParagon.java index 56f50b581a..20be0a0c0b 100644 --- a/Mage.Sets/src/mage/cards/m/MelekIzzetParagon.java +++ b/Mage.Sets/src/mage/cards/m/MelekIzzetParagon.java @@ -27,7 +27,6 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SimpleStaticAbility; @@ -38,6 +37,7 @@ import mage.abilities.effects.common.continuous.PlayWithTheTopCardRevealedEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterCard; @@ -49,6 +49,8 @@ import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -66,8 +68,8 @@ public class MelekIzzetParagon extends CardImpl { public MelekIzzetParagon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Weird"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.WEIRD); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(4); @@ -131,6 +133,6 @@ class MelekIzzetParagonTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever you cast an instant or sorcery from your library, copy it. You may choose new targets for the copy."; + return "Whenever you cast an instant or sorcery spell from your library, copy it. You may choose new targets for the copy."; } } diff --git a/Mage.Sets/src/mage/cards/m/MelesseSpirit.java b/Mage.Sets/src/mage/cards/m/MelesseSpirit.java index c6bc77c8e8..5c30eaedfc 100644 --- a/Mage.Sets/src/mage/cards/m/MelesseSpirit.java +++ b/Mage.Sets/src/mage/cards/m/MelesseSpirit.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class MelesseSpirit extends CardImpl { public MelesseSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Angel"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.ANGEL); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MeletisAstronomer.java b/Mage.Sets/src/mage/cards/m/MeletisAstronomer.java index 6011b1dece..240c02d862 100644 --- a/Mage.Sets/src/mage/cards/m/MeletisAstronomer.java +++ b/Mage.Sets/src/mage/cards/m/MeletisAstronomer.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -51,8 +52,8 @@ public class MeletisAstronomer extends CardImpl { public MeletisAstronomer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MeletisCharlatan.java b/Mage.Sets/src/mage/cards/m/MeletisCharlatan.java index 9d25003537..3e2491306a 100644 --- a/Mage.Sets/src/mage/cards/m/MeletisCharlatan.java +++ b/Mage.Sets/src/mage/cards/m/MeletisCharlatan.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -55,8 +56,8 @@ public class MeletisCharlatan extends CardImpl { public MeletisCharlatan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MeliraSylvokOutcast.java b/Mage.Sets/src/mage/cards/m/MeliraSylvokOutcast.java index ff63352886..f5fc8bd06e 100644 --- a/Mage.Sets/src/mage/cards/m/MeliraSylvokOutcast.java +++ b/Mage.Sets/src/mage/cards/m/MeliraSylvokOutcast.java @@ -54,8 +54,8 @@ public class MeliraSylvokOutcast extends CardImpl { public MeliraSylvokOutcast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MelirasKeepers.java b/Mage.Sets/src/mage/cards/m/MelirasKeepers.java index 49855d138b..82d8887002 100644 --- a/Mage.Sets/src/mage/cards/m/MelirasKeepers.java +++ b/Mage.Sets/src/mage/cards/m/MelirasKeepers.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ruleModifying.CantHaveCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -44,8 +45,8 @@ public class MelirasKeepers extends CardImpl { public MelirasKeepers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MelokuTheCloudedMirror.java b/Mage.Sets/src/mage/cards/m/MelokuTheCloudedMirror.java index 0ef94d095f..8267b1c40e 100644 --- a/Mage.Sets/src/mage/cards/m/MelokuTheCloudedMirror.java +++ b/Mage.Sets/src/mage/cards/m/MelokuTheCloudedMirror.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -55,8 +56,8 @@ public class MelokuTheCloudedMirror extends CardImpl { public MelokuTheCloudedMirror(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Moonfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MOONFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/Memnarch.java b/Mage.Sets/src/mage/cards/m/Memnarch.java index 0faf446e55..1d4e583c06 100644 --- a/Mage.Sets/src/mage/cards/m/Memnarch.java +++ b/Mage.Sets/src/mage/cards/m/Memnarch.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class Memnarch extends CardImpl { public Memnarch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Wizard"); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/Memnite.java b/Mage.Sets/src/mage/cards/m/Memnite.java index dc59aae98a..08d3fe3230 100644 --- a/Mage.Sets/src/mage/cards/m/Memnite.java +++ b/Mage.Sets/src/mage/cards/m/Memnite.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class Memnite extends CardImpl { public Memnite (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{0}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(1); } diff --git a/Mage.Sets/src/mage/cards/m/MenacingOgre.java b/Mage.Sets/src/mage/cards/m/MenacingOgre.java index 4997b1be68..09c4bb28ab 100644 --- a/Mage.Sets/src/mage/cards/m/MenacingOgre.java +++ b/Mage.Sets/src/mage/cards/m/MenacingOgre.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.game.Game; @@ -54,7 +55,7 @@ public class MenacingOgre extends CardImpl { public MenacingOgre(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); - this.subtype.add("Ogre"); + this.subtype.add(SubType.OGRE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MenagerieLiberator.java b/Mage.Sets/src/mage/cards/m/MenagerieLiberator.java index c764ef3a5b..51cdc5d971 100644 --- a/Mage.Sets/src/mage/cards/m/MenagerieLiberator.java +++ b/Mage.Sets/src/mage/cards/m/MenagerieLiberator.java @@ -1,66 +1,67 @@ -/* - * 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.cards.m; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.keyword.MeleeAbility; -import mage.abilities.keyword.TrampleAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author emerald000 - */ -public class MenagerieLiberator extends CardImpl { - - public MenagerieLiberator(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); - this.power = new MageInt(3); - this.toughness = new MageInt(2); - - // Trample - this.addAbility(TrampleAbility.getInstance()); - - // Melee - this.addAbility(new MeleeAbility()); - } - - public MenagerieLiberator(final MenagerieLiberator card) { - super(card); - } - - @Override - public MenagerieLiberator copy() { - return new MenagerieLiberator(this); - } -} +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.MeleeAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author emerald000 + */ +public class MenagerieLiberator extends CardImpl { + + public MenagerieLiberator(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Melee + this.addAbility(new MeleeAbility()); + } + + public MenagerieLiberator(final MenagerieLiberator card) { + super(card); + } + + @Override + public MenagerieLiberator copy() { + return new MenagerieLiberator(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MengHuoBarbarianKing.java b/Mage.Sets/src/mage/cards/m/MengHuoBarbarianKing.java index 1f7171368d..897d5f4ca4 100644 --- a/Mage.Sets/src/mage/cards/m/MengHuoBarbarianKing.java +++ b/Mage.Sets/src/mage/cards/m/MengHuoBarbarianKing.java @@ -55,9 +55,9 @@ public class MengHuoBarbarianKing extends CardImpl { public MengHuoBarbarianKing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Barbarian"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BARBARIAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MengHuosHorde.java b/Mage.Sets/src/mage/cards/m/MengHuosHorde.java index 7daca26392..e5f5f4d578 100644 --- a/Mage.Sets/src/mage/cards/m/MengHuosHorde.java +++ b/Mage.Sets/src/mage/cards/m/MengHuosHorde.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class MengHuosHorde extends CardImpl { public MengHuosHorde(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MentorOfTheMeek.java b/Mage.Sets/src/mage/cards/m/MentorOfTheMeek.java index 6fda9cfabe..eb781ffaaf 100644 --- a/Mage.Sets/src/mage/cards/m/MentorOfTheMeek.java +++ b/Mage.Sets/src/mage/cards/m/MentorOfTheMeek.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -59,8 +60,8 @@ public class MentorOfTheMeek extends CardImpl { public MentorOfTheMeek(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MephidrossVampire.java b/Mage.Sets/src/mage/cards/m/MephidrossVampire.java index 7be32c7779..3d95b59e69 100644 --- a/Mage.Sets/src/mage/cards/m/MephidrossVampire.java +++ b/Mage.Sets/src/mage/cards/m/MephidrossVampire.java @@ -54,7 +54,7 @@ public class MephidrossVampire extends CardImpl { public MephidrossVampire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MephiticOoze.java b/Mage.Sets/src/mage/cards/m/MephiticOoze.java index d690a2d379..80bb6e8de9 100644 --- a/Mage.Sets/src/mage/cards/m/MephiticOoze.java +++ b/Mage.Sets/src/mage/cards/m/MephiticOoze.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -58,7 +59,7 @@ public class MephiticOoze extends CardImpl { public MephiticOoze(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Ooze"); + this.subtype.add(SubType.OOZE); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MerEkNightblade.java b/Mage.Sets/src/mage/cards/m/MerEkNightblade.java index 60366750c0..0f7976eee8 100644 --- a/Mage.Sets/src/mage/cards/m/MerEkNightblade.java +++ b/Mage.Sets/src/mage/cards/m/MerEkNightblade.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.OutlastAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -61,8 +62,8 @@ public class MerEkNightblade extends CardImpl { public MerEkNightblade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Orc"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MercenaryInformer.java b/Mage.Sets/src/mage/cards/m/MercenaryInformer.java index c85ef87bf2..c2dbd980d7 100644 --- a/Mage.Sets/src/mage/cards/m/MercenaryInformer.java +++ b/Mage.Sets/src/mage/cards/m/MercenaryInformer.java @@ -68,9 +68,9 @@ public class MercenaryInformer extends CardImpl { public MercenaryInformer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MercenaryKnight.java b/Mage.Sets/src/mage/cards/m/MercenaryKnight.java index 39dc4d246f..38bcf0468d 100644 --- a/Mage.Sets/src/mage/cards/m/MercenaryKnight.java +++ b/Mage.Sets/src/mage/cards/m/MercenaryKnight.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInHand; @@ -47,9 +48,9 @@ public class MercenaryKnight extends CardImpl { public MercenaryKnight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Mercenary"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MERCENARY); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MerchantOfSecrets.java b/Mage.Sets/src/mage/cards/m/MerchantOfSecrets.java index bf049d1728..82334ff2de 100644 --- a/Mage.Sets/src/mage/cards/m/MerchantOfSecrets.java +++ b/Mage.Sets/src/mage/cards/m/MerchantOfSecrets.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class MerchantOfSecrets extends CardImpl { public MerchantOfSecrets(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MerchantShip.java b/Mage.Sets/src/mage/cards/m/MerchantShip.java index fce2203bd4..9eeffdf358 100644 --- a/Mage.Sets/src/mage/cards/m/MerchantShip.java +++ b/Mage.Sets/src/mage/cards/m/MerchantShip.java @@ -51,7 +51,7 @@ public class MerchantShip extends CardImpl { public MerchantShip(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MerchantsDockhand.java b/Mage.Sets/src/mage/cards/m/MerchantsDockhand.java index c29addde80..16dde61bb9 100644 --- a/Mage.Sets/src/mage/cards/m/MerchantsDockhand.java +++ b/Mage.Sets/src/mage/cards/m/MerchantsDockhand.java @@ -44,6 +44,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -64,7 +65,7 @@ public class MerchantsDockhand extends CardImpl { public MerchantsDockhand(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MercilessEternal.java b/Mage.Sets/src/mage/cards/m/MercilessEternal.java index d2fa6791ba..1cbe44f6bd 100644 --- a/Mage.Sets/src/mage/cards/m/MercilessEternal.java +++ b/Mage.Sets/src/mage/cards/m/MercilessEternal.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.AfflictAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class MercilessEternal extends CardImpl { public MercilessEternal(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MercilessExecutioner.java b/Mage.Sets/src/mage/cards/m/MercilessExecutioner.java index c88bc64fb3..4c69f74560 100644 --- a/Mage.Sets/src/mage/cards/m/MercilessExecutioner.java +++ b/Mage.Sets/src/mage/cards/m/MercilessExecutioner.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; /** @@ -44,8 +45,8 @@ public class MercilessExecutioner extends CardImpl { public MercilessExecutioner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Orc"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MercilessJavelineer.java b/Mage.Sets/src/mage/cards/m/MercilessJavelineer.java index 2907ec4df0..b88554face 100644 --- a/Mage.Sets/src/mage/cards/m/MercilessJavelineer.java +++ b/Mage.Sets/src/mage/cards/m/MercilessJavelineer.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class MercilessJavelineer extends CardImpl { public MercilessJavelineer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MercilessPredator.java b/Mage.Sets/src/mage/cards/m/MercilessPredator.java index 53e6b94895..d2a9c9e57d 100644 --- a/Mage.Sets/src/mage/cards/m/MercilessPredator.java +++ b/Mage.Sets/src/mage/cards/m/MercilessPredator.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -47,7 +48,7 @@ public class MercilessPredator extends CardImpl { public MercilessPredator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.color.setRed(true); // this card is the second face of double-faced card diff --git a/Mage.Sets/src/mage/cards/m/MercurialChemister.java b/Mage.Sets/src/mage/cards/m/MercurialChemister.java index 2d4975ec9a..0e3963e299 100644 --- a/Mage.Sets/src/mage/cards/m/MercurialChemister.java +++ b/Mage.Sets/src/mage/cards/m/MercurialChemister.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -51,8 +52,8 @@ public class MercurialChemister extends CardImpl { public MercurialChemister(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MercurialGeists.java b/Mage.Sets/src/mage/cards/m/MercurialGeists.java index c9dacba120..56881522c5 100644 --- a/Mage.Sets/src/mage/cards/m/MercurialGeists.java +++ b/Mage.Sets/src/mage/cards/m/MercurialGeists.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; @@ -46,7 +47,7 @@ public class MercurialGeists extends CardImpl { public MercurialGeists(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MercurialKite.java b/Mage.Sets/src/mage/cards/m/MercurialKite.java index 6c28c04d32..c359ce3197 100644 --- a/Mage.Sets/src/mage/cards/m/MercurialKite.java +++ b/Mage.Sets/src/mage/cards/m/MercurialKite.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ import mage.constants.CardType; public class MercurialKite extends CardImpl { public MercurialKite(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Bird"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -55,7 +56,7 @@ public class MercurialKite extends CardImpl { // Whenever Mercurial Kite deals combat damage to a creature, tap that creature. That creature doesn't untap during its controller's next untap step. Ability ability; ability = new DealsDamageToACreatureTriggeredAbility(new TapTargetEffect("that creature"), true, false, true); - ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect("and it")); + ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect("That creature")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MercurialPretender.java b/Mage.Sets/src/mage/cards/m/MercurialPretender.java index 821c02c0f9..c6a27793f5 100644 --- a/Mage.Sets/src/mage/cards/m/MercurialPretender.java +++ b/Mage.Sets/src/mage/cards/m/MercurialPretender.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.util.functions.AbilityApplier; @@ -52,7 +53,7 @@ public class MercurialPretender extends CardImpl { public MercurialPretender(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.color.setBlue(true); this.power = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MerenOfClanNelToth.java b/Mage.Sets/src/mage/cards/m/MerenOfClanNelToth.java index e94724cc4e..2cf595f639 100644 --- a/Mage.Sets/src/mage/cards/m/MerenOfClanNelToth.java +++ b/Mage.Sets/src/mage/cards/m/MerenOfClanNelToth.java @@ -65,8 +65,8 @@ public class MerenOfClanNelToth extends CardImpl { public MerenOfClanNelToth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MerfolkAssassin.java b/Mage.Sets/src/mage/cards/m/MerfolkAssassin.java index 745d3476b5..55d8aa9907 100644 --- a/Mage.Sets/src/mage/cards/m/MerfolkAssassin.java +++ b/Mage.Sets/src/mage/cards/m/MerfolkAssassin.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.IslandwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -56,8 +57,8 @@ public class MerfolkAssassin extends CardImpl { public MerfolkAssassin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MerfolkBranchwalker.java b/Mage.Sets/src/mage/cards/m/MerfolkBranchwalker.java new file mode 100644 index 0000000000..320bf1fe58 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MerfolkBranchwalker.java @@ -0,0 +1,65 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.keyword.ExploreSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class MerfolkBranchwalker extends CardImpl { + + public MerfolkBranchwalker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SCOUT); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // When Merfolk Branchwalker enters the battlefield, it explores. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ExploreSourceEffect())); + } + + public MerfolkBranchwalker(final MerfolkBranchwalker card) { + super(card); + } + + @Override + public MerfolkBranchwalker copy() { + return new MerfolkBranchwalker(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MerfolkLooter.java b/Mage.Sets/src/mage/cards/m/MerfolkLooter.java index 919215f317..1021632cb2 100644 --- a/Mage.Sets/src/mage/cards/m/MerfolkLooter.java +++ b/Mage.Sets/src/mage/cards/m/MerfolkLooter.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class MerfolkLooter extends CardImpl { public MerfolkLooter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MerfolkMesmerist.java b/Mage.Sets/src/mage/cards/m/MerfolkMesmerist.java index b4c3a6901c..ebdee8fb46 100644 --- a/Mage.Sets/src/mage/cards/m/MerfolkMesmerist.java +++ b/Mage.Sets/src/mage/cards/m/MerfolkMesmerist.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -49,8 +50,8 @@ public class MerfolkMesmerist extends CardImpl { public MerfolkMesmerist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MerfolkObserver.java b/Mage.Sets/src/mage/cards/m/MerfolkObserver.java index 4d5b826f3d..09e49ff9dc 100644 --- a/Mage.Sets/src/mage/cards/m/MerfolkObserver.java +++ b/Mage.Sets/src/mage/cards/m/MerfolkObserver.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.LookLibraryTopCardTargetPlayerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -44,8 +45,8 @@ public class MerfolkObserver extends CardImpl { public MerfolkObserver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MerfolkOfTheDepths.java b/Mage.Sets/src/mage/cards/m/MerfolkOfTheDepths.java index 6ddbb75c38..f477278b98 100644 --- a/Mage.Sets/src/mage/cards/m/MerfolkOfTheDepths.java +++ b/Mage.Sets/src/mage/cards/m/MerfolkOfTheDepths.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class MerfolkOfTheDepths extends CardImpl { public MerfolkOfTheDepths(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G/U}{G/U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MerfolkOfThePearlTrident.java b/Mage.Sets/src/mage/cards/m/MerfolkOfThePearlTrident.java index a66b49aaeb..65d0fa53ae 100644 --- a/Mage.Sets/src/mage/cards/m/MerfolkOfThePearlTrident.java +++ b/Mage.Sets/src/mage/cards/m/MerfolkOfThePearlTrident.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class MerfolkOfThePearlTrident extends CardImpl { public MerfolkOfThePearlTrident(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MerfolkRaiders.java b/Mage.Sets/src/mage/cards/m/MerfolkRaiders.java index 76168fd287..21611866db 100644 --- a/Mage.Sets/src/mage/cards/m/MerfolkRaiders.java +++ b/Mage.Sets/src/mage/cards/m/MerfolkRaiders.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.PhasingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class MerfolkRaiders extends CardImpl { public MerfolkRaiders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MerfolkSeastalkers.java b/Mage.Sets/src/mage/cards/m/MerfolkSeastalkers.java index 5f3b4819bd..c196bd64ff 100644 --- a/Mage.Sets/src/mage/cards/m/MerfolkSeastalkers.java +++ b/Mage.Sets/src/mage/cards/m/MerfolkSeastalkers.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.IslandwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -57,8 +58,8 @@ public class MerfolkSeastalkers extends CardImpl { public MerfolkSeastalkers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Scout"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MerfolkSeer.java b/Mage.Sets/src/mage/cards/m/MerfolkSeer.java index f75c26cf5f..7dffc90a66 100644 --- a/Mage.Sets/src/mage/cards/m/MerfolkSeer.java +++ b/Mage.Sets/src/mage/cards/m/MerfolkSeer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class MerfolkSeer extends CardImpl { public MerfolkSeer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MerfolkSkyscout.java b/Mage.Sets/src/mage/cards/m/MerfolkSkyscout.java index b3c5f33c79..d803753ff8 100644 --- a/Mage.Sets/src/mage/cards/m/MerfolkSkyscout.java +++ b/Mage.Sets/src/mage/cards/m/MerfolkSkyscout.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPermanent; /** @@ -45,8 +46,8 @@ public class MerfolkSkyscout extends CardImpl { public MerfolkSkyscout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Scout"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MerfolkSovereign.java b/Mage.Sets/src/mage/cards/m/MerfolkSovereign.java index 0f4b1128b2..a733f6eefd 100644 --- a/Mage.Sets/src/mage/cards/m/MerfolkSovereign.java +++ b/Mage.Sets/src/mage/cards/m/MerfolkSovereign.java @@ -62,7 +62,7 @@ public class MerfolkSovereign extends CardImpl { public MerfolkSovereign(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MerfolkSpy.java b/Mage.Sets/src/mage/cards/m/MerfolkSpy.java index 5bd87440f8..f248e7cdf9 100644 --- a/Mage.Sets/src/mage/cards/m/MerfolkSpy.java +++ b/Mage.Sets/src/mage/cards/m/MerfolkSpy.java @@ -39,6 +39,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -51,8 +52,8 @@ public class MerfolkSpy extends CardImpl { public MerfolkSpy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MerfolkThaumaturgist.java b/Mage.Sets/src/mage/cards/m/MerfolkThaumaturgist.java index 6729e14af1..7b6c033568 100644 --- a/Mage.Sets/src/mage/cards/m/MerfolkThaumaturgist.java +++ b/Mage.Sets/src/mage/cards/m/MerfolkThaumaturgist.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.SwitchPowerToughnessTargetEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class MerfolkThaumaturgist extends CardImpl { public MerfolkThaumaturgist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MerfolkTraders.java b/Mage.Sets/src/mage/cards/m/MerfolkTraders.java index 57fa84c55c..394e3dfdd5 100644 --- a/Mage.Sets/src/mage/cards/m/MerfolkTraders.java +++ b/Mage.Sets/src/mage/cards/m/MerfolkTraders.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class MerfolkTraders extends CardImpl { public MerfolkTraders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MerfolkWayfinder.java b/Mage.Sets/src/mage/cards/m/MerfolkWayfinder.java index 920c76f42e..0c5561d7c5 100644 --- a/Mage.Sets/src/mage/cards/m/MerfolkWayfinder.java +++ b/Mage.Sets/src/mage/cards/m/MerfolkWayfinder.java @@ -55,8 +55,8 @@ public class MerfolkWayfinder extends CardImpl { public MerfolkWayfinder(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Scout"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MeriekeRiBerit.java b/Mage.Sets/src/mage/cards/m/MeriekeRiBerit.java index d819f9d8ed..5e9ead3e46 100644 --- a/Mage.Sets/src/mage/cards/m/MeriekeRiBerit.java +++ b/Mage.Sets/src/mage/cards/m/MeriekeRiBerit.java @@ -61,7 +61,7 @@ public class MeriekeRiBerit extends CardImpl { public MeriekeRiBerit(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MerrowBonegnawer.java b/Mage.Sets/src/mage/cards/m/MerrowBonegnawer.java index 7ca995c6c6..87554db349 100644 --- a/Mage.Sets/src/mage/cards/m/MerrowBonegnawer.java +++ b/Mage.Sets/src/mage/cards/m/MerrowBonegnawer.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.FilterSpell; @@ -53,16 +54,16 @@ public class MerrowBonegnawer extends CardImpl { private UUID exileId = UUID.randomUUID(); - private static final FilterSpell filter = new FilterSpell("black spell"); + private static final FilterSpell filter = new FilterSpell("a black spell"); static { filter.add(new ColorPredicate(ObjectColor.BLACK)); } public MerrowBonegnawer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MerrowCommerce.java b/Mage.Sets/src/mage/cards/m/MerrowCommerce.java index ffd7dce50d..6bd4989dbe 100644 --- a/Mage.Sets/src/mage/cards/m/MerrowCommerce.java +++ b/Mage.Sets/src/mage/cards/m/MerrowCommerce.java @@ -51,7 +51,7 @@ public class MerrowCommerce extends CardImpl { public MerrowCommerce(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); // At the beginning of your end step, untap all Merfolk you control. diff --git a/Mage.Sets/src/mage/cards/m/MerrowGrimeblotter.java b/Mage.Sets/src/mage/cards/m/MerrowGrimeblotter.java index 8dfa2278c6..268d6a58f4 100644 --- a/Mage.Sets/src/mage/cards/m/MerrowGrimeblotter.java +++ b/Mage.Sets/src/mage/cards/m/MerrowGrimeblotter.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class MerrowGrimeblotter extends CardImpl { public MerrowGrimeblotter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U/B}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MerrowHarbinger.java b/Mage.Sets/src/mage/cards/m/MerrowHarbinger.java index 9c985b4446..ca4fb5ddf9 100644 --- a/Mage.Sets/src/mage/cards/m/MerrowHarbinger.java +++ b/Mage.Sets/src/mage/cards/m/MerrowHarbinger.java @@ -55,8 +55,8 @@ public class MerrowHarbinger extends CardImpl { public MerrowHarbinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MerrowLevitator.java b/Mage.Sets/src/mage/cards/m/MerrowLevitator.java index 826ca6ea1d..aff356768d 100644 --- a/Mage.Sets/src/mage/cards/m/MerrowLevitator.java +++ b/Mage.Sets/src/mage/cards/m/MerrowLevitator.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterSpell; @@ -61,8 +62,8 @@ public class MerrowLevitator extends CardImpl { public MerrowLevitator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MerrowReejerey.java b/Mage.Sets/src/mage/cards/m/MerrowReejerey.java index 31440e24ff..c08ec64252 100644 --- a/Mage.Sets/src/mage/cards/m/MerrowReejerey.java +++ b/Mage.Sets/src/mage/cards/m/MerrowReejerey.java @@ -61,8 +61,8 @@ public class MerrowReejerey extends CardImpl { public MerrowReejerey(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MerrowWavebreakers.java b/Mage.Sets/src/mage/cards/m/MerrowWavebreakers.java index 6d0fcdb07b..f891255496 100644 --- a/Mage.Sets/src/mage/cards/m/MerrowWavebreakers.java +++ b/Mage.Sets/src/mage/cards/m/MerrowWavebreakers.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class MerrowWavebreakers extends CardImpl { public MerrowWavebreakers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MerrowWitsniper.java b/Mage.Sets/src/mage/cards/m/MerrowWitsniper.java index 0587a44a81..a83d3818c9 100644 --- a/Mage.Sets/src/mage/cards/m/MerrowWitsniper.java +++ b/Mage.Sets/src/mage/cards/m/MerrowWitsniper.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -45,8 +46,8 @@ public class MerrowWitsniper extends CardImpl { public MerrowWitsniper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MesaEnchantress.java b/Mage.Sets/src/mage/cards/m/MesaEnchantress.java index 2171e1f379..36b50680fd 100644 --- a/Mage.Sets/src/mage/cards/m/MesaEnchantress.java +++ b/Mage.Sets/src/mage/cards/m/MesaEnchantress.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -51,8 +52,8 @@ public class MesaEnchantress extends CardImpl { public MesaEnchantress(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MesaFalcon.java b/Mage.Sets/src/mage/cards/m/MesaFalcon.java index 0de45f88d6..0cf71e97af 100644 --- a/Mage.Sets/src/mage/cards/m/MesaFalcon.java +++ b/Mage.Sets/src/mage/cards/m/MesaFalcon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class MesaFalcon extends CardImpl { public MesaFalcon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MesmericFiend.java b/Mage.Sets/src/mage/cards/m/MesmericFiend.java index c9fb78aa4a..a8930fecea 100644 --- a/Mage.Sets/src/mage/cards/m/MesmericFiend.java +++ b/Mage.Sets/src/mage/cards/m/MesmericFiend.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterNonlandCard; @@ -58,8 +59,8 @@ public class MesmericFiend extends CardImpl { public MesmericFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Nightmare"); - this.subtype.add("Horror"); + this.subtype.add(SubType.NIGHTMARE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MesmericSliver.java b/Mage.Sets/src/mage/cards/m/MesmericSliver.java index acb262e4a4..a6e48a72d5 100644 --- a/Mage.Sets/src/mage/cards/m/MesmericSliver.java +++ b/Mage.Sets/src/mage/cards/m/MesmericSliver.java @@ -57,7 +57,7 @@ public class MesmericSliver extends CardImpl { public MesmericSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MessengerDrake.java b/Mage.Sets/src/mage/cards/m/MessengerDrake.java index d82834aa7a..b997433eb6 100644 --- a/Mage.Sets/src/mage/cards/m/MessengerDrake.java +++ b/Mage.Sets/src/mage/cards/m/MessengerDrake.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class MessengerDrake extends CardImpl { public MessengerDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MessengerFalcons.java b/Mage.Sets/src/mage/cards/m/MessengerFalcons.java index dc93f30c7e..efdcbb84b9 100644 --- a/Mage.Sets/src/mage/cards/m/MessengerFalcons.java +++ b/Mage.Sets/src/mage/cards/m/MessengerFalcons.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class MessengerFalcons extends CardImpl { public MessengerFalcons(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G/U}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); diff --git a/Mage.Sets/src/mage/cards/m/MessengerJays.java b/Mage.Sets/src/mage/cards/m/MessengerJays.java index 5bf7ae21fc..26090e4ba5 100644 --- a/Mage.Sets/src/mage/cards/m/MessengerJays.java +++ b/Mage.Sets/src/mage/cards/m/MessengerJays.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.game.Game; @@ -53,7 +54,7 @@ public class MessengerJays extends CardImpl { public MessengerJays(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MessengersSpeed.java b/Mage.Sets/src/mage/cards/m/MessengersSpeed.java index bd3d8cfd86..aa26028810 100644 --- a/Mage.Sets/src/mage/cards/m/MessengersSpeed.java +++ b/Mage.Sets/src/mage/cards/m/MessengersSpeed.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class MessengersSpeed extends CardImpl { public MessengersSpeed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/m/MetallicMastery.java b/Mage.Sets/src/mage/cards/m/MetallicMastery.java index 9849c373d6..a6e3dc76e1 100644 --- a/Mage.Sets/src/mage/cards/m/MetallicMastery.java +++ b/Mage.Sets/src/mage/cards/m/MetallicMastery.java @@ -36,9 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.FilterPermanent; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.target.TargetPermanent; +import mage.target.common.TargetArtifactPermanent; /** * @@ -46,20 +44,14 @@ import mage.target.TargetPermanent; */ public class MetallicMastery extends CardImpl { - private static final FilterPermanent filter = new FilterPermanent("artifact"); - - static { - filter.add(new CardTypePredicate(CardType.ARTIFACT)); - } - public MetallicMastery(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}"); - - this.getSpellAbility().addTarget(new TargetPermanent(filter)); + // Gain control of target artifact until end of turn. Untap that artifact. It gains haste until end of turn. + this.getSpellAbility().addTarget(new TargetArtifactPermanent()); this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new UntapTargetEffect()); + this.getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap that artifact")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("It gains haste until end of turn.")); } public MetallicMastery(final MetallicMastery card) { diff --git a/Mage.Sets/src/mage/cards/m/MetallicMimic.java b/Mage.Sets/src/mage/cards/m/MetallicMimic.java index c265729e6f..8295c1adaf 100644 --- a/Mage.Sets/src/mage/cards/m/MetallicMimic.java +++ b/Mage.Sets/src/mage/cards/m/MetallicMimic.java @@ -54,7 +54,7 @@ public class MetallicMimic extends CardImpl { public MetallicMimic(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MetallicSliver.java b/Mage.Sets/src/mage/cards/m/MetallicSliver.java index 79f6a652f5..75e098dee2 100644 --- a/Mage.Sets/src/mage/cards/m/MetallicSliver.java +++ b/Mage.Sets/src/mage/cards/m/MetallicSliver.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class MetallicSliver extends CardImpl { public MetallicSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/Metallurgeon.java b/Mage.Sets/src/mage/cards/m/Metallurgeon.java index fccf526c91..cf7fe0e611 100644 --- a/Mage.Sets/src/mage/cards/m/Metallurgeon.java +++ b/Mage.Sets/src/mage/cards/m/Metallurgeon.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.RegenerateTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetArtifactPermanent; @@ -47,8 +48,8 @@ public class Metallurgeon extends CardImpl { public Metallurgeon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MetallurgicSummonings.java b/Mage.Sets/src/mage/cards/m/MetallurgicSummonings.java index 56c3273bad..cdd7b429e6 100644 --- a/Mage.Sets/src/mage/cards/m/MetallurgicSummonings.java +++ b/Mage.Sets/src/mage/cards/m/MetallurgicSummonings.java @@ -51,7 +51,6 @@ import mage.game.Game; import mage.game.permanent.token.MetallurgicSummoningsConstructToken; import mage.game.stack.Spell; import mage.players.Player; -import mage.target.targetpointer.FixedTarget; /** * @@ -106,10 +105,7 @@ class MetallurgicSummoningsTokenEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source)); - if (spell == null) { - spell = (Spell) game.getLastKnownInformation(((FixedTarget) getTargetPointer()).getTarget(), Zone.STACK); - } + Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source)); if (spell != null) { int cmc = spell.getConvertedManaCost(); if (cmc > 0) { diff --git a/Mage.Sets/src/mage/cards/m/MetalspinnersPuzzleknot.java b/Mage.Sets/src/mage/cards/m/MetalspinnersPuzzleknot.java index 3406bc2164..f33e2e3d5d 100644 --- a/Mage.Sets/src/mage/cards/m/MetalspinnersPuzzleknot.java +++ b/Mage.Sets/src/mage/cards/m/MetalspinnersPuzzleknot.java @@ -1,77 +1,77 @@ -/* - * 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.cards.m; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.SacrificeSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.LoseLifeSourceControllerEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; - -/** - * - * @author emerald000 - */ -public class MetalspinnersPuzzleknot extends CardImpl { - - public MetalspinnersPuzzleknot(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - - // When Metalspinner's Puzzleknot enters the battlefield, you draw a card and you lose 1 life. - Effect drawEffect = new DrawCardSourceControllerEffect(1); - drawEffect.setText("you draw a card"); - Ability ability = new EntersBattlefieldTriggeredAbility(drawEffect); - Effect lifeEffect = new LoseLifeSourceControllerEffect(1); - lifeEffect.setText("and you lose 1 life"); - ability.addEffect(lifeEffect); - this.addAbility(ability); - - // {2}{B}, Sacrifice Metalspinner's Puzzleknot: You draw a card and you lose 1 life. - ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, drawEffect, new ManaCostsImpl<>("{2}{B}")); - ability.addCost(new SacrificeSourceCost()); - ability.addEffect(lifeEffect); - this.addAbility(ability); - } - - public MetalspinnersPuzzleknot(final MetalspinnersPuzzleknot card) { - super(card); - } - - @Override - public MetalspinnersPuzzleknot copy() { - return new MetalspinnersPuzzleknot(this); - } -} +/* + * 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.cards.m; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * + * @author emerald000 + */ +public class MetalspinnersPuzzleknot extends CardImpl { + + public MetalspinnersPuzzleknot(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + + // When Metalspinner's Puzzleknot enters the battlefield, you draw a card and you lose 1 life. + Effect drawEffect = new DrawCardSourceControllerEffect(1); + drawEffect.setText("you draw a card"); + Ability ability = new EntersBattlefieldTriggeredAbility(drawEffect); + Effect lifeEffect = new LoseLifeSourceControllerEffect(1); + lifeEffect.setText("and you lose 1 life"); + ability.addEffect(lifeEffect); + this.addAbility(ability); + + // {2}{B}, Sacrifice Metalspinner's Puzzleknot: You draw a card and you lose 1 life. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, drawEffect, new ManaCostsImpl<>("{2}{B}")); + ability.addCost(new SacrificeSourceCost()); + ability.addEffect(lifeEffect); + this.addAbility(ability); + } + + public MetalspinnersPuzzleknot(final MetalspinnersPuzzleknot card) { + super(card); + } + + @Override + public MetalspinnersPuzzleknot copy() { + return new MetalspinnersPuzzleknot(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MetalworkColossus.java b/Mage.Sets/src/mage/cards/m/MetalworkColossus.java index d0423b345e..7eace2db31 100644 --- a/Mage.Sets/src/mage/cards/m/MetalworkColossus.java +++ b/Mage.Sets/src/mage/cards/m/MetalworkColossus.java @@ -1,119 +1,120 @@ -/* - * 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.cards.m; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.SpellAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.common.SacrificeTargetCost; -import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; -import mage.abilities.effects.common.cost.CostModificationEffectImpl; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.CostModificationType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.FilterPermanent; -import mage.filter.common.FilterControlledArtifactPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.target.common.TargetControlledPermanent; -import mage.util.CardUtil; - -/** - * - * @author emerald000 - */ -public class MetalworkColossus extends CardImpl { - - public MetalworkColossus(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{11}"); - this.subtype.add("Construct"); - this.power = new MageInt(10); - this.toughness = new MageInt(10); - - // Metalwork Colossus costs {X} less to cast, where X is the total converted mana cost of noncreature artifacts you control. - this.addAbility(new SimpleStaticAbility(Zone.STACK, new MetalworkColossusCostReductionEffect())); - - // Sacrifice two artifacts: Return Metalwork Colossus from your graveyard to your hand. - this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledArtifactPermanent("two artifacts"), true)))); - } - - public MetalworkColossus(final MetalworkColossus card) { - super(card); - } - - @Override - public MetalworkColossus copy() { - return new MetalworkColossus(this); - } -} - -class MetalworkColossusCostReductionEffect extends CostModificationEffectImpl { - - private static final FilterPermanent filter = new FilterControlledArtifactPermanent("noncreature artifacts you control"); - static { - filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); - } - - MetalworkColossusCostReductionEffect() { - super(Duration.Custom, Outcome.Benefit, CostModificationType.REDUCE_COST); - staticText = "{this} costs {X} less to cast, where X is the total converted mana cost of noncreature artifacts you control"; - } - - MetalworkColossusCostReductionEffect(final MetalworkColossusCostReductionEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source, Ability abilityToModify) { - int totalCMC = 0; - for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { - totalCMC += permanent.getConvertedManaCost(); - } - CardUtil.reduceCost(abilityToModify, totalCMC); - return true; - } - - @Override - public boolean applies(Ability abilityToModify, Ability source, Game game) { - return abilityToModify.getSourceId().equals(source.getSourceId()) && (abilityToModify instanceof SpellAbility); - } - - @Override - public MetalworkColossusCostReductionEffect copy() { - return new MetalworkColossusCostReductionEffect(this); - } -} +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; +import mage.abilities.effects.common.cost.CostModificationEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.CostModificationType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledArtifactPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledPermanent; +import mage.util.CardUtil; + +/** + * + * @author emerald000 + */ +public class MetalworkColossus extends CardImpl { + + public MetalworkColossus(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{11}"); + this.subtype.add(SubType.CONSTRUCT); + this.power = new MageInt(10); + this.toughness = new MageInt(10); + + // Metalwork Colossus costs {X} less to cast, where X is the total converted mana cost of noncreature artifacts you control. + this.addAbility(new SimpleStaticAbility(Zone.STACK, new MetalworkColossusCostReductionEffect())); + + // Sacrifice two artifacts: Return Metalwork Colossus from your graveyard to your hand. + this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledArtifactPermanent("two artifacts"), true)))); + } + + public MetalworkColossus(final MetalworkColossus card) { + super(card); + } + + @Override + public MetalworkColossus copy() { + return new MetalworkColossus(this); + } +} + +class MetalworkColossusCostReductionEffect extends CostModificationEffectImpl { + + private static final FilterPermanent filter = new FilterControlledArtifactPermanent("noncreature artifacts you control"); + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); + } + + MetalworkColossusCostReductionEffect() { + super(Duration.Custom, Outcome.Benefit, CostModificationType.REDUCE_COST); + staticText = "{this} costs {X} less to cast, where X is the total converted mana cost of noncreature artifacts you control"; + } + + MetalworkColossusCostReductionEffect(final MetalworkColossusCostReductionEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source, Ability abilityToModify) { + int totalCMC = 0; + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { + totalCMC += permanent.getConvertedManaCost(); + } + CardUtil.reduceCost(abilityToModify, totalCMC); + return true; + } + + @Override + public boolean applies(Ability abilityToModify, Ability source, Game game) { + return abilityToModify.getSourceId().equals(source.getSourceId()) && (abilityToModify instanceof SpellAbility); + } + + @Override + public MetalworkColossusCostReductionEffect copy() { + return new MetalworkColossusCostReductionEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/Metalworker.java b/Mage.Sets/src/mage/cards/m/Metalworker.java index 534abd7a1d..873951bd32 100644 --- a/Mage.Sets/src/mage/cards/m/Metalworker.java +++ b/Mage.Sets/src/mage/cards/m/Metalworker.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -56,7 +57,7 @@ public class Metalworker extends CardImpl { public Metalworker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MetamorphicWurm.java b/Mage.Sets/src/mage/cards/m/MetamorphicWurm.java index a729ca7d9a..ab74ff6e36 100644 --- a/Mage.Sets/src/mage/cards/m/MetamorphicWurm.java +++ b/Mage.Sets/src/mage/cards/m/MetamorphicWurm.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class MetamorphicWurm extends CardImpl { public MetamorphicWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Elephant"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.ELEPHANT); + this.subtype.add(SubType.WURM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MetathranSoldier.java b/Mage.Sets/src/mage/cards/m/MetathranSoldier.java index 0e257b75c0..13c63b85e6 100644 --- a/Mage.Sets/src/mage/cards/m/MetathranSoldier.java +++ b/Mage.Sets/src/mage/cards/m/MetathranSoldier.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class MetathranSoldier extends CardImpl { public MetathranSoldier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Metathran"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.METATHRAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MetathranTransport.java b/Mage.Sets/src/mage/cards/m/MetathranTransport.java index cc65e094cb..b79ee1bcbe 100644 --- a/Mage.Sets/src/mage/cards/m/MetathranTransport.java +++ b/Mage.Sets/src/mage/cards/m/MetathranTransport.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -60,7 +61,7 @@ public class MetathranTransport extends CardImpl { public MetathranTransport(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Metathran"); + this.subtype.add(SubType.METATHRAN); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MetathranZombie.java b/Mage.Sets/src/mage/cards/m/MetathranZombie.java index 7a111fd011..2947cb4719 100644 --- a/Mage.Sets/src/mage/cards/m/MetathranZombie.java +++ b/Mage.Sets/src/mage/cards/m/MetathranZombie.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class MetathranZombie extends CardImpl { public MetathranZombie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Metathran"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.METATHRAN); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MeteorShower.java b/Mage.Sets/src/mage/cards/m/MeteorShower.java new file mode 100644 index 0000000000..37ab91d1f0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MeteorShower.java @@ -0,0 +1,63 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.IntPlusDynamicValue; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.DamageMultiEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetCreatureOrPlayerAmount; + +/** + * + * @author TheElk801 + */ +public class MeteorShower extends CardImpl { + + public MeteorShower(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{R}"); + + // Meteor Shower deals X plus 1 damage divided as you choose among any number of target creatures and/or players. + DynamicValue xValue = new IntPlusDynamicValue(1, new ManacostVariableValue()); + this.getSpellAbility().addEffect(new DamageMultiEffect(xValue)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(xValue)); + } + + public MeteorShower(final MeteorShower card) { + super(card); + } + + @Override + public MeteorShower copy() { + return new MeteorShower(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MetropolisSprite.java b/Mage.Sets/src/mage/cards/m/MetropolisSprite.java index 1925198653..6e6497a4d2 100644 --- a/Mage.Sets/src/mage/cards/m/MetropolisSprite.java +++ b/Mage.Sets/src/mage/cards/m/MetropolisSprite.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class MetropolisSprite extends CardImpl { public MetropolisSprite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MiasmicMummy.java b/Mage.Sets/src/mage/cards/m/MiasmicMummy.java index 6b80b70226..0fb753fe79 100644 --- a/Mage.Sets/src/mage/cards/m/MiasmicMummy.java +++ b/Mage.Sets/src/mage/cards/m/MiasmicMummy.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class MiasmicMummy extends CardImpl { public MiasmicMummy(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Jackal"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.JACKAL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MichikoKondaTruthSeeker.java b/Mage.Sets/src/mage/cards/m/MichikoKondaTruthSeeker.java index 2fdae80fb3..0de609dd1e 100644 --- a/Mage.Sets/src/mage/cards/m/MichikoKondaTruthSeeker.java +++ b/Mage.Sets/src/mage/cards/m/MichikoKondaTruthSeeker.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -50,8 +51,8 @@ public class MichikoKondaTruthSeeker extends CardImpl { public MichikoKondaTruthSeeker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MidnightBanshee.java b/Mage.Sets/src/mage/cards/m/MidnightBanshee.java index 4fb5e99627..050d97c2b0 100644 --- a/Mage.Sets/src/mage/cards/m/MidnightBanshee.java +++ b/Mage.Sets/src/mage/cards/m/MidnightBanshee.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -56,7 +57,7 @@ public class MidnightBanshee extends CardImpl { public MidnightBanshee(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MidnightCharm.java b/Mage.Sets/src/mage/cards/m/MidnightCharm.java index 10b4c3e693..f4e9be58d9 100644 --- a/Mage.Sets/src/mage/cards/m/MidnightCharm.java +++ b/Mage.Sets/src/mage/cards/m/MidnightCharm.java @@ -47,11 +47,11 @@ import mage.target.common.TargetCreaturePermanent; public class MidnightCharm extends CardImpl { public MidnightCharm(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{B}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}"); // Choose one - Midnight Charm deals 1 damage to target creature and you gain 1 life; or target creature gains first strike until end of turn; or tap target creature. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addEffect(new GainLifeEffect(1)); + this.getSpellAbility().addEffect(new GainLifeEffect(1).setText("and you gain 1 life")); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); Mode mode = new Mode(); mode.getEffects().add(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn)); diff --git a/Mage.Sets/src/mage/cards/m/MidnightCovenant.java b/Mage.Sets/src/mage/cards/m/MidnightCovenant.java index 137e5867e2..caff4ffb04 100644 --- a/Mage.Sets/src/mage/cards/m/MidnightCovenant.java +++ b/Mage.Sets/src/mage/cards/m/MidnightCovenant.java @@ -50,7 +50,7 @@ public class MidnightCovenant extends CardImpl { public MidnightCovenant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/m/MidnightDuelist.java b/Mage.Sets/src/mage/cards/m/MidnightDuelist.java index 287a7c8820..7b0ea330a9 100644 --- a/Mage.Sets/src/mage/cards/m/MidnightDuelist.java +++ b/Mage.Sets/src/mage/cards/m/MidnightDuelist.java @@ -53,8 +53,8 @@ public class MidnightDuelist extends CardImpl { public MidnightDuelist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MidnightEntourage.java b/Mage.Sets/src/mage/cards/m/MidnightEntourage.java index e8b3f3eb06..f2fac94f85 100644 --- a/Mage.Sets/src/mage/cards/m/MidnightEntourage.java +++ b/Mage.Sets/src/mage/cards/m/MidnightEntourage.java @@ -1,86 +1,86 @@ -/* - * 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.cards.m; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.DiesThisOrAnotherCreatureTriggeredAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.LoseLifeSourceControllerEffect; -import mage.abilities.effects.common.continuous.BoostAllEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.*; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.filter.predicate.permanent.ControllerPredicate; - -/** - * - * @author Styxo - */ -public class MidnightEntourage extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Aetherborn you control"); - - static { - filter.add(new SubtypePredicate(SubType.AETHERBORN)); - filter.add(new ControllerPredicate(TargetController.YOU)); - } - - public MidnightEntourage(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); - - this.subtype.add("Aetherborn"); - this.subtype.add("Rogue"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // Other Aetherborn you control get +1/+1. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, true))); - - // Whenever Midnight Entourage or another Aetherborn you control dies, you draw a card and you lose 1 life. - Ability ability = new DiesThisOrAnotherCreatureTriggeredAbility(new DrawCardSourceControllerEffect(1), false, filter); - Effect effect = new LoseLifeSourceControllerEffect(1); - effect.setText("and you lose 1 life"); - ability.addEffect(effect); - this.addAbility(ability); - } - - public MidnightEntourage(final MidnightEntourage card) { - super(card); - } - - @Override - public MidnightEntourage copy() { - return new MidnightEntourage(this); - } -} +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesThisOrAnotherCreatureTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author Styxo + */ +public class MidnightEntourage extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Aetherborn you control"); + + static { + filter.add(new SubtypePredicate(SubType.AETHERBORN)); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public MidnightEntourage(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + + this.subtype.add(SubType.AETHERBORN); + this.subtype.add(SubType.ROGUE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Other Aetherborn you control get +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, true))); + + // Whenever Midnight Entourage or another Aetherborn you control dies, you draw a card and you lose 1 life. + Ability ability = new DiesThisOrAnotherCreatureTriggeredAbility(new DrawCardSourceControllerEffect(1), false, filter); + Effect effect = new LoseLifeSourceControllerEffect(1); + effect.setText("and you lose 1 life"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public MidnightEntourage(final MidnightEntourage card) { + super(card); + } + + @Override + public MidnightEntourage copy() { + return new MidnightEntourage(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MidnightGuard.java b/Mage.Sets/src/mage/cards/m/MidnightGuard.java index 8cf460bce8..6b00c054c1 100644 --- a/Mage.Sets/src/mage/cards/m/MidnightGuard.java +++ b/Mage.Sets/src/mage/cards/m/MidnightGuard.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -51,8 +52,8 @@ public class MidnightGuard extends CardImpl { public MidnightGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MidnightScavengers.java b/Mage.Sets/src/mage/cards/m/MidnightScavengers.java index 0d7cbb4057..8d8d3d8138 100644 --- a/Mage.Sets/src/mage/cards/m/MidnightScavengers.java +++ b/Mage.Sets/src/mage/cards/m/MidnightScavengers.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -58,8 +59,8 @@ public class MidnightScavengers extends CardImpl { public MidnightScavengers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MidvastProtector.java b/Mage.Sets/src/mage/cards/m/MidvastProtector.java index c03f5cd0c4..c7ac4030ee 100644 --- a/Mage.Sets/src/mage/cards/m/MidvastProtector.java +++ b/Mage.Sets/src/mage/cards/m/MidvastProtector.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.GainProtectionFromColorTargetEff import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetControlledCreaturePermanent; @@ -45,8 +46,8 @@ public class MidvastProtector extends CardImpl { public MidvastProtector(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MightSliver.java b/Mage.Sets/src/mage/cards/m/MightSliver.java index 658a4fa65e..639aa85209 100644 --- a/Mage.Sets/src/mage/cards/m/MightSliver.java +++ b/Mage.Sets/src/mage/cards/m/MightSliver.java @@ -54,7 +54,7 @@ public class MightSliver extends CardImpl { public MightSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MightWeaver.java b/Mage.Sets/src/mage/cards/m/MightWeaver.java index cc335326e6..c1abff9f3e 100644 --- a/Mage.Sets/src/mage/cards/m/MightWeaver.java +++ b/Mage.Sets/src/mage/cards/m/MightWeaver.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -61,8 +62,8 @@ public class MightWeaver extends CardImpl { public MightWeaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MijaeDjinn.java b/Mage.Sets/src/mage/cards/m/MijaeDjinn.java index dda7f24f34..79d61fee1e 100644 --- a/Mage.Sets/src/mage/cards/m/MijaeDjinn.java +++ b/Mage.Sets/src/mage/cards/m/MijaeDjinn.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -48,7 +49,7 @@ public class MijaeDjinn extends CardImpl { public MijaeDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{R}{R}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(6); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MikaeusTheLunarch.java b/Mage.Sets/src/mage/cards/m/MikaeusTheLunarch.java index 8e41882924..09390ad4fc 100644 --- a/Mage.Sets/src/mage/cards/m/MikaeusTheLunarch.java +++ b/Mage.Sets/src/mage/cards/m/MikaeusTheLunarch.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.counters.CounterType; @@ -61,8 +62,8 @@ public class MikaeusTheLunarch extends CardImpl { public MikaeusTheLunarch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{X}{W}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MikaeusTheUnhallowed.java b/Mage.Sets/src/mage/cards/m/MikaeusTheUnhallowed.java index 31df4c8ca9..af0f12dc21 100644 --- a/Mage.Sets/src/mage/cards/m/MikaeusTheUnhallowed.java +++ b/Mage.Sets/src/mage/cards/m/MikaeusTheUnhallowed.java @@ -63,8 +63,8 @@ public class MikaeusTheUnhallowed extends CardImpl { public MikaeusTheUnhallowed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Zombie"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MilitantInquisitor.java b/Mage.Sets/src/mage/cards/m/MilitantInquisitor.java index fd5b93d460..05df6afc78 100644 --- a/Mage.Sets/src/mage/cards/m/MilitantInquisitor.java +++ b/Mage.Sets/src/mage/cards/m/MilitantInquisitor.java @@ -58,8 +58,8 @@ public class MilitantInquisitor extends CardImpl { public MilitantInquisitor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MilitantMonk.java b/Mage.Sets/src/mage/cards/m/MilitantMonk.java index e86c709be7..a302c41e16 100644 --- a/Mage.Sets/src/mage/cards/m/MilitantMonk.java +++ b/Mage.Sets/src/mage/cards/m/MilitantMonk.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -49,9 +50,9 @@ public class MilitantMonk extends CardImpl { public MilitantMonk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MilitiasPride.java b/Mage.Sets/src/mage/cards/m/MilitiasPride.java index d7ed2c955a..58b1a6a10d 100644 --- a/Mage.Sets/src/mage/cards/m/MilitiasPride.java +++ b/Mage.Sets/src/mage/cards/m/MilitiasPride.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DoIfCostPaid; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; @@ -53,7 +54,7 @@ public class MilitiasPride extends CardImpl { public MilitiasPride(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Kithkin"); + this.subtype.add(SubType.KITHKIN); // Whenever a creature you control attacks, you may pay {W}. If you do create a 1/1 white Kithkin Soldier creature token in play tapped and attacking this.addAbility(new MilitiasPrideTriggerAbility()); diff --git a/Mage.Sets/src/mage/cards/m/MillennialGargoyle.java b/Mage.Sets/src/mage/cards/m/MillennialGargoyle.java index d5f7b2fc22..186399e98e 100644 --- a/Mage.Sets/src/mage/cards/m/MillennialGargoyle.java +++ b/Mage.Sets/src/mage/cards/m/MillennialGargoyle.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class MillennialGargoyle extends CardImpl { public MillennialGargoyle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Gargoyle"); + this.subtype.add(SubType.GARGOYLE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MillenniumFalcon.java b/Mage.Sets/src/mage/cards/m/MillenniumFalcon.java index 377502bcf1..d82b39f63a 100644 --- a/Mage.Sets/src/mage/cards/m/MillenniumFalcon.java +++ b/Mage.Sets/src/mage/cards/m/MillenniumFalcon.java @@ -1,75 +1,76 @@ -/* - * 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.cards.m; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; -import mage.abilities.keyword.FlashAbility; -import mage.abilities.keyword.HexproofAbility; -import mage.abilities.keyword.SpaceflightAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SuperType; -import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; - -/** - * - * @author Styxo - */ -public class MillenniumFalcon extends CardImpl { - - public MillenniumFalcon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{G}{G}"); - addSuperType(SuperType.LEGENDARY); - this.subtype.add("Starship"); - this.power = new MageInt(5); - this.toughness = new MageInt(4); - - // Flash - this.addAbility(FlashAbility.getInstance()); - - // Spaceflight - this.addAbility(SpaceflightAbility.getInstance()); - - // When Millennium Falcon enters the battlefield, creatures you control gain hexproof until end of turn. - this.addAbility(new EntersBattlefieldTriggeredAbility(new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.EndOfTurn, FILTER_PERMANENT_CREATURES))); - } - - public MillenniumFalcon(final MillenniumFalcon card) { - super(card); - } - - @Override - public MillenniumFalcon copy() { - return new MillenniumFalcon(this); - } -} +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.HexproofAbility; +import mage.abilities.keyword.SpaceflightAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.SuperType; +import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; + +/** + * + * @author Styxo + */ +public class MillenniumFalcon extends CardImpl { + + public MillenniumFalcon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{G}{G}"); + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + + // When Millennium Falcon enters the battlefield, creatures you control gain hexproof until end of turn. + this.addAbility(new EntersBattlefieldTriggeredAbility(new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.EndOfTurn, FILTER_PERMANENT_CREATURES))); + } + + public MillenniumFalcon(final MillenniumFalcon card) { + super(card); + } + + @Override + public MillenniumFalcon copy() { + return new MillenniumFalcon(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/Millikin.java b/Mage.Sets/src/mage/cards/m/Millikin.java index b1ebe16b6e..6c01aec023 100644 --- a/Mage.Sets/src/mage/cards/m/Millikin.java +++ b/Mage.Sets/src/mage/cards/m/Millikin.java @@ -34,6 +34,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class Millikin extends CardImpl { public Millikin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/Mimeofacture.java b/Mage.Sets/src/mage/cards/m/Mimeofacture.java new file mode 100644 index 0000000000..540711d763 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/Mimeofacture.java @@ -0,0 +1,115 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.ReplicateAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.StaticFilters; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author TheElk801 + */ +public class Mimeofacture extends CardImpl { + + public Mimeofacture(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U}"); + + // Replicate {3}{U} + this.addAbility(new ReplicateAbility(this, "{3}{U}")); + + // Choose target permanent an opponent controls. Search that player's library for a card with the same name and put it onto the battlefield under your control. Then that player shuffles his or her library. + this.getSpellAbility().addEffect(new MimeofactureEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT)); + } + + public Mimeofacture(final Mimeofacture card) { + super(card); + } + + @Override + public Mimeofacture copy() { + return new Mimeofacture(this); + } +} + +class MimeofactureEffect extends OneShotEffect { + + MimeofactureEffect() { + super(Outcome.PutCardInPlay); + this.staticText = "Choose target permanent an opponent controls. " + + "Search that player's library for a card with the same name and put it onto the battlefield under your control. " + + "Then that player shuffles his or her library."; + } + + MimeofactureEffect(final MimeofactureEffect effect) { + super(effect); + } + + @Override + public MimeofactureEffect copy() { + return new MimeofactureEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (controller == null || permanent == null) { + return false; + } + Player opponent = game.getPlayer(permanent.getControllerId()); + if (opponent == null) { + return false; + } + FilterCard filter = new FilterCard("card named " + permanent.getName()); + filter.add(new NamePredicate(permanent.getName())); + TargetCardInLibrary target = new TargetCardInLibrary(0, 1, filter); + if (controller.searchLibrary(target, game, opponent.getId())) { + Card card = opponent.getLibrary().getCard(target.getFirstTarget(), game); + controller.moveCards(card, Zone.BATTLEFIELD, source, game); + } + opponent.shuffleLibrary(source, game); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/m/MimicVat.java b/Mage.Sets/src/mage/cards/m/MimicVat.java index 21e3ae8a9c..8fd4c37ba9 100644 --- a/Mage.Sets/src/mage/cards/m/MimicVat.java +++ b/Mage.Sets/src/mage/cards/m/MimicVat.java @@ -39,7 +39,7 @@ import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -206,7 +206,7 @@ class MimicVatCreateTokenEffect extends OneShotEffect { if (!permanent.getImprinted().isEmpty()) { Card card = game.getCard(permanent.getImprinted().get(0)); if (card != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, true); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), null, true); effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game))); effect.apply(game, source); for (Permanent addedToken : effect.getAddedPermanent()) { diff --git a/Mage.Sets/src/mage/cards/m/MinaAndDennWildborn.java b/Mage.Sets/src/mage/cards/m/MinaAndDennWildborn.java index a4a5b62704..3bb5070c89 100644 --- a/Mage.Sets/src/mage/cards/m/MinaAndDennWildborn.java +++ b/Mage.Sets/src/mage/cards/m/MinaAndDennWildborn.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -58,8 +59,8 @@ public class MinaAndDennWildborn extends CardImpl { public MinaAndDennWildborn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Ally"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ALLY); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MinamoScrollkeeper.java b/Mage.Sets/src/mage/cards/m/MinamoScrollkeeper.java index 04ff39148b..58876083fc 100644 --- a/Mage.Sets/src/mage/cards/m/MinamoScrollkeeper.java +++ b/Mage.Sets/src/mage/cards/m/MinamoScrollkeeper.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class MinamoScrollkeeper extends CardImpl { public MinamoScrollkeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MinamoSightbender.java b/Mage.Sets/src/mage/cards/m/MinamoSightbender.java index d08d9cc291..a856679fa7 100644 --- a/Mage.Sets/src/mage/cards/m/MinamoSightbender.java +++ b/Mage.Sets/src/mage/cards/m/MinamoSightbender.java @@ -33,18 +33,17 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.Effect; import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; +import mage.constants.SubType; +import mage.constants.TargetAdjustment; import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.PowerPredicate; -import mage.game.Game; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.Target; -import mage.target.common.TargetCreaturePermanent; +import mage.target.TargetPermanent; /** * @@ -52,47 +51,32 @@ import mage.target.common.TargetCreaturePermanent; */ public class MinamoSightbender extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power X or less"); - private final UUID originalId; + private static final FilterPermanent filter = new FilterPermanent("creature with power X or less"); + + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); + } public MinamoSightbender(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = 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}")); - Target target = new TargetCreaturePermanent(filter); + Target target = new TargetPermanent(filter); + ability.setTargetAdjustment(TargetAdjustment.X_POWER_LEQ); ability.addTarget(target); ability.addCost(new TapSourceCost()); - originalId = ability.getOriginalId(); this.addAbility(ability); } - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(originalId)) { - for (Effect effect : ability.getEffects()) { - if (effect instanceof CantBeBlockedTargetEffect) { - int manaX = ability.getManaCostsToPay().getX(); - ability.getTargets().clear(); - FilterCreaturePermanent newFilter = new FilterCreaturePermanent(new StringBuilder("creature with power ").append(manaX).append(" or less").toString()); - filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, manaX + 1)); - Target target = new TargetCreaturePermanent(newFilter); - ability.addTarget(target); - break; - } - } - } - } - public MinamoSightbender(final MinamoSightbender card) { super(card); - this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/cards/m/MindControl.java b/Mage.Sets/src/mage/cards/m/MindControl.java index f91e29e665..7e5925cb1c 100644 --- a/Mage.Sets/src/mage/cards/m/MindControl.java +++ b/Mage.Sets/src/mage/cards/m/MindControl.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class MindControl extends CardImpl { public MindControl(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/m/MindHarness.java b/Mage.Sets/src/mage/cards/m/MindHarness.java new file mode 100644 index 0000000000..a0ef54b12a --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MindHarness.java @@ -0,0 +1,89 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.ObjectColor; +import mage.constants.SubType; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.ControlEnchantedEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author TheElk801 + */ +public class MindHarness extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("red or green creature"); + + static { + filter.add(Predicates.or(new ColorPredicate(ObjectColor.RED), new ColorPredicate(ObjectColor.GREEN))); + } + + public MindHarness(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}"); + + this.subtype.add(SubType.AURA); + + // Enchant red or green creature + TargetPermanent auraTarget = new TargetPermanent(filter); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Cumulative upkeep {1} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{1}"))); + + // You control enchanted creature. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ControlEnchantedEffect())); + } + + public MindHarness(final MindHarness card) { + super(card); + } + + @Override + public MindHarness copy() { + return new MindHarness(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MindRaker.java b/Mage.Sets/src/mage/cards/m/MindRaker.java index 6ba9b2c77e..d04c739577 100644 --- a/Mage.Sets/src/mage/cards/m/MindRaker.java +++ b/Mage.Sets/src/mage/cards/m/MindRaker.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -47,8 +48,8 @@ public class MindRaker extends CardImpl { public MindRaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Processor"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.PROCESSOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MindSwords.java b/Mage.Sets/src/mage/cards/m/MindSwords.java new file mode 100644 index 0000000000..32f3ab6328 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MindSwords.java @@ -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.cards.m; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.costs.AlternativeCostSourceAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCardInHand; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class MindSwords extends CardImpl { + + private static final FilterLandPermanent filterSwamp = new FilterLandPermanent("If you control a Swamp"); + + static { + filterSwamp.add(new SubtypePredicate(SubType.SWAMP)); + } + + public MindSwords(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}"); + + // If you control a Swamp, you may sacrifice a creature rather than pay Mind Swords's mana cost. + this.addAbility(new AlternativeCostSourceAbility( + new SacrificeTargetCost(new TargetControlledCreaturePermanent()), + new PermanentsOnTheBattlefieldCondition(filterSwamp), null + )); + + // Each player exiles two cards from his or her hand. + this.getSpellAbility().addEffect(new MindSwordsEffect()); + } + + public MindSwords(final MindSwords card) { + super(card); + } + + @Override + public MindSwords copy() { + return new MindSwords(this); + } +} + +class MindSwordsEffect extends OneShotEffect { + + MindSwordsEffect() { + super(Outcome.Exile); + this.staticText = "Each player exiles two cards from his or her hand."; + } + + MindSwordsEffect(final MindSwordsEffect effect) { + super(effect); + } + + @Override + public MindSwordsEffect copy() { + return new MindSwordsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + // Store for each player the cards to exile, that's important because all exile shall happen at the same time + Map cardsToExile = new HashMap<>(); + // Each player chooses 2 cards to discard + for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { + Player player = game.getPlayer(playerId); + if (player == null) { + continue; + } + + int numberOfCardsToExile = Math.min(2, player.getHand().size()); + Cards cards = new CardsImpl(); + + Target target = new TargetCardInHand(numberOfCardsToExile, new FilterCard()); + + player.chooseTarget(Outcome.Exile, target, source, game); + cards.addAll(target.getTargets()); + cardsToExile.put(playerId, cards); + } + // Exile all choosen cards + for (UUID playerId : game.getOpponents(source.getControllerId())) { + Player player = game.getPlayer(playerId); + if (player == null) { + continue; + } + Cards cardsPlayerChoseToExile = cardsToExile.get(playerId); + if (cardsPlayerChoseToExile == null) { + continue; + } + player.moveCards(cardsPlayerChoseToExile.getCards(game), Zone.EXILED, source, game); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/m/MindWarp.java b/Mage.Sets/src/mage/cards/m/MindWarp.java index bac5087a39..be07dd9f3c 100644 --- a/Mage.Sets/src/mage/cards/m/MindWarp.java +++ b/Mage.Sets/src/mage/cards/m/MindWarp.java @@ -28,12 +28,20 @@ package mage.cards.m; import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.ManacostVariableValue; -import mage.abilities.effects.common.discard.DiscardCardYouChooseTargetEffect; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.TargetController; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; import mage.target.TargetPlayer; /** @@ -43,11 +51,10 @@ import mage.target.TargetPlayer; public class MindWarp extends CardImpl { public MindWarp(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{3}{B}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{3}{B}"); // Look at target player's hand and choose X cards from it. That player discards those cards. - this.getSpellAbility().addEffect(new DiscardCardYouChooseTargetEffect(new ManacostVariableValue(), TargetController.ANY)); + this.getSpellAbility().addEffect(new MindWarpEffect(new ManacostVariableValue())); this.getSpellAbility().addTarget(new TargetPlayer()); } @@ -60,3 +67,47 @@ public class MindWarp extends CardImpl { return new MindWarp(this); } } + +class MindWarpEffect extends OneShotEffect { + + private final DynamicValue xValue; + + public MindWarpEffect(DynamicValue xValue) { + super(Outcome.Discard); + this.xValue = xValue; + staticText = "Look at target player's hand and choose X cards from it. That player discards those card."; + } + + public MindWarpEffect(final MindWarpEffect effect) { + super(effect); + this.xValue = effect.xValue; + } + + @Override + public boolean apply(Game game, Ability source) { + Player targetPlayer = game.getPlayer(source.getFirstTarget()); + Player you = game.getPlayer(source.getControllerId()); + if (targetPlayer != null && you != null) { + int amountToDiscard = Math.min( + xValue.calculate(game, source, this), + targetPlayer.getHand().size() + ); + you.lookAtCards("Discard", targetPlayer.getHand(), game); + TargetCard target = new TargetCard(amountToDiscard, Zone.HAND, new FilterCard()); + target.setNotTarget(true); + if (you.choose(Outcome.Benefit, targetPlayer.getHand(), target, game)) { + Card card = targetPlayer.getHand().get(target.getFirstTarget(), game); + if (card != null) { + return targetPlayer.discard(card, source, game); + } + } + + } + return false; + } + + @Override + public MindWarpEffect copy() { + return new MindWarpEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MindclawShaman.java b/Mage.Sets/src/mage/cards/m/MindclawShaman.java index b4b7540fec..6847f4a5e6 100644 --- a/Mage.Sets/src/mage/cards/m/MindclawShaman.java +++ b/Mage.Sets/src/mage/cards/m/MindclawShaman.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -55,8 +56,8 @@ public class MindclawShaman extends CardImpl { public MindclawShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Viashino"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MindeyeDrake.java b/Mage.Sets/src/mage/cards/m/MindeyeDrake.java index 40ae516c06..6b5deb36a7 100644 --- a/Mage.Sets/src/mage/cards/m/MindeyeDrake.java +++ b/Mage.Sets/src/mage/cards/m/MindeyeDrake.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -46,7 +47,7 @@ public class MindeyeDrake extends CardImpl { public MindeyeDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MindlashSliver.java b/Mage.Sets/src/mage/cards/m/MindlashSliver.java index 313e9b9b2c..2c20cd999c 100644 --- a/Mage.Sets/src/mage/cards/m/MindlashSliver.java +++ b/Mage.Sets/src/mage/cards/m/MindlashSliver.java @@ -58,7 +58,7 @@ public class MindlashSliver extends CardImpl { } public MindlashSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MindleechMass.java b/Mage.Sets/src/mage/cards/m/MindleechMass.java index 7c76532829..a604d7764a 100644 --- a/Mage.Sets/src/mage/cards/m/MindleechMass.java +++ b/Mage.Sets/src/mage/cards/m/MindleechMass.java @@ -39,6 +39,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterNonlandCard; @@ -54,7 +55,7 @@ public class MindleechMass extends CardImpl { public MindleechMass(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/m/MindlessAutomaton.java b/Mage.Sets/src/mage/cards/m/MindlessAutomaton.java index 89541d399a..8605e6e288 100644 --- a/Mage.Sets/src/mage/cards/m/MindlessAutomaton.java +++ b/Mage.Sets/src/mage/cards/m/MindlessAutomaton.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -51,7 +52,7 @@ public class MindlessAutomaton extends CardImpl { public MindlessAutomaton(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MindlessNull.java b/Mage.Sets/src/mage/cards/m/MindlessNull.java index 3cf134e7ae..0818936417 100644 --- a/Mage.Sets/src/mage/cards/m/MindlessNull.java +++ b/Mage.Sets/src/mage/cards/m/MindlessNull.java @@ -51,7 +51,7 @@ public class MindlessNull extends CardImpl { } public MindlessNull(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/Mindmelter.java b/Mage.Sets/src/mage/cards/m/Mindmelter.java index d780b9eacb..5e4bac6445 100644 --- a/Mage.Sets/src/mage/cards/m/Mindmelter.java +++ b/Mage.Sets/src/mage/cards/m/Mindmelter.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.target.common.TargetOpponent; @@ -51,8 +52,8 @@ public class Mindmelter extends CardImpl { public Mindmelter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/Mindreaver.java b/Mage.Sets/src/mage/cards/m/Mindreaver.java index f8f6575137..0040ff5485 100644 --- a/Mage.Sets/src/mage/cards/m/Mindreaver.java +++ b/Mage.Sets/src/mage/cards/m/Mindreaver.java @@ -44,6 +44,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.SplitCard; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SpellAbilityType; import mage.constants.Zone; @@ -65,8 +66,8 @@ public class Mindreaver extends CardImpl { public Mindreaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MindscourDragon.java b/Mage.Sets/src/mage/cards/m/MindscourDragon.java index 9f89ccd35a..8ec7eb8d14 100644 --- a/Mage.Sets/src/mage/cards/m/MindscourDragon.java +++ b/Mage.Sets/src/mage/cards/m/MindscourDragon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -46,7 +47,7 @@ public class MindscourDragon extends CardImpl { public MindscourDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/Mindshrieker.java b/Mage.Sets/src/mage/cards/m/Mindshrieker.java index 3d5791d57d..62974bd079 100644 --- a/Mage.Sets/src/mage/cards/m/Mindshrieker.java +++ b/Mage.Sets/src/mage/cards/m/Mindshrieker.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class Mindshrieker extends CardImpl { public Mindshrieker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Spirit"); - this.subtype.add("Bird"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/Mindslicer.java b/Mage.Sets/src/mage/cards/m/Mindslicer.java index 88fb7e10ea..56439cd6ca 100644 --- a/Mage.Sets/src/mage/cards/m/Mindslicer.java +++ b/Mage.Sets/src/mage/cards/m/Mindslicer.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.discard.DiscardHandAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class Mindslicer extends CardImpl { public Mindslicer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/Mindsparker.java b/Mage.Sets/src/mage/cards/m/Mindsparker.java index d02ce59dc0..00e98de566 100644 --- a/Mage.Sets/src/mage/cards/m/Mindsparker.java +++ b/Mage.Sets/src/mage/cards/m/Mindsparker.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.constants.Zone; @@ -66,7 +67,7 @@ public class Mindsparker extends CardImpl { public Mindsparker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MindstabThrull.java b/Mage.Sets/src/mage/cards/m/MindstabThrull.java index 1c7669b84c..c899b31b3a 100644 --- a/Mage.Sets/src/mage/cards/m/MindstabThrull.java +++ b/Mage.Sets/src/mage/cards/m/MindstabThrull.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class MindstabThrull extends CardImpl { public MindstabThrull(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Thrull"); + this.subtype.add(SubType.THRULL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MindstormCrown.java b/Mage.Sets/src/mage/cards/m/MindstormCrown.java new file mode 100644 index 0000000000..4170b7a6cd --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MindstormCrown.java @@ -0,0 +1,143 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.WatcherScope; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.watchers.Watcher; + +/** + * + * @author TheElk801 + */ +public class MindstormCrown extends CardImpl { + + public MindstormCrown(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + // At the beginning of your upkeep, draw a card if you had no cards in hand at the beginning of this turn. If you had a card in hand, Mindstorm Crown deals 1 damage to you. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new MindstormCrownEffect(), TargetController.YOU, false), new MindstormCrownWatcher()); + } + + public MindstormCrown(final MindstormCrown card) { + super(card); + } + + @Override + public MindstormCrown copy() { + return new MindstormCrown(this); + } +} + +class MindstormCrownEffect extends OneShotEffect { + + MindstormCrownEffect() { + super(Outcome.Benefit); + this.staticText = ""; + } + + MindstormCrownEffect(final MindstormCrownEffect effect) { + super(effect); + } + + @Override + public MindstormCrownEffect copy() { + return new MindstormCrownEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (player == null) { + return false; + } + MindstormCrownWatcher watcher = (MindstormCrownWatcher) game.getState().getWatchers().get(MindstormCrownWatcher.class.getSimpleName()); + if (watcher != null && watcher.getCardsInHandCount() == 0) { + player.drawCards(1, game); + } else { + if (permanent != null) { + player.damage(2, permanent.getId(), game, false, true); + } + } + return true; + } +} + +class MindstormCrownWatcher extends Watcher { + + private int cardsInHandCount; + + public MindstormCrownWatcher() { + super(MindstormCrownWatcher.class.getSimpleName(), WatcherScope.GAME); + } + + public MindstormCrownWatcher(final MindstormCrownWatcher watcher) { + super(watcher); + cardsInHandCount = watcher.cardsInHandCount; + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.BEGINNING_PHASE_PRE + && game.getPhase() != null) { + Player player = game.getPlayer(game.getActivePlayerId()); + int cardsInHand = 0; + if (player != null) { + cardsInHand = player.getHand().size(); + } + cardsInHandCount = cardsInHand; + } + } + + public int getCardsInHandCount() { + return cardsInHandCount; + } + + @Override + public void reset() { + cardsInHandCount = 0; + } + + @Override + public MindstormCrownWatcher copy() { + return new MindstormCrownWatcher(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/Mindwarper.java b/Mage.Sets/src/mage/cards/m/Mindwarper.java index 21c1b8d1d3..ce03d5ded0 100644 --- a/Mage.Sets/src/mage/cards/m/Mindwarper.java +++ b/Mage.Sets/src/mage/cards/m/Mindwarper.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.TargetPlayer; @@ -51,7 +52,7 @@ public class Mindwarper extends CardImpl { public Mindwarper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MindwhipSliver.java b/Mage.Sets/src/mage/cards/m/MindwhipSliver.java index 48236d7953..9e97ef8ec8 100644 --- a/Mage.Sets/src/mage/cards/m/MindwhipSliver.java +++ b/Mage.Sets/src/mage/cards/m/MindwhipSliver.java @@ -59,7 +59,7 @@ public class MindwhipSliver extends CardImpl { public MindwhipSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MindwrackDemon.java b/Mage.Sets/src/mage/cards/m/MindwrackDemon.java index 3f65694c85..cf471b1310 100644 --- a/Mage.Sets/src/mage/cards/m/MindwrackDemon.java +++ b/Mage.Sets/src/mage/cards/m/MindwrackDemon.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -52,7 +53,7 @@ public class MindwrackDemon extends CardImpl { public MindwrackDemon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MindwrackLiege.java b/Mage.Sets/src/mage/cards/m/MindwrackLiege.java index 127cff9d3a..e2deb019e0 100644 --- a/Mage.Sets/src/mage/cards/m/MindwrackLiege.java +++ b/Mage.Sets/src/mage/cards/m/MindwrackLiege.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -68,7 +69,7 @@ public class MindwrackLiege extends CardImpl { public MindwrackLiege(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U/R}{U/R}{U/R}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MineBearer.java b/Mage.Sets/src/mage/cards/m/MineBearer.java index 22f5e69847..c27e9623a3 100644 --- a/Mage.Sets/src/mage/cards/m/MineBearer.java +++ b/Mage.Sets/src/mage/cards/m/MineBearer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetAttackingCreature; @@ -48,8 +49,8 @@ public class MineBearer extends CardImpl { public MineBearer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MineLayer.java b/Mage.Sets/src/mage/cards/m/MineLayer.java new file mode 100644 index 0000000000..1c2342f629 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MineLayer.java @@ -0,0 +1,121 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BecomesTappedTriggeredAbility; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.permanent.CounterPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author TheElk801 + */ +public class MineLayer extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent("land with a mine counter on it"); + + static { + filter.add(new CounterPredicate(CounterType.MINE)); + } + + public MineLayer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.DWARF); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}{R}, {tap}: Put a mine counter on target land. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.MINE.createInstance()), new TapSourceCost()); + ability.addCost(new ManaCostsImpl("{1}{R}")); + ability.addTarget(new TargetLandPermanent()); + this.addAbility(ability); + + // Whenever a land with a mine counter on it becomes tapped, destroy it. + this.addAbility(new BecomesTappedTriggeredAbility(new DestroyTargetEffect().setText("destroy that land"), false, filter, true)); + + // When Mine Layer leaves the battlefield, remove all mine counters from all lands. + this.addAbility(new LeavesBattlefieldTriggeredAbility(new RemoveAllMineCountersEffect(), false)); + } + + public MineLayer(final MineLayer card) { + super(card); + } + + @Override + public MineLayer copy() { + return new MineLayer(this); + } +} + +class RemoveAllMineCountersEffect extends OneShotEffect { + + public RemoveAllMineCountersEffect() { + super(Outcome.Neutral); + this.staticText = "remove all mine counters from all lands"; + } + + public RemoveAllMineCountersEffect(final RemoveAllMineCountersEffect effect) { + super(effect); + } + + @Override + public RemoveAllMineCountersEffect copy() { + return new RemoveAllMineCountersEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(CardType.LAND)) { + if (permanent != null) { + permanent.getCounters(game).removeAllCounters(CounterType.MINE); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/m/MinersBane.java b/Mage.Sets/src/mage/cards/m/MinersBane.java index aeec5930ff..1e8f00fda6 100644 --- a/Mage.Sets/src/mage/cards/m/MinersBane.java +++ b/Mage.Sets/src/mage/cards/m/MinersBane.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class MinersBane extends CardImpl { public MinersBane(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MinionOfLeshrac.java b/Mage.Sets/src/mage/cards/m/MinionOfLeshrac.java index 34bf5ab0cc..823f253169 100644 --- a/Mage.Sets/src/mage/cards/m/MinionOfLeshrac.java +++ b/Mage.Sets/src/mage/cards/m/MinionOfLeshrac.java @@ -1,140 +1,141 @@ -/* - * 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.cards.m; - -import java.util.UUID; -import mage.MageInt; -import mage.ObjectColor; -import mage.abilities.Ability; -import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.SacrificeTargetCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.DestroyTargetEffect; -import mage.abilities.keyword.ProtectionAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.filter.FilterPermanent; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.filter.predicate.permanent.AnotherPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.TargetPermanent; -import mage.target.common.TargetControlledPermanent; - -/** - * - * @author jeffwadsworth - */ -public class MinionOfLeshrac extends CardImpl { - - private static final FilterPermanent filterCreatureOrLand = new FilterPermanent("creature or land"); - - static { - filterCreatureOrLand.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.LAND))); - } - - public MinionOfLeshrac(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}{B}"); - - this.subtype.add("Demon"); - this.subtype.add("Minion"); - this.power = new MageInt(5); - this.toughness = new MageInt(5); - - // Protection from black - this.addAbility(ProtectionAbility.from(ObjectColor.BLACK)); - - // At the beginning of your upkeep, Minion of Leshrac deals 5 damage to you unless you sacrifice a creature other than Minion of Leshrac. If Minion of Leshrac deals damage to you this way, tap it. - this.addAbility(new BeginningOfUpkeepTriggeredAbility(new MinionLeshracEffect(), TargetController.YOU, false)); - - // {tap}: Destroy target creature or land. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost()); - ability.addTarget(new TargetPermanent(filterCreatureOrLand)); - this.addAbility(ability); - - } - - public MinionOfLeshrac(final MinionOfLeshrac card) { - super(card); - } - - @Override - public MinionOfLeshrac copy() { - return new MinionOfLeshrac(this); - } -} - -class MinionLeshracEffect extends OneShotEffect { - - public MinionLeshracEffect() { - super(Outcome.Sacrifice); - staticText = "{this} deals 5 damage to you unless you sacrifice a creature other than {this}. If {this} deals damage to you this way, tap it"; - } - - public MinionLeshracEffect(final MinionLeshracEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - Permanent minionLeshrac = game.getPermanentOrLKIBattlefield(source.getSourceId()); - if (controller != null - && minionLeshrac != null) { - FilterControlledPermanent filterCreature = new FilterControlledPermanent(); - filterCreature.add(new CardTypePredicate(CardType.CREATURE)); - filterCreature.add(new AnotherPredicate()); - TargetControlledPermanent target = new TargetControlledPermanent(filterCreature); - SacrificeTargetCost cost = new SacrificeTargetCost(target); - if (controller.chooseUse(Outcome.AIDontUseIt, "Do you wish to sacrifice another creature to prevent the 5 damage to you?", source, game) - && cost.canPay(source, source.getSourceId(), source.getControllerId(), game) - && cost.pay(source, game, source.getSourceId(), source.getControllerId(), true)) { - return true; - } - if (controller.damage(5, minionLeshrac.getId(), game, false, true) > 0) { - minionLeshrac.tap(game); - return true; - } - } - return false; - } - - @Override - public MinionLeshracEffect copy() { - return new MinionLeshracEffect(this); - } -} +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author jeffwadsworth + */ +public class MinionOfLeshrac extends CardImpl { + + private static final FilterPermanent filterCreatureOrLand = new FilterPermanent("creature or land"); + + static { + filterCreatureOrLand.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.LAND))); + } + + public MinionOfLeshrac(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}{B}"); + + this.subtype.add(SubType.DEMON); + this.subtype.add(SubType.MINION); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Protection from black + this.addAbility(ProtectionAbility.from(ObjectColor.BLACK)); + + // At the beginning of your upkeep, Minion of Leshrac deals 5 damage to you unless you sacrifice a creature other than Minion of Leshrac. If Minion of Leshrac deals damage to you this way, tap it. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new MinionLeshracEffect(), TargetController.YOU, false)); + + // {tap}: Destroy target creature or land. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost()); + ability.addTarget(new TargetPermanent(filterCreatureOrLand)); + this.addAbility(ability); + + } + + public MinionOfLeshrac(final MinionOfLeshrac card) { + super(card); + } + + @Override + public MinionOfLeshrac copy() { + return new MinionOfLeshrac(this); + } +} + +class MinionLeshracEffect extends OneShotEffect { + + public MinionLeshracEffect() { + super(Outcome.Sacrifice); + staticText = "{this} deals 5 damage to you unless you sacrifice a creature other than {this}. If {this} deals damage to you this way, tap it"; + } + + public MinionLeshracEffect(final MinionLeshracEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent minionLeshrac = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (controller != null + && minionLeshrac != null) { + FilterControlledPermanent filterCreature = new FilterControlledPermanent(); + filterCreature.add(new CardTypePredicate(CardType.CREATURE)); + filterCreature.add(new AnotherPredicate()); + TargetControlledPermanent target = new TargetControlledPermanent(filterCreature); + SacrificeTargetCost cost = new SacrificeTargetCost(target); + if (controller.chooseUse(Outcome.AIDontUseIt, "Do you wish to sacrifice another creature to prevent the 5 damage to you?", source, game) + && cost.canPay(source, source.getSourceId(), source.getControllerId(), game) + && cost.pay(source, game, source.getSourceId(), source.getControllerId(), true)) { + return true; + } + if (controller.damage(5, minionLeshrac.getId(), game, false, true) > 0) { + minionLeshrac.tap(game); + return true; + } + } + return false; + } + + @Override + public MinionLeshracEffect copy() { + return new MinionLeshracEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MinionOfTeveshSzat.java b/Mage.Sets/src/mage/cards/m/MinionOfTeveshSzat.java new file mode 100644 index 0000000000..e55d431936 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MinionOfTeveshSzat.java @@ -0,0 +1,85 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageControllerEffect; +import mage.abilities.effects.common.DoUnlessControllerPaysEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class MinionOfTeveshSzat extends CardImpl { + + public MinionOfTeveshSzat(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}{B}"); + + this.subtype.add(SubType.DEMON); + this.subtype.add(SubType.MINION); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // At the beginning of your upkeep, Minion of Tevesh Szat deals 2 damage to you unless you pay {B}{B}. + this.addAbility(new BeginningOfUpkeepTriggeredAbility( + new DoUnlessControllerPaysEffect( + new DamageControllerEffect(2), + new ManaCostsImpl("{B}{B}") + ), + TargetController.YOU, false + )); + + // {tap}: Target creature gets +3/-2 until end of turn. + Ability ability = new SimpleActivatedAbility(new BoostTargetEffect(3, -2, Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public MinionOfTeveshSzat(final MinionOfTeveshSzat card) { + super(card); + } + + @Override + public MinionOfTeveshSzat copy() { + return new MinionOfTeveshSzat(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MinionReflector.java b/Mage.Sets/src/mage/cards/m/MinionReflector.java index 506f9ac33c..a9ae22da15 100644 --- a/Mage.Sets/src/mage/cards/m/MinionReflector.java +++ b/Mage.Sets/src/mage/cards/m/MinionReflector.java @@ -35,7 +35,7 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.cards.CardImpl; @@ -137,7 +137,7 @@ class MinionReflectorEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanentOrLKIBattlefield(this.getTargetPointer().getFirst(game, source)); if (permanent != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, true); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), null, true); effect.setTargetPointer(new FixedTarget(permanent, game)); effect.apply(game, source); for (Permanent addedToken : effect.getAddedPermanent()) { diff --git a/Mage.Sets/src/mage/cards/m/MinisterOfImpediments.java b/Mage.Sets/src/mage/cards/m/MinisterOfImpediments.java index 8eafecadc8..3b1169fb06 100644 --- a/Mage.Sets/src/mage/cards/m/MinisterOfImpediments.java +++ b/Mage.Sets/src/mage/cards/m/MinisterOfImpediments.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -47,8 +48,8 @@ public class MinisterOfImpediments extends CardImpl { public MinisterOfImpediments(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W/U}"); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MinisterOfInquiries.java b/Mage.Sets/src/mage/cards/m/MinisterOfInquiries.java index 8cb173d074..ca2b229e35 100644 --- a/Mage.Sets/src/mage/cards/m/MinisterOfInquiries.java +++ b/Mage.Sets/src/mage/cards/m/MinisterOfInquiries.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -50,8 +51,8 @@ public class MinisterOfInquiries extends CardImpl { public MinisterOfInquiries(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MinisterOfPain.java b/Mage.Sets/src/mage/cards/m/MinisterOfPain.java index a1f97fe7d4..b69c053322 100644 --- a/Mage.Sets/src/mage/cards/m/MinisterOfPain.java +++ b/Mage.Sets/src/mage/cards/m/MinisterOfPain.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ExploitAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -54,8 +55,8 @@ public class MinisterOfPain extends CardImpl { public MinisterOfPain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MinotaurAbomination.java b/Mage.Sets/src/mage/cards/m/MinotaurAbomination.java index 08b215b34e..bb675c68f6 100644 --- a/Mage.Sets/src/mage/cards/m/MinotaurAbomination.java +++ b/Mage.Sets/src/mage/cards/m/MinotaurAbomination.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class MinotaurAbomination extends CardImpl { public MinotaurAbomination(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Minotaur"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.MINOTAUR); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/m/MinotaurAggressor.java b/Mage.Sets/src/mage/cards/m/MinotaurAggressor.java index 46aecdfdba..3c361a06f0 100644 --- a/Mage.Sets/src/mage/cards/m/MinotaurAggressor.java +++ b/Mage.Sets/src/mage/cards/m/MinotaurAggressor.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class MinotaurAggressor extends CardImpl { public MinotaurAggressor (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(6); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MinotaurExplorer.java b/Mage.Sets/src/mage/cards/m/MinotaurExplorer.java index ba98e0a9d9..9703d31a23 100644 --- a/Mage.Sets/src/mage/cards/m/MinotaurExplorer.java +++ b/Mage.Sets/src/mage/cards/m/MinotaurExplorer.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class MinotaurExplorer extends CardImpl { public MinotaurExplorer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Scout"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MinotaurIllusionist.java b/Mage.Sets/src/mage/cards/m/MinotaurIllusionist.java index 41e0614026..fcb963fe98 100644 --- a/Mage.Sets/src/mage/cards/m/MinotaurIllusionist.java +++ b/Mage.Sets/src/mage/cards/m/MinotaurIllusionist.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -54,8 +55,8 @@ public class MinotaurIllusionist extends CardImpl { public MinotaurIllusionist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MinotaurSkullcleaver.java b/Mage.Sets/src/mage/cards/m/MinotaurSkullcleaver.java index d2baf0ecb6..8a844c2561 100644 --- a/Mage.Sets/src/mage/cards/m/MinotaurSkullcleaver.java +++ b/Mage.Sets/src/mage/cards/m/MinotaurSkullcleaver.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class MinotaurSkullcleaver extends CardImpl { public MinotaurSkullcleaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MinotaurSureshot.java b/Mage.Sets/src/mage/cards/m/MinotaurSureshot.java index 25aad4e93b..f49ae29b10 100644 --- a/Mage.Sets/src/mage/cards/m/MinotaurSureshot.java +++ b/Mage.Sets/src/mage/cards/m/MinotaurSureshot.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class MinotaurSureshot extends CardImpl { public MinotaurSureshot(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Archer"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MinotaurTactician.java b/Mage.Sets/src/mage/cards/m/MinotaurTactician.java index 6be422b211..b9203d8288 100644 --- a/Mage.Sets/src/mage/cards/m/MinotaurTactician.java +++ b/Mage.Sets/src/mage/cards/m/MinotaurTactician.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -51,33 +52,33 @@ import java.util.UUID; * @author fireshoes */ public class MinotaurTactician extends CardImpl { - + private static final FilterControlledCreaturePermanent filterWhite = new FilterControlledCreaturePermanent(); private static final FilterControlledCreaturePermanent filterBlue = new FilterControlledCreaturePermanent(); - + static { filterWhite.add(new ColorPredicate(ObjectColor.WHITE)); filterBlue.add(new ColorPredicate(ObjectColor.BLUE)); } - - static final private String ruleWhite = "{this} gets +1/+1 as long as you control another white creature"; - - static final private String ruleBlue = "{this} gets +1/+1 as long as you control another white creature"; + + static final private String ruleWhite = "{this} gets +1/+1 as long as you control a white creature"; + + static final private String ruleBlue = "{this} gets +1/+1 as long as you control a blue creature"; public MinotaurTactician(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Minotaur"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.subtype.add(SubType.MINOTAUR); this.power = new MageInt(1); this.toughness = new MageInt(1); // Haste this.addAbility(HasteAbility.getInstance()); - + // Minotaur Tactician gets +1/+1 as long as you control a white creature. Condition conditionWhite = new PermanentsOnTheBattlefieldCondition(filterWhite); Effect effectWhite = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), conditionWhite, ruleWhite); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effectWhite)); - + // Minotaur Tactician gets +1/+1 as long as you control a blue creature. Condition conditionBlue = new PermanentsOnTheBattlefieldCondition(filterBlue); Effect effectBlue = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), conditionBlue, ruleBlue); diff --git a/Mage.Sets/src/mage/cards/m/MinotaurWarrior.java b/Mage.Sets/src/mage/cards/m/MinotaurWarrior.java index d5fccc16d1..beb51ae13b 100644 --- a/Mage.Sets/src/mage/cards/m/MinotaurWarrior.java +++ b/Mage.Sets/src/mage/cards/m/MinotaurWarrior.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class MinotaurWarrior extends CardImpl { public MinotaurWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MiracleWorker.java b/Mage.Sets/src/mage/cards/m/MiracleWorker.java new file mode 100644 index 0000000000..260ea0cb90 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MiracleWorker.java @@ -0,0 +1,81 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AttachedToPredicate; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public class MiracleWorker extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Aura attached to a creature you control"); + + static { + filter.add(new AttachedToPredicate(new FilterControlledCreaturePermanent())); + filter.add(new SubtypePredicate(SubType.AURA)); + } + + public MiracleWorker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Destroy target Aura attached to a creature you control. + Ability ability = new SimpleActivatedAbility(new DestroyTargetEffect(), new TapSourceCost()); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + public MiracleWorker(final MiracleWorker card) { + super(card); + } + + @Override + public MiracleWorker copy() { + return new MiracleWorker(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/Mirari.java b/Mage.Sets/src/mage/cards/m/Mirari.java index 7a657a5fd8..f973289909 100644 --- a/Mage.Sets/src/mage/cards/m/Mirari.java +++ b/Mage.Sets/src/mage/cards/m/Mirari.java @@ -84,7 +84,7 @@ class MirariTriggeredAbility extends TriggeredAbilityImpl { } MirariTriggeredAbility() { - super(Zone.BATTLEFIELD, new DoIfCostPaid(new CopyTargetSpellEffect(), new GenericManaCost(3)), false); + super(Zone.BATTLEFIELD, new DoIfCostPaid(new CopyTargetSpellEffect(true), new GenericManaCost(3)), false); this.addTarget(new TargetSpell(filter)); } diff --git a/Mage.Sets/src/mage/cards/m/MireBlight.java b/Mage.Sets/src/mage/cards/m/MireBlight.java index 113e3774ec..96975c082c 100644 --- a/Mage.Sets/src/mage/cards/m/MireBlight.java +++ b/Mage.Sets/src/mage/cards/m/MireBlight.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class MireBlight extends CardImpl { public MireBlight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/m/MireBoa.java b/Mage.Sets/src/mage/cards/m/MireBoa.java index 2a58ed678b..1c9a78f995 100644 --- a/Mage.Sets/src/mage/cards/m/MireBoa.java +++ b/Mage.Sets/src/mage/cards/m/MireBoa.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class MireBoa extends CardImpl { public MireBoa(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MireKavu.java b/Mage.Sets/src/mage/cards/m/MireKavu.java index b5a467db00..8085d61637 100644 --- a/Mage.Sets/src/mage/cards/m/MireKavu.java +++ b/Mage.Sets/src/mage/cards/m/MireKavu.java @@ -53,7 +53,7 @@ public class MireKavu extends CardImpl { public MireKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MireShade.java b/Mage.Sets/src/mage/cards/m/MireShade.java new file mode 100644 index 0000000000..4532401bc4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MireShade.java @@ -0,0 +1,80 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author TheElk801 + */ +public class MireShade extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Swamp"); + + static { + filter.add(new SubtypePredicate(SubType.SWAMP)); + } + + public MireShade(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.SHADE); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {B}, Sacrifice a Swamp: Put a +1/+1 counter on Mire Shade. Activate this ability only any time you could cast a sorcery. + Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{B}")); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); + this.addAbility(ability); + } + + public MireShade(final MireShade card) { + super(card); + } + + @Override + public MireShade copy() { + return new MireShade(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MirkoVoskMindDrinker.java b/Mage.Sets/src/mage/cards/m/MirkoVoskMindDrinker.java index 0bf0a68632..db8b1b084e 100644 --- a/Mage.Sets/src/mage/cards/m/MirkoVoskMindDrinker.java +++ b/Mage.Sets/src/mage/cards/m/MirkoVoskMindDrinker.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class MirkoVoskMindDrinker extends CardImpl { public MirkoVoskMindDrinker (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); addSuperType(SuperType.LEGENDARY); diff --git a/Mage.Sets/src/mage/cards/m/Mirozel.java b/Mage.Sets/src/mage/cards/m/Mirozel.java new file mode 100644 index 0000000000..aaa37d9a07 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/Mirozel.java @@ -0,0 +1,68 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesTargetTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class Mirozel extends CardImpl { + + public Mirozel(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.ILLUSION); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Mirozel becomes the target of a spell or ability, return Mirozel to its owner's hand. + this.addAbility(new BecomesTargetTriggeredAbility(new ReturnToHandSourceEffect(true))); + } + + public Mirozel(final Mirozel card) { + super(card); + } + + @Override + public Mirozel copy() { + return new Mirozel(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MirranCrusader.java b/Mage.Sets/src/mage/cards/m/MirranCrusader.java index 2785b53df5..f09eef8a8a 100644 --- a/Mage.Sets/src/mage/cards/m/MirranCrusader.java +++ b/Mage.Sets/src/mage/cards/m/MirranCrusader.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class MirranCrusader extends CardImpl { public MirranCrusader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MirranSpy.java b/Mage.Sets/src/mage/cards/m/MirranSpy.java index 4471998a0a..7e2337edb1 100644 --- a/Mage.Sets/src/mage/cards/m/MirranSpy.java +++ b/Mage.Sets/src/mage/cards/m/MirranSpy.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterArtifactSpell; import mage.target.common.TargetCreaturePermanent; @@ -46,7 +47,7 @@ public class MirranSpy extends CardImpl { public MirranSpy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Drone"); + this.subtype.add(SubType.DRONE); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MirriCatWarrior.java b/Mage.Sets/src/mage/cards/m/MirriCatWarrior.java index 9703a7aeb9..0700630a7c 100644 --- a/Mage.Sets/src/mage/cards/m/MirriCatWarrior.java +++ b/Mage.Sets/src/mage/cards/m/MirriCatWarrior.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -46,8 +47,8 @@ public class MirriCatWarrior extends CardImpl { public MirriCatWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Cat"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MirriTheCursed.java b/Mage.Sets/src/mage/cards/m/MirriTheCursed.java index 8af822a704..f13dd0b46e 100644 --- a/Mage.Sets/src/mage/cards/m/MirriTheCursed.java +++ b/Mage.Sets/src/mage/cards/m/MirriTheCursed.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.counters.CounterType; @@ -50,8 +51,8 @@ public class MirriTheCursed extends CardImpl { public MirriTheCursed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vampire"); - this.subtype.add("Cat"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MirriWeatherlightDuelist.java b/Mage.Sets/src/mage/cards/m/MirriWeatherlightDuelist.java index c9b9bf8bb8..dfc24131c1 100644 --- a/Mage.Sets/src/mage/cards/m/MirriWeatherlightDuelist.java +++ b/Mage.Sets/src/mage/cards/m/MirriWeatherlightDuelist.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -61,8 +62,8 @@ public class MirriWeatherlightDuelist extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Cat"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MirrorEntity.java b/Mage.Sets/src/mage/cards/m/MirrorEntity.java index e0ad9b0878..10b35cd416 100644 --- a/Mage.Sets/src/mage/cards/m/MirrorEntity.java +++ b/Mage.Sets/src/mage/cards/m/MirrorEntity.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.ChangelingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.SubLayer; @@ -57,7 +58,7 @@ public class MirrorEntity extends CardImpl { public MirrorEntity(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MirrorMadPhantasm.java b/Mage.Sets/src/mage/cards/m/MirrorMadPhantasm.java index 76b572366c..993bc00658 100644 --- a/Mage.Sets/src/mage/cards/m/MirrorMadPhantasm.java +++ b/Mage.Sets/src/mage/cards/m/MirrorMadPhantasm.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -54,7 +55,7 @@ public class MirrorMadPhantasm extends CardImpl { public MirrorMadPhantasm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MirrorMatch.java b/Mage.Sets/src/mage/cards/m/MirrorMatch.java index 3aa3fd7ab5..d5d3f8d584 100644 --- a/Mage.Sets/src/mage/cards/m/MirrorMatch.java +++ b/Mage.Sets/src/mage/cards/m/MirrorMatch.java @@ -33,7 +33,7 @@ import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility; import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -97,7 +97,7 @@ class MirrorMatchEffect extends OneShotEffect { Permanent attacker = game.getPermanent(attackerId); if (attacker != null && source.getControllerId().equals(game.getCombat().getDefendingPlayerId(attackerId, game))) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, false); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), null, false); effect.setTargetPointer(new FixedTarget(attacker, game)); effect.apply(game, source); CombatGroup group = game.getCombat().findGroup(attacker.getId()); diff --git a/Mage.Sets/src/mage/cards/m/MirrorMockery.java b/Mage.Sets/src/mage/cards/m/MirrorMockery.java index 6adcef3291..b0572190fb 100644 --- a/Mage.Sets/src/mage/cards/m/MirrorMockery.java +++ b/Mage.Sets/src/mage/cards/m/MirrorMockery.java @@ -34,12 +34,13 @@ import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -54,8 +55,8 @@ import mage.target.targetpointer.FixedTarget; public class MirrorMockery extends CardImpl { public MirrorMockery(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); @@ -82,7 +83,7 @@ class MirrorMockeryEffect extends OneShotEffect { public MirrorMockeryEffect() { super(Outcome.Benefit); - this.staticText = "you may create a token that's a copy of that creature. Exile that token at the end of combat"; + this.staticText = "you may create a token that's a copy of that creature. Exile that token at end of combat"; } public MirrorMockeryEffect(final MirrorMockeryEffect effect) { @@ -102,7 +103,7 @@ class MirrorMockeryEffect extends OneShotEffect { } Permanent enchanted = game.getPermanentOrLKIBattlefield(enchantment.getAttachedTo()); if (enchanted != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(); effect.setTargetPointer(new FixedTarget(enchanted, game)); effect.apply(game, source); for (Permanent addedToken : effect.getAddedPermanent()) { diff --git a/Mage.Sets/src/mage/cards/m/MirrorSigilSergeant.java b/Mage.Sets/src/mage/cards/m/MirrorSigilSergeant.java index 9e6d32754c..f315457763 100644 --- a/Mage.Sets/src/mage/cards/m/MirrorSigilSergeant.java +++ b/Mage.Sets/src/mage/cards/m/MirrorSigilSergeant.java @@ -35,11 +35,12 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.Effect; -import mage.abilities.effects.PutTokenOntoBattlefieldCopySourceEffect; +import mage.abilities.effects.CreateTokenCopySourceEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -61,8 +62,8 @@ public class MirrorSigilSergeant extends CardImpl { public MirrorSigilSergeant(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}"); - this.subtype.add("Rhino"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.RHINO); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -71,7 +72,7 @@ public class MirrorSigilSergeant extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // At the beginning of your upkeep, if you control a blue permanent, you may create a token that's a copy of Mirror-Sigil Sergeant. - Effect effect = new PutTokenOntoBattlefieldCopySourceEffect(); + Effect effect = new CreateTokenCopySourceEffect(); effect.setText("you may create a token that's a copy of {this}"); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, true); this.addAbility(new ConditionalTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter), rule)); diff --git a/Mage.Sets/src/mage/cards/m/MirrorUniverse.java b/Mage.Sets/src/mage/cards/m/MirrorUniverse.java index 18cb897259..aae1fd8ea1 100644 --- a/Mage.Sets/src/mage/cards/m/MirrorUniverse.java +++ b/Mage.Sets/src/mage/cards/m/MirrorUniverse.java @@ -1,73 +1,73 @@ -/* - * 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.cards.m; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.condition.common.IsStepCondition; -import mage.abilities.costs.common.SacrificeSourceCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.decorator.ConditionalActivatedAbility; -import mage.abilities.effects.common.ExchangeLifeTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.PhaseStep; -import mage.constants.Zone; -import mage.target.common.TargetOpponent; - -/** - * - * @author Styxo - */ -public class MirrorUniverse extends CardImpl { - - public MirrorUniverse(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); - - // {tap}, Sacrifice Mirror Universe: Exchange life totals with target opponent. Activate this ability only during your upkeep. - Ability ability = new ConditionalActivatedAbility( - Zone.BATTLEFIELD, - new ExchangeLifeTargetEffect(), - new TapSourceCost(), - new IsStepCondition(PhaseStep.UPKEEP), - null); - ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetOpponent()); - this.addAbility(ability); - } - - public MirrorUniverse(final MirrorUniverse card) { - super(card); - } - - @Override - public MirrorUniverse copy() { - return new MirrorUniverse(this); - } -} +/* + * 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.cards.m; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.condition.common.IsStepCondition; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.common.ExchangeLifeTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.PhaseStep; +import mage.constants.Zone; +import mage.target.common.TargetOpponent; + +/** + * + * @author Styxo + */ +public class MirrorUniverse extends CardImpl { + + public MirrorUniverse(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); + + // {tap}, Sacrifice Mirror Universe: Exchange life totals with target opponent. Activate this ability only during your upkeep. + Ability ability = new ConditionalActivatedAbility( + Zone.BATTLEFIELD, + new ExchangeLifeTargetEffect(), + new TapSourceCost(), + new IsStepCondition(PhaseStep.UPKEEP, true), + null); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public MirrorUniverse(final MirrorUniverse card) { + super(card); + } + + @Override + public MirrorUniverse copy() { + return new MirrorUniverse(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MirrorWall.java b/Mage.Sets/src/mage/cards/m/MirrorWall.java index bdf9d3bdd0..1af430c8a3 100644 --- a/Mage.Sets/src/mage/cards/m/MirrorWall.java +++ b/Mage.Sets/src/mage/cards/m/MirrorWall.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class MirrorWall extends CardImpl { public MirrorWall(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/Mirrorpool.java b/Mage.Sets/src/mage/cards/m/Mirrorpool.java index baa09029bb..76adc1b069 100644 --- a/Mage.Sets/src/mage/cards/m/Mirrorpool.java +++ b/Mage.Sets/src/mage/cards/m/Mirrorpool.java @@ -35,7 +35,7 @@ import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.CopyTargetSpellEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -81,7 +81,7 @@ public class Mirrorpool extends CardImpl { this.addAbility(ability); // {4}{C}, {T}, Sacrifice Mirrorpool: Create a token that's a copy of target creature you control. - ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutTokenOntoBattlefieldCopyTargetEffect(), new ManaCostsImpl("{4}{C}")); + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenCopyTargetEffect(), new ManaCostsImpl("{4}{C}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetControlledCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/m/MirrorwingDragon.java b/Mage.Sets/src/mage/cards/m/MirrorwingDragon.java index b6ba8e0d7c..8c4e05b48d 100644 --- a/Mage.Sets/src/mage/cards/m/MirrorwingDragon.java +++ b/Mage.Sets/src/mage/cards/m/MirrorwingDragon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterInPlay; import mage.filter.common.FilterControlledCreaturePermanent; @@ -56,7 +57,7 @@ public class MirrorwingDragon extends CardImpl { public MirrorwingDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/Mirrorworks.java b/Mage.Sets/src/mage/cards/m/Mirrorworks.java index 2d1e051fb9..d461aebcc8 100644 --- a/Mage.Sets/src/mage/cards/m/Mirrorworks.java +++ b/Mage.Sets/src/mage/cards/m/Mirrorworks.java @@ -32,7 +32,7 @@ import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DoIfCostPaid; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -61,7 +61,7 @@ public class Mirrorworks extends CardImpl { // Whenever another nontoken artifact enters the battlefield under your control, you may pay {2}. // If you do, create a token that's a copy of that artifact. - Effect effect = new DoIfCostPaid(new PutTokenOntoBattlefieldCopyTargetEffect(true), + Effect effect = new DoIfCostPaid(new CreateTokenCopyTargetEffect(true), new ManaCostsImpl("{2}"), "Create a token that's a copy of that artifact?"); effect.setText("you may pay {2}. If you do, create a token that's a copy of that artifact"); this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, effect, filter, false, SetTargetPointer.PERMANENT, null)); diff --git a/Mage.Sets/src/mage/cards/m/MischiefAndMayhem.java b/Mage.Sets/src/mage/cards/m/MischiefAndMayhem.java index e6c2c1da4d..bdbc676c64 100644 --- a/Mage.Sets/src/mage/cards/m/MischiefAndMayhem.java +++ b/Mage.Sets/src/mage/cards/m/MischiefAndMayhem.java @@ -43,12 +43,11 @@ import mage.target.common.TargetCreaturePermanent; public class MischiefAndMayhem extends CardImpl { public MischiefAndMayhem(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{G}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}"); // Up to two target creatures each get +4/+4 until end of turn. - this.getSpellAbility().addEffect(new BoostTargetEffect(4,4, Duration.EndOfTurn)); - this.getSpellAbility().addTarget(new TargetCreaturePermanent(0,2, new FilterCreaturePermanent("creatures each"), false)); + this.getSpellAbility().addEffect(new BoostTargetEffect(4, 4, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2, new FilterCreaturePermanent("creatures each"), false)); } public MischiefAndMayhem(final MischiefAndMayhem card) { diff --git a/Mage.Sets/src/mage/cards/m/MischievousPoltergeist.java b/Mage.Sets/src/mage/cards/m/MischievousPoltergeist.java index e79057fe93..62f6361e7c 100644 --- a/Mage.Sets/src/mage/cards/m/MischievousPoltergeist.java +++ b/Mage.Sets/src/mage/cards/m/MischievousPoltergeist.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class MischievousPoltergeist extends CardImpl { public MischievousPoltergeist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MischievousQuanar.java b/Mage.Sets/src/mage/cards/m/MischievousQuanar.java index ff81d4d1ef..646992201e 100644 --- a/Mage.Sets/src/mage/cards/m/MischievousQuanar.java +++ b/Mage.Sets/src/mage/cards/m/MischievousQuanar.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -52,19 +53,19 @@ import mage.target.TargetSpell; public class MischievousQuanar extends CardImpl { public MischievousQuanar(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Beast"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); // {3}{U}{U}: Turn Mischievous Quanar face down. Effect effect = new BecomesFaceDownCreatureEffect(Duration.Custom, BecomesFaceDownCreatureEffect.FaceDownType.MANUAL); - effect.setText("Turn Michievous Quanar face down. (It becomes a 2/2 creature.)"); + effect.setText("Turn {this} face down. (It becomes a 2/2 creature.)"); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{3}{U}{U}"))); - + // Morph {1}{U}{U} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{U}{U}"))); - + // When Mischievous Quanar is turned face up, copy target instant or sorcery spell. You may choose new targets for that copy. Effect effect2 = new CopyTargetSpellEffect(); effect2.setText("copy target instant or sorcery spell. You may choose new targets for that copy"); diff --git a/Mage.Sets/src/mage/cards/m/MishraArtificerProdigy.java b/Mage.Sets/src/mage/cards/m/MishraArtificerProdigy.java index c408392c3c..b04b94e3ef 100644 --- a/Mage.Sets/src/mage/cards/m/MishraArtificerProdigy.java +++ b/Mage.Sets/src/mage/cards/m/MishraArtificerProdigy.java @@ -36,6 +36,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -59,8 +60,8 @@ public class MishraArtificerProdigy extends CardImpl { public MishraArtificerProdigy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MishrasFactory.java b/Mage.Sets/src/mage/cards/m/MishrasFactory.java index 432eb04fd3..025ad71fe7 100644 --- a/Mage.Sets/src/mage/cards/m/MishrasFactory.java +++ b/Mage.Sets/src/mage/cards/m/MishrasFactory.java @@ -90,7 +90,7 @@ class AssemblyWorkerToken extends Token { super("Assembly-Worker", "2/2 Assembly-Worker artifact creature"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - this.subtype.add("Assembly-Worker"); + this.subtype.add(SubType.ASSEMBLY_WORKER); power = new MageInt(2); toughness = new MageInt(2); } diff --git a/Mage.Sets/src/mage/cards/m/MishrasGroundbreaker.java b/Mage.Sets/src/mage/cards/m/MishrasGroundbreaker.java new file mode 100644 index 0000000000..fd3ea4efac --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MishrasGroundbreaker.java @@ -0,0 +1,82 @@ +/* + * 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.cards.m; + +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.effects.common.continuous.BecomesCreatureTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.game.permanent.token.Token; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author L_J + */ +public class MishrasGroundbreaker extends CardImpl { + + public MishrasGroundbreaker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); + + // {tap}, Sacrifice Mishra's Groundbreaker: Target land becomes a 3/3 artifact creature that's still a land. (This effect lasts indefinitely.) + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new MishrasGroundbreakerToken(), false, true, Duration.Custom), new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetLandPermanent()); + this.addAbility(ability); + } + + public MishrasGroundbreaker(final MishrasGroundbreaker card) { + super(card); + } + + @Override + public MishrasGroundbreaker copy() { + return new MishrasGroundbreaker(this); + } + +} + +class MishrasGroundbreakerToken extends Token { + + public MishrasGroundbreakerToken() { + super("", "3/3 artifact creature"); + this.cardType.add(CardType.ARTIFACT); + this.cardType.add(CardType.CREATURE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MishrasHelix.java b/Mage.Sets/src/mage/cards/m/MishrasHelix.java index 3e5e464bc4..8d3446a039 100644 --- a/Mage.Sets/src/mage/cards/m/MishrasHelix.java +++ b/Mage.Sets/src/mage/cards/m/MishrasHelix.java @@ -37,42 +37,31 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.TargetAdjustment; import mage.constants.Zone; import mage.filter.StaticFilters; -import mage.game.Game; -import mage.target.common.TargetLandPermanent; +import mage.target.TargetPermanent; /** * * @author fireshoes */ public class MishrasHelix extends CardImpl { - - private final UUID originalId; public MishrasHelix(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{5}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{5}"); // {X}, {tap}: Tap X target lands. Effect effect = new TapTargetEffect("X target lands"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}")); ability.addCost(new TapSourceCost()); - originalId = ability.getOriginalId(); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_LANDS)); + ability.setTargetAdjustment(TargetAdjustment.X_TARGETS); this.addAbility(ability); } - - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(originalId)){ - int xValue = ability.getManaCostsToPay().getX(); - ability.getTargets().clear(); - ability.addTarget(new TargetLandPermanent(xValue, xValue, StaticFilters.FILTER_LANDS, false)); - } - } public MishrasHelix(final MishrasHelix card) { super(card); - this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/cards/m/MisshapenFiend.java b/Mage.Sets/src/mage/cards/m/MisshapenFiend.java index 388b48efda..d6fdbd76f5 100644 --- a/Mage.Sets/src/mage/cards/m/MisshapenFiend.java +++ b/Mage.Sets/src/mage/cards/m/MisshapenFiend.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class MisshapenFiend extends CardImpl { public MisshapenFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Horror"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HORROR); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MistDragon.java b/Mage.Sets/src/mage/cards/m/MistDragon.java index e4c6457f59..748680e6fa 100644 --- a/Mage.Sets/src/mage/cards/m/MistDragon.java +++ b/Mage.Sets/src/mage/cards/m/MistDragon.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class MistDragon extends CardImpl { public MistDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MistIntruder.java b/Mage.Sets/src/mage/cards/m/MistIntruder.java index dffefedc83..6f25e9c6ea 100644 --- a/Mage.Sets/src/mage/cards/m/MistIntruder.java +++ b/Mage.Sets/src/mage/cards/m/MistIntruder.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.IngestAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class MistIntruder extends CardImpl { public MistIntruder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MistLeopard.java b/Mage.Sets/src/mage/cards/m/MistLeopard.java index 9021d186fe..3629ee488e 100644 --- a/Mage.Sets/src/mage/cards/m/MistLeopard.java +++ b/Mage.Sets/src/mage/cards/m/MistLeopard.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class MistLeopard extends CardImpl { public MistLeopard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(2); this.addAbility(ShroudAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/m/MistOfStagnation.java b/Mage.Sets/src/mage/cards/m/MistOfStagnation.java index 1ccfce46c5..5d821a7cda 100644 --- a/Mage.Sets/src/mage/cards/m/MistOfStagnation.java +++ b/Mage.Sets/src/mage/cards/m/MistOfStagnation.java @@ -55,7 +55,7 @@ import mage.target.TargetPermanent; public class MistOfStagnation extends CardImpl { public MistOfStagnation(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}{U}"); // Permanents don't untap during their controllers' untap steps. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, new FilterPermanent("permanents")))); diff --git a/Mage.Sets/src/mage/cards/m/MistRaven.java b/Mage.Sets/src/mage/cards/m/MistRaven.java index c62a573603..e9ac419389 100644 --- a/Mage.Sets/src/mage/cards/m/MistRaven.java +++ b/Mage.Sets/src/mage/cards/m/MistRaven.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -46,7 +47,7 @@ public class MistRaven extends CardImpl { public MistRaven(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MistbindClique.java b/Mage.Sets/src/mage/cards/m/MistbindClique.java index 1d2e3e8c9b..2081aa056b 100644 --- a/Mage.Sets/src/mage/cards/m/MistbindClique.java +++ b/Mage.Sets/src/mage/cards/m/MistbindClique.java @@ -53,8 +53,8 @@ public class MistbindClique extends CardImpl { public MistbindClique(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -108,7 +108,7 @@ class MistbindCliqueAbility extends ZoneChangeTriggeredAbility { && event.getSourceId().equals(getSourceId()) && !event.getSourceId().equals(event.getTargetId())) { Permanent sacrificed = game.getPermanentOrLKIBattlefield(event.getTargetId()); - if (sacrificed != null && sacrificed.hasSubtype(SubType.FAERIE, game)) { + if (sacrificed != null) {// no longer checks for Faerie as LKI isn't always accurate, can't think of how that could matter anyway - TheElk801 return true; } } diff --git a/Mage.Sets/src/mage/cards/m/MistbladeShinobi.java b/Mage.Sets/src/mage/cards/m/MistbladeShinobi.java index 995f7e8a07..09a1203704 100644 --- a/Mage.Sets/src/mage/cards/m/MistbladeShinobi.java +++ b/Mage.Sets/src/mage/cards/m/MistbladeShinobi.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.NinjutsuAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; @@ -54,8 +55,8 @@ public class MistbladeShinobi extends CardImpl { public MistbladeShinobi(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Ninja"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NINJA); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MistcutterHydra.java b/Mage.Sets/src/mage/cards/m/MistcutterHydra.java index 0f37b30434..43ad027d5e 100644 --- a/Mage.Sets/src/mage/cards/m/MistcutterHydra.java +++ b/Mage.Sets/src/mage/cards/m/MistcutterHydra.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -48,7 +49,7 @@ public class MistcutterHydra extends CardImpl { public MistcutterHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{X}{G}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MistfireAdept.java b/Mage.Sets/src/mage/cards/m/MistfireAdept.java index b1f7ac0845..bb38159364 100644 --- a/Mage.Sets/src/mage/cards/m/MistfireAdept.java +++ b/Mage.Sets/src/mage/cards/m/MistfireAdept.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -56,8 +57,8 @@ public class MistfireAdept extends CardImpl { public MistfireAdept(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MistfireWeaver.java b/Mage.Sets/src/mage/cards/m/MistfireWeaver.java index 62e19a6ca0..711efb031a 100644 --- a/Mage.Sets/src/mage/cards/m/MistfireWeaver.java +++ b/Mage.Sets/src/mage/cards/m/MistfireWeaver.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetControlledCreaturePermanent; @@ -51,8 +52,8 @@ public class MistfireWeaver extends CardImpl { public MistfireWeaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Djinn"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.DJINN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MistformDreamer.java b/Mage.Sets/src/mage/cards/m/MistformDreamer.java new file mode 100644 index 0000000000..60cbef0aee --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MistformDreamer.java @@ -0,0 +1,69 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.BecomesChosenCreatureTypeSourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class MistformDreamer extends CardImpl { + + public MistformDreamer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.ILLUSION); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {1}: Mistform Dreamer becomes the creature type of your choice until end of turn. + this.addAbility(new SimpleActivatedAbility(new BecomesChosenCreatureTypeSourceEffect(), new GenericManaCost(1))); + } + + public MistformDreamer(final MistformDreamer card) { + super(card); + } + + @Override + public MistformDreamer copy() { + return new MistformDreamer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MistformMask.java b/Mage.Sets/src/mage/cards/m/MistformMask.java new file mode 100644 index 0000000000..3f5c9722ec --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MistformMask.java @@ -0,0 +1,117 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.constants.SubType; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BecomesChosenCreatureTypeTargetEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public class MistformMask extends CardImpl { + + public MistformMask(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // {1}: Enchanted creature becomes the creature type of your choice until end of turn. + this.addAbility(new SimpleActivatedAbility(new MistformMaskEffect(), new GenericManaCost(1))); + } + + public MistformMask(final MistformMask card) { + super(card); + } + + @Override + public MistformMask copy() { + return new MistformMask(this); + } +} + +class MistformMaskEffect extends OneShotEffect { + + public MistformMaskEffect() { + this(false); + } + + public MistformMaskEffect(boolean nonWall) { + super(Outcome.BoostCreature); + staticText = "Enchanted creature becomes the creature type of your choice until end of turn."; + } + + public MistformMaskEffect(final MistformMaskEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent sourcePerm = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (sourcePerm == null) { + return false; + } + Permanent enchantedPerm = game.getPermanent(sourcePerm.getAttachedTo()); + if (enchantedPerm == null) { + return false; + } + Effect effect = new BecomesChosenCreatureTypeTargetEffect(); + effect.setTargetPointer(new FixedTarget(enchantedPerm, game)); + return effect.apply(game, source); + } + + @Override + public Effect copy() { + return new MistformMaskEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/m/MistformMutant.java b/Mage.Sets/src/mage/cards/m/MistformMutant.java index 30b6210689..7ddb52b952 100644 --- a/Mage.Sets/src/mage/cards/m/MistformMutant.java +++ b/Mage.Sets/src/mage/cards/m/MistformMutant.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BecomesChosenCreatureTypeTargetE import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -47,8 +48,8 @@ public class MistformMutant extends CardImpl { public MistformMutant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Illusion"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.ILLUSION); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MistformSeaswift.java b/Mage.Sets/src/mage/cards/m/MistformSeaswift.java new file mode 100644 index 0000000000..94de6700c7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MistformSeaswift.java @@ -0,0 +1,75 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BecomesChosenCreatureTypeSourceEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class MistformSeaswift extends CardImpl { + + public MistformSeaswift(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.ILLUSION); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {1}: Mistform Seaswift becomes the creature type of your choice until end of turn. + this.addAbility(new SimpleActivatedAbility(new BecomesChosenCreatureTypeSourceEffect(), new GenericManaCost(1))); + + // Morph {1}{U} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{U}"))); + + } + + public MistformSeaswift(final MistformSeaswift card) { + super(card); + } + + @Override + public MistformSeaswift copy() { + return new MistformSeaswift(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MistformShrieker.java b/Mage.Sets/src/mage/cards/m/MistformShrieker.java new file mode 100644 index 0000000000..6be237c153 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MistformShrieker.java @@ -0,0 +1,76 @@ +/* + * 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.cards.m; + +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BecomesChosenCreatureTypeSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * + * @author TheElk801 + */ +public class MistformShrieker extends CardImpl { + + public MistformShrieker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); + + this.subtype.add(SubType.ILLUSION); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {1}: Mistform Shrieker becomes the creature type of your choice until end of turn. + this.addAbility(new SimpleActivatedAbility(new BecomesChosenCreatureTypeSourceEffect(), new GenericManaCost(1))); + + // Morph {3}{U}{U} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{3}{U}{U}"))); + + } + + public MistformShrieker(final MistformShrieker card) { + super(card); + } + + @Override + public MistformShrieker copy() { + return new MistformShrieker(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MistformSkyreaver.java b/Mage.Sets/src/mage/cards/m/MistformSkyreaver.java new file mode 100644 index 0000000000..ae74c23aec --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MistformSkyreaver.java @@ -0,0 +1,69 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.BecomesChosenCreatureTypeSourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class MistformSkyreaver extends CardImpl { + + public MistformSkyreaver(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}"); + + this.subtype.add(SubType.ILLUSION); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {1}: Mistform Skyreaver becomes the creature type of your choice until end of turn. + this.addAbility(new SimpleActivatedAbility(new BecomesChosenCreatureTypeSourceEffect(), new GenericManaCost(1))); + } + + public MistformSkyreaver(final MistformSkyreaver card) { + super(card); + } + + @Override + public MistformSkyreaver copy() { + return new MistformSkyreaver(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MistformSliver.java b/Mage.Sets/src/mage/cards/m/MistformSliver.java index 9f7cd26825..2ac7c3b16e 100644 --- a/Mage.Sets/src/mage/cards/m/MistformSliver.java +++ b/Mage.Sets/src/mage/cards/m/MistformSliver.java @@ -55,8 +55,8 @@ public class MistformSliver extends CardImpl { public MistformSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Illusion"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.ILLUSION); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MistformStalker.java b/Mage.Sets/src/mage/cards/m/MistformStalker.java new file mode 100644 index 0000000000..e4f8a0ae7d --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MistformStalker.java @@ -0,0 +1,82 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BecomesChosenCreatureTypeSourceEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class MistformStalker extends CardImpl { + + public MistformStalker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.ILLUSION); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}: Mistform Stalker becomes the creature type of your choice until end of turn. + this.addAbility(new SimpleActivatedAbility(new BecomesChosenCreatureTypeSourceEffect(), new GenericManaCost(1))); + + // {2}{U}{U}: Mistform Stalker gets +2/+2 and gains flying until end of turn. + Effect effect = new BoostSourceEffect(2, 2, Duration.EndOfTurn); + effect.setText("{this} gets +2/+2"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}{U}{U}")); + effect = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains flying until end of turn"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public MistformStalker(final MistformStalker card) { + super(card); + } + + @Override + public MistformStalker copy() { + return new MistformStalker(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MistformUltimus.java b/Mage.Sets/src/mage/cards/m/MistformUltimus.java index 8cb7508e8d..941f2418cd 100644 --- a/Mage.Sets/src/mage/cards/m/MistformUltimus.java +++ b/Mage.Sets/src/mage/cards/m/MistformUltimus.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ChangelingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -45,7 +46,7 @@ public class MistformUltimus extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MistformWall.java b/Mage.Sets/src/mage/cards/m/MistformWall.java new file mode 100644 index 0000000000..d12d35becd --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MistformWall.java @@ -0,0 +1,80 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.SourceHasSubtypeCondition; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BecomesChosenCreatureTypeSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class MistformWall extends CardImpl { + + public MistformWall(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.ILLUSION); + this.subtype.add(SubType.WALL); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // Mistform Wall has defender as long as it's a Wall. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new GainAbilitySourceEffect(DefenderAbility.getInstance(), Duration.WhileOnBattlefield), + new SourceHasSubtypeCondition(SubType.WALL), + "{this} has defender as long as it's a Wall" + ))); + + // {1}: Mistform Wall becomes the creature type of your choice until end of turn. + this.addAbility(new SimpleActivatedAbility(new BecomesChosenCreatureTypeSourceEffect(), new GenericManaCost(1))); + } + + public MistformWall(final MistformWall card) { + super(card); + } + + @Override + public MistformWall copy() { + return new MistformWall(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MistformWarchief.java b/Mage.Sets/src/mage/cards/m/MistformWarchief.java new file mode 100644 index 0000000000..369e75feaa --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MistformWarchief.java @@ -0,0 +1,109 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.continuous.BecomesChosenCreatureTypeSourceEffect; +import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubTypeSet; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.ObjectSourcePlayer; +import mage.filter.predicate.ObjectSourcePlayerPredicate; +import mage.game.Game; + +/** + * + * @author TheElk801 + */ +public class MistformWarchief extends CardImpl { + + private static final FilterCard filter = new FilterCard("Creature spells you cast that share a creature type with {this}"); + + static { + filter.add(new MistformWarchiefPredicate()); + } + + public MistformWarchief(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.ILLUSION); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Creature spells you cast that share a creature type with Mistform Warchief cost {1} less to cast. + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, + new SpellsCostReductionControllerEffect(filter, 1) + .setText("Creature spells you cast that share a creature type with {this} cost {1} less to cast") + )); + + // {tap}: Mistform Warchief becomes the creature type of your choice until end of turn. + this.addAbility(new SimpleActivatedAbility(new BecomesChosenCreatureTypeSourceEffect(), new TapSourceCost())); + } + + public MistformWarchief(final MistformWarchief card) { + super(card); + } + + @Override + public MistformWarchief copy() { + return new MistformWarchief(this); + } +} + +class MistformWarchiefPredicate implements ObjectSourcePlayerPredicate> { + + @Override + public boolean apply(ObjectSourcePlayer input, Game game) { + MageObject sourceObject = game.getObject(input.getSourceId()); + if (sourceObject != null) { + for (SubType subType : sourceObject.getSubtype(game)) { + if (subType.getSubTypeSet() == SubTypeSet.CreatureType && input.getObject().hasSubtype(subType, game)) { + return true; + } + } + } + return false; + + } + + @Override + public String toString() { + return "shares a creature type"; + } +} diff --git a/Mage.Sets/src/mage/cards/m/MisthollowGriffin.java b/Mage.Sets/src/mage/cards/m/MisthollowGriffin.java index 30079adb55..3dad3e00b2 100644 --- a/Mage.Sets/src/mage/cards/m/MisthollowGriffin.java +++ b/Mage.Sets/src/mage/cards/m/MisthollowGriffin.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class MisthollowGriffin extends CardImpl { public MisthollowGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MisthoofKirin.java b/Mage.Sets/src/mage/cards/m/MisthoofKirin.java index 397887ad48..03aef4bae9 100644 --- a/Mage.Sets/src/mage/cards/m/MisthoofKirin.java +++ b/Mage.Sets/src/mage/cards/m/MisthoofKirin.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class MisthoofKirin extends CardImpl { public MisthoofKirin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Kirin"); + this.subtype.add(SubType.KIRIN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MistmeadowSkulk.java b/Mage.Sets/src/mage/cards/m/MistmeadowSkulk.java index dbe5d27a97..b12ca5e917 100644 --- a/Mage.Sets/src/mage/cards/m/MistmeadowSkulk.java +++ b/Mage.Sets/src/mage/cards/m/MistmeadowSkulk.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -52,8 +53,8 @@ public class MistmeadowSkulk extends CardImpl { public MistmeadowSkulk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MistmeadowWitch.java b/Mage.Sets/src/mage/cards/m/MistmeadowWitch.java index 36ca7ffa4f..06c2312b5a 100644 --- a/Mage.Sets/src/mage/cards/m/MistmeadowWitch.java +++ b/Mage.Sets/src/mage/cards/m/MistmeadowWitch.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.MistmeadowWitchEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -47,8 +48,8 @@ public class MistmeadowWitch extends CardImpl { public MistmeadowWitch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W/U}"); - this.subtype.add("Kithkin"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MistmoonGriffin.java b/Mage.Sets/src/mage/cards/m/MistmoonGriffin.java index 6b372e0a4e..6cb549edb3 100644 --- a/Mage.Sets/src/mage/cards/m/MistmoonGriffin.java +++ b/Mage.Sets/src/mage/cards/m/MistmoonGriffin.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class MistmoonGriffin extends CardImpl { public MistmoonGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MistralCharger.java b/Mage.Sets/src/mage/cards/m/MistralCharger.java index 7f55b4aefc..67895a74df 100644 --- a/Mage.Sets/src/mage/cards/m/MistralCharger.java +++ b/Mage.Sets/src/mage/cards/m/MistralCharger.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class MistralCharger extends CardImpl { public MistralCharger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Pegasus"); + this.subtype.add(SubType.PEGASUS); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MistveilPlains.java b/Mage.Sets/src/mage/cards/m/MistveilPlains.java index ee3a82a7a9..0755987b21 100644 --- a/Mage.Sets/src/mage/cards/m/MistveilPlains.java +++ b/Mage.Sets/src/mage/cards/m/MistveilPlains.java @@ -41,6 +41,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.Zone; @@ -62,7 +63,7 @@ public class MistveilPlains extends CardImpl { public MistveilPlains(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Plains"); + this.subtype.add(SubType.PLAINS); // ({tap}: Add {W} to your mana pool.) this.addAbility(new WhiteManaAbility()); diff --git a/Mage.Sets/src/mage/cards/m/MitoticSlime.java b/Mage.Sets/src/mage/cards/m/MitoticSlime.java index ac16cc5311..54b7140266 100644 --- a/Mage.Sets/src/mage/cards/m/MitoticSlime.java +++ b/Mage.Sets/src/mage/cards/m/MitoticSlime.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.Ooze2Token; /** @@ -44,7 +45,7 @@ public class MitoticSlime extends CardImpl { public MitoticSlime(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); - this.subtype.add("Ooze"); + this.subtype.add(SubType.OOZE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MizziumMeddler.java b/Mage.Sets/src/mage/cards/m/MizziumMeddler.java index a902bd1181..41f360f453 100644 --- a/Mage.Sets/src/mage/cards/m/MizziumMeddler.java +++ b/Mage.Sets/src/mage/cards/m/MizziumMeddler.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetStackObject; /** @@ -46,8 +47,8 @@ public class MizziumMeddler extends CardImpl { public MizziumMeddler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MizzixOfTheIzmagnus.java b/Mage.Sets/src/mage/cards/m/MizzixOfTheIzmagnus.java index f8b5c7496f..d1e431b69c 100644 --- a/Mage.Sets/src/mage/cards/m/MizzixOfTheIzmagnus.java +++ b/Mage.Sets/src/mage/cards/m/MizzixOfTheIzmagnus.java @@ -64,8 +64,8 @@ public class MizzixOfTheIzmagnus extends CardImpl { public MizzixOfTheIzmagnus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Goblin"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MnemonicSliver.java b/Mage.Sets/src/mage/cards/m/MnemonicSliver.java index 113887afd9..938e7c20b4 100644 --- a/Mage.Sets/src/mage/cards/m/MnemonicSliver.java +++ b/Mage.Sets/src/mage/cards/m/MnemonicSliver.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.GainAbilityAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -50,7 +51,7 @@ public class MnemonicSliver extends CardImpl { public MnemonicSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MnemonicWall.java b/Mage.Sets/src/mage/cards/m/MnemonicWall.java index 4a709e7965..a2ad47f2b3 100644 --- a/Mage.Sets/src/mage/cards/m/MnemonicWall.java +++ b/Mage.Sets/src/mage/cards/m/MnemonicWall.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -57,7 +58,7 @@ public class MnemonicWall extends CardImpl { public MnemonicWall(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MoaningSpirit.java b/Mage.Sets/src/mage/cards/m/MoaningSpirit.java index 69ab6fb808..d05c8caca1 100644 --- a/Mage.Sets/src/mage/cards/m/MoaningSpirit.java +++ b/Mage.Sets/src/mage/cards/m/MoaningSpirit.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class MoaningSpirit extends CardImpl { public MoaningSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MoaningWall.java b/Mage.Sets/src/mage/cards/m/MoaningWall.java index 65b990e5b9..c363ed5028 100644 --- a/Mage.Sets/src/mage/cards/m/MoaningWall.java +++ b/Mage.Sets/src/mage/cards/m/MoaningWall.java @@ -8,14 +8,15 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; public class MoaningWall extends CardImpl { public MoaningWall(UUID ownerId, CardSetInfo cardSetInfo){ super(ownerId, cardSetInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - subtype.add("Zombie"); - subtype.add("Wall"); + subtype.add(SubType.ZOMBIE); + subtype.add(SubType.WALL); power = new MageInt(0); toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MobileFort.java b/Mage.Sets/src/mage/cards/m/MobileFort.java index f77fc86f2b..41c3d23d38 100644 --- a/Mage.Sets/src/mage/cards/m/MobileFort.java +++ b/Mage.Sets/src/mage/cards/m/MobileFort.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class MobileFort extends CardImpl { public MobileFort(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/m/MobileGarrison.java b/Mage.Sets/src/mage/cards/m/MobileGarrison.java index d8f41d6fca..0c2ca731e9 100644 --- a/Mage.Sets/src/mage/cards/m/MobileGarrison.java +++ b/Mage.Sets/src/mage/cards/m/MobileGarrison.java @@ -1,87 +1,87 @@ -/* - * 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.cards.m; - -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.AttacksTriggeredAbility; -import mage.abilities.effects.common.UntapTargetEffect; -import mage.abilities.keyword.CrewAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.filter.predicate.permanent.AnotherPredicate; -import mage.target.common.TargetControlledPermanent; - -import java.util.UUID; - -/** - * - * @author Styxo - */ -public class MobileGarrison extends CardImpl { - - private static final FilterControlledPermanent filter = new FilterControlledPermanent("another target artifact or creature you control"); - - static { - filter.add(new AnotherPredicate()); - filter.add(Predicates.or( - new CardTypePredicate(CardType.ARTIFACT), - new CardTypePredicate(CardType.CREATURE) - )); - } - - public MobileGarrison(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); - - this.subtype.add(SubType.VEHICLE); - this.power = new MageInt(3); - this.toughness = new MageInt(4); - - // Whenever Mobile Garrison attacks, untap another target artifact or creature you control. - Ability ability = new AttacksTriggeredAbility(new UntapTargetEffect(), false); - ability.addTarget(new TargetControlledPermanent(filter)); - this.addAbility(ability); - - // Crew 2 - this.addAbility(new CrewAbility(2)); - } - - public MobileGarrison(final MobileGarrison card) { - super(card); - } - - @Override - public MobileGarrison copy() { - return new MobileGarrison(this); - } -} +/* + * 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.cards.m; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.keyword.CrewAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.common.TargetControlledPermanent; + +import java.util.UUID; + +/** + * + * @author Styxo + */ +public class MobileGarrison extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("another target artifact or creature you control"); + + static { + filter.add(new AnotherPredicate()); + filter.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.CREATURE) + )); + } + + public MobileGarrison(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + this.subtype.add(SubType.VEHICLE); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Whenever Mobile Garrison attacks, untap another target artifact or creature you control. + Ability ability = new AttacksTriggeredAbility(new UntapTargetEffect(), false); + ability.addTarget(new TargetControlledPermanent(filter)); + this.addAbility(ability); + + // Crew 2 + this.addAbility(new CrewAbility(2)); + } + + public MobileGarrison(final MobileGarrison card) { + super(card); + } + + @Override + public MobileGarrison copy() { + return new MobileGarrison(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MockeryOfNature.java b/Mage.Sets/src/mage/cards/m/MockeryOfNature.java index 2816ee6dbc..a640044616 100644 --- a/Mage.Sets/src/mage/cards/m/MockeryOfNature.java +++ b/Mage.Sets/src/mage/cards/m/MockeryOfNature.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EmergeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.TargetPermanent; @@ -49,8 +50,8 @@ public class MockeryOfNature extends CardImpl { public MockeryOfNature(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{9}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Beast"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MoggConscripts.java b/Mage.Sets/src/mage/cards/m/MoggConscripts.java index 21cf31d2c3..b18424531b 100644 --- a/Mage.Sets/src/mage/cards/m/MoggConscripts.java +++ b/Mage.Sets/src/mage/cards/m/MoggConscripts.java @@ -35,6 +35,7 @@ import mage.abilities.effects.RestrictionEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -49,7 +50,7 @@ public class MoggConscripts extends CardImpl { public MoggConscripts(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MoggFanatic.java b/Mage.Sets/src/mage/cards/m/MoggFanatic.java index 8ea1d3fdd2..0f19a42bac 100644 --- a/Mage.Sets/src/mage/cards/m/MoggFanatic.java +++ b/Mage.Sets/src/mage/cards/m/MoggFanatic.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -47,7 +48,7 @@ public class MoggFanatic extends CardImpl { public MoggFanatic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MoggFlunkies.java b/Mage.Sets/src/mage/cards/m/MoggFlunkies.java index 588d8ff698..5ed746b6c8 100644 --- a/Mage.Sets/src/mage/cards/m/MoggFlunkies.java +++ b/Mage.Sets/src/mage/cards/m/MoggFlunkies.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.CantBlockAloneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author magenoxx_at_gmail.com @@ -42,7 +43,7 @@ public class MoggFlunkies extends CardImpl { public MoggFlunkies(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MoggJailer.java b/Mage.Sets/src/mage/cards/m/MoggJailer.java index 3fc94072c4..a6ff5a0803 100644 --- a/Mage.Sets/src/mage/cards/m/MoggJailer.java +++ b/Mage.Sets/src/mage/cards/m/MoggJailer.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CantAttackIfDefenderControlsPermanen import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -55,7 +56,7 @@ public class MoggJailer extends CardImpl { public MoggJailer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MoggManiac.java b/Mage.Sets/src/mage/cards/m/MoggManiac.java index 2a9001a2d4..73423646f3 100644 --- a/Mage.Sets/src/mage/cards/m/MoggManiac.java +++ b/Mage.Sets/src/mage/cards/m/MoggManiac.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -48,13 +49,13 @@ import mage.target.common.TargetOpponent; public class MoggManiac extends CardImpl { public MoggManiac(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); // Whenever Mogg Maniac is dealt damage, it deals that much damage to target opponent. - Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new MoggManiacDealDamageEffect(), false); + Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new MoggManiacDealDamageEffect(), false, false, true); ability.addTarget(new TargetOpponent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MoggRaider.java b/Mage.Sets/src/mage/cards/m/MoggRaider.java index 214b25ddfd..1d6e8d9593 100644 --- a/Mage.Sets/src/mage/cards/m/MoggRaider.java +++ b/Mage.Sets/src/mage/cards/m/MoggRaider.java @@ -58,7 +58,7 @@ public class MoggRaider extends CardImpl { public MoggRaider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MoggSentry.java b/Mage.Sets/src/mage/cards/m/MoggSentry.java index 979153a142..b741b50ea2 100644 --- a/Mage.Sets/src/mage/cards/m/MoggSentry.java +++ b/Mage.Sets/src/mage/cards/m/MoggSentry.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class MoggSentry extends CardImpl { public MoggSentry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MoggSquad.java b/Mage.Sets/src/mage/cards/m/MoggSquad.java index 5d450ffaf9..7c50bf0d63 100644 --- a/Mage.Sets/src/mage/cards/m/MoggSquad.java +++ b/Mage.Sets/src/mage/cards/m/MoggSquad.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -57,7 +58,7 @@ public class MoggSquad extends CardImpl { public MoggSquad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MoggWarMarshal.java b/Mage.Sets/src/mage/cards/m/MoggWarMarshal.java index 87d4eec410..d912be109d 100644 --- a/Mage.Sets/src/mage/cards/m/MoggWarMarshal.java +++ b/Mage.Sets/src/mage/cards/m/MoggWarMarshal.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.GoblinToken; /** @@ -45,8 +46,8 @@ public class MoggWarMarshal extends CardImpl { public MoggWarMarshal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/Moggcatcher.java b/Mage.Sets/src/mage/cards/m/Moggcatcher.java index 89e64fb8a6..54cf58d29d 100644 --- a/Mage.Sets/src/mage/cards/m/Moggcatcher.java +++ b/Mage.Sets/src/mage/cards/m/Moggcatcher.java @@ -57,8 +57,8 @@ public class Moggcatcher extends CardImpl { public Moggcatcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MogisGodOfSlaughter.java b/Mage.Sets/src/mage/cards/m/MogisGodOfSlaughter.java index 05145b616f..f3f391e5bc 100644 --- a/Mage.Sets/src/mage/cards/m/MogisGodOfSlaughter.java +++ b/Mage.Sets/src/mage/cards/m/MogisGodOfSlaughter.java @@ -59,7 +59,7 @@ public class MogisGodOfSlaughter extends CardImpl { public MogisGodOfSlaughter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(7); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MogissMarauder.java b/Mage.Sets/src/mage/cards/m/MogissMarauder.java index a4e0f15d99..d10b145e45 100644 --- a/Mage.Sets/src/mage/cards/m/MogissMarauder.java +++ b/Mage.Sets/src/mage/cards/m/MogissMarauder.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.IntimidateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.game.Game; @@ -51,8 +52,8 @@ public class MogissMarauder extends CardImpl { public MogissMarauder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MogissWarhound.java b/Mage.Sets/src/mage/cards/m/MogissWarhound.java index 5c83a393bb..1d5ce89a0a 100644 --- a/Mage.Sets/src/mage/cards/m/MogissWarhound.java +++ b/Mage.Sets/src/mage/cards/m/MogissWarhound.java @@ -30,7 +30,7 @@ package mage.cards.m; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.combat.AttacksIfAbleAttachedEffect; @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ import mage.constants.Zone; public class MogissWarhound extends CardImpl { public MogissWarhound(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{R}"); - this.subtype.add("Hound"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{1}{R}"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -59,15 +60,15 @@ public class MogissWarhound extends CardImpl { // Bestow 2R (If you cast this card for its bestow cost, it's an Aura spell with enchant creature. It becomes a creature again if it's not attached to a creature.) this.addAbility(new BestowAbility(this, "{2}{R}")); // Mogis's Warhound attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); // Enchanted creature gets +2/+2 and attacks each turn if able. - Effect effect = new BoostEnchantedEffect(2,2,Duration.WhileOnBattlefield); + Effect effect = new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield); effect.setText("Enchanted creature gets +2/+2"); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); effect = new AttacksIfAbleAttachedEffect(Duration.WhileOnBattlefield, AttachmentType.AURA); - effect.setText("and attacks each turn if able"); + effect.setText("and attacks each combat if able"); ability.addEffect(effect); - this.addAbility(ability); + this.addAbility(ability); } public MogissWarhound(final MogissWarhound card) { diff --git a/Mage.Sets/src/mage/cards/m/MoistureFarm.java b/Mage.Sets/src/mage/cards/m/MoistureFarm.java index 5772ce1d57..2b091424eb 100644 --- a/Mage.Sets/src/mage/cards/m/MoistureFarm.java +++ b/Mage.Sets/src/mage/cards/m/MoistureFarm.java @@ -1,74 +1,74 @@ -/* - * 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.cards.m; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.AddManaOfAnyColorEffect; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.abilities.mana.ColorlessManaAbility; -import mage.abilities.mana.SimpleManaAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.counters.CounterType; - -/** - * - * @author Styxo - */ -public class MoistureFarm extends CardImpl { - - public MoistureFarm(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - - // {T}: Add {C} to your mana pool. - this.addAbility(new ColorlessManaAbility()); - - // {T}: Put a storage counter on Moisture Farm. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), new TapSourceCost())); - - // {T}, Remove a storage counter from Moisture Farm: Add one mana of any color to your mana pool. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(1), new TapSourceCost()); - ability.addCost(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance())); - this.addAbility(ability); - } - - public MoistureFarm(final MoistureFarm card) { - super(card); - } - - @Override - public MoistureFarm copy() { - return new MoistureFarm(this); - } -} +/* + * 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.cards.m; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.AddManaOfAnyColorEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author Styxo + */ +public class MoistureFarm extends CardImpl { + + public MoistureFarm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.LAND},""); + + // {T}: Add {C} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {T}: Put a storage counter on Moisture Farm. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), new TapSourceCost())); + + // {T}, Remove a storage counter from Moisture Farm: Add one mana of any color to your mana pool. + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(1), new TapSourceCost()); + ability.addCost(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance())); + this.addAbility(ability); + } + + public MoistureFarm(final MoistureFarm card) { + super(card); + } + + @Override + public MoistureFarm copy() { + return new MoistureFarm(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MoldAdder.java b/Mage.Sets/src/mage/cards/m/MoldAdder.java index 466e6a9e89..e3bcb437ee 100644 --- a/Mage.Sets/src/mage/cards/m/MoldAdder.java +++ b/Mage.Sets/src/mage/cards/m/MoldAdder.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -55,8 +56,8 @@ public class MoldAdder extends CardImpl { public MoldAdder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Fungus"); - this.subtype.add("Snake"); + this.subtype.add(SubType.FUNGUS); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MoldDemon.java b/Mage.Sets/src/mage/cards/m/MoldDemon.java index 6985dc0010..1f2b0aca85 100644 --- a/Mage.Sets/src/mage/cards/m/MoldDemon.java +++ b/Mage.Sets/src/mage/cards/m/MoldDemon.java @@ -54,8 +54,8 @@ public class MoldDemon extends CardImpl { public MoldDemon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}"); - this.subtype.add("Fungus"); - this.subtype.add("Demon"); + this.subtype.add(SubType.FUNGUS); + this.subtype.add(SubType.DEMON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/m/MoldShambler.java b/Mage.Sets/src/mage/cards/m/MoldShambler.java index 1999544a4d..4aa7e25b7e 100644 --- a/Mage.Sets/src/mage/cards/m/MoldShambler.java +++ b/Mage.Sets/src/mage/cards/m/MoldShambler.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -57,8 +58,8 @@ public class MoldShambler extends CardImpl { public MoldShambler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Fungus"); - this.subtype.add("Beast"); + this.subtype.add(SubType.FUNGUS); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/Molder.java b/Mage.Sets/src/mage/cards/m/Molder.java index 3969ed8f67..303dd0f33c 100644 --- a/Mage.Sets/src/mage/cards/m/Molder.java +++ b/Mage.Sets/src/mage/cards/m/Molder.java @@ -49,17 +49,17 @@ import mage.target.TargetPermanent; public class Molder extends CardImpl { public Molder(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{G}"); // Destroy target artifact or enchantment with converted mana cost X. It can't be regenerated. You gain X life. - this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent("artifact or enchantment with converted mana cost X"))); this.getSpellAbility().addEffect(new GainLifeEffect(new ManacostVariableValue())); } @Override public void adjustTargets(Ability ability, Game game) { - if(ability instanceof SpellAbility) { + if (ability instanceof SpellAbility) { ability.getTargets().clear(); int xValue = ability.getManaCostsToPay().getX(); FilterArtifactOrEnchantmentPermanent filter = new FilterArtifactOrEnchantmentPermanent("artifact or enchantment with converted mana cost X"); diff --git a/Mage.Sets/src/mage/cards/m/MolderBeast.java b/Mage.Sets/src/mage/cards/m/MolderBeast.java index 2b851be52a..7b44c6e370 100644 --- a/Mage.Sets/src/mage/cards/m/MolderBeast.java +++ b/Mage.Sets/src/mage/cards/m/MolderBeast.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -50,7 +51,7 @@ public class MolderBeast extends CardImpl { public MolderBeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MolderSlug.java b/Mage.Sets/src/mage/cards/m/MolderSlug.java index f2a787450b..a2a1936045 100644 --- a/Mage.Sets/src/mage/cards/m/MolderSlug.java +++ b/Mage.Sets/src/mage/cards/m/MolderSlug.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.SacrificeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -52,8 +53,8 @@ public class MolderSlug extends CardImpl { public MolderSlug(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Slug"); - this.subtype.add("Beast"); + this.subtype.add(SubType.SLUG); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/m/MoldervineCloak.java b/Mage.Sets/src/mage/cards/m/MoldervineCloak.java index 17d7bb588f..e844ff663e 100644 --- a/Mage.Sets/src/mage/cards/m/MoldervineCloak.java +++ b/Mage.Sets/src/mage/cards/m/MoldervineCloak.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class MoldervineCloak extends CardImpl { public MoldervineCloak(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/m/MoldgrafMonstrosity.java b/Mage.Sets/src/mage/cards/m/MoldgrafMonstrosity.java index 7fc38ef7e5..4eaef9de47 100644 --- a/Mage.Sets/src/mage/cards/m/MoldgrafMonstrosity.java +++ b/Mage.Sets/src/mage/cards/m/MoldgrafMonstrosity.java @@ -32,6 +32,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ExileSourceEffect; import mage.abilities.keyword.TrampleAbility; @@ -39,6 +40,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -53,15 +55,17 @@ import mage.util.RandomUtil; public class MoldgrafMonstrosity extends CardImpl { public MoldgrafMonstrosity(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}{G}"); - this.subtype.add("Insect"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}{G}"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(8); this.toughness = new MageInt(8); this.addAbility(TrampleAbility.getInstance()); // When Moldgraf Monstrosity dies, exile it, then return two creature cards at random from your graveyard to the battlefield. - DiesTriggeredAbility ability = new DiesTriggeredAbility(new ExileSourceEffect()); + Effect effect = new ExileSourceEffect(); + effect.setText(""); + DiesTriggeredAbility ability = new DiesTriggeredAbility(effect); ability.addEffect(new MoldgrafMonstrosityEffect()); this.addAbility(ability); } @@ -80,7 +84,7 @@ class MoldgrafMonstrosityEffect extends OneShotEffect { public MoldgrafMonstrosityEffect() { super(Outcome.ReturnToHand); - this.staticText = "then return two creature cards at random from your graveyard to the battlefield"; + this.staticText = "exile it, then return two creature cards at random from your graveyard to the battlefield"; } public MoldgrafMonstrosityEffect(final MoldgrafMonstrosityEffect effect) { diff --git a/Mage.Sets/src/mage/cards/m/MoldgrafScavenger.java b/Mage.Sets/src/mage/cards/m/MoldgrafScavenger.java index a1ea286f48..dfa37d0f0a 100644 --- a/Mage.Sets/src/mage/cards/m/MoldgrafScavenger.java +++ b/Mage.Sets/src/mage/cards/m/MoldgrafScavenger.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class MoldgrafScavenger extends CardImpl { public MoldgrafScavenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MoleWorms.java b/Mage.Sets/src/mage/cards/m/MoleWorms.java index 10a8a33262..cec1c5e7aa 100644 --- a/Mage.Sets/src/mage/cards/m/MoleWorms.java +++ b/Mage.Sets/src/mage/cards/m/MoleWorms.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetLandPermanent; @@ -49,7 +50,7 @@ public class MoleWorms extends CardImpl { public MoleWorms(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Worm"); + this.subtype.add(SubType.WORM); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MolimoMaroSorcerer.java b/Mage.Sets/src/mage/cards/m/MolimoMaroSorcerer.java index 50a8ed4f21..946ee2e705 100644 --- a/Mage.Sets/src/mage/cards/m/MolimoMaroSorcerer.java +++ b/Mage.Sets/src/mage/cards/m/MolimoMaroSorcerer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class MolimoMaroSorcerer extends CardImpl { public MolimoMaroSorcerer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MoltenHydra.java b/Mage.Sets/src/mage/cards/m/MoltenHydra.java index e09b7ed6fd..20c4b563db 100644 --- a/Mage.Sets/src/mage/cards/m/MoltenHydra.java +++ b/Mage.Sets/src/mage/cards/m/MoltenHydra.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.Counter; import mage.counters.CounterType; @@ -59,7 +60,7 @@ public class MoltenHydra extends CardImpl { public MoltenHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MoltenPrimordial.java b/Mage.Sets/src/mage/cards/m/MoltenPrimordial.java index c2d3c9569f..1f79a82c07 100644 --- a/Mage.Sets/src/mage/cards/m/MoltenPrimordial.java +++ b/Mage.Sets/src/mage/cards/m/MoltenPrimordial.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.filter.common.FilterCreaturePermanent; @@ -58,7 +59,7 @@ public class MoltenPrimordial extends CardImpl { public MoltenPrimordial(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MoltenPsyche.java b/Mage.Sets/src/mage/cards/m/MoltenPsyche.java index 5798b5e07e..3ae13f9ea5 100644 --- a/Mage.Sets/src/mage/cards/m/MoltenPsyche.java +++ b/Mage.Sets/src/mage/cards/m/MoltenPsyche.java @@ -52,7 +52,7 @@ import mage.watchers.Watcher; public class MoltenPsyche extends CardImpl { public MoltenPsyche(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}{R}"); // Each player shuffles the cards from his or her hand into his or her library, then draws that many cards. // Metalcraft - If you control three or more artifacts, Molten Psyche deals damage to each opponent equal to the number of cards that player has drawn this turn. @@ -106,10 +106,6 @@ class MoltenPsycheEffect extends OneShotEffect { Player player = game.getPlayer(playerId); if (player != null) { player.drawCards(cardsToDraw.get(playerId), game); - if (MetalcraftCondition.instance.apply(game, source) && !playerId.equals(source.getControllerId())) { - MoltenPsycheWatcher watcher = (MoltenPsycheWatcher) game.getState().getWatchers().get(MoltenPsycheWatcher.class.getSimpleName()); - player.damage(watcher.getDraws(playerId), source.getSourceId(), game, false, true); - } } } if (MetalcraftCondition.instance.apply(game, source)) { diff --git a/Mage.Sets/src/mage/cards/m/MoltenRavager.java b/Mage.Sets/src/mage/cards/m/MoltenRavager.java index c2a0c1572e..743fe35e29 100644 --- a/Mage.Sets/src/mage/cards/m/MoltenRavager.java +++ b/Mage.Sets/src/mage/cards/m/MoltenRavager.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class MoltenRavager extends CardImpl { public MoltenRavager(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MoltenSentry.java b/Mage.Sets/src/mage/cards/m/MoltenSentry.java index 8230df005c..c54b3c8171 100644 --- a/Mage.Sets/src/mage/cards/m/MoltenSentry.java +++ b/Mage.Sets/src/mage/cards/m/MoltenSentry.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.game.Game; @@ -55,7 +56,7 @@ public class MoltenSentry extends CardImpl { public MoltenSentry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MoltenTailMasticore.java b/Mage.Sets/src/mage/cards/m/MoltenTailMasticore.java index 23118ceef2..7260a33ff3 100644 --- a/Mage.Sets/src/mage/cards/m/MoltenTailMasticore.java +++ b/Mage.Sets/src/mage/cards/m/MoltenTailMasticore.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; import mage.game.Game; @@ -59,7 +60,7 @@ public class MoltenTailMasticore extends CardImpl { public MoltenTailMasticore (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Masticore"); + this.subtype.add(SubType.MASTICORE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MoltensteelDragon.java b/Mage.Sets/src/mage/cards/m/MoltensteelDragon.java index 613b525cd6..85cd2bf544 100644 --- a/Mage.Sets/src/mage/cards/m/MoltensteelDragon.java +++ b/Mage.Sets/src/mage/cards/m/MoltensteelDragon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class MoltensteelDragon extends CardImpl { public MoltensteelDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{R/P}{R/P}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MoltingHarpy.java b/Mage.Sets/src/mage/cards/m/MoltingHarpy.java index 45a19c8b39..77440d0627 100644 --- a/Mage.Sets/src/mage/cards/m/MoltingHarpy.java +++ b/Mage.Sets/src/mage/cards/m/MoltingHarpy.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -47,8 +48,8 @@ public class MoltingHarpy extends CardImpl { public MoltingHarpy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Harpy"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HARPY); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MoltingSnakeskin.java b/Mage.Sets/src/mage/cards/m/MoltingSnakeskin.java index 5aafc88588..542f4d574d 100644 --- a/Mage.Sets/src/mage/cards/m/MoltingSnakeskin.java +++ b/Mage.Sets/src/mage/cards/m/MoltingSnakeskin.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -55,7 +56,7 @@ public class MoltingSnakeskin extends CardImpl { public MoltingSnakeskin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/m/MomirVigSimicVisionary.java b/Mage.Sets/src/mage/cards/m/MomirVigSimicVisionary.java index 1d33386160..f466947877 100644 --- a/Mage.Sets/src/mage/cards/m/MomirVigSimicVisionary.java +++ b/Mage.Sets/src/mage/cards/m/MomirVigSimicVisionary.java @@ -39,6 +39,7 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.search.SearchLibraryPutOnLibraryEffect; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -70,8 +71,8 @@ public class MomirVigSimicVisionary extends CardImpl { public MomirVigSimicVisionary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MonCalamariCruiser.java b/Mage.Sets/src/mage/cards/m/MonCalamariCruiser.java index 17cd9d7dc0..5ddc5a55ba 100644 --- a/Mage.Sets/src/mage/cards/m/MonCalamariCruiser.java +++ b/Mage.Sets/src/mage/cards/m/MonCalamariCruiser.java @@ -1,67 +1,68 @@ -/* - * 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.cards.m; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.keyword.SpaceflightAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class MonCalamariCruiser extends CardImpl { - - public MonCalamariCruiser(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Starship"); - this.power = new MageInt(4); - this.toughness = new MageInt(4); - - // Spaceflight - this.addAbility(SpaceflightAbility.getInstance()); - - // Whenever Mon Calamari Cruiser deals combat damage to a player, you may draw a card. - this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DrawCardSourceControllerEffect(1), true)); - - } - - public MonCalamariCruiser(final MonCalamariCruiser card) { - super(card); - } - - @Override - public MonCalamariCruiser copy() { - return new MonCalamariCruiser(this); - } -} +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author Styxo + */ +public class MonCalamariCruiser extends CardImpl { + + public MonCalamariCruiser(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{U}{U}"); + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + + // Whenever Mon Calamari Cruiser deals combat damage to a player, you may draw a card. + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DrawCardSourceControllerEffect(1), true)); + + } + + public MonCalamariCruiser(final MonCalamariCruiser card) { + super(card); + } + + @Override + public MonCalamariCruiser copy() { + return new MonCalamariCruiser(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MonCalamariInitiate.java b/Mage.Sets/src/mage/cards/m/MonCalamariInitiate.java index b8d94506d3..5f6e8ed4f0 100644 --- a/Mage.Sets/src/mage/cards/m/MonCalamariInitiate.java +++ b/Mage.Sets/src/mage/cards/m/MonCalamariInitiate.java @@ -1,68 +1,69 @@ -/* - * 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.cards.m; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.keyword.MeditateAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class MonCalamariInitiate extends CardImpl { - - public MonCalamariInitiate(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); - this.subtype.add("Calamari"); - this.subtype.add("Jedi"); - this.power = new MageInt(3); - this.toughness = new MageInt(2); - - // When Mon Calamari Initiate enters the battlefield, draw a card. - this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1))); - - // Meditate {1}{U} - this.addAbility(new MeditateAbility(new ManaCostsImpl("{1}{U}"))); - } - - public MonCalamariInitiate(final MonCalamariInitiate card) { - super(card); - } - - @Override - public MonCalamariInitiate copy() { - return new MonCalamariInitiate(this); - } -} +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.keyword.MeditateAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author Styxo + */ +public class MonCalamariInitiate extends CardImpl { + + public MonCalamariInitiate(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + this.subtype.add(SubType.CALAMARI); + this.subtype.add(SubType.JEDI); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // When Mon Calamari Initiate enters the battlefield, draw a card. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1))); + + // Meditate {1}{U} + this.addAbility(new MeditateAbility(new ManaCostsImpl("{1}{U}"))); + } + + public MonCalamariInitiate(final MonCalamariInitiate card) { + super(card); + } + + @Override + public MonCalamariInitiate copy() { + return new MonCalamariInitiate(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MonasteryFlock.java b/Mage.Sets/src/mage/cards/m/MonasteryFlock.java index 360f74bc28..5940f22811 100644 --- a/Mage.Sets/src/mage/cards/m/MonasteryFlock.java +++ b/Mage.Sets/src/mage/cards/m/MonasteryFlock.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class MonasteryFlock extends CardImpl { public MonasteryFlock(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MonasteryLoremaster.java b/Mage.Sets/src/mage/cards/m/MonasteryLoremaster.java index 269f4cf486..cf1afff699 100644 --- a/Mage.Sets/src/mage/cards/m/MonasteryLoremaster.java +++ b/Mage.Sets/src/mage/cards/m/MonasteryLoremaster.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -57,8 +58,8 @@ public class MonasteryLoremaster extends CardImpl { public MonasteryLoremaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Djinn"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.DJINN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MonasteryMentor.java b/Mage.Sets/src/mage/cards/m/MonasteryMentor.java index 62a43776bf..57fe1d7625 100644 --- a/Mage.Sets/src/mage/cards/m/MonasteryMentor.java +++ b/Mage.Sets/src/mage/cards/m/MonasteryMentor.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -54,8 +55,8 @@ public class MonasteryMentor extends CardImpl { public MonasteryMentor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MonasterySwiftspear.java b/Mage.Sets/src/mage/cards/m/MonasterySwiftspear.java index e9e6187a70..d90fcc1798 100644 --- a/Mage.Sets/src/mage/cards/m/MonasterySwiftspear.java +++ b/Mage.Sets/src/mage/cards/m/MonasterySwiftspear.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class MonasterySwiftspear extends CardImpl { public MonasterySwiftspear(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MondronenShaman.java b/Mage.Sets/src/mage/cards/m/MondronenShaman.java index 2371cd1baf..c84a04a278 100644 --- a/Mage.Sets/src/mage/cards/m/MondronenShaman.java +++ b/Mage.Sets/src/mage/cards/m/MondronenShaman.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.t.TovolarsMagehunter; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -49,9 +50,9 @@ public class MondronenShaman extends CardImpl { public MondronenShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MongrelPack.java b/Mage.Sets/src/mage/cards/m/MongrelPack.java index ed482e837e..5ff149de1f 100644 --- a/Mage.Sets/src/mage/cards/m/MongrelPack.java +++ b/Mage.Sets/src/mage/cards/m/MongrelPack.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TurnPhase; import mage.constants.Zone; import mage.game.Game; @@ -48,7 +49,7 @@ public class MongrelPack extends CardImpl { public MongrelPack(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(4); this.toughness = new MageInt(1); @@ -98,7 +99,7 @@ class HoundToken extends Token { public HoundToken() { super("Hound", "1/1 green Hound creature token"); cardType.add(CardType.CREATURE); - subtype.add("Hound"); + subtype.add(SubType.HOUND); color.setGreen(true); power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MonkIdealist.java b/Mage.Sets/src/mage/cards/m/MonkIdealist.java index ba8320425f..f3ba77c968 100644 --- a/Mage.Sets/src/mage/cards/m/MonkIdealist.java +++ b/Mage.Sets/src/mage/cards/m/MonkIdealist.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetCardInYourGraveyard; @@ -53,9 +54,9 @@ public class MonkIdealist extends CardImpl { public MonkIdealist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MonkRealist.java b/Mage.Sets/src/mage/cards/m/MonkRealist.java index d74def025e..052ef2841e 100644 --- a/Mage.Sets/src/mage/cards/m/MonkRealist.java +++ b/Mage.Sets/src/mage/cards/m/MonkRealist.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetEnchantmentPermanent; /** @@ -45,9 +46,9 @@ public class MonkRealist extends CardImpl { public MonkRealist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MonssGoblinRaiders.java b/Mage.Sets/src/mage/cards/m/MonssGoblinRaiders.java index 29c29fe757..55969db7d5 100644 --- a/Mage.Sets/src/mage/cards/m/MonssGoblinRaiders.java +++ b/Mage.Sets/src/mage/cards/m/MonssGoblinRaiders.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class MonssGoblinRaiders extends CardImpl { public MonssGoblinRaiders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MonstrousCarabid.java b/Mage.Sets/src/mage/cards/m/MonstrousCarabid.java index 1b3b6b5ec1..31e48a94d5 100644 --- a/Mage.Sets/src/mage/cards/m/MonstrousCarabid.java +++ b/Mage.Sets/src/mage/cards/m/MonstrousCarabid.java @@ -29,12 +29,13 @@ package mage.cards.m; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class MonstrousCarabid extends CardImpl { public MonstrousCarabid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{R}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); @@ -52,7 +53,7 @@ public class MonstrousCarabid extends CardImpl { this.toughness = new MageInt(4); // Monstrous Carabid attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); // Cycling {BR} this.addAbility(new CyclingAbility(new ManaCostsImpl("{B/R}"))); } diff --git a/Mage.Sets/src/mage/cards/m/MoonHeron.java b/Mage.Sets/src/mage/cards/m/MoonHeron.java index a97507efe0..2efa72ddaa 100644 --- a/Mage.Sets/src/mage/cards/m/MoonHeron.java +++ b/Mage.Sets/src/mage/cards/m/MoonHeron.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class MoonHeron extends CardImpl { public MoonHeron(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Spirit"); - this.subtype.add("Bird"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.BIRD); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MoonSprite.java b/Mage.Sets/src/mage/cards/m/MoonSprite.java index 1f88f8254a..3337048b96 100644 --- a/Mage.Sets/src/mage/cards/m/MoonSprite.java +++ b/Mage.Sets/src/mage/cards/m/MoonSprite.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class MoonSprite extends CardImpl { public MoonSprite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MoonbowIllusionist.java b/Mage.Sets/src/mage/cards/m/MoonbowIllusionist.java index 3ac6217649..ee2332a1a2 100644 --- a/Mage.Sets/src/mage/cards/m/MoonbowIllusionist.java +++ b/Mage.Sets/src/mage/cards/m/MoonbowIllusionist.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -52,8 +53,8 @@ public class MoonbowIllusionist extends CardImpl { public MoonbowIllusionist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Moonfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MOONFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MoongloveChangeling.java b/Mage.Sets/src/mage/cards/m/MoongloveChangeling.java index d8c3290225..94ef723e22 100644 --- a/Mage.Sets/src/mage/cards/m/MoongloveChangeling.java +++ b/Mage.Sets/src/mage/cards/m/MoongloveChangeling.java @@ -46,7 +46,7 @@ public class MoongloveChangeling extends CardImpl { public MoongloveChangeling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MoongloveWinnower.java b/Mage.Sets/src/mage/cards/m/MoongloveWinnower.java index 9a780437be..0472c0a265 100644 --- a/Mage.Sets/src/mage/cards/m/MoongloveWinnower.java +++ b/Mage.Sets/src/mage/cards/m/MoongloveWinnower.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class MoongloveWinnower extends CardImpl { public MoongloveWinnower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Elf"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/Moonhold.java b/Mage.Sets/src/mage/cards/m/Moonhold.java index 9c559325df..1c10f6a44a 100644 --- a/Mage.Sets/src/mage/cards/m/Moonhold.java +++ b/Mage.Sets/src/mage/cards/m/Moonhold.java @@ -55,13 +55,13 @@ import mage.watchers.common.ManaSpentToCastWatcher; public class Moonhold extends CardImpl { public Moonhold(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R/W}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R/W}"); // Target player can't play land cards this turn if {R} was spent to cast Moonhold and can't play creature cards this turn if {W} was spent to cast it. ContinuousRuleModifyingEffect effect = new MoonholdEffect(); ContinuousRuleModifyingEffect effect2 = new MoonholdEffect2(); - effect.setText("Target player can't play land cards this turn if {R} was spent to cast {this} "); - effect2.setText("and can't play creature cards this turn if {W} was spent to cast it."); + effect.setText("Target player can't play lands this turn if {R} was spent to cast {this}"); + effect2.setText("and can't cast creature spells this turn if {W} was spent to cast it."); this.getSpellAbility().addEffect(new ConditionalContinuousRuleModifyingEffect( effect, new LockedInCondition(new ManaWasSpentCondition(ColoredManaSymbol.R)))); @@ -69,7 +69,7 @@ public class Moonhold extends CardImpl { effect2, new LockedInCondition(new ManaWasSpentCondition(ColoredManaSymbol.W)))); this.getSpellAbility().addTarget(new TargetPlayer()); - this.getSpellAbility().addEffect(new InfoEffect("(Do both if {R}{W} was spent.)")); + this.getSpellAbility().addEffect(new InfoEffect(" (Do both if {R}{W} was spent.)")); this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher()); } diff --git a/Mage.Sets/src/mage/cards/m/MoonlightBargain.java b/Mage.Sets/src/mage/cards/m/MoonlightBargain.java index 66b3d3796b..e001bba5d3 100644 --- a/Mage.Sets/src/mage/cards/m/MoonlightBargain.java +++ b/Mage.Sets/src/mage/cards/m/MoonlightBargain.java @@ -1,116 +1,116 @@ -/* - * 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.cards.m; - -import java.util.Set; -import java.util.UUID; -import mage.MageObject; -import mage.abilities.Ability; -import mage.abilities.costs.common.PayLifeCost; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.Game; -import mage.players.Player; - -/** - * - * @author LevelX2 - */ -public class MoonlightBargain extends CardImpl { - - public MoonlightBargain(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{B}{B}"); - - // Look at the top five cards of your library. For each card, put that card into your graveyard unless you pay 2 life. Then put the rest into your hand. - getSpellAbility().addEffect(new MoonlightBargainEffect()); - } - - public MoonlightBargain(final MoonlightBargain card) { - super(card); - } - - @Override - public MoonlightBargain copy() { - return new MoonlightBargain(this); - } -} - -class MoonlightBargainEffect extends OneShotEffect { - - public MoonlightBargainEffect() { - super(Outcome.Benefit); - this.staticText = "Look at the top five cards of your library. For each card, put that card into your graveyard unless you pay 2 life. Then put the rest into your hand"; - } - - public MoonlightBargainEffect(final MoonlightBargainEffect effect) { - super(effect); - } - - @Override - public MoonlightBargainEffect copy() { - return new MoonlightBargainEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - MageObject sourceObject = source.getSourceObject(game); - if (controller != null && sourceObject != null) { - Set topFive = controller.getLibrary().getTopCards(game, 5); - Cards lookAtCards = new CardsImpl(); - lookAtCards.addAll(topFive); - controller.lookAtCards(sourceObject.getIdName(), lookAtCards, game); - Cards toHand = new CardsImpl(); - for (Card card : topFive) { - PayLifeCost cost = new PayLifeCost(2); - if (cost.canPay(source, source.getSourceId(), source.getControllerId(), game)) { - if (controller.chooseUse(outcome, "Put " + card.getIdName() + " into your graveyard unless you pay 2 life", sourceObject.getIdName(), - "Pay 2 life and put into hand", "Put into your graveyard", source, game)) { - if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) { - toHand.add(card); - } else { - controller.moveCards(card, Zone.GRAVEYARD, source, game); - } - } else { - controller.moveCards(card, Zone.GRAVEYARD, source, game); - } - } - } - controller.moveCards(toHand, Zone.HAND, source, game); - return true; - } - return false; - } -} +/* + * 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.cards.m; + +import java.util.Set; +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class MoonlightBargain extends CardImpl { + + public MoonlightBargain(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{B}{B}"); + + // Look at the top five cards of your library. For each card, put that card into your graveyard unless you pay 2 life. Then put the rest into your hand. + getSpellAbility().addEffect(new MoonlightBargainEffect()); + } + + public MoonlightBargain(final MoonlightBargain card) { + super(card); + } + + @Override + public MoonlightBargain copy() { + return new MoonlightBargain(this); + } +} + +class MoonlightBargainEffect extends OneShotEffect { + + public MoonlightBargainEffect() { + super(Outcome.Benefit); + this.staticText = "Look at the top five cards of your library. For each card, put that card into your graveyard unless you pay 2 life. Then put the rest into your hand"; + } + + public MoonlightBargainEffect(final MoonlightBargainEffect effect) { + super(effect); + } + + @Override + public MoonlightBargainEffect copy() { + return new MoonlightBargainEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null) { + Set topFive = controller.getLibrary().getTopCards(game, 5); + Cards lookAtCards = new CardsImpl(); + lookAtCards.addAll(topFive); + controller.lookAtCards(sourceObject.getIdName(), lookAtCards, game); + Cards toHand = new CardsImpl(); + for (Card card : topFive) { + PayLifeCost cost = new PayLifeCost(2); + if (cost.canPay(source, source.getSourceId(), source.getControllerId(), game)) { + if (controller.chooseUse(outcome, "Put " + card.getIdName() + " into your graveyard unless you pay 2 life", sourceObject.getIdName(), + "Pay 2 life and put into hand", "Put into your graveyard", source, game)) { + if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) { + toHand.add(card); + } else { + controller.moveCards(card, Zone.GRAVEYARD, source, game); + } + } else { + controller.moveCards(card, Zone.GRAVEYARD, source, game); + } + } + } + controller.moveCards(toHand, Zone.HAND, source, game); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/m/MoonlightGeist.java b/Mage.Sets/src/mage/cards/m/MoonlightGeist.java index f5c7d0e96d..d1dcfbb35b 100644 --- a/Mage.Sets/src/mage/cards/m/MoonlightGeist.java +++ b/Mage.Sets/src/mage/cards/m/MoonlightGeist.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class MoonlightGeist extends CardImpl { public MoonlightGeist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MoonlitStrider.java b/Mage.Sets/src/mage/cards/m/MoonlitStrider.java index c4ed12aee6..8be3996ca2 100644 --- a/Mage.Sets/src/mage/cards/m/MoonlitStrider.java +++ b/Mage.Sets/src/mage/cards/m/MoonlitStrider.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -49,7 +50,7 @@ public class MoonlitStrider extends CardImpl { public MoonlitStrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MoonlitWake.java b/Mage.Sets/src/mage/cards/m/MoonlitWake.java index 65ede092a0..6f9ebc8f36 100644 --- a/Mage.Sets/src/mage/cards/m/MoonlitWake.java +++ b/Mage.Sets/src/mage/cards/m/MoonlitWake.java @@ -1,58 +1,58 @@ -/* - * 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.cards.m; - -import java.util.UUID; -import mage.abilities.common.DiesCreatureTriggeredAbility; -import mage.abilities.effects.common.GainLifeEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author Derpthemeus - */ -public class MoonlitWake extends CardImpl { - - public MoonlitWake(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - - // Whenever a creature dies, you gain 1 life. - this.addAbility(new DiesCreatureTriggeredAbility(new GainLifeEffect(1), false)); - } - - public MoonlitWake(final MoonlitWake card) { - super(card); - } - - @Override - public MoonlitWake copy() { - return new MoonlitWake(this); - } -} +/* + * 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.cards.m; + +import java.util.UUID; +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author Derpthemeus + */ +public class MoonlitWake extends CardImpl { + + public MoonlitWake(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); + + // Whenever a creature dies, you gain 1 life. + this.addAbility(new DiesCreatureTriggeredAbility(new GainLifeEffect(1), false)); + } + + public MoonlitWake(final MoonlitWake card) { + super(card); + } + + @Override + public MoonlitWake copy() { + return new MoonlitWake(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MoonringIsland.java b/Mage.Sets/src/mage/cards/m/MoonringIsland.java index 5960fa583a..821dfe5690 100644 --- a/Mage.Sets/src/mage/cards/m/MoonringIsland.java +++ b/Mage.Sets/src/mage/cards/m/MoonringIsland.java @@ -40,6 +40,7 @@ import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -60,7 +61,7 @@ public class MoonringIsland extends CardImpl { public MoonringIsland(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Island"); + this.subtype.add(SubType.ISLAND); // ({tap}: Add {U} to your mana pool.) this.addAbility(new BlueManaAbility()); diff --git a/Mage.Sets/src/mage/cards/m/MoonriseIntruder.java b/Mage.Sets/src/mage/cards/m/MoonriseIntruder.java index d2205df20e..52451801a1 100644 --- a/Mage.Sets/src/mage/cards/m/MoonriseIntruder.java +++ b/Mage.Sets/src/mage/cards/m/MoonriseIntruder.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -49,7 +50,7 @@ public class MoonriseIntruder extends CardImpl { public MoonriseIntruder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(2); this.toughness = new MageInt(2); this.color.setRed(true); diff --git a/Mage.Sets/src/mage/cards/m/MoonscarredWerewolf.java b/Mage.Sets/src/mage/cards/m/MoonscarredWerewolf.java index 173ec5008d..2c19b87a9d 100644 --- a/Mage.Sets/src/mage/cards/m/MoonscarredWerewolf.java +++ b/Mage.Sets/src/mage/cards/m/MoonscarredWerewolf.java @@ -42,6 +42,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class MoonscarredWerewolf extends CardImpl { public MoonscarredWerewolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.color.setGreen(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MoonsilverSpear.java b/Mage.Sets/src/mage/cards/m/MoonsilverSpear.java index 1f257491ba..c65f856bbd 100644 --- a/Mage.Sets/src/mage/cards/m/MoonsilverSpear.java +++ b/Mage.Sets/src/mage/cards/m/MoonsilverSpear.java @@ -48,7 +48,7 @@ public class MoonsilverSpear extends CardImpl { public MoonsilverSpear(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has first strike. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/m/MoonveilDragon.java b/Mage.Sets/src/mage/cards/m/MoonveilDragon.java index ebd24eccb5..4a801474e6 100644 --- a/Mage.Sets/src/mage/cards/m/MoonveilDragon.java +++ b/Mage.Sets/src/mage/cards/m/MoonveilDragon.java @@ -45,7 +45,7 @@ public class MoonveilDragon extends CardImpl { public MoonveilDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MoonwingMoth.java b/Mage.Sets/src/mage/cards/m/MoonwingMoth.java index bde67f2985..1254dda9cf 100644 --- a/Mage.Sets/src/mage/cards/m/MoonwingMoth.java +++ b/Mage.Sets/src/mage/cards/m/MoonwingMoth.java @@ -45,7 +45,7 @@ public class MoonwingMoth extends CardImpl { public MoonwingMoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MoorFiend.java b/Mage.Sets/src/mage/cards/m/MoorFiend.java index da56e5ae84..9ef0819295 100644 --- a/Mage.Sets/src/mage/cards/m/MoorFiend.java +++ b/Mage.Sets/src/mage/cards/m/MoorFiend.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class MoorFiend extends CardImpl { public MoorFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MoorishCavalry.java b/Mage.Sets/src/mage/cards/m/MoorishCavalry.java index 887b973bfe..45607f6d79 100644 --- a/Mage.Sets/src/mage/cards/m/MoorishCavalry.java +++ b/Mage.Sets/src/mage/cards/m/MoorishCavalry.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class MoorishCavalry extends CardImpl { public MoorishCavalry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MoorlandDrifter.java b/Mage.Sets/src/mage/cards/m/MoorlandDrifter.java index c51714c71e..0e59249dff 100644 --- a/Mage.Sets/src/mage/cards/m/MoorlandDrifter.java +++ b/Mage.Sets/src/mage/cards/m/MoorlandDrifter.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class MoorlandDrifter extends CardImpl { public MoorlandDrifter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MoorlandInquisitor.java b/Mage.Sets/src/mage/cards/m/MoorlandInquisitor.java index 724cf7b4e2..b525047c8a 100644 --- a/Mage.Sets/src/mage/cards/m/MoorlandInquisitor.java +++ b/Mage.Sets/src/mage/cards/m/MoorlandInquisitor.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class MoorlandInquisitor extends CardImpl { public MoorlandInquisitor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MoratoriumStone.java b/Mage.Sets/src/mage/cards/m/MoratoriumStone.java new file mode 100644 index 0000000000..ea1620973e --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MoratoriumStone.java @@ -0,0 +1,122 @@ +/* + * 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.cards.m; + +import java.util.UUID; +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.GenericManaCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ExileAllEffect; +import mage.abilities.effects.common.ExileGraveyardAllPlayersEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.FilterCard; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.game.Game; +import mage.target.common.TargetCardInGraveyard; + +/** + * + * @author TheElk801 + */ +public class MoratoriumStone extends CardImpl { + + private static final FilterCard filter = new FilterCard("nonland card from a graveyard"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.LAND))); + } + + public MoratoriumStone(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); + + // {2}, {tap}: Exile target card from a graveyard. + Ability ability = new SimpleActivatedAbility(new ExileTargetEffect(), new GenericManaCost(2)); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCardInGraveyard()); + this.addAbility(ability); + + // {2}{W}{B}, {tap}, Sacrifice Moratorium Stone: Exile target nonland card from a graveyard, all other cards from graveyards with the same name as that card, and all permanents with that name. + ability = new SimpleActivatedAbility(new MoratoriumStoneEffect(), new ManaCostsImpl("{2}{W}{B}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCardInGraveyard(filter)); + this.addAbility(ability); + } + + public MoratoriumStone(final MoratoriumStone card) { + super(card); + } + + @Override + public MoratoriumStone copy() { + return new MoratoriumStone(this); + } +} + +class MoratoriumStoneEffect extends OneShotEffect { + + MoratoriumStoneEffect() { + super(Outcome.Benefit); + this.staticText = "Exile target nonland card from a graveyard, all other cards from graveyards with the same name as that card, and all permanents with that name."; + } + + MoratoriumStoneEffect(final MoratoriumStoneEffect effect) { + super(effect); + } + + @Override + public MoratoriumStoneEffect copy() { + return new MoratoriumStoneEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Card card = game.getCard(source.getFirstTarget()); + if (card == null) { + return false; + } + String cardName = card.getName(); + FilterCard filter1 = new FilterCard(); + filter1.add(new NamePredicate(cardName)); + FilterPermanent filter2 = new FilterPermanent(); + filter2.add(new NamePredicate(cardName)); + return new ExileGraveyardAllPlayersEffect(filter1).apply(game, source) && new ExileAllEffect(filter2).apply(game, source); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MordantDragon.java b/Mage.Sets/src/mage/cards/m/MordantDragon.java index 6f2b110764..5144541264 100644 --- a/Mage.Sets/src/mage/cards/m/MordantDragon.java +++ b/Mage.Sets/src/mage/cards/m/MordantDragon.java @@ -53,7 +53,7 @@ public class MordantDragon extends CardImpl { public MordantDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MorgueThrull.java b/Mage.Sets/src/mage/cards/m/MorgueThrull.java index ffb958d6a5..a689c549e2 100644 --- a/Mage.Sets/src/mage/cards/m/MorgueThrull.java +++ b/Mage.Sets/src/mage/cards/m/MorgueThrull.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class MorgueThrull extends CardImpl { public MorgueThrull(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Thrull"); + this.subtype.add(SubType.THRULL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MorgueToad.java b/Mage.Sets/src/mage/cards/m/MorgueToad.java index 04765dccb5..0daed397e2 100644 --- a/Mage.Sets/src/mage/cards/m/MorgueToad.java +++ b/Mage.Sets/src/mage/cards/m/MorgueToad.java @@ -35,6 +35,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class MorgueToad extends CardImpl { public MorgueToad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Frog"); + this.subtype.add(SubType.FROG); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/Morinfen.java b/Mage.Sets/src/mage/cards/m/Morinfen.java index 46dbf70e65..73f8849518 100644 --- a/Mage.Sets/src/mage/cards/m/Morinfen.java +++ b/Mage.Sets/src/mage/cards/m/Morinfen.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -46,7 +47,7 @@ public class Morinfen extends CardImpl { public Morinfen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MoriokReaver.java b/Mage.Sets/src/mage/cards/m/MoriokReaver.java index c9ab21640c..1471ec027a 100644 --- a/Mage.Sets/src/mage/cards/m/MoriokReaver.java +++ b/Mage.Sets/src/mage/cards/m/MoriokReaver.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class MoriokReaver extends CardImpl { public MoriokReaver (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MoriokReplica.java b/Mage.Sets/src/mage/cards/m/MoriokReplica.java index d5c1c8768e..d2ac4f37f4 100644 --- a/Mage.Sets/src/mage/cards/m/MoriokReplica.java +++ b/Mage.Sets/src/mage/cards/m/MoriokReplica.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -50,7 +51,7 @@ public class MoriokReplica extends CardImpl { public MoriokReplica (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MoriokRigger.java b/Mage.Sets/src/mage/cards/m/MoriokRigger.java index 7f840bd8a4..2a226789b4 100644 --- a/Mage.Sets/src/mage/cards/m/MoriokRigger.java +++ b/Mage.Sets/src/mage/cards/m/MoriokRigger.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterArtifactPermanent; @@ -47,9 +48,9 @@ public class MoriokRigger extends CardImpl { public MoriokRigger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); - this.subtype.add("Rigger"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); + this.subtype.add(SubType.RIGGER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MoriokScavenger.java b/Mage.Sets/src/mage/cards/m/MoriokScavenger.java index 323be4372c..76c3b52963 100644 --- a/Mage.Sets/src/mage/cards/m/MoriokScavenger.java +++ b/Mage.Sets/src/mage/cards/m/MoriokScavenger.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetCardInYourGraveyard; @@ -53,8 +54,8 @@ public class MoriokScavenger extends CardImpl { public MoriokScavenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MorkrutBanshee.java b/Mage.Sets/src/mage/cards/m/MorkrutBanshee.java index 9636e827d4..5201207586 100644 --- a/Mage.Sets/src/mage/cards/m/MorkrutBanshee.java +++ b/Mage.Sets/src/mage/cards/m/MorkrutBanshee.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class MorkrutBanshee extends CardImpl { public MorkrutBanshee(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.color.setBlack(true); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MorkrutNecropod.java b/Mage.Sets/src/mage/cards/m/MorkrutNecropod.java index 4cfcef937d..af45b60e8e 100644 --- a/Mage.Sets/src/mage/cards/m/MorkrutNecropod.java +++ b/Mage.Sets/src/mage/cards/m/MorkrutNecropod.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -57,8 +58,8 @@ public class MorkrutNecropod extends CardImpl { public MorkrutNecropod(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Slug"); - this.subtype.add("Horror"); + this.subtype.add(SubType.SLUG); + this.subtype.add(SubType.HORROR); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/m/Moroii.java b/Mage.Sets/src/mage/cards/m/Moroii.java index 0f6ec561f2..3fd93ffbc8 100644 --- a/Mage.Sets/src/mage/cards/m/Moroii.java +++ b/Mage.Sets/src/mage/cards/m/Moroii.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -45,7 +46,7 @@ public class Moroii extends CardImpl { public Moroii(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/Morphling.java b/Mage.Sets/src/mage/cards/m/Morphling.java index 594763db26..ad4a372cf5 100644 --- a/Mage.Sets/src/mage/cards/m/Morphling.java +++ b/Mage.Sets/src/mage/cards/m/Morphling.java @@ -49,7 +49,7 @@ public class Morphling extends CardImpl { public Morphling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MorselTheft.java b/Mage.Sets/src/mage/cards/m/MorselTheft.java index e60cb31a1a..dcbbebcf0c 100644 --- a/Mage.Sets/src/mage/cards/m/MorselTheft.java +++ b/Mage.Sets/src/mage/cards/m/MorselTheft.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ProwlAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -48,7 +49,7 @@ public class MorselTheft extends CardImpl { public MorselTheft(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.SORCERY},"{2}{B}{B}"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.ROGUE); // Prowl {1}{B} this.addAbility(new ProwlAbility(this, "{1}{B}")); diff --git a/Mage.Sets/src/mage/cards/m/Morselhoarder.java b/Mage.Sets/src/mage/cards/m/Morselhoarder.java index 8d5a6b6ba7..ebd6182449 100644 --- a/Mage.Sets/src/mage/cards/m/Morselhoarder.java +++ b/Mage.Sets/src/mage/cards/m/Morselhoarder.java @@ -39,6 +39,7 @@ import mage.abilities.mana.ActivatedManaAbilityImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -50,7 +51,7 @@ public class Morselhoarder extends CardImpl { public Morselhoarder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R/G}{R/G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MortalObstinacy.java b/Mage.Sets/src/mage/cards/m/MortalObstinacy.java index 251a40ff57..c796b17492 100644 --- a/Mage.Sets/src/mage/cards/m/MortalObstinacy.java +++ b/Mage.Sets/src/mage/cards/m/MortalObstinacy.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -60,7 +61,7 @@ public class MortalObstinacy extends CardImpl { public MortalObstinacy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature you control diff --git a/Mage.Sets/src/mage/cards/m/MortalWound.java b/Mage.Sets/src/mage/cards/m/MortalWound.java index dd13ddd00b..9264b2cfb2 100644 --- a/Mage.Sets/src/mage/cards/m/MortalWound.java +++ b/Mage.Sets/src/mage/cards/m/MortalWound.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class MortalWound extends CardImpl { public MortalWound(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/m/Mortarpod.java b/Mage.Sets/src/mage/cards/m/Mortarpod.java index 4d4dfb5191..b83c2f3ff8 100644 --- a/Mage.Sets/src/mage/cards/m/Mortarpod.java +++ b/Mage.Sets/src/mage/cards/m/Mortarpod.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -55,7 +56,7 @@ public class Mortarpod extends CardImpl { public Mortarpod(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Living weapon (When this Equipment enters the battlefield, create a 0/0 black Germ creature token, then attach this to it.) this.addAbility(new LivingWeaponAbility()); diff --git a/Mage.Sets/src/mage/cards/m/MorticianBeetle.java b/Mage.Sets/src/mage/cards/m/MorticianBeetle.java index e1f6500f2c..32a77a6fb0 100644 --- a/Mage.Sets/src/mage/cards/m/MorticianBeetle.java +++ b/Mage.Sets/src/mage/cards/m/MorticianBeetle.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -50,7 +51,7 @@ public class MorticianBeetle extends CardImpl { public MorticianBeetle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/Mortipede.java b/Mage.Sets/src/mage/cards/m/Mortipede.java index c753f12b7d..1b920145ae 100644 --- a/Mage.Sets/src/mage/cards/m/Mortipede.java +++ b/Mage.Sets/src/mage/cards/m/Mortipede.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.MustBeBlockedByAllSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class Mortipede extends CardImpl { public Mortipede(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MortisDogs.java b/Mage.Sets/src/mage/cards/m/MortisDogs.java index 8639271227..14c837d008 100644 --- a/Mage.Sets/src/mage/cards/m/MortisDogs.java +++ b/Mage.Sets/src/mage/cards/m/MortisDogs.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.TargetPlayer; @@ -49,7 +50,7 @@ public class MortisDogs extends CardImpl { public MortisDogs(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/Mortivore.java b/Mage.Sets/src/mage/cards/m/Mortivore.java index 0ffeb2d3cd..fef595f940 100644 --- a/Mage.Sets/src/mage/cards/m/Mortivore.java +++ b/Mage.Sets/src/mage/cards/m/Mortivore.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class Mortivore extends CardImpl { public Mortivore(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Lhurgoyf"); + this.subtype.add(SubType.LHURGOYF); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MortusStrider.java b/Mage.Sets/src/mage/cards/m/MortusStrider.java index e2d728f6f4..1a50315434 100644 --- a/Mage.Sets/src/mage/cards/m/MortusStrider.java +++ b/Mage.Sets/src/mage/cards/m/MortusStrider.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class MortusStrider extends CardImpl { public MortusStrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MosquitoGuard.java b/Mage.Sets/src/mage/cards/m/MosquitoGuard.java index f58c1555ad..a7b5c63540 100644 --- a/Mage.Sets/src/mage/cards/m/MosquitoGuard.java +++ b/Mage.Sets/src/mage/cards/m/MosquitoGuard.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ReinforceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class MosquitoGuard extends CardImpl { public MosquitoGuard (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MossKami.java b/Mage.Sets/src/mage/cards/m/MossKami.java index e1d39be394..68c2ff669e 100644 --- a/Mage.Sets/src/mage/cards/m/MossKami.java +++ b/Mage.Sets/src/mage/cards/m/MossKami.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class MossKami extends CardImpl { public MossKami (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MossMonster.java b/Mage.Sets/src/mage/cards/m/MossMonster.java index 09d40bfca1..5cf89fbd3d 100644 --- a/Mage.Sets/src/mage/cards/m/MossMonster.java +++ b/Mage.Sets/src/mage/cards/m/MossMonster.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class MossMonster extends CardImpl { public MossMonster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/m/MossbridgeTroll.java b/Mage.Sets/src/mage/cards/m/MossbridgeTroll.java index 5d4324b069..2f4c5ce295 100644 --- a/Mage.Sets/src/mage/cards/m/MossbridgeTroll.java +++ b/Mage.Sets/src/mage/cards/m/MossbridgeTroll.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -66,7 +67,7 @@ public class MossbridgeTroll extends CardImpl { public MossbridgeTroll(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); - this.subtype.add("Troll"); + this.subtype.add(SubType.TROLL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/Mosstodon.java b/Mage.Sets/src/mage/cards/m/Mosstodon.java index d4e7415bc4..d006cf0536 100644 --- a/Mage.Sets/src/mage/cards/m/Mosstodon.java +++ b/Mage.Sets/src/mage/cards/m/Mosstodon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; @@ -57,8 +58,8 @@ public class Mosstodon extends CardImpl { public Mosstodon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MothdustChangeling.java b/Mage.Sets/src/mage/cards/m/MothdustChangeling.java index 2eb4bdace2..874bb0292b 100644 --- a/Mage.Sets/src/mage/cards/m/MothdustChangeling.java +++ b/Mage.Sets/src/mage/cards/m/MothdustChangeling.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -57,7 +58,7 @@ public class MothdustChangeling extends CardImpl { public MothdustChangeling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MotherOfRunes.java b/Mage.Sets/src/mage/cards/m/MotherOfRunes.java index 3b29957032..489408269a 100644 --- a/Mage.Sets/src/mage/cards/m/MotherOfRunes.java +++ b/Mage.Sets/src/mage/cards/m/MotherOfRunes.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.GainProtectionFromColorTargetEff import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -48,8 +49,8 @@ public class MotherOfRunes extends CardImpl { public MotherOfRunes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MothriderSamurai.java b/Mage.Sets/src/mage/cards/m/MothriderSamurai.java index 0f925212f5..8ec02527ce 100644 --- a/Mage.Sets/src/mage/cards/m/MothriderSamurai.java +++ b/Mage.Sets/src/mage/cards/m/MothriderSamurai.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class MothriderSamurai extends CardImpl { public MothriderSamurai (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MountainBandit.java b/Mage.Sets/src/mage/cards/m/MountainBandit.java index 5ea3246c4b..19dfe556b7 100644 --- a/Mage.Sets/src/mage/cards/m/MountainBandit.java +++ b/Mage.Sets/src/mage/cards/m/MountainBandit.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,9 +43,9 @@ public class MountainBandit extends CardImpl { public MountainBandit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MountainGoat.java b/Mage.Sets/src/mage/cards/m/MountainGoat.java index ff15a81b30..7400d4838d 100644 --- a/Mage.Sets/src/mage/cards/m/MountainGoat.java +++ b/Mage.Sets/src/mage/cards/m/MountainGoat.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class MountainGoat extends CardImpl { public MountainGoat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goat"); + this.subtype.add(SubType.GOAT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MountainYeti.java b/Mage.Sets/src/mage/cards/m/MountainYeti.java index 514f3401fe..be982aa9be 100644 --- a/Mage.Sets/src/mage/cards/m/MountainYeti.java +++ b/Mage.Sets/src/mage/cards/m/MountainYeti.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class MountainYeti extends CardImpl { public MountainYeti(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Yeti"); + this.subtype.add(SubType.YETI); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MountedArchers.java b/Mage.Sets/src/mage/cards/m/MountedArchers.java index 2e703a5748..cfb4b746ae 100644 --- a/Mage.Sets/src/mage/cards/m/MountedArchers.java +++ b/Mage.Sets/src/mage/cards/m/MountedArchers.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,9 +48,9 @@ public class MountedArchers extends CardImpl { public MountedArchers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MournfulZombie.java b/Mage.Sets/src/mage/cards/m/MournfulZombie.java index 014efe8d4f..0586dc2e8f 100644 --- a/Mage.Sets/src/mage/cards/m/MournfulZombie.java +++ b/Mage.Sets/src/mage/cards/m/MournfulZombie.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.GainLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -49,7 +50,7 @@ public class MournfulZombie extends CardImpl { public MournfulZombie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/Mourning.java b/Mage.Sets/src/mage/cards/m/Mourning.java index efe79032af..3384b93b97 100644 --- a/Mage.Sets/src/mage/cards/m/Mourning.java +++ b/Mage.Sets/src/mage/cards/m/Mourning.java @@ -50,7 +50,7 @@ public class Mourning extends CardImpl { public Mourning(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/m/MourningThrull.java b/Mage.Sets/src/mage/cards/m/MourningThrull.java index 93597066db..15f6445713 100644 --- a/Mage.Sets/src/mage/cards/m/MourningThrull.java +++ b/Mage.Sets/src/mage/cards/m/MourningThrull.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class MourningThrull extends CardImpl { public MourningThrull(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W/B}"); - this.subtype.add("Thrull"); + this.subtype.add(SubType.THRULL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/Mournwhelk.java b/Mage.Sets/src/mage/cards/m/Mournwhelk.java index 08044bfdd5..63a1df74c7 100644 --- a/Mage.Sets/src/mage/cards/m/Mournwhelk.java +++ b/Mage.Sets/src/mage/cards/m/Mournwhelk.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -46,7 +47,7 @@ public class Mournwhelk extends CardImpl { public Mournwhelk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{B}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/Mournwillow.java b/Mage.Sets/src/mage/cards/m/Mournwillow.java index 30c66c5e6f..cff2cf04b1 100644 --- a/Mage.Sets/src/mage/cards/m/Mournwillow.java +++ b/Mage.Sets/src/mage/cards/m/Mournwillow.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.game.Game; import mage.game.permanent.Permanent; @@ -50,8 +51,8 @@ public class Mournwillow extends CardImpl { public Mournwillow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MtendaGriffin.java b/Mage.Sets/src/mage/cards/m/MtendaGriffin.java index a6f05aaf45..70ba608ca6 100644 --- a/Mage.Sets/src/mage/cards/m/MtendaGriffin.java +++ b/Mage.Sets/src/mage/cards/m/MtendaGriffin.java @@ -63,7 +63,7 @@ public class MtendaGriffin extends CardImpl { public MtendaGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MtendaHerder.java b/Mage.Sets/src/mage/cards/m/MtendaHerder.java index d681fecfc1..e5af1f25d8 100644 --- a/Mage.Sets/src/mage/cards/m/MtendaHerder.java +++ b/Mage.Sets/src/mage/cards/m/MtendaHerder.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlankingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class MtendaHerder extends CardImpl { public MtendaHerder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MuckDrubb.java b/Mage.Sets/src/mage/cards/m/MuckDrubb.java new file mode 100644 index 0000000000..ada1f2012b --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MuckDrubb.java @@ -0,0 +1,120 @@ +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ChangeATargetOfTargetSpellAbilityToSourceEffect; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.MadnessAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterInPlay; +import mage.filter.FilterSpell; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.ObjectPlayer; +import mage.filter.predicate.ObjectPlayerPredicate; +import mage.filter.predicate.other.TargetsPermanentPredicate; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.target.Target; +import mage.target.TargetSpell; +import mage.util.TargetAddress; + +/** + * + * @author L_J + */ +public class MuckDrubb extends CardImpl { + + protected static final FilterSpell filter = new FilterSpell("spell that targets only a single creature"); + + static { + filter.add(new SpellWithOnlySingleTargetPredicate()); + filter.add(new TargetsPermanentPredicate(new FilterCreaturePermanent())); + } + + public MuckDrubb(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); + this.subtype.add(SubType.BEAST); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // When Muck Drubb enters the battlefield, change the target of target spell that targets only a single creature to Muck Drubb. + Effect effect = new ChangeATargetOfTargetSpellAbilityToSourceEffect(); + effect.setText("change the target of target spell that targets only a single creature to {this}"); + Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); + Target target = new TargetSpell(filter); + ability.addTarget(target); + this.addAbility(ability); + + // Madness {2}{B} + this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{2}{B}"))); + } + + public MuckDrubb(final MuckDrubb card) { + super(card); + } + + @Override + public MuckDrubb copy() { + return new MuckDrubb(this); + } +} + +class SpellWithOnlySingleTargetPredicate implements ObjectPlayerPredicate> { + + @Override + public boolean apply(ObjectPlayer input, Game game) { + Spell spell = input.getObject(); + if (spell == null) { + return false; + } + UUID singleTarget = null; + for (TargetAddress addr : TargetAddress.walk(spell)) { + Target targetInstance = addr.getTarget(spell); + for (UUID targetId : targetInstance.getTargets()) { + if (singleTarget == null) { + singleTarget = targetId; + } else if (!singleTarget.equals(targetId)) { + return false; + } + } + } + return singleTarget != null; + } +} diff --git a/Mage.Sets/src/mage/cards/m/MuckRats.java b/Mage.Sets/src/mage/cards/m/MuckRats.java index 171494a999..908e72eb88 100644 --- a/Mage.Sets/src/mage/cards/m/MuckRats.java +++ b/Mage.Sets/src/mage/cards/m/MuckRats.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class MuckRats extends CardImpl { public MuckRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MudbrawlerCohort.java b/Mage.Sets/src/mage/cards/m/MudbrawlerCohort.java index c04d95d41f..5aa2ce6cf9 100644 --- a/Mage.Sets/src/mage/cards/m/MudbrawlerCohort.java +++ b/Mage.Sets/src/mage/cards/m/MudbrawlerCohort.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -64,8 +65,8 @@ public class MudbrawlerCohort extends CardImpl { public MudbrawlerCohort(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.color.setRed(true); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MudbrawlerRaiders.java b/Mage.Sets/src/mage/cards/m/MudbrawlerRaiders.java index e30190d1cc..2c7a93a256 100644 --- a/Mage.Sets/src/mage/cards/m/MudbrawlerRaiders.java +++ b/Mage.Sets/src/mage/cards/m/MudbrawlerRaiders.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -53,8 +54,8 @@ public class MudbrawlerRaiders extends CardImpl { public MudbrawlerRaiders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R/G}{R/G}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MudbuttonClanger.java b/Mage.Sets/src/mage/cards/m/MudbuttonClanger.java index 31f04cb6fe..cd9033f43b 100644 --- a/Mage.Sets/src/mage/cards/m/MudbuttonClanger.java +++ b/Mage.Sets/src/mage/cards/m/MudbuttonClanger.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -44,8 +45,8 @@ public class MudbuttonClanger extends CardImpl { public MudbuttonClanger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MudbuttonTorchrunner.java b/Mage.Sets/src/mage/cards/m/MudbuttonTorchrunner.java index c60e212e98..fee4bc3f5f 100644 --- a/Mage.Sets/src/mage/cards/m/MudbuttonTorchrunner.java +++ b/Mage.Sets/src/mage/cards/m/MudbuttonTorchrunner.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; /** @@ -45,8 +46,8 @@ public class MudbuttonTorchrunner extends CardImpl { public MudbuttonTorchrunner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MulDayaChannelers.java b/Mage.Sets/src/mage/cards/m/MulDayaChannelers.java index 97357fac10..b03c18ee68 100644 --- a/Mage.Sets/src/mage/cards/m/MulDayaChannelers.java +++ b/Mage.Sets/src/mage/cards/m/MulDayaChannelers.java @@ -30,24 +30,20 @@ package mage.cards.m; import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.condition.Condition; import mage.abilities.condition.common.TopLibraryCardTypeCondition; -import mage.abilities.costs.Cost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.effects.common.AddManaOfAnyColorEffect; -import mage.abilities.effects.common.ManaEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.continuous.PlayWithTheTopCardRevealedEffect; -import mage.abilities.mana.ActivatedManaAbilityImpl; import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.game.Game; /** * @@ -58,10 +54,10 @@ public class MulDayaChannelers extends CardImpl { private static final String rule1 = "As long as the top card of your library is a creature card, {this} gets +3/+3"; public MulDayaChannelers(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); - this.subtype.add("Shaman"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); + this.subtype.add(SubType.SHAMAN); this.color.setGreen(true); this.power = new MageInt(2); @@ -80,7 +76,7 @@ public class MulDayaChannelers extends CardImpl { new TopLibraryCardTypeCondition(CardType.LAND), "As long as the top card of your library is a land card, Mul Daya Channelers has \"{T}: Add two mana of any one color to your mana pool.\""); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); - + } public MulDayaChannelers(final MulDayaChannelers card) { @@ -92,46 +88,3 @@ public class MulDayaChannelers extends CardImpl { return new MulDayaChannelers(this); } } - - -class MulDayaChannelersActivateIfConditionManaAbility extends ActivatedManaAbilityImpl { - - private Condition condition; - - public MulDayaChannelersActivateIfConditionManaAbility(Zone zone, ManaEffect effect, Cost cost, Condition condition) { - super(zone, effect, cost); - this.condition = condition; - } - - public MulDayaChannelersActivateIfConditionManaAbility(MulDayaChannelersActivateIfConditionManaAbility ability) { - super(ability); - this.condition = ability.condition; - } - - @Override - public boolean canActivate(UUID playerId, Game game) { - if (condition.apply(game, this)) { - return super.canActivate(playerId, game); - } - return false; - } - - @Override - public boolean activate(Game game, boolean noMana) { - if (canActivate(this.controllerId, game)) { - return super.activate(game, noMana); - } - return false; - } - - @Override - public String getRule() { - return "As long as the top card of your library is a land card, {this} has \"{T}: Add two mana of any one color to your mana pool."; - } - - @Override - public MulDayaChannelersActivateIfConditionManaAbility copy() { - return new MulDayaChannelersActivateIfConditionManaAbility(this); - } - -} diff --git a/Mage.Sets/src/mage/cards/m/Mulldrifter.java b/Mage.Sets/src/mage/cards/m/Mulldrifter.java index 3af38fc9e5..71fde92e86 100644 --- a/Mage.Sets/src/mage/cards/m/Mulldrifter.java +++ b/Mage.Sets/src/mage/cards/m/Mulldrifter.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class Mulldrifter extends CardImpl { public Mulldrifter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MultaniMaroSorcerer.java b/Mage.Sets/src/mage/cards/m/MultaniMaroSorcerer.java index 265fd645a2..4ae9f6c4b5 100644 --- a/Mage.Sets/src/mage/cards/m/MultaniMaroSorcerer.java +++ b/Mage.Sets/src/mage/cards/m/MultaniMaroSorcerer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class MultaniMaroSorcerer extends CardImpl { public MultaniMaroSorcerer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/m/MultanisAcolyte.java b/Mage.Sets/src/mage/cards/m/MultanisAcolyte.java index e8273e17d6..ed229a85dc 100644 --- a/Mage.Sets/src/mage/cards/m/MultanisAcolyte.java +++ b/Mage.Sets/src/mage/cards/m/MultanisAcolyte.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class MultanisAcolyte extends CardImpl { public MultanisAcolyte(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MultanisHarmony.java b/Mage.Sets/src/mage/cards/m/MultanisHarmony.java index 9fd09be1ee..27cfd8b36c 100644 --- a/Mage.Sets/src/mage/cards/m/MultanisHarmony.java +++ b/Mage.Sets/src/mage/cards/m/MultanisHarmony.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class MultanisHarmony extends CardImpl { public MultanisHarmony(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/m/MultanisPresence.java b/Mage.Sets/src/mage/cards/m/MultanisPresence.java new file mode 100644 index 0000000000..d80bfca47f --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MultanisPresence.java @@ -0,0 +1,145 @@ +/* + * 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.cards.m; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.WatcherScope; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.stack.Spell; +import mage.watchers.Watcher; + +/** + * + * @author TheElk801 + */ +public class MultanisPresence extends CardImpl { + + public MultanisPresence(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + + // Whenever a spell you've cast is countered, draw a card. + this.addAbility(new MultanisPresenceTriggeredAbility(), new MultanisPresenceWatcher()); + } + + public MultanisPresence(final MultanisPresence card) { + super(card); + } + + @Override + public MultanisPresence copy() { + return new MultanisPresence(this); + } +} + +class MultanisPresenceTriggeredAbility extends TriggeredAbilityImpl { + + public MultanisPresenceTriggeredAbility() { + super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), false); + } + + public MultanisPresenceTriggeredAbility(final MultanisPresenceTriggeredAbility ability) { + super(ability); + } + + @Override + public MultanisPresenceTriggeredAbility copy() { + return new MultanisPresenceTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.COUNTERED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + MultanisPresenceWatcher watcher = (MultanisPresenceWatcher) game.getState().getWatchers().get(MultanisPresenceWatcher.class.getSimpleName()); + return (watcher.getSpellsCastThisTurn(controllerId).contains(event.getTargetId())); + } + + @Override + public String getRule() { + return "Whenever a spell you've cast is countered, " + super.getRule(); + } +} + +class MultanisPresenceWatcher extends Watcher { + + private final HashMap> spellsCast = new HashMap<>(); + + public MultanisPresenceWatcher() { + super(MultanisPresenceWatcher.class.getSimpleName(), WatcherScope.GAME); + } + + public MultanisPresenceWatcher(final MultanisPresenceWatcher watcher) { + super(watcher); + this.spellsCast.putAll(watcher.spellsCast); + } + + @Override + public MultanisPresenceWatcher copy() { + return new MultanisPresenceWatcher(this); + } + + @Override + public void watch(GameEvent event, Game game) { + if (GameEvent.EventType.SPELL_CAST == event.getType()) { + Spell spell = game.getSpellOrLKIStack(event.getTargetId()); + if (spell != null) { + List spellIds; + if (!spellsCast.containsKey(spell.getControllerId())) { + spellIds = new ArrayList<>(); + } else { + spellIds = spellsCast.get(spell.getControllerId()); + } + spellIds.add(spell.getId()); + spellsCast.put(spell.getControllerId(), spellIds); + } + } + } + + @Override + public void reset() { + super.reset(); + spellsCast.clear(); + } + + public List getSpellsCastThisTurn(UUID playerId) { + return spellsCast.get(playerId); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MultiformWonder.java b/Mage.Sets/src/mage/cards/m/MultiformWonder.java index 565a14d7cf..1c4efc97cc 100644 --- a/Mage.Sets/src/mage/cards/m/MultiformWonder.java +++ b/Mage.Sets/src/mage/cards/m/MultiformWonder.java @@ -61,7 +61,7 @@ public class MultiformWonder extends CardImpl { public MultiformWonder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MummyParamount.java b/Mage.Sets/src/mage/cards/m/MummyParamount.java index a05538c7e1..5bca13317f 100644 --- a/Mage.Sets/src/mage/cards/m/MummyParamount.java +++ b/Mage.Sets/src/mage/cards/m/MummyParamount.java @@ -1,74 +1,74 @@ -/* - * 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.cards.m; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.filter.predicate.permanent.AnotherPredicate; - -/** - * - * @author emerald000 - */ -public class MummyParamount extends CardImpl { - - private static final FilterControlledPermanent filter = new FilterControlledPermanent("another Zombie"); - static { - filter.add(new SubtypePredicate(SubType.ZOMBIE)); - filter.add(new AnotherPredicate()); - } - - public MummyParamount(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - - this.subtype.add("Zombie"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // Whenever another Zombie enters the battlefield under your control, Mummy Paramount gets +1/+1 until end of turn. - this.addAbility(new EntersBattlefieldAllTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), filter)); - } - - public MummyParamount(final MummyParamount card) { - super(card); - } - - @Override - public MummyParamount copy() { - return new MummyParamount(this); - } -} +/* + * 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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author emerald000 + */ +public class MummyParamount extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("another Zombie"); + static { + filter.add(new SubtypePredicate(SubType.ZOMBIE)); + filter.add(new AnotherPredicate()); + } + + public MummyParamount(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + + this.subtype.add(SubType.ZOMBIE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever another Zombie enters the battlefield under your control, Mummy Paramount gets +1/+1 until end of turn. + this.addAbility(new EntersBattlefieldAllTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), filter)); + } + + public MummyParamount(final MummyParamount card) { + super(card); + } + + @Override + public MummyParamount copy() { + return new MummyParamount(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MundaAmbushLeader.java b/Mage.Sets/src/mage/cards/m/MundaAmbushLeader.java index 844331865f..f1fc6db297 100644 --- a/Mage.Sets/src/mage/cards/m/MundaAmbushLeader.java +++ b/Mage.Sets/src/mage/cards/m/MundaAmbushLeader.java @@ -54,8 +54,8 @@ public class MundaAmbushLeader extends CardImpl { public MundaAmbushLeader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Kor"); - this.subtype.add("Ally"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.ALLY); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MundasVanguard.java b/Mage.Sets/src/mage/cards/m/MundasVanguard.java index ebcf67ecfd..07ab71a581 100644 --- a/Mage.Sets/src/mage/cards/m/MundasVanguard.java +++ b/Mage.Sets/src/mage/cards/m/MundasVanguard.java @@ -63,9 +63,9 @@ public class MundasVanguard extends CardImpl { public MundasVanguard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Knight"); - this.subtype.add("Ally"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.KNIGHT); + this.subtype.add(SubType.ALLY); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/Mundungu.java b/Mage.Sets/src/mage/cards/m/Mundungu.java index dc93a61103..63e2aba640 100644 --- a/Mage.Sets/src/mage/cards/m/Mundungu.java +++ b/Mage.Sets/src/mage/cards/m/Mundungu.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.CounterUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetSpell; @@ -51,8 +52,8 @@ public class Mundungu extends CardImpl { public Mundungu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MunghaWurm.java b/Mage.Sets/src/mage/cards/m/MunghaWurm.java index 002c29c447..0e26793d50 100644 --- a/Mage.Sets/src/mage/cards/m/MunghaWurm.java +++ b/Mage.Sets/src/mage/cards/m/MunghaWurm.java @@ -35,6 +35,7 @@ import mage.abilities.effects.RestrictionUntapNotMoreThanEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -50,7 +51,7 @@ public class MunghaWurm extends CardImpl { public MunghaWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MurasaPyromancer.java b/Mage.Sets/src/mage/cards/m/MurasaPyromancer.java index 020977c63b..d230d127fe 100644 --- a/Mage.Sets/src/mage/cards/m/MurasaPyromancer.java +++ b/Mage.Sets/src/mage/cards/m/MurasaPyromancer.java @@ -58,9 +58,9 @@ public class MurasaPyromancer extends CardImpl { public MurasaPyromancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); + this.subtype.add(SubType.ALLY); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MurasaRanger.java b/Mage.Sets/src/mage/cards/m/MurasaRanger.java index 6bd885ffc5..34dba086ff 100644 --- a/Mage.Sets/src/mage/cards/m/MurasaRanger.java +++ b/Mage.Sets/src/mage/cards/m/MurasaRanger.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -46,8 +47,8 @@ public class MurasaRanger extends CardImpl { public MurasaRanger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MurderInvestigation.java b/Mage.Sets/src/mage/cards/m/MurderInvestigation.java index a324b524aa..969d81fbfb 100644 --- a/Mage.Sets/src/mage/cards/m/MurderInvestigation.java +++ b/Mage.Sets/src/mage/cards/m/MurderInvestigation.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -54,7 +55,7 @@ public class MurderInvestigation extends CardImpl { public MurderInvestigation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature you control TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/m/MurderOfCrows.java b/Mage.Sets/src/mage/cards/m/MurderOfCrows.java index a848efe254..39e69cc9e8 100644 --- a/Mage.Sets/src/mage/cards/m/MurderOfCrows.java +++ b/Mage.Sets/src/mage/cards/m/MurderOfCrows.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -48,7 +49,7 @@ public class MurderOfCrows extends CardImpl { public MurderOfCrows(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MurderersAxe.java b/Mage.Sets/src/mage/cards/m/MurderersAxe.java index 41cc20c7ac..4623adbb6d 100644 --- a/Mage.Sets/src/mage/cards/m/MurderersAxe.java +++ b/Mage.Sets/src/mage/cards/m/MurderersAxe.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class MurderersAxe extends CardImpl { public MurderersAxe(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2))); diff --git a/Mage.Sets/src/mage/cards/m/MurderousRedcap.java b/Mage.Sets/src/mage/cards/m/MurderousRedcap.java index 0f1d1e1e47..0f34f234d8 100644 --- a/Mage.Sets/src/mage/cards/m/MurderousRedcap.java +++ b/Mage.Sets/src/mage/cards/m/MurderousRedcap.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.PersistAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -51,8 +52,8 @@ public class MurderousRedcap extends CardImpl { public MurderousRedcap(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B/R}{B/R}"); - this.subtype.add("Goblin"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MurderousSpoils.java b/Mage.Sets/src/mage/cards/m/MurderousSpoils.java index 327cfe9d6d..42a7abd4d2 100644 --- a/Mage.Sets/src/mage/cards/m/MurderousSpoils.java +++ b/Mage.Sets/src/mage/cards/m/MurderousSpoils.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.filter.common.FilterCreaturePermanent; @@ -97,7 +98,7 @@ class MurderousSpoilsEffect extends OneShotEffect { List attachments = new ArrayList<>(); for (UUID uuid : target.getAttachments()) { Permanent attached = game.getBattlefield().getPermanent(uuid); - if (attached.getSubtype(game).contains("Equipment")) { + if (attached.hasSubtype(SubType.EQUIPMENT, game)) { attachments.add(attached); } } diff --git a/Mage.Sets/src/mage/cards/m/MurkDwellers.java b/Mage.Sets/src/mage/cards/m/MurkDwellers.java index 2db6202073..db8ee6fdae 100644 --- a/Mage.Sets/src/mage/cards/m/MurkDwellers.java +++ b/Mage.Sets/src/mage/cards/m/MurkDwellers.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class MurkDwellers extends CardImpl { public MurkDwellers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MurkStrider.java b/Mage.Sets/src/mage/cards/m/MurkStrider.java index 5539d22a2b..94b539b512 100644 --- a/Mage.Sets/src/mage/cards/m/MurkStrider.java +++ b/Mage.Sets/src/mage/cards/m/MurkStrider.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -48,8 +49,8 @@ public class MurkStrider extends CardImpl { public MurkStrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Processor"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.PROCESSOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MurkfiendLiege.java b/Mage.Sets/src/mage/cards/m/MurkfiendLiege.java index 3b77901339..3d38b2c6d8 100644 --- a/Mage.Sets/src/mage/cards/m/MurkfiendLiege.java +++ b/Mage.Sets/src/mage/cards/m/MurkfiendLiege.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.UntapAllDuringEachOtherPlayersUn import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -59,7 +60,7 @@ public class MurkfiendLiege extends CardImpl { public MurkfiendLiege(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G/U}{G/U}{G/U}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MurmuringBosk.java b/Mage.Sets/src/mage/cards/m/MurmuringBosk.java index c8b8f5cd5a..7747dc04cc 100644 --- a/Mage.Sets/src/mage/cards/m/MurmuringBosk.java +++ b/Mage.Sets/src/mage/cards/m/MurmuringBosk.java @@ -58,7 +58,7 @@ public class MurmuringBosk extends CardImpl { public MurmuringBosk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Forest"); + this.subtype.add(SubType.FOREST); // ({tap}: Add {G} to your mana pool.) this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/cards/m/MurmuringPhantasm.java b/Mage.Sets/src/mage/cards/m/MurmuringPhantasm.java index f0ff3f848d..e92ba98abe 100644 --- a/Mage.Sets/src/mage/cards/m/MurmuringPhantasm.java +++ b/Mage.Sets/src/mage/cards/m/MurmuringPhantasm.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class MurmuringPhantasm extends CardImpl { public MurmuringPhantasm (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MuscleSliver.java b/Mage.Sets/src/mage/cards/m/MuscleSliver.java index 9ee61caa77..b7997a190e 100644 --- a/Mage.Sets/src/mage/cards/m/MuscleSliver.java +++ b/Mage.Sets/src/mage/cards/m/MuscleSliver.java @@ -53,7 +53,7 @@ public class MuscleSliver extends CardImpl { public MuscleSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MuzzioVisionaryArchitect.java b/Mage.Sets/src/mage/cards/m/MuzzioVisionaryArchitect.java index ddcde94550..14539941a3 100644 --- a/Mage.Sets/src/mage/cards/m/MuzzioVisionaryArchitect.java +++ b/Mage.Sets/src/mage/cards/m/MuzzioVisionaryArchitect.java @@ -37,6 +37,7 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -56,8 +57,8 @@ public class MuzzioVisionaryArchitect extends CardImpl { public MuzzioVisionaryArchitect(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/Muzzle.java b/Mage.Sets/src/mage/cards/m/Muzzle.java index b7416e345c..cecffa696a 100644 --- a/Mage.Sets/src/mage/cards/m/Muzzle.java +++ b/Mage.Sets/src/mage/cards/m/Muzzle.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class Muzzle extends CardImpl { public Muzzle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/m/MwonvuliAcidMoss.java b/Mage.Sets/src/mage/cards/m/MwonvuliAcidMoss.java index 0b59350e95..e4d18bdc96 100644 --- a/Mage.Sets/src/mage/cards/m/MwonvuliAcidMoss.java +++ b/Mage.Sets/src/mage/cards/m/MwonvuliAcidMoss.java @@ -46,14 +46,17 @@ import mage.target.common.TargetCardInLibrary; */ public class MwonvuliAcidMoss extends CardImpl { - public MwonvuliAcidMoss(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}{G}"); - - FilterLandCard filterForest = new FilterLandCard(); + private static final FilterLandCard filterForest = new FilterLandCard("Forest card"); + + static { filterForest.add(new SubtypePredicate(SubType.FOREST)); - + } + + public MwonvuliAcidMoss(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}{G}"); + // Destroy target land. Search your library for a Forest card and put that card onto the battlefield tapped. Then shuffle your library. - this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); + this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addTarget(new TargetPermanent(new FilterLandPermanent())); this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filterForest), true, true)); } @@ -67,4 +70,3 @@ public class MwonvuliAcidMoss extends CardImpl { return new MwonvuliAcidMoss(this); } } - diff --git a/Mage.Sets/src/mage/cards/m/MwonvuliBeastTracker.java b/Mage.Sets/src/mage/cards/m/MwonvuliBeastTracker.java index e741baa592..c897bc2b2e 100644 --- a/Mage.Sets/src/mage/cards/m/MwonvuliBeastTracker.java +++ b/Mage.Sets/src/mage/cards/m/MwonvuliBeastTracker.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -63,8 +64,8 @@ public class MwonvuliBeastTracker extends CardImpl { public MwonvuliBeastTracker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MwonvuliOoze.java b/Mage.Sets/src/mage/cards/m/MwonvuliOoze.java index 5f27230e21..36bc715111 100644 --- a/Mage.Sets/src/mage/cards/m/MwonvuliOoze.java +++ b/Mage.Sets/src/mage/cards/m/MwonvuliOoze.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.CumulativeUpkeepAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -52,7 +53,7 @@ public class MwonvuliOoze extends CardImpl { public MwonvuliOoze(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Ooze"); + this.subtype.add(SubType.OOZE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MycoidShepherd.java b/Mage.Sets/src/mage/cards/m/MycoidShepherd.java index 2c234c6262..51058d5860 100644 --- a/Mage.Sets/src/mage/cards/m/MycoidShepherd.java +++ b/Mage.Sets/src/mage/cards/m/MycoidShepherd.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -50,7 +51,7 @@ public class MycoidShepherd extends CardImpl { public MycoidShepherd(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}{W}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); diff --git a/Mage.Sets/src/mage/cards/m/Mycologist.java b/Mage.Sets/src/mage/cards/m/Mycologist.java index 703cec8073..4eb63fd55b 100644 --- a/Mage.Sets/src/mage/cards/m/Mycologist.java +++ b/Mage.Sets/src/mage/cards/m/Mycologist.java @@ -62,8 +62,8 @@ public class Mycologist extends CardImpl { public Mycologist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/Mycoloth.java b/Mage.Sets/src/mage/cards/m/Mycoloth.java index e1a7dd92d0..1c5ffa2423 100644 --- a/Mage.Sets/src/mage/cards/m/Mycoloth.java +++ b/Mage.Sets/src/mage/cards/m/Mycoloth.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DevourAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.counters.CounterType; import mage.game.permanent.token.SaprolingToken; @@ -49,7 +50,7 @@ public class Mycoloth extends CardImpl { public Mycoloth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MycosynthFiend.java b/Mage.Sets/src/mage/cards/m/MycosynthFiend.java index 7f9b6deee1..5ea9bf19e2 100644 --- a/Mage.Sets/src/mage/cards/m/MycosynthFiend.java +++ b/Mage.Sets/src/mage/cards/m/MycosynthFiend.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class MycosynthFiend extends CardImpl { public MycosynthFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MycosynthGolem.java b/Mage.Sets/src/mage/cards/m/MycosynthGolem.java index df42c690fc..3b7744b582 100644 --- a/Mage.Sets/src/mage/cards/m/MycosynthGolem.java +++ b/Mage.Sets/src/mage/cards/m/MycosynthGolem.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.AffinityForArtifactsAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -54,7 +55,7 @@ public class MycosynthGolem extends CardImpl { public MycosynthGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{11}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/m/MycosynthLattice.java b/Mage.Sets/src/mage/cards/m/MycosynthLattice.java index fcbf92b2a9..c8470e1bbc 100644 --- a/Mage.Sets/src/mage/cards/m/MycosynthLattice.java +++ b/Mage.Sets/src/mage/cards/m/MycosynthLattice.java @@ -52,7 +52,7 @@ import mage.players.Player; public class MycosynthLattice extends CardImpl { public MycosynthLattice(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{6}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); // All permanents are artifacts in addition to their other types. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PermanentsAreArtifactsEffect())); @@ -121,7 +121,7 @@ class EverythingIsColorlessEffect extends ContinuousEffectImpl { } // exile for (Card card : game.getExile().getAllCards(game)) { - game.getState().getCreateCardAttribute(card).getColor().setColor(colorless); + game.getState().getCreateCardAttribute(card, game).getColor().setColor(colorless); } // command for (CommandObject commandObject : game.getState().getCommand()) { @@ -132,15 +132,15 @@ class EverythingIsColorlessEffect extends ContinuousEffectImpl { if (player != null) { // hand for (Card card : player.getHand().getCards(game)) { - game.getState().getCreateCardAttribute(card).getColor().setColor(colorless); + game.getState().getCreateCardAttribute(card, game).getColor().setColor(colorless); } // library for (Card card : player.getLibrary().getCards(game)) { - game.getState().getCreateCardAttribute(card).getColor().setColor(colorless); + game.getState().getCreateCardAttribute(card, game).getColor().setColor(colorless); } // graveyard for (Card card : player.getGraveyard().getCards(game)) { - game.getState().getCreateCardAttribute(card).getColor().setColor(colorless); + game.getState().getCreateCardAttribute(card, game).getColor().setColor(colorless); } } } diff --git a/Mage.Sets/src/mage/cards/m/MyojinOfCleansingFire.java b/Mage.Sets/src/mage/cards/m/MyojinOfCleansingFire.java index c86e28bd00..67d85427cd 100644 --- a/Mage.Sets/src/mage/cards/m/MyojinOfCleansingFire.java +++ b/Mage.Sets/src/mage/cards/m/MyojinOfCleansingFire.java @@ -44,6 +44,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -65,7 +66,7 @@ public class MyojinOfCleansingFire extends CardImpl { public MyojinOfCleansingFire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/m/MyojinOfInfiniteRage.java b/Mage.Sets/src/mage/cards/m/MyojinOfInfiniteRage.java index a831178557..8d7379169f 100644 --- a/Mage.Sets/src/mage/cards/m/MyojinOfInfiniteRage.java +++ b/Mage.Sets/src/mage/cards/m/MyojinOfInfiniteRage.java @@ -44,6 +44,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class MyojinOfInfiniteRage extends CardImpl { public MyojinOfInfiniteRage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{7}{R}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(7); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MyojinOfLifesWeb.java b/Mage.Sets/src/mage/cards/m/MyojinOfLifesWeb.java index 13c18a8a85..f804c30172 100644 --- a/Mage.Sets/src/mage/cards/m/MyojinOfLifesWeb.java +++ b/Mage.Sets/src/mage/cards/m/MyojinOfLifesWeb.java @@ -61,7 +61,7 @@ public class MyojinOfLifesWeb extends CardImpl { public MyojinOfLifesWeb(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/m/MyojinOfNightsReach.java b/Mage.Sets/src/mage/cards/m/MyojinOfNightsReach.java index 1bca7fcc2b..3be621c2b6 100644 --- a/Mage.Sets/src/mage/cards/m/MyojinOfNightsReach.java +++ b/Mage.Sets/src/mage/cards/m/MyojinOfNightsReach.java @@ -59,7 +59,7 @@ public class MyojinOfNightsReach extends CardImpl { public MyojinOfNightsReach(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MyojinOfSeeingWinds.java b/Mage.Sets/src/mage/cards/m/MyojinOfSeeingWinds.java index f0d22b3ae5..2f33f93c20 100644 --- a/Mage.Sets/src/mage/cards/m/MyojinOfSeeingWinds.java +++ b/Mage.Sets/src/mage/cards/m/MyojinOfSeeingWinds.java @@ -64,7 +64,7 @@ public class MyojinOfSeeingWinds extends CardImpl { public MyojinOfSeeingWinds(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{7}{U}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MyrAdapter.java b/Mage.Sets/src/mage/cards/m/MyrAdapter.java index 1e361a71bf..3ae3e6d434 100644 --- a/Mage.Sets/src/mage/cards/m/MyrAdapter.java +++ b/Mage.Sets/src/mage/cards/m/MyrAdapter.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class MyrAdapter extends CardImpl { public MyrAdapter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MyrBattlesphere.java b/Mage.Sets/src/mage/cards/m/MyrBattlesphere.java index 24f4b55779..923d1f6a54 100644 --- a/Mage.Sets/src/mage/cards/m/MyrBattlesphere.java +++ b/Mage.Sets/src/mage/cards/m/MyrBattlesphere.java @@ -62,8 +62,8 @@ public class MyrBattlesphere extends CardImpl { public MyrBattlesphere(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); - this.subtype.add("Myr"); - this.subtype.add("Construct"); + this.subtype.add(SubType.MYR); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(4); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/m/MyrEnforcer.java b/Mage.Sets/src/mage/cards/m/MyrEnforcer.java index 553018d719..9d1cd494ce 100644 --- a/Mage.Sets/src/mage/cards/m/MyrEnforcer.java +++ b/Mage.Sets/src/mage/cards/m/MyrEnforcer.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.AffinityForArtifactsAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class MyrEnforcer extends CardImpl { public MyrEnforcer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MyrGalvanizer.java b/Mage.Sets/src/mage/cards/m/MyrGalvanizer.java index 81b1bc0a7e..9253ff1dd3 100644 --- a/Mage.Sets/src/mage/cards/m/MyrGalvanizer.java +++ b/Mage.Sets/src/mage/cards/m/MyrGalvanizer.java @@ -58,7 +58,7 @@ public class MyrGalvanizer extends CardImpl { public MyrGalvanizer (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(2); this.toughness = new MageInt(2); // Other Myr creatures you control get +1/+1. diff --git a/Mage.Sets/src/mage/cards/m/MyrIncubator.java b/Mage.Sets/src/mage/cards/m/MyrIncubator.java index 8c78679d15..498af27e1a 100644 --- a/Mage.Sets/src/mage/cards/m/MyrIncubator.java +++ b/Mage.Sets/src/mage/cards/m/MyrIncubator.java @@ -1,118 +1,118 @@ -/* - * 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.cards.m; - -import java.util.UUID; -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.SearchEffect; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.CardsImpl; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.FilterCard; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.game.Game; -import mage.game.permanent.token.MyrToken; -import mage.players.Player; -import mage.target.common.TargetCardInLibrary; - -/** - * - * @author jeffwadsworth - */ -public class MyrIncubator extends CardImpl { - - public MyrIncubator(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); - - // {6}, {tap}, Sacrifice Myr Incubator: Search your library for any number of artifact cards, exile them, then put that many 1/1 colorless Myr artifact creature tokens onto the battlefield. Then shuffle your library. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MyrIncubatorEffect(), new ManaCostsImpl("{6}")); - ability.addCost(new TapSourceCost()); - ability.addCost(new SacrificeSourceCost()); - this.addAbility(ability); - - } - - public MyrIncubator(final MyrIncubator card) { - super(card); - } - - @Override - public MyrIncubator copy() { - return new MyrIncubator(this); - } -} - -class MyrIncubatorEffect extends SearchEffect { - - private static final FilterCard filter = new FilterCard(); - - static { - filter.add(new CardTypePredicate(CardType.ARTIFACT)); - } - - int tokensToCreate = 0; - - MyrIncubatorEffect() { - super(new TargetCardInLibrary(0, Integer.MAX_VALUE, filter), Outcome.Neutral); - staticText = "Search your library for any number of artifact cards, exile them, then put that many 1/1 colorless Myr artifact creature tokens onto the battlefield. Then shuffle your library"; - } - - MyrIncubatorEffect(final MyrIncubatorEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null - && controller.searchLibrary(target, game)) { - if (!target.getTargets().isEmpty()) { - tokensToCreate = target.getTargets().size(); - controller.moveCards(new CardsImpl(target.getTargets()), Zone.EXILED, source, game); - } - CreateTokenEffect effect = new CreateTokenEffect(new MyrToken(), tokensToCreate); - effect.apply(game, source); - controller.shuffleLibrary(source, game); - return true; - } - return false; - } - - @Override - public MyrIncubatorEffect copy() { - return new MyrIncubatorEffect(this); - } -} +/* + * 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.cards.m; + +import java.util.UUID; +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.SearchEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.permanent.token.MyrToken; +import mage.players.Player; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author jeffwadsworth + */ +public class MyrIncubator extends CardImpl { + + public MyrIncubator(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); + + // {6}, {tap}, Sacrifice Myr Incubator: Search your library for any number of artifact cards, exile them, then put that many 1/1 colorless Myr artifact creature tokens onto the battlefield. Then shuffle your library. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MyrIncubatorEffect(), new ManaCostsImpl("{6}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + + } + + public MyrIncubator(final MyrIncubator card) { + super(card); + } + + @Override + public MyrIncubator copy() { + return new MyrIncubator(this); + } +} + +class MyrIncubatorEffect extends SearchEffect { + + private static final FilterCard filter = new FilterCard(); + + static { + filter.add(new CardTypePredicate(CardType.ARTIFACT)); + } + + int tokensToCreate = 0; + + MyrIncubatorEffect() { + super(new TargetCardInLibrary(0, Integer.MAX_VALUE, filter), Outcome.Neutral); + staticText = "Search your library for any number of artifact cards, exile them, then put that many 1/1 colorless Myr artifact creature tokens onto the battlefield. Then shuffle your library"; + } + + MyrIncubatorEffect(final MyrIncubatorEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null + && controller.searchLibrary(target, game)) { + if (!target.getTargets().isEmpty()) { + tokensToCreate = target.getTargets().size(); + controller.moveCards(new CardsImpl(target.getTargets()), Zone.EXILED, source, game); + } + CreateTokenEffect effect = new CreateTokenEffect(new MyrToken(), tokensToCreate); + effect.apply(game, source); + controller.shuffleLibrary(source, game); + return true; + } + return false; + } + + @Override + public MyrIncubatorEffect copy() { + return new MyrIncubatorEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MyrLandshaper.java b/Mage.Sets/src/mage/cards/m/MyrLandshaper.java index 13ea591a96..ce9b56dad4 100644 --- a/Mage.Sets/src/mage/cards/m/MyrLandshaper.java +++ b/Mage.Sets/src/mage/cards/m/MyrLandshaper.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.AddCardTypeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.Target; @@ -49,7 +50,7 @@ public class MyrLandshaper extends CardImpl { public MyrLandshaper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MyrMindservant.java b/Mage.Sets/src/mage/cards/m/MyrMindservant.java index 4b105b347f..a188d848f5 100644 --- a/Mage.Sets/src/mage/cards/m/MyrMindservant.java +++ b/Mage.Sets/src/mage/cards/m/MyrMindservant.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ShuffleLibrarySourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class MyrMindservant extends CardImpl { public MyrMindservant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MyrMoonvessel.java b/Mage.Sets/src/mage/cards/m/MyrMoonvessel.java index 8f6fc8faae..e062059faf 100644 --- a/Mage.Sets/src/mage/cards/m/MyrMoonvessel.java +++ b/Mage.Sets/src/mage/cards/m/MyrMoonvessel.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.BasicManaEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -43,7 +44,7 @@ public class MyrMoonvessel extends CardImpl { public MyrMoonvessel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(1); this.addAbility(new DiesTriggeredAbility(new BasicManaEffect(Mana.ColorlessMana(1)))); diff --git a/Mage.Sets/src/mage/cards/m/MyrPropagator.java b/Mage.Sets/src/mage/cards/m/MyrPropagator.java index 6a7e2a6ef2..d7304695f0 100644 --- a/Mage.Sets/src/mage/cards/m/MyrPropagator.java +++ b/Mage.Sets/src/mage/cards/m/MyrPropagator.java @@ -33,10 +33,11 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.PutTokenOntoBattlefieldCopySourceEffect; +import mage.abilities.effects.CreateTokenCopySourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,13 +48,13 @@ public class MyrPropagator extends CardImpl { public MyrPropagator(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(1); // {3}, {tap}: Create a token that's a copy of Myr Propagator. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutTokenOntoBattlefieldCopySourceEffect(), new GenericManaCost(3)); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenCopySourceEffect(), new GenericManaCost(3)); ability.addCost(new TapSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MyrQuadropod.java b/Mage.Sets/src/mage/cards/m/MyrQuadropod.java index ed01899b60..763e9db1b9 100644 --- a/Mage.Sets/src/mage/cards/m/MyrQuadropod.java +++ b/Mage.Sets/src/mage/cards/m/MyrQuadropod.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.SwitchPowerToughnessSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class MyrQuadropod extends CardImpl { public MyrQuadropod(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MyrRetriever.java b/Mage.Sets/src/mage/cards/m/MyrRetriever.java index 3aa2cf1cd4..22a5ec47fc 100644 --- a/Mage.Sets/src/mage/cards/m/MyrRetriever.java +++ b/Mage.Sets/src/mage/cards/m/MyrRetriever.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterArtifactCard; import mage.filter.predicate.mageobject.AnotherCardPredicate; import mage.target.common.TargetCardInYourGraveyard; @@ -53,7 +54,7 @@ public class MyrRetriever extends CardImpl { public MyrRetriever(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MyrServitor.java b/Mage.Sets/src/mage/cards/m/MyrServitor.java index b3398c2c7b..a545f363d5 100644 --- a/Mage.Sets/src/mage/cards/m/MyrServitor.java +++ b/Mage.Sets/src/mage/cards/m/MyrServitor.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class MyrServitor extends CardImpl { public MyrServitor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MyrSire.java b/Mage.Sets/src/mage/cards/m/MyrSire.java index 38443525ed..96a30bb4f1 100644 --- a/Mage.Sets/src/mage/cards/m/MyrSire.java +++ b/Mage.Sets/src/mage/cards/m/MyrSire.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.MyrToken; /** @@ -45,7 +46,7 @@ public class MyrSire extends CardImpl { public MyrSire (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(1); this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new MyrToken()))); diff --git a/Mage.Sets/src/mage/cards/m/MyrSuperion.java b/Mage.Sets/src/mage/cards/m/MyrSuperion.java index 4848b50dbc..1db9539243 100644 --- a/Mage.Sets/src/mage/cards/m/MyrSuperion.java +++ b/Mage.Sets/src/mage/cards/m/MyrSuperion.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.InfoEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -46,7 +47,7 @@ public class MyrSuperion extends CardImpl { public MyrSuperion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/m/MyrWelder.java b/Mage.Sets/src/mage/cards/m/MyrWelder.java index 741aadc27f..d2eef6d2ed 100644 --- a/Mage.Sets/src/mage/cards/m/MyrWelder.java +++ b/Mage.Sets/src/mage/cards/m/MyrWelder.java @@ -41,6 +41,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -59,7 +60,7 @@ public class MyrWelder extends CardImpl { public MyrWelder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MyriadLandscape.java b/Mage.Sets/src/mage/cards/m/MyriadLandscape.java index 84f26a0a74..3a2c36827d 100644 --- a/Mage.Sets/src/mage/cards/m/MyriadLandscape.java +++ b/Mage.Sets/src/mage/cards/m/MyriadLandscape.java @@ -110,7 +110,7 @@ class TargetCardInLibrarySharingLandType extends TargetCardInLibrary { if (landTypes.isEmpty()) { landTypes.addAll(landCard.getSubtype(game)); } else { - landTypes.removeIf(next -> !landCard.getSubtype(game).contains(next)); + landTypes.removeIf(next -> !landCard.hasSubtype(next, game)); } } } @@ -118,7 +118,7 @@ class TargetCardInLibrarySharingLandType extends TargetCardInLibrary { if (card != null && !landTypes.isEmpty()) { for (Iterator iterator = landTypes.iterator(); iterator.hasNext();) { SubType next = iterator.next(); - if (card.getSubtype(game).contains(next)) { + if (card.hasSubtype(next, game)) { return true; } } diff --git a/Mage.Sets/src/mage/cards/m/Myrsmith.java b/Mage.Sets/src/mage/cards/m/Myrsmith.java index a1532ab07a..e0c709f1f8 100644 --- a/Mage.Sets/src/mage/cards/m/Myrsmith.java +++ b/Mage.Sets/src/mage/cards/m/Myrsmith.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterArtifactSpell; import mage.game.Game; import mage.game.permanent.token.MyrToken; @@ -49,8 +50,8 @@ public class Myrsmith extends CardImpl { public Myrsmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MysticCrusader.java b/Mage.Sets/src/mage/cards/m/MysticCrusader.java index 8ed576e615..0ca52c27af 100644 --- a/Mage.Sets/src/mage/cards/m/MysticCrusader.java +++ b/Mage.Sets/src/mage/cards/m/MysticCrusader.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -53,9 +54,9 @@ public class MysticCrusader extends CardImpl { public MysticCrusader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); - this.subtype.add("Mystic"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); + this.subtype.add(SubType.MYSTIC); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MysticEnforcer.java b/Mage.Sets/src/mage/cards/m/MysticEnforcer.java index 9ad26da1ea..e4892dfaba 100644 --- a/Mage.Sets/src/mage/cards/m/MysticEnforcer.java +++ b/Mage.Sets/src/mage/cards/m/MysticEnforcer.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -53,9 +54,9 @@ public class MysticEnforcer extends CardImpl { public MysticEnforcer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{W}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); - this.subtype.add("Mystic"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); + this.subtype.add(SubType.MYSTIC); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/m/MysticFamiliar.java b/Mage.Sets/src/mage/cards/m/MysticFamiliar.java index bddd96c2f1..0ede4249fb 100644 --- a/Mage.Sets/src/mage/cards/m/MysticFamiliar.java +++ b/Mage.Sets/src/mage/cards/m/MysticFamiliar.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class MysticFamiliar extends CardImpl { public MysticFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MysticMight.java b/Mage.Sets/src/mage/cards/m/MysticMight.java index bbaed1a2d2..de75a16bc7 100644 --- a/Mage.Sets/src/mage/cards/m/MysticMight.java +++ b/Mage.Sets/src/mage/cards/m/MysticMight.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class MysticMight extends CardImpl { public MysticMight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land you control TargetPermanent auraTarget = new TargetPermanent(new FilterControlledLandPermanent()); diff --git a/Mage.Sets/src/mage/cards/m/MysticOfTheHiddenWay.java b/Mage.Sets/src/mage/cards/m/MysticOfTheHiddenWay.java index 7cfec3ee5c..d2c858757c 100644 --- a/Mage.Sets/src/mage/cards/m/MysticOfTheHiddenWay.java +++ b/Mage.Sets/src/mage/cards/m/MysticOfTheHiddenWay.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class MysticOfTheHiddenWay extends CardImpl { public MysticOfTheHiddenWay(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MysticPenitent.java b/Mage.Sets/src/mage/cards/m/MysticPenitent.java index 21963bf103..46303145ec 100644 --- a/Mage.Sets/src/mage/cards/m/MysticPenitent.java +++ b/Mage.Sets/src/mage/cards/m/MysticPenitent.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -52,9 +53,9 @@ public class MysticPenitent extends CardImpl { public MysticPenitent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); - this.subtype.add("Mystic"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); + this.subtype.add(SubType.MYSTIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MysticRestraints.java b/Mage.Sets/src/mage/cards/m/MysticRestraints.java index f5f32c9566..346910c92b 100644 --- a/Mage.Sets/src/mage/cards/m/MysticRestraints.java +++ b/Mage.Sets/src/mage/cards/m/MysticRestraints.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -50,7 +51,7 @@ public class MysticRestraints extends CardImpl { public MysticRestraints(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash diff --git a/Mage.Sets/src/mage/cards/m/MysticSnake.java b/Mage.Sets/src/mage/cards/m/MysticSnake.java index 3008e16182..8b4af7c6b4 100644 --- a/Mage.Sets/src/mage/cards/m/MysticSnake.java +++ b/Mage.Sets/src/mage/cards/m/MysticSnake.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetSpell; /** @@ -45,7 +46,7 @@ public class MysticSnake extends CardImpl { public MysticSnake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{U}{U}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/MysticVeil.java b/Mage.Sets/src/mage/cards/m/MysticVeil.java index a826a3654e..c57e7841ea 100644 --- a/Mage.Sets/src/mage/cards/m/MysticVeil.java +++ b/Mage.Sets/src/mage/cards/m/MysticVeil.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class MysticVeil extends CardImpl { public MysticVeil(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // You may cast Mystic Veil as though it had flash. If you cast it any time a sorcery couldn't have been cast, the controller of the permanent it becomes sacrifices it at the beginning of the next cleanup step. this.addAbility(new SimpleStaticAbility(Zone.ALL, new CastAsThoughItHadFlashSourceEffect(Duration.EndOfGame))); diff --git a/Mage.Sets/src/mage/cards/m/MysticVisionary.java b/Mage.Sets/src/mage/cards/m/MysticVisionary.java index 87e1722e69..2f3e1e6807 100644 --- a/Mage.Sets/src/mage/cards/m/MysticVisionary.java +++ b/Mage.Sets/src/mage/cards/m/MysticVisionary.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -49,9 +50,9 @@ public class MysticVisionary extends CardImpl { public MysticVisionary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); - this.subtype.add("Mystic"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); + this.subtype.add(SubType.MYSTIC); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/m/MysticZealot.java b/Mage.Sets/src/mage/cards/m/MysticZealot.java index 5f46b6128e..0b35f6330f 100644 --- a/Mage.Sets/src/mage/cards/m/MysticZealot.java +++ b/Mage.Sets/src/mage/cards/m/MysticZealot.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,9 +52,9 @@ public class MysticZealot extends CardImpl { public MysticZealot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); - this.subtype.add("Mystic"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); + this.subtype.add(SubType.MYSTIC); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MythRealized.java b/Mage.Sets/src/mage/cards/m/MythRealized.java index 88994d2146..f55bf8835c 100644 --- a/Mage.Sets/src/mage/cards/m/MythRealized.java +++ b/Mage.Sets/src/mage/cards/m/MythRealized.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -100,8 +101,8 @@ class MythRealizedToken extends Token { public MythRealizedToken() { super("", "Monk Avatar creature in addition to its other types and gains \"This creature's power and toughness are each equal to the number of lore counters on it.\""); cardType.add(CardType.CREATURE); - subtype.add("Monk"); - subtype.add("Avatar"); + subtype.add(SubType.MONK); + subtype.add(SubType.AVATAR); power = new MageInt(0); toughness = new MageInt(0); } diff --git a/Mage.Sets/src/mage/cards/m/MythicProportions.java b/Mage.Sets/src/mage/cards/m/MythicProportions.java index de4731a49a..51682a4c5f 100644 --- a/Mage.Sets/src/mage/cards/m/MythicProportions.java +++ b/Mage.Sets/src/mage/cards/m/MythicProportions.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -53,7 +54,7 @@ public class MythicProportions extends CardImpl { public MythicProportions(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{G}{G}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/n/N1Starfighter.java b/Mage.Sets/src/mage/cards/n/N1Starfighter.java index de1cdd752d..f3995d2b98 100644 --- a/Mage.Sets/src/mage/cards/n/N1Starfighter.java +++ b/Mage.Sets/src/mage/cards/n/N1Starfighter.java @@ -1,85 +1,86 @@ -/* - * 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.cards.n; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.DoIfCostPaid; -import mage.abilities.effects.common.ExileTargetForSourceEffect; -import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetEffect; -import mage.abilities.keyword.SpaceflightAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.predicate.permanent.AnotherPredicate; -import mage.target.common.TargetControlledCreaturePermanent; - -/** - * - * @author Styxo - */ -public class N1Starfighter extends CardImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature you control"); - - static { - filter.add(new AnotherPredicate()); - } - - public N1Starfighter(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{W/U}{W/U}"); - this.subtype.add("Starship"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // Spaceflight - this.addAbility(SpaceflightAbility.getInstance()); - - // Whenever N-1 Starfighter deals combat damage to a player, you may pay {1}{W/U}. If you do, exile another creature you control, then return that card to the battlefield under its owner's control. - Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new DoIfCostPaid(new ExileTargetForSourceEffect(), new ManaCostsImpl("{1}{W/U}")), false); - Effect effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect(false, true); - effect.setText(", then return the card to the battlefield under their owner's control"); - ability.addEffect(effect); - ability.addTarget(new TargetControlledCreaturePermanent(filter)); - this.addAbility(ability); - } - - public N1Starfighter(final N1Starfighter card) { - super(card); - } - - @Override - public N1Starfighter copy() { - return new N1Starfighter(this); - } -} +/* + * 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.cards.n; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.ExileTargetForSourceEffect; +import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author Styxo + */ +public class N1Starfighter extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature you control"); + + static { + filter.add(new AnotherPredicate()); + } + + public N1Starfighter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{W/U}{W/U}"); + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + + // Whenever N-1 Starfighter deals combat damage to a player, you may pay {1}{W/U}. If you do, exile another creature you control, then return that card to the battlefield under its owner's control. + Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new DoIfCostPaid(new ExileTargetForSourceEffect(), new ManaCostsImpl("{1}{W/U}")), false); + Effect effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect(false, true); + effect.setText(", then return the card to the battlefield under their owner's control"); + ability.addEffect(effect); + ability.addTarget(new TargetControlledCreaturePermanent(filter)); + this.addAbility(ability); + } + + public N1Starfighter(final N1Starfighter card) { + super(card); + } + + @Override + public N1Starfighter copy() { + return new N1Starfighter(this); + } +} diff --git a/Mage.Sets/src/mage/cards/n/NacatlHuntPride.java b/Mage.Sets/src/mage/cards/n/NacatlHuntPride.java index 53d1374433..18983619a9 100644 --- a/Mage.Sets/src/mage/cards/n/NacatlHuntPride.java +++ b/Mage.Sets/src/mage/cards/n/NacatlHuntPride.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -51,8 +52,8 @@ public class NacatlHuntPride extends CardImpl { public NacatlHuntPride(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NacatlOutlander.java b/Mage.Sets/src/mage/cards/n/NacatlOutlander.java index 7c768fe5e9..851b0dc682 100644 --- a/Mage.Sets/src/mage/cards/n/NacatlOutlander.java +++ b/Mage.Sets/src/mage/cards/n/NacatlOutlander.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class NacatlOutlander extends CardImpl { public NacatlOutlander(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}"); - this.subtype.add("Cat"); - this.subtype.add("Scout"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NacatlSavage.java b/Mage.Sets/src/mage/cards/n/NacatlSavage.java index ebbf48b319..ad63629168 100644 --- a/Mage.Sets/src/mage/cards/n/NacatlSavage.java +++ b/Mage.Sets/src/mage/cards/n/NacatlSavage.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterArtifactCard; /** @@ -43,8 +44,8 @@ public class NacatlSavage extends CardImpl { public NacatlSavage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Cat"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NacatlWarPride.java b/Mage.Sets/src/mage/cards/n/NacatlWarPride.java index 5a00fb3ce2..a96bafb259 100644 --- a/Mage.Sets/src/mage/cards/n/NacatlWarPride.java +++ b/Mage.Sets/src/mage/cards/n/NacatlWarPride.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.combat.MustBeBlockedByAtLeastOneSourceEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class NacatlWarPride extends CardImpl { public NacatlWarPride(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}{G}"); - this.subtype.add("Cat"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NafsAsp.java b/Mage.Sets/src/mage/cards/n/NafsAsp.java index b5ffc3681d..57b779039e 100644 --- a/Mage.Sets/src/mage/cards/n/NafsAsp.java +++ b/Mage.Sets/src/mage/cards/n/NafsAsp.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.UnlessPaysDelayedEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.PhaseStep; /** @@ -46,7 +47,7 @@ public class NafsAsp extends CardImpl { public NafsAsp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NagaOracle.java b/Mage.Sets/src/mage/cards/n/NagaOracle.java index ad03cf6e25..9663c39383 100644 --- a/Mage.Sets/src/mage/cards/n/NagaOracle.java +++ b/Mage.Sets/src/mage/cards/n/NagaOracle.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; @@ -48,8 +49,8 @@ public class NagaOracle extends CardImpl { public NagaOracle(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); - this.subtype.add("Naga"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NagaVitalist.java b/Mage.Sets/src/mage/cards/n/NagaVitalist.java index d52127c688..db87d3bdea 100644 --- a/Mage.Sets/src/mage/cards/n/NagaVitalist.java +++ b/Mage.Sets/src/mage/cards/n/NagaVitalist.java @@ -33,6 +33,7 @@ import mage.abilities.mana.AnyColorLandsProduceManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -44,8 +45,8 @@ public class NagaVitalist extends CardImpl { public NagaVitalist(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Naga"); - this.subtype.add("Druid"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NagaoBoundByHonor.java b/Mage.Sets/src/mage/cards/n/NagaoBoundByHonor.java index aed0463034..6737dedffa 100644 --- a/Mage.Sets/src/mage/cards/n/NagaoBoundByHonor.java +++ b/Mage.Sets/src/mage/cards/n/NagaoBoundByHonor.java @@ -56,8 +56,8 @@ public class NagaoBoundByHonor extends CardImpl { public NagaoBoundByHonor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NahiriTheHarbinger.java b/Mage.Sets/src/mage/cards/n/NahiriTheHarbinger.java index eceaa83a81..1749c787bb 100644 --- a/Mage.Sets/src/mage/cards/n/NahiriTheHarbinger.java +++ b/Mage.Sets/src/mage/cards/n/NahiriTheHarbinger.java @@ -47,6 +47,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SuperType; @@ -82,7 +83,7 @@ public class NahiriTheHarbinger extends CardImpl { public NahiriTheHarbinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{2}{R}{W}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Nahiri"); + this.subtype.add(SubType.NAHIRI); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/n/NahiriTheLithomancer.java b/Mage.Sets/src/mage/cards/n/NahiriTheLithomancer.java index ecfd83ee42..a8e82d707f 100644 --- a/Mage.Sets/src/mage/cards/n/NahiriTheLithomancer.java +++ b/Mage.Sets/src/mage/cards/n/NahiriTheLithomancer.java @@ -66,7 +66,7 @@ public class NahiriTheLithomancer extends CardImpl { public NahiriTheLithomancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{W}{W}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Nahiri"); + this.subtype.add(SubType.NAHIRI); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/n/NakayaShade.java b/Mage.Sets/src/mage/cards/n/NakayaShade.java index 99c22d0e3f..290bbb8540 100644 --- a/Mage.Sets/src/mage/cards/n/NakayaShade.java +++ b/Mage.Sets/src/mage/cards/n/NakayaShade.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class NakayaShade extends CardImpl { public NakayaShade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Shade"); + this.subtype.add(SubType.SHADE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NamelessInversion.java b/Mage.Sets/src/mage/cards/n/NamelessInversion.java index 43d92c35c0..f5bff8b9e2 100644 --- a/Mage.Sets/src/mage/cards/n/NamelessInversion.java +++ b/Mage.Sets/src/mage/cards/n/NamelessInversion.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ChangelingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -46,7 +47,7 @@ public class NamelessInversion extends CardImpl { public NamelessInversion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{1}{B}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); // Changeling diff --git a/Mage.Sets/src/mage/cards/n/NamelessOne.java b/Mage.Sets/src/mage/cards/n/NamelessOne.java index 7c1d94adbf..6f6dd0c543 100644 --- a/Mage.Sets/src/mage/cards/n/NamelessOne.java +++ b/Mage.Sets/src/mage/cards/n/NamelessOne.java @@ -57,8 +57,8 @@ public class NamelessOne extends CardImpl { public NamelessOne(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Wizard"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.WIZARD); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/n/NantukoBlightcutter.java b/Mage.Sets/src/mage/cards/n/NantukoBlightcutter.java index 9130c0f61e..aefdd38c85 100644 --- a/Mage.Sets/src/mage/cards/n/NantukoBlightcutter.java +++ b/Mage.Sets/src/mage/cards/n/NantukoBlightcutter.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -63,8 +64,8 @@ public class NantukoBlightcutter extends CardImpl { public NantukoBlightcutter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Insect"); - this.subtype.add("Druid"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NantukoCalmer.java b/Mage.Sets/src/mage/cards/n/NantukoCalmer.java index c4ae7962be..74107a674c 100644 --- a/Mage.Sets/src/mage/cards/n/NantukoCalmer.java +++ b/Mage.Sets/src/mage/cards/n/NantukoCalmer.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetEnchantmentPermanent; @@ -55,8 +56,8 @@ public class NantukoCalmer extends CardImpl { public NantukoCalmer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Insect"); - this.subtype.add("Druid"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NantukoCultivator.java b/Mage.Sets/src/mage/cards/n/NantukoCultivator.java index cd2fc28ffd..1e33cd40a3 100644 --- a/Mage.Sets/src/mage/cards/n/NantukoCultivator.java +++ b/Mage.Sets/src/mage/cards/n/NantukoCultivator.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.filter.common.FilterLandCard; @@ -52,8 +53,8 @@ public class NantukoCultivator extends CardImpl { public NantukoCultivator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Insect"); - this.subtype.add("Druid"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NantukoDisciple.java b/Mage.Sets/src/mage/cards/n/NantukoDisciple.java index abff442fb6..5f2e6550a5 100644 --- a/Mage.Sets/src/mage/cards/n/NantukoDisciple.java +++ b/Mage.Sets/src/mage/cards/n/NantukoDisciple.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class NantukoDisciple extends CardImpl { public NantukoDisciple(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Insect"); - this.subtype.add("Druid"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NantukoElder.java b/Mage.Sets/src/mage/cards/n/NantukoElder.java index 90fa282637..3c7c3e635d 100644 --- a/Mage.Sets/src/mage/cards/n/NantukoElder.java +++ b/Mage.Sets/src/mage/cards/n/NantukoElder.java @@ -35,6 +35,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class NantukoElder extends CardImpl { public NantukoElder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Insect"); - this.subtype.add("Druid"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NantukoHusk.java b/Mage.Sets/src/mage/cards/n/NantukoHusk.java index fbdc66dbad..8439fe9045 100644 --- a/Mage.Sets/src/mage/cards/n/NantukoHusk.java +++ b/Mage.Sets/src/mage/cards/n/NantukoHusk.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -48,8 +49,8 @@ public class NantukoHusk extends CardImpl { public NantukoHusk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Insect"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.INSECT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NantukoMentor.java b/Mage.Sets/src/mage/cards/n/NantukoMentor.java index fc4be71b44..c172f2c443 100644 --- a/Mage.Sets/src/mage/cards/n/NantukoMentor.java +++ b/Mage.Sets/src/mage/cards/n/NantukoMentor.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class NantukoMentor extends CardImpl { public NantukoMentor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Insect"); - this.subtype.add("Druid"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NantukoMonastery.java b/Mage.Sets/src/mage/cards/n/NantukoMonastery.java index 497888e902..8607b53bf8 100644 --- a/Mage.Sets/src/mage/cards/n/NantukoMonastery.java +++ b/Mage.Sets/src/mage/cards/n/NantukoMonastery.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -78,8 +79,8 @@ class NantukoMonasteryToken extends Token { public NantukoMonasteryToken() { super("", "4/4 green and white Insect Monk creature with first strike"); cardType.add(CardType.CREATURE); - subtype.add("Insect"); - subtype.add("Monk"); + subtype.add(SubType.INSECT); + subtype.add(SubType.MONK); color.setGreen(true); color.setWhite(true); power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NantukoShade.java b/Mage.Sets/src/mage/cards/n/NantukoShade.java index a0367bd3a5..d9e09c78f0 100644 --- a/Mage.Sets/src/mage/cards/n/NantukoShade.java +++ b/Mage.Sets/src/mage/cards/n/NantukoShade.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class NantukoShade extends CardImpl { public NantukoShade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Insect"); - this.subtype.add("Shade"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.SHADE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NantukoShaman.java b/Mage.Sets/src/mage/cards/n/NantukoShaman.java index adc5c9b143..54f73d58a9 100644 --- a/Mage.Sets/src/mage/cards/n/NantukoShaman.java +++ b/Mage.Sets/src/mage/cards/n/NantukoShaman.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.permanent.TappedPredicate; @@ -56,8 +57,8 @@ public class NantukoShaman extends CardImpl { public NantukoShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Insect"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NantukoTracer.java b/Mage.Sets/src/mage/cards/n/NantukoTracer.java index 240f2e4fcd..efefb017ce 100644 --- a/Mage.Sets/src/mage/cards/n/NantukoTracer.java +++ b/Mage.Sets/src/mage/cards/n/NantukoTracer.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.PutOnLibraryTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCardInGraveyard; /** @@ -45,8 +46,8 @@ public class NantukoTracer extends CardImpl { public NantukoTracer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Insect"); - this.subtype.add("Druid"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NantukoVigilante.java b/Mage.Sets/src/mage/cards/n/NantukoVigilante.java index 3c69a0d2db..48fcc414f5 100644 --- a/Mage.Sets/src/mage/cards/n/NantukoVigilante.java +++ b/Mage.Sets/src/mage/cards/n/NantukoVigilante.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.TargetPermanent; @@ -49,9 +50,9 @@ public class NantukoVigilante extends CardImpl { public NantukoVigilante(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Insect"); - this.subtype.add("Druid"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.DRUID); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/Narcolepsy.java b/Mage.Sets/src/mage/cards/n/Narcolepsy.java index 48f052111e..af1700e027 100644 --- a/Mage.Sets/src/mage/cards/n/Narcolepsy.java +++ b/Mage.Sets/src/mage/cards/n/Narcolepsy.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.filter.StaticFilters; @@ -52,7 +53,7 @@ public class Narcolepsy extends CardImpl { public Narcolepsy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/n/Narcomoeba.java b/Mage.Sets/src/mage/cards/n/Narcomoeba.java index 68a3df52b0..92efa1d747 100644 --- a/Mage.Sets/src/mage/cards/n/Narcomoeba.java +++ b/Mage.Sets/src/mage/cards/n/Narcomoeba.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class Narcomoeba extends CardImpl { public Narcomoeba(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NarnamCobra.java b/Mage.Sets/src/mage/cards/n/NarnamCobra.java index 32ec7ea751..e1016b3ac6 100644 --- a/Mage.Sets/src/mage/cards/n/NarnamCobra.java +++ b/Mage.Sets/src/mage/cards/n/NarnamCobra.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class NarnamCobra extends CardImpl { public NarnamCobra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NarnamRenegade.java b/Mage.Sets/src/mage/cards/n/NarnamRenegade.java index 5602bc47ab..49de350e9a 100644 --- a/Mage.Sets/src/mage/cards/n/NarnamRenegade.java +++ b/Mage.Sets/src/mage/cards/n/NarnamRenegade.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.watchers.common.RevoltWatcher; @@ -48,8 +49,8 @@ public class NarnamRenegade extends CardImpl { public NarnamRenegade(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NarsetEnlightenedMaster.java b/Mage.Sets/src/mage/cards/n/NarsetEnlightenedMaster.java index 0efaf4ad85..87331acc40 100644 --- a/Mage.Sets/src/mage/cards/n/NarsetEnlightenedMaster.java +++ b/Mage.Sets/src/mage/cards/n/NarsetEnlightenedMaster.java @@ -55,8 +55,8 @@ public class NarsetEnlightenedMaster extends CardImpl { public NarsetEnlightenedMaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{R}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NarsetTranscendent.java b/Mage.Sets/src/mage/cards/n/NarsetTranscendent.java index 812f95b060..7303aba1b5 100644 --- a/Mage.Sets/src/mage/cards/n/NarsetTranscendent.java +++ b/Mage.Sets/src/mage/cards/n/NarsetTranscendent.java @@ -44,6 +44,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -66,7 +67,7 @@ public class NarsetTranscendent extends CardImpl { public NarsetTranscendent(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{W}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Narset"); + this.subtype.add(SubType.NARSET); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(6)); diff --git a/Mage.Sets/src/mage/cards/n/NarstadScrapper.java b/Mage.Sets/src/mage/cards/n/NarstadScrapper.java index c0ada6d950..3867ffe595 100644 --- a/Mage.Sets/src/mage/cards/n/NarstadScrapper.java +++ b/Mage.Sets/src/mage/cards/n/NarstadScrapper.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class NarstadScrapper extends CardImpl { public NarstadScrapper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/Narwhal.java b/Mage.Sets/src/mage/cards/n/Narwhal.java index 1d59834510..d89dc11e66 100644 --- a/Mage.Sets/src/mage/cards/n/Narwhal.java +++ b/Mage.Sets/src/mage/cards/n/Narwhal.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class Narwhal extends CardImpl { public Narwhal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Whale"); + this.subtype.add(SubType.WHALE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NathOfTheGiltLeaf.java b/Mage.Sets/src/mage/cards/n/NathOfTheGiltLeaf.java index 33ee3e1a9d..523e575f48 100644 --- a/Mage.Sets/src/mage/cards/n/NathOfTheGiltLeaf.java +++ b/Mage.Sets/src/mage/cards/n/NathOfTheGiltLeaf.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.game.permanent.token.ElfToken; @@ -53,8 +54,8 @@ public class NathOfTheGiltLeaf extends CardImpl { public NathOfTheGiltLeaf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NathsBuffoon.java b/Mage.Sets/src/mage/cards/n/NathsBuffoon.java index 7fadbc8bdb..094d3583bf 100644 --- a/Mage.Sets/src/mage/cards/n/NathsBuffoon.java +++ b/Mage.Sets/src/mage/cards/n/NathsBuffoon.java @@ -51,8 +51,8 @@ public class NathsBuffoon extends CardImpl { public NathsBuffoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NathsElite.java b/Mage.Sets/src/mage/cards/n/NathsElite.java index e94d697a13..c9ec7bfec9 100644 --- a/Mage.Sets/src/mage/cards/n/NathsElite.java +++ b/Mage.Sets/src/mage/cards/n/NathsElite.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -49,8 +50,8 @@ public class NathsElite extends CardImpl { public NathsElite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NaturalBalance.java b/Mage.Sets/src/mage/cards/n/NaturalBalance.java index 5d487519bb..d0ac72c520 100644 --- a/Mage.Sets/src/mage/cards/n/NaturalBalance.java +++ b/Mage.Sets/src/mage/cards/n/NaturalBalance.java @@ -1,138 +1,138 @@ -/* - * 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.cards.n; - -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.CardsImpl; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.StaticFilters; -import mage.filter.common.FilterControlledLandPermanent; -import mage.filter.common.FilterLandPermanent; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.players.PlayerList; -import mage.target.common.TargetCardInLibrary; -import mage.target.common.TargetControlledPermanent; - -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -/** - * - * @author Rene - bugisemail at gmail dot com - */ -public class NaturalBalance extends CardImpl { - - public NaturalBalance(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}{G}"); - - // Each player who controls six or more lands chooses five lands he or she controls and sacrifices the rest. Each player who controls four or fewer lands may search his or her library for up to X basic land cards and put them onto the battlefield, where X is five minus the number of lands he or she controls. Then each player who searched his or her library this way shuffles it. - this.getSpellAbility().addEffect(new NaturalBalanceEffect()); - } - - public NaturalBalance(final NaturalBalance card) { - super(card); - } - - @Override - public NaturalBalance copy() { - return new NaturalBalance(this); - } - - class NaturalBalanceEffect extends OneShotEffect { - - public NaturalBalanceEffect() { - super(Outcome.PutCardInPlay); - this.staticText = "Each player who controls six or more lands chooses five lands he or she controls and sacrifices the rest. Each player who controls four or fewer lands may search his or her library for up to X basic land cards and put them onto the battlefield, where X is five minus the number of lands he or she controls. Then each player who searched his or her library this way shuffles it."; - } - - public NaturalBalanceEffect(final NaturalBalanceEffect effect) { - super(effect); - } - - @Override - public NaturalBalanceEffect copy() { - return new NaturalBalanceEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - PlayerList players = game.getState().getPlayersInRange(controller.getId(), game); - for (UUID playerId : players) { - Player player = game.getPlayer(playerId); - if (player != null) { - int landCount = game.getBattlefield().countAll(new FilterControlledLandPermanent(), player.getId(), game); - if (landCount > 5) { - // chooses five lands he or she controls and sacrifices the rest - TargetControlledPermanent target = new TargetControlledPermanent(5, 5, new FilterControlledLandPermanent("lands to keep"), true); - if (target.choose(Outcome.Sacrifice, player.getId(), source.getSourceId(), game)) { - for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterLandPermanent(), player.getId(), game)) { - if (!target.getTargets().contains(permanent.getId())) { - permanent.sacrifice(source.getId(), game); - } - } - } - } - } - } - List toShuffle = new ArrayList<>(); - for (UUID playerId : players) { - Player player = game.getPlayer(playerId); - if (player != null) { - int landCount = game.getBattlefield().countAll(new FilterControlledLandPermanent(), player.getId(), game); - int amount = 5 - landCount; - if (landCount < 5 && player.chooseUse(outcome, "Search your library for up to " + amount + " basic land cards and put them onto the battlefield?", source, game)) { - // Select lands and put them onto battlefield - TargetCardInLibrary target = new TargetCardInLibrary(0, amount, StaticFilters.FILTER_BASIC_LAND_CARD); - if (player.searchLibrary(target, game)) { - player.moveCards(new CardsImpl(target.getTargets()).getCards(game), Zone.BATTLEFIELD, source, game); - } - toShuffle.add(player); - } - } - } - for (Player player : toShuffle) { - if (player.isInGame()) { - player.shuffleLibrary(source, game); - } - } - return true; - } - return false; - } - } -} +/* + * 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.cards.n; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.common.FilterLandPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.players.PlayerList; +import mage.target.common.TargetCardInLibrary; +import mage.target.common.TargetControlledPermanent; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +/** + * + * @author Rene - bugisemail at gmail dot com + */ +public class NaturalBalance extends CardImpl { + + public NaturalBalance(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}{G}"); + + // Each player who controls six or more lands chooses five lands he or she controls and sacrifices the rest. Each player who controls four or fewer lands may search his or her library for up to X basic land cards and put them onto the battlefield, where X is five minus the number of lands he or she controls. Then each player who searched his or her library this way shuffles it. + this.getSpellAbility().addEffect(new NaturalBalanceEffect()); + } + + public NaturalBalance(final NaturalBalance card) { + super(card); + } + + @Override + public NaturalBalance copy() { + return new NaturalBalance(this); + } + + class NaturalBalanceEffect extends OneShotEffect { + + public NaturalBalanceEffect() { + super(Outcome.PutCardInPlay); + this.staticText = "Each player who controls six or more lands chooses five lands he or she controls and sacrifices the rest. Each player who controls four or fewer lands may search his or her library for up to X basic land cards and put them onto the battlefield, where X is five minus the number of lands he or she controls. Then each player who searched his or her library this way shuffles it."; + } + + public NaturalBalanceEffect(final NaturalBalanceEffect effect) { + super(effect); + } + + @Override + public NaturalBalanceEffect copy() { + return new NaturalBalanceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + PlayerList players = game.getState().getPlayersInRange(controller.getId(), game); + for (UUID playerId : players) { + Player player = game.getPlayer(playerId); + if (player != null) { + int landCount = game.getBattlefield().countAll(new FilterControlledLandPermanent(), player.getId(), game); + if (landCount > 5) { + // chooses five lands he or she controls and sacrifices the rest + TargetControlledPermanent target = new TargetControlledPermanent(5, 5, new FilterControlledLandPermanent("lands to keep"), true); + if (target.choose(Outcome.Sacrifice, player.getId(), source.getSourceId(), game)) { + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterLandPermanent(), player.getId(), game)) { + if (!target.getTargets().contains(permanent.getId())) { + permanent.sacrifice(source.getId(), game); + } + } + } + } + } + } + List toShuffle = new ArrayList<>(); + for (UUID playerId : players) { + Player player = game.getPlayer(playerId); + if (player != null) { + int landCount = game.getBattlefield().countAll(new FilterControlledLandPermanent(), player.getId(), game); + int amount = 5 - landCount; + if (landCount < 5 && player.chooseUse(outcome, "Search your library for up to " + amount + " basic land cards and put them onto the battlefield?", source, game)) { + // Select lands and put them onto battlefield + TargetCardInLibrary target = new TargetCardInLibrary(0, amount, StaticFilters.FILTER_BASIC_LAND_CARD); + if (player.searchLibrary(target, game)) { + player.moveCards(new CardsImpl(target.getTargets()).getCards(game), Zone.BATTLEFIELD, source, game); + } + toShuffle.add(player); + } + } + } + for (Player player : toShuffle) { + if (player.isInGame()) { + player.shuffleLibrary(source, game); + } + } + return true; + } + return false; + } + } +} diff --git a/Mage.Sets/src/mage/cards/n/NaturesChosen.java b/Mage.Sets/src/mage/cards/n/NaturesChosen.java new file mode 100644 index 0000000000..a88eb21457 --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NaturesChosen.java @@ -0,0 +1,111 @@ +/* + * 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.cards.n; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; +import mage.abilities.condition.common.AttachedToMatchesFilterCondition; +import mage.abilities.condition.common.MyTurnCondition; +import mage.abilities.costs.common.TapAttachedCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.UntapEnchantedEffect; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author L_J + */ +public class NaturesChosen extends CardImpl { + + private static final FilterPermanent filterPermanent = new FilterPermanent("artifact, creature or land"); + + static { + filterPermanent.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.CREATURE), + new CardTypePredicate(CardType.LAND))); + } + + private static final FilterCreaturePermanent filterWhiteUntappedCreature = new FilterCreaturePermanent(" if enchanted creature is white and is untapped"); + + static { + filterWhiteUntappedCreature.add(new ColorPredicate(ObjectColor.WHITE)); + filterWhiteUntappedCreature.add(Predicates.not(new TappedPredicate())); + } + + public NaturesChosen(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + this.subtype.add(SubType.AURA); + + // Enchant creature you control + TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // {0}: Untap enchanted creature. Activate this ability only during your turn and only once each turn. + this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapEnchantedEffect(), new GenericManaCost(0), 1, MyTurnCondition.instance)); + + // Tap enchanted creature: Untap target artifact, creature, or land. Activate this ability only if enchanted creature is white and is untapped and only once each turn. + Effect effect = new UntapTargetEffect(); + effect.setText("Untap target artifact, creature, or land"); + LimitedTimesPerTurnActivatedAbility ability2 = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, effect, new TapAttachedCost(), 1, new AttachedToMatchesFilterCondition(filterWhiteUntappedCreature)); + ability2.addTarget(new TargetPermanent(filterPermanent)); + this.addAbility(ability2); + } + + public NaturesChosen(final NaturesChosen card) { + super(card); + } + + @Override + public NaturesChosen copy() { + return new NaturesChosen(this); + } +} diff --git a/Mage.Sets/src/mage/cards/n/NaturesKiss.java b/Mage.Sets/src/mage/cards/n/NaturesKiss.java index ada20dd79d..ee3df19b01 100644 --- a/Mage.Sets/src/mage/cards/n/NaturesKiss.java +++ b/Mage.Sets/src/mage/cards/n/NaturesKiss.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class NaturesKiss extends CardImpl { public NaturesKiss(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/n/NaturesLore.java b/Mage.Sets/src/mage/cards/n/NaturesLore.java index c07a21d454..1f73d2deaa 100644 --- a/Mage.Sets/src/mage/cards/n/NaturesLore.java +++ b/Mage.Sets/src/mage/cards/n/NaturesLore.java @@ -27,7 +27,6 @@ */ package mage.cards.n; -import java.util.UUID; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -37,13 +36,15 @@ import mage.filter.FilterCard; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 */ public class NaturesLore extends CardImpl { - private static final FilterCard filter = new FilterCard("a Forest card"); + private static final FilterCard filter = new FilterCard("Forest card"); static { filter.add(new SubtypePredicate(SubType.FOREST)); diff --git a/Mage.Sets/src/mage/cards/n/NaturesWrath.java b/Mage.Sets/src/mage/cards/n/NaturesWrath.java new file mode 100644 index 0000000000..7c494d4518 --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NaturesWrath.java @@ -0,0 +1,97 @@ +/* + * 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.cards.n; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.SacrificeEffect; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SetTargetPointer; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author L_J + */ +public class NaturesWrath extends CardImpl { + private static final FilterPermanent filterBlue = new FilterPermanent("an Island or blue permanent"); + static{ + filterBlue.add(Predicates.or(new ColorPredicate(ObjectColor.BLUE), new SubtypePredicate(SubType.ISLAND))); + } + + private static final FilterPermanent filterBlack = new FilterPermanent("a Swamp or black permanent"); + static{ + filterBlack.add(Predicates.or(new ColorPredicate(ObjectColor.BLACK), new SubtypePredicate(SubType.SWAMP))); + } + + public NaturesWrath(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{G}{G}"); + + // At the beginning of your upkeep, sacrifice Nature's Wrath unless you pay {G}. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{G}")), TargetController.YOU, false)); + + // Whenever a player puts an Island or blue permanent onto the battlefield, he or she sacrifices an Island or blue permanent. + this.addAbility(new EntersBattlefieldAllTriggeredAbility( + Zone.BATTLEFIELD, + new SacrificeEffect(filterBlue, 1, ""), + filterBlue, + false, SetTargetPointer.PLAYER, + "Whenever a player puts an Island or blue permanent onto the battlefield, he or she sacrifices an Island or blue permanent.")); + + // Whenever a player puts a Swamp or black permanent onto the battlefield, he or she sacrifices a Swamp or black permanent. + this.addAbility(new EntersBattlefieldAllTriggeredAbility( + Zone.BATTLEFIELD, + new SacrificeEffect(filterBlack, 1, ""), + filterBlack, + false, SetTargetPointer.PLAYER, + "Whenever a player puts a Swamp or black permanent onto the battlefield, he or she sacrifices a Swamp or black permanent.")); + } + + public NaturesWrath(final NaturesWrath card) { + super(card); + } + + @Override + public NaturesWrath copy() { + return new NaturesWrath(this); + } +} diff --git a/Mage.Sets/src/mage/cards/n/NavSquadCommandos.java b/Mage.Sets/src/mage/cards/n/NavSquadCommandos.java index 747af3b1a6..cc5704aa06 100644 --- a/Mage.Sets/src/mage/cards/n/NavSquadCommandos.java +++ b/Mage.Sets/src/mage/cards/n/NavSquadCommandos.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.BattalionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,8 +47,8 @@ public class NavSquadCommandos extends CardImpl { public NavSquadCommandos(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/n/NavigatorsRuin.java b/Mage.Sets/src/mage/cards/n/NavigatorsRuin.java new file mode 100644 index 0000000000..f7f9d41799 --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NavigatorsRuin.java @@ -0,0 +1,69 @@ +/* + * 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.cards.n; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.target.common.TargetOpponent; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * + * @author TheElk801 + */ +public class NavigatorsRuin extends CardImpl { + + public NavigatorsRuin(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + + // Raid - At the beginning of your end step, if you attacked with a creature this turm, target opponent puts the top four cards of his or her library into his or her graveyard. + Ability ability = new ConditionalTriggeredAbility( + new BeginningOfEndStepTriggeredAbility(new PutLibraryIntoGraveTargetEffect(4), TargetController.YOU, false), + RaidCondition.instance, + "Raid - At the beginning of your end step, if you attacked with a creature this turn, target opponent puts the top four cards of his or her library into his or her graveyard."); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability, new PlayerAttackedWatcher()); + } + + public NavigatorsRuin(final NavigatorsRuin card) { + super(card); + } + + @Override + public NavigatorsRuin copy() { + return new NavigatorsRuin(this); + } +} diff --git a/Mage.Sets/src/mage/cards/n/NayaBattlemage.java b/Mage.Sets/src/mage/cards/n/NayaBattlemage.java index e5cf051af9..1e438ed4e4 100644 --- a/Mage.Sets/src/mage/cards/n/NayaBattlemage.java +++ b/Mage.Sets/src/mage/cards/n/NayaBattlemage.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -51,8 +52,8 @@ public class NayaBattlemage extends CardImpl { public NayaBattlemage (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NayaHushblade.java b/Mage.Sets/src/mage/cards/n/NayaHushblade.java index 32f200e9fc..db2f1f6d81 100644 --- a/Mage.Sets/src/mage/cards/n/NayaHushblade.java +++ b/Mage.Sets/src/mage/cards/n/NayaHushblade.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -60,8 +61,8 @@ public class NayaHushblade extends CardImpl { public NayaHushblade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R/W}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ROGUE); diff --git a/Mage.Sets/src/mage/cards/n/NayaSojourners.java b/Mage.Sets/src/mage/cards/n/NayaSojourners.java index 33153b1384..909413728e 100644 --- a/Mage.Sets/src/mage/cards/n/NayaSojourners.java +++ b/Mage.Sets/src/mage/cards/n/NayaSojourners.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class NayaSojourners extends CardImpl { public NayaSojourners(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}{W}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); diff --git a/Mage.Sets/src/mage/cards/n/NayaSoulbeast.java b/Mage.Sets/src/mage/cards/n/NayaSoulbeast.java index 3e082ee32c..865e9216aa 100644 --- a/Mage.Sets/src/mage/cards/n/NayaSoulbeast.java +++ b/Mage.Sets/src/mage/cards/n/NayaSoulbeast.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.counters.CounterType; @@ -58,7 +59,7 @@ public class NayaSoulbeast extends CardImpl { public NayaSoulbeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/n/NazahnReveredBladesmith.java b/Mage.Sets/src/mage/cards/n/NazahnReveredBladesmith.java index 7936a68083..b3d57ed6bc 100644 --- a/Mage.Sets/src/mage/cards/n/NazahnReveredBladesmith.java +++ b/Mage.Sets/src/mage/cards/n/NazahnReveredBladesmith.java @@ -27,7 +27,6 @@ */ package mage.cards.n; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksCreatureYouControlTriggeredAbility; @@ -54,13 +53,15 @@ import mage.game.permanent.Permanent; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author spjspj */ public class NazahnReveredBladesmith extends CardImpl { - private static final FilterControlledCreaturePermanent equippedFilter = new FilterControlledCreaturePermanent("equipped creatures you control"); + private static final FilterControlledCreaturePermanent equippedFilter = new FilterControlledCreaturePermanent("equipped creature you control"); static { equippedFilter.add(new EquippedPredicate()); @@ -78,8 +79,8 @@ public class NazahnReveredBladesmith extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Cat"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(5); this.toughness = new MageInt(4); @@ -88,7 +89,7 @@ public class NazahnReveredBladesmith extends CardImpl { this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandOrOnBattlefieldEffect(target, true, true, "Hammer of Nazahn"), true)); // Whenever an equipped creature you control attacks, you may tap target creature defending player controls. - Ability ability = new AttacksCreatureYouControlTriggeredAbility(new NazahnTapEffect(), false, equippedFilter, true); + Ability ability = new AttacksCreatureYouControlTriggeredAbility(new NazahnTapEffect(), true, equippedFilter, true); ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature defending player controls"))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/n/NearheathChaplain.java b/Mage.Sets/src/mage/cards/n/NearheathChaplain.java index b1c5d54c5b..e15bd9e59d 100644 --- a/Mage.Sets/src/mage/cards/n/NearheathChaplain.java +++ b/Mage.Sets/src/mage/cards/n/NearheathChaplain.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.SpiritWhiteToken; @@ -49,8 +50,8 @@ public class NearheathChaplain extends CardImpl { public NearheathChaplain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NearheathPilgrim.java b/Mage.Sets/src/mage/cards/n/NearheathPilgrim.java index 51828e9397..bd7fadf466 100644 --- a/Mage.Sets/src/mage/cards/n/NearheathPilgrim.java +++ b/Mage.Sets/src/mage/cards/n/NearheathPilgrim.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SoulbondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class NearheathPilgrim extends CardImpl { public NearheathPilgrim(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NearheathStalker.java b/Mage.Sets/src/mage/cards/n/NearheathStalker.java index d809cdff99..e87d4cc5d5 100644 --- a/Mage.Sets/src/mage/cards/n/NearheathStalker.java +++ b/Mage.Sets/src/mage/cards/n/NearheathStalker.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.UndyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class NearheathStalker extends CardImpl { public NearheathStalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Vampire"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NebelgastHerald.java b/Mage.Sets/src/mage/cards/n/NebelgastHerald.java index 1258b5d0db..c887c7595b 100644 --- a/Mage.Sets/src/mage/cards/n/NebelgastHerald.java +++ b/Mage.Sets/src/mage/cards/n/NebelgastHerald.java @@ -62,7 +62,7 @@ public class NebelgastHerald extends CardImpl { public NebelgastHerald(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NebulonBFrigate.java b/Mage.Sets/src/mage/cards/n/NebulonBFrigate.java index 8c5a397f61..c2161dd70b 100644 --- a/Mage.Sets/src/mage/cards/n/NebulonBFrigate.java +++ b/Mage.Sets/src/mage/cards/n/NebulonBFrigate.java @@ -1,77 +1,78 @@ -/* - * 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.cards.n; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; -import mage.abilities.keyword.SpaceflightAbility; -import mage.abilities.keyword.VigilanceAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.AnotherPredicate; - -/** - * - * @author Styxo - */ -public class NebulonBFrigate extends CardImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature you control"); - - static { - filter.add(new AnotherPredicate()); - } - - public NebulonBFrigate(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{W}{W}"); - this.subtype.add("Starship"); - this.power = new MageInt(4); - this.toughness = new MageInt(2); - - // Spaceflight - this.addAbility(SpaceflightAbility.getInstance()); - - // Whenever Nebulon-B Frigate enters the battlefield, creatures you control gain vigilance until end of turn. - this.addAbility(new EntersBattlefieldTriggeredAbility(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent("creatures you control")), false)); - } - - public NebulonBFrigate(final NebulonBFrigate card) { - super(card); - } - - @Override - public NebulonBFrigate copy() { - return new NebulonBFrigate(this); - } -} +/* + * 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.cards.n; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author Styxo + */ +public class NebulonBFrigate extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature you control"); + + static { + filter.add(new AnotherPredicate()); + } + + public NebulonBFrigate(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{W}{W}"); + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(4); + this.toughness = new MageInt(2); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + + // Whenever Nebulon-B Frigate enters the battlefield, creatures you control gain vigilance until end of turn. + this.addAbility(new EntersBattlefieldTriggeredAbility(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent("creatures you control")), false)); + } + + public NebulonBFrigate(final NebulonBFrigate card) { + super(card); + } + + @Override + public NebulonBFrigate copy() { + return new NebulonBFrigate(this); + } +} diff --git a/Mage.Sets/src/mage/cards/n/NeckBreaker.java b/Mage.Sets/src/mage/cards/n/NeckBreaker.java index 66f5afbc9d..330424ac15 100644 --- a/Mage.Sets/src/mage/cards/n/NeckBreaker.java +++ b/Mage.Sets/src/mage/cards/n/NeckBreaker.java @@ -44,6 +44,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class NeckBreaker extends CardImpl { public NeckBreaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(4); this.toughness = new MageInt(3); this.color.setRed(true); diff --git a/Mage.Sets/src/mage/cards/n/NecraDisciple.java b/Mage.Sets/src/mage/cards/n/NecraDisciple.java index 81698367f9..e019785849 100644 --- a/Mage.Sets/src/mage/cards/n/NecraDisciple.java +++ b/Mage.Sets/src/mage/cards/n/NecraDisciple.java @@ -48,8 +48,8 @@ public class NecraDisciple extends CardImpl { public NecraDisciple(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NecraSanctuary.java b/Mage.Sets/src/mage/cards/n/NecraSanctuary.java new file mode 100644 index 0000000000..0658d639c7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NecraSanctuary.java @@ -0,0 +1,67 @@ +/* + * 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.cards.n; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SanctuaryTriggeredAbility; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.TargetPlayer; + +/** + * + * @author TheElk801 + */ +public class NecraSanctuary extends CardImpl { + + public NecraSanctuary(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + + // At the beginning of your upkeep, if you control a green or white permanent, target player loses 1 life. If you control a green permanent and a white permanent, that player loses 3 life instead. + Ability ability = new SanctuaryTriggeredAbility( + new LoseLifeTargetEffect(1), new LoseLifeTargetEffect(3), ObjectColor.GREEN, ObjectColor.WHITE, + "At the beginning of your upkeep, if you control a green or white permanent, " + + "target player loses 1 life. If you control a green permanent and a white permanent, that player loses 3 life instead." + ); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public NecraSanctuary(final NecraSanctuary card) { + super(card); + } + + @Override + public NecraSanctuary copy() { + return new NecraSanctuary(this); + } +} diff --git a/Mage.Sets/src/mage/cards/n/Necratog.java b/Mage.Sets/src/mage/cards/n/Necratog.java index c100d6a00e..fabe167316 100644 --- a/Mage.Sets/src/mage/cards/n/Necratog.java +++ b/Mage.Sets/src/mage/cards/n/Necratog.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class Necratog extends CardImpl { public Necratog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Atog"); + this.subtype.add(SubType.ATOG); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/Necravolver.java b/Mage.Sets/src/mage/cards/n/Necravolver.java index 690b0be04e..9abe85898f 100644 --- a/Mage.Sets/src/mage/cards/n/Necravolver.java +++ b/Mage.Sets/src/mage/cards/n/Necravolver.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.counters.CounterType; @@ -52,7 +53,7 @@ public class Necravolver extends CardImpl { public Necravolver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Volver"); + this.subtype.add(SubType.VOLVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/Necrite.java b/Mage.Sets/src/mage/cards/n/Necrite.java index 9e638f3497..cbff52f084 100644 --- a/Mage.Sets/src/mage/cards/n/Necrite.java +++ b/Mage.Sets/src/mage/cards/n/Necrite.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DoIfCostPaid; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; @@ -54,7 +55,7 @@ public class Necrite extends CardImpl { public Necrite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Thrull"); + this.subtype.add(SubType.THRULL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NecrogenScudder.java b/Mage.Sets/src/mage/cards/n/NecrogenScudder.java index dd62bdf051..180efc2a50 100644 --- a/Mage.Sets/src/mage/cards/n/NecrogenScudder.java +++ b/Mage.Sets/src/mage/cards/n/NecrogenScudder.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class NecrogenScudder extends CardImpl { public NecrogenScudder (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NecromancersAssistant.java b/Mage.Sets/src/mage/cards/n/NecromancersAssistant.java index 0873bf4cf8..bf5566db3f 100644 --- a/Mage.Sets/src/mage/cards/n/NecromancersAssistant.java +++ b/Mage.Sets/src/mage/cards/n/NecromancersAssistant.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author noxx @@ -42,7 +43,7 @@ public class NecromancersAssistant extends CardImpl { public NecromancersAssistant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NecromancersMagemark.java b/Mage.Sets/src/mage/cards/n/NecromancersMagemark.java index fb003ffb31..222513369a 100644 --- a/Mage.Sets/src/mage/cards/n/NecromancersMagemark.java +++ b/Mage.Sets/src/mage/cards/n/NecromancersMagemark.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -67,7 +68,7 @@ public class NecromancersMagemark extends CardImpl { public NecromancersMagemark(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); @@ -141,7 +142,7 @@ class NecromancersMagemarkEffect extends ReplacementEffectImpl { if (permanent != null && permanent.getControllerId().equals(source.getControllerId())) { for (UUID attachmentId : permanent.getAttachments()) { Permanent attachment = game.getPermanentOrLKIBattlefield(attachmentId); - if (attachment != null && attachment.getSubtype(game).contains("Aura")) { + if (attachment != null && attachment.hasSubtype(SubType.AURA, game)) { return true; } } diff --git a/Mage.Sets/src/mage/cards/n/Necromancy.java b/Mage.Sets/src/mage/cards/n/Necromancy.java index 38f121d520..046edff18a 100644 --- a/Mage.Sets/src/mage/cards/n/Necromancy.java +++ b/Mage.Sets/src/mage/cards/n/Necromancy.java @@ -62,7 +62,7 @@ import mage.target.common.TargetCreaturePermanent; public class Necromancy extends CardImpl { public Necromancy(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); // You may cast Necromancy as though it had flash. If you cast it any time a sorcery couldn't have been cast, the controller of the permanent it becomes sacrifices it at the beginning of the next cleanup step. this.addAbility(new SimpleStaticAbility(Zone.ALL, new CastAsThoughItHadFlashSourceEffect(Duration.EndOfGame))); @@ -90,7 +90,6 @@ public class Necromancy extends CardImpl { } } - class NecromancyReAttachEffect extends OneShotEffect { public NecromancyReAttachEffect() { @@ -153,7 +152,7 @@ class NecromancyLeavesBattlefieldTriggeredEffect extends OneShotEffect { if (controller != null && sourcePermanent != null) { if (sourcePermanent.getAttachedTo() != null) { Permanent attachedTo = game.getPermanent(sourcePermanent.getAttachedTo()); - if (attachedTo != null) { + if (attachedTo != null && attachedTo.getZoneChangeCounter(game) == sourcePermanent.getAttachedToZoneChangeCounter()) { attachedTo.sacrifice(source.getSourceId(), game); } } @@ -163,7 +162,6 @@ class NecromancyLeavesBattlefieldTriggeredEffect extends OneShotEffect { } } - class NecromancyChangeAbilityEffect extends ContinuousEffectImpl implements SourceEffect { private final static Ability newAbility = new EnchantAbility("creature put onto the battlefield with Necromancy"); @@ -204,8 +202,8 @@ class NecromancyChangeAbilityEffect extends ContinuousEffectImpl implements Sour switch (layer) { case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { - if (!permanent.getSubtype(game).contains("Aura")) { - permanent.getSubtype(game).add("Aura"); + if (!permanent.hasSubtype(SubType.AURA, game)) { + permanent.getSubtype(game).add(SubType.AURA); } } break; diff --git a/Mage.Sets/src/mage/cards/n/NecromanticThirst.java b/Mage.Sets/src/mage/cards/n/NecromanticThirst.java index f1e40fbeb3..8f92ea3273 100644 --- a/Mage.Sets/src/mage/cards/n/NecromanticThirst.java +++ b/Mage.Sets/src/mage/cards/n/NecromanticThirst.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.filter.common.FilterCreatureCard; @@ -51,7 +52,7 @@ public class NecromanticThirst extends CardImpl { public NecromanticThirst(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/n/NecromasterDragon.java b/Mage.Sets/src/mage/cards/n/NecromasterDragon.java index 3b5cdef1c2..274c455623 100644 --- a/Mage.Sets/src/mage/cards/n/NecromasterDragon.java +++ b/Mage.Sets/src/mage/cards/n/NecromasterDragon.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.game.permanent.token.ZombieToken; @@ -50,7 +51,7 @@ public class NecromasterDragon extends CardImpl { public NecromasterDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{B}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/Necropede.java b/Mage.Sets/src/mage/cards/n/Necropede.java index 9f4725cab7..733c0f48fb 100644 --- a/Mage.Sets/src/mage/cards/n/Necropede.java +++ b/Mage.Sets/src/mage/cards/n/Necropede.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class Necropede extends CardImpl { public Necropede (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); this.addAbility(InfectAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/n/Necroplasm.java b/Mage.Sets/src/mage/cards/n/Necroplasm.java index b20247e804..9db7c55ae5 100644 --- a/Mage.Sets/src/mage/cards/n/Necroplasm.java +++ b/Mage.Sets/src/mage/cards/n/Necroplasm.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DredgeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.TargetController; @@ -56,7 +57,7 @@ public class Necroplasm extends CardImpl { public Necroplasm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Ooze"); + this.subtype.add(SubType.OOZE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NecropolisFiend.java b/Mage.Sets/src/mage/cards/n/NecropolisFiend.java index 444551f19d..6ddb06b9ed 100644 --- a/Mage.Sets/src/mage/cards/n/NecropolisFiend.java +++ b/Mage.Sets/src/mage/cards/n/NecropolisFiend.java @@ -47,6 +47,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterCard; @@ -64,7 +65,7 @@ public class NecropolisFiend extends CardImpl { public NecropolisFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{7}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(4); this.toughness = new MageInt(5); @@ -73,6 +74,7 @@ public class NecropolisFiend extends CardImpl { this.addAbility(new DelveAbility()); // Flying this.addAbility(FlyingAbility.getInstance()); + //TODO: Make ability properly copiable // {X}, {T}, Exile X cards from your graveyard: Target creature gets -X/-X until end of turn. DynamicValue xValue = new SignInversionDynamicValue(new ManacostVariableValue()); Effect effect = new BoostTargetEffect(xValue,xValue,Duration.EndOfTurn); diff --git a/Mage.Sets/src/mage/cards/n/NecropolisRegent.java b/Mage.Sets/src/mage/cards/n/NecropolisRegent.java index 7bf4adfe3c..70df0f2665 100644 --- a/Mage.Sets/src/mage/cards/n/NecropolisRegent.java +++ b/Mage.Sets/src/mage/cards/n/NecropolisRegent.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -54,7 +55,7 @@ public class NecropolisRegent extends CardImpl { public NecropolisRegent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/n/Necropouncer.java b/Mage.Sets/src/mage/cards/n/Necropouncer.java index 2a5c0723d2..7ec3a5e34c 100644 --- a/Mage.Sets/src/mage/cards/n/Necropouncer.java +++ b/Mage.Sets/src/mage/cards/n/Necropouncer.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class Necropouncer extends CardImpl { public Necropouncer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{6}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new LivingWeaponAbility()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 1))); diff --git a/Mage.Sets/src/mage/cards/n/Necrosavant.java b/Mage.Sets/src/mage/cards/n/Necrosavant.java index 0c8ee0ece7..fb3a33fb03 100644 --- a/Mage.Sets/src/mage/cards/n/Necrosavant.java +++ b/Mage.Sets/src/mage/cards/n/Necrosavant.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.PhaseStep; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -50,8 +51,8 @@ public class Necrosavant extends CardImpl { public Necrosavant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Giant"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.GIANT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/n/Necroskitter.java b/Mage.Sets/src/mage/cards/n/Necroskitter.java index f93f7801df..168d515d5e 100644 --- a/Mage.Sets/src/mage/cards/n/Necroskitter.java +++ b/Mage.Sets/src/mage/cards/n/Necroskitter.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -53,7 +54,7 @@ public class Necroskitter extends CardImpl { public Necroskitter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NecroticOoze.java b/Mage.Sets/src/mage/cards/n/NecroticOoze.java index baf47a07d7..97a284e369 100644 --- a/Mage.Sets/src/mage/cards/n/NecroticOoze.java +++ b/Mage.Sets/src/mage/cards/n/NecroticOoze.java @@ -55,7 +55,7 @@ public class NecroticOoze extends CardImpl { public NecroticOoze(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Ooze"); + this.subtype.add(SubType.OOZE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NecroticPlague.java b/Mage.Sets/src/mage/cards/n/NecroticPlague.java index 09b464c332..d2d09529b1 100644 --- a/Mage.Sets/src/mage/cards/n/NecroticPlague.java +++ b/Mage.Sets/src/mage/cards/n/NecroticPlague.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -70,7 +71,7 @@ public class NecroticPlague extends CardImpl { public NecroticPlague(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/n/NecroticSliver.java b/Mage.Sets/src/mage/cards/n/NecroticSliver.java index 546ea5e95f..3b54de08c8 100644 --- a/Mage.Sets/src/mage/cards/n/NecroticSliver.java +++ b/Mage.Sets/src/mage/cards/n/NecroticSliver.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.GainAbilityAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -52,7 +53,7 @@ public class NecroticSliver extends CardImpl { public NecroticSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{B}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NectarFaerie.java b/Mage.Sets/src/mage/cards/n/NectarFaerie.java index 8610471005..60e8a13815 100644 --- a/Mage.Sets/src/mage/cards/n/NectarFaerie.java +++ b/Mage.Sets/src/mage/cards/n/NectarFaerie.java @@ -58,8 +58,8 @@ public class NectarFaerie extends CardImpl { public NectarFaerie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Faerie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NeedleSpecter.java b/Mage.Sets/src/mage/cards/n/NeedleSpecter.java index ee0533ab08..f5eb5f0a2d 100644 --- a/Mage.Sets/src/mage/cards/n/NeedleSpecter.java +++ b/Mage.Sets/src/mage/cards/n/NeedleSpecter.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -49,7 +50,7 @@ public class NeedleSpecter extends CardImpl { public NeedleSpecter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Specter"); + this.subtype.add(SubType.SPECTER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NeedleSpires.java b/Mage.Sets/src/mage/cards/n/NeedleSpires.java index 89c5490f34..9f8455d187 100644 --- a/Mage.Sets/src/mage/cards/n/NeedleSpires.java +++ b/Mage.Sets/src/mage/cards/n/NeedleSpires.java @@ -40,6 +40,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -81,7 +82,7 @@ class NeedleSpiresToken extends Token { public NeedleSpiresToken() { super("", "2/1 red and white Elemental creature with double strike"); cardType.add(CardType.CREATURE); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); color.setRed(true); color.setWhite(true); power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/Needlebug.java b/Mage.Sets/src/mage/cards/n/Needlebug.java index 2a68124baf..7928fe545a 100644 --- a/Mage.Sets/src/mage/cards/n/Needlebug.java +++ b/Mage.Sets/src/mage/cards/n/Needlebug.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterArtifactCard; /** @@ -44,7 +45,7 @@ public class Needlebug extends CardImpl { public Needlebug(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NeedlepeakSpider.java b/Mage.Sets/src/mage/cards/n/NeedlepeakSpider.java index 5381ab93a7..e243d1b504 100644 --- a/Mage.Sets/src/mage/cards/n/NeedlepeakSpider.java +++ b/Mage.Sets/src/mage/cards/n/NeedlepeakSpider.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class NeedlepeakSpider extends CardImpl { public NeedlepeakSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NeedleshotGourna.java b/Mage.Sets/src/mage/cards/n/NeedleshotGourna.java index 658fc7631a..bc106b7256 100644 --- a/Mage.Sets/src/mage/cards/n/NeedleshotGourna.java +++ b/Mage.Sets/src/mage/cards/n/NeedleshotGourna.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class NeedleshotGourna extends CardImpl { public NeedleshotGourna(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/n/NefCropEntangler.java b/Mage.Sets/src/mage/cards/n/NefCropEntangler.java index 04df91609a..4fd1976f25 100644 --- a/Mage.Sets/src/mage/cards/n/NefCropEntangler.java +++ b/Mage.Sets/src/mage/cards/n/NefCropEntangler.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -47,8 +48,8 @@ public class NefCropEntangler extends CardImpl { public NefCropEntangler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NefaroxOverlordOfGrixis.java b/Mage.Sets/src/mage/cards/n/NefaroxOverlordOfGrixis.java index bddc1c453a..ad7b9191ea 100644 --- a/Mage.Sets/src/mage/cards/n/NefaroxOverlordOfGrixis.java +++ b/Mage.Sets/src/mage/cards/n/NefaroxOverlordOfGrixis.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.common.FilterControlledCreaturePermanent; @@ -48,7 +49,7 @@ public class NefaroxOverlordOfGrixis extends CardImpl { public NefaroxOverlordOfGrixis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/n/Nefashu.java b/Mage.Sets/src/mage/cards/n/Nefashu.java index 1cf80f77fa..01166d92d1 100644 --- a/Mage.Sets/src/mage/cards/n/Nefashu.java +++ b/Mage.Sets/src/mage/cards/n/Nefashu.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class Nefashu extends CardImpl { public Nefashu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NeglectedHeirloom.java b/Mage.Sets/src/mage/cards/n/NeglectedHeirloom.java index a9549bc2f7..b1781f7e26 100644 --- a/Mage.Sets/src/mage/cards/n/NeglectedHeirloom.java +++ b/Mage.Sets/src/mage/cards/n/NeglectedHeirloom.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.a.AshmouthBlade; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -52,7 +53,7 @@ public class NeglectedHeirloom extends CardImpl { public NeglectedHeirloom(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.transformable = true; this.secondSideCardClazz = AshmouthBlade.class; diff --git a/Mage.Sets/src/mage/cards/n/NehebTheEternal.java b/Mage.Sets/src/mage/cards/n/NehebTheEternal.java index f279706678..b7fd0a98dc 100644 --- a/Mage.Sets/src/mage/cards/n/NehebTheEternal.java +++ b/Mage.Sets/src/mage/cards/n/NehebTheEternal.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.AfflictAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.game.Game; @@ -53,9 +54,9 @@ public class NehebTheEternal extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Zombie"); - this.subtype.add("Minotaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/n/NehebTheWorthy.java b/Mage.Sets/src/mage/cards/n/NehebTheWorthy.java index 08649a215f..665fcbe283 100644 --- a/Mage.Sets/src/mage/cards/n/NehebTheWorthy.java +++ b/Mage.Sets/src/mage/cards/n/NehebTheWorthy.java @@ -63,8 +63,8 @@ public class NehebTheWorthy extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Minotaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NekoTe.java b/Mage.Sets/src/mage/cards/n/NekoTe.java index 71ddd40d30..c1bb826f28 100644 --- a/Mage.Sets/src/mage/cards/n/NekoTe.java +++ b/Mage.Sets/src/mage/cards/n/NekoTe.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; @@ -53,7 +54,7 @@ public class NekoTe extends CardImpl { public NekoTe(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Whenever equipped creature deals damage to a creature, tap that creature. That creature doesn't untap during its controller's untap step for as long as Neko-Te remains on the battlefield. ContinuousRuleModifyingEffect skipUntapEffect = new DontUntapInControllersUntapStepTargetEffect(Duration.WhileOnBattlefield); diff --git a/Mage.Sets/src/mage/cards/n/Nekrataal.java b/Mage.Sets/src/mage/cards/n/Nekrataal.java index 7a8b9fad16..6b0f09afb3 100644 --- a/Mage.Sets/src/mage/cards/n/Nekrataal.java +++ b/Mage.Sets/src/mage/cards/n/Nekrataal.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -59,8 +60,8 @@ public class Nekrataal extends CardImpl { public Nekrataal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NekusarTheMindrazer.java b/Mage.Sets/src/mage/cards/n/NekusarTheMindrazer.java index 60c5e53862..f06fa2df4a 100644 --- a/Mage.Sets/src/mage/cards/n/NekusarTheMindrazer.java +++ b/Mage.Sets/src/mage/cards/n/NekusarTheMindrazer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DrawCardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; @@ -49,8 +50,8 @@ public class NekusarTheMindrazer extends CardImpl { public NekusarTheMindrazer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Zombie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NemaSiltlurker.java b/Mage.Sets/src/mage/cards/n/NemaSiltlurker.java index e4cfc77696..2095a03d99 100644 --- a/Mage.Sets/src/mage/cards/n/NemaSiltlurker.java +++ b/Mage.Sets/src/mage/cards/n/NemaSiltlurker.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class NemaSiltlurker extends CardImpl { public NemaSiltlurker (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/n/NemataGroveGuardian.java b/Mage.Sets/src/mage/cards/n/NemataGroveGuardian.java index 8d2c17ac20..47abe5176a 100644 --- a/Mage.Sets/src/mage/cards/n/NemataGroveGuardian.java +++ b/Mage.Sets/src/mage/cards/n/NemataGroveGuardian.java @@ -59,7 +59,7 @@ public class NemataGroveGuardian extends CardImpl { public NemataGroveGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/n/NemesisMask.java b/Mage.Sets/src/mage/cards/n/NemesisMask.java index 19d8af7075..dee1f19203 100644 --- a/Mage.Sets/src/mage/cards/n/NemesisMask.java +++ b/Mage.Sets/src/mage/cards/n/NemesisMask.java @@ -36,6 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class NemesisMask extends CardImpl { public NemesisMask(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // All creatures able to block equipped creature do so. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, diff --git a/Mage.Sets/src/mage/cards/n/NemesisOfMortals.java b/Mage.Sets/src/mage/cards/n/NemesisOfMortals.java index 0545fa66b1..3fe0b24d48 100644 --- a/Mage.Sets/src/mage/cards/n/NemesisOfMortals.java +++ b/Mage.Sets/src/mage/cards/n/NemesisOfMortals.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MonstrosityAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.CostModificationType; import mage.constants.Duration; import mage.constants.Outcome; @@ -55,7 +56,7 @@ public class NemesisOfMortals extends CardImpl { public NemesisOfMortals(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/n/NemesisOfReason.java b/Mage.Sets/src/mage/cards/n/NemesisOfReason.java index bc9221c987..3974c7b9e9 100644 --- a/Mage.Sets/src/mage/cards/n/NemesisOfReason.java +++ b/Mage.Sets/src/mage/cards/n/NemesisOfReason.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -49,8 +50,8 @@ public class NemesisOfReason extends CardImpl { public NemesisOfReason (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{B}"); - this.subtype.add("Leviathan"); - this.subtype.add("Horror"); + this.subtype.add(SubType.LEVIATHAN); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/n/NemesisTrap.java b/Mage.Sets/src/mage/cards/n/NemesisTrap.java index af5f67aafd..1a28e4260d 100644 --- a/Mage.Sets/src/mage/cards/n/NemesisTrap.java +++ b/Mage.Sets/src/mage/cards/n/NemesisTrap.java @@ -37,7 +37,7 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; @@ -111,7 +111,7 @@ class NemesisTrapEffect extends OneShotEffect { // exile target controller.moveCards(targetedCreature, Zone.EXILED, source, game); // create token - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(); effect.setTargetPointer(new FixedTarget(targetedCreature, game)); effect.apply(game, source); for (Permanent addedToken : effect.getAddedPermanent()) { diff --git a/Mage.Sets/src/mage/cards/n/NeophyteHateflayer.java b/Mage.Sets/src/mage/cards/n/NeophyteHateflayer.java index a2e2255d2b..c3dab477a4 100644 --- a/Mage.Sets/src/mage/cards/n/NeophyteHateflayer.java +++ b/Mage.Sets/src/mage/cards/n/NeophyteHateflayer.java @@ -1,69 +1,70 @@ -/* - * 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.cards.n; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.PayLifeCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.LoseLifeOpponentsEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; - -/** - * - * @author Styxo - */ -public class NeophyteHateflayer extends CardImpl { - - public NeophyteHateflayer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); - this.subtype.add("Human"); - this.subtype.add("Sith"); - this.power = new MageInt(1); - this.toughness = new MageInt(1); - - // {T}, Pay 1 life: Each opponent loses 1 life. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeOpponentsEffect(1), new TapSourceCost()); - ability.addCost(new PayLifeCost(1)); - this.addAbility(ability); - } - - public NeophyteHateflayer(final NeophyteHateflayer card) { - super(card); - } - - @Override - public NeophyteHateflayer copy() { - return new NeophyteHateflayer(this); - } -} +/* + * 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.cards.n; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author Styxo + */ +public class NeophyteHateflayer extends CardImpl { + + public NeophyteHateflayer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SITH); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {T}, Pay 1 life: Each opponent loses 1 life. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeOpponentsEffect(1), new TapSourceCost()); + ability.addCost(new PayLifeCost(1)); + this.addAbility(ability); + } + + public NeophyteHateflayer(final NeophyteHateflayer card) { + super(card); + } + + @Override + public NeophyteHateflayer copy() { + return new NeophyteHateflayer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/n/NephaliaMoondrakes.java b/Mage.Sets/src/mage/cards/n/NephaliaMoondrakes.java index 91dfe1edf8..4c35caed07 100644 --- a/Mage.Sets/src/mage/cards/n/NephaliaMoondrakes.java +++ b/Mage.Sets/src/mage/cards/n/NephaliaMoondrakes.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; @@ -53,7 +54,7 @@ public class NephaliaMoondrakes extends CardImpl { public NephaliaMoondrakes(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/n/NephaliaSeakite.java b/Mage.Sets/src/mage/cards/n/NephaliaSeakite.java index 48da94e7b0..2010caed19 100644 --- a/Mage.Sets/src/mage/cards/n/NephaliaSeakite.java +++ b/Mage.Sets/src/mage/cards/n/NephaliaSeakite.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class NephaliaSeakite extends CardImpl { public NephaliaSeakite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NephaliaSmuggler.java b/Mage.Sets/src/mage/cards/n/NephaliaSmuggler.java index 7f51f66dd9..e16b67f826 100644 --- a/Mage.Sets/src/mage/cards/n/NephaliaSmuggler.java +++ b/Mage.Sets/src/mage/cards/n/NephaliaSmuggler.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnToBattlefieldUnderYourControlTargetEf import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -55,8 +56,8 @@ public class NephaliaSmuggler extends CardImpl { public NephaliaSmuggler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NerfHerder.java b/Mage.Sets/src/mage/cards/n/NerfHerder.java index 99a6c0fef6..3f41b1198d 100644 --- a/Mage.Sets/src/mage/cards/n/NerfHerder.java +++ b/Mage.Sets/src/mage/cards/n/NerfHerder.java @@ -1,80 +1,81 @@ -/* - * 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.cards.n; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; -import mage.abilities.effects.common.cost.AbilitiesCostReductionControllerEffect; -import mage.abilities.keyword.MonstrosityAbility; -import mage.abilities.keyword.TrampleAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.counters.CounterType; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.CounterPredicate; - -/** - * - * @author Styxo - */ -public class NerfHerder extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Each creature with a +1/+1 counter on it"); - - static { - filter.add(new CounterPredicate(CounterType.P1P1)); - } - - public NerfHerder(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.power = new MageInt(2); - this.toughness = new MageInt(3); - - // Monstrosity abilities you activate cost {1} less to activate. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AbilitiesCostReductionControllerEffect(MonstrosityAbility.class, "Monstrosity"))); - - // Each creature you control with a +1/+1 counter on it has trample. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, filter))); - - } - - public NerfHerder(final NerfHerder card) { - super(card); - } - - @Override - public NerfHerder copy() { - return new NerfHerder(this); - } -} +/* + * 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.cards.n; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.effects.common.cost.AbilitiesCostReductionControllerEffect; +import mage.abilities.keyword.MonstrosityAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.CounterPredicate; + +/** + * + * @author Styxo + */ +public class NerfHerder extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Each creature with a +1/+1 counter on it"); + + static { + filter.add(new CounterPredicate(CounterType.P1P1)); + } + + public NerfHerder(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); + this.subtype.add(SubType.HUMAN); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Monstrosity abilities you activate cost {1} less to activate. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AbilitiesCostReductionControllerEffect(MonstrosityAbility.class, "Monstrosity"))); + + // Each creature you control with a +1/+1 counter on it has trample. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, filter))); + + } + + public NerfHerder(final NerfHerder card) { + super(card); + } + + @Override + public NerfHerder copy() { + return new NerfHerder(this); + } +} diff --git a/Mage.Sets/src/mage/cards/n/NessianAsp.java b/Mage.Sets/src/mage/cards/n/NessianAsp.java index 3bf470e5f3..76a24ef53b 100644 --- a/Mage.Sets/src/mage/cards/n/NessianAsp.java +++ b/Mage.Sets/src/mage/cards/n/NessianAsp.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class NessianAsp extends CardImpl { public NessianAsp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/n/NessianCourser.java b/Mage.Sets/src/mage/cards/n/NessianCourser.java index 0d7fd1849d..406ceeb439 100644 --- a/Mage.Sets/src/mage/cards/n/NessianCourser.java +++ b/Mage.Sets/src/mage/cards/n/NessianCourser.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class NessianCourser extends CardImpl { public NessianCourser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NessianDemolok.java b/Mage.Sets/src/mage/cards/n/NessianDemolok.java index 70b1769331..8e6d5f8322 100644 --- a/Mage.Sets/src/mage/cards/n/NessianDemolok.java +++ b/Mage.Sets/src/mage/cards/n/NessianDemolok.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TributeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -57,7 +58,7 @@ public class NessianDemolok extends CardImpl { public NessianDemolok(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NessianGameWarden.java b/Mage.Sets/src/mage/cards/n/NessianGameWarden.java index 1796a1c448..9f6511ef2c 100644 --- a/Mage.Sets/src/mage/cards/n/NessianGameWarden.java +++ b/Mage.Sets/src/mage/cards/n/NessianGameWarden.java @@ -57,8 +57,8 @@ import mage.target.TargetCard; public class NessianGameWarden extends CardImpl { public NessianGameWarden(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Beast"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(5); @@ -87,7 +87,7 @@ class NessianGameWardenEffect extends OneShotEffect { public NessianGameWardenEffect() { super(Outcome.DrawCard); - this.staticText = "look at the top X cards of your library, where X is the number of forests you control. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in any order"; + this.staticText = "look at the top X cards of your library, where X is the number of Forests you control. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in any order"; } public NessianGameWardenEffect(final NessianGameWardenEffect effect) { diff --git a/Mage.Sets/src/mage/cards/n/NessianWildsRavager.java b/Mage.Sets/src/mage/cards/n/NessianWildsRavager.java index 32a6179e88..f95b91bb9f 100644 --- a/Mage.Sets/src/mage/cards/n/NessianWildsRavager.java +++ b/Mage.Sets/src/mage/cards/n/NessianWildsRavager.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TributeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.common.TargetCreaturePermanent; @@ -55,7 +56,7 @@ public class NessianWildsRavager extends CardImpl { public NessianWildsRavager(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/n/NestInvader.java b/Mage.Sets/src/mage/cards/n/NestInvader.java index 8274e7bf58..d46400f1a9 100644 --- a/Mage.Sets/src/mage/cards/n/NestInvader.java +++ b/Mage.Sets/src/mage/cards/n/NestInvader.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.EldraziSpawnToken; /** @@ -45,8 +46,8 @@ public class NestInvader extends CardImpl { public NestInvader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NestOfScarabs.java b/Mage.Sets/src/mage/cards/n/NestOfScarabs.java index dafd2c3ebb..33258e5344 100644 --- a/Mage.Sets/src/mage/cards/n/NestOfScarabs.java +++ b/Mage.Sets/src/mage/cards/n/NestOfScarabs.java @@ -1,109 +1,109 @@ -/* - * 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.cards.n; - -import java.util.UUID; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.dynamicvalue.common.EffectKeyValue; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.counters.CounterType; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; -import mage.game.permanent.token.NestOfScarabsBlackInsectToken; - -/** - * - * @author stravant - */ -public class NestOfScarabs extends CardImpl { - - public NestOfScarabs(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); - - // Whenever you put one or more -1/-1 counters on a creature, create that many 1/1 black Insect tokens. - this.addAbility(new NestOfScarabsTriggeredAbility()); - - } - - public NestOfScarabs(final NestOfScarabs card) { - super(card); - } - - @Override - public NestOfScarabs copy() { - return new NestOfScarabs(this); - } -} - -class NestOfScarabsTriggeredAbility extends TriggeredAbilityImpl { - - NestOfScarabsTriggeredAbility() { - super(Zone.BATTLEFIELD, new CreateTokenEffect(new NestOfScarabsBlackInsectToken(), new EffectKeyValue("countersAdded"))); - } - - NestOfScarabsTriggeredAbility(final NestOfScarabsTriggeredAbility ability) { - super(ability); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.COUNTERS_ADDED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - boolean weAreDoingIt = getControllerId().equals(game.getControllerId(event.getSourceId())); - boolean isM1M1Counters = event.getData().equals(CounterType.M1M1.getName()); - if (weAreDoingIt && isM1M1Counters && event.getAmount() > 0) { - Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId()); - if (permanent == null) { - permanent = game.getPermanentEntering(event.getTargetId()); - } - if (permanent.isCreature()) { - getEffects().forEach(effect -> effect.setValue("countersAdded", event.getAmount())); - return true; - } - } - return false; - } - - @Override - public NestOfScarabsTriggeredAbility copy() { - return new NestOfScarabsTriggeredAbility(this); - } - - @Override - public String getRule() { - return "Whenever you put one or more -1/-1 counters on a creature, create that many 1/1 black Insect tokens."; - } -} +/* + * 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.cards.n; + +import java.util.UUID; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.dynamicvalue.common.EffectKeyValue; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.NestOfScarabsBlackInsectToken; + +/** + * + * @author stravant + */ +public class NestOfScarabs extends CardImpl { + + public NestOfScarabs(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + + // Whenever you put one or more -1/-1 counters on a creature, create that many 1/1 black Insect tokens. + this.addAbility(new NestOfScarabsTriggeredAbility()); + + } + + public NestOfScarabs(final NestOfScarabs card) { + super(card); + } + + @Override + public NestOfScarabs copy() { + return new NestOfScarabs(this); + } +} + +class NestOfScarabsTriggeredAbility extends TriggeredAbilityImpl { + + NestOfScarabsTriggeredAbility() { + super(Zone.BATTLEFIELD, new CreateTokenEffect(new NestOfScarabsBlackInsectToken(), new EffectKeyValue("countersAdded"))); + } + + NestOfScarabsTriggeredAbility(final NestOfScarabsTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.COUNTERS_ADDED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + boolean weAreDoingIt = getControllerId().equals(game.getControllerId(event.getSourceId())); + boolean isM1M1Counters = event.getData().equals(CounterType.M1M1.getName()); + if (weAreDoingIt && isM1M1Counters && event.getAmount() > 0) { + Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId()); + if (permanent == null) { + permanent = game.getPermanentEntering(event.getTargetId()); + } + if (permanent.isCreature()) { + getEffects().forEach(effect -> effect.setValue("countersAdded", event.getAmount())); + return true; + } + } + return false; + } + + @Override + public NestOfScarabsTriggeredAbility copy() { + return new NestOfScarabsTriggeredAbility(this); + } + + @Override + public String getRule() { + return "Whenever you put one or more -1/-1 counters on a creature, create that many 1/1 black Insect tokens."; + } +} diff --git a/Mage.Sets/src/mage/cards/n/NestRobber.java b/Mage.Sets/src/mage/cards/n/NestRobber.java new file mode 100644 index 0000000000..e768562b98 --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NestRobber.java @@ -0,0 +1,64 @@ +/* + * 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.cards.n; + +import java.util.UUID; +import mage.MageInt; +import mage.constants.SubType; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class NestRobber extends CardImpl { + + public NestRobber(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + } + + public NestRobber(final NestRobber card) { + super(card); + } + + @Override + public NestRobber copy() { + return new NestRobber(this); + } +} diff --git a/Mage.Sets/src/mage/cards/n/NestedGhoul.java b/Mage.Sets/src/mage/cards/n/NestedGhoul.java index f931a46e14..ed6721e6ad 100644 --- a/Mage.Sets/src/mage/cards/n/NestedGhoul.java +++ b/Mage.Sets/src/mage/cards/n/NestedGhoul.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -48,8 +49,8 @@ public class NestedGhoul extends CardImpl { public NestedGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NestingWurm.java b/Mage.Sets/src/mage/cards/n/NestingWurm.java new file mode 100644 index 0000000000..fad687d2e7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NestingWurm.java @@ -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.cards.n; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author L_J (based on BetaSteward_at_googlemail.com) + */ +public class NestingWurm extends CardImpl { + + private static final FilterCard filter = new FilterCard("cards named Nesting Wurm"); + + static { + filter.add(new NamePredicate("Nesting Wurm")); + } + + public NestingWurm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); + this.subtype.add(SubType.WURM); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // When Nesting Wurm enters the battlefield, you may search your library for up to three cards named Nesting Wurm, reveal them, and put them into your hand. If you do, shuffle your library. + TargetCardInLibrary target = new TargetCardInLibrary(0, 3, filter); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(target, true, true), true)); + } + + public NestingWurm(final NestingWurm card) { + super(card); + } + + @Override + public NestingWurm copy() { + return new NestingWurm(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/n/NetcasterSpider.java b/Mage.Sets/src/mage/cards/n/NetcasterSpider.java index 1268ac410a..426c8ce643 100644 --- a/Mage.Sets/src/mage/cards/n/NetcasterSpider.java +++ b/Mage.Sets/src/mage/cards/n/NetcasterSpider.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class NetcasterSpider extends CardImpl { public NetcasterSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NetherHorror.java b/Mage.Sets/src/mage/cards/n/NetherHorror.java index 1f4e9c42c3..d3f20c8221 100644 --- a/Mage.Sets/src/mage/cards/n/NetherHorror.java +++ b/Mage.Sets/src/mage/cards/n/NetherHorror.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class NetherHorror extends CardImpl { public NetherHorror(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NetherShadow.java b/Mage.Sets/src/mage/cards/n/NetherShadow.java index 85e70688f8..1a9fea349e 100644 --- a/Mage.Sets/src/mage/cards/n/NetherShadow.java +++ b/Mage.Sets/src/mage/cards/n/NetherShadow.java @@ -36,6 +36,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.game.Game; @@ -49,7 +50,7 @@ public class NetherShadow extends CardImpl { public NetherShadow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NetherSpirit.java b/Mage.Sets/src/mage/cards/n/NetherSpirit.java index 12f4e99e3e..6fffe30926 100644 --- a/Mage.Sets/src/mage/cards/n/NetherSpirit.java +++ b/Mage.Sets/src/mage/cards/n/NetherSpirit.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -53,7 +54,7 @@ public class NetherSpirit extends CardImpl { public NetherSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NetherTraitor.java b/Mage.Sets/src/mage/cards/n/NetherTraitor.java index 7bb62b1e5d..c3a4a54c15 100644 --- a/Mage.Sets/src/mage/cards/n/NetherTraitor.java +++ b/Mage.Sets/src/mage/cards/n/NetherTraitor.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.game.Game; @@ -52,7 +53,7 @@ public class NetherTraitor extends CardImpl { public NetherTraitor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NetherbornPhalanx.java b/Mage.Sets/src/mage/cards/n/NetherbornPhalanx.java index 242655073b..0afc6f5a71 100644 --- a/Mage.Sets/src/mage/cards/n/NetherbornPhalanx.java +++ b/Mage.Sets/src/mage/cards/n/NetherbornPhalanx.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TransmuteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.StaticFilters; import mage.game.Game; @@ -49,7 +50,7 @@ public class NetherbornPhalanx extends CardImpl { public NetherbornPhalanx(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NetterEnDal.java b/Mage.Sets/src/mage/cards/n/NetterEnDal.java index 64a966b1f9..c0a5827744 100644 --- a/Mage.Sets/src/mage/cards/n/NetterEnDal.java +++ b/Mage.Sets/src/mage/cards/n/NetterEnDal.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.combat.CantAttackTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class NetterEnDal extends CardImpl { public NetterEnDal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NettleDrone.java b/Mage.Sets/src/mage/cards/n/NettleDrone.java index 4c3d7814d0..42a2298bd2 100644 --- a/Mage.Sets/src/mage/cards/n/NettleDrone.java +++ b/Mage.Sets/src/mage/cards/n/NettleDrone.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.FilterSpell; @@ -57,8 +58,8 @@ public class NettleDrone extends CardImpl { public NettleDrone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NettleSentinel.java b/Mage.Sets/src/mage/cards/n/NettleSentinel.java index 80fa25bd36..1089d4de1a 100644 --- a/Mage.Sets/src/mage/cards/n/NettleSentinel.java +++ b/Mage.Sets/src/mage/cards/n/NettleSentinel.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -55,8 +56,8 @@ public class NettleSentinel extends CardImpl { public NettleSentinel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NettleSwine.java b/Mage.Sets/src/mage/cards/n/NettleSwine.java index ec06585aa5..c37a5ef153 100644 --- a/Mage.Sets/src/mage/cards/n/NettleSwine.java +++ b/Mage.Sets/src/mage/cards/n/NettleSwine.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class NettleSwine extends CardImpl { public NettleSwine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Boar"); + this.subtype.add(SubType.BOAR); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NettletoothDjinn.java b/Mage.Sets/src/mage/cards/n/NettletoothDjinn.java index f1c634bfd7..fa949cb2c8 100644 --- a/Mage.Sets/src/mage/cards/n/NettletoothDjinn.java +++ b/Mage.Sets/src/mage/cards/n/NettletoothDjinn.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -44,7 +45,7 @@ public class NettletoothDjinn extends CardImpl { public NettletoothDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NettlevineBlight.java b/Mage.Sets/src/mage/cards/n/NettlevineBlight.java index a40095103b..23a52cc2af 100644 --- a/Mage.Sets/src/mage/cards/n/NettlevineBlight.java +++ b/Mage.Sets/src/mage/cards/n/NettlevineBlight.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -67,7 +68,7 @@ public class NettlevineBlight extends CardImpl { public NettlevineBlight(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{B}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature or land TargetPermanent auraTarget = new TargetPermanent(filter); diff --git a/Mage.Sets/src/mage/cards/n/NettlingImp.java b/Mage.Sets/src/mage/cards/n/NettlingImp.java index d81610c73d..bc84103208 100644 --- a/Mage.Sets/src/mage/cards/n/NettlingImp.java +++ b/Mage.Sets/src/mage/cards/n/NettlingImp.java @@ -70,7 +70,7 @@ public class NettlingImp extends CardImpl { public NettlingImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NeurokCommando.java b/Mage.Sets/src/mage/cards/n/NeurokCommando.java index c1a1b11ff7..ce899b1b1a 100644 --- a/Mage.Sets/src/mage/cards/n/NeurokCommando.java +++ b/Mage.Sets/src/mage/cards/n/NeurokCommando.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class NeurokCommando extends CardImpl { public NeurokCommando(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NeurokFamiliar.java b/Mage.Sets/src/mage/cards/n/NeurokFamiliar.java index 1deb40cf85..0a5f69667a 100644 --- a/Mage.Sets/src/mage/cards/n/NeurokFamiliar.java +++ b/Mage.Sets/src/mage/cards/n/NeurokFamiliar.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -53,7 +54,7 @@ public class NeurokFamiliar extends CardImpl { public NeurokFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NeurokHoversail.java b/Mage.Sets/src/mage/cards/n/NeurokHoversail.java index 7ae763a4e0..9e551f43d1 100644 --- a/Mage.Sets/src/mage/cards/n/NeurokHoversail.java +++ b/Mage.Sets/src/mage/cards/n/NeurokHoversail.java @@ -45,7 +45,7 @@ public class NeurokHoversail extends CardImpl { public NeurokHoversail(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has flying. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/n/NeurokInvisimancer.java b/Mage.Sets/src/mage/cards/n/NeurokInvisimancer.java index 0a8a89def9..3a71bd5f22 100644 --- a/Mage.Sets/src/mage/cards/n/NeurokInvisimancer.java +++ b/Mage.Sets/src/mage/cards/n/NeurokInvisimancer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -47,8 +48,8 @@ public class NeurokInvisimancer extends CardImpl { public NeurokInvisimancer (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NeurokProdigy.java b/Mage.Sets/src/mage/cards/n/NeurokProdigy.java index 501377d698..3749ad7fb0 100644 --- a/Mage.Sets/src/mage/cards/n/NeurokProdigy.java +++ b/Mage.Sets/src/mage/cards/n/NeurokProdigy.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -55,8 +56,8 @@ public class NeurokProdigy extends CardImpl { public NeurokProdigy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NeurokReplica.java b/Mage.Sets/src/mage/cards/n/NeurokReplica.java index 51dc61ad8e..26fe0ea2b7 100644 --- a/Mage.Sets/src/mage/cards/n/NeurokReplica.java +++ b/Mage.Sets/src/mage/cards/n/NeurokReplica.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class NeurokReplica extends CardImpl { public NeurokReplica (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(4); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{1}{U}")); diff --git a/Mage.Sets/src/mage/cards/n/NeurokSpy.java b/Mage.Sets/src/mage/cards/n/NeurokSpy.java index acd04ee625..aafcb7719e 100644 --- a/Mage.Sets/src/mage/cards/n/NeurokSpy.java +++ b/Mage.Sets/src/mage/cards/n/NeurokSpy.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterArtifactPermanent; @@ -48,8 +49,8 @@ public class NeurokSpy extends CardImpl { public NeurokSpy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NeurokStealthsuit.java b/Mage.Sets/src/mage/cards/n/NeurokStealthsuit.java index 1769413149..6c51920463 100644 --- a/Mage.Sets/src/mage/cards/n/NeurokStealthsuit.java +++ b/Mage.Sets/src/mage/cards/n/NeurokStealthsuit.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -53,7 +54,7 @@ public class NeurokStealthsuit extends CardImpl { public NeurokStealthsuit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has shroud. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ShroudAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/n/Nevermaker.java b/Mage.Sets/src/mage/cards/n/Nevermaker.java index acc19c8f22..a7bfbe0351 100644 --- a/Mage.Sets/src/mage/cards/n/Nevermaker.java +++ b/Mage.Sets/src/mage/cards/n/Nevermaker.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.Target; import mage.target.common.TargetNonlandPermanent; @@ -48,7 +49,7 @@ public class Nevermaker extends CardImpl { public Nevermaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NewBlood.java b/Mage.Sets/src/mage/cards/n/NewBlood.java new file mode 100644 index 0000000000..cd2c534219 --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NewBlood.java @@ -0,0 +1,226 @@ +/* + * 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.cards.n; + +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.abilities.text.TextPartSubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; +import mage.constants.*; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.TextPartSubtypePredicate; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +import java.util.LinkedHashSet; +import java.util.UUID; +import java.util.stream.Collectors; + +/** + * + * @author LevelX2 + */ +public class NewBlood extends CardImpl { + + public NewBlood(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}{B}"); + + TextPartSubType textPartVampire = (TextPartSubType) addTextPart(new TextPartSubType(SubType.VAMPIRE)); + FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("an untapped Vampire you control"); + filter.add(new TextPartSubtypePredicate(textPartVampire)); + filter.add(Predicates.not(new TappedPredicate())); + // As an additional cost to cast New Blood, tap an untapped Vampire you control. + this.getSpellAbility().addCost(new TapTargetCost( + new TargetControlledCreaturePermanent(1, 1, filter, true))); + + // Gain control of target creature. Change the text of that creature by replacing all instances of one creature type with Vampire. + getSpellAbility().addEffect(new NewBloodEffect()); + getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public NewBlood(final NewBlood card) { + super(card); + } + + @Override + public NewBlood copy() { + return new NewBlood(this); + } +} + +class NewBloodEffect extends OneShotEffect { + + public NewBloodEffect() { + super(Outcome.Benefit); + this.staticText = "Gain control of target creature. Change the text of that creature by replacing all instances of one creature type with Vampire"; + } + + public NewBloodEffect(final NewBloodEffect effect) { + super(effect); + } + + @Override + public NewBloodEffect copy() { + return new NewBloodEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Permanent targetPermanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, true); + effect.setTargetPointer(new FixedTarget(targetPermanent, game)); + game.addEffect(effect, source); + effect = new ChangeCreatureTypeTargetEffect(null, SubType.VAMPIRE, Duration.Custom); + effect.setTargetPointer(new FixedTarget(targetPermanent, game)); + game.addEffect(effect, source); + return true; + } + return false; + } +} + +class ChangeCreatureTypeTargetEffect extends ContinuousEffectImpl { + + private SubType fromSubType; + private SubType toSubType; + + public ChangeCreatureTypeTargetEffect(SubType fromSubType, SubType toSubType, Duration duration) { + super(duration, Layer.TextChangingEffects_3, SubLayer.NA, Outcome.Benefit); + this.fromSubType = fromSubType; + this.toSubType = toSubType; + } + + public ChangeCreatureTypeTargetEffect(final ChangeCreatureTypeTargetEffect effect) { + super(effect); + this.fromSubType = effect.fromSubType; + this.toSubType = effect.toSubType; + } + + @Override + public void init(Ability source, Game game) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null) { + return; + } + if (fromSubType == null) { + Choice typeChoice = new ChoiceImpl(true); + typeChoice.setMessage("Choose creature type to change to Vampire"); + typeChoice.setChoices(SubType.getCreatureTypes(false).stream().map(SubType::toString).collect(Collectors.toCollection(LinkedHashSet::new))); + while (!controller.choose(outcome, typeChoice, game)) { + if (!controller.canRespond()) { + return; + } + } + if (typeChoice.getChoice() == null) { + return; + } + fromSubType = SubType.byDescription(typeChoice.getChoice()); + if (!game.isSimulation()) { + game.informPlayers(controller.getLogName() + " has chosen the creature type: " + fromSubType.toString()); + } + } + + super.init(source, game); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null) { + return false; + } + if (fromSubType != null) { + boolean objectFound = false; + for (UUID targetId : targetPointer.getTargets(game, source)) { + MageObject targetObject = game.getObject(targetId); + if (targetObject != null) { + objectFound = true; + switch (layer) { + case TextChangingEffects_3: + targetObject.changeSubType(fromSubType, toSubType); + break; + case TypeChangingEffects_4: + if (sublayer == SubLayer.NA) { + if (targetObject.hasSubtype(fromSubType, game)) { + targetObject.getSubtype(game).remove(fromSubType); + if (!targetObject.hasSubtype(toSubType, game)) { + targetObject.getSubtype(game).add(toSubType); + } + } + break; + } + } + } + if (!objectFound && this.getDuration() == Duration.Custom) { + this.discard(); + } + } + return true; + } else { + throw new UnsupportedOperationException("No subtype to change set"); + } + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public boolean hasLayer(Layer layer) { + return layer == Layer.TextChangingEffects_3 + || layer == Layer.TypeChangingEffects_4; + } + + @Override + public ChangeCreatureTypeTargetEffect copy() { + return new ChangeCreatureTypeTargetEffect(this); + } + + @Override + public String getText(Mode mode) { + return "Change the text of that creature by replacing all instances of one creature type with Vampire"; + } +} diff --git a/Mage.Sets/src/mage/cards/n/NewHorizons.java b/Mage.Sets/src/mage/cards/n/NewHorizons.java new file mode 100644 index 0000000000..f98f447144 --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NewHorizons.java @@ -0,0 +1,92 @@ +/* + * 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.cards.n; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AddManaOfAnyColorEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LevelX2 + */ +public class NewHorizons extends CardImpl { + + public NewHorizons(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + + this.subtype.add(SubType.AURA); + + // Enchant land + TargetPermanent auraTarget = new TargetLandPermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // When New Horizons enters the battlefield, put a +1/+1 counter on target creature you control. + ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance())); + ability.addTarget(new TargetControlledCreaturePermanent()); + this.addAbility(ability); + + // Enchanted land has "{T]: Add two mana of any one color to your mana pool." + Ability gainedAbility = new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(2), new TapSourceCost()); + Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA); + effect.setText("Enchanted land has \"{T}: Add two mana of any one color to your mana pool.\""); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + } + + public NewHorizons(final NewHorizons card) { + super(card); + } + + @Override + public NewHorizons copy() { + return new NewHorizons(this); + } +} diff --git a/Mage.Sets/src/mage/cards/n/NewPerspectives.java b/Mage.Sets/src/mage/cards/n/NewPerspectives.java index 14769954e0..0ddda380cf 100644 --- a/Mage.Sets/src/mage/cards/n/NewPerspectives.java +++ b/Mage.Sets/src/mage/cards/n/NewPerspectives.java @@ -1,113 +1,113 @@ -/* - * 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.cards.n; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.ActivatedAbility; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.common.CyclingDiscardCost; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.cost.CostModificationEffectImpl; -import mage.abilities.keyword.CyclingAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.CostModificationType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.Game; -import mage.players.Player; - -/** - * - * @author LevelX2 - */ -public class NewPerspectives extends CardImpl { - - public NewPerspectives(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{5}{U}"); - - // When New Perspectives enters the battlefield, draw three cards. - this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(3))); - - // As long as you have seven or more cards in hand, you may pay {0} rather than pay cycling costs. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new NewPerspectivesCostModificationEffect())); - } - - public NewPerspectives(final NewPerspectives card) { - super(card); - } - - @Override - public NewPerspectives copy() { - return new NewPerspectives(this); - } -} - -class NewPerspectivesCostModificationEffect extends CostModificationEffectImpl { - - NewPerspectivesCostModificationEffect() { - super(Duration.Custom, Outcome.Benefit, CostModificationType.SET_COST); - this.staticText = "As long as you have seven or more cards in hand, you may pay {0} rather than pay cycling costs"; - } - - NewPerspectivesCostModificationEffect(final NewPerspectivesCostModificationEffect effect) { - super(effect); - } - - @Override - public boolean applies(Ability abilityToModify, Ability source, Game game) { - Player controller = game.getPlayer(abilityToModify.getControllerId()); - return controller != null - && controller.getId().equals(source.getControllerId()) - && abilityToModify instanceof CyclingAbility - && controller.getHand().size() >= 7; - } - - @Override - public boolean apply(Game game, Ability source, Ability abilityToModify) { - Player controller = game.getPlayer(abilityToModify.getControllerId()); - if (controller != null) { - if ((abilityToModify instanceof ActivatedAbility && ((ActivatedAbility) abilityToModify).isCheckPlayableMode()) || controller.chooseUse(Outcome.PlayForFree, "Pay {0} to cycle?", source, game)) { - abilityToModify.getCosts().clear(); - abilityToModify.getManaCostsToPay().clear(); - abilityToModify.getCosts().add(new CyclingDiscardCost()); - } - return true; - } - return false; - } - - @Override - public NewPerspectivesCostModificationEffect copy() { - return new NewPerspectivesCostModificationEffect(this); - } -} +/* + * 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.cards.n; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.ActivatedAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.CyclingDiscardCost; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.cost.CostModificationEffectImpl; +import mage.abilities.keyword.CyclingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.CostModificationType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class NewPerspectives extends CardImpl { + + public NewPerspectives(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{5}{U}"); + + // When New Perspectives enters the battlefield, draw three cards. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(3))); + + // As long as you have seven or more cards in hand, you may pay {0} rather than pay cycling costs. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new NewPerspectivesCostModificationEffect())); + } + + public NewPerspectives(final NewPerspectives card) { + super(card); + } + + @Override + public NewPerspectives copy() { + return new NewPerspectives(this); + } +} + +class NewPerspectivesCostModificationEffect extends CostModificationEffectImpl { + + NewPerspectivesCostModificationEffect() { + super(Duration.Custom, Outcome.Benefit, CostModificationType.SET_COST); + this.staticText = "As long as you have seven or more cards in hand, you may pay {0} rather than pay cycling costs"; + } + + NewPerspectivesCostModificationEffect(final NewPerspectivesCostModificationEffect effect) { + super(effect); + } + + @Override + public boolean applies(Ability abilityToModify, Ability source, Game game) { + Player controller = game.getPlayer(abilityToModify.getControllerId()); + return controller != null + && controller.getId().equals(source.getControllerId()) + && abilityToModify instanceof CyclingAbility + && controller.getHand().size() >= 7; + } + + @Override + public boolean apply(Game game, Ability source, Ability abilityToModify) { + Player controller = game.getPlayer(abilityToModify.getControllerId()); + if (controller != null) { + if ((abilityToModify instanceof ActivatedAbility && ((ActivatedAbility) abilityToModify).isCheckPlayableMode()) || controller.chooseUse(Outcome.PlayForFree, "Pay {0} to cycle?", source, game)) { + abilityToModify.getCosts().clear(); + abilityToModify.getManaCostsToPay().clear(); + abilityToModify.getCosts().add(new CyclingDiscardCost()); + } + return true; + } + return false; + } + + @Override + public NewPerspectivesCostModificationEffect copy() { + return new NewPerspectivesCostModificationEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/n/NewPrahvGuildmage.java b/Mage.Sets/src/mage/cards/n/NewPrahvGuildmage.java index e10527c0ba..c18c85c3bf 100644 --- a/Mage.Sets/src/mage/cards/n/NewPrahvGuildmage.java +++ b/Mage.Sets/src/mage/cards/n/NewPrahvGuildmage.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class NewPrahvGuildmage extends CardImpl { public NewPrahvGuildmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); diff --git a/Mage.Sets/src/mage/cards/n/NexuStalker.java b/Mage.Sets/src/mage/cards/n/NexuStalker.java index 43c2ae67a4..92b645cc43 100644 --- a/Mage.Sets/src/mage/cards/n/NexuStalker.java +++ b/Mage.Sets/src/mage/cards/n/NexuStalker.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MonstrosityAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class NexuStalker extends CardImpl { public NexuStalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NezumiBoneReader.java b/Mage.Sets/src/mage/cards/n/NezumiBoneReader.java index a4c80b4b14..2413cc41e6 100644 --- a/Mage.Sets/src/mage/cards/n/NezumiBoneReader.java +++ b/Mage.Sets/src/mage/cards/n/NezumiBoneReader.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; import mage.target.common.TargetControlledCreaturePermanent; @@ -50,8 +51,8 @@ public class NezumiBoneReader extends CardImpl { public NezumiBoneReader (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Rat"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.RAT); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NezumiCutthroat.java b/Mage.Sets/src/mage/cards/n/NezumiCutthroat.java index ea5644c90e..0b6240253b 100644 --- a/Mage.Sets/src/mage/cards/n/NezumiCutthroat.java +++ b/Mage.Sets/src/mage/cards/n/NezumiCutthroat.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -43,8 +44,8 @@ public class NezumiCutthroat extends CardImpl { public NezumiCutthroat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Rat"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.RAT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NezumiGraverobber.java b/Mage.Sets/src/mage/cards/n/NezumiGraverobber.java index b4d2534bf7..8c1104f6d5 100644 --- a/Mage.Sets/src/mage/cards/n/NezumiGraverobber.java +++ b/Mage.Sets/src/mage/cards/n/NezumiGraverobber.java @@ -40,6 +40,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -59,8 +60,8 @@ public class NezumiGraverobber extends CardImpl { public NezumiGraverobber(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Rat"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.RAT); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); @@ -124,8 +125,8 @@ class NighteyesTheDesecratorToken extends Token { addSuperType(SuperType.LEGENDARY); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Rat"); - subtype.add("Wizard"); + subtype.add(SubType.RAT); + subtype.add(SubType.WIZARD); power = new MageInt(4); toughness = new MageInt(2); // {4}{B}: Put target creature card from a graveyard onto the battlefield under your control. diff --git a/Mage.Sets/src/mage/cards/n/NezumiRonin.java b/Mage.Sets/src/mage/cards/n/NezumiRonin.java index e4f6a0fa6f..cd715b1749 100644 --- a/Mage.Sets/src/mage/cards/n/NezumiRonin.java +++ b/Mage.Sets/src/mage/cards/n/NezumiRonin.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.BushidoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class NezumiRonin extends CardImpl { public NezumiRonin (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Rat"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.RAT); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NezumiShadowWatcher.java b/Mage.Sets/src/mage/cards/n/NezumiShadowWatcher.java index acb7f8c174..f9bbf31370 100644 --- a/Mage.Sets/src/mage/cards/n/NezumiShadowWatcher.java +++ b/Mage.Sets/src/mage/cards/n/NezumiShadowWatcher.java @@ -56,8 +56,8 @@ public class NezumiShadowWatcher extends CardImpl { public NezumiShadowWatcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Rat"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.RAT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NezumiShortfang.java b/Mage.Sets/src/mage/cards/n/NezumiShortfang.java index 80dead995b..7deb035d6c 100644 --- a/Mage.Sets/src/mage/cards/n/NezumiShortfang.java +++ b/Mage.Sets/src/mage/cards/n/NezumiShortfang.java @@ -54,8 +54,8 @@ public class NezumiShortfang extends CardImpl { public NezumiShortfang(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Rat"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.RAT); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -90,8 +90,8 @@ class StabwhiskerTheOdious extends Token { addSuperType(SuperType.LEGENDARY); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Rat"); - subtype.add("Shaman"); + subtype.add(SubType.RAT); + subtype.add(SubType.SHAMAN); power = new MageInt(3); toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NiallSilvain.java b/Mage.Sets/src/mage/cards/n/NiallSilvain.java index 5f26fa08e5..675539cdfc 100644 --- a/Mage.Sets/src/mage/cards/n/NiallSilvain.java +++ b/Mage.Sets/src/mage/cards/n/NiallSilvain.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.RegenerateTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class NiallSilvain extends CardImpl { public NiallSilvain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}{G}"); - this.subtype.add("Ouphe"); + this.subtype.add(SubType.OUPHE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NiblisOfDusk.java b/Mage.Sets/src/mage/cards/n/NiblisOfDusk.java index 8e0973343e..d691c9f958 100644 --- a/Mage.Sets/src/mage/cards/n/NiblisOfDusk.java +++ b/Mage.Sets/src/mage/cards/n/NiblisOfDusk.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class NiblisOfDusk extends CardImpl { public NiblisOfDusk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NiblisOfFrost.java b/Mage.Sets/src/mage/cards/n/NiblisOfFrost.java index 6b68930876..cfa61dc351 100644 --- a/Mage.Sets/src/mage/cards/n/NiblisOfFrost.java +++ b/Mage.Sets/src/mage/cards/n/NiblisOfFrost.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.StaticFilters; import mage.filter.common.FilterCreaturePermanent; @@ -57,7 +58,7 @@ public class NiblisOfFrost extends CardImpl { public NiblisOfFrost(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NiblisOfTheBreath.java b/Mage.Sets/src/mage/cards/n/NiblisOfTheBreath.java index aa00363e32..8bac56bf58 100644 --- a/Mage.Sets/src/mage/cards/n/NiblisOfTheBreath.java +++ b/Mage.Sets/src/mage/cards/n/NiblisOfTheBreath.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,7 +51,7 @@ public class NiblisOfTheBreath extends CardImpl { public NiblisOfTheBreath(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NiblisOfTheMist.java b/Mage.Sets/src/mage/cards/n/NiblisOfTheMist.java index 2c48f5ca68..11597f491c 100644 --- a/Mage.Sets/src/mage/cards/n/NiblisOfTheMist.java +++ b/Mage.Sets/src/mage/cards/n/NiblisOfTheMist.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -46,7 +47,7 @@ public class NiblisOfTheMist extends CardImpl { public NiblisOfTheMist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NiblisOfTheUrn.java b/Mage.Sets/src/mage/cards/n/NiblisOfTheUrn.java index 807e3b086d..86c93e8796 100644 --- a/Mage.Sets/src/mage/cards/n/NiblisOfTheUrn.java +++ b/Mage.Sets/src/mage/cards/n/NiblisOfTheUrn.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -46,7 +47,7 @@ public class NiblisOfTheUrn extends CardImpl { public NiblisOfTheUrn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NicolBolas.java b/Mage.Sets/src/mage/cards/n/NicolBolas.java index b445e1cc60..a9c7c581f3 100644 --- a/Mage.Sets/src/mage/cards/n/NicolBolas.java +++ b/Mage.Sets/src/mage/cards/n/NicolBolas.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; @@ -50,8 +51,8 @@ public class NicolBolas extends CardImpl { public NicolBolas(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}{B}{B}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elder"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.ELDER); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/n/NicolBolasGodPharaoh.java b/Mage.Sets/src/mage/cards/n/NicolBolasGodPharaoh.java index 2567ecf350..ed909628df 100644 --- a/Mage.Sets/src/mage/cards/n/NicolBolasGodPharaoh.java +++ b/Mage.Sets/src/mage/cards/n/NicolBolasGodPharaoh.java @@ -70,7 +70,7 @@ public class NicolBolasGodPharaoh extends CardImpl { public NicolBolasGodPharaoh(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{U}{B}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Bolas"); + this.subtype.add(SubType.BOLAS); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(7)); diff --git a/Mage.Sets/src/mage/cards/n/NicolBolasPlaneswalker.java b/Mage.Sets/src/mage/cards/n/NicolBolasPlaneswalker.java index 20d8a9053c..3ed03a0803 100644 --- a/Mage.Sets/src/mage/cards/n/NicolBolasPlaneswalker.java +++ b/Mage.Sets/src/mage/cards/n/NicolBolasPlaneswalker.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.filter.FilterPermanent; @@ -62,7 +63,7 @@ public class NicolBolasPlaneswalker extends CardImpl { public NicolBolasPlaneswalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{4}{U}{B}{B}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Bolas"); + this.subtype.add(SubType.BOLAS); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); diff --git a/Mage.Sets/src/mage/cards/n/NicolBolasTheDeceiver.java b/Mage.Sets/src/mage/cards/n/NicolBolasTheDeceiver.java index 8e45c04297..f41f84cb8e 100644 --- a/Mage.Sets/src/mage/cards/n/NicolBolasTheDeceiver.java +++ b/Mage.Sets/src/mage/cards/n/NicolBolasTheDeceiver.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.TargetController; @@ -58,7 +59,7 @@ public class NicolBolasTheDeceiver extends CardImpl { public NicolBolasTheDeceiver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{5}{U}{B}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Bolas"); + this.subtype.add(SubType.BOLAS); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); // +3: Each opponent loses 3 life unless that player sacrifices a nonland permanent or discards a card. diff --git a/Mage.Sets/src/mage/cards/n/NightMarketAeronaut.java b/Mage.Sets/src/mage/cards/n/NightMarketAeronaut.java index f5137c51c5..74919d742c 100644 --- a/Mage.Sets/src/mage/cards/n/NightMarketAeronaut.java +++ b/Mage.Sets/src/mage/cards/n/NightMarketAeronaut.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.watchers.common.RevoltWatcher; @@ -49,8 +50,8 @@ public class NightMarketAeronaut extends CardImpl { public NightMarketAeronaut(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Aetherborn"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.AETHERBORN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NightMarketGuard.java b/Mage.Sets/src/mage/cards/n/NightMarketGuard.java index 57d96c86a7..449ed5ea2d 100644 --- a/Mage.Sets/src/mage/cards/n/NightMarketGuard.java +++ b/Mage.Sets/src/mage/cards/n/NightMarketGuard.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.CanBlockAdditionalCreatureEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class NightMarketGuard extends CardImpl { public NightMarketGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NightMarketLookout.java b/Mage.Sets/src/mage/cards/n/NightMarketLookout.java index f4599945e4..40794dd344 100644 --- a/Mage.Sets/src/mage/cards/n/NightMarketLookout.java +++ b/Mage.Sets/src/mage/cards/n/NightMarketLookout.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.LoseLifeOpponentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class NightMarketLookout extends CardImpl { public NightMarketLookout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NightRevelers.java b/Mage.Sets/src/mage/cards/n/NightRevelers.java index 959d761a7d..4a0715383a 100644 --- a/Mage.Sets/src/mage/cards/n/NightRevelers.java +++ b/Mage.Sets/src/mage/cards/n/NightRevelers.java @@ -51,7 +51,7 @@ public class NightRevelers extends CardImpl { public NightRevelers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.color.setRed(true); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NightfallPredator.java b/Mage.Sets/src/mage/cards/n/NightfallPredator.java index 6e3c073b39..e64a86bce8 100644 --- a/Mage.Sets/src/mage/cards/n/NightfallPredator.java +++ b/Mage.Sets/src/mage/cards/n/NightfallPredator.java @@ -43,6 +43,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class NightfallPredator extends CardImpl { public NightfallPredator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.color.setGreen(true); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NightfireGiant.java b/Mage.Sets/src/mage/cards/n/NightfireGiant.java index a159603fc6..9ebb31f9eb 100644 --- a/Mage.Sets/src/mage/cards/n/NightfireGiant.java +++ b/Mage.Sets/src/mage/cards/n/NightfireGiant.java @@ -59,8 +59,8 @@ public class NightfireGiant extends CardImpl { public NightfireGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Giant"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NightguardPatrol.java b/Mage.Sets/src/mage/cards/n/NightguardPatrol.java index 6bfbf5f26a..dd0d8ec311 100644 --- a/Mage.Sets/src/mage/cards/n/NightguardPatrol.java +++ b/Mage.Sets/src/mage/cards/n/NightguardPatrol.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class NightguardPatrol extends CardImpl { public NightguardPatrol (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/Nighthowler.java b/Mage.Sets/src/mage/cards/n/Nighthowler.java index de7f372842..b3ec05b986 100644 --- a/Mage.Sets/src/mage/cards/n/Nighthowler.java +++ b/Mage.Sets/src/mage/cards/n/Nighthowler.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.BestowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -52,7 +53,7 @@ public class Nighthowler extends CardImpl { public Nighthowler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/n/Nightmare.java b/Mage.Sets/src/mage/cards/n/Nightmare.java index ce40dd3017..2eaf737afe 100644 --- a/Mage.Sets/src/mage/cards/n/Nightmare.java +++ b/Mage.Sets/src/mage/cards/n/Nightmare.java @@ -56,8 +56,8 @@ public class Nightmare extends CardImpl { public Nightmare(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Nightmare"); - this.subtype.add("Horse"); + this.subtype.add(SubType.NIGHTMARE); + this.subtype.add(SubType.HORSE); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/n/NightmareLash.java b/Mage.Sets/src/mage/cards/n/NightmareLash.java index 4e9519100a..d433c431b6 100644 --- a/Mage.Sets/src/mage/cards/n/NightmareLash.java +++ b/Mage.Sets/src/mage/cards/n/NightmareLash.java @@ -54,7 +54,7 @@ public class NightmareLash extends CardImpl { public NightmareLash(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1 for each Swamp you control. PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(filter); diff --git a/Mage.Sets/src/mage/cards/n/NightscapeApprentice.java b/Mage.Sets/src/mage/cards/n/NightscapeApprentice.java index 8714dafc52..f8224777de 100644 --- a/Mage.Sets/src/mage/cards/n/NightscapeApprentice.java +++ b/Mage.Sets/src/mage/cards/n/NightscapeApprentice.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -53,8 +54,8 @@ public class NightscapeApprentice extends CardImpl { public NightscapeApprentice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NightscapeBattlemage.java b/Mage.Sets/src/mage/cards/n/NightscapeBattlemage.java index 2cfd64201f..0fefb009c1 100644 --- a/Mage.Sets/src/mage/cards/n/NightscapeBattlemage.java +++ b/Mage.Sets/src/mage/cards/n/NightscapeBattlemage.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -61,8 +62,8 @@ public class NightscapeBattlemage extends CardImpl { public NightscapeBattlemage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NightscapeFamiliar.java b/Mage.Sets/src/mage/cards/n/NightscapeFamiliar.java index 609f4c6637..fa23d42ccf 100644 --- a/Mage.Sets/src/mage/cards/n/NightscapeFamiliar.java +++ b/Mage.Sets/src/mage/cards/n/NightscapeFamiliar.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; @@ -59,7 +60,7 @@ public class NightscapeFamiliar extends CardImpl { public NightscapeFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NightscapeMaster.java b/Mage.Sets/src/mage/cards/n/NightscapeMaster.java index dab2edef31..68c9f47c58 100644 --- a/Mage.Sets/src/mage/cards/n/NightscapeMaster.java +++ b/Mage.Sets/src/mage/cards/n/NightscapeMaster.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class NightscapeMaster extends CardImpl { public NightscapeMaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NightshadeAssassin.java b/Mage.Sets/src/mage/cards/n/NightshadeAssassin.java index 1a1ad72c08..7ea30e38b5 100644 --- a/Mage.Sets/src/mage/cards/n/NightshadeAssassin.java +++ b/Mage.Sets/src/mage/cards/n/NightshadeAssassin.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.filter.FilterCard; @@ -60,8 +61,8 @@ public class NightshadeAssassin extends CardImpl { public NightshadeAssassin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NightshadePeddler.java b/Mage.Sets/src/mage/cards/n/NightshadePeddler.java index 9357ec9154..3c39d39a3c 100644 --- a/Mage.Sets/src/mage/cards/n/NightshadePeddler.java +++ b/Mage.Sets/src/mage/cards/n/NightshadePeddler.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SoulbondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class NightshadePeddler extends CardImpl { public NightshadePeddler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NightshadeSchemers.java b/Mage.Sets/src/mage/cards/n/NightshadeSchemers.java index ca98c82311..5f3302c3df 100644 --- a/Mage.Sets/src/mage/cards/n/NightshadeSchemers.java +++ b/Mage.Sets/src/mage/cards/n/NightshadeSchemers.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class NightshadeSchemers extends CardImpl { public NightshadeSchemers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Faerie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NightshadeStinger.java b/Mage.Sets/src/mage/cards/n/NightshadeStinger.java index 2ef2affaac..7662547c98 100644 --- a/Mage.Sets/src/mage/cards/n/NightshadeStinger.java +++ b/Mage.Sets/src/mage/cards/n/NightshadeStinger.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class NightshadeStinger extends CardImpl { public NightshadeStinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Faerie"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NightskyMimic.java b/Mage.Sets/src/mage/cards/n/NightskyMimic.java index d7bb2575aa..268d86b9ae 100644 --- a/Mage.Sets/src/mage/cards/n/NightskyMimic.java +++ b/Mage.Sets/src/mage/cards/n/NightskyMimic.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SubLayer; import mage.filter.FilterSpell; @@ -57,11 +58,11 @@ public class NightskyMimic extends CardImpl { filter.add(new ColorPredicate(ObjectColor.BLACK)); } - private String rule = "Whenever you cast a spell that's both white and black, {this} has base power and toughness 4/4 until end of turn and gains flying until end of turn"; + private String rule = "Whenever you cast a spell that's both white and black, {this} has base power and toughness 4/4 until end of turn and gains flying until end of turn."; public NightskyMimic(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W/B}"); - this.subtype.add("Shapeshifter"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W/B}"); + this.subtype.add(SubType.SHAPESHIFTER); this.color.setBlack(true); this.color.setWhite(true); diff --git a/Mage.Sets/src/mage/cards/n/NightsoilKami.java b/Mage.Sets/src/mage/cards/n/NightsoilKami.java index 3115ff6684..0348984f97 100644 --- a/Mage.Sets/src/mage/cards/n/NightsoilKami.java +++ b/Mage.Sets/src/mage/cards/n/NightsoilKami.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class NightsoilKami extends CardImpl { public NightsoilKami(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/Nightspider.java b/Mage.Sets/src/mage/cards/n/Nightspider.java index 659ac6f17f..5d0babd94a 100644 --- a/Mage.Sets/src/mage/cards/n/Nightspider.java +++ b/Mage.Sets/src/mage/cards/n/Nightspider.java @@ -1,61 +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.cards.n; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.keyword.DeathtouchAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class Nightspider extends CardImpl { - - public Nightspider(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Insect"); - this.power = new MageInt(1); - this.toughness = new MageInt(1); - - // Deathtouch - this.addAbility(DeathtouchAbility.getInstance()); - } - - public Nightspider(final Nightspider card) { - super(card); - } - - @Override - public Nightspider copy() { - return new Nightspider(this); - } -} +/* + * 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.cards.n; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.DeathtouchAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author Styxo + */ +public class Nightspider extends CardImpl { + + public Nightspider(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); + this.subtype.add(SubType.INSECT); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Deathtouch + this.addAbility(DeathtouchAbility.getInstance()); + } + + public Nightspider(final Nightspider card) { + super(card); + } + + @Override + public Nightspider copy() { + return new Nightspider(this); + } +} diff --git a/Mage.Sets/src/mage/cards/n/NightstalkerEngine.java b/Mage.Sets/src/mage/cards/n/NightstalkerEngine.java index ce76c7bb59..923dfb23b6 100644 --- a/Mage.Sets/src/mage/cards/n/NightstalkerEngine.java +++ b/Mage.Sets/src/mage/cards/n/NightstalkerEngine.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.SetPowerSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -47,7 +48,7 @@ public class NightstalkerEngine extends CardImpl { public NightstalkerEngine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Nightstalker"); + this.subtype.add(SubType.NIGHTSTALKER); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NightveilSpecter.java b/Mage.Sets/src/mage/cards/n/NightveilSpecter.java index b63cff0747..c9cb96360f 100644 --- a/Mage.Sets/src/mage/cards/n/NightveilSpecter.java +++ b/Mage.Sets/src/mage/cards/n/NightveilSpecter.java @@ -24,14 +24,14 @@ * 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.cards.n; import java.util.UUID; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; -import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.OneShotEffect; @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,24 +51,24 @@ import mage.players.Player; import mage.util.CardUtil; /** -* FAQ -* -* The card is exiled face up. All players may look at it. -* Playing a card exiled with Nightveil Specter follows all the normal rules for -* playing that card. You must pay its costs, and you must follow all timing -* restrictions, for example. -* -* Nightveil Specter's last ability applies to cards exiled with that specific -* Nightveil Specter, not any other creature named Nightveil Specter. You should -* keep cards exiled by different Nightveil Specters separate. -* -* @author LevelX2 -*/ + * FAQ + * + * The card is exiled face up. All players may look at it. Playing a card exiled + * with Nightveil Specter follows all the normal rules for playing that card. + * You must pay its costs, and you must follow all timing restrictions, for + * example. + * + * Nightveil Specter's last ability applies to cards exiled with that specific + * Nightveil Specter, not any other creature named Nightveil Specter. You should + * keep cards exiled by different Nightveil Specters separate. + * + * @author LevelX2 + */ public class NightveilSpecter extends CardImpl { public NightveilSpecter(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U/B}{U/B}{U/B}"); - this.subtype.add("Specter"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U/B}{U/B}{U/B}"); + this.subtype.add(SubType.SPECTER); this.power = new MageInt(2); this.toughness = new MageInt(3); @@ -76,7 +77,7 @@ public class NightveilSpecter extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Whenever Nightveil Specter deals combat damage to a player, that player exiles the top card of his or her library. - this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new NightveilSpecterExileEffect(),false, true)); + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new NightveilSpecterExileEffect(), false, true)); // You may play cards exiled with Nightveil Specter. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new NightveilSpecterEffect())); diff --git a/Mage.Sets/src/mage/cards/n/NightwindGlider.java b/Mage.Sets/src/mage/cards/n/NightwindGlider.java index 224e916e37..f50796f37e 100644 --- a/Mage.Sets/src/mage/cards/n/NightwindGlider.java +++ b/Mage.Sets/src/mage/cards/n/NightwindGlider.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class NightwindGlider extends CardImpl { public NightwindGlider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NightwingShade.java b/Mage.Sets/src/mage/cards/n/NightwingShade.java index ec306e6596..a776536e85 100644 --- a/Mage.Sets/src/mage/cards/n/NightwingShade.java +++ b/Mage.Sets/src/mage/cards/n/NightwingShade.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class NightwingShade extends CardImpl { public NightwingShade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Shade"); + this.subtype.add(SubType.SHADE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/Nihilith.java b/Mage.Sets/src/mage/cards/n/Nihilith.java index 1d5a87a90d..beafa47526 100644 --- a/Mage.Sets/src/mage/cards/n/Nihilith.java +++ b/Mage.Sets/src/mage/cards/n/Nihilith.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SetTargetPointer; import mage.constants.TargetController; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class Nihilith extends CardImpl { public Nihilith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NikkoOnna.java b/Mage.Sets/src/mage/cards/n/NikkoOnna.java index d7ce014ab1..ce44cf4578 100644 --- a/Mage.Sets/src/mage/cards/n/NikkoOnna.java +++ b/Mage.Sets/src/mage/cards/n/NikkoOnna.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetEnchantmentPermanent; @@ -47,7 +48,7 @@ public class NikkoOnna extends CardImpl { public NikkoOnna(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NimAbomination.java b/Mage.Sets/src/mage/cards/n/NimAbomination.java index adacfdb3e6..43db989739 100644 --- a/Mage.Sets/src/mage/cards/n/NimAbomination.java +++ b/Mage.Sets/src/mage/cards/n/NimAbomination.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.game.Game; @@ -50,7 +51,7 @@ public class NimAbomination extends CardImpl { public NimAbomination(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NimDeathmantle.java b/Mage.Sets/src/mage/cards/n/NimDeathmantle.java index add8f8fe35..968ba66159 100644 --- a/Mage.Sets/src/mage/cards/n/NimDeathmantle.java +++ b/Mage.Sets/src/mage/cards/n/NimDeathmantle.java @@ -28,6 +28,7 @@ package mage.cards.n; import java.util.UUID; + import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; @@ -44,7 +45,12 @@ import mage.abilities.keyword.IntimidateAbility; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.*; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; @@ -62,7 +68,7 @@ public class NimDeathmantle extends CardImpl { public NimDeathmantle(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(4))); @@ -70,7 +76,7 @@ public class NimDeathmantle extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(IntimidateAbility.getInstance(), AttachmentType.EQUIPMENT))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetCardColorAttachedEffect(ObjectColor.BLACK, Duration.WhileOnBattlefield, AttachmentType.EQUIPMENT))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetCardSubtypeAttachedEffect(SubType.ZOMBIE, Duration.WhileOnBattlefield, AttachmentType.EQUIPMENT))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetCardSubtypeAttachedEffect(Duration.WhileOnBattlefield, AttachmentType.EQUIPMENT, SubType.ZOMBIE))); // Whenever a nontoken creature is put into your graveyard from the battlefield, you may pay {4}. If you do, return that card to the battlefield and attach Nim Deathmantle to it. this.addAbility(new NimDeathmantleTriggeredAbility()); diff --git a/Mage.Sets/src/mage/cards/n/NimDevourer.java b/Mage.Sets/src/mage/cards/n/NimDevourer.java index 6a33bde8cb..6320b7ab3a 100644 --- a/Mage.Sets/src/mage/cards/n/NimDevourer.java +++ b/Mage.Sets/src/mage/cards/n/NimDevourer.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.PhaseStep; @@ -69,7 +70,7 @@ public class NimDevourer extends CardImpl { public NimDevourer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NimGrotesque.java b/Mage.Sets/src/mage/cards/n/NimGrotesque.java index e45d8f22bd..4cd061ab35 100644 --- a/Mage.Sets/src/mage/cards/n/NimGrotesque.java +++ b/Mage.Sets/src/mage/cards/n/NimGrotesque.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; @@ -48,7 +49,7 @@ public class NimGrotesque extends CardImpl { public NimGrotesque(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/n/NimLasher.java b/Mage.Sets/src/mage/cards/n/NimLasher.java index c130bb0eab..23771cdbaf 100644 --- a/Mage.Sets/src/mage/cards/n/NimLasher.java +++ b/Mage.Sets/src/mage/cards/n/NimLasher.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -54,7 +55,7 @@ public class NimLasher extends CardImpl { public NimLasher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NimReplica.java b/Mage.Sets/src/mage/cards/n/NimReplica.java index 745c40a369..18000a8764 100644 --- a/Mage.Sets/src/mage/cards/n/NimReplica.java +++ b/Mage.Sets/src/mage/cards/n/NimReplica.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class NimReplica extends CardImpl { public NimReplica(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(1); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-1, -1, Duration.EndOfTurn), new ManaCostsImpl("{2}{B}")); diff --git a/Mage.Sets/src/mage/cards/n/NimShambler.java b/Mage.Sets/src/mage/cards/n/NimShambler.java index 37df75c1a7..05db700f85 100644 --- a/Mage.Sets/src/mage/cards/n/NimShambler.java +++ b/Mage.Sets/src/mage/cards/n/NimShambler.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -58,7 +59,7 @@ public class NimShambler extends CardImpl { public NimShambler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NimShrieker.java b/Mage.Sets/src/mage/cards/n/NimShrieker.java index 88266e372f..4dd205a103 100644 --- a/Mage.Sets/src/mage/cards/n/NimShrieker.java +++ b/Mage.Sets/src/mage/cards/n/NimShrieker.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -55,7 +56,7 @@ public class NimShrieker extends CardImpl { public NimShrieker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NimanaSellSword.java b/Mage.Sets/src/mage/cards/n/NimanaSellSword.java index 35b1ab1b5f..623aa906da 100644 --- a/Mage.Sets/src/mage/cards/n/NimanaSellSword.java +++ b/Mage.Sets/src/mage/cards/n/NimanaSellSword.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -44,9 +45,9 @@ public class NimanaSellSword extends CardImpl { public NimanaSellSword(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NimbleBladeKhenra.java b/Mage.Sets/src/mage/cards/n/NimbleBladeKhenra.java index ecc07a4f4e..92a1181dba 100644 --- a/Mage.Sets/src/mage/cards/n/NimbleBladeKhenra.java +++ b/Mage.Sets/src/mage/cards/n/NimbleBladeKhenra.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class NimbleBladeKhenra extends CardImpl { public NimbleBladeKhenra(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Jackal"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.JACKAL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NimbleInnovator.java b/Mage.Sets/src/mage/cards/n/NimbleInnovator.java index ebd88ea196..c39c852163 100644 --- a/Mage.Sets/src/mage/cards/n/NimbleInnovator.java +++ b/Mage.Sets/src/mage/cards/n/NimbleInnovator.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class NimbleInnovator extends CardImpl { public NimbleInnovator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NimbleMongoose.java b/Mage.Sets/src/mage/cards/n/NimbleMongoose.java index a041881a20..04beb8864b 100644 --- a/Mage.Sets/src/mage/cards/n/NimbleMongoose.java +++ b/Mage.Sets/src/mage/cards/n/NimbleMongoose.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class NimbleMongoose extends CardImpl { public NimbleMongoose(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Mongoose"); + this.subtype.add(SubType.MONGOOSE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NimbleObstructionist.java b/Mage.Sets/src/mage/cards/n/NimbleObstructionist.java index 6057b41bde..d8ed5a0962 100644 --- a/Mage.Sets/src/mage/cards/n/NimbleObstructionist.java +++ b/Mage.Sets/src/mage/cards/n/NimbleObstructionist.java @@ -1,89 +1,90 @@ -/* - * 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.cards.n; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.CycleTriggeredAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.CounterTargetEffect; -import mage.abilities.keyword.CyclingAbility; -import mage.abilities.keyword.FlashAbility; -import mage.abilities.keyword.FlyingAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.TargetController; -import mage.filter.FilterStackObject; -import mage.filter.predicate.permanent.ControllerPredicate; -import mage.target.common.TargetActivatedOrTriggeredAbility; - -/** - * - * @author caldover - */ -public class NimbleObstructionist extends CardImpl { - - private static final FilterStackObject filter = new FilterStackObject("activated or triggered ability you don't control"); - static { - filter.add(new ControllerPredicate(TargetController.NOT_YOU)); - } - - public NimbleObstructionist(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - - this.subtype.add("Bird"); - this.subtype.add("Wizard"); - this.power = new MageInt(3); - this.toughness = new MageInt(1); - - // Flash - this.addAbility(FlashAbility.getInstance()); - - // Flying - this.addAbility(FlyingAbility.getInstance()); - - // Cycling {2}{U} - this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}{U}"))); - - // When you cycle Nimble Obstructionist, counter target activated or triggered ability you don't control. - Ability ability = new CycleTriggeredAbility(new CounterTargetEffect()); - ability.addTarget(new TargetActivatedOrTriggeredAbility(filter)); - this.addAbility(ability); - } - - public NimbleObstructionist(final NimbleObstructionist card) { - super(card); - } - - @Override - public NimbleObstructionist copy() { - return new NimbleObstructionist(this); - } -} +/* + * 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.cards.n; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.CycleTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.abilities.keyword.CyclingAbility; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.FilterStackObject; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetActivatedOrTriggeredAbility; + +/** + * + * @author caldover + */ +public class NimbleObstructionist extends CardImpl { + + private static final FilterStackObject filter = new FilterStackObject("activated or triggered ability you don't control"); + static { + filter.add(new ControllerPredicate(TargetController.NOT_YOU)); + } + + public NimbleObstructionist(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Cycling {2}{U} + this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}{U}"))); + + // When you cycle Nimble Obstructionist, counter target activated or triggered ability you don't control. + Ability ability = new CycleTriggeredAbility(new CounterTargetEffect()); + ability.addTarget(new TargetActivatedOrTriggeredAbility(filter)); + this.addAbility(ability); + } + + public NimbleObstructionist(final NimbleObstructionist card) { + super(card); + } + + @Override + public NimbleObstructionist copy() { + return new NimbleObstructionist(this); + } +} diff --git a/Mage.Sets/src/mage/cards/n/NimbusNaiad.java b/Mage.Sets/src/mage/cards/n/NimbusNaiad.java index 345be14548..ddc52b279d 100644 --- a/Mage.Sets/src/mage/cards/n/NimbusNaiad.java +++ b/Mage.Sets/src/mage/cards/n/NimbusNaiad.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -50,7 +51,7 @@ public class NimbusNaiad extends CardImpl { public NimbusNaiad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{U}"); - this.subtype.add("Nymph"); + this.subtype.add(SubType.NYMPH); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NimbusOfTheIsles.java b/Mage.Sets/src/mage/cards/n/NimbusOfTheIsles.java index ead46c5f4d..e39867b2e1 100644 --- a/Mage.Sets/src/mage/cards/n/NimbusOfTheIsles.java +++ b/Mage.Sets/src/mage/cards/n/NimbusOfTheIsles.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class NimbusOfTheIsles extends CardImpl { public NimbusOfTheIsles(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NimbusSwimmer.java b/Mage.Sets/src/mage/cards/n/NimbusSwimmer.java index b7fc560564..5e67b928ec 100644 --- a/Mage.Sets/src/mage/cards/n/NimbusSwimmer.java +++ b/Mage.Sets/src/mage/cards/n/NimbusSwimmer.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,7 +46,7 @@ public class NimbusSwimmer extends CardImpl { public NimbusSwimmer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{X}{G}{U}"); - this.subtype.add("Leviathan"); + this.subtype.add(SubType.LEVIATHAN); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/n/NimbusWings.java b/Mage.Sets/src/mage/cards/n/NimbusWings.java index fae28a1558..bd67b9204a 100644 --- a/Mage.Sets/src/mage/cards/n/NimbusWings.java +++ b/Mage.Sets/src/mage/cards/n/NimbusWings.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class NimbusWings extends CardImpl { public NimbusWings (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/n/NinThePainArtist.java b/Mage.Sets/src/mage/cards/n/NinThePainArtist.java index 8e9f682a1d..98c81d51a5 100644 --- a/Mage.Sets/src/mage/cards/n/NinThePainArtist.java +++ b/Mage.Sets/src/mage/cards/n/NinThePainArtist.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class NinThePainArtist extends CardImpl { public NinThePainArtist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vedalken"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NinjaOfTheDeepHours.java b/Mage.Sets/src/mage/cards/n/NinjaOfTheDeepHours.java index 6e37369c48..144963ae7a 100644 --- a/Mage.Sets/src/mage/cards/n/NinjaOfTheDeepHours.java +++ b/Mage.Sets/src/mage/cards/n/NinjaOfTheDeepHours.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.NinjutsuAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class NinjaOfTheDeepHours extends CardImpl { public NinjaOfTheDeepHours(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Ninja"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NINJA); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NinthBridgePatrol.java b/Mage.Sets/src/mage/cards/n/NinthBridgePatrol.java index 44bc7099e3..09928a8c67 100644 --- a/Mage.Sets/src/mage/cards/n/NinthBridgePatrol.java +++ b/Mage.Sets/src/mage/cards/n/NinthBridgePatrol.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; @@ -56,8 +57,8 @@ public class NinthBridgePatrol extends CardImpl { public NinthBridgePatrol(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Dwarf"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NipGwyllion.java b/Mage.Sets/src/mage/cards/n/NipGwyllion.java index caa0a9cdbd..6a075621e8 100644 --- a/Mage.Sets/src/mage/cards/n/NipGwyllion.java +++ b/Mage.Sets/src/mage/cards/n/NipGwyllion.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class NipGwyllion extends CardImpl { public NipGwyllion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W/B}"); - this.subtype.add("Hag"); + this.subtype.add(SubType.HAG); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NirkanaAssassin.java b/Mage.Sets/src/mage/cards/n/NirkanaAssassin.java index 830315b56b..130797b6dc 100644 --- a/Mage.Sets/src/mage/cards/n/NirkanaAssassin.java +++ b/Mage.Sets/src/mage/cards/n/NirkanaAssassin.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,9 +46,9 @@ public class NirkanaAssassin extends CardImpl { public NirkanaAssassin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Assassin"); - this.subtype.add("Ally"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.ASSASSIN); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NirkanaCutthroat.java b/Mage.Sets/src/mage/cards/n/NirkanaCutthroat.java index 79ba4f20d8..a3f4d2530a 100644 --- a/Mage.Sets/src/mage/cards/n/NirkanaCutthroat.java +++ b/Mage.Sets/src/mage/cards/n/NirkanaCutthroat.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.LevelerCardBuilder; import mage.cards.CardSetInfo; import mage.cards.LevelerCard; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -50,8 +51,8 @@ public class NirkanaCutthroat extends LevelerCard { public NirkanaCutthroat (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WARRIOR); this.color.setBlack(true); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NirkanaRevenant.java b/Mage.Sets/src/mage/cards/n/NirkanaRevenant.java index 4ebcc73739..4d8b31f4ea 100644 --- a/Mage.Sets/src/mage/cards/n/NirkanaRevenant.java +++ b/Mage.Sets/src/mage/cards/n/NirkanaRevenant.java @@ -56,8 +56,8 @@ public class NirkanaRevenant extends CardImpl { public NirkanaRevenant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Shade"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SHADE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NissaGenesisMage.java b/Mage.Sets/src/mage/cards/n/NissaGenesisMage.java index 34c089ab8b..f06bd347c3 100644 --- a/Mage.Sets/src/mage/cards/n/NissaGenesisMage.java +++ b/Mage.Sets/src/mage/cards/n/NissaGenesisMage.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterCard; @@ -57,12 +58,12 @@ public class NissaGenesisMage extends CardImpl { public NissaGenesisMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{5}{G}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Nissa"); + this.subtype.add(SubType.NISSA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); //+2: Untap up to two target creatures and up to two target lands. - Ability ability = new LoyaltyAbility(new UntapTargetEffect().setText("Untap up to two target creatures and up to two target lands"), +2); + Ability ability = new LoyaltyAbility(new UntapTargetEffect(false).setText("Untap up to two target creatures and up to two target lands"), +2); ability.addTarget(new TargetCreaturePermanent(0, 2, new FilterCreaturePermanent("target creatures"), false)); ability.addTarget(new TargetLandPermanent(0, 2, new FilterLandPermanent("target land"), false)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/n/NissaNaturesArtisan.java b/Mage.Sets/src/mage/cards/n/NissaNaturesArtisan.java index a6692474ee..9611d76125 100644 --- a/Mage.Sets/src/mage/cards/n/NissaNaturesArtisan.java +++ b/Mage.Sets/src/mage/cards/n/NissaNaturesArtisan.java @@ -46,6 +46,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SuperType; @@ -63,7 +64,7 @@ public class NissaNaturesArtisan extends CardImpl { public NissaNaturesArtisan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{4}{G}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Nissa"); + this.subtype.add(SubType.NISSA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); diff --git a/Mage.Sets/src/mage/cards/n/NissaRevane.java b/Mage.Sets/src/mage/cards/n/NissaRevane.java index 7595cac18f..fb4d6949ef 100644 --- a/Mage.Sets/src/mage/cards/n/NissaRevane.java +++ b/Mage.Sets/src/mage/cards/n/NissaRevane.java @@ -64,7 +64,7 @@ public class NissaRevane extends CardImpl { public NissaRevane(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{2}{G}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Nissa"); + this.subtype.add(SubType.NISSA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(2)); LoyaltyAbility ability1 = new LoyaltyAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(1, nissasChosenFilter)), 1); diff --git a/Mage.Sets/src/mage/cards/n/NissaSageAnimist.java b/Mage.Sets/src/mage/cards/n/NissaSageAnimist.java index d3cb2a122b..99b5bbf931 100644 --- a/Mage.Sets/src/mage/cards/n/NissaSageAnimist.java +++ b/Mage.Sets/src/mage/cards/n/NissaSageAnimist.java @@ -58,7 +58,7 @@ public class NissaSageAnimist extends CardImpl { public NissaSageAnimist(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, ""); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Nissa"); + this.subtype.add(SubType.NISSA); this.color.setGreen(true); this.nightCard = true; diff --git a/Mage.Sets/src/mage/cards/n/NissaStewardOfElements.java b/Mage.Sets/src/mage/cards/n/NissaStewardOfElements.java index a149a299e5..7c3806fea1 100644 --- a/Mage.Sets/src/mage/cards/n/NissaStewardOfElements.java +++ b/Mage.Sets/src/mage/cards/n/NissaStewardOfElements.java @@ -63,7 +63,7 @@ public class NissaStewardOfElements extends CardImpl { public NissaStewardOfElements(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{X}{G}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Nissa"); + this.subtype.add(SubType.NISSA); Ability abilityETB = new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.LOYALTY.createInstance())); abilityETB.setRuleVisible(false); @@ -146,7 +146,7 @@ class NissaStewardOfElementsToken extends Token { public NissaStewardOfElementsToken() { super("", "5/5 Elemental creature with flying and haste"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(5); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/n/NissaVastwoodSeer.java b/Mage.Sets/src/mage/cards/n/NissaVastwoodSeer.java index 1e15d9599f..f65be76d66 100644 --- a/Mage.Sets/src/mage/cards/n/NissaVastwoodSeer.java +++ b/Mage.Sets/src/mage/cards/n/NissaVastwoodSeer.java @@ -64,8 +64,8 @@ public class NissaVastwoodSeer extends CardImpl { public NissaVastwoodSeer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NissaVitalForce.java b/Mage.Sets/src/mage/cards/n/NissaVitalForce.java index b1956ca605..ab31057baf 100644 --- a/Mage.Sets/src/mage/cards/n/NissaVitalForce.java +++ b/Mage.Sets/src/mage/cards/n/NissaVitalForce.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.TargetController; @@ -65,7 +66,7 @@ public class NissaVitalForce extends CardImpl { public NissaVitalForce(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{G}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Nissa"); + this.subtype.add(SubType.NISSA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); @@ -100,7 +101,7 @@ class NissaVitalForceToken extends Token { super("", "5/5 Elemental creature with haste"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(5); this.addAbility(HasteAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/n/NissaVoiceOfZendikar.java b/Mage.Sets/src/mage/cards/n/NissaVoiceOfZendikar.java index 7bb00cf137..4e30071d2b 100644 --- a/Mage.Sets/src/mage/cards/n/NissaVoiceOfZendikar.java +++ b/Mage.Sets/src/mage/cards/n/NissaVoiceOfZendikar.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.counters.CounterType; @@ -62,7 +63,7 @@ public class NissaVoiceOfZendikar extends CardImpl { public NissaVoiceOfZendikar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{1}{G}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Nissa"); + this.subtype.add(SubType.NISSA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/n/NissaWorldwaker.java b/Mage.Sets/src/mage/cards/n/NissaWorldwaker.java index a751f06440..71c80637b0 100644 --- a/Mage.Sets/src/mage/cards/n/NissaWorldwaker.java +++ b/Mage.Sets/src/mage/cards/n/NissaWorldwaker.java @@ -64,7 +64,7 @@ public class NissaWorldwaker extends CardImpl { public NissaWorldwaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{3}{G}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Nissa"); + this.subtype.add(SubType.NISSA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); @@ -144,7 +144,7 @@ class NissaWorldwakerToken extends Token { super("", "4/4 Elemental creature with trample"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); this.addAbility(TrampleAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/n/NissasChosen.java b/Mage.Sets/src/mage/cards/n/NissasChosen.java index 501d212d8f..729e794932 100644 --- a/Mage.Sets/src/mage/cards/n/NissasChosen.java +++ b/Mage.Sets/src/mage/cards/n/NissasChosen.java @@ -35,6 +35,7 @@ import mage.abilities.effects.ReplacementEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,8 +54,8 @@ public class NissasChosen extends CardImpl { public NissasChosen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NivMizzetDracogenius.java b/Mage.Sets/src/mage/cards/n/NivMizzetDracogenius.java index 5d122c8dea..83a14dd403 100644 --- a/Mage.Sets/src/mage/cards/n/NivMizzetDracogenius.java +++ b/Mage.Sets/src/mage/cards/n/NivMizzetDracogenius.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -52,8 +53,8 @@ public class NivMizzetDracogenius extends CardImpl { public NivMizzetDracogenius(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.DRAGON); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/n/NivMizzetTheFiremind.java b/Mage.Sets/src/mage/cards/n/NivMizzetTheFiremind.java index d8ef735786..e4b3cc805c 100644 --- a/Mage.Sets/src/mage/cards/n/NivMizzetTheFiremind.java +++ b/Mage.Sets/src/mage/cards/n/NivMizzetTheFiremind.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -52,8 +53,8 @@ public class NivMizzetTheFiremind extends CardImpl { public NivMizzetTheFiremind(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.DRAGON); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NivixBarrier.java b/Mage.Sets/src/mage/cards/n/NivixBarrier.java index 899af1daf9..a01cfa468f 100644 --- a/Mage.Sets/src/mage/cards/n/NivixBarrier.java +++ b/Mage.Sets/src/mage/cards/n/NivixBarrier.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetAttackingCreature; @@ -48,8 +49,8 @@ public class NivixBarrier extends CardImpl { public NivixBarrier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Illusion"); - this.subtype.add("Wall"); + this.subtype.add(SubType.ILLUSION); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NivixCyclops.java b/Mage.Sets/src/mage/cards/n/NivixCyclops.java index d032fb05a6..183432baa6 100644 --- a/Mage.Sets/src/mage/cards/n/NivixCyclops.java +++ b/Mage.Sets/src/mage/cards/n/NivixCyclops.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.filter.FilterSpell; @@ -62,7 +63,7 @@ public class NivixCyclops extends CardImpl { public NivixCyclops(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{R}"); - this.subtype.add("Cyclops"); + this.subtype.add(SubType.CYCLOPS); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NivixGuildmage.java b/Mage.Sets/src/mage/cards/n/NivixGuildmage.java index 62bc0a03fb..ec7ad76f76 100644 --- a/Mage.Sets/src/mage/cards/n/NivixGuildmage.java +++ b/Mage.Sets/src/mage/cards/n/NivixGuildmage.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.FilterSpell; @@ -62,8 +63,8 @@ public class NivixGuildmage extends CardImpl { public NivixGuildmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NivmagusElemental.java b/Mage.Sets/src/mage/cards/n/NivmagusElemental.java index 34a61a491b..946b574a2a 100644 --- a/Mage.Sets/src/mage/cards/n/NivmagusElemental.java +++ b/Mage.Sets/src/mage/cards/n/NivmagusElemental.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; @@ -56,22 +57,21 @@ public class NivmagusElemental extends CardImpl { static { filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(Predicates.or( - new CardTypePredicate(CardType.INSTANT), - new CardTypePredicate(CardType.SORCERY))); + new CardTypePredicate(CardType.INSTANT), + new CardTypePredicate(CardType.SORCERY))); } public NivmagusElemental(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U/R}"); - this.subtype.add("Elemental"); - + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U/R}"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(1); this.toughness = new MageInt(2); // Exile an instant or sorcery spell you control: Put two +1/+1 counters on Nivmagus Elemental. (That spell won't resolve.) - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)),new ExileFromStackCost(new TargetSpell(filter))); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), new ExileFromStackCost(new TargetSpell(filter))); this.addAbility(ability); - + } public NivmagusElemental(final NivmagusElemental card) { diff --git a/Mage.Sets/src/mage/cards/n/Nix.java b/Mage.Sets/src/mage/cards/n/Nix.java index 19f5e22061..093753ca04 100644 --- a/Mage.Sets/src/mage/cards/n/Nix.java +++ b/Mage.Sets/src/mage/cards/n/Nix.java @@ -1,85 +1,85 @@ -/* - * 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.cards.n; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalOneShotEffect; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.CounterTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.game.Game; -import mage.game.stack.StackObject; -import mage.target.TargetSpell; - -/** - * - * @author jeffwadsworth - */ -public class Nix extends CardImpl { - - public Nix(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}"); - - // Counter target spell if no mana was spent to cast it. - Effect effect = new ConditionalOneShotEffect(new CounterTargetEffect(), NoManaSpentToCastTargetCondition.instance); - effect.setText("Counter target spell if no mana was spent to cast it"); - this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetSpell()); - - } - - public Nix(final Nix card) { - super(card); - } - - @Override - public Nix copy() { - return new Nix(this); - } -} - -enum NoManaSpentToCastTargetCondition implements Condition { - - instance; - - @Override - public boolean apply(Game game, Ability source) { - UUID targetId = source.getFirstTarget(); - if (targetId != null) { - StackObject stackObject = game.getStack().getStackObject(targetId); - if (stackObject != null) { - return stackObject.getStackAbility().getManaCostsToPay().getPayment().count() == 0; - } - } - return false; - } -} +/* + * 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.cards.n; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.Game; +import mage.game.stack.StackObject; +import mage.target.TargetSpell; + +/** + * + * @author jeffwadsworth + */ +public class Nix extends CardImpl { + + public Nix(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}"); + + // Counter target spell if no mana was spent to cast it. + Effect effect = new ConditionalOneShotEffect(new CounterTargetEffect(), NoManaSpentToCastTargetCondition.instance); + effect.setText("Counter target spell if no mana was spent to cast it"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetSpell()); + + } + + public Nix(final Nix card) { + super(card); + } + + @Override + public Nix copy() { + return new Nix(this); + } +} + +enum NoManaSpentToCastTargetCondition implements Condition { + + instance; + + @Override + public boolean apply(Game game, Ability source) { + UUID targetId = source.getFirstTarget(); + if (targetId != null) { + StackObject stackObject = game.getStack().getStackObject(targetId); + if (stackObject != null) { + return stackObject.getStackAbility().getManaCostsToPay().getPayment().count() == 0; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/n/NoDachi.java b/Mage.Sets/src/mage/cards/n/NoDachi.java index 7813f35611..8309249a8f 100644 --- a/Mage.Sets/src/mage/cards/n/NoDachi.java +++ b/Mage.Sets/src/mage/cards/n/NoDachi.java @@ -46,7 +46,7 @@ public class NoDachi extends CardImpl { public NoDachi (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0))); diff --git a/Mage.Sets/src/mage/cards/n/NobilisOfWar.java b/Mage.Sets/src/mage/cards/n/NobilisOfWar.java index 7816248c95..fcd2b65ccf 100644 --- a/Mage.Sets/src/mage/cards/n/NobilisOfWar.java +++ b/Mage.Sets/src/mage/cards/n/NobilisOfWar.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterAttackingCreature; @@ -47,8 +48,8 @@ public class NobilisOfWar extends CardImpl { public NobilisOfWar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R/W}{R/W}{R/W}{R/W}{R/W}"); - this.subtype.add("Spirit"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NobleBenefactor.java b/Mage.Sets/src/mage/cards/n/NobleBenefactor.java index 0892b9b3a4..c35f585be8 100644 --- a/Mage.Sets/src/mage/cards/n/NobleBenefactor.java +++ b/Mage.Sets/src/mage/cards/n/NobleBenefactor.java @@ -35,6 +35,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -52,8 +53,8 @@ public class NobleBenefactor extends CardImpl { public NobleBenefactor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NobleHierarch.java b/Mage.Sets/src/mage/cards/n/NobleHierarch.java index 08463a3db9..353ee39476 100644 --- a/Mage.Sets/src/mage/cards/n/NobleHierarch.java +++ b/Mage.Sets/src/mage/cards/n/NobleHierarch.java @@ -37,6 +37,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** @@ -48,8 +49,8 @@ public class NobleHierarch extends CardImpl { public NobleHierarch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(0); this.toughness = new MageInt(1); this.addAbility(new ExaltedAbility()); diff --git a/Mage.Sets/src/mage/cards/n/NoblePanther.java b/Mage.Sets/src/mage/cards/n/NoblePanther.java index ee0b6271b6..f6e9f703dc 100644 --- a/Mage.Sets/src/mage/cards/n/NoblePanther.java +++ b/Mage.Sets/src/mage/cards/n/NoblePanther.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class NoblePanther extends CardImpl { public NoblePanther(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NobleQuarry.java b/Mage.Sets/src/mage/cards/n/NobleQuarry.java index 3cfd027fa2..e2a927da8f 100644 --- a/Mage.Sets/src/mage/cards/n/NobleQuarry.java +++ b/Mage.Sets/src/mage/cards/n/NobleQuarry.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class NobleQuarry extends CardImpl { public NobleQuarry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{G}"); - this.subtype.add("Unicorn"); + this.subtype.add(SubType.UNICORN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NobleSteeds.java b/Mage.Sets/src/mage/cards/n/NobleSteeds.java new file mode 100644 index 0000000000..c7a748569f --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NobleSteeds.java @@ -0,0 +1,70 @@ +/* + * 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.cards.n; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class NobleSteeds extends CardImpl { + + public NobleSteeds(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + + // {1}{W}: Target creature gains first strike until end of turn. + Ability ability = new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), + new ManaCostsImpl("{1}{W}") + ); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public NobleSteeds(final NobleSteeds card) { + super(card); + } + + @Override + public NobleSteeds copy() { + return new NobleSteeds(this); + } +} diff --git a/Mage.Sets/src/mage/cards/n/NobleTemplar.java b/Mage.Sets/src/mage/cards/n/NobleTemplar.java index f48ca98f34..b9eb8f4314 100644 --- a/Mage.Sets/src/mage/cards/n/NobleTemplar.java +++ b/Mage.Sets/src/mage/cards/n/NobleTemplar.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,9 +45,9 @@ public class NobleTemplar extends CardImpl { public NobleTemplar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/n/NobleVestige.java b/Mage.Sets/src/mage/cards/n/NobleVestige.java index a3b2a20e87..c841127ede 100644 --- a/Mage.Sets/src/mage/cards/n/NobleVestige.java +++ b/Mage.Sets/src/mage/cards/n/NobleVestige.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -49,7 +50,7 @@ public class NobleVestige extends CardImpl { public NobleVestige(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NoeticScales.java b/Mage.Sets/src/mage/cards/n/NoeticScales.java index eece749d0a..b0d2b2d068 100644 --- a/Mage.Sets/src/mage/cards/n/NoeticScales.java +++ b/Mage.Sets/src/mage/cards/n/NoeticScales.java @@ -1,101 +1,101 @@ -/* - * 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.cards.n; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.effects.OneShotEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; - -/** - * - * @author jeffwadsworth - */ -public class NoeticScales extends CardImpl { - - public NoeticScales(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); - - // At the beginning of each player's upkeep, return to its owner's hand each creature that player controls with power greater than the number of cards in his or her hand. - this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new NoeticScalesEffect(), TargetController.ANY, false, true)); - } - - public NoeticScales(final NoeticScales card) { - super(card); - } - - @Override - public NoeticScales copy() { - return new NoeticScales(this); - } -} - -class NoeticScalesEffect extends OneShotEffect { - - public NoeticScalesEffect() { - super(Outcome.ReturnToHand); - this.staticText = "return to its owner's hand each creature that player controls with power greater than the number of cards in his or her hand"; - } - - public NoeticScalesEffect(final NoeticScalesEffect effect) { - super(effect); - } - - @Override - public NoeticScalesEffect copy() { - return new NoeticScalesEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - FilterCreaturePermanent filter = new FilterCreaturePermanent(); - Player player = game.getPlayer(targetPointer.getFirst(game, source)); - if (player != null) { - int numberOfCardsInHand = player.getHand().size(); - for (Permanent creature : game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) { - if (creature.getPower().getValue() > numberOfCardsInHand) { - if (creature.moveToZone(Zone.HAND, source.getId(), game, false)) { - game.informPlayers(player.getLogName() + " moves " + creature.getLogName() + " from the battlefield to their hand."); - } - } - } - return true; - } - return false; - } -} +/* + * 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.cards.n; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author jeffwadsworth + */ +public class NoeticScales extends CardImpl { + + public NoeticScales(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); + + // At the beginning of each player's upkeep, return to its owner's hand each creature that player controls with power greater than the number of cards in his or her hand. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new NoeticScalesEffect(), TargetController.ANY, false, true)); + } + + public NoeticScales(final NoeticScales card) { + super(card); + } + + @Override + public NoeticScales copy() { + return new NoeticScales(this); + } +} + +class NoeticScalesEffect extends OneShotEffect { + + public NoeticScalesEffect() { + super(Outcome.ReturnToHand); + this.staticText = "return to its owner's hand each creature that player controls with power greater than the number of cards in his or her hand"; + } + + public NoeticScalesEffect(final NoeticScalesEffect effect) { + super(effect); + } + + @Override + public NoeticScalesEffect copy() { + return new NoeticScalesEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + FilterCreaturePermanent filter = new FilterCreaturePermanent(); + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + if (player != null) { + int numberOfCardsInHand = player.getHand().size(); + for (Permanent creature : game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) { + if (creature.getPower().getValue() > numberOfCardsInHand) { + if (creature.moveToZone(Zone.HAND, source.getId(), game, false)) { + game.informPlayers(player.getLogName() + " moves " + creature.getLogName() + " from the battlefield to their hand."); + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/n/NogginWhack.java b/Mage.Sets/src/mage/cards/n/NogginWhack.java index 6ced5a8699..22a167e1ba 100644 --- a/Mage.Sets/src/mage/cards/n/NogginWhack.java +++ b/Mage.Sets/src/mage/cards/n/NogginWhack.java @@ -38,6 +38,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -54,7 +55,7 @@ public class NogginWhack extends CardImpl { public NogginWhack(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.SORCERY},"{2}{B}{B}"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.ROGUE); // Prowl {1}{B} diff --git a/Mage.Sets/src/mage/cards/n/NoggleBandit.java b/Mage.Sets/src/mage/cards/n/NoggleBandit.java index a78264ee74..4b140fb73c 100644 --- a/Mage.Sets/src/mage/cards/n/NoggleBandit.java +++ b/Mage.Sets/src/mage/cards/n/NoggleBandit.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -55,8 +56,8 @@ public class NoggleBandit extends CardImpl { public NoggleBandit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U/R}{U/R}"); - this.subtype.add("Noggle"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.NOGGLE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NoggleBridgebreaker.java b/Mage.Sets/src/mage/cards/n/NoggleBridgebreaker.java index e24ab3f27f..a57d1f143a 100644 --- a/Mage.Sets/src/mage/cards/n/NoggleBridgebreaker.java +++ b/Mage.Sets/src/mage/cards/n/NoggleBridgebreaker.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; @@ -46,8 +47,8 @@ public class NoggleBridgebreaker extends CardImpl { public NoggleBridgebreaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U/R}{U/R}"); - this.subtype.add("Noggle"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.NOGGLE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NoggleHedgeMage.java b/Mage.Sets/src/mage/cards/n/NoggleHedgeMage.java index a88c357cfa..43f6313ea0 100644 --- a/Mage.Sets/src/mage/cards/n/NoggleHedgeMage.java +++ b/Mage.Sets/src/mage/cards/n/NoggleHedgeMage.java @@ -66,8 +66,8 @@ public class NoggleHedgeMage extends CardImpl { public NoggleHedgeMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U/R}"); - this.subtype.add("Noggle"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.NOGGLE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NoggleRansacker.java b/Mage.Sets/src/mage/cards/n/NoggleRansacker.java index 2fa78bc3ab..71ff00e55b 100644 --- a/Mage.Sets/src/mage/cards/n/NoggleRansacker.java +++ b/Mage.Sets/src/mage/cards/n/NoggleRansacker.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class NoggleRansacker extends CardImpl { public NoggleRansacker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U/R}"); - this.subtype.add("Noggle"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.NOGGLE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NomadDecoy.java b/Mage.Sets/src/mage/cards/n/NomadDecoy.java index 0f7d1b1a76..e1d40eb3a5 100644 --- a/Mage.Sets/src/mage/cards/n/NomadDecoy.java +++ b/Mage.Sets/src/mage/cards/n/NomadDecoy.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -52,8 +53,8 @@ public class NomadDecoy extends CardImpl { public NomadDecoy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NomadMythmaker.java b/Mage.Sets/src/mage/cards/n/NomadMythmaker.java index 461bd1a18a..70540ac8fb 100644 --- a/Mage.Sets/src/mage/cards/n/NomadMythmaker.java +++ b/Mage.Sets/src/mage/cards/n/NomadMythmaker.java @@ -66,9 +66,9 @@ public class NomadMythmaker extends CardImpl { public NomadMythmaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NomadicElf.java b/Mage.Sets/src/mage/cards/n/NomadicElf.java index c92c595b3c..94fbb29884 100644 --- a/Mage.Sets/src/mage/cards/n/NomadicElf.java +++ b/Mage.Sets/src/mage/cards/n/NomadicElf.java @@ -34,6 +34,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class NomadicElf extends CardImpl { public NomadicElf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Nomad"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.NOMAD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NomadsEnKor.java b/Mage.Sets/src/mage/cards/n/NomadsEnKor.java index fd138e8f25..6f163a1758 100644 --- a/Mage.Sets/src/mage/cards/n/NomadsEnKor.java +++ b/Mage.Sets/src/mage/cards/n/NomadsEnKor.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.RedirectDamageFromSourceToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -48,9 +49,9 @@ public class NomadsEnKor extends CardImpl { public NomadsEnKor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Kor"); - this.subtype.add("Nomad"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.NOMAD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NooseConstrictor.java b/Mage.Sets/src/mage/cards/n/NooseConstrictor.java index e753de4f20..c2e746224a 100644 --- a/Mage.Sets/src/mage/cards/n/NooseConstrictor.java +++ b/Mage.Sets/src/mage/cards/n/NooseConstrictor.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class NooseConstrictor extends CardImpl { public NooseConstrictor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NoosegrafMob.java b/Mage.Sets/src/mage/cards/n/NoosegrafMob.java index fb2cd9943a..d4aaa3a8bc 100644 --- a/Mage.Sets/src/mage/cards/n/NoosegrafMob.java +++ b/Mage.Sets/src/mage/cards/n/NoosegrafMob.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.game.Game; @@ -54,7 +55,7 @@ public class NoosegrafMob extends CardImpl { public NoosegrafMob(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/n/NorinTheWary.java b/Mage.Sets/src/mage/cards/n/NorinTheWary.java index ba14b3b0b9..ae1b4096d6 100644 --- a/Mage.Sets/src/mage/cards/n/NorinTheWary.java +++ b/Mage.Sets/src/mage/cards/n/NorinTheWary.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ExileReturnBattlefieldOwnerNextEndStepSourc import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.game.Game; @@ -49,8 +50,8 @@ public class NorinTheWary extends CardImpl { public NorinTheWary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NorthernPaladin.java b/Mage.Sets/src/mage/cards/n/NorthernPaladin.java index 567b9e7e1d..aafc4b4c36 100644 --- a/Mage.Sets/src/mage/cards/n/NorthernPaladin.java +++ b/Mage.Sets/src/mage/cards/n/NorthernPaladin.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -56,8 +57,8 @@ public class NorthernPaladin extends CardImpl { public NorthernPaladin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NorwoodArchers.java b/Mage.Sets/src/mage/cards/n/NorwoodArchers.java index 6b26ff21f8..e4f44b5060 100644 --- a/Mage.Sets/src/mage/cards/n/NorwoodArchers.java +++ b/Mage.Sets/src/mage/cards/n/NorwoodArchers.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class NorwoodArchers extends CardImpl { public NorwoodArchers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Archer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NorwoodPriestess.java b/Mage.Sets/src/mage/cards/n/NorwoodPriestess.java index 929212b3ae..50e5f25441 100644 --- a/Mage.Sets/src/mage/cards/n/NorwoodPriestess.java +++ b/Mage.Sets/src/mage/cards/n/NorwoodPriestess.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.PutPermanentOnBattlefieldEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ColorPredicate; @@ -55,8 +56,8 @@ public class NorwoodPriestess extends CardImpl { public NorwoodPriestess(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NorwoodRanger.java b/Mage.Sets/src/mage/cards/n/NorwoodRanger.java index 4b28e44f5d..85cc05e9df 100644 --- a/Mage.Sets/src/mage/cards/n/NorwoodRanger.java +++ b/Mage.Sets/src/mage/cards/n/NorwoodRanger.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class NorwoodRanger extends CardImpl { public NorwoodRanger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NorwoodRiders.java b/Mage.Sets/src/mage/cards/n/NorwoodRiders.java index 8ff3e2cfcb..9e27515cab 100644 --- a/Mage.Sets/src/mage/cards/n/NorwoodRiders.java +++ b/Mage.Sets/src/mage/cards/n/NorwoodRiders.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByMoreThanOneSourceEffe import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -44,7 +45,7 @@ public class NorwoodRiders extends CardImpl { public NorwoodRiders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NorwoodWarrior.java b/Mage.Sets/src/mage/cards/n/NorwoodWarrior.java index 068aa8b929..b84c8e5313 100644 --- a/Mage.Sets/src/mage/cards/n/NorwoodWarrior.java +++ b/Mage.Sets/src/mage/cards/n/NorwoodWarrior.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class NorwoodWarrior extends CardImpl { public NorwoodWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NosyGoblin.java b/Mage.Sets/src/mage/cards/n/NosyGoblin.java index 12c4b258e7..2d6e96a832 100644 --- a/Mage.Sets/src/mage/cards/n/NosyGoblin.java +++ b/Mage.Sets/src/mage/cards/n/NosyGoblin.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.other.FaceDownPredicate; @@ -56,7 +57,7 @@ public class NosyGoblin extends CardImpl { public NosyGoblin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NotOfThisWorld.java b/Mage.Sets/src/mage/cards/n/NotOfThisWorld.java index 4126f9f5e3..771655276b 100644 --- a/Mage.Sets/src/mage/cards/n/NotOfThisWorld.java +++ b/Mage.Sets/src/mage/cards/n/NotOfThisWorld.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.TargetController; import mage.constants.Zone; @@ -61,7 +62,7 @@ public class NotOfThisWorld extends CardImpl { public NotOfThisWorld(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.INSTANT}, "{7}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); // Counter target spell or ability that targets a permanent you control. this.getSpellAbility().addTarget( diff --git a/Mage.Sets/src/mage/cards/n/NotionThief.java b/Mage.Sets/src/mage/cards/n/NotionThief.java index ee8f2825b8..1d2ef50615 100644 --- a/Mage.Sets/src/mage/cards/n/NotionThief.java +++ b/Mage.Sets/src/mage/cards/n/NotionThief.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.PhaseStep; @@ -53,8 +54,8 @@ public class NotionThief extends CardImpl { public NotionThief(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NotoriousAssassin.java b/Mage.Sets/src/mage/cards/n/NotoriousAssassin.java index ec9306e476..7ba3acb468 100644 --- a/Mage.Sets/src/mage/cards/n/NotoriousAssassin.java +++ b/Mage.Sets/src/mage/cards/n/NotoriousAssassin.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -59,9 +60,9 @@ public class NotoriousAssassin extends CardImpl { public NotoriousAssassin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NotoriousThrong.java b/Mage.Sets/src/mage/cards/n/NotoriousThrong.java index 7b01f3398a..36c596475b 100644 --- a/Mage.Sets/src/mage/cards/n/NotoriousThrong.java +++ b/Mage.Sets/src/mage/cards/n/NotoriousThrong.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProwlAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.token.FaerieRogueToken; @@ -53,7 +54,7 @@ public class NotoriousThrong extends CardImpl { public NotoriousThrong(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.SORCERY},"{3}{U}"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.ROGUE); // Prowl {5}{U} this.addAbility(new ProwlAbility(this, "{5}{U}")); diff --git a/Mage.Sets/src/mage/cards/n/NovaChaser.java b/Mage.Sets/src/mage/cards/n/NovaChaser.java index ca384b8c19..b8297814f3 100644 --- a/Mage.Sets/src/mage/cards/n/NovaChaser.java +++ b/Mage.Sets/src/mage/cards/n/NovaChaser.java @@ -44,8 +44,8 @@ public class NovaChaser extends CardImpl { public NovaChaser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(10); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NovaCleric.java b/Mage.Sets/src/mage/cards/n/NovaCleric.java index f73c61d9d5..42c0830ad3 100644 --- a/Mage.Sets/src/mage/cards/n/NovaCleric.java +++ b/Mage.Sets/src/mage/cards/n/NovaCleric.java @@ -1,72 +1,73 @@ -/* - * 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.cards.n; - -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.DestroyAllEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.filter.common.FilterEnchantmentPermanent; - -/** - * - * @author Derpthemeus - */ -public class NovaCleric extends CardImpl { - - public NovaCleric(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.power = new MageInt(1); - this.toughness = new MageInt(2); - - // {2}{W}, {tap}, Sacrifice Nova Cleric: Destroy all enchantments. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyAllEffect(new FilterEnchantmentPermanent("enchantments")), new ManaCostsImpl("{2}{W}")); - ability.addCost(new TapSourceCost()); - ability.addCost(new SacrificeSourceCost()); - this.addAbility(ability); - } - - public NovaCleric(final NovaCleric card) { - super(card); - } - - @Override - public NovaCleric copy() { - return new NovaCleric(this); - } -} +/* + * 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.cards.n; + +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.DestroyAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterEnchantmentPermanent; + +/** + * + * @author Derpthemeus + */ +public class NovaCleric extends CardImpl { + + public NovaCleric(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {2}{W}, {tap}, Sacrifice Nova Cleric: Destroy all enchantments. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyAllEffect(new FilterEnchantmentPermanent("enchantments")), new ManaCostsImpl("{2}{W}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public NovaCleric(final NovaCleric card) { + super(card); + } + + @Override + public NovaCleric copy() { + return new NovaCleric(this); + } +} diff --git a/Mage.Sets/src/mage/cards/n/NovablastWurm.java b/Mage.Sets/src/mage/cards/n/NovablastWurm.java index 165410eab7..146aa04728 100644 --- a/Mage.Sets/src/mage/cards/n/NovablastWurm.java +++ b/Mage.Sets/src/mage/cards/n/NovablastWurm.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DestroyAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.permanent.AnotherPredicate; @@ -53,7 +54,7 @@ public class NovablastWurm extends CardImpl { public NovablastWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}{W}{W}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/n/NoviceBountyHunter.java b/Mage.Sets/src/mage/cards/n/NoviceBountyHunter.java index 9208daa5ba..04aa264ec8 100644 --- a/Mage.Sets/src/mage/cards/n/NoviceBountyHunter.java +++ b/Mage.Sets/src/mage/cards/n/NoviceBountyHunter.java @@ -1,67 +1,68 @@ -/* - * 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.cards.n; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.effects.common.DamageTargetEffect; -import mage.abilities.keyword.BountyAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.target.TargetPlayer; - -/** - * - * @author Styxo - */ -public class NoviceBountyHunter extends CardImpl { - - public NoviceBountyHunter(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Hunter"); - this.power = new MageInt(2); - this.toughness = new MageInt(1); - - // Bounty — Whenever a creature an opponent controls with a bounty counter on it dies, Novice Bounty Hunter deals 2 damge to target player. - Ability ability = new BountyAbility(new DamageTargetEffect(2)); - ability.addTarget(new TargetPlayer()); - this.addAbility(ability); - } - - public NoviceBountyHunter(final NoviceBountyHunter card) { - super(card); - } - - @Override - public NoviceBountyHunter copy() { - return new NoviceBountyHunter(this); - } -} +/* + * 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.cards.n; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.BountyAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.target.TargetPlayer; + +/** + * + * @author Styxo + */ +public class NoviceBountyHunter extends CardImpl { + + public NoviceBountyHunter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.HUNTER); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Bounty — Whenever a creature an opponent controls with a bounty counter on it dies, Novice Bounty Hunter deals 2 damge to target player. + Ability ability = new BountyAbility(new DamageTargetEffect(2)); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public NoviceBountyHunter(final NoviceBountyHunter card) { + super(card); + } + + @Override + public NoviceBountyHunter copy() { + return new NoviceBountyHunter(this); + } +} diff --git a/Mage.Sets/src/mage/cards/n/NovijenSages.java b/Mage.Sets/src/mage/cards/n/NovijenSages.java index a9a5cbbe3c..8185ed09f6 100644 --- a/Mage.Sets/src/mage/cards/n/NovijenSages.java +++ b/Mage.Sets/src/mage/cards/n/NovijenSages.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.GraftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterControlledCreaturePermanent; @@ -58,9 +59,9 @@ public class NovijenSages extends CardImpl { public NovijenSages(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Advisor"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/n/NoxiousDragon.java b/Mage.Sets/src/mage/cards/n/NoxiousDragon.java index 6fa2aad9b9..8c5653d9b4 100644 --- a/Mage.Sets/src/mage/cards/n/NoxiousDragon.java +++ b/Mage.Sets/src/mage/cards/n/NoxiousDragon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -55,7 +56,7 @@ public class NoxiousDragon extends CardImpl { public NoxiousDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NoxiousField.java b/Mage.Sets/src/mage/cards/n/NoxiousField.java index 1991f8e128..aaf8ac65b8 100644 --- a/Mage.Sets/src/mage/cards/n/NoxiousField.java +++ b/Mage.Sets/src/mage/cards/n/NoxiousField.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -54,7 +55,7 @@ public class NoxiousField extends CardImpl { public NoxiousField(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/n/NoxiousGearhulk.java b/Mage.Sets/src/mage/cards/n/NoxiousGearhulk.java index e035fd72a7..ac97025754 100644 --- a/Mage.Sets/src/mage/cards/n/NoxiousGearhulk.java +++ b/Mage.Sets/src/mage/cards/n/NoxiousGearhulk.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -58,7 +59,7 @@ public class NoxiousGearhulk extends CardImpl { public NoxiousGearhulk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NoxiousGhoul.java b/Mage.Sets/src/mage/cards/n/NoxiousGhoul.java index 06280802e7..fc13c8bca3 100644 --- a/Mage.Sets/src/mage/cards/n/NoxiousGhoul.java +++ b/Mage.Sets/src/mage/cards/n/NoxiousGhoul.java @@ -55,7 +55,7 @@ public class NoxiousGhoul extends CardImpl { public NoxiousGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NoxiousHatchling.java b/Mage.Sets/src/mage/cards/n/NoxiousHatchling.java index 942b9eb340..285710e1dd 100644 --- a/Mage.Sets/src/mage/cards/n/NoxiousHatchling.java +++ b/Mage.Sets/src/mage/cards/n/NoxiousHatchling.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -58,7 +59,7 @@ public class NoxiousHatchling extends CardImpl { public NoxiousHatchling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B/G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/n/NoxiousToad.java b/Mage.Sets/src/mage/cards/n/NoxiousToad.java index 9e5e7f545f..08837fa595 100644 --- a/Mage.Sets/src/mage/cards/n/NoxiousToad.java +++ b/Mage.Sets/src/mage/cards/n/NoxiousToad.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -44,7 +45,7 @@ public class NoxiousToad extends CardImpl { public NoxiousToad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Frog"); + this.subtype.add(SubType.FROG); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NoyanDarRoilShaper.java b/Mage.Sets/src/mage/cards/n/NoyanDarRoilShaper.java index 9130a43188..52ca70e0e0 100644 --- a/Mage.Sets/src/mage/cards/n/NoyanDarRoilShaper.java +++ b/Mage.Sets/src/mage/cards/n/NoyanDarRoilShaper.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SuperType; @@ -71,8 +72,8 @@ public class NoyanDarRoilShaper extends CardImpl { public NoyanDarRoilShaper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Merfolk"); - this.subtype.add("Ally"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ALLY); this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -135,7 +136,7 @@ class AwakenElementalToken extends Token { super("", "0/0 Elemental creature with haste"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/n/Nucklavee.java b/Mage.Sets/src/mage/cards/n/Nucklavee.java index 4100bf31d9..13c536996f 100644 --- a/Mage.Sets/src/mage/cards/n/Nucklavee.java +++ b/Mage.Sets/src/mage/cards/n/Nucklavee.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ColorPredicate; @@ -58,7 +59,7 @@ public class Nucklavee extends CardImpl { public Nucklavee(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U/R}{U/R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NullCaller.java b/Mage.Sets/src/mage/cards/n/NullCaller.java index eae2107205..4aa4992f63 100644 --- a/Mage.Sets/src/mage/cards/n/NullCaller.java +++ b/Mage.Sets/src/mage/cards/n/NullCaller.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; import mage.game.permanent.token.ZombieToken; @@ -50,8 +51,8 @@ public class NullCaller extends CardImpl { public NullCaller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NullChampion.java b/Mage.Sets/src/mage/cards/n/NullChampion.java index 6b85338c43..0ce4199dd3 100644 --- a/Mage.Sets/src/mage/cards/n/NullChampion.java +++ b/Mage.Sets/src/mage/cards/n/NullChampion.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.LevelerCardBuilder; import mage.cards.CardSetInfo; import mage.cards.LevelerCard; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -51,8 +52,8 @@ public class NullChampion extends LevelerCard { public NullChampion (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WARRIOR); this.color.setBlack(true); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NullProfusion.java b/Mage.Sets/src/mage/cards/n/NullProfusion.java index acfa8a026a..d319c62a11 100644 --- a/Mage.Sets/src/mage/cards/n/NullProfusion.java +++ b/Mage.Sets/src/mage/cards/n/NullProfusion.java @@ -30,6 +30,7 @@ package mage.cards.n; import java.util.UUID; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.SkipDrawStepEffect; import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect; @@ -38,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.TargetController; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -50,16 +52,23 @@ import mage.game.events.GameEvent.EventType; public class NullProfusion extends CardImpl { public NullProfusion(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{B}{B}"); // Skip your draw step. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipDrawStepEffect())); - + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipDrawStepEffect())); + // Whenever you play a card, draw a card. this.addAbility(new NullProfusionTriggeredAbility()); - + // Your maximum hand size is two. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MaximumHandSizeControllerEffect(2, Duration.WhileOnBattlefield, HandSizeModification.SET))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new MaximumHandSizeControllerEffect( + new StaticValue(2), + Duration.WhileOnBattlefield, + HandSizeModification.SET, + TargetController.YOU + ) + )); } public NullProfusion(final NullProfusion card) { @@ -73,15 +82,15 @@ public class NullProfusion extends CardImpl { } class NullProfusionTriggeredAbility extends TriggeredAbilityImpl { - + NullProfusionTriggeredAbility() { super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), false); } - + NullProfusionTriggeredAbility(final NullProfusionTriggeredAbility ability) { super(ability); } - + @Override public NullProfusionTriggeredAbility copy() { return new NullProfusionTriggeredAbility(this); @@ -91,14 +100,14 @@ class NullProfusionTriggeredAbility extends TriggeredAbilityImpl { public boolean checkEventType(GameEvent event, Game game) { return event.getType() == EventType.SPELL_CAST || event.getType() == EventType.LAND_PLAYED; } - + @Override public boolean checkTrigger(GameEvent event, Game game) { return event.getPlayerId().equals(this.getControllerId()); } - + @Override public String getRule() { return "Whenever you play a card, draw a card."; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java b/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java index 66ea79d1f5..951a8c5ad0 100644 --- a/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java +++ b/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.StaticFilters; @@ -53,9 +54,9 @@ import java.util.UUID; public class NullmageAdvocate extends CardImpl { public NullmageAdvocate(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Insect"); - this.subtype.add("Druid"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(3); @@ -63,11 +64,11 @@ public class NullmageAdvocate extends CardImpl { Effect effect = new ReturnFromGraveyardToHandTargetEffect(); effect.setText("Return two target cards from an opponent's graveyard to his or her hand"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); - + effect = new DestroyTargetEffect("Destroy target artifact or enchantment"); effect.setTargetPointer(new SecondTargetPointer()); ability.addEffect(effect); - ability.addTarget(new TargetCardInOpponentsGraveyard(2,2, new FilterCard("two target cards from an opponent's graveyard"), true)); + ability.addTarget(new TargetCardInOpponentsGraveyard(2, 2, new FilterCard("cards from an opponent's graveyard"), true)); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/n/NullmageShepherd.java b/Mage.Sets/src/mage/cards/n/NullmageShepherd.java index 4a6bf2d529..7dce7ed92f 100644 --- a/Mage.Sets/src/mage/cards/n/NullmageShepherd.java +++ b/Mage.Sets/src/mage/cards/n/NullmageShepherd.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.filter.common.FilterControlledCreaturePermanent; @@ -58,8 +59,8 @@ public class NullmageShepherd extends CardImpl { public NullmageShepherd(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/n/NullstoneGargoyle.java b/Mage.Sets/src/mage/cards/n/NullstoneGargoyle.java index abb1d32a20..8c8c6b1bc8 100644 --- a/Mage.Sets/src/mage/cards/n/NullstoneGargoyle.java +++ b/Mage.Sets/src/mage/cards/n/NullstoneGargoyle.java @@ -1,111 +1,112 @@ -/* - * 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.cards.n; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.CounterTargetEffect; -import mage.abilities.keyword.FlyingAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.target.targetpointer.FixedTarget; -import mage.watchers.common.SpellsCastWatcher; - -/** - * - * @author LevelX2 - */ -public class NullstoneGargoyle extends CardImpl { - - public NullstoneGargoyle(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{9}"); - - this.subtype.add("Gargoyle"); - this.power = new MageInt(4); - this.toughness = new MageInt(5); - - // Flying - this.addAbility(FlyingAbility.getInstance()); - - // Whenever the first noncreature spell of a turn is cast, counter that spell. - this.addAbility(new NullstoneGargoyleTriggeredAbility(), new SpellsCastWatcher()); - } - - public NullstoneGargoyle(final NullstoneGargoyle card) { - super(card); - } - - @Override - public NullstoneGargoyle copy() { - return new NullstoneGargoyle(this); - } -} - -class NullstoneGargoyleTriggeredAbility extends TriggeredAbilityImpl { - - public NullstoneGargoyleTriggeredAbility() { - super(Zone.BATTLEFIELD, new CounterTargetEffect(), false); - } - - public NullstoneGargoyleTriggeredAbility(NullstoneGargoyleTriggeredAbility ability) { - super(ability); - } - - @Override - public NullstoneGargoyleTriggeredAbility copy() { - return new NullstoneGargoyleTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.SPELL_CAST; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - SpellsCastWatcher watcher = (SpellsCastWatcher) game.getState().getWatchers().get(SpellsCastWatcher.class.getSimpleName()); - if (watcher != null && watcher.getNumberOfNonCreatureSpells() == 1) { - for (Effect effect : getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getTargetId())); - } - return true; - } - return false; - } - - @Override - public String getRule() { - return "Whenever the first noncreature spell of a turn is cast, counter that spell."; - } -} +/* + * 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.cards.n; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.target.targetpointer.FixedTarget; +import mage.watchers.common.SpellsCastWatcher; + +/** + * + * @author LevelX2 + */ +public class NullstoneGargoyle extends CardImpl { + + public NullstoneGargoyle(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{9}"); + + this.subtype.add(SubType.GARGOYLE); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever the first noncreature spell of a turn is cast, counter that spell. + this.addAbility(new NullstoneGargoyleTriggeredAbility(), new SpellsCastWatcher()); + } + + public NullstoneGargoyle(final NullstoneGargoyle card) { + super(card); + } + + @Override + public NullstoneGargoyle copy() { + return new NullstoneGargoyle(this); + } +} + +class NullstoneGargoyleTriggeredAbility extends TriggeredAbilityImpl { + + public NullstoneGargoyleTriggeredAbility() { + super(Zone.BATTLEFIELD, new CounterTargetEffect(), false); + } + + public NullstoneGargoyleTriggeredAbility(NullstoneGargoyleTriggeredAbility ability) { + super(ability); + } + + @Override + public NullstoneGargoyleTriggeredAbility copy() { + return new NullstoneGargoyleTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.SPELL_CAST; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + SpellsCastWatcher watcher = (SpellsCastWatcher) game.getState().getWatchers().get(SpellsCastWatcher.class.getSimpleName()); + if (watcher != null && watcher.getNumberOfNonCreatureSpells() == 1) { + for (Effect effect : getEffects()) { + effect.setTargetPointer(new FixedTarget(event.getTargetId())); + } + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever the first noncreature spell of a turn is cast, counter that spell."; + } +} diff --git a/Mage.Sets/src/mage/cards/n/NulltreadGargantuan.java b/Mage.Sets/src/mage/cards/n/NulltreadGargantuan.java index d951f38ce6..db63e9456b 100644 --- a/Mage.Sets/src/mage/cards/n/NulltreadGargantuan.java +++ b/Mage.Sets/src/mage/cards/n/NulltreadGargantuan.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PutOnLibraryTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.Target; import mage.target.common.TargetControlledCreaturePermanent; @@ -47,7 +48,7 @@ public class NulltreadGargantuan extends CardImpl { public NulltreadGargantuan (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/n/NumaiOutcast.java b/Mage.Sets/src/mage/cards/n/NumaiOutcast.java index c5529c962f..7b71b1a2d7 100644 --- a/Mage.Sets/src/mage/cards/n/NumaiOutcast.java +++ b/Mage.Sets/src/mage/cards/n/NumaiOutcast.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.BushidoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class NumaiOutcast extends CardImpl { public NumaiOutcast (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NumbingDose.java b/Mage.Sets/src/mage/cards/n/NumbingDose.java index 75ef8ca339..ba47ca9f8a 100644 --- a/Mage.Sets/src/mage/cards/n/NumbingDose.java +++ b/Mage.Sets/src/mage/cards/n/NumbingDose.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -65,7 +66,7 @@ public class NumbingDose extends CardImpl { public NumbingDose(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant artifact or creature diff --git a/Mage.Sets/src/mage/cards/n/NumotTheDevastator.java b/Mage.Sets/src/mage/cards/n/NumotTheDevastator.java index eed5d18fc1..5640e2c90d 100644 --- a/Mage.Sets/src/mage/cards/n/NumotTheDevastator.java +++ b/Mage.Sets/src/mage/cards/n/NumotTheDevastator.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.StaticFilters; import mage.target.common.TargetLandPermanent; @@ -52,7 +53,7 @@ public class NumotTheDevastator extends CardImpl { public NumotTheDevastator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/n/NurturerInitiate.java b/Mage.Sets/src/mage/cards/n/NurturerInitiate.java index 4a5a4e1daf..b0e3f407ea 100644 --- a/Mage.Sets/src/mage/cards/n/NurturerInitiate.java +++ b/Mage.Sets/src/mage/cards/n/NurturerInitiate.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,8 +58,8 @@ public class NurturerInitiate extends CardImpl { public NurturerInitiate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NurturingLicid.java b/Mage.Sets/src/mage/cards/n/NurturingLicid.java index 8c61dfaaa1..fb55c321d5 100644 --- a/Mage.Sets/src/mage/cards/n/NurturingLicid.java +++ b/Mage.Sets/src/mage/cards/n/NurturingLicid.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class NurturingLicid extends CardImpl { public NurturingLicid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Licid"); + this.subtype.add(SubType.LICID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NutCollector.java b/Mage.Sets/src/mage/cards/n/NutCollector.java index d429f7628f..fc54adb273 100644 --- a/Mage.Sets/src/mage/cards/n/NutCollector.java +++ b/Mage.Sets/src/mage/cards/n/NutCollector.java @@ -57,8 +57,8 @@ public class NutCollector extends CardImpl { public NutCollector(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NuteGunray.java b/Mage.Sets/src/mage/cards/n/NuteGunray.java index 2ded30c81d..deac0f7f47 100644 --- a/Mage.Sets/src/mage/cards/n/NuteGunray.java +++ b/Mage.Sets/src/mage/cards/n/NuteGunray.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterArtifactPermanent; @@ -65,8 +66,8 @@ public class NuteGunray extends CardImpl { public NuteGunray(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Neimoidian"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.NEIMOIDIAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NyleaGodOfTheHunt.java b/Mage.Sets/src/mage/cards/n/NyleaGodOfTheHunt.java index c21dc38dde..ea97068bfe 100644 --- a/Mage.Sets/src/mage/cards/n/NyleaGodOfTheHunt.java +++ b/Mage.Sets/src/mage/cards/n/NyleaGodOfTheHunt.java @@ -55,7 +55,7 @@ public class NyleaGodOfTheHunt extends CardImpl { public NyleaGodOfTheHunt(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/n/NyleasDisciple.java b/Mage.Sets/src/mage/cards/n/NyleasDisciple.java index c179fba97e..32e6693185 100644 --- a/Mage.Sets/src/mage/cards/n/NyleasDisciple.java +++ b/Mage.Sets/src/mage/cards/n/NyleasDisciple.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; /** @@ -46,8 +47,8 @@ public class NyleasDisciple extends CardImpl { public NyleasDisciple(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Archer"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NyleasEmissary.java b/Mage.Sets/src/mage/cards/n/NyleasEmissary.java index 58e1f5b082..50271013b2 100644 --- a/Mage.Sets/src/mage/cards/n/NyleasEmissary.java +++ b/Mage.Sets/src/mage/cards/n/NyleasEmissary.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class NyleasEmissary extends CardImpl { public NyleasEmissary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NyleasPresence.java b/Mage.Sets/src/mage/cards/n/NyleasPresence.java index 9e02f48aeb..a56ede9558 100644 --- a/Mage.Sets/src/mage/cards/n/NyleasPresence.java +++ b/Mage.Sets/src/mage/cards/n/NyleasPresence.java @@ -56,7 +56,7 @@ public class NyleasPresence extends CardImpl { public NyleasPresence(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land @@ -141,7 +141,7 @@ class NyleasPresenceLandTypeEffect extends ContinuousEffectImpl { break; case TypeChangingEffects_4: for (SubType subtype : landTypes) { - if (!land.getSubtype(game).contains(subtype)) { + if (!land.hasSubtype(subtype, game)) { land.getSubtype(game).add(subtype); } } diff --git a/Mage.Sets/src/mage/cards/n/NyxFleeceRam.java b/Mage.Sets/src/mage/cards/n/NyxFleeceRam.java index 437ec1be30..c280b9a26e 100644 --- a/Mage.Sets/src/mage/cards/n/NyxFleeceRam.java +++ b/Mage.Sets/src/mage/cards/n/NyxFleeceRam.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -44,7 +45,7 @@ public class NyxFleeceRam extends CardImpl { public NyxFleeceRam(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{W}"); - this.subtype.add("Sheep"); + this.subtype.add(SubType.SHEEP); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/n/NyxInfusion.java b/Mage.Sets/src/mage/cards/n/NyxInfusion.java index 02f26b975e..59b8706452 100644 --- a/Mage.Sets/src/mage/cards/n/NyxInfusion.java +++ b/Mage.Sets/src/mage/cards/n/NyxInfusion.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -60,7 +61,7 @@ public class NyxInfusion extends CardImpl { public NyxInfusion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); diff --git a/Mage.Sets/src/mage/cards/n/NyxWeaver.java b/Mage.Sets/src/mage/cards/n/NyxWeaver.java index b2abfbd6d1..5bdde934eb 100644 --- a/Mage.Sets/src/mage/cards/n/NyxWeaver.java +++ b/Mage.Sets/src/mage/cards/n/NyxWeaver.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.target.common.TargetCardInYourGraveyard; @@ -52,7 +53,7 @@ public class NyxWeaver extends CardImpl { public NyxWeaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{B}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/Nyxathid.java b/Mage.Sets/src/mage/cards/n/Nyxathid.java index 8a033c7781..ebba5c08b4 100644 --- a/Mage.Sets/src/mage/cards/n/Nyxathid.java +++ b/Mage.Sets/src/mage/cards/n/Nyxathid.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class Nyxathid extends CardImpl { public Nyxathid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/n/NyxbornEidolon.java b/Mage.Sets/src/mage/cards/n/NyxbornEidolon.java index caeb8de16d..09197076e5 100644 --- a/Mage.Sets/src/mage/cards/n/NyxbornEidolon.java +++ b/Mage.Sets/src/mage/cards/n/NyxbornEidolon.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.BestowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class NyxbornEidolon extends CardImpl { public NyxbornEidolon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NyxbornRollicker.java b/Mage.Sets/src/mage/cards/n/NyxbornRollicker.java index 247c1270b0..0e633a0220 100644 --- a/Mage.Sets/src/mage/cards/n/NyxbornRollicker.java +++ b/Mage.Sets/src/mage/cards/n/NyxbornRollicker.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.BestowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class NyxbornRollicker extends CardImpl { public NyxbornRollicker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{R}"); - this.subtype.add("Satyr"); + this.subtype.add(SubType.SATYR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/n/NyxbornShieldmate.java b/Mage.Sets/src/mage/cards/n/NyxbornShieldmate.java index 2ff40f5da9..d5107e6ffd 100644 --- a/Mage.Sets/src/mage/cards/n/NyxbornShieldmate.java +++ b/Mage.Sets/src/mage/cards/n/NyxbornShieldmate.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.BestowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,8 +47,8 @@ public class NyxbornShieldmate extends CardImpl { public NyxbornShieldmate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/n/NyxbornTriton.java b/Mage.Sets/src/mage/cards/n/NyxbornTriton.java index 7963c0c64f..8b56c1fdca 100644 --- a/Mage.Sets/src/mage/cards/n/NyxbornTriton.java +++ b/Mage.Sets/src/mage/cards/n/NyxbornTriton.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.BestowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class NyxbornTriton extends CardImpl { public NyxbornTriton(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/n/NyxbornWolf.java b/Mage.Sets/src/mage/cards/n/NyxbornWolf.java index 1fda24d693..9393a92ce6 100644 --- a/Mage.Sets/src/mage/cards/n/NyxbornWolf.java +++ b/Mage.Sets/src/mage/cards/n/NyxbornWolf.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.BestowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class NyxbornWolf extends CardImpl { public NyxbornWolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{G}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OKagachiVengefulKami.java b/Mage.Sets/src/mage/cards/o/OKagachiVengefulKami.java index 8863877773..b76c8584ac 100644 --- a/Mage.Sets/src/mage/cards/o/OKagachiVengefulKami.java +++ b/Mage.Sets/src/mage/cards/o/OKagachiVengefulKami.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -63,8 +64,8 @@ public class OKagachiVengefulKami extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{U}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DRAGON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/o/ONaginata.java b/Mage.Sets/src/mage/cards/o/ONaginata.java index 5eac621c15..f617aeef31 100644 --- a/Mage.Sets/src/mage/cards/o/ONaginata.java +++ b/Mage.Sets/src/mage/cards/o/ONaginata.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.Zone; @@ -63,7 +64,7 @@ public class ONaginata extends CardImpl { public ONaginata(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); Target target = new TargetControlledCreaturePermanent(1, 1, filter, false); // O-Naginata can be attached only to a creature with 3 or more power. diff --git a/Mage.Sets/src/mage/cards/o/OakStreetInnkeeper.java b/Mage.Sets/src/mage/cards/o/OakStreetInnkeeper.java index d64c6443bb..2f723a2e2c 100644 --- a/Mage.Sets/src/mage/cards/o/OakStreetInnkeeper.java +++ b/Mage.Sets/src/mage/cards/o/OakStreetInnkeeper.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -56,7 +57,7 @@ public class OakStreetInnkeeper extends CardImpl { public OakStreetInnkeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OakenBrawler.java b/Mage.Sets/src/mage/cards/o/OakenBrawler.java index d6a315019c..28a607817d 100644 --- a/Mage.Sets/src/mage/cards/o/OakenBrawler.java +++ b/Mage.Sets/src/mage/cards/o/OakenBrawler.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,8 +46,8 @@ public class OakenBrawler extends CardImpl { public OakenBrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Treefolk"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/Oakenform.java b/Mage.Sets/src/mage/cards/o/Oakenform.java index 863c62bf3a..1c9336552c 100644 --- a/Mage.Sets/src/mage/cards/o/Oakenform.java +++ b/Mage.Sets/src/mage/cards/o/Oakenform.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -56,7 +57,7 @@ public class Oakenform extends CardImpl { public Oakenform(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/cards/o/OakgnarlWarrior.java b/Mage.Sets/src/mage/cards/o/OakgnarlWarrior.java index a79535cabe..ea3ef96b91 100644 --- a/Mage.Sets/src/mage/cards/o/OakgnarlWarrior.java +++ b/Mage.Sets/src/mage/cards/o/OakgnarlWarrior.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class OakgnarlWarrior extends CardImpl { public OakgnarlWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/o/OakheartDryads.java b/Mage.Sets/src/mage/cards/o/OakheartDryads.java index 9045c3d493..890f28738f 100644 --- a/Mage.Sets/src/mage/cards/o/OakheartDryads.java +++ b/Mage.Sets/src/mage/cards/o/OakheartDryads.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -46,8 +47,8 @@ public class OakheartDryads extends CardImpl { public OakheartDryads(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{G}"); - this.subtype.add("Nymph"); - this.subtype.add("Dryad"); + this.subtype.add(SubType.NYMPH); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OashraCultivator.java b/Mage.Sets/src/mage/cards/o/OashraCultivator.java index b469afa785..e488ab21e1 100644 --- a/Mage.Sets/src/mage/cards/o/OashraCultivator.java +++ b/Mage.Sets/src/mage/cards/o/OashraCultivator.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; @@ -53,8 +54,8 @@ public class OashraCultivator extends CardImpl { public OashraCultivator(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OasisRitualist.java b/Mage.Sets/src/mage/cards/o/OasisRitualist.java index 405d3d757b..92bf31a452 100644 --- a/Mage.Sets/src/mage/cards/o/OasisRitualist.java +++ b/Mage.Sets/src/mage/cards/o/OasisRitualist.java @@ -1,75 +1,76 @@ -/* - * 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.cards.o; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.costs.common.ExertSourceCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.AddManaOfAnyColorEffect; -import mage.abilities.effects.common.ManaEffect; -import mage.abilities.mana.AnyColorManaAbility; -import mage.abilities.mana.SimpleManaAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; - -/** - * - * @author LevelX2 - */ -public class OasisRitualist extends CardImpl { - - public OasisRitualist(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); - - this.subtype.add("Naga"); - this.subtype.add("Druid"); - this.power = new MageInt(2); - this.toughness = new MageInt(4); - - // {T}: Add one mana of any color to your mana pool. - this.addAbility(new AnyColorManaAbility()); - // {T}, Exert Oasis Ritualist: Add two mana of any one color to your manna pool. - SimpleManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, - (ManaEffect) new AddManaOfAnyColorEffect(2).setText("Add two mana of any one color to your manna pool. (An exerted creature won't untap during your next untap step.)"), - new TapSourceCost()); - ability.addCost(new ExertSourceCost()); - this.addAbility(ability); - } - - public OasisRitualist(final OasisRitualist card) { - super(card); - } - - @Override - public OasisRitualist copy() { - return new OasisRitualist(this); - } -} +/* + * 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.cards.o; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.common.ExertSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.AddManaOfAnyColorEffect; +import mage.abilities.effects.common.ManaEffect; +import mage.abilities.mana.AnyColorManaAbility; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class OasisRitualist extends CardImpl { + + public OasisRitualist(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.DRUID); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // {T}: Add one mana of any color to your mana pool. + this.addAbility(new AnyColorManaAbility()); + // {T}, Exert Oasis Ritualist: Add two mana of any one color to your manna pool. + SimpleManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, + (ManaEffect) new AddManaOfAnyColorEffect(2).setText("Add two mana of any one color to your manna pool. (An exerted creature won't untap during your next untap step.)"), + new TapSourceCost()); + ability.addCost(new ExertSourceCost()); + this.addAbility(ability); + } + + public OasisRitualist(final OasisRitualist card) { + super(card); + } + + @Override + public OasisRitualist copy() { + return new OasisRitualist(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OathOfScholars.java b/Mage.Sets/src/mage/cards/o/OathOfScholars.java index 28fb5c4a3f..9f2d48acfb 100644 --- a/Mage.Sets/src/mage/cards/o/OathOfScholars.java +++ b/Mage.Sets/src/mage/cards/o/OathOfScholars.java @@ -1,148 +1,148 @@ -/* - * 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.cards.o; - -import java.util.UUID; -import mage.MageObject; -import mage.abilities.Ability; -import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.effects.OneShotEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.filter.FilterPlayer; -import mage.filter.predicate.ObjectSourcePlayer; -import mage.filter.predicate.ObjectSourcePlayerPredicate; -import mage.game.Game; -import mage.players.Player; -import mage.target.TargetPlayer; - -/** - * - * @author jeffwadsworth - */ -public class OathOfScholars extends CardImpl { - - private final UUID originalId; - private static final FilterPlayer filter = new FilterPlayer(); - - static { - filter.add(new OathOfScholarsPredicate()); - } - - public OathOfScholars(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}"); - - // At the beginning of each player's upkeep, that player chooses target player who has more cards in hand than he or she does and is his or her opponent. The first player may discard his or her hand and draw three cards. - Ability ability = new BeginningOfUpkeepTriggeredAbility(new OathOfScholarsEffect(), TargetController.ANY, false); - ability.addTarget(new TargetPlayer(1, 1, false, filter)); - this.addAbility(ability); - originalId = ability.getOriginalId(); - - } - - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(originalId)) { - Player activePlayer = game.getPlayer(game.getActivePlayerId()); - if (activePlayer != null) { - ability.getTargets().clear(); - TargetPlayer target = new TargetPlayer(1, 1, false, filter); - target.setTargetController(activePlayer.getId()); - ability.getTargets().add(target); - } - } - } - - public OathOfScholars(final OathOfScholars card) { - super(card); - this.originalId = card.originalId; - } - - @Override - public OathOfScholars copy() { - return new OathOfScholars(this); - } -} - -class OathOfScholarsPredicate implements ObjectSourcePlayerPredicate> { - - @Override - public boolean apply(ObjectSourcePlayer input, Game game) { - Player targetPlayer = input.getObject(); - Player firstPlayer = game.getPlayer(game.getActivePlayerId()); - if (targetPlayer == null - || firstPlayer == null - || !firstPlayer.hasOpponent(targetPlayer.getId(), game)) { - return false; - } - int countHandTargetPlayer = targetPlayer.getHand().size(); - int countHandFirstPlayer = firstPlayer.getHand().size(); - - return countHandTargetPlayer > countHandFirstPlayer; - } - - @Override - public String toString() { - return "player who has more cards in hand than he or she does"; - } -} - -class OathOfScholarsEffect extends OneShotEffect { - - public OathOfScholarsEffect() { - super(Outcome.PutCardInPlay); - staticText = "that player chooses target player who has more cards in hand than he or she does and is his or her opponent. The first player may discard his or her hand and draw three cards"; - } - - public OathOfScholarsEffect(OathOfScholarsEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - MageObject sourceObject = game.getObject(source.getSourceId()); - Player firstPlayer = game.getPlayer(game.getActivePlayerId()); - if (sourceObject == null || firstPlayer == null) { - return false; - } - if (firstPlayer.chooseUse(Outcome.AIDontUseIt, "Discard your hand and draw 3 cards?", source, game)) { - firstPlayer.discard(firstPlayer.getHand().size(), true, source, game); - firstPlayer.drawCards(3, game); - return true; - } - return false; - } - - @Override - public OathOfScholarsEffect copy() { - return new OathOfScholarsEffect(this); - } -} +/* + * 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.cards.o; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.filter.FilterPlayer; +import mage.filter.predicate.ObjectSourcePlayer; +import mage.filter.predicate.ObjectSourcePlayerPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author jeffwadsworth + */ +public class OathOfScholars extends CardImpl { + + private final UUID originalId; + private static final FilterPlayer filter = new FilterPlayer(); + + static { + filter.add(new OathOfScholarsPredicate()); + } + + public OathOfScholars(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}"); + + // At the beginning of each player's upkeep, that player chooses target player who has more cards in hand than he or she does and is his or her opponent. The first player may discard his or her hand and draw three cards. + Ability ability = new BeginningOfUpkeepTriggeredAbility(new OathOfScholarsEffect(), TargetController.ANY, false); + ability.addTarget(new TargetPlayer(1, 1, false, filter)); + this.addAbility(ability); + originalId = ability.getOriginalId(); + + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability.getOriginalId().equals(originalId)) { + Player activePlayer = game.getPlayer(game.getActivePlayerId()); + if (activePlayer != null) { + ability.getTargets().clear(); + TargetPlayer target = new TargetPlayer(1, 1, false, filter); + target.setTargetController(activePlayer.getId()); + ability.getTargets().add(target); + } + } + } + + public OathOfScholars(final OathOfScholars card) { + super(card); + this.originalId = card.originalId; + } + + @Override + public OathOfScholars copy() { + return new OathOfScholars(this); + } +} + +class OathOfScholarsPredicate implements ObjectSourcePlayerPredicate> { + + @Override + public boolean apply(ObjectSourcePlayer input, Game game) { + Player targetPlayer = input.getObject(); + Player firstPlayer = game.getPlayer(game.getActivePlayerId()); + if (targetPlayer == null + || firstPlayer == null + || !firstPlayer.hasOpponent(targetPlayer.getId(), game)) { + return false; + } + int countHandTargetPlayer = targetPlayer.getHand().size(); + int countHandFirstPlayer = firstPlayer.getHand().size(); + + return countHandTargetPlayer > countHandFirstPlayer; + } + + @Override + public String toString() { + return "player who has more cards in hand than he or she does"; + } +} + +class OathOfScholarsEffect extends OneShotEffect { + + public OathOfScholarsEffect() { + super(Outcome.PutCardInPlay); + staticText = "that player chooses target player who has more cards in hand than he or she does and is his or her opponent. The first player may discard his or her hand and draw three cards"; + } + + public OathOfScholarsEffect(OathOfScholarsEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + MageObject sourceObject = game.getObject(source.getSourceId()); + Player firstPlayer = game.getPlayer(game.getActivePlayerId()); + if (sourceObject == null || firstPlayer == null) { + return false; + } + if (firstPlayer.chooseUse(Outcome.AIDontUseIt, "Discard your hand and draw 3 cards?", source, game)) { + firstPlayer.discard(firstPlayer.getHand().size(), true, source, game); + firstPlayer.drawCards(3, game); + return true; + } + return false; + } + + @Override + public OathOfScholarsEffect copy() { + return new OathOfScholarsEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OathkeeperTakenosDaisho.java b/Mage.Sets/src/mage/cards/o/OathkeeperTakenosDaisho.java index f15649339e..339d982739 100644 --- a/Mage.Sets/src/mage/cards/o/OathkeeperTakenosDaisho.java +++ b/Mage.Sets/src/mage/cards/o/OathkeeperTakenosDaisho.java @@ -62,7 +62,7 @@ public class OathkeeperTakenosDaisho extends CardImpl { public OathkeeperTakenosDaisho(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +3/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3,1, Duration.WhileOnBattlefield))); diff --git a/Mage.Sets/src/mage/cards/o/OathswornGiant.java b/Mage.Sets/src/mage/cards/o/OathswornGiant.java index 01fbeb9d54..9ccabc351f 100644 --- a/Mage.Sets/src/mage/cards/o/OathswornGiant.java +++ b/Mage.Sets/src/mage/cards/o/OathswornGiant.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -49,8 +50,8 @@ public class OathswornGiant extends CardImpl { public OathswornGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}"); - this.subtype.add("Giant"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/ObNixilisOfTheBlackOath.java b/Mage.Sets/src/mage/cards/o/ObNixilisOfTheBlackOath.java index 6c2af562f5..d3e4e446d8 100644 --- a/Mage.Sets/src/mage/cards/o/ObNixilisOfTheBlackOath.java +++ b/Mage.Sets/src/mage/cards/o/ObNixilisOfTheBlackOath.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.game.Game; @@ -55,7 +56,7 @@ public class ObNixilisOfTheBlackOath extends CardImpl { public ObNixilisOfTheBlackOath(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{B}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Nixilis"); + this.subtype.add(SubType.NIXILIS); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/o/ObNixilisReignited.java b/Mage.Sets/src/mage/cards/o/ObNixilisReignited.java index dbbf37973b..a6719e314a 100644 --- a/Mage.Sets/src/mage/cards/o/ObNixilisReignited.java +++ b/Mage.Sets/src/mage/cards/o/ObNixilisReignited.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.game.command.emblems.ObNixilisReignitedEmblem; import mage.target.common.TargetCreaturePermanent; @@ -52,7 +53,7 @@ public class ObNixilisReignited extends CardImpl { public ObNixilisReignited(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{B}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Nixilis"); + this.subtype.add(SubType.NIXILIS); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); diff --git a/Mage.Sets/src/mage/cards/o/ObNixilisTheFallen.java b/Mage.Sets/src/mage/cards/o/ObNixilisTheFallen.java index 320ff0d1f8..a7a39a5174 100644 --- a/Mage.Sets/src/mage/cards/o/ObNixilisTheFallen.java +++ b/Mage.Sets/src/mage/cards/o/ObNixilisTheFallen.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.counters.CounterType; import mage.target.TargetPlayer; @@ -49,7 +50,7 @@ public class ObNixilisTheFallen extends CardImpl { public ObNixilisTheFallen(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/ObNixilisUnshackled.java b/Mage.Sets/src/mage/cards/o/ObNixilisUnshackled.java index 38d0ce653b..ef0de6ad01 100644 --- a/Mage.Sets/src/mage/cards/o/ObNixilisUnshackled.java +++ b/Mage.Sets/src/mage/cards/o/ObNixilisUnshackled.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.counters.CounterType; @@ -59,7 +60,7 @@ public class ObNixilisUnshackled extends CardImpl { public ObNixilisUnshackled(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/ObeliskSpider.java b/Mage.Sets/src/mage/cards/o/ObeliskSpider.java index b91448a525..9d4d9a75e8 100644 --- a/Mage.Sets/src/mage/cards/o/ObeliskSpider.java +++ b/Mage.Sets/src/mage/cards/o/ObeliskSpider.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -55,7 +56,7 @@ public class ObeliskSpider extends CardImpl { public ObeliskSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/ObiWanKenobi.java b/Mage.Sets/src/mage/cards/o/ObiWanKenobi.java index e4766ba3ab..c215ee15cc 100644 --- a/Mage.Sets/src/mage/cards/o/ObiWanKenobi.java +++ b/Mage.Sets/src/mage/cards/o/ObiWanKenobi.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.game.command.emblems.ObiWanKenobiEmblem; import mage.target.common.TargetCreaturePermanent; @@ -52,7 +53,7 @@ public class ObiWanKenobi extends CardImpl { public ObiWanKenobi(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{W}{U}"); - this.subtype.add("Obi-Wan"); + this.subtype.add(SubType.OBI_WAN); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); diff --git a/Mage.Sets/src/mage/cards/o/OblivionCrown.java b/Mage.Sets/src/mage/cards/o/OblivionCrown.java index 0e6bfd82f4..d92926b1f2 100644 --- a/Mage.Sets/src/mage/cards/o/OblivionCrown.java +++ b/Mage.Sets/src/mage/cards/o/OblivionCrown.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class OblivionCrown extends CardImpl { public OblivionCrown(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/o/OblivionRing.java b/Mage.Sets/src/mage/cards/o/OblivionRing.java index 0b4b77c38c..9e5c6a51fc 100644 --- a/Mage.Sets/src/mage/cards/o/OblivionRing.java +++ b/Mage.Sets/src/mage/cards/o/OblivionRing.java @@ -28,7 +28,6 @@ package mage.cards.o; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; @@ -43,13 +42,15 @@ import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.Target; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com */ public class OblivionRing extends CardImpl { - private static final FilterNonlandPermanent anotherNonlandPermanent = new FilterNonlandPermanent("another nonland permanent"); + private static final FilterNonlandPermanent anotherNonlandPermanent = new FilterNonlandPermanent("another target nonland permanent"); static { anotherNonlandPermanent.add(new AnotherPredicate()); diff --git a/Mage.Sets/src/mage/cards/o/OblivionSower.java b/Mage.Sets/src/mage/cards/o/OblivionSower.java index 9ebcab9108..cc6d3de563 100644 --- a/Mage.Sets/src/mage/cards/o/OblivionSower.java +++ b/Mage.Sets/src/mage/cards/o/OblivionSower.java @@ -38,6 +38,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -58,7 +59,7 @@ public class OblivionSower extends CardImpl { public OblivionSower(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(5); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/o/OboroBreezecaller.java b/Mage.Sets/src/mage/cards/o/OboroBreezecaller.java index dc4ea330b9..d09655e4e9 100644 --- a/Mage.Sets/src/mage/cards/o/OboroBreezecaller.java +++ b/Mage.Sets/src/mage/cards/o/OboroBreezecaller.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; @@ -54,8 +55,8 @@ public class OboroBreezecaller extends CardImpl { public OboroBreezecaller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Moonfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MOONFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OboroEnvoy.java b/Mage.Sets/src/mage/cards/o/OboroEnvoy.java index b67493d0ae..b29d98c9fb 100644 --- a/Mage.Sets/src/mage/cards/o/OboroEnvoy.java +++ b/Mage.Sets/src/mage/cards/o/OboroEnvoy.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -56,8 +57,8 @@ public class OboroEnvoy extends CardImpl { public OboroEnvoy(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); - this.subtype.add("Moonfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MOONFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/ObservantAlseid.java b/Mage.Sets/src/mage/cards/o/ObservantAlseid.java index 3b43b7a6db..510c0adc7a 100644 --- a/Mage.Sets/src/mage/cards/o/ObservantAlseid.java +++ b/Mage.Sets/src/mage/cards/o/ObservantAlseid.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class ObservantAlseid extends CardImpl { public ObservantAlseid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{W}"); - this.subtype.add("Nymph"); + this.subtype.add(SubType.NYMPH); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/ObsessiveSkinner.java b/Mage.Sets/src/mage/cards/o/ObsessiveSkinner.java index a3dd1d2a8d..57da183c86 100644 --- a/Mage.Sets/src/mage/cards/o/ObsessiveSkinner.java +++ b/Mage.Sets/src/mage/cards/o/ObsessiveSkinner.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class ObsessiveSkinner extends CardImpl { public ObsessiveSkinner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/ObsianusGolem.java b/Mage.Sets/src/mage/cards/o/ObsianusGolem.java index cd644e4b60..82fea9b3b5 100644 --- a/Mage.Sets/src/mage/cards/o/ObsianusGolem.java +++ b/Mage.Sets/src/mage/cards/o/ObsianusGolem.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class ObsianusGolem extends CardImpl { public ObsianusGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/o/ObsidianAcolyte.java b/Mage.Sets/src/mage/cards/o/ObsidianAcolyte.java index 1007a4b31d..6158249880 100644 --- a/Mage.Sets/src/mage/cards/o/ObsidianAcolyte.java +++ b/Mage.Sets/src/mage/cards/o/ObsidianAcolyte.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class ObsidianAcolyte extends CardImpl { public ObsidianAcolyte(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/ObsidianBattleAxe.java b/Mage.Sets/src/mage/cards/o/ObsidianBattleAxe.java index 4b87d64cb4..d1b0124c82 100644 --- a/Mage.Sets/src/mage/cards/o/ObsidianBattleAxe.java +++ b/Mage.Sets/src/mage/cards/o/ObsidianBattleAxe.java @@ -57,8 +57,8 @@ public class ObsidianBattleAxe extends CardImpl { public ObsidianBattleAxe(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.ARTIFACT},"{3}"); - this.subtype.add("Warrior"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+1 and has haste. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 1)); diff --git a/Mage.Sets/src/mage/cards/o/ObsidianFireheart.java b/Mage.Sets/src/mage/cards/o/ObsidianFireheart.java index b5d1167097..b8d0aabb7a 100644 --- a/Mage.Sets/src/mage/cards/o/ObsidianFireheart.java +++ b/Mage.Sets/src/mage/cards/o/ObsidianFireheart.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -67,7 +68,7 @@ public class ObsidianFireheart extends CardImpl { public ObsidianFireheart(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/ObsidianGiant.java b/Mage.Sets/src/mage/cards/o/ObsidianGiant.java index bdc853c286..7a1f8aefec 100644 --- a/Mage.Sets/src/mage/cards/o/ObsidianGiant.java +++ b/Mage.Sets/src/mage/cards/o/ObsidianGiant.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class ObsidianGiant extends CardImpl { public ObsidianGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/ObstinateBaloth.java b/Mage.Sets/src/mage/cards/o/ObstinateBaloth.java index 74306392f2..442cbab0c3 100644 --- a/Mage.Sets/src/mage/cards/o/ObstinateBaloth.java +++ b/Mage.Sets/src/mage/cards/o/ObstinateBaloth.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class ObstinateBaloth extends CardImpl { public ObstinateBaloth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/ObstinateFamiliar.java b/Mage.Sets/src/mage/cards/o/ObstinateFamiliar.java index a58d41a698..05724f4a51 100644 --- a/Mage.Sets/src/mage/cards/o/ObstinateFamiliar.java +++ b/Mage.Sets/src/mage/cards/o/ObstinateFamiliar.java @@ -35,6 +35,7 @@ import mage.abilities.effects.ReplacementEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class ObstinateFamiliar extends CardImpl { public ObstinateFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/ObzedatGhostCouncil.java b/Mage.Sets/src/mage/cards/o/ObzedatGhostCouncil.java index 175ddb4dbb..c0c17aab26 100644 --- a/Mage.Sets/src/mage/cards/o/ObzedatGhostCouncil.java +++ b/Mage.Sets/src/mage/cards/o/ObzedatGhostCouncil.java @@ -60,8 +60,8 @@ public class ObzedatGhostCouncil extends CardImpl { public ObzedatGhostCouncil(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}{B}{B}"); - this.subtype.add("Spirit"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.ADVISOR); addSuperType(SuperType.LEGENDARY); this.power = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/o/OcularHalo.java b/Mage.Sets/src/mage/cards/o/OcularHalo.java index d32ae86136..99a4816d9a 100644 --- a/Mage.Sets/src/mage/cards/o/OcularHalo.java +++ b/Mage.Sets/src/mage/cards/o/OcularHalo.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class OcularHalo extends CardImpl { public OcularHalo(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/o/Oculus.java b/Mage.Sets/src/mage/cards/o/Oculus.java index 5532965abe..ad8b32ab84 100644 --- a/Mage.Sets/src/mage/cards/o/Oculus.java +++ b/Mage.Sets/src/mage/cards/o/Oculus.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class Oculus extends CardImpl { public Oculus (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Homunculus"); + this.subtype.add(SubType.HOMUNCULUS); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OddsEnds.java b/Mage.Sets/src/mage/cards/o/OddsEnds.java index 86bc6953cf..60d6885637 100644 --- a/Mage.Sets/src/mage/cards/o/OddsEnds.java +++ b/Mage.Sets/src/mage/cards/o/OddsEnds.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CopyTargetSpellEffect; @@ -38,12 +37,13 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SpellAbilityType; import mage.filter.StaticFilters; -import mage.filter.common.FilterAttackingCreature; import mage.game.Game; import mage.players.Player; import mage.target.TargetPlayer; import mage.target.TargetSpell; +import java.util.UUID; + public class OddsEnds extends SplitCard { public OddsEnds(UUID ownerId, CardSetInfo setInfo) { @@ -56,7 +56,7 @@ public class OddsEnds extends SplitCard { // Ends // Target player sacrifices two attacking creatures. - getRightHalfCard().getSpellAbility().addEffect(new SacrificeEffect(new FilterAttackingCreature(), 2, "Target player")); + getRightHalfCard().getSpellAbility().addEffect(new SacrificeEffect(StaticFilters.FILTER_ATTACKING_CREATURES, 2, "Target player")); getRightHalfCard().getSpellAbility().addTarget(new TargetPlayer()); } diff --git a/Mage.Sets/src/mage/cards/o/OdiousTrow.java b/Mage.Sets/src/mage/cards/o/OdiousTrow.java index 1d2ca36b09..61c801ed42 100644 --- a/Mage.Sets/src/mage/cards/o/OdiousTrow.java +++ b/Mage.Sets/src/mage/cards/o/OdiousTrow.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class OdiousTrow extends CardImpl { public OdiousTrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B/G}"); - this.subtype.add("Troll"); + this.subtype.add(SubType.TROLL); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OdricLunarchMarshal.java b/Mage.Sets/src/mage/cards/o/OdricLunarchMarshal.java index 25a3eb9b88..a88797dcdc 100644 --- a/Mage.Sets/src/mage/cards/o/OdricLunarchMarshal.java +++ b/Mage.Sets/src/mage/cards/o/OdricLunarchMarshal.java @@ -50,8 +50,8 @@ public class OdricLunarchMarshal extends CardImpl { public OdricLunarchMarshal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -185,4 +185,4 @@ class OdricLunarchMarshalEffect extends OneShotEffect { } return true; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/o/OdricMasterTactician.java b/Mage.Sets/src/mage/cards/o/OdricMasterTactician.java index b0566d35f9..ecdb3e6d79 100644 --- a/Mage.Sets/src/mage/cards/o/OdricMasterTactician.java +++ b/Mage.Sets/src/mage/cards/o/OdricMasterTactician.java @@ -49,8 +49,8 @@ public class OdricMasterTactician extends CardImpl { public OdricMasterTactician(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/OdunosRiverTrawler.java b/Mage.Sets/src/mage/cards/o/OdunosRiverTrawler.java index 755b4eb4b0..bbe6c28d69 100644 --- a/Mage.Sets/src/mage/cards/o/OdunosRiverTrawler.java +++ b/Mage.Sets/src/mage/cards/o/OdunosRiverTrawler.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -57,7 +58,7 @@ public class OdunosRiverTrawler extends CardImpl { public OdunosRiverTrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OdylicWraith.java b/Mage.Sets/src/mage/cards/o/OdylicWraith.java index b8ccf714f7..50bff509b6 100644 --- a/Mage.Sets/src/mage/cards/o/OdylicWraith.java +++ b/Mage.Sets/src/mage/cards/o/OdylicWraith.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class OdylicWraith extends CardImpl { public OdylicWraith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Wraith"); + this.subtype.add(SubType.WRAITH); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/Offalsnout.java b/Mage.Sets/src/mage/cards/o/Offalsnout.java index 73857590f0..9e941443cc 100644 --- a/Mage.Sets/src/mage/cards/o/Offalsnout.java +++ b/Mage.Sets/src/mage/cards/o/Offalsnout.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.Target; import mage.target.common.TargetCardInGraveyard; @@ -48,7 +49,7 @@ public class Offalsnout extends CardImpl { public Offalsnout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OgreArsonist.java b/Mage.Sets/src/mage/cards/o/OgreArsonist.java index 3dbb7ec351..67d682a843 100644 --- a/Mage.Sets/src/mage/cards/o/OgreArsonist.java +++ b/Mage.Sets/src/mage/cards/o/OgreArsonist.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetLandPermanent; /** @@ -46,7 +47,7 @@ public class OgreArsonist extends CardImpl { public OgreArsonist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Ogre"); + this.subtype.add(SubType.OGRE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OgreBattledriver.java b/Mage.Sets/src/mage/cards/o/OgreBattledriver.java index 87c1619b21..e14fcc3d5f 100644 --- a/Mage.Sets/src/mage/cards/o/OgreBattledriver.java +++ b/Mage.Sets/src/mage/cards/o/OgreBattledriver.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SetTargetPointer; import mage.constants.TargetController; @@ -62,8 +63,8 @@ public class OgreBattledriver extends CardImpl { public OgreBattledriver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OgreBerserker.java b/Mage.Sets/src/mage/cards/o/OgreBerserker.java index 82e7d6fdb9..646791cecc 100644 --- a/Mage.Sets/src/mage/cards/o/OgreBerserker.java +++ b/Mage.Sets/src/mage/cards/o/OgreBerserker.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class OgreBerserker extends CardImpl { public OgreBerserker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OgreGatecrasher.java b/Mage.Sets/src/mage/cards/o/OgreGatecrasher.java index 2f0fcb3e24..954a46226f 100644 --- a/Mage.Sets/src/mage/cards/o/OgreGatecrasher.java +++ b/Mage.Sets/src/mage/cards/o/OgreGatecrasher.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; import mage.target.common.TargetCreaturePermanent; @@ -54,8 +55,8 @@ public class OgreGatecrasher extends CardImpl { public OgreGatecrasher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OgreGeargrabber.java b/Mage.Sets/src/mage/cards/o/OgreGeargrabber.java index 2fb3008c3e..ab624558fc 100644 --- a/Mage.Sets/src/mage/cards/o/OgreGeargrabber.java +++ b/Mage.Sets/src/mage/cards/o/OgreGeargrabber.java @@ -62,14 +62,14 @@ public class OgreGeargrabber extends CardImpl { } public OgreGeargrabber(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); - Ability ability = new AttacksTriggeredAbility(new OgreGeargrabberEffect1(), false); - ability.addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); + Ability ability = new AttacksTriggeredAbility(new GainControlTargetEffect(Duration.EndOfTurn), false); + ability.addEffect(new OgreGeargrabberEffect1()); ability.addTarget(new TargetPermanent(1, 1, filter, false)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OgreJailbreaker.java b/Mage.Sets/src/mage/cards/o/OgreJailbreaker.java index 2e92a52470..3e21dad937 100644 --- a/Mage.Sets/src/mage/cards/o/OgreJailbreaker.java +++ b/Mage.Sets/src/mage/cards/o/OgreJailbreaker.java @@ -49,8 +49,8 @@ public class OgreJailbreaker extends CardImpl { public OgreJailbreaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Ogre"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/OgreLeadfoot.java b/Mage.Sets/src/mage/cards/o/OgreLeadfoot.java index b782730b2a..29fc3d256d 100644 --- a/Mage.Sets/src/mage/cards/o/OgreLeadfoot.java +++ b/Mage.Sets/src/mage/cards/o/OgreLeadfoot.java @@ -1,64 +1,65 @@ -/* - * 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.cards.o; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.BecomesBlockedByCreatureTriggeredAbility; -import mage.abilities.effects.common.DestroyTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.common.FilterArtifactCreaturePermanent; - -/** - * - * @author LevelX2 - */ -public class OgreLeadfoot extends CardImpl { - - public OgreLeadfoot(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); - - this.subtype.add("Ogre"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // Whenever Ogre Leadfoot becomes blocked by an artifact creature, destroy that creature. - this.addAbility(new BecomesBlockedByCreatureTriggeredAbility(new DestroyTargetEffect(), new FilterArtifactCreaturePermanent("an artifact creature"), false)); - } - - public OgreLeadfoot(final OgreLeadfoot card) { - super(card); - } - - @Override - public OgreLeadfoot copy() { - return new OgreLeadfoot(this); - } -} +/* + * 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.cards.o; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesBlockedByCreatureTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterArtifactCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class OgreLeadfoot extends CardImpl { + + public OgreLeadfoot(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); + + this.subtype.add(SubType.OGRE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever Ogre Leadfoot becomes blocked by an artifact creature, destroy that creature. + this.addAbility(new BecomesBlockedByCreatureTriggeredAbility(new DestroyTargetEffect(), new FilterArtifactCreaturePermanent("an artifact creature"), false)); + } + + public OgreLeadfoot(final OgreLeadfoot card) { + super(card); + } + + @Override + public OgreLeadfoot copy() { + return new OgreLeadfoot(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OgreMarauder.java b/Mage.Sets/src/mage/cards/o/OgreMarauder.java index 47d969581f..b362a36272 100644 --- a/Mage.Sets/src/mage/cards/o/OgreMarauder.java +++ b/Mage.Sets/src/mage/cards/o/OgreMarauder.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.game.Game; @@ -54,8 +55,8 @@ public class OgreMarauder extends CardImpl { public OgreMarauder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OgreMenial.java b/Mage.Sets/src/mage/cards/o/OgreMenial.java index 0e6ef81b2d..f1153ea62f 100644 --- a/Mage.Sets/src/mage/cards/o/OgreMenial.java +++ b/Mage.Sets/src/mage/cards/o/OgreMenial.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class OgreMenial extends CardImpl { public OgreMenial(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Ogre"); + this.subtype.add(SubType.OGRE); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/OgreRecluse.java b/Mage.Sets/src/mage/cards/o/OgreRecluse.java index 6e30f2b556..15e225fdf7 100644 --- a/Mage.Sets/src/mage/cards/o/OgreRecluse.java +++ b/Mage.Sets/src/mage/cards/o/OgreRecluse.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.TapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class OgreRecluse extends CardImpl { public OgreRecluse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/OgreResister.java b/Mage.Sets/src/mage/cards/o/OgreResister.java index c70287671f..65962707ed 100644 --- a/Mage.Sets/src/mage/cards/o/OgreResister.java +++ b/Mage.Sets/src/mage/cards/o/OgreResister.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class OgreResister extends CardImpl { public OgreResister (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Ogre"); + this.subtype.add(SubType.OGRE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OgreSavant.java b/Mage.Sets/src/mage/cards/o/OgreSavant.java index 0b5ec10656..7fa9b62706 100644 --- a/Mage.Sets/src/mage/cards/o/OgreSavant.java +++ b/Mage.Sets/src/mage/cards/o/OgreSavant.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.target.common.TargetCreaturePermanent; import mage.watchers.common.ManaSpentToCastWatcher; @@ -49,8 +50,8 @@ public class OgreSavant extends CardImpl { public OgreSavant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OgreSentry.java b/Mage.Sets/src/mage/cards/o/OgreSentry.java index 190e45d1c8..882c94beee 100644 --- a/Mage.Sets/src/mage/cards/o/OgreSentry.java +++ b/Mage.Sets/src/mage/cards/o/OgreSentry.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class OgreSentry extends CardImpl { public OgreSentry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OgreShaman.java b/Mage.Sets/src/mage/cards/o/OgreShaman.java index 1a754af6a7..b20c644694 100644 --- a/Mage.Sets/src/mage/cards/o/OgreShaman.java +++ b/Mage.Sets/src/mage/cards/o/OgreShaman.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class OgreShaman extends CardImpl { public OgreShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OgreSlumlord.java b/Mage.Sets/src/mage/cards/o/OgreSlumlord.java index 401fc54362..99b6502945 100644 --- a/Mage.Sets/src/mage/cards/o/OgreSlumlord.java +++ b/Mage.Sets/src/mage/cards/o/OgreSlumlord.java @@ -65,8 +65,8 @@ public class OgreSlumlord extends CardImpl { public OgreSlumlord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Ogre"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OgreTaskmaster.java b/Mage.Sets/src/mage/cards/o/OgreTaskmaster.java index bc44dd6839..cf3972a164 100644 --- a/Mage.Sets/src/mage/cards/o/OgreTaskmaster.java +++ b/Mage.Sets/src/mage/cards/o/OgreTaskmaster.java @@ -33,6 +33,7 @@ import mage.abilities.common.CantBlockAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class OgreTaskmaster extends CardImpl { public OgreTaskmaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Ogre"); + this.subtype.add(SubType.OGRE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OgreWarrior.java b/Mage.Sets/src/mage/cards/o/OgreWarrior.java index 67d8bd17e4..160085ece8 100644 --- a/Mage.Sets/src/mage/cards/o/OgreWarrior.java +++ b/Mage.Sets/src/mage/cards/o/OgreWarrior.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class OgreWarrior extends CardImpl { public OgreWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OgresCleaver.java b/Mage.Sets/src/mage/cards/o/OgresCleaver.java index c75a8472c2..34aca6814e 100644 --- a/Mage.Sets/src/mage/cards/o/OgresCleaver.java +++ b/Mage.Sets/src/mage/cards/o/OgresCleaver.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class OgresCleaver extends CardImpl { public OgresCleaver (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(5))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(5, 0))); diff --git a/Mage.Sets/src/mage/cards/o/OhranViper.java b/Mage.Sets/src/mage/cards/o/OhranViper.java index 075e4b6f46..4b4eecc5e2 100644 --- a/Mage.Sets/src/mage/cards/o/OhranViper.java +++ b/Mage.Sets/src/mage/cards/o/OhranViper.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -49,7 +50,7 @@ public class OhranViper extends CardImpl { public OhranViper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); addSuperType(SuperType.SNOW); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OhranYeti.java b/Mage.Sets/src/mage/cards/o/OhranYeti.java index 67d217597e..dfcfe48500 100644 --- a/Mage.Sets/src/mage/cards/o/OhranYeti.java +++ b/Mage.Sets/src/mage/cards/o/OhranYeti.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class OhranYeti extends CardImpl { public OhranYeti(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); addSuperType(SuperType.SNOW); - this.subtype.add("Yeti"); + this.subtype.add(SubType.YETI); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OjutaiExemplars.java b/Mage.Sets/src/mage/cards/o/OjutaiExemplars.java index 7cb1fd9988..49a334ddfd 100644 --- a/Mage.Sets/src/mage/cards/o/OjutaiExemplars.java +++ b/Mage.Sets/src/mage/cards/o/OjutaiExemplars.java @@ -42,6 +42,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ import mage.target.common.TargetCreaturePermanent; * @author fireshoes */ public class OjutaiExemplars extends CardImpl { - + private static final FilterSpell filter = new FilterSpell("a noncreature spell"); static { @@ -65,31 +66,31 @@ public class OjutaiExemplars extends CardImpl { } public OjutaiExemplars(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(4); this.toughness = new MageInt(4); // Whenever you cast a noncreature spell, choose one - Tap target creature; Ability ability = new SpellCastControllerTriggeredAbility(new TapTargetEffect(), filter, false); ability.addTarget(new TargetCreaturePermanent()); - + // Ojutai Exemplars gain first strike and lifelink until end of turn; Mode mode = new Mode(); Effect effect = new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn); effect.setText("{this} gains first strike"); mode.getEffects().add(effect); Effect effect2 = new GainAbilitySourceEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn); - effect2.setText("and lifelink"); + effect2.setText("and lifelink until end of turn"); mode.getEffects().add(effect2); ability.addMode(mode); - + // or Exile Ojutai Exemplars, then return it to the battlefield tapped under its owner's control. mode = new Mode(); mode.getEffects().add(new OjutaiExemplarsEffect()); ability.addMode(mode); - + this.addAbility(ability); } @@ -132,4 +133,4 @@ class OjutaiExemplarsEffect extends OneShotEffect { } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/o/OjutaiInterceptor.java b/Mage.Sets/src/mage/cards/o/OjutaiInterceptor.java index d14a9af1bb..4b8d149353 100644 --- a/Mage.Sets/src/mage/cards/o/OjutaiInterceptor.java +++ b/Mage.Sets/src/mage/cards/o/OjutaiInterceptor.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class OjutaiInterceptor extends CardImpl { public OjutaiInterceptor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OjutaiMonument.java b/Mage.Sets/src/mage/cards/o/OjutaiMonument.java index cbe5367e75..2d1c16e439 100644 --- a/Mage.Sets/src/mage/cards/o/OjutaiMonument.java +++ b/Mage.Sets/src/mage/cards/o/OjutaiMonument.java @@ -38,6 +38,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -76,7 +77,7 @@ public class OjutaiMonument extends CardImpl { cardType.add(CardType.CREATURE); color.setWhite(true); color.setBlue(true); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); power = new MageInt(4); toughness = new MageInt(4); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/o/OjutaiSoulOfWinter.java b/Mage.Sets/src/mage/cards/o/OjutaiSoulOfWinter.java index 4adf2d2a64..0c2f1ac312 100644 --- a/Mage.Sets/src/mage/cards/o/OjutaiSoulOfWinter.java +++ b/Mage.Sets/src/mage/cards/o/OjutaiSoulOfWinter.java @@ -63,7 +63,7 @@ public class OjutaiSoulOfWinter extends CardImpl { public OjutaiSoulOfWinter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/o/OketraTheTrue.java b/Mage.Sets/src/mage/cards/o/OketraTheTrue.java index f9070651c7..97caef153d 100644 --- a/Mage.Sets/src/mage/cards/o/OketraTheTrue.java +++ b/Mage.Sets/src/mage/cards/o/OketraTheTrue.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.SuperType; @@ -61,7 +62,7 @@ public class OketraTheTrue extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/o/OketrasAttendant.java b/Mage.Sets/src/mage/cards/o/OketrasAttendant.java index 8e8f459f98..3358fb2432 100644 --- a/Mage.Sets/src/mage/cards/o/OketrasAttendant.java +++ b/Mage.Sets/src/mage/cards/o/OketrasAttendant.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class OketrasAttendant extends CardImpl { public OketrasAttendant(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OketrasAvenger.java b/Mage.Sets/src/mage/cards/o/OketrasAvenger.java index d613d00862..ab21e2d905 100644 --- a/Mage.Sets/src/mage/cards/o/OketrasAvenger.java +++ b/Mage.Sets/src/mage/cards/o/OketrasAvenger.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ExertAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,8 +47,8 @@ public class OketrasAvenger extends CardImpl { public OketrasAvenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OketrasLastMercy.java b/Mage.Sets/src/mage/cards/o/OketrasLastMercy.java index ef5122a8e0..82d0e97a87 100644 --- a/Mage.Sets/src/mage/cards/o/OketrasLastMercy.java +++ b/Mage.Sets/src/mage/cards/o/OketrasLastMercy.java @@ -1,96 +1,96 @@ -/* - * 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.cards.o; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.filter.common.FilterControlledLandPermanent; -import mage.game.Game; -import mage.players.Player; - -/** - * - * @author LevelX2 - */ -public class OketrasLastMercy extends CardImpl { - - public OketrasLastMercy(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{W}{W}"); - - // Your life total becomes your starting life total. Lands you control don't untap during your next untap phase. - this.getSpellAbility().addEffect(new OketrasLastMercyEffect()); - this.getSpellAbility().addEffect(new DontUntapInControllersUntapStepAllEffect( - Duration.UntilYourNextTurn, TargetController.YOU, new FilterControlledLandPermanent("Lands you control")) - .setText("Lands you control don't untap during your next untap phase")); - } - - public OketrasLastMercy(final OketrasLastMercy card) { - super(card); - } - - @Override - public OketrasLastMercy copy() { - return new OketrasLastMercy(this); - } -} - -class OketrasLastMercyEffect extends OneShotEffect { - - public OketrasLastMercyEffect() { - super(Outcome.Benefit); - staticText = "Your life total becomes your starting life total"; - } - - public OketrasLastMercyEffect(final OketrasLastMercyEffect effect) { - super(effect); - } - - @Override - public OketrasLastMercyEffect copy() { - return new OketrasLastMercyEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - controller.setLife(game.getLife(), game); - return true; - } - return false; - } - -} +/* + * 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.cards.o; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.filter.common.FilterControlledLandPermanent; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class OketrasLastMercy extends CardImpl { + + public OketrasLastMercy(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{W}{W}"); + + // Your life total becomes your starting life total. Lands you control don't untap during your next untap phase. + this.getSpellAbility().addEffect(new OketrasLastMercyEffect()); + this.getSpellAbility().addEffect(new DontUntapInControllersUntapStepAllEffect( + Duration.UntilYourNextTurn, TargetController.YOU, new FilterControlledLandPermanent("Lands you control")) + .setText("Lands you control don't untap during your next untap phase")); + } + + public OketrasLastMercy(final OketrasLastMercy card) { + super(card); + } + + @Override + public OketrasLastMercy copy() { + return new OketrasLastMercy(this); + } +} + +class OketrasLastMercyEffect extends OneShotEffect { + + public OketrasLastMercyEffect() { + super(Outcome.Benefit); + staticText = "Your life total becomes your starting life total"; + } + + public OketrasLastMercyEffect(final OketrasLastMercyEffect effect) { + super(effect); + } + + @Override + public OketrasLastMercyEffect copy() { + return new OketrasLastMercyEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + controller.setLife(game.getLife(), game); + return true; + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/cards/o/OkibaGangShinobi.java b/Mage.Sets/src/mage/cards/o/OkibaGangShinobi.java index 406f0a8a39..e4fb49fe08 100644 --- a/Mage.Sets/src/mage/cards/o/OkibaGangShinobi.java +++ b/Mage.Sets/src/mage/cards/o/OkibaGangShinobi.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.NinjutsuAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class OkibaGangShinobi extends CardImpl { public OkibaGangShinobi(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Rat"); - this.subtype.add("Ninja"); + this.subtype.add(SubType.RAT); + this.subtype.add(SubType.NINJA); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OkinaNightwatch.java b/Mage.Sets/src/mage/cards/o/OkinaNightwatch.java index 69a7907fa9..822f17ef0a 100644 --- a/Mage.Sets/src/mage/cards/o/OkinaNightwatch.java +++ b/Mage.Sets/src/mage/cards/o/OkinaNightwatch.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class OkinaNightwatch extends CardImpl { public OkinaNightwatch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/Okk.java b/Mage.Sets/src/mage/cards/o/Okk.java index 0a191a9ce9..904a3296db 100644 --- a/Mage.Sets/src/mage/cards/o/Okk.java +++ b/Mage.Sets/src/mage/cards/o/Okk.java @@ -35,6 +35,7 @@ import mage.abilities.effects.RestrictionEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterAttackingCreature; @@ -50,7 +51,7 @@ public class Okk extends CardImpl { public Okk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/OldGhastbark.java b/Mage.Sets/src/mage/cards/o/OldGhastbark.java index 2144fb38f5..181499bc0f 100644 --- a/Mage.Sets/src/mage/cards/o/OldGhastbark.java +++ b/Mage.Sets/src/mage/cards/o/OldGhastbark.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class OldGhastbark extends CardImpl { public OldGhastbark(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G/W}{G/W}"); - this.subtype.add("Treefolk"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/o/OldGrowthDryads.java b/Mage.Sets/src/mage/cards/o/OldGrowthDryads.java new file mode 100644 index 0000000000..a0dfc49a7d --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OldGrowthDryads.java @@ -0,0 +1,114 @@ +/* + * 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.cards.o; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterBasicLandCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author TheElk801 + */ +public class OldGrowthDryads extends CardImpl { + + public OldGrowthDryads(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); + + this.subtype.add(SubType.DRYAD); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Old-Growth Dryads enters the battlefield, each opponent may search his or her library for a basic land card, put it onto the battlefield tapped, then shuffle his or her library. + this.addAbility(new EntersBattlefieldTriggeredAbility(new OldGrowthDryadsEffect())); + } + + public OldGrowthDryads(final OldGrowthDryads card) { + super(card); + } + + @Override + public OldGrowthDryads copy() { + return new OldGrowthDryads(this); + } +} + +class OldGrowthDryadsEffect extends OneShotEffect { + + OldGrowthDryadsEffect() { + super(Outcome.Detriment); + this.staticText = "each opponent may search his or her library for a basic land card, put it onto the battlefield tapped, then shuffle his or her library"; + } + + OldGrowthDryadsEffect(final OldGrowthDryadsEffect effect) { + super(effect); + } + + @Override + public OldGrowthDryadsEffect copy() { + return new OldGrowthDryadsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Set playersThatSearched = new HashSet<>(1); + for (UUID opponentId : game.getOpponents(source.getControllerId())) { + Player opponent = game.getPlayer(opponentId); + if (opponent != null && opponent.chooseUse(Outcome.PutLandInPlay, "Search your library for a basic land card and put it onto the battlefield tapped?", source, game)) { + TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); + if (opponent.searchLibrary(target, game)) { + Card targetCard = opponent.getLibrary().getCard(target.getFirstTarget(), game); + if (targetCard != null) { + opponent.moveCards(targetCard, Zone.BATTLEFIELD, source, game, true, false, false, null); + playersThatSearched.add(opponent); + } + } + } + } + for (Player opponent : playersThatSearched) { + opponent.shuffleLibrary(source, game); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/o/OldManOfTheSea.java b/Mage.Sets/src/mage/cards/o/OldManOfTheSea.java index dbb42971c5..21557b3d9a 100644 --- a/Mage.Sets/src/mage/cards/o/OldManOfTheSea.java +++ b/Mage.Sets/src/mage/cards/o/OldManOfTheSea.java @@ -43,6 +43,7 @@ import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -61,7 +62,7 @@ public class OldManOfTheSea extends CardImpl { public OldManOfTheSea(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OliviaMobilizedForWar.java b/Mage.Sets/src/mage/cards/o/OliviaMobilizedForWar.java index 5a74236d98..1575ef488b 100644 --- a/Mage.Sets/src/mage/cards/o/OliviaMobilizedForWar.java +++ b/Mage.Sets/src/mage/cards/o/OliviaMobilizedForWar.java @@ -52,8 +52,8 @@ public class OliviaMobilizedForWar extends CardImpl { public OliviaMobilizedForWar(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vampire"); - this.subtype.add("Knight"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OliviaVoldaren.java b/Mage.Sets/src/mage/cards/o/OliviaVoldaren.java index f39a0c7976..8dbdf0c849 100644 --- a/Mage.Sets/src/mage/cards/o/OliviaVoldaren.java +++ b/Mage.Sets/src/mage/cards/o/OliviaVoldaren.java @@ -69,7 +69,7 @@ public class OliviaVoldaren extends CardImpl { public OliviaVoldaren(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OliviasBloodsworn.java b/Mage.Sets/src/mage/cards/o/OliviasBloodsworn.java index 01dd864fdd..87d5f5fec7 100644 --- a/Mage.Sets/src/mage/cards/o/OliviasBloodsworn.java +++ b/Mage.Sets/src/mage/cards/o/OliviasBloodsworn.java @@ -60,8 +60,8 @@ public class OliviasBloodsworn extends CardImpl { public OliviasBloodsworn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OliviasDragoon.java b/Mage.Sets/src/mage/cards/o/OliviasDragoon.java index 5a35276c94..e3f86fb80f 100644 --- a/Mage.Sets/src/mage/cards/o/OliviasDragoon.java +++ b/Mage.Sets/src/mage/cards/o/OliviasDragoon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class OliviasDragoon extends CardImpl { public OliviasDragoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OloroAgelessAscetic.java b/Mage.Sets/src/mage/cards/o/OloroAgelessAscetic.java index 69d4c4c143..4b1905ccc2 100644 --- a/Mage.Sets/src/mage/cards/o/OloroAgelessAscetic.java +++ b/Mage.Sets/src/mage/cards/o/OloroAgelessAscetic.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.LoseLifeOpponentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class OloroAgelessAscetic extends CardImpl { public OloroAgelessAscetic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Giant"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/o/OmegaMyr.java b/Mage.Sets/src/mage/cards/o/OmegaMyr.java index c1a7958803..3d5346b60e 100644 --- a/Mage.Sets/src/mage/cards/o/OmegaMyr.java +++ b/Mage.Sets/src/mage/cards/o/OmegaMyr.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class OmegaMyr extends CardImpl { public OmegaMyr(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OmenMachine.java b/Mage.Sets/src/mage/cards/o/OmenMachine.java index ce60b360c8..bd9cc8e682 100644 --- a/Mage.Sets/src/mage/cards/o/OmenMachine.java +++ b/Mage.Sets/src/mage/cards/o/OmenMachine.java @@ -53,7 +53,7 @@ import mage.players.Player; public class OmenMachine extends CardImpl { public OmenMachine(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{6}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); // Players can't draw cards. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new OmenMachineEffect())); @@ -126,9 +126,7 @@ class OmenMachineEffect2 extends OneShotEffect { if (card.isLand()) { player.moveCards(card, Zone.BATTLEFIELD, source, game); } else { - if (card.getSpellAbility().canChooseTarget(game)) { - player.cast(card.getSpellAbility(), game, true); - } + player.cast(card.getSpellAbility(), game, true); } } return true; diff --git a/Mage.Sets/src/mage/cards/o/OmenOfFire.java b/Mage.Sets/src/mage/cards/o/OmenOfFire.java new file mode 100644 index 0000000000..298366f46d --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OmenOfFire.java @@ -0,0 +1,128 @@ +/* + * 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.cards.o; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect; +import mage.abilities.effects.common.SacrificeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author L_J + */ +public class OmenOfFire extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Islands"); + static { + filter.add(new SubtypePredicate(SubType.ISLAND)); + } + + public OmenOfFire(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}{R}"); + + // Return all Islands to their owners' hands. + this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(filter)); + + // Each player sacrifices a Plains or a white permanent for each white permanent he or she controls. + this.getSpellAbility().addEffect(new OmenOfFireEffect()); + } + + public OmenOfFire(final OmenOfFire card) { + super(card); + } + + @Override + public OmenOfFire copy() { + return new OmenOfFire(this); + } +} + +class OmenOfFireEffect extends OneShotEffect { + + private static final FilterPermanent filterWhite1 = new FilterPermanent("Plains or white permanent"); + static { + filterWhite1.add(Predicates.or( + new SubtypePredicate(SubType.PLAINS), + new ColorPredicate(ObjectColor.WHITE))); + } + + private static final FilterPermanent filterWhite2 = new FilterPermanent("white permanent"); + static { + filterWhite2.add(new ColorPredicate(ObjectColor.WHITE)); + } + + public OmenOfFireEffect() { + super(Outcome.Detriment); + this.staticText = "Each player sacrifices a Plains or a white permanent for each white permanent he or she controls"; + } + + public OmenOfFireEffect(final OmenOfFireEffect effect) { + super(effect); + } + + @Override + public OmenOfFireEffect copy() { + return new OmenOfFireEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + int whitePermanents = game.getBattlefield().countAll(filterWhite2, playerId, game); + if (whitePermanents > 0) { + Effect effect = new SacrificeEffect(filterWhite1, whitePermanents, ""); + effect.setTargetPointer(new FixedTarget(playerId)); + effect.apply(game, source); + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/o/Omenspeaker.java b/Mage.Sets/src/mage/cards/o/Omenspeaker.java index c9a8307eeb..0b3c44945e 100644 --- a/Mage.Sets/src/mage/cards/o/Omenspeaker.java +++ b/Mage.Sets/src/mage/cards/o/Omenspeaker.java @@ -34,6 +34,7 @@ import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class Omenspeaker extends CardImpl { public Omenspeaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OminousSphinx.java b/Mage.Sets/src/mage/cards/o/OminousSphinx.java index ad678ff6fa..4bddcf6705 100644 --- a/Mage.Sets/src/mage/cards/o/OminousSphinx.java +++ b/Mage.Sets/src/mage/cards/o/OminousSphinx.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -56,7 +57,7 @@ public class OminousSphinx extends CardImpl { public OminousSphinx(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/OmnathLocusOfMana.java b/Mage.Sets/src/mage/cards/o/OmnathLocusOfMana.java index 690b010de0..4b87eb887b 100644 --- a/Mage.Sets/src/mage/cards/o/OmnathLocusOfMana.java +++ b/Mage.Sets/src/mage/cards/o/OmnathLocusOfMana.java @@ -50,7 +50,7 @@ public class OmnathLocusOfMana extends CardImpl { public OmnathLocusOfMana(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OmnathLocusOfRage.java b/Mage.Sets/src/mage/cards/o/OmnathLocusOfRage.java index 78a5642b0d..fd60ffb2d6 100644 --- a/Mage.Sets/src/mage/cards/o/OmnathLocusOfRage.java +++ b/Mage.Sets/src/mage/cards/o/OmnathLocusOfRage.java @@ -62,7 +62,7 @@ public class OmnathLocusOfRage extends CardImpl { public OmnathLocusOfRage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/o/Omnibian.java b/Mage.Sets/src/mage/cards/o/Omnibian.java index 64b5ac1377..521fca3b56 100644 --- a/Mage.Sets/src/mage/cards/o/Omnibian.java +++ b/Mage.Sets/src/mage/cards/o/Omnibian.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -49,7 +50,7 @@ public class Omnibian extends CardImpl { public Omnibian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}{U}"); - this.subtype.add("Frog"); + this.subtype.add(SubType.FROG); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -74,7 +75,7 @@ class OmnibianFrogToken extends Token { public OmnibianFrogToken() { super("", "3/3 Frog"); - this.subtype.add("Frog"); + this.subtype.add(SubType.FROG); this.power = new MageInt(3); this.toughness = new MageInt(3); } diff --git a/Mage.Sets/src/mage/cards/o/OnduChampion.java b/Mage.Sets/src/mage/cards/o/OnduChampion.java index 8ed1c4a243..bf3e653157 100644 --- a/Mage.Sets/src/mage/cards/o/OnduChampion.java +++ b/Mage.Sets/src/mage/cards/o/OnduChampion.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; @@ -46,9 +47,9 @@ public class OnduChampion extends CardImpl { public OnduChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Warrior"); - this.subtype.add("Ally"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OnduCleric.java b/Mage.Sets/src/mage/cards/o/OnduCleric.java index a221b42fa9..4da89aa681 100644 --- a/Mage.Sets/src/mage/cards/o/OnduCleric.java +++ b/Mage.Sets/src/mage/cards/o/OnduCleric.java @@ -56,9 +56,9 @@ public class OnduCleric extends CardImpl { public OnduCleric(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Cleric"); - this.subtype.add("Ally"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.ALLY); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OnduGiant.java b/Mage.Sets/src/mage/cards/o/OnduGiant.java index 30b714e4ac..c4704c1f78 100644 --- a/Mage.Sets/src/mage/cards/o/OnduGiant.java +++ b/Mage.Sets/src/mage/cards/o/OnduGiant.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.target.common.TargetCardInLibrary; @@ -47,8 +48,8 @@ public class OnduGiant extends CardImpl { public OnduGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Giant"); - this.subtype.add("Druid"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/OnduGreathorn.java b/Mage.Sets/src/mage/cards/o/OnduGreathorn.java index 727d7042d4..ad2af20702 100644 --- a/Mage.Sets/src/mage/cards/o/OnduGreathorn.java +++ b/Mage.Sets/src/mage/cards/o/OnduGreathorn.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,7 +46,7 @@ public class OnduGreathorn extends CardImpl { public OnduGreathorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OnduWarCleric.java b/Mage.Sets/src/mage/cards/o/OnduWarCleric.java index 113c52e229..abba03ba20 100644 --- a/Mage.Sets/src/mage/cards/o/OnduWarCleric.java +++ b/Mage.Sets/src/mage/cards/o/OnduWarCleric.java @@ -61,9 +61,9 @@ public class OnduWarCleric extends CardImpl { public OnduWarCleric(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OneEyedScarecrow.java b/Mage.Sets/src/mage/cards/o/OneEyedScarecrow.java index 6b7800ed92..27e6a1029e 100644 --- a/Mage.Sets/src/mage/cards/o/OneEyedScarecrow.java +++ b/Mage.Sets/src/mage/cards/o/OneEyedScarecrow.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class OneEyedScarecrow extends CardImpl { public OneEyedScarecrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OneOfThePack.java b/Mage.Sets/src/mage/cards/o/OneOfThePack.java index 86592c2947..30a44946f5 100644 --- a/Mage.Sets/src/mage/cards/o/OneOfThePack.java +++ b/Mage.Sets/src/mage/cards/o/OneOfThePack.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -48,7 +49,7 @@ public class OneOfThePack extends CardImpl { public OneOfThePack(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(5); this.toughness = new MageInt(6); this.color.setGreen(true); diff --git a/Mage.Sets/src/mage/cards/o/OneThousandLashes.java b/Mage.Sets/src/mage/cards/o/OneThousandLashes.java index 8662242701..7bc10e608f 100644 --- a/Mage.Sets/src/mage/cards/o/OneThousandLashes.java +++ b/Mage.Sets/src/mage/cards/o/OneThousandLashes.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class OneThousandLashes extends CardImpl { public OneThousandLashes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/o/OneWithNature.java b/Mage.Sets/src/mage/cards/o/OneWithNature.java index 97b8c45cba..6f4e7097f9 100644 --- a/Mage.Sets/src/mage/cards/o/OneWithNature.java +++ b/Mage.Sets/src/mage/cards/o/OneWithNature.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.filter.StaticFilters; @@ -51,8 +52,8 @@ import java.util.UUID; public class OneWithNature extends CardImpl { public OneWithNature(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); @@ -60,12 +61,13 @@ public class OneWithNature extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.PutLandInPlay)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - + // Whenever enchanted creature deals combat damage to a player, you may search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library. ability = new DealsDamageToAPlayerAttachedTriggeredAbility( - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, Outcome.PutLandInPlay), + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, Outcome.PutLandInPlay) + .setText("you may search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library."), "enchanted creature", true, false, true, TargetController.ANY); - this.addAbility(ability); + this.addAbility(ability); } public OneWithNature(final OneWithNature card) { diff --git a/Mage.Sets/src/mage/cards/o/OneWithTheWind.java b/Mage.Sets/src/mage/cards/o/OneWithTheWind.java new file mode 100644 index 0000000000..487892e8eb --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OneWithTheWind.java @@ -0,0 +1,82 @@ +/* + * 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.cards.o; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class OneWithTheWind extends CardImpl { + + public OneWithTheWind(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + + this.subtype.add(SubType.AURA); + + // Enchant Creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +2/+2 and has flying. + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield)); + ability.addEffect(new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA) + .setText("and has flying")); + this.addAbility(ability); + } + + public OneWithTheWind(final OneWithTheWind card) { + super(card); + } + + @Override + public OneWithTheWind copy() { + return new OneWithTheWind(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OngoingInvestigation.java b/Mage.Sets/src/mage/cards/o/OngoingInvestigation.java index ed841828b0..1dd5bef22f 100644 --- a/Mage.Sets/src/mage/cards/o/OngoingInvestigation.java +++ b/Mage.Sets/src/mage/cards/o/OngoingInvestigation.java @@ -27,15 +27,14 @@ */ package mage.cards.o; -import java.util.HashSet; -import java.util.Set; +import java.util.ArrayList; +import java.util.List; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.ExileFromGraveCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.Effect; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.keyword.InvestigateEffect; import mage.cards.CardImpl; @@ -46,7 +45,6 @@ import mage.filter.common.FilterCreatureCard; import mage.game.Game; import mage.game.events.DamagedPlayerEvent; import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.target.common.TargetCardInYourGraveyard; @@ -57,11 +55,11 @@ import mage.target.common.TargetCardInYourGraveyard; public class OngoingInvestigation extends CardImpl { public OngoingInvestigation(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); // Whenever one or more creatures you control deal combat damage to a player, investigate. this.addAbility(new OngoingInvestigationTriggeredAbility()); - + // {1}{G}, Exile a creature card from your graveyard: Investigate. You gain 2 life. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new InvestigateEffect(), new ManaCostsImpl("{1}{G}")); ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterCreatureCard("a creature card from your graveyard")))); @@ -81,8 +79,7 @@ public class OngoingInvestigation extends CardImpl { class OngoingInvestigationTriggeredAbility extends TriggeredAbilityImpl { - private boolean madeDamage = false; - private Set damagedPlayers = new HashSet<>(); + List damagedPlayerIds = new ArrayList<>(); public OngoingInvestigationTriggeredAbility() { super(Zone.BATTLEFIELD, new InvestigateEffect(), false); @@ -90,9 +87,6 @@ class OngoingInvestigationTriggeredAbility extends TriggeredAbilityImpl { public OngoingInvestigationTriggeredAbility(final OngoingInvestigationTriggeredAbility ability) { super(ability); - this.madeDamage = ability.madeDamage; - this.damagedPlayers = new HashSet<>(); - this.damagedPlayers.addAll(ability.damagedPlayers); } @Override @@ -102,36 +96,30 @@ class OngoingInvestigationTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.DAMAGED_PLAYER || event.getType() == EventType.COMBAT_DAMAGE_STEP_POST; + return event.getType() == GameEvent.EventType.DAMAGED_PLAYER + || event.getType() == GameEvent.EventType.END_COMBAT_STEP_POST; } @Override public boolean checkTrigger(GameEvent event, Game game) { - if (event.getType() == EventType.DAMAGED_PLAYER) { - DamagedPlayerEvent damageEvent = (DamagedPlayerEvent) event; - Permanent p = game.getPermanent(event.getSourceId()); - if (damageEvent.isCombatDamage() && p != null && p.getControllerId().equals(this.getControllerId())) { - madeDamage = true; - damagedPlayers.add(event.getPlayerId()); + if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) { + if (((DamagedPlayerEvent) event).isCombatDamage()) { + Permanent creature = game.getPermanent(event.getSourceId()); + if (creature != null && creature.getControllerId().equals(controllerId) + && !damagedPlayerIds.contains(event.getTargetId())) { + damagedPlayerIds.add(event.getTargetId()); + return true; + } } } - if (event.getType() == EventType.COMBAT_DAMAGE_STEP_POST) { - if (madeDamage) { - Set damagedPlayersCopy = new HashSet<>(); - damagedPlayersCopy.addAll(damagedPlayers); - for(Effect effect: this.getEffects()) { - effect.setValue("damagedPlayers", damagedPlayersCopy); - } - damagedPlayers.clear(); - madeDamage = false; - return true; - } + if (event.getType() == GameEvent.EventType.END_COMBAT_STEP_POST) { + damagedPlayerIds.clear(); } return false; } @Override public String getRule() { - return "Whenever one or more creatures you control deal combat damage to a player, " + super.getRule(); + return "Whenever one or more creatures you control deal combat damage to a player, investigate"; } } diff --git a/Mage.Sets/src/mage/cards/o/OniOfWildPlaces.java b/Mage.Sets/src/mage/cards/o/OniOfWildPlaces.java index dc1227a32d..d17db1263f 100644 --- a/Mage.Sets/src/mage/cards/o/OniOfWildPlaces.java +++ b/Mage.Sets/src/mage/cards/o/OniOfWildPlaces.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -54,8 +55,8 @@ public class OniOfWildPlaces extends CardImpl { public OniOfWildPlaces(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Demon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DEMON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/o/OniPossession.java b/Mage.Sets/src/mage/cards/o/OniPossession.java index c68e5dab47..03473e8a04 100644 --- a/Mage.Sets/src/mage/cards/o/OniPossession.java +++ b/Mage.Sets/src/mage/cards/o/OniPossession.java @@ -27,9 +27,8 @@ */ package mage.cards.o; -import java.util.ArrayList; -import java.util.List; import java.util.UUID; + import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; @@ -42,12 +41,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.constants.Zone; +import mage.constants.*; import mage.filter.common.FilterControlledCreaturePermanent; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -58,16 +52,9 @@ import mage.target.common.TargetCreaturePermanent; */ public class OniPossession extends CardImpl { - private static final List setSubtypes = new ArrayList<>(); - - static { - setSubtypes.add("Demon"); - setSubtypes.add("Spirit"); - } - public OniPossession(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); @@ -84,7 +71,7 @@ public class OniPossession extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 3, Duration.WhileOnBattlefield))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.AURA))); // Enchanted creature is a Demon Spirit. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetCardSubtypeAttachedEffect(setSubtypes, Duration.WhileOnBattlefield, AttachmentType.AURA))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetCardSubtypeAttachedEffect(Duration.WhileOnBattlefield, AttachmentType.AURA, SubType.DEMON, SubType.SPIRIT))); } public OniPossession(final OniPossession card) { diff --git a/Mage.Sets/src/mage/cards/o/Onulet.java b/Mage.Sets/src/mage/cards/o/Onulet.java index 3fc41226d1..26f482c545 100644 --- a/Mage.Sets/src/mage/cards/o/Onulet.java +++ b/Mage.Sets/src/mage/cards/o/Onulet.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class Onulet extends CardImpl { public Onulet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OnyxMage.java b/Mage.Sets/src/mage/cards/o/OnyxMage.java index 57252b7d75..0eb8cfb660 100644 --- a/Mage.Sets/src/mage/cards/o/OnyxMage.java +++ b/Mage.Sets/src/mage/cards/o/OnyxMage.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -49,8 +50,8 @@ public class OnyxMage extends CardImpl { public OnyxMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OonaQueenOfTheFae.java b/Mage.Sets/src/mage/cards/o/OonaQueenOfTheFae.java index d6c4e4802d..ad4e21ef1b 100644 --- a/Mage.Sets/src/mage/cards/o/OonaQueenOfTheFae.java +++ b/Mage.Sets/src/mage/cards/o/OonaQueenOfTheFae.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.choices.ChoiceColor; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -57,8 +58,8 @@ public class OonaQueenOfTheFae extends CardImpl { public OonaQueenOfTheFae(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U/B}{U/B}{U/B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Faerie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/o/OonasBlackguard.java b/Mage.Sets/src/mage/cards/o/OonasBlackguard.java index c96962494d..828c2a53be 100644 --- a/Mage.Sets/src/mage/cards/o/OonasBlackguard.java +++ b/Mage.Sets/src/mage/cards/o/OonasBlackguard.java @@ -56,8 +56,8 @@ public class OonasBlackguard extends CardImpl { public OonasBlackguard(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Faerie"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OonasGatewarden.java b/Mage.Sets/src/mage/cards/o/OonasGatewarden.java index 49e0f33559..98cda6360a 100644 --- a/Mage.Sets/src/mage/cards/o/OonasGatewarden.java +++ b/Mage.Sets/src/mage/cards/o/OonasGatewarden.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class OonasGatewarden extends CardImpl { public OonasGatewarden(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U/B}"); - this.subtype.add("Faerie"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OonasProwler.java b/Mage.Sets/src/mage/cards/o/OonasProwler.java index c8aa2cb867..ed5d019557 100644 --- a/Mage.Sets/src/mage/cards/o/OonasProwler.java +++ b/Mage.Sets/src/mage/cards/o/OonasProwler.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class OonasProwler extends CardImpl { public OonasProwler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Faerie"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OpalArchangel.java b/Mage.Sets/src/mage/cards/o/OpalArchangel.java index 5502b6d3b0..23319578f8 100644 --- a/Mage.Sets/src/mage/cards/o/OpalArchangel.java +++ b/Mage.Sets/src/mage/cards/o/OpalArchangel.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; @@ -77,7 +78,7 @@ class OpalArchangelToken extends Token { public OpalArchangelToken() { super("Angel", "5/5 Angel creature with flying and vigilance"); cardType.add(CardType.CREATURE); - subtype.add("Angel"); + subtype.add(SubType.ANGEL); power = new MageInt(5); toughness = new MageInt(5); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/o/OpalCaryatid.java b/Mage.Sets/src/mage/cards/o/OpalCaryatid.java index f8737bb273..84b4422d73 100644 --- a/Mage.Sets/src/mage/cards/o/OpalCaryatid.java +++ b/Mage.Sets/src/mage/cards/o/OpalCaryatid.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; @@ -75,7 +76,7 @@ class OpalCaryatidSoldier extends Token { public OpalCaryatidSoldier() { super("Soldier", "2/2 Soldier creature"); cardType.add(CardType.CREATURE); - subtype.add("Soldier"); + subtype.add(SubType.SOLDIER); power = new MageInt(2); toughness = new MageInt(2); } diff --git a/Mage.Sets/src/mage/cards/o/OpalChampion.java b/Mage.Sets/src/mage/cards/o/OpalChampion.java index 53b02a2212..cbc0db8d28 100644 --- a/Mage.Sets/src/mage/cards/o/OpalChampion.java +++ b/Mage.Sets/src/mage/cards/o/OpalChampion.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; @@ -76,7 +77,7 @@ class OpalChampionKnight extends Token { public OpalChampionKnight() { super("Knight", "3/3 Knight creature with first strike"); cardType.add(CardType.CREATURE); - subtype.add("Knight"); + subtype.add(SubType.KNIGHT); power = new MageInt(3); toughness = new MageInt(3); this.addAbility(FirstStrikeAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/o/OpalEyeKondasYojimbo.java b/Mage.Sets/src/mage/cards/o/OpalEyeKondasYojimbo.java index 7db107668c..23b9527c5f 100644 --- a/Mage.Sets/src/mage/cards/o/OpalEyeKondasYojimbo.java +++ b/Mage.Sets/src/mage/cards/o/OpalEyeKondasYojimbo.java @@ -56,8 +56,8 @@ public class OpalEyeKondasYojimbo extends CardImpl { public OpalEyeKondasYojimbo(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Fox"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.FOX); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/OpalGargoyle.java b/Mage.Sets/src/mage/cards/o/OpalGargoyle.java index fa0d7167f6..f224dc74f7 100644 --- a/Mage.Sets/src/mage/cards/o/OpalGargoyle.java +++ b/Mage.Sets/src/mage/cards/o/OpalGargoyle.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; @@ -76,7 +77,7 @@ class OpalGargoyleToken extends Token { public OpalGargoyleToken() { super("Gargoyle", "2/2 Gargoyle creature with flying"); cardType.add(CardType.CREATURE); - subtype.add("Gargoyle"); + subtype.add(SubType.GARGOYLE); power = new MageInt(2); toughness = new MageInt(2); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/o/OpalGuardian.java b/Mage.Sets/src/mage/cards/o/OpalGuardian.java index 7378045708..9681bd3fd8 100644 --- a/Mage.Sets/src/mage/cards/o/OpalGuardian.java +++ b/Mage.Sets/src/mage/cards/o/OpalGuardian.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; @@ -77,7 +78,7 @@ class OpalGuardianGargoyle extends Token { public OpalGuardianGargoyle() { super("Gargoyle", "3/4 Gargoyle creature with flying and protection from red"); cardType.add(CardType.CREATURE); - subtype.add("Gargoyle"); + subtype.add(SubType.GARGOYLE); power = new MageInt(3); toughness = new MageInt(4); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/o/OpalLakeGatekeepers.java b/Mage.Sets/src/mage/cards/o/OpalLakeGatekeepers.java index 7a8727933a..a6c7197369 100644 --- a/Mage.Sets/src/mage/cards/o/OpalLakeGatekeepers.java +++ b/Mage.Sets/src/mage/cards/o/OpalLakeGatekeepers.java @@ -57,8 +57,8 @@ public class OpalLakeGatekeepers extends CardImpl { public OpalLakeGatekeepers (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/OpalineBracers.java b/Mage.Sets/src/mage/cards/o/OpalineBracers.java index cc492f0244..c155c9d371 100644 --- a/Mage.Sets/src/mage/cards/o/OpalineBracers.java +++ b/Mage.Sets/src/mage/cards/o/OpalineBracers.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.SunburstAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -49,7 +50,7 @@ public class OpalineBracers extends CardImpl { public OpalineBracers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Sunburst this.addAbility(new SunburstAbility(this)); diff --git a/Mage.Sets/src/mage/cards/o/OpalineSliver.java b/Mage.Sets/src/mage/cards/o/OpalineSliver.java index 2f1047cf27..1eced72c6d 100644 --- a/Mage.Sets/src/mage/cards/o/OpalineSliver.java +++ b/Mage.Sets/src/mage/cards/o/OpalineSliver.java @@ -61,7 +61,7 @@ public class OpalineSliver extends CardImpl { public OpalineSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{U}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OpalineUnicorn.java b/Mage.Sets/src/mage/cards/o/OpalineUnicorn.java index c60aa1f119..7dd27f68ba 100644 --- a/Mage.Sets/src/mage/cards/o/OpalineUnicorn.java +++ b/Mage.Sets/src/mage/cards/o/OpalineUnicorn.java @@ -34,6 +34,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class OpalineUnicorn extends CardImpl { public OpalineUnicorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Unicorn"); + this.subtype.add(SubType.UNICORN); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OpenSeason.java b/Mage.Sets/src/mage/cards/o/OpenSeason.java index 592ca821c0..d453b413ce 100644 --- a/Mage.Sets/src/mage/cards/o/OpenSeason.java +++ b/Mage.Sets/src/mage/cards/o/OpenSeason.java @@ -1,162 +1,162 @@ -/* - * 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.cards.o; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.RestrictionEffect; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.abilities.keyword.BountyAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.counters.CounterType; -import mage.filter.common.FilterCreaturePermanent; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.TargetPermanent; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Styxo - */ -public class OpenSeason extends CardImpl { - - public OpenSeason(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); - - // When {this} enters the battlefield, for each opponent, put a bounty counter on target creature that player controls - Effect effect = new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()); - effect.setText("for each opponent, put a bounty counter on target creature that player controls"); - Ability ability = new EntersBattlefieldTriggeredAbility(effect); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability); - - // Creatures your opponent control with bounty counters on them can't activate abilities - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new OpenSeasonRestrictionEffect())); - - // Bounty - Whenever a creature an opponent controls with a bounty counter on it dies, that creature's controller loses 2 life. Each other player gains 2 life. - this.addAbility(new BountyAbility(new OpenSeasonEffect(), false, true)); - - } - - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability instanceof EntersBattlefieldTriggeredAbility) { - ability.getTargets().clear(); - for (UUID opponentId : game.getOpponents(ability.getControllerId())) { - Player opponent = game.getPlayer(opponentId); - if (opponent != null) { - ability.addTarget(new TargetPermanent(new FilterCreaturePermanent("creature from opponent " + opponent.getLogName()))); - } - } - } - } - - public OpenSeason(final OpenSeason card) { - super(card); - } - - @Override - public OpenSeason copy() { - return new OpenSeason(this); - } -} - -class OpenSeasonRestrictionEffect extends RestrictionEffect { - - public OpenSeasonRestrictionEffect() { - super(Duration.WhileOnBattlefield); - staticText = "Creatures your opponent control with bounty counters on them can't activate abilities"; - } - - public OpenSeasonRestrictionEffect(final OpenSeasonRestrictionEffect effect) { - super(effect); - } - - @Override - public boolean applies(Permanent permanent, Ability source, Game game) { - return permanent.isCreature() - && permanent.getCounters(game).getCount(CounterType.BOUNTY) > 0 - && game.getOpponents(source.getControllerId()).contains(permanent.getControllerId()); - } - - @Override - public boolean canUseActivatedAbilities(Permanent permanent, Ability source, Game game) { - return false; - } - - @Override - public OpenSeasonRestrictionEffect copy() { - return new OpenSeasonRestrictionEffect(this); - } - -} - -class OpenSeasonEffect extends OneShotEffect { - - public OpenSeasonEffect() { - super(Outcome.LoseLife); - staticText = "that creature's controler loses 2 life. Each other player gains 2 life"; - } - - public OpenSeasonEffect(final OpenSeasonEffect effect) { - super(effect); - } - - @Override - public OpenSeasonEffect copy() { - return new OpenSeasonEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - UUID controller = game.getControllerId(source.getFirstTarget()); - if (controller != null) { - game.getPlayer(controller).loseLife(2, game, false); - for (UUID playerId : game.getOpponents(controller)) { - Player player = game.getPlayer(playerId); - if (player != null) { - player.gainLife(2, game); - } - } - return true; - } - return false; - } - -} +/* + * 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.cards.o; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.RestrictionEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.BountyAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Styxo + */ +public class OpenSeason extends CardImpl { + + public OpenSeason(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); + + // When {this} enters the battlefield, for each opponent, put a bounty counter on target creature that player controls + Effect effect = new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()); + effect.setText("for each opponent, put a bounty counter on target creature that player controls"); + Ability ability = new EntersBattlefieldTriggeredAbility(effect); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // Creatures your opponent control with bounty counters on them can't activate abilities + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new OpenSeasonRestrictionEffect())); + + // Bounty - Whenever a creature an opponent controls with a bounty counter on it dies, that creature's controller loses 2 life. Each other player gains 2 life. + this.addAbility(new BountyAbility(new OpenSeasonEffect(), false, true)); + + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability instanceof EntersBattlefieldTriggeredAbility) { + ability.getTargets().clear(); + for (UUID opponentId : game.getOpponents(ability.getControllerId())) { + Player opponent = game.getPlayer(opponentId); + if (opponent != null) { + ability.addTarget(new TargetPermanent(new FilterCreaturePermanent("creature from opponent " + opponent.getLogName()))); + } + } + } + } + + public OpenSeason(final OpenSeason card) { + super(card); + } + + @Override + public OpenSeason copy() { + return new OpenSeason(this); + } +} + +class OpenSeasonRestrictionEffect extends RestrictionEffect { + + public OpenSeasonRestrictionEffect() { + super(Duration.WhileOnBattlefield); + staticText = "Creatures your opponent control with bounty counters on them can't activate abilities"; + } + + public OpenSeasonRestrictionEffect(final OpenSeasonRestrictionEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return permanent.isCreature() + && permanent.getCounters(game).getCount(CounterType.BOUNTY) > 0 + && game.getOpponents(source.getControllerId()).contains(permanent.getControllerId()); + } + + @Override + public boolean canUseActivatedAbilities(Permanent permanent, Ability source, Game game) { + return false; + } + + @Override + public OpenSeasonRestrictionEffect copy() { + return new OpenSeasonRestrictionEffect(this); + } + +} + +class OpenSeasonEffect extends OneShotEffect { + + public OpenSeasonEffect() { + super(Outcome.LoseLife); + staticText = "that creature's controler loses 2 life. Each other player gains 2 life"; + } + + public OpenSeasonEffect(final OpenSeasonEffect effect) { + super(effect); + } + + @Override + public OpenSeasonEffect copy() { + return new OpenSeasonEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + UUID controller = game.getControllerId(source.getFirstTarget()); + if (controller != null) { + game.getPlayer(controller).loseLife(2, game, false); + for (UUID playerId : game.getOpponents(controller)) { + Player player = game.getPlayer(playerId); + if (player != null) { + player.gainLife(2, game); + } + } + return true; + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/cards/o/Ophidian.java b/Mage.Sets/src/mage/cards/o/Ophidian.java index 0bffbadbcc..357410c3b6 100644 --- a/Mage.Sets/src/mage/cards/o/Ophidian.java +++ b/Mage.Sets/src/mage/cards/o/Ophidian.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.AssignNoCombatDamageSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,7 +47,7 @@ public class Ophidian extends CardImpl { public Ophidian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OphidianEye.java b/Mage.Sets/src/mage/cards/o/OphidianEye.java index 873e121a24..2572140bb7 100644 --- a/Mage.Sets/src/mage/cards/o/OphidianEye.java +++ b/Mage.Sets/src/mage/cards/o/OphidianEye.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.target.TargetPermanent; @@ -50,7 +51,7 @@ public class OphidianEye extends CardImpl { public OphidianEye(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/o/Ophiomancer.java b/Mage.Sets/src/mage/cards/o/Ophiomancer.java index 6cd1bb348a..1b3dd1221d 100644 --- a/Mage.Sets/src/mage/cards/o/Ophiomancer.java +++ b/Mage.Sets/src/mage/cards/o/Ophiomancer.java @@ -47,8 +47,8 @@ public class Ophiomancer extends CardImpl { public Ophiomancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/Opportunist.java b/Mage.Sets/src/mage/cards/o/Opportunist.java index ad2f5b5336..6b7cdad4ca 100644 --- a/Mage.Sets/src/mage/cards/o/Opportunist.java +++ b/Mage.Sets/src/mage/cards/o/Opportunist.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.WasDealtDamageThisTurnPredicate; @@ -55,8 +56,8 @@ public class Opportunist extends CardImpl { public Opportunist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OppressiveRays.java b/Mage.Sets/src/mage/cards/o/OppressiveRays.java index 03d416a973..1094dc68e0 100644 --- a/Mage.Sets/src/mage/cards/o/OppressiveRays.java +++ b/Mage.Sets/src/mage/cards/o/OppressiveRays.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.CostModificationType; import mage.constants.Duration; import mage.constants.Outcome; @@ -59,7 +60,7 @@ public class OppressiveRays extends CardImpl { public OppressiveRays(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/o/OracleEnVec.java b/Mage.Sets/src/mage/cards/o/OracleEnVec.java index 42f02c7200..d92dbe8d68 100644 --- a/Mage.Sets/src/mage/cards/o/OracleEnVec.java +++ b/Mage.Sets/src/mage/cards/o/OracleEnVec.java @@ -45,6 +45,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TurnPhase; @@ -68,8 +69,8 @@ public class OracleEnVec extends CardImpl { public OracleEnVec(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OracleOfBones.java b/Mage.Sets/src/mage/cards/o/OracleOfBones.java index 561b857d05..607b7d4ae2 100644 --- a/Mage.Sets/src/mage/cards/o/OracleOfBones.java +++ b/Mage.Sets/src/mage/cards/o/OracleOfBones.java @@ -41,6 +41,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.FilterCard; import mage.filter.common.FilterInstantOrSorceryCard; @@ -57,8 +58,8 @@ public class OracleOfBones extends CardImpl { public OracleOfBones(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OracleOfDust.java b/Mage.Sets/src/mage/cards/o/OracleOfDust.java index 277aa329be..eedc7ff67d 100644 --- a/Mage.Sets/src/mage/cards/o/OracleOfDust.java +++ b/Mage.Sets/src/mage/cards/o/OracleOfDust.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,8 +49,8 @@ public class OracleOfDust extends CardImpl { public OracleOfDust(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Processor"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.PROCESSOR); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/o/OracleOfMulDaya.java b/Mage.Sets/src/mage/cards/o/OracleOfMulDaya.java index cfff94caca..ed3c2734b5 100644 --- a/Mage.Sets/src/mage/cards/o/OracleOfMulDaya.java +++ b/Mage.Sets/src/mage/cards/o/OracleOfMulDaya.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.PlayWithTheTopCardRevealedEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterLandCard; @@ -49,8 +50,8 @@ public class OracleOfMulDaya extends CardImpl { public OracleOfMulDaya(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OracleOfNectars.java b/Mage.Sets/src/mage/cards/o/OracleOfNectars.java index 0b05add8ff..a2d2ea07f2 100644 --- a/Mage.Sets/src/mage/cards/o/OracleOfNectars.java +++ b/Mage.Sets/src/mage/cards/o/OracleOfNectars.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,8 +49,8 @@ public class OracleOfNectars extends CardImpl { public OracleOfNectars(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G/W}"); - this.subtype.add("Elf"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OraclesAttendants.java b/Mage.Sets/src/mage/cards/o/OraclesAttendants.java index 25303df03e..0be25e18f9 100644 --- a/Mage.Sets/src/mage/cards/o/OraclesAttendants.java +++ b/Mage.Sets/src/mage/cards/o/OraclesAttendants.java @@ -36,6 +36,7 @@ import mage.abilities.effects.ReplacementEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class OraclesAttendants extends CardImpl { public OraclesAttendants(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/o/OraclesInsight.java b/Mage.Sets/src/mage/cards/o/OraclesInsight.java index 3991546585..33fb32bd9f 100644 --- a/Mage.Sets/src/mage/cards/o/OraclesInsight.java +++ b/Mage.Sets/src/mage/cards/o/OraclesInsight.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class OraclesInsight extends CardImpl { public OraclesInsight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/o/OranRiefHydra.java b/Mage.Sets/src/mage/cards/o/OranRiefHydra.java index 9b12b778f2..e877cd2338 100644 --- a/Mage.Sets/src/mage/cards/o/OranRiefHydra.java +++ b/Mage.Sets/src/mage/cards/o/OranRiefHydra.java @@ -54,7 +54,7 @@ public class OranRiefHydra extends CardImpl { public OranRiefHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/o/OranRiefInvoker.java b/Mage.Sets/src/mage/cards/o/OranRiefInvoker.java index 58d5098fd7..63943b1966 100644 --- a/Mage.Sets/src/mage/cards/o/OranRiefInvoker.java +++ b/Mage.Sets/src/mage/cards/o/OranRiefInvoker.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class OranRiefInvoker extends CardImpl { public OranRiefInvoker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OranRiefRecluse.java b/Mage.Sets/src/mage/cards/o/OranRiefRecluse.java index 34d86f4676..4d68c74ed0 100644 --- a/Mage.Sets/src/mage/cards/o/OranRiefRecluse.java +++ b/Mage.Sets/src/mage/cards/o/OranRiefRecluse.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; import mage.target.common.TargetCreaturePermanent; @@ -57,7 +58,7 @@ public class OranRiefRecluse extends CardImpl { public OranRiefRecluse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OranRiefSurvivalist.java b/Mage.Sets/src/mage/cards/o/OranRiefSurvivalist.java index a12f09d6f4..93a4b07d3c 100644 --- a/Mage.Sets/src/mage/cards/o/OranRiefSurvivalist.java +++ b/Mage.Sets/src/mage/cards/o/OranRiefSurvivalist.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -44,9 +45,9 @@ public class OranRiefSurvivalist extends CardImpl { public OranRiefSurvivalist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OratorOfOjutai.java b/Mage.Sets/src/mage/cards/o/OratorOfOjutai.java index bf6b345eb6..72c3e57f99 100644 --- a/Mage.Sets/src/mage/cards/o/OratorOfOjutai.java +++ b/Mage.Sets/src/mage/cards/o/OratorOfOjutai.java @@ -64,8 +64,8 @@ public class OratorOfOjutai extends CardImpl { public OratorOfOjutai(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Monk"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.MONK); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/Oraxid.java b/Mage.Sets/src/mage/cards/o/Oraxid.java index 98997bfd42..c55caa8c0c 100644 --- a/Mage.Sets/src/mage/cards/o/Oraxid.java +++ b/Mage.Sets/src/mage/cards/o/Oraxid.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class Oraxid extends CardImpl { public Oraxid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Crab"); - this.subtype.add("Beast"); + this.subtype.add(SubType.CRAB); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OrbitalBombardment.java b/Mage.Sets/src/mage/cards/o/OrbitalBombardment.java index 59bbebe14c..4d8086ebe5 100644 --- a/Mage.Sets/src/mage/cards/o/OrbitalBombardment.java +++ b/Mage.Sets/src/mage/cards/o/OrbitalBombardment.java @@ -1,67 +1,67 @@ -/* - * 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.cards.o; - -import java.util.UUID; -import mage.abilities.effects.common.DestroyAllEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.SubtypePredicate; - -/** - * - * @author Styxo - */ -public class OrbitalBombardment extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Starship creatures"); - - static { - filter.add(Predicates.not(new SubtypePredicate(SubType.STARSHIP))); - } - - public OrbitalBombardment(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{W}{W}"); - - // Destroy all non-Starship creatuers. - getSpellAbility().getEffects().add(new DestroyAllEffect(new FilterCreaturePermanent(filter))); - } - - public OrbitalBombardment(final OrbitalBombardment card) { - super(card); - } - - @Override - public OrbitalBombardment copy() { - return new OrbitalBombardment(this); - } -} +/* + * 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.cards.o; + +import java.util.UUID; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author Styxo + */ +public class OrbitalBombardment extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Starship creatures"); + + static { + filter.add(Predicates.not(new SubtypePredicate(SubType.STARSHIP))); + } + + public OrbitalBombardment(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{W}{W}"); + + // Destroy all non-Starship creatuers. + getSpellAbility().getEffects().add(new DestroyAllEffect(new FilterCreaturePermanent(filter))); + } + + public OrbitalBombardment(final OrbitalBombardment card) { + super(card); + } + + @Override + public OrbitalBombardment copy() { + return new OrbitalBombardment(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OrbweaverKumo.java b/Mage.Sets/src/mage/cards/o/OrbweaverKumo.java index a80781ea83..5717ad7bc2 100644 --- a/Mage.Sets/src/mage/cards/o/OrbweaverKumo.java +++ b/Mage.Sets/src/mage/cards/o/OrbweaverKumo.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; @@ -47,7 +48,7 @@ public class OrbweaverKumo extends CardImpl { public OrbweaverKumo(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/OrcGeneral.java b/Mage.Sets/src/mage/cards/o/OrcGeneral.java index 3e65e5da72..836ddd87f1 100644 --- a/Mage.Sets/src/mage/cards/o/OrcGeneral.java +++ b/Mage.Sets/src/mage/cards/o/OrcGeneral.java @@ -65,8 +65,8 @@ public class OrcGeneral extends CardImpl { public OrcGeneral(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Orc"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OrcSureshot.java b/Mage.Sets/src/mage/cards/o/OrcSureshot.java index 7783419230..a6a0bf42a8 100644 --- a/Mage.Sets/src/mage/cards/o/OrcSureshot.java +++ b/Mage.Sets/src/mage/cards/o/OrcSureshot.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class OrcSureshot extends CardImpl { public OrcSureshot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Orc"); - this.subtype.add("Archer"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OrchardElemental.java b/Mage.Sets/src/mage/cards/o/OrchardElemental.java index 54388d6aa5..b97b263e7f 100644 --- a/Mage.Sets/src/mage/cards/o/OrchardElemental.java +++ b/Mage.Sets/src/mage/cards/o/OrchardElemental.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.game.Game; @@ -52,7 +53,7 @@ public class OrchardElemental extends CardImpl { public OrchardElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OrchardSpirit.java b/Mage.Sets/src/mage/cards/o/OrchardSpirit.java index 92b2584a11..191b90c12d 100644 --- a/Mage.Sets/src/mage/cards/o/OrchardSpirit.java +++ b/Mage.Sets/src/mage/cards/o/OrchardSpirit.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -60,7 +61,7 @@ public class OrchardSpirit extends CardImpl { public OrchardSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OrchardWarden.java b/Mage.Sets/src/mage/cards/o/OrchardWarden.java index 592af7f015..c3cc9d853b 100644 --- a/Mage.Sets/src/mage/cards/o/OrchardWarden.java +++ b/Mage.Sets/src/mage/cards/o/OrchardWarden.java @@ -57,8 +57,8 @@ public class OrchardWarden extends CardImpl { public OrchardWarden(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/o/OrcishArtillery.java b/Mage.Sets/src/mage/cards/o/OrcishArtillery.java index fe03f40d3c..4b98ca7b21 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishArtillery.java +++ b/Mage.Sets/src/mage/cards/o/OrcishArtillery.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class OrcishArtillery extends CardImpl { public OrcishArtillery(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Orc"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OrcishBloodpainter.java b/Mage.Sets/src/mage/cards/o/OrcishBloodpainter.java index 1a4601cc7a..3a571ffbd7 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishBloodpainter.java +++ b/Mage.Sets/src/mage/cards/o/OrcishBloodpainter.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent; @@ -50,8 +51,8 @@ public class OrcishBloodpainter extends CardImpl { public OrcishBloodpainter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Orc"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OrcishCannoneers.java b/Mage.Sets/src/mage/cards/o/OrcishCannoneers.java index 05e9388627..f3d727b498 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishCannoneers.java +++ b/Mage.Sets/src/mage/cards/o/OrcishCannoneers.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -50,8 +51,8 @@ public class OrcishCannoneers extends CardImpl { public OrcishCannoneers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Orc"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OrcishCaptain.java b/Mage.Sets/src/mage/cards/o/OrcishCaptain.java index 95fc494ae7..ed71e1879e 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishCaptain.java +++ b/Mage.Sets/src/mage/cards/o/OrcishCaptain.java @@ -58,8 +58,8 @@ public class OrcishCaptain extends CardImpl { public OrcishCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Orc"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OrcishHealer.java b/Mage.Sets/src/mage/cards/o/OrcishHealer.java index db098f9a2c..85bec9db1e 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishHealer.java +++ b/Mage.Sets/src/mage/cards/o/OrcishHealer.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.RegenerateTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -62,8 +63,8 @@ public class OrcishHealer extends CardImpl { public OrcishHealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{R}"); - this.subtype.add("Orc"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OrcishLibrarian.java b/Mage.Sets/src/mage/cards/o/OrcishLibrarian.java index 1c374256af..eec0c3417b 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishLibrarian.java +++ b/Mage.Sets/src/mage/cards/o/OrcishLibrarian.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class OrcishLibrarian extends CardImpl { public OrcishLibrarian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Orc"); + this.subtype.add(SubType.ORC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OrcishLumberjack.java b/Mage.Sets/src/mage/cards/o/OrcishLumberjack.java index 91bd91a78c..d3c7c30485 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishLumberjack.java +++ b/Mage.Sets/src/mage/cards/o/OrcishLumberjack.java @@ -65,7 +65,7 @@ public class OrcishLumberjack extends CardImpl { public OrcishLumberjack(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Orc"); + this.subtype.add(SubType.ORC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OrcishMechanics.java b/Mage.Sets/src/mage/cards/o/OrcishMechanics.java index 76bf65be70..d7f77bc852 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishMechanics.java +++ b/Mage.Sets/src/mage/cards/o/OrcishMechanics.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; import mage.target.common.TargetControlledPermanent; @@ -50,7 +51,7 @@ public class OrcishMechanics extends CardImpl { public OrcishMechanics(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Orc"); + this.subtype.add(SubType.ORC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OrcishOriflamme.java b/Mage.Sets/src/mage/cards/o/OrcishOriflamme.java index 2eeac4af89..0eecf9594f 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishOriflamme.java +++ b/Mage.Sets/src/mage/cards/o/OrcishOriflamme.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; @@ -35,7 +34,9 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.common.FilterAttackingCreature; +import mage.filter.StaticFilters; + +import java.util.UUID; /** * @@ -48,7 +49,7 @@ public class OrcishOriflamme extends CardImpl { // Attacking creatures you control get +1/+0. - BoostControlledEffect boostEffect = new BoostControlledEffect(1, 0, Duration.WhileOnBattlefield, new FilterAttackingCreature(), false); + BoostControlledEffect boostEffect = new BoostControlledEffect(1, 0, Duration.WhileOnBattlefield, StaticFilters.FILTER_ATTACKING_CREATURES, false); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, boostEffect)); } diff --git a/Mage.Sets/src/mage/cards/o/OrcishSettlers.java b/Mage.Sets/src/mage/cards/o/OrcishSettlers.java index 7fc3ea2c18..3f448505ed 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishSettlers.java +++ b/Mage.Sets/src/mage/cards/o/OrcishSettlers.java @@ -40,6 +40,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class OrcishSettlers extends CardImpl { public OrcishSettlers(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Orc"); + this.subtype.add(SubType.ORC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OrcishSpy.java b/Mage.Sets/src/mage/cards/o/OrcishSpy.java index 411973e24d..77d23fe9b9 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishSpy.java +++ b/Mage.Sets/src/mage/cards/o/OrcishSpy.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.LookLibraryTopCardTargetPlayerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class OrcishSpy extends CardImpl { public OrcishSpy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Orc"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OrcishSquatters.java b/Mage.Sets/src/mage/cards/o/OrcishSquatters.java new file mode 100644 index 0000000000..ef0d26dd3e --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OrcishSquatters.java @@ -0,0 +1,85 @@ +/* + * 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.cards.o; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.condition.common.SourceOnBattlefieldControlUnchangedCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.AssignNoCombatDamageSourceEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.permanent.DefendingPlayerControlsPredicate; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public class OrcishSquatters extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent("land defending player controls"); + + static { + filter.add(new DefendingPlayerControlsPredicate()); + } + + public OrcishSquatters(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); + + this.subtype.add(SubType.ORC); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Whenever Orcish Squatters attacks and isn't blocked, you may gain control of target land defending player controls for as long as you control Orcish Squatters. If you do, Orcish Squatters assigns no combat damage this turn. + Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(new ConditionalContinuousEffect( + new GainControlTargetEffect(Duration.Custom), + new SourceOnBattlefieldControlUnchangedCondition(), + "gain control of target land defending player controls for as long as you control {this}" + ), true); + ability.addEffect(new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn, true)); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + public OrcishSquatters(final OrcishSquatters card) { + super(card); + } + + @Override + public OrcishSquatters copy() { + return new OrcishSquatters(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OrcishVeteran.java b/Mage.Sets/src/mage/cards/o/OrcishVeteran.java index 8eaeaff3f4..3abb61687c 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishVeteran.java +++ b/Mage.Sets/src/mage/cards/o/OrcishVeteran.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; @@ -61,7 +62,7 @@ public class OrcishVeteran extends CardImpl { public OrcishVeteran(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Orc"); + this.subtype.add(SubType.ORC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OrdealOfErebos.java b/Mage.Sets/src/mage/cards/o/OrdealOfErebos.java index 885978956f..e62729dafc 100644 --- a/Mage.Sets/src/mage/cards/o/OrdealOfErebos.java +++ b/Mage.Sets/src/mage/cards/o/OrdealOfErebos.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.target.TargetPermanent; @@ -56,7 +57,7 @@ public class OrdealOfErebos extends CardImpl { public OrdealOfErebos(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/o/OrdealOfHeliod.java b/Mage.Sets/src/mage/cards/o/OrdealOfHeliod.java index 49251b8296..65d3a34712 100644 --- a/Mage.Sets/src/mage/cards/o/OrdealOfHeliod.java +++ b/Mage.Sets/src/mage/cards/o/OrdealOfHeliod.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.target.TargetPermanent; @@ -55,7 +56,7 @@ public class OrdealOfHeliod extends CardImpl { public OrdealOfHeliod(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/o/OrdealOfNylea.java b/Mage.Sets/src/mage/cards/o/OrdealOfNylea.java index e77dc4958b..dbae6b1ee9 100644 --- a/Mage.Sets/src/mage/cards/o/OrdealOfNylea.java +++ b/Mage.Sets/src/mage/cards/o/OrdealOfNylea.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.filter.StaticFilters; @@ -58,7 +59,7 @@ public class OrdealOfNylea extends CardImpl { public OrdealOfNylea(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/o/OrdealOfPurphoros.java b/Mage.Sets/src/mage/cards/o/OrdealOfPurphoros.java index b7ecdab086..4a82940d13 100644 --- a/Mage.Sets/src/mage/cards/o/OrdealOfPurphoros.java +++ b/Mage.Sets/src/mage/cards/o/OrdealOfPurphoros.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.target.TargetPermanent; @@ -56,7 +57,7 @@ public class OrdealOfPurphoros extends CardImpl { public OrdealOfPurphoros(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/o/OrdealOfThassa.java b/Mage.Sets/src/mage/cards/o/OrdealOfThassa.java index 1f2f5badc3..945bd8a931 100644 --- a/Mage.Sets/src/mage/cards/o/OrdealOfThassa.java +++ b/Mage.Sets/src/mage/cards/o/OrdealOfThassa.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.target.TargetPermanent; @@ -55,7 +56,7 @@ public class OrdealOfThassa extends CardImpl { public OrdealOfThassa(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/o/Order66.java b/Mage.Sets/src/mage/cards/o/Order66.java index e10a00ae4f..11debd2f4b 100644 --- a/Mage.Sets/src/mage/cards/o/Order66.java +++ b/Mage.Sets/src/mage/cards/o/Order66.java @@ -1,70 +1,70 @@ -/* - * 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.cards.o; - -import java.util.UUID; -import mage.abilities.effects.common.DestroyAllEffect; -import mage.abilities.effects.common.counter.AddCountersAllEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.TargetController; -import mage.counters.CounterType; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.ControllerPredicate; - -/** - * - * @author Styxo - */ -public class Order66 extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control"); - - static { - filter.add(new ControllerPredicate(TargetController.NOT_YOU)); - } - - public Order66(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{7}{B}{B}"); - - // Put a bounty counter on each creature you don't control, then destroy all creatures you don't control. - this.getSpellAbility().addEffect(new AddCountersAllEffect(CounterType.BOUNTY.createInstance(), filter)); - this.getSpellAbility().addEffect(new DestroyAllEffect(filter)); - - } - - public Order66(final Order66 card) { - super(card); - } - - @Override - public Order66 copy() { - return new Order66(this); - } -} +/* + * 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.cards.o; + +import java.util.UUID; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author Styxo + */ +public class Order66 extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control"); + + static { + filter.add(new ControllerPredicate(TargetController.NOT_YOU)); + } + + public Order66(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{7}{B}{B}"); + + // Put a bounty counter on each creature you don't control, then destroy all creatures you don't control. + this.getSpellAbility().addEffect(new AddCountersAllEffect(CounterType.BOUNTY.createInstance(), filter)); + this.getSpellAbility().addEffect(new DestroyAllEffect(filter)); + + } + + public Order66(final Order66 card) { + super(card); + } + + @Override + public Order66 copy() { + return new Order66(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OrderOfLeitbur.java b/Mage.Sets/src/mage/cards/o/OrderOfLeitbur.java index d7126f517e..54fc298187 100644 --- a/Mage.Sets/src/mage/cards/o/OrderOfLeitbur.java +++ b/Mage.Sets/src/mage/cards/o/OrderOfLeitbur.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,9 +51,9 @@ public class OrderOfLeitbur extends CardImpl { public OrderOfLeitbur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OrderOfTheEbonHand.java b/Mage.Sets/src/mage/cards/o/OrderOfTheEbonHand.java index a7a0cd0a3c..c6b58a8118 100644 --- a/Mage.Sets/src/mage/cards/o/OrderOfTheEbonHand.java +++ b/Mage.Sets/src/mage/cards/o/OrderOfTheEbonHand.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class OrderOfTheEbonHand extends CardImpl { public OrderOfTheEbonHand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Cleric"); - this.subtype.add("Knight"); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OrderOfTheGoldenCricket.java b/Mage.Sets/src/mage/cards/o/OrderOfTheGoldenCricket.java index 2852f92e4d..efbb6b9b60 100644 --- a/Mage.Sets/src/mage/cards/o/OrderOfTheGoldenCricket.java +++ b/Mage.Sets/src/mage/cards/o/OrderOfTheGoldenCricket.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -48,8 +49,8 @@ public class OrderOfTheGoldenCricket extends CardImpl { public OrderOfTheGoldenCricket(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Knight"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OrderOfTheSacredBell.java b/Mage.Sets/src/mage/cards/o/OrderOfTheSacredBell.java index f799795ebb..6a0fd5dc54 100644 --- a/Mage.Sets/src/mage/cards/o/OrderOfTheSacredBell.java +++ b/Mage.Sets/src/mage/cards/o/OrderOfTheSacredBell.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class OrderOfTheSacredBell extends CardImpl { public OrderOfTheSacredBell (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OrderOfTheSacredTorch.java b/Mage.Sets/src/mage/cards/o/OrderOfTheSacredTorch.java index fb22eb7154..6c4f1bb258 100644 --- a/Mage.Sets/src/mage/cards/o/OrderOfTheSacredTorch.java +++ b/Mage.Sets/src/mage/cards/o/OrderOfTheSacredTorch.java @@ -36,6 +36,7 @@ import mage.abilities.costs.common.TapSourceCost; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -55,8 +56,8 @@ public class OrderOfTheSacredTorch extends CardImpl { public OrderOfTheSacredTorch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OrderOfTheStars.java b/Mage.Sets/src/mage/cards/o/OrderOfTheStars.java index 0c1686f5fb..6d6d5d6171 100644 --- a/Mage.Sets/src/mage/cards/o/OrderOfTheStars.java +++ b/Mage.Sets/src/mage/cards/o/OrderOfTheStars.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class OrderOfTheStars extends CardImpl { public OrderOfTheStars(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OrderOfTheWhiteShield.java b/Mage.Sets/src/mage/cards/o/OrderOfTheWhiteShield.java index 724428fc0b..b26457cb00 100644 --- a/Mage.Sets/src/mage/cards/o/OrderOfTheWhiteShield.java +++ b/Mage.Sets/src/mage/cards/o/OrderOfTheWhiteShield.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class OrderOfTheWhiteShield extends CardImpl { public OrderOfTheWhiteShield(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OrderOfWhiteclay.java b/Mage.Sets/src/mage/cards/o/OrderOfWhiteclay.java index ab174f99db..453bc32a6a 100644 --- a/Mage.Sets/src/mage/cards/o/OrderOfWhiteclay.java +++ b/Mage.Sets/src/mage/cards/o/OrderOfWhiteclay.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -59,8 +60,8 @@ public class OrderOfWhiteclay extends CardImpl { public OrderOfWhiteclay(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/OrderOfYawgmoth.java b/Mage.Sets/src/mage/cards/o/OrderOfYawgmoth.java index f085c87520..6660ef32d1 100644 --- a/Mage.Sets/src/mage/cards/o/OrderOfYawgmoth.java +++ b/Mage.Sets/src/mage/cards/o/OrderOfYawgmoth.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class OrderOfYawgmoth extends CardImpl { public OrderOfYawgmoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OrderedMigration.java b/Mage.Sets/src/mage/cards/o/OrderedMigration.java index 179b6d6e62..ee18b8acf7 100644 --- a/Mage.Sets/src/mage/cards/o/OrderedMigration.java +++ b/Mage.Sets/src/mage/cards/o/OrderedMigration.java @@ -32,6 +32,7 @@ import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.game.permanent.token.OrderedMigrationBirdToken; @@ -47,6 +48,7 @@ public class OrderedMigration extends CardImpl { // Domain - Create a 1/1 blue Bird creature token with flying for each basic land type among lands you control. this.getSpellAbility().addEffect(new CreateTokenEffect(new OrderedMigrationBirdToken(), new DomainValue())); + this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN); } public OrderedMigration(final OrderedMigration card) { diff --git a/Mage.Sets/src/mage/cards/o/OrdruunCommando.java b/Mage.Sets/src/mage/cards/o/OrdruunCommando.java index 159d5a0530..504c872482 100644 --- a/Mage.Sets/src/mage/cards/o/OrdruunCommando.java +++ b/Mage.Sets/src/mage/cards/o/OrdruunCommando.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.PreventDamageToSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,8 +47,8 @@ public class OrdruunCommando extends CardImpl { public OrdruunCommando(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OrdruunVeteran.java b/Mage.Sets/src/mage/cards/o/OrdruunVeteran.java index 277103fffe..7e15062ea5 100644 --- a/Mage.Sets/src/mage/cards/o/OrdruunVeteran.java +++ b/Mage.Sets/src/mage/cards/o/OrdruunVeteran.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class OrdruunVeteran extends CardImpl { public OrdruunVeteran(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{W}"); - this.subtype.add("Minotaur"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OreGorger.java b/Mage.Sets/src/mage/cards/o/OreGorger.java index ab42823a02..4a6dbe56a3 100644 --- a/Mage.Sets/src/mage/cards/o/OreGorger.java +++ b/Mage.Sets/src/mage/cards/o/OreGorger.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetNonBasicLandPermanent; @@ -46,7 +47,7 @@ public class OreGorger extends CardImpl { public OreGorger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OreskosExplorer.java b/Mage.Sets/src/mage/cards/o/OreskosExplorer.java index f94c034c60..978bdb5d9b 100644 --- a/Mage.Sets/src/mage/cards/o/OreskosExplorer.java +++ b/Mage.Sets/src/mage/cards/o/OreskosExplorer.java @@ -54,8 +54,8 @@ public class OreskosExplorer extends CardImpl { public OreskosExplorer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Scout"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OreskosSunGuide.java b/Mage.Sets/src/mage/cards/o/OreskosSunGuide.java index a43f33a3cd..fd0fe3e97a 100644 --- a/Mage.Sets/src/mage/cards/o/OreskosSunGuide.java +++ b/Mage.Sets/src/mage/cards/o/OreskosSunGuide.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.InspiredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class OreskosSunGuide extends CardImpl { public OreskosSunGuide(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Monk"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OreskosSwiftclaw.java b/Mage.Sets/src/mage/cards/o/OreskosSwiftclaw.java index 5316f33d50..3842061dd1 100644 --- a/Mage.Sets/src/mage/cards/o/OreskosSwiftclaw.java +++ b/Mage.Sets/src/mage/cards/o/OreskosSwiftclaw.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class OreskosSwiftclaw extends CardImpl { public OreskosSwiftclaw(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OrganGrinder.java b/Mage.Sets/src/mage/cards/o/OrganGrinder.java index b9b1594d7d..cd83aa866c 100644 --- a/Mage.Sets/src/mage/cards/o/OrganGrinder.java +++ b/Mage.Sets/src/mage/cards/o/OrganGrinder.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.target.TargetPlayer; @@ -50,7 +51,7 @@ public class OrganGrinder extends CardImpl { public OrganGrinder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/Orgg.java b/Mage.Sets/src/mage/cards/o/Orgg.java index 8305580cbc..92074e731f 100644 --- a/Mage.Sets/src/mage/cards/o/Orgg.java +++ b/Mage.Sets/src/mage/cards/o/Orgg.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -59,7 +60,7 @@ public class Orgg extends CardImpl { } public Orgg(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Orgg"); + this.subtype.add(SubType.ORGG); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/o/OrimSamiteHealer.java b/Mage.Sets/src/mage/cards/o/OrimSamiteHealer.java index 4c2d7647f0..ed1e3281ff 100644 --- a/Mage.Sets/src/mage/cards/o/OrimSamiteHealer.java +++ b/Mage.Sets/src/mage/cards/o/OrimSamiteHealer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class OrimSamiteHealer extends CardImpl { public OrimSamiteHealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OrissSamiteGuardian.java b/Mage.Sets/src/mage/cards/o/OrissSamiteGuardian.java index 8af45fa750..f469f88613 100644 --- a/Mage.Sets/src/mage/cards/o/OrissSamiteGuardian.java +++ b/Mage.Sets/src/mage/cards/o/OrissSamiteGuardian.java @@ -59,8 +59,8 @@ public class OrissSamiteGuardian extends CardImpl { public OrissSamiteGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OrmendahlProfanePrince.java b/Mage.Sets/src/mage/cards/o/OrmendahlProfanePrince.java index 7a2b424e55..cf9cca1c69 100644 --- a/Mage.Sets/src/mage/cards/o/OrmendahlProfanePrince.java +++ b/Mage.Sets/src/mage/cards/o/OrmendahlProfanePrince.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -47,7 +48,7 @@ public class OrmendahlProfanePrince extends CardImpl { public OrmendahlProfanePrince(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(9); this.toughness = new MageInt(7); this.color.setBlack(true); diff --git a/Mage.Sets/src/mage/cards/o/OrneryKudu.java b/Mage.Sets/src/mage/cards/o/OrneryKudu.java index e0c354206a..ce5041fcd1 100644 --- a/Mage.Sets/src/mage/cards/o/OrneryKudu.java +++ b/Mage.Sets/src/mage/cards/o/OrneryKudu.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetControlledCreaturePermanent; @@ -47,7 +48,7 @@ public class OrneryKudu extends CardImpl { public OrneryKudu(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Antelope"); + this.subtype.add(SubType.ANTELOPE); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/Ornitharch.java b/Mage.Sets/src/mage/cards/o/Ornitharch.java index 7f05379fa0..f77205a3e6 100644 --- a/Mage.Sets/src/mage/cards/o/Ornitharch.java +++ b/Mage.Sets/src/mage/cards/o/Ornitharch.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TributeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.BirdToken; /** @@ -49,7 +50,7 @@ public class Ornitharch extends CardImpl { public Ornitharch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Archon"); + this.subtype.add(SubType.ARCHON); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/Ornithopter.java b/Mage.Sets/src/mage/cards/o/Ornithopter.java index 49f6c1320c..e65edcc8ad 100644 --- a/Mage.Sets/src/mage/cards/o/Ornithopter.java +++ b/Mage.Sets/src/mage/cards/o/Ornithopter.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class Ornithopter extends CardImpl { public Ornithopter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE,CardType.ARTIFACT},"{0}"); - this.subtype.add("Thopter"); + this.subtype.add(SubType.THOPTER); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OrochiEggwatcher.java b/Mage.Sets/src/mage/cards/o/OrochiEggwatcher.java index 5a35a35b63..6d4522b756 100644 --- a/Mage.Sets/src/mage/cards/o/OrochiEggwatcher.java +++ b/Mage.Sets/src/mage/cards/o/OrochiEggwatcher.java @@ -45,6 +45,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.SuperType; @@ -62,8 +63,8 @@ public class OrochiEggwatcher extends CardImpl { public OrochiEggwatcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Snake"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -96,8 +97,8 @@ class ShidakoBroodmistress extends Token { addSuperType(SuperType.LEGENDARY); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Snake"); - subtype.add("Shaman"); + subtype.add(SubType.SNAKE); + subtype.add(SubType.SHAMAN); power = new MageInt(3); toughness = new MageInt(3); // {G}, Sacrifice a creature: Target creature gets +3/+3 until end of turn. diff --git a/Mage.Sets/src/mage/cards/o/OrochiLeafcaller.java b/Mage.Sets/src/mage/cards/o/OrochiLeafcaller.java index 3aa238c7bf..351c2d21e0 100644 --- a/Mage.Sets/src/mage/cards/o/OrochiLeafcaller.java +++ b/Mage.Sets/src/mage/cards/o/OrochiLeafcaller.java @@ -35,6 +35,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; /** @@ -45,8 +46,8 @@ public class OrochiLeafcaller extends CardImpl { public OrochiLeafcaller (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Snake"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OrochiRanger.java b/Mage.Sets/src/mage/cards/o/OrochiRanger.java index 3074127a2d..d51966f988 100644 --- a/Mage.Sets/src/mage/cards/o/OrochiRanger.java +++ b/Mage.Sets/src/mage/cards/o/OrochiRanger.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class OrochiRanger extends CardImpl { public OrochiRanger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Snake"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OrochiSustainer.java b/Mage.Sets/src/mage/cards/o/OrochiSustainer.java index dec1bbc73a..5cddb8998f 100644 --- a/Mage.Sets/src/mage/cards/o/OrochiSustainer.java +++ b/Mage.Sets/src/mage/cards/o/OrochiSustainer.java @@ -34,6 +34,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -42,8 +43,8 @@ public class OrochiSustainer extends CardImpl { public OrochiSustainer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Snake"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OrosTheAvenger.java b/Mage.Sets/src/mage/cards/o/OrosTheAvenger.java index e35a26f346..bcf82bbf80 100644 --- a/Mage.Sets/src/mage/cards/o/OrosTheAvenger.java +++ b/Mage.Sets/src/mage/cards/o/OrosTheAvenger.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -58,7 +59,7 @@ public class OrosTheAvenger extends CardImpl { public OrosTheAvenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/o/OrtolanKeyboardist.java b/Mage.Sets/src/mage/cards/o/OrtolanKeyboardist.java index 16d5f26578..6520ea85e5 100644 --- a/Mage.Sets/src/mage/cards/o/OrtolanKeyboardist.java +++ b/Mage.Sets/src/mage/cards/o/OrtolanKeyboardist.java @@ -1,65 +1,66 @@ -/* - * 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.cards.o; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.DrawDiscardControllerEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; - -/** - * - * @author Styxo - */ -public class OrtolanKeyboardist extends CardImpl { - - public OrtolanKeyboardist(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Ortolan"); - this.power = new MageInt(1); - this.toughness = new MageInt(1); - - // {T}: Draw a card then discard a card. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawDiscardControllerEffect(), new TapSourceCost())); - - } - - public OrtolanKeyboardist(final OrtolanKeyboardist card) { - super(card); - } - - @Override - public OrtolanKeyboardist copy() { - return new OrtolanKeyboardist(this); - } -} +/* + * 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.cards.o; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DrawDiscardControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author Styxo + */ +public class OrtolanKeyboardist extends CardImpl { + + public OrtolanKeyboardist(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); + this.subtype.add(SubType.ORTOLAN); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {T}: Draw a card then discard a card. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawDiscardControllerEffect(), new TapSourceCost())); + + } + + public OrtolanKeyboardist(final OrtolanKeyboardist card) { + super(card); + } + + @Override + public OrtolanKeyboardist copy() { + return new OrtolanKeyboardist(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OrzhovAdvokist.java b/Mage.Sets/src/mage/cards/o/OrzhovAdvokist.java index 831f9cf3e6..72ab986f6d 100644 --- a/Mage.Sets/src/mage/cards/o/OrzhovAdvokist.java +++ b/Mage.Sets/src/mage/cards/o/OrzhovAdvokist.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CantAttackYouAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -62,8 +63,8 @@ public class OrzhovAdvokist extends CardImpl { public OrzhovAdvokist(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/OrzhovCharm.java b/Mage.Sets/src/mage/cards/o/OrzhovCharm.java index 4d8cda77cf..d6c41b44c5 100644 --- a/Mage.Sets/src/mage/cards/o/OrzhovCharm.java +++ b/Mage.Sets/src/mage/cards/o/OrzhovCharm.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.Zone; @@ -118,7 +119,7 @@ class OrzhovCharmReturnToHandEffect extends OneShotEffect { for (UUID attachmentId : attachments) { Permanent attachment = game.getPermanent(attachmentId); if (attachment != null && attachment.getControllerId().equals(source.getControllerId()) - && attachment.getSubtype(game).contains("Aura")) { + && attachment.hasSubtype(SubType.AURA, game)) { attachment.moveToZone(Zone.HAND, source.getSourceId(), game, false); } } diff --git a/Mage.Sets/src/mage/cards/o/OrzhovEuthanist.java b/Mage.Sets/src/mage/cards/o/OrzhovEuthanist.java index e4ddf11a89..86774c0d5a 100644 --- a/Mage.Sets/src/mage/cards/o/OrzhovEuthanist.java +++ b/Mage.Sets/src/mage/cards/o/OrzhovEuthanist.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HauntAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.WasDealtDamageThisTurnPredicate; import mage.target.Target; @@ -53,8 +54,8 @@ public class OrzhovEuthanist extends CardImpl { public OrzhovEuthanist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OrzhovGuildmage.java b/Mage.Sets/src/mage/cards/o/OrzhovGuildmage.java index a84c8d5003..963eb239da 100644 --- a/Mage.Sets/src/mage/cards/o/OrzhovGuildmage.java +++ b/Mage.Sets/src/mage/cards/o/OrzhovGuildmage.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.LoseLifeAllPlayersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -48,8 +49,8 @@ public class OrzhovGuildmage extends CardImpl { public OrzhovGuildmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W/B}{W/B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OrzhovKeyrune.java b/Mage.Sets/src/mage/cards/o/OrzhovKeyrune.java index 74dbde8b94..13d8d91f48 100644 --- a/Mage.Sets/src/mage/cards/o/OrzhovKeyrune.java +++ b/Mage.Sets/src/mage/cards/o/OrzhovKeyrune.java @@ -38,6 +38,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -75,7 +76,7 @@ public class OrzhovKeyrune extends CardImpl { cardType.add(CardType.CREATURE); color.setWhite(true); color.setBlack(true); - subtype.add("Thrull"); + subtype.add(SubType.THRULL); power = new MageInt(1); toughness = new MageInt(4); this.addAbility(LifelinkAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/o/OrzhovPontiff.java b/Mage.Sets/src/mage/cards/o/OrzhovPontiff.java index 3a24634f8b..132aacc28f 100644 --- a/Mage.Sets/src/mage/cards/o/OrzhovPontiff.java +++ b/Mage.Sets/src/mage/cards/o/OrzhovPontiff.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HauntAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -56,8 +57,8 @@ public class OrzhovPontiff extends CardImpl { public OrzhovPontiff(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OsaiVultures.java b/Mage.Sets/src/mage/cards/o/OsaiVultures.java index 6a78b76e49..c8c9fe363e 100644 --- a/Mage.Sets/src/mage/cards/o/OsaiVultures.java +++ b/Mage.Sets/src/mage/cards/o/OsaiVultures.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class OsaiVultures extends CardImpl { public OsaiVultures(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OstiaryThrull.java b/Mage.Sets/src/mage/cards/o/OstiaryThrull.java index b696d789b6..d71be4cbcf 100644 --- a/Mage.Sets/src/mage/cards/o/OstiaryThrull.java +++ b/Mage.Sets/src/mage/cards/o/OstiaryThrull.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class OstiaryThrull extends CardImpl { public OstiaryThrull(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Thrull"); + this.subtype.add(SubType.THRULL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OtarianJuggernaut.java b/Mage.Sets/src/mage/cards/o/OtarianJuggernaut.java new file mode 100644 index 0000000000..ac83986542 --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OtarianJuggernaut.java @@ -0,0 +1,96 @@ +/* + * 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.cards.o; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleEvasionAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CardsInControllerGraveCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.combat.AttacksIfAbleSourceEffect; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author TheElk801 + */ +public class OtarianJuggernaut extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Walls"); + + static { + filter.add(new SubtypePredicate(SubType.WALL)); + } + + public OtarianJuggernaut(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + + this.subtype.add(SubType.JUGGERNAUT); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Otarian Juggernaut can't be blocked by Walls. + this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); + + // Threshold - As long as seven or more cards are in your graveyard, Otarian Juggernaut gets +3/+0 and attacks each combat if able. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostSourceEffect(3, 0, Duration.WhileOnBattlefield), + new CardsInControllerGraveCondition(7), + "As long as seven or more cards are in your graveyard, {this} gets +3/+0")); + Effect effect = new ConditionalContinuousEffect( + new AttacksIfAbleSourceEffect(Duration.WhileOnBattlefield, true), + new CardsInControllerGraveCondition(7), + "and attacks each combat if able" + ); + ability.addEffect(effect); + ability.setAbilityWord(AbilityWord.THRESHOLD); + this.addAbility(ability); + } + + public OtarianJuggernaut(final OtarianJuggernaut card) { + super(card); + } + + @Override + public OtarianJuggernaut copy() { + return new OtarianJuggernaut(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OtepecHuntmaster.java b/Mage.Sets/src/mage/cards/o/OtepecHuntmaster.java new file mode 100644 index 0000000000..bb12dd7fb4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OtepecHuntmaster.java @@ -0,0 +1,89 @@ +/* + * 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.cards.o; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; +import mage.abilities.keyword.HasteAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class OtepecHuntmaster extends CardImpl { + + private static final FilterCard filter = new FilterCard("Dinosaur spells"); + private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("Dinosaur"); + + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + filter2.add(new SubtypePredicate(SubType.DINOSAUR)); + } + + public OtepecHuntmaster(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Dinosaur spells you cast cost {1} less to cast. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostReductionControllerEffect(filter, 1))); + + // {T}: Target Dinosaur gains haste until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter2)); + this.addAbility(ability); + } + + public OtepecHuntmaster(final OtepecHuntmaster card) { + super(card); + } + + @Override + public OtepecHuntmaster copy() { + return new OtepecHuntmaster(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OtherworldlyJourney.java b/Mage.Sets/src/mage/cards/o/OtherworldlyJourney.java index 3caa368577..ee69afe658 100644 --- a/Mage.Sets/src/mage/cards/o/OtherworldlyJourney.java +++ b/Mage.Sets/src/mage/cards/o/OtherworldlyJourney.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class OtherworldlyJourney extends CardImpl { public OtherworldlyJourney(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.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()); diff --git a/Mage.Sets/src/mage/cards/o/OupheVandals.java b/Mage.Sets/src/mage/cards/o/OupheVandals.java index b888b30c8d..5c2fb1fc37 100644 --- a/Mage.Sets/src/mage/cards/o/OupheVandals.java +++ b/Mage.Sets/src/mage/cards/o/OupheVandals.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterStackObject; @@ -64,8 +65,8 @@ public class OupheVandals extends CardImpl { public OupheVandals(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Ouphe"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.OUPHE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OuterRimSlaver.java b/Mage.Sets/src/mage/cards/o/OuterRimSlaver.java index f3ca13c477..15bcc4f4da 100644 --- a/Mage.Sets/src/mage/cards/o/OuterRimSlaver.java +++ b/Mage.Sets/src/mage/cards/o/OuterRimSlaver.java @@ -1,71 +1,72 @@ -/* - * 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.cards.o; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.FightTargetsEffect; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.counters.CounterType; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Styxo - */ -public class OuterRimSlaver extends CardImpl { - - public OuterRimSlaver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{R}{G}"); - this.subtype.add("Trandoshan"); - this.subtype.add("Rogue"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // When Outer Rim Slaver enters the battlefield, you may put a bounty counter on target creature. If you do, another target creature fights that creature - Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()), true); - ability.addEffect(new FightTargetsEffect("another target creature fights that creature")); - ability.addTarget(new TargetCreaturePermanent()); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability); - } - - public OuterRimSlaver(final OuterRimSlaver card) { - super(card); - } - - @Override - public OuterRimSlaver copy() { - return new OuterRimSlaver(this); - } -} +/* + * 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.cards.o; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.FightTargetsEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Styxo + */ +public class OuterRimSlaver extends CardImpl { + + public OuterRimSlaver(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{R}{G}"); + this.subtype.add(SubType.TRANDOSHAN); + this.subtype.add(SubType.ROGUE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Outer Rim Slaver enters the battlefield, you may put a bounty counter on target creature. If you do, another target creature fights that creature + Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()), true); + ability.addEffect(new FightTargetsEffect("another target creature fights that creature")); + ability.addTarget(new TargetCreaturePermanent()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public OuterRimSlaver(final OuterRimSlaver card) { + super(card); + } + + @Override + public OuterRimSlaver copy() { + return new OuterRimSlaver(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OutlandBoar.java b/Mage.Sets/src/mage/cards/o/OutlandBoar.java index a21e68e0da..fce4dc4655 100644 --- a/Mage.Sets/src/mage/cards/o/OutlandBoar.java +++ b/Mage.Sets/src/mage/cards/o/OutlandBoar.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; @@ -54,7 +55,7 @@ public class OutlandBoar extends CardImpl { public OutlandBoar(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{G}"); - this.subtype.add("Boar"); + this.subtype.add(SubType.BOAR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/OutlandColossus.java b/Mage.Sets/src/mage/cards/o/OutlandColossus.java index 4ab84175fa..dc85a505cd 100644 --- a/Mage.Sets/src/mage/cards/o/OutlandColossus.java +++ b/Mage.Sets/src/mage/cards/o/OutlandColossus.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.RenownAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class OutlandColossus extends CardImpl { public OutlandColossus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/o/OutlawHolocron.java b/Mage.Sets/src/mage/cards/o/OutlawHolocron.java index 745020810a..8b4a056249 100644 --- a/Mage.Sets/src/mage/cards/o/OutlawHolocron.java +++ b/Mage.Sets/src/mage/cards/o/OutlawHolocron.java @@ -1,94 +1,94 @@ -/* - * 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.cards.o; - -import java.util.UUID; -import mage.Mana; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.Cost; -import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.abilities.mana.BlackManaAbility; -import mage.abilities.mana.GreenManaAbility; -import mage.abilities.mana.RedManaAbility; -import mage.abilities.mana.SimpleManaAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.counters.CounterType; - -/** - * - * @author Styxo - */ -public class OutlawHolocron extends CardImpl { - - public OutlawHolocron(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - - // {T}: Put a charge counter on Outlaw Holocron. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance(1)), new TapSourceCost())); - - // {T}, Remove a charge counter from Outlaw Holocron: Add {B}, {R} or {G} to your mana pool. - Cost cost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(1)); - Ability ability = new BlackManaAbility(); - ability.addCost(cost); - this.addAbility(ability); - - ability = new RedManaAbility(); - ability.addCost(cost); - this.addAbility(ability); - - ability = new GreenManaAbility(); - ability.addCost(cost); - this.addAbility(ability); - - // {T}, Remove two charge counters from Outlaw Holocron: Add BR or RG to your mana pool.cost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(2)); - cost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(2)); - - ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 1, 0, 0, 0), new TapSourceCost()); - ability.addCost(cost); - this.addAbility(ability); - - ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 0, 0, 0, 0, 0, 0), new TapSourceCost()); - ability.addCost(cost); - this.addAbility(ability); - } - - public OutlawHolocron(final OutlawHolocron card) { - super(card); - } - - @Override - public OutlawHolocron copy() { - return new OutlawHolocron(this); - } -} +/* + * 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.cards.o; + +import java.util.UUID; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.mana.BlackManaAbility; +import mage.abilities.mana.GreenManaAbility; +import mage.abilities.mana.RedManaAbility; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author Styxo + */ +public class OutlawHolocron extends CardImpl { + + public OutlawHolocron(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + + // {T}: Put a charge counter on Outlaw Holocron. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance(1)), new TapSourceCost())); + + // {T}, Remove a charge counter from Outlaw Holocron: Add {B}, {R} or {G} to your mana pool. + Cost cost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(1)); + Ability ability = new BlackManaAbility(); + ability.addCost(cost); + this.addAbility(ability); + + ability = new RedManaAbility(); + ability.addCost(cost); + this.addAbility(ability); + + ability = new GreenManaAbility(); + ability.addCost(cost); + this.addAbility(ability); + + // {T}, Remove two charge counters from Outlaw Holocron: Add BR or RG to your mana pool.cost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(2)); + cost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(2)); + + ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 1, 0, 0, 0), new TapSourceCost()); + ability.addCost(cost); + this.addAbility(ability); + + ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 0, 0, 0, 0, 0, 0), new TapSourceCost()); + ability.addCost(cost); + this.addAbility(ability); + } + + public OutlawHolocron(final OutlawHolocron card) { + super(card); + } + + @Override + public OutlawHolocron copy() { + return new OutlawHolocron(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OutrageShaman.java b/Mage.Sets/src/mage/cards/o/OutrageShaman.java index f01aeec06d..fddcf54d5c 100644 --- a/Mage.Sets/src/mage/cards/o/OutrageShaman.java +++ b/Mage.Sets/src/mage/cards/o/OutrageShaman.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -48,8 +49,8 @@ public class OutrageShaman extends CardImpl { public OutrageShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OutriderEnKor.java b/Mage.Sets/src/mage/cards/o/OutriderEnKor.java index 8c8f09ebe1..80070111cd 100644 --- a/Mage.Sets/src/mage/cards/o/OutriderEnKor.java +++ b/Mage.Sets/src/mage/cards/o/OutriderEnKor.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlankingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -49,9 +50,9 @@ public class OutriderEnKor extends CardImpl { public OutriderEnKor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Rebel"); - this.subtype.add("Knight"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.REBEL); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OutriderOfJhess.java b/Mage.Sets/src/mage/cards/o/OutriderOfJhess.java index 9a3381a634..a720c35094 100644 --- a/Mage.Sets/src/mage/cards/o/OutriderOfJhess.java +++ b/Mage.Sets/src/mage/cards/o/OutriderOfJhess.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ExaltedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class OutriderOfJhess extends CardImpl { public OutriderOfJhess (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OvalchaseDaredevil.java b/Mage.Sets/src/mage/cards/o/OvalchaseDaredevil.java index 9d51943a0d..8b704291ce 100644 --- a/Mage.Sets/src/mage/cards/o/OvalchaseDaredevil.java +++ b/Mage.Sets/src/mage/cards/o/OvalchaseDaredevil.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SetTargetPointer; import mage.constants.TargetController; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class OvalchaseDaredevil extends CardImpl { public OvalchaseDaredevil(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Human"); - this.subtype.add("Pilot"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PILOT); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OvalchaseDragster.java b/Mage.Sets/src/mage/cards/o/OvalchaseDragster.java index cdaae482f9..e8acbec352 100644 --- a/Mage.Sets/src/mage/cards/o/OvalchaseDragster.java +++ b/Mage.Sets/src/mage/cards/o/OvalchaseDragster.java @@ -1,71 +1,71 @@ -/* - * 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.cards.o; - -import mage.MageInt; -import mage.abilities.keyword.CrewAbility; -import mage.abilities.keyword.HasteAbility; -import mage.abilities.keyword.TrampleAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; - -import java.util.UUID; - -/** - * - * @author emerald000 - */ -public class OvalchaseDragster extends CardImpl { - - public OvalchaseDragster(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - this.subtype.add(SubType.VEHICLE); - this.power = new MageInt(6); - this.toughness = new MageInt(1); - - // Trample - this.addAbility(TrampleAbility.getInstance()); - - // Haste - this.addAbility(HasteAbility.getInstance()); - - // Crew 1 - this.addAbility(new CrewAbility(1)); - } - - public OvalchaseDragster(final OvalchaseDragster card) { - super(card); - } - - @Override - public OvalchaseDragster copy() { - return new OvalchaseDragster(this); - } -} +/* + * 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.cards.o; + +import mage.MageInt; +import mage.abilities.keyword.CrewAbility; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class OvalchaseDragster extends CardImpl { + + public OvalchaseDragster(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); + this.subtype.add(SubType.VEHICLE); + this.power = new MageInt(6); + this.toughness = new MageInt(1); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // Crew 1 + this.addAbility(new CrewAbility(1)); + } + + public OvalchaseDragster(final OvalchaseDragster card) { + super(card); + } + + @Override + public OvalchaseDragster copy() { + return new OvalchaseDragster(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OverbeingOfMyth.java b/Mage.Sets/src/mage/cards/o/OverbeingOfMyth.java index 2a17b416aa..4d00a37f8f 100644 --- a/Mage.Sets/src/mage/cards/o/OverbeingOfMyth.java +++ b/Mage.Sets/src/mage/cards/o/OverbeingOfMyth.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -45,25 +46,25 @@ import mage.constants.Zone; /** * * @author jeffwadsworth - + * */ public class OverbeingOfMyth extends CardImpl { public OverbeingOfMyth(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G/U}{G/U}{G/U}{G/U}{G/U}"); - this.subtype.add("Spirit"); - this.subtype.add("Avatar"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G/U}{G/U}{G/U}{G/U}{G/U}"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(0); this.toughness = new MageInt(0); // Overbeing of Myth's power and toughness are each equal to the number of cards in your hand. DynamicValue number = new CardsInControllerHandCount(); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetPowerToughnessSourceEffect(number, Duration.WhileOnBattlefield))); - + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(number, Duration.EndOfGame))); + // At the beginning of your draw step, draw an additional card. this.addAbility(new BeginningOfDrawTriggeredAbility(new DrawCardSourceControllerEffect(1), TargetController.YOU, false)); - + } public OverbeingOfMyth(final OverbeingOfMyth card) { diff --git a/Mage.Sets/src/mage/cards/o/OvereagerApprentice.java b/Mage.Sets/src/mage/cards/o/OvereagerApprentice.java index 46a537c2a2..09dfe526bb 100644 --- a/Mage.Sets/src/mage/cards/o/OvereagerApprentice.java +++ b/Mage.Sets/src/mage/cards/o/OvereagerApprentice.java @@ -37,6 +37,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class OvereagerApprentice extends CardImpl { public OvereagerApprentice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Minion"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MINION); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OverflowingInsight.java b/Mage.Sets/src/mage/cards/o/OverflowingInsight.java new file mode 100644 index 0000000000..8a0f2d805b --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OverflowingInsight.java @@ -0,0 +1,59 @@ +/* + * 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.cards.o; + +import java.util.UUID; +import mage.abilities.effects.common.DrawCardTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.TargetPlayer; + +/** + * + * @author TheElk801 + */ +public class OverflowingInsight extends CardImpl { + + public OverflowingInsight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}{U}{U}"); + + // Target player draws seven cards. + this.getSpellAbility().addEffect(new DrawCardTargetEffect(7)); + this.getSpellAbility().addTarget(new TargetPlayer()); + } + + public OverflowingInsight(final OverflowingInsight card) { + super(card); + } + + @Override + public OverflowingInsight copy() { + return new OverflowingInsight(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OvergrownBattlement.java b/Mage.Sets/src/mage/cards/o/OvergrownBattlement.java index cc57589d04..ab4770dc48 100644 --- a/Mage.Sets/src/mage/cards/o/OvergrownBattlement.java +++ b/Mage.Sets/src/mage/cards/o/OvergrownBattlement.java @@ -36,6 +36,7 @@ import mage.abilities.mana.DynamicManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -53,7 +54,7 @@ public class OvergrownBattlement extends CardImpl { public OvergrownBattlement(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/o/OvergrownTomb.java b/Mage.Sets/src/mage/cards/o/OvergrownTomb.java index e9df51e8bb..0874001f2a 100644 --- a/Mage.Sets/src/mage/cards/o/OvergrownTomb.java +++ b/Mage.Sets/src/mage/cards/o/OvergrownTomb.java @@ -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.cards.o; import java.util.UUID; @@ -37,6 +36,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,18 +44,17 @@ import mage.constants.CardType; */ public class OvergrownTomb extends CardImpl { - public OvergrownTomb (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - this.subtype.add("Swamp"); - this.subtype.add("Forest"); - - this.addAbility(new BlackManaAbility()); - this.addAbility(new GreenManaAbility()); + public OvergrownTomb(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); + this.subtype.add(SubType.SWAMP); + this.subtype.add(SubType.FOREST); this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); + this.addAbility(new BlackManaAbility()); + this.addAbility(new GreenManaAbility()); } - public OvergrownTomb (final OvergrownTomb card) { + public OvergrownTomb(final OvergrownTomb card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/o/Overgrowth.java b/Mage.Sets/src/mage/cards/o/Overgrowth.java index ef7b819c33..2b6eb337a0 100644 --- a/Mage.Sets/src/mage/cards/o/Overgrowth.java +++ b/Mage.Sets/src/mage/cards/o/Overgrowth.java @@ -37,6 +37,7 @@ import mage.abilities.mana.TriggeredManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -55,7 +56,7 @@ public class Overgrowth extends CardImpl { public Overgrowth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land diff --git a/Mage.Sets/src/mage/cards/o/Overload.java b/Mage.Sets/src/mage/cards/o/Overload.java index 3913a90d2e..6e956bb8f7 100644 --- a/Mage.Sets/src/mage/cards/o/Overload.java +++ b/Mage.Sets/src/mage/cards/o/Overload.java @@ -29,17 +29,17 @@ package mage.cards.o; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.condition.common.KickedCondition; +import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; -import mage.filter.common.FilterArtifactPermanent; -import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.constants.Outcome; import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; import mage.target.common.TargetArtifactPermanent; /** @@ -48,32 +48,15 @@ import mage.target.common.TargetArtifactPermanent; */ public class Overload extends CardImpl { - private static final FilterArtifactPermanent filter2 = new FilterArtifactPermanent("artifact if its converted mana cost is 2 or less"); - private static final FilterArtifactPermanent filter5 = new FilterArtifactPermanent("artifact if its converted mana cost is 5 or less"); - - static { - filter2.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3)); - filter5.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 5)); - } - public Overload(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}"); // Kicker {2} this.addAbility(new KickerAbility("{2}")); + // Destroy target artifact if its converted mana cost is 2 or less. If Overload was kicked, destroy that artifact if its converted mana cost is 5 or less instead. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetArtifactPermanent(filter5)); - } - - @Override - public void adjustTargets(Ability ability, Game game) { - if(ability instanceof SpellAbility) { - if(!KickedCondition.instance.apply(game, ability)) { - ability.getTargets().clear(); - ability.getTargets().add(new TargetArtifactPermanent(filter2)); - } - } + this.getSpellAbility().addTarget(new TargetArtifactPermanent()); } public Overload(final Overload card) { @@ -85,3 +68,36 @@ public class Overload extends CardImpl { return new Overload(this); } } + +class OverloadEffect extends OneShotEffect { + + OverloadEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "Destroy target artifact if its converted mana cost is 2 or less. If {this} was kicked, destroy that artifact if its converted mana cost is 5 or less instead."; + } + + OverloadEffect(final OverloadEffect effect) { + super(effect); + } + + @Override + public OverloadEffect copy() { + return new OverloadEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Permanent targetArtifact = game.getPermanent(this.getTargetPointer().getFirst(game, source)); + if (targetArtifact != null) { + int cmc = targetArtifact.getConvertedManaCost(); + if (cmc <= 2 || (KickedCondition.instance.apply(game, source) && cmc <= 5)) { + targetArtifact.destroy(source.getSourceId(), game, false); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/o/OverseerOfTheDamned.java b/Mage.Sets/src/mage/cards/o/OverseerOfTheDamned.java index ceb2f25430..17d82dbc08 100644 --- a/Mage.Sets/src/mage/cards/o/OverseerOfTheDamned.java +++ b/Mage.Sets/src/mage/cards/o/OverseerOfTheDamned.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -62,7 +63,7 @@ public class OverseerOfTheDamned extends CardImpl { public OverseerOfTheDamned(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/o/OversoulOfDusk.java b/Mage.Sets/src/mage/cards/o/OversoulOfDusk.java index 0c25f557ea..adbf16de2f 100644 --- a/Mage.Sets/src/mage/cards/o/OversoulOfDusk.java +++ b/Mage.Sets/src/mage/cards/o/OversoulOfDusk.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -55,8 +56,8 @@ public class OversoulOfDusk extends CardImpl { public OversoulOfDusk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G/W}{G/W}{G/W}{G/W}{G/W}"); - this.subtype.add("Spirit"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/o/Overtaker.java b/Mage.Sets/src/mage/cards/o/Overtaker.java index deb3ded529..048d0cea66 100644 --- a/Mage.Sets/src/mage/cards/o/Overtaker.java +++ b/Mage.Sets/src/mage/cards/o/Overtaker.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -54,8 +55,8 @@ public class Overtaker extends CardImpl { public Overtaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/Ovinize.java b/Mage.Sets/src/mage/cards/o/Ovinize.java index a69bc20af0..6c9af1d7dc 100644 --- a/Mage.Sets/src/mage/cards/o/Ovinize.java +++ b/Mage.Sets/src/mage/cards/o/Ovinize.java @@ -40,16 +40,19 @@ import mage.target.common.TargetCreaturePermanent; /** * * @author LoneFox - + * */ public class Ovinize extends CardImpl { public Ovinize(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); // Target creature loses all abilities and becomes 0/1 until end of turn. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - this.getSpellAbility().addEffect(new LoseAllAbilitiesTargetEffect(Duration.EndOfTurn)); + this.getSpellAbility().addEffect( + new LoseAllAbilitiesTargetEffect(Duration.EndOfTurn) + .setText("Until end of turn, target creature loses all abilities") + ); Effect effect = new SetPowerToughnessTargetEffect(0, 1, Duration.EndOfTurn); effect.setText("and has base power and toughness 0/1"); this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/o/Ovinomancer.java b/Mage.Sets/src/mage/cards/o/Ovinomancer.java new file mode 100644 index 0000000000..e712246b3e --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/Ovinomancer.java @@ -0,0 +1,127 @@ +/* + * 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.cards.o; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; +import mage.abilities.costs.common.ReturnToHandFromBattlefieldSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.SheepToken; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class Ovinomancer extends CardImpl { + + private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("basic lands"); + + static { + filter.add(new SupertypePredicate(SuperType.BASIC)); + } + + public Ovinomancer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + // When Ovinomancer enters the battlefield, sacrifice it unless you return three basic lands you control to their owner's hand. + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(3, 3, filter, true))))); + + // {T}, Return Ovinomancer to its owner's hand: Destroy target creature. It can't be regenerated. That creature's controller creates a 0/1 green Sheep creature token. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(true), new TapSourceCost()); + ability.addEffect(new OvinomancerEffect()); + ability.addCost(new ReturnToHandFromBattlefieldSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public Ovinomancer(final Ovinomancer card) { + super(card); + } + + @Override + public Ovinomancer copy() { + return new Ovinomancer(this); + } +} + +class OvinomancerEffect extends OneShotEffect { + + public OvinomancerEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "That creature's controller creates a 0/1 green Sheep creature token"; + } + + public OvinomancerEffect(final OvinomancerEffect effect) { + super(effect); + } + + @Override + public OvinomancerEffect copy() { + return new OvinomancerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + UUID targetId = getTargetPointer().getFirst(game, source); + if (targetId != null) { + Permanent permanent = game.getPermanentOrLKIBattlefield(targetId); + if (permanent != null) { + UUID controllerId = permanent.getControllerId(); + if (controllerId != null) { + new SheepToken().putOntoBattlefield(1, game, source.getSourceId(), controllerId); + return true; + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/o/OviyaPashiriSageLifecrafter.java b/Mage.Sets/src/mage/cards/o/OviyaPashiriSageLifecrafter.java index b8a6414839..3e68b98e6e 100644 --- a/Mage.Sets/src/mage/cards/o/OviyaPashiriSageLifecrafter.java +++ b/Mage.Sets/src/mage/cards/o/OviyaPashiriSageLifecrafter.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -56,8 +57,8 @@ public class OviyaPashiriSageLifecrafter extends CardImpl { public OviyaPashiriSageLifecrafter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OwlFamiliar.java b/Mage.Sets/src/mage/cards/o/OwlFamiliar.java index fc0517d283..af536880bc 100644 --- a/Mage.Sets/src/mage/cards/o/OwlFamiliar.java +++ b/Mage.Sets/src/mage/cards/o/OwlFamiliar.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class OwlFamiliar extends CardImpl { public OwlFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OxiddaDaredevil.java b/Mage.Sets/src/mage/cards/o/OxiddaDaredevil.java index fb8949d52b..0b80ced99b 100644 --- a/Mage.Sets/src/mage/cards/o/OxiddaDaredevil.java +++ b/Mage.Sets/src/mage/cards/o/OxiddaDaredevil.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -56,8 +57,8 @@ public class OxiddaDaredevil extends CardImpl { public OxiddaDaredevil (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/OxiddaGolem.java b/Mage.Sets/src/mage/cards/o/OxiddaGolem.java index 6506954aa7..4ab3a39b27 100644 --- a/Mage.Sets/src/mage/cards/o/OxiddaGolem.java +++ b/Mage.Sets/src/mage/cards/o/OxiddaGolem.java @@ -44,7 +44,7 @@ public class OxiddaGolem extends CardImpl { public OxiddaGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/o/OxiddaScrapmelter.java b/Mage.Sets/src/mage/cards/o/OxiddaScrapmelter.java index e56ae581e8..4d93b5f17b 100644 --- a/Mage.Sets/src/mage/cards/o/OxiddaScrapmelter.java +++ b/Mage.Sets/src/mage/cards/o/OxiddaScrapmelter.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterArtifactPermanent; import mage.target.TargetPermanent; @@ -46,7 +47,7 @@ public class OxiddaScrapmelter extends CardImpl { public OxiddaScrapmelter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/o/OyobiWhoSplitTheHeavens.java b/Mage.Sets/src/mage/cards/o/OyobiWhoSplitTheHeavens.java index cec48568c6..7917bb9fa3 100644 --- a/Mage.Sets/src/mage/cards/o/OyobiWhoSplitTheHeavens.java +++ b/Mage.Sets/src/mage/cards/o/OyobiWhoSplitTheHeavens.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.StaticFilters; import mage.game.permanent.token.AnotherSpiritToken; @@ -47,7 +48,7 @@ public class OyobiWhoSplitTheHeavens extends CardImpl { public OyobiWhoSplitTheHeavens(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/p/Pacifism.java b/Mage.Sets/src/mage/cards/p/Pacifism.java index 4b5d2777c0..ea19abed04 100644 --- a/Mage.Sets/src/mage/cards/p/Pacifism.java +++ b/Mage.Sets/src/mage/cards/p/Pacifism.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -52,7 +53,7 @@ public class Pacifism extends CardImpl { public Pacifism(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/cards/p/PackGuardian.java b/Mage.Sets/src/mage/cards/p/PackGuardian.java index 095a2ca0ab..1a9849c061 100644 --- a/Mage.Sets/src/mage/cards/p/PackGuardian.java +++ b/Mage.Sets/src/mage/cards/p/PackGuardian.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterLandCard; import mage.game.permanent.token.WolfToken; @@ -48,8 +49,8 @@ public class PackGuardian extends CardImpl { public PackGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Wolf"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.WOLF); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PackRat.java b/Mage.Sets/src/mage/cards/p/PackRat.java index 1f0cb97b75..cbda4cfa41 100644 --- a/Mage.Sets/src/mage/cards/p/PackRat.java +++ b/Mage.Sets/src/mage/cards/p/PackRat.java @@ -35,7 +35,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.DiscardCardCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.effects.PutTokenOntoBattlefieldCopySourceEffect; +import mage.abilities.effects.CreateTokenCopySourceEffect; import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -75,7 +75,7 @@ public class PackRat extends CardImpl { public PackRat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(0); this.toughness = new MageInt(0); @@ -83,7 +83,7 @@ public class PackRat extends CardImpl { // Pack Rat's power and toughness are each equal to the number of Rats you control. this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.EndOfGame))); // {2}{B}, Discard a card: Create a token that's a copy of Pack Rat. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutTokenOntoBattlefieldCopySourceEffect(), new ManaCostsImpl("{2}{B}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenCopySourceEffect(), new ManaCostsImpl("{2}{B}")); ability.addCost(new DiscardCardCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PadeemConsulOfInnovation.java b/Mage.Sets/src/mage/cards/p/PadeemConsulOfInnovation.java index 47d81cacf0..d53d9ff3a6 100644 --- a/Mage.Sets/src/mage/cards/p/PadeemConsulOfInnovation.java +++ b/Mage.Sets/src/mage/cards/p/PadeemConsulOfInnovation.java @@ -51,8 +51,8 @@ public class PadeemConsulOfInnovation extends CardImpl { public PadeemConsulOfInnovation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vedalken"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PainKami.java b/Mage.Sets/src/mage/cards/p/PainKami.java index 0822a0db83..fd1ed19d17 100644 --- a/Mage.Sets/src/mage/cards/p/PainKami.java +++ b/Mage.Sets/src/mage/cards/p/PainKami.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class PainKami extends CardImpl { public PainKami(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PainSeer.java b/Mage.Sets/src/mage/cards/p/PainSeer.java index 9cbaa18e85..bcf3ff7163 100644 --- a/Mage.Sets/src/mage/cards/p/PainSeer.java +++ b/Mage.Sets/src/mage/cards/p/PainSeer.java @@ -38,6 +38,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -51,8 +52,8 @@ public class PainSeer extends CardImpl { public PainSeer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/Painsmith.java b/Mage.Sets/src/mage/cards/p/Painsmith.java index 34acb86a35..34a1c00753 100644 --- a/Mage.Sets/src/mage/cards/p/Painsmith.java +++ b/Mage.Sets/src/mage/cards/p/Painsmith.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterArtifactSpell; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ import mage.target.common.TargetCreaturePermanent; public class Painsmith extends CardImpl { public Painsmith (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PaintedBluffs.java b/Mage.Sets/src/mage/cards/p/PaintedBluffs.java index 1d8b8db331..aa7653dbf2 100644 --- a/Mage.Sets/src/mage/cards/p/PaintedBluffs.java +++ b/Mage.Sets/src/mage/cards/p/PaintedBluffs.java @@ -36,6 +36,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class PaintedBluffs extends CardImpl { public PaintedBluffs(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Desert"); + this.subtype.add(SubType.DESERT); // {T}: Add {C} to your mana pool. this.addAbility(new ColorlessManaAbility()); diff --git a/Mage.Sets/src/mage/cards/p/PaintersServant.java b/Mage.Sets/src/mage/cards/p/PaintersServant.java index b84c9b18a6..cabb7f43a8 100644 --- a/Mage.Sets/src/mage/cards/p/PaintersServant.java +++ b/Mage.Sets/src/mage/cards/p/PaintersServant.java @@ -40,6 +40,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -60,7 +61,7 @@ public class PaintersServant extends CardImpl { public PaintersServant(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(1); this.toughness = new MageInt(3); @@ -108,7 +109,7 @@ class PaintersServantEffect extends ContinuousEffectImpl { } // Exile for (Card card : game.getExile().getAllCards(game)) { - game.getState().getCreateCardAttribute(card).getColor().addColor(color); + game.getState().getCreateCardAttribute(card, game).getColor().addColor(color); } // Command for (CommandObject commandObject : game.getState().getCommand()) { @@ -122,15 +123,15 @@ class PaintersServantEffect extends ContinuousEffectImpl { if (player != null) { // Hand for (Card card : player.getHand().getCards(game)) { - game.getState().getCreateCardAttribute(card).getColor().addColor(color); + game.getState().getCreateCardAttribute(card, game).getColor().addColor(color); } // Library for (Card card : player.getLibrary().getCards(game)) { - game.getState().getCreateCardAttribute(card).getColor().addColor(color); + game.getState().getCreateCardAttribute(card, game).getColor().addColor(color); } // Graveyard for (Card card : player.getGraveyard().getCards(game)) { - game.getState().getCreateCardAttribute(card).getColor().addColor(color); + game.getState().getCreateCardAttribute(card, game).getColor().addColor(color); } } } diff --git a/Mage.Sets/src/mage/cards/p/PainwrackerOni.java b/Mage.Sets/src/mage/cards/p/PainwrackerOni.java index b55f82d98b..c7032f4424 100644 --- a/Mage.Sets/src/mage/cards/p/PainwrackerOni.java +++ b/Mage.Sets/src/mage/cards/p/PainwrackerOni.java @@ -52,8 +52,8 @@ public class PainwrackerOni extends CardImpl { public PainwrackerOni (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Demon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DEMON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PalaceFamiliar.java b/Mage.Sets/src/mage/cards/p/PalaceFamiliar.java index 132ba14e39..51be72973b 100644 --- a/Mage.Sets/src/mage/cards/p/PalaceFamiliar.java +++ b/Mage.Sets/src/mage/cards/p/PalaceFamiliar.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class PalaceFamiliar extends CardImpl { public PalaceFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PalaceGuard.java b/Mage.Sets/src/mage/cards/p/PalaceGuard.java index eaa08e946f..b274f08ee4 100644 --- a/Mage.Sets/src/mage/cards/p/PalaceGuard.java +++ b/Mage.Sets/src/mage/cards/p/PalaceGuard.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CanBlockAdditionalCreatureEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class PalaceGuard extends CardImpl { public PalaceGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PalaceJailer.java b/Mage.Sets/src/mage/cards/p/PalaceJailer.java index 501fefc06c..ad7c0abcf3 100644 --- a/Mage.Sets/src/mage/cards/p/PalaceJailer.java +++ b/Mage.Sets/src/mage/cards/p/PalaceJailer.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -69,8 +70,8 @@ public class PalaceJailer extends CardImpl { public PalaceJailer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PalaceSentinels.java b/Mage.Sets/src/mage/cards/p/PalaceSentinels.java index 6befbd5ea3..9429a57550 100644 --- a/Mage.Sets/src/mage/cards/p/PalaceSentinels.java +++ b/Mage.Sets/src/mage/cards/p/PalaceSentinels.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.BecomesMonarchSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class PalaceSentinels extends CardImpl { public PalaceSentinels(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PaladinEnVec.java b/Mage.Sets/src/mage/cards/p/PaladinEnVec.java index 57b58a6f2c..5de1d8fee1 100644 --- a/Mage.Sets/src/mage/cards/p/PaladinEnVec.java +++ b/Mage.Sets/src/mage/cards/p/PaladinEnVec.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class PaladinEnVec extends CardImpl { public PaladinEnVec(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PaladinOfPrahv.java b/Mage.Sets/src/mage/cards/p/PaladinOfPrahv.java index 62d15a5e42..9622a06384 100644 --- a/Mage.Sets/src/mage/cards/p/PaladinOfPrahv.java +++ b/Mage.Sets/src/mage/cards/p/PaladinOfPrahv.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.ForecastAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.game.Game; @@ -56,8 +57,8 @@ public class PaladinOfPrahv extends CardImpl { public PaladinOfPrahv(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PaladinOfTheBloodstained.java b/Mage.Sets/src/mage/cards/p/PaladinOfTheBloodstained.java new file mode 100644 index 0000000000..00bf68a71d --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PaladinOfTheBloodstained.java @@ -0,0 +1,66 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.permanent.token.IxalanVampireToken; + +/** + * + * @author TheElk801 + */ +public class PaladinOfTheBloodstained extends CardImpl { + + public PaladinOfTheBloodstained(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // When Paladin of the Bloodstained enters the battlefield, create a 1/1 white Vampire creature token with lifelink. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new IxalanVampireToken()))); + } + + public PaladinOfTheBloodstained(final PaladinOfTheBloodstained card) { + super(card); + } + + @Override + public PaladinOfTheBloodstained copy() { + return new PaladinOfTheBloodstained(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PaleBears.java b/Mage.Sets/src/mage/cards/p/PaleBears.java index c82389b9ff..af933348fd 100644 --- a/Mage.Sets/src/mage/cards/p/PaleBears.java +++ b/Mage.Sets/src/mage/cards/p/PaleBears.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.IslandwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class PaleBears extends CardImpl { public PaleBears(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Bear"); + this.subtype.add(SubType.BEAR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PaleMoon.java b/Mage.Sets/src/mage/cards/p/PaleMoon.java new file mode 100644 index 0000000000..70548af74f --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PaleMoon.java @@ -0,0 +1,117 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.MageObject; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.filter.common.FilterLandPermanent; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.events.ManaEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author L_J + */ +public class PaleMoon extends CardImpl { + + public PaleMoon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); + + // Until end of turn, if a player taps a nonbasic land for mana, it produces colorless mana instead of any other type. + this.getSpellAbility().addEffect(new PaleMoonReplacementEffect()); + } + + public PaleMoon(final PaleMoon card) { + super(card); + } + + @Override + public PaleMoon copy() { + return new PaleMoon(this); + } +} + +class PaleMoonReplacementEffect extends ReplacementEffectImpl { + + private static final FilterLandPermanent filter = FilterLandPermanent.nonbasicLands(); + + PaleMoonReplacementEffect() { + super(Duration.EndOfTurn, Outcome.Neutral); + staticText = "Until end of turn, if a player taps a nonbasic land for mana, it produces colorless mana instead of any other type"; + } + + PaleMoonReplacementEffect(final PaleMoonReplacementEffect effect) { + super(effect); + } + + @Override + public PaleMoonReplacementEffect copy() { + return new PaleMoonReplacementEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + ManaEvent manaEvent = (ManaEvent) event; + Mana mana = manaEvent.getMana(); + mana.setToMana(Mana.ColorlessMana(mana.count())); + return false; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == EventType.TAPPED_FOR_MANA; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + MageObject mageObject = game.getObject(event.getSourceId()); + if (mageObject != null && mageObject.isLand()) { + Permanent land = game.getPermanent(event.getSourceId()); + return land != null && filter.match(land, game); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/p/PaleRecluse.java b/Mage.Sets/src/mage/cards/p/PaleRecluse.java index 906342d80e..a3c4eb920e 100644 --- a/Mage.Sets/src/mage/cards/p/PaleRecluse.java +++ b/Mage.Sets/src/mage/cards/p/PaleRecluse.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class PaleRecluse extends CardImpl { public PaleRecluse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{W}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); diff --git a/Mage.Sets/src/mage/cards/p/PaleRiderOfTrostad.java b/Mage.Sets/src/mage/cards/p/PaleRiderOfTrostad.java index 666c184064..f09cf4f27b 100644 --- a/Mage.Sets/src/mage/cards/p/PaleRiderOfTrostad.java +++ b/Mage.Sets/src/mage/cards/p/PaleRiderOfTrostad.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SkulkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class PaleRiderOfTrostad extends CardImpl { public PaleRiderOfTrostad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PaleWayfarer.java b/Mage.Sets/src/mage/cards/p/PaleWayfarer.java index 8345fcddb3..ea50659cbf 100644 --- a/Mage.Sets/src/mage/cards/p/PaleWayfarer.java +++ b/Mage.Sets/src/mage/cards/p/PaleWayfarer.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.choices.ChoiceColor; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -54,8 +55,8 @@ public class PaleWayfarer extends CardImpl { public PaleWayfarer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); - this.subtype.add("Spirit"); - this.subtype.add("Giant"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/Paleoloth.java b/Mage.Sets/src/mage/cards/p/Paleoloth.java index e3e64d29f7..395f5e5250 100644 --- a/Mage.Sets/src/mage/cards/p/Paleoloth.java +++ b/Mage.Sets/src/mage/cards/p/Paleoloth.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -60,7 +61,7 @@ public class Paleoloth extends CardImpl { public Paleoloth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/Palinchron.java b/Mage.Sets/src/mage/cards/p/Palinchron.java index fe637d6c3e..76a82549b7 100644 --- a/Mage.Sets/src/mage/cards/p/Palinchron.java +++ b/Mage.Sets/src/mage/cards/p/Palinchron.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,7 +49,7 @@ public class Palinchron extends CardImpl { public Palinchron(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/PalisadeGiant.java b/Mage.Sets/src/mage/cards/p/PalisadeGiant.java index 2145e15e4c..86c523f732 100644 --- a/Mage.Sets/src/mage/cards/p/PalisadeGiant.java +++ b/Mage.Sets/src/mage/cards/p/PalisadeGiant.java @@ -35,6 +35,7 @@ import mage.abilities.effects.ReplacementEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -69,8 +70,8 @@ public class PalisadeGiant extends CardImpl { public PalisadeGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Giant"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/p/PalladiaMors.java b/Mage.Sets/src/mage/cards/p/PalladiaMors.java index 24025bff34..c5ba975afe 100644 --- a/Mage.Sets/src/mage/cards/p/PalladiaMors.java +++ b/Mage.Sets/src/mage/cards/p/PalladiaMors.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; @@ -49,8 +50,8 @@ public class PalladiaMors extends CardImpl { public PalladiaMors(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}{G}{G}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elder"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.ELDER); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/p/PalladiumMyr.java b/Mage.Sets/src/mage/cards/p/PalladiumMyr.java index 992a1ff8dc..81f05a4a42 100644 --- a/Mage.Sets/src/mage/cards/p/PalladiumMyr.java +++ b/Mage.Sets/src/mage/cards/p/PalladiumMyr.java @@ -35,6 +35,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class PalladiumMyr extends CardImpl { public PalladiumMyr(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(2); this.toughness = new MageInt(2); this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(2), new TapSourceCost())); diff --git a/Mage.Sets/src/mage/cards/p/PallidMycoderm.java b/Mage.Sets/src/mage/cards/p/PallidMycoderm.java index 151e3d91f0..d9196f89c1 100644 --- a/Mage.Sets/src/mage/cards/p/PallidMycoderm.java +++ b/Mage.Sets/src/mage/cards/p/PallidMycoderm.java @@ -64,7 +64,7 @@ public class PallidMycoderm extends CardImpl { public PallidMycoderm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/Pallimud.java b/Mage.Sets/src/mage/cards/p/Pallimud.java index 41096e246a..74d375aa0d 100644 --- a/Mage.Sets/src/mage/cards/p/Pallimud.java +++ b/Mage.Sets/src/mage/cards/p/Pallimud.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.SetPowerSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class Pallimud extends CardImpl { public Pallimud(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/Panacea.java b/Mage.Sets/src/mage/cards/p/Panacea.java new file mode 100644 index 0000000000..e8b9f02192 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/Panacea.java @@ -0,0 +1,70 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.PreventDamageToTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author TheElk801 + */ +public class Panacea extends CardImpl { + + public Panacea(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); + + // {X}{X}, {tap}: Prevent the next X damage that would be dealt to target creature or player this turn. + Ability ability = new SimpleActivatedAbility( + new PreventDamageToTargetEffect(Duration.EndOfTurn, false, true, new ManacostVariableValue()), + new ManaCostsImpl("{X}{X}") + ); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public Panacea(final Panacea card) { + super(card); + } + + @Override + public Panacea copy() { + return new Panacea(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PangTongYoungPhoenix.java b/Mage.Sets/src/mage/cards/p/PangTongYoungPhoenix.java index 575dabcbbc..4ed1a5a129 100644 --- a/Mage.Sets/src/mage/cards/p/PangTongYoungPhoenix.java +++ b/Mage.Sets/src/mage/cards/p/PangTongYoungPhoenix.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class PangTongYoungPhoenix extends CardImpl { public PangTongYoungPhoenix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/Pangosaur.java b/Mage.Sets/src/mage/cards/p/Pangosaur.java index 61658b75e0..8f4c448081 100644 --- a/Mage.Sets/src/mage/cards/p/Pangosaur.java +++ b/Mage.Sets/src/mage/cards/p/Pangosaur.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -46,8 +47,8 @@ import mage.game.events.GameEvent.EventType; public class Pangosaur extends CardImpl { public Pangosaur(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Lizard"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.subtype.add(SubType.DINOSAUR); this.power = new MageInt(6); this.toughness = new MageInt(6); @@ -66,6 +67,7 @@ public class Pangosaur extends CardImpl { } class PangosaurTriggeredAbility extends TriggeredAbilityImpl { + PangosaurTriggeredAbility() { super(Zone.BATTLEFIELD, new ReturnToHandSourceEffect()); } @@ -83,7 +85,7 @@ class PangosaurTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { return true; } - + @Override public PangosaurTriggeredAbility copy() { return new PangosaurTriggeredAbility(this); diff --git a/Mage.Sets/src/mage/cards/p/Panharmonicon.java b/Mage.Sets/src/mage/cards/p/Panharmonicon.java index 2ce198c478..4bade4472d 100644 --- a/Mage.Sets/src/mage/cards/p/Panharmonicon.java +++ b/Mage.Sets/src/mage/cards/p/Panharmonicon.java @@ -1,119 +1,119 @@ -/* - * 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.cards.p; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.ReplacementEffectImpl; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.EntersTheBattlefieldEvent; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.events.NumberOfTriggersEvent; - -/** - * - * @author emerald000 - */ -public class Panharmonicon extends CardImpl { - - public Panharmonicon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - - // If an artifact or creature entering the battlefield causes a triggered ability of a permanent you control to trigger, that ability triggers an additional time. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PanharmoniconEffect())); - } - - public Panharmonicon(final Panharmonicon card) { - super(card); - } - - @Override - public Panharmonicon copy() { - return new Panharmonicon(this); - } -} - -class PanharmoniconEffect extends ReplacementEffectImpl { - - PanharmoniconEffect() { - super(Duration.WhileOnBattlefield, Outcome.Benefit); - staticText = "If an artifact or creature entering the battlefield causes a triggered ability of a permanent you control to trigger, that ability triggers an additional time"; - } - - PanharmoniconEffect(final PanharmoniconEffect effect) { - super(effect); - } - - @Override - public PanharmoniconEffect copy() { - return new PanharmoniconEffect(this); - } - - @Override - public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == EventType.NUMBER_OF_TRIGGERS; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - if (event instanceof NumberOfTriggersEvent) { - NumberOfTriggersEvent numberOfTriggersEvent = (NumberOfTriggersEvent) event; - // Only triggers of the controller of Panharmonicon - if (source.getControllerId().equals(event.getPlayerId())) { - GameEvent sourceEvent = numberOfTriggersEvent.getSourceEvent(); - // Only EtB triggers - if (sourceEvent.getType() == EventType.ENTERS_THE_BATTLEFIELD && sourceEvent instanceof EntersTheBattlefieldEvent) { - EntersTheBattlefieldEvent entersTheBattlefieldEvent = (EntersTheBattlefieldEvent) sourceEvent; - // Only for entering artifacts or creatures - if (entersTheBattlefieldEvent.getTarget().isArtifact() - || entersTheBattlefieldEvent.getTarget().isCreature()) { - // Only for triggers of permanents - if (game.getPermanent(numberOfTriggersEvent.getSourceId()) != null) { - return true; - } - } - } - } - } - return false; - } - - @Override - public boolean replaceEvent(GameEvent event, Ability source, Game game) { - event.setAmount(event.getAmount() + 1); - return false; - } +/* + * 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.cards.p; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.EntersTheBattlefieldEvent; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.events.NumberOfTriggersEvent; + +/** + * + * @author emerald000 + */ +public class Panharmonicon extends CardImpl { + + public Panharmonicon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); + + // If an artifact or creature entering the battlefield causes a triggered ability of a permanent you control to trigger, that ability triggers an additional time. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PanharmoniconEffect())); + } + + public Panharmonicon(final Panharmonicon card) { + super(card); + } + + @Override + public Panharmonicon copy() { + return new Panharmonicon(this); + } +} + +class PanharmoniconEffect extends ReplacementEffectImpl { + + PanharmoniconEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = "If an artifact or creature entering the battlefield causes a triggered ability of a permanent you control to trigger, that ability triggers an additional time"; + } + + PanharmoniconEffect(final PanharmoniconEffect effect) { + super(effect); + } + + @Override + public PanharmoniconEffect copy() { + return new PanharmoniconEffect(this); + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == EventType.NUMBER_OF_TRIGGERS; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event instanceof NumberOfTriggersEvent) { + NumberOfTriggersEvent numberOfTriggersEvent = (NumberOfTriggersEvent) event; + // Only triggers of the controller of Panharmonicon + if (source.getControllerId().equals(event.getPlayerId())) { + GameEvent sourceEvent = numberOfTriggersEvent.getSourceEvent(); + // Only EtB triggers + if (sourceEvent.getType() == EventType.ENTERS_THE_BATTLEFIELD && sourceEvent instanceof EntersTheBattlefieldEvent) { + EntersTheBattlefieldEvent entersTheBattlefieldEvent = (EntersTheBattlefieldEvent) sourceEvent; + // Only for entering artifacts or creatures + if (entersTheBattlefieldEvent.getTarget().isArtifact() + || entersTheBattlefieldEvent.getTarget().isCreature()) { + // Only for triggers of permanents + if (game.getPermanent(numberOfTriggersEvent.getSourceId()) != null) { + return true; + } + } + } + } + } + return false; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + event.setAmount(event.getAmount() + 1); + return false; + } } \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/p/PantherWarriors.java b/Mage.Sets/src/mage/cards/p/PantherWarriors.java index c5d31ec47e..8038e3e126 100644 --- a/Mage.Sets/src/mage/cards/p/PantherWarriors.java +++ b/Mage.Sets/src/mage/cards/p/PantherWarriors.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class PantherWarriors extends CardImpl { public PantherWarriors(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Cat"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(6); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PaperfinRascal.java b/Mage.Sets/src/mage/cards/p/PaperfinRascal.java index 08927d78c8..0dec7c1dad 100644 --- a/Mage.Sets/src/mage/cards/p/PaperfinRascal.java +++ b/Mage.Sets/src/mage/cards/p/PaperfinRascal.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,8 +46,8 @@ public class PaperfinRascal extends CardImpl { public PaperfinRascal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/ParadiseMantle.java b/Mage.Sets/src/mage/cards/p/ParadiseMantle.java index d1afe74ef1..6d01514a1f 100644 --- a/Mage.Sets/src/mage/cards/p/ParadiseMantle.java +++ b/Mage.Sets/src/mage/cards/p/ParadiseMantle.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class ParadiseMantle extends CardImpl { public ParadiseMantle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{0}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has "{tap}: Add one mana of any color to your mana pool." this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, diff --git a/Mage.Sets/src/mage/cards/p/ParadisePlume.java b/Mage.Sets/src/mage/cards/p/ParadisePlume.java index b1a1de9dda..bee19a6f0b 100644 --- a/Mage.Sets/src/mage/cards/p/ParadisePlume.java +++ b/Mage.Sets/src/mage/cards/p/ParadisePlume.java @@ -1,157 +1,157 @@ -/* - * 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.cards.p; - -import java.util.UUID; -import mage.Mana; -import mage.ObjectColor; -import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.common.AsEntersBattlefieldAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.ChooseColorEffect; -import mage.abilities.effects.common.GainLifeEffect; -import mage.abilities.effects.common.ManaEffect; -import mage.abilities.mana.SimpleManaAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.ColoredManaSymbol; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.FilterSpell; -import mage.filter.predicate.mageobject.ColorPredicate; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.stack.Spell; -import mage.players.Player; - -/** - * - * @author jeffwadsworth - */ -public class ParadisePlume extends CardImpl { - - public ParadisePlume(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); - - // As Paradise Plume enters the battlefield, choose a color. - this.addAbility(new AsEntersBattlefieldAbility(new ChooseColorEffect(Outcome.Detriment))); - - // Whenever a player casts a spell of the chosen color, you may gain 1 life. - this.addAbility(new ParadisePlumeSpellCastTriggeredAbility()); - - // {tap}: Add one mana of the chosen color to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new ParadisePlumeManaEffect(), new TapSourceCost())); - - } - - public ParadisePlume(final ParadisePlume card) { - super(card); - } - - @Override - public ParadisePlume copy() { - return new ParadisePlume(this); - } -} - -class ParadisePlumeManaEffect extends ManaEffect { - - public ParadisePlumeManaEffect() { - super(); - staticText = "Add one mana of the chosen color to your mana pool"; - } - - public ParadisePlumeManaEffect(final ParadisePlumeManaEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { - player.getManaPool().addMana(getMana(game, source), game, source); - } - return true; - } - - @Override - public Mana getMana(Game game, Ability source) { - ObjectColor color = (ObjectColor) game.getState().getValue(source.getSourceId() + "_color"); - if (color != null) { - return new Mana(ColoredManaSymbol.lookup(color.toString().charAt(0))); - } else { - return null; - } - } - - @Override - public ParadisePlumeManaEffect copy() { - return new ParadisePlumeManaEffect(this); - } -} - -class ParadisePlumeSpellCastTriggeredAbility extends TriggeredAbilityImpl { - - public ParadisePlumeSpellCastTriggeredAbility() { - super(Zone.BATTLEFIELD, new GainLifeEffect(1), true); - } - - public ParadisePlumeSpellCastTriggeredAbility(final ParadisePlumeSpellCastTriggeredAbility ability) { - super(ability); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.SPELL_CAST; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - ObjectColor color = (ObjectColor) game.getState().getValue(getSourceId() + "_color"); - if (color != null) { - FilterSpell filter = new FilterSpell(); - filter.add(new ColorPredicate(color)); - Spell spell = game.getStack().getSpell(event.getTargetId()); - return (spell != null - && filter.match(spell, getSourceId(), getControllerId(), game)); - } - return false; - } - - @Override - public ParadisePlumeSpellCastTriggeredAbility copy() { - return new ParadisePlumeSpellCastTriggeredAbility(this); - } - - @Override - public String getRule() { - return "Whenever a player casts a spell of the chosen color, " + super.getRule(); - } -} +/* + * 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.cards.p; + +import java.util.UUID; +import mage.Mana; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.ChooseColorEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.ManaEffect; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.stack.Spell; +import mage.players.Player; + +/** + * + * @author jeffwadsworth + */ +public class ParadisePlume extends CardImpl { + + public ParadisePlume(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); + + // As Paradise Plume enters the battlefield, choose a color. + this.addAbility(new AsEntersBattlefieldAbility(new ChooseColorEffect(Outcome.Detriment))); + + // Whenever a player casts a spell of the chosen color, you may gain 1 life. + this.addAbility(new ParadisePlumeSpellCastTriggeredAbility()); + + // {tap}: Add one mana of the chosen color to your mana pool. + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new ParadisePlumeManaEffect(), new TapSourceCost())); + + } + + public ParadisePlume(final ParadisePlume card) { + super(card); + } + + @Override + public ParadisePlume copy() { + return new ParadisePlume(this); + } +} + +class ParadisePlumeManaEffect extends ManaEffect { + + public ParadisePlumeManaEffect() { + super(); + staticText = "Add one mana of the chosen color to your mana pool"; + } + + public ParadisePlumeManaEffect(final ParadisePlumeManaEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + player.getManaPool().addMana(getMana(game, source), game, source); + } + return true; + } + + @Override + public Mana getMana(Game game, Ability source) { + ObjectColor color = (ObjectColor) game.getState().getValue(source.getSourceId() + "_color"); + if (color != null) { + return new Mana(ColoredManaSymbol.lookup(color.toString().charAt(0))); + } else { + return null; + } + } + + @Override + public ParadisePlumeManaEffect copy() { + return new ParadisePlumeManaEffect(this); + } +} + +class ParadisePlumeSpellCastTriggeredAbility extends TriggeredAbilityImpl { + + public ParadisePlumeSpellCastTriggeredAbility() { + super(Zone.BATTLEFIELD, new GainLifeEffect(1), true); + } + + public ParadisePlumeSpellCastTriggeredAbility(final ParadisePlumeSpellCastTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.SPELL_CAST; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + ObjectColor color = (ObjectColor) game.getState().getValue(getSourceId() + "_color"); + if (color != null) { + FilterSpell filter = new FilterSpell(); + filter.add(new ColorPredicate(color)); + Spell spell = game.getStack().getSpell(event.getTargetId()); + return (spell != null + && filter.match(spell, getSourceId(), getControllerId(), game)); + } + return false; + } + + @Override + public ParadisePlumeSpellCastTriggeredAbility copy() { + return new ParadisePlumeSpellCastTriggeredAbility(this); + } + + @Override + public String getRule() { + return "Whenever a player casts a spell of the chosen color, " + super.getRule(); + } +} diff --git a/Mage.Sets/src/mage/cards/p/ParadoxHaze.java b/Mage.Sets/src/mage/cards/p/ParadoxHaze.java index d87ac200ab..e54902f0d6 100644 --- a/Mage.Sets/src/mage/cards/p/ParadoxHaze.java +++ b/Mage.Sets/src/mage/cards/p/ParadoxHaze.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -57,7 +58,7 @@ public class ParadoxHaze extends CardImpl { public ParadoxHaze(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant player TargetPlayer auraTarget = new TargetPlayer(); diff --git a/Mage.Sets/src/mage/cards/p/ParagonOfEternalWilds.java b/Mage.Sets/src/mage/cards/p/ParagonOfEternalWilds.java index b2ca1f5efb..b4b125be73 100644 --- a/Mage.Sets/src/mage/cards/p/ParagonOfEternalWilds.java +++ b/Mage.Sets/src/mage/cards/p/ParagonOfEternalWilds.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -69,8 +70,8 @@ public class ParagonOfEternalWilds extends CardImpl { public ParagonOfEternalWilds(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/ParagonOfFierceDefiance.java b/Mage.Sets/src/mage/cards/p/ParagonOfFierceDefiance.java index 28e5f93bc9..d676170c0e 100644 --- a/Mage.Sets/src/mage/cards/p/ParagonOfFierceDefiance.java +++ b/Mage.Sets/src/mage/cards/p/ParagonOfFierceDefiance.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -66,8 +67,8 @@ public class ParagonOfFierceDefiance extends CardImpl { public ParagonOfFierceDefiance(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/ParagonOfGatheringMists.java b/Mage.Sets/src/mage/cards/p/ParagonOfGatheringMists.java index 4f84a672c6..a59e81f3a5 100644 --- a/Mage.Sets/src/mage/cards/p/ParagonOfGatheringMists.java +++ b/Mage.Sets/src/mage/cards/p/ParagonOfGatheringMists.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -69,8 +70,8 @@ public class ParagonOfGatheringMists extends CardImpl { public ParagonOfGatheringMists(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/ParagonOfNewDawns.java b/Mage.Sets/src/mage/cards/p/ParagonOfNewDawns.java index e8c584ccef..99d86f412a 100644 --- a/Mage.Sets/src/mage/cards/p/ParagonOfNewDawns.java +++ b/Mage.Sets/src/mage/cards/p/ParagonOfNewDawns.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -69,8 +70,8 @@ public class ParagonOfNewDawns extends CardImpl { public ParagonOfNewDawns(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/ParagonOfOpenGraves.java b/Mage.Sets/src/mage/cards/p/ParagonOfOpenGraves.java index 15ea4792eb..4071d90090 100644 --- a/Mage.Sets/src/mage/cards/p/ParagonOfOpenGraves.java +++ b/Mage.Sets/src/mage/cards/p/ParagonOfOpenGraves.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -66,8 +67,8 @@ public class ParagonOfOpenGraves extends CardImpl { public ParagonOfOpenGraves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Skeleton"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.SKELETON); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/ParagonOfTheAmesha.java b/Mage.Sets/src/mage/cards/p/ParagonOfTheAmesha.java index d707bb5cc6..15269287f1 100644 --- a/Mage.Sets/src/mage/cards/p/ParagonOfTheAmesha.java +++ b/Mage.Sets/src/mage/cards/p/ParagonOfTheAmesha.java @@ -53,8 +53,8 @@ public class ParagonOfTheAmesha extends CardImpl { public ParagonOfTheAmesha(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -112,7 +112,7 @@ public class ParagonOfTheAmesha extends CardImpl { case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { permanent.getSubtype(game).clear(); - permanent.getSubtype(game).add("Angel"); + permanent.getSubtype(game).add(SubType.ANGEL); } break; } diff --git a/Mage.Sets/src/mage/cards/p/ParallaxDementia.java b/Mage.Sets/src/mage/cards/p/ParallaxDementia.java index 5ae33c4318..ce9d48eabe 100644 --- a/Mage.Sets/src/mage/cards/p/ParallaxDementia.java +++ b/Mage.Sets/src/mage/cards/p/ParallaxDementia.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FadingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class ParallaxDementia extends CardImpl { public ParallaxDementia(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/p/ParallectricFeedback.java b/Mage.Sets/src/mage/cards/p/ParallectricFeedback.java index b31b227c7c..be6e074110 100644 --- a/Mage.Sets/src/mage/cards/p/ParallectricFeedback.java +++ b/Mage.Sets/src/mage/cards/p/ParallectricFeedback.java @@ -1,98 +1,98 @@ -/* - * 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.cards.p; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.game.Game; -import mage.game.stack.Spell; -import mage.players.Player; -import mage.target.TargetSpell; - -/** - * - * @author Styxo - */ -public class ParallectricFeedback extends CardImpl { - - public ParallectricFeedback(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}"); - - // Parallectric Feedback deals damage to target spell's controller equal to that spell's converted mana cost. - this.getSpellAbility().addTarget(new TargetSpell()); - this.getSpellAbility().addEffect(new ParallectricFeedbackEffect()); - - } - - public ParallectricFeedback(final ParallectricFeedback card) { - super(card); - } - - @Override - public ParallectricFeedback copy() { - return new ParallectricFeedback(this); - } -} - -class ParallectricFeedbackEffect extends OneShotEffect { - - public ParallectricFeedbackEffect() { - super(Outcome.Damage); - staticText = "{this} deals damage to target spell's controller equal to that spell's converted mana cost"; - } - - public ParallectricFeedbackEffect(final ParallectricFeedbackEffect effect) { - super(effect); - } - - @Override - public ParallectricFeedbackEffect copy() { - return new ParallectricFeedbackEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Spell spell = game.getStack().getSpell(source.getFirstTarget()); - if (spell != null) { - Player spellController = game.getPlayer(spell.getControllerId()); - if (spellController != null) { - spellController.damage(spell.getConvertedManaCost(), source.getSourceId(), game, false, true); - return true; - } - } - } - return false; - } -} +/* + * 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.cards.p; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.players.Player; +import mage.target.TargetSpell; + +/** + * + * @author Styxo + */ +public class ParallectricFeedback extends CardImpl { + + public ParallectricFeedback(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}"); + + // Parallectric Feedback deals damage to target spell's controller equal to that spell's converted mana cost. + this.getSpellAbility().addTarget(new TargetSpell()); + this.getSpellAbility().addEffect(new ParallectricFeedbackEffect()); + + } + + public ParallectricFeedback(final ParallectricFeedback card) { + super(card); + } + + @Override + public ParallectricFeedback copy() { + return new ParallectricFeedback(this); + } +} + +class ParallectricFeedbackEffect extends OneShotEffect { + + public ParallectricFeedbackEffect() { + super(Outcome.Damage); + staticText = "{this} deals damage to target spell's controller equal to that spell's converted mana cost"; + } + + public ParallectricFeedbackEffect(final ParallectricFeedbackEffect effect) { + super(effect); + } + + @Override + public ParallectricFeedbackEffect copy() { + return new ParallectricFeedbackEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Spell spell = game.getStack().getSpell(source.getFirstTarget()); + if (spell != null) { + Player spellController = game.getPlayer(spell.getControllerId()); + if (spellController != null) { + spellController.damage(spell.getConvertedManaCost(), source.getSourceId(), game, false, true); + return true; + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/p/ParallelEvolution.java b/Mage.Sets/src/mage/cards/p/ParallelEvolution.java index dedb99c3ca..ae1fba4247 100644 --- a/Mage.Sets/src/mage/cards/p/ParallelEvolution.java +++ b/Mage.Sets/src/mage/cards/p/ParallelEvolution.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.keyword.FlashbackAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -97,7 +97,7 @@ class ParallelEvolutionEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, game)) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(permanent.getControllerId()); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(permanent.getControllerId()); effect.setTargetPointer(new FixedTarget(permanent, game)); effect.apply(game, source); } diff --git a/Mage.Sets/src/mage/cards/p/Paralyze.java b/Mage.Sets/src/mage/cards/p/Paralyze.java index 8b0c910df7..19f3a57a75 100644 --- a/Mage.Sets/src/mage/cards/p/Paralyze.java +++ b/Mage.Sets/src/mage/cards/p/Paralyze.java @@ -53,7 +53,7 @@ public class Paralyze extends CardImpl { public Paralyze(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/p/ParalyzingGrasp.java b/Mage.Sets/src/mage/cards/p/ParalyzingGrasp.java index aeb8b8d79e..e6b89e3e48 100644 --- a/Mage.Sets/src/mage/cards/p/ParalyzingGrasp.java +++ b/Mage.Sets/src/mage/cards/p/ParalyzingGrasp.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -48,7 +49,7 @@ public class ParalyzingGrasp extends CardImpl { public ParalyzingGrasp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/p/ParanoidParishBlade.java b/Mage.Sets/src/mage/cards/p/ParanoidParishBlade.java index d0622545ab..70cb085871 100644 --- a/Mage.Sets/src/mage/cards/p/ParanoidParishBlade.java +++ b/Mage.Sets/src/mage/cards/p/ParanoidParishBlade.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class ParanoidParishBlade extends CardImpl { public ParanoidParishBlade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/ParapetWatchers.java b/Mage.Sets/src/mage/cards/p/ParapetWatchers.java index 06cb7206ab..d9b614b2f7 100644 --- a/Mage.Sets/src/mage/cards/p/ParapetWatchers.java +++ b/Mage.Sets/src/mage/cards/p/ParapetWatchers.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,8 +47,8 @@ public class ParapetWatchers extends CardImpl { public ParapetWatchers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Kithkin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/ParasiticBond.java b/Mage.Sets/src/mage/cards/p/ParasiticBond.java index 09332bea12..ced632e5b4 100644 --- a/Mage.Sets/src/mage/cards/p/ParasiticBond.java +++ b/Mage.Sets/src/mage/cards/p/ParasiticBond.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class ParasiticBond extends CardImpl { public ParasiticBond(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/p/ParasiticImplant.java b/Mage.Sets/src/mage/cards/p/ParasiticImplant.java index 7dc2c14ed2..265373bee3 100644 --- a/Mage.Sets/src/mage/cards/p/ParasiticImplant.java +++ b/Mage.Sets/src/mage/cards/p/ParasiticImplant.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.game.Game; @@ -53,7 +54,7 @@ public class ParasiticImplant extends CardImpl { public ParasiticImplant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/p/ParasiticStrix.java b/Mage.Sets/src/mage/cards/p/ParasiticStrix.java index 020ab87b37..8f7fa96f1e 100644 --- a/Mage.Sets/src/mage/cards/p/ParasiticStrix.java +++ b/Mage.Sets/src/mage/cards/p/ParasiticStrix.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -52,7 +53,7 @@ public class ParasiticStrix extends CardImpl { public ParasiticStrix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PardicArsonist.java b/Mage.Sets/src/mage/cards/p/PardicArsonist.java index 40186d325a..ddd8f0f9e8 100644 --- a/Mage.Sets/src/mage/cards/p/PardicArsonist.java +++ b/Mage.Sets/src/mage/cards/p/PardicArsonist.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -51,8 +52,8 @@ public class PardicArsonist extends CardImpl { public PardicArsonist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Barbarian"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BARBARIAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PardicCollaborator.java b/Mage.Sets/src/mage/cards/p/PardicCollaborator.java index 80ba574bfb..aa9eda3833 100644 --- a/Mage.Sets/src/mage/cards/p/PardicCollaborator.java +++ b/Mage.Sets/src/mage/cards/p/PardicCollaborator.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class PardicCollaborator extends CardImpl { public PardicCollaborator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Barbarian"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BARBARIAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PardicDragon.java b/Mage.Sets/src/mage/cards/p/PardicDragon.java index 8048d6ac75..e60483e1fe 100644 --- a/Mage.Sets/src/mage/cards/p/PardicDragon.java +++ b/Mage.Sets/src/mage/cards/p/PardicDragon.java @@ -57,7 +57,7 @@ public class PardicDragon extends CardImpl { public PardicDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PardicFirecat.java b/Mage.Sets/src/mage/cards/p/PardicFirecat.java index bdb227b1b2..bda76400a9 100644 --- a/Mage.Sets/src/mage/cards/p/PardicFirecat.java +++ b/Mage.Sets/src/mage/cards/p/PardicFirecat.java @@ -34,6 +34,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.f.FlameBurst; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class PardicFirecat extends CardImpl { public PardicFirecat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Cat"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PardicLancer.java b/Mage.Sets/src/mage/cards/p/PardicLancer.java index fdd76d71bc..4926fd238f 100644 --- a/Mage.Sets/src/mage/cards/p/PardicLancer.java +++ b/Mage.Sets/src/mage/cards/p/PardicLancer.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class PardicLancer extends CardImpl { public PardicLancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Human"); - this.subtype.add("Barbarian"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BARBARIAN); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PardicMiner.java b/Mage.Sets/src/mage/cards/p/PardicMiner.java index a67ae3acab..1b8d12ece3 100644 --- a/Mage.Sets/src/mage/cards/p/PardicMiner.java +++ b/Mage.Sets/src/mage/cards/p/PardicMiner.java @@ -37,6 +37,7 @@ import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class PardicMiner extends CardImpl { public PardicMiner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Dwarf"); + this.subtype.add(SubType.DWARF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PardicSwordsmith.java b/Mage.Sets/src/mage/cards/p/PardicSwordsmith.java index 213f1812ba..0eb9d51f17 100644 --- a/Mage.Sets/src/mage/cards/p/PardicSwordsmith.java +++ b/Mage.Sets/src/mage/cards/p/PardicSwordsmith.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class PardicSwordsmith extends CardImpl { public PardicSwordsmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Dwarf"); + this.subtype.add(SubType.DWARF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/Pariah.java b/Mage.Sets/src/mage/cards/p/Pariah.java index 1965fe766a..4188939bee 100644 --- a/Mage.Sets/src/mage/cards/p/Pariah.java +++ b/Mage.Sets/src/mage/cards/p/Pariah.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class Pariah extends CardImpl { public Pariah(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/p/PariahsShield.java b/Mage.Sets/src/mage/cards/p/PariahsShield.java index 31202773b0..b51baacbc2 100644 --- a/Mage.Sets/src/mage/cards/p/PariahsShield.java +++ b/Mage.Sets/src/mage/cards/p/PariahsShield.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class PariahsShield extends CardImpl { public PariahsShield(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{5}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // All damage that would be dealt to you is dealt to equipped creature instead. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PariahEffect())); diff --git a/Mage.Sets/src/mage/cards/p/PartTheVeil.java b/Mage.Sets/src/mage/cards/p/PartTheVeil.java index 8e7586d0ec..4fbb462bc6 100644 --- a/Mage.Sets/src/mage/cards/p/PartTheVeil.java +++ b/Mage.Sets/src/mage/cards/p/PartTheVeil.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; /** @@ -43,7 +44,7 @@ public class PartTheVeil extends CardImpl { public PartTheVeil(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Return all creatures you control to their owner's hand. Effect effect = new ReturnToHandFromBattlefieldAllEffect(new FilterControlledCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/p/PatagiaGolem.java b/Mage.Sets/src/mage/cards/p/PatagiaGolem.java index 2a3e04a9b0..88ecaf52c5 100644 --- a/Mage.Sets/src/mage/cards/p/PatagiaGolem.java +++ b/Mage.Sets/src/mage/cards/p/PatagiaGolem.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class PatagiaGolem extends CardImpl { public PatagiaGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PatagiaViper.java b/Mage.Sets/src/mage/cards/p/PatagiaViper.java index 9ab2a92521..bef41e88c7 100644 --- a/Mage.Sets/src/mage/cards/p/PatagiaViper.java +++ b/Mage.Sets/src/mage/cards/p/PatagiaViper.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.game.permanent.token.PatagiaViperSnakeToken; import mage.watchers.common.ManaSpentToCastWatcher; @@ -49,7 +50,7 @@ public class PatagiaViper extends CardImpl { public PatagiaViper(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PatchworkGnomes.java b/Mage.Sets/src/mage/cards/p/PatchworkGnomes.java index 6ac12a77b2..d49390c66c 100644 --- a/Mage.Sets/src/mage/cards/p/PatchworkGnomes.java +++ b/Mage.Sets/src/mage/cards/p/PatchworkGnomes.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.target.common.TargetCardInHand; @@ -47,7 +48,7 @@ public class PatchworkGnomes extends CardImpl { public PatchworkGnomes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Gnome"); + this.subtype.add(SubType.GNOME); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PathOfAncestry.java b/Mage.Sets/src/mage/cards/p/PathOfAncestry.java index 0bcf821422..8973e87ab8 100644 --- a/Mage.Sets/src/mage/cards/p/PathOfAncestry.java +++ b/Mage.Sets/src/mage/cards/p/PathOfAncestry.java @@ -27,8 +27,7 @@ */ package mage.cards.p; -import java.util.Iterator; -import java.util.UUID; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.EntersBattlefieldTappedAbility; @@ -44,6 +43,10 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.stack.Spell; +import mage.players.Player; + +import java.util.Iterator; +import java.util.UUID; /** * @@ -105,19 +108,24 @@ class PathOfAncestryTriggeredAbility extends TriggeredAbilityImpl { if (event.getData().equals(abilityOriginalId)) { Spell spell = game.getStack().getSpell(event.getTargetId()); if (spell != null && spell.isCreature()) { - Iterator spellSubs = spell.getSubtype(game).iterator(); - while (spellSubs.hasNext()) { - SubType sType = spellSubs.next(); - if (sType.getSubTypeSet() == SubTypeSet.CreatureType) { - for (UUID cmdr : game.getPlayer(spell.getControllerId()).getCommandersIds()) { - if (game.getObject(cmdr).getSubtype(game).contains(sType)) { - return true; + Player controller = game.getPlayer(getControllerId()); + if (controller != null && controller.getCommandersIds() != null && !controller.getCommandersIds().isEmpty()) { + Iterator spellSubs = spell.getSubtype(game).iterator(); + while (spellSubs.hasNext()) { + SubType sType = spellSubs.next(); + if (sType.getSubTypeSet() == SubTypeSet.CreatureType) { + for (UUID cmdr : controller.getCommandersIds()) { + MageObject commander = game.getObject(cmdr); + if (commander != null && commander.hasSubtype(sType, game)) { + return true; + } } } } } } } + return false; } diff --git a/Mage.Sets/src/mage/cards/p/PathOfAngersFlame.java b/Mage.Sets/src/mage/cards/p/PathOfAngersFlame.java index 9c1f060866..c28e976813 100644 --- a/Mage.Sets/src/mage/cards/p/PathOfAngersFlame.java +++ b/Mage.Sets/src/mage/cards/p/PathOfAngersFlame.java @@ -32,6 +32,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; @@ -43,7 +44,7 @@ public class PathOfAngersFlame extends CardImpl { public PathOfAngersFlame(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Creatures you control get +2/+0 until end of turn. this.getSpellAbility().addEffect(new BoostControlledEffect(2, 0, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false)); diff --git a/Mage.Sets/src/mage/cards/p/PathbreakerIbex.java b/Mage.Sets/src/mage/cards/p/PathbreakerIbex.java index 114f469a04..4474aeb864 100644 --- a/Mage.Sets/src/mage/cards/p/PathbreakerIbex.java +++ b/Mage.Sets/src/mage/cards/p/PathbreakerIbex.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.filter.StaticFilters; @@ -53,7 +54,7 @@ public class PathbreakerIbex extends CardImpl { public PathbreakerIbex(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); - this.subtype.add("Goat"); + this.subtype.add(SubType.GOAT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PathbreakerWurm.java b/Mage.Sets/src/mage/cards/p/PathbreakerWurm.java index 8a385150cb..38e8a0d5f0 100644 --- a/Mage.Sets/src/mage/cards/p/PathbreakerWurm.java +++ b/Mage.Sets/src/mage/cards/p/PathbreakerWurm.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class PathbreakerWurm extends CardImpl { public PathbreakerWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PathmakerInitiate.java b/Mage.Sets/src/mage/cards/p/PathmakerInitiate.java index 2e9ea7b7df..d9fbdfd616 100644 --- a/Mage.Sets/src/mage/cards/p/PathmakerInitiate.java +++ b/Mage.Sets/src/mage/cards/p/PathmakerInitiate.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; @@ -58,8 +59,8 @@ public class PathmakerInitiate extends CardImpl { public PathmakerInitiate(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PathrazerOfUlamog.java b/Mage.Sets/src/mage/cards/p/PathrazerOfUlamog.java index 14fa501225..5c3b541a31 100644 --- a/Mage.Sets/src/mage/cards/p/PathrazerOfUlamog.java +++ b/Mage.Sets/src/mage/cards/p/PathrazerOfUlamog.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.AnnihilatorAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class PathrazerOfUlamog extends CardImpl { public PathrazerOfUlamog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{11}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(9); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/p/PathwayArrows.java b/Mage.Sets/src/mage/cards/p/PathwayArrows.java index bd759f7765..126b4e1351 100644 --- a/Mage.Sets/src/mage/cards/p/PathwayArrows.java +++ b/Mage.Sets/src/mage/cards/p/PathwayArrows.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -55,7 +56,7 @@ public class PathwayArrows extends CardImpl { public PathwayArrows(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has "{2}, {T}: This creature deals 1 damage to target creature. If a colorless creature is dealt damage this way, tap it." SimpleActivatedAbility ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PathwayArrowsEffect(), new GenericManaCost(2)); diff --git a/Mage.Sets/src/mage/cards/p/PatriarchsDesire.java b/Mage.Sets/src/mage/cards/p/PatriarchsDesire.java index 3d199875e0..456ed5423b 100644 --- a/Mage.Sets/src/mage/cards/p/PatriarchsDesire.java +++ b/Mage.Sets/src/mage/cards/p/PatriarchsDesire.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class PatriarchsDesire extends CardImpl { public PatriarchsDesire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/p/PatrolHound.java b/Mage.Sets/src/mage/cards/p/PatrolHound.java index 1ed6287052..9eccc002fe 100644 --- a/Mage.Sets/src/mage/cards/p/PatrolHound.java +++ b/Mage.Sets/src/mage/cards/p/PatrolHound.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class PatrolHound extends CardImpl { public PatrolHound(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PatrolSignaler.java b/Mage.Sets/src/mage/cards/p/PatrolSignaler.java index 52c5d2aa99..0f12096a12 100644 --- a/Mage.Sets/src/mage/cards/p/PatrolSignaler.java +++ b/Mage.Sets/src/mage/cards/p/PatrolSignaler.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.KithkinToken; @@ -48,8 +49,8 @@ public class PatrolSignaler extends CardImpl { public PatrolSignaler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PatronOfTheAkki.java b/Mage.Sets/src/mage/cards/p/PatronOfTheAkki.java index b077b9f5bc..47cd1fb699 100644 --- a/Mage.Sets/src/mage/cards/p/PatronOfTheAkki.java +++ b/Mage.Sets/src/mage/cards/p/PatronOfTheAkki.java @@ -48,7 +48,7 @@ public class PatronOfTheAkki extends CardImpl { public PatronOfTheAkki(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/PatronOfTheKitsune.java b/Mage.Sets/src/mage/cards/p/PatronOfTheKitsune.java index 9f70290c1e..1e1fc3c03e 100644 --- a/Mage.Sets/src/mage/cards/p/PatronOfTheKitsune.java +++ b/Mage.Sets/src/mage/cards/p/PatronOfTheKitsune.java @@ -46,7 +46,7 @@ public class PatronOfTheKitsune extends CardImpl { public PatronOfTheKitsune(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/p/PatronOfTheMoon.java b/Mage.Sets/src/mage/cards/p/PatronOfTheMoon.java index 4bab9f4e92..d14d4d7ea2 100644 --- a/Mage.Sets/src/mage/cards/p/PatronOfTheMoon.java +++ b/Mage.Sets/src/mage/cards/p/PatronOfTheMoon.java @@ -53,7 +53,7 @@ public class PatronOfTheMoon extends CardImpl { public PatronOfTheMoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PatronOfTheNezumi.java b/Mage.Sets/src/mage/cards/p/PatronOfTheNezumi.java index df41edc5b2..bad292df09 100644 --- a/Mage.Sets/src/mage/cards/p/PatronOfTheNezumi.java +++ b/Mage.Sets/src/mage/cards/p/PatronOfTheNezumi.java @@ -55,7 +55,7 @@ public class PatronOfTheNezumi extends CardImpl { public PatronOfTheNezumi(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/p/PatronOfTheOrochi.java b/Mage.Sets/src/mage/cards/p/PatronOfTheOrochi.java index 0779806ae6..67662b719f 100644 --- a/Mage.Sets/src/mage/cards/p/PatronOfTheOrochi.java +++ b/Mage.Sets/src/mage/cards/p/PatronOfTheOrochi.java @@ -56,7 +56,7 @@ public class PatronOfTheOrochi extends CardImpl { public PatronOfTheOrochi(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/p/PatronOfTheValiant.java b/Mage.Sets/src/mage/cards/p/PatronOfTheValiant.java index ae91a31980..24687df509 100644 --- a/Mage.Sets/src/mage/cards/p/PatronOfTheValiant.java +++ b/Mage.Sets/src/mage/cards/p/PatronOfTheValiant.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -53,7 +54,7 @@ public class PatronOfTheValiant extends CardImpl { public PatronOfTheValiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PatronOfTheVein.java b/Mage.Sets/src/mage/cards/p/PatronOfTheVein.java index 110c064487..44f8d62f3a 100644 --- a/Mage.Sets/src/mage/cards/p/PatronOfTheVein.java +++ b/Mage.Sets/src/mage/cards/p/PatronOfTheVein.java @@ -75,8 +75,8 @@ public class PatronOfTheVein extends CardImpl { public PatronOfTheVein(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PatronOfTheWild.java b/Mage.Sets/src/mage/cards/p/PatronOfTheWild.java index c2a209b71d..db8afa7648 100644 --- a/Mage.Sets/src/mage/cards/p/PatronOfTheWild.java +++ b/Mage.Sets/src/mage/cards/p/PatronOfTheWild.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class PatronOfTheWild extends CardImpl { public PatronOfTheWild(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PatronWizard.java b/Mage.Sets/src/mage/cards/p/PatronWizard.java index 3ec3262cde..350cd4f414 100644 --- a/Mage.Sets/src/mage/cards/p/PatronWizard.java +++ b/Mage.Sets/src/mage/cards/p/PatronWizard.java @@ -61,8 +61,8 @@ public class PatronWizard extends CardImpl { public PatronWizard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PatternOfRebirth.java b/Mage.Sets/src/mage/cards/p/PatternOfRebirth.java index cf9a2f1ab8..0627c27f12 100644 --- a/Mage.Sets/src/mage/cards/p/PatternOfRebirth.java +++ b/Mage.Sets/src/mage/cards/p/PatternOfRebirth.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.filter.common.FilterCreatureCard; @@ -52,7 +53,7 @@ public class PatternOfRebirth extends CardImpl { public PatternOfRebirth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/p/PavelMaliki.java b/Mage.Sets/src/mage/cards/p/PavelMaliki.java index db3d0bc1fe..bd9ad72fb5 100644 --- a/Mage.Sets/src/mage/cards/p/PavelMaliki.java +++ b/Mage.Sets/src/mage/cards/p/PavelMaliki.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class PavelMaliki extends CardImpl { public PavelMaliki(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PawnOfUlamog.java b/Mage.Sets/src/mage/cards/p/PawnOfUlamog.java index d3e0593e98..7cdff34eef 100644 --- a/Mage.Sets/src/mage/cards/p/PawnOfUlamog.java +++ b/Mage.Sets/src/mage/cards/p/PawnOfUlamog.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -52,8 +53,8 @@ public class PawnOfUlamog extends CardImpl { public PawnOfUlamog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PeaceStrider.java b/Mage.Sets/src/mage/cards/p/PeaceStrider.java index d650248247..3bb1aeda30 100644 --- a/Mage.Sets/src/mage/cards/p/PeaceStrider.java +++ b/Mage.Sets/src/mage/cards/p/PeaceStrider.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class PeaceStrider extends CardImpl { public PeaceStrider (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(3); this.toughness = new MageInt(3); this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3))); diff --git a/Mage.Sets/src/mage/cards/p/Peacekeeper.java b/Mage.Sets/src/mage/cards/p/Peacekeeper.java index 317f8d7caf..81a2b363d9 100644 --- a/Mage.Sets/src/mage/cards/p/Peacekeeper.java +++ b/Mage.Sets/src/mage/cards/p/Peacekeeper.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class Peacekeeper extends CardImpl { public Peacekeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PearlDragon.java b/Mage.Sets/src/mage/cards/p/PearlDragon.java index 8e6bfc6662..dfcff147cc 100644 --- a/Mage.Sets/src/mage/cards/p/PearlDragon.java +++ b/Mage.Sets/src/mage/cards/p/PearlDragon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class PearlDragon extends CardImpl { public PearlDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PearlLakeAncient.java b/Mage.Sets/src/mage/cards/p/PearlLakeAncient.java index addf9406e6..01c23b21d9 100644 --- a/Mage.Sets/src/mage/cards/p/PearlLakeAncient.java +++ b/Mage.Sets/src/mage/cards/p/PearlLakeAncient.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.target.common.TargetControlledPermanent; @@ -50,7 +51,7 @@ public class PearlLakeAncient extends CardImpl { public PearlLakeAncient(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); - this.subtype.add("Leviathan"); + this.subtype.add(SubType.LEVIATHAN); this.power = new MageInt(6); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/p/PearledUnicorn.java b/Mage.Sets/src/mage/cards/p/PearledUnicorn.java index 509286c8f9..9241c736ba 100644 --- a/Mage.Sets/src/mage/cards/p/PearledUnicorn.java +++ b/Mage.Sets/src/mage/cards/p/PearledUnicorn.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class PearledUnicorn extends CardImpl { public PearledUnicorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Unicorn"); + this.subtype.add(SubType.UNICORN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PearlspearCourier.java b/Mage.Sets/src/mage/cards/p/PearlspearCourier.java index 9325fb79e2..f90d9fa7f1 100644 --- a/Mage.Sets/src/mage/cards/p/PearlspearCourier.java +++ b/Mage.Sets/src/mage/cards/p/PearlspearCourier.java @@ -63,8 +63,8 @@ public class PearlspearCourier extends CardImpl { public PearlspearCourier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PeemaAetherSeer.java b/Mage.Sets/src/mage/cards/p/PeemaAetherSeer.java index 14e4df70a4..47e1147799 100644 --- a/Mage.Sets/src/mage/cards/p/PeemaAetherSeer.java +++ b/Mage.Sets/src/mage/cards/p/PeemaAetherSeer.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -53,8 +54,8 @@ public class PeemaAetherSeer extends CardImpl { public PeemaAetherSeer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PeemaOutrider.java b/Mage.Sets/src/mage/cards/p/PeemaOutrider.java index 9302c50b1d..70762c3385 100644 --- a/Mage.Sets/src/mage/cards/p/PeemaOutrider.java +++ b/Mage.Sets/src/mage/cards/p/PeemaOutrider.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class PeemaOutrider extends CardImpl { public PeemaOutrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PegasusCharger.java b/Mage.Sets/src/mage/cards/p/PegasusCharger.java index 3a641fccd1..227a41e054 100644 --- a/Mage.Sets/src/mage/cards/p/PegasusCharger.java +++ b/Mage.Sets/src/mage/cards/p/PegasusCharger.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class PegasusCharger extends CardImpl { public PegasusCharger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Pegasus"); + this.subtype.add(SubType.PEGASUS); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PelakkaWurm.java b/Mage.Sets/src/mage/cards/p/PelakkaWurm.java index 6ccabd9313..3bd5ec915d 100644 --- a/Mage.Sets/src/mage/cards/p/PelakkaWurm.java +++ b/Mage.Sets/src/mage/cards/p/PelakkaWurm.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class PelakkaWurm extends CardImpl { public PelakkaWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/p/PemminsAura.java b/Mage.Sets/src/mage/cards/p/PemminsAura.java index 2cee283040..8f635ac3fa 100644 --- a/Mage.Sets/src/mage/cards/p/PemminsAura.java +++ b/Mage.Sets/src/mage/cards/p/PemminsAura.java @@ -45,6 +45,7 @@ import mage.choices.Choice; import mage.choices.ChoiceImpl; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -62,7 +63,7 @@ public class PemminsAura extends CardImpl { public PemminsAura(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/p/PendelhavenElder.java b/Mage.Sets/src/mage/cards/p/PendelhavenElder.java index d081958746..ea1ff6e889 100644 --- a/Mage.Sets/src/mage/cards/p/PendelhavenElder.java +++ b/Mage.Sets/src/mage/cards/p/PendelhavenElder.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.TargetController; @@ -51,6 +52,7 @@ import mage.filter.predicate.permanent.ControllerPredicate; public class PendelhavenElder extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("each 1/1 creature you control"); + static { filter.add(new PowerPredicate(ComparisonType.EQUAL_TO, 1)); filter.add(new ToughnessPredicate(ComparisonType.EQUAL_TO, 1)); @@ -58,14 +60,17 @@ public class PendelhavenElder extends CardImpl { } public PendelhavenElder(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); // {tap}: Each 1/1 creature you control gets +1/+2 until end of turn. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 2, Duration.EndOfTurn, filter, false), new TapSourceCost())); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 2, Duration.EndOfTurn, filter, false) + .setText("Each 1/1 creature you control gets +1/+2 until end of turn."), + new TapSourceCost() + )); } public PendelhavenElder(final PendelhavenElder card) { diff --git a/Mage.Sets/src/mage/cards/p/PendrellDrake.java b/Mage.Sets/src/mage/cards/p/PendrellDrake.java index ab252a5a3d..1aaf472d77 100644 --- a/Mage.Sets/src/mage/cards/p/PendrellDrake.java +++ b/Mage.Sets/src/mage/cards/p/PendrellDrake.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class PendrellDrake extends CardImpl { public PendrellDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PendrellFlux.java b/Mage.Sets/src/mage/cards/p/PendrellFlux.java index bb300645e8..9e13051e81 100644 --- a/Mage.Sets/src/mage/cards/p/PendrellFlux.java +++ b/Mage.Sets/src/mage/cards/p/PendrellFlux.java @@ -56,7 +56,7 @@ public class PendrellFlux extends CardImpl { public PendrellFlux(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/p/PennonBlade.java b/Mage.Sets/src/mage/cards/p/PennonBlade.java index cf27b23f52..a71c835786 100644 --- a/Mage.Sets/src/mage/cards/p/PennonBlade.java +++ b/Mage.Sets/src/mage/cards/p/PennonBlade.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -48,7 +49,7 @@ public class PennonBlade extends CardImpl { public PennonBlade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(value, value))); diff --git a/Mage.Sets/src/mage/cards/p/PensiveMinotaur.java b/Mage.Sets/src/mage/cards/p/PensiveMinotaur.java index fe7b7caf67..a72574382e 100644 --- a/Mage.Sets/src/mage/cards/p/PensiveMinotaur.java +++ b/Mage.Sets/src/mage/cards/p/PensiveMinotaur.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class PensiveMinotaur extends CardImpl { public PensiveMinotaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PentarchPaladin.java b/Mage.Sets/src/mage/cards/p/PentarchPaladin.java index b85684c925..86a28c5eb4 100644 --- a/Mage.Sets/src/mage/cards/p/PentarchPaladin.java +++ b/Mage.Sets/src/mage/cards/p/PentarchPaladin.java @@ -1,105 +1,88 @@ -/* - * 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.cards.p; - -import java.util.UUID; -import mage.MageInt; -import mage.ObjectColor; -import mage.abilities.Ability; -import mage.abilities.common.AsEntersBattlefieldAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.ChooseColorEffect; -import mage.abilities.keyword.FlankingAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.FilterPermanent; -import mage.filter.predicate.mageobject.ColorPredicate; -import mage.game.Game; -import mage.target.TargetPermanent; -import mage.abilities.effects.common.DestroyTargetEffect; - -/** - * - * @author jeffwadsworth - */ -public class PentarchPaladin extends CardImpl { - - private final UUID originalId; - FilterPermanent filter = new FilterPermanent("permanent of the chosen color."); - - public PentarchPaladin(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}{W}"); - - this.subtype.add("Human"); - this.subtype.add("Knight"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // Flanking - this.addAbility(new FlankingAbility()); - - // As Pentarch Paladin enters the battlefield, choose a color. - this.addAbility(new AsEntersBattlefieldAbility(new ChooseColorEffect(Outcome.Detriment))); - - // {W}{W}, {tap}: Destroy target permanent of the chosen color. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{W}{W}")); - ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetPermanent(filter)); - originalId = ability.getOriginalId(); - this.addAbility(ability); - - } - - @Override - public void adjustTargets(Ability ability, Game game) { - ObjectColor color = (ObjectColor) game.getState().getValue(ability.getSourceId() + "_color"); - if (ability.getOriginalId().equals(originalId) - && color != null) { - ability.getTargets().clear(); - FilterPermanent filter = new FilterPermanent("permanent of the chosen color."); - filter.add(new ColorPredicate(color)); - TargetPermanent target = new TargetPermanent(filter); - ability.addTarget(target); - } - } - - public PentarchPaladin(final PentarchPaladin card) { - super(card); - this.originalId = card.originalId; - } - - @Override - public PentarchPaladin copy() { - return new PentarchPaladin(this); - } -} \ No newline at end of file +/* + * 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.cards.p; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ChooseColorEffect; +import mage.abilities.keyword.FlankingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.target.TargetPermanent; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.constants.TargetAdjustment; + +/** + * + * @author jeffwadsworth + */ +public class PentarchPaladin extends CardImpl { + + FilterPermanent filter = new FilterPermanent("permanent of the chosen color."); + + public PentarchPaladin(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flanking + this.addAbility(new FlankingAbility()); + + // As Pentarch Paladin enters the battlefield, choose a color. + this.addAbility(new AsEntersBattlefieldAbility(new ChooseColorEffect(Outcome.Detriment))); + + // {W}{W}, {tap}: Destroy target permanent of the chosen color. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{W}{W}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetPermanent(filter)); + ability.setTargetAdjustment(TargetAdjustment.CHOSEN_COLOR); + this.addAbility(ability); + } + + public PentarchPaladin(final PentarchPaladin card) { + super(card); + } + + @Override + public PentarchPaladin copy() { + return new PentarchPaladin(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PentarchWard.java b/Mage.Sets/src/mage/cards/p/PentarchWard.java index ea90e3ba9c..4e793c9272 100644 --- a/Mage.Sets/src/mage/cards/p/PentarchWard.java +++ b/Mage.Sets/src/mage/cards/p/PentarchWard.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -52,7 +53,7 @@ public class PentarchWard extends CardImpl { public PentarchWard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/p/Pentavus.java b/Mage.Sets/src/mage/cards/p/Pentavus.java index 26cb3dcd5d..95f8d14114 100644 --- a/Mage.Sets/src/mage/cards/p/Pentavus.java +++ b/Mage.Sets/src/mage/cards/p/Pentavus.java @@ -62,7 +62,7 @@ public class Pentavus extends CardImpl { public Pentavus(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{7}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/p/PenumbraBobcat.java b/Mage.Sets/src/mage/cards/p/PenumbraBobcat.java index efa583fdd5..110b7e6464 100644 --- a/Mage.Sets/src/mage/cards/p/PenumbraBobcat.java +++ b/Mage.Sets/src/mage/cards/p/PenumbraBobcat.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.PenumbraBobcatToken; /** @@ -44,7 +45,7 @@ public class PenumbraBobcat extends CardImpl { public PenumbraBobcat(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PenumbraKavu.java b/Mage.Sets/src/mage/cards/p/PenumbraKavu.java index c9f872aa7b..d12abf8352 100644 --- a/Mage.Sets/src/mage/cards/p/PenumbraKavu.java +++ b/Mage.Sets/src/mage/cards/p/PenumbraKavu.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.PenumbraKavuToken; /** @@ -44,7 +45,7 @@ public class PenumbraKavu extends CardImpl { public PenumbraKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PenumbraSpider.java b/Mage.Sets/src/mage/cards/p/PenumbraSpider.java index c3cb9f8570..a025bb4980 100644 --- a/Mage.Sets/src/mage/cards/p/PenumbraSpider.java +++ b/Mage.Sets/src/mage/cards/p/PenumbraSpider.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.PenumbraSpiderToken; /** @@ -45,7 +46,7 @@ public class PenumbraSpider extends CardImpl { public PenumbraSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PenumbraWurm.java b/Mage.Sets/src/mage/cards/p/PenumbraWurm.java index d1ac7efa51..04e0464ff8 100644 --- a/Mage.Sets/src/mage/cards/p/PenumbraWurm.java +++ b/Mage.Sets/src/mage/cards/p/PenumbraWurm.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.PenumbraWurmToken; /** @@ -45,7 +46,7 @@ public class PenumbraWurm extends CardImpl { public PenumbraWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/p/PeopleOfTheWoods.java b/Mage.Sets/src/mage/cards/p/PeopleOfTheWoods.java index 074520b1b2..af375c7bb9 100644 --- a/Mage.Sets/src/mage/cards/p/PeopleOfTheWoods.java +++ b/Mage.Sets/src/mage/cards/p/PeopleOfTheWoods.java @@ -55,7 +55,7 @@ public class PeopleOfTheWoods extends CardImpl { public PeopleOfTheWoods(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/p/Peppersmoke.java b/Mage.Sets/src/mage/cards/p/Peppersmoke.java index 6af9510448..48d77f2d60 100644 --- a/Mage.Sets/src/mage/cards/p/Peppersmoke.java +++ b/Mage.Sets/src/mage/cards/p/Peppersmoke.java @@ -55,7 +55,7 @@ public class Peppersmoke extends CardImpl { public Peppersmoke(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{B}"); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); // Target creature gets -1/-1 until end of turn. If you control a Faerie, draw a card. diff --git a/Mage.Sets/src/mage/cards/p/PeregrineDrake.java b/Mage.Sets/src/mage/cards/p/PeregrineDrake.java index 1e86841fbe..c3ae00ae8c 100644 --- a/Mage.Sets/src/mage/cards/p/PeregrineDrake.java +++ b/Mage.Sets/src/mage/cards/p/PeregrineDrake.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class PeregrineDrake extends CardImpl { public PeregrineDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PeregrineGriffin.java b/Mage.Sets/src/mage/cards/p/PeregrineGriffin.java index 5bda514a1a..b27f0279f0 100644 --- a/Mage.Sets/src/mage/cards/p/PeregrineGriffin.java +++ b/Mage.Sets/src/mage/cards/p/PeregrineGriffin.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -43,7 +44,7 @@ public class PeregrineGriffin extends CardImpl { public PeregrineGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PeregrineMask.java b/Mage.Sets/src/mage/cards/p/PeregrineMask.java index b0da4f63d6..998430a3f7 100644 --- a/Mage.Sets/src/mage/cards/p/PeregrineMask.java +++ b/Mage.Sets/src/mage/cards/p/PeregrineMask.java @@ -48,7 +48,7 @@ public class PeregrineMask extends CardImpl { public PeregrineMask(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has defender, flying, and first strike. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(DefenderAbility.getInstance(), AttachmentType.EQUIPMENT)); ability.addEffect(new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.EQUIPMENT)); diff --git a/Mage.Sets/src/mage/cards/p/PerfectedForm.java b/Mage.Sets/src/mage/cards/p/PerfectedForm.java index 9836d18d24..48235b7869 100644 --- a/Mage.Sets/src/mage/cards/p/PerfectedForm.java +++ b/Mage.Sets/src/mage/cards/p/PerfectedForm.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,9 +42,9 @@ import mage.constants.CardType; public class PerfectedForm extends CardImpl { public PerfectedForm(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Insect"); - this.subtype.add("Horror"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.HORROR); this.power = new MageInt(5); this.toughness = new MageInt(4); this.color.setBlue(true); diff --git a/Mage.Sets/src/mage/cards/p/PerilousMyr.java b/Mage.Sets/src/mage/cards/p/PerilousMyr.java index dc76c7452d..78f65d5134 100644 --- a/Mage.Sets/src/mage/cards/p/PerilousMyr.java +++ b/Mage.Sets/src/mage/cards/p/PerilousMyr.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; /** @@ -45,7 +46,7 @@ public class PerilousMyr extends CardImpl { public PerilousMyr(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PerilousShadow.java b/Mage.Sets/src/mage/cards/p/PerilousShadow.java index 3e29714716..b59b2a7f49 100644 --- a/Mage.Sets/src/mage/cards/p/PerilousShadow.java +++ b/Mage.Sets/src/mage/cards/p/PerilousShadow.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,8 +47,8 @@ public class PerilousShadow extends CardImpl { public PerilousShadow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Insect"); - this.subtype.add("Shade"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.SHADE); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PerilousVoyage.java b/Mage.Sets/src/mage/cards/p/PerilousVoyage.java new file mode 100644 index 0000000000..a20473e1ad --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PerilousVoyage.java @@ -0,0 +1,105 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterNonlandPermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public class PerilousVoyage extends CardImpl { + + private static final FilterNonlandPermanent filter = new FilterNonlandPermanent("nonland permanent you don't control"); + + static { + filter.add(new ControllerPredicate(TargetController.NOT_YOU)); + } + + public PerilousVoyage(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); + + // Return target nonland permanent you don't control to its owner's hand. If its converted mana cost was 2 or less, scry 2. + this.getSpellAbility().addEffect(new PerilousVoyageEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + } + + public PerilousVoyage(final PerilousVoyage card) { + super(card); + } + + @Override + public PerilousVoyage copy() { + return new PerilousVoyage(this); + } +} + +class PerilousVoyageEffect extends OneShotEffect { + + PerilousVoyageEffect() { + super(Outcome.Benefit); + this.staticText = "Return target nonland permanent you don't control to its owner's hand. If its converted mana cost was 2 or less, scry 2"; + } + + PerilousVoyageEffect(final PerilousVoyageEffect effect) { + super(effect); + } + + @Override + public PerilousVoyageEffect copy() { + return new PerilousVoyageEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + boolean isLittle = permanent.getConvertedManaCost() < 3; + permanent.moveToZone(Zone.HAND, source.getSourceId(), game, true); + if (isLittle && player != null) { + player.scry(2, source, game); + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/p/PerimeterCaptain.java b/Mage.Sets/src/mage/cards/p/PerimeterCaptain.java index 052acdd35a..0872b0216d 100644 --- a/Mage.Sets/src/mage/cards/p/PerimeterCaptain.java +++ b/Mage.Sets/src/mage/cards/p/PerimeterCaptain.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -50,8 +51,8 @@ public class PerimeterCaptain extends CardImpl { public PerimeterCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PerishTheThought.java b/Mage.Sets/src/mage/cards/p/PerishTheThought.java index aad7daa150..6fc5469a4c 100644 --- a/Mage.Sets/src/mage/cards/p/PerishTheThought.java +++ b/Mage.Sets/src/mage/cards/p/PerishTheThought.java @@ -49,8 +49,7 @@ import mage.target.common.TargetOpponent; public class PerishTheThought extends CardImpl { public PerishTheThought(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}"); // Target opponent reveals his or her hand. You choose a card from it. That player shuffles that card into his or her library. this.getSpellAbility().addEffect(new PerishTheThoughtEffect()); @@ -68,9 +67,9 @@ public class PerishTheThought extends CardImpl { } class PerishTheThoughtEffect extends OneShotEffect { - + private static final FilterCard filter = new FilterCard("card in target opponent's hand"); - + public PerishTheThoughtEffect() { super(Outcome.Neutral); this.staticText = "Target opponent reveals his or her hand. You choose a card from it. That player shuffles that card into his or her library"; @@ -99,7 +98,7 @@ class PerishTheThoughtEffect extends OneShotEffect { Card chosenCard = targetOpponent.getHand().get(target.getFirstTarget(), game); if (chosenCard != null) { if (targetOpponent != null) { - chosenCard.moveToZone(Zone.LIBRARY, id, game, false); + chosenCard.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false); targetOpponent.shuffleLibrary(source, game); } } diff --git a/Mage.Sets/src/mage/cards/p/PermeatingMass.java b/Mage.Sets/src/mage/cards/p/PermeatingMass.java index ac630dafa4..b1eb13fdc4 100644 --- a/Mage.Sets/src/mage/cards/p/PermeatingMass.java +++ b/Mage.Sets/src/mage/cards/p/PermeatingMass.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.game.Game; @@ -49,7 +50,7 @@ public class PermeatingMass extends CardImpl { public PermeatingMass(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PerplexingChimera.java b/Mage.Sets/src/mage/cards/p/PerplexingChimera.java index e2f5d126c9..e37a20b768 100644 --- a/Mage.Sets/src/mage/cards/p/PerplexingChimera.java +++ b/Mage.Sets/src/mage/cards/p/PerplexingChimera.java @@ -38,6 +38,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -101,7 +102,7 @@ public class PerplexingChimera extends CardImpl { public PerplexingChimera(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{4}{U}"); - this.subtype.add("Chimera"); + this.subtype.add(SubType.CHIMERA); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PersistentNightmare.java b/Mage.Sets/src/mage/cards/p/PersistentNightmare.java index d08de62287..efaf3951a0 100644 --- a/Mage.Sets/src/mage/cards/p/PersistentNightmare.java +++ b/Mage.Sets/src/mage/cards/p/PersistentNightmare.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SkulkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class PersistentNightmare extends CardImpl { public PersistentNightmare(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Nightmare"); + this.subtype.add(SubType.NIGHTMARE); this.power = new MageInt(1); this.toughness = new MageInt(1); this.color.setBlue(true); diff --git a/Mage.Sets/src/mage/cards/p/PersonalEnergyShield.java b/Mage.Sets/src/mage/cards/p/PersonalEnergyShield.java index 172e63ce8b..e8f666f3ef 100644 --- a/Mage.Sets/src/mage/cards/p/PersonalEnergyShield.java +++ b/Mage.Sets/src/mage/cards/p/PersonalEnergyShield.java @@ -1,105 +1,105 @@ -/* - * 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.cards.p; - -import java.util.UUID; -import mage.abilities.Mode; -import mage.abilities.effects.common.CounterTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.FilterSpell; -import mage.filter.predicate.ObjectPlayer; -import mage.filter.predicate.ObjectPlayerPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.game.stack.StackObject; -import mage.target.Target; -import mage.target.TargetSpell; - -/** - * - * @author Styxo - */ -public class PersonalEnergyShield extends CardImpl { - - private final static FilterSpell filter = new FilterSpell("spell that targets you or a permanent you control"); - - static { - filter.add(new PersonalEnergyFieldPredicate()); - } - - public PersonalEnergyShield(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}"); - - // Counter target spell that targets you or a permanent you control. - this.getSpellAbility().addEffect(new CounterTargetEffect()); - this.getSpellAbility().addTarget(new TargetSpell(filter)); - } - - public PersonalEnergyShield(final PersonalEnergyShield card) { - super(card); - } - - @Override - public PersonalEnergyShield copy() { - return new PersonalEnergyShield(this); - } -} - -class PersonalEnergyFieldPredicate implements ObjectPlayerPredicate> { - - @Override - public boolean apply(ObjectPlayer input, Game game) { - UUID controllerId = input.getPlayerId(); - if (controllerId == null) { - return false; - } - - for (UUID modeId : input.getObject().getStackAbility().getModes().getSelectedModes()) { - Mode mode = input.getObject().getStackAbility().getModes().get(modeId); - for (Target target : mode.getTargets()) { - for (UUID targetId : target.getTargets()) { - if (controllerId.equals(targetId)) { - return true; - } - Permanent permanent = game.getPermanent(targetId); - if (permanent != null && controllerId.equals(permanent.getControllerId())) { - return true; - } - } - } - } - return false; - } - - @Override - public String toString() { - return "spell that targets you or a permanent you control"; - } -} +/* + * 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.cards.p; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterSpell; +import mage.filter.predicate.ObjectPlayer; +import mage.filter.predicate.ObjectPlayerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.stack.StackObject; +import mage.target.Target; +import mage.target.TargetSpell; + +/** + * + * @author Styxo + */ +public class PersonalEnergyShield extends CardImpl { + + private final static FilterSpell filter = new FilterSpell("spell that targets you or a permanent you control"); + + static { + filter.add(new PersonalEnergyFieldPredicate()); + } + + public PersonalEnergyShield(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}"); + + // Counter target spell that targets you or a permanent you control. + this.getSpellAbility().addEffect(new CounterTargetEffect()); + this.getSpellAbility().addTarget(new TargetSpell(filter)); + } + + public PersonalEnergyShield(final PersonalEnergyShield card) { + super(card); + } + + @Override + public PersonalEnergyShield copy() { + return new PersonalEnergyShield(this); + } +} + +class PersonalEnergyFieldPredicate implements ObjectPlayerPredicate> { + + @Override + public boolean apply(ObjectPlayer input, Game game) { + UUID controllerId = input.getPlayerId(); + if (controllerId == null) { + return false; + } + + for (UUID modeId : input.getObject().getStackAbility().getModes().getSelectedModes()) { + Mode mode = input.getObject().getStackAbility().getModes().get(modeId); + for (Target target : mode.getTargets()) { + for (UUID targetId : target.getTargets()) { + if (controllerId.equals(targetId)) { + return true; + } + Permanent permanent = game.getPermanent(targetId); + if (permanent != null && controllerId.equals(permanent.getControllerId())) { + return true; + } + } + } + } + return false; + } + + @Override + public String toString() { + return "spell that targets you or a permanent you control"; + } +} diff --git a/Mage.Sets/src/mage/cards/p/PersonalIncarnation.java b/Mage.Sets/src/mage/cards/p/PersonalIncarnation.java index 1225958e72..63ff9fa5de 100644 --- a/Mage.Sets/src/mage/cards/p/PersonalIncarnation.java +++ b/Mage.Sets/src/mage/cards/p/PersonalIncarnation.java @@ -38,6 +38,7 @@ import mage.abilities.effects.RedirectionEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -56,8 +57,8 @@ public class PersonalIncarnation extends CardImpl { public PersonalIncarnation(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}{W}"); - this.subtype.add("Avatar"); - this.subtype.add("Incarnation"); + this.subtype.add(SubType.AVATAR); + this.subtype.add(SubType.INCARNATION); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/p/Persuasion.java b/Mage.Sets/src/mage/cards/p/Persuasion.java index e34864aeb7..586a4091ac 100644 --- a/Mage.Sets/src/mage/cards/p/Persuasion.java +++ b/Mage.Sets/src/mage/cards/p/Persuasion.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -49,7 +50,7 @@ public class Persuasion extends CardImpl { public Persuasion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/p/Pestermite.java b/Mage.Sets/src/mage/cards/p/Pestermite.java index da81f49fb8..2b1ef5c2d6 100644 --- a/Mage.Sets/src/mage/cards/p/Pestermite.java +++ b/Mage.Sets/src/mage/cards/p/Pestermite.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPermanent; /** @@ -47,8 +48,8 @@ public class Pestermite extends CardImpl { public Pestermite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PestilenceDemon.java b/Mage.Sets/src/mage/cards/p/PestilenceDemon.java index 0477bbaff3..81e132409b 100644 --- a/Mage.Sets/src/mage/cards/p/PestilenceDemon.java +++ b/Mage.Sets/src/mage/cards/p/PestilenceDemon.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class PestilenceDemon extends CardImpl { public PestilenceDemon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(7); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/p/PestilenceRats.java b/Mage.Sets/src/mage/cards/p/PestilenceRats.java index 2c658e8b87..e64880e61a 100644 --- a/Mage.Sets/src/mage/cards/p/PestilenceRats.java +++ b/Mage.Sets/src/mage/cards/p/PestilenceRats.java @@ -56,7 +56,7 @@ public class PestilenceRats extends CardImpl { public PestilenceRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PestilentKathari.java b/Mage.Sets/src/mage/cards/p/PestilentKathari.java index 1e032cf844..333ab5c8dd 100644 --- a/Mage.Sets/src/mage/cards/p/PestilentKathari.java +++ b/Mage.Sets/src/mage/cards/p/PestilentKathari.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class PestilentKathari extends CardImpl { public PestilentKathari(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Bird"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PestilentSouleater.java b/Mage.Sets/src/mage/cards/p/PestilentSouleater.java index f0222d20ee..ee3e7a1fb6 100644 --- a/Mage.Sets/src/mage/cards/p/PestilentSouleater.java +++ b/Mage.Sets/src/mage/cards/p/PestilentSouleater.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class PestilentSouleater extends CardImpl { public PestilentSouleater(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PetalmaneBaku.java b/Mage.Sets/src/mage/cards/p/PetalmaneBaku.java index 36a06286fc..04726d3131 100644 --- a/Mage.Sets/src/mage/cards/p/PetalmaneBaku.java +++ b/Mage.Sets/src/mage/cards/p/PetalmaneBaku.java @@ -41,6 +41,7 @@ import mage.abilities.mana.DynamicManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.StaticFilters; @@ -51,7 +52,7 @@ public class PetalmaneBaku extends CardImpl { public PetalmaneBaku(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/Petradon.java b/Mage.Sets/src/mage/cards/p/Petradon.java index e5e3bee23d..a56825ae87 100644 --- a/Mage.Sets/src/mage/cards/p/Petradon.java +++ b/Mage.Sets/src/mage/cards/p/Petradon.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetLandPermanent; @@ -53,8 +54,8 @@ public class Petradon extends CardImpl { public Petradon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{R}{R}"); - this.subtype.add("Nightmare"); - this.subtype.add("Beast"); + this.subtype.add(SubType.NIGHTMARE); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/p/Petrahydrox.java b/Mage.Sets/src/mage/cards/p/Petrahydrox.java index 8c4c7674aa..65376c4126 100644 --- a/Mage.Sets/src/mage/cards/p/Petrahydrox.java +++ b/Mage.Sets/src/mage/cards/p/Petrahydrox.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class Petrahydrox extends CardImpl { public Petrahydrox(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U/R}"); - this.subtype.add("Weird"); + this.subtype.add(SubType.WEIRD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/Petravark.java b/Mage.Sets/src/mage/cards/p/Petravark.java index 35be270876..515ec80308 100644 --- a/Mage.Sets/src/mage/cards/p/Petravark.java +++ b/Mage.Sets/src/mage/cards/p/Petravark.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnFromExileForSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetLandPermanent; @@ -48,8 +49,8 @@ public class Petravark extends CardImpl { public Petravark(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Nightmare"); - this.subtype.add("Beast"); + this.subtype.add(SubType.NIGHTMARE); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PetrifiedPlating.java b/Mage.Sets/src/mage/cards/p/PetrifiedPlating.java index 080f5920d6..35e4619fe2 100644 --- a/Mage.Sets/src/mage/cards/p/PetrifiedPlating.java +++ b/Mage.Sets/src/mage/cards/p/PetrifiedPlating.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class PetrifiedPlating extends CardImpl { public PetrifiedPlating(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/p/PewterGolem.java b/Mage.Sets/src/mage/cards/p/PewterGolem.java index a92ead7a2e..66e725c50a 100644 --- a/Mage.Sets/src/mage/cards/p/PewterGolem.java +++ b/Mage.Sets/src/mage/cards/p/PewterGolem.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class PewterGolem extends CardImpl { public PewterGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(4); this.toughness = new MageInt(2); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{1}{B}"))); diff --git a/Mage.Sets/src/mage/cards/p/PhageTheUntouchable.java b/Mage.Sets/src/mage/cards/p/PhageTheUntouchable.java index 6acf7d30ba..d932fb0971 100644 --- a/Mage.Sets/src/mage/cards/p/PhageTheUntouchable.java +++ b/Mage.Sets/src/mage/cards/p/PhageTheUntouchable.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.LoseGameTargetPlayerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.watchers.common.CastFromHandWatcher; @@ -53,8 +54,8 @@ public class PhageTheUntouchable extends CardImpl { public PhageTheUntouchable(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Avatar"); - this.subtype.add("Minion"); + this.subtype.add(SubType.AVATAR); + this.subtype.add(SubType.MINION); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PhalanxLeader.java b/Mage.Sets/src/mage/cards/p/PhalanxLeader.java index 147278f289..4a746dff1f 100644 --- a/Mage.Sets/src/mage/cards/p/PhalanxLeader.java +++ b/Mage.Sets/src/mage/cards/p/PhalanxLeader.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterControlledCreaturePermanent; @@ -45,8 +46,8 @@ public class PhalanxLeader extends CardImpl { public PhalanxLeader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/Phantasmagorian.java b/Mage.Sets/src/mage/cards/p/Phantasmagorian.java index e58c48dfc6..0f74b093bb 100644 --- a/Mage.Sets/src/mage/cards/p/Phantasmagorian.java +++ b/Mage.Sets/src/mage/cards/p/Phantasmagorian.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -56,7 +57,7 @@ public class Phantasmagorian extends CardImpl { public Phantasmagorian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/p/PhantasmalAbomination.java b/Mage.Sets/src/mage/cards/p/PhantasmalAbomination.java index 91d367b5ce..d31c848049 100644 --- a/Mage.Sets/src/mage/cards/p/PhantasmalAbomination.java +++ b/Mage.Sets/src/mage/cards/p/PhantasmalAbomination.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class PhantasmalAbomination extends CardImpl { public PhantasmalAbomination(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/PhantasmalBear.java b/Mage.Sets/src/mage/cards/p/PhantasmalBear.java index b2a0fb9550..50c2732e05 100644 --- a/Mage.Sets/src/mage/cards/p/PhantasmalBear.java +++ b/Mage.Sets/src/mage/cards/p/PhantasmalBear.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class PhantasmalBear extends CardImpl { public PhantasmalBear(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Bear"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.BEAR); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PhantasmalDragon.java b/Mage.Sets/src/mage/cards/p/PhantasmalDragon.java index 28878a03f5..9d6e388158 100644 --- a/Mage.Sets/src/mage/cards/p/PhantasmalDragon.java +++ b/Mage.Sets/src/mage/cards/p/PhantasmalDragon.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class PhantasmalDragon extends CardImpl { public PhantasmalDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Dragon"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.DRAGON); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/PhantasmalFiend.java b/Mage.Sets/src/mage/cards/p/PhantasmalFiend.java new file mode 100644 index 0000000000..9accaf657a --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PhantasmalFiend.java @@ -0,0 +1,71 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.SwitchPowerToughnessSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class PhantasmalFiend extends CardImpl { + + public PhantasmalFiend(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.ILLUSION); + this.power = new MageInt(1); + this.toughness = new MageInt(5); + + // {B}: Phantasmal Fiend gets +1/-1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, -1, Duration.EndOfTurn), new ManaCostsImpl("{B}"))); + + // {1}{U}: Switch Phantasmal Fiend's power and toughness until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SwitchPowerToughnessSourceEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}{U}"))); + } + + public PhantasmalFiend(final PhantasmalFiend card) { + super(card); + } + + @Override + public PhantasmalFiend copy() { + return new PhantasmalFiend(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PhantasmalForces.java b/Mage.Sets/src/mage/cards/p/PhantasmalForces.java index 74291c1141..c28059ea49 100644 --- a/Mage.Sets/src/mage/cards/p/PhantasmalForces.java +++ b/Mage.Sets/src/mage/cards/p/PhantasmalForces.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -46,7 +47,7 @@ public class PhantasmalForces extends CardImpl { public PhantasmalForces(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PhantasmalImage.java b/Mage.Sets/src/mage/cards/p/PhantasmalImage.java index d1f3b20b3a..78cf8432bb 100644 --- a/Mage.Sets/src/mage/cards/p/PhantasmalImage.java +++ b/Mage.Sets/src/mage/cards/p/PhantasmalImage.java @@ -80,7 +80,7 @@ public class PhantasmalImage extends CardImpl { public PhantasmalImage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.color.setBlue(true); this.power = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/p/PhantasmalTerrain.java b/Mage.Sets/src/mage/cards/p/PhantasmalTerrain.java index 951bdf9a51..08978c7c13 100644 --- a/Mage.Sets/src/mage/cards/p/PhantasmalTerrain.java +++ b/Mage.Sets/src/mage/cards/p/PhantasmalTerrain.java @@ -43,6 +43,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -60,8 +61,8 @@ import mage.target.common.TargetLandPermanent; public class PhantasmalTerrain extends CardImpl { public PhantasmalTerrain(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}{U}"); - this.subtype.add("Aura"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); @@ -105,7 +106,7 @@ class PhantasmalTerrainContinuousEffect extends ContinuousEffectImpl { @Override public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { Permanent enchantment = game.getPermanent(source.getSourceId()); - String choice = (String) game.getState().getValue(source.getSourceId().toString() + ChooseBasicLandTypeEffect.VALUE_KEY); + SubType choice = SubType.byDescription((String) game.getState().getValue(source.getSourceId().toString() + ChooseBasicLandTypeEffect.VALUE_KEY)); if (enchantment != null && enchantment.getAttachedTo() != null && choice != null) { Permanent land = game.getPermanent(enchantment.getAttachedTo()); if (land != null) { @@ -119,19 +120,19 @@ class PhantasmalTerrainContinuousEffect extends ContinuousEffectImpl { case AbilityAddingRemovingEffects_6: if (sublayer == SubLayer.NA) { land.getAbilities().clear(); - if (choice.equals("Forest")) { + if (choice.equals(SubType.FOREST)) { land.addAbility(new GreenManaAbility(), source.getSourceId(), game); } - if (choice.equals("Plains")) { + if (choice.equals(SubType.PLAINS)) { land.addAbility(new WhiteManaAbility(), source.getSourceId(), game); } - if (choice.equals("Mountain")) { + if (choice.equals(SubType.MOUNTAIN)) { land.addAbility(new RedManaAbility(), source.getSourceId(), game); } - if (choice.equals("Island")) { + if (choice.equals(SubType.ISLAND)) { land.addAbility(new BlueManaAbility(), source.getSourceId(), game); } - if (choice.equals("Swamp")) { + if (choice.equals(SubType.SWAMP)) { land.addAbility(new BlackManaAbility(), source.getSourceId(), game); } } diff --git a/Mage.Sets/src/mage/cards/p/Phantatog.java b/Mage.Sets/src/mage/cards/p/Phantatog.java index 97c864887d..c9bc0e50d1 100644 --- a/Mage.Sets/src/mage/cards/p/Phantatog.java +++ b/Mage.Sets/src/mage/cards/p/Phantatog.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledEnchantmentPermanent; @@ -49,7 +50,7 @@ public class Phantatog extends CardImpl { public Phantatog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{U}"); - this.subtype.add("Atog"); + this.subtype.add(SubType.ATOG); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PhantomBeast.java b/Mage.Sets/src/mage/cards/p/PhantomBeast.java index 2eab1395c4..f286768a1a 100644 --- a/Mage.Sets/src/mage/cards/p/PhantomBeast.java +++ b/Mage.Sets/src/mage/cards/p/PhantomBeast.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class PhantomBeast extends CardImpl { public PhantomBeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Illusion"); - this.subtype.add("Beast"); + this.subtype.add(SubType.ILLUSION); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/PhantomCentaur.java b/Mage.Sets/src/mage/cards/p/PhantomCentaur.java index 208bcff512..f2acd19fda 100644 --- a/Mage.Sets/src/mage/cards/p/PhantomCentaur.java +++ b/Mage.Sets/src/mage/cards/p/PhantomCentaur.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -48,8 +49,8 @@ public class PhantomCentaur extends CardImpl { public PhantomCentaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/p/PhantomFlock.java b/Mage.Sets/src/mage/cards/p/PhantomFlock.java index 40d5b0c221..34956cf5c5 100644 --- a/Mage.Sets/src/mage/cards/p/PhantomFlock.java +++ b/Mage.Sets/src/mage/cards/p/PhantomFlock.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -47,9 +48,9 @@ public class PhantomFlock extends CardImpl { public PhantomFlock(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/p/PhantomGeneral.java b/Mage.Sets/src/mage/cards/p/PhantomGeneral.java index 9d7c5f50e8..3f3c130a14 100644 --- a/Mage.Sets/src/mage/cards/p/PhantomGeneral.java +++ b/Mage.Sets/src/mage/cards/p/PhantomGeneral.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class PhantomGeneral extends CardImpl { public PhantomGeneral(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Spirit"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PhantomMonster.java b/Mage.Sets/src/mage/cards/p/PhantomMonster.java index 013de960ca..b54fa7d472 100644 --- a/Mage.Sets/src/mage/cards/p/PhantomMonster.java +++ b/Mage.Sets/src/mage/cards/p/PhantomMonster.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class PhantomMonster extends CardImpl { public PhantomMonster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PhantomNantuko.java b/Mage.Sets/src/mage/cards/p/PhantomNantuko.java index 49cc4c468c..bb31bb88cc 100644 --- a/Mage.Sets/src/mage/cards/p/PhantomNantuko.java +++ b/Mage.Sets/src/mage/cards/p/PhantomNantuko.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -50,8 +51,8 @@ public class PhantomNantuko extends CardImpl { public PhantomNantuko(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Insect"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/p/PhantomNishoba.java b/Mage.Sets/src/mage/cards/p/PhantomNishoba.java index e468abc3d9..755d43286b 100644 --- a/Mage.Sets/src/mage/cards/p/PhantomNishoba.java +++ b/Mage.Sets/src/mage/cards/p/PhantomNishoba.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -48,9 +49,9 @@ public class PhantomNishoba extends CardImpl { public PhantomNishoba(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Beast"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.BEAST); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/p/PhantomNomad.java b/Mage.Sets/src/mage/cards/p/PhantomNomad.java index a5473c86d0..863afd33c0 100644 --- a/Mage.Sets/src/mage/cards/p/PhantomNomad.java +++ b/Mage.Sets/src/mage/cards/p/PhantomNomad.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -47,8 +48,8 @@ public class PhantomNomad extends CardImpl { public PhantomNomad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Spirit"); - this.subtype.add("Nomad"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.NOMAD); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/p/PhantomTiger.java b/Mage.Sets/src/mage/cards/p/PhantomTiger.java index 9cd51c02a3..ae28d07554 100644 --- a/Mage.Sets/src/mage/cards/p/PhantomTiger.java +++ b/Mage.Sets/src/mage/cards/p/PhantomTiger.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -46,8 +47,8 @@ public class PhantomTiger extends CardImpl { public PhantomTiger(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Cat"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/p/PhantomWarrior.java b/Mage.Sets/src/mage/cards/p/PhantomWarrior.java index dc5599a5dc..b58b420029 100644 --- a/Mage.Sets/src/mage/cards/p/PhantomWarrior.java +++ b/Mage.Sets/src/mage/cards/p/PhantomWarrior.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class PhantomWarrior extends CardImpl { public PhantomWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Illusion"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ILLUSION); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PhantomWings.java b/Mage.Sets/src/mage/cards/p/PhantomWings.java index 9a29948667..6b9e1609f4 100644 --- a/Mage.Sets/src/mage/cards/p/PhantomWings.java +++ b/Mage.Sets/src/mage/cards/p/PhantomWings.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class PhantomWings extends CardImpl { public PhantomWings(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/p/PhantomWurm.java b/Mage.Sets/src/mage/cards/p/PhantomWurm.java index ac75525187..d38299de70 100644 --- a/Mage.Sets/src/mage/cards/p/PhantomWurm.java +++ b/Mage.Sets/src/mage/cards/p/PhantomWurm.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -47,8 +48,8 @@ public class PhantomWurm extends CardImpl { public PhantomWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Wurm"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.WURM); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/p/PharagaxGiant.java b/Mage.Sets/src/mage/cards/p/PharagaxGiant.java index 8ea864b4b0..093ac21ebc 100644 --- a/Mage.Sets/src/mage/cards/p/PharagaxGiant.java +++ b/Mage.Sets/src/mage/cards/p/PharagaxGiant.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TributeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -48,7 +49,7 @@ public class PharagaxGiant extends CardImpl { public PharagaxGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PharikaGodOfAffliction.java b/Mage.Sets/src/mage/cards/p/PharikaGodOfAffliction.java index 3a62889442..1314189669 100644 --- a/Mage.Sets/src/mage/cards/p/PharikaGodOfAffliction.java +++ b/Mage.Sets/src/mage/cards/p/PharikaGodOfAffliction.java @@ -58,7 +58,7 @@ public class PharikaGodOfAffliction extends CardImpl { public PharikaGodOfAffliction(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{1}{B}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(5); this.toughness = new MageInt(5); @@ -91,7 +91,7 @@ class PharikaExileEffect extends OneShotEffect { public PharikaExileEffect() { super(Outcome.PutCreatureInPlay); - staticText = "Exile target creature card from a graveyard. It's owner creates a 1/1 black and green Snake enchantment creature token with deathtouch"; + staticText = "Exile target creature card from a graveyard. Its owner creates a 1/1 black and green Snake enchantment creature token with deathtouch"; } public PharikaExileEffect(final PharikaExileEffect effect) { diff --git a/Mage.Sets/src/mage/cards/p/PharikasChosen.java b/Mage.Sets/src/mage/cards/p/PharikasChosen.java index e13405c13d..9b0f009094 100644 --- a/Mage.Sets/src/mage/cards/p/PharikasChosen.java +++ b/Mage.Sets/src/mage/cards/p/PharikasChosen.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class PharikasChosen extends CardImpl { public PharikasChosen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PharikasDisciple.java b/Mage.Sets/src/mage/cards/p/PharikasDisciple.java index 613a62f29b..94f8fc65ed 100644 --- a/Mage.Sets/src/mage/cards/p/PharikasDisciple.java +++ b/Mage.Sets/src/mage/cards/p/PharikasDisciple.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.RenownAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class PharikasDisciple extends CardImpl { public PharikasDisciple(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PharikasMender.java b/Mage.Sets/src/mage/cards/p/PharikasMender.java index ce10346ad4..b16989d41f 100644 --- a/Mage.Sets/src/mage/cards/p/PharikasMender.java +++ b/Mage.Sets/src/mage/cards/p/PharikasMender.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -56,7 +57,7 @@ public class PharikasMender extends CardImpl { public PharikasMender(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{G}"); - this.subtype.add("Gorgon"); + this.subtype.add(SubType.GORGON); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/Phelddagrif.java b/Mage.Sets/src/mage/cards/p/Phelddagrif.java index 8f00637275..cfeec77f40 100644 --- a/Mage.Sets/src/mage/cards/p/Phelddagrif.java +++ b/Mage.Sets/src/mage/cards/p/Phelddagrif.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class Phelddagrif extends CardImpl { public Phelddagrif(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Phelddagrif"); + this.subtype.add(SubType.PHELDDAGRIF); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PhenaxGodOfDeception.java b/Mage.Sets/src/mage/cards/p/PhenaxGodOfDeception.java index 49a4c7c492..ad4ca2a176 100644 --- a/Mage.Sets/src/mage/cards/p/PhenaxGodOfDeception.java +++ b/Mage.Sets/src/mage/cards/p/PhenaxGodOfDeception.java @@ -55,7 +55,7 @@ public class PhenaxGodOfDeception extends CardImpl { public PhenaxGodOfDeception(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(4); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/p/PheresBandCentaurs.java b/Mage.Sets/src/mage/cards/p/PheresBandCentaurs.java index 6a3530191d..a53bdbc08e 100644 --- a/Mage.Sets/src/mage/cards/p/PheresBandCentaurs.java +++ b/Mage.Sets/src/mage/cards/p/PheresBandCentaurs.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class PheresBandCentaurs extends CardImpl { public PheresBandCentaurs(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/p/PheresBandRaiders.java b/Mage.Sets/src/mage/cards/p/PheresBandRaiders.java index fd6d8f34c5..e8c3759b54 100644 --- a/Mage.Sets/src/mage/cards/p/PheresBandRaiders.java +++ b/Mage.Sets/src/mage/cards/p/PheresBandRaiders.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.InspiredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.CentaurEnchantmentCreatureToken; /** @@ -46,8 +47,8 @@ public class PheresBandRaiders extends CardImpl { public PheresBandRaiders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/PheresBandThunderhoof.java b/Mage.Sets/src/mage/cards/p/PheresBandThunderhoof.java index 23fde193ed..7b819cd8fc 100644 --- a/Mage.Sets/src/mage/cards/p/PheresBandThunderhoof.java +++ b/Mage.Sets/src/mage/cards/p/PheresBandThunderhoof.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -44,8 +45,8 @@ public class PheresBandThunderhoof extends CardImpl { public PheresBandThunderhoof(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PheresBandTromper.java b/Mage.Sets/src/mage/cards/p/PheresBandTromper.java index ba94bf90cf..5126a381bc 100644 --- a/Mage.Sets/src/mage/cards/p/PheresBandTromper.java +++ b/Mage.Sets/src/mage/cards/p/PheresBandTromper.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.InspiredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -44,8 +45,8 @@ public class PheresBandTromper extends CardImpl { public PheresBandTromper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PheresBandWarchief.java b/Mage.Sets/src/mage/cards/p/PheresBandWarchief.java index 25c235bc1f..13c4209efb 100644 --- a/Mage.Sets/src/mage/cards/p/PheresBandWarchief.java +++ b/Mage.Sets/src/mage/cards/p/PheresBandWarchief.java @@ -58,8 +58,8 @@ public class PheresBandWarchief extends CardImpl { public PheresBandWarchief(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PhobianPhantasm.java b/Mage.Sets/src/mage/cards/p/PhobianPhantasm.java index c4fd43667a..8cc584c737 100644 --- a/Mage.Sets/src/mage/cards/p/PhobianPhantasm.java +++ b/Mage.Sets/src/mage/cards/p/PhobianPhantasm.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class PhobianPhantasm extends CardImpl { public PhobianPhantasm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PhylacteryLich.java b/Mage.Sets/src/mage/cards/p/PhylacteryLich.java index b866d61853..76dc257746 100644 --- a/Mage.Sets/src/mage/cards/p/PhylacteryLich.java +++ b/Mage.Sets/src/mage/cards/p/PhylacteryLich.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.Counter; @@ -57,7 +58,7 @@ public class PhylacteryLich extends CardImpl { public PhylacteryLich(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/Phyresis.java b/Mage.Sets/src/mage/cards/p/Phyresis.java index f0bdf49995..25e1b179ac 100644 --- a/Mage.Sets/src/mage/cards/p/Phyresis.java +++ b/Mage.Sets/src/mage/cards/p/Phyresis.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -52,7 +53,7 @@ public class Phyresis extends CardImpl { public Phyresis (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianBattleflies.java b/Mage.Sets/src/mage/cards/p/PhyrexianBattleflies.java index f868615ae3..bc958e550d 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianBattleflies.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianBattleflies.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class PhyrexianBattleflies extends CardImpl { public PhyrexianBattleflies(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianBloodstock.java b/Mage.Sets/src/mage/cards/p/PhyrexianBloodstock.java index bcfcccc158..02bb0646d8 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianBloodstock.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianBloodstock.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.target.common.TargetCreaturePermanent; @@ -54,7 +55,7 @@ public class PhyrexianBloodstock extends CardImpl { public PhyrexianBloodstock(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianBoon.java b/Mage.Sets/src/mage/cards/p/PhyrexianBoon.java new file mode 100644 index 0000000000..d5348966ac --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PhyrexianBoon.java @@ -0,0 +1,86 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.ObjectColor; +import mage.constants.SubType; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.EnchantedCreatureColorCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class PhyrexianBoon extends CardImpl { + + public PhyrexianBoon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +2/+1 as long as it's black. Otherwise, it gets -1/-2. + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ConditionalContinuousEffect( + new BoostEnchantedEffect(2, 1), + new BoostEnchantedEffect(-1, -2), + new EnchantedCreatureColorCondition(ObjectColor.BLACK), + "Enchanted creature gets +2/+1 as long as it's black. Otherwise, it gets -1/-2." + ) + )); + } + + public PhyrexianBoon(final PhyrexianBoon card) { + super(card); + } + + @Override + public PhyrexianBoon copy() { + return new PhyrexianBoon(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianBroodlings.java b/Mage.Sets/src/mage/cards/p/PhyrexianBroodlings.java index ed63a88c2f..50b78edeb9 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianBroodlings.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianBroodlings.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetControlledCreaturePermanent; @@ -49,7 +50,7 @@ public class PhyrexianBroodlings extends CardImpl { public PhyrexianBroodlings(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Minion"); + this.subtype.add(SubType.MINION); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianColossus.java b/Mage.Sets/src/mage/cards/p/PhyrexianColossus.java index e50648b818..5302f837af 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianColossus.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianColossus.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByOneEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,7 +49,7 @@ public class PhyrexianColossus extends CardImpl { public PhyrexianColossus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianCrusader.java b/Mage.Sets/src/mage/cards/p/PhyrexianCrusader.java index 2cf8a6cfcf..841d677efe 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianCrusader.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianCrusader.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class PhyrexianCrusader extends CardImpl { public PhyrexianCrusader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianDebaser.java b/Mage.Sets/src/mage/cards/p/PhyrexianDebaser.java index aa859f8b2d..0ce5bbdc43 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianDebaser.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianDebaser.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,7 +51,7 @@ public class PhyrexianDebaser extends CardImpl { public PhyrexianDebaser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Carrier"); + this.subtype.add(SubType.CARRIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianDefiler.java b/Mage.Sets/src/mage/cards/p/PhyrexianDefiler.java index e4a4897cd4..33d804fcbe 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianDefiler.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianDefiler.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class PhyrexianDefiler extends CardImpl { public PhyrexianDefiler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Carrier"); + this.subtype.add(SubType.CARRIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianDelver.java b/Mage.Sets/src/mage/cards/p/PhyrexianDelver.java index d2ab2d80c4..28738beb3e 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianDelver.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianDelver.java @@ -36,6 +36,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -52,7 +53,7 @@ public class PhyrexianDelver extends CardImpl { public PhyrexianDelver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianDenouncer.java b/Mage.Sets/src/mage/cards/p/PhyrexianDenouncer.java index ef99342ee9..bb77983685 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianDenouncer.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianDenouncer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class PhyrexianDenouncer extends CardImpl { public PhyrexianDenouncer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Carrier"); + this.subtype.add(SubType.CARRIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianDevourer.java b/Mage.Sets/src/mage/cards/p/PhyrexianDevourer.java index a8bd254a41..4eff6c47d8 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianDevourer.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianDevourer.java @@ -41,6 +41,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -57,7 +58,7 @@ public class PhyrexianDevourer extends CardImpl { public PhyrexianDevourer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianDigester.java b/Mage.Sets/src/mage/cards/p/PhyrexianDigester.java index 4f166f76c2..9712b550d0 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianDigester.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianDigester.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class PhyrexianDigester extends CardImpl { public PhyrexianDigester (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(1); this.addAbility(InfectAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianDreadnought.java b/Mage.Sets/src/mage/cards/p/PhyrexianDreadnought.java index 97eec97952..9a809a4632 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianDreadnought.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianDreadnought.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.StaticFilters; import mage.filter.common.FilterControlledCreaturePermanent; @@ -54,7 +55,7 @@ public class PhyrexianDreadnought extends CardImpl { public PhyrexianDreadnought(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}"); - this.subtype.add("Dreadnought"); + this.subtype.add(SubType.DREADNOUGHT); this.power = new MageInt(12); this.toughness = new MageInt(12); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianDriver.java b/Mage.Sets/src/mage/cards/p/PhyrexianDriver.java index 0d86e2eaa7..275a13b86f 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianDriver.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianDriver.java @@ -52,8 +52,8 @@ public class PhyrexianDriver extends CardImpl { public PhyrexianDriver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianEtchings.java b/Mage.Sets/src/mage/cards/p/PhyrexianEtchings.java new file mode 100644 index 0000000000..7c1aa54950 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PhyrexianEtchings.java @@ -0,0 +1,73 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility; +import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.MultipliedValue; +import mage.abilities.dynamicvalue.common.CountersSourceCount; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; + +/** + * + * @author L_J + */ +public class PhyrexianEtchings extends CardImpl { + + public PhyrexianEtchings(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}{B}{B}"); + + // Cumulative upkeep-Pay {B}. + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{B}"))); + + // At the beginning of your end step, draw a card for each age counter on Phyrexian Etchings. + this.addAbility(new BeginningOfYourEndStepTriggeredAbility(new DrawCardSourceControllerEffect(new CountersSourceCount(CounterType.AGE)), false)); + + // When Phyrexian Etchings is put into a graveyard from the battlefield, you lose 2 life for each age counter on it. + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new LoseLifeSourceControllerEffect(new MultipliedValue(new CountersSourceCount(CounterType.AGE), 2)) + .setText("you lose 2 life for each age counter on it") + )); + } + + public PhyrexianEtchings(final PhyrexianEtchings card) { + super(card); + } + + @Override + public PhyrexianEtchings copy() { + return new PhyrexianEtchings(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianGargantua.java b/Mage.Sets/src/mage/cards/p/PhyrexianGargantua.java index 4af0d22745..62dc597b25 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianGargantua.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianGargantua.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class PhyrexianGargantua extends CardImpl { public PhyrexianGargantua(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianGhoul.java b/Mage.Sets/src/mage/cards/p/PhyrexianGhoul.java index f038d32332..8203c93a69 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianGhoul.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianGhoul.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -47,7 +48,7 @@ public class PhyrexianGhoul extends CardImpl { public PhyrexianGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianGremlins.java b/Mage.Sets/src/mage/cards/p/PhyrexianGremlins.java index fbf960e654..47a3a01c0b 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianGremlins.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianGremlins.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetArtifactPermanent; @@ -49,7 +50,7 @@ public class PhyrexianGremlins extends CardImpl { public PhyrexianGremlins(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Gremlin"); + this.subtype.add(SubType.GREMLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianHulk.java b/Mage.Sets/src/mage/cards/p/PhyrexianHulk.java index 6e4a73e419..ced45b68ee 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianHulk.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianHulk.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class PhyrexianHulk extends CardImpl { public PhyrexianHulk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianHydra.java b/Mage.Sets/src/mage/cards/p/PhyrexianHydra.java index cb72cd0c69..449a7716ee 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianHydra.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianHydra.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -52,7 +53,7 @@ public class PhyrexianHydra extends CardImpl { public PhyrexianHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianInfiltrator.java b/Mage.Sets/src/mage/cards/p/PhyrexianInfiltrator.java index ec6d72eb17..5e23a3e2fd 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianInfiltrator.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianInfiltrator.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.ExchangeControlTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class PhyrexianInfiltrator extends CardImpl { public PhyrexianInfiltrator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Minion"); + this.subtype.add(SubType.MINION); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianIngester.java b/Mage.Sets/src/mage/cards/p/PhyrexianIngester.java index a51ae8cca2..b3b12c1c5e 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianIngester.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianIngester.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -66,7 +67,7 @@ public class PhyrexianIngester extends CardImpl { public PhyrexianIngester(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianIronfoot.java b/Mage.Sets/src/mage/cards/p/PhyrexianIronfoot.java index 0369d92495..0f13021742 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianIronfoot.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianIronfoot.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class PhyrexianIronfoot extends CardImpl { public PhyrexianIronfoot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); this.addSuperType(SuperType.SNOW); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianJuggernaut.java b/Mage.Sets/src/mage/cards/p/PhyrexianJuggernaut.java index e33700923e..33ca45b666 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianJuggernaut.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianJuggernaut.java @@ -30,11 +30,12 @@ package mage.cards.p; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,11 +45,11 @@ public class PhyrexianJuggernaut extends CardImpl { public PhyrexianJuggernaut (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Juggernaut"); + this.subtype.add(SubType.JUGGERNAUT); this.power = new MageInt(5); this.toughness = new MageInt(5); this.addAbility(InfectAbility.getInstance()); - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public PhyrexianJuggernaut (final PhyrexianJuggernaut card) { diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianMarauder.java b/Mage.Sets/src/mage/cards/p/PhyrexianMarauder.java index 68bf40ed5b..cf70ee6412 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianMarauder.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianMarauder.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.combat.CantAttackBlockUnlessPaysSourceEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -54,7 +55,7 @@ public class PhyrexianMarauder extends CardImpl { public PhyrexianMarauder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{X}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianMetamorph.java b/Mage.Sets/src/mage/cards/p/PhyrexianMetamorph.java index 26c3605d00..58aff91817 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianMetamorph.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianMetamorph.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CopyPermanentEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; @@ -62,7 +63,7 @@ public class PhyrexianMetamorph extends CardImpl { public PhyrexianMetamorph(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{U/P}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianMonitor.java b/Mage.Sets/src/mage/cards/p/PhyrexianMonitor.java index 8a3912f759..3fb7d8ecce 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianMonitor.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianMonitor.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class PhyrexianMonitor extends CardImpl { public PhyrexianMonitor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianNegator.java b/Mage.Sets/src/mage/cards/p/PhyrexianNegator.java index 5cd268618e..b673200c02 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianNegator.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianNegator.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.game.Game; @@ -51,7 +52,7 @@ public class PhyrexianNegator extends CardImpl { public PhyrexianNegator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianObliterator.java b/Mage.Sets/src/mage/cards/p/PhyrexianObliterator.java index 1d92ff4b66..eeee35a9d0 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianObliterator.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianObliterator.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.game.Game; @@ -52,7 +53,7 @@ public class PhyrexianObliterator extends CardImpl { public PhyrexianObliterator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianPlaguelord.java b/Mage.Sets/src/mage/cards/p/PhyrexianPlaguelord.java index 7144e203f6..0a02685170 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianPlaguelord.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianPlaguelord.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -51,7 +52,7 @@ public class PhyrexianPlaguelord extends CardImpl { public PhyrexianPlaguelord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Carrier"); + this.subtype.add(SubType.CARRIER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianProwler.java b/Mage.Sets/src/mage/cards/p/PhyrexianProwler.java index f0a0b11f7d..742414cab8 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianProwler.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianProwler.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FadingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -48,8 +49,8 @@ public class PhyrexianProwler extends CardImpl { public PhyrexianProwler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianRager.java b/Mage.Sets/src/mage/cards/p/PhyrexianRager.java index 418843f20a..7d5f7fe750 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianRager.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianRager.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class PhyrexianRager extends CardImpl { public PhyrexianRager (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianReaper.java b/Mage.Sets/src/mage/cards/p/PhyrexianReaper.java index e1293a3f1d..3042edd2f3 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianReaper.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianReaper.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -52,7 +53,7 @@ public class PhyrexianReaper extends CardImpl { public PhyrexianReaper(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianRevoker.java b/Mage.Sets/src/mage/cards/p/PhyrexianRevoker.java index 135de12122..28d20f8bcd 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianRevoker.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianRevoker.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.NameACardEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class PhyrexianRevoker extends CardImpl { public PhyrexianRevoker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianScuta.java b/Mage.Sets/src/mage/cards/p/PhyrexianScuta.java index 2c6f37fd98..bd95e5b0d1 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianScuta.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianScuta.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -48,7 +49,7 @@ public class PhyrexianScuta extends CardImpl { public PhyrexianScuta(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianSlayer.java b/Mage.Sets/src/mage/cards/p/PhyrexianSlayer.java index 9177230c6c..d83c9e7a4e 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianSlayer.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianSlayer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -53,7 +54,7 @@ public class PhyrexianSlayer extends CardImpl { public PhyrexianSlayer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Minion"); + this.subtype.add(SubType.MINION); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianSnowcrusher.java b/Mage.Sets/src/mage/cards/p/PhyrexianSnowcrusher.java index 321d88df2b..c3d6aaffb2 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianSnowcrusher.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianSnowcrusher.java @@ -29,13 +29,14 @@ package mage.cards.p; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -49,12 +50,12 @@ public class PhyrexianSnowcrusher extends CardImpl { public PhyrexianSnowcrusher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); addSuperType(SuperType.SNOW); - this.subtype.add("Juggernaut"); + this.subtype.add(SubType.JUGGERNAUT); this.power = new MageInt(6); this.toughness = new MageInt(5); // Phyrexian Snowcrusher attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); // {1}{S}: Phyrexian Snowcrusher gets +1/+0 until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{1}{S}"))); } diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianSoulgorger.java b/Mage.Sets/src/mage/cards/p/PhyrexianSoulgorger.java index c4b5658c86..f9949e4777 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianSoulgorger.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianSoulgorger.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.CumulativeUpkeepAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent; @@ -47,7 +48,7 @@ public class PhyrexianSoulgorger extends CardImpl { public PhyrexianSoulgorger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); addSuperType(SuperType.SNOW); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianSwarmlord.java b/Mage.Sets/src/mage/cards/p/PhyrexianSwarmlord.java index 810ea2635e..0bcf51fe43 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianSwarmlord.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianSwarmlord.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.events.GameEvent.EventType; import mage.game.permanent.token.InsectInfectToken; @@ -47,8 +48,8 @@ public class PhyrexianSwarmlord extends CardImpl { public PhyrexianSwarmlord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Insect"); - this.subtype.add("Horror"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianTotem.java b/Mage.Sets/src/mage/cards/p/PhyrexianTotem.java index 0eb4476cfb..d34591cee9 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianTotem.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianTotem.java @@ -40,6 +40,7 @@ import mage.abilities.mana.BlackManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -82,7 +83,7 @@ public class PhyrexianTotem extends CardImpl { cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); color.setBlack(true); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); power = new MageInt(5); toughness = new MageInt(5); this.addAbility(TrampleAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianTyranny.java b/Mage.Sets/src/mage/cards/p/PhyrexianTyranny.java index 92d11254b4..4816a99a9e 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianTyranny.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianTyranny.java @@ -100,7 +100,7 @@ class PhyrexianTyrannyTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever a player draws a card, that player loses 2 life unless he or she pays {2}"; + return "Whenever a player draws a card, that player loses 2 life unless he or she pays {2}."; } } diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianVatmother.java b/Mage.Sets/src/mage/cards/p/PhyrexianVatmother.java index 66ea53301b..9e19e525de 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianVatmother.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianVatmother.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.game.Game; @@ -51,7 +52,7 @@ public class PhyrexianVatmother extends CardImpl { public PhyrexianVatmother (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianWalker.java b/Mage.Sets/src/mage/cards/p/PhyrexianWalker.java index 891bb823dc..4b39cbb3e1 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianWalker.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianWalker.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class PhyrexianWalker extends CardImpl { public PhyrexianWalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{0}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(0); this.toughness = new MageInt(3); } diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianWarBeast.java b/Mage.Sets/src/mage/cards/p/PhyrexianWarBeast.java index 17adbd1ca9..074a596fe1 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianWarBeast.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianWarBeast.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.SacrificeControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledLandPermanent; import mage.target.common.TargetControlledPermanent; @@ -48,7 +49,7 @@ public class PhyrexianWarBeast extends CardImpl { public PhyrexianWarBeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/Phytohydra.java b/Mage.Sets/src/mage/cards/p/Phytohydra.java index 0b908056ec..3e0f7a45e3 100644 --- a/Mage.Sets/src/mage/cards/p/Phytohydra.java +++ b/Mage.Sets/src/mage/cards/p/Phytohydra.java @@ -50,8 +50,8 @@ public class Phytohydra extends CardImpl { public Phytohydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{W}{W}"); - this.subtype.add("Plant"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/Phytotitan.java b/Mage.Sets/src/mage/cards/p/Phytotitan.java index f3aaa2bc76..b8e680b2df 100644 --- a/Mage.Sets/src/mage/cards/p/Phytotitan.java +++ b/Mage.Sets/src/mage/cards/p/Phytotitan.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; @@ -50,8 +51,8 @@ public class Phytotitan extends CardImpl { public Phytotitan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(7); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PiaAndKiranNalaar.java b/Mage.Sets/src/mage/cards/p/PiaAndKiranNalaar.java index f4469a2651..e56ee47493 100644 --- a/Mage.Sets/src/mage/cards/p/PiaAndKiranNalaar.java +++ b/Mage.Sets/src/mage/cards/p/PiaAndKiranNalaar.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; @@ -56,8 +57,8 @@ public class PiaAndKiranNalaar extends CardImpl { public PiaAndKiranNalaar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PiaNalaar.java b/Mage.Sets/src/mage/cards/p/PiaNalaar.java index 1e22ac3198..ce681598bd 100644 --- a/Mage.Sets/src/mage/cards/p/PiaNalaar.java +++ b/Mage.Sets/src/mage/cards/p/PiaNalaar.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -59,8 +60,8 @@ public class PiaNalaar extends CardImpl { public PiaNalaar(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PiannaNomadCaptain.java b/Mage.Sets/src/mage/cards/p/PiannaNomadCaptain.java index f8a6e6ad9f..eb775493d1 100644 --- a/Mage.Sets/src/mage/cards/p/PiannaNomadCaptain.java +++ b/Mage.Sets/src/mage/cards/p/PiannaNomadCaptain.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.filter.common.FilterCreaturePermanent; @@ -54,8 +55,8 @@ public class PiannaNomadCaptain extends CardImpl { public PiannaNomadCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Nomad"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PierceStrider.java b/Mage.Sets/src/mage/cards/p/PierceStrider.java index c8a0558751..a94344e257 100644 --- a/Mage.Sets/src/mage/cards/p/PierceStrider.java +++ b/Mage.Sets/src/mage/cards/p/PierceStrider.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetOpponent; /** @@ -46,7 +47,7 @@ public class PierceStrider extends CardImpl { public PierceStrider (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(3); this.toughness = new MageInt(3); Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(3)); diff --git a/Mage.Sets/src/mage/cards/p/PilgrimOfJustice.java b/Mage.Sets/src/mage/cards/p/PilgrimOfJustice.java index fc26e34b24..6bca38ea51 100644 --- a/Mage.Sets/src/mage/cards/p/PilgrimOfJustice.java +++ b/Mage.Sets/src/mage/cards/p/PilgrimOfJustice.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,8 +57,8 @@ public class PilgrimOfJustice extends CardImpl { public PilgrimOfJustice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PilgrimOfTheFires.java b/Mage.Sets/src/mage/cards/p/PilgrimOfTheFires.java index fc9a989e5a..5317cc03f1 100644 --- a/Mage.Sets/src/mage/cards/p/PilgrimOfTheFires.java +++ b/Mage.Sets/src/mage/cards/p/PilgrimOfTheFires.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class PilgrimOfTheFires extends CardImpl { public PilgrimOfTheFires(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PilgrimOfVirtue.java b/Mage.Sets/src/mage/cards/p/PilgrimOfVirtue.java index 7aa40ce598..5a0efa8d5a 100644 --- a/Mage.Sets/src/mage/cards/p/PilgrimOfVirtue.java +++ b/Mage.Sets/src/mage/cards/p/PilgrimOfVirtue.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,8 +57,8 @@ public class PilgrimOfVirtue extends CardImpl { public PilgrimOfVirtue(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PilgrimsEye.java b/Mage.Sets/src/mage/cards/p/PilgrimsEye.java index 354cb2c7e1..23a024d07e 100644 --- a/Mage.Sets/src/mage/cards/p/PilgrimsEye.java +++ b/Mage.Sets/src/mage/cards/p/PilgrimsEye.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.FilterCard; import mage.filter.StaticFilters; @@ -58,7 +59,7 @@ public class PilgrimsEye extends CardImpl { public PilgrimsEye (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Thopter"); + this.subtype.add(SubType.THOPTER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PiliPala.java b/Mage.Sets/src/mage/cards/p/PiliPala.java index 2d553def0a..8bb859cd41 100644 --- a/Mage.Sets/src/mage/cards/p/PiliPala.java +++ b/Mage.Sets/src/mage/cards/p/PiliPala.java @@ -37,6 +37,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class PiliPala extends CardImpl { public PiliPala(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PillagingHorde.java b/Mage.Sets/src/mage/cards/p/PillagingHorde.java index e4c8e352ae..bc3044ba41 100644 --- a/Mage.Sets/src/mage/cards/p/PillagingHorde.java +++ b/Mage.Sets/src/mage/cards/p/PillagingHorde.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class PillagingHorde extends CardImpl { public PillagingHorde(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Barbarian"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BARBARIAN); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/PillarOfOrigins.java b/Mage.Sets/src/mage/cards/p/PillarOfOrigins.java new file mode 100644 index 0000000000..6aed375d7f --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PillarOfOrigins.java @@ -0,0 +1,135 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.ConditionalMana; +import mage.MageObject; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.ChooseCreatureTypeEffect; +import mage.abilities.mana.ConditionalAnyColorManaAbility; +import mage.abilities.mana.builder.ConditionalManaBuilder; +import mage.abilities.mana.conditional.CreatureCastManaCondition; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class PillarOfOrigins extends CardImpl { + + public PillarOfOrigins(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + // As Pillar of Origins enters the battlefield, choose a creature type. + this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.Benefit))); + + // {T}: Add one mana of any color to your mana pool. Spend this mana only to cast a creature spell if the chosen type. + this.addAbility(new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new PillarOfOriginsManaBuilder(), true)); + } + + public PillarOfOrigins(final PillarOfOrigins card) { + super(card); + } + + @Override + public PillarOfOrigins copy() { + return new PillarOfOrigins(this); + } +} + +class PillarOfOriginsManaBuilder extends ConditionalManaBuilder { + + SubType creatureType; + + @Override + public ConditionalManaBuilder setMana(Mana mana, Ability source, Game game) { + SubType value = (SubType) game.getState().getValue(source.getSourceId() + "_type"); + if (value != null) { + creatureType = 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 spent to cast creatures of type " + creatureType + ")"); + } + return super.setMana(mana, source, game); + } + + @Override + public ConditionalMana build(Object... options) { + return new PillarOfOriginsConditionalMana(this.mana, creatureType); + } + + @Override + public String getRule() { + return "Spend this mana only to cast a creature spell of the chosen type"; + } +} + +class PillarOfOriginsConditionalMana extends ConditionalMana { + + public PillarOfOriginsConditionalMana(Mana mana, SubType creatureType) { + super(mana); + staticText = "Spend this mana only to cast a creature spell of the chosen type"; + addCondition(new PillarOfOriginsManaCondition(creatureType)); + } +} + +class PillarOfOriginsManaCondition extends CreatureCastManaCondition { + + SubType creatureType; + + PillarOfOriginsManaCondition(SubType creatureType) { + this.creatureType = creatureType; + } + + @Override + public boolean apply(Game game, Ability source, UUID originalId, Cost costToPay) { + // check: ... to cast a creature spell + if (super.apply(game, source)) { + // check: ... of the chosen type + MageObject object = game.getObject(source.getSourceId()); + if (creatureType != null && object.hasSubtype(creatureType, game)) { + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/p/PillarOfWar.java b/Mage.Sets/src/mage/cards/p/PillarOfWar.java index 9b6997e20f..1327761b25 100644 --- a/Mage.Sets/src/mage/cards/p/PillarOfWar.java +++ b/Mage.Sets/src/mage/cards/p/PillarOfWar.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class PillarOfWar extends CardImpl { public PillarOfWar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PillarfieldOx.java b/Mage.Sets/src/mage/cards/p/PillarfieldOx.java index dfe9b85c76..1db279c443 100644 --- a/Mage.Sets/src/mage/cards/p/PillarfieldOx.java +++ b/Mage.Sets/src/mage/cards/p/PillarfieldOx.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class PillarfieldOx extends CardImpl { public PillarfieldOx (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Ox"); + this.subtype.add(SubType.OX); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PilloryOfTheSleepless.java b/Mage.Sets/src/mage/cards/p/PilloryOfTheSleepless.java index e3c28ecd04..36baf1e85f 100644 --- a/Mage.Sets/src/mage/cards/p/PilloryOfTheSleepless.java +++ b/Mage.Sets/src/mage/cards/p/PilloryOfTheSleepless.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class PilloryOfTheSleepless extends CardImpl { public PilloryOfTheSleepless(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/p/PinToTheEarth.java b/Mage.Sets/src/mage/cards/p/PinToTheEarth.java index a5d5b19226..2e080dcbdc 100644 --- a/Mage.Sets/src/mage/cards/p/PinToTheEarth.java +++ b/Mage.Sets/src/mage/cards/p/PinToTheEarth.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class PinToTheEarth extends CardImpl { public PinToTheEarth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/p/PincerSpider.java b/Mage.Sets/src/mage/cards/p/PincerSpider.java index 7629af1514..9829ca138d 100644 --- a/Mage.Sets/src/mage/cards/p/PincerSpider.java +++ b/Mage.Sets/src/mage/cards/p/PincerSpider.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -49,7 +50,7 @@ public class PincerSpider extends CardImpl { public PincerSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PincherBeetles.java b/Mage.Sets/src/mage/cards/p/PincherBeetles.java index c2b2369f72..868301d756 100644 --- a/Mage.Sets/src/mage/cards/p/PincherBeetles.java +++ b/Mage.Sets/src/mage/cards/p/PincherBeetles.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class PincherBeetles extends CardImpl { public PincherBeetles(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PineWalker.java b/Mage.Sets/src/mage/cards/p/PineWalker.java index 9ebc06e29c..666601ee1e 100644 --- a/Mage.Sets/src/mage/cards/p/PineWalker.java +++ b/Mage.Sets/src/mage/cards/p/PineWalker.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; /** @@ -47,7 +48,7 @@ public class PineWalker extends CardImpl { public PineWalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/PiousEvangel.java b/Mage.Sets/src/mage/cards/p/PiousEvangel.java index cf6131f527..4fe5e915f4 100644 --- a/Mage.Sets/src/mage/cards/p/PiousEvangel.java +++ b/Mage.Sets/src/mage/cards/p/PiousEvangel.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.w.WaywardDisciple; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledPermanent; @@ -64,8 +65,8 @@ public class PiousEvangel extends CardImpl { public PiousEvangel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PiousInterdiction.java b/Mage.Sets/src/mage/cards/p/PiousInterdiction.java new file mode 100644 index 0000000000..4f54325717 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PiousInterdiction.java @@ -0,0 +1,81 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.constants.SubType; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.combat.CantAttackBlockAttachedEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class PiousInterdiction extends CardImpl { + + public PiousInterdiction(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // When Pious Interdiction enters the battlefield, you gain 2 life. + this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(2))); + + // Enchanted creature can't attack or block. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackBlockAttachedEffect(AttachmentType.AURA))); + } + + public PiousInterdiction(final PiousInterdiction card) { + super(card); + } + + @Override + public PiousInterdiction copy() { + return new PiousInterdiction(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PiousKitsune.java b/Mage.Sets/src/mage/cards/p/PiousKitsune.java index 4367414486..ddd1df5baa 100644 --- a/Mage.Sets/src/mage/cards/p/PiousKitsune.java +++ b/Mage.Sets/src/mage/cards/p/PiousKitsune.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -58,8 +59,8 @@ public class PiousKitsune extends CardImpl { public PiousKitsune(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Fox"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.FOX); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PiousWarrior.java b/Mage.Sets/src/mage/cards/p/PiousWarrior.java index 162c253629..3154314046 100644 --- a/Mage.Sets/src/mage/cards/p/PiousWarrior.java +++ b/Mage.Sets/src/mage/cards/p/PiousWarrior.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -51,9 +52,9 @@ public class PiousWarrior extends CardImpl { public PiousWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PipersMelody.java b/Mage.Sets/src/mage/cards/p/PipersMelody.java index 89ead3a4cb..634952e372 100644 --- a/Mage.Sets/src/mage/cards/p/PipersMelody.java +++ b/Mage.Sets/src/mage/cards/p/PipersMelody.java @@ -30,7 +30,6 @@ package mage.cards.p; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.PutOnLibraryTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; @@ -50,7 +49,6 @@ public class PipersMelody extends CardImpl { public PipersMelody(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}"); - // Shuffle any number of target creature cards from your graveyard into your library. this.getSpellAbility().addEffect(new PipersMelodyShuffleEffect()); @@ -66,6 +64,7 @@ public class PipersMelody extends CardImpl { return new PipersMelody(this); } } + class PipersMelodyShuffleEffect extends OneShotEffect { PipersMelodyShuffleEffect() { diff --git a/Mage.Sets/src/mage/cards/p/PirateShip.java b/Mage.Sets/src/mage/cards/p/PirateShip.java index 7b3bed101a..e5c723ce6a 100644 --- a/Mage.Sets/src/mage/cards/p/PirateShip.java +++ b/Mage.Sets/src/mage/cards/p/PirateShip.java @@ -53,8 +53,8 @@ public class PirateShip extends CardImpl { public PirateShip(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); - this.subtype.add("Human"); - this.subtype.add("Pirate"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PiratesCutlass.java b/Mage.Sets/src/mage/cards/p/PiratesCutlass.java new file mode 100644 index 0000000000..20e66dda7c --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PiratesCutlass.java @@ -0,0 +1,89 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class PiratesCutlass extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Pirate you control"); + + static { + filter.add(new SubtypePredicate(SubType.PIRATE)); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public PiratesCutlass(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + this.subtype.add(SubType.EQUIPMENT); + + // When Pirate's Cutlass enters the battlefield, attach it to target Pirate you control. + Ability ability = new EntersBattlefieldTriggeredAbility(new AttachEffect(Outcome.BoostCreature, "attach it to target Pirate you control"), false); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + + // Equipped creature gets +2/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 1))); + + // Equip 2 + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); + + } + + public PiratesCutlass(final PiratesCutlass card) { + super(card); + } + + @Override + public PiratesCutlass copy() { + return new PiratesCutlass(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PiratesPrize.java b/Mage.Sets/src/mage/cards/p/PiratesPrize.java new file mode 100644 index 0000000000..8676bdc385 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PiratesPrize.java @@ -0,0 +1,60 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.permanent.token.TreasureToken; + +/** + * + * @author TheElk801 + */ +public class PiratesPrize extends CardImpl { + + public PiratesPrize(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U}"); + + // Draw two cards. Create a colorless Treasure artifact token with "{t}, Sacrifice this artifact: Add one mana of any color to your mana pool." + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2)); + this.getSpellAbility().addEffect(new CreateTokenEffect(new TreasureToken())); + } + + public PiratesPrize(final PiratesPrize card) { + super(card); + } + + @Override + public PiratesPrize copy() { + return new PiratesPrize(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PistonSledge.java b/Mage.Sets/src/mage/cards/p/PistonSledge.java index 3f49583cac..4fd1a823e9 100644 --- a/Mage.Sets/src/mage/cards/p/PistonSledge.java +++ b/Mage.Sets/src/mage/cards/p/PistonSledge.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -61,7 +62,7 @@ public class PistonSledge extends CardImpl { public PistonSledge (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); Ability ability = new EntersBattlefieldTriggeredAbility(new AttachEffect(Outcome.BoostCreature, "attach it to target creature you control"), false); ability.addTarget(new TargetControlledCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/p/PitImp.java b/Mage.Sets/src/mage/cards/p/PitImp.java index d9fe9c226a..91669c5b1c 100644 --- a/Mage.Sets/src/mage/cards/p/PitImp.java +++ b/Mage.Sets/src/mage/cards/p/PitImp.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class PitImp extends CardImpl { public PitImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PitKeeper.java b/Mage.Sets/src/mage/cards/p/PitKeeper.java index 92d00c8ba0..0ee13d589d 100644 --- a/Mage.Sets/src/mage/cards/p/PitKeeper.java +++ b/Mage.Sets/src/mage/cards/p/PitKeeper.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.game.Game; import mage.players.Player; @@ -51,8 +52,8 @@ public class PitKeeper extends CardImpl { public PitKeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PitRaptor.java b/Mage.Sets/src/mage/cards/p/PitRaptor.java index 325580bb11..5aaf756544 100644 --- a/Mage.Sets/src/mage/cards/p/PitRaptor.java +++ b/Mage.Sets/src/mage/cards/p/PitRaptor.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -47,8 +48,8 @@ public class PitRaptor extends CardImpl { public PitRaptor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Bird"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PitScorpion.java b/Mage.Sets/src/mage/cards/p/PitScorpion.java index c937512458..f14e3d3cb0 100644 --- a/Mage.Sets/src/mage/cards/p/PitScorpion.java +++ b/Mage.Sets/src/mage/cards/p/PitScorpion.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddPoisonCounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class PitScorpion extends CardImpl { public PitScorpion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Scorpion"); + this.subtype.add(SubType.SCORPION); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PitSpawn.java b/Mage.Sets/src/mage/cards/p/PitSpawn.java index 012c0f3b90..f9785e1772 100644 --- a/Mage.Sets/src/mage/cards/p/PitSpawn.java +++ b/Mage.Sets/src/mage/cards/p/PitSpawn.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -48,7 +49,7 @@ public class PitSpawn extends CardImpl { public PitSpawn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PitchburnDevils.java b/Mage.Sets/src/mage/cards/p/PitchburnDevils.java index 2acf02f12a..468641efb1 100644 --- a/Mage.Sets/src/mage/cards/p/PitchburnDevils.java +++ b/Mage.Sets/src/mage/cards/p/PitchburnDevils.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; /** @@ -44,7 +45,7 @@ public class PitchburnDevils extends CardImpl { public PitchburnDevils(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PithDriller.java b/Mage.Sets/src/mage/cards/p/PithDriller.java index d251cd0729..cc363df062 100644 --- a/Mage.Sets/src/mage/cards/p/PithDriller.java +++ b/Mage.Sets/src/mage/cards/p/PithDriller.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -45,7 +46,7 @@ public class PithDriller extends CardImpl { public PithDriller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{B/P}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PitilessHorde.java b/Mage.Sets/src/mage/cards/p/PitilessHorde.java index fedd65bec8..12b0d4477c 100644 --- a/Mage.Sets/src/mage/cards/p/PitilessHorde.java +++ b/Mage.Sets/src/mage/cards/p/PitilessHorde.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -45,8 +46,8 @@ public class PitilessHorde extends CardImpl { public PitilessHorde(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Orc"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PitilessVizier.java b/Mage.Sets/src/mage/cards/p/PitilessVizier.java index 601f0cffc4..f333e33f19 100644 --- a/Mage.Sets/src/mage/cards/p/PitilessVizier.java +++ b/Mage.Sets/src/mage/cards/p/PitilessVizier.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,8 +47,8 @@ public class PitilessVizier extends CardImpl { public PitilessVizier(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Minotaur"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PixieQueen.java b/Mage.Sets/src/mage/cards/p/PixieQueen.java index c33edbb176..77bfdc1a04 100644 --- a/Mage.Sets/src/mage/cards/p/PixieQueen.java +++ b/Mage.Sets/src/mage/cards/p/PixieQueen.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,7 +51,7 @@ public class PixieQueen extends CardImpl { public PixieQueen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PlagueBeetle.java b/Mage.Sets/src/mage/cards/p/PlagueBeetle.java index 517a18c943..9d969e9335 100644 --- a/Mage.Sets/src/mage/cards/p/PlagueBeetle.java +++ b/Mage.Sets/src/mage/cards/p/PlagueBeetle.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class PlagueBeetle extends CardImpl { public PlagueBeetle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PlagueBelcher.java b/Mage.Sets/src/mage/cards/p/PlagueBelcher.java index e45ae342b0..8fb0c4c615 100644 --- a/Mage.Sets/src/mage/cards/p/PlagueBelcher.java +++ b/Mage.Sets/src/mage/cards/p/PlagueBelcher.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; @@ -63,8 +64,8 @@ public class PlagueBelcher extends CardImpl { public PlagueBelcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Beast"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(4); @@ -77,7 +78,7 @@ public class PlagueBelcher extends CardImpl { this.addAbility(ability); // Whenever another Zombie you control dies, each opponent loses 1 life. - this.addAbility(new DiesCreatureTriggeredAbility(new LoseLifeOpponentsEffect(), false, filter)); + this.addAbility(new DiesCreatureTriggeredAbility(new LoseLifeOpponentsEffect(1), false, filter)); } public PlagueBelcher(final PlagueBelcher card) { diff --git a/Mage.Sets/src/mage/cards/p/PlagueDogs.java b/Mage.Sets/src/mage/cards/p/PlagueDogs.java index c78999564b..c1df1cb1c4 100644 --- a/Mage.Sets/src/mage/cards/p/PlagueDogs.java +++ b/Mage.Sets/src/mage/cards/p/PlagueDogs.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class PlagueDogs extends CardImpl { public PlagueDogs(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Hound"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HOUND); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PlagueFiend.java b/Mage.Sets/src/mage/cards/p/PlagueFiend.java index 8b08a42799..9188629ace 100644 --- a/Mage.Sets/src/mage/cards/p/PlagueFiend.java +++ b/Mage.Sets/src/mage/cards/p/PlagueFiend.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -50,7 +51,7 @@ public class PlagueFiend extends CardImpl { public PlagueFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PlagueMyr.java b/Mage.Sets/src/mage/cards/p/PlagueMyr.java index 5dec84d040..bdd3f9d0d2 100644 --- a/Mage.Sets/src/mage/cards/p/PlagueMyr.java +++ b/Mage.Sets/src/mage/cards/p/PlagueMyr.java @@ -35,6 +35,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class PlagueMyr extends CardImpl { public PlagueMyr (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(1); this.addAbility(InfectAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/p/PlagueRats.java b/Mage.Sets/src/mage/cards/p/PlagueRats.java index 3f42b26d9c..05895ed8f8 100644 --- a/Mage.Sets/src/mage/cards/p/PlagueRats.java +++ b/Mage.Sets/src/mage/cards/p/PlagueRats.java @@ -27,7 +27,6 @@ */ package mage.cards.p; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.DynamicValue; @@ -37,24 +36,27 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.NamePredicate; +import java.util.UUID; + /** * * @author lopho */ public class PlagueRats extends CardImpl { - private static final FilterCreaturePermanent plagueRatsFilter = new FilterCreaturePermanent("Plague Rats on the battlefield"); + private static final FilterCreaturePermanent plagueRatsFilter = new FilterCreaturePermanent("creatures named Plague Rats on the battlefield"); static { plagueRatsFilter.add(new NamePredicate("Plague Rats")); } public PlagueRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/p/PlagueSliver.java b/Mage.Sets/src/mage/cards/p/PlagueSliver.java index 1902d8d8dc..bee95b8b0c 100644 --- a/Mage.Sets/src/mage/cards/p/PlagueSliver.java +++ b/Mage.Sets/src/mage/cards/p/PlagueSliver.java @@ -54,7 +54,7 @@ public class PlagueSliver extends CardImpl { public PlagueSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/PlagueSpitter.java b/Mage.Sets/src/mage/cards/p/PlagueSpitter.java index c9a0d68e20..f7c2d98021 100644 --- a/Mage.Sets/src/mage/cards/p/PlagueSpitter.java +++ b/Mage.Sets/src/mage/cards/p/PlagueSpitter.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageEverythingEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -46,7 +47,7 @@ public class PlagueSpitter extends CardImpl { public PlagueSpitter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PlagueStinger.java b/Mage.Sets/src/mage/cards/p/PlagueStinger.java index 2575c516c9..6e85f83028 100644 --- a/Mage.Sets/src/mage/cards/p/PlagueStinger.java +++ b/Mage.Sets/src/mage/cards/p/PlagueStinger.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class PlagueStinger extends CardImpl { public PlagueStinger (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Insect"); - this.subtype.add("Horror"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.HORROR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PlagueWitch.java b/Mage.Sets/src/mage/cards/p/PlagueWitch.java index 5f148d22b3..06aec4b39b 100644 --- a/Mage.Sets/src/mage/cards/p/PlagueWitch.java +++ b/Mage.Sets/src/mage/cards/p/PlagueWitch.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class PlagueWitch extends CardImpl { public PlagueWitch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Elf"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/Plaguebearer.java b/Mage.Sets/src/mage/cards/p/Plaguebearer.java index 508cf9c741..819b32dce0 100644 --- a/Mage.Sets/src/mage/cards/p/Plaguebearer.java +++ b/Mage.Sets/src/mage/cards/p/Plaguebearer.java @@ -37,14 +37,13 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; +import mage.constants.SubType; +import mage.constants.TargetAdjustment; import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ColorPredicate; -import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; -import mage.game.Game; -import mage.target.Target; import mage.target.TargetPermanent; /** @@ -53,42 +52,28 @@ import mage.target.TargetPermanent; */ public class Plaguebearer extends CardImpl { - private final UUID originalId; - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature"); + private static final FilterPermanent filter = new FilterPermanent("nonblack creature with converted mana cost X"); static { + filter.add(new CardTypePredicate(CardType.CREATURE)); filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); } public Plaguebearer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); // {X}{X}{B}: Destroy target nonblack creature with converted mana cost X. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{X}{X}{B}")); ability.addTarget(new TargetPermanent(filter)); - originalId = ability.getOriginalId(); + ability.setTargetAdjustment(TargetAdjustment.X_CMC_EQUAL_PERM); this.addAbility(ability); } - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(originalId)) { - int xValue = ability.getManaCostsToPay().getX(); - ability.getTargets().clear(); - FilterCreaturePermanent filter = new FilterCreaturePermanent(new StringBuilder("nonblack creature with converted mana cost ").append(xValue).toString()); - filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, xValue)); - filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); - Target target = new TargetPermanent(filter); - ability.addTarget(target); - } - } - public Plaguebearer(final Plaguebearer card) { super(card); - this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/cards/p/PlaguedRusalka.java b/Mage.Sets/src/mage/cards/p/PlaguedRusalka.java index 2c46f2b6cb..23cc2b1f2d 100644 --- a/Mage.Sets/src/mage/cards/p/PlaguedRusalka.java +++ b/Mage.Sets/src/mage/cards/p/PlaguedRusalka.java @@ -48,7 +48,7 @@ public class PlaguedRusalka extends CardImpl { public PlaguedRusalka(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PlaguemawBeast.java b/Mage.Sets/src/mage/cards/p/PlaguemawBeast.java index 681eb900f2..cb67ea3be9 100644 --- a/Mage.Sets/src/mage/cards/p/PlaguemawBeast.java +++ b/Mage.Sets/src/mage/cards/p/PlaguemawBeast.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.ProliferateEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -49,7 +50,7 @@ public class PlaguemawBeast extends CardImpl { public PlaguemawBeast (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PlanarGuide.java b/Mage.Sets/src/mage/cards/p/PlanarGuide.java index 577197c534..9dafcdfb00 100644 --- a/Mage.Sets/src/mage/cards/p/PlanarGuide.java +++ b/Mage.Sets/src/mage/cards/p/PlanarGuide.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -56,8 +57,8 @@ public class PlanarGuide extends CardImpl { public PlanarGuide(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PlanarOverlay.java b/Mage.Sets/src/mage/cards/p/PlanarOverlay.java index 33e52bc235..d4154de5dd 100644 --- a/Mage.Sets/src/mage/cards/p/PlanarOverlay.java +++ b/Mage.Sets/src/mage/cards/p/PlanarOverlay.java @@ -1,112 +1,112 @@ -/* - * 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.cards.p; - -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.*; -import mage.filter.common.FilterLandPermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.filter.predicate.permanent.ControllerPredicate; -import mage.game.Game; -import mage.players.Player; -import mage.target.Target; -import mage.target.common.TargetLandPermanent; - -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; - -/** - * - * @author Styxo - */ -public class PlanarOverlay extends CardImpl { - - public PlanarOverlay(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}"); - - // Each player chooses a land he or she controls of each basic land type. Return those lands to their owners' hands. - this.getSpellAbility().addEffect(new PlanarOverlayEffect()); - } - - public PlanarOverlay(final PlanarOverlay card) { - super(card); - } - - @Override - public PlanarOverlay copy() { - return new PlanarOverlay(this); - } -} - -class PlanarOverlayEffect extends OneShotEffect { - - public PlanarOverlayEffect() { - super(Outcome.ReturnToHand); - this.staticText = "Each player chooses a land he or she controls of each basic land type. Return those lands to their owners' hands"; - } - - public PlanarOverlayEffect(final PlanarOverlayEffect effect) { - super(effect); - } - - @Override - public PlanarOverlayEffect copy() { - return new PlanarOverlayEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Set lands = new HashSet<>(); - for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { - Player player = game.getPlayer(playerId); - if (player != null) { - for (SubType landName : SubType.getBasicLands(false)) { - FilterLandPermanent filter = new FilterLandPermanent(landName + " to return to hand"); - filter.add(new SubtypePredicate(landName)); - filter.add(new ControllerPredicate(TargetController.YOU)); - Target target = new TargetLandPermanent(1, 1, filter, true); - if (target.canChoose(source.getSourceId(), player.getId(), game)) { - player.chooseTarget(outcome, target, source, game); - lands.add(game.getPermanent(target.getFirstTarget())); - } - } - } - } - controller.moveCards(lands, Zone.HAND, source, game); - return true; - } - return false; - } -} +/* + * 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.cards.p; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetLandPermanent; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + +/** + * + * @author Styxo + */ +public class PlanarOverlay extends CardImpl { + + public PlanarOverlay(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}"); + + // Each player chooses a land he or she controls of each basic land type. Return those lands to their owners' hands. + this.getSpellAbility().addEffect(new PlanarOverlayEffect()); + } + + public PlanarOverlay(final PlanarOverlay card) { + super(card); + } + + @Override + public PlanarOverlay copy() { + return new PlanarOverlay(this); + } +} + +class PlanarOverlayEffect extends OneShotEffect { + + public PlanarOverlayEffect() { + super(Outcome.ReturnToHand); + this.staticText = "Each player chooses a land he or she controls of each basic land type. Return those lands to their owners' hands"; + } + + public PlanarOverlayEffect(final PlanarOverlayEffect effect) { + super(effect); + } + + @Override + public PlanarOverlayEffect copy() { + return new PlanarOverlayEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Set lands = new HashSet<>(); + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + for (SubType landName : SubType.getBasicLands(false)) { + FilterLandPermanent filter = new FilterLandPermanent(landName + " to return to hand"); + filter.add(new SubtypePredicate(landName)); + filter.add(new ControllerPredicate(TargetController.YOU)); + Target target = new TargetLandPermanent(1, 1, filter, true); + if (target.canChoose(source.getSourceId(), player.getId(), game)) { + player.chooseTarget(outcome, target, source, game); + lands.add(game.getPermanent(target.getFirstTarget())); + } + } + } + } + controller.moveCards(lands, Zone.HAND, source, game); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/p/PlaneswalkersMischief.java b/Mage.Sets/src/mage/cards/p/PlaneswalkersMischief.java index 58c4e52088..3e2d14811d 100644 --- a/Mage.Sets/src/mage/cards/p/PlaneswalkersMischief.java +++ b/Mage.Sets/src/mage/cards/p/PlaneswalkersMischief.java @@ -1,194 +1,194 @@ -/* - * 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.cards.p; - -import java.util.List; -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.DelayedTriggeredAbility; -import mage.abilities.common.ActivateAsSorceryActivatedAbility; -import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; -import mage.abilities.condition.Condition; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalOneShotEffect; -import mage.abilities.effects.AsThoughEffect; -import mage.abilities.effects.AsThoughEffectImpl; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.ReturnFromExileEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; -import mage.constants.AsThoughEffectType; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.stack.Spell; -import mage.players.Player; -import mage.target.common.TargetOpponent; -import mage.target.targetpointer.FixedTarget; -import mage.watchers.common.SpellsCastWatcher; - -/** - * - * @author jeffwadsworth - */ -public class PlaneswalkersMischief extends CardImpl { - - public PlaneswalkersMischief(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); - - // {3}{U}: Target opponent reveals a card at random from his or her hand. If it's an instant or sorcery card, exile it. You may cast it without paying its mana cost for as long as it remains exiled. At the beginning of the next end step, if you haven't cast it, return it to its owner's hand. Activate this ability only any time you could cast a sorcery. - Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new PlaneswalkersMischiefEffect(), new ManaCostsImpl("{3}{U}")); - ability.addTarget(new TargetOpponent()); - this.addAbility(ability); - - } - - public PlaneswalkersMischief(final PlaneswalkersMischief card) { - super(card); - } - - @Override - public PlaneswalkersMischief copy() { - return new PlaneswalkersMischief(this); - } -} - -class PlaneswalkersMischiefEffect extends OneShotEffect { - - public PlaneswalkersMischiefEffect() { - super(Outcome.Benefit); - this.staticText = "Target opponent reveals a card at random from his or her hand. If it's an instant or sorcery card, exile it. You may cast it without paying its mana cost for as long as it remains exiled. At the beginning of the next end step, if you haven't cast it, return it to its owner's hand."; - } - - public PlaneswalkersMischiefEffect(final PlaneswalkersMischiefEffect effect) { - super(effect); - } - - @Override - public PlaneswalkersMischiefEffect copy() { - return new PlaneswalkersMischiefEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player opponent = game.getPlayer(source.getFirstTarget()); - if (opponent != null - && opponent.getHand().size() > 0) { - Card revealedCard = opponent.getHand().getRandom(game); - Cards cards = new CardsImpl(); - cards.add(revealedCard); - opponent.revealCards("Planeswalker's Mischief Reveal", cards, game); - if (revealedCard.isInstant() - || revealedCard.isSorcery()) { - opponent.moveCardToExileWithInfo(revealedCard, source.getSourceId(), "Planeswalker's Mischief", source.getSourceId(), game, Zone.HAND, true); - AsThoughEffect effect = new PlaneswalkersMischiefCastFromExileEffect(); - effect.setTargetPointer(new FixedTarget(revealedCard.getId())); - game.addEffect(effect, source); - OneShotEffect effect2 = new ReturnFromExileEffect(source.getSourceId(), Zone.HAND); - Condition condition = new SpellWasNotCastCondition(source.getSourceId(), revealedCard.getId()); - ConditionalOneShotEffect effect3 = new ConditionalOneShotEffect(effect2, condition, "if you haven't cast it, return it to its owner's hand."); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect3); - game.addDelayedTriggeredAbility(delayedAbility, source); - return true; - } - } - return false; - } -} - -class PlaneswalkersMischiefCastFromExileEffect extends AsThoughEffectImpl { - - PlaneswalkersMischiefCastFromExileEffect() { - super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit); - staticText = "You may cast that card without paying its mana cost as long as it remains exiled"; - } - - PlaneswalkersMischiefCastFromExileEffect(final PlaneswalkersMischiefCastFromExileEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } - - @Override - public PlaneswalkersMischiefCastFromExileEffect copy() { - return new PlaneswalkersMischiefCastFromExileEffect(this); - } - - @Override - public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { - if (targetPointer.getTargets(game, source).contains(objectId) - && game.getState().getZone(objectId) == Zone.EXILED) { - Player player = game.getPlayer(source.getControllerId()); - Card card = game.getCard(objectId); - if (player != null - && card != null) { - player.setCastSourceIdWithAlternateMana(objectId, null, card.getSpellAbility().getCosts()); - return true; - } - } - return false; - } -} - -class SpellWasNotCastCondition implements Condition { - - protected UUID exileId; - protected UUID cardId; - - public SpellWasNotCastCondition(UUID exileId, UUID cardId) { - this.exileId = exileId; - this.cardId = cardId; - } - - @Override - public boolean apply(Game game, Ability source) { - if (!game.getExile().getExileZone(exileId).contains(cardId)) { - return false; - } - SpellsCastWatcher watcher = (SpellsCastWatcher) game.getState().getWatchers().get(SpellsCastWatcher.class.getSimpleName(), source.getSourceId()); - if (watcher != null) { - List spells = watcher.getSpellsCastThisTurn(source.getControllerId()); - if (spells != null) { - for (Spell spell : spells) { - if (spell.getSourceId().equals(cardId)) { - return false; - } - } - } - } - return true; - } -} +/* + * 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.cards.p; + +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.AsThoughEffect; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnFromExileEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.AsThoughEffectType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.players.Player; +import mage.target.common.TargetOpponent; +import mage.target.targetpointer.FixedTarget; +import mage.watchers.common.SpellsCastWatcher; + +/** + * + * @author jeffwadsworth + */ +public class PlaneswalkersMischief extends CardImpl { + + public PlaneswalkersMischief(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + + // {3}{U}: Target opponent reveals a card at random from his or her hand. If it's an instant or sorcery card, exile it. You may cast it without paying its mana cost for as long as it remains exiled. At the beginning of the next end step, if you haven't cast it, return it to its owner's hand. Activate this ability only any time you could cast a sorcery. + Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new PlaneswalkersMischiefEffect(), new ManaCostsImpl("{3}{U}")); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + + } + + public PlaneswalkersMischief(final PlaneswalkersMischief card) { + super(card); + } + + @Override + public PlaneswalkersMischief copy() { + return new PlaneswalkersMischief(this); + } +} + +class PlaneswalkersMischiefEffect extends OneShotEffect { + + public PlaneswalkersMischiefEffect() { + super(Outcome.Benefit); + this.staticText = "Target opponent reveals a card at random from his or her hand. If it's an instant or sorcery card, exile it. You may cast it without paying its mana cost for as long as it remains exiled. At the beginning of the next end step, if you haven't cast it, return it to its owner's hand."; + } + + public PlaneswalkersMischiefEffect(final PlaneswalkersMischiefEffect effect) { + super(effect); + } + + @Override + public PlaneswalkersMischiefEffect copy() { + return new PlaneswalkersMischiefEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player opponent = game.getPlayer(source.getFirstTarget()); + if (opponent != null + && opponent.getHand().size() > 0) { + Card revealedCard = opponent.getHand().getRandom(game); + Cards cards = new CardsImpl(); + cards.add(revealedCard); + opponent.revealCards("Planeswalker's Mischief Reveal", cards, game); + if (revealedCard.isInstant() + || revealedCard.isSorcery()) { + opponent.moveCardToExileWithInfo(revealedCard, source.getSourceId(), "Planeswalker's Mischief", source.getSourceId(), game, Zone.HAND, true); + AsThoughEffect effect = new PlaneswalkersMischiefCastFromExileEffect(); + effect.setTargetPointer(new FixedTarget(revealedCard.getId())); + game.addEffect(effect, source); + OneShotEffect effect2 = new ReturnFromExileEffect(source.getSourceId(), Zone.HAND); + Condition condition = new PlaneswalkersMischiefCondition(source.getSourceId(), revealedCard.getId()); + ConditionalOneShotEffect effect3 = new ConditionalOneShotEffect(effect2, condition, "if you haven't cast it, return it to its owner's hand."); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect3); + game.addDelayedTriggeredAbility(delayedAbility, source); + return true; + } + } + return false; + } +} + +class PlaneswalkersMischiefCastFromExileEffect extends AsThoughEffectImpl { + + PlaneswalkersMischiefCastFromExileEffect() { + super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit); + staticText = "You may cast that card without paying its mana cost as long as it remains exiled"; + } + + PlaneswalkersMischiefCastFromExileEffect(final PlaneswalkersMischiefCastFromExileEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public PlaneswalkersMischiefCastFromExileEffect copy() { + return new PlaneswalkersMischiefCastFromExileEffect(this); + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + if (targetPointer.getTargets(game, source).contains(objectId) + && game.getState().getZone(objectId) == Zone.EXILED) { + Player player = game.getPlayer(source.getControllerId()); + Card card = game.getCard(objectId); + if (player != null + && card != null) { + player.setCastSourceIdWithAlternateMana(objectId, null, card.getSpellAbility().getCosts()); + return true; + } + } + return false; + } +} + +class PlaneswalkersMischiefCondition implements Condition { + + protected UUID exileId; + protected UUID cardId; + + public PlaneswalkersMischiefCondition(UUID exileId, UUID cardId) { + this.exileId = exileId; + this.cardId = cardId; + } + + @Override + public boolean apply(Game game, Ability source) { + if (!game.getExile().getExileZone(exileId).contains(cardId)) { + return false; + } + SpellsCastWatcher watcher = (SpellsCastWatcher) game.getState().getWatchers().get(SpellsCastWatcher.class.getSimpleName(), source.getSourceId()); + if (watcher != null) { + List spells = watcher.getSpellsCastThisTurn(source.getControllerId()); + if (spells != null) { + for (Spell spell : spells) { + if (spell.getSourceId().equals(cardId)) { + return false; + } + } + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/p/PlantElemental.java b/Mage.Sets/src/mage/cards/p/PlantElemental.java index 107638bc14..7b9897ab7e 100644 --- a/Mage.Sets/src/mage/cards/p/PlantElemental.java +++ b/Mage.Sets/src/mage/cards/p/PlantElemental.java @@ -54,8 +54,8 @@ public class PlantElemental extends CardImpl { public PlantElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PlasmaElemental.java b/Mage.Sets/src/mage/cards/p/PlasmaElemental.java index 4aac6f03ec..24b4e024d0 100644 --- a/Mage.Sets/src/mage/cards/p/PlasmaElemental.java +++ b/Mage.Sets/src/mage/cards/p/PlasmaElemental.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -44,7 +45,7 @@ public class PlasmaElemental extends CardImpl { public PlasmaElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/Plateau.java b/Mage.Sets/src/mage/cards/p/Plateau.java index c6f6703d8c..297aae0019 100644 --- a/Mage.Sets/src/mage/cards/p/Plateau.java +++ b/Mage.Sets/src/mage/cards/p/Plateau.java @@ -33,6 +33,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class Plateau extends CardImpl { public Plateau(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Mountain"); - this.subtype.add("Plains"); + this.subtype.add(SubType.MOUNTAIN); + this.subtype.add(SubType.PLAINS); this.addAbility(new RedManaAbility()); this.addAbility(new WhiteManaAbility()); } diff --git a/Mage.Sets/src/mage/cards/p/PlatedCrusher.java b/Mage.Sets/src/mage/cards/p/PlatedCrusher.java index ecdadc7095..ed7cc3aa7b 100644 --- a/Mage.Sets/src/mage/cards/p/PlatedCrusher.java +++ b/Mage.Sets/src/mage/cards/p/PlatedCrusher.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class PlatedCrusher extends CardImpl { public PlatedCrusher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(7); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/p/PlatedGeopede.java b/Mage.Sets/src/mage/cards/p/PlatedGeopede.java index a7dc603772..127eb78761 100644 --- a/Mage.Sets/src/mage/cards/p/PlatedGeopede.java +++ b/Mage.Sets/src/mage/cards/p/PlatedGeopede.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,7 +47,7 @@ public class PlatedGeopede extends CardImpl { public PlatedGeopede (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PlatedRootwalla.java b/Mage.Sets/src/mage/cards/p/PlatedRootwalla.java index 9a58a1e32b..22baec042d 100644 --- a/Mage.Sets/src/mage/cards/p/PlatedRootwalla.java +++ b/Mage.Sets/src/mage/cards/p/PlatedRootwalla.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class PlatedRootwalla extends CardImpl { public PlatedRootwalla(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PlatedSeastrider.java b/Mage.Sets/src/mage/cards/p/PlatedSeastrider.java index a4c55c1eae..fb3eefc69b 100644 --- a/Mage.Sets/src/mage/cards/p/PlatedSeastrider.java +++ b/Mage.Sets/src/mage/cards/p/PlatedSeastrider.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class PlatedSeastrider extends CardImpl { public PlatedSeastrider (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PlatedSlagwurm.java b/Mage.Sets/src/mage/cards/p/PlatedSlagwurm.java index 5f2d3aa84d..4945931c01 100644 --- a/Mage.Sets/src/mage/cards/p/PlatedSlagwurm.java +++ b/Mage.Sets/src/mage/cards/p/PlatedSlagwurm.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class PlatedSlagwurm extends CardImpl { public PlatedSlagwurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/p/PlatedSliver.java b/Mage.Sets/src/mage/cards/p/PlatedSliver.java index 44313d9eb6..07b3fc1e35 100644 --- a/Mage.Sets/src/mage/cards/p/PlatedSliver.java +++ b/Mage.Sets/src/mage/cards/p/PlatedSliver.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -46,7 +47,7 @@ public class PlatedSliver extends CardImpl { public PlatedSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PlatedSpider.java b/Mage.Sets/src/mage/cards/p/PlatedSpider.java index 3f26d84581..cbff6d7b20 100644 --- a/Mage.Sets/src/mage/cards/p/PlatedSpider.java +++ b/Mage.Sets/src/mage/cards/p/PlatedSpider.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class PlatedSpider extends CardImpl { public PlatedSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PlatedWurm.java b/Mage.Sets/src/mage/cards/p/PlatedWurm.java index 60cd681206..fc4c4724a8 100644 --- a/Mage.Sets/src/mage/cards/p/PlatedWurm.java +++ b/Mage.Sets/src/mage/cards/p/PlatedWurm.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class PlatedWurm extends CardImpl { public PlatedWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/PlatinumAngel.java b/Mage.Sets/src/mage/cards/p/PlatinumAngel.java index 0b13f9c79d..884ab68ead 100644 --- a/Mage.Sets/src/mage/cards/p/PlatinumAngel.java +++ b/Mage.Sets/src/mage/cards/p/PlatinumAngel.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class PlatinumAngel extends CardImpl { public PlatinumAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PlatinumEmperion.java b/Mage.Sets/src/mage/cards/p/PlatinumEmperion.java index 7156744c82..0f01f74ee4 100644 --- a/Mage.Sets/src/mage/cards/p/PlatinumEmperion.java +++ b/Mage.Sets/src/mage/cards/p/PlatinumEmperion.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.LifeTotalCantChangeControllerEff import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -45,7 +46,7 @@ public class PlatinumEmperion extends CardImpl { public PlatinumEmperion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{8}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/p/PlaxcasterFrogling.java b/Mage.Sets/src/mage/cards/p/PlaxcasterFrogling.java index 6542fd8534..766c8745fb 100644 --- a/Mage.Sets/src/mage/cards/p/PlaxcasterFrogling.java +++ b/Mage.Sets/src/mage/cards/p/PlaxcasterFrogling.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -58,8 +59,8 @@ public class PlaxcasterFrogling extends CardImpl { public PlaxcasterFrogling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{U}"); - this.subtype.add("Frog"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.FROG); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/p/Plaxmanta.java b/Mage.Sets/src/mage/cards/p/Plaxmanta.java index fe148f7521..04f595fe6e 100644 --- a/Mage.Sets/src/mage/cards/p/Plaxmanta.java +++ b/Mage.Sets/src/mage/cards/p/Plaxmanta.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; @@ -51,7 +52,7 @@ public class Plaxmanta extends CardImpl { public Plaxmanta(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PloKoon.java b/Mage.Sets/src/mage/cards/p/PloKoon.java index 285771fd72..0b85352b67 100644 --- a/Mage.Sets/src/mage/cards/p/PloKoon.java +++ b/Mage.Sets/src/mage/cards/p/PloKoon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MeditateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class PloKoon extends CardImpl { public PloKoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("KelDor"); - this.subtype.add("Jedi"); + this.subtype.add(SubType.KELDOR); + this.subtype.add(SubType.JEDI); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PloverKnights.java b/Mage.Sets/src/mage/cards/p/PloverKnights.java index 5838a6f500..79bc4ffb46 100644 --- a/Mage.Sets/src/mage/cards/p/PloverKnights.java +++ b/Mage.Sets/src/mage/cards/p/PloverKnights.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class PloverKnights extends CardImpl { public PloverKnights(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Knight"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PlowThroughReito.java b/Mage.Sets/src/mage/cards/p/PlowThroughReito.java index 827896b12e..1b573a4656 100644 --- a/Mage.Sets/src/mage/cards/p/PlowThroughReito.java +++ b/Mage.Sets/src/mage/cards/p/PlowThroughReito.java @@ -47,7 +47,7 @@ public class PlowThroughReito extends CardImpl { public PlowThroughReito(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Sweep - Return any number of Plains you control to their owner's hand. Target creature gets +1/+1 until end of turn for each Plains returned this way. diff --git a/Mage.Sets/src/mage/cards/p/PlumesOfPeace.java b/Mage.Sets/src/mage/cards/p/PlumesOfPeace.java index 211e95487e..42c1f143d1 100644 --- a/Mage.Sets/src/mage/cards/p/PlumesOfPeace.java +++ b/Mage.Sets/src/mage/cards/p/PlumesOfPeace.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ForecastAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class PlumesOfPeace extends CardImpl { public PlumesOfPeace(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/p/Plumeveil.java b/Mage.Sets/src/mage/cards/p/Plumeveil.java index 2aba677efd..10466504e9 100644 --- a/Mage.Sets/src/mage/cards/p/Plumeveil.java +++ b/Mage.Sets/src/mage/cards/p/Plumeveil.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class Plumeveil extends CardImpl { public Plumeveil(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W/U}{W/U}{W/U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PoisonbellyOgre.java b/Mage.Sets/src/mage/cards/p/PoisonbellyOgre.java index 3280507ff6..a586cec144 100644 --- a/Mage.Sets/src/mage/cards/p/PoisonbellyOgre.java +++ b/Mage.Sets/src/mage/cards/p/PoisonbellyOgre.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SetTargetPointer; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -54,8 +55,8 @@ public class PoisonbellyOgre extends CardImpl { public PoisonbellyOgre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PolarKraken.java b/Mage.Sets/src/mage/cards/p/PolarKraken.java index adcc3bff24..e07ddc11eb 100644 --- a/Mage.Sets/src/mage/cards/p/PolarKraken.java +++ b/Mage.Sets/src/mage/cards/p/PolarKraken.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledLandPermanent; import mage.target.common.TargetControlledPermanent; @@ -47,7 +48,7 @@ public class PolarKraken extends CardImpl { public PolarKraken(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{8}{U}{U}{U}"); - this.subtype.add("Kraken"); + this.subtype.add(SubType.KRAKEN); this.power = new MageInt(11); this.toughness = new MageInt(11); diff --git a/Mage.Sets/src/mage/cards/p/PolisCrusher.java b/Mage.Sets/src/mage/cards/p/PolisCrusher.java index 2040c771c3..f93d8121e4 100644 --- a/Mage.Sets/src/mage/cards/p/PolisCrusher.java +++ b/Mage.Sets/src/mage/cards/p/PolisCrusher.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.FilterPermanent; import mage.filter.common.FilterEnchantmentPermanent; @@ -68,7 +69,7 @@ public class PolisCrusher extends CardImpl { public PolisCrusher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}"); - this.subtype.add("Cyclops"); + this.subtype.add(SubType.CYCLOPS); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PollenbrightWings.java b/Mage.Sets/src/mage/cards/p/PollenbrightWings.java index 9ad21ff906..103c6ec8c7 100644 --- a/Mage.Sets/src/mage/cards/p/PollenbrightWings.java +++ b/Mage.Sets/src/mage/cards/p/PollenbrightWings.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -62,7 +63,7 @@ public class PollenbrightWings extends CardImpl { public PollenbrightWings(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{G}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/p/PollutedDead.java b/Mage.Sets/src/mage/cards/p/PollutedDead.java index b067c16b41..628ad1df16 100644 --- a/Mage.Sets/src/mage/cards/p/PollutedDead.java +++ b/Mage.Sets/src/mage/cards/p/PollutedDead.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.Target; import mage.target.common.TargetLandPermanent; @@ -45,7 +46,7 @@ public class PollutedDead extends CardImpl { public PollutedDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PolukranosWorldEater.java b/Mage.Sets/src/mage/cards/p/PolukranosWorldEater.java index 64f7d6540d..f5de49c0af 100644 --- a/Mage.Sets/src/mage/cards/p/PolukranosWorldEater.java +++ b/Mage.Sets/src/mage/cards/p/PolukranosWorldEater.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MonstrosityAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.TargetController; @@ -79,7 +80,7 @@ public class PolukranosWorldEater extends CardImpl { public PolukranosWorldEater(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/PolymorphistsJest.java b/Mage.Sets/src/mage/cards/p/PolymorphistsJest.java index 4ad2ea1165..16075fdc1f 100644 --- a/Mage.Sets/src/mage/cards/p/PolymorphistsJest.java +++ b/Mage.Sets/src/mage/cards/p/PolymorphistsJest.java @@ -40,6 +40,7 @@ import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; import mage.constants.SubLayer; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.permanent.Permanent; @@ -108,7 +109,7 @@ class PolymorphistsJestEffect extends ContinuousEffectImpl { case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { permanent.getSubtype(game).clear(); - permanent.getSubtype(game).add("Frog"); + permanent.getSubtype(game).add(SubType.FROG); } break; diff --git a/Mage.Sets/src/mage/cards/p/PontiffOfBlight.java b/Mage.Sets/src/mage/cards/p/PontiffOfBlight.java index 55fb6498d1..58ce9ca53a 100644 --- a/Mage.Sets/src/mage/cards/p/PontiffOfBlight.java +++ b/Mage.Sets/src/mage/cards/p/PontiffOfBlight.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ExtortAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -59,8 +60,8 @@ public class PontiffOfBlight extends CardImpl { public PontiffOfBlight (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/p/PonybackBrigade.java b/Mage.Sets/src/mage/cards/p/PonybackBrigade.java index 1707a729d4..d5d5fdc546 100644 --- a/Mage.Sets/src/mage/cards/p/PonybackBrigade.java +++ b/Mage.Sets/src/mage/cards/p/PonybackBrigade.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -52,8 +53,8 @@ public class PonybackBrigade extends CardImpl { public PonybackBrigade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{W}{B}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PoolingVenom.java b/Mage.Sets/src/mage/cards/p/PoolingVenom.java index 51e613a8bd..7dee14c8c2 100644 --- a/Mage.Sets/src/mage/cards/p/PoolingVenom.java +++ b/Mage.Sets/src/mage/cards/p/PoolingVenom.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -52,7 +53,7 @@ public class PoolingVenom extends CardImpl { public PoolingVenom(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/p/PorcelainLegionnaire.java b/Mage.Sets/src/mage/cards/p/PorcelainLegionnaire.java index 474daa00ac..d771cbfe67 100644 --- a/Mage.Sets/src/mage/cards/p/PorcelainLegionnaire.java +++ b/Mage.Sets/src/mage/cards/p/PorcelainLegionnaire.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class PorcelainLegionnaire extends CardImpl { public PorcelainLegionnaire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{W/P}"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PortalMage.java b/Mage.Sets/src/mage/cards/p/PortalMage.java index 7fa82ce8f2..bf51b9c413 100644 --- a/Mage.Sets/src/mage/cards/p/PortalMage.java +++ b/Mage.Sets/src/mage/cards/p/PortalMage.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.PhaseStep; import mage.filter.StaticFilters; @@ -60,8 +61,8 @@ public class PortalMage extends CardImpl { public PortalMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PossessedAven.java b/Mage.Sets/src/mage/cards/p/PossessedAven.java index 2110e97862..3b26e6503e 100644 --- a/Mage.Sets/src/mage/cards/p/PossessedAven.java +++ b/Mage.Sets/src/mage/cards/p/PossessedAven.java @@ -47,6 +47,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -67,9 +68,9 @@ public class PossessedAven extends CardImpl { public PossessedAven(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); - this.subtype.add("Horror"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PossessedBarbarian.java b/Mage.Sets/src/mage/cards/p/PossessedBarbarian.java index 3e5c797604..b9e6ae864f 100644 --- a/Mage.Sets/src/mage/cards/p/PossessedBarbarian.java +++ b/Mage.Sets/src/mage/cards/p/PossessedBarbarian.java @@ -47,6 +47,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -67,9 +68,9 @@ public class PossessedBarbarian extends CardImpl { public PossessedBarbarian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Barbarian"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BARBARIAN); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PossessedCentaur.java b/Mage.Sets/src/mage/cards/p/PossessedCentaur.java index 4340b8cd91..6a23ff0700 100644 --- a/Mage.Sets/src/mage/cards/p/PossessedCentaur.java +++ b/Mage.Sets/src/mage/cards/p/PossessedCentaur.java @@ -47,6 +47,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -67,8 +68,8 @@ public class PossessedCentaur extends CardImpl { public PossessedCentaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Horror"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PossessedNomad.java b/Mage.Sets/src/mage/cards/p/PossessedNomad.java index 2f6fdd7305..2c11681173 100644 --- a/Mage.Sets/src/mage/cards/p/PossessedNomad.java +++ b/Mage.Sets/src/mage/cards/p/PossessedNomad.java @@ -47,6 +47,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -67,9 +68,9 @@ public class PossessedNomad extends CardImpl { public PossessedNomad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PossessedSkaab.java b/Mage.Sets/src/mage/cards/p/PossessedSkaab.java index 9697db8dd0..ea4c55b370 100644 --- a/Mage.Sets/src/mage/cards/p/PossessedSkaab.java +++ b/Mage.Sets/src/mage/cards/p/PossessedSkaab.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -68,7 +69,7 @@ public class PossessedSkaab extends CardImpl { public PossessedSkaab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PoulticeSliver.java b/Mage.Sets/src/mage/cards/p/PoulticeSliver.java index 86e389d9ba..079aab0ce4 100644 --- a/Mage.Sets/src/mage/cards/p/PoulticeSliver.java +++ b/Mage.Sets/src/mage/cards/p/PoulticeSliver.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.GainAbilityAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -52,7 +53,7 @@ public class PoulticeSliver extends CardImpl { public PoulticeSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -65,7 +66,7 @@ public class PoulticeSliver extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, - "Slivers have \"{2}, {T}: Regenerate target Sliver.\""))); + "All Slivers have \"{2}, {T}: Regenerate target Sliver.\""))); } public PoulticeSliver(final PoulticeSliver card) { diff --git a/Mage.Sets/src/mage/cards/p/Pounce.java b/Mage.Sets/src/mage/cards/p/Pounce.java new file mode 100644 index 0000000000..bad2a9a461 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/Pounce.java @@ -0,0 +1,72 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.abilities.effects.common.FightTargetsEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.Target; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class Pounce extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control"); + + static { + filter.add(new ControllerPredicate(TargetController.NOT_YOU)); + } + + public Pounce(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}"); + + // Target creature you control fights target creature you don't control. + this.getSpellAbility().addEffect(new FightTargetsEffect()); + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + Target target = new TargetCreaturePermanent(filter); + this.getSpellAbility().addTarget(target); + } + + public Pounce(final Pounce card) { + super(card); + } + + @Override + public Pounce copy() { + return new Pounce(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PouncingCheetah.java b/Mage.Sets/src/mage/cards/p/PouncingCheetah.java index 06178c9da0..1daaa78b3e 100644 --- a/Mage.Sets/src/mage/cards/p/PouncingCheetah.java +++ b/Mage.Sets/src/mage/cards/p/PouncingCheetah.java @@ -6,6 +6,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Stravant @@ -14,7 +15,7 @@ public class PouncingCheetah extends CardImpl { public PouncingCheetah(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PouncingJaguar.java b/Mage.Sets/src/mage/cards/p/PouncingJaguar.java index 8ae999baec..64987260aa 100644 --- a/Mage.Sets/src/mage/cards/p/PouncingJaguar.java +++ b/Mage.Sets/src/mage/cards/p/PouncingJaguar.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class PouncingJaguar extends CardImpl { public PouncingJaguar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PouncingKavu.java b/Mage.Sets/src/mage/cards/p/PouncingKavu.java index 44a9e21208..45470aa7a2 100644 --- a/Mage.Sets/src/mage/cards/p/PouncingKavu.java +++ b/Mage.Sets/src/mage/cards/p/PouncingKavu.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.counters.CounterType; @@ -53,7 +54,7 @@ public class PouncingKavu extends CardImpl { public PouncingKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PouncingWurm.java b/Mage.Sets/src/mage/cards/p/PouncingWurm.java index 5e1e2a6c29..1a56ae0a30 100644 --- a/Mage.Sets/src/mage/cards/p/PouncingWurm.java +++ b/Mage.Sets/src/mage/cards/p/PouncingWurm.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.counters.CounterType; @@ -51,7 +52,7 @@ public class PouncingWurm extends CardImpl { public PouncingWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PowderKeg.java b/Mage.Sets/src/mage/cards/p/PowderKeg.java index 25dacb3504..b0a087c32b 100644 --- a/Mage.Sets/src/mage/cards/p/PowderKeg.java +++ b/Mage.Sets/src/mage/cards/p/PowderKeg.java @@ -38,10 +38,15 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.game.permanent.Permanent; @@ -58,8 +63,8 @@ public class PowderKeg extends CardImpl { this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.FUSE.createInstance(), true), TargetController.YOU, true)); // {T}, Sacrifice Powder Keg: Destroy each artifact and creature with converted mana cost equal to the number of fuse counters on Powder Keg. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PowderKegEffect(), new SacrificeSourceCost()); - ability.addCost(new TapSourceCost()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PowderKegEffect(), new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); } @@ -77,7 +82,7 @@ class PowderKegEffect extends OneShotEffect { public PowderKegEffect() { super(Outcome.DestroyPermanent); - staticText = "Destroy each artifact and creature with converted mana cost equal to the number of fuse counters on Powder Keg {this}"; + staticText = "Destroy each artifact and creature with converted mana cost equal to the number of fuse counters on {this}"; } public PowderKegEffect(final PowderKegEffect effect) { @@ -86,22 +91,17 @@ class PowderKegEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Permanent p = game.getBattlefield().getPermanent(source.getSourceId()); - if (p == null) { - p = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); - if (p == null) { - return false; - } + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (sourcePermanent == null) { + return false; } - - int count = p.getCounters(game).getCount(CounterType.FUSE); - for (Permanent perm : game.getBattlefield().getAllActivePermanents()) { - if (perm.getConvertedManaCost() == count && ((perm.isArtifact()) - || (perm.isCreature()))) { - perm.destroy(source.getSourceId(), game, false); - } + int count = sourcePermanent.getCounters(game).getCount(CounterType.FUSE); + FilterPermanent filter = new FilterPermanent(); + filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.CREATURE))); + filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, count)); + for (Permanent perm : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { + perm.destroy(source.getSourceId(), game, false); } - return true; } diff --git a/Mage.Sets/src/mage/cards/p/PowerArmor.java b/Mage.Sets/src/mage/cards/p/PowerArmor.java index 11fce7c8ca..ae96023b0f 100644 --- a/Mage.Sets/src/mage/cards/p/PowerArmor.java +++ b/Mage.Sets/src/mage/cards/p/PowerArmor.java @@ -36,6 +36,7 @@ import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,13 +49,14 @@ import mage.target.common.TargetCreaturePermanent; public class PowerArmor extends CardImpl { public PowerArmor(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); // Domain - {3}, {tap}: Target creature gets +1/+1 until end of turn for each basic land type among lands you control. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect( new DomainValue(), new DomainValue(), Duration.EndOfTurn), new TapSourceCost()); ability.addCost(new ManaCostsImpl("{3}")); ability.addTarget(new TargetCreaturePermanent()); + ability.setAbilityWord(AbilityWord.DOMAIN); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PowerArtifact.java b/Mage.Sets/src/mage/cards/p/PowerArtifact.java index 25337c32c5..24b9eaa09b 100644 --- a/Mage.Sets/src/mage/cards/p/PowerArtifact.java +++ b/Mage.Sets/src/mage/cards/p/PowerArtifact.java @@ -17,6 +17,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.CostModificationType; import mage.constants.Duration; import mage.constants.Outcome; @@ -36,7 +37,7 @@ public class PowerArtifact extends CardImpl { public PowerArtifact(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant artifact TargetPermanent auraTarget = new TargetArtifactPermanent(); diff --git a/Mage.Sets/src/mage/cards/p/PowerOfFire.java b/Mage.Sets/src/mage/cards/p/PowerOfFire.java index 1c88480df7..df227e5011 100644 --- a/Mage.Sets/src/mage/cards/p/PowerOfFire.java +++ b/Mage.Sets/src/mage/cards/p/PowerOfFire.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class PowerOfFire extends CardImpl { public PowerOfFire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/p/Powerleech.java b/Mage.Sets/src/mage/cards/p/Powerleech.java index 6b46809e8e..ed876daebf 100644 --- a/Mage.Sets/src/mage/cards/p/Powerleech.java +++ b/Mage.Sets/src/mage/cards/p/Powerleech.java @@ -29,6 +29,8 @@ package mage.cards.p; import java.util.UUID; import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -37,18 +39,20 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; +import mage.game.stack.StackAbility; +import mage.players.Player; /** * - * @author MarcoMarin + * @author TheElk801 */ public class Powerleech extends CardImpl { public Powerleech(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}{G}"); // Whenever an artifact an opponent controls becomes tapped or an opponent activates an artifact's ability without {tap} in its activation cost, you gain 1 life. - this.addAbility(new AbilityActivatedTriggeredAbility3()); + this.addAbility(new PowerleechTriggeredAbility()); } public Powerleech(final Powerleech card) { @@ -60,37 +64,67 @@ public class Powerleech extends CardImpl { return new Powerleech(this); } } -class AbilityActivatedTriggeredAbility3 extends TriggeredAbilityImpl { - AbilityActivatedTriggeredAbility3() { +class PowerleechTriggeredAbility extends TriggeredAbilityImpl { + + PowerleechTriggeredAbility() { super(Zone.BATTLEFIELD, new GainLifeEffect(1)); } - AbilityActivatedTriggeredAbility3(final AbilityActivatedTriggeredAbility3 ability) { + PowerleechTriggeredAbility(final PowerleechTriggeredAbility ability) { super(ability); } @Override - public AbilityActivatedTriggeredAbility3 copy() { - return new AbilityActivatedTriggeredAbility3(this); + public PowerleechTriggeredAbility copy() { + return new PowerleechTriggeredAbility(this); } @Override public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.ACTIVATED_ABILITY || - event.getType() == GameEvent.EventType.TAPPED; + return event.getType() == GameEvent.EventType.ACTIVATED_ABILITY + || event.getType() == GameEvent.EventType.TAPPED; } @Override public boolean checkTrigger(GameEvent event, Game game) { - Permanent isArtifact = game.getPermanent(event.getSourceId()); - return isArtifact != null && isArtifact.isArtifact() && - !isArtifact.getControllerId().equals(this.getControllerId()); - + Player player = game.getPlayer(controllerId); + if (player == null) { + return false; + } + if (event.getType() == GameEvent.EventType.ACTIVATED_ABILITY) { + Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId()); + if (permanent == null || !permanent.isArtifact()) { + return false; + } + StackAbility stackAbility = (StackAbility) game.getStack().getStackObject(event.getSourceId()); + if (stackAbility == null) { + return false; + } + boolean triggerable = true; + for (Cost cost : stackAbility.getCosts()) { + if (cost instanceof TapSourceCost) { + triggerable = false; + break; + } + } + if (!triggerable) { + return false; + } + return player.hasOpponent(permanent.getControllerId(), game); + } + if (event.getType() == GameEvent.EventType.TAPPED) { + Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId()); + if (permanent == null || !permanent.isArtifact()) { + return false; + } + return player.hasOpponent(permanent.getControllerId(), game); + } + return false; } @Override public String getRule() { - return "Whenever an artifact an opponent controls becomes tapped or an opponent activates an artifact's ability without {tap} in its activation cost, you gain 1 life."; + return "Whenever an artifact an opponent controls becomes tapped or an opponent activates an artifact's ability without {T} in its activation cost, you gain 1 life."; } } diff --git a/Mage.Sets/src/mage/cards/p/PradeshGypsies.java b/Mage.Sets/src/mage/cards/p/PradeshGypsies.java index 528438a142..034651fd7b 100644 --- a/Mage.Sets/src/mage/cards/p/PradeshGypsies.java +++ b/Mage.Sets/src/mage/cards/p/PradeshGypsies.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class PradeshGypsies extends CardImpl { public PradeshGypsies(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PrairieStream.java b/Mage.Sets/src/mage/cards/p/PrairieStream.java index 483d2d1ec5..910803683f 100644 --- a/Mage.Sets/src/mage/cards/p/PrairieStream.java +++ b/Mage.Sets/src/mage/cards/p/PrairieStream.java @@ -39,6 +39,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.SuperType; import mage.filter.common.FilterLandPermanent; @@ -58,8 +59,8 @@ public class PrairieStream extends CardImpl { public PrairieStream(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Plains"); - this.subtype.add("Island"); + this.subtype.add(SubType.PLAINS); + this.subtype.add(SubType.ISLAND); // Prairie Stream enters the battlefield tapped unless you control two or more basic lands. Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1)); diff --git a/Mage.Sets/src/mage/cards/p/PrakhataClubSecurity.java b/Mage.Sets/src/mage/cards/p/PrakhataClubSecurity.java index d1054cc819..f8a4c64ab8 100644 --- a/Mage.Sets/src/mage/cards/p/PrakhataClubSecurity.java +++ b/Mage.Sets/src/mage/cards/p/PrakhataClubSecurity.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class PrakhataClubSecurity extends CardImpl { public PrakhataClubSecurity(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Aetherborn"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.AETHERBORN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(4); } diff --git a/Mage.Sets/src/mage/cards/p/PrakhataPillarBug.java b/Mage.Sets/src/mage/cards/p/PrakhataPillarBug.java index 91fe9c1802..61c7e4a90d 100644 --- a/Mage.Sets/src/mage/cards/p/PrakhataPillarBug.java +++ b/Mage.Sets/src/mage/cards/p/PrakhataPillarBug.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class PrakhataPillarBug extends CardImpl { public PrakhataPillarBug(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/Preacher.java b/Mage.Sets/src/mage/cards/p/Preacher.java index 653197552f..fd3e5522a4 100644 --- a/Mage.Sets/src/mage/cards/p/Preacher.java +++ b/Mage.Sets/src/mage/cards/p/Preacher.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -59,8 +60,8 @@ public class Preacher extends CardImpl { public Preacher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PrecinctCaptain.java b/Mage.Sets/src/mage/cards/p/PrecinctCaptain.java index 6caa2b3c82..420e366593 100644 --- a/Mage.Sets/src/mage/cards/p/PrecinctCaptain.java +++ b/Mage.Sets/src/mage/cards/p/PrecinctCaptain.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.SoldierToken; /** @@ -45,8 +46,8 @@ public class PrecinctCaptain extends CardImpl { public PrecinctCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PrecipiceOfMortis.java b/Mage.Sets/src/mage/cards/p/PrecipiceOfMortis.java index 22f99b7ff7..cad4f3e7fb 100644 --- a/Mage.Sets/src/mage/cards/p/PrecipiceOfMortis.java +++ b/Mage.Sets/src/mage/cards/p/PrecipiceOfMortis.java @@ -1,134 +1,132 @@ -/* - * 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.cards.p; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.ReplacementEffectImpl; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.EntersTheBattlefieldEvent; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.events.NumberOfTriggersEvent; -import mage.game.events.ZoneChangeEvent; - -/** - * - * @author Styxo - */ -public class PrecipiceOfMortis extends CardImpl { - - public PrecipiceOfMortis(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}{U}{W}"); - - // If a Jedi entering or leaving the battlefield causes a triggered ability of a permanent you control to trigger, that ability triggers additional time - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PrecipiceOfMortisEffect())); - - } - - public PrecipiceOfMortis(final PrecipiceOfMortis card) { - super(card); - } - - @Override - public PrecipiceOfMortis copy() { - return new PrecipiceOfMortis(this); - } -} - -class PrecipiceOfMortisEffect extends ReplacementEffectImpl { - - public PrecipiceOfMortisEffect() { - super(Duration.WhileOnBattlefield, Outcome.Benefit); - staticText = "If a Jedi entering or leaving the battlefield causes a triggered ability of a permanent you control to trigger, that ability triggers additional time"; - } - - public PrecipiceOfMortisEffect(final PrecipiceOfMortisEffect effect) { - super(effect); - } - - @Override - public PrecipiceOfMortisEffect copy() { - return new PrecipiceOfMortisEffect(this); - } - - @Override - public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == EventType.NUMBER_OF_TRIGGERS; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - if (event instanceof NumberOfTriggersEvent) { - NumberOfTriggersEvent numberOfTriggersEvent = (NumberOfTriggersEvent) event; - // Only triggers of the controller of Precipice of Mortis - if (source.getControllerId().equals(event.getPlayerId())) { - GameEvent sourceEvent = numberOfTriggersEvent.getSourceEvent(); - // enters triggers - if (sourceEvent.getType() == EventType.ENTERS_THE_BATTLEFIELD && sourceEvent instanceof EntersTheBattlefieldEvent) { - EntersTheBattlefieldEvent entersTheBattlefieldEvent = (EntersTheBattlefieldEvent) sourceEvent; - // Only for entering Jedis - if (entersTheBattlefieldEvent.getTarget().getSubtype(game).contains("Jedi")) { - // Only for triggers of permanents - if (game.getPermanent(numberOfTriggersEvent.getSourceId()) != null) { - return true; - } - } - } - // leaves triggers - if (sourceEvent.getType() == EventType.ZONE_CHANGE && sourceEvent instanceof ZoneChangeEvent) { - ZoneChangeEvent leavesTheBattlefieldEvent = (ZoneChangeEvent) sourceEvent; - if (leavesTheBattlefieldEvent.getFromZone() == Zone.BATTLEFIELD) { - // Only for leaving Jedis - if (leavesTheBattlefieldEvent.getTarget().getSubtype(game).contains("Jedi")) { - // Only for triggers of permanents - if (game.getPermanent(numberOfTriggersEvent.getSourceId()) != null) { - return true; - } - } - } - - } - } - } - return false; - } - - @Override - public boolean replaceEvent(GameEvent event, Ability source, Game game) { - event.setAmount(event.getAmount() + 1); - return false; - } -} +/* + * 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.cards.p; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Game; +import mage.game.events.EntersTheBattlefieldEvent; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.events.NumberOfTriggersEvent; +import mage.game.events.ZoneChangeEvent; + +import java.util.UUID; + +/** + * + * @author Styxo + */ +public class PrecipiceOfMortis extends CardImpl { + + public PrecipiceOfMortis(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}{U}{W}"); + + // If a Jedi entering or leaving the battlefield causes a triggered ability of a permanent you control to trigger, that ability triggers additional time + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PrecipiceOfMortisEffect())); + + } + + public PrecipiceOfMortis(final PrecipiceOfMortis card) { + super(card); + } + + @Override + public PrecipiceOfMortis copy() { + return new PrecipiceOfMortis(this); + } +} + +class PrecipiceOfMortisEffect extends ReplacementEffectImpl { + + public PrecipiceOfMortisEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = "If a Jedi entering or leaving the battlefield causes a triggered ability of a permanent you control to trigger, that ability triggers additional time"; + } + + public PrecipiceOfMortisEffect(final PrecipiceOfMortisEffect effect) { + super(effect); + } + + @Override + public PrecipiceOfMortisEffect copy() { + return new PrecipiceOfMortisEffect(this); + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == EventType.NUMBER_OF_TRIGGERS; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event instanceof NumberOfTriggersEvent) { + NumberOfTriggersEvent numberOfTriggersEvent = (NumberOfTriggersEvent) event; + // Only triggers of the controller of Precipice of Mortis + if (source.getControllerId().equals(event.getPlayerId())) { + GameEvent sourceEvent = numberOfTriggersEvent.getSourceEvent(); + // enters triggers + if (sourceEvent.getType() == EventType.ENTERS_THE_BATTLEFIELD && sourceEvent instanceof EntersTheBattlefieldEvent) { + EntersTheBattlefieldEvent entersTheBattlefieldEvent = (EntersTheBattlefieldEvent) sourceEvent; + // Only for entering Jedis + if (entersTheBattlefieldEvent.getTarget().hasSubtype(SubType.JEDI, game)) { + // Only for triggers of permanents + if (game.getPermanent(numberOfTriggersEvent.getSourceId()) != null) { + return true; + } + } + } + // leaves triggers + if (sourceEvent.getType() == EventType.ZONE_CHANGE && sourceEvent instanceof ZoneChangeEvent) { + ZoneChangeEvent leavesTheBattlefieldEvent = (ZoneChangeEvent) sourceEvent; + if (leavesTheBattlefieldEvent.getFromZone() == Zone.BATTLEFIELD) { + // Only for leaving Jedis + if (leavesTheBattlefieldEvent.getTarget().hasSubtype(SubType.JEDI, game)) { + // Only for triggers of permanents + if (game.getPermanent(numberOfTriggersEvent.getSourceId()) != null) { + return true; + } + } + } + + } + } + } + return false; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + event.setAmount(event.getAmount() + 1); + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/p/PrecursorGolem.java b/Mage.Sets/src/mage/cards/p/PrecursorGolem.java index b648ca2c4a..9eb0e305c5 100644 --- a/Mage.Sets/src/mage/cards/p/PrecursorGolem.java +++ b/Mage.Sets/src/mage/cards/p/PrecursorGolem.java @@ -58,7 +58,7 @@ public class PrecursorGolem extends CardImpl { public PrecursorGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PredatorDragon.java b/Mage.Sets/src/mage/cards/p/PredatorDragon.java index 11d8d58e36..952d1e9556 100644 --- a/Mage.Sets/src/mage/cards/p/PredatorDragon.java +++ b/Mage.Sets/src/mage/cards/p/PredatorDragon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class PredatorDragon extends CardImpl { public PredatorDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PredatorOoze.java b/Mage.Sets/src/mage/cards/p/PredatorOoze.java index 65fb0d6251..54b97fe05e 100644 --- a/Mage.Sets/src/mage/cards/p/PredatorOoze.java +++ b/Mage.Sets/src/mage/cards/p/PredatorOoze.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -46,7 +47,7 @@ public class PredatorOoze extends CardImpl { public PredatorOoze(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}{G}"); - this.subtype.add("Ooze"); + this.subtype.add(SubType.OOZE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PredatorsGambit.java b/Mage.Sets/src/mage/cards/p/PredatorsGambit.java index f1495f0198..8787cfbc0c 100644 --- a/Mage.Sets/src/mage/cards/p/PredatorsGambit.java +++ b/Mage.Sets/src/mage/cards/p/PredatorsGambit.java @@ -53,7 +53,7 @@ public class PredatorsGambit extends CardImpl { public PredatorsGambit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/p/PredatoryHunger.java b/Mage.Sets/src/mage/cards/p/PredatoryHunger.java new file mode 100644 index 0000000000..333208e50a --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PredatoryHunger.java @@ -0,0 +1,81 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.constants.SubType; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.counter.AddCountersAttachedEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; + +/** + * + * @author TheElk801 + */ +public class PredatoryHunger extends CardImpl { + + public PredatoryHunger(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Whenever an opponent casts a creature spell, put a +1/+1 counter on enchanted creature. + this.addAbility(new SpellCastOpponentTriggeredAbility( + new AddCountersAttachedEffect( + CounterType.P1P1.createInstance(), + "enchanted creature" + ), StaticFilters.FILTER_SPELL_A_CREATURE, false + )); + } + + public PredatoryHunger(final PredatoryHunger card) { + super(card); + } + + @Override + public PredatoryHunger copy() { + return new PredatoryHunger(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PredatoryNightstalker.java b/Mage.Sets/src/mage/cards/p/PredatoryNightstalker.java index 82a33d9aaa..24971923d7 100644 --- a/Mage.Sets/src/mage/cards/p/PredatoryNightstalker.java +++ b/Mage.Sets/src/mage/cards/p/PredatoryNightstalker.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.SacrificeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetOpponent; @@ -46,7 +47,7 @@ public class PredatoryNightstalker extends CardImpl { public PredatoryNightstalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Nightstalker"); + this.subtype.add(SubType.NIGHTSTALKER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PredatorySliver.java b/Mage.Sets/src/mage/cards/p/PredatorySliver.java index 13008c45ff..9a8f44527c 100644 --- a/Mage.Sets/src/mage/cards/p/PredatorySliver.java +++ b/Mage.Sets/src/mage/cards/p/PredatorySliver.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -46,7 +47,7 @@ public class PredatorySliver extends CardImpl { public PredatorySliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PredatoryUrge.java b/Mage.Sets/src/mage/cards/p/PredatoryUrge.java index fd07b834ee..a3edc77319 100644 --- a/Mage.Sets/src/mage/cards/p/PredatoryUrge.java +++ b/Mage.Sets/src/mage/cards/p/PredatoryUrge.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -54,7 +55,7 @@ public class PredatoryUrge extends CardImpl { public PredatoryUrge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/p/PreeminentCaptain.java b/Mage.Sets/src/mage/cards/p/PreeminentCaptain.java index 5b3c0cd2a3..a49ff3ea02 100644 --- a/Mage.Sets/src/mage/cards/p/PreeminentCaptain.java +++ b/Mage.Sets/src/mage/cards/p/PreeminentCaptain.java @@ -55,8 +55,8 @@ public class PreeminentCaptain extends CardImpl { public PreeminentCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PrescientChimera.java b/Mage.Sets/src/mage/cards/p/PrescientChimera.java index 1bfed46391..8f85aa8de2 100644 --- a/Mage.Sets/src/mage/cards/p/PrescientChimera.java +++ b/Mage.Sets/src/mage/cards/p/PrescientChimera.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; /** @@ -45,7 +46,7 @@ public class PrescientChimera extends CardImpl { public PrescientChimera(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Chimera"); + this.subtype.add(SubType.CHIMERA); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PresenceOfGond.java b/Mage.Sets/src/mage/cards/p/PresenceOfGond.java index a8bb085441..7867daff6b 100644 --- a/Mage.Sets/src/mage/cards/p/PresenceOfGond.java +++ b/Mage.Sets/src/mage/cards/p/PresenceOfGond.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class PresenceOfGond extends CardImpl { public PresenceOfGond(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/p/PreyseizerDragon.java b/Mage.Sets/src/mage/cards/p/PreyseizerDragon.java index ff1158c2e6..8fb9bf3669 100644 --- a/Mage.Sets/src/mage/cards/p/PreyseizerDragon.java +++ b/Mage.Sets/src/mage/cards/p/PreyseizerDragon.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetCreatureOrPlayer; @@ -50,7 +51,7 @@ public class PreyseizerDragon extends CardImpl { public PreyseizerDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PriceOfGlory.java b/Mage.Sets/src/mage/cards/p/PriceOfGlory.java index 35e30e70bf..8f039fcdad 100644 --- a/Mage.Sets/src/mage/cards/p/PriceOfGlory.java +++ b/Mage.Sets/src/mage/cards/p/PriceOfGlory.java @@ -50,8 +50,7 @@ import mage.target.targetpointer.FixedTarget; public class PriceOfGlory extends CardImpl { public PriceOfGlory(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); // Whenever a player taps a land for mana, if it's not that player's turn, destroy that land. this.addAbility(new PriceOfGloryAbility()); @@ -86,11 +85,16 @@ class PriceOfGloryAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - Permanent permanent = game.getPermanent(event.getSourceId()); + Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId()); if (permanent == null) { - permanent = (Permanent) game.getLastKnownInformation(event.getSourceId(), Zone.BATTLEFIELD); + return false; } - if (permanent != null && permanent.isLand() + Player player = game.getPlayer(controllerId); + if (player == null) { + return false; + } + if (permanent.isLand() + && player.getInRange().contains(permanent.getControllerId()) && !permanent.getControllerId().equals(game.getActivePlayerId())) { // intervening if clause getEffects().get(0).setTargetPointer(new FixedTarget(permanent.getId())); return true; @@ -125,7 +129,7 @@ class PriceOfGloryEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Permanent land = game.getPermanentOrLKIBattlefield(this.targetPointer.getFirst(game, source)); - if (land != null && !land.getControllerId().equals(game.getActivePlayerId())) { // intervening if clause has to be checked again + if (land != null && !land.getControllerId().equals(game.getActivePlayerId())) { // intervening if clause has to be checked again land.destroy(source.getSourceId(), game, false); } return true; diff --git a/Mage.Sets/src/mage/cards/p/Prickleboar.java b/Mage.Sets/src/mage/cards/p/Prickleboar.java index 10005f831b..a5038ba4de 100644 --- a/Mage.Sets/src/mage/cards/p/Prickleboar.java +++ b/Mage.Sets/src/mage/cards/p/Prickleboar.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class Prickleboar extends CardImpl { public Prickleboar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Boar"); + this.subtype.add(SubType.BOAR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PricklyBoggart.java b/Mage.Sets/src/mage/cards/p/PricklyBoggart.java index 3123f1bd75..596fcb4e36 100644 --- a/Mage.Sets/src/mage/cards/p/PricklyBoggart.java +++ b/Mage.Sets/src/mage/cards/p/PricklyBoggart.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class PricklyBoggart extends CardImpl { public PricklyBoggart(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PrideGuardian.java b/Mage.Sets/src/mage/cards/p/PrideGuardian.java index f6d406f5af..b6a00f06c4 100644 --- a/Mage.Sets/src/mage/cards/p/PrideGuardian.java +++ b/Mage.Sets/src/mage/cards/p/PrideGuardian.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -44,8 +45,8 @@ public class PrideGuardian extends CardImpl { public PrideGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Cat"); - this.subtype.add("Monk"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.MONK); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PrideOfLions.java b/Mage.Sets/src/mage/cards/p/PrideOfLions.java index 9be6b9787f..881a865c3b 100644 --- a/Mage.Sets/src/mage/cards/p/PrideOfLions.java +++ b/Mage.Sets/src/mage/cards/p/PrideOfLions.java @@ -33,6 +33,7 @@ import mage.abilities.common.DamageAsThoughNotBlockedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class PrideOfLions extends CardImpl { public PrideOfLions(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PrideOfTheClouds.java b/Mage.Sets/src/mage/cards/p/PrideOfTheClouds.java index 118cf77d1d..3afa71fcdb 100644 --- a/Mage.Sets/src/mage/cards/p/PrideOfTheClouds.java +++ b/Mage.Sets/src/mage/cards/p/PrideOfTheClouds.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.ForecastAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -61,8 +62,8 @@ public class PrideOfTheClouds extends CardImpl { public PrideOfTheClouds(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}"); - this.subtype.add("Elemental"); - this.subtype.add("Cat"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.CAT); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -93,7 +94,7 @@ public class PrideOfTheClouds extends CardImpl { cardType.add(CardType.CREATURE); color.setWhite(true); color.setBlue(true); - subtype.add("Bird"); + subtype.add(SubType.BIRD); power = new MageInt(1); toughness = new MageInt(1); addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/p/PrideSovereign.java b/Mage.Sets/src/mage/cards/p/PrideSovereign.java index 5ab7e90fc5..386a7c5042 100644 --- a/Mage.Sets/src/mage/cards/p/PrideSovereign.java +++ b/Mage.Sets/src/mage/cards/p/PrideSovereign.java @@ -58,7 +58,7 @@ public class PrideSovereign extends CardImpl { public PrideSovereign(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PriestOfGix.java b/Mage.Sets/src/mage/cards/p/PriestOfGix.java index 3050d1d489..5442756a88 100644 --- a/Mage.Sets/src/mage/cards/p/PriestOfGix.java +++ b/Mage.Sets/src/mage/cards/p/PriestOfGix.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.BasicManaEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,9 +45,9 @@ public class PriestOfGix extends CardImpl { public PriestOfGix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Minion"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.MINION); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PriestOfIroas.java b/Mage.Sets/src/mage/cards/p/PriestOfIroas.java index 9f47687de2..9839cf032a 100644 --- a/Mage.Sets/src/mage/cards/p/PriestOfIroas.java +++ b/Mage.Sets/src/mage/cards/p/PriestOfIroas.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetEnchantmentPermanent; @@ -48,8 +49,8 @@ public class PriestOfIroas extends CardImpl { public PriestOfIroas(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PriestOfTheBloodRite.java b/Mage.Sets/src/mage/cards/p/PriestOfTheBloodRite.java index 6f2b6b4057..e8999b9ae1 100644 --- a/Mage.Sets/src/mage/cards/p/PriestOfTheBloodRite.java +++ b/Mage.Sets/src/mage/cards/p/PriestOfTheBloodRite.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.game.permanent.token.DemonToken; @@ -47,8 +48,8 @@ public class PriestOfTheBloodRite extends CardImpl { public PriestOfTheBloodRite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PriestOfTheWakeningSun.java b/Mage.Sets/src/mage/cards/p/PriestOfTheWakeningSun.java new file mode 100644 index 0000000000..6abcebba75 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PriestOfTheWakeningSun.java @@ -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.cards.p; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInHand; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author spjspj + */ +public class PriestOfTheWakeningSun extends CardImpl { + + private static final FilterCard filter = new FilterCard("Dinosaur card"); + + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + } + + public PriestOfTheWakeningSun(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // At the beginning of your upkeep, you may reveal a Dinosaur card from your hand. If you do, you gain 2 life. + Ability ability = new BeginningOfUpkeepTriggeredAbility(new PriestOfTheWakeningSunEffect(), TargetController.YOU, true); + this.addAbility(ability); + + // {3}{W}{W}, Sacrifice Priest of the Wakening Sun: Search your library for a Dinosaur card, reveal it, put it into your hand, then shuffle your library. + TargetCardInLibrary target = new TargetCardInLibrary(filter); + Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInHandEffect(new TargetCardInLibrary(target), true, true), new ManaCostsImpl("{3}{W}{W}")); + ability2.addCost(new SacrificeSourceCost()); + this.addAbility(ability2); + } + + public PriestOfTheWakeningSun(final PriestOfTheWakeningSun card) { + super(card); + } + + @Override + public PriestOfTheWakeningSun copy() { + return new PriestOfTheWakeningSun(this); + } +} + +class PriestOfTheWakeningSunEffect extends OneShotEffect { + + private static final FilterCard filter = new FilterCard("a Dinosaur card to reveal"); + + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + } + + PriestOfTheWakeningSunEffect() { + super(Outcome.Benefit); + this.staticText = "reveal a Dinosaur card from your hand. If you do, you gain 2 life"; + } + + PriestOfTheWakeningSunEffect(final PriestOfTheWakeningSunEffect effect) { + super(effect); + } + + @Override + public PriestOfTheWakeningSunEffect copy() { + return new PriestOfTheWakeningSunEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + + if (controller != null && sourceObject != null) { + if (controller.getHand().count(filter, source.getSourceId(), source.getControllerId(), game) > 0) { + if (controller.chooseUse(outcome, "Reveal a Dinosaur card?", source, game)) { + TargetCardInHand target = new TargetCardInHand(0, 1, filter); + if (controller.chooseTarget(outcome, target, source, game) && !target.getTargets().isEmpty()) { + Cards cards = new CardsImpl(); + cards.addAll(target.getTargets()); + controller.revealCards(sourceObject.getIdName(), cards, game); + controller.gainLife(2, game); + return true; + } + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/p/PriestOfTitania.java b/Mage.Sets/src/mage/cards/p/PriestOfTitania.java index f57150f47c..3e4040ebf9 100644 --- a/Mage.Sets/src/mage/cards/p/PriestOfTitania.java +++ b/Mage.Sets/src/mage/cards/p/PriestOfTitania.java @@ -54,8 +54,8 @@ public class PriestOfTitania extends CardImpl { public PriestOfTitania(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PriestOfUrabrask.java b/Mage.Sets/src/mage/cards/p/PriestOfUrabrask.java index b09e587aed..18dc653603 100644 --- a/Mage.Sets/src/mage/cards/p/PriestOfUrabrask.java +++ b/Mage.Sets/src/mage/cards/p/PriestOfUrabrask.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.BasicManaEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class PriestOfUrabrask extends CardImpl { public PriestOfUrabrask(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PriestOfYawgmoth.java b/Mage.Sets/src/mage/cards/p/PriestOfYawgmoth.java index 6d87fed730..f35654992e 100644 --- a/Mage.Sets/src/mage/cards/p/PriestOfYawgmoth.java +++ b/Mage.Sets/src/mage/cards/p/PriestOfYawgmoth.java @@ -37,6 +37,7 @@ import mage.abilities.mana.DynamicManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledArtifactPermanent; import mage.target.common.TargetControlledPermanent; @@ -48,8 +49,8 @@ public class PriestOfYawgmoth extends CardImpl { public PriestOfYawgmoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PriestsOfNorn.java b/Mage.Sets/src/mage/cards/p/PriestsOfNorn.java index 019ad76371..5dee024ebb 100644 --- a/Mage.Sets/src/mage/cards/p/PriestsOfNorn.java +++ b/Mage.Sets/src/mage/cards/p/PriestsOfNorn.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class PriestsOfNorn extends CardImpl { public PriestsOfNorn (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PrimalAmulet.java b/Mage.Sets/src/mage/cards/p/PrimalAmulet.java new file mode 100644 index 0000000000..e62c449573 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PrimalAmulet.java @@ -0,0 +1,123 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.FilterCard; +import mage.filter.common.FilterInstantOrSorcerySpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class PrimalAmulet extends CardImpl { + + private static final FilterCard filter = new FilterCard("Instant and sorcery spells"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.INSTANT), + new CardTypePredicate(CardType.SORCERY) + )); + } + + public PrimalAmulet(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); + this.transformable = true; + this.secondSideCardClazz = PrimalWellspring.class; + + // Instant and sorcery spells you cast cost {1} less to cast. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostReductionControllerEffect(filter, 1))); + + // Whenever you cast an instant or sorcery spell, put a charge counter on Primal Amulet. Then if there are four or more charge counters on it, you may remove those counters and transform it. + this.addAbility(new TransformAbility()); + this.addAbility(new SpellCastControllerTriggeredAbility(new PrimalAmuletEffect(), new FilterInstantOrSorcerySpell(), false)); + } + + public PrimalAmulet(final PrimalAmulet card) { + super(card); + } + + @Override + public PrimalAmulet copy() { + return new PrimalAmulet(this); + } +} + +class PrimalAmuletEffect extends OneShotEffect { + + PrimalAmuletEffect() { + super(Outcome.Benefit); + this.staticText = "put a charge counter on {this}. " + + "Then if there are four or more charge counters on it, " + + "you may remove those counters and transform it"; + } + + PrimalAmuletEffect(final PrimalAmuletEffect effect) { + super(effect); + } + + @Override + public PrimalAmuletEffect copy() { + return new PrimalAmuletEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null && player != null) { + permanent.addCounters(CounterType.CHARGE.createInstance(), source, game); + int counters = permanent.getCounters(game).getCount(CounterType.CHARGE); + if (counters > 3 && player.chooseUse(Outcome.Benefit, "Transform this?", source, game)) { + permanent.removeCounters("charge", counters, game); + new TransformSourceEffect(true).apply(game, source); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/p/PrimalClay.java b/Mage.Sets/src/mage/cards/p/PrimalClay.java index 0e43e12945..0a0647dcbe 100644 --- a/Mage.Sets/src/mage/cards/p/PrimalClay.java +++ b/Mage.Sets/src/mage/cards/p/PrimalClay.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.choices.Choice; import mage.choices.ChoiceImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class PrimalClay extends CardImpl { public PrimalClay(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/p/PrimalCocoon.java b/Mage.Sets/src/mage/cards/p/PrimalCocoon.java index 948e7d2e75..b89d87d061 100644 --- a/Mage.Sets/src/mage/cards/p/PrimalCocoon.java +++ b/Mage.Sets/src/mage/cards/p/PrimalCocoon.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class PrimalCocoon extends CardImpl { public PrimalCocoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/cards/p/PrimalDruid.java b/Mage.Sets/src/mage/cards/p/PrimalDruid.java index 93d22631d4..f733fb87c4 100644 --- a/Mage.Sets/src/mage/cards/p/PrimalDruid.java +++ b/Mage.Sets/src/mage/cards/p/PrimalDruid.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; @@ -47,8 +48,8 @@ public class PrimalDruid extends CardImpl { public PrimalDruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PrimalForcemage.java b/Mage.Sets/src/mage/cards/p/PrimalForcemage.java index 3135f61f85..c5f16a1088 100644 --- a/Mage.Sets/src/mage/cards/p/PrimalForcemage.java +++ b/Mage.Sets/src/mage/cards/p/PrimalForcemage.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SetTargetPointer; import mage.constants.TargetController; @@ -59,8 +60,8 @@ public class PrimalForcemage extends CardImpl { public PrimalForcemage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PrimalFrenzy.java b/Mage.Sets/src/mage/cards/p/PrimalFrenzy.java index 5577e6112d..aa8c822553 100644 --- a/Mage.Sets/src/mage/cards/p/PrimalFrenzy.java +++ b/Mage.Sets/src/mage/cards/p/PrimalFrenzy.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class PrimalFrenzy extends CardImpl { public PrimalFrenzy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/p/PrimalHuntbeast.java b/Mage.Sets/src/mage/cards/p/PrimalHuntbeast.java index 4821d7098f..5b37bdaf5e 100644 --- a/Mage.Sets/src/mage/cards/p/PrimalHuntbeast.java +++ b/Mage.Sets/src/mage/cards/p/PrimalHuntbeast.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class PrimalHuntbeast extends CardImpl { public PrimalHuntbeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PrimalInstinct.java b/Mage.Sets/src/mage/cards/p/PrimalInstinct.java index 199f85b0d6..06499be09a 100644 --- a/Mage.Sets/src/mage/cards/p/PrimalInstinct.java +++ b/Mage.Sets/src/mage/cards/p/PrimalInstinct.java @@ -1,99 +1,99 @@ -/* - * 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.cards.p; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Styxo - */ -public class PrimalInstinct extends CardImpl { - - public PrimalInstinct(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}{G}"); - - // Put a +1/+1 counter on target creature, then double the number of +1/+1 counters on that creature. - this.getSpellAbility().addEffect(new PrimalInstictEffect()); - this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - } - - public PrimalInstinct(final PrimalInstinct card) { - super(card); - } - - @Override - public PrimalInstinct copy() { - return new PrimalInstinct(this); - } -} - -class PrimalInstictEffect extends OneShotEffect { - - public PrimalInstictEffect() { - super(Outcome.BoostCreature); - staticText = "Put a +1/+1 counter on target creature, then double the number of +1/+1 counters on that creature."; - } - - public PrimalInstictEffect(PrimalInstictEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Permanent target = game.getPermanent(getTargetPointer().getFirst(game, source)); - if (target != null) { - target.addCounters(CounterType.P1P1.createInstance(), source, game); - int addCounterCount = target.getCounters(game).getCount(CounterType.P1P1); - game.informPlayers("Counters " + addCounterCount); - target.addCounters(CounterType.P1P1.createInstance(addCounterCount), source, game); - return true; - } - } - return false; - } - - @Override - public PrimalInstictEffect copy() { - return new PrimalInstictEffect(this); - } - -} +/* + * 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.cards.p; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Styxo + */ +public class PrimalInstinct extends CardImpl { + + public PrimalInstinct(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}{G}"); + + // Put a +1/+1 counter on target creature, then double the number of +1/+1 counters on that creature. + this.getSpellAbility().addEffect(new PrimalInstictEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public PrimalInstinct(final PrimalInstinct card) { + super(card); + } + + @Override + public PrimalInstinct copy() { + return new PrimalInstinct(this); + } +} + +class PrimalInstictEffect extends OneShotEffect { + + public PrimalInstictEffect() { + super(Outcome.BoostCreature); + staticText = "Put a +1/+1 counter on target creature, then double the number of +1/+1 counters on that creature."; + } + + public PrimalInstictEffect(PrimalInstictEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Permanent target = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (target != null) { + target.addCounters(CounterType.P1P1.createInstance(), source, game); + int addCounterCount = target.getCounters(game).getCount(CounterType.P1P1); + game.informPlayers("Counters " + addCounterCount); + target.addCounters(CounterType.P1P1.createInstance(addCounterCount), source, game); + return true; + } + } + return false; + } + + @Override + public PrimalInstictEffect copy() { + return new PrimalInstictEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/p/PrimalPlasma.java b/Mage.Sets/src/mage/cards/p/PrimalPlasma.java index 502712683e..b53b28b63a 100644 --- a/Mage.Sets/src/mage/cards/p/PrimalPlasma.java +++ b/Mage.Sets/src/mage/cards/p/PrimalPlasma.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.choices.Choice; import mage.choices.ChoiceImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -58,8 +59,8 @@ public class PrimalPlasma extends CardImpl { public PrimalPlasma(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Elemental"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/p/PrimalVisitation.java b/Mage.Sets/src/mage/cards/p/PrimalVisitation.java index 714bba6513..64d8641d19 100644 --- a/Mage.Sets/src/mage/cards/p/PrimalVisitation.java +++ b/Mage.Sets/src/mage/cards/p/PrimalVisitation.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class PrimalVisitation extends CardImpl { public PrimalVisitation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/p/PrimalWellspring.java b/Mage.Sets/src/mage/cards/p/PrimalWellspring.java new file mode 100644 index 0000000000..fe6bcfba62 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PrimalWellspring.java @@ -0,0 +1,121 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CopyTargetSpellEffect; +import mage.abilities.mana.AnyColorManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterInstantOrSorcerySpell; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.stack.Spell; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public class PrimalWellspring extends CardImpl { + + public PrimalWellspring(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + this.nightCard = true; + + // Add one mana of any color to your mana pool. + Ability ability = new AnyColorManaAbility(); + this.addAbility(ability); + + // When that mana is spent to cast an instant or sorcery spell, copy that spell and you may choose new targets for the copy. + Effect effect = new CopyTargetSpellEffect(true); + effect.setText("copy that spell and you may choose new targets for the copy"); + this.addAbility(new PyrimalWellspringTriggeredAbility(ability.getOriginalId(), effect)); + } + + public PrimalWellspring(final PrimalWellspring card) { + super(card); + } + + @Override + public PrimalWellspring copy() { + return new PrimalWellspring(this); + } +} + +class PyrimalWellspringTriggeredAbility extends TriggeredAbilityImpl { + + private final static FilterInstantOrSorcerySpell filter = new FilterInstantOrSorcerySpell(); + + String abilityOriginalId; + + public PyrimalWellspringTriggeredAbility(UUID abilityOriginalId, Effect effect) { + super(Zone.ALL, effect, false); + this.abilityOriginalId = abilityOriginalId.toString(); + } + + public PyrimalWellspringTriggeredAbility(final PyrimalWellspringTriggeredAbility ability) { + super(ability); + this.abilityOriginalId = ability.abilityOriginalId; + } + + @Override + public PyrimalWellspringTriggeredAbility copy() { + return new PyrimalWellspringTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.MANA_PAID; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getData().equals(abilityOriginalId)) { + Spell spell = game.getStack().getSpell(event.getTargetId()); + if (spell != null && filter.match(spell, getSourceId(), getControllerId(), game)) { + for (Effect effect : getEffects()) { + effect.setTargetPointer(new FixedTarget(event.getTargetId())); + } + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "When that mana is used to cast an instant or sorcery spell, " + super.getRule(); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PrimalWhisperer.java b/Mage.Sets/src/mage/cards/p/PrimalWhisperer.java index 3e7fa3ca5e..9f60a6432e 100644 --- a/Mage.Sets/src/mage/cards/p/PrimalWhisperer.java +++ b/Mage.Sets/src/mage/cards/p/PrimalWhisperer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -56,8 +57,8 @@ public class PrimalWhisperer extends CardImpl { public PrimalWhisperer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/Primalcrux.java b/Mage.Sets/src/mage/cards/p/Primalcrux.java index 5b01d6219e..ab41acd0d1 100644 --- a/Mage.Sets/src/mage/cards/p/Primalcrux.java +++ b/Mage.Sets/src/mage/cards/p/Primalcrux.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -53,7 +54,7 @@ public class Primalcrux extends CardImpl { public Primalcrux(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}{G}{G}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/p/PrimeSpeakerZegana.java b/Mage.Sets/src/mage/cards/p/PrimeSpeakerZegana.java index 2e082af704..ede4efb018 100644 --- a/Mage.Sets/src/mage/cards/p/PrimeSpeakerZegana.java +++ b/Mage.Sets/src/mage/cards/p/PrimeSpeakerZegana.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.counters.CounterType; import mage.filter.common.FilterControlledCreaturePermanent; @@ -54,20 +55,19 @@ import mage.game.permanent.Permanent; public class PrimeSpeakerZegana extends CardImpl { public PrimeSpeakerZegana(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}{U}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}{U}{U}"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); addSuperType(SuperType.LEGENDARY); - this.power = new MageInt(1); this.toughness = new MageInt(1); //Prime Speaker Zegana enters the battlefield with X +1/+1 counters on it, where X is the greatest power among other creatures you control. - this.addAbility(new EntersBattlefieldAbility( - new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), - new GreatestPowerCount(), true), - "where X is the greatest power among other creatures you control")); + Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), + new GreatestPowerCount(), true); + effect.setText("with X +1/+1 counters on it, where X is the greatest power among other creatures you control."); + this.addAbility(new EntersBattlefieldAbility(effect)); //When Prime Speaker Zegana enters the battlefield, draw cards equal to its power. this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(new SourcePermanentPowerCount()))); } @@ -83,13 +83,12 @@ public class PrimeSpeakerZegana extends CardImpl { } class GreatestPowerCount implements DynamicValue { - - + @Override public int calculate(Game game, Ability sourceAbility, Effect effect) { int value = 0; - for(Permanent creature : game.getBattlefield().getActivePermanents(new FilterControlledCreaturePermanent(), sourceAbility.getControllerId(), game)){ - if(creature != null && creature.getPower().getValue() > value && !sourceAbility.getSourceId().equals(creature.getId())){ + for (Permanent creature : game.getBattlefield().getActivePermanents(new FilterControlledCreaturePermanent(), sourceAbility.getControllerId(), game)) { + if (creature != null && creature.getPower().getValue() > value && !sourceAbility.getSourceId().equals(creature.getId())) { value = creature.getPower().getValue(); } } diff --git a/Mage.Sets/src/mage/cards/p/PrimevalForce.java b/Mage.Sets/src/mage/cards/p/PrimevalForce.java index 2d1748d47c..e9aee8dfd0 100644 --- a/Mage.Sets/src/mage/cards/p/PrimevalForce.java +++ b/Mage.Sets/src/mage/cards/p/PrimevalForce.java @@ -53,7 +53,7 @@ public class PrimevalForce extends CardImpl { public PrimevalForce(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/p/PrimevalLight.java b/Mage.Sets/src/mage/cards/p/PrimevalLight.java new file mode 100644 index 0000000000..3a73ed4684 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PrimevalLight.java @@ -0,0 +1,63 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.abilities.effects.common.DestroyAllControlledTargetEffect; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterEnchantmentPermanent; +import mage.target.TargetPlayer; + +/** + * + * @author L_J + */ +public class PrimevalLight extends CardImpl { + + public PrimevalLight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}"); + + // Destroy all enchantments target player controls. + this.getSpellAbility().addEffect(new DestroyAllControlledTargetEffect(new FilterEnchantmentPermanent("enchantments"))); + this.getSpellAbility().addTarget(new TargetPlayer()); + } + + public PrimevalLight(final PrimevalLight card) { + super(card); + } + + @Override + public PrimevalLight copy() { + return new PrimevalLight(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/p/PrimevalProtector.java b/Mage.Sets/src/mage/cards/p/PrimevalProtector.java index f59f4588a9..f96e2ea0c2 100644 --- a/Mage.Sets/src/mage/cards/p/PrimevalProtector.java +++ b/Mage.Sets/src/mage/cards/p/PrimevalProtector.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.CostModificationType; import mage.constants.Duration; import mage.constants.Outcome; @@ -67,7 +68,7 @@ public class PrimevalProtector extends CardImpl { public PrimevalProtector(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{10}{G}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(10); this.toughness = new MageInt(10); diff --git a/Mage.Sets/src/mage/cards/p/PrimevalShambler.java b/Mage.Sets/src/mage/cards/p/PrimevalShambler.java index d619d18204..33b11a78db 100644 --- a/Mage.Sets/src/mage/cards/p/PrimevalShambler.java +++ b/Mage.Sets/src/mage/cards/p/PrimevalShambler.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class PrimevalShambler extends CardImpl { public PrimevalShambler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Horror"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HORROR); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PrimevalTitan.java b/Mage.Sets/src/mage/cards/p/PrimevalTitan.java index acc1eaa053..2e6f4b616f 100644 --- a/Mage.Sets/src/mage/cards/p/PrimevalTitan.java +++ b/Mage.Sets/src/mage/cards/p/PrimevalTitan.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterLandCard; import mage.target.common.TargetCardInLibrary; @@ -47,7 +48,7 @@ public class PrimevalTitan extends CardImpl { public PrimevalTitan(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/p/PrimocEscapee.java b/Mage.Sets/src/mage/cards/p/PrimocEscapee.java index 3a18aebe84..7d52505f1a 100644 --- a/Mage.Sets/src/mage/cards/p/PrimocEscapee.java +++ b/Mage.Sets/src/mage/cards/p/PrimocEscapee.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class PrimocEscapee extends CardImpl { public PrimocEscapee(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PrimordialHydra.java b/Mage.Sets/src/mage/cards/p/PrimordialHydra.java index 90cc0b68f9..5e1aae6343 100644 --- a/Mage.Sets/src/mage/cards/p/PrimordialHydra.java +++ b/Mage.Sets/src/mage/cards/p/PrimordialHydra.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class PrimordialHydra extends CardImpl { public PrimordialHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{X}{G}{G}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.color.setGreen(true); this.power = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/p/PrimordialSage.java b/Mage.Sets/src/mage/cards/p/PrimordialSage.java index bb0a0ca821..e80831f68d 100644 --- a/Mage.Sets/src/mage/cards/p/PrimordialSage.java +++ b/Mage.Sets/src/mage/cards/p/PrimordialSage.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; /** @@ -44,7 +45,7 @@ public class PrimordialSage extends CardImpl { public PrimordialSage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/PrinceOfThralls.java b/Mage.Sets/src/mage/cards/p/PrinceOfThralls.java index 4d6b8d2484..bedd2b7a7c 100644 --- a/Mage.Sets/src/mage/cards/p/PrinceOfThralls.java +++ b/Mage.Sets/src/mage/cards/p/PrinceOfThralls.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class PrinceOfThralls extends CardImpl { public PrinceOfThralls(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{B}{B}{R}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/p/PrincessLeia.java b/Mage.Sets/src/mage/cards/p/PrincessLeia.java index 6e94fa25c9..bf7b0da7a3 100644 --- a/Mage.Sets/src/mage/cards/p/PrincessLeia.java +++ b/Mage.Sets/src/mage/cards/p/PrincessLeia.java @@ -1,92 +1,92 @@ -/* - * 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.cards.p; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.dynamicvalue.DynamicValue; -import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.continuous.BoostControlledEffect; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.*; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.filter.predicate.permanent.AnotherPredicate; -import mage.game.permanent.token.RebelToken; - -/** - * - * @author Styxo - */ -public class PrincessLeia extends CardImpl { - - private static final FilterControlledCreaturePermanent filter1 = new FilterControlledCreaturePermanent("other Rebel creature you control"); - private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("Rebel creature you control"); - - static { - SubtypePredicate rebel = new SubtypePredicate(SubType.REBEL); - filter1.add(new AnotherPredicate()); - filter1.add(rebel); - filter2.add(rebel); - } - - public PrincessLeia(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{U}{W}"); - addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Rebel"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // When Princess Leia enters the battlefield, create three 1/1 white Rebel creature tokens. - this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new RebelToken(), 3))); - - // Princess Leia gets +1/+1 for each other Rebel creature you control. - DynamicValue count = new PermanentsOnBattlefieldCount(filter1); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(count, count, Duration.WhileOnBattlefield))); - - // Other Rebel creatures you control get +1/+1. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter2, true))); - - } - - public PrincessLeia(final PrincessLeia card) { - super(card); - } - - @Override - public PrincessLeia copy() { - return new PrincessLeia(this); - } -} +/* + * 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.cards.p; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.permanent.token.RebelToken; + +/** + * + * @author Styxo + */ +public class PrincessLeia extends CardImpl { + + private static final FilterControlledCreaturePermanent filter1 = new FilterControlledCreaturePermanent("other Rebel creature you control"); + private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("Rebel creature you control"); + + static { + SubtypePredicate rebel = new SubtypePredicate(SubType.REBEL); + filter1.add(new AnotherPredicate()); + filter1.add(rebel); + filter2.add(rebel); + } + + public PrincessLeia(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{U}{W}"); + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Princess Leia enters the battlefield, create three 1/1 white Rebel creature tokens. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new RebelToken(), 3))); + + // Princess Leia gets +1/+1 for each other Rebel creature you control. + DynamicValue count = new PermanentsOnBattlefieldCount(filter1); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(count, count, Duration.WhileOnBattlefield))); + + // Other Rebel creatures you control get +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter2, true))); + + } + + public PrincessLeia(final PrincessLeia card) { + super(card); + } + + @Override + public PrincessLeia copy() { + return new PrincessLeia(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PrincessLucrezia.java b/Mage.Sets/src/mage/cards/p/PrincessLucrezia.java index 8423153f0e..b4ccb06950 100644 --- a/Mage.Sets/src/mage/cards/p/PrincessLucrezia.java +++ b/Mage.Sets/src/mage/cards/p/PrincessLucrezia.java @@ -33,6 +33,7 @@ import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -44,8 +45,8 @@ public class PrincessLucrezia extends CardImpl { public PrincessLucrezia(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PrismaticCircle.java b/Mage.Sets/src/mage/cards/p/PrismaticCircle.java new file mode 100644 index 0000000000..e44c8449d6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PrismaticCircle.java @@ -0,0 +1,101 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ChooseColorEffect; +import mage.abilities.effects.common.PreventNextDamageFromChosenSourceToYouEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterObject; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; + +/** + * + * @author TheElk801 + */ +public class PrismaticCircle extends CardImpl { + + public PrismaticCircle(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + + // Cumulative upkeep {1} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{1}"))); + + // As Prismatic Circle enters the battlefield, choose a color. + this.addAbility(new EntersBattlefieldAbility(new ChooseColorEffect(Outcome.Neutral))); + + // {1}: The next time a source of your choice of the chosen color would deal damage to you this turn, prevent that damage. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new PrismaticCircleEffect(), new ManaCostsImpl("{1}"))); + } + + public PrismaticCircle(final PrismaticCircle card) { + super(card); + } + + @Override + public PrismaticCircle copy() { + return new PrismaticCircle(this); + } +} + +class PrismaticCircleEffect extends PreventNextDamageFromChosenSourceToYouEffect { + + public PrismaticCircleEffect() { + super(Duration.EndOfTurn); + staticText = "The next time a source of your choice of the chosen color would deal damage to you this turn, prevent that damage."; + } + + @Override + public void init(Ability source, Game game) { + FilterObject filter = targetSource.getFilter(); + filter.add(new ColorPredicate((ObjectColor) game.getState().getValue(source.getSourceId() + "_color"))); + super.init(source, game); + } + + public PrismaticCircleEffect(PrismaticCircleEffect effect) { + super(effect); + } + + @Override + public PrismaticCircleEffect copy() { + return new PrismaticCircleEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/p/PrismaticGeoscope.java b/Mage.Sets/src/mage/cards/p/PrismaticGeoscope.java index 181e72eae5..eaf69c3c93 100644 --- a/Mage.Sets/src/mage/cards/p/PrismaticGeoscope.java +++ b/Mage.Sets/src/mage/cards/p/PrismaticGeoscope.java @@ -29,19 +29,20 @@ package mage.cards.p; import java.util.UUID; import mage.Mana; +import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.mana.DynamicManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; /** * * @author fireshoes */ - public class PrismaticGeoscope extends CardImpl { public PrismaticGeoscope(UUID ownerId, CardSetInfo setInfo) { @@ -51,8 +52,13 @@ public class PrismaticGeoscope extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); // Domain — {T}: Add X mana in any combination of colors to your mana pool, where X is the number of basic land types among lands you control. - this.addAbility(new DynamicManaAbility(new Mana(0,0,0,0,0,0,1, 0), new DomainValue(), new TapSourceCost(), - "Add X mana in any combination of colors to your mana pool, where X is the number of basic land types among lands you control.")); + Ability ability = new DynamicManaAbility( + new Mana(0, 0, 0, 0, 0, 0, 1, 0), new DomainValue(), new TapSourceCost(), + "Add X mana in any combination of colors to your mana pool," + + " where X is the number of basic land types among lands you control." + ); + ability.setAbilityWord(AbilityWord.DOMAIN); + this.addAbility(ability); } public PrismaticGeoscope(final PrismaticGeoscope card) { diff --git a/Mage.Sets/src/mage/cards/p/PrismaticLace.java b/Mage.Sets/src/mage/cards/p/PrismaticLace.java new file mode 100644 index 0000000000..2f8930b838 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PrismaticLace.java @@ -0,0 +1,60 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.BecomesColorOrColorsTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.TargetPermanent; + +/** + * + * @author L_J + */ +public class PrismaticLace extends CardImpl { + + public PrismaticLace(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}"); + + // Target permanent becomes the color or colors of your choice. + this.getSpellAbility().addEffect(new BecomesColorOrColorsTargetEffect(Duration.Custom)); + this.getSpellAbility().addTarget(new TargetPermanent()); + } + + public PrismaticLace(final PrismaticLace card) { + super(card); + } + + @Override + public PrismaticLace copy() { + return new PrismaticLace(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PrismaticOmen.java b/Mage.Sets/src/mage/cards/p/PrismaticOmen.java index a3b9fc199c..57fdb7f16d 100644 --- a/Mage.Sets/src/mage/cards/p/PrismaticOmen.java +++ b/Mage.Sets/src/mage/cards/p/PrismaticOmen.java @@ -123,7 +123,7 @@ class BecomesBasicLandTypeAllEffect extends ContinuousEffectImpl { break; case TypeChangingEffects_4: for (SubType subtype : landTypes) { - if (!land.getSubtype(game).contains(subtype)) { + if (!land.hasSubtype(subtype, game)) { land.getSubtype(game).add(subtype); } } diff --git a/Mage.Sets/src/mage/cards/p/PrismwakeMerrow.java b/Mage.Sets/src/mage/cards/p/PrismwakeMerrow.java index 7ce1e1b429..136ab5f699 100644 --- a/Mage.Sets/src/mage/cards/p/PrismwakeMerrow.java +++ b/Mage.Sets/src/mage/cards/p/PrismwakeMerrow.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.TargetPermanent; @@ -47,8 +48,8 @@ public class PrismwakeMerrow extends CardImpl { public PrismwakeMerrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PrisonBarricade.java b/Mage.Sets/src/mage/cards/p/PrisonBarricade.java index f46ef58254..1e9e12b7c3 100644 --- a/Mage.Sets/src/mage/cards/p/PrisonBarricade.java +++ b/Mage.Sets/src/mage/cards/p/PrisonBarricade.java @@ -39,32 +39,35 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.counters.CounterType; /** * * @author LoneFox - + * */ public class PrisonBarricade extends CardImpl { public PrisonBarricade(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Wall"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.subtype.add(SubType.WALL); this.power = new MageInt(1); this.toughness = new MageInt(3); - // Defender - this.addAbility(DefenderAbility.getInstance()); // Kicker {1}{W} this.addAbility(new KickerAbility("{1}{W}")); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + // If Prison Barricade was kicked, it enters the battlefield with a +1/+1 counter on it and with "Prison Barricade can attack as though it didn't have defender." Ability ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), - KickedCondition.instance, "If {this} was kicked, it enters the battlefield with a +1/+1 counter on it and with \"{this} can attack as though it didn't have defender.\"", ""); + KickedCondition.instance, "If {this} was kicked, it enters the battlefield with a +1/+1 counter on it and with \"{this} can attack as though it didn't have defender.\"", ""); ability.addEffect(new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield)); this.addAbility(ability); - } + } public PrisonBarricade(final PrisonBarricade card) { super(card); diff --git a/Mage.Sets/src/mage/cards/p/PrisonTerm.java b/Mage.Sets/src/mage/cards/p/PrisonTerm.java index 430d4b9d8f..bd38c3800e 100644 --- a/Mage.Sets/src/mage/cards/p/PrisonTerm.java +++ b/Mage.Sets/src/mage/cards/p/PrisonTerm.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.constants.TargetController; @@ -65,7 +66,7 @@ public class PrisonTerm extends CardImpl { public PrisonTerm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/p/PristineAngel.java b/Mage.Sets/src/mage/cards/p/PristineAngel.java index 23e0f0f529..5c83b844a3 100644 --- a/Mage.Sets/src/mage/cards/p/PristineAngel.java +++ b/Mage.Sets/src/mage/cards/p/PristineAngel.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterCard; @@ -70,7 +71,7 @@ public class PristineAngel extends CardImpl { public PristineAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PristineSkywise.java b/Mage.Sets/src/mage/cards/p/PristineSkywise.java index 84968cc16d..bd8828f7e6 100644 --- a/Mage.Sets/src/mage/cards/p/PristineSkywise.java +++ b/Mage.Sets/src/mage/cards/p/PristineSkywise.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -56,7 +57,7 @@ public class PristineSkywise extends CardImpl { public PristineSkywise(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{U}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PrizedAmalgam.java b/Mage.Sets/src/mage/cards/p/PrizedAmalgam.java index 835ca9dac0..cd0e1b721f 100644 --- a/Mage.Sets/src/mage/cards/p/PrizedAmalgam.java +++ b/Mage.Sets/src/mage/cards/p/PrizedAmalgam.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -62,7 +63,7 @@ public class PrizedAmalgam extends CardImpl { public PrizedAmalgam(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PrizedElephant.java b/Mage.Sets/src/mage/cards/p/PrizedElephant.java index d447b1c175..93209ab104 100644 --- a/Mage.Sets/src/mage/cards/p/PrizedElephant.java +++ b/Mage.Sets/src/mage/cards/p/PrizedElephant.java @@ -62,7 +62,7 @@ public class PrizedElephant extends CardImpl { public PrizedElephant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.color.setWhite(true); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PrizedUnicorn.java b/Mage.Sets/src/mage/cards/p/PrizedUnicorn.java index aee69355d9..555a505b6e 100644 --- a/Mage.Sets/src/mage/cards/p/PrizedUnicorn.java +++ b/Mage.Sets/src/mage/cards/p/PrizedUnicorn.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.MustBeBlockedByAllSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class PrizedUnicorn extends CardImpl { public PrizedUnicorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Unicorn"); + this.subtype.add(SubType.UNICORN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PrizefighterConstruct.java b/Mage.Sets/src/mage/cards/p/PrizefighterConstruct.java index 4f40193aaf..b95d7baec8 100644 --- a/Mage.Sets/src/mage/cards/p/PrizefighterConstruct.java +++ b/Mage.Sets/src/mage/cards/p/PrizefighterConstruct.java @@ -1,58 +1,59 @@ -/* - * 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.cards.p; - -import java.util.UUID; -import mage.MageInt; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class PrizefighterConstruct extends CardImpl { - - public PrizefighterConstruct(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}"); - - this.subtype.add("Construct"); - this.power = new MageInt(6); - this.toughness = new MageInt(2); - } - - public PrizefighterConstruct(final PrizefighterConstruct card) { - super(card); - } - - @Override - public PrizefighterConstruct copy() { - return new PrizefighterConstruct(this); - } -} +/* + * 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.cards.p; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author Styxo + */ +public class PrizefighterConstruct extends CardImpl { + + public PrizefighterConstruct(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}"); + + this.subtype.add(SubType.CONSTRUCT); + this.power = new MageInt(6); + this.toughness = new MageInt(2); + } + + public PrizefighterConstruct(final PrizefighterConstruct card) { + super(card); + } + + @Override + public PrizefighterConstruct copy() { + return new PrizefighterConstruct(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/Probe.java b/Mage.Sets/src/mage/cards/p/Probe.java index 9430f0c0da..35f7b37351 100644 --- a/Mage.Sets/src/mage/cards/p/Probe.java +++ b/Mage.Sets/src/mage/cards/p/Probe.java @@ -48,17 +48,17 @@ import mage.target.TargetPlayer; public class Probe extends CardImpl { public Probe(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}"); // Kicker {1}{B} this.addAbility(new KickerAbility("{1}{B}")); // Draw three cards, then discard two cards. - this.getSpellAbility().addEffect(new DrawDiscardControllerEffect(3,2)); + this.getSpellAbility().addEffect(new DrawDiscardControllerEffect(3, 2)); // If Probe was kicked, target player discards two cards. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( - new DiscardTargetEffect(2), - KickedCondition.instance, - "If {this} was kicked, target player discards two cards")); + new DiscardTargetEffect(2), + KickedCondition.instance, + "

If {this} was kicked, target player discards two cards")); } @Override @@ -70,7 +70,7 @@ public class Probe extends CardImpl { } } } - + public Probe(final Probe card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/p/ProbeDroid.java b/Mage.Sets/src/mage/cards/p/ProbeDroid.java index 0255f9ec4d..f59886959c 100644 --- a/Mage.Sets/src/mage/cards/p/ProbeDroid.java +++ b/Mage.Sets/src/mage/cards/p/ProbeDroid.java @@ -1,71 +1,72 @@ -/* - * 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.cards.p; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.LookAtTargetPlayerHandEffect; -import mage.abilities.keyword.RepairAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.target.TargetPlayer; - -/** - * - * @author Styxo - */ -public class ProbeDroid extends CardImpl { - - public ProbeDroid(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}{U}"); - this.subtype.add("Droid"); - this.subtype.add("Scout"); - this.power = new MageInt(1); - this.toughness = new MageInt(1); - - // When Probe Droid enters the battlefield, target player reveals his or her hand. - Ability ability = new EntersBattlefieldTriggeredAbility(new LookAtTargetPlayerHandEffect()); - ability.addTarget(new TargetPlayer()); - this.addAbility(ability); - - // Repair 3 - this.addAbility(new RepairAbility(3)); - } - - public ProbeDroid(final ProbeDroid card) { - super(card); - } - - @Override - public ProbeDroid copy() { - return new ProbeDroid(this); - } -} +/* + * 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.cards.p; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.LookAtTargetPlayerHandEffect; +import mage.abilities.keyword.RepairAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.target.TargetPlayer; + +/** + * + * @author Styxo + */ +public class ProbeDroid extends CardImpl { + + public ProbeDroid(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}{U}"); + this.subtype.add(SubType.DROID); + this.subtype.add(SubType.SCOUT); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Probe Droid enters the battlefield, target player reveals his or her hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new LookAtTargetPlayerHandEffect()); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + + // Repair 3 + this.addAbility(new RepairAbility(3)); + } + + public ProbeDroid(final ProbeDroid card) { + super(card); + } + + @Override + public ProbeDroid copy() { + return new ProbeDroid(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/ProdigalPyromancer.java b/Mage.Sets/src/mage/cards/p/ProdigalPyromancer.java index 5c6b8d1915..525e37b40b 100644 --- a/Mage.Sets/src/mage/cards/p/ProdigalPyromancer.java +++ b/Mage.Sets/src/mage/cards/p/ProdigalPyromancer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class ProdigalPyromancer extends CardImpl { public ProdigalPyromancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/ProdigalSorcerer.java b/Mage.Sets/src/mage/cards/p/ProdigalSorcerer.java index 40873c1764..2c64a8a6c0 100644 --- a/Mage.Sets/src/mage/cards/p/ProdigalSorcerer.java +++ b/Mage.Sets/src/mage/cards/p/ProdigalSorcerer.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -46,8 +47,8 @@ public class ProdigalSorcerer extends CardImpl { public ProdigalSorcerer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/ProfanerOfTheDead.java b/Mage.Sets/src/mage/cards/p/ProfanerOfTheDead.java index 0db3ce1a97..f44d0f4850 100644 --- a/Mage.Sets/src/mage/cards/p/ProfanerOfTheDead.java +++ b/Mage.Sets/src/mage/cards/p/ProfanerOfTheDead.java @@ -52,8 +52,8 @@ public class ProfanerOfTheDead extends CardImpl { public ProfanerOfTheDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); - this.subtype.add("Naga"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/ProgenitorMimic.java b/Mage.Sets/src/mage/cards/p/ProgenitorMimic.java index 09301b3f9b..1fdd464ddc 100644 --- a/Mage.Sets/src/mage/cards/p/ProgenitorMimic.java +++ b/Mage.Sets/src/mage/cards/p/ProgenitorMimic.java @@ -34,11 +34,12 @@ import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.common.SourceMatchesFilterCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.Effect; -import mage.abilities.effects.PutTokenOntoBattlefieldCopySourceEffect; +import mage.abilities.effects.CreateTokenCopySourceEffect; import mage.abilities.effects.common.CopyPermanentEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -59,7 +60,7 @@ public class ProgenitorMimic extends CardImpl { public ProgenitorMimic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(0); @@ -67,7 +68,7 @@ public class ProgenitorMimic extends CardImpl { // You may have Progenitor Mimic enter the battlefield as a copy of any creature on the battlefield // except it gains "At the beginning of your upkeep, if this creature isn't a token, // create a token that's a copy of this creature." - Effect effect = new PutTokenOntoBattlefieldCopySourceEffect(); + Effect effect = new CreateTokenCopySourceEffect(); effect.setText("create a token that's a copy of this creature"); AbilityApplier applier = new AbilityApplier( diff --git a/Mage.Sets/src/mage/cards/p/Progenitus.java b/Mage.Sets/src/mage/cards/p/Progenitus.java index 55fdc1815b..ecfc73fa50 100644 --- a/Mage.Sets/src/mage/cards/p/Progenitus.java +++ b/Mage.Sets/src/mage/cards/p/Progenitus.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.FilterCard; import mage.game.Game; @@ -49,8 +50,8 @@ public class Progenitus extends CardImpl { public Progenitus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}{U}{U}{B}{B}{R}{R}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Hydra"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.HYDRA); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(10); this.toughness = new MageInt(10); diff --git a/Mage.Sets/src/mage/cards/p/PrognosticSphinx.java b/Mage.Sets/src/mage/cards/p/PrognosticSphinx.java index 89db97a014..1ddb981a3c 100644 --- a/Mage.Sets/src/mage/cards/p/PrognosticSphinx.java +++ b/Mage.Sets/src/mage/cards/p/PrognosticSphinx.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class PrognosticSphinx extends CardImpl { public PrognosticSphinx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/Prohibit.java b/Mage.Sets/src/mage/cards/p/Prohibit.java index f7d8641138..1fe9390078 100644 --- a/Mage.Sets/src/mage/cards/p/Prohibit.java +++ b/Mage.Sets/src/mage/cards/p/Prohibit.java @@ -29,17 +29,17 @@ package mage.cards.p; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.condition.common.KickedCondition; +import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CounterTargetEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; -import mage.filter.FilterSpell; -import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.constants.Outcome; import mage.game.Game; +import mage.game.stack.Spell; +import mage.players.Player; import mage.target.TargetSpell; /** @@ -48,34 +48,15 @@ import mage.target.TargetSpell; */ public class Prohibit extends CardImpl { - private static final FilterSpell filter2 = new FilterSpell("spell if its converted mana cost is 2 or less"); - private static final FilterSpell filter4 = new FilterSpell("spell if its converted mana cost is 4 or less"); - - static { - filter2.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3)); - filter4.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 5)); - } - public Prohibit(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); // Kicker {2} this.addAbility(new KickerAbility("{2}")); // Counter target spell if its converted mana cost is 2 or less. If Prohibit was kicked, counter that spell if its converted mana cost is 4 or less instead. this.getSpellAbility().addEffect(new CounterTargetEffect()); - this.getSpellAbility().addTarget(new TargetSpell(filter4)); - } - - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability instanceof SpellAbility) { - if (!KickedCondition.instance.apply(game, ability)) { - ability.getTargets().clear(); - ability.getTargets().add(new TargetSpell(filter2)); - } - } + this.getSpellAbility().addTarget(new TargetSpell()); } public Prohibit(final Prohibit card) { @@ -87,3 +68,36 @@ public class Prohibit extends CardImpl { return new Prohibit(this); } } + +class OverloadEffect extends OneShotEffect { + + OverloadEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "Counter target spell if its converted mana cost is 2 or less. If {this} was kicked, counter that spell if its converted mana cost is 4 or less instead."; + } + + OverloadEffect(final OverloadEffect effect) { + super(effect); + } + + @Override + public OverloadEffect copy() { + return new OverloadEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Spell targetSpell = game.getSpell(this.getTargetPointer().getFirst(game, source)); + if (targetSpell != null) { + int cmc = targetSpell.getConvertedManaCost(); + if (cmc <= 2 || (KickedCondition.instance.apply(game, source) && cmc <= 4)) { + targetSpell.counter(source.getSourceId(), game); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/p/PromisedKannushi.java b/Mage.Sets/src/mage/cards/p/PromisedKannushi.java index 15ed186ff1..a91cbe426a 100644 --- a/Mage.Sets/src/mage/cards/p/PromisedKannushi.java +++ b/Mage.Sets/src/mage/cards/p/PromisedKannushi.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class PromisedKannushi extends CardImpl { public PromisedKannushi(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PropellerPioneer.java b/Mage.Sets/src/mage/cards/p/PropellerPioneer.java index b98ca26418..623c827ca7 100644 --- a/Mage.Sets/src/mage/cards/p/PropellerPioneer.java +++ b/Mage.Sets/src/mage/cards/p/PropellerPioneer.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class PropellerPioneer extends CardImpl { public PropellerPioneer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/ProphetOfDistortion.java b/Mage.Sets/src/mage/cards/p/ProphetOfDistortion.java index ea84932187..cc2d0cb82b 100644 --- a/Mage.Sets/src/mage/cards/p/ProphetOfDistortion.java +++ b/Mage.Sets/src/mage/cards/p/ProphetOfDistortion.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class ProphetOfDistortion extends CardImpl { public ProphetOfDistortion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/ProphetOfKruphix.java b/Mage.Sets/src/mage/cards/p/ProphetOfKruphix.java index 4f5c38aa32..1490bceb45 100644 --- a/Mage.Sets/src/mage/cards/p/ProphetOfKruphix.java +++ b/Mage.Sets/src/mage/cards/p/ProphetOfKruphix.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.UntapAllDuringEachOtherPlayersUn import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -57,8 +58,8 @@ public class ProphetOfKruphix extends CardImpl { public ProphetOfKruphix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PropheticFlamespeaker.java b/Mage.Sets/src/mage/cards/p/PropheticFlamespeaker.java index e0ac4aab73..437e494ceb 100644 --- a/Mage.Sets/src/mage/cards/p/PropheticFlamespeaker.java +++ b/Mage.Sets/src/mage/cards/p/PropheticFlamespeaker.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,9 +58,9 @@ import mage.target.targetpointer.FixedTarget; public class PropheticFlamespeaker extends CardImpl { public PropheticFlamespeaker(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(3); @@ -86,7 +87,7 @@ class PropheticFlamespeakerExileEffect extends OneShotEffect { public PropheticFlamespeakerExileEffect() { super(Outcome.Detriment); - this.staticText = "Exile the top card of your library. You may play it this turn"; + this.staticText = "exile the top card of your library. You may play it this turn"; } public PropheticFlamespeakerExileEffect(final PropheticFlamespeakerExileEffect effect) { @@ -141,7 +142,7 @@ class PropheticFlamespeakerCastFromExileEffect extends AsThoughEffectImpl { @Override public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { - return source.getControllerId().equals(affectedControllerId) && - objectId.equals(getTargetPointer().getFirst(game, source)); + return source.getControllerId().equals(affectedControllerId) + && objectId.equals(getTargetPointer().getFirst(game, source)); } } diff --git a/Mage.Sets/src/mage/cards/p/PropheticRavings.java b/Mage.Sets/src/mage/cards/p/PropheticRavings.java index a77edb0183..af21f3f40d 100644 --- a/Mage.Sets/src/mage/cards/p/PropheticRavings.java +++ b/Mage.Sets/src/mage/cards/p/PropheticRavings.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -56,7 +57,7 @@ public class PropheticRavings extends CardImpl { public PropheticRavings(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/p/ProsperousPirates.java b/Mage.Sets/src/mage/cards/p/ProsperousPirates.java new file mode 100644 index 0000000000..9ff437a039 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/ProsperousPirates.java @@ -0,0 +1,66 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.game.permanent.token.TreasureToken; + +/** + * + * @author TheElk801 + */ +public class ProsperousPirates extends CardImpl { + + public ProsperousPirates(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // When Prosperous Pirates enters the battlefield, create two colorless Treasure artifact tokens with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool." + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new TreasureToken("XLN"), 2))); + } + + public ProsperousPirates(final ProsperousPirates card) { + super(card); + } + + @Override + public ProsperousPirates copy() { + return new ProsperousPirates(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/ProsshSkyraiderOfKher.java b/Mage.Sets/src/mage/cards/p/ProsshSkyraiderOfKher.java index 8aa5f1d31c..4b03351c25 100644 --- a/Mage.Sets/src/mage/cards/p/ProsshSkyraiderOfKher.java +++ b/Mage.Sets/src/mage/cards/p/ProsshSkyraiderOfKher.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class ProsshSkyraiderOfKher extends CardImpl { public ProsshSkyraiderOfKher(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/ProteanHulk.java b/Mage.Sets/src/mage/cards/p/ProteanHulk.java index 588fb7c137..c1ea751136 100644 --- a/Mage.Sets/src/mage/cards/p/ProteanHulk.java +++ b/Mage.Sets/src/mage/cards/p/ProteanHulk.java @@ -34,6 +34,7 @@ import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class ProteanHulk extends CardImpl { public ProteanHulk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/p/ProteanHydra.java b/Mage.Sets/src/mage/cards/p/ProteanHydra.java index dee0a752f2..3ba89fb0b1 100644 --- a/Mage.Sets/src/mage/cards/p/ProteanHydra.java +++ b/Mage.Sets/src/mage/cards/p/ProteanHydra.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -57,7 +58,7 @@ public class ProteanHydra extends CardImpl { public ProteanHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{X}{G}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/p/ProtectiveBubble.java b/Mage.Sets/src/mage/cards/p/ProtectiveBubble.java index 616d55a7fe..e203df91d5 100644 --- a/Mage.Sets/src/mage/cards/p/ProtectiveBubble.java +++ b/Mage.Sets/src/mage/cards/p/ProtectiveBubble.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class ProtectiveBubble extends CardImpl { public ProtectiveBubble(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/p/ProtectorOfTheCrown.java b/Mage.Sets/src/mage/cards/p/ProtectorOfTheCrown.java index 526e6d329b..2d878a23df 100644 --- a/Mage.Sets/src/mage/cards/p/ProtectorOfTheCrown.java +++ b/Mage.Sets/src/mage/cards/p/ProtectorOfTheCrown.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.BecomesMonarchSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class ProtectorOfTheCrown extends CardImpl { public ProtectorOfTheCrown(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}"); - this.subtype.add("Giant"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/ProvenCombatant.java b/Mage.Sets/src/mage/cards/p/ProvenCombatant.java index bc1efa6d1a..9cb841b683 100644 --- a/Mage.Sets/src/mage/cards/p/ProvenCombatant.java +++ b/Mage.Sets/src/mage/cards/p/ProvenCombatant.java @@ -7,6 +7,7 @@ import mage.abilities.keyword.EternalizeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; public class ProvenCombatant extends CardImpl { @@ -14,8 +15,8 @@ public class ProvenCombatant extends CardImpl { super(ownerId, cardSetInfo, new CardType[]{CardType.CREATURE}, "{U}"); - subtype.add("Human"); - subtype.add("Warrior"); + subtype.add(SubType.HUMAN); + subtype.add(SubType.WARRIOR); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/ProwessOfTheFair.java b/Mage.Sets/src/mage/cards/p/ProwessOfTheFair.java index 119b47b900..f89f63f1d5 100644 --- a/Mage.Sets/src/mage/cards/p/ProwessOfTheFair.java +++ b/Mage.Sets/src/mage/cards/p/ProwessOfTheFair.java @@ -57,7 +57,7 @@ public class ProwessOfTheFair extends CardImpl { public ProwessOfTheFair(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); // Whenever another nontoken Elf is put into your graveyard from the battlefield, you may create a 1/1 green Elf Warrior creature token. this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(new CreateTokenEffect(new ElfToken()), diff --git a/Mage.Sets/src/mage/cards/p/ProwlersHelm.java b/Mage.Sets/src/mage/cards/p/ProwlersHelm.java index 229b161db3..f4c2117e88 100644 --- a/Mage.Sets/src/mage/cards/p/ProwlersHelm.java +++ b/Mage.Sets/src/mage/cards/p/ProwlersHelm.java @@ -52,7 +52,7 @@ public class ProwlersHelm extends CardImpl { public ProwlersHelm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature can't be blocked except by Walls. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, diff --git a/Mage.Sets/src/mage/cards/p/ProwlingNightstalker.java b/Mage.Sets/src/mage/cards/p/ProwlingNightstalker.java index 4b36cf20b1..e5adef201d 100644 --- a/Mage.Sets/src/mage/cards/p/ProwlingNightstalker.java +++ b/Mage.Sets/src/mage/cards/p/ProwlingNightstalker.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -54,7 +55,7 @@ public class ProwlingNightstalker extends CardImpl { public ProwlingNightstalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Nightstalker"); + this.subtype.add(SubType.NIGHTSTALKER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/ProwlingPangolin.java b/Mage.Sets/src/mage/cards/p/ProwlingPangolin.java index 29631f38e4..8b4896518e 100644 --- a/Mage.Sets/src/mage/cards/p/ProwlingPangolin.java +++ b/Mage.Sets/src/mage/cards/p/ProwlingPangolin.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterControlledCreaturePermanent; import mage.game.Game; @@ -52,7 +53,7 @@ public class ProwlingPangolin extends CardImpl { public ProwlingPangolin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/ProwlingSerpopard.java b/Mage.Sets/src/mage/cards/p/ProwlingSerpopard.java index 93536124fd..e8c37df809 100644 --- a/Mage.Sets/src/mage/cards/p/ProwlingSerpopard.java +++ b/Mage.Sets/src/mage/cards/p/ProwlingSerpopard.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.CantBeCounteredControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterSpell; @@ -55,8 +56,8 @@ public class ProwlingSerpopard extends CardImpl { public ProwlingSerpopard(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); - this.subtype.add("Cat"); - this.subtype.add("Snake"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PryingBlade.java b/Mage.Sets/src/mage/cards/p/PryingBlade.java new file mode 100644 index 0000000000..fca092898e --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PryingBlade.java @@ -0,0 +1,74 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.abilities.common.DealsDamageToAPlayerAttachedTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.permanent.token.TreasureToken; + +/** + * + * @author TheElk801 + */ +public class PryingBlade extends CardImpl { + + public PryingBlade(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); + + this.subtype.add(SubType.EQUIPMENT); + + // Equipped creature gets +1/+0. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 0))); + + // Whenever equipped creature deals combat damage to a player, create a colorless Treasure artifact token with "{t}, Sacrifice this artifact: Add one mana of any color to your mana pool." + this.addAbility(new DealsDamageToAPlayerAttachedTriggeredAbility(new CreateTokenEffect(new TreasureToken()), "equipped creature", false)); + + // Equip {2} + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); + } + + public PryingBlade(final PryingBlade card) { + super(card); + } + + @Override + public PryingBlade copy() { + return new PryingBlade(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PsionicEntity.java b/Mage.Sets/src/mage/cards/p/PsionicEntity.java new file mode 100644 index 0000000000..105de19b4b --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PsionicEntity.java @@ -0,0 +1,72 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DamageSelfEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author TheElk801 + */ +public class PsionicEntity extends CardImpl { + + public PsionicEntity(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); + + this.subtype.add(SubType.ILLUSION); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {tap}: Psionic Entity deals 2 damage to target creature or player and 3 damage to itself. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); + ability.addEffect(new DamageSelfEffect(3).setText("and 3 damage to itself")); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public PsionicEntity(final PsionicEntity card) { + super(card); + } + + @Override + public PsionicEntity copy() { + return new PsionicEntity(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PsionicGift.java b/Mage.Sets/src/mage/cards/p/PsionicGift.java index a30308bcde..e7a452fd5b 100644 --- a/Mage.Sets/src/mage/cards/p/PsionicGift.java +++ b/Mage.Sets/src/mage/cards/p/PsionicGift.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -54,7 +55,7 @@ public class PsionicGift extends CardImpl { public PsionicGift(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/p/PsionicSliver.java b/Mage.Sets/src/mage/cards/p/PsionicSliver.java index 431ec40201..c5c26851d3 100644 --- a/Mage.Sets/src/mage/cards/p/PsionicSliver.java +++ b/Mage.Sets/src/mage/cards/p/PsionicSliver.java @@ -55,18 +55,24 @@ public class PsionicSliver extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.SLIVER, "All Sliver creatures"); public PsionicSliver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Sliver"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); // All Sliver creatures have "{T}: This creature deals 2 damage to target creature or player and 3 damage to itself." - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); - ability.addEffect(new DamageSelfEffect(3)); + Ability ability = new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new DamageTargetEffect(2).setText("This creature deals 2 damage to target creature or player"), + new TapSourceCost() + ); + ability.addEffect(new DamageSelfEffect(3).setText("3 damage to itself.")); ability.addTarget(new TargetCreatureOrPlayer()); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, - filter, "All Sliver creatures have \"{T}: This creature deals 2 damage to target creature or player and 3 damage to itself.\""))); + this.addAbility( + new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, filter, + "All Sliver creatures have \"{T}: This creature deals 2 damage to target creature or player and 3 damage to itself.\"") + ) + ); } public PsionicSliver(final PsionicSliver card) { @@ -77,4 +83,4 @@ public class PsionicSliver extends CardImpl { public PsionicSliver copy() { return new PsionicSliver(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/p/Psychatog.java b/Mage.Sets/src/mage/cards/p/Psychatog.java index ff7ea76cfd..026952e99c 100644 --- a/Mage.Sets/src/mage/cards/p/Psychatog.java +++ b/Mage.Sets/src/mage/cards/p/Psychatog.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterCard; @@ -49,7 +50,7 @@ public class Psychatog extends CardImpl { public Psychatog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}"); - this.subtype.add("Atog"); + this.subtype.add(SubType.ATOG); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PsychicMembrane.java b/Mage.Sets/src/mage/cards/p/PsychicMembrane.java index dca46e47bd..d712a8f800 100644 --- a/Mage.Sets/src/mage/cards/p/PsychicMembrane.java +++ b/Mage.Sets/src/mage/cards/p/PsychicMembrane.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class PsychicMembrane extends CardImpl { public PsychicMembrane(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PsychicOverload.java b/Mage.Sets/src/mage/cards/p/PsychicOverload.java index 34cfa1eb21..3b82668b63 100644 --- a/Mage.Sets/src/mage/cards/p/PsychicOverload.java +++ b/Mage.Sets/src/mage/cards/p/PsychicOverload.java @@ -1,89 +1,90 @@ -/* - * 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.cards.p; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.common.DiscardTargetCost; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect; -import mage.abilities.effects.common.TapEnchantedEffect; -import mage.abilities.effects.common.UntapSourceEffect; -import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; -import mage.abilities.keyword.EnchantAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.common.FilterArtifactCard; -import mage.target.TargetPermanent; -import mage.target.common.TargetCardInHand; - -/** - * - * @author wetterlicht - */ -public class PsychicOverload extends CardImpl { - - public PsychicOverload(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}"); - this.subtype.add("Aura"); - - // Enchant permanent - TargetPermanent auraTarget = new TargetPermanent(); - this.getSpellAbility().addTarget(auraTarget); - this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); - this.addAbility(new EnchantAbility(auraTarget.getTargetName())); - - // When Psychic Overload enters the battlefield, tap enchanted permanent. - this.addAbility(new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect())); - // Enchanted permanent doesn't untap during its controller's untap step. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect())); - - // Enchanted permanent has "Discard two artifact cards: Untap this permanent." - Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new DiscardTargetCost(new TargetCardInHand(2, new FilterArtifactCard("two artifact cards")))); - Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield, "Enchanted permanent has \"Discard two artifact cards: Untap this permanent.\""); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); - } - - public PsychicOverload(final PsychicOverload card) { - super(card); - } - - @Override - public PsychicOverload copy() { - return new PsychicOverload(this); - } -} +/* + * 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.cards.p; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.DiscardTargetCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect; +import mage.abilities.effects.common.TapEnchantedEffect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterArtifactCard; +import mage.target.TargetPermanent; +import mage.target.common.TargetCardInHand; + +/** + * + * @author wetterlicht + */ +public class PsychicOverload extends CardImpl { + + public PsychicOverload(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}"); + this.subtype.add(SubType.AURA); + + // Enchant permanent + TargetPermanent auraTarget = new TargetPermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + + // When Psychic Overload enters the battlefield, tap enchanted permanent. + this.addAbility(new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect())); + // Enchanted permanent doesn't untap during its controller's untap step. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect())); + + // Enchanted permanent has "Discard two artifact cards: Untap this permanent." + Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new DiscardTargetCost(new TargetCardInHand(2, new FilterArtifactCard("two artifact cards")))); + Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield, "Enchanted permanent has \"Discard two artifact cards: Untap this permanent.\""); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + } + + public PsychicOverload(final PsychicOverload card) { + super(card); + } + + @Override + public PsychicOverload copy() { + return new PsychicOverload(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PsychicPossession.java b/Mage.Sets/src/mage/cards/p/PsychicPossession.java index 7d61103b90..5615a65fb3 100644 --- a/Mage.Sets/src/mage/cards/p/PsychicPossession.java +++ b/Mage.Sets/src/mage/cards/p/PsychicPossession.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class PsychicPossession extends CardImpl { public PsychicPossession(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant opponent TargetPlayer auraTarget = new TargetOpponent(); diff --git a/Mage.Sets/src/mage/cards/p/PsychicTheft.java b/Mage.Sets/src/mage/cards/p/PsychicTheft.java new file mode 100644 index 0000000000..0de93dd34e --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PsychicTheft.java @@ -0,0 +1,204 @@ +/* + * 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.cards.p; + +import java.util.List; +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.AsThoughEffect; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnFromExileEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.filter.common.FilterInstantOrSorceryCard; +import mage.constants.AsThoughEffectType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.players.Player; +import mage.target.TargetCard; +import mage.target.TargetPlayer; +import mage.target.targetpointer.FixedTarget; +import mage.watchers.common.SpellsCastWatcher; + +/** + * + * @author L_J (significantly based on code by jeffwadsworth and Styxo) + */ +public class PsychicTheft extends CardImpl { + + public PsychicTheft(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{U}"); + + // Target player reveals his or her hand. You choose an instant or sorcery card from it and exile that card. You may cast that card for as long as it remains exiled. At the beginning of the next end step, if you haven't cast the card, return it to its owner's hand. + this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addEffect(new PsychicTheftEffect()); + + } + + public PsychicTheft(final PsychicTheft card) { + super(card); + } + + @Override + public PsychicTheft copy() { + return new PsychicTheft(this); + } +} + +class PsychicTheftEffect extends OneShotEffect { + + private static final FilterInstantOrSorceryCard filter = new FilterInstantOrSorceryCard(); + + public PsychicTheftEffect() { + super(Outcome.Benefit); + this.staticText = "Target player reveals his or her hand. You choose an instant or sorcery card from it and exile that card. You may cast that card for as long as it remains exiled. At the beginning of the next end step, if you haven't cast the card, return it to its owner's hand."; + } + + public PsychicTheftEffect(final PsychicTheftEffect effect) { + super(effect); + } + + @Override + public PsychicTheftEffect copy() { + return new PsychicTheftEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player opponent = game.getPlayer(targetPointer.getFirst(game, source)); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (opponent != null && sourceObject != null) { + opponent.revealCards(sourceObject.getName(), opponent.getHand(), game); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int cardsHand = opponent.getHand().count(filter, game); + Card chosenCard = null; + if (cardsHand > 0) { + TargetCard target = new TargetCard(Zone.HAND, filter); + if (controller.choose(Outcome.Benefit, opponent.getHand(), target, game)) { + chosenCard = opponent.getHand().get(target.getFirstTarget(), game); + } + } + if (chosenCard != null) { + + opponent.moveCardToExileWithInfo(chosenCard, source.getSourceId(), sourceObject.getIdName(), source.getSourceId(), game, Zone.HAND, true); + + AsThoughEffect effect = new PsychicTheftCastFromExileEffect(); + effect.setTargetPointer(new FixedTarget(chosenCard.getId())); + game.addEffect(effect, source); + + OneShotEffect effect2 = new ReturnFromExileEffect(source.getSourceId(), Zone.HAND); + Condition condition = new PsychicTheftCondition(source.getSourceId(), chosenCard.getId()); + + ConditionalOneShotEffect effect3 = new ConditionalOneShotEffect(effect2, condition, "if you haven't cast it, return it to its owner's hand."); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect3); + game.addDelayedTriggeredAbility(delayedAbility, source); + return true; + } + } + } + return false; + } +} + +class PsychicTheftCastFromExileEffect extends AsThoughEffectImpl { + + PsychicTheftCastFromExileEffect() { + super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit); + staticText = "You may cast that card for as long as it remains exiled"; + } + + PsychicTheftCastFromExileEffect(final PsychicTheftCastFromExileEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public PsychicTheftCastFromExileEffect copy() { + return new PsychicTheftCastFromExileEffect(this); + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + if (targetPointer.getTargets(game, source).contains(objectId) + && game.getState().getZone(objectId) == Zone.EXILED) { + Player player = game.getPlayer(source.getControllerId()); + Card card = game.getCard(objectId); + if (player != null + && card != null) { + return true; + } + } + return false; + } +} + +class PsychicTheftCondition implements Condition { + + protected UUID exileId; + protected UUID cardId; + + public PsychicTheftCondition(UUID exileId, UUID cardId) { + this.exileId = exileId; + this.cardId = cardId; + } + + @Override + public boolean apply(Game game, Ability source) { + if (!game.getExile().getExileZone(exileId).contains(cardId)) { + return false; + } + SpellsCastWatcher watcher = (SpellsCastWatcher) game.getState().getWatchers().get(SpellsCastWatcher.class.getSimpleName(), source.getSourceId()); + if (watcher != null) { + List spells = watcher.getSpellsCastThisTurn(source.getControllerId()); + if (spells != null) { + for (Spell spell : spells) { + if (spell.getSourceId().equals(cardId)) { + return false; + } + } + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/p/PsychicVenom.java b/Mage.Sets/src/mage/cards/p/PsychicVenom.java index 872f8c2dcd..b7117b4f4e 100644 --- a/Mage.Sets/src/mage/cards/p/PsychicVenom.java +++ b/Mage.Sets/src/mage/cards/p/PsychicVenom.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.target.TargetPermanent; import mage.target.common.TargetLandPermanent; @@ -50,7 +51,7 @@ public class PsychicVenom extends CardImpl { public PsychicVenom(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land diff --git a/Mage.Sets/src/mage/cards/p/PsychosisCrawler.java b/Mage.Sets/src/mage/cards/p/PsychosisCrawler.java index f1b89f7e87..18c034316f 100644 --- a/Mage.Sets/src/mage/cards/p/PsychosisCrawler.java +++ b/Mage.Sets/src/mage/cards/p/PsychosisCrawler.java @@ -27,23 +27,19 @@ */ package mage.cards.p; -import java.util.Set; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.DrawCardControllerTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; -import mage.constants.Outcome; import mage.constants.Zone; -import mage.game.Game; -import mage.players.Player; /** * @@ -52,14 +48,14 @@ import mage.players.Player; public class PsychosisCrawler extends CardImpl { public PsychosisCrawler(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Horror"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(0); this.toughness = new MageInt(0); this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new CardsInControllerHandCount(), Duration.EndOfGame))); - this.addAbility(new DrawCardControllerTriggeredAbility(new LoseLifeOpponentsEffect(), false)); + this.addAbility(new DrawCardControllerTriggeredAbility(new LoseLifeOpponentsEffect(1), false)); } public PsychosisCrawler(final PsychosisCrawler card) { @@ -71,35 +67,3 @@ public class PsychosisCrawler extends CardImpl { return new PsychosisCrawler(this); } } - -class LoseLifeOpponentsEffect extends OneShotEffect { - - public LoseLifeOpponentsEffect() { - super(Outcome.Damage); - staticText = "each opponent loses 1 life"; - } - - public LoseLifeOpponentsEffect(final LoseLifeOpponentsEffect effect) { - super(effect); - } - - @Override - public LoseLifeOpponentsEffect copy() { - return new LoseLifeOpponentsEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - boolean applied = false; - Set opponents = game.getOpponents(source.getControllerId()); - for (UUID opponentUUID : opponents) { - Player player = game.getPlayer(opponentUUID); - if (player != null) { - player.loseLife(1, game, false); - applied = true; - } - } - return applied; - } - -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/p/PsychotropeThallid.java b/Mage.Sets/src/mage/cards/p/PsychotropeThallid.java index ac3ef6d89a..1c193eabbd 100644 --- a/Mage.Sets/src/mage/cards/p/PsychotropeThallid.java +++ b/Mage.Sets/src/mage/cards/p/PsychotropeThallid.java @@ -63,7 +63,7 @@ public class PsychotropeThallid extends CardImpl { public PsychotropeThallid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PterodonKnight.java b/Mage.Sets/src/mage/cards/p/PterodonKnight.java new file mode 100644 index 0000000000..12ce036230 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PterodonKnight.java @@ -0,0 +1,80 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author TheElk801 + */ +public class PterodonKnight extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Dinosaur"); + + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + } + + public PterodonKnight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Pterodon Knight has flying as long as you control a Dinosaur. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield), + new PermanentsOnTheBattlefieldCondition(filter), "{this} has flying as long as you control a Dinosaur"))); + } + + public PterodonKnight(final PterodonKnight card) { + super(card); + } + + @Override + public PterodonKnight copy() { + return new PterodonKnight(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PteronGhost.java b/Mage.Sets/src/mage/cards/p/PteronGhost.java index b88858bdf1..19d9b741b0 100644 --- a/Mage.Sets/src/mage/cards/p/PteronGhost.java +++ b/Mage.Sets/src/mage/cards/p/PteronGhost.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -56,7 +57,7 @@ public class PteronGhost extends CardImpl { public PteronGhost(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PulmonicSliver.java b/Mage.Sets/src/mage/cards/p/PulmonicSliver.java index ae6d934320..10b358fd79 100644 --- a/Mage.Sets/src/mage/cards/p/PulmonicSliver.java +++ b/Mage.Sets/src/mage/cards/p/PulmonicSliver.java @@ -55,7 +55,7 @@ public class PulmonicSliver extends CardImpl { public PulmonicSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PulsatingIllusion.java b/Mage.Sets/src/mage/cards/p/PulsatingIllusion.java index dda32b5c05..32ce7d82f4 100644 --- a/Mage.Sets/src/mage/cards/p/PulsatingIllusion.java +++ b/Mage.Sets/src/mage/cards/p/PulsatingIllusion.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCardInHand; @@ -48,7 +49,7 @@ public class PulsatingIllusion extends CardImpl { public PulsatingIllusion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PulseOfTheTangle.java b/Mage.Sets/src/mage/cards/p/PulseOfTheTangle.java index 01aa908d50..326bbdf437 100644 --- a/Mage.Sets/src/mage/cards/p/PulseOfTheTangle.java +++ b/Mage.Sets/src/mage/cards/p/PulseOfTheTangle.java @@ -1,115 +1,115 @@ -/* - * 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.cards.p; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.ControllerIdPredicate; -import mage.game.Game; -import mage.game.permanent.token.BeastToken; -import mage.players.Player; - -/** - * - * @author wetterlicht - */ -public class PulseOfTheTangle extends CardImpl { - - public PulseOfTheTangle(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{G}{G}"); - - // Create a 3/3 green Beast creature token. Then if an opponent controls more creatures than you, return Pulse of the Tangle to its owner's hand. - this.getSpellAbility().addEffect(new CreateTokenEffect(new BeastToken())); - this.getSpellAbility().addEffect(new PulseOfTheTangleReturnToHandEffect()); - } - - public PulseOfTheTangle(final PulseOfTheTangle card) { - super(card); - } - - @Override - public PulseOfTheTangle copy() { - return new PulseOfTheTangle(this); - } -} - -class PulseOfTheTangleReturnToHandEffect extends OneShotEffect { - - PulseOfTheTangleReturnToHandEffect() { - super(Outcome.Benefit); - this.staticText = "Then if an opponent controls more creatures than you, return {this} to its owner's hand"; - } - - PulseOfTheTangleReturnToHandEffect(final PulseOfTheTangleReturnToHandEffect effect) { - super(effect); - } - - @Override - public PulseOfTheTangleReturnToHandEffect copy() { - return new PulseOfTheTangleReturnToHandEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - FilterControlledCreaturePermanent controllerFilter = new FilterControlledCreaturePermanent(); - PermanentsOnBattlefieldCount controllerCount = new PermanentsOnBattlefieldCount(controllerFilter); - int controllerAmount = controllerCount.calculate(game, source, this); - boolean check = false; - if (controller != null) { - for (UUID opponentID : game.getOpponents(controller.getId())) { - if (opponentID != null) { - FilterCreaturePermanent opponentFilter = new FilterCreaturePermanent(); - opponentFilter.add(new ControllerIdPredicate(opponentID)); - PermanentsOnBattlefieldCount opponentCreatureCount = new PermanentsOnBattlefieldCount(opponentFilter); - check = opponentCreatureCount.calculate(game, source, this) > controllerAmount; - if (check) { - break; - } - } - } - if (check) { - Card card = game.getCard(source.getSourceId()); - controller.moveCards(card, Zone.HAND, source, game); - return true; - } - } - return false; - } -} +/* + * 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.cards.p; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.game.permanent.token.BeastToken; +import mage.players.Player; + +/** + * + * @author wetterlicht + */ +public class PulseOfTheTangle extends CardImpl { + + public PulseOfTheTangle(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{G}{G}"); + + // Create a 3/3 green Beast creature token. Then if an opponent controls more creatures than you, return Pulse of the Tangle to its owner's hand. + this.getSpellAbility().addEffect(new CreateTokenEffect(new BeastToken())); + this.getSpellAbility().addEffect(new PulseOfTheTangleReturnToHandEffect()); + } + + public PulseOfTheTangle(final PulseOfTheTangle card) { + super(card); + } + + @Override + public PulseOfTheTangle copy() { + return new PulseOfTheTangle(this); + } +} + +class PulseOfTheTangleReturnToHandEffect extends OneShotEffect { + + PulseOfTheTangleReturnToHandEffect() { + super(Outcome.Benefit); + this.staticText = "Then if an opponent controls more creatures than you, return {this} to its owner's hand"; + } + + PulseOfTheTangleReturnToHandEffect(final PulseOfTheTangleReturnToHandEffect effect) { + super(effect); + } + + @Override + public PulseOfTheTangleReturnToHandEffect copy() { + return new PulseOfTheTangleReturnToHandEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + FilterControlledCreaturePermanent controllerFilter = new FilterControlledCreaturePermanent(); + PermanentsOnBattlefieldCount controllerCount = new PermanentsOnBattlefieldCount(controllerFilter); + int controllerAmount = controllerCount.calculate(game, source, this); + boolean check = false; + if (controller != null) { + for (UUID opponentID : game.getOpponents(controller.getId())) { + if (opponentID != null) { + FilterCreaturePermanent opponentFilter = new FilterCreaturePermanent(); + opponentFilter.add(new ControllerIdPredicate(opponentID)); + PermanentsOnBattlefieldCount opponentCreatureCount = new PermanentsOnBattlefieldCount(opponentFilter); + check = opponentCreatureCount.calculate(game, source, this) > controllerAmount; + if (check) { + break; + } + } + } + if (check) { + Card card = game.getCard(source.getSourceId()); + controller.moveCards(card, Zone.HAND, source, game); + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/p/PulseTracker.java b/Mage.Sets/src/mage/cards/p/PulseTracker.java index 9661d27d06..ef5b83dadc 100644 --- a/Mage.Sets/src/mage/cards/p/PulseTracker.java +++ b/Mage.Sets/src/mage/cards/p/PulseTracker.java @@ -29,16 +29,12 @@ package mage.cards.p; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.Outcome; -import mage.game.Game; -import mage.players.Player; -import mage.players.Players; +import mage.constants.SubType; /** * @@ -47,14 +43,14 @@ import mage.players.Players; public class PulseTracker extends CardImpl { public PulseTracker(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Rogue"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); - this.addAbility(new AttacksTriggeredAbility(new PulseTrackerLoseLifeEffect(), false)); + this.addAbility(new AttacksTriggeredAbility(new LoseLifeOpponentsEffect(1), false)); } public PulseTracker(final PulseTracker card) { @@ -66,36 +62,3 @@ public class PulseTracker extends CardImpl { return new PulseTracker(this); } } - -class PulseTrackerLoseLifeEffect extends OneShotEffect { - - private static final String effectText = "each opponent loses 1 life"; - - PulseTrackerLoseLifeEffect ( ) { - super(Outcome.Damage); - staticText = effectText; - } - - PulseTrackerLoseLifeEffect ( PulseTrackerLoseLifeEffect effect ) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Players players = game.getPlayers(); - - for ( Player player : players.values() ) { - if ( !player.getId().equals(source.getControllerId()) ) { - player.loseLife(1, game, false); - } - } - - return true; - } - - @Override - public PulseTrackerLoseLifeEffect copy() { - return new PulseTrackerLoseLifeEffect(this); - } - -} diff --git a/Mage.Sets/src/mage/cards/p/PulsemageAdvocate.java b/Mage.Sets/src/mage/cards/p/PulsemageAdvocate.java index ad9d3f6470..2352409ffe 100644 --- a/Mage.Sets/src/mage/cards/p/PulsemageAdvocate.java +++ b/Mage.Sets/src/mage/cards/p/PulsemageAdvocate.java @@ -39,6 +39,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -63,8 +64,8 @@ public class PulsemageAdvocate extends CardImpl { public PulsemageAdvocate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PunctureBlast.java b/Mage.Sets/src/mage/cards/p/PunctureBlast.java index 3e6bfc161d..715e672a61 100644 --- a/Mage.Sets/src/mage/cards/p/PunctureBlast.java +++ b/Mage.Sets/src/mage/cards/p/PunctureBlast.java @@ -41,11 +41,12 @@ import mage.target.common.TargetCreatureOrPlayer; public class PunctureBlast extends CardImpl { public PunctureBlast(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); this.addAbility(WitherAbility.getInstance()); this.getSpellAbility().addEffect(new DamageTargetEffect(3)); this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().setRuleAtTheTop(false); } public PunctureBlast(final PunctureBlast card) { diff --git a/Mage.Sets/src/mage/cards/p/PuppetConjurer.java b/Mage.Sets/src/mage/cards/p/PuppetConjurer.java index 7d79679d4b..ecc09b1253 100644 --- a/Mage.Sets/src/mage/cards/p/PuppetConjurer.java +++ b/Mage.Sets/src/mage/cards/p/PuppetConjurer.java @@ -60,8 +60,8 @@ public class PuppetConjurer extends CardImpl { public PuppetConjurer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/Puppeteer.java b/Mage.Sets/src/mage/cards/p/Puppeteer.java index 23ea047c43..681e4294c1 100644 --- a/Mage.Sets/src/mage/cards/p/Puppeteer.java +++ b/Mage.Sets/src/mage/cards/p/Puppeteer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.MayTapOrUntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class Puppeteer extends CardImpl { public Puppeteer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PuppeteerClique.java b/Mage.Sets/src/mage/cards/p/PuppeteerClique.java index dae8822232..3450dc80fa 100644 --- a/Mage.Sets/src/mage/cards/p/PuppeteerClique.java +++ b/Mage.Sets/src/mage/cards/p/PuppeteerClique.java @@ -44,6 +44,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -65,8 +66,8 @@ public class PuppeteerClique extends CardImpl { public PuppeteerClique(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Faerie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PureSimple.java b/Mage.Sets/src/mage/cards/p/PureSimple.java index 3dc4bc1f41..a814617eb3 100644 --- a/Mage.Sets/src/mage/cards/p/PureSimple.java +++ b/Mage.Sets/src/mage/cards/p/PureSimple.java @@ -27,7 +27,6 @@ */ package mage.cards.p; -import java.util.UUID; import mage.abilities.effects.common.DestroyAllEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardSetInfo; @@ -41,6 +40,8 @@ import mage.filter.predicate.mageobject.MulticoloredPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Wehk @@ -48,7 +49,7 @@ import mage.target.TargetPermanent; public class PureSimple extends SplitCard { private static final FilterPermanent filterDestroy = new FilterPermanent("Auras and Equipment"); - private static final FilterPermanent filterMulticolor = new FilterPermanent("multicolor permanent"); + private static final FilterPermanent filterMulticolor = new FilterPermanent("multicolored permanent"); static { filterDestroy.add(Predicates.or(new SubtypePredicate(SubType.AURA), new SubtypePredicate(SubType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/p/PuresightMerrow.java b/Mage.Sets/src/mage/cards/p/PuresightMerrow.java index 88697c3d08..b5124e85f5 100644 --- a/Mage.Sets/src/mage/cards/p/PuresightMerrow.java +++ b/Mage.Sets/src/mage/cards/p/PuresightMerrow.java @@ -41,6 +41,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -54,8 +55,8 @@ public class PuresightMerrow extends CardImpl { public PuresightMerrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W/U}{W/U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PuresteelPaladin.java b/Mage.Sets/src/mage/cards/p/PuresteelPaladin.java index f57b33675d..28fae07ef7 100644 --- a/Mage.Sets/src/mage/cards/p/PuresteelPaladin.java +++ b/Mage.Sets/src/mage/cards/p/PuresteelPaladin.java @@ -57,8 +57,8 @@ public class PuresteelPaladin extends CardImpl { public PuresteelPaladin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/Purity.java b/Mage.Sets/src/mage/cards/p/Purity.java index a6e3237438..ac03da61b8 100644 --- a/Mage.Sets/src/mage/cards/p/Purity.java +++ b/Mage.Sets/src/mage/cards/p/Purity.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -55,8 +56,8 @@ public class Purity extends CardImpl { public Purity(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}{W}"); - this.subtype.add("Elemental"); - this.subtype.add("Incarnation"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.INCARNATION); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/p/PurphorosGodOfTheForge.java b/Mage.Sets/src/mage/cards/p/PurphorosGodOfTheForge.java index 2ffb85c87d..6da9bbd438 100644 --- a/Mage.Sets/src/mage/cards/p/PurphorosGodOfTheForge.java +++ b/Mage.Sets/src/mage/cards/p/PurphorosGodOfTheForge.java @@ -60,7 +60,7 @@ public class PurphorosGodOfTheForge extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/PurphorossEmissary.java b/Mage.Sets/src/mage/cards/p/PurphorossEmissary.java index 80af4956ec..a427dc47c5 100644 --- a/Mage.Sets/src/mage/cards/p/PurphorossEmissary.java +++ b/Mage.Sets/src/mage/cards/p/PurphorossEmissary.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -50,7 +51,7 @@ public class PurphorossEmissary extends CardImpl { public PurphorossEmissary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{R}"); - this.subtype.add("Ox"); + this.subtype.add(SubType.OX); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PurrajOfUrborg.java b/Mage.Sets/src/mage/cards/p/PurrajOfUrborg.java new file mode 100644 index 0000000000..4e19a9c00a --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PurrajOfUrborg.java @@ -0,0 +1,101 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.SpellCastAllTriggeredAbility; +import mage.abilities.condition.common.SourceAttackingCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author TheElk801 + */ +public class PurrajOfUrborg extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("a black spell"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public PurrajOfUrborg(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Purraj of Urborg has first strike as long as it's attacking. + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ConditionalContinuousEffect( + new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), + SourceAttackingCondition.instance, + "{this} has first strike as long as it's attacking" + ) + )); + + // Whenever a player casts a black spell, you may pay {B}. If you do, put a +1/+1 counter on Purraj of Urborg. + this.addAbility(new SpellCastAllTriggeredAbility( + new DoIfCostPaid( + new AddCountersSourceEffect(CounterType.P1P1.createInstance()), + new ManaCostsImpl("{B}") + ), + filter, false + )); + } + + public PurrajOfUrborg(final PurrajOfUrborg card) { + super(card); + } + + @Override + public PurrajOfUrborg copy() { + return new PurrajOfUrborg(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PursuitOfFlight.java b/Mage.Sets/src/mage/cards/p/PursuitOfFlight.java index 169a87b025..b1f97a2cd6 100644 --- a/Mage.Sets/src/mage/cards/p/PursuitOfFlight.java +++ b/Mage.Sets/src/mage/cards/p/PursuitOfFlight.java @@ -56,7 +56,7 @@ public class PursuitOfFlight extends CardImpl { public PursuitOfFlight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); this.color.setRed(true); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/p/PusKami.java b/Mage.Sets/src/mage/cards/p/PusKami.java index 8a5aa701eb..babcda4832 100644 --- a/Mage.Sets/src/mage/cards/p/PusKami.java +++ b/Mage.Sets/src/mage/cards/p/PusKami.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -60,7 +61,7 @@ public class PusKami extends CardImpl { public PusKami(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/Putrefaction.java b/Mage.Sets/src/mage/cards/p/Putrefaction.java new file mode 100644 index 0000000000..eaf2232671 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/Putrefaction.java @@ -0,0 +1,99 @@ +/* + * 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.cards.p; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.common.SpellCastAllTriggeredAbility; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.stack.Spell; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author L_J (based on dustinconrad) + */ +public class Putrefaction extends CardImpl { + + public Putrefaction(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{B}"); + + // Whenever a player casts a green or white spell, that player discards a card. + this.addAbility(new PutrefactionTriggeredAbility()); + } + + public Putrefaction(final Putrefaction card) { + super(card); + } + + @Override + public Putrefaction copy() { + return new Putrefaction(this); + } +} + +class PutrefactionTriggeredAbility extends SpellCastAllTriggeredAbility { + + private static final FilterSpell filter = new FilterSpell("green or white spell"); + static { + filter.add(Predicates.or(new ColorPredicate(ObjectColor.GREEN), new ColorPredicate(ObjectColor.WHITE))); + } + + public PutrefactionTriggeredAbility() { + super(new DiscardTargetEffect(1), filter, false); + } + + public PutrefactionTriggeredAbility(PutrefactionTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.SPELL_CAST) { + Spell spell = game.getStack().getSpell(event.getTargetId()); + if (spell != null && filter.match(spell, getSourceId(), getControllerId(), game)) { + this.getEffects().get(0).setTargetPointer(new FixedTarget(event.getPlayerId())); + return true; + } + } + return false; + } + + @Override + public PutrefactionTriggeredAbility copy() { + return new PutrefactionTriggeredAbility(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/Putrefax.java b/Mage.Sets/src/mage/cards/p/Putrefax.java index 332edaa92a..511334b50e 100644 --- a/Mage.Sets/src/mage/cards/p/Putrefax.java +++ b/Mage.Sets/src/mage/cards/p/Putrefax.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.events.GameEvent; /** @@ -48,7 +49,7 @@ public class Putrefax extends CardImpl { public Putrefax (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PutridImp.java b/Mage.Sets/src/mage/cards/p/PutridImp.java index 08f9689d51..046a07e351 100644 --- a/Mage.Sets/src/mage/cards/p/PutridImp.java +++ b/Mage.Sets/src/mage/cards/p/PutridImp.java @@ -45,6 +45,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -56,8 +57,8 @@ public class PutridImp extends CardImpl { public PutridImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Imp"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.IMP); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PutridLeech.java b/Mage.Sets/src/mage/cards/p/PutridLeech.java index 18a4504e45..88edf54825 100644 --- a/Mage.Sets/src/mage/cards/p/PutridLeech.java +++ b/Mage.Sets/src/mage/cards/p/PutridLeech.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class PutridLeech extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{G}"); - this.subtype.add("Zombie"); - this.subtype.add("Leech"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.LEECH); this.power = new MageInt(2); this.toughness = new MageInt(2); this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), new PayLifeCost(2))); diff --git a/Mage.Sets/src/mage/cards/p/PutridRaptor.java b/Mage.Sets/src/mage/cards/p/PutridRaptor.java index 38f11681e9..afc93ff5e9 100644 --- a/Mage.Sets/src/mage/cards/p/PutridRaptor.java +++ b/Mage.Sets/src/mage/cards/p/PutridRaptor.java @@ -51,10 +51,10 @@ public class PutridRaptor extends CardImpl { } public PutridRaptor(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Lizard"); - this.subtype.add("Beast"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.DINOSAUR); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/p/PutridWarrior.java b/Mage.Sets/src/mage/cards/p/PutridWarrior.java index 27e76b505a..bcd6aac13d 100644 --- a/Mage.Sets/src/mage/cards/p/PutridWarrior.java +++ b/Mage.Sets/src/mage/cards/p/PutridWarrior.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.LoseLifeAllPlayersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -54,9 +55,9 @@ public class PutridWarrior extends CardImpl { public PutridWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Soldier"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PygmyAllosaurus.java b/Mage.Sets/src/mage/cards/p/PygmyAllosaurus.java index ea2b4f0bc1..2174447741 100644 --- a/Mage.Sets/src/mage/cards/p/PygmyAllosaurus.java +++ b/Mage.Sets/src/mage/cards/p/PygmyAllosaurus.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ import mage.constants.CardType; public class PygmyAllosaurus extends CardImpl { public PygmyAllosaurus(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Lizard"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.subtype.add(SubType.DINOSAUR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PygmyKavu.java b/Mage.Sets/src/mage/cards/p/PygmyKavu.java index 60e1505845..b04ca0d5e6 100644 --- a/Mage.Sets/src/mage/cards/p/PygmyKavu.java +++ b/Mage.Sets/src/mage/cards/p/PygmyKavu.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -56,7 +57,7 @@ public class PygmyKavu extends CardImpl { public PygmyKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/p/PygmyPyrosaur.java b/Mage.Sets/src/mage/cards/p/PygmyPyrosaur.java index 7e71e1d53e..69f48ab75e 100644 --- a/Mage.Sets/src/mage/cards/p/PygmyPyrosaur.java +++ b/Mage.Sets/src/mage/cards/p/PygmyPyrosaur.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class PygmyPyrosaur extends CardImpl { public PygmyPyrosaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PygmyRazorback.java b/Mage.Sets/src/mage/cards/p/PygmyRazorback.java index 5c0b9da0f3..3789b2365b 100644 --- a/Mage.Sets/src/mage/cards/p/PygmyRazorback.java +++ b/Mage.Sets/src/mage/cards/p/PygmyRazorback.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class PygmyRazorback extends CardImpl { public PygmyRazorback(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Boar"); + this.subtype.add(SubType.BOAR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PygmyTroll.java b/Mage.Sets/src/mage/cards/p/PygmyTroll.java index 43b98deb41..ef69814e8d 100644 --- a/Mage.Sets/src/mage/cards/p/PygmyTroll.java +++ b/Mage.Sets/src/mage/cards/p/PygmyTroll.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class PygmyTroll extends CardImpl { public PygmyTroll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Troll"); + this.subtype.add(SubType.TROLL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/Pyknite.java b/Mage.Sets/src/mage/cards/p/Pyknite.java index 62e6f33a00..85ed3c545c 100644 --- a/Mage.Sets/src/mage/cards/p/Pyknite.java +++ b/Mage.Sets/src/mage/cards/p/Pyknite.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,7 +47,7 @@ public class Pyknite extends CardImpl { public Pyknite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Ouphe"); + this.subtype.add(SubType.OUPHE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PyreCharger.java b/Mage.Sets/src/mage/cards/p/PyreCharger.java index d32887152e..89c36edc25 100644 --- a/Mage.Sets/src/mage/cards/p/PyreCharger.java +++ b/Mage.Sets/src/mage/cards/p/PyreCharger.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class PyreCharger extends CardImpl { public PyreCharger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PyreHound.java b/Mage.Sets/src/mage/cards/p/PyreHound.java index 8f90c5258e..d3c61ec831 100644 --- a/Mage.Sets/src/mage/cards/p/PyreHound.java +++ b/Mage.Sets/src/mage/cards/p/PyreHound.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterInstantOrSorcerySpell; @@ -46,8 +47,8 @@ public class PyreHound extends CardImpl { public PyreHound(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Hound"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.HOUND); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PyreZombie.java b/Mage.Sets/src/mage/cards/p/PyreZombie.java index e2fa5aeb50..7dc0441124 100644 --- a/Mage.Sets/src/mage/cards/p/PyreZombie.java +++ b/Mage.Sets/src/mage/cards/p/PyreZombie.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -51,15 +52,15 @@ import mage.target.common.TargetCreatureOrPlayer; public class PyreZombie extends CardImpl { public PyreZombie(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}"); - this.subtype.add("Zombie"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); // At the beginning of your upkeep, if Pyre Zombie is in your graveyard, you may pay {1}{B}{B}. If you do, return Pyre Zombie to your hand. this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.GRAVEYARD, - new DoIfCostPaid(new ReturnToHandSourceEffect(), new ManaCostsImpl("{1}{B}{B}")), - TargetController.YOU, false)); + new DoIfCostPaid(new ReturnToHandSourceEffect().setText("return {this} to your hand"), new ManaCostsImpl("{1}{B}{B}")), + TargetController.YOU, false)); // {1}{R}{R}, Sacrifice Pyre Zombie: Pyre Zombie deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{1}{R}{R}")); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/p/PyreheartWolf.java b/Mage.Sets/src/mage/cards/p/PyreheartWolf.java index 4216cfed2e..8ab32e9b2b 100644 --- a/Mage.Sets/src/mage/cards/p/PyreheartWolf.java +++ b/Mage.Sets/src/mage/cards/p/PyreheartWolf.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.UndyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -55,7 +56,7 @@ public class PyreheartWolf extends CardImpl { public PyreheartWolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PyrewildShaman.java b/Mage.Sets/src/mage/cards/p/PyrewildShaman.java index 4e773f1f57..d8e6d15213 100644 --- a/Mage.Sets/src/mage/cards/p/PyrewildShaman.java +++ b/Mage.Sets/src/mage/cards/p/PyrewildShaman.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.BloodrushAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -56,8 +57,8 @@ public class PyrewildShaman extends CardImpl { public PyrewildShaman (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/p/PyroclastConsul.java b/Mage.Sets/src/mage/cards/p/PyroclastConsul.java index 6951b1f0b1..c9b10e2da0 100644 --- a/Mage.Sets/src/mage/cards/p/PyroclastConsul.java +++ b/Mage.Sets/src/mage/cards/p/PyroclastConsul.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; /** @@ -44,8 +45,8 @@ public class PyroclastConsul extends CardImpl { public PyroclastConsul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/p/PyromancerAscension.java b/Mage.Sets/src/mage/cards/p/PyromancerAscension.java index 556835d047..21a6ac5d85 100644 --- a/Mage.Sets/src/mage/cards/p/PyromancerAscension.java +++ b/Mage.Sets/src/mage/cards/p/PyromancerAscension.java @@ -127,7 +127,7 @@ class PyromancerAscensionQuestTriggeredAbility extends TriggeredAbilityImpl { class PyromancerAscensionCopyTriggeredAbility extends TriggeredAbilityImpl { PyromancerAscensionCopyTriggeredAbility() { - super(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), true); + super(Zone.BATTLEFIELD, new CopyTargetSpellEffect(true), true); } PyromancerAscensionCopyTriggeredAbility(final PyromancerAscensionCopyTriggeredAbility ability) { diff --git a/Mage.Sets/src/mage/cards/p/PyromancersGoggles.java b/Mage.Sets/src/mage/cards/p/PyromancersGoggles.java index 742d616a05..bc8b042989 100644 --- a/Mage.Sets/src/mage/cards/p/PyromancersGoggles.java +++ b/Mage.Sets/src/mage/cards/p/PyromancersGoggles.java @@ -54,7 +54,7 @@ import mage.target.targetpointer.FixedTarget; public class PyromancersGoggles extends CardImpl { public PyromancersGoggles(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{5}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{5}"); addSuperType(SuperType.LEGENDARY); // {T}: Add {R} to your mana pool. @@ -62,7 +62,7 @@ public class PyromancersGoggles extends CardImpl { this.addAbility(ability); // When that mana is used to cast a red instant or sorcery spell, copy that spell and you may choose new targets for the copy. - Effect effect = new CopyTargetSpellEffect(); + Effect effect = new CopyTargetSpellEffect(true); effect.setText("copy that spell and you may choose new targets for the copy"); this.addAbility(new PyromancersGogglesTriggeredAbility(ability.getOriginalId(), effect)); @@ -89,7 +89,7 @@ class PyromancersGogglesTriggeredAbility extends TriggeredAbilityImpl { String abilityOriginalId; public PyromancersGogglesTriggeredAbility(UUID abilityOriginalId, Effect effect) { - super(Zone.ALL, effect, true); + super(Zone.ALL, effect, false); this.abilityOriginalId = abilityOriginalId.toString(); } diff --git a/Mage.Sets/src/mage/cards/p/Python.java b/Mage.Sets/src/mage/cards/p/Python.java index f3c57a5b89..130eabfbfc 100644 --- a/Mage.Sets/src/mage/cards/p/Python.java +++ b/Mage.Sets/src/mage/cards/p/Python.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class Python extends CardImpl { public Python(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/q/QalSismaBehemoth.java b/Mage.Sets/src/mage/cards/q/QalSismaBehemoth.java index a9152c37d7..1cf934f116 100644 --- a/Mage.Sets/src/mage/cards/q/QalSismaBehemoth.java +++ b/Mage.Sets/src/mage/cards/q/QalSismaBehemoth.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.combat.CantAttackBlockUnlessPaysSourceEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class QalSismaBehemoth extends CardImpl { public QalSismaBehemoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/q/QarsiDeceiver.java b/Mage.Sets/src/mage/cards/q/QarsiDeceiver.java index 0593e7149b..ea13931fad 100644 --- a/Mage.Sets/src/mage/cards/q/QarsiDeceiver.java +++ b/Mage.Sets/src/mage/cards/q/QarsiDeceiver.java @@ -41,6 +41,7 @@ import mage.abilities.mana.builder.ConditionalManaBuilder; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.Game; import mage.game.stack.Spell; @@ -52,8 +53,8 @@ public class QarsiDeceiver extends CardImpl { public QarsiDeceiver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Naga"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/q/QarsiHighPriest.java b/Mage.Sets/src/mage/cards/q/QarsiHighPriest.java index 20bb8b19ef..dea8b30150 100644 --- a/Mage.Sets/src/mage/cards/q/QarsiHighPriest.java +++ b/Mage.Sets/src/mage/cards/q/QarsiHighPriest.java @@ -38,6 +38,7 @@ import mage.abilities.effects.keyword.ManifestEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.common.TargetControlledCreaturePermanent; @@ -50,8 +51,8 @@ public class QarsiHighPriest extends CardImpl { public QarsiHighPriest(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/q/QarsiSadist.java b/Mage.Sets/src/mage/cards/q/QarsiSadist.java index f37bcdc1e3..a0d92da937 100644 --- a/Mage.Sets/src/mage/cards/q/QarsiSadist.java +++ b/Mage.Sets/src/mage/cards/q/QarsiSadist.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ExploitAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetOpponent; /** @@ -48,8 +49,8 @@ public class QarsiSadist extends CardImpl { public QarsiSadist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/q/QasaliAmbusher.java b/Mage.Sets/src/mage/cards/q/QasaliAmbusher.java index df04017d72..4ff501b423 100644 --- a/Mage.Sets/src/mage/cards/q/QasaliAmbusher.java +++ b/Mage.Sets/src/mage/cards/q/QasaliAmbusher.java @@ -53,8 +53,8 @@ public class QasaliAmbusher extends CardImpl { public QasaliAmbusher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/q/QasaliPridemage.java b/Mage.Sets/src/mage/cards/q/QasaliPridemage.java index 173e05f26a..10b478140d 100644 --- a/Mage.Sets/src/mage/cards/q/QasaliPridemage.java +++ b/Mage.Sets/src/mage/cards/q/QasaliPridemage.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ExaltedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.Target; @@ -52,8 +53,8 @@ public class QasaliPridemage extends CardImpl { public QasaliPridemage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/q/QasaliSlingers.java b/Mage.Sets/src/mage/cards/q/QasaliSlingers.java index 90a8d7a4fd..b3598497e5 100644 --- a/Mage.Sets/src/mage/cards/q/QasaliSlingers.java +++ b/Mage.Sets/src/mage/cards/q/QasaliSlingers.java @@ -52,8 +52,8 @@ public class QasaliSlingers extends CardImpl { public QasaliSlingers(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); - this.subtype.add("Cat"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/q/QuagSickness.java b/Mage.Sets/src/mage/cards/q/QuagSickness.java index e5f0b1fc7f..07d14ee076 100644 --- a/Mage.Sets/src/mage/cards/q/QuagSickness.java +++ b/Mage.Sets/src/mage/cards/q/QuagSickness.java @@ -59,7 +59,7 @@ public class QuagSickness extends CardImpl { public QuagSickness(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/cards/q/QuagVampires.java b/Mage.Sets/src/mage/cards/q/QuagVampires.java index db91e34298..e7d5f90a9e 100644 --- a/Mage.Sets/src/mage/cards/q/QuagVampires.java +++ b/Mage.Sets/src/mage/cards/q/QuagVampires.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -47,8 +48,8 @@ public class QuagVampires extends CardImpl { public QuagVampires(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/q/QuagmireDruid.java b/Mage.Sets/src/mage/cards/q/QuagmireDruid.java index 3483230ec2..05eec0d41c 100644 --- a/Mage.Sets/src/mage/cards/q/QuagmireDruid.java +++ b/Mage.Sets/src/mage/cards/q/QuagmireDruid.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -51,8 +52,8 @@ public class QuagmireDruid extends CardImpl { public QuagmireDruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/q/QuagmireLamprey.java b/Mage.Sets/src/mage/cards/q/QuagmireLamprey.java index fbc9a0f39b..b1aef745ca 100644 --- a/Mage.Sets/src/mage/cards/q/QuagmireLamprey.java +++ b/Mage.Sets/src/mage/cards/q/QuagmireLamprey.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,7 +46,7 @@ public class QuagmireLamprey extends CardImpl { public QuagmireLamprey(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Fish"); + this.subtype.add(SubType.FISH); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/q/Quagnoth.java b/Mage.Sets/src/mage/cards/q/Quagnoth.java index f95379bfa7..17d79f15d1 100644 --- a/Mage.Sets/src/mage/cards/q/Quagnoth.java +++ b/Mage.Sets/src/mage/cards/q/Quagnoth.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SplitSecondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class Quagnoth extends CardImpl { public Quagnoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/q/QuarryBeetle.java b/Mage.Sets/src/mage/cards/q/QuarryBeetle.java index f55b65d4ef..61dbd24575 100644 --- a/Mage.Sets/src/mage/cards/q/QuarryBeetle.java +++ b/Mage.Sets/src/mage/cards/q/QuarryBeetle.java @@ -1,68 +1,69 @@ -/* - * 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.cards.q; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.common.FilterLandCard; -import mage.target.common.TargetCardInYourGraveyard; - -/** - * - * @author ciaccona007 - */ -public class QuarryBeetle extends CardImpl { - - public QuarryBeetle(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); - - this.subtype.add("Insect"); - this.power = new MageInt(4); - this.toughness = new MageInt(5); - - // When Quarry Beetle enters the battlefield, you may return target land card from your graveyard to the battlefield. - Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), true); - ability.addTarget(new TargetCardInYourGraveyard(new FilterLandCard("land card from your graveyard"))); - addAbility(ability); - } - - public QuarryBeetle(final QuarryBeetle card) { - super(card); - } - - @Override - public QuarryBeetle copy() { - return new QuarryBeetle(this); - } -} +/* + * 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.cards.q; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterLandCard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author ciaccona007 + */ +public class QuarryBeetle extends CardImpl { + + public QuarryBeetle(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); + + this.subtype.add(SubType.INSECT); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // When Quarry Beetle enters the battlefield, you may return target land card from your graveyard to the battlefield. + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), true); + ability.addTarget(new TargetCardInYourGraveyard(new FilterLandCard("land card from your graveyard"))); + addAbility(ability); + } + + public QuarryBeetle(final QuarryBeetle card) { + super(card); + } + + @Override + public QuarryBeetle copy() { + return new QuarryBeetle(this); + } +} diff --git a/Mage.Sets/src/mage/cards/q/QuarryColossus.java b/Mage.Sets/src/mage/cards/q/QuarryColossus.java index c241be33e0..d2d00304fb 100644 --- a/Mage.Sets/src/mage/cards/q/QuarryColossus.java +++ b/Mage.Sets/src/mage/cards/q/QuarryColossus.java @@ -57,7 +57,7 @@ public class QuarryColossus extends CardImpl { public QuarryColossus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/q/QuarryHauler.java b/Mage.Sets/src/mage/cards/q/QuarryHauler.java index 311917fbc4..296b36b933 100644 --- a/Mage.Sets/src/mage/cards/q/QuarryHauler.java +++ b/Mage.Sets/src/mage/cards/q/QuarryHauler.java @@ -1,126 +1,127 @@ -/* - * 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.cards.q; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.OneShotEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.counters.Counter; -import mage.counters.CounterType; -import mage.counters.Counters; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.TargetPermanent; - -/** - * - * @author Styxo - */ -public class QuarryHauler extends CardImpl { - - public QuarryHauler(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); - - this.subtype.add("Camel"); - this.power = new MageInt(4); - this.toughness = new MageInt(3); - - // When Quarry Hauler enters the battlefield, for each kind of counter on target permanent, put another counter of that kind on it or remove one from it. - Ability ability = new EntersBattlefieldTriggeredAbility(new QuarryHaulerEffect()); - ability.addTarget(new TargetPermanent()); - this.addAbility(ability); - } - - public QuarryHauler(final QuarryHauler card) { - super(card); - } - - @Override - public QuarryHauler copy() { - return new QuarryHauler(this); - } -} - -class QuarryHaulerEffect extends OneShotEffect { - - public QuarryHaulerEffect() { - super(Outcome.BoostCreature); - this.staticText = "for each kind of counter on target permanent, put another counter of that kind on it or remove one from it"; - - } - - public QuarryHaulerEffect(final QuarryHaulerEffect effect) { - super(effect); - } - - @Override - public QuarryHaulerEffect copy() { - return new QuarryHaulerEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); - if (controller != null) { - if (permanent != null) { - Counters counters = permanent.getCounters(game).copy(); - CounterType counterType; - for (Counter counter : counters.values()) { - if (controller.chooseUse(Outcome.BoostCreature, "Do you want to add or remove a " + counter.getName() + " counter?", null, "add", "remove", source, game)) { - counterType = CounterType.findByName(counter.getName()); - Counter counterToAdd; - if (counterType != null) { - counterToAdd = counterType.createInstance(); - } else { - counterToAdd = new Counter(counter.getName()); - } - permanent.addCounters(counterToAdd, source, game); - } else { - counterType = CounterType.findByName(counter.getName()); - if (counterType != null) { - permanent.removeCounters(counterType.createInstance(), game); - } else { - permanent.removeCounters(counter.getName(), 1, game); - } - } - } - } - return true; - } - return false; - } - -} +/* + * 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.cards.q; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.counters.Counter; +import mage.counters.CounterType; +import mage.counters.Counters; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPermanent; + +/** + * + * @author Styxo + */ +public class QuarryHauler extends CardImpl { + + public QuarryHauler(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + + this.subtype.add(SubType.CAMEL); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // When Quarry Hauler enters the battlefield, for each kind of counter on target permanent, put another counter of that kind on it or remove one from it. + Ability ability = new EntersBattlefieldTriggeredAbility(new QuarryHaulerEffect()); + ability.addTarget(new TargetPermanent()); + this.addAbility(ability); + } + + public QuarryHauler(final QuarryHauler card) { + super(card); + } + + @Override + public QuarryHauler copy() { + return new QuarryHauler(this); + } +} + +class QuarryHaulerEffect extends OneShotEffect { + + public QuarryHaulerEffect() { + super(Outcome.BoostCreature); + this.staticText = "for each kind of counter on target permanent, put another counter of that kind on it or remove one from it"; + + } + + public QuarryHaulerEffect(final QuarryHaulerEffect effect) { + super(effect); + } + + @Override + public QuarryHaulerEffect copy() { + return new QuarryHaulerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (controller != null) { + if (permanent != null) { + Counters counters = permanent.getCounters(game).copy(); + CounterType counterType; + for (Counter counter : counters.values()) { + if (controller.chooseUse(Outcome.BoostCreature, "Do you want to add or remove a " + counter.getName() + " counter?", null, "add", "remove", source, game)) { + counterType = CounterType.findByName(counter.getName()); + Counter counterToAdd; + if (counterType != null) { + counterToAdd = counterType.createInstance(); + } else { + counterToAdd = new Counter(counter.getName()); + } + permanent.addCounters(counterToAdd, source, game); + } else { + counterType = CounterType.findByName(counter.getName()); + if (counterType != null) { + permanent.removeCounters(counterType.createInstance(), game); + } else { + permanent.removeCounters(counter.getName(), 1, game); + } + } + } + } + return true; + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/cards/q/QueenMarchesa.java b/Mage.Sets/src/mage/cards/q/QueenMarchesa.java index 4a0fff3a60..ab67ac06a4 100644 --- a/Mage.Sets/src/mage/cards/q/QueenMarchesa.java +++ b/Mage.Sets/src/mage/cards/q/QueenMarchesa.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.game.Game; @@ -56,8 +57,8 @@ public class QueenMarchesa extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{W}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/q/QueensAgent.java b/Mage.Sets/src/mage/cards/q/QueensAgent.java new file mode 100644 index 0000000000..a599004b13 --- /dev/null +++ b/Mage.Sets/src/mage/cards/q/QueensAgent.java @@ -0,0 +1,69 @@ +/* + * 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.cards.q; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.keyword.ExploreSourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class QueensAgent extends CardImpl { + + public QueensAgent(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SCOUT); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Lifelink + this.addAbility(LifelinkAbility.getInstance()); + + // When Queen's Agent enters the battlefield, it explores. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ExploreSourceEffect())); + } + + public QueensAgent(final QueensAgent card) { + super(card); + } + + @Override + public QueensAgent copy() { + return new QueensAgent(this); + } +} diff --git a/Mage.Sets/src/mage/cards/q/QueensBaySoldier.java b/Mage.Sets/src/mage/cards/q/QueensBaySoldier.java new file mode 100644 index 0000000000..508897bca5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/q/QueensBaySoldier.java @@ -0,0 +1,60 @@ +/* + * 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.cards.q; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author TheElk801 + */ +public class QueensBaySoldier extends CardImpl { + + public QueensBaySoldier(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + } + + public QueensBaySoldier(final QueensBaySoldier card) { + super(card); + } + + @Override + public QueensBaySoldier copy() { + return new QueensBaySoldier(this); + } +} diff --git a/Mage.Sets/src/mage/cards/q/QueensCommission.java b/Mage.Sets/src/mage/cards/q/QueensCommission.java new file mode 100644 index 0000000000..97cf10c0f6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/q/QueensCommission.java @@ -0,0 +1,58 @@ +/* + * 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.cards.q; + +import java.util.UUID; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.permanent.token.IxalanVampireToken; + +/** + * + * @author TheElk801 + */ +public class QueensCommission extends CardImpl { + + public QueensCommission(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{W}"); + + // Create two 1/1 white Vampire creature tokens with lifelink. + this.getSpellAbility().addEffect(new CreateTokenEffect(new IxalanVampireToken(), 2)); + } + + public QueensCommission(final QueensCommission card) { + super(card); + } + + @Override + public QueensCommission copy() { + return new QueensCommission(this); + } +} diff --git a/Mage.Sets/src/mage/cards/q/QuestingPhelddagrif.java b/Mage.Sets/src/mage/cards/q/QuestingPhelddagrif.java index b8d1013dc9..c5c1067ef2 100644 --- a/Mage.Sets/src/mage/cards/q/QuestingPhelddagrif.java +++ b/Mage.Sets/src/mage/cards/q/QuestingPhelddagrif.java @@ -43,6 +43,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.HippoToken; @@ -57,7 +58,7 @@ public class QuestingPhelddagrif extends CardImpl { public QuestingPhelddagrif(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}{U}"); - this.subtype.add("Phelddagrif"); + this.subtype.add(SubType.PHELDDAGRIF); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/q/QuiGonJinn.java b/Mage.Sets/src/mage/cards/q/QuiGonJinn.java index 95f47cd475..ce8a9e10e1 100644 --- a/Mage.Sets/src/mage/cards/q/QuiGonJinn.java +++ b/Mage.Sets/src/mage/cards/q/QuiGonJinn.java @@ -43,6 +43,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.target.common.TargetCardInGraveyard; @@ -56,8 +57,8 @@ public class QuiGonJinn extends CardImpl { public QuiGonJinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{U}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Jedi"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.JEDI); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/q/QuickSliver.java b/Mage.Sets/src/mage/cards/q/QuickSliver.java index 3fe1fe505c..71c7513e0e 100644 --- a/Mage.Sets/src/mage/cards/q/QuickSliver.java +++ b/Mage.Sets/src/mage/cards/q/QuickSliver.java @@ -54,7 +54,7 @@ public class QuickSliver extends CardImpl { public QuickSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/q/Quickchange.java b/Mage.Sets/src/mage/cards/q/Quickchange.java index 47ce4239f5..1f6ea700d5 100644 --- a/Mage.Sets/src/mage/cards/q/Quickchange.java +++ b/Mage.Sets/src/mage/cards/q/Quickchange.java @@ -1,64 +1,64 @@ -/* - * 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.cards.q; - -import java.util.UUID; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.continuous.BecomesColorOrColorsTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author LevelX2 - */ -public class Quickchange extends CardImpl { - - public Quickchange(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); - - // Target creature becomes the color or colors of your choice until end of turn. - this.getSpellAbility().addEffect(new BecomesColorOrColorsTargetEffect(Duration.EndOfTurn)); - this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - - // Draw a card. - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); - } - - public Quickchange(final Quickchange card) { - super(card); - } - - @Override - public Quickchange copy() { - return new Quickchange(this); - } -} +/* + * 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.cards.q; + +import java.util.UUID; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.BecomesColorOrColorsTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class Quickchange extends CardImpl { + + public Quickchange(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); + + // Target creature becomes the color or colors of your choice until end of turn. + this.getSpellAbility().addEffect(new BecomesColorOrColorsTargetEffect(Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public Quickchange(final Quickchange card) { + super(card); + } + + @Override + public Quickchange copy() { + return new Quickchange(this); + } +} diff --git a/Mage.Sets/src/mage/cards/q/QuickeningLicid.java b/Mage.Sets/src/mage/cards/q/QuickeningLicid.java index 52391a53ac..fc9ce2fdd2 100644 --- a/Mage.Sets/src/mage/cards/q/QuickeningLicid.java +++ b/Mage.Sets/src/mage/cards/q/QuickeningLicid.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class QuickeningLicid extends CardImpl { public QuickeningLicid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Licid"); + this.subtype.add(SubType.LICID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/q/Quickling.java b/Mage.Sets/src/mage/cards/q/Quickling.java index 22377cedac..cb85f46f96 100644 --- a/Mage.Sets/src/mage/cards/q/Quickling.java +++ b/Mage.Sets/src/mage/cards/q/Quickling.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -55,8 +56,8 @@ public class Quickling extends CardImpl { public Quickling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/q/QuicksilverBehemoth.java b/Mage.Sets/src/mage/cards/q/QuicksilverBehemoth.java index 0bf7fceb27..c97adc17b1 100644 --- a/Mage.Sets/src/mage/cards/q/QuicksilverBehemoth.java +++ b/Mage.Sets/src/mage/cards/q/QuicksilverBehemoth.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.AffinityForArtifactsAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,7 +48,7 @@ public class QuicksilverBehemoth extends CardImpl { public QuicksilverBehemoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/q/QuicksilverDagger.java b/Mage.Sets/src/mage/cards/q/QuicksilverDagger.java index 1764c3c301..9da954dd66 100644 --- a/Mage.Sets/src/mage/cards/q/QuicksilverDagger.java +++ b/Mage.Sets/src/mage/cards/q/QuicksilverDagger.java @@ -41,6 +41,8 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -54,9 +56,8 @@ import mage.target.common.TargetCreaturePermanent; public class QuicksilverDagger extends CardImpl { public QuicksilverDagger(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}{R}"); - this.subtype.add("Aura"); - + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}{R}"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); @@ -64,12 +65,15 @@ public class QuicksilverDagger extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - + // Enchanted creature has "{tap}: This creature deals 1 damage to target player. You draw a card." Ability gainAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); gainAbility.addTarget(new TargetPlayer()); gainAbility.addEffect(new DrawCardSourceControllerEffect(1)); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainAbility, AttachmentType.AURA))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAttachedEffect(gainAbility, AttachmentType.AURA, Duration.WhileOnBattlefield, + "Enchanted creature has \"{tap}: This creature deals 1 damage to target player. You draw a card.\"") + )); } public QuicksilverDagger(final QuicksilverDagger card) { diff --git a/Mage.Sets/src/mage/cards/q/QuicksilverDragon.java b/Mage.Sets/src/mage/cards/q/QuicksilverDragon.java index f09405a932..f06737bc09 100644 --- a/Mage.Sets/src/mage/cards/q/QuicksilverDragon.java +++ b/Mage.Sets/src/mage/cards/q/QuicksilverDragon.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class QuicksilverDragon extends CardImpl { public QuicksilverDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/q/QuicksilverElemental.java b/Mage.Sets/src/mage/cards/q/QuicksilverElemental.java index 1da56d64f3..293843fd05 100644 --- a/Mage.Sets/src/mage/cards/q/QuicksilverElemental.java +++ b/Mage.Sets/src/mage/cards/q/QuicksilverElemental.java @@ -37,10 +37,13 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.AsThoughManaEffect; import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.ManaType; @@ -62,7 +65,7 @@ public class QuicksilverElemental extends CardImpl { public QuicksilverElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(4); @@ -88,14 +91,14 @@ public class QuicksilverElemental extends CardImpl { } } -class QuicksilverElementalEffect extends ContinuousEffectImpl { +class QuicksilverElementalEffect extends OneShotEffect { - public QuicksilverElementalEffect() { - super(Duration.EndOfTurn, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); + QuicksilverElementalEffect() { + super(Outcome.Benefit); staticText = "{this} gains all activated abilities of target creature until end of turn"; } - public QuicksilverElementalEffect(final QuicksilverElementalEffect effect) { + QuicksilverElementalEffect(final QuicksilverElementalEffect effect) { super(effect); } @@ -111,13 +114,46 @@ class QuicksilverElementalEffect extends ContinuousEffectImpl { if (permanent != null && creature != null) { for (ActivatedAbility ability : creature.getAbilities().getActivatedAbilities(Zone.BATTLEFIELD)) { - permanent.addAbility(ability, source.getSourceId(), game); + Ability newAbility = ability.copy(); + newAbility.newOriginalId(); + game.addEffect(new GainAbilitySourceEffect(newAbility, Duration.EndOfTurn), source); } + return true; } return false; } } +//class QuicksilverElementalEffect extends ContinuousEffectImpl { +// +// public QuicksilverElementalEffect() { +// super(Duration.EndOfTurn, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); +// staticText = "{this} gains all activated abilities of target creature until end of turn"; +// } +// +// public QuicksilverElementalEffect(final QuicksilverElementalEffect effect) { +// super(effect); +// } +// +// @Override +// public QuicksilverElementalEffect copy() { +// return new QuicksilverElementalEffect(this); +// } +// +// @Override +// public boolean apply(Game game, Ability source) { +// Permanent permanent = game.getPermanent(source.getSourceId()); +// Permanent creature = game.getPermanent(source.getTargets().getFirstTarget()); +// +// if (permanent != null && creature != null) { +// for (ActivatedAbility ability : creature.getAbilities().getActivatedAbilities(Zone.BATTLEFIELD)) { +// permanent.addAbility(ability, source.getSourceId(), game); +// } +// } +// return false; +// } +//} + class QuickSilverElementalBlueManaEffect extends AsThoughEffectImpl implements AsThoughManaEffect { public QuickSilverElementalBlueManaEffect() { diff --git a/Mage.Sets/src/mage/cards/q/QuicksilverFountain.java b/Mage.Sets/src/mage/cards/q/QuicksilverFountain.java index 32e5583d03..574f732d50 100644 --- a/Mage.Sets/src/mage/cards/q/QuicksilverFountain.java +++ b/Mage.Sets/src/mage/cards/q/QuicksilverFountain.java @@ -115,7 +115,7 @@ class QuicksilverFountainEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(targetPointer.getFirst(game, source)); + Player player = game.getPlayer(game.getActivePlayerId()); if (player != null) { Permanent landChosen = game.getPermanent(source.getFirstTarget()); landChosen.addCounters(CounterType.FLOOD.createInstance(), source, game); diff --git a/Mage.Sets/src/mage/cards/q/QuicksilverGargantuan.java b/Mage.Sets/src/mage/cards/q/QuicksilverGargantuan.java index 370facf9dd..df33757c0f 100644 --- a/Mage.Sets/src/mage/cards/q/QuicksilverGargantuan.java +++ b/Mage.Sets/src/mage/cards/q/QuicksilverGargantuan.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.CopyPermanentEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.Game; import mage.game.permanent.Permanent; import mage.util.functions.ApplyToPermanent; @@ -47,7 +48,7 @@ public class QuicksilverGargantuan extends CardImpl { public QuicksilverGargantuan(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(7); this.toughness = new MageInt(7); @@ -71,6 +72,7 @@ class QuicksilverGargantuanApplyToPermanent extends ApplyToPermanent { @Override public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) { + permanent.removePTCDA(); permanent.getPower().modifyBaseValue(7); permanent.getToughness().modifyBaseValue(7); return true; @@ -78,6 +80,7 @@ class QuicksilverGargantuanApplyToPermanent extends ApplyToPermanent { @Override public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) { + mageObject.removePTCDA(); mageObject.getPower().modifyBaseValue(7); mageObject.getToughness().modifyBaseValue(7); return true; diff --git a/Mage.Sets/src/mage/cards/q/QuicksilverWall.java b/Mage.Sets/src/mage/cards/q/QuicksilverWall.java index a027e674de..23c3618aad 100644 --- a/Mage.Sets/src/mage/cards/q/QuicksilverWall.java +++ b/Mage.Sets/src/mage/cards/q/QuicksilverWall.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class QuicksilverWall extends CardImpl { public QuicksilverWall(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(1); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/q/QuicksmithGenius.java b/Mage.Sets/src/mage/cards/q/QuicksmithGenius.java index dd94a0e0af..dd937f64d7 100644 --- a/Mage.Sets/src/mage/cards/q/QuicksmithGenius.java +++ b/Mage.Sets/src/mage/cards/q/QuicksmithGenius.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; @@ -47,8 +48,8 @@ public class QuicksmithGenius extends CardImpl { public QuicksmithGenius(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/q/QuicksmithRebel.java b/Mage.Sets/src/mage/cards/q/QuicksmithRebel.java index 4368886e96..a4480f5e8a 100644 --- a/Mage.Sets/src/mage/cards/q/QuicksmithRebel.java +++ b/Mage.Sets/src/mage/cards/q/QuicksmithRebel.java @@ -1,83 +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.cards.q; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.condition.common.SourceOnBattlefieldControlUnchangedCondition; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.effects.common.DamageTargetEffect; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.filter.common.FilterControlledArtifactPermanent; -import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayer; - -/** - * - * @author Styxo - */ -public class QuicksmithRebel extends CardImpl { - - public QuicksmithRebel(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - - this.subtype.add("Human"); - this.subtype.add("Artificer"); - this.power = new MageInt(3); - this.toughness = new MageInt(2); - - // When Quicksmith Rebel enters the battlefield, target artifact you control gains "{T}: This artifact deals 2 damage to target creature or player" for as long as you control Quicksmith Rebel. - Ability artifactAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); - artifactAbility.addTarget(new TargetCreatureOrPlayer()); - ConditionalContinuousEffect effect = new ConditionalContinuousEffect( - new GainAbilityTargetEffect(artifactAbility, Duration.Custom), - new SourceOnBattlefieldControlUnchangedCondition(), - "target artifact you control gains \"{T}: This artifact deals 2 damage to target creature or player\" for as long as you control {this}"); - Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); - ability.addTarget(new TargetPermanent(new FilterControlledArtifactPermanent())); - this.addAbility(ability); - } - - public QuicksmithRebel(final QuicksmithRebel card) { - super(card); - } - - @Override - public QuicksmithRebel copy() { - return new QuicksmithRebel(this); - } -} +/* + * 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.cards.q; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.SourceOnBattlefieldControlUnchangedCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterControlledArtifactPermanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author Styxo + */ +public class QuicksmithRebel extends CardImpl { + + public QuicksmithRebel(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // When Quicksmith Rebel enters the battlefield, target artifact you control gains "{T}: This artifact deals 2 damage to target creature or player" for as long as you control Quicksmith Rebel. + Ability artifactAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); + artifactAbility.addTarget(new TargetCreatureOrPlayer()); + ConditionalContinuousEffect effect = new ConditionalContinuousEffect( + new GainAbilityTargetEffect(artifactAbility, Duration.Custom), + new SourceOnBattlefieldControlUnchangedCondition(), + "target artifact you control gains \"{T}: This artifact deals 2 damage to target creature or player\" for as long as you control {this}"); + Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); + ability.addTarget(new TargetPermanent(new FilterControlledArtifactPermanent())); + this.addAbility(ability); + } + + public QuicksmithRebel(final QuicksmithRebel card) { + super(card); + } + + @Override + public QuicksmithRebel copy() { + return new QuicksmithRebel(this); + } +} diff --git a/Mage.Sets/src/mage/cards/q/QuicksmithSpy.java b/Mage.Sets/src/mage/cards/q/QuicksmithSpy.java index b32cd99301..05cc836dab 100644 --- a/Mage.Sets/src/mage/cards/q/QuicksmithSpy.java +++ b/Mage.Sets/src/mage/cards/q/QuicksmithSpy.java @@ -1,81 +1,82 @@ -/* - * 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.cards.q; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.condition.common.SourceOnBattlefieldControlUnchangedCondition; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.filter.common.FilterControlledArtifactPermanent; -import mage.target.TargetPermanent; - -/** - * - * @author Styxo - */ -public class QuicksmithSpy extends CardImpl { - - public QuicksmithSpy(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); - - this.subtype.add("Human"); - this.subtype.add("Artificer"); - this.power = new MageInt(2); - this.toughness = new MageInt(3); - - // When Quicksmith Spy enters the battlefield, target artifact you control gains "{T}: Draw a card" for as long as you control Quicksmith Spy. - Ability artifactAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new TapSourceCost()); - ConditionalContinuousEffect effect = new ConditionalContinuousEffect( - new GainAbilityTargetEffect(artifactAbility, Duration.Custom), - new SourceOnBattlefieldControlUnchangedCondition(), - "target artifact you control gains \"{T}: Draw a card\" for as long as you control {this}"); - Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); - ability.addTarget(new TargetPermanent(new FilterControlledArtifactPermanent())); - this.addAbility(ability); - } - - public QuicksmithSpy(final QuicksmithSpy card) { - super(card); - } - - @Override - public QuicksmithSpy copy() { - return new QuicksmithSpy(this); - } -} +/* + * 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.cards.q; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.SourceOnBattlefieldControlUnchangedCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterControlledArtifactPermanent; +import mage.target.TargetPermanent; + +/** + * + * @author Styxo + */ +public class QuicksmithSpy extends CardImpl { + + public QuicksmithSpy(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // When Quicksmith Spy enters the battlefield, target artifact you control gains "{T}: Draw a card" for as long as you control Quicksmith Spy. + Ability artifactAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new TapSourceCost()); + ConditionalContinuousEffect effect = new ConditionalContinuousEffect( + new GainAbilityTargetEffect(artifactAbility, Duration.Custom), + new SourceOnBattlefieldControlUnchangedCondition(), + "target artifact you control gains \"{T}: Draw a card\" for as long as you control {this}"); + Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); + ability.addTarget(new TargetPermanent(new FilterControlledArtifactPermanent())); + this.addAbility(ability); + } + + public QuicksmithSpy(final QuicksmithSpy card) { + super(card); + } + + @Override + public QuicksmithSpy copy() { + return new QuicksmithSpy(this); + } +} diff --git a/Mage.Sets/src/mage/cards/q/QuietDisrepair.java b/Mage.Sets/src/mage/cards/q/QuietDisrepair.java index 5b80f8a0a0..069df0742d 100644 --- a/Mage.Sets/src/mage/cards/q/QuietDisrepair.java +++ b/Mage.Sets/src/mage/cards/q/QuietDisrepair.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.filter.StaticFilters; @@ -52,7 +53,7 @@ public class QuietDisrepair extends CardImpl { public QuietDisrepair(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant artifact or enchantment diff --git a/Mage.Sets/src/mage/cards/q/QuietusSpike.java b/Mage.Sets/src/mage/cards/q/QuietusSpike.java index 36df0c1df1..76badb7eef 100644 --- a/Mage.Sets/src/mage/cards/q/QuietusSpike.java +++ b/Mage.Sets/src/mage/cards/q/QuietusSpike.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class QuietusSpike extends CardImpl { public QuietusSpike(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has deathtouch. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(DeathtouchAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/q/QuillSlingerBoggart.java b/Mage.Sets/src/mage/cards/q/QuillSlingerBoggart.java index b3c4892aac..20233d6870 100644 --- a/Mage.Sets/src/mage/cards/q/QuillSlingerBoggart.java +++ b/Mage.Sets/src/mage/cards/q/QuillSlingerBoggart.java @@ -54,8 +54,8 @@ public class QuillSlingerBoggart extends CardImpl { public QuillSlingerBoggart(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/q/QuilledSlagwurm.java b/Mage.Sets/src/mage/cards/q/QuilledSlagwurm.java index 94fb5780d9..be73b0a9eb 100644 --- a/Mage.Sets/src/mage/cards/q/QuilledSlagwurm.java +++ b/Mage.Sets/src/mage/cards/q/QuilledSlagwurm.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class QuilledSlagwurm extends CardImpl { public QuilledSlagwurm (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/q/QuilledSliver.java b/Mage.Sets/src/mage/cards/q/QuilledSliver.java index dc2ab137ca..6c07791a09 100644 --- a/Mage.Sets/src/mage/cards/q/QuilledSliver.java +++ b/Mage.Sets/src/mage/cards/q/QuilledSliver.java @@ -57,7 +57,7 @@ public class QuilledSliver extends CardImpl { public QuilledSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/q/QuilledWolf.java b/Mage.Sets/src/mage/cards/q/QuilledWolf.java index efae7c414e..7201d48441 100644 --- a/Mage.Sets/src/mage/cards/q/QuilledWolf.java +++ b/Mage.Sets/src/mage/cards/q/QuilledWolf.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class QuilledWolf extends CardImpl { public QuilledWolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/q/QuillmaneBaku.java b/Mage.Sets/src/mage/cards/q/QuillmaneBaku.java index 3ff433352d..7efe835b4e 100644 --- a/Mage.Sets/src/mage/cards/q/QuillmaneBaku.java +++ b/Mage.Sets/src/mage/cards/q/QuillmaneBaku.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.Zone; @@ -62,7 +63,7 @@ public class QuillmaneBaku extends CardImpl { public QuillmaneBaku(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -70,6 +71,7 @@ public class QuillmaneBaku extends CardImpl { // Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Skullmane Baku. this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.SPIRIT_OR_ARCANE_CARD, true)); + //TODO: Make ability properly copiable // {1}, Tap, Remove X ki counters from Quillmane Baku: Return target creature with converted mana cost X or less to its owner's hand. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new QuillmaneBakuReturnEffect(), new GenericManaCost(1)); ability.addCost(new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/q/Quillspike.java b/Mage.Sets/src/mage/cards/q/Quillspike.java index 0e992b994e..66280a8d0c 100644 --- a/Mage.Sets/src/mage/cards/q/Quillspike.java +++ b/Mage.Sets/src/mage/cards/q/Quillspike.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -52,7 +53,7 @@ public class Quillspike extends CardImpl { public Quillspike(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B/G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/q/QuirionDryad.java b/Mage.Sets/src/mage/cards/q/QuirionDryad.java index d679e22087..3780ac110a 100644 --- a/Mage.Sets/src/mage/cards/q/QuirionDryad.java +++ b/Mage.Sets/src/mage/cards/q/QuirionDryad.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -58,7 +59,7 @@ public class QuirionDryad extends CardImpl { public QuirionDryad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Dryad"); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/q/QuirionElves.java b/Mage.Sets/src/mage/cards/q/QuirionElves.java index ed2677619c..e63b4ba574 100644 --- a/Mage.Sets/src/mage/cards/q/QuirionElves.java +++ b/Mage.Sets/src/mage/cards/q/QuirionElves.java @@ -41,6 +41,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class QuirionElves extends CardImpl { public QuirionElves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/q/QuirionExplorer.java b/Mage.Sets/src/mage/cards/q/QuirionExplorer.java index 99aa8c8316..4f1aa85b0b 100644 --- a/Mage.Sets/src/mage/cards/q/QuirionExplorer.java +++ b/Mage.Sets/src/mage/cards/q/QuirionExplorer.java @@ -33,6 +33,7 @@ import mage.abilities.mana.AnyColorLandsProduceManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -43,9 +44,9 @@ public class QuirionExplorer extends CardImpl { public QuirionExplorer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/q/QuirionRanger.java b/Mage.Sets/src/mage/cards/q/QuirionRanger.java index 2ada1b478d..5f7dc39ba7 100644 --- a/Mage.Sets/src/mage/cards/q/QuirionRanger.java +++ b/Mage.Sets/src/mage/cards/q/QuirionRanger.java @@ -27,7 +27,6 @@ */ package mage.cards.q; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; @@ -43,13 +42,15 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author jonubuu */ public class QuirionRanger extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("Forest"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Forest"); static { filter.add(new SubtypePredicate(SubType.FOREST)); @@ -57,7 +58,7 @@ public class QuirionRanger extends CardImpl { public QuirionRanger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/q/QuirionSentinel.java b/Mage.Sets/src/mage/cards/q/QuirionSentinel.java index b28c237676..c148a8d219 100644 --- a/Mage.Sets/src/mage/cards/q/QuirionSentinel.java +++ b/Mage.Sets/src/mage/cards/q/QuirionSentinel.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.AddManaOfAnyColorEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class QuirionSentinel extends CardImpl { public QuirionSentinel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/q/QuirionTrailblazer.java b/Mage.Sets/src/mage/cards/q/QuirionTrailblazer.java index d40ec25a92..ee26c88734 100644 --- a/Mage.Sets/src/mage/cards/q/QuirionTrailblazer.java +++ b/Mage.Sets/src/mage/cards/q/QuirionTrailblazer.java @@ -34,8 +34,8 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; -import mage.filter.common.FilterBasicLandCard; import mage.target.common.TargetCardInLibrary; /** @@ -45,14 +45,14 @@ import mage.target.common.TargetCardInLibrary; public class QuirionTrailblazer extends CardImpl { public QuirionTrailblazer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(2); // When Quirion Trailblazer enters the battlefield, you may search your library for a basic land card and put that card onto the battlefield tapped. If you do, shuffle your library. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true), true)); } public QuirionTrailblazer(final QuirionTrailblazer card) { diff --git a/Mage.Sets/src/mage/cards/q/Qumulox.java b/Mage.Sets/src/mage/cards/q/Qumulox.java index dab16972fb..53cda52285 100644 --- a/Mage.Sets/src/mage/cards/q/Qumulox.java +++ b/Mage.Sets/src/mage/cards/q/Qumulox.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class Qumulox extends CardImpl { public Qumulox(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{U}{U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RabbleRouser.java b/Mage.Sets/src/mage/cards/r/RabbleRouser.java index 8efaddbc87..8228c56cf0 100644 --- a/Mage.Sets/src/mage/cards/r/RabbleRouser.java +++ b/Mage.Sets/src/mage/cards/r/RabbleRouser.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.BloodthirstAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterAttackingCreature; @@ -53,8 +54,8 @@ public class RabbleRouser extends CardImpl { public RabbleRouser(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RabidBloodsucker.java b/Mage.Sets/src/mage/cards/r/RabidBloodsucker.java index 31e6b43e05..de73ccebcd 100644 --- a/Mage.Sets/src/mage/cards/r/RabidBloodsucker.java +++ b/Mage.Sets/src/mage/cards/r/RabidBloodsucker.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class RabidBloodsucker extends CardImpl { public RabidBloodsucker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RabidElephant.java b/Mage.Sets/src/mage/cards/r/RabidElephant.java index ce6c85e6f0..7ebbf49f2f 100644 --- a/Mage.Sets/src/mage/cards/r/RabidElephant.java +++ b/Mage.Sets/src/mage/cards/r/RabidElephant.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -48,7 +49,7 @@ public class RabidElephant extends CardImpl { public RabidElephant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RabidRats.java b/Mage.Sets/src/mage/cards/r/RabidRats.java index e327356084..6d909d6fd3 100644 --- a/Mage.Sets/src/mage/cards/r/RabidRats.java +++ b/Mage.Sets/src/mage/cards/r/RabidRats.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterBlockingCreature; @@ -49,7 +50,7 @@ public class RabidRats extends CardImpl { public RabidRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RabidWolverines.java b/Mage.Sets/src/mage/cards/r/RabidWolverines.java index 46e64bfc0f..df9f205d56 100644 --- a/Mage.Sets/src/mage/cards/r/RabidWolverines.java +++ b/Mage.Sets/src/mage/cards/r/RabidWolverines.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class RabidWolverines extends CardImpl { public RabidWolverines(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Wolverine"); + this.subtype.add(SubType.WOLVERINE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RabidWombat.java b/Mage.Sets/src/mage/cards/r/RabidWombat.java index 7626df65ab..074f0c400c 100644 --- a/Mage.Sets/src/mage/cards/r/RabidWombat.java +++ b/Mage.Sets/src/mage/cards/r/RabidWombat.java @@ -1,72 +1,73 @@ -/* - * 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.cards.r; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.dynamicvalue.common.AuraAttachedCount; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.abilities.keyword.VigilanceAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; - -/** - * - * @author Styxo - */ -public class RabidWombat extends CardImpl { - - public RabidWombat(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); - - this.subtype.add("Wombat"); - this.power = new MageInt(0); - this.toughness = new MageInt(1); - - // Vigilance - this.addAbility(VigilanceAbility.getInstance()); - - // Rabid Wombat gets +2/+2 for each Aura attached to it. - AuraAttachedCount count = new AuraAttachedCount(2); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(count, count, Duration.WhileOnBattlefield))); - - } - - public RabidWombat(final RabidWombat card) { - super(card); - } - - @Override - public RabidWombat copy() { - return new RabidWombat(this); - } -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.AuraAttachedCount; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author Styxo + */ +public class RabidWombat extends CardImpl { + + public RabidWombat(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + + this.subtype.add(SubType.WOMBAT); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Rabid Wombat gets +2/+2 for each Aura attached to it. + AuraAttachedCount count = new AuraAttachedCount(2); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(count, count, Duration.WhileOnBattlefield))); + + } + + public RabidWombat(final RabidWombat card) { + super(card); + } + + @Override + public RabidWombat copy() { + return new RabidWombat(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RacecourseFury.java b/Mage.Sets/src/mage/cards/r/RacecourseFury.java index 56c1549acd..874a328498 100644 --- a/Mage.Sets/src/mage/cards/r/RacecourseFury.java +++ b/Mage.Sets/src/mage/cards/r/RacecourseFury.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class RacecourseFury extends CardImpl { public RacecourseFury (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); this.color.setRed(true); // Enchant land diff --git a/Mage.Sets/src/mage/cards/r/Rackling.java b/Mage.Sets/src/mage/cards/r/Rackling.java new file mode 100644 index 0000000000..b510d345f2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/Rackling.java @@ -0,0 +1,101 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class Rackling extends CardImpl { + + public Rackling(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + + this.subtype.add(SubType.CONSTRUCT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // At the beginning of each opponent's upkeep, Rackling deals X damage to that player, where X is 3 minus the number of cards in his or her hand. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new RacklingEffect(), TargetController.OPPONENT, false, true)); + } + + public Rackling(final Rackling card) { + super(card); + } + + @Override + public Rackling copy() { + return new Rackling(this); + } +} + +class RacklingEffect extends OneShotEffect { + + public RacklingEffect() { + super(Outcome.Benefit); + this.staticText = "{this} deals X damage to that player, where X is 3 minus the number of cards in his or her hand"; + } + + public RacklingEffect(final RacklingEffect effect) { + super(effect); + } + + @Override + public RacklingEffect copy() { + return new RacklingEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + if (player != null) { + int damage = 3 - player.getHand().size(); + if (damage > 0) { + player.damage(damage, source.getSourceId(), game, false, true); + } + return true; + } + + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/r/RadhaHeirToKeld.java b/Mage.Sets/src/mage/cards/r/RadhaHeirToKeld.java index af2730dd58..a34c2e8285 100644 --- a/Mage.Sets/src/mage/cards/r/RadhaHeirToKeld.java +++ b/Mage.Sets/src/mage/cards/r/RadhaHeirToKeld.java @@ -37,6 +37,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -48,8 +49,8 @@ public class RadhaHeirToKeld extends CardImpl { public RadhaHeirToKeld(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RadiantArchangel.java b/Mage.Sets/src/mage/cards/r/RadiantArchangel.java index 782ec1219f..aa351809ad 100644 --- a/Mage.Sets/src/mage/cards/r/RadiantArchangel.java +++ b/Mage.Sets/src/mage/cards/r/RadiantArchangel.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -62,7 +63,7 @@ public class RadiantArchangel extends CardImpl { public RadiantArchangel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RadiantEssence.java b/Mage.Sets/src/mage/cards/r/RadiantEssence.java index 681eddfa4a..6e0a25f808 100644 --- a/Mage.Sets/src/mage/cards/r/RadiantEssence.java +++ b/Mage.Sets/src/mage/cards/r/RadiantEssence.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -56,7 +57,7 @@ public class RadiantEssence extends CardImpl { public RadiantEssence(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RadiantKavu.java b/Mage.Sets/src/mage/cards/r/RadiantKavu.java index 2a4afadb2e..23ba243a99 100644 --- a/Mage.Sets/src/mage/cards/r/RadiantKavu.java +++ b/Mage.Sets/src/mage/cards/r/RadiantKavu.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -55,7 +56,7 @@ public class RadiantKavu extends CardImpl { public RadiantKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}{W}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RadiantsDragoons.java b/Mage.Sets/src/mage/cards/r/RadiantsDragoons.java index 50378bb73e..a00e704ce0 100644 --- a/Mage.Sets/src/mage/cards/r/RadiantsDragoons.java +++ b/Mage.Sets/src/mage/cards/r/RadiantsDragoons.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class RadiantsDragoons extends CardImpl { public RadiantsDragoons(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RadjanSpirit.java b/Mage.Sets/src/mage/cards/r/RadjanSpirit.java index 02a576858e..01e8f7a049 100644 --- a/Mage.Sets/src/mage/cards/r/RadjanSpirit.java +++ b/Mage.Sets/src/mage/cards/r/RadjanSpirit.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class RadjanSpirit extends CardImpl { public RadjanSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RafiqOfTheMany.java b/Mage.Sets/src/mage/cards/r/RafiqOfTheMany.java index 60959e24a1..ef7de56fa2 100644 --- a/Mage.Sets/src/mage/cards/r/RafiqOfTheMany.java +++ b/Mage.Sets/src/mage/cards/r/RafiqOfTheMany.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ExaltedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -57,8 +58,8 @@ public class RafiqOfTheMany extends CardImpl { addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RagDealer.java b/Mage.Sets/src/mage/cards/r/RagDealer.java index 4a81202374..bff3922143 100644 --- a/Mage.Sets/src/mage/cards/r/RagDealer.java +++ b/Mage.Sets/src/mage/cards/r/RagDealer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.target.common.TargetCardInASingleGraveyard; @@ -49,8 +50,8 @@ public class RagDealer extends CardImpl { public RagDealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RagMan.java b/Mage.Sets/src/mage/cards/r/RagMan.java index efbf7a83af..a13274d1a6 100644 --- a/Mage.Sets/src/mage/cards/r/RagMan.java +++ b/Mage.Sets/src/mage/cards/r/RagMan.java @@ -42,6 +42,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -57,8 +58,8 @@ public class RagMan extends CardImpl { public RagMan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Minion"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MINION); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/Ragamuffyn.java b/Mage.Sets/src/mage/cards/r/Ragamuffyn.java index 30523b770e..88d06cb3dc 100644 --- a/Mage.Sets/src/mage/cards/r/Ragamuffyn.java +++ b/Mage.Sets/src/mage/cards/r/Ragamuffyn.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.Predicates; @@ -59,8 +60,8 @@ public class Ragamuffyn extends CardImpl { public Ragamuffyn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RageForger.java b/Mage.Sets/src/mage/cards/r/RageForger.java index cddf11ac27..54c4ee18f8 100644 --- a/Mage.Sets/src/mage/cards/r/RageForger.java +++ b/Mage.Sets/src/mage/cards/r/RageForger.java @@ -70,8 +70,8 @@ public class RageForger extends CardImpl { public RageForger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RageNimbus.java b/Mage.Sets/src/mage/cards/r/RageNimbus.java index 61b9c372b5..f8ad5eff42 100644 --- a/Mage.Sets/src/mage/cards/r/RageNimbus.java +++ b/Mage.Sets/src/mage/cards/r/RageNimbus.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class RageNimbus extends CardImpl { public RageNimbus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RageThrower.java b/Mage.Sets/src/mage/cards/r/RageThrower.java index 364ad2d999..0d6ff4948f 100644 --- a/Mage.Sets/src/mage/cards/r/RageThrower.java +++ b/Mage.Sets/src/mage/cards/r/RageThrower.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -44,8 +45,8 @@ public class RageThrower extends CardImpl { public RageThrower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RageWeaver.java b/Mage.Sets/src/mage/cards/r/RageWeaver.java index d2860b5a86..025498f8ab 100644 --- a/Mage.Sets/src/mage/cards/r/RageWeaver.java +++ b/Mage.Sets/src/mage/cards/r/RageWeaver.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -61,8 +62,8 @@ public class RageWeaver extends CardImpl { public RageWeaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RagebloodShaman.java b/Mage.Sets/src/mage/cards/r/RagebloodShaman.java index 31eb4e6fc6..7ed0d3c743 100644 --- a/Mage.Sets/src/mage/cards/r/RagebloodShaman.java +++ b/Mage.Sets/src/mage/cards/r/RagebloodShaman.java @@ -53,8 +53,8 @@ public class RagebloodShaman extends CardImpl { public RagebloodShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/Ragemonger.java b/Mage.Sets/src/mage/cards/r/Ragemonger.java index f4a7992528..d6962eb38c 100644 --- a/Mage.Sets/src/mage/cards/r/Ragemonger.java +++ b/Mage.Sets/src/mage/cards/r/Ragemonger.java @@ -53,8 +53,8 @@ public class Ragemonger extends CardImpl { public Ragemonger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RaggedVeins.java b/Mage.Sets/src/mage/cards/r/RaggedVeins.java index 468b2ec06d..ca4a36a08b 100644 --- a/Mage.Sets/src/mage/cards/r/RaggedVeins.java +++ b/Mage.Sets/src/mage/cards/r/RaggedVeins.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class RaggedVeins extends CardImpl { public RaggedVeins(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash diff --git a/Mage.Sets/src/mage/cards/r/RagingBull.java b/Mage.Sets/src/mage/cards/r/RagingBull.java index feb461e702..db49af701d 100644 --- a/Mage.Sets/src/mage/cards/r/RagingBull.java +++ b/Mage.Sets/src/mage/cards/r/RagingBull.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class RagingBull extends CardImpl { public RagingBull(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Ox"); + this.subtype.add(SubType.OX); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RagingCougar.java b/Mage.Sets/src/mage/cards/r/RagingCougar.java index 902e090479..ddccd5ea4b 100644 --- a/Mage.Sets/src/mage/cards/r/RagingCougar.java +++ b/Mage.Sets/src/mage/cards/r/RagingCougar.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class RagingCougar extends CardImpl { public RagingCougar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RagingGoblin.java b/Mage.Sets/src/mage/cards/r/RagingGoblin.java index 232e4dbaeb..e074adc4d9 100644 --- a/Mage.Sets/src/mage/cards/r/RagingGoblin.java +++ b/Mage.Sets/src/mage/cards/r/RagingGoblin.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class RagingGoblin extends CardImpl { public RagingGoblin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RagingGorilla.java b/Mage.Sets/src/mage/cards/r/RagingGorilla.java index 7eb1e94ec2..6dc332f2b7 100644 --- a/Mage.Sets/src/mage/cards/r/RagingGorilla.java +++ b/Mage.Sets/src/mage/cards/r/RagingGorilla.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class RagingGorilla extends CardImpl { public RagingGorilla(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Ape"); + this.subtype.add(SubType.APE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RagingKavu.java b/Mage.Sets/src/mage/cards/r/RagingKavu.java index 97655d92af..8f28f404ae 100644 --- a/Mage.Sets/src/mage/cards/r/RagingKavu.java +++ b/Mage.Sets/src/mage/cards/r/RagingKavu.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class RagingKavu extends CardImpl { public RagingKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{G}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RagingMinotaur.java b/Mage.Sets/src/mage/cards/r/RagingMinotaur.java index 02e7340477..8a0b072986 100644 --- a/Mage.Sets/src/mage/cards/r/RagingMinotaur.java +++ b/Mage.Sets/src/mage/cards/r/RagingMinotaur.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class RagingMinotaur extends CardImpl { public RagingMinotaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RagingPoltergeist.java b/Mage.Sets/src/mage/cards/r/RagingPoltergeist.java index d3321e9158..3683b1eaed 100644 --- a/Mage.Sets/src/mage/cards/r/RagingPoltergeist.java +++ b/Mage.Sets/src/mage/cards/r/RagingPoltergeist.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class RagingPoltergeist extends CardImpl { public RagingPoltergeist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(6); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RagingRavine.java b/Mage.Sets/src/mage/cards/r/RagingRavine.java index 4c8fe6043d..03c27be370 100644 --- a/Mage.Sets/src/mage/cards/r/RagingRavine.java +++ b/Mage.Sets/src/mage/cards/r/RagingRavine.java @@ -44,6 +44,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -89,7 +90,7 @@ class RagingRavineToken extends Token { public RagingRavineToken() { super("", "3/3 red and green Elemental creature"); cardType.add(CardType.CREATURE); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); color.setRed(true); color.setGreen(true); power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RagingReek.java b/Mage.Sets/src/mage/cards/r/RagingReek.java index e8514b3221..d731cbdf65 100644 --- a/Mage.Sets/src/mage/cards/r/RagingReek.java +++ b/Mage.Sets/src/mage/cards/r/RagingReek.java @@ -1,65 +1,66 @@ -/* - * 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.cards.r; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; -import mage.abilities.keyword.MonstrosityAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class RagingReek extends CardImpl { - - public RagingReek(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); - this.subtype.add("Beast"); - this.power = new MageInt(4); - this.toughness = new MageInt(4); - - // Raging Reek attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); - - //{5}{R}: Monstrosity 2 - this.addAbility(new MonstrosityAbility("{5}{R}", 2)); - } - - public RagingReek(final RagingReek card) { - super(card); - } - - @Override - public RagingReek copy() { - return new RagingReek(this); - } -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksEachCombatStaticAbility; +import mage.abilities.keyword.MonstrosityAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author Styxo + */ +public class RagingReek extends CardImpl { + + public RagingReek(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.subtype.add(SubType.BEAST); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Raging Reek attacks each turn if able. + this.addAbility(new AttacksEachCombatStaticAbility()); + + //{5}{R}: Monstrosity 2 + this.addAbility(new MonstrosityAbility("{5}{R}", 2)); + } + + public RagingReek(final RagingReek card) { + super(card); + } + + @Override + public RagingReek copy() { + return new RagingReek(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RagingSpirit.java b/Mage.Sets/src/mage/cards/r/RagingSpirit.java index ab0c73ec8b..32c1d25243 100644 --- a/Mage.Sets/src/mage/cards/r/RagingSpirit.java +++ b/Mage.Sets/src/mage/cards/r/RagingSpirit.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BecomesColorSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class RagingSpirit extends CardImpl { public RagingSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RagingSwordtooth.java b/Mage.Sets/src/mage/cards/r/RagingSwordtooth.java new file mode 100644 index 0000000000..cf4f97889d --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RagingSwordtooth.java @@ -0,0 +1,76 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author TheElk801 + */ +public class RagingSwordtooth extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("other creature"); + + static { + filter.add(new AnotherPredicate()); + } + + public RagingSwordtooth(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{G}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // When Raging Swordtooth enters the battlefield, it deals 1 damage to each other creature. + addAbility(new EntersBattlefieldTriggeredAbility(new DamageAllEffect(1, filter))); + } + + public RagingSwordtooth(final RagingSwordtooth card) { + super(card); + } + + @Override + public RagingSwordtooth copy() { + return new RagingSwordtooth(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/Ragnar.java b/Mage.Sets/src/mage/cards/r/Ragnar.java index 24c582e7d5..a6e3a01309 100644 --- a/Mage.Sets/src/mage/cards/r/Ragnar.java +++ b/Mage.Sets/src/mage/cards/r/Ragnar.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.RegenerateTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class Ragnar extends CardImpl { public Ragnar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RaidersWake.java b/Mage.Sets/src/mage/cards/r/RaidersWake.java new file mode 100644 index 0000000000..0cfd603bf1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RaidersWake.java @@ -0,0 +1,74 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.DiscardsACardOpponentTriggeredAbility; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SetTargetPointer; +import mage.constants.TargetController; +import mage.target.common.TargetOpponent; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * + * @author TheElk801 + */ +public class RaidersWake extends CardImpl { + + public RaidersWake(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}"); + + // Whenever an opponent discards a card, that player loses 2 life. + this.addAbility(new DiscardsACardOpponentTriggeredAbility(new LoseLifeTargetEffect(2), false, SetTargetPointer.PLAYER)); + + // Raid — At the beginning of your end step, if you attacked with a creature this turn, target opponent discards a card. + Ability ability = new ConditionalTriggeredAbility( + new BeginningOfEndStepTriggeredAbility(new DiscardTargetEffect(1), TargetController.YOU, false), RaidCondition.instance, + "Raid - At the beginning of your end step, if you attacked with a creature this turn, target opponent discards a card."); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability, new PlayerAttackedWatcher()); + } + + public RaidersWake(final RaidersWake card) { + super(card); + } + + @Override + public RaidersWake copy() { + return new RaidersWake(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RaidingNightstalker.java b/Mage.Sets/src/mage/cards/r/RaidingNightstalker.java index e041cdb066..8034c87ec1 100644 --- a/Mage.Sets/src/mage/cards/r/RaidingNightstalker.java +++ b/Mage.Sets/src/mage/cards/r/RaidingNightstalker.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class RaidingNightstalker extends CardImpl { public RaidingNightstalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Nightstalker"); + this.subtype.add(SubType.NIGHTSTALKER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RainbowCrow.java b/Mage.Sets/src/mage/cards/r/RainbowCrow.java index 256f8723e5..55e2e387a9 100644 --- a/Mage.Sets/src/mage/cards/r/RainbowCrow.java +++ b/Mage.Sets/src/mage/cards/r/RainbowCrow.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class RainbowCrow extends CardImpl { public RainbowCrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RainbowEfreet.java b/Mage.Sets/src/mage/cards/r/RainbowEfreet.java index 7d9547bd3c..2da59df2d5 100644 --- a/Mage.Sets/src/mage/cards/r/RainbowEfreet.java +++ b/Mage.Sets/src/mage/cards/r/RainbowEfreet.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class RainbowEfreet extends CardImpl { public RainbowEfreet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Efreet"); + this.subtype.add(SubType.EFREET); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RaisedByWolves.java b/Mage.Sets/src/mage/cards/r/RaisedByWolves.java index 14b5d80580..505c1011b0 100644 --- a/Mage.Sets/src/mage/cards/r/RaisedByWolves.java +++ b/Mage.Sets/src/mage/cards/r/RaisedByWolves.java @@ -60,7 +60,7 @@ public class RaisedByWolves extends CardImpl { public RaisedByWolves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{G}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/r/RakaDisciple.java b/Mage.Sets/src/mage/cards/r/RakaDisciple.java index 9dcaf3bed0..db395c495b 100644 --- a/Mage.Sets/src/mage/cards/r/RakaDisciple.java +++ b/Mage.Sets/src/mage/cards/r/RakaDisciple.java @@ -49,8 +49,8 @@ public class RakaDisciple extends CardImpl { public RakaDisciple(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RakaSanctuary.java b/Mage.Sets/src/mage/cards/r/RakaSanctuary.java new file mode 100644 index 0000000000..2ee93f4a45 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RakaSanctuary.java @@ -0,0 +1,67 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SanctuaryTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class RakaSanctuary extends CardImpl { + + public RakaSanctuary(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + + // At the beginning of your upkeep, if you control a white or blue permanent, Raka Sanctuary deals 1 damage to target creature. If you control a white permanent and a blue permanent, Raka Sanctuary deals 3 damage to that creature instead. + Ability ability = new SanctuaryTriggeredAbility( + new DamageTargetEffect(1), new DamageTargetEffect(3), ObjectColor.WHITE, ObjectColor.BLUE, + "At the beginning of your upkeep, if you control a white or blue permanent, Raka Sanctuary deals 1 damage to target creature. " + + "If you control a white permanent and a blue permanent, Raka Sanctuary deals 3 damage to that creature instead." + ); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public RakaSanctuary(final RakaSanctuary card) { + super(card); + } + + @Override + public RakaSanctuary copy() { + return new RakaSanctuary(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/Rakavolver.java b/Mage.Sets/src/mage/cards/r/Rakavolver.java index 0ba34701d3..ef202f3b16 100644 --- a/Mage.Sets/src/mage/cards/r/Rakavolver.java +++ b/Mage.Sets/src/mage/cards/r/Rakavolver.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.counters.CounterType; @@ -52,7 +53,7 @@ public class Rakavolver extends CardImpl { public Rakavolver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Volver"); + this.subtype.add(SubType.VOLVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RakdosCackler.java b/Mage.Sets/src/mage/cards/r/RakdosCackler.java index 1b6703badf..14c40fd4ad 100644 --- a/Mage.Sets/src/mage/cards/r/RakdosCackler.java +++ b/Mage.Sets/src/mage/cards/r/RakdosCackler.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.UnleashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class RakdosCackler extends CardImpl { public RakdosCackler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B/R}"); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); diff --git a/Mage.Sets/src/mage/cards/r/RakdosDrake.java b/Mage.Sets/src/mage/cards/r/RakdosDrake.java index 86b5db55b8..a62a50ebef 100644 --- a/Mage.Sets/src/mage/cards/r/RakdosDrake.java +++ b/Mage.Sets/src/mage/cards/r/RakdosDrake.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.UnleashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class RakdosDrake extends CardImpl { public RakdosDrake (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RakdosGuildmage.java b/Mage.Sets/src/mage/cards/r/RakdosGuildmage.java index ead3a004d0..d27adbb0d7 100644 --- a/Mage.Sets/src/mage/cards/r/RakdosGuildmage.java +++ b/Mage.Sets/src/mage/cards/r/RakdosGuildmage.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class RakdosGuildmage extends CardImpl { public RakdosGuildmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B/R}{B/R}"); - this.subtype.add("Zombie"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RakdosIckspitter.java b/Mage.Sets/src/mage/cards/r/RakdosIckspitter.java index eb28c2b757..deb71050cb 100644 --- a/Mage.Sets/src/mage/cards/r/RakdosIckspitter.java +++ b/Mage.Sets/src/mage/cards/r/RakdosIckspitter.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.LoseLifeTargetControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class RakdosIckspitter extends CardImpl { public RakdosIckspitter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}"); - this.subtype.add("Thrull"); + this.subtype.add(SubType.THRULL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RakdosKeyrune.java b/Mage.Sets/src/mage/cards/r/RakdosKeyrune.java index fc4e656f2f..321ebd38a1 100644 --- a/Mage.Sets/src/mage/cards/r/RakdosKeyrune.java +++ b/Mage.Sets/src/mage/cards/r/RakdosKeyrune.java @@ -38,6 +38,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -74,7 +75,7 @@ public class RakdosKeyrune extends CardImpl { cardType.add(CardType.CREATURE); color.setBlack(true); color.setRed(true); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); power = new MageInt(3); toughness = new MageInt(1); this.addAbility(FirstStrikeAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/r/RakdosLordOfRiots.java b/Mage.Sets/src/mage/cards/r/RakdosLordOfRiots.java index 5272081298..147de4902a 100644 --- a/Mage.Sets/src/mage/cards/r/RakdosLordOfRiots.java +++ b/Mage.Sets/src/mage/cards/r/RakdosLordOfRiots.java @@ -45,6 +45,7 @@ import mage.constants.*; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; +import mage.game.stack.Spell; import mage.util.CardUtil; /** @@ -54,9 +55,9 @@ import mage.util.CardUtil; public class RakdosLordOfRiots extends CardImpl { public RakdosLordOfRiots(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{B}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(6); this.toughness = new MageInt(6); @@ -102,12 +103,12 @@ class RakdosLordOfRiotsCantCastEffect extends ContinuousRuleModifyingEffectImpl public RakdosLordOfRiotsCantCastEffect copy() { return new RakdosLordOfRiotsCantCastEffect(this); } - + @Override public boolean checksEventType(GameEvent event, Game game) { return event.getType() == EventType.CAST_SPELL; } - + @Override public boolean applies(GameEvent event, Ability source, Game game) { if (event.getSourceId().equals(source.getSourceId())) { @@ -147,9 +148,15 @@ class RakdosLordOfRiotsCostReductionEffect extends CostModificationEffectImpl { @Override public boolean applies(Ability abilityToModify, Ability source, Game game) { if (abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility) { - Card sourceCard = game.getCard(abilityToModify.getSourceId()); - if (sourceCard != null && abilityToModify.getControllerId().equals(source.getControllerId()) && (sourceCard.isCreature())) { - return true; + if (abilityToModify.getControllerId().equals(source.getControllerId())) { + Spell spell = (Spell) game.getStack().getStackObject(abilityToModify.getId()); + if (spell != null) { + return spell.isCreature(); + } else { + // used at least for flashback ability because Flashback ability doesn't use stack or for getPlayables where spell is not cast yet + Card sourceCard = game.getCard(abilityToModify.getSourceId()); + return sourceCard != null && sourceCard.isCreature(); + } } } return false; diff --git a/Mage.Sets/src/mage/cards/r/RakdosPitDragon.java b/Mage.Sets/src/mage/cards/r/RakdosPitDragon.java index 2b5a602eb3..ea89f23380 100644 --- a/Mage.Sets/src/mage/cards/r/RakdosPitDragon.java +++ b/Mage.Sets/src/mage/cards/r/RakdosPitDragon.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class RakdosPitDragon extends CardImpl { public RakdosPitDragon (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RakdosRagemutt.java b/Mage.Sets/src/mage/cards/r/RakdosRagemutt.java index 37a95736c0..859c4599b3 100644 --- a/Mage.Sets/src/mage/cards/r/RakdosRagemutt.java +++ b/Mage.Sets/src/mage/cards/r/RakdosRagemutt.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class RakdosRagemutt extends CardImpl { public RakdosRagemutt(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Hound"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.HOUND); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RakdosRingleader.java b/Mage.Sets/src/mage/cards/r/RakdosRingleader.java index 9b4ac3ef6a..c02d506a61 100644 --- a/Mage.Sets/src/mage/cards/r/RakdosRingleader.java +++ b/Mage.Sets/src/mage/cards/r/RakdosRingleader.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,8 +49,8 @@ public class RakdosRingleader extends CardImpl { public RakdosRingleader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{R}"); - this.subtype.add("Skeleton"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.SKELETON); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RakdosShredFreak.java b/Mage.Sets/src/mage/cards/r/RakdosShredFreak.java index da0365a192..685630a164 100644 --- a/Mage.Sets/src/mage/cards/r/RakdosShredFreak.java +++ b/Mage.Sets/src/mage/cards/r/RakdosShredFreak.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class RakdosShredFreak extends CardImpl { public RakdosShredFreak(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B/R}{B/R}"); - this.subtype.add("Human"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RakdosTheDefiler.java b/Mage.Sets/src/mage/cards/r/RakdosTheDefiler.java index d8d332b4de..d46e01074b 100644 --- a/Mage.Sets/src/mage/cards/r/RakdosTheDefiler.java +++ b/Mage.Sets/src/mage/cards/r/RakdosTheDefiler.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; -import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.dynamicvalue.common.HalfValue; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsTargetOpponentControlsCount; @@ -67,7 +67,7 @@ public class RakdosTheDefiler extends CardImpl { public RakdosTheDefiler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(7); this.toughness = new MageInt(6); @@ -85,7 +85,7 @@ public class RakdosTheDefiler extends CardImpl { // Whenever Rakdos deals combat damage to a player, that player sacrifices half the non-Demon permanents he or she controls, rounded up. effect = new SacrificeEffect(damageToPlayerTriggerFilter, new HalfValue(new PermanentsTargetOpponentControlsCount(damageToPlayerTriggerFilter), true), ""); effect.setText("that player sacrifices half the non-Demon permanents he or she controls, rounded up"); - ability = new DealsDamageToAPlayerTriggeredAbility(effect, false, true); + ability = new DealsCombatDamageToAPlayerTriggeredAbility(effect, false, true); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RakeclawGargantuan.java b/Mage.Sets/src/mage/cards/r/RakeclawGargantuan.java index 4675787340..fb99545ec4 100644 --- a/Mage.Sets/src/mage/cards/r/RakeclawGargantuan.java +++ b/Mage.Sets/src/mage/cards/r/RakeclawGargantuan.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class RakeclawGargantuan extends CardImpl { public RakeclawGargantuan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}{W}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RakishHeir.java b/Mage.Sets/src/mage/cards/r/RakishHeir.java index f6e2fd8804..ed586f580a 100644 --- a/Mage.Sets/src/mage/cards/r/RakishHeir.java +++ b/Mage.Sets/src/mage/cards/r/RakishHeir.java @@ -53,7 +53,7 @@ public class RakishHeir extends CardImpl { public RakishHeir(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RakkaMar.java b/Mage.Sets/src/mage/cards/r/RakkaMar.java index 24aa26b385..d56862ec41 100644 --- a/Mage.Sets/src/mage/cards/r/RakkaMar.java +++ b/Mage.Sets/src/mage/cards/r/RakkaMar.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.game.permanent.token.RakkaMarElementalToken; @@ -53,8 +54,8 @@ public class RakkaMar extends CardImpl { public RakkaMar(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RakshaGoldenCub.java b/Mage.Sets/src/mage/cards/r/RakshaGoldenCub.java index 73e66d6430..b37215bda1 100644 --- a/Mage.Sets/src/mage/cards/r/RakshaGoldenCub.java +++ b/Mage.Sets/src/mage/cards/r/RakshaGoldenCub.java @@ -60,8 +60,8 @@ public class RakshaGoldenCub extends CardImpl { public RakshaGoldenCub(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Cat"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RakshasaDeathdealer.java b/Mage.Sets/src/mage/cards/r/RakshasaDeathdealer.java index 8841734642..e43faf0929 100644 --- a/Mage.Sets/src/mage/cards/r/RakshasaDeathdealer.java +++ b/Mage.Sets/src/mage/cards/r/RakshasaDeathdealer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class RakshasaDeathdealer extends CardImpl { public RakshasaDeathdealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{G}"); - this.subtype.add("Cat"); - this.subtype.add("Demon"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.DEMON); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RakshasaGravecaller.java b/Mage.Sets/src/mage/cards/r/RakshasaGravecaller.java index 5f9ba35f54..086884aae3 100644 --- a/Mage.Sets/src/mage/cards/r/RakshasaGravecaller.java +++ b/Mage.Sets/src/mage/cards/r/RakshasaGravecaller.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ExploitAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.ZombieToken; /** @@ -45,8 +46,8 @@ public class RakshasaGravecaller extends CardImpl { public RakshasaGravecaller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Cat"); - this.subtype.add("Demon"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.DEMON); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/r/RakshasaVizier.java b/Mage.Sets/src/mage/cards/r/RakshasaVizier.java index 1e95c1c724..278f7207f1 100644 --- a/Mage.Sets/src/mage/cards/r/RakshasaVizier.java +++ b/Mage.Sets/src/mage/cards/r/RakshasaVizier.java @@ -35,6 +35,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -49,8 +50,8 @@ public class RakshasaVizier extends CardImpl { public RakshasaVizier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{G}{U}"); - this.subtype.add("Cat"); - this.subtype.add("Demon"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.DEMON); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RalZarek.java b/Mage.Sets/src/mage/cards/r/RalZarek.java index 6d4012579d..87f9640f29 100644 --- a/Mage.Sets/src/mage/cards/r/RalZarek.java +++ b/Mage.Sets/src/mage/cards/r/RalZarek.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.filter.FilterPermanent; @@ -65,7 +66,7 @@ public class RalZarek extends CardImpl { public RalZarek(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{U}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Ral"); + this.subtype.add(SubType.RAL); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/r/RallyTheTroops.java b/Mage.Sets/src/mage/cards/r/RallyTheTroops.java new file mode 100644 index 0000000000..4974b7b806 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RallyTheTroops.java @@ -0,0 +1,72 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility; +import mage.abilities.condition.common.AttackedThisStepCondition; +import mage.abilities.effects.common.UntapAllControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.PhaseStep; +import mage.constants.TurnPhase; +import mage.filter.StaticFilters; +import mage.watchers.common.PlayerAttackedStepWatcher; + +/** + * + * @author TheElk801 + */ +public class RallyTheTroops extends CardImpl { + + public RallyTheTroops(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); + + // Cast Rally the Troops only during the declare attackers step and only if you've been attacked this step. + Ability ability = new CastOnlyDuringPhaseStepSourceAbility( + TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance, + "Cast {this} only during the declare attackers step and only if you've been attacked this step." + ); + ability.addWatcher(new PlayerAttackedStepWatcher()); + this.addAbility(ability); + + // Untap all creatures you control. + this.getSpellAbility().addEffect(new UntapAllControllerEffect(StaticFilters.FILTER_PERMANENT_CREATURES)); + } + + public RallyTheTroops(final RallyTheTroops card) { + super(card); + } + + @Override + public RallyTheTroops copy() { + return new RallyTheTroops(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RallyingFire.java b/Mage.Sets/src/mage/cards/r/RallyingFire.java index c509e4b0f0..fb11ce5ae1 100644 --- a/Mage.Sets/src/mage/cards/r/RallyingFire.java +++ b/Mage.Sets/src/mage/cards/r/RallyingFire.java @@ -1,59 +1,59 @@ -/* - * 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.cards.r; - -import java.util.UUID; -import mage.abilities.effects.common.continuous.BoostControlledEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; - -/** - * - * @author Styxo - */ -public class RallyingFire extends CardImpl { - - public RallyingFire(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - - // Creatures you control get +2/+0 until end of turn. - this.getSpellAbility().addEffect(new BoostControlledEffect(2, 0, Duration.EndOfTurn)); - - } - - public RallyingFire(final RallyingFire card) { - super(card); - } - - @Override - public RallyingFire copy() { - return new RallyingFire(this); - } -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; + +/** + * + * @author Styxo + */ +public class RallyingFire extends CardImpl { + + public RallyingFire(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); + + // Creatures you control get +2/+0 until end of turn. + this.getSpellAbility().addEffect(new BoostControlledEffect(2, 0, Duration.EndOfTurn)); + + } + + public RallyingFire(final RallyingFire card) { + super(card); + } + + @Override + public RallyingFire copy() { + return new RallyingFire(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RallyingRoar.java b/Mage.Sets/src/mage/cards/r/RallyingRoar.java new file mode 100644 index 0000000000..2f73e27f35 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RallyingRoar.java @@ -0,0 +1,61 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.effects.common.UntapAllControllerEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class RallyingRoar extends CardImpl { + + public RallyingRoar(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}"); + + // Creatures you control get +1/+1 until end of turn. Untap them. + this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new UntapAllControllerEffect(new FilterControlledCreaturePermanent(), "Untap them.")); + } + + public RallyingRoar(final RallyingRoar card) { + super(card); + } + + @Override + public RallyingRoar copy() { + return new RallyingRoar(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RamirezDePietro.java b/Mage.Sets/src/mage/cards/r/RamirezDePietro.java index a674384e24..24d101e2fe 100644 --- a/Mage.Sets/src/mage/cards/r/RamirezDePietro.java +++ b/Mage.Sets/src/mage/cards/r/RamirezDePietro.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -44,8 +45,8 @@ public class RamirezDePietro extends CardImpl { public RamirezDePietro(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Pirate"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RamosDragonEngine.java b/Mage.Sets/src/mage/cards/r/RamosDragonEngine.java index 632081e385..7453ae445f 100644 --- a/Mage.Sets/src/mage/cards/r/RamosDragonEngine.java +++ b/Mage.Sets/src/mage/cards/r/RamosDragonEngine.java @@ -40,6 +40,7 @@ import mage.abilities.mana.ActivateOncePerTurnManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -60,7 +61,7 @@ public class RamosDragonEngine extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -100,7 +101,7 @@ class RamosDragonEngineAddCountersEffect extends OneShotEffect { Player you = game.getPlayer(source.getControllerId()); Permanent permanent = game.getPermanent(source.getSourceId()); if (you != null && permanent != null) { - Spell spell = game.getStack().getSpell(this.getTargetPointer().getFirst(game, source)); + Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source)); if (spell != null) { int amount = 0; if (spell.getColor(game).isWhite()) { diff --git a/Mage.Sets/src/mage/cards/r/RamosianCaptain.java b/Mage.Sets/src/mage/cards/r/RamosianCaptain.java index 083083c833..3c146004dc 100644 --- a/Mage.Sets/src/mage/cards/r/RamosianCaptain.java +++ b/Mage.Sets/src/mage/cards/r/RamosianCaptain.java @@ -62,8 +62,8 @@ public class RamosianCaptain extends CardImpl { public RamosianCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RamosianCommander.java b/Mage.Sets/src/mage/cards/r/RamosianCommander.java index f279ec7f74..cf94f171bf 100644 --- a/Mage.Sets/src/mage/cards/r/RamosianCommander.java +++ b/Mage.Sets/src/mage/cards/r/RamosianCommander.java @@ -61,8 +61,8 @@ public class RamosianCommander extends CardImpl { public RamosianCommander(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RamosianLieutenant.java b/Mage.Sets/src/mage/cards/r/RamosianLieutenant.java index 5ec98897bb..b5cabddd0f 100644 --- a/Mage.Sets/src/mage/cards/r/RamosianLieutenant.java +++ b/Mage.Sets/src/mage/cards/r/RamosianLieutenant.java @@ -61,8 +61,8 @@ public class RamosianLieutenant extends CardImpl { public RamosianLieutenant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RamosianRevivalist.java b/Mage.Sets/src/mage/cards/r/RamosianRevivalist.java index 22e6ba7097..016ef0634f 100644 --- a/Mage.Sets/src/mage/cards/r/RamosianRevivalist.java +++ b/Mage.Sets/src/mage/cards/r/RamosianRevivalist.java @@ -60,9 +60,9 @@ public class RamosianRevivalist extends CardImpl { public RamosianRevivalist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RamosianSergeant.java b/Mage.Sets/src/mage/cards/r/RamosianSergeant.java index 6a241eb338..c4b9afafaf 100644 --- a/Mage.Sets/src/mage/cards/r/RamosianSergeant.java +++ b/Mage.Sets/src/mage/cards/r/RamosianSergeant.java @@ -60,8 +60,8 @@ public class RamosianSergeant extends CardImpl { public RamosianSergeant(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RamosianSkyMarshal.java b/Mage.Sets/src/mage/cards/r/RamosianSkyMarshal.java index 4bf64154a2..b7fb03245e 100644 --- a/Mage.Sets/src/mage/cards/r/RamosianSkyMarshal.java +++ b/Mage.Sets/src/mage/cards/r/RamosianSkyMarshal.java @@ -61,8 +61,8 @@ public class RamosianSkyMarshal extends CardImpl { public RamosianSkyMarshal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RampagingBaloths.java b/Mage.Sets/src/mage/cards/r/RampagingBaloths.java index 482d6e2e48..59fca09e64 100644 --- a/Mage.Sets/src/mage/cards/r/RampagingBaloths.java +++ b/Mage.Sets/src/mage/cards/r/RampagingBaloths.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.BeastToken2; /** @@ -46,7 +47,7 @@ public class RampagingBaloths extends CardImpl { public RampagingBaloths(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/r/RampagingFerocidon.java b/Mage.Sets/src/mage/cards/r/RampagingFerocidon.java new file mode 100644 index 0000000000..17663bc7fa --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RampagingFerocidon.java @@ -0,0 +1,132 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SetTargetPointer; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class RampagingFerocidon extends CardImpl { + + private static final FilterPermanent filter = new FilterCreaturePermanent("another creature"); + + static { + filter.add(new AnotherPredicate()); + } + + public RampagingFerocidon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Menace + this.addAbility(new MenaceAbility()); + + // Players can't gain life. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new RampagingFerocidonEffect())); + + // Whenever another creature enters the battlefield, Rampaging Ferocidon deals 1 damage to that creature's controller. + this.addAbility(new EntersBattlefieldAllTriggeredAbility( + Zone.BATTLEFIELD, new DamageTargetEffect(1, true, "that creature's controller"), filter, false, SetTargetPointer.PLAYER, "")); + } + + public RampagingFerocidon(final RampagingFerocidon card) { + super(card); + } + + @Override + public RampagingFerocidon copy() { + return new RampagingFerocidon(this); + } +} + +class RampagingFerocidonEffect extends ContinuousRuleModifyingEffectImpl { + + public RampagingFerocidonEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment, false, true); + staticText = "Players can't gain life"; + } + + public RampagingFerocidonEffect(final RampagingFerocidonEffect effect) { + super(effect); + } + + @Override + public RampagingFerocidonEffect copy() { + return new RampagingFerocidonEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public String getInfoMessage(Ability source, GameEvent event, Game game) { + MageObject mageObject = game.getObject(source.getSourceId()); + Player player = game.getPlayer(event.getPlayerId()); + if (mageObject != null && player != null) { + return player.getLogName() + " can't get " + event.getAmount() + " life (" + mageObject.getIdName() + ")."; + } + return null; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == GameEvent.EventType.GAIN_LIFE) { + return game.getState().getPlayersInRange(source.getControllerId(), game).contains(event.getPlayerId()); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/r/RampagingHippo.java b/Mage.Sets/src/mage/cards/r/RampagingHippo.java index 55d7dbade4..b515c9a9d4 100644 --- a/Mage.Sets/src/mage/cards/r/RampagingHippo.java +++ b/Mage.Sets/src/mage/cards/r/RampagingHippo.java @@ -8,12 +8,13 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; public class RampagingHippo extends CardImpl { public RampagingHippo(UUID cardID, CardSetInfo cardSetInfo){ super(cardID, cardSetInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); - subtype.add("Hippo"); + subtype.add(SubType.HIPPO); power = new MageInt(5); toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/r/RampagingWerewolf.java b/Mage.Sets/src/mage/cards/r/RampagingWerewolf.java index 6b56ebdc09..116c1f8f49 100644 --- a/Mage.Sets/src/mage/cards/r/RampagingWerewolf.java +++ b/Mage.Sets/src/mage/cards/r/RampagingWerewolf.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -47,7 +48,7 @@ public class RampagingWerewolf extends CardImpl { public RampagingWerewolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.color.setRed(true); // this card is the second face of double-faced card diff --git a/Mage.Sets/src/mage/cards/r/RampantElephant.java b/Mage.Sets/src/mage/cards/r/RampantElephant.java index ff3c1e81d4..9a8a451658 100644 --- a/Mage.Sets/src/mage/cards/r/RampantElephant.java +++ b/Mage.Sets/src/mage/cards/r/RampantElephant.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.combat.MustBeBlockedByTargetSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class RampantElephant extends CardImpl { public RampantElephant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RampartCrawler.java b/Mage.Sets/src/mage/cards/r/RampartCrawler.java index ff5537efe1..0185937722 100644 --- a/Mage.Sets/src/mage/cards/r/RampartCrawler.java +++ b/Mage.Sets/src/mage/cards/r/RampartCrawler.java @@ -54,8 +54,8 @@ public class RampartCrawler extends CardImpl { public RampartCrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Lizard"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.LIZARD); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/Ramroller.java b/Mage.Sets/src/mage/cards/r/Ramroller.java index fbd556af00..1b72ec6131 100644 --- a/Mage.Sets/src/mage/cards/r/Ramroller.java +++ b/Mage.Sets/src/mage/cards/r/Ramroller.java @@ -28,7 +28,7 @@ package mage.cards.r; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; @@ -57,12 +58,12 @@ public class Ramroller extends CardImpl { public Ramroller(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); - this.subtype.add("Juggernaut"); + this.subtype.add(SubType.JUGGERNAUT); this.power = new MageInt(2); this.toughness = new MageInt(3); // Ramroller attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); // Ramroller gets +2/+0 as long as you control another artifact. Condition condition = new PermanentsOnTheBattlefieldCondition(filter); ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(2, 0, diff --git a/Mage.Sets/src/mage/cards/r/RamsesOverdark.java b/Mage.Sets/src/mage/cards/r/RamsesOverdark.java index 1d4024bb8c..21634605a5 100644 --- a/Mage.Sets/src/mage/cards/r/RamsesOverdark.java +++ b/Mage.Sets/src/mage/cards/r/RamsesOverdark.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -57,8 +58,8 @@ public class RamsesOverdark extends CardImpl { public RamsesOverdark(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RamunapExcavator.java b/Mage.Sets/src/mage/cards/r/RamunapExcavator.java index 32e38916f4..7540fee335 100644 --- a/Mage.Sets/src/mage/cards/r/RamunapExcavator.java +++ b/Mage.Sets/src/mage/cards/r/RamunapExcavator.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ruleModifying.PlayLandsFromGraveyardEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -44,8 +45,8 @@ public class RamunapExcavator extends CardImpl { public RamunapExcavator(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Naga"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RamunapHydra.java b/Mage.Sets/src/mage/cards/r/RamunapHydra.java index cfd58f0c8f..3a7c2b221b 100644 --- a/Mage.Sets/src/mage/cards/r/RamunapHydra.java +++ b/Mage.Sets/src/mage/cards/r/RamunapHydra.java @@ -1,134 +1,134 @@ -/* - * 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.cards.r; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.condition.common.CardsInControllerGraveCondition; -import mage.abilities.effects.WhileConditionContinuousEffect; -import mage.abilities.effects.common.continuous.BoostSourceWhileControlsEffect; -import mage.abilities.keyword.ReachAbility; -import mage.abilities.keyword.TrampleAbility; -import mage.abilities.keyword.VigilanceAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; -import mage.constants.SubLayer; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.FilterCard; -import mage.filter.FilterPermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; - -/** - * - * @author LevelX2 - */ -public class RamunapHydra extends CardImpl { - - public RamunapHydra(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); - - this.subtype.add("Snake"); - this.subtype.add("Hydra"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // Vigilance - this.addAbility(VigilanceAbility.getInstance()); - - // Reach - this.addAbility(ReachAbility.getInstance()); - - // Trample - this.addAbility(TrampleAbility.getInstance()); - - // Ramunap Hydra gets +1/+1 as long as you control a Desert. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceWhileControlsEffect(new FilterPermanent(SubType.DESERT, "Desert"), 1, 1))); - - // Ramunap Hydra gets +1/+1 as long as there is a Desert card in your graveyard. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new RamunapHydraBoostEffect(1, 1))); - } - - public RamunapHydra(final RamunapHydra card) { - super(card); - } - - @Override - public RamunapHydra copy() { - return new RamunapHydra(this); - } -} - -class RamunapHydraBoostEffect extends WhileConditionContinuousEffect { - - private final static FilterCard filter = new FilterCard("a Desert"); - - static { - filter.add(new SubtypePredicate(SubType.DESERT)); - } - - private final int power; - private final int toughness; - - public RamunapHydraBoostEffect(int power, int toughness) { - super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, new CardsInControllerGraveCondition(1, filter), Outcome.BoostCreature); - this.power = power; - this.toughness = toughness; - staticText = "{this} gets +1/+1 as long as there is a Desert card in your graveyard"; - } - - public RamunapHydraBoostEffect(final RamunapHydraBoostEffect effect) { - super(effect); - this.power = effect.power; - this.toughness = effect.toughness; - } - - @Override - public RamunapHydraBoostEffect copy() { - return new RamunapHydraBoostEffect(this); - } - - @Override - public boolean applyEffect(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - permanent.addPower(power); - permanent.addToughness(toughness); - } - return true; - } - -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CardsInControllerGraveCondition; +import mage.abilities.effects.WhileConditionContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceWhileControlsEffect; +import mage.abilities.keyword.ReachAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author LevelX2 + */ +public class RamunapHydra extends CardImpl { + + public RamunapHydra(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.HYDRA); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Reach + this.addAbility(ReachAbility.getInstance()); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Ramunap Hydra gets +1/+1 as long as you control a Desert. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceWhileControlsEffect(new FilterPermanent(SubType.DESERT, "Desert"), 1, 1))); + + // Ramunap Hydra gets +1/+1 as long as there is a Desert card in your graveyard. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new RamunapHydraBoostEffect(1, 1))); + } + + public RamunapHydra(final RamunapHydra card) { + super(card); + } + + @Override + public RamunapHydra copy() { + return new RamunapHydra(this); + } +} + +class RamunapHydraBoostEffect extends WhileConditionContinuousEffect { + + private final static FilterCard filter = new FilterCard("a Desert"); + + static { + filter.add(new SubtypePredicate(SubType.DESERT)); + } + + private final int power; + private final int toughness; + + public RamunapHydraBoostEffect(int power, int toughness) { + super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, new CardsInControllerGraveCondition(1, filter), Outcome.BoostCreature); + this.power = power; + this.toughness = toughness; + staticText = "{this} gets +1/+1 as long as there is a Desert card in your graveyard"; + } + + public RamunapHydraBoostEffect(final RamunapHydraBoostEffect effect) { + super(effect); + this.power = effect.power; + this.toughness = effect.toughness; + } + + @Override + public RamunapHydraBoostEffect copy() { + return new RamunapHydraBoostEffect(this); + } + + @Override + public boolean applyEffect(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + permanent.addPower(power); + permanent.addToughness(toughness); + } + return true; + } + +} diff --git a/Mage.Sets/src/mage/cards/r/RamunapRuins.java b/Mage.Sets/src/mage/cards/r/RamunapRuins.java index ed41f99f1f..5870867df2 100644 --- a/Mage.Sets/src/mage/cards/r/RamunapRuins.java +++ b/Mage.Sets/src/mage/cards/r/RamunapRuins.java @@ -64,7 +64,7 @@ public class RamunapRuins extends CardImpl { public RamunapRuins(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Desert"); + this.subtype.add(SubType.DESERT); // {t}: Add {C} to your mana pool. this.addAbility(new ColorlessManaAbility()); diff --git a/Mage.Sets/src/mage/cards/r/RancidRats.java b/Mage.Sets/src/mage/cards/r/RancidRats.java index 0d355305ee..4dfdb9d069 100644 --- a/Mage.Sets/src/mage/cards/r/RancidRats.java +++ b/Mage.Sets/src/mage/cards/r/RancidRats.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.SkulkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class RancidRats extends CardImpl { public RancidRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Rat"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.RAT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/Rancor.java b/Mage.Sets/src/mage/cards/r/Rancor.java index abf7cf5a88..7055d30b64 100644 --- a/Mage.Sets/src/mage/cards/r/Rancor.java +++ b/Mage.Sets/src/mage/cards/r/Rancor.java @@ -51,7 +51,7 @@ public class Rancor extends CardImpl { public Rancor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/r/RangerEnVec.java b/Mage.Sets/src/mage/cards/r/RangerEnVec.java index a4bde3902e..ec5c650cdf 100644 --- a/Mage.Sets/src/mage/cards/r/RangerEnVec.java +++ b/Mage.Sets/src/mage/cards/r/RangerEnVec.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; @@ -47,9 +48,9 @@ public class RangerEnVec extends CardImpl { public RangerEnVec(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RangerOfEos.java b/Mage.Sets/src/mage/cards/r/RangerOfEos.java index ae959749e5..34e14c7123 100644 --- a/Mage.Sets/src/mage/cards/r/RangerOfEos.java +++ b/Mage.Sets/src/mage/cards/r/RangerOfEos.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -57,8 +58,8 @@ public class RangerOfEos extends CardImpl { public RangerOfEos(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RangingRaptors.java b/Mage.Sets/src/mage/cards/r/RangingRaptors.java new file mode 100644 index 0000000000..8044e9a590 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RangingRaptors.java @@ -0,0 +1,73 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author TheElk801 + */ +public class RangingRaptors extends CardImpl { + + public RangingRaptors(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Enrage - Whenever Ranging Raptors is dealt damage, you may search your library for a basic land card, put it onto the battlefield, then shuffle your library. + Ability ability = new DealtDamageToSourceTriggeredAbility( + Zone.BATTLEFIELD, + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true), + true, + true); + this.addAbility(ability); + } + + public RangingRaptors(final RangingRaptors card) { + super(card); + } + + @Override + public RangingRaptors copy() { + return new RangingRaptors(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RankAndFile.java b/Mage.Sets/src/mage/cards/r/RankAndFile.java index d5439abb07..30c4c3c672 100644 --- a/Mage.Sets/src/mage/cards/r/RankAndFile.java +++ b/Mage.Sets/src/mage/cards/r/RankAndFile.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -53,7 +54,7 @@ public class RankAndFile extends CardImpl { public RankAndFile(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RapaciousOne.java b/Mage.Sets/src/mage/cards/r/RapaciousOne.java index da72946c8f..42121a58a5 100644 --- a/Mage.Sets/src/mage/cards/r/RapaciousOne.java +++ b/Mage.Sets/src/mage/cards/r/RapaciousOne.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.DamagedPlayerEvent; @@ -50,8 +51,8 @@ public class RapaciousOne extends CardImpl { public RapaciousOne(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RappellingScouts.java b/Mage.Sets/src/mage/cards/r/RappellingScouts.java index 31285726a7..4552bcb01b 100644 --- a/Mage.Sets/src/mage/cards/r/RappellingScouts.java +++ b/Mage.Sets/src/mage/cards/r/RappellingScouts.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,9 +48,9 @@ public class RappellingScouts extends CardImpl { public RappellingScouts(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RaptorCompanion.java b/Mage.Sets/src/mage/cards/r/RaptorCompanion.java new file mode 100644 index 0000000000..26c55fc4e3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RaptorCompanion.java @@ -0,0 +1,59 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class RaptorCompanion extends CardImpl { + + public RaptorCompanion(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + } + + public RaptorCompanion(final RaptorCompanion card) { + super(card); + } + + @Override + public RaptorCompanion copy() { + return new RaptorCompanion(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RaptorHatchling.java b/Mage.Sets/src/mage/cards/r/RaptorHatchling.java new file mode 100644 index 0000000000..ba89e9c9b5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RaptorHatchling.java @@ -0,0 +1,67 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.permanent.token.DinosaurToken; + +/** + * + * @author TheElk801 + */ +public class RaptorHatchling extends CardImpl { + + public RaptorHatchling(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Enrage - Whenever Raptor Hatchling is dealt damage, create a 3/3 green Dinosaur creature token with trample. + Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new DinosaurToken()), false, true); + this.addAbility(ability); } + + public RaptorHatchling(final RaptorHatchling card) { + super(card); + } + + @Override + public RaptorHatchling copy() { + return new RaptorHatchling(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RashidaScalebane.java b/Mage.Sets/src/mage/cards/r/RashidaScalebane.java index 6fdddac92a..3847a40dea 100644 --- a/Mage.Sets/src/mage/cards/r/RashidaScalebane.java +++ b/Mage.Sets/src/mage/cards/r/RashidaScalebane.java @@ -65,8 +65,8 @@ public class RashidaScalebane extends CardImpl { public RashidaScalebane(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RashmiEternitiesCrafter.java b/Mage.Sets/src/mage/cards/r/RashmiEternitiesCrafter.java index b47abec66f..d9942e4b18 100644 --- a/Mage.Sets/src/mage/cards/r/RashmiEternitiesCrafter.java +++ b/Mage.Sets/src/mage/cards/r/RashmiEternitiesCrafter.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -57,8 +58,8 @@ public class RashmiEternitiesCrafter extends CardImpl { public RashmiEternitiesCrafter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RasputinDreamweaver.java b/Mage.Sets/src/mage/cards/r/RasputinDreamweaver.java index 1dcf71f449..f22f370108 100644 --- a/Mage.Sets/src/mage/cards/r/RasputinDreamweaver.java +++ b/Mage.Sets/src/mage/cards/r/RasputinDreamweaver.java @@ -64,8 +64,8 @@ public class RasputinDreamweaver extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/Ratcatcher.java b/Mage.Sets/src/mage/cards/r/Ratcatcher.java index 09c57ce6ea..a0571c14bd 100644 --- a/Mage.Sets/src/mage/cards/r/Ratcatcher.java +++ b/Mage.Sets/src/mage/cards/r/Ratcatcher.java @@ -56,8 +56,8 @@ public class Ratcatcher extends CardImpl { public Ratcatcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Ogre"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RathiAssassin.java b/Mage.Sets/src/mage/cards/r/RathiAssassin.java index eb07baf019..d5815cfe33 100644 --- a/Mage.Sets/src/mage/cards/r/RathiAssassin.java +++ b/Mage.Sets/src/mage/cards/r/RathiAssassin.java @@ -71,9 +71,9 @@ public class RathiAssassin extends CardImpl { public RathiAssassin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Mercenary"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.MERCENARY); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RathiDragon.java b/Mage.Sets/src/mage/cards/r/RathiDragon.java index 3d23d796d5..55caf4f168 100644 --- a/Mage.Sets/src/mage/cards/r/RathiDragon.java +++ b/Mage.Sets/src/mage/cards/r/RathiDragon.java @@ -55,7 +55,7 @@ public class RathiDragon extends CardImpl { public RathiDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RathiFiend.java b/Mage.Sets/src/mage/cards/r/RathiFiend.java index 5c14c171aa..0ee722910e 100644 --- a/Mage.Sets/src/mage/cards/r/RathiFiend.java +++ b/Mage.Sets/src/mage/cards/r/RathiFiend.java @@ -62,8 +62,8 @@ public class RathiFiend extends CardImpl { public RathiFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Horror"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HORROR); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RathiIntimidator.java b/Mage.Sets/src/mage/cards/r/RathiIntimidator.java index a6e32f520f..bc9cb59588 100644 --- a/Mage.Sets/src/mage/cards/r/RathiIntimidator.java +++ b/Mage.Sets/src/mage/cards/r/RathiIntimidator.java @@ -61,8 +61,8 @@ public class RathiIntimidator extends CardImpl { public RathiIntimidator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Horror"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HORROR); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RathiTrapper.java b/Mage.Sets/src/mage/cards/r/RathiTrapper.java index 83f2c4de9f..f3494aeb22 100644 --- a/Mage.Sets/src/mage/cards/r/RathiTrapper.java +++ b/Mage.Sets/src/mage/cards/r/RathiTrapper.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,9 +49,9 @@ public class RathiTrapper extends CardImpl { public RathiTrapper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RatsOfRath.java b/Mage.Sets/src/mage/cards/r/RatsOfRath.java index e0c2aac7ca..373574fef8 100644 --- a/Mage.Sets/src/mage/cards/r/RatsOfRath.java +++ b/Mage.Sets/src/mage/cards/r/RatsOfRath.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Outcome; import mage.constants.Zone; @@ -62,7 +63,7 @@ public class RatsOfRath extends CardImpl { public RatsOfRath(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RattleblazeScarecrow.java b/Mage.Sets/src/mage/cards/r/RattleblazeScarecrow.java index f7ad18ff67..d2dcfb5739 100644 --- a/Mage.Sets/src/mage/cards/r/RattleblazeScarecrow.java +++ b/Mage.Sets/src/mage/cards/r/RattleblazeScarecrow.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.PersistAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -64,7 +65,7 @@ public class RattleblazeScarecrow extends CardImpl { public RattleblazeScarecrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/Rattlechains.java b/Mage.Sets/src/mage/cards/r/Rattlechains.java index 226563116a..ff3d330ecf 100644 --- a/Mage.Sets/src/mage/cards/r/Rattlechains.java +++ b/Mage.Sets/src/mage/cards/r/Rattlechains.java @@ -64,7 +64,7 @@ public class Rattlechains extends CardImpl { public Rattlechains(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RattleclawMystic.java b/Mage.Sets/src/mage/cards/r/RattleclawMystic.java index 25d6733bbe..18cbf5667c 100644 --- a/Mage.Sets/src/mage/cards/r/RattleclawMystic.java +++ b/Mage.Sets/src/mage/cards/r/RattleclawMystic.java @@ -40,6 +40,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -49,8 +50,8 @@ public class RattleclawMystic extends CardImpl { public RattleclawMystic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RavagerOfTheFells.java b/Mage.Sets/src/mage/cards/r/RavagerOfTheFells.java index 8caf5c6c1e..685218673c 100644 --- a/Mage.Sets/src/mage/cards/r/RavagerOfTheFells.java +++ b/Mage.Sets/src/mage/cards/r/RavagerOfTheFells.java @@ -45,6 +45,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -66,7 +67,7 @@ public class RavagerOfTheFells extends CardImpl { public RavagerOfTheFells(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.color.setRed(true); this.color.setGreen(true); diff --git a/Mage.Sets/src/mage/cards/r/RavagingHorde.java b/Mage.Sets/src/mage/cards/r/RavagingHorde.java index 75af6f38ca..02d5af045a 100644 --- a/Mage.Sets/src/mage/cards/r/RavagingHorde.java +++ b/Mage.Sets/src/mage/cards/r/RavagingHorde.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetLandPermanent; /** @@ -46,8 +47,8 @@ public class RavagingHorde extends CardImpl { public RavagingHorde(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RavagingRiftwurm.java b/Mage.Sets/src/mage/cards/r/RavagingRiftwurm.java index b6f99c7ed9..8ebcf6510f 100644 --- a/Mage.Sets/src/mage/cards/r/RavagingRiftwurm.java +++ b/Mage.Sets/src/mage/cards/r/RavagingRiftwurm.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.VanishingUpkeepAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -49,7 +50,7 @@ public class RavagingRiftwurm extends CardImpl { public RavagingRiftwurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/r/RavenFamiliar.java b/Mage.Sets/src/mage/cards/r/RavenFamiliar.java index 65a81fd55c..6a3092707e 100644 --- a/Mage.Sets/src/mage/cards/r/RavenFamiliar.java +++ b/Mage.Sets/src/mage/cards/r/RavenFamiliar.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EchoAbility; import mage.abilities.keyword.FlyingAbility; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -53,7 +54,7 @@ public class RavenFamiliar extends CardImpl { public RavenFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RavenGuildInitiate.java b/Mage.Sets/src/mage/cards/r/RavenGuildInitiate.java new file mode 100644 index 0000000000..5269c61f26 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RavenGuildInitiate.java @@ -0,0 +1,75 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; +import mage.constants.SubType; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author TheElk801 + */ +public class RavenGuildInitiate extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Bird"); + + static { + filter.add(new SubtypePredicate(SubType.BIRD)); + } + + public RavenGuildInitiate(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // Morph-Return a Bird you control to its owner's hand. + this.addAbility(new MorphAbility(this, new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)))); + + } + + public RavenGuildInitiate(final RavenGuildInitiate card) { + super(card); + } + + @Override + public RavenGuildInitiate copy() { + return new RavenGuildInitiate(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RavenGuildMaster.java b/Mage.Sets/src/mage/cards/r/RavenGuildMaster.java index 67988663ac..3d575c3c2d 100644 --- a/Mage.Sets/src/mage/cards/r/RavenGuildMaster.java +++ b/Mage.Sets/src/mage/cards/r/RavenGuildMaster.java @@ -29,13 +29,14 @@ package mage.cards.r; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.ExileCardsFromTopOfLibraryTargetEffect; import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,14 +46,14 @@ public class RavenGuildMaster extends CardImpl { public RavenGuildMaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(1); this.toughness = new MageInt(1); // Whenever Raven Guild Master deals combat damage to a player, that player exiles the top ten cards of his or her library. - this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new ExileCardsFromTopOfLibraryTargetEffect(10, "that player"), false, true)); + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new ExileCardsFromTopOfLibraryTargetEffect(10, "that player"), false, true)); // Morph {2}{U}{U} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{U}{U}"))); diff --git a/Mage.Sets/src/mage/cards/r/RavenousBaboons.java b/Mage.Sets/src/mage/cards/r/RavenousBaboons.java index fac62e3576..f25f2773a3 100644 --- a/Mage.Sets/src/mage/cards/r/RavenousBaboons.java +++ b/Mage.Sets/src/mage/cards/r/RavenousBaboons.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetNonBasicLandPermanent; /** @@ -45,7 +46,7 @@ public class RavenousBaboons extends CardImpl { public RavenousBaboons(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Monkey"); + this.subtype.add(SubType.MONKEY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RavenousBaloth.java b/Mage.Sets/src/mage/cards/r/RavenousBaloth.java index d39cba906d..5df4f99aa7 100644 --- a/Mage.Sets/src/mage/cards/r/RavenousBaloth.java +++ b/Mage.Sets/src/mage/cards/r/RavenousBaloth.java @@ -54,7 +54,7 @@ public class RavenousBaloth extends CardImpl { public RavenousBaloth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RavenousBloodseeker.java b/Mage.Sets/src/mage/cards/r/RavenousBloodseeker.java index 3d02c4abe0..dbbc2d8f53 100644 --- a/Mage.Sets/src/mage/cards/r/RavenousBloodseeker.java +++ b/Mage.Sets/src/mage/cards/r/RavenousBloodseeker.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,8 +47,8 @@ public class RavenousBloodseeker extends CardImpl { public RavenousBloodseeker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Vampire"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RavenousDaggertooth.java b/Mage.Sets/src/mage/cards/r/RavenousDaggertooth.java new file mode 100644 index 0000000000..05e0b7ffba --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RavenousDaggertooth.java @@ -0,0 +1,67 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class RavenousDaggertooth extends CardImpl { + + public RavenousDaggertooth(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Enrage - Whenever Ravenous Daggertooth is dealt damage, you gain 2 life. + Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), false, true); + this.addAbility(ability); + } + + public RavenousDaggertooth(final RavenousDaggertooth card) { + super(card); + } + + @Override + public RavenousDaggertooth copy() { + return new RavenousDaggertooth(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RavenousDemon.java b/Mage.Sets/src/mage/cards/r/RavenousDemon.java index a184fb171f..89435b118a 100644 --- a/Mage.Sets/src/mage/cards/r/RavenousDemon.java +++ b/Mage.Sets/src/mage/cards/r/RavenousDemon.java @@ -56,7 +56,7 @@ public class RavenousDemon extends CardImpl { public RavenousDemon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.transformable = true; this.secondSideCardClazz = ArchdemonOfGreed.class; diff --git a/Mage.Sets/src/mage/cards/r/RavenousIntruder.java b/Mage.Sets/src/mage/cards/r/RavenousIntruder.java index f6ff915309..38fb34b1e2 100644 --- a/Mage.Sets/src/mage/cards/r/RavenousIntruder.java +++ b/Mage.Sets/src/mage/cards/r/RavenousIntruder.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -56,7 +57,7 @@ public class RavenousIntruder extends CardImpl { public RavenousIntruder(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Gremlin"); + this.subtype.add(SubType.GREMLIN); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RavenousLeucrocota.java b/Mage.Sets/src/mage/cards/r/RavenousLeucrocota.java index 8fabb2c5d2..1a8bb3a039 100644 --- a/Mage.Sets/src/mage/cards/r/RavenousLeucrocota.java +++ b/Mage.Sets/src/mage/cards/r/RavenousLeucrocota.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class RavenousLeucrocota extends CardImpl { public RavenousLeucrocota(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RavenousRats.java b/Mage.Sets/src/mage/cards/r/RavenousRats.java index a85c5836cd..9cbf5ccfd7 100644 --- a/Mage.Sets/src/mage/cards/r/RavenousRats.java +++ b/Mage.Sets/src/mage/cards/r/RavenousRats.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetOpponent; /** @@ -46,7 +47,7 @@ public class RavenousRats extends CardImpl { public RavenousRats (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RavenousSkirge.java b/Mage.Sets/src/mage/cards/r/RavenousSkirge.java index bde2b528dd..ba851c2ffc 100644 --- a/Mage.Sets/src/mage/cards/r/RavenousSkirge.java +++ b/Mage.Sets/src/mage/cards/r/RavenousSkirge.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,7 +46,7 @@ public class RavenousSkirge extends CardImpl { public RavenousSkirge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RavenousWampa.java b/Mage.Sets/src/mage/cards/r/RavenousWampa.java index 8d2df03ad4..c45aa0b7df 100644 --- a/Mage.Sets/src/mage/cards/r/RavenousWampa.java +++ b/Mage.Sets/src/mage/cards/r/RavenousWampa.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import static mage.cards.r.RavenousWampa.RAVENOUS_WAMPA_STATE_VALUE_KEY_PREFIX; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.StaticFilters; import mage.game.Game; @@ -57,7 +58,7 @@ public class RavenousWampa extends CardImpl { public RavenousWampa(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R/W}{R/W}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RavensRunDragoon.java b/Mage.Sets/src/mage/cards/r/RavensRunDragoon.java index 719bdc2eaf..c62841459e 100644 --- a/Mage.Sets/src/mage/cards/r/RavensRunDragoon.java +++ b/Mage.Sets/src/mage/cards/r/RavensRunDragoon.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -53,8 +54,8 @@ public class RavensRunDragoon extends CardImpl { public RavensRunDragoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G/W}{G/W}"); - this.subtype.add("Elf"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RavingDead.java b/Mage.Sets/src/mage/cards/r/RavingDead.java index 5941f75e30..7333e66a6f 100644 --- a/Mage.Sets/src/mage/cards/r/RavingDead.java +++ b/Mage.Sets/src/mage/cards/r/RavingDead.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.game.Game; @@ -51,7 +52,7 @@ public class RavingDead extends CardImpl { public RavingDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/r/RavingOniSlave.java b/Mage.Sets/src/mage/cards/r/RavingOniSlave.java index 8af800211a..04f702dbfd 100644 --- a/Mage.Sets/src/mage/cards/r/RavingOniSlave.java +++ b/Mage.Sets/src/mage/cards/r/RavingOniSlave.java @@ -49,8 +49,8 @@ public class RavingOniSlave extends CardImpl { public RavingOniSlave(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RavosSoultender.java b/Mage.Sets/src/mage/cards/r/RavosSoultender.java index ec2100ab10..890ec3103b 100644 --- a/Mage.Sets/src/mage/cards/r/RavosSoultender.java +++ b/Mage.Sets/src/mage/cards/r/RavosSoultender.java @@ -52,8 +52,8 @@ public class RavosSoultender extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RayneAcademyChancellor.java b/Mage.Sets/src/mage/cards/r/RayneAcademyChancellor.java index e933a8bd16..3a3c3e1d22 100644 --- a/Mage.Sets/src/mage/cards/r/RayneAcademyChancellor.java +++ b/Mage.Sets/src/mage/cards/r/RayneAcademyChancellor.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.game.Game; @@ -53,8 +54,8 @@ public class RayneAcademyChancellor extends CardImpl { public RayneAcademyChancellor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RazakethTheFoulblooded.java b/Mage.Sets/src/mage/cards/r/RazakethTheFoulblooded.java index e7f603b99b..6518edf8d6 100644 --- a/Mage.Sets/src/mage/cards/r/RazakethTheFoulblooded.java +++ b/Mage.Sets/src/mage/cards/r/RazakethTheFoulblooded.java @@ -56,7 +56,7 @@ public class RazakethTheFoulblooded extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add(SubType.DEMON.getDescription()); + this.subtype.add(SubType.DEMON); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/r/RaziaBorosArchangel.java b/Mage.Sets/src/mage/cards/r/RaziaBorosArchangel.java index c7a2535ede..24bacde135 100644 --- a/Mage.Sets/src/mage/cards/r/RaziaBorosArchangel.java +++ b/Mage.Sets/src/mage/cards/r/RaziaBorosArchangel.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -61,7 +62,7 @@ public class RaziaBorosArchangel extends CardImpl { public RaziaBorosArchangel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(6); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RazingSnidd.java b/Mage.Sets/src/mage/cards/r/RazingSnidd.java index 63c790a444..6e66ea6cc6 100644 --- a/Mage.Sets/src/mage/cards/r/RazingSnidd.java +++ b/Mage.Sets/src/mage/cards/r/RazingSnidd.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.SacrificeAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.predicate.Predicates; @@ -44,7 +45,7 @@ import mage.filter.predicate.mageobject.ColorPredicate; /** * * @author LoneFox - + * */ public class RazingSnidd extends CardImpl { @@ -55,15 +56,15 @@ public class RazingSnidd extends CardImpl { } public RazingSnidd(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{R}"); - this.subtype.add("Beast"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{R}"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); // When Razing Snidd enters the battlefield, return a black or red creature you control to its owner's hand. this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(filter), false)); // When Razing Snidd enters the battlefield, each player sacrifices a land. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeAllEffect(1, new FilterControlledLandPermanent("a land")), false)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeAllEffect(1, new FilterControlledLandPermanent("land")), false)); } public RazingSnidd(final RazingSnidd card) { diff --git a/Mage.Sets/src/mage/cards/r/RazorBoomerang.java b/Mage.Sets/src/mage/cards/r/RazorBoomerang.java index bf6134d1fb..756f0ea048 100644 --- a/Mage.Sets/src/mage/cards/r/RazorBoomerang.java +++ b/Mage.Sets/src/mage/cards/r/RazorBoomerang.java @@ -52,8 +52,8 @@ import mage.target.common.TargetCreatureOrPlayer; public class RazorBoomerang extends CardImpl { public RazorBoomerang(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has "{tap}, Unattach Razor Boomerang: Razor Boomerang deals 1 damage to target creature or player. Return Razor Boomerang to its owner's hand." Ability gainAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RazorBoomerangEffect(this.getId()), new TapSourceCost()); @@ -105,7 +105,7 @@ class RazorBoomerangEffect extends OneShotEffect { } Permanent razor = game.getPermanent(attachmentid); if (razor != null) { - razor.moveToZone(Zone.HAND, id, game, true); + razor.moveToZone(Zone.HAND, source.getSourceId(), game, true); } return true; } diff --git a/Mage.Sets/src/mage/cards/r/RazorGolem.java b/Mage.Sets/src/mage/cards/r/RazorGolem.java index 41e5d40509..8acf5bb8fd 100644 --- a/Mage.Sets/src/mage/cards/r/RazorGolem.java +++ b/Mage.Sets/src/mage/cards/r/RazorGolem.java @@ -44,7 +44,7 @@ public class RazorGolem extends CardImpl { public RazorGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RazorHippogriff.java b/Mage.Sets/src/mage/cards/r/RazorHippogriff.java index a4afa5c747..57d10c1b72 100644 --- a/Mage.Sets/src/mage/cards/r/RazorHippogriff.java +++ b/Mage.Sets/src/mage/cards/r/RazorHippogriff.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterArtifactCard; @@ -55,7 +56,7 @@ public class RazorHippogriff extends CardImpl { public RazorHippogriff (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Hippogriff"); + this.subtype.add(SubType.HIPPOGRIFF); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RazorSwine.java b/Mage.Sets/src/mage/cards/r/RazorSwine.java index 563028c913..d577b570e7 100644 --- a/Mage.Sets/src/mage/cards/r/RazorSwine.java +++ b/Mage.Sets/src/mage/cards/r/RazorSwine.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class RazorSwine extends CardImpl { public RazorSwine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Boar"); + this.subtype.add(SubType.BOAR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RazorclawBear.java b/Mage.Sets/src/mage/cards/r/RazorclawBear.java index df3efc7f40..72f8eda6b0 100644 --- a/Mage.Sets/src/mage/cards/r/RazorclawBear.java +++ b/Mage.Sets/src/mage/cards/r/RazorclawBear.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,7 +46,7 @@ public class RazorclawBear extends CardImpl { public RazorclawBear(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Bear"); + this.subtype.add(SubType.BEAR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RazorfieldRhino.java b/Mage.Sets/src/mage/cards/r/RazorfieldRhino.java index 1bfe76e521..3166251a43 100644 --- a/Mage.Sets/src/mage/cards/r/RazorfieldRhino.java +++ b/Mage.Sets/src/mage/cards/r/RazorfieldRhino.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class RazorfieldRhino extends CardImpl { public RazorfieldRhino (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Rhino"); + this.subtype.add(SubType.RHINO); this.power = new MageInt(4); this.toughness = new MageInt(4); ContinuousEffect effect1 = new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield); diff --git a/Mage.Sets/src/mage/cards/r/RazorfieldThresher.java b/Mage.Sets/src/mage/cards/r/RazorfieldThresher.java index 0b924c87b3..5bfd9249ab 100644 --- a/Mage.Sets/src/mage/cards/r/RazorfieldThresher.java +++ b/Mage.Sets/src/mage/cards/r/RazorfieldThresher.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class RazorfieldThresher extends CardImpl { public RazorfieldThresher (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(6); this.toughness = new MageInt(4); } diff --git a/Mage.Sets/src/mage/cards/r/RazorfinAbolisher.java b/Mage.Sets/src/mage/cards/r/RazorfinAbolisher.java index 37e36212c1..b374c359be 100644 --- a/Mage.Sets/src/mage/cards/r/RazorfinAbolisher.java +++ b/Mage.Sets/src/mage/cards/r/RazorfinAbolisher.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.CounterAnyPredicate; @@ -57,8 +58,8 @@ public class RazorfinAbolisher extends CardImpl { public RazorfinAbolisher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RazorfinHunter.java b/Mage.Sets/src/mage/cards/r/RazorfinHunter.java index 5251650fbf..d7a3466b97 100644 --- a/Mage.Sets/src/mage/cards/r/RazorfinHunter.java +++ b/Mage.Sets/src/mage/cards/r/RazorfinHunter.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -47,8 +48,8 @@ public class RazorfinHunter extends CardImpl { public RazorfinHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{R}"); - this.subtype.add("Merfolk"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RazorfootGriffin.java b/Mage.Sets/src/mage/cards/r/RazorfootGriffin.java index 8b33e52b9f..a4908ed2eb 100644 --- a/Mage.Sets/src/mage/cards/r/RazorfootGriffin.java +++ b/Mage.Sets/src/mage/cards/r/RazorfootGriffin.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class RazorfootGriffin extends CardImpl { public RazorfootGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RazorgrassScreen.java b/Mage.Sets/src/mage/cards/r/RazorgrassScreen.java index c622af53c9..0e7fec20ac 100644 --- a/Mage.Sets/src/mage/cards/r/RazorgrassScreen.java +++ b/Mage.Sets/src/mage/cards/r/RazorgrassScreen.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class RazorgrassScreen extends CardImpl { public RazorgrassScreen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RazorjawOni.java b/Mage.Sets/src/mage/cards/r/RazorjawOni.java index 271b1fbe85..c6f477cfed 100644 --- a/Mage.Sets/src/mage/cards/r/RazorjawOni.java +++ b/Mage.Sets/src/mage/cards/r/RazorjawOni.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CantBlockAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -54,8 +55,8 @@ public class RazorjawOni extends CardImpl { public RazorjawOni(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Demon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DEMON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RazormaneMasticore.java b/Mage.Sets/src/mage/cards/r/RazormaneMasticore.java index c922c0a193..809e328c39 100644 --- a/Mage.Sets/src/mage/cards/r/RazormaneMasticore.java +++ b/Mage.Sets/src/mage/cards/r/RazormaneMasticore.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.target.common.TargetCardInHand; @@ -52,7 +53,7 @@ public class RazormaneMasticore extends CardImpl { public RazormaneMasticore(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Masticore"); + this.subtype.add(SubType.MASTICORE); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RazortoothRats.java b/Mage.Sets/src/mage/cards/r/RazortoothRats.java index 52aa8eaf4c..b84b017f33 100644 --- a/Mage.Sets/src/mage/cards/r/RazortoothRats.java +++ b/Mage.Sets/src/mage/cards/r/RazortoothRats.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class RazortoothRats extends CardImpl { public RazortoothRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RazorvergeThicket.java b/Mage.Sets/src/mage/cards/r/RazorvergeThicket.java index d741d697ba..f1eab11e0c 100644 --- a/Mage.Sets/src/mage/cards/r/RazorvergeThicket.java +++ b/Mage.Sets/src/mage/cards/r/RazorvergeThicket.java @@ -49,10 +49,10 @@ import mage.filter.StaticFilters; public class RazorvergeThicket extends CardImpl { public RazorvergeThicket(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3)); - String abilityText = "tap it unless you control fewer than 3 lands"; + String abilityText = " tapped unless you control two or fewer other lands"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/cards/r/ReachOfBranches.java b/Mage.Sets/src/mage/cards/r/ReachOfBranches.java index 675455621a..9e6d729241 100644 --- a/Mage.Sets/src/mage/cards/r/ReachOfBranches.java +++ b/Mage.Sets/src/mage/cards/r/ReachOfBranches.java @@ -57,7 +57,7 @@ public class ReachOfBranches extends CardImpl { public ReachOfBranches(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.INSTANT}, "{4}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); // Create a 2/5 green Treefolk Shaman creature token. this.getSpellAbility().addEffect(new CreateTokenEffect(new TreefolkShamanToken())); diff --git a/Mage.Sets/src/mage/cards/r/RealityAcid.java b/Mage.Sets/src/mage/cards/r/RealityAcid.java index ebd20ce846..9ff5b67375 100644 --- a/Mage.Sets/src/mage/cards/r/RealityAcid.java +++ b/Mage.Sets/src/mage/cards/r/RealityAcid.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.VanishingUpkeepAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -58,7 +59,7 @@ public class RealityAcid extends CardImpl { public RealityAcid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant permanent TargetPermanent auraTarget = new TargetPermanent(); diff --git a/Mage.Sets/src/mage/cards/r/RealitySmasher.java b/Mage.Sets/src/mage/cards/r/RealitySmasher.java index d976e3ffde..4dac350e74 100644 --- a/Mage.Sets/src/mage/cards/r/RealitySmasher.java +++ b/Mage.Sets/src/mage/cards/r/RealitySmasher.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -53,7 +54,7 @@ public class RealitySmasher extends CardImpl { public RealitySmasher(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{C}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RealityTwist.java b/Mage.Sets/src/mage/cards/r/RealityTwist.java new file mode 100644 index 0000000000..ce44c138fb --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RealityTwist.java @@ -0,0 +1,158 @@ +/* + * 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.cards.r; + +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.choices.Choice; +import mage.choices.ChoiceColor; +import mage.constants.*; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.ManaEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; + +import java.util.UUID; + +/** + * + * @author emerald000 & L_J + */ +public class RealityTwist extends CardImpl { + + public RealityTwist(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}{U}"); + + // Cumulative upkeep-Pay {1}{U}{U}. + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{1}{U}{U}"))); + + // If tapped for mana, Plains produce {R}, Swamps produce {G}, Mountains produce {W}, and Forests produce {B} instead of any other type. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new RealityTwistEffect())); + } + + public RealityTwist(final RealityTwist card) { + super(card); + } + + @Override + public RealityTwist copy() { + return new RealityTwist(this); + } +} + +class RealityTwistEffect extends ReplacementEffectImpl { + + RealityTwistEffect() { + super(Duration.WhileOnBattlefield, Outcome.Neutral); + staticText = "If tapped for mana, Plains produce {R}, Swamps produce {G}, Mountains produce {W}, and Forests produce {B} instead of any other type"; + } + + RealityTwistEffect(final RealityTwistEffect effect) { + super(effect); + } + + @Override + public RealityTwistEffect copy() { + return new RealityTwistEffect(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()); + if (controller != null) { + Permanent permanent = game.getPermanent(event.getSourceId()); + Choice choice = new ChoiceColor(true); + choice.getChoices().clear(); + choice.setMessage("Pick a color to produce"); + if (permanent.hasSubtype(SubType.PLAINS, game)) { + choice.getChoices().add("Red"); + } + if (permanent.hasSubtype(SubType.SWAMP, game)) { + choice.getChoices().add("Green"); + } + if (permanent.hasSubtype(SubType.MOUNTAIN, game)) { + choice.getChoices().add("White"); + } + if (permanent.hasSubtype(SubType.FOREST, game)) { + choice.getChoices().add("Black"); + } + String chosenColor; + if (choice.getChoices().size() == 1) { + chosenColor = choice.getChoices().iterator().next(); + } else { + controller.choose(Outcome.PutManaInPool, choice, game); + chosenColor = choice.getChoice(); + } + ManaEvent manaEvent = (ManaEvent) event; + Mana mana = manaEvent.getMana(); + int amount = mana.count(); + switch (chosenColor) { + case "White": + mana.setToMana(Mana.WhiteMana(amount)); + break; + case "Black": + mana.setToMana(Mana.BlackMana(amount)); + break; + case "Red": + mana.setToMana(Mana.RedMana(amount)); + break; + case "Green": + mana.setToMana(Mana.GreenMana(amount)); + break; + } + } + return false; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.TAPPED_FOR_MANA; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + Permanent permanent = game.getPermanent(event.getSourceId()); + return permanent != null + && (permanent.hasSubtype(SubType.PLAINS, game) + || permanent.hasSubtype(SubType.SWAMP, game) + || permanent.hasSubtype(SubType.MOUNTAIN, game) + || permanent.hasSubtype(SubType.FOREST, game)); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RealmRazer.java b/Mage.Sets/src/mage/cards/r/RealmRazer.java index f444c38b60..f16fd2ed3b 100644 --- a/Mage.Sets/src/mage/cards/r/RealmRazer.java +++ b/Mage.Sets/src/mage/cards/r/RealmRazer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; @@ -53,7 +54,7 @@ public class RealmRazer extends CardImpl { public RealmRazer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{G}{W}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RealmSeekers.java b/Mage.Sets/src/mage/cards/r/RealmSeekers.java index b84c52b1b8..10541e4892 100644 --- a/Mage.Sets/src/mage/cards/r/RealmSeekers.java +++ b/Mage.Sets/src/mage/cards/r/RealmSeekers.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterLandCard; @@ -53,8 +54,8 @@ public class RealmSeekers extends CardImpl { public RealmSeekers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/r/Realmwright.java b/Mage.Sets/src/mage/cards/r/Realmwright.java index 0be59ba52b..ae20d46c86 100644 --- a/Mage.Sets/src/mage/cards/r/Realmwright.java +++ b/Mage.Sets/src/mage/cards/r/Realmwright.java @@ -43,6 +43,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -60,9 +61,9 @@ import mage.players.Player; public class Realmwright extends CardImpl { public Realmwright(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Wizard"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -104,20 +105,20 @@ class RealmwrightEffect2 extends ContinuousEffectImpl { public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { Player you = game.getPlayer(source.getControllerId()); List lands = game.getBattlefield().getAllActivePermanents(new FilterControlledLandPermanent(), source.getControllerId(), game); - String choice = (String) game.getState().getValue(source.getSourceId().toString() + ChooseBasicLandTypeEffect.VALUE_KEY); + SubType choice = SubType.byDescription((String) game.getState().getValue(source.getSourceId().toString() + ChooseBasicLandTypeEffect.VALUE_KEY)); if (you != null && choice != null) { for (Permanent land : lands) { if (land != null) { switch (layer) { case TypeChangingEffects_4: - if (sublayer == SubLayer.NA && !land.getSubtype(game).contains(choice)) { + if (sublayer == SubLayer.NA && !land.hasSubtype(choice, game)) { land.getSubtype(game).add(choice); } break; case AbilityAddingRemovingEffects_6: if (sublayer == SubLayer.NA) { boolean addAbility = true; - if (choice.equals("Forest")) { + if (choice.equals(SubType.FOREST)) { for (Ability existingAbility : land.getAbilities()) { if (existingAbility instanceof GreenManaAbility) { addAbility = false; @@ -128,7 +129,7 @@ class RealmwrightEffect2 extends ContinuousEffectImpl { land.addAbility(new GreenManaAbility(), source.getSourceId(), game); } } - if (choice.equals("Plains")) { + if (choice.equals(SubType.PLAINS)) { for (Ability existingAbility : land.getAbilities()) { if (existingAbility instanceof WhiteManaAbility) { addAbility = false; @@ -139,7 +140,7 @@ class RealmwrightEffect2 extends ContinuousEffectImpl { land.addAbility(new WhiteManaAbility(), source.getSourceId(), game); } } - if (choice.equals("Mountain")) { + if (choice.equals(SubType.MOUNTAIN)) { for (Ability existingAbility : land.getAbilities()) { if (existingAbility instanceof RedManaAbility) { addAbility = false; @@ -150,7 +151,7 @@ class RealmwrightEffect2 extends ContinuousEffectImpl { land.addAbility(new RedManaAbility(), source.getSourceId(), game); } } - if (choice.equals("Island")) { + if (choice.equals(SubType.ISLAND)) { for (Ability existingAbility : land.getAbilities()) { if (existingAbility instanceof BlueManaAbility) { addAbility = false; @@ -161,7 +162,7 @@ class RealmwrightEffect2 extends ContinuousEffectImpl { land.addAbility(new BlueManaAbility(), source.getSourceId(), game); } } - if (choice.equals("Swamp")) { + if (choice.equals(SubType.SWAMP)) { for (Ability existingAbility : land.getAbilities()) { if (existingAbility instanceof BlackManaAbility) { addAbility = false; diff --git a/Mage.Sets/src/mage/cards/r/ReaperFromTheAbyss.java b/Mage.Sets/src/mage/cards/r/ReaperFromTheAbyss.java index 20d4d70bb8..54b6118712 100644 --- a/Mage.Sets/src/mage/cards/r/ReaperFromTheAbyss.java +++ b/Mage.Sets/src/mage/cards/r/ReaperFromTheAbyss.java @@ -63,7 +63,7 @@ public class ReaperFromTheAbyss extends CardImpl { public ReaperFromTheAbyss(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/r/ReaperOfFlightMoonsilver.java b/Mage.Sets/src/mage/cards/r/ReaperOfFlightMoonsilver.java index fe843085fc..d3bb2ae27c 100644 --- a/Mage.Sets/src/mage/cards/r/ReaperOfFlightMoonsilver.java +++ b/Mage.Sets/src/mage/cards/r/ReaperOfFlightMoonsilver.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -49,7 +50,7 @@ public class ReaperOfFlightMoonsilver extends CardImpl { public ReaperOfFlightMoonsilver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/ReaperOfSheoldred.java b/Mage.Sets/src/mage/cards/r/ReaperOfSheoldred.java index c963f37002..7f6dd446cc 100644 --- a/Mage.Sets/src/mage/cards/r/ReaperOfSheoldred.java +++ b/Mage.Sets/src/mage/cards/r/ReaperOfSheoldred.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -52,7 +53,7 @@ public class ReaperOfSheoldred extends CardImpl { public ReaperOfSheoldred(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/ReaperOfTheWilds.java b/Mage.Sets/src/mage/cards/r/ReaperOfTheWilds.java index 7095eaeeeb..29ae49e960 100644 --- a/Mage.Sets/src/mage/cards/r/ReaperOfTheWilds.java +++ b/Mage.Sets/src/mage/cards/r/ReaperOfTheWilds.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class ReaperOfTheWilds extends CardImpl { public ReaperOfTheWilds(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{G}"); - this.subtype.add("Gorgon"); + this.subtype.add(SubType.GORGON); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/ReapingTheGraves.java b/Mage.Sets/src/mage/cards/r/ReapingTheGraves.java index 03fcbeb245..070b57e686 100644 --- a/Mage.Sets/src/mage/cards/r/ReapingTheGraves.java +++ b/Mage.Sets/src/mage/cards/r/ReapingTheGraves.java @@ -43,12 +43,11 @@ import mage.target.common.TargetCardInYourGraveyard; public class ReapingTheGraves extends CardImpl { public ReapingTheGraves(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{B}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}"); // Return target creature card from your graveyard to your hand. this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))); - this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect().setText("Return target creature card from your graveyard to your hand.")); // Storm this.addAbility(new StormAbility()); } diff --git a/Mage.Sets/src/mage/cards/r/ReapingTheRewards.java b/Mage.Sets/src/mage/cards/r/ReapingTheRewards.java index 848f6ca74b..f46924f5b5 100644 --- a/Mage.Sets/src/mage/cards/r/ReapingTheRewards.java +++ b/Mage.Sets/src/mage/cards/r/ReapingTheRewards.java @@ -44,11 +44,11 @@ import mage.target.common.TargetControlledPermanent; public class ReapingTheRewards extends CardImpl { public ReapingTheRewards(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); // Buyback-Sacrifice a land. - this.addAbility(new BuybackAbility(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent())))); - + this.addAbility(new BuybackAbility(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land"))))); + // You gain 2 life. this.getSpellAbility().addEffect(new GainLifeEffect(2)); } diff --git a/Mage.Sets/src/mage/cards/r/ReasonBelieve.java b/Mage.Sets/src/mage/cards/r/ReasonBelieve.java index 9b513ce339..9633c0e95c 100644 --- a/Mage.Sets/src/mage/cards/r/ReasonBelieve.java +++ b/Mage.Sets/src/mage/cards/r/ReasonBelieve.java @@ -1,109 +1,109 @@ -/* - * 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.cards.r; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.keyword.ScryEffect; -import mage.abilities.keyword.AftermathAbility; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.SplitCard; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.SpellAbilityType; -import mage.constants.Zone; -import mage.game.Game; -import mage.players.Player; - -/** - * - * @author LevelX2 - */ -public class ReasonBelieve extends SplitCard { - - public ReasonBelieve(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.SORCERY}, "{U}", "{4}{G}", SpellAbilityType.SPLIT_AFTERMATH); - - // Reason - // Scry 3. - getLeftHalfCard().getSpellAbility().addEffect(new ScryEffect(3)); - - // Believe - // Aftermath - ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true)); - // Look at the top card of your library. You may put it onto the battlefield if it's a creature card. If you don't, put it into your hand. - getRightHalfCard().getSpellAbility().addEffect(new BelieveEffect()); - - } - - public ReasonBelieve(final ReasonBelieve card) { - super(card); - } - - @Override - public ReasonBelieve copy() { - return new ReasonBelieve(this); - } -} - -class BelieveEffect extends OneShotEffect { - - BelieveEffect() { - super(Outcome.PutCardInPlay); - this.staticText = "Look at the top card of your library. You may put it onto the battlefield if it's a creature card. If you don't, put it into your hand"; - } - - BelieveEffect(final BelieveEffect effect) { - super(effect); - } - - @Override - public BelieveEffect copy() { - return new BelieveEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Card card = controller.getLibrary().getFromTop(game); - if (card != null) { - if (card.isCreature() && controller.chooseUse(outcome, "Put " + card.getIdName() + " onto the battlefield?", source, game)) { - controller.moveCards(card, Zone.BATTLEFIELD, source, game); - } else { - controller.moveCards(card, Zone.HAND, source, game); - } - } - return true; - } - return false; - } -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.abilities.keyword.AftermathAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.SplitCard; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SpellAbilityType; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class ReasonBelieve extends SplitCard { + + public ReasonBelieve(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.SORCERY}, "{U}", "{4}{G}", SpellAbilityType.SPLIT_AFTERMATH); + + // Reason + // Scry 3. + getLeftHalfCard().getSpellAbility().addEffect(new ScryEffect(3)); + + // Believe + // Aftermath + ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true)); + // Look at the top card of your library. You may put it onto the battlefield if it's a creature card. If you don't, put it into your hand. + getRightHalfCard().getSpellAbility().addEffect(new BelieveEffect()); + + } + + public ReasonBelieve(final ReasonBelieve card) { + super(card); + } + + @Override + public ReasonBelieve copy() { + return new ReasonBelieve(this); + } +} + +class BelieveEffect extends OneShotEffect { + + BelieveEffect() { + super(Outcome.PutCardInPlay); + this.staticText = "Look at the top card of your library. You may put it onto the battlefield if it's a creature card. If you don't, put it into your hand"; + } + + BelieveEffect(final BelieveEffect effect) { + super(effect); + } + + @Override + public BelieveEffect copy() { + return new BelieveEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Card card = controller.getLibrary().getFromTop(game); + if (card != null) { + if (card.isCreature() && controller.chooseUse(outcome, "Put " + card.getIdName() + " onto the battlefield?", source, game)) { + controller.moveCards(card, Zone.BATTLEFIELD, source, game); + } else { + controller.moveCards(card, Zone.HAND, source, game); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/r/ReassemblingSkeleton.java b/Mage.Sets/src/mage/cards/r/ReassemblingSkeleton.java index 5bbe2f03d8..01f29f13f6 100644 --- a/Mage.Sets/src/mage/cards/r/ReassemblingSkeleton.java +++ b/Mage.Sets/src/mage/cards/r/ReassemblingSkeleton.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class ReassemblingSkeleton extends CardImpl { public ReassemblingSkeleton(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Skeleton"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.SKELETON); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/ReaverDrone.java b/Mage.Sets/src/mage/cards/r/ReaverDrone.java index 05facf61d1..2c66e84bb0 100644 --- a/Mage.Sets/src/mage/cards/r/ReaverDrone.java +++ b/Mage.Sets/src/mage/cards/r/ReaverDrone.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -59,8 +60,8 @@ public class ReaverDrone extends CardImpl { public ReaverDrone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RebelInformer.java b/Mage.Sets/src/mage/cards/r/RebelInformer.java index f02fd52d01..13937fd694 100644 --- a/Mage.Sets/src/mage/cards/r/RebelInformer.java +++ b/Mage.Sets/src/mage/cards/r/RebelInformer.java @@ -68,9 +68,9 @@ public class RebelInformer extends CardImpl { public RebelInformer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Mercenary"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MERCENARY); + this.subtype.add(SubType.REBEL); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RebellionOfTheFlamekin.java b/Mage.Sets/src/mage/cards/r/RebellionOfTheFlamekin.java index f69c26319d..b67a8b677a 100644 --- a/Mage.Sets/src/mage/cards/r/RebellionOfTheFlamekin.java +++ b/Mage.Sets/src/mage/cards/r/RebellionOfTheFlamekin.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class RebellionOfTheFlamekin extends CardImpl { public RebellionOfTheFlamekin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.ENCHANTMENT},"{3}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); // Whenever you clash, you may pay {1}. If you do create a 3/1 Red Elemental Shaman creature token in play. If you won that token gains haste this.addAbility(new RebellionOfTheFlamekinTriggeredAbility()); diff --git a/Mage.Sets/src/mage/cards/r/RebornHero.java b/Mage.Sets/src/mage/cards/r/RebornHero.java new file mode 100644 index 0000000000..36bbc8221f --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RebornHero.java @@ -0,0 +1,91 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CardsInControllerGraveCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class RebornHero extends CardImpl { + + public RebornHero(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Threshold - As long as seven or more cards are in your graveyard, Reborn Hero has "When Reborn Hero dies, you may pay {W}{W}. If you do, return Reborn Hero to the battlefield under your control." + Ability ability = new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ConditionalContinuousEffect( + new GainAbilitySourceEffect(new DiesTriggeredAbility(new DoIfCostPaid( + new ReturnSourceFromGraveyardToBattlefieldEffect(), new ManaCostsImpl("{W}{W}") + ))), + new CardsInControllerGraveCondition(7), + "As long as seven or more cards are in your graveyard, " + + "{this} has \"When {this} dies, you may pay {W}{W}. " + + "If you do, return {this} to the battlefield under your control.\"" + ) + ); + ability.setAbilityWord(AbilityWord.THRESHOLD); + this.addAbility(ability); + } + + public RebornHero(final RebornHero card) { + super(card); + } + + @Override + public RebornHero copy() { + return new RebornHero(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RebukingCeremony.java b/Mage.Sets/src/mage/cards/r/RebukingCeremony.java index f767108db7..540b517282 100644 --- a/Mage.Sets/src/mage/cards/r/RebukingCeremony.java +++ b/Mage.Sets/src/mage/cards/r/RebukingCeremony.java @@ -1,59 +1,59 @@ -/* - * 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.cards.r; - -import java.util.UUID; -import mage.abilities.effects.common.PutOnLibraryTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.target.common.TargetArtifactPermanent; - -/** - * - * @author wetterlicht - */ -public class RebukingCeremony extends CardImpl { - - public RebukingCeremony(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}{G}"); - - // Put two target artifacts on top of their owners' libraries. - getSpellAbility().addEffect(new PutOnLibraryTargetEffect(true)); - getSpellAbility().addTarget(new TargetArtifactPermanent(2)); - } - - public RebukingCeremony(final RebukingCeremony card) { - super(card); - } - - @Override - public RebukingCeremony copy() { - return new RebukingCeremony(this); - } -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.effects.common.PutOnLibraryTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetArtifactPermanent; + +/** + * + * @author wetterlicht + */ +public class RebukingCeremony extends CardImpl { + + public RebukingCeremony(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}{G}"); + + // Put two target artifacts on top of their owners' libraries. + getSpellAbility().addEffect(new PutOnLibraryTargetEffect(true)); + getSpellAbility().addTarget(new TargetArtifactPermanent(2)); + } + + public RebukingCeremony(final RebukingCeremony card) { + super(card); + } + + @Override + public RebukingCeremony copy() { + return new RebukingCeremony(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/Recantation.java b/Mage.Sets/src/mage/cards/r/Recantation.java new file mode 100644 index 0000000000..209601c92d --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/Recantation.java @@ -0,0 +1,81 @@ +/* + * 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.cards.r; + +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetAdjustment; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * + * @author TheElk801 + */ +public class Recantation extends CardImpl { + + public Recantation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}{U}"); + + // At the beginning of your upkeep, you may put a verse counter on Recantation. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, + new AddCountersSourceEffect(CounterType.VERSE.createInstance(), true), TargetController.YOU, true)); + + // {U}, Sacrifice Recantation: Return up to X target permanents to their owners' hands, where X is the number of verse counters on Recantation. + Effect effect = new ReturnToHandTargetEffect(true); + effect.setText("Return up to X target permanents to their owners' hands, where X is the number of verse counters on {this}."); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{U}")); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetPermanent(0, 0, new FilterPermanent("up to X target permanents, where X is the number of verse counters on {this}."), false)); + ability.setTargetAdjustment(TargetAdjustment.VERSE_COUNTER_TARGETS); + this.addAbility(ability); + } + + public Recantation(final Recantation card) { + super(card); + } + + @Override + public Recantation copy() { + return new Recantation(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RecklessBrute.java b/Mage.Sets/src/mage/cards/r/RecklessBrute.java index 5b98cd2bdf..3a5e3ddbb4 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessBrute.java +++ b/Mage.Sets/src/mage/cards/r/RecklessBrute.java @@ -29,11 +29,12 @@ package mage.cards.r; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class RecklessBrute extends CardImpl { public RecklessBrute(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); @@ -52,7 +53,7 @@ public class RecklessBrute extends CardImpl { // Haste this.addAbility(HasteAbility.getInstance()); // Reckless Brute attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public RecklessBrute(final RecklessBrute card) { diff --git a/Mage.Sets/src/mage/cards/r/RecklessBushwhacker.java b/Mage.Sets/src/mage/cards/r/RecklessBushwhacker.java index 1aa05dc372..85caed6e8a 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessBushwhacker.java +++ b/Mage.Sets/src/mage/cards/r/RecklessBushwhacker.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.SurgeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -57,9 +58,9 @@ public class RecklessBushwhacker extends CardImpl { public RecklessBushwhacker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); - this.subtype.add("Ally"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RecklessCohort.java b/Mage.Sets/src/mage/cards/r/RecklessCohort.java index c73f12006c..3bb45602f9 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessCohort.java +++ b/Mage.Sets/src/mage/cards/r/RecklessCohort.java @@ -56,9 +56,9 @@ public class RecklessCohort extends CardImpl { public RecklessCohort(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RecklessEmbermage.java b/Mage.Sets/src/mage/cards/r/RecklessEmbermage.java index d63a530ec6..b39024d81c 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessEmbermage.java +++ b/Mage.Sets/src/mage/cards/r/RecklessEmbermage.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class RecklessEmbermage extends CardImpl { public RecklessEmbermage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RecklessFireweaver.java b/Mage.Sets/src/mage/cards/r/RecklessFireweaver.java index 71feeaebbe..16756b9cc3 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessFireweaver.java +++ b/Mage.Sets/src/mage/cards/r/RecklessFireweaver.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamagePlayersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; @@ -46,8 +47,8 @@ public class RecklessFireweaver extends CardImpl { public RecklessFireweaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RecklessImp.java b/Mage.Sets/src/mage/cards/r/RecklessImp.java index de416c3d43..4f1b436c08 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessImp.java +++ b/Mage.Sets/src/mage/cards/r/RecklessImp.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class RecklessImp extends CardImpl { public RecklessImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RecklessOgre.java b/Mage.Sets/src/mage/cards/r/RecklessOgre.java index 8f563c2d72..59d93a7e8c 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessOgre.java +++ b/Mage.Sets/src/mage/cards/r/RecklessOgre.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -43,13 +44,13 @@ import mage.constants.Duration; public class RecklessOgre extends CardImpl { public RecklessOgre(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Ogre"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.subtype.add(SubType.OGRE); this.power = new MageInt(3); this.toughness = new MageInt(2); // Whenever Reckless Ogre attacks alone, it gets +3/+0 until end of turn. - this.addAbility(new AttacksAloneTriggeredAbility(new BoostSourceEffect(3, 0, Duration.EndOfTurn))); + this.addAbility(new AttacksAloneTriggeredAbility(new BoostSourceEffect(3, 0, Duration.EndOfTurn).setText("it gets +3/+0 until end of turn"))); } public RecklessOgre(final RecklessOgre card) { diff --git a/Mage.Sets/src/mage/cards/r/RecklessOne.java b/Mage.Sets/src/mage/cards/r/RecklessOne.java index 73d8bb93af..c780944074 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessOne.java +++ b/Mage.Sets/src/mage/cards/r/RecklessOne.java @@ -56,8 +56,8 @@ public class RecklessOne extends CardImpl { public RecklessOne(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/r/RecklessRacer.java b/Mage.Sets/src/mage/cards/r/RecklessRacer.java index 343c8c9c8f..70dea0f3ad 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessRacer.java +++ b/Mage.Sets/src/mage/cards/r/RecklessRacer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,8 +48,8 @@ public class RecklessRacer extends CardImpl { public RecklessRacer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Pilot"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PILOT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RecklessReveler.java b/Mage.Sets/src/mage/cards/r/RecklessReveler.java index 856e38485b..ccdf72a987 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessReveler.java +++ b/Mage.Sets/src/mage/cards/r/RecklessReveler.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetArtifactPermanent; @@ -48,7 +49,7 @@ public class RecklessReveler extends CardImpl { public RecklessReveler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Satyr"); + this.subtype.add(SubType.SATYR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RecklessScholar.java b/Mage.Sets/src/mage/cards/r/RecklessScholar.java index 94884ea8d3..69ed4bd7b7 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessScholar.java +++ b/Mage.Sets/src/mage/cards/r/RecklessScholar.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -48,8 +49,8 @@ public class RecklessScholar extends CardImpl { public RecklessScholar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RecklessSpite.java b/Mage.Sets/src/mage/cards/r/RecklessSpite.java index c2b1f67de8..040b7de848 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessSpite.java +++ b/Mage.Sets/src/mage/cards/r/RecklessSpite.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.ObjectColor; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.LoseLifeSourceControllerEffect; @@ -39,13 +38,15 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author Loki */ public class RecklessSpite extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creatures"); static { filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); diff --git a/Mage.Sets/src/mage/cards/r/RecklessWaif.java b/Mage.Sets/src/mage/cards/r/RecklessWaif.java index 846333576d..c7180d7a4d 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessWaif.java +++ b/Mage.Sets/src/mage/cards/r/RecklessWaif.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.m.MercilessPredator; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -48,9 +49,9 @@ public class RecklessWaif extends CardImpl { public RecklessWaif(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); + this.subtype.add(SubType.WEREWOLF); this.transformable = true; this.secondSideCardClazz = MercilessPredator.class; diff --git a/Mage.Sets/src/mage/cards/r/RecklessWurm.java b/Mage.Sets/src/mage/cards/r/RecklessWurm.java index a866366fcd..c9975c8e9b 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessWurm.java +++ b/Mage.Sets/src/mage/cards/r/RecklessWurm.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class RecklessWurm extends CardImpl { public RecklessWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/Reclamation.java b/Mage.Sets/src/mage/cards/r/Reclamation.java index 8e64a2fcd8..810dd67431 100644 --- a/Mage.Sets/src/mage/cards/r/Reclamation.java +++ b/Mage.Sets/src/mage/cards/r/Reclamation.java @@ -1,98 +1,98 @@ -/* - * 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.cards.r; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.common.SacrificeTargetCost; -import mage.abilities.effects.PayCostToAttackBlockEffectImpl; -import mage.abilities.effects.PayCostToAttackBlockEffectImpl.RestrictType; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.common.FilterControlledLandPermanent; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; -import mage.target.common.TargetControlledPermanent; - -/** - * - * @author jeffwadsworth - */ -public class Reclamation extends CardImpl { - - public Reclamation(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{W}"); - - - // Black creatures can't attack unless their controller sacrifices a land for each black creature he or she controls that's attacking. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ReclamationCostToAttackBlockEffect())); - - } - - public Reclamation(final Reclamation card) { - super(card); - } - - @Override - public Reclamation copy() { - return new Reclamation(this); - } -} - -class ReclamationCostToAttackBlockEffect extends PayCostToAttackBlockEffectImpl { - - ReclamationCostToAttackBlockEffect() { - super(Duration.WhileOnBattlefield, Outcome.Detriment, RestrictType.ATTACK, - new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land")))); - staticText = "Black creatures can't attack unless their controller sacrifices a land (This cost is paid as attackers are declared.)"; - } - - ReclamationCostToAttackBlockEffect(ReclamationCostToAttackBlockEffect effect) { - super(effect); - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - Permanent permanent = game.getPermanent(event.getSourceId()); - return (permanent != null - && permanent.isCreature() - && permanent.getColor(game).isBlack()); - } - - @Override - public ReclamationCostToAttackBlockEffect copy() { - return new ReclamationCostToAttackBlockEffect(this); - } - -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.PayCostToAttackBlockEffectImpl; +import mage.abilities.effects.PayCostToAttackBlockEffectImpl.RestrictType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterControlledLandPermanent; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author jeffwadsworth + */ +public class Reclamation extends CardImpl { + + public Reclamation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{W}"); + + + // Black creatures can't attack unless their controller sacrifices a land for each black creature he or she controls that's attacking. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ReclamationCostToAttackBlockEffect())); + + } + + public Reclamation(final Reclamation card) { + super(card); + } + + @Override + public Reclamation copy() { + return new Reclamation(this); + } +} + +class ReclamationCostToAttackBlockEffect extends PayCostToAttackBlockEffectImpl { + + ReclamationCostToAttackBlockEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment, RestrictType.ATTACK, + new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land")))); + staticText = "Black creatures can't attack unless their controller sacrifices a land (This cost is paid as attackers are declared.)"; + } + + ReclamationCostToAttackBlockEffect(ReclamationCostToAttackBlockEffect effect) { + super(effect); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + Permanent permanent = game.getPermanent(event.getSourceId()); + return (permanent != null + && permanent.isCreature() + && permanent.getColor(game).isBlack()); + } + + @Override + public ReclamationCostToAttackBlockEffect copy() { + return new ReclamationCostToAttackBlockEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/r/ReclamationSage.java b/Mage.Sets/src/mage/cards/r/ReclamationSage.java index 8b90d6cc31..6191f76d16 100644 --- a/Mage.Sets/src/mage/cards/r/ReclamationSage.java +++ b/Mage.Sets/src/mage/cards/r/ReclamationSage.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.TargetPermanent; @@ -47,8 +48,8 @@ public class ReclamationSage extends CardImpl { public ReclamationSage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/ReclusiveArtificer.java b/Mage.Sets/src/mage/cards/r/ReclusiveArtificer.java index 6c5e95c170..91bfe219e4 100644 --- a/Mage.Sets/src/mage/cards/r/ReclusiveArtificer.java +++ b/Mage.Sets/src/mage/cards/r/ReclusiveArtificer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetCreaturePermanent; @@ -55,8 +56,8 @@ public class ReclusiveArtificer extends CardImpl { public ReclusiveArtificer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{R}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/ReclusiveWight.java b/Mage.Sets/src/mage/cards/r/ReclusiveWight.java new file mode 100644 index 0000000000..3ed51e0192 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/ReclusiveWight.java @@ -0,0 +1,83 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author TheElk801 + */ +public class ReclusiveWight extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("another nonland permanent"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.LAND))); + filter.add(new AnotherPredicate()); + } + + public ReclusiveWight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.MINION); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // At the beginning of your upkeep, if you control another nonland permanent, sacrifice Reclusive Wight. + this.addAbility(new ConditionalTriggeredAbility( + new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceEffect(), TargetController.YOU, false), + new PermanentsOnTheBattlefieldCondition(filter), + "At the beginning of your upkeep, if you control another nonland permanent, sacrifice {this}." + )); + } + + public ReclusiveWight(final ReclusiveWight card) { + super(card); + } + + @Override + public ReclusiveWight copy() { + return new ReclusiveWight(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RecruiterOfTheGuard.java b/Mage.Sets/src/mage/cards/r/RecruiterOfTheGuard.java index 37145018f4..f4d9f62219 100644 --- a/Mage.Sets/src/mage/cards/r/RecruiterOfTheGuard.java +++ b/Mage.Sets/src/mage/cards/r/RecruiterOfTheGuard.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ToughnessPredicate; @@ -52,8 +53,8 @@ public class RecruiterOfTheGuard extends CardImpl { public RecruiterOfTheGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RecumbentBliss.java b/Mage.Sets/src/mage/cards/r/RecumbentBliss.java index bcdb8b781b..3717c46781 100644 --- a/Mage.Sets/src/mage/cards/r/RecumbentBliss.java +++ b/Mage.Sets/src/mage/cards/r/RecumbentBliss.java @@ -51,7 +51,7 @@ public class RecumbentBliss extends CardImpl { public RecumbentBliss(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/cards/r/RecurringNightmare.java b/Mage.Sets/src/mage/cards/r/RecurringNightmare.java index d966f3291d..dbeeade31f 100644 --- a/Mage.Sets/src/mage/cards/r/RecurringNightmare.java +++ b/Mage.Sets/src/mage/cards/r/RecurringNightmare.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.ActivateAsSorceryActivatedAbility; import mage.abilities.costs.common.ReturnToHandFromBattlefieldSourceCost; @@ -42,13 +41,15 @@ import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * * @author jeffwadsworth */ public class RecurringNightmare extends CardImpl { - private static final FilterCreatureCard filter = new FilterCreatureCard("creature card in your graveyard"); + private static final FilterCreatureCard filter = new FilterCreatureCard("creature card"); private static final FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent("creature"); public RecurringNightmare(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/RedCliffsArmada.java b/Mage.Sets/src/mage/cards/r/RedCliffsArmada.java index 546abe3d99..4282afcb56 100644 --- a/Mage.Sets/src/mage/cards/r/RedCliffsArmada.java +++ b/Mage.Sets/src/mage/cards/r/RedCliffsArmada.java @@ -46,8 +46,8 @@ public class RedCliffsArmada extends CardImpl { public RedCliffsArmada(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RedManaBattery.java b/Mage.Sets/src/mage/cards/r/RedManaBattery.java index 2b6fbe11d0..e661c11359 100644 --- a/Mage.Sets/src/mage/cards/r/RedManaBattery.java +++ b/Mage.Sets/src/mage/cards/r/RedManaBattery.java @@ -64,10 +64,10 @@ public class RedManaBattery extends CardImpl { Mana.RedMana(1), new IntPlusDynamicValue(1, new RemovedCountersForCostValue()), new TapSourceCost(), - "Add {R} to your mana pool, then add {R} to your mana pool for each storage counter removed this way", - true, new CountersSourceCount(CounterType.STORAGE)); - ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(), - "Remove X storage counters from {this}")); + "Add {R} to your mana pool, then add {R} to your mana pool for each charge counter removed this way", + true, new CountersSourceCount(CounterType.CHARGE)); + ability.addCost(new RemoveVariableCountersSourceCost(CounterType.CHARGE.createInstance(), + "Remove any number of charge counters from {this}")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RedScarab.java b/Mage.Sets/src/mage/cards/r/RedScarab.java index 9ecb18cfdb..2ccc5a8867 100644 --- a/Mage.Sets/src/mage/cards/r/RedScarab.java +++ b/Mage.Sets/src/mage/cards/r/RedScarab.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -67,7 +68,7 @@ public class RedScarab extends CardImpl { public RedScarab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/r/RedWard.java b/Mage.Sets/src/mage/cards/r/RedWard.java index bc7dae4b92..7d531775ed 100644 --- a/Mage.Sets/src/mage/cards/r/RedWard.java +++ b/Mage.Sets/src/mage/cards/r/RedWard.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -60,7 +61,7 @@ public class RedWard extends CardImpl { public RedWard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/r/ReduceInStature.java b/Mage.Sets/src/mage/cards/r/ReduceInStature.java index 97c874dc6f..eb91f77d36 100644 --- a/Mage.Sets/src/mage/cards/r/ReduceInStature.java +++ b/Mage.Sets/src/mage/cards/r/ReduceInStature.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -49,7 +50,7 @@ public class ReduceInStature extends CardImpl { public ReduceInStature(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/r/RedwoodTreefolk.java b/Mage.Sets/src/mage/cards/r/RedwoodTreefolk.java index c4e731d7da..7c6513e644 100644 --- a/Mage.Sets/src/mage/cards/r/RedwoodTreefolk.java +++ b/Mage.Sets/src/mage/cards/r/RedwoodTreefolk.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class RedwoodTreefolk extends CardImpl { public RedwoodTreefolk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/r/ReefPirates.java b/Mage.Sets/src/mage/cards/r/ReefPirates.java index 1d9efd7d88..06dab8ce59 100644 --- a/Mage.Sets/src/mage/cards/r/ReefPirates.java +++ b/Mage.Sets/src/mage/cards/r/ReefPirates.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class ReefPirates extends CardImpl { public ReefPirates(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Pirate"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.PIRATE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/ReefShaman.java b/Mage.Sets/src/mage/cards/r/ReefShaman.java index e41294cc05..28988753dd 100644 --- a/Mage.Sets/src/mage/cards/r/ReefShaman.java +++ b/Mage.Sets/src/mage/cards/r/ReefShaman.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetLandPermanent; @@ -48,8 +49,8 @@ public class ReefShaman extends CardImpl { public ReefShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/ReefWorm.java b/Mage.Sets/src/mage/cards/r/ReefWorm.java index f29cf904e7..efe06d3d60 100644 --- a/Mage.Sets/src/mage/cards/r/ReefWorm.java +++ b/Mage.Sets/src/mage/cards/r/ReefWorm.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.ReefWormFishToken; /** @@ -44,7 +45,7 @@ public class ReefWorm extends CardImpl { public ReefWorm(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); - this.subtype.add("Worm"); + this.subtype.add(SubType.WORM); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/ReflectorMage.java b/Mage.Sets/src/mage/cards/r/ReflectorMage.java index 3f43c1514b..1eadff8017 100644 --- a/Mage.Sets/src/mage/cards/r/ReflectorMage.java +++ b/Mage.Sets/src/mage/cards/r/ReflectorMage.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.PhaseStep; @@ -67,8 +68,8 @@ public class ReflectorMage extends CardImpl { public ReflectorMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/ReflexSliver.java b/Mage.Sets/src/mage/cards/r/ReflexSliver.java index b54ace95ab..c67d54c7a5 100644 --- a/Mage.Sets/src/mage/cards/r/ReflexSliver.java +++ b/Mage.Sets/src/mage/cards/r/ReflexSliver.java @@ -55,7 +55,7 @@ public class ReflexSliver extends CardImpl { public ReflexSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/Reflexes.java b/Mage.Sets/src/mage/cards/r/Reflexes.java index c17f8e60bc..219dfab44d 100644 --- a/Mage.Sets/src/mage/cards/r/Reflexes.java +++ b/Mage.Sets/src/mage/cards/r/Reflexes.java @@ -48,7 +48,7 @@ public class Reflexes extends CardImpl { public Reflexes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/r/RegalBehemoth.java b/Mage.Sets/src/mage/cards/r/RegalBehemoth.java index 234efea11d..2e184fae5a 100644 --- a/Mage.Sets/src/mage/cards/r/RegalBehemoth.java +++ b/Mage.Sets/src/mage/cards/r/RegalBehemoth.java @@ -39,6 +39,7 @@ import mage.abilities.mana.TriggeredManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledLandPermanent; @@ -57,7 +58,7 @@ public class RegalBehemoth extends CardImpl { public RegalBehemoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RegalCaracal.java b/Mage.Sets/src/mage/cards/r/RegalCaracal.java index e4021f8902..17e198cd04 100644 --- a/Mage.Sets/src/mage/cards/r/RegalCaracal.java +++ b/Mage.Sets/src/mage/cards/r/RegalCaracal.java @@ -61,7 +61,7 @@ public class RegalCaracal extends CardImpl { public RegalCaracal(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RegalForce.java b/Mage.Sets/src/mage/cards/r/RegalForce.java index ab8a9b7508..1f84845bed 100644 --- a/Mage.Sets/src/mage/cards/r/RegalForce.java +++ b/Mage.Sets/src/mage/cards/r/RegalForce.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -53,7 +54,7 @@ public class RegalForce extends CardImpl { public RegalForce(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RegalUnicorn.java b/Mage.Sets/src/mage/cards/r/RegalUnicorn.java index 295e6f7040..8f95cd5f43 100644 --- a/Mage.Sets/src/mage/cards/r/RegalUnicorn.java +++ b/Mage.Sets/src/mage/cards/r/RegalUnicorn.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class RegalUnicorn extends CardImpl { public RegalUnicorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Unicorn"); + this.subtype.add(SubType.UNICORN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RegathanFirecat.java b/Mage.Sets/src/mage/cards/r/RegathanFirecat.java index e7a68ebeba..92dc8fd3e2 100644 --- a/Mage.Sets/src/mage/cards/r/RegathanFirecat.java +++ b/Mage.Sets/src/mage/cards/r/RegathanFirecat.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class RegathanFirecat extends CardImpl { public RegathanFirecat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Cat"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.CAT); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/Regeneration.java b/Mage.Sets/src/mage/cards/r/Regeneration.java index 038465af2b..0cd8cd95a6 100644 --- a/Mage.Sets/src/mage/cards/r/Regeneration.java +++ b/Mage.Sets/src/mage/cards/r/Regeneration.java @@ -48,7 +48,7 @@ public class Regeneration extends CardImpl { public Regeneration(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/r/RegisaurAlpha.java b/Mage.Sets/src/mage/cards/r/RegisaurAlpha.java new file mode 100644 index 0000000000..fb603c77eb --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RegisaurAlpha.java @@ -0,0 +1,85 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.permanent.token.DinosaurToken; + +/** + * + * @author TheElk801 + */ +public class RegisaurAlpha extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Dinosaurs"); + + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public RegisaurAlpha(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{G}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Other Dinosaurs you control have haste. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter, true))); + + // When Regisaur Alpha enters the battlefield, create a 3/3 green Dinosaur creature token with trample. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new DinosaurToken()))); + } + + public RegisaurAlpha(final RegisaurAlpha card) { + super(card); + } + + @Override + public RegisaurAlpha copy() { + return new RegisaurAlpha(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/Regression.java b/Mage.Sets/src/mage/cards/r/Regression.java index fe7fdeeea3..aba6301935 100644 --- a/Mage.Sets/src/mage/cards/r/Regression.java +++ b/Mage.Sets/src/mage/cards/r/Regression.java @@ -1,68 +1,68 @@ -/* - * 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.cards.r; - -import java.util.UUID; -import mage.abilities.effects.common.ShuffleIntoLibraryTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.FilterPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.target.TargetPermanent; - -/** - * - * @author Styxo - */ -public class Regression extends CardImpl { - - private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment"); - - static { - filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.ENCHANTMENT))); - } - - public Regression(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}"); - - // Choose target artifact or enchantment. Its owner shuffles it into his or her library. - this.getSpellAbility().addEffect(new ShuffleIntoLibraryTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(filter)); - } - - public Regression(final Regression card) { - super(card); - } - - @Override - public Regression copy() { - return new Regression(this); - } -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.effects.common.ShuffleIntoLibraryTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author Styxo + */ +public class Regression extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment"); + + static { + filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.ENCHANTMENT))); + } + + public Regression(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}"); + + // Choose target artifact or enchantment. Its owner shuffles it into his or her library. + this.getSpellAbility().addEffect(new ShuffleIntoLibraryTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + } + + public Regression(final Regression card) { + super(card); + } + + @Override + public Regression copy() { + return new Regression(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/ReignOfChaos.java b/Mage.Sets/src/mage/cards/r/ReignOfChaos.java new file mode 100644 index 0000000000..fcb3aa8aa4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/ReignOfChaos.java @@ -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.cards.r; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Mode; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public class ReignOfChaos extends CardImpl { + + private static final FilterPermanent filter1 = new FilterPermanent("Plains"); + private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("white creature"); + private static final FilterPermanent filter3 = new FilterPermanent("Island"); + private static final FilterCreaturePermanent filter4 = new FilterCreaturePermanent("blue creature"); + + static { + filter1.add(new SubtypePredicate(SubType.PLAINS)); + filter2.add(new ColorPredicate(ObjectColor.WHITE)); + filter3.add(new SubtypePredicate(SubType.ISLAND)); + filter4.add(new ColorPredicate(ObjectColor.BLUE)); + } + + public ReignOfChaos(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}{R}"); + + // Choose one - Destroy target Plains and target white creature; or destroy target Island and target blue creature. + this.getSpellAbility().addEffect(new DestroyTargetEffect(false, true)); + this.getSpellAbility().addTarget(new TargetPermanent(filter1)); + this.getSpellAbility().addTarget(new TargetPermanent(filter2)); + Mode mode = new Mode(); + mode.getEffects().add(new DestroyTargetEffect(false, true)); + mode.getTargets().add(new TargetPermanent(filter3)); + mode.getTargets().add(new TargetPermanent(filter4)); + this.getSpellAbility().addMode(mode); + } + + public ReignOfChaos(final ReignOfChaos card) { + super(card); + } + + @Override + public ReignOfChaos copy() { + return new ReignOfChaos(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/ReinforcedBulwark.java b/Mage.Sets/src/mage/cards/r/ReinforcedBulwark.java index 1454a9ca4b..7f0396a90b 100644 --- a/Mage.Sets/src/mage/cards/r/ReinforcedBulwark.java +++ b/Mage.Sets/src/mage/cards/r/ReinforcedBulwark.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class ReinforcedBulwark extends CardImpl { public ReinforcedBulwark(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/ReinsOfTheVinesteed.java b/Mage.Sets/src/mage/cards/r/ReinsOfTheVinesteed.java index 636e937c4b..837efc634a 100644 --- a/Mage.Sets/src/mage/cards/r/ReinsOfTheVinesteed.java +++ b/Mage.Sets/src/mage/cards/r/ReinsOfTheVinesteed.java @@ -61,7 +61,7 @@ public class ReinsOfTheVinesteed extends CardImpl { public ReinsOfTheVinesteed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/r/Reiterate.java b/Mage.Sets/src/mage/cards/r/Reiterate.java index a2b8feeeba..867267f8f2 100644 --- a/Mage.Sets/src/mage/cards/r/Reiterate.java +++ b/Mage.Sets/src/mage/cards/r/Reiterate.java @@ -33,9 +33,7 @@ import mage.abilities.keyword.BuybackAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.StaticFilters; import mage.target.TargetSpell; /** @@ -43,23 +41,15 @@ import mage.target.TargetSpell; * @author fireshoes */ public class Reiterate extends CardImpl { - - private static final FilterSpell filter = new FilterSpell(); - - static { - filter.add(Predicates.or( - new CardTypePredicate(CardType.INSTANT), - new CardTypePredicate(CardType.SORCERY))); - } public Reiterate(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}{R}"); // Buyback {3} this.addAbility(new BuybackAbility("{3}")); - + // Copy target instant or sorcery spell. You may choose new targets for the copy. - this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_INSTANT_OR_SORCERY_SPELL)); this.getSpellAbility().addEffect(new CopyTargetSpellEffect()); } diff --git a/Mage.Sets/src/mage/cards/r/ReiverDemon.java b/Mage.Sets/src/mage/cards/r/ReiverDemon.java index de77ecd3e8..cb2880a725 100644 --- a/Mage.Sets/src/mage/cards/r/ReiverDemon.java +++ b/Mage.Sets/src/mage/cards/r/ReiverDemon.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -59,7 +60,7 @@ public class ReiverDemon extends CardImpl { public ReiverDemon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/r/RekiTheHistoryOfKamigawa.java b/Mage.Sets/src/mage/cards/r/RekiTheHistoryOfKamigawa.java index 0f6305bc6c..1b11d4a0d3 100644 --- a/Mage.Sets/src/mage/cards/r/RekiTheHistoryOfKamigawa.java +++ b/Mage.Sets/src/mage/cards/r/RekiTheHistoryOfKamigawa.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.SupertypePredicate; @@ -53,8 +54,8 @@ public class RekiTheHistoryOfKamigawa extends CardImpl { public RekiTheHistoryOfKamigawa(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RekindledFlame.java b/Mage.Sets/src/mage/cards/r/RekindledFlame.java index a9896973ca..c8fde66460 100644 --- a/Mage.Sets/src/mage/cards/r/RekindledFlame.java +++ b/Mage.Sets/src/mage/cards/r/RekindledFlame.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; import mage.cards.CardImpl; @@ -48,22 +48,25 @@ import mage.target.common.TargetCreatureOrPlayer; * @author jeffwadsworth */ public class RekindledFlame extends CardImpl { - + static final String rule = "if an opponent has no cards in hand, you may return Rekindled Flame from your graveyard to your hand"; public RekindledFlame(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}{R}"); // Rekindled Flame deals 4 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); - + // At the beginning of your upkeep, if an opponent has no cards in hand, you may return Rekindled Flame from your graveyard to your hand. - Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.GRAVEYARD, new ConditionalOneShotEffect(new ReturnSourceFromGraveyardToHandEffect(), new OpponentHasNoCardsInHandCondition(), rule), TargetController.YOU, true); + Ability ability = new ConditionalTriggeredAbility( + new BeginningOfUpkeepTriggeredAbility( + Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), TargetController.YOU, true + ), + new OpponentHasNoCardsInHandCondition(), rule); ability.setRuleVisible(true); this.addAbility(ability); - + } public RekindledFlame(final RekindledFlame card) { @@ -91,4 +94,4 @@ class OpponentHasNoCardsInHandCondition implements Condition { } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/r/ReleaseTheGremlins.java b/Mage.Sets/src/mage/cards/r/ReleaseTheGremlins.java index 88b53d0899..7ad016c11f 100644 --- a/Mage.Sets/src/mage/cards/r/ReleaseTheGremlins.java +++ b/Mage.Sets/src/mage/cards/r/ReleaseTheGremlins.java @@ -1,78 +1,78 @@ -/* - * 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.cards.r; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.SpellAbility; -import mage.abilities.dynamicvalue.common.ManacostVariableValue; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.DestroyTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.game.Game; -import mage.game.permanent.token.GremlinToken; -import mage.target.common.TargetArtifactPermanent; - -/** - * - * @author Styxo - */ -public class ReleaseTheGremlins extends CardImpl { - - public ReleaseTheGremlins(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{R}"); - - // Destroy X target artifacts. - this.getSpellAbility().addEffect(new DestroyTargetEffect("Destroy X target artifacts")); - this.getSpellAbility().addTarget(new TargetArtifactPermanent()); - - // Create X 2/2 red Gremlin creature tokens. - this.getSpellAbility().addEffect(new CreateTokenEffect(new GremlinToken(), new ManacostVariableValue())); - - } - - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability instanceof SpellAbility) { - ability.getTargets().clear(); - int xValue = ability.getManaCostsToPay().getX(); - ability.addTarget(new TargetArtifactPermanent(xValue, xValue)); - } - } - - public ReleaseTheGremlins(final ReleaseTheGremlins card) { - super(card); - } - - @Override - public ReleaseTheGremlins copy() { - return new ReleaseTheGremlins(this); - } -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.Game; +import mage.game.permanent.token.GremlinToken; +import mage.target.common.TargetArtifactPermanent; + +/** + * + * @author Styxo + */ +public class ReleaseTheGremlins extends CardImpl { + + public ReleaseTheGremlins(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{R}"); + + // Destroy X target artifacts. + this.getSpellAbility().addEffect(new DestroyTargetEffect("Destroy X target artifacts")); + this.getSpellAbility().addTarget(new TargetArtifactPermanent()); + + // Create X 2/2 red Gremlin creature tokens. + this.getSpellAbility().addEffect(new CreateTokenEffect(new GremlinToken(), new ManacostVariableValue())); + + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability instanceof SpellAbility) { + ability.getTargets().clear(); + int xValue = ability.getManaCostsToPay().getX(); + ability.addTarget(new TargetArtifactPermanent(xValue, xValue)); + } + } + + public ReleaseTheGremlins(final ReleaseTheGremlins card) { + super(card); + } + + @Override + public ReleaseTheGremlins copy() { + return new ReleaseTheGremlins(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RelentlessDead.java b/Mage.Sets/src/mage/cards/r/RelentlessDead.java index db73357344..48e4026b52 100644 --- a/Mage.Sets/src/mage/cards/r/RelentlessDead.java +++ b/Mage.Sets/src/mage/cards/r/RelentlessDead.java @@ -58,7 +58,7 @@ public class RelentlessDead extends CardImpl { public RelentlessDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RelentlessHunter.java b/Mage.Sets/src/mage/cards/r/RelentlessHunter.java index 04a4e97004..edb8236ffb 100644 --- a/Mage.Sets/src/mage/cards/r/RelentlessHunter.java +++ b/Mage.Sets/src/mage/cards/r/RelentlessHunter.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class RelentlessHunter extends CardImpl { public RelentlessHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RelentlessRats.java b/Mage.Sets/src/mage/cards/r/RelentlessRats.java index c9c5c88029..4810a1bb99 100644 --- a/Mage.Sets/src/mage/cards/r/RelentlessRats.java +++ b/Mage.Sets/src/mage/cards/r/RelentlessRats.java @@ -56,7 +56,7 @@ public class RelentlessRats extends CardImpl { public RelentlessRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RelentlessSkaabs.java b/Mage.Sets/src/mage/cards/r/RelentlessSkaabs.java index 04f47b8229..56ae018734 100644 --- a/Mage.Sets/src/mage/cards/r/RelentlessSkaabs.java +++ b/Mage.Sets/src/mage/cards/r/RelentlessSkaabs.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.UndyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; @@ -45,7 +46,7 @@ public class RelentlessSkaabs extends CardImpl { public RelentlessSkaabs(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RelicBane.java b/Mage.Sets/src/mage/cards/r/RelicBane.java index 5e6c465138..bcb3e6d1df 100644 --- a/Mage.Sets/src/mage/cards/r/RelicBane.java +++ b/Mage.Sets/src/mage/cards/r/RelicBane.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class RelicBane extends CardImpl { public RelicBane(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant artifact TargetPermanent auraTarget = new TargetArtifactPermanent(); diff --git a/Mage.Sets/src/mage/cards/r/RelicPutrescence.java b/Mage.Sets/src/mage/cards/r/RelicPutrescence.java index 6f714923ad..f31cb5d923 100644 --- a/Mage.Sets/src/mage/cards/r/RelicPutrescence.java +++ b/Mage.Sets/src/mage/cards/r/RelicPutrescence.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -55,7 +56,7 @@ public class RelicPutrescence extends CardImpl { public RelicPutrescence (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetArtifactPermanent(); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/cards/r/RelicSeeker.java b/Mage.Sets/src/mage/cards/r/RelicSeeker.java index a75dcdac7a..df5fdb11bb 100644 --- a/Mage.Sets/src/mage/cards/r/RelicSeeker.java +++ b/Mage.Sets/src/mage/cards/r/RelicSeeker.java @@ -56,8 +56,8 @@ public class RelicSeeker extends CardImpl { public RelicSeeker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RelicWard.java b/Mage.Sets/src/mage/cards/r/RelicWard.java index 78e54a8d40..376bc4ec32 100644 --- a/Mage.Sets/src/mage/cards/r/RelicWard.java +++ b/Mage.Sets/src/mage/cards/r/RelicWard.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class RelicWard extends CardImpl { public RelicWard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // You may cast Relic Ward as though it had flash. If you cast it any time a sorcery couldn't have been cast, the controller of the permanent it becomes sacrifices it at the beginning of the next cleanup step. this.addAbility(new SimpleStaticAbility(Zone.ALL, new CastAsThoughItHadFlashSourceEffect(Duration.EndOfGame))); diff --git a/Mage.Sets/src/mage/cards/r/ReliefCaptain.java b/Mage.Sets/src/mage/cards/r/ReliefCaptain.java index 78144157eb..d4c4179d53 100644 --- a/Mage.Sets/src/mage/cards/r/ReliefCaptain.java +++ b/Mage.Sets/src/mage/cards/r/ReliefCaptain.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SupportAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,9 +43,9 @@ public class ReliefCaptain extends CardImpl { public ReliefCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Knight"); - this.subtype.add("Ally"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.KNIGHT); + this.subtype.add(SubType.ALLY); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/ReliquaryMonk.java b/Mage.Sets/src/mage/cards/r/ReliquaryMonk.java index 081276e98b..53d830298c 100644 --- a/Mage.Sets/src/mage/cards/r/ReliquaryMonk.java +++ b/Mage.Sets/src/mage/cards/r/ReliquaryMonk.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.TargetPermanent; @@ -47,9 +48,9 @@ public class ReliquaryMonk extends CardImpl { public ReliquaryMonk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/Remove.java b/Mage.Sets/src/mage/cards/r/Remove.java new file mode 100644 index 0000000000..fa859c91a1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/Remove.java @@ -0,0 +1,73 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility; +import mage.abilities.condition.common.AttackedThisStepCondition; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.PhaseStep; +import mage.constants.TurnPhase; +import mage.target.common.TargetAttackingCreature; +import mage.watchers.common.PlayerAttackedStepWatcher; + +/** + * + * @author TheElk801 + */ +public class Remove extends CardImpl { + + public Remove(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}"); + + // Cast Remove only during the declare attackers step and only if you've been attacked this step. + Ability ability = new CastOnlyDuringPhaseStepSourceAbility( + TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance, + "Cast {this} only during the declare attackers step and only if you've been attacked this step." + ); + ability.addWatcher(new PlayerAttackedStepWatcher()); + this.addAbility(ability); + + // Return target attacking creature to its owner's hand. + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetAttackingCreature()); + } + + public Remove(final Remove card) { + super(card); + } + + @Override + public Remove copy() { + return new Remove(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RendclawTrow.java b/Mage.Sets/src/mage/cards/r/RendclawTrow.java index 1b4ddd3642..db363a5f9f 100644 --- a/Mage.Sets/src/mage/cards/r/RendclawTrow.java +++ b/Mage.Sets/src/mage/cards/r/RendclawTrow.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class RendclawTrow extends CardImpl { public RendclawTrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B/G}"); - this.subtype.add("Troll"); + this.subtype.add(SubType.TROLL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RenegadeDemon.java b/Mage.Sets/src/mage/cards/r/RenegadeDemon.java index a47fcc5750..c0d55c61e0 100644 --- a/Mage.Sets/src/mage/cards/r/RenegadeDemon.java +++ b/Mage.Sets/src/mage/cards/r/RenegadeDemon.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class RenegadeDemon extends CardImpl { public RenegadeDemon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RenegadeDoppelganger.java b/Mage.Sets/src/mage/cards/r/RenegadeDoppelganger.java index c6f05249ce..351b90dda4 100644 --- a/Mage.Sets/src/mage/cards/r/RenegadeDoppelganger.java +++ b/Mage.Sets/src/mage/cards/r/RenegadeDoppelganger.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class RenegadeDoppelganger extends CardImpl { public RenegadeDoppelganger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RenegadeFirebrand.java b/Mage.Sets/src/mage/cards/r/RenegadeFirebrand.java index d697ed3d6c..058e22627d 100644 --- a/Mage.Sets/src/mage/cards/r/RenegadeFirebrand.java +++ b/Mage.Sets/src/mage/cards/r/RenegadeFirebrand.java @@ -62,8 +62,8 @@ public class RenegadeFirebrand extends CardImpl { public RenegadeFirebrand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RenegadeKrasis.java b/Mage.Sets/src/mage/cards/r/RenegadeKrasis.java index 838d379404..227061928a 100644 --- a/Mage.Sets/src/mage/cards/r/RenegadeKrasis.java +++ b/Mage.Sets/src/mage/cards/r/RenegadeKrasis.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EvolveAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterControlledCreaturePermanent; @@ -48,8 +49,8 @@ public class RenegadeKrasis extends CardImpl { public RenegadeKrasis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Beast"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.BEAST); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RenegadeRallier.java b/Mage.Sets/src/mage/cards/r/RenegadeRallier.java index 4fe2817361..e84e0dd460 100644 --- a/Mage.Sets/src/mage/cards/r/RenegadeRallier.java +++ b/Mage.Sets/src/mage/cards/r/RenegadeRallier.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -59,8 +60,8 @@ public class RenegadeRallier extends CardImpl { public RenegadeRallier(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RenegadeTroops.java b/Mage.Sets/src/mage/cards/r/RenegadeTroops.java index 4c2d41f75e..376621beb3 100644 --- a/Mage.Sets/src/mage/cards/r/RenegadeTroops.java +++ b/Mage.Sets/src/mage/cards/r/RenegadeTroops.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class RenegadeTroops extends CardImpl { public RenegadeTroops(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RenegadeWarlord.java b/Mage.Sets/src/mage/cards/r/RenegadeWarlord.java index 11493cbf75..0a47f3b508 100644 --- a/Mage.Sets/src/mage/cards/r/RenegadeWarlord.java +++ b/Mage.Sets/src/mage/cards/r/RenegadeWarlord.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterAttackingCreature; @@ -46,8 +47,8 @@ public class RenegadeWarlord extends CardImpl { public RenegadeWarlord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RenegadeWheelsmith.java b/Mage.Sets/src/mage/cards/r/RenegadeWheelsmith.java index d58cf37aab..c1f9d83fc2 100644 --- a/Mage.Sets/src/mage/cards/r/RenegadeWheelsmith.java +++ b/Mage.Sets/src/mage/cards/r/RenegadeWheelsmith.java @@ -1,69 +1,70 @@ -/* - * 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.cards.r; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.BecomesTappedSourceTriggeredAbility; -import mage.abilities.effects.common.combat.CantBlockTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Styxo - */ -public class RenegadeWheelsmith extends CardImpl { - - public RenegadeWheelsmith(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{W}"); - - this.subtype.add("Dwarf"); - this.subtype.add("Pilot"); - this.power = new MageInt(3); - this.toughness = new MageInt(2); - - // Whenever Renegade Wheelsmith becomes tapped, target creature can't block this turn. - Ability ability = new BecomesTappedSourceTriggeredAbility(new CantBlockTargetEffect(Duration.EndOfTurn)); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability); - } - - public RenegadeWheelsmith(final RenegadeWheelsmith card) { - super(card); - } - - @Override - public RenegadeWheelsmith copy() { - return new RenegadeWheelsmith(this); - } -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BecomesTappedSourceTriggeredAbility; +import mage.abilities.effects.common.combat.CantBlockTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Styxo + */ +public class RenegadeWheelsmith extends CardImpl { + + public RenegadeWheelsmith(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{W}"); + + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.PILOT); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Whenever Renegade Wheelsmith becomes tapped, target creature can't block this turn. + Ability ability = new BecomesTappedSourceTriggeredAbility(new CantBlockTargetEffect(Duration.EndOfTurn)); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public RenegadeWheelsmith(final RenegadeWheelsmith card) { + super(card); + } + + @Override + public RenegadeWheelsmith copy() { + return new RenegadeWheelsmith(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RenewingTouch.java b/Mage.Sets/src/mage/cards/r/RenewingTouch.java new file mode 100644 index 0000000000..119ce3f4fc --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RenewingTouch.java @@ -0,0 +1,94 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author TheElk801 + */ +public class RenewingTouch extends CardImpl { + + public RenewingTouch(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}"); + + // Shuffle any number of target creature cards from your graveyard into your library. + this.getSpellAbility().addEffect(new RenewingTouchEffect()); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, Integer.MAX_VALUE, new FilterCreatureCard("creature cards from your graveyard"))); + } + + public RenewingTouch(final RenewingTouch card) { + super(card); + } + + @Override + public RenewingTouch copy() { + return new RenewingTouch(this); + } +} + +class RenewingTouchEffect extends OneShotEffect { + + RenewingTouchEffect() { + super(Outcome.Neutral); + this.staticText = "Shuffle any number of target cards from your graveyard into your library"; + } + + RenewingTouchEffect(final RenewingTouchEffect effect) { + super(effect); + } + + @Override + public RenewingTouchEffect copy() { + return new RenewingTouchEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + controller.moveCards(new CardsImpl(this.getTargetPointer().getTargets(game, source)), Zone.LIBRARY, source, game); + controller.shuffleLibrary(source, game); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/r/RenownedWeaponsmith.java b/Mage.Sets/src/mage/cards/r/RenownedWeaponsmith.java index b240e40be7..bbdfba11f2 100644 --- a/Mage.Sets/src/mage/cards/r/RenownedWeaponsmith.java +++ b/Mage.Sets/src/mage/cards/r/RenownedWeaponsmith.java @@ -46,6 +46,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -63,8 +64,8 @@ public class RenownedWeaponsmith extends CardImpl { public RenownedWeaponsmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RenownedWeaver.java b/Mage.Sets/src/mage/cards/r/RenownedWeaver.java index f9c30cfcb4..001b6c2d22 100644 --- a/Mage.Sets/src/mage/cards/r/RenownedWeaver.java +++ b/Mage.Sets/src/mage/cards/r/RenownedWeaver.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.RenownedWeaverSpiderToken; @@ -48,8 +49,8 @@ public class RenownedWeaver extends CardImpl { public RenownedWeaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/Reparations.java b/Mage.Sets/src/mage/cards/r/Reparations.java index 6f3a66ee13..131fac1ef7 100644 --- a/Mage.Sets/src/mage/cards/r/Reparations.java +++ b/Mage.Sets/src/mage/cards/r/Reparations.java @@ -1,114 +1,114 @@ -/* - * 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.cards.r; - -import java.util.UUID; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -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.game.stack.StackObject; -import mage.players.Player; - -/** - * - * @author jeffwadsworth - */ -public class Reparations extends CardImpl { - - public Reparations(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{U}"); - - // Whenever an opponent casts a spell that targets you or a creature you control, you may draw a card. - this.addAbility(new ReparationsTriggeredAbility()); - - } - - public Reparations(final Reparations card) { - super(card); - } - - @Override - public Reparations copy() { - return new Reparations(this); - } -} - -class ReparationsTriggeredAbility extends TriggeredAbilityImpl { - - public ReparationsTriggeredAbility() { - super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), true); - } - - public ReparationsTriggeredAbility(final ReparationsTriggeredAbility ability) { - super(ability); - } - - @Override - public ReparationsTriggeredAbility copy() { - return new ReparationsTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.SPELL_CAST; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - UUID stackObjectId = event.getTargetId(); // spell cast - UUID casterId = event.getPlayerId(); // spell caster - StackObject stackObject = game.getStack().getStackObject(stackObjectId); - if (stackObject != null - && game.getOpponents(controllerId).contains(casterId)) { - Player targetPlayer = game.getPlayer(stackObject.getStackAbility().getFirstTarget()); - Permanent targetPermanent = game.getPermanent(stackObject.getStackAbility().getFirstTarget()); - if (targetPlayer != null - && targetPlayer.getId().equals(controllerId)) { - return true; - } - if (targetPermanent != null - && targetPermanent.isCreature() - && targetPermanent.getControllerId().equals(controllerId)) { - return true; - } - } - return false; - } - - @Override - public String getRule() { - return "Whenever an opponent casts a spell that targets you or a creature you control, you may draw a card."; - } -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +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.game.stack.StackObject; +import mage.players.Player; + +/** + * + * @author jeffwadsworth + */ +public class Reparations extends CardImpl { + + public Reparations(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{U}"); + + // Whenever an opponent casts a spell that targets you or a creature you control, you may draw a card. + this.addAbility(new ReparationsTriggeredAbility()); + + } + + public Reparations(final Reparations card) { + super(card); + } + + @Override + public Reparations copy() { + return new Reparations(this); + } +} + +class ReparationsTriggeredAbility extends TriggeredAbilityImpl { + + public ReparationsTriggeredAbility() { + super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), true); + } + + public ReparationsTriggeredAbility(final ReparationsTriggeredAbility ability) { + super(ability); + } + + @Override + public ReparationsTriggeredAbility copy() { + return new ReparationsTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.SPELL_CAST; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + UUID stackObjectId = event.getTargetId(); // spell cast + UUID casterId = event.getPlayerId(); // spell caster + StackObject stackObject = game.getStack().getStackObject(stackObjectId); + if (stackObject != null + && game.getOpponents(controllerId).contains(casterId)) { + Player targetPlayer = game.getPlayer(stackObject.getStackAbility().getFirstTarget()); + Permanent targetPermanent = game.getPermanent(stackObject.getStackAbility().getFirstTarget()); + if (targetPlayer != null + && targetPlayer.getId().equals(controllerId)) { + return true; + } + if (targetPermanent != null + && targetPermanent.isCreature() + && targetPermanent.getControllerId().equals(controllerId)) { + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever an opponent casts a spell that targets you or a creature you control, you may draw a card."; + } +} diff --git a/Mage.Sets/src/mage/cards/r/RepeatingBarrage.java b/Mage.Sets/src/mage/cards/r/RepeatingBarrage.java new file mode 100644 index 0000000000..315b5a02c3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RepeatingBarrage.java @@ -0,0 +1,75 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.target.common.TargetCreatureOrPlayer; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * + * @author TheElk801 + */ +public class RepeatingBarrage extends CardImpl { + + public RepeatingBarrage(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}{R}"); + + // Repeating Barrage deals 3 damage to target creature or player. + this.getSpellAbility().addEffect(new DamageTargetEffect(3)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + + // Raid — {3}{R}{R}: Return Repeating Barrage from your graveyard to your hand. Activate this ability only if you attacked with a creature this turn. + Ability ability = new ConditionalActivatedAbility(Zone.GRAVEYARD, + new ReturnSourceFromGraveyardToHandEffect(), + new ManaCostsImpl("{3}{R}{R}"), + RaidCondition.instance); + ability.setAbilityWord(AbilityWord.RAID); + this.addAbility(ability, new PlayerAttackedWatcher()); + } + + public RepeatingBarrage(final RepeatingBarrage card) { + super(card); + } + + @Override + public RepeatingBarrage copy() { + return new RepeatingBarrage(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RepentantBlacksmith.java b/Mage.Sets/src/mage/cards/r/RepentantBlacksmith.java index 1a47f0174b..8c0ff44ffb 100644 --- a/Mage.Sets/src/mage/cards/r/RepentantBlacksmith.java +++ b/Mage.Sets/src/mage/cards/r/RepentantBlacksmith.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class RepentantBlacksmith extends CardImpl { public RepentantBlacksmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RepentantVampire.java b/Mage.Sets/src/mage/cards/r/RepentantVampire.java index bcece9407c..f6849891f2 100644 --- a/Mage.Sets/src/mage/cards/r/RepentantVampire.java +++ b/Mage.Sets/src/mage/cards/r/RepentantVampire.java @@ -46,6 +46,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -66,7 +67,7 @@ public class RepentantVampire extends CardImpl { public RepentantVampire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RepublicFrigate.java b/Mage.Sets/src/mage/cards/r/RepublicFrigate.java index 3a38f6fb7b..410b6fb22f 100644 --- a/Mage.Sets/src/mage/cards/r/RepublicFrigate.java +++ b/Mage.Sets/src/mage/cards/r/RepublicFrigate.java @@ -1,61 +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.cards.r; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.keyword.SpaceflightAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class RepublicFrigate extends CardImpl { - - public RepublicFrigate(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{U}"); - this.subtype.add("Starship"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // Spaceflight - this.addAbility(SpaceflightAbility.getInstance()); - } - - public RepublicFrigate(final RepublicFrigate card) { - super(card); - } - - @Override - public RepublicFrigate copy() { - return new RepublicFrigate(this); - } -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.SpaceflightAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author Styxo + */ +public class RepublicFrigate extends CardImpl { + + public RepublicFrigate(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{U}"); + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + } + + public RepublicFrigate(final RepublicFrigate card) { + super(card); + } + + @Override + public RepublicFrigate copy() { + return new RepublicFrigate(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/Repurpose.java b/Mage.Sets/src/mage/cards/r/Repurpose.java index 84b3930058..080ebd5d9e 100644 --- a/Mage.Sets/src/mage/cards/r/Repurpose.java +++ b/Mage.Sets/src/mage/cards/r/Repurpose.java @@ -1,71 +1,71 @@ -/* - * 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.cards.r; - -import java.util.UUID; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.DestroyTargetEffect; -import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.common.FilterCreatureCard; -import mage.target.common.TargetCardInYourGraveyard; -import mage.target.common.TargetCreaturePermanent; -import mage.target.targetpointer.SecondTargetPointer; - -/** - * - * @author Styxo - */ -public class Repurpose extends CardImpl { - - public Repurpose(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}{B}"); - - // Destroy target creature. - this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - - // Return up to one target creature card from graveyard to your hand. - Effect effect = new ReturnFromGraveyardToHandTargetEffect(); - effect.setTargetPointer(SecondTargetPointer.getInstance()); - effect.setText("Return up to one target creature card from graveyard to your hand."); - this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 1, new FilterCreatureCard("creature card from your graveyard"))); - } - - public Repurpose(final Repurpose card) { - super(card); - } - - @Override - public Repurpose copy() { - return new Repurpose(this); - } -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterCreatureCard; +import mage.target.common.TargetCardInYourGraveyard; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.SecondTargetPointer; + +/** + * + * @author Styxo + */ +public class Repurpose extends CardImpl { + + public Repurpose(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}{B}"); + + // Destroy target creature. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Return up to one target creature card from graveyard to your hand. + Effect effect = new ReturnFromGraveyardToHandTargetEffect(); + effect.setTargetPointer(SecondTargetPointer.getInstance()); + effect.setText("Return up to one target creature card from graveyard to your hand."); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 1, new FilterCreatureCard("creature card from your graveyard"))); + } + + public Repurpose(final Repurpose card) { + super(card); + } + + @Override + public Repurpose copy() { + return new Repurpose(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RequiemAngel.java b/Mage.Sets/src/mage/cards/r/RequiemAngel.java index 559f4bcd5b..1c3140c544 100644 --- a/Mage.Sets/src/mage/cards/r/RequiemAngel.java +++ b/Mage.Sets/src/mage/cards/r/RequiemAngel.java @@ -59,7 +59,7 @@ public class RequiemAngel extends CardImpl { public RequiemAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/Reroute.java b/Mage.Sets/src/mage/cards/r/Reroute.java index a4aa46d4b1..b6a5d122b1 100644 --- a/Mage.Sets/src/mage/cards/r/Reroute.java +++ b/Mage.Sets/src/mage/cards/r/Reroute.java @@ -1,71 +1,71 @@ -/* - * 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.cards.r; - -import java.util.UUID; -import mage.abilities.effects.common.ChooseNewTargetsTargetEffect; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.FilterAbility; -import mage.filter.predicate.mageobject.NumberOfTargetsPredicate; -import mage.target.common.TargetActivatedAbility; - -/** - * - * @author LevelX2 - */ -public class Reroute extends CardImpl { - - private static final FilterAbility filter = new FilterAbility("activated ability with a single target"); - - static { - filter.add(new NumberOfTargetsPredicate(1)); - } - - public Reroute(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); - - // Change the target of target activated ability with a single target. - this.getSpellAbility().addEffect(new ChooseNewTargetsTargetEffect(true, true)); - this.getSpellAbility().addTarget(new TargetActivatedAbility(filter)); - - // Draw a card. - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); - } - - public Reroute(final Reroute card) { - super(card); - } - - @Override - public Reroute copy() { - return new Reroute(this); - } -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.effects.common.ChooseNewTargetsTargetEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterAbility; +import mage.filter.predicate.mageobject.NumberOfTargetsPredicate; +import mage.target.common.TargetActivatedAbility; + +/** + * + * @author LevelX2 + */ +public class Reroute extends CardImpl { + + private static final FilterAbility filter = new FilterAbility("activated ability with a single target"); + + static { + filter.add(new NumberOfTargetsPredicate(1)); + } + + public Reroute(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); + + // Change the target of target activated ability with a single target. + this.getSpellAbility().addEffect(new ChooseNewTargetsTargetEffect(true, true)); + this.getSpellAbility().addTarget(new TargetActivatedAbility(filter)); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public Reroute(final Reroute card) { + super(card); + } + + @Override + public Reroute copy() { + return new Reroute(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/ResearchAssistant.java b/Mage.Sets/src/mage/cards/r/ResearchAssistant.java index 1ce9a4942c..b6080b1476 100644 --- a/Mage.Sets/src/mage/cards/r/ResearchAssistant.java +++ b/Mage.Sets/src/mage/cards/r/ResearchAssistant.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class ResearchAssistant extends CardImpl { public ResearchAssistant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/ReservoirWalker.java b/Mage.Sets/src/mage/cards/r/ReservoirWalker.java index f54341a54b..ca2dc81daa 100644 --- a/Mage.Sets/src/mage/cards/r/ReservoirWalker.java +++ b/Mage.Sets/src/mage/cards/r/ReservoirWalker.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,7 +48,7 @@ public class ReservoirWalker extends CardImpl { public ReservoirWalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/ResilientKhenra.java b/Mage.Sets/src/mage/cards/r/ResilientKhenra.java index 88533bde67..d786293ff0 100644 --- a/Mage.Sets/src/mage/cards/r/ResilientKhenra.java +++ b/Mage.Sets/src/mage/cards/r/ResilientKhenra.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EternalizeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -51,8 +52,8 @@ public class ResilientKhenra extends CardImpl { public ResilientKhenra(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Jackal"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.JACKAL); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/ResilientWanderer.java b/Mage.Sets/src/mage/cards/r/ResilientWanderer.java index 6bdc9652b2..c92e4db839 100644 --- a/Mage.Sets/src/mage/cards/r/ResilientWanderer.java +++ b/Mage.Sets/src/mage/cards/r/ResilientWanderer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class ResilientWanderer extends CardImpl { public ResilientWanderer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/ResistanceFighter.java b/Mage.Sets/src/mage/cards/r/ResistanceFighter.java index 0dd51320f1..d29948e9c4 100644 --- a/Mage.Sets/src/mage/cards/r/ResistanceFighter.java +++ b/Mage.Sets/src/mage/cards/r/ResistanceFighter.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventDamageByTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class ResistanceFighter extends CardImpl { public ResistanceFighter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/ResoluteArchangel.java b/Mage.Sets/src/mage/cards/r/ResoluteArchangel.java index 924ee8a569..0dc7b68859 100644 --- a/Mage.Sets/src/mage/cards/r/ResoluteArchangel.java +++ b/Mage.Sets/src/mage/cards/r/ResoluteArchangel.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -50,7 +51,7 @@ public class ResoluteArchangel extends CardImpl { public ResoluteArchangel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/ResoluteBlademaster.java b/Mage.Sets/src/mage/cards/r/ResoluteBlademaster.java index a2e9aff605..0bfeb7e123 100644 --- a/Mage.Sets/src/mage/cards/r/ResoluteBlademaster.java +++ b/Mage.Sets/src/mage/cards/r/ResoluteBlademaster.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterControlledCreaturePermanent; @@ -47,9 +48,9 @@ public class ResoluteBlademaster extends CardImpl { public ResoluteBlademaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/ResoluteSurvivors.java b/Mage.Sets/src/mage/cards/r/ResoluteSurvivors.java index 26e42f7066..a845e724f1 100644 --- a/Mage.Sets/src/mage/cards/r/ResoluteSurvivors.java +++ b/Mage.Sets/src/mage/cards/r/ResoluteSurvivors.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ExertAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -48,8 +49,8 @@ public class ResoluteSurvivors extends CardImpl { public ResoluteSurvivors(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/ResplendentMentor.java b/Mage.Sets/src/mage/cards/r/ResplendentMentor.java index d10592b9bf..47122df96d 100644 --- a/Mage.Sets/src/mage/cards/r/ResplendentMentor.java +++ b/Mage.Sets/src/mage/cards/r/ResplendentMentor.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -58,8 +59,8 @@ public class ResplendentMentor extends CardImpl { public ResplendentMentor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RestlessApparition.java b/Mage.Sets/src/mage/cards/r/RestlessApparition.java index 7ba2eb05f3..c878cf4846 100644 --- a/Mage.Sets/src/mage/cards/r/RestlessApparition.java +++ b/Mage.Sets/src/mage/cards/r/RestlessApparition.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.PersistAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class RestlessApparition extends CardImpl { public RestlessApparition(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W/B}{W/B}{W/B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RestlessBones.java b/Mage.Sets/src/mage/cards/r/RestlessBones.java index e99436bb68..01e448f7df 100644 --- a/Mage.Sets/src/mage/cards/r/RestlessBones.java +++ b/Mage.Sets/src/mage/cards/r/RestlessBones.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -51,7 +52,7 @@ public class RestlessBones extends CardImpl { public RestlessBones(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RestlessDead.java b/Mage.Sets/src/mage/cards/r/RestlessDead.java index 2992ce61b8..16fa998794 100644 --- a/Mage.Sets/src/mage/cards/r/RestlessDead.java +++ b/Mage.Sets/src/mage/cards/r/RestlessDead.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class RestlessDead extends CardImpl { public RestlessDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RestorationAngel.java b/Mage.Sets/src/mage/cards/r/RestorationAngel.java index ddea61a1b7..ab878ebefa 100644 --- a/Mage.Sets/src/mage/cards/r/RestorationAngel.java +++ b/Mage.Sets/src/mage/cards/r/RestorationAngel.java @@ -64,7 +64,7 @@ public class RestorationAngel extends CardImpl { public RestorationAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RestorationGearsmith.java b/Mage.Sets/src/mage/cards/r/RestorationGearsmith.java index e7a5b74e18..a0076bcfab 100644 --- a/Mage.Sets/src/mage/cards/r/RestorationGearsmith.java +++ b/Mage.Sets/src/mage/cards/r/RestorationGearsmith.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetCardInYourGraveyard; @@ -47,8 +48,8 @@ public class RestorationGearsmith extends CardImpl { public RestorationGearsmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{B}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RestorationSpecialist.java b/Mage.Sets/src/mage/cards/r/RestorationSpecialist.java index 6f9db5e0f2..b5c00db8ad 100644 --- a/Mage.Sets/src/mage/cards/r/RestorationSpecialist.java +++ b/Mage.Sets/src/mage/cards/r/RestorationSpecialist.java @@ -1,79 +1,80 @@ -/* - * 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.cards.r; - -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.mana.ManaCostsImpl; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.ReturnToHandTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.filter.common.FilterArtifactCard; -import mage.filter.common.FilterEnchantmentCard; -import mage.target.common.TargetCardInGraveyard; - -/** - * - * @author Styxo - */ -public class RestorationSpecialist extends CardImpl { - - public RestorationSpecialist(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - - this.subtype.add("Dwarf"); - this.subtype.add("Artificer"); - this.power = new MageInt(2); - this.toughness = new MageInt(1); - - // {W}, Sacrifice Restoration Specialist: Return up to one target artifact card and up to one target enchantment card from your graveyard to your hand. - Effect effect = new ReturnToHandTargetEffect(true); - effect.setText("Return up to one target artifact card and up to one target enchantment card from your graveyard to your hand"); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{W}")); - ability.addTarget(new TargetCardInGraveyard(0, 1, new FilterArtifactCard("artifact card from your graveyard"))); - ability.addTarget(new TargetCardInGraveyard(0, 1, new FilterEnchantmentCard("enchantment card from your graveyard"))); - ability.addCost(new SacrificeSourceCost()); - this.addAbility(ability); - - } - - public RestorationSpecialist(final RestorationSpecialist card) { - super(card); - } - - @Override - public RestorationSpecialist copy() { - return new RestorationSpecialist(this); - } -} +/* + * 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.cards.r; + +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.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterArtifactCard; +import mage.filter.common.FilterEnchantmentCard; +import mage.target.common.TargetCardInGraveyard; + +/** + * + * @author Styxo + */ +public class RestorationSpecialist extends CardImpl { + + public RestorationSpecialist(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.ARTIFICER); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // {W}, Sacrifice Restoration Specialist: Return up to one target artifact card and up to one target enchantment card from your graveyard to your hand. + Effect effect = new ReturnToHandTargetEffect(true); + effect.setText("Return up to one target artifact card and up to one target enchantment card from your graveyard to your hand"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{W}")); + ability.addTarget(new TargetCardInGraveyard(0, 1, new FilterArtifactCard("artifact card from your graveyard"))); + ability.addTarget(new TargetCardInGraveyard(0, 1, new FilterEnchantmentCard("enchantment card from your graveyard"))); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + + } + + public RestorationSpecialist(final RestorationSpecialist card) { + super(card); + } + + @Override + public RestorationSpecialist copy() { + return new RestorationSpecialist(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/Resuscitate.java b/Mage.Sets/src/mage/cards/r/Resuscitate.java new file mode 100644 index 0000000000..a5801da56a --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/Resuscitate.java @@ -0,0 +1,70 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.RegenerateSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class Resuscitate extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creatures you control"); + + public Resuscitate(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}"); + + // Until end of turn, creatures you control gain "{1}: Regenerate this creature." + Ability ability = new SimpleActivatedAbility(new RegenerateSourceEffect().setText("Regenerate this creature"), new GenericManaCost(1)); + this.getSpellAbility().addEffect( + new GainAbilityAllEffect(ability, Duration.EndOfTurn, filter, + "Until end of turn, creatures you control gain \"{1}: Regenerate this creature.\"" + ) + ); + } + + public Resuscitate(final Resuscitate card) { + super(card); + } + + @Override + public Resuscitate copy() { + return new Resuscitate(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RetaliatorGriffin.java b/Mage.Sets/src/mage/cards/r/RetaliatorGriffin.java index 8036b47fa3..08daf0b7d2 100644 --- a/Mage.Sets/src/mage/cards/r/RetaliatorGriffin.java +++ b/Mage.Sets/src/mage/cards/r/RetaliatorGriffin.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -53,7 +54,7 @@ public class RetaliatorGriffin extends CardImpl { public RetaliatorGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{G}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/ReturnOfTheNightstalkers.java b/Mage.Sets/src/mage/cards/r/ReturnOfTheNightstalkers.java new file mode 100644 index 0000000000..e4fc525b19 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/ReturnOfTheNightstalkers.java @@ -0,0 +1,107 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.common.FilterPermanentCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class ReturnOfTheNightstalkers extends CardImpl { + + public ReturnOfTheNightstalkers(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{B}{B}"); + + // Return all Nightstalker permanent cards from your graveyard to the battlefield. Then destroy all Swamps you control. + this.getSpellAbility().addEffect(new ReturnOfTheNightstalkersEffect()); + } + + public ReturnOfTheNightstalkers(final ReturnOfTheNightstalkers card) { + super(card); + } + + @Override + public ReturnOfTheNightstalkers copy() { + return new ReturnOfTheNightstalkers(this); + } +} + +class ReturnOfTheNightstalkersEffect extends OneShotEffect { + + private static final FilterPermanentCard filter1 = new FilterPermanentCard(); + private static final FilterControlledPermanent filter2 = new FilterControlledPermanent(); + + static { + filter1.add(new SubtypePredicate(SubType.NIGHTSTALKER)); + filter2.add(new SubtypePredicate(SubType.SWAMP)); + } + + public ReturnOfTheNightstalkersEffect() { + super(Outcome.PutCreatureInPlay); + staticText = "Return all Nightstalker permanent cards from your graveyard to the battlefield. Then destroy all Swamps you control."; + } + + public ReturnOfTheNightstalkersEffect(final ReturnOfTheNightstalkersEffect effect) { + super(effect); + } + + @Override + public ReturnOfTheNightstalkersEffect copy() { + return new ReturnOfTheNightstalkersEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + for (Card card : player.getGraveyard().getCards(filter1, game)) { + card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), source.getControllerId()); + } + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter2, source.getControllerId(), source.getSourceId(), game)) { + permanent.destroy(source.getSourceId(), game, false); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/r/ReturnedCentaur.java b/Mage.Sets/src/mage/cards/r/ReturnedCentaur.java index 51b779da6a..24811dd1cb 100644 --- a/Mage.Sets/src/mage/cards/r/ReturnedCentaur.java +++ b/Mage.Sets/src/mage/cards/r/ReturnedCentaur.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -45,8 +46,8 @@ public class ReturnedCentaur extends CardImpl { public ReturnedCentaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Centaur"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.CENTAUR); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/ReturnedPhalanx.java b/Mage.Sets/src/mage/cards/r/ReturnedPhalanx.java index 08b4a80f8a..68c869c5e8 100644 --- a/Mage.Sets/src/mage/cards/r/ReturnedPhalanx.java +++ b/Mage.Sets/src/mage/cards/r/ReturnedPhalanx.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class ReturnedPhalanx extends CardImpl { public ReturnedPhalanx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/ReturnedReveler.java b/Mage.Sets/src/mage/cards/r/ReturnedReveler.java index 9e3838137d..10730ee0f1 100644 --- a/Mage.Sets/src/mage/cards/r/ReturnedReveler.java +++ b/Mage.Sets/src/mage/cards/r/ReturnedReveler.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveEachPlayerEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -44,8 +45,8 @@ public class ReturnedReveler extends CardImpl { public ReturnedReveler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Satyr"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.SATYR); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/Reveillark.java b/Mage.Sets/src/mage/cards/r/Reveillark.java index 32588ab989..a63554789d 100644 --- a/Mage.Sets/src/mage/cards/r/Reveillark.java +++ b/Mage.Sets/src/mage/cards/r/Reveillark.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.PowerPredicate; @@ -55,7 +56,7 @@ public class Reveillark extends CardImpl { public Reveillark(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/ReveilleSquad.java b/Mage.Sets/src/mage/cards/r/ReveilleSquad.java new file mode 100644 index 0000000000..fc79bb682b --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/ReveilleSquad.java @@ -0,0 +1,112 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.condition.InvertCondition; +import mage.abilities.condition.common.SourceTappedCondition; +import mage.abilities.effects.common.UntapAllControllerEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author TheElk801 + */ +public class ReveilleSquad extends CardImpl { + + public ReveilleSquad(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever one or more creatures attack you, if Reveille Squad is untapped, you may untap all creatures you control. + this.addAbility(new ReveilleSquadTriggeredAbility()); + } + + public ReveilleSquad(final ReveilleSquad card) { + super(card); + } + + @Override + public ReveilleSquad copy() { + return new ReveilleSquad(this); + } +} + +class ReveilleSquadTriggeredAbility extends TriggeredAbilityImpl { + + public ReveilleSquadTriggeredAbility() { + super(Zone.BATTLEFIELD, new UntapAllControllerEffect(new FilterCreaturePermanent("all creatures you control")), true); + } + + public ReveilleSquadTriggeredAbility(final ReveilleSquadTriggeredAbility ability) { + super(ability); + } + + @Override + public ReveilleSquadTriggeredAbility copy() { + return new ReveilleSquadTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DECLARED_ATTACKERS; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + for (UUID attackerId : game.getCombat().getAttackers()) { + if (game.getCombat().getDefenderId(attackerId).equals(controllerId)) { + return true; + } + } + return false; + } + + @Override + public boolean checkInterveningIfClause(Game game) { + return new InvertCondition(SourceTappedCondition.instance).apply(game, this); + } + + @Override + public String getRule() { + return "Whenever one or more creatures attack you, if {this} is untapped, you may untap all creatures you control."; + } +} diff --git a/Mage.Sets/src/mage/cards/r/RevekaWizardSavant.java b/Mage.Sets/src/mage/cards/r/RevekaWizardSavant.java index c2fd333b40..d136ae69c8 100644 --- a/Mage.Sets/src/mage/cards/r/RevekaWizardSavant.java +++ b/Mage.Sets/src/mage/cards/r/RevekaWizardSavant.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DontUntapInControllersNextUntapStepSourceEf import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -50,8 +51,8 @@ public class RevekaWizardSavant extends CardImpl { public RevekaWizardSavant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dwarf"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RevelInRiches.java b/Mage.Sets/src/mage/cards/r/RevelInRiches.java new file mode 100644 index 0000000000..3e757cb225 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RevelInRiches.java @@ -0,0 +1,85 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.WinGameSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.permanent.token.TreasureToken; + +/** + * + * @author TheElk801 + */ +public class RevelInRiches extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature an opponent controls"); + private static final FilterPermanent filter2 = new FilterPermanent("Treasures"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + filter2.add(new SubtypePredicate(SubType.TREASURE)); + } + + public RevelInRiches(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{B}"); + + // Whenever a creature an opponent controls dies, create a colorless Treasure artifact token with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool." + this.addAbility(new DiesCreatureTriggeredAbility(new CreateTokenEffect(new TreasureToken("XLN")), false, filter)); + // At the beginning of your upkeep, if you control ten or more Treasures, you win the game. + TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false); + this.addAbility(new ConditionalTriggeredAbility( + ability, + new PermanentsOnTheBattlefieldCondition(filter2, ComparisonType.MORE_THAN, 9), + "At the beginning of your upkeep, if you control ten or more Treasures, you win the game.")); + } + + public RevelInRiches(final RevelInRiches card) { + super(card); + } + + @Override + public RevelInRiches copy() { + return new RevelInRiches(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/Revenant.java b/Mage.Sets/src/mage/cards/r/Revenant.java index a5945770d3..8e71077c7c 100644 --- a/Mage.Sets/src/mage/cards/r/Revenant.java +++ b/Mage.Sets/src/mage/cards/r/Revenant.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -48,7 +49,7 @@ public class Revenant extends CardImpl { public Revenant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/r/RevenantPatriarch.java b/Mage.Sets/src/mage/cards/r/RevenantPatriarch.java index 822aa0ded7..6da1d4c782 100644 --- a/Mage.Sets/src/mage/cards/r/RevenantPatriarch.java +++ b/Mage.Sets/src/mage/cards/r/RevenantPatriarch.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.SkipNextCombatEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.target.TargetPlayer; import mage.watchers.common.ManaSpentToCastWatcher; @@ -50,7 +51,7 @@ public class RevenantPatriarch extends CardImpl { public RevenantPatriarch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/Revenge.java b/Mage.Sets/src/mage/cards/r/Revenge.java index 146b8ea231..bdcb225bf4 100644 --- a/Mage.Sets/src/mage/cards/r/Revenge.java +++ b/Mage.Sets/src/mage/cards/r/Revenge.java @@ -1,129 +1,129 @@ -/* - * 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.cards.r; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalOneShotEffect; -import mage.abilities.effects.ContinuousEffect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.FightTargetsEffect; -import mage.abilities.effects.common.continuous.BoostTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetOpponentsCreaturePermanent; -import mage.target.targetpointer.FixedTarget; -import mage.watchers.common.PlayerLostLifeWatcher; - -/** - * - * @author Styxo - */ -public class Revenge extends CardImpl { - - public Revenge(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); - - // Target creature you control gets +4/+0 until end of turn before it fights if you lost life this turn. - this.getSpellAbility().addEffect(new ConditionalOneShotEffect( - new RevengeEffect(), - LostLifeCondition.instance, - "Target creature you control gets +4/+0 until end of turn before it fights if you lost life this turn")); - - // Target creature you control fights target creature an opponent controls. - this.getSpellAbility().addEffect(new FightTargetsEffect()); - this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); - this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent()); - - this.getSpellAbility().addWatcher(new PlayerLostLifeWatcher()); - - } - - public Revenge(final Revenge card) { - super(card); - } - - @Override - public Revenge copy() { - return new Revenge(this); - } -} - -enum LostLifeCondition implements Condition { - - instance; - - - @Override - public boolean apply(Game game, Ability source) { - PlayerLostLifeWatcher watcher = (PlayerLostLifeWatcher) game.getState().getWatchers().get(PlayerLostLifeWatcher.class.getSimpleName()); - UUID player = source.getControllerId(); - if (watcher != null && player != null) { - return watcher.getLiveLost(player) > 0; - } - return false; - } - -} - -class RevengeEffect extends OneShotEffect { - - public RevengeEffect() { - super(Outcome.BoostCreature); - } - - public RevengeEffect(final RevengeEffect effect) { - super(effect); - } - - @Override - public RevengeEffect copy() { - return new RevengeEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent target = game.getPermanent(targetPointer.getFirst(game, source)); - if (target != null && target.isCreature()) { - ContinuousEffect effect = new BoostTargetEffect(4, 0, Duration.EndOfTurn); - effect.setTargetPointer(new FixedTarget(target.getId())); - game.addEffect(effect, source); - return true; - } - - return false; - } - -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.FightTargetsEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetOpponentsCreaturePermanent; +import mage.target.targetpointer.FixedTarget; +import mage.watchers.common.PlayerLostLifeWatcher; + +/** + * + * @author Styxo + */ +public class Revenge extends CardImpl { + + public Revenge(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); + + // Target creature you control gets +4/+0 until end of turn before it fights if you lost life this turn. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new RevengeEffect(), + LostLifeCondition.instance, + "Target creature you control gets +4/+0 until end of turn before it fights if you lost life this turn")); + + // Target creature you control fights target creature an opponent controls. + this.getSpellAbility().addEffect(new FightTargetsEffect()); + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent()); + + this.getSpellAbility().addWatcher(new PlayerLostLifeWatcher()); + + } + + public Revenge(final Revenge card) { + super(card); + } + + @Override + public Revenge copy() { + return new Revenge(this); + } +} + +enum LostLifeCondition implements Condition { + + instance; + + + @Override + public boolean apply(Game game, Ability source) { + PlayerLostLifeWatcher watcher = (PlayerLostLifeWatcher) game.getState().getWatchers().get(PlayerLostLifeWatcher.class.getSimpleName()); + UUID player = source.getControllerId(); + if (watcher != null && player != null) { + return watcher.getLiveLost(player) > 0; + } + return false; + } + +} + +class RevengeEffect extends OneShotEffect { + + public RevengeEffect() { + super(Outcome.BoostCreature); + } + + public RevengeEffect(final RevengeEffect effect) { + super(effect); + } + + @Override + public RevengeEffect copy() { + return new RevengeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent target = game.getPermanent(targetPointer.getFirst(game, source)); + if (target != null && target.isCreature()) { + ContinuousEffect effect = new BoostTargetEffect(4, 0, Duration.EndOfTurn); + effect.setTargetPointer(new FixedTarget(target.getId())); + game.addEffect(effect, source); + return true; + } + + return false; + } + +} diff --git a/Mage.Sets/src/mage/cards/r/ReveredDead.java b/Mage.Sets/src/mage/cards/r/ReveredDead.java index 385442cabb..9448d19ea3 100644 --- a/Mage.Sets/src/mage/cards/r/ReveredDead.java +++ b/Mage.Sets/src/mage/cards/r/ReveredDead.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class ReveredDead extends CardImpl { public ReveredDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Spirit"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/ReveredUnicorn.java b/Mage.Sets/src/mage/cards/r/ReveredUnicorn.java index 35a7bc71e0..91265345ea 100644 --- a/Mage.Sets/src/mage/cards/r/ReveredUnicorn.java +++ b/Mage.Sets/src/mage/cards/r/ReveredUnicorn.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.CumulativeUpkeepAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -47,7 +48,7 @@ public class ReveredUnicorn extends CardImpl { public ReveredUnicorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Unicorn"); + this.subtype.add(SubType.UNICORN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/ReverentHunter.java b/Mage.Sets/src/mage/cards/r/ReverentHunter.java index 046a983e93..8078c6828a 100644 --- a/Mage.Sets/src/mage/cards/r/ReverentHunter.java +++ b/Mage.Sets/src/mage/cards/r/ReverentHunter.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.counters.CounterType; @@ -46,8 +47,8 @@ public class ReverentHunter extends CardImpl { public ReverentHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RevokePrivileges.java b/Mage.Sets/src/mage/cards/r/RevokePrivileges.java index 935ba0cb6d..6eb42b4915 100644 --- a/Mage.Sets/src/mage/cards/r/RevokePrivileges.java +++ b/Mage.Sets/src/mage/cards/r/RevokePrivileges.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class RevokePrivileges extends CardImpl { public RevokePrivileges(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature. TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/r/RewardTheFaithful.java b/Mage.Sets/src/mage/cards/r/RewardTheFaithful.java index a41add973c..46eafe8f82 100644 --- a/Mage.Sets/src/mage/cards/r/RewardTheFaithful.java +++ b/Mage.Sets/src/mage/cards/r/RewardTheFaithful.java @@ -42,10 +42,11 @@ import mage.target.TargetPlayer; public class RewardTheFaithful extends CardImpl { public RewardTheFaithful(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); // Any number of target players each gain life equal to the highest converted mana cost among permanents you control. - this.getSpellAbility().addEffect(new GainLifeTargetEffect(new HighestConvertedManaCostValue())); + this.getSpellAbility().addEffect(new GainLifeTargetEffect(new HighestConvertedManaCostValue()) + .setText("Any number of target players each gain life equal to the highest converted mana cost among permanents you control.")); this.getSpellAbility().addTarget(new TargetPlayer(0, Integer.MAX_VALUE, false)); } diff --git a/Mage.Sets/src/mage/cards/r/RewardsOfDiversity.java b/Mage.Sets/src/mage/cards/r/RewardsOfDiversity.java index bfda5d16f0..48c4854bb8 100644 --- a/Mage.Sets/src/mage/cards/r/RewardsOfDiversity.java +++ b/Mage.Sets/src/mage/cards/r/RewardsOfDiversity.java @@ -44,7 +44,7 @@ import mage.filter.predicate.permanent.ControllerPredicate; */ public class RewardsOfDiversity extends CardImpl { - private static final FilterSpell filter = new FilterSpell("multicolored spell"); + private static final FilterSpell filter = new FilterSpell("a multicolored spell"); static { filter.add(new ControllerPredicate(TargetController.OPPONENT)); @@ -52,7 +52,7 @@ public class RewardsOfDiversity extends CardImpl { } public RewardsOfDiversity(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); // Whenever an opponent casts a multicolored spell, you gain 4 life. this.addAbility(new SpellCastOpponentTriggeredAbility(new GainLifeEffect(4), filter, false)); diff --git a/Mage.Sets/src/mage/cards/r/ReyaDawnbringer.java b/Mage.Sets/src/mage/cards/r/ReyaDawnbringer.java index 2ba800d0b6..55826ca3cd 100644 --- a/Mage.Sets/src/mage/cards/r/ReyaDawnbringer.java +++ b/Mage.Sets/src/mage/cards/r/ReyaDawnbringer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.filter.common.FilterCreatureCard; @@ -50,7 +51,7 @@ public class ReyaDawnbringer extends CardImpl { public ReyaDawnbringer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{W}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/r/ReyhanLastOfTheAbzan.java b/Mage.Sets/src/mage/cards/r/ReyhanLastOfTheAbzan.java index 2357b75e80..90329f64a9 100644 --- a/Mage.Sets/src/mage/cards/r/ReyhanLastOfTheAbzan.java +++ b/Mage.Sets/src/mage/cards/r/ReyhanLastOfTheAbzan.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.PartnerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.counters.CounterType; @@ -58,8 +59,8 @@ public class ReyhanLastOfTheAbzan extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/r/RhetCropSpearmaster.java b/Mage.Sets/src/mage/cards/r/RhetCropSpearmaster.java index c49498febc..7953a1e34c 100644 --- a/Mage.Sets/src/mage/cards/r/RhetCropSpearmaster.java +++ b/Mage.Sets/src/mage/cards/r/RhetCropSpearmaster.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -49,8 +50,8 @@ public class RhetCropSpearmaster extends CardImpl { public RhetCropSpearmaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RhonasTheIndomitable.java b/Mage.Sets/src/mage/cards/r/RhonasTheIndomitable.java index 1551f78ad7..b698639528 100644 --- a/Mage.Sets/src/mage/cards/r/RhonasTheIndomitable.java +++ b/Mage.Sets/src/mage/cards/r/RhonasTheIndomitable.java @@ -67,7 +67,7 @@ public class RhonasTheIndomitable extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RhonassStalwart.java b/Mage.Sets/src/mage/cards/r/RhonassStalwart.java index 16365cefbf..3dc348ece8 100644 --- a/Mage.Sets/src/mage/cards/r/RhonassStalwart.java +++ b/Mage.Sets/src/mage/cards/r/RhonassStalwart.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ExertAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; @@ -57,8 +58,8 @@ public class RhonassStalwart extends CardImpl { public RhonassStalwart(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/Rhox.java b/Mage.Sets/src/mage/cards/r/Rhox.java index 31ff2dda84..ac3a562971 100644 --- a/Mage.Sets/src/mage/cards/r/Rhox.java +++ b/Mage.Sets/src/mage/cards/r/Rhox.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class Rhox extends CardImpl { public Rhox(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Rhino"); - this.subtype.add("Beast"); + this.subtype.add(SubType.RHINO); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RhoxBodyguard.java b/Mage.Sets/src/mage/cards/r/RhoxBodyguard.java index 213a95567c..ac7756073f 100644 --- a/Mage.Sets/src/mage/cards/r/RhoxBodyguard.java +++ b/Mage.Sets/src/mage/cards/r/RhoxBodyguard.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ExaltedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,9 +48,9 @@ public class RhoxBodyguard extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{W}"); - this.subtype.add("Rhino"); - this.subtype.add("Monk"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.RHINO); + this.subtype.add(SubType.MONK); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); this.addAbility(new ExaltedAbility()); diff --git a/Mage.Sets/src/mage/cards/r/RhoxBrute.java b/Mage.Sets/src/mage/cards/r/RhoxBrute.java index 535d509771..ab5ea1b968 100644 --- a/Mage.Sets/src/mage/cards/r/RhoxBrute.java +++ b/Mage.Sets/src/mage/cards/r/RhoxBrute.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class RhoxBrute extends CardImpl { public RhoxBrute (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}"); - this.subtype.add("Rhino"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.RHINO); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RhoxCharger.java b/Mage.Sets/src/mage/cards/r/RhoxCharger.java index 777acad811..cfc9535213 100644 --- a/Mage.Sets/src/mage/cards/r/RhoxCharger.java +++ b/Mage.Sets/src/mage/cards/r/RhoxCharger.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class RhoxCharger extends CardImpl { public RhoxCharger (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Rhino"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.RHINO); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RhoxFaithmender.java b/Mage.Sets/src/mage/cards/r/RhoxFaithmender.java index 1cd0c92ad9..c071d9de8a 100644 --- a/Mage.Sets/src/mage/cards/r/RhoxFaithmender.java +++ b/Mage.Sets/src/mage/cards/r/RhoxFaithmender.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class RhoxFaithmender extends CardImpl { public RhoxFaithmender(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Rhino"); - this.subtype.add("Monk"); + this.subtype.add(SubType.RHINO); + this.subtype.add(SubType.MONK); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RhoxMaulers.java b/Mage.Sets/src/mage/cards/r/RhoxMaulers.java index 0705c3ae36..c50e28cb61 100644 --- a/Mage.Sets/src/mage/cards/r/RhoxMaulers.java +++ b/Mage.Sets/src/mage/cards/r/RhoxMaulers.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class RhoxMaulers extends CardImpl { public RhoxMaulers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Rhino"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.RHINO); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RhoxMeditant.java b/Mage.Sets/src/mage/cards/r/RhoxMeditant.java index 5958e14557..fddfa62966 100644 --- a/Mage.Sets/src/mage/cards/r/RhoxMeditant.java +++ b/Mage.Sets/src/mage/cards/r/RhoxMeditant.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,8 +58,8 @@ public class RhoxMeditant extends CardImpl { public RhoxMeditant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Rhino"); - this.subtype.add("Monk"); + this.subtype.add(SubType.RHINO); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RhoxPikemaster.java b/Mage.Sets/src/mage/cards/r/RhoxPikemaster.java index adc09ea036..a2d4e81a44 100644 --- a/Mage.Sets/src/mage/cards/r/RhoxPikemaster.java +++ b/Mage.Sets/src/mage/cards/r/RhoxPikemaster.java @@ -57,8 +57,8 @@ public class RhoxPikemaster extends CardImpl { public RhoxPikemaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Rhino"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.RHINO); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); this.addAbility(FirstStrikeAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/r/RhoxWarMonk.java b/Mage.Sets/src/mage/cards/r/RhoxWarMonk.java index 66ba85250f..295e7907f4 100644 --- a/Mage.Sets/src/mage/cards/r/RhoxWarMonk.java +++ b/Mage.Sets/src/mage/cards/r/RhoxWarMonk.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class RhoxWarMonk extends CardImpl { public RhoxWarMonk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}{U}"); - this.subtype.add("Rhino"); - this.subtype.add("Monk"); + this.subtype.add(SubType.RHINO); + this.subtype.add(SubType.MONK); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RhysTheExiled.java b/Mage.Sets/src/mage/cards/r/RhysTheExiled.java index a8a9cf4e65..be4a92f39c 100644 --- a/Mage.Sets/src/mage/cards/r/RhysTheExiled.java +++ b/Mage.Sets/src/mage/cards/r/RhysTheExiled.java @@ -60,8 +60,8 @@ public class RhysTheExiled extends CardImpl { public RhysTheExiled(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RhysTheRedeemed.java b/Mage.Sets/src/mage/cards/r/RhysTheRedeemed.java index e5e11655e6..56d40c4b4c 100644 --- a/Mage.Sets/src/mage/cards/r/RhysTheRedeemed.java +++ b/Mage.Sets/src/mage/cards/r/RhysTheRedeemed.java @@ -35,10 +35,11 @@ import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class RhysTheRedeemed extends CardImpl { public RhysTheRedeemed(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G/W}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -117,7 +118,7 @@ class RhysTheRedeemedEffect extends OneShotEffect { if (controller != null) { for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, game)) { if (permanent.getControllerId().equals(source.getControllerId())) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(); effect.setTargetPointer(new FixedTarget(permanent, game)); effect.apply(game, source); } diff --git a/Mage.Sets/src/mage/cards/r/RibCageSpider.java b/Mage.Sets/src/mage/cards/r/RibCageSpider.java index 8054a430e4..6e9af6f47a 100644 --- a/Mage.Sets/src/mage/cards/r/RibCageSpider.java +++ b/Mage.Sets/src/mage/cards/r/RibCageSpider.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class RibCageSpider extends CardImpl { public RibCageSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RibbonSnake.java b/Mage.Sets/src/mage/cards/r/RibbonSnake.java index ffaf3e5c6c..bed400e4eb 100644 --- a/Mage.Sets/src/mage/cards/r/RibbonSnake.java +++ b/Mage.Sets/src/mage/cards/r/RibbonSnake.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class RibbonSnake extends CardImpl { public RibbonSnake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RibbonsOfTheReikai.java b/Mage.Sets/src/mage/cards/r/RibbonsOfTheReikai.java index 06cd510bba..eb58a68428 100644 --- a/Mage.Sets/src/mage/cards/r/RibbonsOfTheReikai.java +++ b/Mage.Sets/src/mage/cards/r/RibbonsOfTheReikai.java @@ -51,7 +51,7 @@ public class RibbonsOfTheReikai extends CardImpl { public RibbonsOfTheReikai(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Draw a card for each Spirit you control. diff --git a/Mage.Sets/src/mage/cards/r/Riddleform.java b/Mage.Sets/src/mage/cards/r/Riddleform.java index 08799de5c0..f00e2e3cf4 100644 --- a/Mage.Sets/src/mage/cards/r/Riddleform.java +++ b/Mage.Sets/src/mage/cards/r/Riddleform.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterSpell; @@ -88,7 +89,7 @@ class RiddleformToken extends Token { super("", "3/3 Sphinx creature with flying"); cardType.add(CardType.CREATURE); - subtype.add("Sphinx"); + subtype.add(SubType.SPHINX); power = new MageInt(3); toughness = new MageInt(3); addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/r/Riddlekeeper.java b/Mage.Sets/src/mage/cards/r/Riddlekeeper.java index 02e9b1d5cd..47effac046 100644 --- a/Mage.Sets/src/mage/cards/r/Riddlekeeper.java +++ b/Mage.Sets/src/mage/cards/r/Riddlekeeper.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SetTargetPointer; import mage.filter.StaticFilters; @@ -47,7 +48,7 @@ public class Riddlekeeper extends CardImpl { public Riddlekeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Homunculus"); + this.subtype.add(SubType.HOMUNCULUS); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/Riddlesmith.java b/Mage.Sets/src/mage/cards/r/Riddlesmith.java index 8ae0af7d55..8e42352f47 100644 --- a/Mage.Sets/src/mage/cards/r/Riddlesmith.java +++ b/Mage.Sets/src/mage/cards/r/Riddlesmith.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterArtifactSpell; /** @@ -44,8 +45,8 @@ import mage.filter.common.FilterArtifactSpell; public class Riddlesmith extends CardImpl { public Riddlesmith (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RidersOfGavony.java b/Mage.Sets/src/mage/cards/r/RidersOfGavony.java index c5702049b0..263429b2f0 100644 --- a/Mage.Sets/src/mage/cards/r/RidersOfGavony.java +++ b/Mage.Sets/src/mage/cards/r/RidersOfGavony.java @@ -53,8 +53,8 @@ public class RidersOfGavony extends CardImpl { public RidersOfGavony(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RidgeRannet.java b/Mage.Sets/src/mage/cards/r/RidgeRannet.java index 865bd3a736..53107ff11c 100644 --- a/Mage.Sets/src/mage/cards/r/RidgeRannet.java +++ b/Mage.Sets/src/mage/cards/r/RidgeRannet.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class RidgeRannet extends CardImpl { public RidgeRannet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RidgedKusite.java b/Mage.Sets/src/mage/cards/r/RidgedKusite.java index 6b2365e69d..22596f3068 100644 --- a/Mage.Sets/src/mage/cards/r/RidgedKusite.java +++ b/Mage.Sets/src/mage/cards/r/RidgedKusite.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -53,8 +54,8 @@ public class RidgedKusite extends CardImpl { public RidgedKusite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Horror"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HORROR); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RidgelineRager.java b/Mage.Sets/src/mage/cards/r/RidgelineRager.java index 1eefcff397..f116b0a7de 100644 --- a/Mage.Sets/src/mage/cards/r/RidgelineRager.java +++ b/Mage.Sets/src/mage/cards/r/RidgelineRager.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class RidgelineRager extends CardImpl { public RidgelineRager(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RidgescaleTusker.java b/Mage.Sets/src/mage/cards/r/RidgescaleTusker.java index 943ad99e46..6d25e20cab 100644 --- a/Mage.Sets/src/mage/cards/r/RidgescaleTusker.java +++ b/Mage.Sets/src/mage/cards/r/RidgescaleTusker.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -53,7 +54,7 @@ public class RidgescaleTusker extends CardImpl { public RidgescaleTusker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RidgetopRaptor.java b/Mage.Sets/src/mage/cards/r/RidgetopRaptor.java index 78094359aa..5c3be5f1fd 100644 --- a/Mage.Sets/src/mage/cards/r/RidgetopRaptor.java +++ b/Mage.Sets/src/mage/cards/r/RidgetopRaptor.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,9 +42,9 @@ import mage.constants.CardType; public class RidgetopRaptor extends CardImpl { public RidgetopRaptor(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Lizard"); - this.subtype.add("Beast"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.subtype.add(SubType.DINOSAUR); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RidingRonto.java b/Mage.Sets/src/mage/cards/r/RidingRonto.java index 1668f0bdd9..6ba09ec8d4 100644 --- a/Mage.Sets/src/mage/cards/r/RidingRonto.java +++ b/Mage.Sets/src/mage/cards/r/RidingRonto.java @@ -1,76 +1,77 @@ -/* - * 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.cards.r; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.condition.common.MonstrousCondition; -import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; -import mage.abilities.keyword.MonstrosityAbility; -import mage.abilities.keyword.VigilanceAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; - -/** - * - * @author Styxo - */ -public class RidingRonto extends CardImpl { - - public RidingRonto(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Beast"); - this.power = new MageInt(2); - this.toughness = new MageInt(4); - - // {3}{W}{W}: Monstrosity 2. - this.addAbility(new MonstrosityAbility("{3}{W}{W}", 3)); - - // As long as Riding Ronto is monstrous, it has vigilance - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( - new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield), - MonstrousCondition.instance, - "As long as Riding Ronto is monstrous, it has vigilance") - )); - - } - - public RidingRonto(final RidingRonto card) { - super(card); - } - - @Override - public RidingRonto copy() { - return new RidingRonto(this); - } -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.MonstrousCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.MonstrosityAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author Styxo + */ +public class RidingRonto extends CardImpl { + + public RidingRonto(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.subtype.add(SubType.BEAST); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // {3}{W}{W}: Monstrosity 2. + this.addAbility(new MonstrosityAbility("{3}{W}{W}", 3)); + + // As long as Riding Ronto is monstrous, it has vigilance + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield), + MonstrousCondition.instance, + "As long as Riding Ronto is monstrous, it has vigilance") + )); + + } + + public RidingRonto(final RidingRonto card) { + super(card); + } + + @Override + public RidingRonto copy() { + return new RidingRonto(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RiftElemental.java b/Mage.Sets/src/mage/cards/r/RiftElemental.java index a9b128646c..bb16f5cc6d 100644 --- a/Mage.Sets/src/mage/cards/r/RiftElemental.java +++ b/Mage.Sets/src/mage/cards/r/RiftElemental.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -62,7 +63,7 @@ public class RiftElemental extends CardImpl { public RiftElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RiftmarkedKnight.java b/Mage.Sets/src/mage/cards/r/RiftmarkedKnight.java index ff93db646c..f4d2fa19f7 100644 --- a/Mage.Sets/src/mage/cards/r/RiftmarkedKnight.java +++ b/Mage.Sets/src/mage/cards/r/RiftmarkedKnight.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -55,9 +56,9 @@ public class RiftmarkedKnight extends CardImpl { public RiftmarkedKnight(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/Riftsweeper.java b/Mage.Sets/src/mage/cards/r/Riftsweeper.java index 04b0a1da38..36d8ecc8a5 100644 --- a/Mage.Sets/src/mage/cards/r/Riftsweeper.java +++ b/Mage.Sets/src/mage/cards/r/Riftsweeper.java @@ -36,6 +36,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -57,8 +58,8 @@ public class Riftsweeper extends CardImpl { public Riftsweeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RiftwingCloudskate.java b/Mage.Sets/src/mage/cards/r/RiftwingCloudskate.java index 87fd2b7439..9cc877355e 100644 --- a/Mage.Sets/src/mage/cards/r/RiftwingCloudskate.java +++ b/Mage.Sets/src/mage/cards/r/RiftwingCloudskate.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPermanent; /** @@ -48,7 +49,7 @@ public class RiftwingCloudskate extends CardImpl { public RiftwingCloudskate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RiggingRunner.java b/Mage.Sets/src/mage/cards/r/RiggingRunner.java new file mode 100644 index 0000000000..b60adefa57 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RiggingRunner.java @@ -0,0 +1,76 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * + * @author LevelX2 + */ +public class RiggingRunner extends CardImpl { + + public RiggingRunner(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); + + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // Raid — Rigging Runner enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1), false), + RaidCondition.instance, + "Raid — {this} enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn.", + "{this} enters the battlefield with a +1/+1 counter"), + new PlayerAttackedWatcher()); + } + + public RiggingRunner(final RiggingRunner card) { + super(card); + } + + @Override + public RiggingRunner copy() { + return new RiggingRunner(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RighteousAuthority.java b/Mage.Sets/src/mage/cards/r/RighteousAuthority.java index cd533b24fc..50dbc5049f 100644 --- a/Mage.Sets/src/mage/cards/r/RighteousAuthority.java +++ b/Mage.Sets/src/mage/cards/r/RighteousAuthority.java @@ -55,7 +55,7 @@ public class RighteousAuthority extends CardImpl { public RighteousAuthority (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); diff --git a/Mage.Sets/src/mage/cards/r/RighteousAvengers.java b/Mage.Sets/src/mage/cards/r/RighteousAvengers.java index 8e9f248c8b..59fb992a10 100644 --- a/Mage.Sets/src/mage/cards/r/RighteousAvengers.java +++ b/Mage.Sets/src/mage/cards/r/RighteousAvengers.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.PlainswalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class RighteousAvengers extends CardImpl { public RighteousAvengers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RikuOfTwoReflections.java b/Mage.Sets/src/mage/cards/r/RikuOfTwoReflections.java index f2cdde3f9d..78b85688e7 100644 --- a/Mage.Sets/src/mage/cards/r/RikuOfTwoReflections.java +++ b/Mage.Sets/src/mage/cards/r/RikuOfTwoReflections.java @@ -35,10 +35,11 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CopyTargetSpellEffect; import mage.abilities.effects.common.DoIfCostPaid; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SetTargetPointer; import mage.constants.SuperType; import mage.constants.Zone; @@ -70,19 +71,19 @@ public class RikuOfTwoReflections extends CardImpl { public RikuOfTwoReflections(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); // Whenever you cast an instant or sorcery spell, you may pay {U}{R}. If you do, copy that spell. You may choose new targets for the copy. - Effect effect = new CopyTargetSpellEffect(); + Effect effect = new CopyTargetSpellEffect(true); effect.setText("copy that spell. You may choose new targets for the copy"); this.addAbility(new SpellCastControllerTriggeredAbility(new DoIfCostPaid(effect, new ManaCostsImpl("{U}{R}")), filter, false, true)); // Whenever another nontoken creature enters the battlefield under your control, you may pay {G}{U}. If you do, create a token that's a copy of that creature. - effect = new DoIfCostPaid(new PutTokenOntoBattlefieldCopyTargetEffect(true), + effect = new DoIfCostPaid(new CreateTokenCopyTargetEffect(true), new ManaCostsImpl("{G}{U}"), "Create a token that's a copy of that creature?"); effect.setText("you may pay {G}{U}. If you do, create a token that's a copy of that creature"); this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, effect, filterPermanent, false, SetTargetPointer.PERMANENT, null)); diff --git a/Mage.Sets/src/mage/cards/r/Rile.java b/Mage.Sets/src/mage/cards/r/Rile.java new file mode 100644 index 0000000000..e88eba205d --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/Rile.java @@ -0,0 +1,67 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class Rile extends CardImpl { + + public Rile(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{R}"); + + // Rile deals 1 damage to target creature you control. That creature gains trample until end of turn. + this.getSpellAbility().addEffect(new DamageTargetEffect(1)); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn) + .setText("That creature gains trample until end of turn")); + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).setText("

Draw a card")); + } + + public Rile(final Rile card) { + super(card); + } + + @Override + public Rile copy() { + return new Rile(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RimeDryad.java b/Mage.Sets/src/mage/cards/r/RimeDryad.java index c8d0c68ae0..d3bc22debf 100644 --- a/Mage.Sets/src/mage/cards/r/RimeDryad.java +++ b/Mage.Sets/src/mage/cards/r/RimeDryad.java @@ -54,7 +54,7 @@ public class RimeDryad extends CardImpl { public RimeDryad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Dryad"); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RimeTransfusion.java b/Mage.Sets/src/mage/cards/r/RimeTransfusion.java index 3d78a9c2b8..e47d318846 100644 --- a/Mage.Sets/src/mage/cards/r/RimeTransfusion.java +++ b/Mage.Sets/src/mage/cards/r/RimeTransfusion.java @@ -65,7 +65,7 @@ public class RimeTransfusion extends CardImpl { public RimeTransfusion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); addSuperType(SuperType.SNOW); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/r/RimeboundDead.java b/Mage.Sets/src/mage/cards/r/RimeboundDead.java index 6aaa7f94f7..70b726a08e 100644 --- a/Mage.Sets/src/mage/cards/r/RimeboundDead.java +++ b/Mage.Sets/src/mage/cards/r/RimeboundDead.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class RimeboundDead extends CardImpl { public RimeboundDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); addSuperType(SuperType.SNOW); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RimefeatherOwl.java b/Mage.Sets/src/mage/cards/r/RimefeatherOwl.java new file mode 100644 index 0000000000..0ffb468b39 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RimefeatherOwl.java @@ -0,0 +1,145 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.filter.predicate.permanent.CounterPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public class RimefeatherOwl extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Permanents with ice counters on them"); + private static final FilterPermanent filter2 = new FilterPermanent("snow permanents on the battlefield"); + + static { + filter.add(Predicates.not(new CounterPredicate(CounterType.ICE))); + filter2.add(Predicates.not(new SupertypePredicate(SuperType.SNOW))); + } + + public RimefeatherOwl(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}"); + + this.addSuperType(SuperType.SNOW); + this.subtype.add(SubType.BIRD); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Rimefeather Owl's power and toughness are each equal to the number of snow permanents on the battlefield. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter2), Duration.EndOfGame))); + + // {1}{snow}: Put an ice counter on target permanent. + Ability ability = new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new AddCountersTargetEffect(CounterType.ICE.createInstance()) + .setText("Put an ice counter on target permanent."), + new ManaCostsImpl("{1}{S}") + ); + ability.addTarget(new TargetPermanent()); + this.addAbility(ability); + + // Permanents with ice counters on them are snow. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new RimefeatherOwlEffect(Duration.WhileOnBattlefield, filter))); + } + + public RimefeatherOwl(final RimefeatherOwl card) { + super(card); + } + + @Override + public RimefeatherOwl copy() { + return new RimefeatherOwl(this); + } +} + +class RimefeatherOwlEffect extends ContinuousEffectImpl { + + private final FilterPermanent filter; + + public RimefeatherOwlEffect(Duration duration, FilterPermanent filter) { + super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Detriment); + this.filter = filter; + } + + public RimefeatherOwlEffect(final RimefeatherOwlEffect effect) { + super(effect); + this.filter = effect.filter; + } + + @Override + public RimefeatherOwlEffect copy() { + return new RimefeatherOwlEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { + permanent.addSuperType(SuperType.SNOW); + + } + return true; + } + + @Override + public String getText(Mode mode) { + return "Permanents with ice counters on them are snow."; + } +} diff --git a/Mage.Sets/src/mage/cards/r/RimewindCryomancer.java b/Mage.Sets/src/mage/cards/r/RimewindCryomancer.java index e1b93470ae..d2facdb20a 100644 --- a/Mage.Sets/src/mage/cards/r/RimewindCryomancer.java +++ b/Mage.Sets/src/mage/cards/r/RimewindCryomancer.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.SuperType; import mage.constants.Zone; @@ -59,8 +60,8 @@ public class RimewindCryomancer extends CardImpl { public RimewindCryomancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RimewindTaskmage.java b/Mage.Sets/src/mage/cards/r/RimewindTaskmage.java index 506ee90eb9..04960c0ddd 100644 --- a/Mage.Sets/src/mage/cards/r/RimewindTaskmage.java +++ b/Mage.Sets/src/mage/cards/r/RimewindTaskmage.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.MayTapOrUntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.SuperType; import mage.constants.Zone; @@ -59,8 +60,8 @@ public class RimewindTaskmage extends CardImpl { public RimewindTaskmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RingOfEvosIsle.java b/Mage.Sets/src/mage/cards/r/RingOfEvosIsle.java index 6833659a89..ebbe98ec38 100644 --- a/Mage.Sets/src/mage/cards/r/RingOfEvosIsle.java +++ b/Mage.Sets/src/mage/cards/r/RingOfEvosIsle.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -64,7 +65,7 @@ public class RingOfEvosIsle extends CardImpl { public RingOfEvosIsle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // {2}: Equipped creature gains hexproof until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(HexproofAbility.getInstance(), AttachmentType.EQUIPMENT, Duration.EndOfTurn), new GenericManaCost(2))); diff --git a/Mage.Sets/src/mage/cards/r/RingOfKalonia.java b/Mage.Sets/src/mage/cards/r/RingOfKalonia.java index 7e7576cb24..07d42645d2 100644 --- a/Mage.Sets/src/mage/cards/r/RingOfKalonia.java +++ b/Mage.Sets/src/mage/cards/r/RingOfKalonia.java @@ -59,7 +59,7 @@ public class RingOfKalonia extends CardImpl { public RingOfKalonia(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has trample. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/r/RingOfMaruf.java b/Mage.Sets/src/mage/cards/r/RingOfMaruf.java new file mode 100644 index 0000000000..d4a0ea12a6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RingOfMaruf.java @@ -0,0 +1,111 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.WishEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.players.Player; + +/** + * + * @author L_J + */ +public class RingOfMaruf extends CardImpl { + + public RingOfMaruf(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{5}"); + + // {5}, {Tap}, Exile Ring of Maruf: The next time you would draw a card this turn, instead choose a card you own from outside the game and put it into your hand. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RingOfMarufEffect(), new ManaCostsImpl("{5}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new ExileSourceCost()); + this.addAbility(ability); + } + + public RingOfMaruf(final RingOfMaruf card) { + super(card); + } + + @Override + public RingOfMaruf copy() { + return new RingOfMaruf(this); + } +} + +class RingOfMarufEffect extends ReplacementEffectImpl { + + public RingOfMarufEffect() { + super(Duration.EndOfTurn, Outcome.Benefit); + staticText = "The next time you would draw a card this turn, instead choose a card you own from outside the game and put it into your hand."; + } + + public RingOfMarufEffect(final RingOfMarufEffect effect) { + super(effect); + } + + @Override + public RingOfMarufEffect copy() { + return new RingOfMarufEffect(this); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + new WishEffect(new FilterCard(), false).apply(game, source); + this.discard(); + return true; + } + return false; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DRAW_CARD; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + return source.getControllerId().equals(event.getPlayerId()); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RingOfThune.java b/Mage.Sets/src/mage/cards/r/RingOfThune.java index 3b82c33cfa..4ab6d0e01e 100644 --- a/Mage.Sets/src/mage/cards/r/RingOfThune.java +++ b/Mage.Sets/src/mage/cards/r/RingOfThune.java @@ -59,7 +59,7 @@ public class RingOfThune extends CardImpl { public RingOfThune(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has vigilance. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/r/RingOfValkas.java b/Mage.Sets/src/mage/cards/r/RingOfValkas.java index 880da99e6d..6dd1310ffa 100644 --- a/Mage.Sets/src/mage/cards/r/RingOfValkas.java +++ b/Mage.Sets/src/mage/cards/r/RingOfValkas.java @@ -59,7 +59,7 @@ public class RingOfValkas extends CardImpl { public RingOfValkas(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has haste. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(HasteAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/r/RingOfXathrid.java b/Mage.Sets/src/mage/cards/r/RingOfXathrid.java index e03d2af624..a6b5bad060 100644 --- a/Mage.Sets/src/mage/cards/r/RingOfXathrid.java +++ b/Mage.Sets/src/mage/cards/r/RingOfXathrid.java @@ -58,7 +58,7 @@ public class RingOfXathrid extends CardImpl { public RingOfXathrid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // {2}: Regenerate equipped creature. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateAttachedEffect(AttachmentType.EQUIPMENT), new GenericManaCost(2))); diff --git a/Mage.Sets/src/mage/cards/r/Ringskipper.java b/Mage.Sets/src/mage/cards/r/Ringskipper.java index c1cc03a870..e2270af16c 100644 --- a/Mage.Sets/src/mage/cards/r/Ringskipper.java +++ b/Mage.Sets/src/mage/cards/r/Ringskipper.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class Ringskipper extends CardImpl { public Ringskipper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RingwardenOwl.java b/Mage.Sets/src/mage/cards/r/RingwardenOwl.java index 7a0ce68e05..6415ca2de2 100644 --- a/Mage.Sets/src/mage/cards/r/RingwardenOwl.java +++ b/Mage.Sets/src/mage/cards/r/RingwardenOwl.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class RingwardenOwl extends CardImpl { public RingwardenOwl(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RiotDevils.java b/Mage.Sets/src/mage/cards/r/RiotDevils.java index 7e4439a124..2d9edb02f5 100644 --- a/Mage.Sets/src/mage/cards/r/RiotDevils.java +++ b/Mage.Sets/src/mage/cards/r/RiotDevils.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class RiotDevils extends CardImpl { public RiotDevils(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RiotGear.java b/Mage.Sets/src/mage/cards/r/RiotGear.java index 076a6d5c94..8a8de50f56 100644 --- a/Mage.Sets/src/mage/cards/r/RiotGear.java +++ b/Mage.Sets/src/mage/cards/r/RiotGear.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class RiotGear extends CardImpl { public RiotGear(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 2))); diff --git a/Mage.Sets/src/mage/cards/r/RiotPiker.java b/Mage.Sets/src/mage/cards/r/RiotPiker.java index 0e26beefb1..62d977cc92 100644 --- a/Mage.Sets/src/mage/cards/r/RiotPiker.java +++ b/Mage.Sets/src/mage/cards/r/RiotPiker.java @@ -30,11 +30,12 @@ package mage.cards.r; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class RiotPiker extends CardImpl { public RiotPiker (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(2); this.toughness = new MageInt(1); @@ -56,7 +57,7 @@ public class RiotPiker extends CardImpl { this.addAbility(FirstStrikeAbility.getInstance()); // Riot Piker attacks each turn if able - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } diff --git a/Mage.Sets/src/mage/cards/r/RiotRingleader.java b/Mage.Sets/src/mage/cards/r/RiotRingleader.java index cdd304d193..ed50be4a52 100644 --- a/Mage.Sets/src/mage/cards/r/RiotRingleader.java +++ b/Mage.Sets/src/mage/cards/r/RiotRingleader.java @@ -53,8 +53,8 @@ public class RiotRingleader extends CardImpl { public RiotRingleader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RiotSpikes.java b/Mage.Sets/src/mage/cards/r/RiotSpikes.java index 3028b4958b..f4f9f82b75 100644 --- a/Mage.Sets/src/mage/cards/r/RiotSpikes.java +++ b/Mage.Sets/src/mage/cards/r/RiotSpikes.java @@ -47,7 +47,7 @@ public class RiotSpikes extends CardImpl { public RiotSpikes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B/R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/r/RipClanCrasher.java b/Mage.Sets/src/mage/cards/r/RipClanCrasher.java index af723efe8a..581a997999 100644 --- a/Mage.Sets/src/mage/cards/r/RipClanCrasher.java +++ b/Mage.Sets/src/mage/cards/r/RipClanCrasher.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class RipClanCrasher extends CardImpl { public RipClanCrasher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RiparianTiger.java b/Mage.Sets/src/mage/cards/r/RiparianTiger.java index 861b00db31..9cf838f230 100644 --- a/Mage.Sets/src/mage/cards/r/RiparianTiger.java +++ b/Mage.Sets/src/mage/cards/r/RiparianTiger.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -50,7 +51,7 @@ public class RiparianTiger extends CardImpl { public RiparianTiger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RipjawRaptor.java b/Mage.Sets/src/mage/cards/r/RipjawRaptor.java new file mode 100644 index 0000000000..440c6319e3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RipjawRaptor.java @@ -0,0 +1,67 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class RipjawRaptor extends CardImpl { + + public RipjawRaptor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // Enrage — Whenever Ripjaw Raptor is dealt damage, draw a card. + Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), false, true); + this.addAbility(ability); + } + + public RipjawRaptor(final RipjawRaptor card) { + super(card); + } + + @Override + public RipjawRaptor copy() { + return new RipjawRaptor(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RipscalePredator.java b/Mage.Sets/src/mage/cards/r/RipscalePredator.java index afc172951e..1ec9116f57 100644 --- a/Mage.Sets/src/mage/cards/r/RipscalePredator.java +++ b/Mage.Sets/src/mage/cards/r/RipscalePredator.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ import mage.constants.CardType; public class RipscalePredator extends CardImpl { public RipscalePredator(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Lizard"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RiptideBiologist.java b/Mage.Sets/src/mage/cards/r/RiptideBiologist.java index 7c43c9bd35..5508db82cb 100644 --- a/Mage.Sets/src/mage/cards/r/RiptideBiologist.java +++ b/Mage.Sets/src/mage/cards/r/RiptideBiologist.java @@ -53,8 +53,8 @@ public class RiptideBiologist extends CardImpl { public RiptideBiologist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RiptideChimera.java b/Mage.Sets/src/mage/cards/r/RiptideChimera.java index 06f2f9d661..a8cc3869ac 100644 --- a/Mage.Sets/src/mage/cards/r/RiptideChimera.java +++ b/Mage.Sets/src/mage/cards/r/RiptideChimera.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -47,15 +48,14 @@ import mage.filter.predicate.mageobject.CardTypePredicate; public class RiptideChimera extends CardImpl { private static final FilterControlledPermanent filter = new FilterControlledPermanent("an enchantment you control"); - + static { filter.add(new CardTypePredicate(CardType.ENCHANTMENT)); } - - + public RiptideChimera(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{U}"); - this.subtype.add("Chimera"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{U}"); + this.subtype.add(SubType.CHIMERA); this.power = new MageInt(3); this.toughness = new MageInt(4); @@ -64,7 +64,7 @@ public class RiptideChimera extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // At the beginning of your upkeep, return an enchantment you control to its owner's hand. Effect effect = new ReturnToHandChosenControlledPermanentEffect(filter, 1); - effect.setText("return an enchanment you control to its owner's hand"); + effect.setText("return an enchantment you control to its owner's hand"); this.addAbility(new BeginningOfUpkeepTriggeredAbility(effect, TargetController.YOU, false)); } diff --git a/Mage.Sets/src/mage/cards/r/RiptideChronologist.java b/Mage.Sets/src/mage/cards/r/RiptideChronologist.java index 336c13232a..b4a838bf6a 100644 --- a/Mage.Sets/src/mage/cards/r/RiptideChronologist.java +++ b/Mage.Sets/src/mage/cards/r/RiptideChronologist.java @@ -57,8 +57,8 @@ public class RiptideChronologist extends CardImpl { public RiptideChronologist(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RiptideCrab.java b/Mage.Sets/src/mage/cards/r/RiptideCrab.java index b645c410ee..e601c06a6f 100644 --- a/Mage.Sets/src/mage/cards/r/RiptideCrab.java +++ b/Mage.Sets/src/mage/cards/r/RiptideCrab.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class RiptideCrab extends CardImpl { public RiptideCrab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{U}"); - this.subtype.add("Crab"); + this.subtype.add(SubType.CRAB); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RiptideDirector.java b/Mage.Sets/src/mage/cards/r/RiptideDirector.java index 008e92d2bd..84f44140f8 100644 --- a/Mage.Sets/src/mage/cards/r/RiptideDirector.java +++ b/Mage.Sets/src/mage/cards/r/RiptideDirector.java @@ -58,8 +58,8 @@ public class RiptideDirector extends CardImpl { public RiptideDirector(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RiptideEntrancer.java b/Mage.Sets/src/mage/cards/r/RiptideEntrancer.java index 7be6de2947..41a413cd82 100644 --- a/Mage.Sets/src/mage/cards/r/RiptideEntrancer.java +++ b/Mage.Sets/src/mage/cards/r/RiptideEntrancer.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -62,8 +63,8 @@ public class RiptideEntrancer extends CardImpl { public RiptideEntrancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RiptideMangler.java b/Mage.Sets/src/mage/cards/r/RiptideMangler.java new file mode 100644 index 0000000000..13b4d08069 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RiptideMangler.java @@ -0,0 +1,103 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.SetPowerSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class RiptideMangler extends CardImpl { + + public RiptideMangler(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.BEAST); + this.power = new MageInt(0); + this.toughness = new MageInt(3); + + // {1}{U}: Change Riptide Mangler's base power to target creature's power. + Ability ability = new SimpleActivatedAbility(new RiptideManglerEffect(), new ManaCostsImpl("{1}{U}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public RiptideMangler(final RiptideMangler card) { + super(card); + } + + @Override + public RiptideMangler copy() { + return new RiptideMangler(this); + } +} + +class RiptideManglerEffect extends OneShotEffect { + + RiptideManglerEffect() { + super(Outcome.BoostCreature); + this.staticText = "Change {this}'s base power to target creature's power. (This effect lasts indefinitely.)"; + } + + RiptideManglerEffect(final RiptideManglerEffect effect) { + super(effect); + } + + @Override + public RiptideManglerEffect copy() { + return new RiptideManglerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent == null) { + return false; + } + game.addEffect(new SetPowerSourceEffect(new StaticValue(permanent.getPower().getValue()), Duration.WhileOnBattlefield, SubLayer.SetPT_7b), source); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/r/RiptidePilferer.java b/Mage.Sets/src/mage/cards/r/RiptidePilferer.java index 425f243e42..ce6052bee9 100644 --- a/Mage.Sets/src/mage/cards/r/RiptidePilferer.java +++ b/Mage.Sets/src/mage/cards/r/RiptidePilferer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class RiptidePilferer extends CardImpl { public RiptidePilferer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RiptideShapeshifter.java b/Mage.Sets/src/mage/cards/r/RiptideShapeshifter.java index 3d9a844301..5a5d21a2b9 100644 --- a/Mage.Sets/src/mage/cards/r/RiptideShapeshifter.java +++ b/Mage.Sets/src/mage/cards/r/RiptideShapeshifter.java @@ -38,6 +38,7 @@ import mage.cards.*; import mage.choices.Choice; import mage.choices.ChoiceCreatureType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -52,8 +53,8 @@ import java.util.UUID; public class RiptideShapeshifter extends CardImpl { public RiptideShapeshifter(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Shapeshifter"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -104,7 +105,7 @@ class RiptideShapeshifterEffect extends OneShotEffect { Cards revealedCards = new CardsImpl(); while (controller.getLibrary().hasCards()) { Card card = controller.getLibrary().removeFromTop(game); - if (card.isCreature() && card.getSubtype(game).contains(choice.getChoice())) { + if (card.isCreature() && card.hasSubtype(SubType.byDescription(choice.getChoice()), game)) { controller.moveCards(card, Zone.BATTLEFIELD, source, game); break; } diff --git a/Mage.Sets/src/mage/cards/r/RiptideSurvivor.java b/Mage.Sets/src/mage/cards/r/RiptideSurvivor.java index 74d7c79b85..224b761c01 100644 --- a/Mage.Sets/src/mage/cards/r/RiptideSurvivor.java +++ b/Mage.Sets/src/mage/cards/r/RiptideSurvivor.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -48,8 +49,8 @@ public class RiptideSurvivor extends CardImpl { public RiptideSurvivor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RisenExecutioner.java b/Mage.Sets/src/mage/cards/r/RisenExecutioner.java index a6927ebd8f..0b5dcc205c 100644 --- a/Mage.Sets/src/mage/cards/r/RisenExecutioner.java +++ b/Mage.Sets/src/mage/cards/r/RisenExecutioner.java @@ -53,32 +53,32 @@ import mage.util.CardUtil; * @author LevelX2 */ public class RisenExecutioner extends CardImpl { - + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Zombie creatures"); - + static { filter.add(new SubtypePredicate(SubType.ZOMBIE)); } - + public RisenExecutioner(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Warrior"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(3); // Risen Executioner can't block. this.addAbility(new CantBlockAbility()); - + // Other Zombie creatures you control get +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true))); - + // You may cast Risen Executioner from your graveyard if you pay {1} more to cast it for each other creature card in your graveyard. // TODO: cost increase does not happen if Risen Executioner is cast grom graveyard because of other effects Ability ability = new SimpleStaticAbility(Zone.ALL, new RisenExecutionerCastEffect()); ability.addEffect(new RisenExecutionerCostIncreasingEffect()); this.addAbility(ability); - + } public RisenExecutioner(final RisenExecutioner card) { @@ -92,10 +92,10 @@ public class RisenExecutioner extends CardImpl { } class RisenExecutionerCastEffect extends AsThoughEffectImpl { - + RisenExecutionerCastEffect() { super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); - staticText = "You may cast {this} from your graveyard"; + staticText = "You may cast {this} from your graveyard if you pay {1} more to cast it for each other creature card in your graveyard"; } RisenExecutionerCastEffect(final RisenExecutionerCastEffect effect) { @@ -116,8 +116,8 @@ class RisenExecutionerCastEffect extends AsThoughEffectImpl { public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { if (sourceId.equals(source.getSourceId())) { Card card = game.getCard(source.getSourceId()); - if (card != null - && card.getOwnerId().equals(affectedControllerId) + if (card != null + && card.getOwnerId().equals(affectedControllerId) && game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD) { return true; } @@ -129,14 +129,14 @@ class RisenExecutionerCastEffect extends AsThoughEffectImpl { class RisenExecutionerCostIncreasingEffect extends CostModificationEffectImpl { protected static final FilterCreatureCard filter = new FilterCreatureCard(); - + static { filter.add(new AnotherCardPredicate()); } - - RisenExecutionerCostIncreasingEffect () { + + RisenExecutionerCostIncreasingEffect() { super(Duration.EndOfGame, Outcome.Benefit, CostModificationType.INCREASE_COST); - staticText = "if you pay {1} more to cast it for each other creature card in your graveyard"; + staticText = ""; } RisenExecutionerCostIncreasingEffect(final RisenExecutionerCostIncreasingEffect effect) { diff --git a/Mage.Sets/src/mage/cards/r/RisenSanctuary.java b/Mage.Sets/src/mage/cards/r/RisenSanctuary.java index 51608d47e3..9cae6b0410 100644 --- a/Mage.Sets/src/mage/cards/r/RisenSanctuary.java +++ b/Mage.Sets/src/mage/cards/r/RisenSanctuary.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class RisenSanctuary extends CardImpl { public RisenSanctuary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/r/RishadanAirship.java b/Mage.Sets/src/mage/cards/r/RishadanAirship.java index 8adf89bf8a..9ded66facd 100644 --- a/Mage.Sets/src/mage/cards/r/RishadanAirship.java +++ b/Mage.Sets/src/mage/cards/r/RishadanAirship.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class RishadanAirship extends CardImpl { public RishadanAirship(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Pirate"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RishadanBrigand.java b/Mage.Sets/src/mage/cards/r/RishadanBrigand.java index d48f1fc059..605ab30855 100644 --- a/Mage.Sets/src/mage/cards/r/RishadanBrigand.java +++ b/Mage.Sets/src/mage/cards/r/RishadanBrigand.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class RishadanBrigand extends CardImpl { public RishadanBrigand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Human"); - this.subtype.add("Pirate"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RishadanCutpurse.java b/Mage.Sets/src/mage/cards/r/RishadanCutpurse.java index 30fe05f6ab..c4a2b75a74 100644 --- a/Mage.Sets/src/mage/cards/r/RishadanCutpurse.java +++ b/Mage.Sets/src/mage/cards/r/RishadanCutpurse.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeOpponentsUnlessPayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class RishadanCutpurse extends CardImpl { public RishadanCutpurse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Pirate"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RishadanFootpad.java b/Mage.Sets/src/mage/cards/r/RishadanFootpad.java index 32c6cc5b28..5fe79d1c56 100644 --- a/Mage.Sets/src/mage/cards/r/RishadanFootpad.java +++ b/Mage.Sets/src/mage/cards/r/RishadanFootpad.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeOpponentsUnlessPayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class RishadanFootpad extends CardImpl { public RishadanFootpad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Pirate"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RishadanPawnshop.java b/Mage.Sets/src/mage/cards/r/RishadanPawnshop.java new file mode 100644 index 0000000000..f2c995b97d --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RishadanPawnshop.java @@ -0,0 +1,115 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPermanent; + +/** + * + * @author L_J + */ +public class RishadanPawnshop extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("nontoken permanent you control"); + + static { + filter.add(Predicates.not(new TokenPredicate())); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public RishadanPawnshop(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + + // Shuffle target nontoken permanent you control into its owner's library. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RishadanPawnshopShuffleIntoLibraryEffect(), new ManaCostsImpl("{2}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + + } + + public RishadanPawnshop(final RishadanPawnshop card) { + super(card); + } + + @Override + public RishadanPawnshop copy() { + return new RishadanPawnshop(this); + } +} + +class RishadanPawnshopShuffleIntoLibraryEffect extends OneShotEffect { + + public RishadanPawnshopShuffleIntoLibraryEffect() { + super(Outcome.Detriment); + this.staticText = "The owner of target nontoken permanent you control shuffles it into his or her library"; + } + + public RishadanPawnshopShuffleIntoLibraryEffect(final RishadanPawnshopShuffleIntoLibraryEffect effect) { + super(effect); + } + + @Override + public RishadanPawnshopShuffleIntoLibraryEffect copy() { + return new RishadanPawnshopShuffleIntoLibraryEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); + if (permanent != null) { + Player owner = game.getPlayer(permanent.getOwnerId()); + if (owner != null) { + owner.moveCardToLibraryWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD, true, true); + owner.shuffleLibrary(source, game); + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/r/RishkarPeemaRenegade.java b/Mage.Sets/src/mage/cards/r/RishkarPeemaRenegade.java index c804d257c4..664ec33529 100644 --- a/Mage.Sets/src/mage/cards/r/RishkarPeemaRenegade.java +++ b/Mage.Sets/src/mage/cards/r/RishkarPeemaRenegade.java @@ -39,6 +39,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -63,8 +64,8 @@ public class RishkarPeemaRenegade extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RiteOfReplication.java b/Mage.Sets/src/mage/cards/r/RiteOfReplication.java index 0801769a28..5b0a31ac7b 100644 --- a/Mage.Sets/src/mage/cards/r/RiteOfReplication.java +++ b/Mage.Sets/src/mage/cards/r/RiteOfReplication.java @@ -30,7 +30,7 @@ package mage.cards.r; import java.util.UUID; import mage.abilities.condition.common.KickedCondition; import mage.abilities.decorator.ConditionalOneShotEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -51,8 +51,8 @@ public class RiteOfReplication extends CardImpl { // Create a token that's a copy of target creature. If Rite of Replication was kicked, create five of those tokens instead. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new PutTokenOntoBattlefieldCopyTargetEffect(null, null, false, 5), - new PutTokenOntoBattlefieldCopyTargetEffect(), KickedCondition.instance, + this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new CreateTokenCopyTargetEffect(null, null, false, 5), + new CreateTokenCopyTargetEffect(), KickedCondition.instance, "Create a token that's a copy of target creature. If {this} was kicked, create five of those tokens instead")); } diff --git a/Mage.Sets/src/mage/cards/r/RiteOfRuin.java b/Mage.Sets/src/mage/cards/r/RiteOfRuin.java index a2bb5c27eb..9086a1ece0 100644 --- a/Mage.Sets/src/mage/cards/r/RiteOfRuin.java +++ b/Mage.Sets/src/mage/cards/r/RiteOfRuin.java @@ -27,8 +27,10 @@ */ package mage.cards.r; +import java.util.*; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.SacrificeAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.choices.ChoiceImpl; @@ -37,11 +39,7 @@ import mage.constants.Outcome; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.Game; -import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetControlledPermanent; - -import java.util.*; /** * @@ -50,8 +48,7 @@ import java.util.*; public class RiteOfRuin extends CardImpl { public RiteOfRuin(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{5}{R}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{R}{R}"); // Choose an order for artifacts, creatures, and lands. Each player sacrifices one permanent of the first type, sacrifices two of the second type, then sacrifices three of the third type. this.getSpellAbility().addEffect(new RiteOfRuinEffect()); @@ -97,7 +94,9 @@ class RiteOfRuinEffect extends OneShotEffect { LinkedList order = new LinkedList<>(); ChoiceImpl choice = new ChoiceImpl(true); + choice.setMessage("Choose a card type"); choice.setChoices(choices); + while (controller.canRespond() && controller.choose(Outcome.Sacrifice, choice, game) && choices.size() > 1) { order.add(getCardType(choice.getChoice())); choices.remove(choice.getChoice()); @@ -105,29 +104,11 @@ class RiteOfRuinEffect extends OneShotEffect { } order.add(getCardType(choices.iterator().next())); - List sacrifices = new LinkedList<>(); int count = 1; for (CardType cardType : order) { - FilterControlledPermanent filter = new FilterControlledPermanent(cardType + " permanent you control"); + FilterControlledPermanent filter = new FilterControlledPermanent(cardType + " you control"); filter.add(new CardTypePredicate(cardType)); - - for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { - int amount = Math.min(count, game.getBattlefield().countAll(filter, playerId, game)); - TargetControlledPermanent target = new TargetControlledPermanent(amount, amount, filter, false); - Player player = game.getPlayer(playerId); - if (player != null && player.choose(Outcome.Sacrifice, target, source.getSourceId(), game)) { - sacrifices.addAll(target.getTargets()); - } - } - - for (UUID targetId : sacrifices) { - Permanent permanent = game.getPermanent(targetId); - if (permanent != null) { - permanent.sacrifice(source.getSourceId(), game); - } - } - - sacrifices.clear(); + new SacrificeAllEffect(count, filter).apply(game, source); count++; } diff --git a/Mage.Sets/src/mage/cards/r/RithTheAwakener.java b/Mage.Sets/src/mage/cards/r/RithTheAwakener.java index bc7fff98af..178fe052f3 100644 --- a/Mage.Sets/src/mage/cards/r/RithTheAwakener.java +++ b/Mage.Sets/src/mage/cards/r/RithTheAwakener.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.choices.ChoiceColor; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.filter.FilterPermanent; @@ -57,7 +58,7 @@ public class RithTheAwakener extends CardImpl { public RithTheAwakener(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/r/RithsAttendant.java b/Mage.Sets/src/mage/cards/r/RithsAttendant.java index 2ea06a6f25..2e9549ce81 100644 --- a/Mage.Sets/src/mage/cards/r/RithsAttendant.java +++ b/Mage.Sets/src/mage/cards/r/RithsAttendant.java @@ -37,6 +37,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class RithsAttendant extends CardImpl { public RithsAttendant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RitualOfRejuvenation.java b/Mage.Sets/src/mage/cards/r/RitualOfRejuvenation.java new file mode 100644 index 0000000000..7a5613d6b3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RitualOfRejuvenation.java @@ -0,0 +1,60 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class RitualOfRejuvenation extends CardImpl { + + public RitualOfRejuvenation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}"); + + // You gain 4 life. + this.getSpellAbility().addEffect(new GainLifeEffect(4)); + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public RitualOfRejuvenation(final RitualOfRejuvenation card) { + super(card); + } + + @Override + public RitualOfRejuvenation copy() { + return new RitualOfRejuvenation(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RitualOfSteel.java b/Mage.Sets/src/mage/cards/r/RitualOfSteel.java index 5dc25e0e7e..e5fd575d55 100644 --- a/Mage.Sets/src/mage/cards/r/RitualOfSteel.java +++ b/Mage.Sets/src/mage/cards/r/RitualOfSteel.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class RitualOfSteel extends CardImpl { public RitualOfSteel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/r/RitualOfTheReturned.java b/Mage.Sets/src/mage/cards/r/RitualOfTheReturned.java index 32466b5951..5d59286f57 100644 --- a/Mage.Sets/src/mage/cards/r/RitualOfTheReturned.java +++ b/Mage.Sets/src/mage/cards/r/RitualOfTheReturned.java @@ -71,7 +71,7 @@ class RitualOfTheReturnedExileEffect extends OneShotEffect { public RitualOfTheReturnedExileEffect() { super(Outcome.PutCreatureInPlay); - this.staticText = "Exile target creature card from your graveyard. Create a black Zombie creature token with power equal to the exiled card's power and toughness equal to the exiled card's toughness"; + this.staticText = "Exile target creature card from your graveyard. Create a black Zombie creature token. Its power is equal to that card's power and its toughness is equal to that card's toughness."; } public RitualOfTheReturnedExileEffect(final RitualOfTheReturnedExileEffect effect) { diff --git a/Mage.Sets/src/mage/cards/r/RivenTurnbull.java b/Mage.Sets/src/mage/cards/r/RivenTurnbull.java index 2af177c805..3e2eafb5ae 100644 --- a/Mage.Sets/src/mage/cards/r/RivenTurnbull.java +++ b/Mage.Sets/src/mage/cards/r/RivenTurnbull.java @@ -33,6 +33,7 @@ import mage.abilities.mana.BlackManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -44,8 +45,8 @@ public class RivenTurnbull extends CardImpl { public RivenTurnbull(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(5); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/r/RiverBear.java b/Mage.Sets/src/mage/cards/r/RiverBear.java index 8274f3df7c..73f1993d7b 100644 --- a/Mage.Sets/src/mage/cards/r/RiverBear.java +++ b/Mage.Sets/src/mage/cards/r/RiverBear.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.IslandwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class RiverBear extends CardImpl { public RiverBear(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Bear"); + this.subtype.add(SubType.BEAR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RiverBoa.java b/Mage.Sets/src/mage/cards/r/RiverBoa.java index 48765c54f2..0ccc528833 100644 --- a/Mage.Sets/src/mage/cards/r/RiverBoa.java +++ b/Mage.Sets/src/mage/cards/r/RiverBoa.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.IslandwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,7 +49,7 @@ public class RiverBoa extends CardImpl { public RiverBoa(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(2); this.toughness = new MageInt(1); this.addAbility(new IslandwalkAbility()); diff --git a/Mage.Sets/src/mage/cards/r/RiverHeraldsBoon.java b/Mage.Sets/src/mage/cards/r/RiverHeraldsBoon.java new file mode 100644 index 0000000000..1b063f5762 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RiverHeraldsBoon.java @@ -0,0 +1,70 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.SecondTargetPointer; + +/** + * + * @author LevelX2 + */ +public class RiverHeraldsBoon extends CardImpl { + + public RiverHeraldsBoon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}"); + + // Put a +1/+1 counter on target creature and a +1/+1 counter on up to one target Merfolk. + this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance())); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance()); + effect.setTargetPointer(new SecondTargetPointer()); + effect.setText("and a +1/+1 counter on up to one target Merfolk"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 1, new FilterCreaturePermanent(SubType.MERFOLK, "Merfolk"), false)); + + } + + public RiverHeraldsBoon(final RiverHeraldsBoon card) { + super(card); + } + + @Override + public RiverHeraldsBoon copy() { + return new RiverHeraldsBoon(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RiverHoopoe.java b/Mage.Sets/src/mage/cards/r/RiverHoopoe.java index 24a98988f8..6772512502 100644 --- a/Mage.Sets/src/mage/cards/r/RiverHoopoe.java +++ b/Mage.Sets/src/mage/cards/r/RiverHoopoe.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -50,7 +51,7 @@ public class RiverHoopoe extends CardImpl { public RiverHoopoe(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RiverKaijin.java b/Mage.Sets/src/mage/cards/r/RiverKaijin.java index f43cf5a93d..f9f309b31e 100644 --- a/Mage.Sets/src/mage/cards/r/RiverKaijin.java +++ b/Mage.Sets/src/mage/cards/r/RiverKaijin.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class RiverKaijin extends CardImpl { public RiverKaijin (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RiverKelpie.java b/Mage.Sets/src/mage/cards/r/RiverKelpie.java index 1abeb4d06e..a6cba75bea 100644 --- a/Mage.Sets/src/mage/cards/r/RiverKelpie.java +++ b/Mage.Sets/src/mage/cards/r/RiverKelpie.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.PersistAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -48,7 +49,7 @@ public class RiverKelpie extends CardImpl { public RiverKelpie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RiverMerfolk.java b/Mage.Sets/src/mage/cards/r/RiverMerfolk.java index 5800ef5d3d..dfd01b9a32 100644 --- a/Mage.Sets/src/mage/cards/r/RiverMerfolk.java +++ b/Mage.Sets/src/mage/cards/r/RiverMerfolk.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class RiverMerfolk extends CardImpl { public RiverMerfolk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RiverSerpent.java b/Mage.Sets/src/mage/cards/r/RiverSerpent.java index 83cc681695..20d72ba5ba 100644 --- a/Mage.Sets/src/mage/cards/r/RiverSerpent.java +++ b/Mage.Sets/src/mage/cards/r/RiverSerpent.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -52,7 +53,7 @@ public class RiverSerpent extends CardImpl { public RiverSerpent(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RiverSneak.java b/Mage.Sets/src/mage/cards/r/RiverSneak.java new file mode 100644 index 0000000000..5456f17dcd --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RiverSneak.java @@ -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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.CantBeBlockedSourceAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author TheElk801 + */ +public class RiverSneak extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("another Merfolk"); + + static { + filter.add(new AnotherPredicate()); + filter.add(new ControllerPredicate(TargetController.YOU)); + filter.add(new SubtypePredicate(SubType.MERFOLK)); + } + + public RiverSneak(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // River Sneak can't be blocked. + this.addAbility(new CantBeBlockedSourceAbility()); + + // Whenever another Merfolk enters the battlefield under your control, River sneak gets +1/+1 until end of turn. + this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), filter, false, null, true)); + } + + public RiverSneak(final RiverSneak card) { + super(card); + } + + @Override + public RiverSneak copy() { + return new RiverSneak(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RiverfallMimic.java b/Mage.Sets/src/mage/cards/r/RiverfallMimic.java index f48c4b7763..7652696aac 100644 --- a/Mage.Sets/src/mage/cards/r/RiverfallMimic.java +++ b/Mage.Sets/src/mage/cards/r/RiverfallMimic.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SubLayer; import mage.filter.FilterSpell; @@ -61,7 +62,7 @@ public class RiverfallMimic extends CardImpl { public RiverfallMimic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U/R}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.color.setRed(true); this.color.setBlue(true); diff --git a/Mage.Sets/src/mage/cards/r/RiversRebuke.java b/Mage.Sets/src/mage/cards/r/RiversRebuke.java new file mode 100644 index 0000000000..5ce62f4a54 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RiversRebuke.java @@ -0,0 +1,96 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterNonlandPermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPlayer; + +/** + * + * @author TheElk801 + */ +public class RiversRebuke extends CardImpl { + + public RiversRebuke(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}{U}"); + + // Return all nonland permanents target player controls to their owner's hand. + this.getSpellAbility().addEffect(new RiversRebukeReturnToHandEffect()); + this.getSpellAbility().addTarget(new TargetPlayer()); + } + + public RiversRebuke(final RiversRebuke card) { + super(card); + } + + @Override + public RiversRebuke copy() { + return new RiversRebuke(this); + } +} + +class RiversRebukeReturnToHandEffect extends OneShotEffect { + + public RiversRebukeReturnToHandEffect() { + super(Outcome.ReturnToHand); + staticText = "Return all nonland permanents target player controls to their owner's hand"; + } + + public RiversRebukeReturnToHandEffect(final RiversRebukeReturnToHandEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + if (targetPointer.getFirst(game, source) != null) { + FilterNonlandPermanent filter = new FilterNonlandPermanent(); + filter.add(new ControllerIdPredicate(targetPointer.getFirst(game, source))); + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { + permanent.moveToZone(Zone.HAND, source.getSourceId(), game, true); + } + return true; + } + return false; + } + + @Override + public RiversRebukeReturnToHandEffect copy() { + return new RiversRebukeReturnToHandEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RiverwheelAerialists.java b/Mage.Sets/src/mage/cards/r/RiverwheelAerialists.java index b9303de7c2..3e387780da 100644 --- a/Mage.Sets/src/mage/cards/r/RiverwheelAerialists.java +++ b/Mage.Sets/src/mage/cards/r/RiverwheelAerialists.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class RiverwheelAerialists extends CardImpl { public RiverwheelAerialists(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Djinn"); - this.subtype.add("Monk"); + this.subtype.add(SubType.DJINN); + this.subtype.add(SubType.MONK); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RixMaadiGuildmage.java b/Mage.Sets/src/mage/cards/r/RixMaadiGuildmage.java index dcf361040d..ee3d16baef 100644 --- a/Mage.Sets/src/mage/cards/r/RixMaadiGuildmage.java +++ b/Mage.Sets/src/mage/cards/r/RixMaadiGuildmage.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPlayer; @@ -62,8 +63,8 @@ public class RixMaadiGuildmage extends CardImpl { public RixMaadiGuildmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RoaringPrimadox.java b/Mage.Sets/src/mage/cards/r/RoaringPrimadox.java index d6b5f26a61..fc07818427 100644 --- a/Mage.Sets/src/mage/cards/r/RoaringPrimadox.java +++ b/Mage.Sets/src/mage/cards/r/RoaringPrimadox.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.game.events.GameEvent.EventType; @@ -45,7 +46,7 @@ public class RoaringPrimadox extends CardImpl { public RoaringPrimadox(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RoaringSlagwurm.java b/Mage.Sets/src/mage/cards/r/RoaringSlagwurm.java index 0fbd631927..1096f2fea2 100644 --- a/Mage.Sets/src/mage/cards/r/RoaringSlagwurm.java +++ b/Mage.Sets/src/mage/cards/r/RoaringSlagwurm.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.TapAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterArtifactPermanent; /** @@ -45,7 +46,7 @@ public class RoaringSlagwurm extends CardImpl { public RoaringSlagwurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RobeOfMirrors.java b/Mage.Sets/src/mage/cards/r/RobeOfMirrors.java index 3592c8262b..3f2e17c93c 100644 --- a/Mage.Sets/src/mage/cards/r/RobeOfMirrors.java +++ b/Mage.Sets/src/mage/cards/r/RobeOfMirrors.java @@ -48,7 +48,7 @@ public class RobeOfMirrors extends CardImpl { public RobeOfMirrors(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/r/RocEgg.java b/Mage.Sets/src/mage/cards/r/RocEgg.java index 3b7c906151..ad24edfca5 100644 --- a/Mage.Sets/src/mage/cards/r/RocEgg.java +++ b/Mage.Sets/src/mage/cards/r/RocEgg.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.RocEggToken; /** @@ -47,7 +48,7 @@ public class RocEgg extends CardImpl { public RocEgg(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RocHatchling.java b/Mage.Sets/src/mage/cards/r/RocHatchling.java index ec5fe3fe9d..f87260cb9e 100644 --- a/Mage.Sets/src/mage/cards/r/RocHatchling.java +++ b/Mage.Sets/src/mage/cards/r/RocHatchling.java @@ -43,6 +43,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class RocHatchling extends CardImpl { public RocHatchling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RocOfKherRidges.java b/Mage.Sets/src/mage/cards/r/RocOfKherRidges.java index 24dfb4c076..4ddefa5178 100644 --- a/Mage.Sets/src/mage/cards/r/RocOfKherRidges.java +++ b/Mage.Sets/src/mage/cards/r/RocOfKherRidges.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class RocOfKherRidges extends CardImpl { public RocOfKherRidges(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RockBadger.java b/Mage.Sets/src/mage/cards/r/RockBadger.java index 829a8a5889..daad812986 100644 --- a/Mage.Sets/src/mage/cards/r/RockBadger.java +++ b/Mage.Sets/src/mage/cards/r/RockBadger.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class RockBadger extends CardImpl { public RockBadger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Badger"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BADGER); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RockBasilisk.java b/Mage.Sets/src/mage/cards/r/RockBasilisk.java index 225087644a..bc642e18c9 100644 --- a/Mage.Sets/src/mage/cards/r/RockBasilisk.java +++ b/Mage.Sets/src/mage/cards/r/RockBasilisk.java @@ -56,7 +56,7 @@ public class RockBasilisk extends CardImpl { public RockBasilisk(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{G}"); - this.subtype.add("Basilisk"); + this.subtype.add(SubType.BASILISK); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RockHydra.java b/Mage.Sets/src/mage/cards/r/RockHydra.java index 55519bbf34..21506eb1ec 100644 --- a/Mage.Sets/src/mage/cards/r/RockHydra.java +++ b/Mage.Sets/src/mage/cards/r/RockHydra.java @@ -43,6 +43,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.PhaseStep; import mage.constants.Zone; @@ -60,7 +61,7 @@ public class RockHydra extends CardImpl { public RockHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{X}{R}{R}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/r/RockSlide.java b/Mage.Sets/src/mage/cards/r/RockSlide.java new file mode 100644 index 0000000000..80e1638e2e --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RockSlide.java @@ -0,0 +1,78 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.DamageMultiEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.filter.predicate.permanent.AttackingPredicate; +import mage.filter.predicate.permanent.BlockingPredicate; +import mage.target.common.TargetCreaturePermanentAmount; + +/** + * + * @author TheElk801 + */ +public class RockSlide extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + static { + filter.add(Predicates.or( + new AttackingPredicate(), + new BlockingPredicate() + )); + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + + public RockSlide(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{R}"); + + // Rock Slide deals X damage divided as you choose among any number of target attacking or blocking creatures without flying. + DynamicValue xValue = new ManacostVariableValue(); + this.getSpellAbility().addEffect(new DamageMultiEffect(xValue)); + this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(xValue, filter)); + } + + public RockSlide(final RockSlide card) { + super(card); + } + + @Override + public RockSlide copy() { + return new RockSlide(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RockcasterPlatoon.java b/Mage.Sets/src/mage/cards/r/RockcasterPlatoon.java index 4649058c91..aea2870e46 100644 --- a/Mage.Sets/src/mage/cards/r/RockcasterPlatoon.java +++ b/Mage.Sets/src/mage/cards/r/RockcasterPlatoon.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -55,8 +56,8 @@ public class RockcasterPlatoon extends CardImpl { public RockcasterPlatoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); - this.subtype.add("Rhino"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.RHINO); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(5); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/r/RocketTrooper.java b/Mage.Sets/src/mage/cards/r/RocketTrooper.java index a981513f95..19b1c4eff2 100644 --- a/Mage.Sets/src/mage/cards/r/RocketTrooper.java +++ b/Mage.Sets/src/mage/cards/r/RocketTrooper.java @@ -1,79 +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.cards.r; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.DamageTargetEffect; -import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.target.common.TargetOpponentsCreaturePermanent; - -/** - * - * @author Styxo - */ -public class RocketTrooper extends CardImpl { - - public RocketTrooper(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Trooper"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // Trooper creatures you control have "Whenever this creature enters the battlefield, it deals 1 damage to target creature an opponent controls". - Effect effect = new DamageTargetEffect(1); - effect.setText("Whenever this creature enters the battlefield, it deals 1 damage to target creature an opponent controls"); - Ability ability = new EntersBattlefieldTriggeredAbility(effect, false, true); - ability.addTarget(new TargetOpponentsCreaturePermanent()); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new GainAbilityControlledEffect(ability, Duration.WhileOnBattlefield, - new FilterCreaturePermanent(SubType.TROOPER, "Trooper creatures"), false))); - - } - - public RocketTrooper(final RocketTrooper card) { - super(card); - } - - @Override - public RocketTrooper copy() { - return new RocketTrooper(this); - } -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetOpponentsCreaturePermanent; + +/** + * + * @author Styxo + */ +public class RocketTrooper extends CardImpl { + + public RocketTrooper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.TROOPER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Trooper creatures you control have "Whenever this creature enters the battlefield, it deals 1 damage to target creature an opponent controls". + Effect effect = new DamageTargetEffect(1); + effect.setText("Whenever this creature enters the battlefield, it deals 1 damage to target creature an opponent controls"); + Ability ability = new EntersBattlefieldTriggeredAbility(effect, false, true); + ability.addTarget(new TargetOpponentsCreaturePermanent()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityControlledEffect(ability, Duration.WhileOnBattlefield, + new FilterCreaturePermanent(SubType.TROOPER, "Trooper creatures"), false))); + + } + + public RocketTrooper(final RocketTrooper card) { + super(card); + } + + @Override + public RocketTrooper copy() { + return new RocketTrooper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RockshardElemental.java b/Mage.Sets/src/mage/cards/r/RockshardElemental.java index bad2a94ed3..80c6a6ba24 100644 --- a/Mage.Sets/src/mage/cards/r/RockshardElemental.java +++ b/Mage.Sets/src/mage/cards/r/RockshardElemental.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class RockshardElemental extends CardImpl { public RockshardElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RockslideElemental.java b/Mage.Sets/src/mage/cards/r/RockslideElemental.java index 6bd1d39dbf..1cfe5854d7 100644 --- a/Mage.Sets/src/mage/cards/r/RockslideElemental.java +++ b/Mage.Sets/src/mage/cards/r/RockslideElemental.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,7 +46,7 @@ public class RockslideElemental extends CardImpl { public RockslideElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RofellosLlanowarEmissary.java b/Mage.Sets/src/mage/cards/r/RofellosLlanowarEmissary.java index 7dca59a646..6261cf8bf4 100644 --- a/Mage.Sets/src/mage/cards/r/RofellosLlanowarEmissary.java +++ b/Mage.Sets/src/mage/cards/r/RofellosLlanowarEmissary.java @@ -56,8 +56,8 @@ public class RofellosLlanowarEmissary extends CardImpl { public RofellosLlanowarEmissary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RogueElephant.java b/Mage.Sets/src/mage/cards/r/RogueElephant.java index 347be19145..f794240938 100644 --- a/Mage.Sets/src/mage/cards/r/RogueElephant.java +++ b/Mage.Sets/src/mage/cards/r/RogueElephant.java @@ -54,7 +54,7 @@ public class RogueElephant extends CardImpl { public RogueElephant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RogueKavu.java b/Mage.Sets/src/mage/cards/r/RogueKavu.java index 3158fb4eb2..ffe0449840 100644 --- a/Mage.Sets/src/mage/cards/r/RogueKavu.java +++ b/Mage.Sets/src/mage/cards/r/RogueKavu.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class RogueKavu extends CardImpl { public RogueKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RogueRefiner.java b/Mage.Sets/src/mage/cards/r/RogueRefiner.java index ca92bc6dd1..21fb57bc22 100644 --- a/Mage.Sets/src/mage/cards/r/RogueRefiner.java +++ b/Mage.Sets/src/mage/cards/r/RogueRefiner.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,8 +48,8 @@ public class RogueRefiner extends CardImpl { public RogueRefiner(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RoguesGloves.java b/Mage.Sets/src/mage/cards/r/RoguesGloves.java index cf11ed2ffe..7153ddbe25 100644 --- a/Mage.Sets/src/mage/cards/r/RoguesGloves.java +++ b/Mage.Sets/src/mage/cards/r/RoguesGloves.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; /** @@ -45,7 +46,7 @@ public class RoguesGloves extends CardImpl { public RoguesGloves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Whenever equipped creature deals combat damage to a player, you may draw a card. this.addAbility(new DealsDamageToAPlayerAttachedTriggeredAbility(new DrawCardSourceControllerEffect(1), "equipped creature", true)); diff --git a/Mage.Sets/src/mage/cards/r/RohgahhOfKherKeep.java b/Mage.Sets/src/mage/cards/r/RohgahhOfKherKeep.java new file mode 100644 index 0000000000..9669a2fe5c --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RohgahhOfKherKeep.java @@ -0,0 +1,153 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.TapAllEffect; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.effects.common.continuous.GainControlAllEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetOpponent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public class RohgahhOfKherKeep extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures you control named Kobolds of Kher Keep"); + + static { + filter.add(new NamePredicate("Kobolds of Kher Keep")); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public RohgahhOfKherKeep(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}{R}{R}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.KOBOLD); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // At the beginning of your upkeep, you may pay {R}{R}{R}. If you don't, tap Rohgahh of Kher Keep and all creatures named Kobolds of Kher Keep, then an opponent gains control of them. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new RohgahhOfKherKeepEffect(), TargetController.YOU, false)); + + // Creatures you control named Kobolds of Kher Keep get +2/+2. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(2, 2, Duration.WhileOnBattlefield, filter, false))); + } + + public RohgahhOfKherKeep(final RohgahhOfKherKeep card) { + super(card); + } + + @Override + public RohgahhOfKherKeep copy() { + return new RohgahhOfKherKeep(this); + } +} + +class RohgahhOfKherKeepEffect extends OneShotEffect { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures named Kobolds of Kher Keep"); + + static { + filter.add(new NamePredicate("Kobolds of Kher Keep")); + } + + RohgahhOfKherKeepEffect() { + super(Outcome.Benefit); + this.staticText = "you may pay {R}{R}{R}. If you don't, tap {this} and all creatures named Kobolds of Kher Keep, then an opponent gains control of them."; + } + + RohgahhOfKherKeepEffect(final RohgahhOfKherKeepEffect effect) { + super(effect); + } + + @Override + public RohgahhOfKherKeepEffect copy() { + return new RohgahhOfKherKeepEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(source.getSourceId()); + if (player == null) { + return false; + } + Cost cost = new ManaCostsImpl("{R}{R}{R}"); + if (!cost.canPay(source, source.getSourceId(), player.getId(), game) + || !player.chooseUse(Outcome.Benefit, "Pay {R}{R}{R}?", source, game) + || !cost.pay(source, game, source.getSourceId(), player.getId(), false)) { + TargetOpponent target = new TargetOpponent(); + Player opponent = null; + if (target.choose(Outcome.Detriment, player.getId(), source.getSourceId(), game)) { + opponent = game.getPlayer(target.getFirstTarget()); + } + new TapAllEffect(filter).apply(game, source); + if (permanent != null) { + permanent.tap(game); + } + if (opponent != null) { + game.addEffect(new GainControlAllEffect(Duration.Custom, filter, opponent.getId()), source); + if (permanent != null) { + ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, true, opponent.getId()); + effect.setTargetPointer(new FixedTarget(permanent, game)); + game.addEffect(effect, source); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/r/RoilElemental.java b/Mage.Sets/src/mage/cards/r/RoilElemental.java index 11e11d4588..9a3f2ccf16 100644 --- a/Mage.Sets/src/mage/cards/r/RoilElemental.java +++ b/Mage.Sets/src/mage/cards/r/RoilElemental.java @@ -48,7 +48,7 @@ public class RoilElemental extends CardImpl { public RoilElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RoilingHorror.java b/Mage.Sets/src/mage/cards/r/RoilingHorror.java index 24e854fe2f..dcb8b43196 100644 --- a/Mage.Sets/src/mage/cards/r/RoilingHorror.java +++ b/Mage.Sets/src/mage/cards/r/RoilingHorror.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -58,18 +59,20 @@ import mage.target.TargetPlayer; public class RoilingHorror extends CardImpl { public RoilingHorror(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Horror"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(0); this.toughness = new MageInt(0); // Roiling Horror's power and toughness are each equal to your life total minus the life total of an opponent with the most life. - this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new RoilingHorrorDynamicValue(), Duration.EndOfGame))); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new RoilingHorrorDynamicValue(), Duration.EndOfGame) + .setText("{this}'s power and toughness are each equal to your life total minus the life total of an opponent with the most life.") + )); // Suspend X-{X}{B}{B}{B}. X can't be 0. this.addAbility(new SuspendAbility(Integer.MAX_VALUE, new ManaCostsImpl("{B}{B}{B}"), this, true)); - + // Whenever a time counter is removed from Roiling Horror while it's exiled, target player loses 1 life and you gain 1 life. this.addAbility(new RoilingHorrorTriggeredAbility()); diff --git a/Mage.Sets/src/mage/cards/r/RoninCavekeeper.java b/Mage.Sets/src/mage/cards/r/RoninCavekeeper.java index cd3aba57ab..aadd2ea002 100644 --- a/Mage.Sets/src/mage/cards/r/RoninCavekeeper.java +++ b/Mage.Sets/src/mage/cards/r/RoninCavekeeper.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.BushidoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class RoninCavekeeper extends CardImpl { public RoninCavekeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RoninCliffrider.java b/Mage.Sets/src/mage/cards/r/RoninCliffrider.java index b5a3417031..dba0971ad7 100644 --- a/Mage.Sets/src/mage/cards/r/RoninCliffrider.java +++ b/Mage.Sets/src/mage/cards/r/RoninCliffrider.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.BushidoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; @@ -51,8 +52,8 @@ public class RoninCliffrider extends CardImpl { public RoninCliffrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RoninHoundmaster.java b/Mage.Sets/src/mage/cards/r/RoninHoundmaster.java index 7ae43443cd..f5a9c8b80e 100644 --- a/Mage.Sets/src/mage/cards/r/RoninHoundmaster.java +++ b/Mage.Sets/src/mage/cards/r/RoninHoundmaster.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class RoninHoundmaster extends CardImpl { public RoninHoundmaster (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RoninWarclub.java b/Mage.Sets/src/mage/cards/r/RoninWarclub.java index ed08b0ffcf..b05821f78f 100644 --- a/Mage.Sets/src/mage/cards/r/RoninWarclub.java +++ b/Mage.Sets/src/mage/cards/r/RoninWarclub.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -55,7 +56,7 @@ public class RoninWarclub extends CardImpl { public RoninWarclub(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 1))); diff --git a/Mage.Sets/src/mage/cards/r/RonomHulk.java b/Mage.Sets/src/mage/cards/r/RonomHulk.java index 0f820ff80f..51fd10e552 100644 --- a/Mage.Sets/src/mage/cards/r/RonomHulk.java +++ b/Mage.Sets/src/mage/cards/r/RonomHulk.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.SupertypePredicate; @@ -53,7 +54,7 @@ public class RonomHulk extends CardImpl { public RonomHulk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/r/RonomSerpent.java b/Mage.Sets/src/mage/cards/r/RonomSerpent.java new file mode 100644 index 0000000000..37fa43860b --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RonomSerpent.java @@ -0,0 +1,85 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.effects.common.combat.CantAttackUnlessDefenderControllsPermanent; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Zone; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.SupertypePredicate; + +/** + * + * @author TheElk801 + */ +public class RonomSerpent extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent("a snow land"); + private static final FilterLandPermanent filter2 = new FilterLandPermanent("no snow lands"); + + static { + filter.add(new SupertypePredicate(SuperType.SNOW)); + filter2.add(new SupertypePredicate(SuperType.SNOW)); + } + + public RonomSerpent(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}"); + + this.addSuperType(SuperType.SNOW); + this.subtype.add(SubType.SERPENT); + this.power = new MageInt(5); + this.toughness = new MageInt(6); + + // Ronom Serpent can't attack unless defending player controls a snow land. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackUnlessDefenderControllsPermanent(filter))); + + // When you control no snow lands, sacrifice Ronom Serpent. + this.addAbility(new ControlsPermanentsControllerTriggeredAbility( + filter2, ComparisonType.EQUAL_TO, 0, new SacrificeSourceEffect() + )); + } + + public RonomSerpent(final RonomSerpent card) { + super(card); + } + + @Override + public RonomSerpent copy() { + return new RonomSerpent(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RonomUnicorn.java b/Mage.Sets/src/mage/cards/r/RonomUnicorn.java index 2558993edc..fe12934ca4 100644 --- a/Mage.Sets/src/mage/cards/r/RonomUnicorn.java +++ b/Mage.Sets/src/mage/cards/r/RonomUnicorn.java @@ -35,11 +35,11 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; -import mage.filter.StaticFilters; -import mage.target.TargetPermanent; import java.util.UUID; +import mage.target.common.TargetEnchantmentPermanent; /** * @@ -48,14 +48,14 @@ import java.util.UUID; public class RonomUnicorn extends CardImpl { public RonomUnicorn(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Unicorn"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.subtype.add(SubType.UNICORN); this.power = new MageInt(2); this.toughness = new MageInt(2); // Sacrifice Ronom Unicorn: Destroy target enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetEnchantmentPermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RoofstalkerWight.java b/Mage.Sets/src/mage/cards/r/RoofstalkerWight.java index 0475a48634..be65c0178a 100644 --- a/Mage.Sets/src/mage/cards/r/RoofstalkerWight.java +++ b/Mage.Sets/src/mage/cards/r/RoofstalkerWight.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class RoofstalkerWight extends CardImpl { public RoofstalkerWight (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RoonOfTheHiddenRealm.java b/Mage.Sets/src/mage/cards/r/RoonOfTheHiddenRealm.java index 4016e787c7..1111fb78ad 100644 --- a/Mage.Sets/src/mage/cards/r/RoonOfTheHiddenRealm.java +++ b/Mage.Sets/src/mage/cards/r/RoonOfTheHiddenRealm.java @@ -43,6 +43,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -69,8 +70,8 @@ public class RoonOfTheHiddenRealm extends CardImpl { public RoonOfTheHiddenRealm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Rhino"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.RHINO); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RootElemental.java b/Mage.Sets/src/mage/cards/r/RootElemental.java index b3d137ac0a..1a1c59270a 100644 --- a/Mage.Sets/src/mage/cards/r/RootElemental.java +++ b/Mage.Sets/src/mage/cards/r/RootElemental.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; /** @@ -46,7 +47,7 @@ public class RootElemental extends CardImpl { public RootElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RootGreevil.java b/Mage.Sets/src/mage/cards/r/RootGreevil.java index 1a88e82b2f..3818f4f50f 100644 --- a/Mage.Sets/src/mage/cards/r/RootGreevil.java +++ b/Mage.Sets/src/mage/cards/r/RootGreevil.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.choices.ChoiceColor; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterEnchantmentPermanent; @@ -55,7 +56,7 @@ public class RootGreevil extends CardImpl { public RootGreevil(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RootKinAlly.java b/Mage.Sets/src/mage/cards/r/RootKinAlly.java index 22b01be011..2167ce251e 100644 --- a/Mage.Sets/src/mage/cards/r/RootKinAlly.java +++ b/Mage.Sets/src/mage/cards/r/RootKinAlly.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ConvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -56,8 +57,8 @@ public class RootKinAlly extends CardImpl { public RootKinAlly(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Elemental"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RootSliver.java b/Mage.Sets/src/mage/cards/r/RootSliver.java index 8d6631417a..92a181ed9e 100644 --- a/Mage.Sets/src/mage/cards/r/RootSliver.java +++ b/Mage.Sets/src/mage/cards/r/RootSliver.java @@ -57,7 +57,7 @@ public class RootSliver extends CardImpl { public RootSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RootSpider.java b/Mage.Sets/src/mage/cards/r/RootSpider.java index 0d29e35ce0..9a781a4f80 100644 --- a/Mage.Sets/src/mage/cards/r/RootSpider.java +++ b/Mage.Sets/src/mage/cards/r/RootSpider.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -48,7 +49,7 @@ public class RootSpider extends CardImpl { public RootSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RootboundCrag.java b/Mage.Sets/src/mage/cards/r/RootboundCrag.java index 11ce87713e..faaecb50fb 100644 --- a/Mage.Sets/src/mage/cards/r/RootboundCrag.java +++ b/Mage.Sets/src/mage/cards/r/RootboundCrag.java @@ -24,8 +24,7 @@ * 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.cards.r; import mage.abilities.common.EntersBattlefieldAbility; @@ -59,10 +58,10 @@ public class RootboundCrag extends CardImpl { } public RootboundCrag(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); - String abilityText = "tap it unless you control a Mountain or a Forest"; + String abilityText = " tapped unless you control a Mountain or a Forest"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new RedManaAbility()); this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/cards/r/RootbreakerWurm.java b/Mage.Sets/src/mage/cards/r/RootbreakerWurm.java index 7dc9200f94..fceaeff954 100644 --- a/Mage.Sets/src/mage/cards/r/RootbreakerWurm.java +++ b/Mage.Sets/src/mage/cards/r/RootbreakerWurm.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class RootbreakerWurm extends CardImpl { public RootbreakerWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/r/Rootgrapple.java b/Mage.Sets/src/mage/cards/r/Rootgrapple.java index 74e058e74b..fdea096c75 100644 --- a/Mage.Sets/src/mage/cards/r/Rootgrapple.java +++ b/Mage.Sets/src/mage/cards/r/Rootgrapple.java @@ -59,7 +59,7 @@ public class Rootgrapple extends CardImpl { public Rootgrapple(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{4}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); // Destroy target noncreature permanent. this.getSpellAbility().addTarget(new TargetPermanent(filterNoncreature)); diff --git a/Mage.Sets/src/mage/cards/r/RootingKavu.java b/Mage.Sets/src/mage/cards/r/RootingKavu.java index 0519aa9b04..4ff14279da 100644 --- a/Mage.Sets/src/mage/cards/r/RootingKavu.java +++ b/Mage.Sets/src/mage/cards/r/RootingKavu.java @@ -39,6 +39,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterCreatureCard; import mage.game.Game; @@ -52,7 +53,7 @@ public class RootingKavu extends CardImpl { public RootingKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/Rootrunner.java b/Mage.Sets/src/mage/cards/r/Rootrunner.java index 2fc5e35396..ea0aea0a77 100644 --- a/Mage.Sets/src/mage/cards/r/Rootrunner.java +++ b/Mage.Sets/src/mage/cards/r/Rootrunner.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetLandPermanent; @@ -49,7 +50,7 @@ public class Rootrunner extends CardImpl { public Rootrunner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/Roots.java b/Mage.Sets/src/mage/cards/r/Roots.java index 9b3034679c..6f05c25188 100644 --- a/Mage.Sets/src/mage/cards/r/Roots.java +++ b/Mage.Sets/src/mage/cards/r/Roots.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -60,7 +61,7 @@ public class Roots extends CardImpl { public Roots(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature without flying TargetPermanent auraTarget = new TargetCreaturePermanent(filter); diff --git a/Mage.Sets/src/mage/cards/r/Rootwalla.java b/Mage.Sets/src/mage/cards/r/Rootwalla.java index 2271febbf7..c7dcf6966d 100644 --- a/Mage.Sets/src/mage/cards/r/Rootwalla.java +++ b/Mage.Sets/src/mage/cards/r/Rootwalla.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class Rootwalla extends CardImpl { public Rootwalla(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RootwaterAlligator.java b/Mage.Sets/src/mage/cards/r/RootwaterAlligator.java index 0b1dcb139b..93030afa28 100644 --- a/Mage.Sets/src/mage/cards/r/RootwaterAlligator.java +++ b/Mage.Sets/src/mage/cards/r/RootwaterAlligator.java @@ -55,7 +55,7 @@ public class RootwaterAlligator extends CardImpl { public RootwaterAlligator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Crocodile"); + this.subtype.add(SubType.CROCODILE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RootwaterCommando.java b/Mage.Sets/src/mage/cards/r/RootwaterCommando.java index 3ca694044f..3e6d6ea9ae 100644 --- a/Mage.Sets/src/mage/cards/r/RootwaterCommando.java +++ b/Mage.Sets/src/mage/cards/r/RootwaterCommando.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.IslandwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class RootwaterCommando extends CardImpl { public RootwaterCommando(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RootwaterDiver.java b/Mage.Sets/src/mage/cards/r/RootwaterDiver.java index 0bbaeece23..9476da04ab 100644 --- a/Mage.Sets/src/mage/cards/r/RootwaterDiver.java +++ b/Mage.Sets/src/mage/cards/r/RootwaterDiver.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterArtifactCard; import mage.target.common.TargetCardInYourGraveyard; @@ -49,7 +50,7 @@ public class RootwaterDiver extends CardImpl { public RootwaterDiver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RootwaterHunter.java b/Mage.Sets/src/mage/cards/r/RootwaterHunter.java index 73d454aa19..bf870ea1fa 100644 --- a/Mage.Sets/src/mage/cards/r/RootwaterHunter.java +++ b/Mage.Sets/src/mage/cards/r/RootwaterHunter.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -47,7 +48,7 @@ public class RootwaterHunter extends CardImpl { public RootwaterHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RootwaterMatriarch.java b/Mage.Sets/src/mage/cards/r/RootwaterMatriarch.java index 324561346e..083a1ae0aa 100644 --- a/Mage.Sets/src/mage/cards/r/RootwaterMatriarch.java +++ b/Mage.Sets/src/mage/cards/r/RootwaterMatriarch.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,7 +51,7 @@ public class RootwaterMatriarch extends CardImpl { public RootwaterMatriarch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RootwaterMystic.java b/Mage.Sets/src/mage/cards/r/RootwaterMystic.java index 3c781dfb47..a79f90bb82 100644 --- a/Mage.Sets/src/mage/cards/r/RootwaterMystic.java +++ b/Mage.Sets/src/mage/cards/r/RootwaterMystic.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.LookLibraryTopCardTargetPlayerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -47,8 +48,8 @@ public class RootwaterMystic extends CardImpl { public RootwaterMystic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RootwaterThief.java b/Mage.Sets/src/mage/cards/r/RootwaterThief.java index efbdd7ffdd..8c96bf07fe 100644 --- a/Mage.Sets/src/mage/cards/r/RootwaterThief.java +++ b/Mage.Sets/src/mage/cards/r/RootwaterThief.java @@ -41,6 +41,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,8 +58,8 @@ public class RootwaterThief extends CardImpl { public RootwaterThief(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RorixBladewing.java b/Mage.Sets/src/mage/cards/r/RorixBladewing.java index f6c59d079b..eb253b3dab 100644 --- a/Mage.Sets/src/mage/cards/r/RorixBladewing.java +++ b/Mage.Sets/src/mage/cards/r/RorixBladewing.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -45,7 +46,7 @@ public class RorixBladewing extends CardImpl { public RorixBladewing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RosheenMeanderer.java b/Mage.Sets/src/mage/cards/r/RosheenMeanderer.java index 0dd414ee13..42989c8f5a 100644 --- a/Mage.Sets/src/mage/cards/r/RosheenMeanderer.java +++ b/Mage.Sets/src/mage/cards/r/RosheenMeanderer.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.game.Game; @@ -52,8 +53,8 @@ public class RosheenMeanderer extends CardImpl { public RosheenMeanderer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R/G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Giant"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RotFarmSkeleton.java b/Mage.Sets/src/mage/cards/r/RotFarmSkeleton.java index b531dda204..ff68ee3ccb 100644 --- a/Mage.Sets/src/mage/cards/r/RotFarmSkeleton.java +++ b/Mage.Sets/src/mage/cards/r/RotFarmSkeleton.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -50,8 +51,8 @@ public class RotFarmSkeleton extends CardImpl { public RotFarmSkeleton (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RotShambler.java b/Mage.Sets/src/mage/cards/r/RotShambler.java index 25bdb80025..0862e90ea6 100644 --- a/Mage.Sets/src/mage/cards/r/RotShambler.java +++ b/Mage.Sets/src/mage/cards/r/RotShambler.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -55,7 +56,7 @@ public class RotShambler extends CardImpl { public RotShambler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RotWolf.java b/Mage.Sets/src/mage/cards/r/RotWolf.java index e90ce93ed9..7336c23b58 100644 --- a/Mage.Sets/src/mage/cards/r/RotWolf.java +++ b/Mage.Sets/src/mage/cards/r/RotWolf.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class RotWolf extends CardImpl { public RotWolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RotcrownGhoul.java b/Mage.Sets/src/mage/cards/r/RotcrownGhoul.java index 89fc24e697..00e5d9eb5c 100644 --- a/Mage.Sets/src/mage/cards/r/RotcrownGhoul.java +++ b/Mage.Sets/src/mage/cards/r/RotcrownGhoul.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -44,7 +45,7 @@ public class RotcrownGhoul extends CardImpl { public RotcrownGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/Roterothopter.java b/Mage.Sets/src/mage/cards/r/Roterothopter.java index a92baf53d9..ca846682a7 100644 --- a/Mage.Sets/src/mage/cards/r/Roterothopter.java +++ b/Mage.Sets/src/mage/cards/r/Roterothopter.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class Roterothopter extends CardImpl { public Roterothopter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}"); - this.subtype.add("Thopter"); + this.subtype.add(SubType.THOPTER); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RotfeasterMaggot.java b/Mage.Sets/src/mage/cards/r/RotfeasterMaggot.java index a88dcb2e7a..7a6ac8b9af 100644 --- a/Mage.Sets/src/mage/cards/r/RotfeasterMaggot.java +++ b/Mage.Sets/src/mage/cards/r/RotfeasterMaggot.java @@ -36,6 +36,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -51,7 +52,7 @@ public class RotfeasterMaggot extends CardImpl { public RotfeasterMaggot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RotlungReanimator.java b/Mage.Sets/src/mage/cards/r/RotlungReanimator.java index 0386e89b23..a56632de2f 100644 --- a/Mage.Sets/src/mage/cards/r/RotlungReanimator.java +++ b/Mage.Sets/src/mage/cards/r/RotlungReanimator.java @@ -53,8 +53,8 @@ public class RotlungReanimator extends CardImpl { public RotlungReanimator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RottedHulk.java b/Mage.Sets/src/mage/cards/r/RottedHulk.java index cd5e2b6d9b..a7f6fb7ee5 100644 --- a/Mage.Sets/src/mage/cards/r/RottedHulk.java +++ b/Mage.Sets/src/mage/cards/r/RottedHulk.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class RottedHulk extends CardImpl { public RottedHulk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RottedHystrix.java b/Mage.Sets/src/mage/cards/r/RottedHystrix.java index 810d597c2f..1ce6ca3d91 100644 --- a/Mage.Sets/src/mage/cards/r/RottedHystrix.java +++ b/Mage.Sets/src/mage/cards/r/RottedHystrix.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class RottedHystrix extends CardImpl { public RottedHystrix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/r/RottenheartGhoul.java b/Mage.Sets/src/mage/cards/r/RottenheartGhoul.java index 4e734595ca..47b69ffaae 100644 --- a/Mage.Sets/src/mage/cards/r/RottenheartGhoul.java +++ b/Mage.Sets/src/mage/cards/r/RottenheartGhoul.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -45,7 +46,7 @@ public class RottenheartGhoul extends CardImpl { public RottenheartGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RottingFensnake.java b/Mage.Sets/src/mage/cards/r/RottingFensnake.java index e6d8b1dce5..7ab53b7871 100644 --- a/Mage.Sets/src/mage/cards/r/RottingFensnake.java +++ b/Mage.Sets/src/mage/cards/r/RottingFensnake.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class RottingFensnake extends CardImpl { public RottingFensnake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Snake"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(5); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RottingGiant.java b/Mage.Sets/src/mage/cards/r/RottingGiant.java index 9c42535d80..f05a64e4ca 100644 --- a/Mage.Sets/src/mage/cards/r/RottingGiant.java +++ b/Mage.Sets/src/mage/cards/r/RottingGiant.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCardInYourGraveyard; /** @@ -45,8 +46,8 @@ public class RottingGiant extends CardImpl { public RottingGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Giant"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.GIANT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RottingLegion.java b/Mage.Sets/src/mage/cards/r/RottingLegion.java index ad43c337d6..b09ec6cc50 100644 --- a/Mage.Sets/src/mage/cards/r/RottingLegion.java +++ b/Mage.Sets/src/mage/cards/r/RottingLegion.java @@ -34,6 +34,7 @@ import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class RottingLegion extends CardImpl { public RottingLegion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RottingMastodon.java b/Mage.Sets/src/mage/cards/r/RottingMastodon.java index 64a7bb9279..a2ef8dbf01 100644 --- a/Mage.Sets/src/mage/cards/r/RottingMastodon.java +++ b/Mage.Sets/src/mage/cards/r/RottingMastodon.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class RottingMastodon extends CardImpl { public RottingMastodon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(2); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/r/RottingRats.java b/Mage.Sets/src/mage/cards/r/RottingRats.java index ed63f70965..c947ac5d99 100644 --- a/Mage.Sets/src/mage/cards/r/RottingRats.java +++ b/Mage.Sets/src/mage/cards/r/RottingRats.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class RottingRats extends CardImpl { public RottingRats (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Rat"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.RAT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RoughshodMentor.java b/Mage.Sets/src/mage/cards/r/RoughshodMentor.java index 720052f262..5099731301 100644 --- a/Mage.Sets/src/mage/cards/r/RoughshodMentor.java +++ b/Mage.Sets/src/mage/cards/r/RoughshodMentor.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -55,8 +56,8 @@ public class RoughshodMentor extends CardImpl { public RoughshodMentor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/Rouse.java b/Mage.Sets/src/mage/cards/r/Rouse.java new file mode 100644 index 0000000000..25ae2447d8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/Rouse.java @@ -0,0 +1,78 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.costs.AlternativeCostSourceAbility; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class Rouse extends CardImpl { + + private static final FilterLandPermanent filterSwamp = new FilterLandPermanent("If you control a Swamp"); + + static { + filterSwamp.add(new SubtypePredicate(SubType.SWAMP)); + } + + public Rouse(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}"); + + // If you control a Swamp, you may pay 2 life rather than pay Rouse's mana cost. + this.addAbility(new AlternativeCostSourceAbility( + new PayLifeCost(2), + new PermanentsOnTheBattlefieldCondition(filterSwamp), null + )); + + // Target creature gets +2/+0 until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(2, 0, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public Rouse(final Rouse card) { + super(card); + } + + @Override + public Rouse copy() { + return new Rouse(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RowanTreefolk.java b/Mage.Sets/src/mage/cards/r/RowanTreefolk.java index 3e93a7c709..5f289ba122 100644 --- a/Mage.Sets/src/mage/cards/r/RowanTreefolk.java +++ b/Mage.Sets/src/mage/cards/r/RowanTreefolk.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class RowanTreefolk extends CardImpl { public RowanTreefolk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RowdyCrew.java b/Mage.Sets/src/mage/cards/r/RowdyCrew.java new file mode 100644 index 0000000000..7eb04fcff6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RowdyCrew.java @@ -0,0 +1,130 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class RowdyCrew extends CardImpl { + + public RowdyCrew(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // When Rowdy Crew enters the battlefield, draw three cards, then discard two cards at random. If two cards that share a card type are discarded this way, put two +1/+1 counters on Rowdy Crew. + this.addAbility(new EntersBattlefieldTriggeredAbility(new RowdyCrewEffect())); + } + + public RowdyCrew(final RowdyCrew card) { + super(card); + } + + @Override + public RowdyCrew copy() { + return new RowdyCrew(this); + } +} + +class RowdyCrewEffect extends OneShotEffect { + + RowdyCrewEffect() { + super(Outcome.Benefit); + this.staticText = "draw three cards, then discard two cards at random. If two cards that share a card type are discarded this way, put two +1/+1 counters on {this}"; + } + + RowdyCrewEffect(final RowdyCrewEffect effect) { + super(effect); + } + + @Override + public RowdyCrewEffect copy() { + return new RowdyCrewEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent creature = game.getPermanent(source.getSourceId()); + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + player.drawCards(3, game); + Cards cards = new CardsImpl(); + int cardsInHand = player.getHand().size(); + switch (cardsInHand) { + case 0: + break; + case 1: + player.discard(1, true, source, game); + break; + default: + cards = player.discard(2, true, source, game); + } + if (creature != null && cardsInHand > 1) { + for (CardType type : CardType.values()) { + int count = 0; + for (UUID cardId : cards) { + if (game.getCard(cardId).getCardType().contains(type)) { + count++; + if (count > 1) { + creature.addCounters(CounterType.P1P1.createInstance(2), source, game); + return true; + } + } + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/r/RoyalAssassin.java b/Mage.Sets/src/mage/cards/r/RoyalAssassin.java index 32316ed324..207154932c 100644 --- a/Mage.Sets/src/mage/cards/r/RoyalAssassin.java +++ b/Mage.Sets/src/mage/cards/r/RoyalAssassin.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.TappedPredicate; @@ -57,8 +58,8 @@ public class RoyalAssassin extends CardImpl { public RoyalAssassin(UUID ownerId, CardSetInfo setInfo){ super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RoyalDecree.java b/Mage.Sets/src/mage/cards/r/RoyalDecree.java new file mode 100644 index 0000000000..542d7db4e2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RoyalDecree.java @@ -0,0 +1,128 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +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.targetpointer.FixedTarget; + +/** + * + * @author L_J + */ +public class RoyalDecree extends CardImpl { + + public RoyalDecree(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); + + // Cumulative upkeep-Pay {W}. + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{W}"))); + + // Whenever a Swamp, Mountain, black permanent, or red permanent becomes tapped, Royal Decree deals 1 damage to that permanent's controller. + this.addAbility(new RoyalDecreeAbility()); + } + + public RoyalDecree(final RoyalDecree card) { + super(card); + } + + @Override + public RoyalDecree copy() { + return new RoyalDecree(this); + } +} + +class RoyalDecreeAbility extends TriggeredAbilityImpl { + + private static final FilterPermanent filter = new FilterPermanent("a Swamp, Mountain, black permanent, or red permanent"); + static { + filter.add(Predicates.or( + new SubtypePredicate(SubType.SWAMP), + new SubtypePredicate(SubType.MOUNTAIN), + new ColorPredicate(ObjectColor.BLACK), + new ColorPredicate(ObjectColor.RED))); + } + + public RoyalDecreeAbility() { + super(Zone.BATTLEFIELD, new DamageTargetEffect(1)); + } + + RoyalDecreeAbility(final RoyalDecreeAbility ability) { + super(ability); + } + + @Override + public RoyalDecreeAbility copy() { + return new RoyalDecreeAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.TAPPED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId()); + if (permanent != null && filter.match(permanent, getSourceId(), getControllerId(), game)) { + Player player = game.getPlayer(permanent.getControllerId()); + if (player != null) { + for (Effect effect : this.getEffects()) { + effect.setTargetPointer(new FixedTarget(player.getId())); + } + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a Swamp, Mountain, black permanent, or red permanent becomes tapped, Royal Decree deals 1 damage to that permanent's controller."; + } +} diff --git a/Mage.Sets/src/mage/cards/r/RoyalFalcon.java b/Mage.Sets/src/mage/cards/r/RoyalFalcon.java index ce69ce0ec0..75f8b5985e 100644 --- a/Mage.Sets/src/mage/cards/r/RoyalFalcon.java +++ b/Mage.Sets/src/mage/cards/r/RoyalFalcon.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class RoyalFalcon extends CardImpl { public RoyalFalcon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RoyalHerbalist.java b/Mage.Sets/src/mage/cards/r/RoyalHerbalist.java index 81ab3c3f21..1f50c62647 100644 --- a/Mage.Sets/src/mage/cards/r/RoyalHerbalist.java +++ b/Mage.Sets/src/mage/cards/r/RoyalHerbalist.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,8 +49,8 @@ public class RoyalHerbalist extends CardImpl { public RoyalHerbalist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RoyalTrooper.java b/Mage.Sets/src/mage/cards/r/RoyalTrooper.java index b3efc0a040..033ff1743c 100644 --- a/Mage.Sets/src/mage/cards/r/RoyalTrooper.java +++ b/Mage.Sets/src/mage/cards/r/RoyalTrooper.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class RoyalTrooper extends CardImpl { public RoyalTrooper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RubblebackRhino.java b/Mage.Sets/src/mage/cards/r/RubblebackRhino.java index 1ad6ed6395..3c9c746705 100644 --- a/Mage.Sets/src/mage/cards/r/RubblebackRhino.java +++ b/Mage.Sets/src/mage/cards/r/RubblebackRhino.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class RubblebackRhino extends CardImpl { public RubblebackRhino(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); - this.subtype.add("Rhino"); + this.subtype.add(SubType.RHINO); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RubblebeltMaaka.java b/Mage.Sets/src/mage/cards/r/RubblebeltMaaka.java index 7b9b7d0910..72ae8c838f 100644 --- a/Mage.Sets/src/mage/cards/r/RubblebeltMaaka.java +++ b/Mage.Sets/src/mage/cards/r/RubblebeltMaaka.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.BloodrushAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -47,7 +48,7 @@ public class RubblebeltMaaka extends CardImpl { public RubblebeltMaaka (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RubblebeltRaiders.java b/Mage.Sets/src/mage/cards/r/RubblebeltRaiders.java index 52729b8895..4d18e4c550 100644 --- a/Mage.Sets/src/mage/cards/r/RubblebeltRaiders.java +++ b/Mage.Sets/src/mage/cards/r/RubblebeltRaiders.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,8 +46,8 @@ public class RubblebeltRaiders extends CardImpl { public RubblebeltRaiders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R/G}{R/G}{R/G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/Rubblehulk.java b/Mage.Sets/src/mage/cards/r/Rubblehulk.java index 4db81fba0d..40140a756b 100644 --- a/Mage.Sets/src/mage/cards/r/Rubblehulk.java +++ b/Mage.Sets/src/mage/cards/r/Rubblehulk.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.BloodrushAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -53,7 +54,7 @@ public class Rubblehulk extends CardImpl { public Rubblehulk(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/r/RubiniaSoulsinger.java b/Mage.Sets/src/mage/cards/r/RubiniaSoulsinger.java index 55b72f2264..2f797ff696 100644 --- a/Mage.Sets/src/mage/cards/r/RubiniaSoulsinger.java +++ b/Mage.Sets/src/mage/cards/r/RubiniaSoulsinger.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class RubiniaSoulsinger extends CardImpl { public RubiniaSoulsinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RubyLeech.java b/Mage.Sets/src/mage/cards/r/RubyLeech.java index 48fc259e06..957cab0dfa 100644 --- a/Mage.Sets/src/mage/cards/r/RubyLeech.java +++ b/Mage.Sets/src/mage/cards/r/RubyLeech.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ColorPredicate; @@ -55,7 +56,7 @@ public class RubyLeech extends CardImpl { public RubyLeech(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Leech"); + this.subtype.add(SubType.LEECH); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RuhamDjinn.java b/Mage.Sets/src/mage/cards/r/RuhamDjinn.java index 44855fa0ea..cb988ee19e 100644 --- a/Mage.Sets/src/mage/cards/r/RuhamDjinn.java +++ b/Mage.Sets/src/mage/cards/r/RuhamDjinn.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class RuhamDjinn extends CardImpl { public RuhamDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RuhanOfTheFomori.java b/Mage.Sets/src/mage/cards/r/RuhanOfTheFomori.java index 5f151fd115..a604d35483 100644 --- a/Mage.Sets/src/mage/cards/r/RuhanOfTheFomori.java +++ b/Mage.Sets/src/mage/cards/r/RuhanOfTheFomori.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.AttackIfAbleTargetRandomOpponentSour import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; @@ -46,8 +47,8 @@ public class RuhanOfTheFomori extends CardImpl { public RuhanOfTheFomori(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/r/RuinGhost.java b/Mage.Sets/src/mage/cards/r/RuinGhost.java index 0b641ae3b0..f3e0bb3ff6 100644 --- a/Mage.Sets/src/mage/cards/r/RuinGhost.java +++ b/Mage.Sets/src/mage/cards/r/RuinGhost.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnToBattlefieldUnderYourControlTargetEf import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.target.TargetPermanent; @@ -50,7 +51,7 @@ public class RuinGhost extends CardImpl { public RuinGhost(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RuinProcessor.java b/Mage.Sets/src/mage/cards/r/RuinProcessor.java index 62cda102e5..8a9c72c013 100644 --- a/Mage.Sets/src/mage/cards/r/RuinProcessor.java +++ b/Mage.Sets/src/mage/cards/r/RuinProcessor.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class RuinProcessor extends CardImpl { public RuinProcessor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{7}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Processor"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.PROCESSOR); this.power = new MageInt(7); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/r/RuinRaider.java b/Mage.Sets/src/mage/cards/r/RuinRaider.java new file mode 100644 index 0000000000..3c69a9b1a2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RuinRaider.java @@ -0,0 +1,121 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * + * @author TheElk801 + */ +public class RuinRaider extends CardImpl { + + public RuinRaider(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Raid — At the beginning of your end step, if you attacked with a creature this turn, reveal the top card of your library and put that card into your hand. You lose life equal to the card's converted mana cost. + Ability ability = new ConditionalTriggeredAbility( + new BeginningOfEndStepTriggeredAbility(new RuinRaiderEffect(), TargetController.YOU, false), + RaidCondition.instance, + "Raid - At the beginning of your end step, if you attacked with a creature this turn, " + + "reveal the top card of your library and put that card into your hand. " + + "You lose life equal to the card's converted mana cost."); + this.addAbility(ability, new PlayerAttackedWatcher()); + } + + public RuinRaider(final RuinRaider card) { + super(card); + } + + @Override + public RuinRaider copy() { + return new RuinRaider(this); + } +} + +class RuinRaiderEffect extends OneShotEffect { + + RuinRaiderEffect() { + super(Outcome.DrawCard); + this.staticText = "reveal the top card of your library and put that card into your hand. You lose life equal to its converted mana cost"; + } + + RuinRaiderEffect(final RuinRaiderEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (controller != null && sourcePermanent != null) { + if (controller.getLibrary().hasCards()) { + Card card = controller.getLibrary().removeFromTop(game); + if (card != null) { + Cards cards = new CardsImpl(card); + controller.revealCards(sourcePermanent.getIdName(), cards, game); + controller.moveCards(card, Zone.HAND, source, game); + controller.loseLife(card.getConvertedManaCost(), game, false); + + } + return true; + } + } + return false; + } + + @Override + public RuinRaiderEffect copy() { + return new RuinRaiderEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RuinRat.java b/Mage.Sets/src/mage/cards/r/RuinRat.java index 47e3851981..943d4ae00a 100644 --- a/Mage.Sets/src/mage/cards/r/RuinRat.java +++ b/Mage.Sets/src/mage/cards/r/RuinRat.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.target.common.TargetCardInOpponentsGraveyard; @@ -47,7 +48,7 @@ public class RuinRat extends CardImpl { public RuinRat(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RuinationGuide.java b/Mage.Sets/src/mage/cards/r/RuinationGuide.java index a89b448ea1..277d46cf6d 100644 --- a/Mage.Sets/src/mage/cards/r/RuinationGuide.java +++ b/Mage.Sets/src/mage/cards/r/RuinationGuide.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.IngestAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -55,8 +56,8 @@ public class RuinationGuide extends CardImpl { public RuinationGuide(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RuinationWurm.java b/Mage.Sets/src/mage/cards/r/RuinationWurm.java index 8bcada9135..82abca389e 100644 --- a/Mage.Sets/src/mage/cards/r/RuinationWurm.java +++ b/Mage.Sets/src/mage/cards/r/RuinationWurm.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class RuinationWurm extends CardImpl { public RuinationWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(7); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/r/RuinousGremlin.java b/Mage.Sets/src/mage/cards/r/RuinousGremlin.java index 1c8754a165..3e5b3dcb6e 100644 --- a/Mage.Sets/src/mage/cards/r/RuinousGremlin.java +++ b/Mage.Sets/src/mage/cards/r/RuinousGremlin.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetArtifactPermanent; @@ -48,7 +49,7 @@ public class RuinousGremlin extends CardImpl { public RuinousGremlin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Gremlin"); + this.subtype.add(SubType.GREMLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RuinousMinotaur.java b/Mage.Sets/src/mage/cards/r/RuinousMinotaur.java index dfcd6dc864..9fa88400a5 100644 --- a/Mage.Sets/src/mage/cards/r/RuinousMinotaur.java +++ b/Mage.Sets/src/mage/cards/r/RuinousMinotaur.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; /** @@ -44,8 +45,8 @@ public class RuinousMinotaur extends CardImpl { public RuinousMinotaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RukhEgg.java b/Mage.Sets/src/mage/cards/r/RukhEgg.java index 4bf72415a2..eb10a12f71 100644 --- a/Mage.Sets/src/mage/cards/r/RukhEgg.java +++ b/Mage.Sets/src/mage/cards/r/RukhEgg.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.RukhEggBirdToken; /** @@ -48,7 +49,7 @@ public class RukhEgg extends CardImpl { public RukhEgg(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RuleOfTwo.java b/Mage.Sets/src/mage/cards/r/RuleOfTwo.java index a9fbf422a0..0581ae679a 100644 --- a/Mage.Sets/src/mage/cards/r/RuleOfTwo.java +++ b/Mage.Sets/src/mage/cards/r/RuleOfTwo.java @@ -1,82 +1,82 @@ -/* - * 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.cards.r; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.condition.common.CreatureCountCondition; -import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.effects.ContinuousEffect; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.continuous.BoostControlledEffect; -import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; -import mage.abilities.keyword.DeathtouchAbility; -import mage.abilities.keyword.LifelinkAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; - -/** - * - * @author Styxo - */ -public class RuleOfTwo extends CardImpl { - - public RuleOfTwo(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}{B}"); - - // As long as you control exatly two creatures, those creatures get +2/+0 and have deathtouch and lifelink. - ContinuousEffect boostEffect = new BoostControlledEffect(2, 0, Duration.WhileOnBattlefield); - Effect effect = new ConditionalContinuousEffect(boostEffect, new CreatureCountCondition(2, TargetController.YOU), - "As long as you control exactly two creatures, those creatures get +2/+0"); - Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); - ContinuousEffect deathtouchEffect = new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent()); - effect = new ConditionalContinuousEffect(deathtouchEffect, new CreatureCountCondition(2, TargetController.YOU), - "and have deathtouch"); - ability.addEffect(effect); - ContinuousEffect lifelinkEffect = new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent()); - effect = new ConditionalContinuousEffect(lifelinkEffect, new CreatureCountCondition(2, TargetController.YOU), - "and lifelink"); - ability.addEffect(effect); - this.addAbility(ability); - } - - public RuleOfTwo(final RuleOfTwo card) { - super(card); - } - - @Override - public RuleOfTwo copy() { - return new RuleOfTwo(this); - } -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CreatureCountCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author Styxo + */ +public class RuleOfTwo extends CardImpl { + + public RuleOfTwo(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}{B}"); + + // As long as you control exatly two creatures, those creatures get +2/+0 and have deathtouch and lifelink. + ContinuousEffect boostEffect = new BoostControlledEffect(2, 0, Duration.WhileOnBattlefield); + Effect effect = new ConditionalContinuousEffect(boostEffect, new CreatureCountCondition(2, TargetController.YOU), + "As long as you control exactly two creatures, those creatures get +2/+0"); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); + ContinuousEffect deathtouchEffect = new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent()); + effect = new ConditionalContinuousEffect(deathtouchEffect, new CreatureCountCondition(2, TargetController.YOU), + "and have deathtouch"); + ability.addEffect(effect); + ContinuousEffect lifelinkEffect = new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent()); + effect = new ConditionalContinuousEffect(lifelinkEffect, new CreatureCountCondition(2, TargetController.YOU), + "and lifelink"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public RuleOfTwo(final RuleOfTwo card) { + super(card); + } + + @Override + public RuleOfTwo copy() { + return new RuleOfTwo(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RumblingBaloth.java b/Mage.Sets/src/mage/cards/r/RumblingBaloth.java index a9b6dccde3..099e2ee17c 100644 --- a/Mage.Sets/src/mage/cards/r/RumblingBaloth.java +++ b/Mage.Sets/src/mage/cards/r/RumblingBaloth.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class RumblingBaloth extends CardImpl { public RumblingBaloth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RumblingCrescendo.java b/Mage.Sets/src/mage/cards/r/RumblingCrescendo.java new file mode 100644 index 0000000000..093b89338a --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RumblingCrescendo.java @@ -0,0 +1,87 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetAdjustment; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public class RumblingCrescendo extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("up to X target lands, where X is the number of verse counters on {this}"); + + static { + filter.add(new CardTypePredicate(CardType.LAND)); + } + + public RumblingCrescendo(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}{R}"); + + // At the beginning of your upkeep, you may put a verse counter on Rumbling Crescendo. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, + new AddCountersSourceEffect(CounterType.VERSE.createInstance(), true), TargetController.YOU, true)); + + // {R}, Sacrifice Rumbling Crescendo: Destroy up to X target lands, where X is the number of verse counters on Rumbling Crescendo. + Effect effect = new DestroyTargetEffect(true); + effect.setText("Destroy up to X target lands, where X is the number of verse counters on {this}."); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{R}")); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetPermanent(0, 0, filter, false)); + ability.setTargetAdjustment(TargetAdjustment.VERSE_COUNTER_TARGETS); + this.addAbility(ability); + } + + public RumblingCrescendo(final RumblingCrescendo card) { + super(card); + } + + @Override + public RumblingCrescendo copy() { + return new RumblingCrescendo(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RumblingSlum.java b/Mage.Sets/src/mage/cards/r/RumblingSlum.java index 46ec733c3c..00c4261121 100644 --- a/Mage.Sets/src/mage/cards/r/RumblingSlum.java +++ b/Mage.Sets/src/mage/cards/r/RumblingSlum.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamagePlayersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class RumblingSlum extends CardImpl { public RumblingSlum(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RummagingGoblin.java b/Mage.Sets/src/mage/cards/r/RummagingGoblin.java index 548bd5f01b..16fcd53c42 100644 --- a/Mage.Sets/src/mage/cards/r/RummagingGoblin.java +++ b/Mage.Sets/src/mage/cards/r/RummagingGoblin.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCardInHand; @@ -47,8 +48,8 @@ public class RummagingGoblin extends CardImpl { public RummagingGoblin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RummagingWizard.java b/Mage.Sets/src/mage/cards/r/RummagingWizard.java index 52e75fba8f..5dfc87cf63 100644 --- a/Mage.Sets/src/mage/cards/r/RummagingWizard.java +++ b/Mage.Sets/src/mage/cards/r/RummagingWizard.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -51,8 +52,8 @@ public class RummagingWizard extends CardImpl { public RummagingWizard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RumorMonger.java b/Mage.Sets/src/mage/cards/r/RumorMonger.java index e8db8e54f2..390bd68cf1 100644 --- a/Mage.Sets/src/mage/cards/r/RumorMonger.java +++ b/Mage.Sets/src/mage/cards/r/RumorMonger.java @@ -1,75 +1,76 @@ -/* - * 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.cards.r; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.abilities.effects.common.counter.MoveCountersTargetsEffect; -import mage.abilities.keyword.BountyAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.counters.CounterType; -import mage.target.common.TargetOpponentsCreaturePermanent; - -/** - * - * @author Styxo - */ -public class RumorMonger extends CardImpl { - - public RumorMonger(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}{G}"); - this.subtype.add("Arcona"); - this.subtype.add("Hunter"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // When Rumor Monger enters the battlefield, put a bounty counter on up to two target creatures an opponent controls. - Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance())); - ability.addTarget(new TargetOpponentsCreaturePermanent(0, 2)); - this.addAbility(ability); - - // Bounty — Whenever a creature an opponent controls with a bounty counter on it dies, you may move a bounty counter from one target creature to another target creatute. - ability = new BountyAbility(new MoveCountersTargetsEffect(CounterType.BOUNTY, 1), false); - ability.addTarget(new TargetOpponentsCreaturePermanent(2)); - this.addAbility(ability); - } - - public RumorMonger(final RumorMonger card) { - super(card); - } - - @Override - public RumorMonger copy() { - return new RumorMonger(this); - } -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.effects.common.counter.MoveCountersTargetsEffect; +import mage.abilities.keyword.BountyAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.target.common.TargetOpponentsCreaturePermanent; + +/** + * + * @author Styxo + */ +public class RumorMonger extends CardImpl { + + public RumorMonger(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}{G}"); + this.subtype.add(SubType.ARCONA); + this.subtype.add(SubType.HUNTER); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Rumor Monger enters the battlefield, put a bounty counter on up to two target creatures an opponent controls. + Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance())); + ability.addTarget(new TargetOpponentsCreaturePermanent(0, 2)); + this.addAbility(ability); + + // Bounty — Whenever a creature an opponent controls with a bounty counter on it dies, you may move a bounty counter from one target creature to another target creatute. + ability = new BountyAbility(new MoveCountersTargetsEffect(CounterType.BOUNTY, 1), false); + ability.addTarget(new TargetOpponentsCreaturePermanent(2)); + this.addAbility(ability); + } + + public RumorMonger(final RumorMonger card) { + super(card); + } + + @Override + public RumorMonger copy() { + return new RumorMonger(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RunAground.java b/Mage.Sets/src/mage/cards/r/RunAground.java new file mode 100644 index 0000000000..c6005cd266 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RunAground.java @@ -0,0 +1,60 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.effects.common.PutOnLibraryTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.StaticFilters; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public class RunAground extends CardImpl { + + public RunAground(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}"); + + // Put target artifact or creature on top of it's owner's library. + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE)); + this.getSpellAbility().addEffect(new PutOnLibraryTargetEffect(true)); + } + + public RunAground(final RunAground card) { + super(card); + } + + @Override + public RunAground copy() { + return new RunAground(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RunWild.java b/Mage.Sets/src/mage/cards/r/RunWild.java index c2f369e9ef..2b0591e3fa 100644 --- a/Mage.Sets/src/mage/cards/r/RunWild.java +++ b/Mage.Sets/src/mage/cards/r/RunWild.java @@ -1,73 +1,73 @@ -/* - * 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.cards.r; - -import java.util.UUID; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.RegenerateSourceEffect; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.abilities.keyword.TrampleAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Derpthemeus - */ -public class RunWild extends CardImpl { - - public RunWild(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); - - // Until end of turn, target creature gains trample and "{G}: Regenerate this creature." - this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - Effect effect1 = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn); - effect1.setText("Until end of turn, target creature gains trample"); - this.getSpellAbility().addEffect(effect1); - - Effect effect2 = new GainAbilityTargetEffect(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{G}")), Duration.EndOfTurn); - effect2.setText("and \"{G}: Regenerate this creature\""); - this.getSpellAbility().addEffect(effect2); - - } - - public RunWild(final RunWild card) { - super(card); - } - - @Override - public RunWild copy() { - return new RunWild(this); - } -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.RegenerateSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Derpthemeus + */ +public class RunWild extends CardImpl { + + public RunWild(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); + + // Until end of turn, target creature gains trample and "{G}: Regenerate this creature." + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + Effect effect1 = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn); + effect1.setText("Until end of turn, target creature gains trample"); + this.getSpellAbility().addEffect(effect1); + + Effect effect2 = new GainAbilityTargetEffect(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{G}")), Duration.EndOfTurn); + effect2.setText("and \"{G}: Regenerate this creature\""); + this.getSpellAbility().addEffect(effect2); + + } + + public RunWild(final RunWild card) { + super(card); + } + + @Override + public RunWild copy() { + return new RunWild(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RunawayCarriage.java b/Mage.Sets/src/mage/cards/r/RunawayCarriage.java index a17312f0fb..3512789fde 100644 --- a/Mage.Sets/src/mage/cards/r/RunawayCarriage.java +++ b/Mage.Sets/src/mage/cards/r/RunawayCarriage.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class RunawayCarriage extends CardImpl { public RunawayCarriage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/r/RuneCervinRider.java b/Mage.Sets/src/mage/cards/r/RuneCervinRider.java index 2ea13873d8..e263442871 100644 --- a/Mage.Sets/src/mage/cards/r/RuneCervinRider.java +++ b/Mage.Sets/src/mage/cards/r/RuneCervinRider.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class RuneCervinRider extends CardImpl { public RuneCervinRider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Elf"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RuneScarredDemon.java b/Mage.Sets/src/mage/cards/r/RuneScarredDemon.java index 1667a497b3..131c7aff1e 100644 --- a/Mage.Sets/src/mage/cards/r/RuneScarredDemon.java +++ b/Mage.Sets/src/mage/cards/r/RuneScarredDemon.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCardInLibrary; /** @@ -47,7 +48,7 @@ public class RuneScarredDemon extends CardImpl { public RuneScarredDemon (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(6 ); diff --git a/Mage.Sets/src/mage/cards/r/RuneTailKitsuneAscendant.java b/Mage.Sets/src/mage/cards/r/RuneTailKitsuneAscendant.java index 904e9a083e..88c92e74d8 100644 --- a/Mage.Sets/src/mage/cards/r/RuneTailKitsuneAscendant.java +++ b/Mage.Sets/src/mage/cards/r/RuneTailKitsuneAscendant.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventAllDamageToAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class RuneTailKitsuneAscendant extends CardImpl { public RuneTailKitsuneAscendant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Fox"); - this.subtype.add("Monk"); + this.subtype.add(SubType.FOX); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RunechantersPike.java b/Mage.Sets/src/mage/cards/r/RunechantersPike.java index 3a2ab96f72..433cc9f9ee 100644 --- a/Mage.Sets/src/mage/cards/r/RunechantersPike.java +++ b/Mage.Sets/src/mage/cards/r/RunechantersPike.java @@ -62,7 +62,7 @@ public class RunechantersPike extends CardImpl { public RunechantersPike(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equip {2} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); diff --git a/Mage.Sets/src/mage/cards/r/RuneclawBear.java b/Mage.Sets/src/mage/cards/r/RuneclawBear.java index 0bb9c91386..ad2ddd31b9 100644 --- a/Mage.Sets/src/mage/cards/r/RuneclawBear.java +++ b/Mage.Sets/src/mage/cards/r/RuneclawBear.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class RuneclawBear extends CardImpl { public RuneclawBear(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Bear"); + this.subtype.add(SubType.BEAR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RunedServitor.java b/Mage.Sets/src/mage/cards/r/RunedServitor.java index 8c0352e276..dfe3a635bf 100644 --- a/Mage.Sets/src/mage/cards/r/RunedServitor.java +++ b/Mage.Sets/src/mage/cards/r/RunedServitor.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class RunedServitor extends CardImpl { public RunedServitor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(2); this.addAbility(new DiesTriggeredAbility(new DrawCardAllEffect(1), false)); diff --git a/Mage.Sets/src/mage/cards/r/RunedStalactite.java b/Mage.Sets/src/mage/cards/r/RunedStalactite.java index 0cf934f966..22bcf9d65e 100644 --- a/Mage.Sets/src/mage/cards/r/RunedStalactite.java +++ b/Mage.Sets/src/mage/cards/r/RunedStalactite.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class RunedStalactite extends CardImpl { public RunedStalactite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1 and is every creature type. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1,1))); diff --git a/Mage.Sets/src/mage/cards/r/RunehornHellkite.java b/Mage.Sets/src/mage/cards/r/RunehornHellkite.java index 2ee066d03c..ef56221d79 100644 --- a/Mage.Sets/src/mage/cards/r/RunehornHellkite.java +++ b/Mage.Sets/src/mage/cards/r/RunehornHellkite.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -51,7 +52,7 @@ public class RunehornHellkite extends CardImpl { public RunehornHellkite(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RunesOfTheDeus.java b/Mage.Sets/src/mage/cards/r/RunesOfTheDeus.java index 17fbdd5d71..9dca3c22d0 100644 --- a/Mage.Sets/src/mage/cards/r/RunesOfTheDeus.java +++ b/Mage.Sets/src/mage/cards/r/RunesOfTheDeus.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -56,7 +57,7 @@ public class RunesOfTheDeus extends CardImpl { public RunesOfTheDeus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{R/G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/r/Runewing.java b/Mage.Sets/src/mage/cards/r/Runewing.java index 82b3cdd853..d712784941 100644 --- a/Mage.Sets/src/mage/cards/r/Runewing.java +++ b/Mage.Sets/src/mage/cards/r/Runewing.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -53,7 +54,7 @@ public class Runewing extends CardImpl { public Runewing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RunnersBane.java b/Mage.Sets/src/mage/cards/r/RunnersBane.java index 5c725610d8..9468a32c0b 100644 --- a/Mage.Sets/src/mage/cards/r/RunnersBane.java +++ b/Mage.Sets/src/mage/cards/r/RunnersBane.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class RunnersBane extends CardImpl { } public RunnersBane(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature with power 3 or less diff --git a/Mage.Sets/src/mage/cards/r/RuricTharTheUnbowed.java b/Mage.Sets/src/mage/cards/r/RuricTharTheUnbowed.java index fa596c8754..77cb2985b7 100644 --- a/Mage.Sets/src/mage/cards/r/RuricTharTheUnbowed.java +++ b/Mage.Sets/src/mage/cards/r/RuricTharTheUnbowed.java @@ -30,7 +30,7 @@ package mage.cards.r; import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.keyword.ReachAbility; @@ -38,6 +38,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.game.Game; @@ -55,8 +56,8 @@ public class RuricTharTheUnbowed extends CardImpl { public RuricTharTheUnbowed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(6); this.toughness = new MageInt(6); @@ -68,7 +69,7 @@ public class RuricTharTheUnbowed extends CardImpl { this.addAbility(ReachAbility.getInstance()); // Ruric Thar, the Unbowed attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); // Whenever a player casts a noncreature spell, Ruric Thar deals 6 damage to that player. this.addAbility(new RuricTharTheUnbowedAbility()); diff --git a/Mage.Sets/src/mage/cards/r/RushingTideZubera.java b/Mage.Sets/src/mage/cards/r/RushingTideZubera.java index d6e6518417..cbad26db52 100644 --- a/Mage.Sets/src/mage/cards/r/RushingTideZubera.java +++ b/Mage.Sets/src/mage/cards/r/RushingTideZubera.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; @@ -50,8 +51,8 @@ public class RushingTideZubera extends CardImpl { public RushingTideZubera(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Zubera"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.ZUBERA); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RushwoodDryad.java b/Mage.Sets/src/mage/cards/r/RushwoodDryad.java index 766e960659..ab8e3dd029 100644 --- a/Mage.Sets/src/mage/cards/r/RushwoodDryad.java +++ b/Mage.Sets/src/mage/cards/r/RushwoodDryad.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class RushwoodDryad extends CardImpl { public RushwoodDryad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Dryad"); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RushwoodElemental.java b/Mage.Sets/src/mage/cards/r/RushwoodElemental.java index f3124dc998..f845a54064 100644 --- a/Mage.Sets/src/mage/cards/r/RushwoodElemental.java +++ b/Mage.Sets/src/mage/cards/r/RushwoodElemental.java @@ -1,67 +1,68 @@ -/* - * 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.cards.r; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.abilities.keyword.TrampleAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.TargetController; -import mage.counters.CounterType; - -/** - * - * @author Derpthemeus - */ -public class RushwoodElemental extends CardImpl { - - public RushwoodElemental(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}{G}{G}{G}"); - this.subtype.add("Elemental"); - this.power = new MageInt(4); - this.toughness = new MageInt(4); - - // Trample - this.addAbility(TrampleAbility.getInstance()); - // At the beginning of your upkeep, you may put a +1/+1 counter on Rushwood Elemental. - this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), TargetController.YOU, true)); - } - - public RushwoodElemental(final RushwoodElemental card) { - super(card); - } - - @Override - public RushwoodElemental copy() { - return new RushwoodElemental(this); - } -} +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.counters.CounterType; + +/** + * + * @author Derpthemeus + */ +public class RushwoodElemental extends CardImpl { + + public RushwoodElemental(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}{G}{G}{G}"); + this.subtype.add(SubType.ELEMENTAL); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + // At the beginning of your upkeep, you may put a +1/+1 counter on Rushwood Elemental. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), TargetController.YOU, true)); + } + + public RushwoodElemental(final RushwoodElemental card) { + super(card); + } + + @Override + public RushwoodElemental copy() { + return new RushwoodElemental(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RushwoodHerbalist.java b/Mage.Sets/src/mage/cards/r/RushwoodHerbalist.java index a79edca715..6beb21ed0e 100644 --- a/Mage.Sets/src/mage/cards/r/RushwoodHerbalist.java +++ b/Mage.Sets/src/mage/cards/r/RushwoodHerbalist.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.RegenerateTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class RushwoodHerbalist extends CardImpl { public RushwoodHerbalist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RushwoodLegate.java b/Mage.Sets/src/mage/cards/r/RushwoodLegate.java index 932062e5dd..89814d991b 100644 --- a/Mage.Sets/src/mage/cards/r/RushwoodLegate.java +++ b/Mage.Sets/src/mage/cards/r/RushwoodLegate.java @@ -57,7 +57,7 @@ public class RushwoodLegate extends CardImpl { public RushwoodLegate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Dryad"); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RussetWolves.java b/Mage.Sets/src/mage/cards/r/RussetWolves.java index 1e666bfdcf..bf715746a6 100644 --- a/Mage.Sets/src/mage/cards/r/RussetWolves.java +++ b/Mage.Sets/src/mage/cards/r/RussetWolves.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class RussetWolves extends CardImpl { public RussetWolves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/Rust.java b/Mage.Sets/src/mage/cards/r/Rust.java index c1f5f4edc9..21dd121bf9 100644 --- a/Mage.Sets/src/mage/cards/r/Rust.java +++ b/Mage.Sets/src/mage/cards/r/Rust.java @@ -46,7 +46,7 @@ import mage.target.common.TargetActivatedOrTriggeredAbility; */ public class Rust extends CardImpl { - private final static FilterStackObject filter = new FilterStackObject("ability from an artifact source"); + private final static FilterStackObject filter = new FilterStackObject("activated ability from an artifact source"); static { filter.add(new ArtifactSourcePredicate()); diff --git a/Mage.Sets/src/mage/cards/r/RustElemental.java b/Mage.Sets/src/mage/cards/r/RustElemental.java index b072fa2b55..0dcfa969f8 100644 --- a/Mage.Sets/src/mage/cards/r/RustElemental.java +++ b/Mage.Sets/src/mage/cards/r/RustElemental.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterControlledArtifactPermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -53,7 +54,7 @@ public class RustElemental extends CardImpl { public RustElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RustScarab.java b/Mage.Sets/src/mage/cards/r/RustScarab.java index ecdef037e0..a72a0a36e7 100644 --- a/Mage.Sets/src/mage/cards/r/RustScarab.java +++ b/Mage.Sets/src/mage/cards/r/RustScarab.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; @@ -54,7 +55,7 @@ public class RustScarab extends CardImpl { public RustScarab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/r/RustTick.java b/Mage.Sets/src/mage/cards/r/RustTick.java index f0d09aee4d..3b97b719db 100644 --- a/Mage.Sets/src/mage/cards/r/RustTick.java +++ b/Mage.Sets/src/mage/cards/r/RustTick.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetArtifactPermanent; @@ -49,7 +50,7 @@ public class RustTick extends CardImpl { public RustTick(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RustedRelic.java b/Mage.Sets/src/mage/cards/r/RustedRelic.java index 66e1f3bc9e..5776ef48e7 100644 --- a/Mage.Sets/src/mage/cards/r/RustedRelic.java +++ b/Mage.Sets/src/mage/cards/r/RustedRelic.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -71,7 +72,7 @@ class RustedRelicToken extends Token { public RustedRelicToken() { super("Rusted Relic", "5/5 Golem artifact creature"); cardType.add(CardType.CREATURE); - subtype.add("Golem"); + subtype.add(SubType.GOLEM); power = new MageInt(5); toughness = new MageInt(5); } diff --git a/Mage.Sets/src/mage/cards/r/RustedSentinel.java b/Mage.Sets/src/mage/cards/r/RustedSentinel.java index 06924d7b82..2968aa2d76 100644 --- a/Mage.Sets/src/mage/cards/r/RustedSentinel.java +++ b/Mage.Sets/src/mage/cards/r/RustedSentinel.java @@ -34,6 +34,7 @@ import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -42,7 +43,7 @@ public class RustedSentinel extends CardImpl { public RustedSentinel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(4); this.addAbility(new EntersBattlefieldTappedAbility()); diff --git a/Mage.Sets/src/mage/cards/r/RustedSlasher.java b/Mage.Sets/src/mage/cards/r/RustedSlasher.java index 95e5f2bdba..c9a63a6ad2 100644 --- a/Mage.Sets/src/mage/cards/r/RustedSlasher.java +++ b/Mage.Sets/src/mage/cards/r/RustedSlasher.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -54,7 +55,7 @@ public class RustedSlasher extends CardImpl { public RustedSlasher (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(1); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new SacrificeTargetCost(new TargetControlledPermanent(filter)))); diff --git a/Mage.Sets/src/mage/cards/r/RustingGolem.java b/Mage.Sets/src/mage/cards/r/RustingGolem.java index 1a13ae2742..ebcda5deac 100644 --- a/Mage.Sets/src/mage/cards/r/RustingGolem.java +++ b/Mage.Sets/src/mage/cards/r/RustingGolem.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FadingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -48,7 +49,7 @@ public class RustingGolem extends CardImpl { public RustingGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/r/RustmouthOgre.java b/Mage.Sets/src/mage/cards/r/RustmouthOgre.java index e94c6df361..74e295c4de 100644 --- a/Mage.Sets/src/mage/cards/r/RustmouthOgre.java +++ b/Mage.Sets/src/mage/cards/r/RustmouthOgre.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterArtifactPermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; @@ -51,7 +52,7 @@ public class RustmouthOgre extends CardImpl { public RustmouthOgre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Ogre"); + this.subtype.add(SubType.OGRE); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RustrazorButcher.java b/Mage.Sets/src/mage/cards/r/RustrazorButcher.java index 5337a878f3..777c9f1fc3 100644 --- a/Mage.Sets/src/mage/cards/r/RustrazorButcher.java +++ b/Mage.Sets/src/mage/cards/r/RustrazorButcher.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class RustrazorButcher extends CardImpl { public RustrazorButcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RustsporeRam.java b/Mage.Sets/src/mage/cards/r/RustsporeRam.java index 261829255c..80fcfaad54 100644 --- a/Mage.Sets/src/mage/cards/r/RustsporeRam.java +++ b/Mage.Sets/src/mage/cards/r/RustsporeRam.java @@ -54,7 +54,7 @@ public class RustsporeRam extends CardImpl { public RustsporeRam(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Sheep"); + this.subtype.add(SubType.SHEEP); this.power = new MageInt(1); this.toughness = new MageInt(3); Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); diff --git a/Mage.Sets/src/mage/cards/r/RuthlessCullblade.java b/Mage.Sets/src/mage/cards/r/RuthlessCullblade.java index 92c8290a06..e909aa1a1a 100644 --- a/Mage.Sets/src/mage/cards/r/RuthlessCullblade.java +++ b/Mage.Sets/src/mage/cards/r/RuthlessCullblade.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class RuthlessCullblade extends CardImpl { public RuthlessCullblade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RuthlessDeathfang.java b/Mage.Sets/src/mage/cards/r/RuthlessDeathfang.java index 72aaba38c0..2bc9412141 100644 --- a/Mage.Sets/src/mage/cards/r/RuthlessDeathfang.java +++ b/Mage.Sets/src/mage/cards/r/RuthlessDeathfang.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.game.Game; @@ -51,7 +52,7 @@ public class RuthlessDeathfang extends CardImpl { public RuthlessDeathfang(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{B}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/r/RuthlessKnave.java b/Mage.Sets/src/mage/cards/r/RuthlessKnave.java new file mode 100644 index 0000000000..96f7b85fda --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RuthlessKnave.java @@ -0,0 +1,91 @@ +/* + * 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.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.TreasureToken; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author TheElk801 + */ +public class RuthlessKnave extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("three Treasures"); + + static { + filter.add(new SubtypePredicate(SubType.TREASURE)); + } + + public RuthlessKnave(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // {2}{B}, Sacrifice a creature: Create two colorless Treasure artifact tokens with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool." + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new TreasureToken(), 2), new ManaCostsImpl("{2}{B}")); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature"), true))); + this.addAbility(ability); + + // Sacrifice three Treasures: Draw a card. + this.addAbility(new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new DrawCardSourceControllerEffect(1), + new SacrificeTargetCost(new TargetControlledPermanent(3, 3, filter, false)) + )); + } + + public RuthlessKnave(final RuthlessKnave card) { + super(card); + } + + @Override + public RuthlessKnave copy() { + return new RuthlessKnave(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RuthlessRipper.java b/Mage.Sets/src/mage/cards/r/RuthlessRipper.java index b6ffc18fd7..9a2a677268 100644 --- a/Mage.Sets/src/mage/cards/r/RuthlessRipper.java +++ b/Mage.Sets/src/mage/cards/r/RuthlessRipper.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ColorPredicate; import mage.target.TargetPlayer; @@ -58,8 +59,8 @@ public class RuthlessRipper extends CardImpl { public RuthlessRipper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Human"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/r/RuthlessSniper.java b/Mage.Sets/src/mage/cards/r/RuthlessSniper.java index 0a98701e0b..9f392700ec 100644 --- a/Mage.Sets/src/mage/cards/r/RuthlessSniper.java +++ b/Mage.Sets/src/mage/cards/r/RuthlessSniper.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class RuthlessSniper extends CardImpl { public RuthlessSniper(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); - this.subtype.add("Human"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/r/RyuseiTheFallingStar.java b/Mage.Sets/src/mage/cards/r/RyuseiTheFallingStar.java index eb98eb7bbf..9eccea4f3b 100644 --- a/Mage.Sets/src/mage/cards/r/RyuseiTheFallingStar.java +++ b/Mage.Sets/src/mage/cards/r/RyuseiTheFallingStar.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -55,8 +56,8 @@ public class RyuseiTheFallingStar extends CardImpl { public RyuseiTheFallingStar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DRAGON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SabaccGame.java b/Mage.Sets/src/mage/cards/s/SabaccGame.java index 1f21c7b4ca..5b02bae158 100644 --- a/Mage.Sets/src/mage/cards/s/SabaccGame.java +++ b/Mage.Sets/src/mage/cards/s/SabaccGame.java @@ -1,134 +1,134 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.ContinuousEffect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.continuous.GainControlTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.filter.FilterPermanent; -import mage.filter.predicate.permanent.ControllerIdPredicate; -import mage.filter.predicate.permanent.ControllerPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.TargetPermanent; -import mage.target.targetpointer.FixedTarget; - -/** - * - * @author Styxo - */ -public class SabaccGame extends CardImpl { - - private static final FilterPermanent filter = new FilterPermanent("permanent an opponent controls"); - - static { - filter.add(new ControllerPredicate(TargetController.OPPONENT)); - } - - public SabaccGame(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{U}"); - - /* - * Choose target permanent an opponent controls. That opponent chooses a permanent you control. - * Flip a coin. If you win the flip, gain control of the permanent you chose. - * If you lose the flip, your opponent gains control of the permanent they chose. - */ - this.getSpellAbility().getEffects().add(new SabaccGameEffect()); - this.getSpellAbility().getTargets().add(new TargetPermanent(filter)); - } - - public SabaccGame(final SabaccGame card) { - super(card); - } - - @Override - public SabaccGame copy() { - return new SabaccGame(this); - } -} - -class SabaccGameEffect extends OneShotEffect { - - public SabaccGameEffect() { - super(Outcome.Detriment); - this.staticText = "Choose target permanent an opponent controls. That opponent chooses a permanent you control. " - + "Flip a coin. If you win the flip, gain control of the permanent you chose. " - + "If you lose the flip, your opponent gains control of the permanent they chose"; - } - - public SabaccGameEffect(final SabaccGameEffect effect) { - super(effect); - } - - @Override - public SabaccGameEffect copy() { - return new SabaccGameEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Permanent targetPermanent = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source)); - if (targetPermanent != null) { - Player opponent = game.getPlayer(targetPermanent.getControllerId()); - if (opponent != null) { - FilterPermanent filter = new FilterPermanent("permanent controlled by " + controller.getName()); - filter.add(new ControllerIdPredicate(controller.getId())); - TargetPermanent target = new TargetPermanent(1, 1, filter, true); - Permanent chosenPermanent = null; - if (target.chooseTarget(outcome, opponent.getId(), source, game)) { - chosenPermanent = game.getPermanent(target.getFirstTarget()); - } - boolean flipWin = controller.flipCoin(game); - if (flipWin) { - ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, true, controller.getId()); - effect.setTargetPointer(new FixedTarget(targetPermanent, game)); - game.addEffect(effect, source); - } else if (chosenPermanent != null) { - ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, true, opponent.getId()); - effect.setTargetPointer(new FixedTarget(chosenPermanent, game)); - game.addEffect(effect, source); - } - - } - } - return true; - } - return false; - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author Styxo + */ +public class SabaccGame extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("permanent an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public SabaccGame(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{U}"); + + /* + * Choose target permanent an opponent controls. That opponent chooses a permanent you control. + * Flip a coin. If you win the flip, gain control of the permanent you chose. + * If you lose the flip, your opponent gains control of the permanent they chose. + */ + this.getSpellAbility().getEffects().add(new SabaccGameEffect()); + this.getSpellAbility().getTargets().add(new TargetPermanent(filter)); + } + + public SabaccGame(final SabaccGame card) { + super(card); + } + + @Override + public SabaccGame copy() { + return new SabaccGame(this); + } +} + +class SabaccGameEffect extends OneShotEffect { + + public SabaccGameEffect() { + super(Outcome.Detriment); + this.staticText = "Choose target permanent an opponent controls. That opponent chooses a permanent you control. " + + "Flip a coin. If you win the flip, gain control of the permanent you chose. " + + "If you lose the flip, your opponent gains control of the permanent they chose"; + } + + public SabaccGameEffect(final SabaccGameEffect effect) { + super(effect); + } + + @Override + public SabaccGameEffect copy() { + return new SabaccGameEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Permanent targetPermanent = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source)); + if (targetPermanent != null) { + Player opponent = game.getPlayer(targetPermanent.getControllerId()); + if (opponent != null) { + FilterPermanent filter = new FilterPermanent("permanent controlled by " + controller.getName()); + filter.add(new ControllerIdPredicate(controller.getId())); + TargetPermanent target = new TargetPermanent(1, 1, filter, true); + Permanent chosenPermanent = null; + if (target.chooseTarget(outcome, opponent.getId(), source, game)) { + chosenPermanent = game.getPermanent(target.getFirstTarget()); + } + boolean flipWin = controller.flipCoin(game); + if (flipWin) { + ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, true, controller.getId()); + effect.setTargetPointer(new FixedTarget(targetPermanent, game)); + game.addEffect(effect, source); + } else if (chosenPermanent != null) { + ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, true, opponent.getId()); + effect.setTargetPointer(new FixedTarget(chosenPermanent, game)); + game.addEffect(effect, source); + } + + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SaberAnts.java b/Mage.Sets/src/mage/cards/s/SaberAnts.java index 24d245d374..76d872ed7e 100644 --- a/Mage.Sets/src/mage/cards/s/SaberAnts.java +++ b/Mage.Sets/src/mage/cards/s/SaberAnts.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -45,18 +46,18 @@ import mage.players.Player; /** * * @author LoneFox - + * */ public class SaberAnts extends CardImpl { public SaberAnts(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Insect"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(2); this.toughness = new MageInt(3); // Whenever Saber Ants is dealt damage, you may create that many 1/1 green Insect creature tokens. - this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new SaberAntsEffect(), true)); + this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new SaberAntsEffect(), true, false, true)); } public SaberAnts(final SaberAnts card) { diff --git a/Mage.Sets/src/mage/cards/s/SaberclawGolem.java b/Mage.Sets/src/mage/cards/s/SaberclawGolem.java index 18ed53050c..f85238bb30 100644 --- a/Mage.Sets/src/mage/cards/s/SaberclawGolem.java +++ b/Mage.Sets/src/mage/cards/s/SaberclawGolem.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class SaberclawGolem extends CardImpl { public SaberclawGolem (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(4); this.toughness = new MageInt(2); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{R}"))); diff --git a/Mage.Sets/src/mage/cards/s/SabertoothAlleyCat.java b/Mage.Sets/src/mage/cards/s/SabertoothAlleyCat.java index 3324ebeaae..612c453c82 100644 --- a/Mage.Sets/src/mage/cards/s/SabertoothAlleyCat.java +++ b/Mage.Sets/src/mage/cards/s/SabertoothAlleyCat.java @@ -1,81 +1,82 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; -import mage.abilities.keyword.DefenderAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.AbilityPredicate; - -/** - * - * @author LevelX2 - */ -public class SabertoothAlleyCat extends CardImpl { - - public SabertoothAlleyCat(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); - - this.subtype.add("Cat"); - this.power = new MageInt(2); - this.toughness = new MageInt(1); - - // Sabertooth Alley Cat attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); - - // {1}{R}: Creatures without defender can't block Sabertooth Alley Cat this turn. - this.addAbility(new SimpleActivatedAbility( - Zone.BATTLEFIELD, - new CantBeBlockedByCreaturesSourceEffect( - (FilterCreaturePermanent) new FilterCreaturePermanent().add(Predicates.not(new AbilityPredicate(DefenderAbility.class))), - Duration.EndOfTurn - ) - .setText("Creatures without defender can't block {this} this turn"), - new ManaCostsImpl<>("{1}{R}"))); - } - - public SabertoothAlleyCat(final SabertoothAlleyCat card) { - super(card); - } - - @Override - public SabertoothAlleyCat copy() { - return new SabertoothAlleyCat(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksEachCombatStaticAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author LevelX2 + */ +public class SabertoothAlleyCat extends CardImpl { + + public SabertoothAlleyCat(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); + + this.subtype.add(SubType.CAT); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Sabertooth Alley Cat attacks each turn if able. + this.addAbility(new AttacksEachCombatStaticAbility()); + + // {1}{R}: Creatures without defender can't block Sabertooth Alley Cat this turn. + this.addAbility(new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new CantBeBlockedByCreaturesSourceEffect( + (FilterCreaturePermanent) new FilterCreaturePermanent().add(Predicates.not(new AbilityPredicate(DefenderAbility.class))), + Duration.EndOfTurn + ) + .setText("Creatures without defender can't block {this} this turn"), + new ManaCostsImpl<>("{1}{R}"))); + } + + public SabertoothAlleyCat(final SabertoothAlleyCat card) { + super(card); + } + + @Override + public SabertoothAlleyCat copy() { + return new SabertoothAlleyCat(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SabertoothCobra.java b/Mage.Sets/src/mage/cards/s/SabertoothCobra.java index a54ba5278b..dcd8f0f4b4 100644 --- a/Mage.Sets/src/mage/cards/s/SabertoothCobra.java +++ b/Mage.Sets/src/mage/cards/s/SabertoothCobra.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddPoisonCounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.PhaseStep; /** @@ -48,7 +49,7 @@ public class SabertoothCobra extends CardImpl { public SabertoothCobra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SabertoothNishoba.java b/Mage.Sets/src/mage/cards/s/SabertoothNishoba.java index 95e7daba0c..83f2fb540d 100644 --- a/Mage.Sets/src/mage/cards/s/SabertoothNishoba.java +++ b/Mage.Sets/src/mage/cards/s/SabertoothNishoba.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,9 +45,9 @@ public class SabertoothNishoba extends CardImpl { public SabertoothNishoba(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Beast"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.BEAST); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SabertoothOutrider.java b/Mage.Sets/src/mage/cards/s/SabertoothOutrider.java index 36da07281e..ac25f60d47 100644 --- a/Mage.Sets/src/mage/cards/s/SabertoothOutrider.java +++ b/Mage.Sets/src/mage/cards/s/SabertoothOutrider.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -48,8 +49,8 @@ public class SabertoothOutrider extends CardImpl { public SabertoothOutrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SabertoothWyvern.java b/Mage.Sets/src/mage/cards/s/SabertoothWyvern.java index 493be9610f..3973f4326d 100644 --- a/Mage.Sets/src/mage/cards/s/SabertoothWyvern.java +++ b/Mage.Sets/src/mage/cards/s/SabertoothWyvern.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SabertoothWyvern extends CardImpl { public SabertoothWyvern(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SabretoothTiger.java b/Mage.Sets/src/mage/cards/s/SabretoothTiger.java index 740457ec30..8756a81394 100644 --- a/Mage.Sets/src/mage/cards/s/SabretoothTiger.java +++ b/Mage.Sets/src/mage/cards/s/SabretoothTiger.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SabretoothTiger extends CardImpl { public SabretoothTiger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SacellumArchers.java b/Mage.Sets/src/mage/cards/s/SacellumArchers.java index ffd3341f75..6741573beb 100644 --- a/Mage.Sets/src/mage/cards/s/SacellumArchers.java +++ b/Mage.Sets/src/mage/cards/s/SacellumArchers.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetAttackingOrBlockingCreature; @@ -48,8 +49,8 @@ public class SacellumArchers extends CardImpl { public SacellumArchers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Archer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SacellumGodspeaker.java b/Mage.Sets/src/mage/cards/s/SacellumGodspeaker.java index a6787788c6..f3bef8b148 100644 --- a/Mage.Sets/src/mage/cards/s/SacellumGodspeaker.java +++ b/Mage.Sets/src/mage/cards/s/SacellumGodspeaker.java @@ -37,6 +37,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,8 +53,8 @@ public class SacellumGodspeaker extends CardImpl { public SacellumGodspeaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SachiDaughterOfSeshiro.java b/Mage.Sets/src/mage/cards/s/SachiDaughterOfSeshiro.java index d286eee043..5606c2dfc1 100644 --- a/Mage.Sets/src/mage/cards/s/SachiDaughterOfSeshiro.java +++ b/Mage.Sets/src/mage/cards/s/SachiDaughterOfSeshiro.java @@ -58,8 +58,8 @@ public class SachiDaughterOfSeshiro extends CardImpl { public SachiDaughterOfSeshiro(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Snake"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SacredCat.java b/Mage.Sets/src/mage/cards/s/SacredCat.java index 8488133f67..8239396048 100644 --- a/Mage.Sets/src/mage/cards/s/SacredCat.java +++ b/Mage.Sets/src/mage/cards/s/SacredCat.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class SacredCat extends CardImpl { public SacredCat(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SacredFoundry.java b/Mage.Sets/src/mage/cards/s/SacredFoundry.java index fe67493de1..b04fa0774e 100644 --- a/Mage.Sets/src/mage/cards/s/SacredFoundry.java +++ b/Mage.Sets/src/mage/cards/s/SacredFoundry.java @@ -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.cards.s; import java.util.UUID; @@ -37,6 +36,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,16 +44,17 @@ import mage.constants.CardType; */ public class SacredFoundry extends CardImpl { - public SacredFoundry (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - this.subtype.add("Mountain"); - this.subtype.add("Plains"); + public SacredFoundry(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); + this.subtype.add(SubType.MOUNTAIN); + this.subtype.add(SubType.PLAINS); + + this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); this.addAbility(new RedManaAbility()); this.addAbility(new WhiteManaAbility()); - this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); } - public SacredFoundry (final SacredFoundry card) { + public SacredFoundry(final SacredFoundry card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/s/SacredGuide.java b/Mage.Sets/src/mage/cards/s/SacredGuide.java index 839c9229cf..b38e6e39a5 100644 --- a/Mage.Sets/src/mage/cards/s/SacredGuide.java +++ b/Mage.Sets/src/mage/cards/s/SacredGuide.java @@ -1,79 +1,80 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.ObjectColor; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.SacrificeSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.RevealCardsFromLibraryUntilEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.filter.FilterCard; -import mage.filter.predicate.mageobject.ColorPredicate; - -/** - * - * @author Styxo - */ -public class SacredGuide extends CardImpl { - - private static final FilterCard filterCard = new FilterCard("white card"); - - static { - filterCard.add(new ColorPredicate(ObjectColor.WHITE)); - } - - public SacredGuide(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); - - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.power = new MageInt(1); - this.toughness = new MageInt(1); - - // {1}{W}, Sacrifice Sacred Guide: Reveal cards from the top of your library until you reveal a white card. Put that card into your hand and exile all other cards revealed this way. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RevealCardsFromLibraryUntilEffect(filterCard, Zone.HAND, Zone.EXILED), new ManaCostsImpl("{1}{W}")); - ability.addCost(new SacrificeSourceCost()); - this.addAbility(ability); - } - - public SacredGuide(final SacredGuide card) { - super(card); - } - - @Override - public SacredGuide copy() { - return new SacredGuide(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.RevealCardsFromLibraryUntilEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author Styxo + */ +public class SacredGuide extends CardImpl { + + private static final FilterCard filterCard = new FilterCard("white card"); + + static { + filterCard.add(new ColorPredicate(ObjectColor.WHITE)); + } + + public SacredGuide(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}{W}, Sacrifice Sacred Guide: Reveal cards from the top of your library until you reveal a white card. Put that card into your hand and exile all other cards revealed this way. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RevealCardsFromLibraryUntilEffect(filterCard, Zone.HAND, Zone.EXILED), new ManaCostsImpl("{1}{W}")); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public SacredGuide(final SacredGuide card) { + super(card); + } + + @Override + public SacredGuide copy() { + return new SacredGuide(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SacredKnight.java b/Mage.Sets/src/mage/cards/s/SacredKnight.java index 6a3063e919..d144e190aa 100644 --- a/Mage.Sets/src/mage/cards/s/SacredKnight.java +++ b/Mage.Sets/src/mage/cards/s/SacredKnight.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -55,8 +56,8 @@ public class SacredKnight extends CardImpl { public SacredKnight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SacredPrey.java b/Mage.Sets/src/mage/cards/s/SacredPrey.java index 4ad74ebd2d..898f86517b 100644 --- a/Mage.Sets/src/mage/cards/s/SacredPrey.java +++ b/Mage.Sets/src/mage/cards/s/SacredPrey.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SacredPrey extends CardImpl { public SacredPrey(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Horse"); + this.subtype.add(SubType.HORSE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SacredWolf.java b/Mage.Sets/src/mage/cards/s/SacredWolf.java index 976ae7428f..c291bf2b6f 100644 --- a/Mage.Sets/src/mage/cards/s/SacredWolf.java +++ b/Mage.Sets/src/mage/cards/s/SacredWolf.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ import mage.constants.CardType; public class SacredWolf extends CardImpl { public SacredWolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SaddlebackLagac.java b/Mage.Sets/src/mage/cards/s/SaddlebackLagac.java index d97ce0b07a..f0144837d7 100644 --- a/Mage.Sets/src/mage/cards/s/SaddlebackLagac.java +++ b/Mage.Sets/src/mage/cards/s/SaddlebackLagac.java @@ -35,6 +35,7 @@ import mage.abilities.effects.keyword.SupportEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.common.TargetCreaturePermanent; @@ -53,7 +54,7 @@ public class SaddlebackLagac extends CardImpl { public SaddlebackLagac(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SadisticAugermage.java b/Mage.Sets/src/mage/cards/s/SadisticAugermage.java index 25512c88b5..421b3f927c 100644 --- a/Mage.Sets/src/mage/cards/s/SadisticAugermage.java +++ b/Mage.Sets/src/mage/cards/s/SadisticAugermage.java @@ -35,6 +35,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -49,8 +50,8 @@ public class SadisticAugermage extends CardImpl { public SadisticAugermage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SadisticGlee.java b/Mage.Sets/src/mage/cards/s/SadisticGlee.java index c75ca85cb8..4fa023acae 100644 --- a/Mage.Sets/src/mage/cards/s/SadisticGlee.java +++ b/Mage.Sets/src/mage/cards/s/SadisticGlee.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.target.TargetPermanent; @@ -49,7 +50,7 @@ public class SadisticGlee extends CardImpl { public SadisticGlee(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SadisticHypnotist.java b/Mage.Sets/src/mage/cards/s/SadisticHypnotist.java index d4c8477e1c..bc458bd6df 100644 --- a/Mage.Sets/src/mage/cards/s/SadisticHypnotist.java +++ b/Mage.Sets/src/mage/cards/s/SadisticHypnotist.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.target.TargetPlayer; @@ -50,8 +51,8 @@ public class SadisticHypnotist extends CardImpl { public SadisticHypnotist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Minion"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MINION); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SafeholdDuo.java b/Mage.Sets/src/mage/cards/s/SafeholdDuo.java index 9872a269ee..1a36bf7125 100644 --- a/Mage.Sets/src/mage/cards/s/SafeholdDuo.java +++ b/Mage.Sets/src/mage/cards/s/SafeholdDuo.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,9 +58,9 @@ public class SafeholdDuo extends CardImpl { public SafeholdDuo(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G/W}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SafeholdElite.java b/Mage.Sets/src/mage/cards/s/SafeholdElite.java index f506f9e991..7aa88773bd 100644 --- a/Mage.Sets/src/mage/cards/s/SafeholdElite.java +++ b/Mage.Sets/src/mage/cards/s/SafeholdElite.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.PersistAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class SafeholdElite extends CardImpl { public SafeholdElite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G/W}"); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SafeholdSentry.java b/Mage.Sets/src/mage/cards/s/SafeholdSentry.java index 5c4cbe385d..42fbcceabf 100644 --- a/Mage.Sets/src/mage/cards/s/SafeholdSentry.java +++ b/Mage.Sets/src/mage/cards/s/SafeholdSentry.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class SafeholdSentry extends CardImpl { public SafeholdSentry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SaffiEriksdotter.java b/Mage.Sets/src/mage/cards/s/SaffiEriksdotter.java index 4bf488fcd0..e36a4787cc 100644 --- a/Mage.Sets/src/mage/cards/s/SaffiEriksdotter.java +++ b/Mage.Sets/src/mage/cards/s/SaffiEriksdotter.java @@ -56,8 +56,8 @@ public class SaffiEriksdotter extends CardImpl { public SaffiEriksdotter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SageAven.java b/Mage.Sets/src/mage/cards/s/SageAven.java index 98e993f508..55699c67f0 100644 --- a/Mage.Sets/src/mage/cards/s/SageAven.java +++ b/Mage.Sets/src/mage/cards/s/SageAven.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class SageAven extends CardImpl { public SageAven(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SageEyeAvengers.java b/Mage.Sets/src/mage/cards/s/SageEyeAvengers.java index 08b9af5cb0..35f640932d 100644 --- a/Mage.Sets/src/mage/cards/s/SageEyeAvengers.java +++ b/Mage.Sets/src/mage/cards/s/SageEyeAvengers.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -52,8 +53,8 @@ public class SageEyeAvengers extends CardImpl { public SageEyeAvengers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Djinn"); - this.subtype.add("Monk"); + this.subtype.add(SubType.DJINN); + this.subtype.add(SubType.MONK); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SageEyeHarrier.java b/Mage.Sets/src/mage/cards/s/SageEyeHarrier.java index 6c9feab77c..a4777f39b8 100644 --- a/Mage.Sets/src/mage/cards/s/SageEyeHarrier.java +++ b/Mage.Sets/src/mage/cards/s/SageEyeHarrier.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class SageEyeHarrier extends CardImpl { public SageEyeHarrier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SageOfAncientLore.java b/Mage.Sets/src/mage/cards/s/SageOfAncientLore.java index 9abea07beb..9cd65a6bb5 100644 --- a/Mage.Sets/src/mage/cards/s/SageOfAncientLore.java +++ b/Mage.Sets/src/mage/cards/s/SageOfAncientLore.java @@ -47,6 +47,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.w.WerewolfOfAncientHunger; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -59,9 +60,9 @@ public class SageOfAncientLore extends CardImpl { public SageOfAncientLore(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SageOfEpityr.java b/Mage.Sets/src/mage/cards/s/SageOfEpityr.java index 63b2fa1907..1051b9f4ef 100644 --- a/Mage.Sets/src/mage/cards/s/SageOfEpityr.java +++ b/Mage.Sets/src/mage/cards/s/SageOfEpityr.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.LookLibraryControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SageOfEpityr extends CardImpl { public SageOfEpityr(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SageOfFables.java b/Mage.Sets/src/mage/cards/s/SageOfFables.java index 9b2e285008..56826aedb9 100644 --- a/Mage.Sets/src/mage/cards/s/SageOfFables.java +++ b/Mage.Sets/src/mage/cards/s/SageOfFables.java @@ -54,8 +54,8 @@ public class SageOfFables extends CardImpl { public SageOfFables(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SageOfHours.java b/Mage.Sets/src/mage/cards/s/SageOfHours.java index 268c026493..8450aea461 100644 --- a/Mage.Sets/src/mage/cards/s/SageOfHours.java +++ b/Mage.Sets/src/mage/cards/s/SageOfHours.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -56,8 +57,8 @@ public class SageOfHours extends CardImpl { public SageOfHours(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SageOfLatNam.java b/Mage.Sets/src/mage/cards/s/SageOfLatNam.java index e6a7100773..40a38438dd 100644 --- a/Mage.Sets/src/mage/cards/s/SageOfLatNam.java +++ b/Mage.Sets/src/mage/cards/s/SageOfLatNam.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -57,8 +58,8 @@ public class SageOfLatNam extends CardImpl { public SageOfLatNam(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SageOfShailasClaim.java b/Mage.Sets/src/mage/cards/s/SageOfShailasClaim.java index b11eb93311..a755a0ae11 100644 --- a/Mage.Sets/src/mage/cards/s/SageOfShailasClaim.java +++ b/Mage.Sets/src/mage/cards/s/SageOfShailasClaim.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SageOfShailasClaim extends CardImpl { public SageOfShailasClaim(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SageOfTheInwardEye.java b/Mage.Sets/src/mage/cards/s/SageOfTheInwardEye.java index 2ecc1e1608..9478b4c770 100644 --- a/Mage.Sets/src/mage/cards/s/SageOfTheInwardEye.java +++ b/Mage.Sets/src/mage/cards/s/SageOfTheInwardEye.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.StaticFilters; @@ -56,8 +57,8 @@ public class SageOfTheInwardEye extends CardImpl { public SageOfTheInwardEye(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{R}{W}"); - this.subtype.add("Djinn"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.DJINN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SageOwl.java b/Mage.Sets/src/mage/cards/s/SageOwl.java index 9425915aa9..819319f682 100644 --- a/Mage.Sets/src/mage/cards/s/SageOwl.java +++ b/Mage.Sets/src/mage/cards/s/SageOwl.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class SageOwl extends CardImpl { public SageOwl(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SagesDousing.java b/Mage.Sets/src/mage/cards/s/SagesDousing.java index 6002c3f326..ebf648edfd 100644 --- a/Mage.Sets/src/mage/cards/s/SagesDousing.java +++ b/Mage.Sets/src/mage/cards/s/SagesDousing.java @@ -55,7 +55,7 @@ public class SagesDousing extends CardImpl { public SagesDousing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{2}{U}"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.WIZARD); // Counter target spell unless its controller pays {3}. this.getSpellAbility().addTarget(new TargetSpell()); diff --git a/Mage.Sets/src/mage/cards/s/SagesOfTheAnima.java b/Mage.Sets/src/mage/cards/s/SagesOfTheAnima.java index df436d3d8a..32e5191c0a 100644 --- a/Mage.Sets/src/mage/cards/s/SagesOfTheAnima.java +++ b/Mage.Sets/src/mage/cards/s/SagesOfTheAnima.java @@ -38,6 +38,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,8 +57,8 @@ public class SagesOfTheAnima extends CardImpl { public SagesOfTheAnima(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{U}"); - this.subtype.add("Elf"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SagesReverie.java b/Mage.Sets/src/mage/cards/s/SagesReverie.java index b1087b37cb..de1bdbe045 100644 --- a/Mage.Sets/src/mage/cards/s/SagesReverie.java +++ b/Mage.Sets/src/mage/cards/s/SagesReverie.java @@ -64,7 +64,7 @@ public class SagesReverie extends CardImpl { public SagesReverie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SagesRowDenizen.java b/Mage.Sets/src/mage/cards/s/SagesRowDenizen.java index ce0d9a83ee..abf3e87ca9 100644 --- a/Mage.Sets/src/mage/cards/s/SagesRowDenizen.java +++ b/Mage.Sets/src/mage/cards/s/SagesRowDenizen.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -60,8 +61,8 @@ public class SagesRowDenizen extends CardImpl { public SagesRowDenizen(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SaguArcher.java b/Mage.Sets/src/mage/cards/s/SaguArcher.java index 60e5bb9260..9579e6de8a 100644 --- a/Mage.Sets/src/mage/cards/s/SaguArcher.java +++ b/Mage.Sets/src/mage/cards/s/SaguArcher.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class SaguArcher extends CardImpl { public SaguArcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Naga"); - this.subtype.add("Archer"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SaguMauler.java b/Mage.Sets/src/mage/cards/s/SaguMauler.java index 107a8d2bfd..f5e935b053 100644 --- a/Mage.Sets/src/mage/cards/s/SaguMauler.java +++ b/Mage.Sets/src/mage/cards/s/SaguMauler.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class SaguMauler extends CardImpl { public SaguMauler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SaheeliRai.java b/Mage.Sets/src/mage/cards/s/SaheeliRai.java index b66844ae70..0c6e1fb803 100644 --- a/Mage.Sets/src/mage/cards/s/SaheeliRai.java +++ b/Mage.Sets/src/mage/cards/s/SaheeliRai.java @@ -37,7 +37,7 @@ import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DamagePlayersEffect; import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.abilities.effects.keyword.ScryEffect; import mage.cards.Card; @@ -45,6 +45,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.TargetController; @@ -65,7 +66,7 @@ public class SaheeliRai extends CardImpl { public SaheeliRai(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{1}{U}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Saheeli"); + this.subtype.add(SubType.SAHEELI); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); @@ -115,7 +116,7 @@ class SaheeliRaiCreateTokenEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent copiedPermanent = game.getPermanent(this.getTargetPointer().getFirst(game, source)); if (copiedPermanent != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(null, CardType.ARTIFACT, true); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(null, CardType.ARTIFACT, true); if (effect.apply(game, source)) { for (Permanent copyPermanent : effect.getAddedPermanent()) { ExileTargetEffect exileEffect = new ExileTargetEffect(); diff --git a/Mage.Sets/src/mage/cards/s/SaheelisArtistry.java b/Mage.Sets/src/mage/cards/s/SaheelisArtistry.java index b24622c005..35e47ac56b 100644 --- a/Mage.Sets/src/mage/cards/s/SaheelisArtistry.java +++ b/Mage.Sets/src/mage/cards/s/SaheelisArtistry.java @@ -29,7 +29,7 @@ package mage.cards.s; import java.util.UUID; import mage.abilities.Mode; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -50,13 +50,13 @@ public class SaheelisArtistry extends CardImpl { this.getSpellAbility().getModes().setMaxModes(2); // • Create a token that's a copy of target artifact. this.getSpellAbility().addTarget(new TargetArtifactPermanent()); - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(); effect.setText("Create a token that's a copy of target artifact"); this.getSpellAbility().addEffect(effect); // • Create a token that's a copy of target creature, except that it's an artifact in addition to its other types. Mode mode1 = new Mode(); mode1.getTargets().add(new TargetCreaturePermanent()); - effect = new PutTokenOntoBattlefieldCopyTargetEffect(); + effect = new CreateTokenCopyTargetEffect(); effect.setBecomesArtifact(true); effect.setText("Create a token that's a copy of target creature, except that it's an artifact in addition to its other types"); mode1.getEffects().add(effect); diff --git a/Mage.Sets/src/mage/cards/s/SaiOfTheShinobi.java b/Mage.Sets/src/mage/cards/s/SaiOfTheShinobi.java index dc5508dd14..f1984e6a36 100644 --- a/Mage.Sets/src/mage/cards/s/SaiOfTheShinobi.java +++ b/Mage.Sets/src/mage/cards/s/SaiOfTheShinobi.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.constants.TargetController; @@ -58,7 +59,7 @@ public class SaiOfTheShinobi extends CardImpl { public SaiOfTheShinobi(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); diff --git a/Mage.Sets/src/mage/cards/s/SailorOfMeans.java b/Mage.Sets/src/mage/cards/s/SailorOfMeans.java new file mode 100644 index 0000000000..b8d43b12cd --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SailorOfMeans.java @@ -0,0 +1,66 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.permanent.token.TreasureToken; + +/** + * + * @author TheElk801 + */ +public class SailorOfMeans extends CardImpl { + + public SailorOfMeans(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // When Sailor of Means enters the battlefield, create a colorless Treasure artifact token with "{t}, Sacrifice this artifact: Add one mana of any color to your mana pool." + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new TreasureToken()))); + } + + public SailorOfMeans(final SailorOfMeans card) { + super(card); + } + + @Override + public SailorOfMeans copy() { + return new SailorOfMeans(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SakashimaTheImpostor.java b/Mage.Sets/src/mage/cards/s/SakashimaTheImpostor.java index 98785b1e95..33196bb4ea 100644 --- a/Mage.Sets/src/mage/cards/s/SakashimaTheImpostor.java +++ b/Mage.Sets/src/mage/cards/s/SakashimaTheImpostor.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -57,8 +58,8 @@ public class SakashimaTheImpostor extends CardImpl { public SakashimaTheImpostor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SakashimasStudent.java b/Mage.Sets/src/mage/cards/s/SakashimasStudent.java index ed9d55ee2b..6070ffad3e 100644 --- a/Mage.Sets/src/mage/cards/s/SakashimasStudent.java +++ b/Mage.Sets/src/mage/cards/s/SakashimasStudent.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.NinjutsuAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.util.functions.AddSubtypeApplier; @@ -48,8 +49,8 @@ public class SakashimasStudent extends CardImpl { public SakashimasStudent(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Ninja"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NINJA); this.power = new MageInt(0); this.toughness = new MageInt(0); @@ -58,7 +59,7 @@ public class SakashimasStudent extends CardImpl { this.addAbility(new NinjutsuAbility(new ManaCostsImpl("{1}{U}"))); // You may have Sakashima's Student enter the battlefield as a copy of any creature on the battlefield, except it's still a Ninja in addition to its other creature types. - Effect effect = new CopyPermanentEffect(StaticFilters.FILTER_PERMANENT_CREATURE, new AddSubtypeApplier("Ninja")); + Effect effect = new CopyPermanentEffect(StaticFilters.FILTER_PERMANENT_CREATURE, new AddSubtypeApplier(SubType.NINJA)); effect.setText("as a copy of any creature on the battlefield, except it's a Ninja in addition to its other creature types"); this.addAbility(new EntersBattlefieldAbility(effect, true)); diff --git a/Mage.Sets/src/mage/cards/s/SakikoMotherOfSummer.java b/Mage.Sets/src/mage/cards/s/SakikoMotherOfSummer.java index d6040dac15..7a0e78f7f8 100644 --- a/Mage.Sets/src/mage/cards/s/SakikoMotherOfSummer.java +++ b/Mage.Sets/src/mage/cards/s/SakikoMotherOfSummer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.AddManaToManaPoolTargetControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.game.Game; @@ -54,8 +55,8 @@ public class SakikoMotherOfSummer extends CardImpl { public SakikoMotherOfSummer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Snake"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SakuraTribeElder.java b/Mage.Sets/src/mage/cards/s/SakuraTribeElder.java index dc83ff1fc0..eeb180cff7 100644 --- a/Mage.Sets/src/mage/cards/s/SakuraTribeElder.java +++ b/Mage.Sets/src/mage/cards/s/SakuraTribeElder.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -49,8 +50,8 @@ public class SakuraTribeElder extends CardImpl { public SakuraTribeElder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Snake"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SakuraTribeScout.java b/Mage.Sets/src/mage/cards/s/SakuraTribeScout.java index 8c911bfd1b..0104db981f 100644 --- a/Mage.Sets/src/mage/cards/s/SakuraTribeScout.java +++ b/Mage.Sets/src/mage/cards/s/SakuraTribeScout.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.PutLandFromHandOntoBattlefieldEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,9 +46,9 @@ public class SakuraTribeScout extends CardImpl { public SakuraTribeScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Snake"); - this.subtype.add("Shaman"); - this.subtype.add("Scout"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.SHAMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SakuraTribeSpringcaller.java b/Mage.Sets/src/mage/cards/s/SakuraTribeSpringcaller.java index e158723baa..5ab7eb327c 100644 --- a/Mage.Sets/src/mage/cards/s/SakuraTribeSpringcaller.java +++ b/Mage.Sets/src/mage/cards/s/SakuraTribeSpringcaller.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.AddManaToManaPoolTargetControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class SakuraTribeSpringcaller extends CardImpl { public SakuraTribeSpringcaller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Snake"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SalivatingGremlins.java b/Mage.Sets/src/mage/cards/s/SalivatingGremlins.java index 37b33a5ca1..3dc8196838 100644 --- a/Mage.Sets/src/mage/cards/s/SalivatingGremlins.java +++ b/Mage.Sets/src/mage/cards/s/SalivatingGremlins.java @@ -1,77 +1,78 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; -import mage.abilities.keyword.TrampleAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.filter.common.FilterControlledArtifactPermanent; - -/** - * - * @author LevelX2 - */ -public class SalivatingGremlins extends CardImpl { - - public SalivatingGremlins(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Gremlin"); - this.power = new MageInt(2); - this.toughness = new MageInt(3); - - // Whenever an artifact enters the battlefield under your control, Salivating Gremlins gets +2/+0 and gains trample until end of turn. - Effect effect = new BoostSourceEffect(2, 0, Duration.EndOfTurn); - effect.setText("{this} gets +2/+0"); - Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, - effect, - new FilterControlledArtifactPermanent("an artifact"), false, null, true); - effect = new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn); - effect.setText("and gains trample until end of turn"); - ability.addEffect(effect); - this.addAbility(ability); - } - - public SalivatingGremlins(final SalivatingGremlins card) { - super(card); - } - - @Override - public SalivatingGremlins copy() { - return new SalivatingGremlins(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterControlledArtifactPermanent; + +/** + * + * @author LevelX2 + */ +public class SalivatingGremlins extends CardImpl { + + public SalivatingGremlins(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); + this.subtype.add(SubType.GREMLIN); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Whenever an artifact enters the battlefield under your control, Salivating Gremlins gets +2/+0 and gains trample until end of turn. + Effect effect = new BoostSourceEffect(2, 0, Duration.EndOfTurn); + effect.setText("{this} gets +2/+0"); + Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, + effect, + new FilterControlledArtifactPermanent("an artifact"), false, null, true); + effect = new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains trample until end of turn"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public SalivatingGremlins(final SalivatingGremlins card) { + super(card); + } + + @Override + public SalivatingGremlins copy() { + return new SalivatingGremlins(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SaltRoadAmbushers.java b/Mage.Sets/src/mage/cards/s/SaltRoadAmbushers.java index 457d5efde6..da151c0212 100644 --- a/Mage.Sets/src/mage/cards/s/SaltRoadAmbushers.java +++ b/Mage.Sets/src/mage/cards/s/SaltRoadAmbushers.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -48,8 +49,8 @@ public class SaltRoadAmbushers extends CardImpl { public SaltRoadAmbushers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Hound"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HOUND); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SaltRoadPatrol.java b/Mage.Sets/src/mage/cards/s/SaltRoadPatrol.java index 42b74302cc..0dd7b65c23 100644 --- a/Mage.Sets/src/mage/cards/s/SaltRoadPatrol.java +++ b/Mage.Sets/src/mage/cards/s/SaltRoadPatrol.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.OutlastAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SaltRoadPatrol extends CardImpl { public SaltRoadPatrol(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SaltRoadQuartermasters.java b/Mage.Sets/src/mage/cards/s/SaltRoadQuartermasters.java index 16af5d9ceb..ba96bd420e 100644 --- a/Mage.Sets/src/mage/cards/s/SaltRoadQuartermasters.java +++ b/Mage.Sets/src/mage/cards/s/SaltRoadQuartermasters.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -51,8 +52,8 @@ public class SaltRoadQuartermasters extends CardImpl { public SaltRoadQuartermasters(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SaltfieldRecluse.java b/Mage.Sets/src/mage/cards/s/SaltfieldRecluse.java index a2638f90e4..38e26b71c8 100644 --- a/Mage.Sets/src/mage/cards/s/SaltfieldRecluse.java +++ b/Mage.Sets/src/mage/cards/s/SaltfieldRecluse.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,9 +49,9 @@ public class SaltfieldRecluse extends CardImpl { public SaltfieldRecluse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Saltskitter.java b/Mage.Sets/src/mage/cards/s/Saltskitter.java index 05cc2f7830..9119fb5264 100644 --- a/Mage.Sets/src/mage/cards/s/Saltskitter.java +++ b/Mage.Sets/src/mage/cards/s/Saltskitter.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ExileReturnBattlefieldOwnerNextEndStepSourc import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -52,7 +53,7 @@ public class Saltskitter extends CardImpl { public Saltskitter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SalvageDrone.java b/Mage.Sets/src/mage/cards/s/SalvageDrone.java index 5b429e2e10..a289ddd144 100644 --- a/Mage.Sets/src/mage/cards/s/SalvageDrone.java +++ b/Mage.Sets/src/mage/cards/s/SalvageDrone.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.IngestAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class SalvageDrone extends CardImpl { public SalvageDrone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SalvageScout.java b/Mage.Sets/src/mage/cards/s/SalvageScout.java index 85e56f06d8..cda981cd03 100644 --- a/Mage.Sets/src/mage/cards/s/SalvageScout.java +++ b/Mage.Sets/src/mage/cards/s/SalvageScout.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterArtifactCard; import mage.target.common.TargetCardInYourGraveyard; @@ -49,8 +50,8 @@ public class SalvageScout extends CardImpl { public SalvageScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SalvageScuttler.java b/Mage.Sets/src/mage/cards/s/SalvageScuttler.java index 457416c9ad..a55fb5eb2f 100644 --- a/Mage.Sets/src/mage/cards/s/SalvageScuttler.java +++ b/Mage.Sets/src/mage/cards/s/SalvageScuttler.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledArtifactPermanent; import mage.target.common.TargetControlledPermanent; @@ -47,7 +48,7 @@ public class SalvageScuttler extends CardImpl { public SalvageScuttler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); - this.subtype.add("Crab"); + this.subtype.add(SubType.CRAB); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SalvageSlasher.java b/Mage.Sets/src/mage/cards/s/SalvageSlasher.java index 63aad93ea1..f9e4bb46a7 100644 --- a/Mage.Sets/src/mage/cards/s/SalvageSlasher.java +++ b/Mage.Sets/src/mage/cards/s/SalvageSlasher.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterArtifactCard; @@ -48,8 +49,8 @@ public class SalvageSlasher extends CardImpl { public SalvageSlasher(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SalvageSquad.java b/Mage.Sets/src/mage/cards/s/SalvageSquad.java index 86fbdf6515..c09322734e 100644 --- a/Mage.Sets/src/mage/cards/s/SalvageSquad.java +++ b/Mage.Sets/src/mage/cards/s/SalvageSquad.java @@ -1,70 +1,71 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.common.SacrificeTargetCost; -import mage.abilities.effects.common.DoIfCostPaid; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.GainLifeEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.common.FilterControlledArtifactPermanent; -import mage.target.common.TargetControlledPermanent; - -/** - * - * @author Styxo - */ -public class SalvageSquad extends CardImpl { - - public SalvageSquad(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}{B}"); - this.subtype.add("Jawa"); - this.subtype.add("Artificier"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // When you Salvage Squad enters the battlefied, you may sacrifice an artifact. If you do, you gain 2 life and draw two cards. - DoIfCostPaid effect = new DoIfCostPaid(new GainLifeEffect(2), new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent()))); - effect.addEffect(new DrawCardSourceControllerEffect(2)); - this.addAbility(new EntersBattlefieldTriggeredAbility(effect)); - } - - public SalvageSquad(final SalvageSquad card) { - super(card); - } - - @Override - public SalvageSquad copy() { - return new SalvageSquad(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterControlledArtifactPermanent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author Styxo + */ +public class SalvageSquad extends CardImpl { + + public SalvageSquad(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}{B}"); + this.subtype.add(SubType.JAWA); + this.subtype.add(SubType.ARTIFICIER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When you Salvage Squad enters the battlefied, you may sacrifice an artifact. If you do, you gain 2 life and draw two cards. + DoIfCostPaid effect = new DoIfCostPaid(new GainLifeEffect(2), new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent()))); + effect.addEffect(new DrawCardSourceControllerEffect(2)); + this.addAbility(new EntersBattlefieldTriggeredAbility(effect)); + } + + public SalvageSquad(final SalvageSquad card) { + super(card); + } + + @Override + public SalvageSquad copy() { + return new SalvageSquad(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SalvageTitan.java b/Mage.Sets/src/mage/cards/s/SalvageTitan.java index 569865e9ee..94eccba6ee 100644 --- a/Mage.Sets/src/mage/cards/s/SalvageTitan.java +++ b/Mage.Sets/src/mage/cards/s/SalvageTitan.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterArtifactCard; import mage.filter.common.FilterControlledArtifactPermanent; @@ -51,7 +52,7 @@ public class SalvageTitan extends CardImpl { public SalvageTitan(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}{B}{B}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SamiteArcher.java b/Mage.Sets/src/mage/cards/s/SamiteArcher.java index 27eeefddc5..8337fb9361 100644 --- a/Mage.Sets/src/mage/cards/s/SamiteArcher.java +++ b/Mage.Sets/src/mage/cards/s/SamiteArcher.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -50,9 +51,9 @@ public class SamiteArcher extends CardImpl { public SamiteArcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{U}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SamiteElder.java b/Mage.Sets/src/mage/cards/s/SamiteElder.java index 457c8c5319..50e502ac6b 100644 --- a/Mage.Sets/src/mage/cards/s/SamiteElder.java +++ b/Mage.Sets/src/mage/cards/s/SamiteElder.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,8 +58,8 @@ public class SamiteElder extends CardImpl { public SamiteElder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SamiteHealer.java b/Mage.Sets/src/mage/cards/s/SamiteHealer.java index bc7719431d..6d0ca02046 100644 --- a/Mage.Sets/src/mage/cards/s/SamiteHealer.java +++ b/Mage.Sets/src/mage/cards/s/SamiteHealer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class SamiteHealer extends CardImpl { public SamiteHealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SamitePilgrim.java b/Mage.Sets/src/mage/cards/s/SamitePilgrim.java index 044dd10d1b..8aa8e03e3f 100644 --- a/Mage.Sets/src/mage/cards/s/SamitePilgrim.java +++ b/Mage.Sets/src/mage/cards/s/SamitePilgrim.java @@ -48,15 +48,16 @@ import mage.target.common.TargetCreaturePermanent; public class SamitePilgrim extends CardImpl { public SamitePilgrim(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); // Domain - {T}: Prevent the next X damage that would be dealt to target creature this turn, where X is the number of basic land types among lands you control. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SamitePilgrimPreventDamageToTargetEffect(), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); + ability.setAbilityWord(AbilityWord.DOMAIN); this.addAbility(ability); } @@ -72,7 +73,6 @@ public class SamitePilgrim extends CardImpl { class SamitePilgrimPreventDamageToTargetEffect extends PreventionEffectImpl { - public SamitePilgrimPreventDamageToTargetEffect() { super(Duration.EndOfTurn, Integer.MAX_VALUE, false, true); staticText = "Prevent the next X damage that would be dealt to target creature this turn, where X is the number of basic land types among lands you control."; diff --git a/Mage.Sets/src/mage/cards/s/SamiteSanctuary.java b/Mage.Sets/src/mage/cards/s/SamiteSanctuary.java new file mode 100644 index 0000000000..9f6fa57696 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SamiteSanctuary.java @@ -0,0 +1,69 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.InfoEffect; +import mage.abilities.effects.common.PreventDamageToTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class SamiteSanctuary extends CardImpl { + + public SamiteSanctuary(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + + // {2}: Prevent the next 1 damage that would be dealt to target creature this turn. Any player may activate this ability. + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn ,1), new ManaCostsImpl("{2}")); + ability.addTarget(new TargetCreaturePermanent()); + ability.setMayActivate(TargetController.ANY); + ability.addEffect(new InfoEffect("Any player may activate this ability")); + this.addAbility(ability); + } + + public SamiteSanctuary(final SamiteSanctuary card) { + super(card); + } + + @Override + public SamiteSanctuary copy() { + return new SamiteSanctuary(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SamuraiEnforcers.java b/Mage.Sets/src/mage/cards/s/SamuraiEnforcers.java index 3438ee3cf3..bb687732e0 100644 --- a/Mage.Sets/src/mage/cards/s/SamuraiEnforcers.java +++ b/Mage.Sets/src/mage/cards/s/SamuraiEnforcers.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.BushidoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SamuraiEnforcers extends CardImpl { public SamuraiEnforcers (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SamuraiOfThePaleCurtain.java b/Mage.Sets/src/mage/cards/s/SamuraiOfThePaleCurtain.java index 26dafc4aab..d827842774 100644 --- a/Mage.Sets/src/mage/cards/s/SamuraiOfThePaleCurtain.java +++ b/Mage.Sets/src/mage/cards/s/SamuraiOfThePaleCurtain.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.BushidoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class SamuraiOfThePaleCurtain extends CardImpl { public SamuraiOfThePaleCurtain (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Fox"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.FOX); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SamutTheTested.java b/Mage.Sets/src/mage/cards/s/SamutTheTested.java index ccd24be1f4..697df0fdfc 100644 --- a/Mage.Sets/src/mage/cards/s/SamutTheTested.java +++ b/Mage.Sets/src/mage/cards/s/SamutTheTested.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.filter.FilterCard; @@ -55,7 +56,7 @@ public class SamutTheTested extends CardImpl { public SamutTheTested(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{R}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Samut"); + this.subtype.add(SubType.SAMUT); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/s/SamutVoiceOfDissent.java b/Mage.Sets/src/mage/cards/s/SamutVoiceOfDissent.java index 7c89aa918b..3c65123556 100644 --- a/Mage.Sets/src/mage/cards/s/SamutVoiceOfDissent.java +++ b/Mage.Sets/src/mage/cards/s/SamutVoiceOfDissent.java @@ -1,107 +1,108 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.UntapTargetEffect; -import mage.abilities.effects.common.continuous.GainAbilityAllEffect; -import mage.abilities.keyword.DoubleStrikeAbility; -import mage.abilities.keyword.FlashAbility; -import mage.abilities.keyword.HasteAbility; -import mage.abilities.keyword.VigilanceAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SuperType; -import mage.constants.Zone; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.AnotherPredicate; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author jeffwadsworth - */ -public class SamutVoiceOfDissent extends CardImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Other creatures you control"); - private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("another target creature"); - - static { - filter.add(new AnotherPredicate()); - filter2.add(new AnotherPredicate()); - } - - public SamutVoiceOfDissent(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{G}"); - addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Warrior"); - this.power = new MageInt(3); - this.toughness = new MageInt(4); - - // Flash - this.addAbility(FlashAbility.getInstance()); - - //Double strike - this.addAbility(DoubleStrikeAbility.getInstance()); - - //vigilance - this.addAbility(VigilanceAbility.getInstance()); - - //haste - this.addAbility(HasteAbility.getInstance()); - - //Other creatures you control have haste. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter))); - - //W, Tap: Untap another target creature. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ManaCostsImpl("{W}")); - ability.addTarget(new TargetCreaturePermanent(filter2)); - ability.addCost(new TapSourceCost()); - this.addAbility(ability); - - } - - public SamutVoiceOfDissent(final SamutVoiceOfDissent card) { - super(card); - } - - @Override - public SamutVoiceOfDissent copy() { - return new SamutVoiceOfDissent(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author jeffwadsworth + */ +public class SamutVoiceOfDissent extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Other creatures you control"); + private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("another target creature"); + + static { + filter.add(new AnotherPredicate()); + filter2.add(new AnotherPredicate()); + } + + public SamutVoiceOfDissent(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{G}"); + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + //Double strike + this.addAbility(DoubleStrikeAbility.getInstance()); + + //vigilance + this.addAbility(VigilanceAbility.getInstance()); + + //haste + this.addAbility(HasteAbility.getInstance()); + + //Other creatures you control have haste. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter))); + + //W, Tap: Untap another target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ManaCostsImpl("{W}")); + ability.addTarget(new TargetCreaturePermanent(filter2)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + } + + public SamutVoiceOfDissent(final SamutVoiceOfDissent card) { + super(card); + } + + @Override + public SamutVoiceOfDissent copy() { + return new SamutVoiceOfDissent(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SanctifierOfSouls.java b/Mage.Sets/src/mage/cards/s/SanctifierOfSouls.java index 75e9f3d2f1..a85a6caba3 100644 --- a/Mage.Sets/src/mage/cards/s/SanctifierOfSouls.java +++ b/Mage.Sets/src/mage/cards/s/SanctifierOfSouls.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -61,8 +62,8 @@ public class SanctifierOfSouls extends CardImpl { public SanctifierOfSouls(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SanctuaryCat.java b/Mage.Sets/src/mage/cards/s/SanctuaryCat.java index 0923a84871..6a0b5cfedb 100644 --- a/Mage.Sets/src/mage/cards/s/SanctuaryCat.java +++ b/Mage.Sets/src/mage/cards/s/SanctuaryCat.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class SanctuaryCat extends CardImpl { public SanctuaryCat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SanctumCustodian.java b/Mage.Sets/src/mage/cards/s/SanctumCustodian.java index e46660da66..7446fef12d 100644 --- a/Mage.Sets/src/mage/cards/s/SanctumCustodian.java +++ b/Mage.Sets/src/mage/cards/s/SanctumCustodian.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class SanctumCustodian extends CardImpl { public SanctumCustodian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SanctumGargoyle.java b/Mage.Sets/src/mage/cards/s/SanctumGargoyle.java index 6a128b9625..56734a82ed 100644 --- a/Mage.Sets/src/mage/cards/s/SanctumGargoyle.java +++ b/Mage.Sets/src/mage/cards/s/SanctumGargoyle.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterArtifactCard; import mage.target.common.TargetCardInYourGraveyard; @@ -47,7 +48,7 @@ public class SanctumGargoyle extends CardImpl { public SanctumGargoyle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{W}"); - this.subtype.add("Gargoyle"); + this.subtype.add(SubType.GARGOYLE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SanctumGuardian.java b/Mage.Sets/src/mage/cards/s/SanctumGuardian.java index 10258321a9..a7f2611e36 100644 --- a/Mage.Sets/src/mage/cards/s/SanctumGuardian.java +++ b/Mage.Sets/src/mage/cards/s/SanctumGuardian.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventNextDamageFromChosenSourceToTargetEf import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class SanctumGuardian extends CardImpl { public SanctumGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SanctumPlowbeast.java b/Mage.Sets/src/mage/cards/s/SanctumPlowbeast.java index 9d03d9193c..46a64e0c6b 100644 --- a/Mage.Sets/src/mage/cards/s/SanctumPlowbeast.java +++ b/Mage.Sets/src/mage/cards/s/SanctumPlowbeast.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.PlainscyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class SanctumPlowbeast extends CardImpl { public SanctumPlowbeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{W}{U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); diff --git a/Mage.Sets/src/mage/cards/s/SanctumPrelate.java b/Mage.Sets/src/mage/cards/s/SanctumPrelate.java index 7a3894c198..a8a494b119 100644 --- a/Mage.Sets/src/mage/cards/s/SanctumPrelate.java +++ b/Mage.Sets/src/mage/cards/s/SanctumPrelate.java @@ -52,8 +52,8 @@ public class SanctumPrelate extends CardImpl { public SanctumPrelate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SanctumSeeker.java b/Mage.Sets/src/mage/cards/s/SanctumSeeker.java new file mode 100644 index 0000000000..cc1f8076e9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SanctumSeeker.java @@ -0,0 +1,80 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksCreatureYouControlTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author TheElk801 + */ +public class SanctumSeeker extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Vampire you control"); + + static { + filter.add(new SubtypePredicate(SubType.VAMPIRE)); + } + + public SanctumSeeker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Whenever a Vampire you control attacks, each opponent loses 1 life and you gain 1 life. + Ability ability = new AttacksCreatureYouControlTriggeredAbility(new LoseLifeOpponentsEffect(1), false, filter); + Effect effect = new GainLifeEffect(1); + effect.setText("and you gain 1 life"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public SanctumSeeker(final SanctumSeeker card) { + super(card); + } + + @Override + public SanctumSeeker copy() { + return new SanctumSeeker(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SandSquid.java b/Mage.Sets/src/mage/cards/s/SandSquid.java index ba5409df29..0ab60a12b3 100644 --- a/Mage.Sets/src/mage/cards/s/SandSquid.java +++ b/Mage.Sets/src/mage/cards/s/SandSquid.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.IslandwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class SandSquid extends CardImpl { public SandSquid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Squid"); - this.subtype.add("Beast"); + this.subtype.add(SubType.SQUID); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SandStrangler.java b/Mage.Sets/src/mage/cards/s/SandStrangler.java index 3b9dac7e93..dd771c5ead 100644 --- a/Mage.Sets/src/mage/cards/s/SandStrangler.java +++ b/Mage.Sets/src/mage/cards/s/SandStrangler.java @@ -62,7 +62,7 @@ public class SandStrangler extends CardImpl { public SandStrangler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SandTrooper.java b/Mage.Sets/src/mage/cards/s/SandTrooper.java index d49e7f9669..a3c145e6db 100644 --- a/Mage.Sets/src/mage/cards/s/SandTrooper.java +++ b/Mage.Sets/src/mage/cards/s/SandTrooper.java @@ -1,76 +1,76 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; -import mage.abilities.keyword.VigilanceAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; - -/** - * - * @author Styxo - */ -public class SandTrooper extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures"); - - static { - filter.add(new SubtypePredicate(SubType.TROOPER )); - } - - public SandTrooper(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Trooper"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // Trooper creatures you control have vigilance. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, filter, false))); - - } - - public SandTrooper(final SandTrooper card) { - super(card); - } - - @Override - public SandTrooper copy() { - return new SandTrooper(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author Styxo + */ +public class SandTrooper extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures"); + + static { + filter.add(new SubtypePredicate(SubType.TROOPER )); + } + + public SandTrooper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.TROOPER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Trooper creatures you control have vigilance. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, filter, false))); + + } + + public SandTrooper(final SandTrooper card) { + super(card); + } + + @Override + public SandTrooper copy() { + return new SandTrooper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SandbarCrocodile.java b/Mage.Sets/src/mage/cards/s/SandbarCrocodile.java index e67e35bffd..ed05ab8a3f 100644 --- a/Mage.Sets/src/mage/cards/s/SandbarCrocodile.java +++ b/Mage.Sets/src/mage/cards/s/SandbarCrocodile.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.PhasingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SandbarCrocodile extends CardImpl { public SandbarCrocodile(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Crocodile"); + this.subtype.add(SubType.CROCODILE); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SandbarMerfolk.java b/Mage.Sets/src/mage/cards/s/SandbarMerfolk.java index 81b21057b0..20ce7350aa 100644 --- a/Mage.Sets/src/mage/cards/s/SandbarMerfolk.java +++ b/Mage.Sets/src/mage/cards/s/SandbarMerfolk.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SandbarMerfolk extends CardImpl { public SandbarMerfolk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SandbarSerpent.java b/Mage.Sets/src/mage/cards/s/SandbarSerpent.java index 61d6cbd1d0..88f09ccc7a 100644 --- a/Mage.Sets/src/mage/cards/s/SandbarSerpent.java +++ b/Mage.Sets/src/mage/cards/s/SandbarSerpent.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SandbarSerpent extends CardImpl { public SandbarSerpent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SandcrafterMage.java b/Mage.Sets/src/mage/cards/s/SandcrafterMage.java index 47d2ec2499..00be295b72 100644 --- a/Mage.Sets/src/mage/cards/s/SandcrafterMage.java +++ b/Mage.Sets/src/mage/cards/s/SandcrafterMage.java @@ -34,6 +34,7 @@ import mage.abilities.effects.keyword.BolsterEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SandcrafterMage extends CardImpl { public SandcrafterMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SandsOfTime.java b/Mage.Sets/src/mage/cards/s/SandsOfTime.java new file mode 100644 index 0000000000..14699d169d --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SandsOfTime.java @@ -0,0 +1,117 @@ +/* + * 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.cards.s; + +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.SkipUntapStepEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author L_J + */ +public class SandsOfTime extends CardImpl { + + public SandsOfTime(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); + + // Each player skips his or her untap step. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipUntapStepEffect())); + + // At the beginning of each player's upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SandsOfTimeEffect(), TargetController.ANY, false)); + } + + public SandsOfTime(final SandsOfTime card) { + super(card); + } + + @Override + public SandsOfTime copy() { + return new SandsOfTime(this); + } +} + +class SandsOfTimeEffect extends OneShotEffect { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent(); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.CREATURE), + new CardTypePredicate(CardType.LAND))); + } + + public SandsOfTimeEffect() { + super(Outcome.Neutral); + staticText = "that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls"; + } + + public SandsOfTimeEffect(SandsOfTimeEffect copy) { + super(copy); + } + + @Override + public SandsOfTimeEffect copy() { + return new SandsOfTimeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + if (player != null) { + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, targetPointer.getFirst(game, source), game)) { + if (permanent.isTapped()) { + permanent.untap(game); + } else { + permanent.tap(game); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/Sandskin.java b/Mage.Sets/src/mage/cards/s/Sandskin.java new file mode 100644 index 0000000000..2903abff03 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/Sandskin.java @@ -0,0 +1,74 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.PreventAllDamageToAndByAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + + + +/** + * + * @author TheElk801 + */ +public class Sandskin extends CardImpl { + + public Sandskin(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Prevent all combat damage that would be dealt to and dealt by enchanted creature. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventAllDamageToAndByAttachedEffect(Duration.WhileOnBattlefield, "enchanted creature", true))); + } + + public Sandskin(final Sandskin card) { + super(card); + } + + @Override + public Sandskin copy() { + return new Sandskin(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/Sandsower.java b/Mage.Sets/src/mage/cards/s/Sandsower.java index 6f1a6b098e..a705bb4c50 100644 --- a/Mage.Sets/src/mage/cards/s/Sandsower.java +++ b/Mage.Sets/src/mage/cards/s/Sandsower.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; @@ -57,7 +58,7 @@ public class Sandsower extends CardImpl { public Sandsower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SandsteppeMastodon.java b/Mage.Sets/src/mage/cards/s/SandsteppeMastodon.java index ea9e0a8a19..56ab505d3a 100644 --- a/Mage.Sets/src/mage/cards/s/SandsteppeMastodon.java +++ b/Mage.Sets/src/mage/cards/s/SandsteppeMastodon.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class SandsteppeMastodon extends CardImpl { public SandsteppeMastodon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SandsteppeOutcast.java b/Mage.Sets/src/mage/cards/s/SandsteppeOutcast.java index ec798c2540..14921b1073 100644 --- a/Mage.Sets/src/mage/cards/s/SandsteppeOutcast.java +++ b/Mage.Sets/src/mage/cards/s/SandsteppeOutcast.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.game.permanent.token.SpiritWhiteToken; @@ -48,8 +49,8 @@ public class SandsteppeOutcast extends CardImpl { public SandsteppeOutcast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SandsteppeScavenger.java b/Mage.Sets/src/mage/cards/s/SandsteppeScavenger.java index 34dee98b4c..b4cc643ec9 100644 --- a/Mage.Sets/src/mage/cards/s/SandsteppeScavenger.java +++ b/Mage.Sets/src/mage/cards/s/SandsteppeScavenger.java @@ -34,6 +34,7 @@ import mage.abilities.effects.keyword.BolsterEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SandsteppeScavenger extends CardImpl { public SandsteppeScavenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Hound"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HOUND); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SandstoneOracle.java b/Mage.Sets/src/mage/cards/s/SandstoneOracle.java index fddb27cf9d..ce3bd74774 100644 --- a/Mage.Sets/src/mage/cards/s/SandstoneOracle.java +++ b/Mage.Sets/src/mage/cards/s/SandstoneOracle.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -50,7 +51,7 @@ public class SandstoneOracle extends CardImpl { public SandstoneOracle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SandstoneWarrior.java b/Mage.Sets/src/mage/cards/s/SandstoneWarrior.java index b28405906a..fb1ab39907 100644 --- a/Mage.Sets/src/mage/cards/s/SandstoneWarrior.java +++ b/Mage.Sets/src/mage/cards/s/SandstoneWarrior.java @@ -45,9 +45,9 @@ public class SandstoneWarrior extends CardImpl { public SandstoneWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SandstormCharger.java b/Mage.Sets/src/mage/cards/s/SandstormCharger.java index b01f935402..6bc22b2a0f 100644 --- a/Mage.Sets/src/mage/cards/s/SandstormCharger.java +++ b/Mage.Sets/src/mage/cards/s/SandstormCharger.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SandstormCharger extends CardImpl { public SandstormCharger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SandstormEidolon.java b/Mage.Sets/src/mage/cards/s/SandstormEidolon.java index a854302fa9..262f503680 100644 --- a/Mage.Sets/src/mage/cards/s/SandstormEidolon.java +++ b/Mage.Sets/src/mage/cards/s/SandstormEidolon.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.combat.CantBlockTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterSpell; @@ -59,7 +60,7 @@ public class SandstormEidolon extends CardImpl { public SandstormEidolon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SangriteBacklash.java b/Mage.Sets/src/mage/cards/s/SangriteBacklash.java index ed6f9352bd..25eb7fded8 100644 --- a/Mage.Sets/src/mage/cards/s/SangriteBacklash.java +++ b/Mage.Sets/src/mage/cards/s/SangriteBacklash.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -49,7 +50,7 @@ public class SangriteBacklash extends CardImpl { public SangriteBacklash(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B/G}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); diff --git a/Mage.Sets/src/mage/cards/s/Sangromancer.java b/Mage.Sets/src/mage/cards/s/Sangromancer.java index 4e2078f77b..e91cec26c6 100644 --- a/Mage.Sets/src/mage/cards/s/Sangromancer.java +++ b/Mage.Sets/src/mage/cards/s/Sangromancer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -51,8 +52,8 @@ public class Sangromancer extends CardImpl { public Sangromancer (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/Sangrophage.java b/Mage.Sets/src/mage/cards/s/Sangrophage.java index 5b78a7c831..54f4d81d6d 100644 --- a/Mage.Sets/src/mage/cards/s/Sangrophage.java +++ b/Mage.Sets/src/mage/cards/s/Sangrophage.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.TapSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -45,7 +46,7 @@ public class Sangrophage extends CardImpl { public Sangrophage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SanguinaryMage.java b/Mage.Sets/src/mage/cards/s/SanguinaryMage.java index b737601beb..6ed1ebb2e0 100644 --- a/Mage.Sets/src/mage/cards/s/SanguinaryMage.java +++ b/Mage.Sets/src/mage/cards/s/SanguinaryMage.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class SanguinaryMage extends CardImpl { public SanguinaryMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Vampire"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SanguineGuard.java b/Mage.Sets/src/mage/cards/s/SanguineGuard.java index b7429626c2..b146dcf2f1 100644 --- a/Mage.Sets/src/mage/cards/s/SanguineGuard.java +++ b/Mage.Sets/src/mage/cards/s/SanguineGuard.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class SanguineGuard extends CardImpl { public SanguineGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SanguinePraetor.java b/Mage.Sets/src/mage/cards/s/SanguinePraetor.java index 4e2edcc4c1..82a84cc0a7 100644 --- a/Mage.Sets/src/mage/cards/s/SanguinePraetor.java +++ b/Mage.Sets/src/mage/cards/s/SanguinePraetor.java @@ -38,6 +38,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -55,8 +56,8 @@ public class SanguinePraetor extends CardImpl { public SanguinePraetor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{B}{B}"); - this.subtype.add("Avatar"); - this.subtype.add("Praetor"); + this.subtype.add(SubType.AVATAR); + this.subtype.add(SubType.PRAETOR); this.power = new MageInt(7); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SanguineSacrament.java b/Mage.Sets/src/mage/cards/s/SanguineSacrament.java new file mode 100644 index 0000000000..ccf88fce75 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SanguineSacrament.java @@ -0,0 +1,81 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.ReturnToLibrarySpellEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.Game; + +/** + * + * @author spjspj + */ +public class SanguineSacrament extends CardImpl { + + public SanguineSacrament(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{W}{W}"); + + // You gain twice X life. Put Sanguine Sacrament on the bottom of its owner's library. + this.getSpellAbility().addEffect(new GainLifeEffect(new SanguineSacramentValue())); + this.getSpellAbility().addEffect(new ReturnToLibrarySpellEffect(false)); + } + + public SanguineSacrament(final SanguineSacrament card) { + super(card); + } + + @Override + public SanguineSacrament copy() { + return new SanguineSacrament(this); + } +} + +class SanguineSacramentValue extends ManacostVariableValue { + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + return super.calculate(game, sourceAbility, effect) * 2; + } + + @Override + public SanguineSacramentValue copy() { + return new SanguineSacramentValue(); + } + + @Override + public String toString() { + return "twice X"; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SanitariumSkeleton.java b/Mage.Sets/src/mage/cards/s/SanitariumSkeleton.java index e11e9af098..ccd8b4ac7a 100644 --- a/Mage.Sets/src/mage/cards/s/SanitariumSkeleton.java +++ b/Mage.Sets/src/mage/cards/s/SanitariumSkeleton.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class SanitariumSkeleton extends CardImpl { public SanitariumSkeleton(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SanityGnawers.java b/Mage.Sets/src/mage/cards/s/SanityGnawers.java index a1cde52bf2..a359cd779a 100644 --- a/Mage.Sets/src/mage/cards/s/SanityGnawers.java +++ b/Mage.Sets/src/mage/cards/s/SanityGnawers.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -45,7 +46,7 @@ public class SanityGnawers extends CardImpl { public SanityGnawers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); diff --git a/Mage.Sets/src/mage/cards/s/SaplingOfColfenor.java b/Mage.Sets/src/mage/cards/s/SaplingOfColfenor.java index efb27afe94..99d74ed801 100644 --- a/Mage.Sets/src/mage/cards/s/SaplingOfColfenor.java +++ b/Mage.Sets/src/mage/cards/s/SaplingOfColfenor.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -52,8 +53,8 @@ public class SaplingOfColfenor extends CardImpl { public SaplingOfColfenor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B/G}{B/G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Treefolk"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SapphireDrake.java b/Mage.Sets/src/mage/cards/s/SapphireDrake.java index 853031ca4f..f2d2bf97f6 100644 --- a/Mage.Sets/src/mage/cards/s/SapphireDrake.java +++ b/Mage.Sets/src/mage/cards/s/SapphireDrake.java @@ -59,7 +59,7 @@ public class SapphireDrake extends CardImpl { public SapphireDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SapphireLeech.java b/Mage.Sets/src/mage/cards/s/SapphireLeech.java index a9fdeff7a1..a3171043f9 100644 --- a/Mage.Sets/src/mage/cards/s/SapphireLeech.java +++ b/Mage.Sets/src/mage/cards/s/SapphireLeech.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ColorPredicate; @@ -55,7 +56,7 @@ public class SapphireLeech extends CardImpl { public SapphireLeech(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Leech"); + this.subtype.add(SubType.LEECH); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SaprazzanHeir.java b/Mage.Sets/src/mage/cards/s/SaprazzanHeir.java index 927007e491..c8dec64f33 100644 --- a/Mage.Sets/src/mage/cards/s/SaprazzanHeir.java +++ b/Mage.Sets/src/mage/cards/s/SaprazzanHeir.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SaprazzanHeir extends CardImpl { public SaprazzanHeir(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SaprazzanLegate.java b/Mage.Sets/src/mage/cards/s/SaprazzanLegate.java index e451e3c305..c69b127da2 100644 --- a/Mage.Sets/src/mage/cards/s/SaprazzanLegate.java +++ b/Mage.Sets/src/mage/cards/s/SaprazzanLegate.java @@ -58,8 +58,8 @@ public class SaprazzanLegate extends CardImpl { public SaprazzanLegate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SaprazzanRaider.java b/Mage.Sets/src/mage/cards/s/SaprazzanRaider.java index e899e17640..e9188da28f 100644 --- a/Mage.Sets/src/mage/cards/s/SaprazzanRaider.java +++ b/Mage.Sets/src/mage/cards/s/SaprazzanRaider.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SaprazzanRaider extends CardImpl { public SaprazzanRaider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SaprolingSymbiosis.java b/Mage.Sets/src/mage/cards/s/SaprolingSymbiosis.java index 77c70ea0e2..e15ba49ae2 100644 --- a/Mage.Sets/src/mage/cards/s/SaprolingSymbiosis.java +++ b/Mage.Sets/src/mage/cards/s/SaprolingSymbiosis.java @@ -43,17 +43,18 @@ import mage.game.permanent.token.SaprolingToken; /** * * @author LoneFox - + * */ public class SaprolingSymbiosis extends CardImpl { public SaprolingSymbiosis(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}"); Effect effect = new CreateTokenEffect(new SaprolingToken(), new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent())); // You may cast Saproling Symbiosis as though it had flash if you pay {2} more to cast it. Ability ability = new PayMoreToCastAsThoughtItHadFlashAbility(this, new ManaCostsImpl("{2}")); ability.addEffect(effect); + ability.setRuleAtTheTop(true); this.addAbility(ability); // Create a 1/1 green Saproling creature token for each creature you control. this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/s/SapseepForest.java b/Mage.Sets/src/mage/cards/s/SapseepForest.java index 8449d34d2d..64e6736325 100644 --- a/Mage.Sets/src/mage/cards/s/SapseepForest.java +++ b/Mage.Sets/src/mage/cards/s/SapseepForest.java @@ -40,6 +40,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -59,7 +60,7 @@ public class SapseepForest extends CardImpl { public SapseepForest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Forest"); + this.subtype.add(SubType.FOREST); // ({tap}: Add {G} to your mana pool.) this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/Sarcatog.java b/Mage.Sets/src/mage/cards/s/Sarcatog.java index 3de45a608f..1015ad2311 100644 --- a/Mage.Sets/src/mage/cards/s/Sarcatog.java +++ b/Mage.Sets/src/mage/cards/s/Sarcatog.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterCard; @@ -51,7 +52,7 @@ public class Sarcatog extends CardImpl { public Sarcatog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}"); - this.subtype.add("Atog"); + this.subtype.add(SubType.ATOG); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SarcomiteMyr.java b/Mage.Sets/src/mage/cards/s/SarcomiteMyr.java index 444ec40c75..3f8b2c2d73 100644 --- a/Mage.Sets/src/mage/cards/s/SarcomiteMyr.java +++ b/Mage.Sets/src/mage/cards/s/SarcomiteMyr.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class SarcomiteMyr extends CardImpl { public SarcomiteMyr(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{U}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SarkhanTheDragonspeaker.java b/Mage.Sets/src/mage/cards/s/SarkhanTheDragonspeaker.java index d0088f81d4..4404763e28 100644 --- a/Mage.Sets/src/mage/cards/s/SarkhanTheDragonspeaker.java +++ b/Mage.Sets/src/mage/cards/s/SarkhanTheDragonspeaker.java @@ -58,7 +58,7 @@ public class SarkhanTheDragonspeaker extends CardImpl { public SarkhanTheDragonspeaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{R}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Sarkhan"); + this.subtype.add(SubType.SARKHAN); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); @@ -118,7 +118,7 @@ class SarkhanTheDragonspeakerEffect extends ContinuousEffectImpl { permanent.getCardType().clear(); permanent.addCardType(CardType.CREATURE); permanent.getSubtype(game).clear(); - permanent.getSubtype(game).add("Dragon"); + permanent.getSubtype(game).add(SubType.DRAGON); permanent.getSuperType().clear(); permanent.addSuperType(SuperType.LEGENDARY); } diff --git a/Mage.Sets/src/mage/cards/s/SarkhanTheMad.java b/Mage.Sets/src/mage/cards/s/SarkhanTheMad.java index 99e6ed8547..bd2621b3bd 100644 --- a/Mage.Sets/src/mage/cards/s/SarkhanTheMad.java +++ b/Mage.Sets/src/mage/cards/s/SarkhanTheMad.java @@ -64,7 +64,7 @@ public class SarkhanTheMad extends CardImpl { public SarkhanTheMad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{3}{B}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Sarkhan"); + this.subtype.add(SubType.SARKHAN); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(7)); this.addAbility(new LoyaltyAbility(new SarkhanTheMadRevealAndDrawEffect(), 0)); diff --git a/Mage.Sets/src/mage/cards/s/SarkhanUnbroken.java b/Mage.Sets/src/mage/cards/s/SarkhanUnbroken.java index acbefa9095..48a642f9b1 100644 --- a/Mage.Sets/src/mage/cards/s/SarkhanUnbroken.java +++ b/Mage.Sets/src/mage/cards/s/SarkhanUnbroken.java @@ -58,7 +58,7 @@ import mage.target.common.TargetCardInLibrary; */ public class SarkhanUnbroken extends CardImpl { - private static final FilterCard dragonFilter = new FilterCard("Dragon creature card"); + private static final FilterCard dragonFilter = new FilterCard("Dragon creature cards"); static { dragonFilter.add(new SubtypePredicate(SubType.DRAGON)); @@ -67,7 +67,7 @@ public class SarkhanUnbroken extends CardImpl { public SarkhanUnbroken(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{2}{G}{U}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Sarkhan"); + this.subtype.add(SubType.SARKHAN); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/s/SarkhanVol.java b/Mage.Sets/src/mage/cards/s/SarkhanVol.java index 8158846695..9ef2f2c9d3 100644 --- a/Mage.Sets/src/mage/cards/s/SarkhanVol.java +++ b/Mage.Sets/src/mage/cards/s/SarkhanVol.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.filter.StaticFilters; @@ -58,7 +59,7 @@ public class SarkhanVol extends CardImpl { public SarkhanVol(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{2}{R}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Sarkhan"); + this.subtype.add(SubType.SARKHAN); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/s/SarlaccPit.java b/Mage.Sets/src/mage/cards/s/SarlaccPit.java index 28dd42b874..e84f9d8b7e 100644 --- a/Mage.Sets/src/mage/cards/s/SarlaccPit.java +++ b/Mage.Sets/src/mage/cards/s/SarlaccPit.java @@ -1,92 +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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.BecomesMonstrousSourceTriggeredAbility; -import mage.abilities.costs.common.SacrificeTargetCost; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; -import mage.abilities.effects.common.continuous.LoseAbilitySourceEffect; -import mage.abilities.keyword.DeathtouchAbility; -import mage.abilities.keyword.DefenderAbility; -import mage.abilities.keyword.FirstStrikeAbility; -import mage.abilities.keyword.HexproofAbility; -import mage.abilities.keyword.MonstrosityAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.common.FilterControlledLandPermanent; -import mage.target.common.TargetControlledPermanent; - -/** - * - * @author Styxo - */ -public class SarlaccPit extends CardImpl { - - public SarlaccPit(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}"); - this.subtype.add("Beast"); - this.power = new MageInt(0); - this.toughness = new MageInt(4); - - // Defender - this.addAbility(DefenderAbility.getInstance()); - - // Hexproof - this.addAbility(HexproofAbility.getInstance()); - - // {R}{G}, Sacrifice a land: Monstrosity 1. - Ability ability = new MonstrosityAbility("{R}{G}", 1); - ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land")))); - this.addAbility(ability); - - // When Sarlacc Pit becomes monstrous, it loses hexproof and gains first strike and deathtouch. - ability = new BecomesMonstrousSourceTriggeredAbility(new LoseAbilitySourceEffect(HexproofAbility.getInstance())); - Effect effect = new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()); - effect.setText("and gains first strike"); - ability.addEffect(effect); - effect = new GainAbilitySourceEffect(DeathtouchAbility.getInstance()); - effect.setText("and deathtouch"); - ability.addEffect(effect); - - this.addAbility(ability); - } - - public SarlaccPit(final SarlaccPit card) { - super(card); - } - - @Override - public SarlaccPit copy() { - return new SarlaccPit(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BecomesMonstrousSourceTriggeredAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.continuous.LoseAbilitySourceEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.abilities.keyword.DefenderAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.HexproofAbility; +import mage.abilities.keyword.MonstrosityAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterControlledLandPermanent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author Styxo + */ +public class SarlaccPit extends CardImpl { + + public SarlaccPit(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}"); + this.subtype.add(SubType.BEAST); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + + // Hexproof + this.addAbility(HexproofAbility.getInstance()); + + // {R}{G}, Sacrifice a land: Monstrosity 1. + Ability ability = new MonstrosityAbility("{R}{G}", 1); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land")))); + this.addAbility(ability); + + // When Sarlacc Pit becomes monstrous, it loses hexproof and gains first strike and deathtouch. + ability = new BecomesMonstrousSourceTriggeredAbility(new LoseAbilitySourceEffect(HexproofAbility.getInstance())); + Effect effect = new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()); + effect.setText("and gains first strike"); + ability.addEffect(effect); + effect = new GainAbilitySourceEffect(DeathtouchAbility.getInstance()); + effect.setText("and deathtouch"); + ability.addEffect(effect); + + this.addAbility(ability); + } + + public SarlaccPit(final SarlaccPit card) { + super(card); + } + + @Override + public SarlaccPit copy() { + return new SarlaccPit(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SaruliGatekeepers.java b/Mage.Sets/src/mage/cards/s/SaruliGatekeepers.java index 3277408525..e0ae99ff82 100644 --- a/Mage.Sets/src/mage/cards/s/SaruliGatekeepers.java +++ b/Mage.Sets/src/mage/cards/s/SaruliGatekeepers.java @@ -57,8 +57,8 @@ public class SaruliGatekeepers extends CardImpl { public SaruliGatekeepers (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SasayaOrochiAscendant.java b/Mage.Sets/src/mage/cards/s/SasayaOrochiAscendant.java index 3e247a4f2c..b381856d82 100644 --- a/Mage.Sets/src/mage/cards/s/SasayaOrochiAscendant.java +++ b/Mage.Sets/src/mage/cards/s/SasayaOrochiAscendant.java @@ -63,8 +63,8 @@ public class SasayaOrochiAscendant extends CardImpl { public SasayaOrochiAscendant(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Snake"); - this.subtype.add("Monk"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SaskiaTheUnyielding.java b/Mage.Sets/src/mage/cards/s/SaskiaTheUnyielding.java index fd6380b05a..6a247fc966 100644 --- a/Mage.Sets/src/mage/cards/s/SaskiaTheUnyielding.java +++ b/Mage.Sets/src/mage/cards/s/SaskiaTheUnyielding.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.constants.SuperType; @@ -56,8 +57,8 @@ public class SaskiaTheUnyielding extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{R}{G}{W}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SatyrFiredancer.java b/Mage.Sets/src/mage/cards/s/SatyrFiredancer.java index 05ecd6fdd4..0c97e6f7f1 100644 --- a/Mage.Sets/src/mage/cards/s/SatyrFiredancer.java +++ b/Mage.Sets/src/mage/cards/s/SatyrFiredancer.java @@ -39,6 +39,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -60,7 +61,7 @@ public class SatyrFiredancer extends CardImpl { public SatyrFiredancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{R}"); - this.subtype.add("Satyr"); + this.subtype.add(SubType.SATYR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SatyrGrovedancer.java b/Mage.Sets/src/mage/cards/s/SatyrGrovedancer.java index 4bae30786c..557d6b5bd2 100644 --- a/Mage.Sets/src/mage/cards/s/SatyrGrovedancer.java +++ b/Mage.Sets/src/mage/cards/s/SatyrGrovedancer.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -46,8 +47,8 @@ public class SatyrGrovedancer extends CardImpl { public SatyrGrovedancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Satyr"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.SATYR); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SatyrHedonist.java b/Mage.Sets/src/mage/cards/s/SatyrHedonist.java index 9c7f479d6c..b2b199fd29 100644 --- a/Mage.Sets/src/mage/cards/s/SatyrHedonist.java +++ b/Mage.Sets/src/mage/cards/s/SatyrHedonist.java @@ -36,6 +36,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class SatyrHedonist extends CardImpl { public SatyrHedonist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Satyr"); + this.subtype.add(SubType.SATYR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SatyrHoplite.java b/Mage.Sets/src/mage/cards/s/SatyrHoplite.java index 3ceac55997..0d4fcf5fc1 100644 --- a/Mage.Sets/src/mage/cards/s/SatyrHoplite.java +++ b/Mage.Sets/src/mage/cards/s/SatyrHoplite.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -44,8 +45,8 @@ public class SatyrHoplite extends CardImpl { public SatyrHoplite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Satyr"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SATYR); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SatyrNyxSmith.java b/Mage.Sets/src/mage/cards/s/SatyrNyxSmith.java index 10b5041003..bfeb7ef6e2 100644 --- a/Mage.Sets/src/mage/cards/s/SatyrNyxSmith.java +++ b/Mage.Sets/src/mage/cards/s/SatyrNyxSmith.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.InspiredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.SatyrNyxSmithElementalToken; /** @@ -47,8 +48,8 @@ public class SatyrNyxSmith extends CardImpl { public SatyrNyxSmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Satyr"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.SATYR); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SatyrPiper.java b/Mage.Sets/src/mage/cards/s/SatyrPiper.java index 9f98907c91..82a0599916 100644 --- a/Mage.Sets/src/mage/cards/s/SatyrPiper.java +++ b/Mage.Sets/src/mage/cards/s/SatyrPiper.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.combat.MustBeBlockedByAtLeastOneTargetEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class SatyrPiper extends CardImpl { public SatyrPiper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Satyr"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.SATYR); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SatyrRambler.java b/Mage.Sets/src/mage/cards/s/SatyrRambler.java index 1cc8e995ca..40fffbe28d 100644 --- a/Mage.Sets/src/mage/cards/s/SatyrRambler.java +++ b/Mage.Sets/src/mage/cards/s/SatyrRambler.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SatyrRambler extends CardImpl { public SatyrRambler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Satyr"); + this.subtype.add(SubType.SATYR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SatyrWayfinder.java b/Mage.Sets/src/mage/cards/s/SatyrWayfinder.java index 2795e71693..79c1bf10e5 100644 --- a/Mage.Sets/src/mage/cards/s/SatyrWayfinder.java +++ b/Mage.Sets/src/mage/cards/s/SatyrWayfinder.java @@ -39,6 +39,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterLandCard; @@ -54,7 +55,7 @@ public class SatyrWayfinder extends CardImpl { public SatyrWayfinder(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Satyr"); + this.subtype.add(SubType.SATYR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SavaenElves.java b/Mage.Sets/src/mage/cards/s/SavaenElves.java index fa7100e684..642beadad8 100644 --- a/Mage.Sets/src/mage/cards/s/SavaenElves.java +++ b/Mage.Sets/src/mage/cards/s/SavaenElves.java @@ -63,7 +63,7 @@ public class SavaenElves extends CardImpl { public SavaenElves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SavageFirecat.java b/Mage.Sets/src/mage/cards/s/SavageFirecat.java index 2ad1006d2f..2a0d110a81 100644 --- a/Mage.Sets/src/mage/cards/s/SavageFirecat.java +++ b/Mage.Sets/src/mage/cards/s/SavageFirecat.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -52,8 +53,8 @@ public class SavageFirecat extends CardImpl { public SavageFirecat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Cat"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.CAT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SavageGorilla.java b/Mage.Sets/src/mage/cards/s/SavageGorilla.java index dcd0cfbba3..6b6da38962 100644 --- a/Mage.Sets/src/mage/cards/s/SavageGorilla.java +++ b/Mage.Sets/src/mage/cards/s/SavageGorilla.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -51,7 +52,7 @@ public class SavageGorilla extends CardImpl { public SavageGorilla(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Ape"); + this.subtype.add(SubType.APE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SavageHunger.java b/Mage.Sets/src/mage/cards/s/SavageHunger.java index 01529e5b36..5045dc3250 100644 --- a/Mage.Sets/src/mage/cards/s/SavageHunger.java +++ b/Mage.Sets/src/mage/cards/s/SavageHunger.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class SavageHunger extends CardImpl { public SavageHunger (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SavageKnuckleblade.java b/Mage.Sets/src/mage/cards/s/SavageKnuckleblade.java index c8bfc554bb..11bffc1c52 100644 --- a/Mage.Sets/src/mage/cards/s/SavageKnuckleblade.java +++ b/Mage.Sets/src/mage/cards/s/SavageKnuckleblade.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class SavageKnuckleblade extends CardImpl { public SavageKnuckleblade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{U}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SavageSilhouette.java b/Mage.Sets/src/mage/cards/s/SavageSilhouette.java index 73c06533c5..1217dfcb60 100644 --- a/Mage.Sets/src/mage/cards/s/SavageSilhouette.java +++ b/Mage.Sets/src/mage/cards/s/SavageSilhouette.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class SavageSilhouette extends CardImpl { public SavageSilhouette(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/SavageStomp.java b/Mage.Sets/src/mage/cards/s/SavageStomp.java new file mode 100644 index 0000000000..96c8084d4c --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SavageStomp.java @@ -0,0 +1,127 @@ +/* + * 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.cards.s; + +import java.util.Iterator; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.FightTargetsEffect; +import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +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.game.stack.StackObject; +import mage.target.Target; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class SavageStomp extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control"); + + static { + filter.add(new ControllerPredicate(TargetController.NOT_YOU)); + } + + public SavageStomp(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}"); + + // Savage Stomp costs {2} less to cast if it targets a Dinosaur you control. + this.addAbility(new SimpleStaticAbility(Zone.STACK, + new SpellCostReductionSourceEffect(2, SavageStompCondition.instance)) + .setRuleAtTheTop(true)); + + // Put a +1/+1 counter on target creature you control. Then that creature fights target creature you don't control. + Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance()); + effect.setApplyEffectsAfter(); + this.getSpellAbility().addEffect(effect); + effect = new FightTargetsEffect(); + effect.setText("Then that creature fights target creature you don't control"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + Target target = new TargetCreaturePermanent(filter); + this.getSpellAbility().addTarget(target); + } + + public SavageStomp(final SavageStomp card) { + super(card); + } + + @Override + public SavageStomp copy() { + return new SavageStomp(this); + } +} + +enum SavageStompCondition implements Condition { + instance; + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Dinosaur you control"); + + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + @Override + public boolean apply(Game game, Ability source) { + StackObject sourceSpell = game.getStack().getStackObject(source.getSourceId()); + if (sourceSpell != null) { + Iterator targets = sourceSpell.getStackAbility().getTargets().iterator(); + while (targets.hasNext()) { + Permanent permanent = game.getPermanentOrLKIBattlefield(targets.next().getFirstTarget()); + if (permanent != null && filter.match(permanent, game) && permanent.getControllerId().equals(source.getControllerId())) { + return true; + } + } + } + return false; + } + + @Override + public String toString() { + return "it targets a Dinosaur you control"; + } + +} diff --git a/Mage.Sets/src/mage/cards/s/SavageThallid.java b/Mage.Sets/src/mage/cards/s/SavageThallid.java index f705a495af..b701028693 100644 --- a/Mage.Sets/src/mage/cards/s/SavageThallid.java +++ b/Mage.Sets/src/mage/cards/s/SavageThallid.java @@ -71,7 +71,7 @@ public class SavageThallid extends CardImpl { public SavageThallid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(5); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SavageVentmaw.java b/Mage.Sets/src/mage/cards/s/SavageVentmaw.java index 93ba4ca28e..ac1ba48357 100644 --- a/Mage.Sets/src/mage/cards/s/SavageVentmaw.java +++ b/Mage.Sets/src/mage/cards/s/SavageVentmaw.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.Game; import mage.players.Player; @@ -49,7 +50,7 @@ public class SavageVentmaw extends CardImpl { public SavageVentmaw(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{G}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SavagebornHydra.java b/Mage.Sets/src/mage/cards/s/SavagebornHydra.java index 7565c937cb..2ab078a8f0 100644 --- a/Mage.Sets/src/mage/cards/s/SavagebornHydra.java +++ b/Mage.Sets/src/mage/cards/s/SavagebornHydra.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -49,7 +50,7 @@ public class SavagebornHydra extends CardImpl { public SavagebornHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{X}{R}{G}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/Savannah.java b/Mage.Sets/src/mage/cards/s/Savannah.java index 98f8655046..a0b8278057 100644 --- a/Mage.Sets/src/mage/cards/s/Savannah.java +++ b/Mage.Sets/src/mage/cards/s/Savannah.java @@ -33,6 +33,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class Savannah extends CardImpl { public Savannah(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Forest"); - this.subtype.add("Plains"); + this.subtype.add(SubType.FOREST); + this.subtype.add(SubType.PLAINS); this.addAbility(new GreenManaAbility()); this.addAbility(new WhiteManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SavannahLions.java b/Mage.Sets/src/mage/cards/s/SavannahLions.java index d5c6a98ba8..f604f4341e 100644 --- a/Mage.Sets/src/mage/cards/s/SavannahLions.java +++ b/Mage.Sets/src/mage/cards/s/SavannahLions.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class SavannahLions extends CardImpl { public SavannahLions(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SavingGrace.java b/Mage.Sets/src/mage/cards/s/SavingGrace.java index 3a519c6319..b4b492b2e6 100644 --- a/Mage.Sets/src/mage/cards/s/SavingGrace.java +++ b/Mage.Sets/src/mage/cards/s/SavingGrace.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class SavingGrace extends CardImpl { public SavingGrace(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/s/SavraQueenOfTheGolgari.java b/Mage.Sets/src/mage/cards/s/SavraQueenOfTheGolgari.java index 0f41235ab8..16e5749d00 100644 --- a/Mage.Sets/src/mage/cards/s/SavraQueenOfTheGolgari.java +++ b/Mage.Sets/src/mage/cards/s/SavraQueenOfTheGolgari.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class SavraQueenOfTheGolgari extends CardImpl { public SavraQueenOfTheGolgari(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SawbackManticore.java b/Mage.Sets/src/mage/cards/s/SawbackManticore.java new file mode 100644 index 0000000000..817e63123a --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SawbackManticore.java @@ -0,0 +1,82 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.SourceMatchesFilterCondition; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterAttackingOrBlockingCreature; +import mage.target.common.TargetAttackingOrBlockingCreature; + +/** + * + * @author TheElk801 + */ +public class SawbackManticore extends CardImpl { + + public SawbackManticore(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{G}"); + + this.subtype.add(SubType.MANTICORE); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // {4}: Sawback Manticore gains flying until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new GenericManaCost(4))); + + // {1}: Sawback Manticore deals 2 damage to target attacking or blocking creature. Activate this ability only if Sawback Manticore is attacking or blocking and only once each turn. + Ability ability = new LimitedTimesPerTurnActivatedAbility( + Zone.BATTLEFIELD, new DamageTargetEffect(2), new GenericManaCost(1), + 1, new SourceMatchesFilterCondition("if {this} is attacking or blocking", new FilterAttackingOrBlockingCreature()) + ); + ability.addTarget(new TargetAttackingOrBlockingCreature()); + this.addAbility(ability); + } + + public SawbackManticore(final SawbackManticore card) { + super(card); + } + + @Override + public SawbackManticore copy() { + return new SawbackManticore(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SawtoothLoon.java b/Mage.Sets/src/mage/cards/s/SawtoothLoon.java index f21fdfc5e9..27ab1c640a 100644 --- a/Mage.Sets/src/mage/cards/s/SawtoothLoon.java +++ b/Mage.Sets/src/mage/cards/s/SawtoothLoon.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.FilterCard; import mage.filter.common.FilterControlledCreaturePermanent; @@ -64,8 +65,8 @@ public class SawtoothLoon extends CardImpl { } public SawtoothLoon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{U}"); - this.subtype.add("Bird"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{U}"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -93,7 +94,7 @@ class SawtoothLoonEffect extends OneShotEffect { public SawtoothLoonEffect() { super(Outcome.DrawCard); - this.staticText = "Draw two cards, then put two cards from your hand on the bottom of your library"; + this.staticText = "draw two cards, then put two cards from your hand on the bottom of your library"; } public SawtoothLoonEffect(final SawtoothLoonEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/SawtoothThresher.java b/Mage.Sets/src/mage/cards/s/SawtoothThresher.java index 0021534319..bb7a34461a 100644 --- a/Mage.Sets/src/mage/cards/s/SawtoothThresher.java +++ b/Mage.Sets/src/mage/cards/s/SawtoothThresher.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SunburstAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -48,7 +49,7 @@ public class SawtoothThresher extends CardImpl { public SawtoothThresher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScabClanBerserker.java b/Mage.Sets/src/mage/cards/s/ScabClanBerserker.java index 8a115add5d..f2d05258d4 100644 --- a/Mage.Sets/src/mage/cards/s/ScabClanBerserker.java +++ b/Mage.Sets/src/mage/cards/s/ScabClanBerserker.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.RenownAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -53,8 +54,8 @@ public class ScabClanBerserker extends CardImpl { public ScabClanBerserker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScabClanCharger.java b/Mage.Sets/src/mage/cards/s/ScabClanCharger.java index d01e4ceadd..1e1486d6af 100644 --- a/Mage.Sets/src/mage/cards/s/ScabClanCharger.java +++ b/Mage.Sets/src/mage/cards/s/ScabClanCharger.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.BloodrushAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,8 +45,8 @@ public class ScabClanCharger extends CardImpl { public ScabClanCharger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ScabClanGiant.java b/Mage.Sets/src/mage/cards/s/ScabClanGiant.java index 05b0a1651d..796c4e988a 100644 --- a/Mage.Sets/src/mage/cards/s/ScabClanGiant.java +++ b/Mage.Sets/src/mage/cards/s/ScabClanGiant.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -57,8 +58,8 @@ public class ScabClanGiant extends CardImpl { public ScabClanGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{G}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/ScabClanMauler.java b/Mage.Sets/src/mage/cards/s/ScabClanMauler.java index 2b81b01eda..5f661c0c0d 100644 --- a/Mage.Sets/src/mage/cards/s/ScabClanMauler.java +++ b/Mage.Sets/src/mage/cards/s/ScabClanMauler.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ScabClanMauler extends CardImpl { public ScabClanMauler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}"); - this.subtype.add("Human"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScaldingDevil.java b/Mage.Sets/src/mage/cards/s/ScaldingDevil.java index 807334ad87..814f97a33d 100644 --- a/Mage.Sets/src/mage/cards/s/ScaldingDevil.java +++ b/Mage.Sets/src/mage/cards/s/ScaldingDevil.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -47,7 +48,7 @@ public class ScaldingDevil extends CardImpl { public ScaldingDevil(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScaldingSalamander.java b/Mage.Sets/src/mage/cards/s/ScaldingSalamander.java new file mode 100644 index 0000000000..093ec1376a --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ScaldingSalamander.java @@ -0,0 +1,81 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.permanent.DefendingPlayerControlsPredicate; + +/** + * + * @author TheElk801 + */ +public class ScaldingSalamander extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("creature without flying defending player controls"); + + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); + filter.add(new DefendingPlayerControlsPredicate()); + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + + public ScaldingSalamander(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + + this.subtype.add(SubType.SALAMANDER); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Whenever Scalding Salamander attacks, you may have it deal 1 damage to each creature without flying defending player controls. + this.addAbility(new AttacksTriggeredAbility( + new DamageAllEffect(1, filter), true, + "Whenever Scalding Salamander attacks, you may have it deal 1 damage to each creature without flying defending player controls." + )); + } + + public ScaldingSalamander(final ScaldingSalamander card) { + super(card); + } + + @Override + public ScaldingSalamander copy() { + return new ScaldingSalamander(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/Scaldkin.java b/Mage.Sets/src/mage/cards/s/Scaldkin.java index cb5e090a71..061a8ca69e 100644 --- a/Mage.Sets/src/mage/cards/s/Scaldkin.java +++ b/Mage.Sets/src/mage/cards/s/Scaldkin.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -49,7 +50,7 @@ public class Scaldkin extends CardImpl { public Scaldkin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScaleBlessing.java b/Mage.Sets/src/mage/cards/s/ScaleBlessing.java index e354df9011..59a9c5f17b 100644 --- a/Mage.Sets/src/mage/cards/s/ScaleBlessing.java +++ b/Mage.Sets/src/mage/cards/s/ScaleBlessing.java @@ -51,11 +51,11 @@ import mage.players.Player; public class ScaleBlessing extends CardImpl { public ScaleBlessing(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{W}"); // Bolster 1, then put a +1/+1 counter on each creature you control with a +1/+1 counter on it. Effect effect = new BolsterEffect(1); - effect.setText("Bolster 1"); + effect.setText("Bolster 1"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(new ScaleBlessingEffect()); @@ -81,7 +81,7 @@ class ScaleBlessingEffect extends OneShotEffect { public ScaleBlessingEffect() { super(Outcome.Benefit); - this.staticText = ", then put a +1/+1 counter on each creature you control with a +1/+1 counter on it. "; + this.staticText = ", then put a +1/+1 counter on each creature you control with a +1/+1 counter on it. (To bolster 1, choose a creature with the least toughness among creatures you control and put +1/+1 counter on it.)"; } public ScaleBlessingEffect(final ScaleBlessingEffect effect) { @@ -98,7 +98,7 @@ class ScaleBlessingEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = source.getSourceObject(game); if (controller != null && sourceObject != null) { - for(Permanent permanent: game.getState().getBattlefield().getAllActivePermanents(filter , controller.getId(), game)) { + for (Permanent permanent : game.getState().getBattlefield().getAllActivePermanents(filter, controller.getId(), game)) { permanent.addCounters(CounterType.P1P1.createInstance(), source, game); game.informPlayers(sourceObject.getName() + ": Put a +1/+1 counter on " + permanent.getLogName()); } diff --git a/Mage.Sets/src/mage/cards/s/ScalebanesElite.java b/Mage.Sets/src/mage/cards/s/ScalebanesElite.java index 59c6ef4132..7e54549f74 100644 --- a/Mage.Sets/src/mage/cards/s/ScalebanesElite.java +++ b/Mage.Sets/src/mage/cards/s/ScalebanesElite.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ScalebanesElite extends CardImpl { public ScalebanesElite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ScaledBehemoth.java b/Mage.Sets/src/mage/cards/s/ScaledBehemoth.java index 9e8149bc62..4499eec6ea 100644 --- a/Mage.Sets/src/mage/cards/s/ScaledBehemoth.java +++ b/Mage.Sets/src/mage/cards/s/ScaledBehemoth.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class ScaledBehemoth extends CardImpl { public ScaledBehemoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); - this.subtype.add("Crocodile"); + this.subtype.add(SubType.CROCODILE); this.power = new MageInt(6); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/s/ScaledHulk.java b/Mage.Sets/src/mage/cards/s/ScaledHulk.java index 4bae6ee60a..caf2c441da 100644 --- a/Mage.Sets/src/mage/cards/s/ScaledHulk.java +++ b/Mage.Sets/src/mage/cards/s/ScaledHulk.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; @@ -45,7 +46,7 @@ public class ScaledHulk extends CardImpl { public ScaledHulk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ScaledWurm.java b/Mage.Sets/src/mage/cards/s/ScaledWurm.java index fb73769453..37d05d8c32 100644 --- a/Mage.Sets/src/mage/cards/s/ScaledWurm.java +++ b/Mage.Sets/src/mage/cards/s/ScaledWurm.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class ScaledWurm extends CardImpl { public ScaledWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{7}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(7); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/ScaleguardSentinels.java b/Mage.Sets/src/mage/cards/s/ScaleguardSentinels.java index 60b1d432a8..c0a19bac1d 100644 --- a/Mage.Sets/src/mage/cards/s/ScaleguardSentinels.java +++ b/Mage.Sets/src/mage/cards/s/ScaleguardSentinels.java @@ -62,9 +62,9 @@ public class ScaleguardSentinels extends CardImpl { } public ScaleguardSentinels(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{G}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); @@ -74,7 +74,7 @@ public class ScaleguardSentinels extends CardImpl { // Scaleguard Sentinels enters the battlefield with a +1/+1 counter on it if you revealed a Dragon card or controlled a Dragon as you cast Scaleguard Sentinels. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(), true), ScaleguardSentinelsCondition.instance, - "{this} enters the battlefield with a +1/+1 counter on it if you revealed a Dragon card or controlled a Dragon as you cast {this}", ""), + "{this} enters the battlefield with a +1/+1 counter on it if you revealed a Dragon card or controlled a Dragon as you cast {this}.", ""), new DragonOnTheBattlefieldWhileSpellWasCastWatcher()); } diff --git a/Mage.Sets/src/mage/cards/s/ScalelordReckoner.java b/Mage.Sets/src/mage/cards/s/ScalelordReckoner.java index 5cb1ec0c8c..b67cd1ff4b 100644 --- a/Mage.Sets/src/mage/cards/s/ScalelordReckoner.java +++ b/Mage.Sets/src/mage/cards/s/ScalelordReckoner.java @@ -57,7 +57,7 @@ public class ScalelordReckoner extends CardImpl { public ScalelordReckoner(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/Scalpelexis.java b/Mage.Sets/src/mage/cards/s/Scalpelexis.java index eb1093840d..27c6be5f20 100644 --- a/Mage.Sets/src/mage/cards/s/Scalpelexis.java +++ b/Mage.Sets/src/mage/cards/s/Scalpelexis.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -51,7 +52,7 @@ public class Scalpelexis extends CardImpl { public Scalpelexis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/Scandalmonger.java b/Mage.Sets/src/mage/cards/s/Scandalmonger.java new file mode 100644 index 0000000000..0832a46ea1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/Scandalmonger.java @@ -0,0 +1,74 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.InfoEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.target.TargetPlayer; + +/** + * + * @author L_J + */ +public class Scandalmonger extends CardImpl { + + public Scandalmonger(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); + this.subtype.add(SubType.BOAR); + this.subtype.add(SubType.MONGER); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {2}: Target player discards a card. Any player may activate this ability but only any time he or she could cast a sorcery. + ActivateAsSorceryActivatedAbility ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(1), new ManaCostsImpl("{2}")); + ability.addTarget(new TargetPlayer()); + ability.setMayActivate(TargetController.ANY); + ability.addEffect(new InfoEffect("Any player may activate this ability")); + this.addAbility(ability); + } + + public Scandalmonger(final Scandalmonger card) { + super(card); + } + + @Override + public Scandalmonger copy() { + return new Scandalmonger(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ScarbladeElite.java b/Mage.Sets/src/mage/cards/s/ScarbladeElite.java index c61c6da502..649fcdefa1 100644 --- a/Mage.Sets/src/mage/cards/s/ScarbladeElite.java +++ b/Mage.Sets/src/mage/cards/s/ScarbladeElite.java @@ -58,8 +58,8 @@ public class ScarbladeElite extends CardImpl { public ScarbladeElite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Elf"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage/src/main/java/mage/abilities/common/AttacksEachTurnStaticAbility.java b/Mage.Sets/src/mage/cards/s/ScareTactics.java similarity index 69% rename from Mage/src/main/java/mage/abilities/common/AttacksEachTurnStaticAbility.java rename to Mage.Sets/src/mage/cards/s/ScareTactics.java index 7e5d27f7cd..982e23c340 100644 --- a/Mage/src/main/java/mage/abilities/common/AttacksEachTurnStaticAbility.java +++ b/Mage.Sets/src/mage/cards/s/ScareTactics.java @@ -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,38 +20,39 @@ * 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.cards.s; -package mage.abilities.common; - +import java.util.UUID; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.Zone; -import mage.abilities.StaticAbility; -import mage.abilities.effects.common.combat.AttacksIfAbleSourceEffect; -import mage.watchers.common.AttackedThisTurnWatcher; /** * - * @author BetaSteward_at_googlemail.com + * @author Ekkaia */ -public class AttacksEachTurnStaticAbility extends StaticAbility { +public class ScareTactics extends CardImpl { - public AttacksEachTurnStaticAbility() { - super(Zone.BATTLEFIELD, new AttacksIfAbleSourceEffect(Duration.WhileOnBattlefield)); - addWatcher(new AttackedThisTurnWatcher()); + public ScareTactics(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{B}"); + + // Creatures you control get +1/+0 until end of turn. + this.getSpellAbility().addEffect(new BoostControlledEffect(1, 0, Duration.EndOfTurn)); } - public AttacksEachTurnStaticAbility(AttacksEachTurnStaticAbility ability) { - super(ability); + public ScareTactics(final ScareTactics card) { + super(card); } @Override - public AttacksEachTurnStaticAbility copy() { - return new AttacksEachTurnStaticAbility(this); + public ScareTactics copy() { + return new ScareTactics(this); } - -} +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/s/Scarecrone.java b/Mage.Sets/src/mage/cards/s/Scarecrone.java index 64b7d2f2f4..ac46e2cbfb 100644 --- a/Mage.Sets/src/mage/cards/s/Scarecrone.java +++ b/Mage.Sets/src/mage/cards/s/Scarecrone.java @@ -63,7 +63,7 @@ public class Scarecrone extends CardImpl { public Scarecrone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScarlandThrinax.java b/Mage.Sets/src/mage/cards/s/ScarlandThrinax.java index ccc75d9685..ebcfd351b7 100644 --- a/Mage.Sets/src/mage/cards/s/ScarlandThrinax.java +++ b/Mage.Sets/src/mage/cards/s/ScarlandThrinax.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetControlledCreaturePermanent; @@ -52,7 +53,7 @@ public class ScarlandThrinax extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{R}{G}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScarredPuma.java b/Mage.Sets/src/mage/cards/s/ScarredPuma.java index 659835c00d..09b4ad19e4 100644 --- a/Mage.Sets/src/mage/cards/s/ScarredPuma.java +++ b/Mage.Sets/src/mage/cards/s/ScarredPuma.java @@ -37,6 +37,7 @@ import mage.abilities.effects.RestrictionEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterAttackingCreature; @@ -51,7 +52,7 @@ public class ScarredPuma extends CardImpl { public ScarredPuma(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScarredVinebreeder.java b/Mage.Sets/src/mage/cards/s/ScarredVinebreeder.java index e64e2723ae..a49d3e3e4e 100644 --- a/Mage.Sets/src/mage/cards/s/ScarredVinebreeder.java +++ b/Mage.Sets/src/mage/cards/s/ScarredVinebreeder.java @@ -57,8 +57,8 @@ public class ScarredVinebreeder extends CardImpl { public ScarredVinebreeder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScarwoodBandits.java b/Mage.Sets/src/mage/cards/s/ScarwoodBandits.java new file mode 100644 index 0000000000..09c803e225 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ScarwoodBandits.java @@ -0,0 +1,189 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.SourceOnBattlefieldCondition; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.Effects; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.abilities.keyword.ForestwalkAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetArtifactPermanent; +import mage.util.CardUtil; + +/** + * + * @author L_J + */ +public class ScarwoodBandits extends CardImpl { + + public ScarwoodBandits(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Forestwalk + this.addAbility(new ForestwalkAbility()); + + // {2}{G}, {tap}: Unless an opponent pays {2}, gain control of target artifact for as long as Scarwood Bandits remains on the battlefield. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new DoUnlessAnyOpponentPaysEffect( + new ConditionalContinuousEffect( + new GainControlTargetEffect(Duration.Custom, true), + SourceOnBattlefieldCondition.instance, + "gain control of target artifact for as long as {this} remains on the battlefield"), + new GenericManaCost(2)), + new ManaCostsImpl("{2}{G}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetArtifactPermanent()); + this.addAbility(ability); + } + + public ScarwoodBandits(final ScarwoodBandits card) { + super(card); + } + + @Override + public ScarwoodBandits copy() { + return new ScarwoodBandits(this); + } +} + +class DoUnlessAnyOpponentPaysEffect extends OneShotEffect { + + protected Effects executingEffects = new Effects(); + private final Cost cost; + private String chooseUseText; + + public DoUnlessAnyOpponentPaysEffect(Effect effect, Cost cost) { + this(effect, cost, null); + } + + public DoUnlessAnyOpponentPaysEffect(Effect effect, Cost cost, String chooseUseText) { + super(Outcome.Benefit); + this.executingEffects.add(effect); + this.cost = cost; + this.chooseUseText = chooseUseText; + } + + public DoUnlessAnyOpponentPaysEffect(final DoUnlessAnyOpponentPaysEffect effect) { + super(effect); + this.executingEffects = effect.executingEffects.copy(); + this.cost = effect.cost.copy(); + this.chooseUseText = effect.chooseUseText; + } + + public void addEffect(Effect effect) { + executingEffects.add(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (controller != null && sourceObject != null) { + String message; + if (chooseUseText == null) { + String effectText = executingEffects.getText(source.getModes().getMode()); + message = "Pay " + cost.getText() + " to prevent (" + effectText.substring(0, effectText.length() - 1) + ")?"; + } else { + message = chooseUseText; + } + message = CardUtil.replaceSourceName(message, sourceObject.getName()); + boolean result = true; + boolean doEffect = true; + // check if any opponent is willing to pay + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null && player != controller && cost.canPay(source, source.getSourceId(), player.getId(), game) && player.chooseUse(Outcome.Detriment, message, source, game)) { + cost.clearPaid(); + if (cost.pay(source, game, source.getSourceId(), player.getId(), false, null)) { + if (!game.isSimulation()) { + game.informPlayers(player.getLogName() + " pays the cost to prevent the effect"); + } + doEffect = false; + } + } + } + // do the effects if nobody paid + if (doEffect) { + for (Effect effect : executingEffects) { + effect.setTargetPointer(this.targetPointer); + if (effect instanceof OneShotEffect) { + result &= effect.apply(game, source); + } else { + game.addEffect((ContinuousEffect) effect, source); + } + } + } + return result; + } + return false; + } + + protected Player getPayingPlayer(Game game, Ability source) { + return game.getPlayer(source.getControllerId()); + } + + @Override + public String getText(Mode mode) { + if (!staticText.isEmpty()) { + return staticText; + } + String effectsText = executingEffects.getText(mode); + return effectsText.substring(0, effectsText.length() - 1) + " unless any opponent pays " + cost.getText(); + } + + @Override + public DoUnlessAnyOpponentPaysEffect copy() { + return new DoUnlessAnyOpponentPaysEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ScarwoodGoblins.java b/Mage.Sets/src/mage/cards/s/ScarwoodGoblins.java index 6d90789a83..74bc75d6db 100644 --- a/Mage.Sets/src/mage/cards/s/ScarwoodGoblins.java +++ b/Mage.Sets/src/mage/cards/s/ScarwoodGoblins.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class ScarwoodGoblins extends CardImpl { public ScarwoodGoblins(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScarwoodHag.java b/Mage.Sets/src/mage/cards/s/ScarwoodHag.java index 5402301bda..d91b10bf34 100644 --- a/Mage.Sets/src/mage/cards/s/ScarwoodHag.java +++ b/Mage.Sets/src/mage/cards/s/ScarwoodHag.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -52,7 +53,7 @@ public class ScarwoodHag extends CardImpl { public ScarwoodHag(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Hag"); + this.subtype.add(SubType.HAG); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScarwoodTreefolk.java b/Mage.Sets/src/mage/cards/s/ScarwoodTreefolk.java index 3b36813bc0..e8cc9eae1a 100644 --- a/Mage.Sets/src/mage/cards/s/ScarwoodTreefolk.java +++ b/Mage.Sets/src/mage/cards/s/ScarwoodTreefolk.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.TapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,16 +42,14 @@ import mage.constants.CardType; */ public class ScarwoodTreefolk extends CardImpl { - private static final String staticText = "{this} enters the battlefield tapped"; - public ScarwoodTreefolk(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Treefolk"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(3); this.toughness = new MageInt(5); // Scarwood Treefolk enters the battlefield tapped. - this.addAbility(new EntersBattlefieldAbility(new TapSourceEffect(), staticText)); + this.addAbility(new EntersBattlefieldAbility(new TapSourceEffect(), "tapped")); } public ScarwoodTreefolk(final ScarwoodTreefolk card) { diff --git a/Mage.Sets/src/mage/cards/s/ScatheZombies.java b/Mage.Sets/src/mage/cards/s/ScatheZombies.java index 29d902a7da..591e49d8e5 100644 --- a/Mage.Sets/src/mage/cards/s/ScatheZombies.java +++ b/Mage.Sets/src/mage/cards/s/ScatheZombies.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class ScatheZombies extends CardImpl { public ScatheZombies(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScatteredGroves.java b/Mage.Sets/src/mage/cards/s/ScatteredGroves.java index 07d07c11d4..e79b01fd3f 100644 --- a/Mage.Sets/src/mage/cards/s/ScatteredGroves.java +++ b/Mage.Sets/src/mage/cards/s/ScatteredGroves.java @@ -36,6 +36,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class ScatteredGroves extends CardImpl { public ScatteredGroves(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Forest"); - this.subtype.add("Plains"); + this.subtype.add(SubType.FOREST); + this.subtype.add(SubType.PLAINS); // ({T}: Add {G} or {W} to your mana pool.) this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/ScattershotArcher.java b/Mage.Sets/src/mage/cards/s/ScattershotArcher.java index fb4cb10894..3110f934ff 100644 --- a/Mage.Sets/src/mage/cards/s/ScattershotArcher.java +++ b/Mage.Sets/src/mage/cards/s/ScattershotArcher.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -54,8 +55,8 @@ public class ScattershotArcher extends CardImpl { public ScattershotArcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Archer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScavengedWeaponry.java b/Mage.Sets/src/mage/cards/s/ScavengedWeaponry.java index 78248f08ad..a4fbaa0df1 100644 --- a/Mage.Sets/src/mage/cards/s/ScavengedWeaponry.java +++ b/Mage.Sets/src/mage/cards/s/ScavengedWeaponry.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class ScavengedWeaponry extends CardImpl { public ScavengedWeaponry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/ScavengerDrake.java b/Mage.Sets/src/mage/cards/s/ScavengerDrake.java index 73f61d54cc..2eaaf87c09 100644 --- a/Mage.Sets/src/mage/cards/s/ScavengerDrake.java +++ b/Mage.Sets/src/mage/cards/s/ScavengerDrake.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,7 +46,7 @@ public class ScavengerDrake extends CardImpl { public ScavengerDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScavengerFolk.java b/Mage.Sets/src/mage/cards/s/ScavengerFolk.java index 050b96995e..ed35878b30 100644 --- a/Mage.Sets/src/mage/cards/s/ScavengerFolk.java +++ b/Mage.Sets/src/mage/cards/s/ScavengerFolk.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetArtifactPermanent; @@ -50,7 +51,7 @@ public class ScavengerFolk extends CardImpl { public ScavengerFolk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScavengerGrounds.java b/Mage.Sets/src/mage/cards/s/ScavengerGrounds.java index 87895e496e..ea112926a4 100644 --- a/Mage.Sets/src/mage/cards/s/ScavengerGrounds.java +++ b/Mage.Sets/src/mage/cards/s/ScavengerGrounds.java @@ -59,7 +59,7 @@ public class ScavengerGrounds extends CardImpl { public ScavengerGrounds(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Desert"); + this.subtype.add(SubType.DESERT); // {T}: Add {C} to your mana pool. this.addAbility(new ColorlessManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/ScavengingGhoul.java b/Mage.Sets/src/mage/cards/s/ScavengingGhoul.java index bc5d22dfce..36116de355 100644 --- a/Mage.Sets/src/mage/cards/s/ScavengingGhoul.java +++ b/Mage.Sets/src/mage/cards/s/ScavengingGhoul.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; @@ -51,7 +52,7 @@ public class ScavengingGhoul extends CardImpl { public ScavengingGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScavengingOoze.java b/Mage.Sets/src/mage/cards/s/ScavengingOoze.java index 0c037f216c..8d84ff01ad 100644 --- a/Mage.Sets/src/mage/cards/s/ScavengingOoze.java +++ b/Mage.Sets/src/mage/cards/s/ScavengingOoze.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -53,7 +54,7 @@ public class ScavengingOoze extends CardImpl { public ScavengingOoze(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Ooze"); + this.subtype.add(SubType.OOZE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScavengingScarab.java b/Mage.Sets/src/mage/cards/s/ScavengingScarab.java index 03a8775c5f..211b192a29 100644 --- a/Mage.Sets/src/mage/cards/s/ScavengingScarab.java +++ b/Mage.Sets/src/mage/cards/s/ScavengingScarab.java @@ -34,6 +34,7 @@ import mage.abilities.common.CantBlockAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -42,7 +43,7 @@ public class ScavengingScarab extends CardImpl { public ScavengingScarab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ScentOfJasmine.java b/Mage.Sets/src/mage/cards/s/ScentOfJasmine.java new file mode 100644 index 0000000000..6e49f3c225 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ScentOfJasmine.java @@ -0,0 +1,112 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInHand; + +/** + * + * @author TheElk801 + */ +public class ScentOfJasmine extends CardImpl { + + public ScentOfJasmine(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); + + // Reveal any number of white cards in your hand. You gain 2 life for each card revealed this way. + Effect effect = new ScentOfJasmineEffect(); + effect.setText("Reveal any number of white cards in your hand. You gain 2 life for each card revealed this way."); + this.getSpellAbility().addEffect(effect); + } + + public ScentOfJasmine(final ScentOfJasmine card) { + super(card); + } + + @Override + public ScentOfJasmine copy() { + return new ScentOfJasmine(this); + } +} + +class ScentOfJasmineEffect extends OneShotEffect { + + private static final FilterCard filter = new FilterCard("white cards"); + + static { + filter.add(new ColorPredicate(ObjectColor.WHITE)); + } + + public ScentOfJasmineEffect() { + super(Outcome.GainLife); + } + + public ScentOfJasmineEffect(final ScentOfJasmineEffect effect) { + super(effect); + } + + @Override + public ScentOfJasmineEffect copy() { + return new ScentOfJasmineEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + Cards cards = new CardsImpl(); + if (player.getHand().count(filter, game) > 0) { + TargetCardInHand target = new TargetCardInHand(0, Integer.MAX_VALUE, filter); + if (player.choose(Outcome.Benefit, target, source.getSourceId(), game)) { + for (UUID uuid : target.getTargets()) { + cards.add(player.getHand().get(uuid, game)); + } + player.revealCards("cards", cards, game); + player.gainLife(cards.getCards(game).size() * 2, game); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/s/ScholarOfAthreos.java b/Mage.Sets/src/mage/cards/s/ScholarOfAthreos.java index 699b8ea1a4..9352cf7414 100644 --- a/Mage.Sets/src/mage/cards/s/ScholarOfAthreos.java +++ b/Mage.Sets/src/mage/cards/s/ScholarOfAthreos.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -48,8 +49,8 @@ public class ScholarOfAthreos extends CardImpl { public ScholarOfAthreos(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SchoolOfPiranha.java b/Mage.Sets/src/mage/cards/s/SchoolOfPiranha.java index 5198fab06e..27ef6ec65d 100644 --- a/Mage.Sets/src/mage/cards/s/SchoolOfPiranha.java +++ b/Mage.Sets/src/mage/cards/s/SchoolOfPiranha.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -45,7 +46,7 @@ public class SchoolOfPiranha extends CardImpl { public SchoolOfPiranha(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Fish"); + this.subtype.add(SubType.FISH); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ScionOfDarkness.java b/Mage.Sets/src/mage/cards/s/ScionOfDarkness.java index 3162fc1673..45e1b12a58 100644 --- a/Mage.Sets/src/mage/cards/s/ScionOfDarkness.java +++ b/Mage.Sets/src/mage/cards/s/ScionOfDarkness.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -56,7 +57,7 @@ public class ScionOfDarkness extends CardImpl { public ScionOfDarkness(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}{B}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/ScionOfGlaciers.java b/Mage.Sets/src/mage/cards/s/ScionOfGlaciers.java index a32fa7a761..94c309e2aa 100644 --- a/Mage.Sets/src/mage/cards/s/ScionOfGlaciers.java +++ b/Mage.Sets/src/mage/cards/s/ScionOfGlaciers.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class ScionOfGlaciers extends CardImpl { public ScionOfGlaciers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/ScionOfOona.java b/Mage.Sets/src/mage/cards/s/ScionOfOona.java index 13cb9ec133..0112ab5ca2 100644 --- a/Mage.Sets/src/mage/cards/s/ScionOfOona.java +++ b/Mage.Sets/src/mage/cards/s/ScionOfOona.java @@ -61,8 +61,8 @@ public class ScionOfOona extends CardImpl { public ScionOfOona(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScionOfTheUrDragon.java b/Mage.Sets/src/mage/cards/s/ScionOfTheUrDragon.java index 28b66f753d..00ef33641c 100644 --- a/Mage.Sets/src/mage/cards/s/ScionOfTheUrDragon.java +++ b/Mage.Sets/src/mage/cards/s/ScionOfTheUrDragon.java @@ -55,8 +55,8 @@ public class ScionOfTheUrDragon extends CardImpl { public ScionOfTheUrDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.DRAGON); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ScionOfTheWild.java b/Mage.Sets/src/mage/cards/s/ScionOfTheWild.java index 7ef7b320de..f9d39a0f46 100644 --- a/Mage.Sets/src/mage/cards/s/ScionOfTheWild.java +++ b/Mage.Sets/src/mage/cards/s/ScionOfTheWild.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -48,7 +49,7 @@ public class ScionOfTheWild extends CardImpl { public ScionOfTheWild(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/ScionOfUgin.java b/Mage.Sets/src/mage/cards/s/ScionOfUgin.java index 122c38d3a9..5fedc8ee88 100644 --- a/Mage.Sets/src/mage/cards/s/ScionOfUgin.java +++ b/Mage.Sets/src/mage/cards/s/ScionOfUgin.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class ScionOfUgin extends CardImpl { public ScionOfUgin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}"); - this.subtype.add("Dragon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DRAGON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ScionOfVituGhazi.java b/Mage.Sets/src/mage/cards/s/ScionOfVituGhazi.java index fd232b1de0..893a35b900 100644 --- a/Mage.Sets/src/mage/cards/s/ScionOfVituGhazi.java +++ b/Mage.Sets/src/mage/cards/s/ScionOfVituGhazi.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.PopulateEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.BirdToken; import mage.watchers.common.CastFromHandWatcher; @@ -49,7 +50,7 @@ public class ScionOfVituGhazi extends CardImpl { public ScionOfVituGhazi(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ScionSummoner.java b/Mage.Sets/src/mage/cards/s/ScionSummoner.java index a3d9b92649..493d7302d8 100644 --- a/Mage.Sets/src/mage/cards/s/ScionSummoner.java +++ b/Mage.Sets/src/mage/cards/s/ScionSummoner.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.EldraziScionToken; /** @@ -46,8 +47,8 @@ public class ScionSummoner extends CardImpl { public ScionSummoner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScorchedRusalka.java b/Mage.Sets/src/mage/cards/s/ScorchedRusalka.java index 340c173e3d..c1854313a1 100644 --- a/Mage.Sets/src/mage/cards/s/ScorchedRusalka.java +++ b/Mage.Sets/src/mage/cards/s/ScorchedRusalka.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -50,7 +51,7 @@ public class ScorchedRusalka extends CardImpl { public ScorchedRusalka(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScorchingLava.java b/Mage.Sets/src/mage/cards/s/ScorchingLava.java index 51bb207a58..3ce722d731 100644 --- a/Mage.Sets/src/mage/cards/s/ScorchingLava.java +++ b/Mage.Sets/src/mage/cards/s/ScorchingLava.java @@ -65,8 +65,9 @@ public class ScorchingLava extends CardImpl { this.getSpellAbility().addEffect(new ConditionalContinuousRuleModifyingEffect( new CantRegenerateTargetEffect(Duration.EndOfTurn, "that creature"), new LockedInCondition(KickedCondition.instance))); this.getSpellAbility().addEffect(new ConditionalOneShotEffect( - (OneShotEffect) new ExileTargetIfDiesEffect().setText("and if it would die this turn, exile it instead"), - new LockedInCondition(KickedCondition.instance))); + new ExileTargetIfDiesEffect(), + new LockedInCondition(KickedCondition.instance) + ).setText("and if it would die this turn, exile it instead")); this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } diff --git a/Mage.Sets/src/mage/cards/s/ScorchingMissile.java b/Mage.Sets/src/mage/cards/s/ScorchingMissile.java new file mode 100644 index 0000000000..ce756796d5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ScorchingMissile.java @@ -0,0 +1,66 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TimingRule; +import mage.target.TargetPlayer; + +/** + * + * @author TheElk801 + */ +public class ScorchingMissile extends CardImpl { + + public ScorchingMissile(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}"); + + // Scorching Missile deals 4 damage to target player. + this.getSpellAbility().addEffect(new DamageTargetEffect(4)); + this.getSpellAbility().addTarget(new TargetPlayer()); + + // Flashback {9}{R} + this.addAbility(new FlashbackAbility(new ManaCostsImpl("{9}{R}"), TimingRule.SORCERY)); + + } + + public ScorchingMissile(final ScorchingMissile card) { + super(card); + } + + @Override + public ScorchingMissile copy() { + return new ScorchingMissile(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ScorchingWinds.java b/Mage.Sets/src/mage/cards/s/ScorchingWinds.java new file mode 100644 index 0000000000..3c5bd2a76c --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ScorchingWinds.java @@ -0,0 +1,72 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility; +import mage.abilities.condition.common.AttackedThisStepCondition; +import mage.abilities.effects.common.DamageAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.PhaseStep; +import mage.constants.TurnPhase; +import mage.filter.common.FilterAttackingCreature; +import mage.watchers.common.PlayerAttackedStepWatcher; + +/** + * + * @author TheElk801 + */ +public class ScorchingWinds extends CardImpl { + + public ScorchingWinds(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}"); + + // Cast Scorching Winds only during the declare attackers step and only if you've been attacked this step. + Ability ability = new CastOnlyDuringPhaseStepSourceAbility( + TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance, + "Cast {this} only during the declare attackers step and only if you've been attacked this step." + ); + ability.addWatcher(new PlayerAttackedStepWatcher()); + this.addAbility(ability); + + // Scorching Winds deals 1 damage to each attacking creature. + this.getSpellAbility().addEffect(new DamageAllEffect(1, new FilterAttackingCreature())); + } + + public ScorchingWinds(final ScorchingWinds card) { + super(card); + } + + @Override + public ScorchingWinds copy() { + return new ScorchingWinds(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/Scorchwalker.java b/Mage.Sets/src/mage/cards/s/Scorchwalker.java index 128f55af05..dfc1522d1a 100644 --- a/Mage.Sets/src/mage/cards/s/Scorchwalker.java +++ b/Mage.Sets/src/mage/cards/s/Scorchwalker.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.BloodrushAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class Scorchwalker extends CardImpl { public Scorchwalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScoriaCat.java b/Mage.Sets/src/mage/cards/s/ScoriaCat.java index a50a8c71c3..4667971a92 100644 --- a/Mage.Sets/src/mage/cards/s/ScoriaCat.java +++ b/Mage.Sets/src/mage/cards/s/ScoriaCat.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -57,7 +58,7 @@ public class ScoriaCat extends CardImpl { public ScoriaCat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ScoriaElemental.java b/Mage.Sets/src/mage/cards/s/ScoriaElemental.java index 0c5adb9931..13c23b03f3 100644 --- a/Mage.Sets/src/mage/cards/s/ScoriaElemental.java +++ b/Mage.Sets/src/mage/cards/s/ScoriaElemental.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class ScoriaElemental extends CardImpl { public ScoriaElemental (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.color.setRed(true); this.power = new MageInt(6); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScoriaWurm.java b/Mage.Sets/src/mage/cards/s/ScoriaWurm.java index 02bf954f5e..e65554ff67 100644 --- a/Mage.Sets/src/mage/cards/s/ScoriaWurm.java +++ b/Mage.Sets/src/mage/cards/s/ScoriaWurm.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class ScoriaWurm extends CardImpl { public ScoriaWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/s/ScornedVillager.java b/Mage.Sets/src/mage/cards/s/ScornedVillager.java index 6644df6eb7..8e795eb30c 100644 --- a/Mage.Sets/src/mage/cards/s/ScornedVillager.java +++ b/Mage.Sets/src/mage/cards/s/ScornedVillager.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.m.MoonscarredWerewolf; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -50,8 +51,8 @@ public class ScornedVillager extends CardImpl { public ScornedVillager(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScornfulAetherLich.java b/Mage.Sets/src/mage/cards/s/ScornfulAetherLich.java index 27e6a61abf..128184d85c 100644 --- a/Mage.Sets/src/mage/cards/s/ScornfulAetherLich.java +++ b/Mage.Sets/src/mage/cards/s/ScornfulAetherLich.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class ScornfulAetherLich extends CardImpl { public ScornfulAetherLich(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ScornfulEgotist.java b/Mage.Sets/src/mage/cards/s/ScornfulEgotist.java index a19ebfd0b9..612856fcde 100644 --- a/Mage.Sets/src/mage/cards/s/ScornfulEgotist.java +++ b/Mage.Sets/src/mage/cards/s/ScornfulEgotist.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ScornfulEgotist extends CardImpl { public ScornfulEgotist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{7}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScourgeDevil.java b/Mage.Sets/src/mage/cards/s/ScourgeDevil.java index 96542cea91..fe8e2274e7 100644 --- a/Mage.Sets/src/mage/cards/s/ScourgeDevil.java +++ b/Mage.Sets/src/mage/cards/s/ScourgeDevil.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,7 +47,7 @@ public class ScourgeDevil extends CardImpl { public ScourgeDevil(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ScourgeOfFleets.java b/Mage.Sets/src/mage/cards/s/ScourgeOfFleets.java index d2bb8d24e0..5a6cf48157 100644 --- a/Mage.Sets/src/mage/cards/s/ScourgeOfFleets.java +++ b/Mage.Sets/src/mage/cards/s/ScourgeOfFleets.java @@ -55,7 +55,7 @@ public class ScourgeOfFleets extends CardImpl { public ScourgeOfFleets(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); - this.subtype.add("Kraken"); + this.subtype.add(SubType.KRAKEN); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/ScourgeOfGeierReach.java b/Mage.Sets/src/mage/cards/s/ScourgeOfGeierReach.java index f73940fa12..70d304ac50 100644 --- a/Mage.Sets/src/mage/cards/s/ScourgeOfGeierReach.java +++ b/Mage.Sets/src/mage/cards/s/ScourgeOfGeierReach.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class ScourgeOfGeierReach extends CardImpl { public ScourgeOfGeierReach(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ScourgeOfKherRidges.java b/Mage.Sets/src/mage/cards/s/ScourgeOfKherRidges.java index 74d6fe4a66..a5be29257b 100644 --- a/Mage.Sets/src/mage/cards/s/ScourgeOfKherRidges.java +++ b/Mage.Sets/src/mage/cards/s/ScourgeOfKherRidges.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -60,7 +61,7 @@ public class ScourgeOfKherRidges extends CardImpl { public ScourgeOfKherRidges(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/ScourgeOfNelToth.java b/Mage.Sets/src/mage/cards/s/ScourgeOfNelToth.java index db7574ace4..df5558122e 100644 --- a/Mage.Sets/src/mage/cards/s/ScourgeOfNelToth.java +++ b/Mage.Sets/src/mage/cards/s/ScourgeOfNelToth.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,8 +58,8 @@ public class ScourgeOfNelToth extends CardImpl { public ScourgeOfNelToth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/ScourgeOfNumai.java b/Mage.Sets/src/mage/cards/s/ScourgeOfNumai.java index 26d51ffffc..ae4b70e86f 100644 --- a/Mage.Sets/src/mage/cards/s/ScourgeOfNumai.java +++ b/Mage.Sets/src/mage/cards/s/ScourgeOfNumai.java @@ -50,8 +50,8 @@ public class ScourgeOfNumai extends CardImpl { public ScourgeOfNumai(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Demon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DEMON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ScourgeOfSkolaVale.java b/Mage.Sets/src/mage/cards/s/ScourgeOfSkolaVale.java index ded35306c3..ba00f6a02e 100644 --- a/Mage.Sets/src/mage/cards/s/ScourgeOfSkolaVale.java +++ b/Mage.Sets/src/mage/cards/s/ScourgeOfSkolaVale.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -58,7 +59,7 @@ public class ScourgeOfSkolaVale extends CardImpl { public ScourgeOfSkolaVale(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/ScourgeOfTheNobilis.java b/Mage.Sets/src/mage/cards/s/ScourgeOfTheNobilis.java index fe0b306313..61086e213e 100644 --- a/Mage.Sets/src/mage/cards/s/ScourgeOfTheNobilis.java +++ b/Mage.Sets/src/mage/cards/s/ScourgeOfTheNobilis.java @@ -45,6 +45,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class ScourgeOfTheNobilis extends CardImpl { public ScourgeOfTheNobilis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R/W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/ScourgeOfTheThrone.java b/Mage.Sets/src/mage/cards/s/ScourgeOfTheThrone.java index 859180933a..702975a06b 100644 --- a/Mage.Sets/src/mage/cards/s/ScourgeOfTheThrone.java +++ b/Mage.Sets/src/mage/cards/s/ScourgeOfTheThrone.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.game.Game; @@ -55,7 +56,7 @@ public class ScourgeOfTheThrone extends CardImpl { public ScourgeOfTheThrone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/ScourgeOfValkas.java b/Mage.Sets/src/mage/cards/s/ScourgeOfValkas.java index b178e34ba9..afb92c7a53 100644 --- a/Mage.Sets/src/mage/cards/s/ScourgeOfValkas.java +++ b/Mage.Sets/src/mage/cards/s/ScourgeOfValkas.java @@ -67,7 +67,7 @@ public class ScourgeOfValkas extends CardImpl { public ScourgeOfValkas(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.color.setRed(true); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ScourgeServant.java b/Mage.Sets/src/mage/cards/s/ScourgeServant.java index 8844a6906b..91b94cfba5 100644 --- a/Mage.Sets/src/mage/cards/s/ScourgeServant.java +++ b/Mage.Sets/src/mage/cards/s/ScourgeServant.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class ScourgeServant extends CardImpl { public ScourgeServant (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ScourgeWolf.java b/Mage.Sets/src/mage/cards/s/ScourgeWolf.java index 5001d820ff..4457a18bf8 100644 --- a/Mage.Sets/src/mage/cards/s/ScourgeWolf.java +++ b/Mage.Sets/src/mage/cards/s/ScourgeWolf.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class ScourgeWolf extends CardImpl { public ScourgeWolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{R}"); - this.subtype.add("Wolf"); - this.subtype.add("Horror"); + this.subtype.add(SubType.WOLF); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Scourgemark.java b/Mage.Sets/src/mage/cards/s/Scourgemark.java index 6697ab6e4b..573e0ca7a3 100644 --- a/Mage.Sets/src/mage/cards/s/Scourgemark.java +++ b/Mage.Sets/src/mage/cards/s/Scourgemark.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class Scourgemark extends CardImpl { public Scourgemark(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/ScoutThePerimeter.java b/Mage.Sets/src/mage/cards/s/ScoutThePerimeter.java index 90cdfa5e84..a989e71c06 100644 --- a/Mage.Sets/src/mage/cards/s/ScoutThePerimeter.java +++ b/Mage.Sets/src/mage/cards/s/ScoutThePerimeter.java @@ -1,69 +1,69 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.counters.CounterType; -import mage.filter.common.FilterLandCard; -import mage.target.common.TargetCardInLibrary; -import mage.target.common.TargetOpponentsCreaturePermanent; - -/** - * - * @author Styxo - */ -public class ScoutThePerimeter extends CardImpl { - - public ScoutThePerimeter(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}"); - - // Search your library for a land card, put it onto the battlefield tapped, then suffle your library. - this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterLandCard()), true, true)); - - // Put a bounty counter on up to one target creature an opponent controls. - Effect effect = new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()); - effect.setText("Put a bounty counter on up to one target creature an opponent controls"); - this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent(0, 1)); - } - - public ScoutThePerimeter(final ScoutThePerimeter card) { - super(card); - } - - @Override - public ScoutThePerimeter copy() { - return new ScoutThePerimeter(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; +import mage.filter.common.FilterLandCard; +import mage.target.common.TargetCardInLibrary; +import mage.target.common.TargetOpponentsCreaturePermanent; + +/** + * + * @author Styxo + */ +public class ScoutThePerimeter extends CardImpl { + + public ScoutThePerimeter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}"); + + // Search your library for a land card, put it onto the battlefield tapped, then suffle your library. + this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterLandCard()), true, true)); + + // Put a bounty counter on up to one target creature an opponent controls. + Effect effect = new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()); + effect.setText("Put a bounty counter on up to one target creature an opponent controls"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent(0, 1)); + } + + public ScoutThePerimeter(final ScoutThePerimeter card) { + super(card); + } + + @Override + public ScoutThePerimeter copy() { + return new ScoutThePerimeter(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ScoutTrooper.java b/Mage.Sets/src/mage/cards/s/ScoutTrooper.java index 83449ce21e..db107e465f 100644 --- a/Mage.Sets/src/mage/cards/s/ScoutTrooper.java +++ b/Mage.Sets/src/mage/cards/s/ScoutTrooper.java @@ -1,76 +1,76 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.continuous.BoostControlledEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; - -/** - * - * @author Styxo - */ -public class ScoutTrooper extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures"); - - static { - filter.add(new SubtypePredicate(SubType.TROOPER)); - } - - public ScoutTrooper(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Trooper"); - this.subtype.add("Scout"); - this.power = new MageInt(1); - this.toughness = new MageInt(1); - - // Trooper creatures you control get +1/+1. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, false))); - - } - - public ScoutTrooper(final ScoutTrooper card) { - super(card); - } - - @Override - public ScoutTrooper copy() { - return new ScoutTrooper(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author Styxo + */ +public class ScoutTrooper extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures"); + + static { + filter.add(new SubtypePredicate(SubType.TROOPER)); + } + + public ScoutTrooper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.TROOPER); + this.subtype.add(SubType.SCOUT); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Trooper creatures you control get +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, false))); + + } + + public ScoutTrooper(final ScoutTrooper card) { + super(card); + } + + @Override + public ScoutTrooper copy() { + return new ScoutTrooper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ScrabblingClaws.java b/Mage.Sets/src/mage/cards/s/ScrabblingClaws.java index 8afd1c67de..efbc9d4f53 100644 --- a/Mage.Sets/src/mage/cards/s/ScrabblingClaws.java +++ b/Mage.Sets/src/mage/cards/s/ScrabblingClaws.java @@ -35,6 +35,7 @@ import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -55,18 +56,18 @@ import mage.target.common.TargetCardInGraveyard; public class ScrabblingClaws extends CardImpl { public ScrabblingClaws(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); // {tap}: Target player exiles a card from his or her graveyard. Ability firstAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScrabblingClawsEffect(), new TapSourceCost()); firstAbility.addTarget(new TargetPlayer()); this.addAbility(firstAbility); // {1}, Sacrifice Scrabbling Claws: Exile target card from a graveyard. Draw a card. - SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new mage.abilities.effects.common.ExileTargetEffect(), new SacrificeSourceCost()); + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new SacrificeSourceCost()); ability.addCost(new GenericManaCost(1)); ability.addTarget(new TargetCardInGraveyard()); - this.addAbility(ability); ability.addEffect(new DrawCardSourceControllerEffect(1)); + this.addAbility(ability); } public ScrabblingClaws(final ScrabblingClaws card) { @@ -112,4 +113,4 @@ class ScrabblingClawsEffect extends OneShotEffect { } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/s/Scragnoth.java b/Mage.Sets/src/mage/cards/s/Scragnoth.java index 7f800ee0a7..a1ceeaa64a 100644 --- a/Mage.Sets/src/mage/cards/s/Scragnoth.java +++ b/Mage.Sets/src/mage/cards/s/Scragnoth.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class Scragnoth extends CardImpl { public Scragnoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ScrapTrawler.java b/Mage.Sets/src/mage/cards/s/ScrapTrawler.java index 18d2bd05a9..8ff4289fbe 100644 --- a/Mage.Sets/src/mage/cards/s/ScrapTrawler.java +++ b/Mage.Sets/src/mage/cards/s/ScrapTrawler.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.FilterCard; @@ -56,7 +57,7 @@ public class ScrapTrawler extends CardImpl { public ScrapTrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Scrapbasket.java b/Mage.Sets/src/mage/cards/s/Scrapbasket.java index 11ccb02dde..cb2b6727d9 100644 --- a/Mage.Sets/src/mage/cards/s/Scrapbasket.java +++ b/Mage.Sets/src/mage/cards/s/Scrapbasket.java @@ -36,6 +36,7 @@ import mage.abilities.effects.ContinuousEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -52,7 +53,7 @@ public class Scrapbasket extends CardImpl { public Scrapbasket(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScrapdiverSerpent.java b/Mage.Sets/src/mage/cards/s/ScrapdiverSerpent.java index bb38d1393c..892fbf9d07 100644 --- a/Mage.Sets/src/mage/cards/s/ScrapdiverSerpent.java +++ b/Mage.Sets/src/mage/cards/s/ScrapdiverSerpent.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterArtifactPermanent; @@ -49,7 +50,7 @@ public class ScrapdiverSerpent extends CardImpl { public ScrapdiverSerpent (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/ScrapheapScrounger.java b/Mage.Sets/src/mage/cards/s/ScrapheapScrounger.java index c61a13a86c..6c678f12e9 100644 --- a/Mage.Sets/src/mage/cards/s/ScrapheapScrounger.java +++ b/Mage.Sets/src/mage/cards/s/ScrapheapScrounger.java @@ -1,82 +1,83 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.CantBlockAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ExileFromGraveCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.filter.FilterCard; -import mage.filter.common.FilterCreatureCard; -import mage.filter.predicate.mageobject.AnotherCardPredicate; -import mage.target.common.TargetCardInYourGraveyard; - -/** - * - * @author emerald000 - */ -public class ScrapheapScrounger extends CardImpl { - - private static final FilterCard filter = new FilterCreatureCard("another creature card"); - - static { - filter.add(new AnotherCardPredicate()); - } - - public ScrapheapScrounger(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); - this.subtype.add("Construct"); - this.power = new MageInt(3); - this.toughness = new MageInt(2); - - // Scrapheap Scrounger can't block. - this.addAbility(new CantBlockAbility()); - - // {1}{B}, Exile another creature card from your graveyard: Return Scrapheap Scrounger from your graveyard to the battlefield. - Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(false), new ManaCostsImpl<>("{1}{B}")); - ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(filter))); - this.addAbility(ability); - } - - public ScrapheapScrounger(final ScrapheapScrounger card) { - super(card); - } - - @Override - public ScrapheapScrounger copy() { - return new ScrapheapScrounger(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.CantBlockAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileFromGraveCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.AnotherCardPredicate; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author emerald000 + */ +public class ScrapheapScrounger extends CardImpl { + + private static final FilterCard filter = new FilterCreatureCard("another creature card"); + + static { + filter.add(new AnotherCardPredicate()); + } + + public ScrapheapScrounger(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); + this.subtype.add(SubType.CONSTRUCT); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Scrapheap Scrounger can't block. + this.addAbility(new CantBlockAbility()); + + // {1}{B}, Exile another creature card from your graveyard: Return Scrapheap Scrounger from your graveyard to the battlefield. + Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(false), new ManaCostsImpl<>("{1}{B}")); + ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(filter))); + this.addAbility(ability); + } + + public ScrapheapScrounger(final ScrapheapScrounger card) { + super(card); + } + + @Override + public ScrapheapScrounger copy() { + return new ScrapheapScrounger(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ScrapperChampion.java b/Mage.Sets/src/mage/cards/s/ScrapperChampion.java index 65e25e0bed..53bbfee796 100644 --- a/Mage.Sets/src/mage/cards/s/ScrapperChampion.java +++ b/Mage.Sets/src/mage/cards/s/ScrapperChampion.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -50,8 +51,8 @@ public class ScrapperChampion extends CardImpl { public ScrapperChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScrapskinDrake.java b/Mage.Sets/src/mage/cards/s/ScrapskinDrake.java index b09e3e3491..b9ebc81bc2 100644 --- a/Mage.Sets/src/mage/cards/s/ScrapskinDrake.java +++ b/Mage.Sets/src/mage/cards/s/ScrapskinDrake.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class ScrapskinDrake extends CardImpl { public ScrapskinDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Drake"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ScrapyardMongrel.java b/Mage.Sets/src/mage/cards/s/ScrapyardMongrel.java index 0c1688524c..e42a1b97d2 100644 --- a/Mage.Sets/src/mage/cards/s/ScrapyardMongrel.java +++ b/Mage.Sets/src/mage/cards/s/ScrapyardMongrel.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -53,7 +54,7 @@ public class ScrapyardMongrel extends CardImpl { public ScrapyardMongrel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.color.setRed(true); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ScreamingSeahawk.java b/Mage.Sets/src/mage/cards/s/ScreamingSeahawk.java index bc19441cd9..592239be65 100644 --- a/Mage.Sets/src/mage/cards/s/ScreamingSeahawk.java +++ b/Mage.Sets/src/mage/cards/s/ScreamingSeahawk.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.NamePredicate; import mage.target.common.TargetCardInLibrary; @@ -54,7 +55,7 @@ public class ScreamingSeahawk extends CardImpl { public ScreamingSeahawk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScreamreachBrawler.java b/Mage.Sets/src/mage/cards/s/ScreamreachBrawler.java index 64727f3475..8f186aca56 100644 --- a/Mage.Sets/src/mage/cards/s/ScreamreachBrawler.java +++ b/Mage.Sets/src/mage/cards/s/ScreamreachBrawler.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class ScreamreachBrawler extends CardImpl { public ScreamreachBrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Orc"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ScreamsFromWithin.java b/Mage.Sets/src/mage/cards/s/ScreamsFromWithin.java index 8a257ccc20..182f811451 100644 --- a/Mage.Sets/src/mage/cards/s/ScreamsFromWithin.java +++ b/Mage.Sets/src/mage/cards/s/ScreamsFromWithin.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class ScreamsFromWithin extends CardImpl { public ScreamsFromWithin(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/ScreechingBat.java b/Mage.Sets/src/mage/cards/s/ScreechingBat.java index 444a87c2f9..2175bfca7d 100644 --- a/Mage.Sets/src/mage/cards/s/ScreechingBat.java +++ b/Mage.Sets/src/mage/cards/s/ScreechingBat.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -55,7 +56,7 @@ public class ScreechingBat extends CardImpl { public ScreechingBat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Bat"); + this.subtype.add(SubType.BAT); this.transformable = true; this.secondSideCardClazz = StalkingVampire.class; diff --git a/Mage.Sets/src/mage/cards/s/ScreechingBuzzard.java b/Mage.Sets/src/mage/cards/s/ScreechingBuzzard.java index b398495bd1..b911b36f1d 100644 --- a/Mage.Sets/src/mage/cards/s/ScreechingBuzzard.java +++ b/Mage.Sets/src/mage/cards/s/ScreechingBuzzard.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -45,7 +46,7 @@ public class ScreechingBuzzard extends CardImpl { public ScreechingBuzzard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScreechingDrake.java b/Mage.Sets/src/mage/cards/s/ScreechingDrake.java index 030bdfb237..e3d930c69e 100644 --- a/Mage.Sets/src/mage/cards/s/ScreechingDrake.java +++ b/Mage.Sets/src/mage/cards/s/ScreechingDrake.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class ScreechingDrake extends CardImpl { public ScreechingDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScreechingGriffin.java b/Mage.Sets/src/mage/cards/s/ScreechingGriffin.java index 8b6f96d90f..dcf48081ec 100644 --- a/Mage.Sets/src/mage/cards/s/ScreechingGriffin.java +++ b/Mage.Sets/src/mage/cards/s/ScreechingGriffin.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class ScreechingGriffin extends CardImpl { public ScreechingGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScreechingHarpy.java b/Mage.Sets/src/mage/cards/s/ScreechingHarpy.java index 71034115c9..965f90458a 100644 --- a/Mage.Sets/src/mage/cards/s/ScreechingHarpy.java +++ b/Mage.Sets/src/mage/cards/s/ScreechingHarpy.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class ScreechingHarpy extends CardImpl { public ScreechingHarpy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Harpy"); - this.subtype.add("Beast"); + this.subtype.add(SubType.HARPY); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScreechingSilcaw.java b/Mage.Sets/src/mage/cards/s/ScreechingSilcaw.java index b40a28e9ea..f87d1eddea 100644 --- a/Mage.Sets/src/mage/cards/s/ScreechingSilcaw.java +++ b/Mage.Sets/src/mage/cards/s/ScreechingSilcaw.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -49,7 +50,7 @@ public class ScreechingSilcaw extends CardImpl { public ScreechingSilcaw(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScreechingSkaab.java b/Mage.Sets/src/mage/cards/s/ScreechingSkaab.java index 4fc971e1b8..7d7f18d053 100644 --- a/Mage.Sets/src/mage/cards/s/ScreechingSkaab.java +++ b/Mage.Sets/src/mage/cards/s/ScreechingSkaab.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class ScreechingSkaab extends CardImpl { public ScreechingSkaab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScreechingSliver.java b/Mage.Sets/src/mage/cards/s/ScreechingSliver.java index f6d926c6f8..6062928272 100644 --- a/Mage.Sets/src/mage/cards/s/ScreechingSliver.java +++ b/Mage.Sets/src/mage/cards/s/ScreechingSliver.java @@ -52,8 +52,8 @@ public class ScreechingSliver extends CardImpl { private static final FilterPermanent filter = new FilterPermanent(SubType.SLIVER, "All Slivers"); public ScreechingSliver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Sliver"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -63,7 +63,7 @@ public class ScreechingSliver extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, - filter, "All Sliver creatures have \"{T}: Target player puts the top card of his or her library into his or her graveyard.\""))); + filter, "All Slivers have \"{T}: Target player puts the top card of his or her library into his or her graveyard.\""))); } public ScreechingSliver(final ScreechingSliver card) { diff --git a/Mage.Sets/src/mage/cards/s/ScribNibblers.java b/Mage.Sets/src/mage/cards/s/ScribNibblers.java index 2fc19b9503..b6d8556ed5 100644 --- a/Mage.Sets/src/mage/cards/s/ScribNibblers.java +++ b/Mage.Sets/src/mage/cards/s/ScribNibblers.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -53,7 +54,7 @@ public class ScribNibblers extends CardImpl { public ScribNibblers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScribeOfTheMindful.java b/Mage.Sets/src/mage/cards/s/ScribeOfTheMindful.java index 4206208d50..1c393ff751 100644 --- a/Mage.Sets/src/mage/cards/s/ScribeOfTheMindful.java +++ b/Mage.Sets/src/mage/cards/s/ScribeOfTheMindful.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; @@ -62,8 +63,8 @@ public class ScribeOfTheMindful extends CardImpl { public ScribeOfTheMindful(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Scrivener.java b/Mage.Sets/src/mage/cards/s/Scrivener.java index 7916c54673..65b3e428f5 100644 --- a/Mage.Sets/src/mage/cards/s/Scrivener.java +++ b/Mage.Sets/src/mage/cards/s/Scrivener.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetCardInYourGraveyard; @@ -54,8 +55,8 @@ public class Scrivener extends CardImpl { public Scrivener(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScrollThief.java b/Mage.Sets/src/mage/cards/s/ScrollThief.java index b4b7113745..7f8c71694d 100644 --- a/Mage.Sets/src/mage/cards/s/ScrollThief.java +++ b/Mage.Sets/src/mage/cards/s/ScrollThief.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class ScrollThief extends CardImpl { public ScrollThief(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ScroungedScythe.java b/Mage.Sets/src/mage/cards/s/ScroungedScythe.java index 1d69d43408..eded8abdd1 100644 --- a/Mage.Sets/src/mage/cards/s/ScroungedScythe.java +++ b/Mage.Sets/src/mage/cards/s/ScroungedScythe.java @@ -51,7 +51,7 @@ public class ScroungedScythe extends CardImpl { public ScroungedScythe(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},""); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.nightCard = true; diff --git a/Mage.Sets/src/mage/cards/s/ScroungerOfSouls.java b/Mage.Sets/src/mage/cards/s/ScroungerOfSouls.java index 0afa81235e..1c7543844e 100644 --- a/Mage.Sets/src/mage/cards/s/ScroungerOfSouls.java +++ b/Mage.Sets/src/mage/cards/s/ScroungerOfSouls.java @@ -6,12 +6,13 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; public class ScroungerOfSouls extends CardImpl { public ScroungerOfSouls(UUID cardID, CardSetInfo cardSetInfo){ super(cardID, cardSetInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); - subtype.add("Horror"); + subtype.add(SubType.HORROR); power = new MageInt(3); toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ScroungingBandar.java b/Mage.Sets/src/mage/cards/s/ScroungingBandar.java index df0619ee13..a2942b8c16 100644 --- a/Mage.Sets/src/mage/cards/s/ScroungingBandar.java +++ b/Mage.Sets/src/mage/cards/s/ScroungingBandar.java @@ -1,127 +1,128 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.counters.CounterType; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.AnotherPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Styxo - */ -public class ScroungingBandar extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another target creature"); - - static { - filter.add(new AnotherPredicate()); - } - - public ScroungingBandar(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - - this.subtype.add("Cat"); - this.subtype.add("Monkey"); - this.power = new MageInt(0); - this.toughness = new MageInt(0); - - // Scrounging Bandar enters the battlefield with two +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), "with two +1/+1 counters on it")); - - // At the beginning of you upkeep, you may move any number of +1/+1 counters from Scrounging Bandar onto another target creature. - Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ScroungingBandarEffect(), TargetController.YOU, true); - ability.addTarget(new TargetCreaturePermanent(filter)); - this.addAbility(ability); - } - - public ScroungingBandar(final ScroungingBandar card) { - super(card); - } - - @Override - public ScroungingBandar copy() { - return new ScroungingBandar(this); - } -} - -class ScroungingBandarEffect extends OneShotEffect { - - public ScroungingBandarEffect() { - super(Outcome.Detriment); - this.staticText = "move any number of +1/+1 counters from Scrounging Bandar onto another target creature"; - } - - public ScroungingBandarEffect(final ScroungingBandarEffect effect) { - super(effect); - } - - @Override - public ScroungingBandarEffect copy() { - return new ScroungingBandarEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Permanent fromPermanent = game.getPermanent(source.getSourceId()); - Permanent toPermanent = game.getPermanent(source.getTargets().getFirstTarget()); - - if (fromPermanent != null && toPermanent != null) { - int amountCounters = fromPermanent.getCounters(game).getCount(CounterType.P1P1); - if (amountCounters > 0) { - int amountToMove = controller.getAmount(0, amountCounters, "How many counters do you want to move?", game); - if (amountToMove > 0) { - fromPermanent.removeCounters(CounterType.P1P1.createInstance(amountToMove), game); - toPermanent.addCounters(CounterType.P1P1.createInstance(amountToMove), source, game); - } - } - return true; - } - } - return false; - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Styxo + */ +public class ScroungingBandar extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another target creature"); + + static { + filter.add(new AnotherPredicate()); + } + + public ScroungingBandar(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.MONKEY); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Scrounging Bandar enters the battlefield with two +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), "with two +1/+1 counters on it")); + + // At the beginning of you upkeep, you may move any number of +1/+1 counters from Scrounging Bandar onto another target creature. + Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ScroungingBandarEffect(), TargetController.YOU, true); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public ScroungingBandar(final ScroungingBandar card) { + super(card); + } + + @Override + public ScroungingBandar copy() { + return new ScroungingBandar(this); + } +} + +class ScroungingBandarEffect extends OneShotEffect { + + public ScroungingBandarEffect() { + super(Outcome.Detriment); + this.staticText = "move any number of +1/+1 counters from Scrounging Bandar onto another target creature"; + } + + public ScroungingBandarEffect(final ScroungingBandarEffect effect) { + super(effect); + } + + @Override + public ScroungingBandarEffect copy() { + return new ScroungingBandarEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Permanent fromPermanent = game.getPermanent(source.getSourceId()); + Permanent toPermanent = game.getPermanent(source.getTargets().getFirstTarget()); + + if (fromPermanent != null && toPermanent != null) { + int amountCounters = fromPermanent.getCounters(game).getCount(CounterType.P1P1); + if (amountCounters > 0) { + int amountToMove = controller.getAmount(0, amountCounters, "How many counters do you want to move?", game); + if (amountToMove > 0) { + fromPermanent.removeCounters(CounterType.P1P1.createInstance(amountToMove), game); + toPermanent.addCounters(CounterType.P1P1.createInstance(amountToMove), source, game); + } + } + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/Scrubland.java b/Mage.Sets/src/mage/cards/s/Scrubland.java index 237fe5dc23..926fd0423c 100644 --- a/Mage.Sets/src/mage/cards/s/Scrubland.java +++ b/Mage.Sets/src/mage/cards/s/Scrubland.java @@ -33,6 +33,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class Scrubland extends CardImpl { public Scrubland(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Plains"); - this.subtype.add("Swamp"); + this.subtype.add(SubType.PLAINS); + this.subtype.add(SubType.SWAMP); this.addAbility(new WhiteManaAbility()); this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/ScrybRanger.java b/Mage.Sets/src/mage/cards/s/ScrybRanger.java index d15c08ead4..cf02647b4f 100644 --- a/Mage.Sets/src/mage/cards/s/ScrybRanger.java +++ b/Mage.Sets/src/mage/cards/s/ScrybRanger.java @@ -53,14 +53,15 @@ import mage.target.common.TargetCreaturePermanent; */ public class ScrybRanger extends CardImpl { - private static final FilterControlledLandPermanent filterForest = new FilterControlledLandPermanent("Forest"); + private static final FilterControlledLandPermanent filterForest = new FilterControlledLandPermanent("a Forest"); + static { filterForest.add(new SubtypePredicate(SubType.FOREST)); } public ScrybRanger(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Faerie"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.subtype.add(SubType.FAERIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScrybSprites.java b/Mage.Sets/src/mage/cards/s/ScrybSprites.java index 744c64c105..02b2ddf39f 100644 --- a/Mage.Sets/src/mage/cards/s/ScrybSprites.java +++ b/Mage.Sets/src/mage/cards/s/ScrybSprites.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class ScrybSprites extends CardImpl { public ScrybSprites(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScuteMob.java b/Mage.Sets/src/mage/cards/s/ScuteMob.java index b50baf17b1..cd73475df8 100644 --- a/Mage.Sets/src/mage/cards/s/ScuteMob.java +++ b/Mage.Sets/src/mage/cards/s/ScuteMob.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterLandPermanent; @@ -51,7 +52,7 @@ public class ScuteMob extends CardImpl { public ScuteMob(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); this.addAbility(new ScuteMobAbility()); diff --git a/Mage.Sets/src/mage/cards/s/Scuttlemutt.java b/Mage.Sets/src/mage/cards/s/Scuttlemutt.java index 58ee323496..2244a8f834 100644 --- a/Mage.Sets/src/mage/cards/s/Scuttlemutt.java +++ b/Mage.Sets/src/mage/cards/s/Scuttlemutt.java @@ -37,6 +37,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class Scuttlemutt extends CardImpl { public Scuttlemutt(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScuttlingDeath.java b/Mage.Sets/src/mage/cards/s/ScuttlingDeath.java index f6fc8ac1f2..cc1f961457 100644 --- a/Mage.Sets/src/mage/cards/s/ScuttlingDeath.java +++ b/Mage.Sets/src/mage/cards/s/ScuttlingDeath.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class ScuttlingDeath extends CardImpl { public ScuttlingDeath(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScuttlingDoomEngine.java b/Mage.Sets/src/mage/cards/s/ScuttlingDoomEngine.java index 5b03af10b8..0140e90c04 100644 --- a/Mage.Sets/src/mage/cards/s/ScuttlingDoomEngine.java +++ b/Mage.Sets/src/mage/cards/s/ScuttlingDoomEngine.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; @@ -58,7 +59,7 @@ public class ScuttlingDoomEngine extends CardImpl { public ScuttlingDoomEngine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/ScuzzbackMarauders.java b/Mage.Sets/src/mage/cards/s/ScuzzbackMarauders.java index af6f2dd4ae..970ee5ffce 100644 --- a/Mage.Sets/src/mage/cards/s/ScuzzbackMarauders.java +++ b/Mage.Sets/src/mage/cards/s/ScuzzbackMarauders.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ScuzzbackMarauders extends CardImpl { public ScuzzbackMarauders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R/G}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ScuzzbackScrapper.java b/Mage.Sets/src/mage/cards/s/ScuzzbackScrapper.java index 3c9caf345f..0ccb60c506 100644 --- a/Mage.Sets/src/mage/cards/s/ScuzzbackScrapper.java +++ b/Mage.Sets/src/mage/cards/s/ScuzzbackScrapper.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class ScuzzbackScrapper extends CardImpl { public ScuzzbackScrapper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R/G}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScytheLeopard.java b/Mage.Sets/src/mage/cards/s/ScytheLeopard.java index f65ca26cba..ba962b6d7b 100644 --- a/Mage.Sets/src/mage/cards/s/ScytheLeopard.java +++ b/Mage.Sets/src/mage/cards/s/ScytheLeopard.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class ScytheLeopard extends CardImpl { public ScytheLeopard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ScytheOfTheWretched.java b/Mage.Sets/src/mage/cards/s/ScytheOfTheWretched.java index bf10ce7ecc..b3b9aeb038 100644 --- a/Mage.Sets/src/mage/cards/s/ScytheOfTheWretched.java +++ b/Mage.Sets/src/mage/cards/s/ScytheOfTheWretched.java @@ -42,6 +42,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -62,7 +63,7 @@ public class ScytheOfTheWretched extends CardImpl { public ScytheOfTheWretched(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2, Duration.WhileOnBattlefield))); diff --git a/Mage.Sets/src/mage/cards/s/ScytheSpecter.java b/Mage.Sets/src/mage/cards/s/ScytheSpecter.java index 8e776201cc..57d0405ef4 100644 --- a/Mage.Sets/src/mage/cards/s/ScytheSpecter.java +++ b/Mage.Sets/src/mage/cards/s/ScytheSpecter.java @@ -1,150 +1,151 @@ -/* - * 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.cards.s; - -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.keyword.FlyingAbility; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.filter.FilterCard; -import mage.game.Game; -import mage.players.Player; -import mage.target.Target; -import mage.target.common.TargetDiscard; - -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -/** - * - * @author jeffwadsworth - */ -public class ScytheSpecter extends CardImpl { - - public ScytheSpecter(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); - - this.subtype.add("Specter"); - this.power = new MageInt(4); - this.toughness = new MageInt(4); - - // Flying - this.addAbility(FlyingAbility.getInstance()); - - // Whenever Scythe Specter deals combat damage to a player, each opponent discards a card. Each player who discarded a card with the highest converted mana cost among cards discarded this way loses life equal to that converted mana cost. - this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new ScytheSpecterEffect(), false)); - - } - - public ScytheSpecter(final ScytheSpecter card) { - super(card); - } - - @Override - public ScytheSpecter copy() { - return new ScytheSpecter(this); - } -} - -class ScytheSpecterEffect extends OneShotEffect { - - public ScytheSpecterEffect() { - super(Outcome.Discard); - this.staticText = "each opponent discards a card. Each player who discarded a card with the highest converted mana cost among cards discarded this way loses life equal to that converted mana cost"; - } - - public ScytheSpecterEffect(final ScytheSpecterEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Map cardDiscarded = new HashMap<>(); - Map discardedCheck = new HashMap<>(); - Integer highestCMC = 0; - Integer currentCMC = 0; - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - for (UUID playerId : game.getOpponents(controller.getId())) { - Player opponent = game.getPlayer(playerId); - if (opponent != null) { - Target target = new TargetDiscard(new FilterCard(), playerId); - opponent.chooseTarget(Outcome.Discard, target, source, game); - Card targetCard = game.getCard(target.getFirstTarget()); - if (targetCard != null) { - if (targetCard.isSplitCard()) { //check Split Cards - if (targetCard.getSecondCardFace().getConvertedManaCost() < targetCard.getConvertedManaCost()) { - currentCMC = targetCard.getConvertedManaCost(); - } - } else { - currentCMC = targetCard.getConvertedManaCost(); - } - if (highestCMC <= currentCMC) { - highestCMC = currentCMC; - } - cardDiscarded.put(playerId, targetCard); - } - } - } - for (UUID opponentId : cardDiscarded.keySet()) {//discard must happen simultaneously - Player player = game.getPlayer(opponentId); - if (player != null - && player.discard(cardDiscarded.get(opponentId), source, game)) { - discardedCheck.put(opponentId, 1);//note that a card was discarded - } - } - - for (UUID playerId : game.getOpponents(controller.getId())) {//lose life equal to CMC - if (cardDiscarded.get(playerId).getConvertedManaCost() == highestCMC) { - Player opponent = game.getPlayer(playerId); - if (opponent != null - && discardedCheck.get(playerId) == 1) {//check that card was discarded - opponent.loseLife(highestCMC, game, false); - } - } - } - cardDiscarded.clear(); - discardedCheck.clear(); - return true; - } - return false; - } - - @Override - public Effect copy() { - return new ScytheSpecterEffect(this); - } -} +/* + * 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.cards.s; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetDiscard; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +/** + * + * @author jeffwadsworth + */ +public class ScytheSpecter extends CardImpl { + + public ScytheSpecter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); + + this.subtype.add(SubType.SPECTER); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever Scythe Specter deals combat damage to a player, each opponent discards a card. Each player who discarded a card with the highest converted mana cost among cards discarded this way loses life equal to that converted mana cost. + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new ScytheSpecterEffect(), false)); + + } + + public ScytheSpecter(final ScytheSpecter card) { + super(card); + } + + @Override + public ScytheSpecter copy() { + return new ScytheSpecter(this); + } +} + +class ScytheSpecterEffect extends OneShotEffect { + + public ScytheSpecterEffect() { + super(Outcome.Discard); + this.staticText = "each opponent discards a card. Each player who discarded a card with the highest converted mana cost among cards discarded this way loses life equal to that converted mana cost"; + } + + public ScytheSpecterEffect(final ScytheSpecterEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Map cardDiscarded = new HashMap<>(); + Map discardedCheck = new HashMap<>(); + Integer highestCMC = 0; + Integer currentCMC = 0; + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (UUID playerId : game.getOpponents(controller.getId())) { + Player opponent = game.getPlayer(playerId); + if (opponent != null) { + Target target = new TargetDiscard(new FilterCard(), playerId); + opponent.chooseTarget(Outcome.Discard, target, source, game); + Card targetCard = game.getCard(target.getFirstTarget()); + if (targetCard != null) { + if (targetCard.isSplitCard()) { //check Split Cards + if (targetCard.getSecondCardFace().getConvertedManaCost() < targetCard.getConvertedManaCost()) { + currentCMC = targetCard.getConvertedManaCost(); + } + } else { + currentCMC = targetCard.getConvertedManaCost(); + } + if (highestCMC <= currentCMC) { + highestCMC = currentCMC; + } + cardDiscarded.put(playerId, targetCard); + } + } + } + for (UUID opponentId : cardDiscarded.keySet()) {//discard must happen simultaneously + Player player = game.getPlayer(opponentId); + if (player != null + && player.discard(cardDiscarded.get(opponentId), source, game)) { + discardedCheck.put(opponentId, 1);//note that a card was discarded + } + } + + for (UUID playerId : game.getOpponents(controller.getId())) {//lose life equal to CMC + if (cardDiscarded.get(playerId).getConvertedManaCost() == highestCMC) { + Player opponent = game.getPlayer(playerId); + if (opponent != null + && discardedCheck.get(playerId) == 1) {//check that card was discarded + opponent.loseLife(highestCMC, game, false); + } + } + } + cardDiscarded.clear(); + discardedCheck.clear(); + return true; + } + return false; + } + + @Override + public Effect copy() { + return new ScytheSpecterEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ScytheTiger.java b/Mage.Sets/src/mage/cards/s/ScytheTiger.java index 86d384978f..a7e49df346 100644 --- a/Mage.Sets/src/mage/cards/s/ScytheTiger.java +++ b/Mage.Sets/src/mage/cards/s/ScytheTiger.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; import mage.target.common.TargetControlledPermanent; @@ -50,7 +51,7 @@ public class ScytheTiger extends CardImpl { public ScytheTiger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Scytheclaw.java b/Mage.Sets/src/mage/cards/s/Scytheclaw.java index a61686ebab..e1dd1f8ff8 100644 --- a/Mage.Sets/src/mage/cards/s/Scytheclaw.java +++ b/Mage.Sets/src/mage/cards/s/Scytheclaw.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.LivingWeaponAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class Scytheclaw extends CardImpl { public Scytheclaw(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{5}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Living weapon this.addAbility(new LivingWeaponAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SeaDrake.java b/Mage.Sets/src/mage/cards/s/SeaDrake.java index 7fddecaec8..d89503cbf7 100644 --- a/Mage.Sets/src/mage/cards/s/SeaDrake.java +++ b/Mage.Sets/src/mage/cards/s/SeaDrake.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledLandPermanent; import mage.target.TargetPermanent; @@ -48,7 +49,7 @@ public class SeaDrake extends CardImpl { public SeaDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SeaEagle.java b/Mage.Sets/src/mage/cards/s/SeaEagle.java index 29e92c2fdf..afe6b5b96d 100644 --- a/Mage.Sets/src/mage/cards/s/SeaEagle.java +++ b/Mage.Sets/src/mage/cards/s/SeaEagle.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SeaEagle extends CardImpl { public SeaEagle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SeaGateLoremaster.java b/Mage.Sets/src/mage/cards/s/SeaGateLoremaster.java index 3e6d939b03..18a3f1e23d 100644 --- a/Mage.Sets/src/mage/cards/s/SeaGateLoremaster.java +++ b/Mage.Sets/src/mage/cards/s/SeaGateLoremaster.java @@ -55,9 +55,9 @@ public class SeaGateLoremaster extends CardImpl { public SeaGateLoremaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); - this.subtype.add("Ally"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); + this.subtype.add(SubType.ALLY); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SeaGateOracle.java b/Mage.Sets/src/mage/cards/s/SeaGateOracle.java index d3505bbb3c..8d8fcef92f 100644 --- a/Mage.Sets/src/mage/cards/s/SeaGateOracle.java +++ b/Mage.Sets/src/mage/cards/s/SeaGateOracle.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; @@ -48,8 +49,8 @@ public class SeaGateOracle extends CardImpl { public SeaGateOracle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SeaMonster.java b/Mage.Sets/src/mage/cards/s/SeaMonster.java index b10ef37105..0c0e6c309e 100644 --- a/Mage.Sets/src/mage/cards/s/SeaMonster.java +++ b/Mage.Sets/src/mage/cards/s/SeaMonster.java @@ -46,7 +46,7 @@ import mage.filter.common.FilterLandPermanent; public SeaMonster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SeaScryer.java b/Mage.Sets/src/mage/cards/s/SeaScryer.java index 9de3d83533..b8e77b5e75 100644 --- a/Mage.Sets/src/mage/cards/s/SeaScryer.java +++ b/Mage.Sets/src/mage/cards/s/SeaScryer.java @@ -38,6 +38,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,8 +49,8 @@ public class SeaScryer extends CardImpl { public SeaScryer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SeaSerpent.java b/Mage.Sets/src/mage/cards/s/SeaSerpent.java index e1c7ea9e4b..750c32774e 100644 --- a/Mage.Sets/src/mage/cards/s/SeaSerpent.java +++ b/Mage.Sets/src/mage/cards/s/SeaSerpent.java @@ -57,7 +57,7 @@ public class SeaSerpent extends CardImpl { public SeaSerpent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SeaSnidd.java b/Mage.Sets/src/mage/cards/s/SeaSnidd.java index c82c532e8a..08d5c0f19a 100644 --- a/Mage.Sets/src/mage/cards/s/SeaSnidd.java +++ b/Mage.Sets/src/mage/cards/s/SeaSnidd.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetLandPermanent; @@ -48,7 +49,7 @@ public class SeaSnidd extends CardImpl { public SeaSnidd(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SeaSpirit.java b/Mage.Sets/src/mage/cards/s/SeaSpirit.java index e24a5d1b52..c404b02287 100644 --- a/Mage.Sets/src/mage/cards/s/SeaSpirit.java +++ b/Mage.Sets/src/mage/cards/s/SeaSpirit.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class SeaSpirit extends CardImpl { public SeaSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Elemental"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SeaSprite.java b/Mage.Sets/src/mage/cards/s/SeaSprite.java index 97a64fb609..9a28ff3d9d 100644 --- a/Mage.Sets/src/mage/cards/s/SeaSprite.java +++ b/Mage.Sets/src/mage/cards/s/SeaSprite.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class SeaSprite extends CardImpl { public SeaSprite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SeachromeCoast.java b/Mage.Sets/src/mage/cards/s/SeachromeCoast.java index f3f797839c..f6533ab5b0 100644 --- a/Mage.Sets/src/mage/cards/s/SeachromeCoast.java +++ b/Mage.Sets/src/mage/cards/s/SeachromeCoast.java @@ -47,12 +47,13 @@ import mage.filter.StaticFilters; * @author maurer.it_at_gmail.com */ public class SeachromeCoast extends CardImpl { + public SeachromeCoast(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); // Seachrome Coast enters the battlefield tapped unless you control two or fewer other lands. Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3)); - String abilityText = "tap it unless you control fewer than 3 lands"; + String abilityText = " tapped unless you control two or fewer other lands"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); // {T}: Add {W} or {U} to your mana pool. diff --git a/Mage.Sets/src/mage/cards/s/SeacoastDrake.java b/Mage.Sets/src/mage/cards/s/SeacoastDrake.java index 78f9c26496..b51aac2f9b 100644 --- a/Mage.Sets/src/mage/cards/s/SeacoastDrake.java +++ b/Mage.Sets/src/mage/cards/s/SeacoastDrake.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SeacoastDrake extends CardImpl { public SeacoastDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SeagrafSkaab.java b/Mage.Sets/src/mage/cards/s/SeagrafSkaab.java index 057c7abe1e..4c04d8092e 100644 --- a/Mage.Sets/src/mage/cards/s/SeagrafSkaab.java +++ b/Mage.Sets/src/mage/cards/s/SeagrafSkaab.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class SeagrafSkaab extends CardImpl { public SeagrafSkaab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(3); } diff --git a/Mage.Sets/src/mage/cards/s/Seahunter.java b/Mage.Sets/src/mage/cards/s/Seahunter.java index 69c72af485..11182296fa 100644 --- a/Mage.Sets/src/mage/cards/s/Seahunter.java +++ b/Mage.Sets/src/mage/cards/s/Seahunter.java @@ -57,8 +57,8 @@ public class Seahunter extends CardImpl { public Seahunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SealockMonster.java b/Mage.Sets/src/mage/cards/s/SealockMonster.java index 0e00c36e2d..4132bf08ba 100644 --- a/Mage.Sets/src/mage/cards/s/SealockMonster.java +++ b/Mage.Sets/src/mage/cards/s/SealockMonster.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BecomesMonstrousSourceTriggeredAbility; @@ -45,6 +44,8 @@ import mage.game.permanent.Permanent; import mage.target.Target; import mage.target.common.TargetLandPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -53,7 +54,7 @@ public class SealockMonster extends CardImpl { public SealockMonster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Octopus"); + this.subtype.add(SubType.OCTOPUS); this.power = new MageInt(5); this.toughness = new MageInt(5); @@ -116,8 +117,8 @@ class SealockMonsterBecomesIslandTargetEffect extends ContinuousEffectImpl { } break; case TypeChangingEffects_4: - if (!land.getSubtype(game).contains("Island")) { - land.getSubtype(game).add("Island"); + if (!land.hasSubtype(SubType.ISLAND, game)) { + land.getSubtype(game).add(SubType.ISLAND); } break; } diff --git a/Mage.Sets/src/mage/cards/s/Seance.java b/Mage.Sets/src/mage/cards/s/Seance.java index 8a5794460d..909b44683e 100644 --- a/Mage.Sets/src/mage/cards/s/Seance.java +++ b/Mage.Sets/src/mage/cards/s/Seance.java @@ -34,12 +34,13 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -96,9 +97,9 @@ class SeanceEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null && card != null) { controller.moveCards(card, Zone.EXILED, source, game); // Also if the move to exile is replaced, the copy takes place - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, false); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), null, false); effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game))); - effect.setAdditionalSubType("Spirit"); + effect.setAdditionalSubType(SubType.SPIRIT); effect.apply(game, source); ExileTargetEffect exileEffect = new ExileTargetEffect(); exileEffect.setTargetPointer(new FixedTargets(effect.getAddedPermanent(), game)); diff --git a/Mage.Sets/src/mage/cards/s/SearchForAzcanta.java b/Mage.Sets/src/mage/cards/s/SearchForAzcanta.java new file mode 100644 index 0000000000..d4b7ea1ec2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SearchForAzcanta.java @@ -0,0 +1,120 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.TransformAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.CardsImpl; +import mage.cards.a.AzcantaTheSunkenRuin; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SuperType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class SearchForAzcanta extends CardImpl { + + public SearchForAzcanta(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + + this.transformable = true; + this.secondSideCardClazz = AzcantaTheSunkenRuin.class; + + this.addSuperType(SuperType.LEGENDARY); + + // At the beginning of your upkeep, look at the top card of your library. You may put it into your graveyard. Then if you have seven or more cards in your graveyard, you may transform Search for Azcanta. + Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SearchForAzcantaLookLibraryEffect(), TargetController.YOU, false); + this.addAbility(ability); + this.addAbility(new TransformAbility()); + } + + public SearchForAzcanta(final SearchForAzcanta card) { + super(card); + } + + @Override + public SearchForAzcanta copy() { + return new SearchForAzcanta(this); + } +} + +class SearchForAzcantaLookLibraryEffect extends OneShotEffect { + + public SearchForAzcantaLookLibraryEffect() { + super(Outcome.DrawCard); + this.staticText = "look at the top card of your library. You may put that card into your graveyard. " + + "Then if you have seven or more cards in your graveyard, you may transform {this}."; + } + + public SearchForAzcantaLookLibraryEffect(final SearchForAzcantaLookLibraryEffect effect) { + super(effect); + } + + @Override + public SearchForAzcantaLookLibraryEffect copy() { + return new SearchForAzcantaLookLibraryEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null) { + if (controller.getLibrary().hasCards()) { + Card card = controller.getLibrary().getFromTop(game); + if (card != null) { + CardsImpl cards = new CardsImpl(); + cards.add(card); + controller.lookAtCards(sourceObject.getIdName(), cards, game); + if (controller.chooseUse(Outcome.Neutral, "Do you wish to put the card into your graveyard?", source, game)) { + controller.moveCards(card, Zone.GRAVEYARD, source, game); + } + if (controller.getGraveyard().size() > 6 && controller.chooseUse(Outcome.Neutral, "Transform " + sourceObject.getLogName() + "?", source, game)) { + new TransformSourceEffect(true).apply(game, source); + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SearchlightGeist.java b/Mage.Sets/src/mage/cards/s/SearchlightGeist.java index e05cbaf852..e2dbf2d477 100644 --- a/Mage.Sets/src/mage/cards/s/SearchlightGeist.java +++ b/Mage.Sets/src/mage/cards/s/SearchlightGeist.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class SearchlightGeist extends CardImpl { public SearchlightGeist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SearingSpearAskari.java b/Mage.Sets/src/mage/cards/s/SearingSpearAskari.java index be58c8be95..95e1ac33b1 100644 --- a/Mage.Sets/src/mage/cards/s/SearingSpearAskari.java +++ b/Mage.Sets/src/mage/cards/s/SearingSpearAskari.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class SearingSpearAskari extends CardImpl { public SearingSpearAskari(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SeasClaim.java b/Mage.Sets/src/mage/cards/s/SeasClaim.java index c6376262e7..5cecd59c1a 100644 --- a/Mage.Sets/src/mage/cards/s/SeasClaim.java +++ b/Mage.Sets/src/mage/cards/s/SeasClaim.java @@ -51,7 +51,7 @@ public class SeasClaim extends CardImpl { public SeasClaim(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land diff --git a/Mage.Sets/src/mage/cards/s/SeascapeAerialist.java b/Mage.Sets/src/mage/cards/s/SeascapeAerialist.java index 9d48a3191e..276e6486da 100644 --- a/Mage.Sets/src/mage/cards/s/SeascapeAerialist.java +++ b/Mage.Sets/src/mage/cards/s/SeascapeAerialist.java @@ -57,9 +57,9 @@ public class SeascapeAerialist extends CardImpl { public SeascapeAerialist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); - this.subtype.add("Ally"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/Seasinger.java b/Mage.Sets/src/mage/cards/s/Seasinger.java index 18c2df470b..ba943d290d 100644 --- a/Mage.Sets/src/mage/cards/s/Seasinger.java +++ b/Mage.Sets/src/mage/cards/s/Seasinger.java @@ -68,7 +68,7 @@ public class Seasinger extends CardImpl { public Seasinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SeasonedMarshal.java b/Mage.Sets/src/mage/cards/s/SeasonedMarshal.java index e018ab599c..c73f5d38ec 100644 --- a/Mage.Sets/src/mage/cards/s/SeasonedMarshal.java +++ b/Mage.Sets/src/mage/cards/s/SeasonedMarshal.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -45,8 +46,8 @@ public class SeasonedMarshal extends CardImpl { public SeasonedMarshal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SeasonedTactician.java b/Mage.Sets/src/mage/cards/s/SeasonedTactician.java index c0fb8e5e34..8bdb31f4f5 100644 --- a/Mage.Sets/src/mage/cards/s/SeasonedTactician.java +++ b/Mage.Sets/src/mage/cards/s/SeasonedTactician.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.PreventNextDamageFromChosenSourceToYouEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class SeasonedTactician extends CardImpl { public SeasonedTactician(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SecondHarvest.java b/Mage.Sets/src/mage/cards/s/SecondHarvest.java index 8350f3fa3b..e2793a550b 100644 --- a/Mage.Sets/src/mage/cards/s/SecondHarvest.java +++ b/Mage.Sets/src/mage/cards/s/SecondHarvest.java @@ -30,7 +30,7 @@ package mage.cards.s; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -89,7 +89,7 @@ class SecondHarvestEffect extends OneShotEffect { filter.add(new TokenPredicate()); for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, controller.getId(), game)) { if (permanent != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(); effect.setTargetPointer(new FixedTarget(permanent, game)); effect.apply(game, source); } diff --git a/Mage.Sets/src/mage/cards/s/SecondSight.java b/Mage.Sets/src/mage/cards/s/SecondSight.java index 4605a50952..3d9c6ae5a8 100644 --- a/Mage.Sets/src/mage/cards/s/SecondSight.java +++ b/Mage.Sets/src/mage/cards/s/SecondSight.java @@ -111,7 +111,7 @@ class SecondSightEffect extends OneShotEffect { return false; } Cards cards = new CardsImpl(); - int count = Math.min(player.getLibrary().size(), 3); + int count = Math.min(player.getLibrary().size(), 5); for (int i = 0; i < count; i++) { Card card = player.getLibrary().removeFromTop(game); if (card != null) { diff --git a/Mage.Sets/src/mage/cards/s/SecondWind.java b/Mage.Sets/src/mage/cards/s/SecondWind.java index 4829fd33c7..739cc0dc05 100644 --- a/Mage.Sets/src/mage/cards/s/SecondWind.java +++ b/Mage.Sets/src/mage/cards/s/SecondWind.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -50,7 +51,7 @@ public class SecondWind extends CardImpl { public SecondWind(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/Secretkeeper.java b/Mage.Sets/src/mage/cards/s/Secretkeeper.java index c5578458ab..bdcb5a475c 100644 --- a/Mage.Sets/src/mage/cards/s/Secretkeeper.java +++ b/Mage.Sets/src/mage/cards/s/Secretkeeper.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class Secretkeeper extends CardImpl { public Secretkeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SecurityBlockade.java b/Mage.Sets/src/mage/cards/s/SecurityBlockade.java index 8e6168853d..504536f328 100644 --- a/Mage.Sets/src/mage/cards/s/SecurityBlockade.java +++ b/Mage.Sets/src/mage/cards/s/SecurityBlockade.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class SecurityBlockade extends CardImpl { public SecurityBlockade(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); this.color.setWhite(true); // Enchant land diff --git a/Mage.Sets/src/mage/cards/s/SecurityDetail.java b/Mage.Sets/src/mage/cards/s/SecurityDetail.java new file mode 100644 index 0000000000..8002d6ed5c --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SecurityDetail.java @@ -0,0 +1,69 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; +import mage.abilities.condition.common.CreatureCountCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.permanent.token.SoldierToken; + +/** + * + * @author TheElk801 + */ +public class SecurityDetail extends CardImpl { + + public SecurityDetail(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + + // {W}{W}: Put a 1/1 white Soldier creature token onto the battlefield. Activate this ability only if you control no creatures and only once each turn. + this.addAbility(new LimitedTimesPerTurnActivatedAbility( + Zone.BATTLEFIELD, + new CreateTokenEffect(new SoldierToken()), + new ManaCostsImpl("{W}{W}"), + 1, + new CreatureCountCondition(0, TargetController.YOU) + )); + } + + public SecurityDetail(final SecurityDetail card) { + super(card); + } + + @Override + public SecurityDetail copy() { + return new SecurityDetail(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SecurityDroid.java b/Mage.Sets/src/mage/cards/s/SecurityDroid.java index 9c6d9947ba..99a2a627d9 100644 --- a/Mage.Sets/src/mage/cards/s/SecurityDroid.java +++ b/Mage.Sets/src/mage/cards/s/SecurityDroid.java @@ -1,67 +1,68 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.keyword.RepairAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.game.permanent.token.DroidToken; - -/** - * - * @author Styxo - */ -public class SecurityDroid extends CardImpl { - - public SecurityDroid(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}{W}"); - this.subtype.add("Droid"); - this.power = new MageInt(1); - this.toughness = new MageInt(1); - - // When Security Droid enters the battlefield, create a 1/1 colorless Droid creature token. - this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new DroidToken(), 1), false)); - - // Repair 3 - this.addAbility(new RepairAbility(3)); - } - - public SecurityDroid(final SecurityDroid card) { - super(card); - } - - @Override - public SecurityDroid copy() { - return new SecurityDroid(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.RepairAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.game.permanent.token.DroidToken; + +/** + * + * @author Styxo + */ +public class SecurityDroid extends CardImpl { + + public SecurityDroid(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}{W}"); + this.subtype.add(SubType.DROID); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Security Droid enters the battlefield, create a 1/1 colorless Droid creature token. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new DroidToken(), 1), false)); + + // Repair 3 + this.addAbility(new RepairAbility(3)); + } + + public SecurityDroid(final SecurityDroid card) { + super(card); + } + + @Override + public SecurityDroid copy() { + return new SecurityDroid(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SedgeScorpion.java b/Mage.Sets/src/mage/cards/s/SedgeScorpion.java index e1f1c0761a..319e3a10b0 100644 --- a/Mage.Sets/src/mage/cards/s/SedgeScorpion.java +++ b/Mage.Sets/src/mage/cards/s/SedgeScorpion.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SedgeScorpion extends CardImpl { public SedgeScorpion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Scorpion"); + this.subtype.add(SubType.SCORPION); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SedgeSliver.java b/Mage.Sets/src/mage/cards/s/SedgeSliver.java index cb6d8ee964..b040ec6761 100644 --- a/Mage.Sets/src/mage/cards/s/SedgeSliver.java +++ b/Mage.Sets/src/mage/cards/s/SedgeSliver.java @@ -59,7 +59,7 @@ public class SedgeSliver extends CardImpl { public SedgeSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SedgeTroll.java b/Mage.Sets/src/mage/cards/s/SedgeTroll.java index d9bc6a3113..521ef4bc51 100644 --- a/Mage.Sets/src/mage/cards/s/SedgeTroll.java +++ b/Mage.Sets/src/mage/cards/s/SedgeTroll.java @@ -56,7 +56,7 @@ public class SedgeTroll extends CardImpl { public SedgeTroll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Troll"); + this.subtype.add(SubType.TROLL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SedraxisAlchemist.java b/Mage.Sets/src/mage/cards/s/SedraxisAlchemist.java index ae3acfb2ab..c216b017b5 100644 --- a/Mage.Sets/src/mage/cards/s/SedraxisAlchemist.java +++ b/Mage.Sets/src/mage/cards/s/SedraxisAlchemist.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.target.common.TargetNonlandPermanent; @@ -58,8 +59,8 @@ public class SedraxisAlchemist extends CardImpl { public SedraxisAlchemist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SedraxisSpecter.java b/Mage.Sets/src/mage/cards/s/SedraxisSpecter.java index 5a7ffdc9e4..4af4754d2a 100644 --- a/Mage.Sets/src/mage/cards/s/SedraxisSpecter.java +++ b/Mage.Sets/src/mage/cards/s/SedraxisSpecter.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class SedraxisSpecter extends CardImpl { public SedraxisSpecter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}{R}"); - this.subtype.add("Specter"); + this.subtype.add(SubType.SPECTER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SedrisTheTraitorKing.java b/Mage.Sets/src/mage/cards/s/SedrisTheTraitorKing.java index a5ca381517..50d23373db 100644 --- a/Mage.Sets/src/mage/cards/s/SedrisTheTraitorKing.java +++ b/Mage.Sets/src/mage/cards/s/SedrisTheTraitorKing.java @@ -49,8 +49,8 @@ public class SedrisTheTraitorKing extends CardImpl { public SedrisTheTraitorKing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Zombie"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SeedGuardian.java b/Mage.Sets/src/mage/cards/s/SeedGuardian.java index 75f6bd97bd..73c05b269e 100644 --- a/Mage.Sets/src/mage/cards/s/SeedGuardian.java +++ b/Mage.Sets/src/mage/cards/s/SeedGuardian.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterCreatureCard; import mage.game.Game; @@ -51,7 +52,7 @@ public class SeedGuardian extends CardImpl { public SeedGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SeedbornMuse.java b/Mage.Sets/src/mage/cards/s/SeedbornMuse.java index 0f54508e52..c54971c470 100644 --- a/Mage.Sets/src/mage/cards/s/SeedbornMuse.java +++ b/Mage.Sets/src/mage/cards/s/SeedbornMuse.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.UntapAllDuringEachOtherPlayersUn import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -45,7 +46,7 @@ public class SeedbornMuse extends CardImpl { public SeedbornMuse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SeedcradleWitch.java b/Mage.Sets/src/mage/cards/s/SeedcradleWitch.java index bb0d8e636b..ef1fa938f7 100644 --- a/Mage.Sets/src/mage/cards/s/SeedcradleWitch.java +++ b/Mage.Sets/src/mage/cards/s/SeedcradleWitch.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class SeedcradleWitch extends CardImpl { public SeedcradleWitch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G/W}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SeedguideAsh.java b/Mage.Sets/src/mage/cards/s/SeedguideAsh.java index c6dd4d99de..03f795f444 100644 --- a/Mage.Sets/src/mage/cards/s/SeedguideAsh.java +++ b/Mage.Sets/src/mage/cards/s/SeedguideAsh.java @@ -54,8 +54,8 @@ public class SeedguideAsh extends CardImpl { public SeedguideAsh(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Druid"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.DRUID); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SeedsOfInnocence.java b/Mage.Sets/src/mage/cards/s/SeedsOfInnocence.java index 64ad71ded9..d03f021e2c 100644 --- a/Mage.Sets/src/mage/cards/s/SeedsOfInnocence.java +++ b/Mage.Sets/src/mage/cards/s/SeedsOfInnocence.java @@ -1,97 +1,97 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.filter.common.FilterArtifactPermanent; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; - -/** - * - * @author Styxo - */ -public class SeedsOfInnocence extends CardImpl { - - public SeedsOfInnocence(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}{G}"); - - // Destroy all artifacts. They can't be regenerated. The controller of each of those artifacts gains life equal to its converted mana cost. - this.getSpellAbility().addEffect(new SeedsOfInnocenceEffect()); - - } - - public SeedsOfInnocence(final SeedsOfInnocence card) { - super(card); - } - - @Override - public SeedsOfInnocence copy() { - return new SeedsOfInnocence(this); - } -} - -class SeedsOfInnocenceEffect extends OneShotEffect { - - public SeedsOfInnocenceEffect() { - super(Outcome.DestroyPermanent); - this.staticText = "Destroy all artifacts. They can't be regenerated. The controller of each of those artifacts gains life equal to its converted mana cost"; - } - - public SeedsOfInnocenceEffect(final SeedsOfInnocenceEffect effect) { - super(effect); - } - - @Override - public SeedsOfInnocenceEffect copy() { - return new SeedsOfInnocenceEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - for (Permanent artifact : game.getState().getBattlefield().getActivePermanents(new FilterArtifactPermanent(), controller.getId(), game)) { - Player artifactController = game.getPlayer(artifact.getControllerId()); - int cmc = artifact.getConvertedManaCost(); - if (artifact.destroy(source.getSourceId(), game, true)) { - artifactController.gainLife(cmc, game); - } - } - return true; - } - return false; - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.common.FilterArtifactPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author Styxo + */ +public class SeedsOfInnocence extends CardImpl { + + public SeedsOfInnocence(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}{G}"); + + // Destroy all artifacts. They can't be regenerated. The controller of each of those artifacts gains life equal to its converted mana cost. + this.getSpellAbility().addEffect(new SeedsOfInnocenceEffect()); + + } + + public SeedsOfInnocence(final SeedsOfInnocence card) { + super(card); + } + + @Override + public SeedsOfInnocence copy() { + return new SeedsOfInnocence(this); + } +} + +class SeedsOfInnocenceEffect extends OneShotEffect { + + public SeedsOfInnocenceEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "Destroy all artifacts. They can't be regenerated. The controller of each of those artifacts gains life equal to its converted mana cost"; + } + + public SeedsOfInnocenceEffect(final SeedsOfInnocenceEffect effect) { + super(effect); + } + + @Override + public SeedsOfInnocenceEffect copy() { + return new SeedsOfInnocenceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (Permanent artifact : game.getState().getBattlefield().getActivePermanents(new FilterArtifactPermanent(), controller.getId(), game)) { + Player artifactController = game.getPlayer(artifact.getControllerId()); + int cmc = artifact.getConvertedManaCost(); + if (artifact.destroy(source.getSourceId(), game, true)) { + artifactController.gainLife(cmc, game); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SeedsOfStrength.java b/Mage.Sets/src/mage/cards/s/SeedsOfStrength.java index 39eae023a4..5c884ddc54 100644 --- a/Mage.Sets/src/mage/cards/s/SeedsOfStrength.java +++ b/Mage.Sets/src/mage/cards/s/SeedsOfStrength.java @@ -1,74 +1,74 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.continuous.BoostTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.filter.common.FilterCreaturePermanent; -import mage.target.common.TargetCreaturePermanent; -import mage.target.targetpointer.SecondTargetPointer; -import mage.target.targetpointer.ThirdTargetPointer; - -/** - * - * @author LevelX2 - */ -public class SeedsOfStrength extends CardImpl { - - public SeedsOfStrength(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}{W}"); - - // Target creature gets +1/+1 until end of turn. - this.getSpellAbility().addEffect(new BoostTargetEffect(1, 1, Duration.EndOfTurn)); - this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (1st)"))); - // Target creature gets +1/+1 until end of turn. - Effect effect = new BoostTargetEffect(1, 1, Duration.EndOfTurn).setText("
Target creature gets +1/+1 until end of turn."); - effect.setTargetPointer(new SecondTargetPointer()); - this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (2nd)"))); - // Target creature gets +1/+1 until end of turn. - effect = new BoostTargetEffect(1, 1, Duration.EndOfTurn).setText("
Target creature gets +1/+1 until end of turn."); - effect.setTargetPointer(new ThirdTargetPointer()); - this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (3rd)"))); - } - - public SeedsOfStrength(final SeedsOfStrength card) { - super(card); - } - - @Override - public SeedsOfStrength copy() { - return new SeedsOfStrength(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.SecondTargetPointer; +import mage.target.targetpointer.ThirdTargetPointer; + +/** + * + * @author LevelX2 + */ +public class SeedsOfStrength extends CardImpl { + + public SeedsOfStrength(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}{W}"); + + // Target creature gets +1/+1 until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(1, 1, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (1st)"))); + // Target creature gets +1/+1 until end of turn. + Effect effect = new BoostTargetEffect(1, 1, Duration.EndOfTurn).setText("
Target creature gets +1/+1 until end of turn."); + effect.setTargetPointer(new SecondTargetPointer()); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (2nd)"))); + // Target creature gets +1/+1 until end of turn. + effect = new BoostTargetEffect(1, 1, Duration.EndOfTurn).setText("
Target creature gets +1/+1 until end of turn."); + effect.setTargetPointer(new ThirdTargetPointer()); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (3rd)"))); + } + + public SeedsOfStrength(final SeedsOfStrength card) { + super(card); + } + + @Override + public SeedsOfStrength copy() { + return new SeedsOfStrength(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SeekerOfInsight.java b/Mage.Sets/src/mage/cards/s/SeekerOfInsight.java index b72a36c6e1..453f069005 100644 --- a/Mage.Sets/src/mage/cards/s/SeekerOfInsight.java +++ b/Mage.Sets/src/mage/cards/s/SeekerOfInsight.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.stack.Spell; @@ -52,8 +53,8 @@ public class SeekerOfInsight extends CardImpl { public SeekerOfInsight(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SeekerOfSkybreak.java b/Mage.Sets/src/mage/cards/s/SeekerOfSkybreak.java index 049d3027f1..0a70f7bf92 100644 --- a/Mage.Sets/src/mage/cards/s/SeekerOfSkybreak.java +++ b/Mage.Sets/src/mage/cards/s/SeekerOfSkybreak.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class SeekerOfSkybreak extends CardImpl { public SeekerOfSkybreak(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SeekerOfTheWay.java b/Mage.Sets/src/mage/cards/s/SeekerOfTheWay.java index b5efb6a63f..5313b2045b 100644 --- a/Mage.Sets/src/mage/cards/s/SeekerOfTheWay.java +++ b/Mage.Sets/src/mage/cards/s/SeekerOfTheWay.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -54,8 +55,8 @@ public class SeekerOfTheWay extends CardImpl { public SeekerOfTheWay(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SeekersSquire.java b/Mage.Sets/src/mage/cards/s/SeekersSquire.java new file mode 100644 index 0000000000..fcae665dc1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SeekersSquire.java @@ -0,0 +1,65 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.keyword.ExploreSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class SeekersSquire extends CardImpl { + + public SeekersSquire(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // When Seekers' Squire enters the battlefield, it explores. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ExploreSourceEffect())); + } + + public SeekersSquire(final SeekersSquire card) { + super(card); + } + + @Override + public SeekersSquire copy() { + return new SeekersSquire(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SeerOfTheLastTomorrow.java b/Mage.Sets/src/mage/cards/s/SeerOfTheLastTomorrow.java index 459548306f..6b62dfca54 100644 --- a/Mage.Sets/src/mage/cards/s/SeerOfTheLastTomorrow.java +++ b/Mage.Sets/src/mage/cards/s/SeerOfTheLastTomorrow.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -50,8 +51,8 @@ public class SeerOfTheLastTomorrow extends CardImpl { public SeerOfTheLastTomorrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Naga"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SeersVision.java b/Mage.Sets/src/mage/cards/s/SeersVision.java index 389d362363..c4f694f0f7 100644 --- a/Mage.Sets/src/mage/cards/s/SeersVision.java +++ b/Mage.Sets/src/mage/cards/s/SeersVision.java @@ -48,12 +48,12 @@ import mage.target.TargetPlayer; public class SeersVision extends CardImpl { public SeersVision(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{B}"); // Your opponents play with their hands revealed. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PlayWithHandRevealedEffect(TargetController.OPPONENT))); // Sacrifice Seer's Vision: Look at target player's hand and choose a card from it. That player discards that card. Activate this ability only any time you could cast a sorcery. - Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DiscardCardYouChooseTargetEffect(), new SacrificeSourceCost()); + Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DiscardCardYouChooseTargetEffect(TargetController.ANY), new SacrificeSourceCost()); ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SeethingPathblazer.java b/Mage.Sets/src/mage/cards/s/SeethingPathblazer.java index 0f0beba820..ece2167dd2 100644 --- a/Mage.Sets/src/mage/cards/s/SeethingPathblazer.java +++ b/Mage.Sets/src/mage/cards/s/SeethingPathblazer.java @@ -59,8 +59,8 @@ public class SeethingPathblazer extends CardImpl { public SeethingPathblazer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SegmentedKrotiq.java b/Mage.Sets/src/mage/cards/s/SegmentedKrotiq.java index d7b8807ceb..9a595bbfc4 100644 --- a/Mage.Sets/src/mage/cards/s/SegmentedKrotiq.java +++ b/Mage.Sets/src/mage/cards/s/SegmentedKrotiq.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SegmentedKrotiq extends CardImpl { public SegmentedKrotiq(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SegmentedWurm.java b/Mage.Sets/src/mage/cards/s/SegmentedWurm.java index 83eb41ed6f..0e0f68e936 100644 --- a/Mage.Sets/src/mage/cards/s/SegmentedWurm.java +++ b/Mage.Sets/src/mage/cards/s/SegmentedWurm.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -44,7 +45,7 @@ public class SegmentedWurm extends CardImpl { public SegmentedWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SegovianLeviathan.java b/Mage.Sets/src/mage/cards/s/SegovianLeviathan.java index 2f58678f9f..b581c74204 100644 --- a/Mage.Sets/src/mage/cards/s/SegovianLeviathan.java +++ b/Mage.Sets/src/mage/cards/s/SegovianLeviathan.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.IslandwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SegovianLeviathan extends CardImpl { public SegovianLeviathan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Leviathan"); + this.subtype.add(SubType.LEVIATHAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SeismicElemental.java b/Mage.Sets/src/mage/cards/s/SeismicElemental.java index 5ce9d939cc..5a545187be 100644 --- a/Mage.Sets/src/mage/cards/s/SeismicElemental.java +++ b/Mage.Sets/src/mage/cards/s/SeismicElemental.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -54,7 +55,7 @@ public class SeismicElemental extends CardImpl { public SeismicElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SeismicMage.java b/Mage.Sets/src/mage/cards/s/SeismicMage.java index 78f00ec68d..dbd2c25537 100644 --- a/Mage.Sets/src/mage/cards/s/SeismicMage.java +++ b/Mage.Sets/src/mage/cards/s/SeismicMage.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetLandPermanent; @@ -49,8 +50,8 @@ public class SeismicMage extends CardImpl { public SeismicMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SeizanPerverterOfTruth.java b/Mage.Sets/src/mage/cards/s/SeizanPerverterOfTruth.java index 763ed2b467..6c040b30ad 100644 --- a/Mage.Sets/src/mage/cards/s/SeizanPerverterOfTruth.java +++ b/Mage.Sets/src/mage/cards/s/SeizanPerverterOfTruth.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; @@ -50,8 +51,8 @@ public class SeizanPerverterOfTruth extends CardImpl { public SeizanPerverterOfTruth (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Demon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DEMON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SeizeTheSoul.java b/Mage.Sets/src/mage/cards/s/SeizeTheSoul.java new file mode 100644 index 0000000000..a970769a3e --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SeizeTheSoul.java @@ -0,0 +1,82 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.HauntAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.permanent.token.SpiritToken; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class SeizeTheSoul extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonwhite, nonblack creature"); + + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + filter.add(Predicates.not(new ColorPredicate(ObjectColor.WHITE))); + } + + public SeizeTheSoul(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}{B}"); + + // Destroy target nonwhite, nonblack creature. Put a 1/1 white Spirit creature token with flying onto the battlefield. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addEffect(new CreateTokenEffect(new SpiritToken())); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Haunt + // When the creature Seize the Soul haunts dies, destroy target nonwhite, nonblack creature. Put a 1/1 white Spirit creature token with flying onto the battlefield. + Ability ability = new HauntAbility(this, new DestroyTargetEffect()); + ability.addEffect(new CreateTokenEffect(new SpiritToken())); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public SeizeTheSoul(final SeizeTheSoul card) { + super(card); + } + + @Override + public SeizeTheSoul copy() { + return new SeizeTheSoul(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/Seizures.java b/Mage.Sets/src/mage/cards/s/Seizures.java index 3e17b23d23..1cb07990c6 100644 --- a/Mage.Sets/src/mage/cards/s/Seizures.java +++ b/Mage.Sets/src/mage/cards/s/Seizures.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -53,7 +54,7 @@ public class Seizures extends CardImpl { public Seizures(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SejiriMerfolk.java b/Mage.Sets/src/mage/cards/s/SejiriMerfolk.java index b641ceb416..e8ade4186b 100644 --- a/Mage.Sets/src/mage/cards/s/SejiriMerfolk.java +++ b/Mage.Sets/src/mage/cards/s/SejiriMerfolk.java @@ -59,8 +59,8 @@ public class SejiriMerfolk extends CardImpl { public SejiriMerfolk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SOLDIER); this.color.setBlue(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SekKuarDeathkeeper.java b/Mage.Sets/src/mage/cards/s/SekKuarDeathkeeper.java index 84f893c3e5..e702720845 100644 --- a/Mage.Sets/src/mage/cards/s/SekKuarDeathkeeper.java +++ b/Mage.Sets/src/mage/cards/s/SekKuarDeathkeeper.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -60,8 +61,8 @@ public class SekKuarDeathkeeper extends CardImpl { public SekKuarDeathkeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Orc"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SekkiSeasonsGuide.java b/Mage.Sets/src/mage/cards/s/SekkiSeasonsGuide.java index 295991aaeb..57dbe49a97 100644 --- a/Mage.Sets/src/mage/cards/s/SekkiSeasonsGuide.java +++ b/Mage.Sets/src/mage/cards/s/SekkiSeasonsGuide.java @@ -65,7 +65,7 @@ public class SekkiSeasonsGuide extends CardImpl { public SekkiSeasonsGuide(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SeleniaDarkAngel.java b/Mage.Sets/src/mage/cards/s/SeleniaDarkAngel.java index b0eb77118e..afeee33ca4 100644 --- a/Mage.Sets/src/mage/cards/s/SeleniaDarkAngel.java +++ b/Mage.Sets/src/mage/cards/s/SeleniaDarkAngel.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class SeleniaDarkAngel extends CardImpl { public SeleniaDarkAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SelesnyaEvangel.java b/Mage.Sets/src/mage/cards/s/SelesnyaEvangel.java index 4c463ee076..fafbb4b51c 100644 --- a/Mage.Sets/src/mage/cards/s/SelesnyaEvangel.java +++ b/Mage.Sets/src/mage/cards/s/SelesnyaEvangel.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; @@ -59,8 +60,8 @@ public class SelesnyaEvangel extends CardImpl { public SelesnyaEvangel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SelesnyaGuildmage.java b/Mage.Sets/src/mage/cards/s/SelesnyaGuildmage.java index 66b45282dc..a827bd5e67 100644 --- a/Mage.Sets/src/mage/cards/s/SelesnyaGuildmage.java +++ b/Mage.Sets/src/mage/cards/s/SelesnyaGuildmage.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.SaprolingToken; @@ -49,8 +50,8 @@ public class SelesnyaGuildmage extends CardImpl { public SelesnyaGuildmage (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G/W}{G/W}"); - this.subtype.add("Elf"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SelesnyaKeyrune.java b/Mage.Sets/src/mage/cards/s/SelesnyaKeyrune.java index 13243ff454..92fa7a39b4 100644 --- a/Mage.Sets/src/mage/cards/s/SelesnyaKeyrune.java +++ b/Mage.Sets/src/mage/cards/s/SelesnyaKeyrune.java @@ -37,6 +37,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -73,7 +74,7 @@ public class SelesnyaKeyrune extends CardImpl { cardType.add(CardType.CREATURE); color.setWhite(true); color.setGreen(true); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); power = new MageInt(3); toughness = new MageInt(3); } diff --git a/Mage.Sets/src/mage/cards/s/SelesnyaSagittars.java b/Mage.Sets/src/mage/cards/s/SelesnyaSagittars.java index 7ee25546ec..a1163dfaac 100644 --- a/Mage.Sets/src/mage/cards/s/SelesnyaSagittars.java +++ b/Mage.Sets/src/mage/cards/s/SelesnyaSagittars.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class SelesnyaSagittars extends CardImpl { public SelesnyaSagittars(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{W}"); - this.subtype.add("Elf"); - this.subtype.add("Archer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SelesnyaSentry.java b/Mage.Sets/src/mage/cards/s/SelesnyaSentry.java index 2eed5b9cbf..715a4fbc01 100644 --- a/Mage.Sets/src/mage/cards/s/SelesnyaSentry.java +++ b/Mage.Sets/src/mage/cards/s/SelesnyaSentry.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class SelesnyaSentry extends CardImpl { public SelesnyaSentry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Elephant"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ELEPHANT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SelfAssembler.java b/Mage.Sets/src/mage/cards/s/SelfAssembler.java index 9712b092f6..7a76b9dc8c 100644 --- a/Mage.Sets/src/mage/cards/s/SelfAssembler.java +++ b/Mage.Sets/src/mage/cards/s/SelfAssembler.java @@ -54,7 +54,7 @@ public class SelfAssembler extends CardImpl { public SelfAssembler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Assembly-Worker"); + this.subtype.add(SubType.ASSEMBLY_WORKER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SelflessCathar.java b/Mage.Sets/src/mage/cards/s/SelflessCathar.java index ddcc7466bb..6698f0d733 100644 --- a/Mage.Sets/src/mage/cards/s/SelflessCathar.java +++ b/Mage.Sets/src/mage/cards/s/SelflessCathar.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class SelflessCathar extends CardImpl { public SelflessCathar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SelflessSpirit.java b/Mage.Sets/src/mage/cards/s/SelflessSpirit.java index 3d52c8ba0b..d23a90fc36 100644 --- a/Mage.Sets/src/mage/cards/s/SelflessSpirit.java +++ b/Mage.Sets/src/mage/cards/s/SelflessSpirit.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -49,8 +50,8 @@ public class SelflessSpirit extends CardImpl { public SelflessSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Spirit"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SelflessSquire.java b/Mage.Sets/src/mage/cards/s/SelflessSquire.java index 649df8b2d5..a198878095 100644 --- a/Mage.Sets/src/mage/cards/s/SelflessSquire.java +++ b/Mage.Sets/src/mage/cards/s/SelflessSquire.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -53,8 +54,8 @@ public class SelflessSquire extends CardImpl { public SelflessSquire(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SelhoffOccultist.java b/Mage.Sets/src/mage/cards/s/SelhoffOccultist.java index a54b8c3b6d..024337de4e 100644 --- a/Mage.Sets/src/mage/cards/s/SelhoffOccultist.java +++ b/Mage.Sets/src/mage/cards/s/SelhoffOccultist.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -45,8 +46,8 @@ public class SelhoffOccultist extends CardImpl { public SelhoffOccultist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SelkieHedgeMage.java b/Mage.Sets/src/mage/cards/s/SelkieHedgeMage.java index bacfe6cb0a..4aac43dba1 100644 --- a/Mage.Sets/src/mage/cards/s/SelkieHedgeMage.java +++ b/Mage.Sets/src/mage/cards/s/SelkieHedgeMage.java @@ -66,8 +66,8 @@ public class SelkieHedgeMage extends CardImpl { public SelkieHedgeMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G/U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.color.setBlue(true); this.color.setGreen(true); diff --git a/Mage.Sets/src/mage/cards/s/SellSwordBrute.java b/Mage.Sets/src/mage/cards/s/SellSwordBrute.java index 0c6f2b1053..08c1129d11 100644 --- a/Mage.Sets/src/mage/cards/s/SellSwordBrute.java +++ b/Mage.Sets/src/mage/cards/s/SellSwordBrute.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SellSwordBrute extends CardImpl { public SellSwordBrute(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SellerOfSongbirds.java b/Mage.Sets/src/mage/cards/s/SellerOfSongbirds.java index 34aaa2a7c5..e3fca1742f 100644 --- a/Mage.Sets/src/mage/cards/s/SellerOfSongbirds.java +++ b/Mage.Sets/src/mage/cards/s/SellerOfSongbirds.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.BirdToken; /** @@ -43,7 +44,7 @@ public class SellerOfSongbirds extends CardImpl { public SellerOfSongbirds(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SelvalaExplorerReturned.java b/Mage.Sets/src/mage/cards/s/SelvalaExplorerReturned.java index 5f7aa64cca..be6ae2e491 100644 --- a/Mage.Sets/src/mage/cards/s/SelvalaExplorerReturned.java +++ b/Mage.Sets/src/mage/cards/s/SelvalaExplorerReturned.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.game.Game; @@ -56,8 +57,8 @@ public class SelvalaExplorerReturned extends CardImpl { public SelvalaExplorerReturned(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SelvalaHeartOfTheWilds.java b/Mage.Sets/src/mage/cards/s/SelvalaHeartOfTheWilds.java index 2a6898a139..21c48e5171 100644 --- a/Mage.Sets/src/mage/cards/s/SelvalaHeartOfTheWilds.java +++ b/Mage.Sets/src/mage/cards/s/SelvalaHeartOfTheWilds.java @@ -70,8 +70,8 @@ public class SelvalaHeartOfTheWilds extends CardImpl { public SelvalaHeartOfTheWilds(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SelvalasEnforcer.java b/Mage.Sets/src/mage/cards/s/SelvalasEnforcer.java index ab944114f6..901258afa1 100644 --- a/Mage.Sets/src/mage/cards/s/SelvalasEnforcer.java +++ b/Mage.Sets/src/mage/cards/s/SelvalasEnforcer.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DrawCardAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.game.Game; @@ -52,8 +53,8 @@ public class SelvalasEnforcer extends CardImpl { public SelvalasEnforcer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SenTriplets.java b/Mage.Sets/src/mage/cards/s/SenTriplets.java index 018be3729f..73d66b5ef0 100644 --- a/Mage.Sets/src/mage/cards/s/SenTriplets.java +++ b/Mage.Sets/src/mage/cards/s/SenTriplets.java @@ -53,8 +53,8 @@ public class SenTriplets extends CardImpl { public SenTriplets(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{W}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SenatorBailOrgana.java b/Mage.Sets/src/mage/cards/s/SenatorBailOrgana.java index 5870061b7b..62ebe499bc 100644 --- a/Mage.Sets/src/mage/cards/s/SenatorBailOrgana.java +++ b/Mage.Sets/src/mage/cards/s/SenatorBailOrgana.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.SuperType; @@ -51,8 +52,8 @@ public class SenatorBailOrgana extends CardImpl { public SenatorBailOrgana(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SenatorLottDod.java b/Mage.Sets/src/mage/cards/s/SenatorLottDod.java index 0d5d612a1e..f2d8862ed7 100644 --- a/Mage.Sets/src/mage/cards/s/SenatorLottDod.java +++ b/Mage.Sets/src/mage/cards/s/SenatorLottDod.java @@ -52,8 +52,8 @@ public class SenatorLottDod extends CardImpl { public SenatorLottDod(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Neimoidian"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.NEIMOIDIAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SenatorOnacondaFarr.java b/Mage.Sets/src/mage/cards/s/SenatorOnacondaFarr.java index 6607b3b615..c66724d832 100644 --- a/Mage.Sets/src/mage/cards/s/SenatorOnacondaFarr.java +++ b/Mage.Sets/src/mage/cards/s/SenatorOnacondaFarr.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.TargetController; @@ -49,8 +50,8 @@ public class SenatorOnacondaFarr extends CardImpl { public SenatorOnacondaFarr(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Rodian"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.RODIAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SenatorPadmeAmidala.java b/Mage.Sets/src/mage/cards/s/SenatorPadmeAmidala.java index cc60a08141..c8ae9817dd 100644 --- a/Mage.Sets/src/mage/cards/s/SenatorPadmeAmidala.java +++ b/Mage.Sets/src/mage/cards/s/SenatorPadmeAmidala.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -45,8 +46,8 @@ public class SenatorPadmeAmidala extends CardImpl { public SenatorPadmeAmidala(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SenatorPasselArgente.java b/Mage.Sets/src/mage/cards/s/SenatorPasselArgente.java index ad32dc2146..f81303d641 100644 --- a/Mage.Sets/src/mage/cards/s/SenatorPasselArgente.java +++ b/Mage.Sets/src/mage/cards/s/SenatorPasselArgente.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.LoseLifeOpponentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -45,8 +46,8 @@ public class SenatorPasselArgente extends CardImpl { public SenatorPasselArgente(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Koorivar"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.KOORIVAR); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SengirAutocrat.java b/Mage.Sets/src/mage/cards/s/SengirAutocrat.java index 2b74a36325..1fe0e5dd85 100644 --- a/Mage.Sets/src/mage/cards/s/SengirAutocrat.java +++ b/Mage.Sets/src/mage/cards/s/SengirAutocrat.java @@ -58,7 +58,7 @@ public class SengirAutocrat extends CardImpl { public SengirAutocrat(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SengirBats.java b/Mage.Sets/src/mage/cards/s/SengirBats.java index b22f50b61c..54d500cb50 100644 --- a/Mage.Sets/src/mage/cards/s/SengirBats.java +++ b/Mage.Sets/src/mage/cards/s/SengirBats.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,7 +46,7 @@ public class SengirBats extends CardImpl { public SengirBats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Bat"); + this.subtype.add(SubType.BAT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SengirNosferatu.java b/Mage.Sets/src/mage/cards/s/SengirNosferatu.java index 8d08ded9e3..5a8a3dec94 100644 --- a/Mage.Sets/src/mage/cards/s/SengirNosferatu.java +++ b/Mage.Sets/src/mage/cards/s/SengirNosferatu.java @@ -41,6 +41,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -60,7 +61,7 @@ public class SengirNosferatu extends CardImpl { public SengirNosferatu(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SengirVampire.java b/Mage.Sets/src/mage/cards/s/SengirVampire.java index 9bd66b4a92..aacd73b027 100644 --- a/Mage.Sets/src/mage/cards/s/SengirVampire.java +++ b/Mage.Sets/src/mage/cards/s/SengirVampire.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -44,7 +45,7 @@ public class SengirVampire extends CardImpl { public SengirVampire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SensationGorger.java b/Mage.Sets/src/mage/cards/s/SensationGorger.java index 1362b69897..78e4c0ff77 100644 --- a/Mage.Sets/src/mage/cards/s/SensationGorger.java +++ b/Mage.Sets/src/mage/cards/s/SensationGorger.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.discard.DiscardHandAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class SensationGorger extends CardImpl { public SensationGorger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SenseiGoldenTail.java b/Mage.Sets/src/mage/cards/s/SenseiGoldenTail.java index 550543bd4f..1a65a80d32 100644 --- a/Mage.Sets/src/mage/cards/s/SenseiGoldenTail.java +++ b/Mage.Sets/src/mage/cards/s/SenseiGoldenTail.java @@ -53,8 +53,8 @@ public class SenseiGoldenTail extends CardImpl { public SenseiGoldenTail (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Fox"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.FOX); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SenselessRage.java b/Mage.Sets/src/mage/cards/s/SenselessRage.java index 09b876ba0f..752de1dc16 100644 --- a/Mage.Sets/src/mage/cards/s/SenselessRage.java +++ b/Mage.Sets/src/mage/cards/s/SenselessRage.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MadnessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class SenselessRage extends CardImpl { public SenselessRage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SensorSplicer.java b/Mage.Sets/src/mage/cards/s/SensorSplicer.java index 273f1906a8..b3195ed6c1 100644 --- a/Mage.Sets/src/mage/cards/s/SensorSplicer.java +++ b/Mage.Sets/src/mage/cards/s/SensorSplicer.java @@ -60,7 +60,7 @@ public class SensorSplicer extends CardImpl { public SensorSplicer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SensoryDeprivation.java b/Mage.Sets/src/mage/cards/s/SensoryDeprivation.java index ce2d2c2080..490d6ec687 100644 --- a/Mage.Sets/src/mage/cards/s/SensoryDeprivation.java +++ b/Mage.Sets/src/mage/cards/s/SensoryDeprivation.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class SensoryDeprivation extends CardImpl { public SensoryDeprivation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/Sentinel.java b/Mage.Sets/src/mage/cards/s/Sentinel.java index bca0c6a263..1c67461fe4 100644 --- a/Mage.Sets/src/mage/cards/s/Sentinel.java +++ b/Mage.Sets/src/mage/cards/s/Sentinel.java @@ -38,8 +38,10 @@ import mage.abilities.effects.common.continuous.SetToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; +import mage.constants.SubLayer; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -57,8 +59,8 @@ import mage.target.common.TargetCreaturePermanent; public class Sentinel extends CardImpl { public Sentinel(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Shapeshifter"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -104,7 +106,7 @@ class SentinelEffect extends OneShotEffect { Permanent targetPermanent = game.getPermanentOrLKIBattlefield(targetPointer.getFirst(game, source)); if (controller != null && targetPermanent != null) { int newToughness = targetPermanent.getPower().getValue() + 1; - game.addEffect(new SetToughnessSourceEffect(new StaticValue(newToughness), Duration.Custom), source); + game.addEffect(new SetToughnessSourceEffect(new StaticValue(newToughness), Duration.Custom, SubLayer.SetPT_7b), source); return true; } return false; diff --git a/Mage.Sets/src/mage/cards/s/SentinelOfTheEternalWatch.java b/Mage.Sets/src/mage/cards/s/SentinelOfTheEternalWatch.java index 7aa3aaf9d5..4f134c41e1 100644 --- a/Mage.Sets/src/mage/cards/s/SentinelOfTheEternalWatch.java +++ b/Mage.Sets/src/mage/cards/s/SentinelOfTheEternalWatch.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -57,8 +58,8 @@ public class SentinelOfTheEternalWatch extends CardImpl { public SentinelOfTheEternalWatch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Giant"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SentinelSliver.java b/Mage.Sets/src/mage/cards/s/SentinelSliver.java index 8a3dcb6402..6a09beeb9f 100644 --- a/Mage.Sets/src/mage/cards/s/SentinelSliver.java +++ b/Mage.Sets/src/mage/cards/s/SentinelSliver.java @@ -48,7 +48,7 @@ public class SentinelSliver extends CardImpl { public SentinelSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SentinelSpider.java b/Mage.Sets/src/mage/cards/s/SentinelSpider.java index 862304640f..ca2e522ec0 100644 --- a/Mage.Sets/src/mage/cards/s/SentinelSpider.java +++ b/Mage.Sets/src/mage/cards/s/SentinelSpider.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SentinelSpider extends CardImpl { public SentinelSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SentinelTotem.java b/Mage.Sets/src/mage/cards/s/SentinelTotem.java new file mode 100644 index 0000000000..81499265ba --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SentinelTotem.java @@ -0,0 +1,69 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.ExileGraveyardAllPlayersEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class SentinelTotem extends CardImpl { + + public SentinelTotem(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); + + // When Sentinel Totem enters the battlefield, scry 1. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ScryEffect(1))); + + // {T}, Exile Sentinel Totem: Exile all cards from all graveyards. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileGraveyardAllPlayersEffect(), new TapSourceCost()); + ability.addCost(new ExileSourceCost()); + this.addAbility(ability); + } + + public SentinelTotem(final SentinelTotem card) { + super(card); + } + + @Override + public SentinelTotem copy() { + return new SentinelTotem(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SentinelsOfGlenElendra.java b/Mage.Sets/src/mage/cards/s/SentinelsOfGlenElendra.java index 2c6dee117c..dcb58fc84c 100644 --- a/Mage.Sets/src/mage/cards/s/SentinelsOfGlenElendra.java +++ b/Mage.Sets/src/mage/cards/s/SentinelsOfGlenElendra.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SentinelsOfGlenElendra extends CardImpl { public SentinelsOfGlenElendra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SentryOak.java b/Mage.Sets/src/mage/cards/s/SentryOak.java index ebafd16f53..435f501c1c 100644 --- a/Mage.Sets/src/mage/cards/s/SentryOak.java +++ b/Mage.Sets/src/mage/cards/s/SentryOak.java @@ -1,108 +1,109 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.BeginningOfCombatTriggeredAbility; -import mage.abilities.effects.ContinuousEffect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.DoIfClashWonEffect; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.abilities.effects.common.continuous.LoseAbilitySourceEffect; -import mage.abilities.keyword.DefenderAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.game.Game; - -/** - * - * @author Styxo - */ -public class SentryOak extends CardImpl { - - public SentryOak(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); - - this.subtype.add("Treefolk"); - this.subtype.add("Warrior"); - this.power = new MageInt(3); - this.toughness = new MageInt(5); - - // Defender - this.addAbility(DefenderAbility.getInstance()); - - // At the beginning of combat on your turn, you may clash with an opponent. If you win, Sentry Oak gets +2/+0 and loses defender until end of turn. - this.addAbility(new BeginningOfCombatTriggeredAbility(new DoIfClashWonEffect(new SentryOakEffect()), TargetController.YOU, true)); - } - - public SentryOak(final SentryOak card) { - super(card); - } - - @Override - public SentryOak copy() { - return new SentryOak(this); - } -} - -class SentryOakEffect extends OneShotEffect { - - public SentryOakEffect() { - super(Outcome.BoostCreature); - this.staticText = "{this} gets +2/+0 and loses defender until end of turn"; - } - - public SentryOakEffect(final SentryOakEffect effect) { - super(effect); - } - - @Override - public SentryOakEffect copy() { - return new SentryOakEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - if (game.getPermanent(source.getSourceId()) != null) { - ContinuousEffect continuousEffect = new BoostSourceEffect(2, 0, Duration.EndOfTurn); - game.addEffect(continuousEffect, source); - - continuousEffect = new LoseAbilitySourceEffect(DefenderAbility.getInstance(), Duration.EndOfTurn); - game.addEffect(continuousEffect, source); - return true; - - } - return false; - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DoIfClashWonEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.LoseAbilitySourceEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.game.Game; + +/** + * + * @author Styxo + */ +public class SentryOak extends CardImpl { + + public SentryOak(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); + + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(3); + this.toughness = new MageInt(5); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + + // At the beginning of combat on your turn, you may clash with an opponent. If you win, Sentry Oak gets +2/+0 and loses defender until end of turn. + this.addAbility(new BeginningOfCombatTriggeredAbility(new DoIfClashWonEffect(new SentryOakEffect()), TargetController.YOU, true)); + } + + public SentryOak(final SentryOak card) { + super(card); + } + + @Override + public SentryOak copy() { + return new SentryOak(this); + } +} + +class SentryOakEffect extends OneShotEffect { + + public SentryOakEffect() { + super(Outcome.BoostCreature); + this.staticText = "{this} gets +2/+0 and loses defender until end of turn"; + } + + public SentryOakEffect(final SentryOakEffect effect) { + super(effect); + } + + @Override + public SentryOakEffect copy() { + return new SentryOakEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + if (game.getPermanent(source.getSourceId()) != null) { + ContinuousEffect continuousEffect = new BoostSourceEffect(2, 0, Duration.EndOfTurn); + game.addEffect(continuousEffect, source); + + continuousEffect = new LoseAbilitySourceEffect(DefenderAbility.getInstance(), Duration.EndOfTurn); + game.addEffect(continuousEffect, source); + return true; + + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SentryOfTheUnderworld.java b/Mage.Sets/src/mage/cards/s/SentryOfTheUnderworld.java index 2091f2e418..097932d947 100644 --- a/Mage.Sets/src/mage/cards/s/SentryOfTheUnderworld.java +++ b/Mage.Sets/src/mage/cards/s/SentryOfTheUnderworld.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -49,8 +50,8 @@ public class SentryOfTheUnderworld extends CardImpl { public SentryOfTheUnderworld(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{B}"); - this.subtype.add("Griffin"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.GRIFFIN); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SeparatistVoidmage.java b/Mage.Sets/src/mage/cards/s/SeparatistVoidmage.java index 35fdb5a9dc..9f8c823ddd 100644 --- a/Mage.Sets/src/mage/cards/s/SeparatistVoidmage.java +++ b/Mage.Sets/src/mage/cards/s/SeparatistVoidmage.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -45,8 +46,8 @@ public class SeparatistVoidmage extends CardImpl { public SeparatistVoidmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SepticRats.java b/Mage.Sets/src/mage/cards/s/SepticRats.java index 053478e96d..25ae2f200c 100644 --- a/Mage.Sets/src/mage/cards/s/SepticRats.java +++ b/Mage.Sets/src/mage/cards/s/SepticRats.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -51,7 +52,7 @@ public class SepticRats extends CardImpl { public SepticRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SepulchralPrimordial.java b/Mage.Sets/src/mage/cards/s/SepulchralPrimordial.java index a717ab15d1..3a1c2445f7 100644 --- a/Mage.Sets/src/mage/cards/s/SepulchralPrimordial.java +++ b/Mage.Sets/src/mage/cards/s/SepulchralPrimordial.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -57,7 +58,7 @@ public class SepulchralPrimordial extends CardImpl { public SepulchralPrimordial(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SeraphOfDawn.java b/Mage.Sets/src/mage/cards/s/SeraphOfDawn.java index 1977caccd6..2586992a9d 100644 --- a/Mage.Sets/src/mage/cards/s/SeraphOfDawn.java +++ b/Mage.Sets/src/mage/cards/s/SeraphOfDawn.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SeraphOfDawn extends CardImpl { public SeraphOfDawn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SeraphOfTheMasses.java b/Mage.Sets/src/mage/cards/s/SeraphOfTheMasses.java index 4defe630b7..e0d12a9586 100644 --- a/Mage.Sets/src/mage/cards/s/SeraphOfTheMasses.java +++ b/Mage.Sets/src/mage/cards/s/SeraphOfTheMasses.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -51,7 +52,7 @@ public class SeraphOfTheMasses extends CardImpl { public SeraphOfTheMasses(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SeraphOfTheSuns.java b/Mage.Sets/src/mage/cards/s/SeraphOfTheSuns.java index b4b48192af..24d3f01e85 100644 --- a/Mage.Sets/src/mage/cards/s/SeraphOfTheSuns.java +++ b/Mage.Sets/src/mage/cards/s/SeraphOfTheSuns.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class SeraphOfTheSuns extends CardImpl { public SeraphOfTheSuns(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SeraphOfTheSword.java b/Mage.Sets/src/mage/cards/s/SeraphOfTheSword.java index 5cb8148692..127458b457 100644 --- a/Mage.Sets/src/mage/cards/s/SeraphOfTheSword.java +++ b/Mage.Sets/src/mage/cards/s/SeraphOfTheSword.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class SeraphOfTheSword extends CardImpl { public SeraphOfTheSword(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SerendibDjinn.java b/Mage.Sets/src/mage/cards/s/SerendibDjinn.java index 30c62d5c00..71ce1b0166 100644 --- a/Mage.Sets/src/mage/cards/s/SerendibDjinn.java +++ b/Mage.Sets/src/mage/cards/s/SerendibDjinn.java @@ -55,7 +55,7 @@ public class SerendibDjinn extends CardImpl { public SerendibDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SerendibEfreet.java b/Mage.Sets/src/mage/cards/s/SerendibEfreet.java index 555e69f65e..6e5e03d4a8 100644 --- a/Mage.Sets/src/mage/cards/s/SerendibEfreet.java +++ b/Mage.Sets/src/mage/cards/s/SerendibEfreet.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -45,7 +46,7 @@ public class SerendibEfreet extends CardImpl { public SerendibEfreet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Efreet"); + this.subtype.add(SubType.EFREET); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SerendibSorcerer.java b/Mage.Sets/src/mage/cards/s/SerendibSorcerer.java index 2e524b817b..36a2d06044 100644 --- a/Mage.Sets/src/mage/cards/s/SerendibSorcerer.java +++ b/Mage.Sets/src/mage/cards/s/SerendibSorcerer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -56,8 +57,8 @@ public class SerendibSorcerer extends CardImpl { public SerendibSorcerer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SereneMaster.java b/Mage.Sets/src/mage/cards/s/SereneMaster.java index c85b4f180c..1f0703c429 100644 --- a/Mage.Sets/src/mage/cards/s/SereneMaster.java +++ b/Mage.Sets/src/mage/cards/s/SereneMaster.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.filter.common.FilterCreaturePermanent; @@ -56,8 +57,8 @@ public class SereneMaster extends CardImpl { public SereneMaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SereneSteward.java b/Mage.Sets/src/mage/cards/s/SereneSteward.java index 7c5bad2f54..6bd3f419a4 100644 --- a/Mage.Sets/src/mage/cards/s/SereneSteward.java +++ b/Mage.Sets/src/mage/cards/s/SereneSteward.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -48,9 +49,9 @@ public class SereneSteward extends CardImpl { public SereneSteward(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SerpentAssassin.java b/Mage.Sets/src/mage/cards/s/SerpentAssassin.java index cf63d64b5c..7b7db8a71f 100644 --- a/Mage.Sets/src/mage/cards/s/SerpentAssassin.java +++ b/Mage.Sets/src/mage/cards/s/SerpentAssassin.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -55,8 +56,8 @@ public class SerpentAssassin extends CardImpl { public SerpentAssassin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Snake"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SerpentOfTheEndlessSea.java b/Mage.Sets/src/mage/cards/s/SerpentOfTheEndlessSea.java index e642c97f92..12df31d18c 100644 --- a/Mage.Sets/src/mage/cards/s/SerpentOfTheEndlessSea.java +++ b/Mage.Sets/src/mage/cards/s/SerpentOfTheEndlessSea.java @@ -57,7 +57,7 @@ public class SerpentOfTheEndlessSea extends CardImpl { public SerpentOfTheEndlessSea(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SerpentSkin.java b/Mage.Sets/src/mage/cards/s/SerpentSkin.java index b30bcd8d26..e9a23af125 100644 --- a/Mage.Sets/src/mage/cards/s/SerpentSkin.java +++ b/Mage.Sets/src/mage/cards/s/SerpentSkin.java @@ -52,7 +52,7 @@ public class SerpentSkin extends CardImpl { public SerpentSkin (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/s/SerpentWarrior.java b/Mage.Sets/src/mage/cards/s/SerpentWarrior.java index e308992e2d..ef64a52553 100644 --- a/Mage.Sets/src/mage/cards/s/SerpentWarrior.java +++ b/Mage.Sets/src/mage/cards/s/SerpentWarrior.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SerpentWarrior extends CardImpl { public SerpentWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Snake"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SerpentineBasilisk.java b/Mage.Sets/src/mage/cards/s/SerpentineBasilisk.java index d9159d6eb2..9449d78353 100644 --- a/Mage.Sets/src/mage/cards/s/SerpentineBasilisk.java +++ b/Mage.Sets/src/mage/cards/s/SerpentineBasilisk.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,7 +48,7 @@ public class SerpentineBasilisk extends CardImpl { public SerpentineBasilisk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Basilisk"); + this.subtype.add(SubType.BASILISK); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SerpentineKavu.java b/Mage.Sets/src/mage/cards/s/SerpentineKavu.java index 521e22766c..a260dd44c1 100644 --- a/Mage.Sets/src/mage/cards/s/SerpentineKavu.java +++ b/Mage.Sets/src/mage/cards/s/SerpentineKavu.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class SerpentineKavu extends CardImpl { public SerpentineKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SerraAdvocate.java b/Mage.Sets/src/mage/cards/s/SerraAdvocate.java index c6dce478da..e54682c119 100644 --- a/Mage.Sets/src/mage/cards/s/SerraAdvocate.java +++ b/Mage.Sets/src/mage/cards/s/SerraAdvocate.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterAttackingOrBlockingCreature; @@ -50,7 +51,7 @@ public class SerraAdvocate extends CardImpl { public SerraAdvocate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SerraAngel.java b/Mage.Sets/src/mage/cards/s/SerraAngel.java index 5e70d15e21..2fe100552e 100644 --- a/Mage.Sets/src/mage/cards/s/SerraAngel.java +++ b/Mage.Sets/src/mage/cards/s/SerraAngel.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class SerraAngel extends CardImpl { public SerraAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SerraAscendant.java b/Mage.Sets/src/mage/cards/s/SerraAscendant.java index 1cee553fa1..b10b28ee00 100644 --- a/Mage.Sets/src/mage/cards/s/SerraAscendant.java +++ b/Mage.Sets/src/mage/cards/s/SerraAscendant.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -54,8 +55,8 @@ public class SerraAscendant extends CardImpl { public SerraAscendant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SerraAvatar.java b/Mage.Sets/src/mage/cards/s/SerraAvatar.java index c7d308887a..d10aace973 100644 --- a/Mage.Sets/src/mage/cards/s/SerraAvatar.java +++ b/Mage.Sets/src/mage/cards/s/SerraAvatar.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class SerraAvatar extends CardImpl { public SerraAvatar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}{W}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SerraAvenger.java b/Mage.Sets/src/mage/cards/s/SerraAvenger.java index 38e48b32a0..ad4dfdef00 100644 --- a/Mage.Sets/src/mage/cards/s/SerraAvenger.java +++ b/Mage.Sets/src/mage/cards/s/SerraAvenger.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class SerraAvenger extends CardImpl { public SerraAvenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SerraPaladin.java b/Mage.Sets/src/mage/cards/s/SerraPaladin.java new file mode 100644 index 0000000000..c38acc4838 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SerraPaladin.java @@ -0,0 +1,81 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.PreventDamageToTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class SerraPaladin extends CardImpl { + + public SerraPaladin(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn. + Ability ability = new SimpleActivatedAbility(new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + + // {1}{W}{W}, {tap}: Target creature gains vigilance until end of turn. + ability = new SimpleActivatedAbility(new GainAbilityTargetEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{1}{W}{W}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public SerraPaladin(final SerraPaladin card) { + super(card); + } + + @Override + public SerraPaladin copy() { + return new SerraPaladin(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SerraSphinx.java b/Mage.Sets/src/mage/cards/s/SerraSphinx.java index e050a082ff..e2914862f3 100644 --- a/Mage.Sets/src/mage/cards/s/SerraSphinx.java +++ b/Mage.Sets/src/mage/cards/s/SerraSphinx.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SerraSphinx extends CardImpl { public SerraSphinx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SerraZealot.java b/Mage.Sets/src/mage/cards/s/SerraZealot.java index 45e8a39be5..007be89f5e 100644 --- a/Mage.Sets/src/mage/cards/s/SerraZealot.java +++ b/Mage.Sets/src/mage/cards/s/SerraZealot.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class SerraZealot extends CardImpl { public SerraZealot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SerrasBoon.java b/Mage.Sets/src/mage/cards/s/SerrasBoon.java index e3db5a18e0..e8a9554e31 100644 --- a/Mage.Sets/src/mage/cards/s/SerrasBoon.java +++ b/Mage.Sets/src/mage/cards/s/SerrasBoon.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -61,7 +62,7 @@ public class SerrasBoon extends CardImpl { public SerrasBoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SerrasEmbrace.java b/Mage.Sets/src/mage/cards/s/SerrasEmbrace.java index 841157bc77..a2a35bc1d0 100644 --- a/Mage.Sets/src/mage/cards/s/SerrasEmbrace.java +++ b/Mage.Sets/src/mage/cards/s/SerrasEmbrace.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -54,7 +55,7 @@ public class SerrasEmbrace extends CardImpl { public SerrasEmbrace(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SerrasLiturgy.java b/Mage.Sets/src/mage/cards/s/SerrasLiturgy.java new file mode 100644 index 0000000000..a0695c7017 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SerrasLiturgy.java @@ -0,0 +1,91 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetAdjustment; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public class SerrasLiturgy extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("up to X target artifacts and/or enchantments, where X is the number of verse counters on {this}"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.ENCHANTMENT) + )); + } + + public SerrasLiturgy(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); + + // At the beginning of your upkeep, you may put a verse counter on Serra's Liturgy. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, + new AddCountersSourceEffect(CounterType.VERSE.createInstance(), true), TargetController.YOU, true)); + + // {W}, Sacrifice Serra's Liturgy: Destroy up to X target artifacts and/or enchantments, where X is the number of verse counters on Serra's Liturgy. + Effect effect = new DestroyTargetEffect(true); + effect.setText("Destroy up to X target artifacts and/or enchantments, where X is the number of verse counters on {this}."); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{W}")); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetPermanent(0, 0, filter, false)); + ability.setTargetAdjustment(TargetAdjustment.VERSE_COUNTER_TARGETS); + this.addAbility(ability); + } + + public SerrasLiturgy(final SerrasLiturgy card) { + super(card); + } + + @Override + public SerrasLiturgy copy() { + return new SerrasLiturgy(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SerratedBiskelion.java b/Mage.Sets/src/mage/cards/s/SerratedBiskelion.java index 3458d9eb03..8d396e0d8c 100644 --- a/Mage.Sets/src/mage/cards/s/SerratedBiskelion.java +++ b/Mage.Sets/src/mage/cards/s/SerratedBiskelion.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class SerratedBiskelion extends CardImpl { public SerratedBiskelion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SerumRaker.java b/Mage.Sets/src/mage/cards/s/SerumRaker.java index 77ce4c3f31..83f3303a1c 100644 --- a/Mage.Sets/src/mage/cards/s/SerumRaker.java +++ b/Mage.Sets/src/mage/cards/s/SerumRaker.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class SerumRaker extends CardImpl { public SerumRaker (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ServantOfNefarox.java b/Mage.Sets/src/mage/cards/s/ServantOfNefarox.java index b04af6c632..fa2072dbc3 100644 --- a/Mage.Sets/src/mage/cards/s/ServantOfNefarox.java +++ b/Mage.Sets/src/mage/cards/s/ServantOfNefarox.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ExaltedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class ServantOfNefarox extends CardImpl { public ServantOfNefarox(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ServantOfTheConduit.java b/Mage.Sets/src/mage/cards/s/ServantOfTheConduit.java index b0741a23df..67635f5e46 100644 --- a/Mage.Sets/src/mage/cards/s/ServantOfTheConduit.java +++ b/Mage.Sets/src/mage/cards/s/ServantOfTheConduit.java @@ -38,6 +38,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,8 +48,8 @@ public class ServantOfTheConduit extends CardImpl { public ServantOfTheConduit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ServantOfTheScale.java b/Mage.Sets/src/mage/cards/s/ServantOfTheScale.java index 8252b2066b..f8e235f3db 100644 --- a/Mage.Sets/src/mage/cards/s/ServantOfTheScale.java +++ b/Mage.Sets/src/mage/cards/s/ServantOfTheScale.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -54,15 +55,15 @@ import mage.target.common.TargetControlledCreaturePermanent; public class ServantOfTheScale extends CardImpl { public ServantOfTheScale(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(0); this.toughness = new MageInt(0); // Servant of the Scale enters the battlefield with a +1/+1 counter on it. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), - "with a +1/+1 counters on it")); + "with a +1/+1 counter on it")); // When Servant of the Scale dies, put X +1/+1 counters on target creature you control, where X is the number of +1/+1 counter on Servant of the Scale. Ability ability = new DiesTriggeredAbility(new ServantOfTheScaleEffect(), false); @@ -84,7 +85,7 @@ class ServantOfTheScaleEffect extends OneShotEffect { public ServantOfTheScaleEffect() { super(Outcome.BoostCreature); - this.staticText = "put X +1/+1 counters on target creature you control, where X is the number of +1/+1 counter on {this}"; + this.staticText = "put X +1/+1 counters on target creature you control, where X is the number of +1/+1 counters on {this}"; } public ServantOfTheScaleEffect(final ServantOfTheScaleEffect effect) { @@ -100,8 +101,8 @@ class ServantOfTheScaleEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Permanent sourcePermanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); - if (sourcePermanent != null && controller != null && - (sourcePermanent.getZoneChangeCounter(game) == source.getSourceObjectZoneChangeCounter() // Token + if (sourcePermanent != null && controller != null + && (sourcePermanent.getZoneChangeCounter(game) == source.getSourceObjectZoneChangeCounter() // Token || sourcePermanent.getZoneChangeCounter(game) + 1 == source.getSourceObjectZoneChangeCounter())) { // PermanentCard int amount = sourcePermanent.getCounters(game).getCount(CounterType.P1P1); if (amount > 0) { diff --git a/Mage.Sets/src/mage/cards/s/ServantOfTymaret.java b/Mage.Sets/src/mage/cards/s/ServantOfTymaret.java index 5b2d9922a8..4021e71054 100644 --- a/Mage.Sets/src/mage/cards/s/ServantOfTymaret.java +++ b/Mage.Sets/src/mage/cards/s/ServantOfTymaret.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.InspiredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -50,7 +51,7 @@ public class ServantOfTymaret extends CardImpl { public ServantOfTymaret(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ServantOfVolrath.java b/Mage.Sets/src/mage/cards/s/ServantOfVolrath.java index c801a2e160..23ce192a8d 100644 --- a/Mage.Sets/src/mage/cards/s/ServantOfVolrath.java +++ b/Mage.Sets/src/mage/cards/s/ServantOfVolrath.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; /** @@ -44,7 +45,7 @@ public class ServantOfVolrath extends CardImpl { public ServantOfVolrath(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Minion"); + this.subtype.add(SubType.MINION); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SeshiroTheAnointed.java b/Mage.Sets/src/mage/cards/s/SeshiroTheAnointed.java index e29816ff03..d84b5ae201 100644 --- a/Mage.Sets/src/mage/cards/s/SeshiroTheAnointed.java +++ b/Mage.Sets/src/mage/cards/s/SeshiroTheAnointed.java @@ -60,8 +60,8 @@ public class SeshiroTheAnointed extends CardImpl { public SeshiroTheAnointed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Snake"); - this.subtype.add("Monk"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.MONK); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SetessanBattlePriest.java b/Mage.Sets/src/mage/cards/s/SetessanBattlePriest.java index fddc2c64c3..76512682ed 100644 --- a/Mage.Sets/src/mage/cards/s/SetessanBattlePriest.java +++ b/Mage.Sets/src/mage/cards/s/SetessanBattlePriest.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SetessanBattlePriest extends CardImpl { public SetessanBattlePriest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SetessanGriffin.java b/Mage.Sets/src/mage/cards/s/SetessanGriffin.java index 52e4ad3ae0..eed628c7ad 100644 --- a/Mage.Sets/src/mage/cards/s/SetessanGriffin.java +++ b/Mage.Sets/src/mage/cards/s/SetessanGriffin.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class SetessanGriffin extends CardImpl { public SetessanGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SetessanOathsworn.java b/Mage.Sets/src/mage/cards/s/SetessanOathsworn.java index 6099a97f3b..90a40e2800 100644 --- a/Mage.Sets/src/mage/cards/s/SetessanOathsworn.java +++ b/Mage.Sets/src/mage/cards/s/SetessanOathsworn.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -44,8 +45,8 @@ public class SetessanOathsworn extends CardImpl { public SetessanOathsworn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Satyr"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.SATYR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SetessanStarbreaker.java b/Mage.Sets/src/mage/cards/s/SetessanStarbreaker.java index 86a9824e1c..e6467bd735 100644 --- a/Mage.Sets/src/mage/cards/s/SetessanStarbreaker.java +++ b/Mage.Sets/src/mage/cards/s/SetessanStarbreaker.java @@ -54,8 +54,8 @@ public class SetessanStarbreaker extends CardImpl { public SetessanStarbreaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SetessanTactics.java b/Mage.Sets/src/mage/cards/s/SetessanTactics.java index 05a5d4b4c6..cee3c7f116 100644 --- a/Mage.Sets/src/mage/cards/s/SetessanTactics.java +++ b/Mage.Sets/src/mage/cards/s/SetessanTactics.java @@ -58,20 +58,19 @@ public class SetessanTactics extends CardImpl { } public SetessanTactics(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}"); // Strive - Setessan Tactics costs G more to cast for each target beyond the first. this.addAbility(new StriveAbility("{G}")); // Until end of turn, any number of target creatures each get +1/+1 and gain "T: This creature fights another target creature." this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, Integer.MAX_VALUE)); - Effect effect = new BoostTargetEffect(1,1, Duration.EndOfTurn); + Effect effect = new BoostTargetEffect(1, 1, Duration.EndOfTurn); effect.setText("Until end of turn, any number of target creatures each get +1/+1"); this.getSpellAbility().addEffect(effect); Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new FightTargetSourceEffect(), new TapSourceCost()); gainedAbility.addTarget(new TargetCreaturePermanent(filter)); this.getSpellAbility().addEffect(new GainAbilityTargetEffect(gainedAbility, Duration.EndOfTurn, - "and gain \"T: This creature fights another target creature.\"")); + "and gain \"{T}: This creature fights another target creature.\"")); } public SetessanTactics(final SetessanTactics card) { diff --git a/Mage.Sets/src/mage/cards/s/SetonKrosanProtector.java b/Mage.Sets/src/mage/cards/s/SetonKrosanProtector.java index 45cc71ff86..3aa1920441 100644 --- a/Mage.Sets/src/mage/cards/s/SetonKrosanProtector.java +++ b/Mage.Sets/src/mage/cards/s/SetonKrosanProtector.java @@ -60,8 +60,8 @@ public class SetonKrosanProtector extends CardImpl { public SetonKrosanProtector(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Centaur"); - this.subtype.add("Druid"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SetonsDesire.java b/Mage.Sets/src/mage/cards/s/SetonsDesire.java index 7d7b419202..4e79303711 100644 --- a/Mage.Sets/src/mage/cards/s/SetonsDesire.java +++ b/Mage.Sets/src/mage/cards/s/SetonsDesire.java @@ -42,6 +42,7 @@ import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class SetonsDesire extends CardImpl { public SetonsDesire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SetonsScout.java b/Mage.Sets/src/mage/cards/s/SetonsScout.java index 9201591343..d71ace9c9c 100644 --- a/Mage.Sets/src/mage/cards/s/SetonsScout.java +++ b/Mage.Sets/src/mage/cards/s/SetonsScout.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,10 +51,10 @@ public class SetonsScout extends CardImpl { public SetonsScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Druid"); - this.subtype.add("Scout"); - this.subtype.add("Archer"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.DRUID); + this.subtype.add(SubType.SCOUT); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SettleTheWreckage.java b/Mage.Sets/src/mage/cards/s/SettleTheWreckage.java new file mode 100644 index 0000000000..7cc8bd744a --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SettleTheWreckage.java @@ -0,0 +1,114 @@ +/* + * 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.cards.s; + +import java.util.Iterator; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPlayer; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author TheElk801 + */ +public class SettleTheWreckage extends CardImpl { + + public SettleTheWreckage(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}{W}"); + + // Exile all attacking creatures target player controls. That player may search his or her library for that many basic land cards, put those cards onto the battlefield tapped, then shuffle his or her library. + this.getSpellAbility().addEffect(new SettleTheWreckageEffect()); + this.getSpellAbility().addTarget(new TargetPlayer()); + } + + public SettleTheWreckage(final SettleTheWreckage card) { + super(card); + } + + @Override + public SettleTheWreckage copy() { + return new SettleTheWreckage(this); + } +} + +class SettleTheWreckageEffect extends OneShotEffect { + + SettleTheWreckageEffect() { + super(Outcome.Neutral); + this.staticText = "Exile all attacking creatures target player controls. That player may search his or her library for that many basic land cards, put those cards onto the battlefield tapped, then shuffle his or her library"; + } + + SettleTheWreckageEffect(final SettleTheWreckageEffect effect) { + super(effect); + } + + @Override + public SettleTheWreckageEffect copy() { + return new SettleTheWreckageEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getFirstTarget()); + if (player != null) { + int attackers = 0; + Iterator creatureIds = game.getCombat().getAttackers().iterator(); + while (creatureIds.hasNext()) { + Permanent creature = game.getPermanent(creatureIds.next()); + if (creature != null && creature.getControllerId().equals(player.getId())) { + creature.moveToExile(null, null, source.getId(), game); + attackers++; + } + } + TargetCardInLibrary target = new TargetCardInLibrary(0, attackers, StaticFilters.FILTER_BASIC_LAND_CARD); + if (player.chooseUse(Outcome.Benefit, "Search for up to " + attackers + " basic land" + ((attackers == 1) ? "" : "s") + "?", source, game) && player.searchLibrary(target, game)) { + for (UUID cardId : target.getTargets()) { + Card card = player.getLibrary().getCard(cardId, game); + if (card != null) { + card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), player.getId(), true); + } + } + player.shuffleLibrary(source, game); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SeveredLegion.java b/Mage.Sets/src/mage/cards/s/SeveredLegion.java index 376278346d..f43e0e3242 100644 --- a/Mage.Sets/src/mage/cards/s/SeveredLegion.java +++ b/Mage.Sets/src/mage/cards/s/SeveredLegion.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SeveredLegion extends CardImpl { public SeveredLegion (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SewerNemesis.java b/Mage.Sets/src/mage/cards/s/SewerNemesis.java index 1ed5ed6019..3fa77b73a9 100644 --- a/Mage.Sets/src/mage/cards/s/SewerNemesis.java +++ b/Mage.Sets/src/mage/cards/s/SewerNemesis.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class SewerNemesis extends CardImpl { public SewerNemesis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SewerRats.java b/Mage.Sets/src/mage/cards/s/SewerRats.java index 1bda845eed..4b8f9ba420 100644 --- a/Mage.Sets/src/mage/cards/s/SewerRats.java +++ b/Mage.Sets/src/mage/cards/s/SewerRats.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class SewerRats extends CardImpl { public SewerRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SewerShambler.java b/Mage.Sets/src/mage/cards/s/SewerShambler.java index b48182d348..95ab344881 100644 --- a/Mage.Sets/src/mage/cards/s/SewerShambler.java +++ b/Mage.Sets/src/mage/cards/s/SewerShambler.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class SewerShambler extends CardImpl { public SewerShambler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Sewerdreg.java b/Mage.Sets/src/mage/cards/s/Sewerdreg.java index 93c6ca392e..c03253d192 100644 --- a/Mage.Sets/src/mage/cards/s/Sewerdreg.java +++ b/Mage.Sets/src/mage/cards/s/Sewerdreg.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCardInGraveyard; @@ -48,7 +49,7 @@ public class Sewerdreg extends CardImpl { public Sewerdreg(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SewnEyeDrake.java b/Mage.Sets/src/mage/cards/s/SewnEyeDrake.java index 62706266ed..958ced249f 100644 --- a/Mage.Sets/src/mage/cards/s/SewnEyeDrake.java +++ b/Mage.Sets/src/mage/cards/s/SewnEyeDrake.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class SewnEyeDrake extends CardImpl { public SewnEyeDrake (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U/R}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Drake"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.DRAKE); diff --git a/Mage.Sets/src/mage/cards/s/ShaakHerd.java b/Mage.Sets/src/mage/cards/s/ShaakHerd.java index 477ee4e1f8..e8305abf47 100644 --- a/Mage.Sets/src/mage/cards/s/ShaakHerd.java +++ b/Mage.Sets/src/mage/cards/s/ShaakHerd.java @@ -1,74 +1,75 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.DiesTriggeredAbility; -import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.FilterCard; -import mage.filter.predicate.mageobject.AnotherCardPredicate; -import mage.target.common.TargetCardInYourGraveyard; - -/** - * - * @author Styxo - */ -public class ShaakHerd extends CardImpl { - - private final static FilterCard filter = new FilterCard("another target creature card"); - - static { - filter.add(new AnotherCardPredicate()); - } - - public ShaakHerd(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Beast"); - this.power = new MageInt(1); - this.toughness = new MageInt(2); - - // When Shaak Herd dies, you may return another target creature card from your graveyard to your hand. - Ability ability = new DiesTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), true); - ability.addTarget(new TargetCardInYourGraveyard(filter)); - this.addAbility(ability); - } - - public ShaakHerd(final ShaakHerd card) { - super(card); - } - - @Override - public ShaakHerd copy() { - return new ShaakHerd(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.AnotherCardPredicate; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author Styxo + */ +public class ShaakHerd extends CardImpl { + + private final static FilterCard filter = new FilterCard("another target creature card"); + + static { + filter.add(new AnotherCardPredicate()); + } + + public ShaakHerd(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.subtype.add(SubType.BEAST); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // When Shaak Herd dies, you may return another target creature card from your graveyard to your hand. + Ability ability = new DiesTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), true); + ability.addTarget(new TargetCardInYourGraveyard(filter)); + this.addAbility(ability); + } + + public ShaakHerd(final ShaakHerd card) { + super(card); + } + + @Override + public ShaakHerd copy() { + return new ShaakHerd(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/Shackles.java b/Mage.Sets/src/mage/cards/s/Shackles.java index c0b4cdcc1a..da091d4652 100644 --- a/Mage.Sets/src/mage/cards/s/Shackles.java +++ b/Mage.Sets/src/mage/cards/s/Shackles.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -52,7 +53,7 @@ public class Shackles extends CardImpl { public Shackles(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/ShadeOfTrokair.java b/Mage.Sets/src/mage/cards/s/ShadeOfTrokair.java index 0494a981fc..8479bc7e0a 100644 --- a/Mage.Sets/src/mage/cards/s/ShadeOfTrokair.java +++ b/Mage.Sets/src/mage/cards/s/ShadeOfTrokair.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class ShadeOfTrokair extends CardImpl { public ShadeOfTrokair(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Shade"); + this.subtype.add(SubType.SHADE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShadesForm.java b/Mage.Sets/src/mage/cards/s/ShadesForm.java index 0b36ba1ca6..5cda2c4ec3 100644 --- a/Mage.Sets/src/mage/cards/s/ShadesForm.java +++ b/Mage.Sets/src/mage/cards/s/ShadesForm.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Outcome; @@ -54,7 +55,7 @@ public class ShadesForm extends CardImpl { public ShadesForm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/cards/s/ShadowAlleyDenizen.java b/Mage.Sets/src/mage/cards/s/ShadowAlleyDenizen.java index a07ef6f6bc..ae3e4ea8a1 100644 --- a/Mage.Sets/src/mage/cards/s/ShadowAlleyDenizen.java +++ b/Mage.Sets/src/mage/cards/s/ShadowAlleyDenizen.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.IntimidateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -59,8 +60,8 @@ public class ShadowAlleyDenizen extends CardImpl { public ShadowAlleyDenizen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShadowGlider.java b/Mage.Sets/src/mage/cards/s/ShadowGlider.java index 6a4aa9265e..b8885c617b 100644 --- a/Mage.Sets/src/mage/cards/s/ShadowGlider.java +++ b/Mage.Sets/src/mage/cards/s/ShadowGlider.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class ShadowGlider extends CardImpl { public ShadowGlider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShadowGuildmage.java b/Mage.Sets/src/mage/cards/s/ShadowGuildmage.java index ebfe075767..b8cced5210 100644 --- a/Mage.Sets/src/mage/cards/s/ShadowGuildmage.java +++ b/Mage.Sets/src/mage/cards/s/ShadowGuildmage.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.PutOnLibraryTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetCreatureOrPlayer; @@ -51,8 +52,8 @@ public class ShadowGuildmage extends CardImpl { public ShadowGuildmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShadowLance.java b/Mage.Sets/src/mage/cards/s/ShadowLance.java index 2c509f84d6..19df12e5cb 100644 --- a/Mage.Sets/src/mage/cards/s/ShadowLance.java +++ b/Mage.Sets/src/mage/cards/s/ShadowLance.java @@ -51,7 +51,7 @@ public class ShadowLance extends CardImpl { public ShadowLance(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/ShadowOfTheGrave.java b/Mage.Sets/src/mage/cards/s/ShadowOfTheGrave.java index 24ad465131..a432c03d68 100644 --- a/Mage.Sets/src/mage/cards/s/ShadowOfTheGrave.java +++ b/Mage.Sets/src/mage/cards/s/ShadowOfTheGrave.java @@ -1,100 +1,100 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.Game; -import mage.players.Player; -import mage.watchers.common.CardsCycledOrDiscardedThisTurnWatcher; - -/** - * - * @author jeffwadsworth - */ -public class ShadowOfTheGrave extends CardImpl { - - public ShadowOfTheGrave(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}"); - - // Return to your hand all cards in your graveyard that you cycled or discarded this turn. - this.getSpellAbility().addEffect(new ShadowOfTheGraveEffect()); - this.getSpellAbility().addWatcher(new CardsCycledOrDiscardedThisTurnWatcher()); - - } - - public ShadowOfTheGrave(final ShadowOfTheGrave card) { - super(card); - } - - @Override - public ShadowOfTheGrave copy() { - return new ShadowOfTheGrave(this); - } -} - -class ShadowOfTheGraveEffect extends OneShotEffect { - - public ShadowOfTheGraveEffect() { - super(Outcome.Benefit); - staticText = "Return to your hand all cards in your graveyard that you cycled or discarded this turn"; - } - - public ShadowOfTheGraveEffect(final ShadowOfTheGraveEffect effect) { - super(effect); - } - - @Override - public ShadowOfTheGraveEffect copy() { - return new ShadowOfTheGraveEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - CardsCycledOrDiscardedThisTurnWatcher watcher = (CardsCycledOrDiscardedThisTurnWatcher) game.getState().getWatchers().get(CardsCycledOrDiscardedThisTurnWatcher.class.getSimpleName()); - if (controller != null - && watcher != null) { - for (Card card : watcher.getCardsCycledOrDiscardedThisTurn(controller.getId()).getCards(game)) { - if (game.getState().getZone(card.getId()) == Zone.GRAVEYARD //must come from their graveyard - && card.getOwnerId().equals(controller.getId())) { //confirm ownership, but it should not be possible to get not ownwd cards here - controller.moveCardToHandWithInfo(card, source.getId(), game, true); - } - } - return true; - } - return false; - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; +import mage.watchers.common.CardsCycledOrDiscardedThisTurnWatcher; + +/** + * + * @author jeffwadsworth + */ +public class ShadowOfTheGrave extends CardImpl { + + public ShadowOfTheGrave(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}"); + + // Return to your hand all cards in your graveyard that you cycled or discarded this turn. + this.getSpellAbility().addEffect(new ShadowOfTheGraveEffect()); + this.getSpellAbility().addWatcher(new CardsCycledOrDiscardedThisTurnWatcher()); + + } + + public ShadowOfTheGrave(final ShadowOfTheGrave card) { + super(card); + } + + @Override + public ShadowOfTheGrave copy() { + return new ShadowOfTheGrave(this); + } +} + +class ShadowOfTheGraveEffect extends OneShotEffect { + + public ShadowOfTheGraveEffect() { + super(Outcome.Benefit); + staticText = "Return to your hand all cards in your graveyard that you cycled or discarded this turn"; + } + + public ShadowOfTheGraveEffect(final ShadowOfTheGraveEffect effect) { + super(effect); + } + + @Override + public ShadowOfTheGraveEffect copy() { + return new ShadowOfTheGraveEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + CardsCycledOrDiscardedThisTurnWatcher watcher = (CardsCycledOrDiscardedThisTurnWatcher) game.getState().getWatchers().get(CardsCycledOrDiscardedThisTurnWatcher.class.getSimpleName()); + if (controller != null + && watcher != null) { + for (Card card : watcher.getCardsCycledOrDiscardedThisTurn(controller.getId()).getCards(game)) { + if (game.getState().getZone(card.getId()) == Zone.GRAVEYARD //must come from their graveyard + && card.getOwnerId().equals(controller.getId())) { //confirm ownership, but it should not be possible to get not ownwd cards here + controller.moveCardToHandWithInfo(card, source.getId(), game, true); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/ShadowRider.java b/Mage.Sets/src/mage/cards/s/ShadowRider.java index b4da41fe6d..fa0275c877 100644 --- a/Mage.Sets/src/mage/cards/s/ShadowRider.java +++ b/Mage.Sets/src/mage/cards/s/ShadowRider.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlankingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class ShadowRider extends CardImpl { public ShadowRider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Knight"); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShadowSliver.java b/Mage.Sets/src/mage/cards/s/ShadowSliver.java index 17595d1ec9..d6ca43e20d 100644 --- a/Mage.Sets/src/mage/cards/s/ShadowSliver.java +++ b/Mage.Sets/src/mage/cards/s/ShadowSliver.java @@ -55,7 +55,7 @@ public class ShadowSliver extends CardImpl { public ShadowSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShadowTrooper.java b/Mage.Sets/src/mage/cards/s/ShadowTrooper.java index 3118ce9f75..4110d66fdb 100644 --- a/Mage.Sets/src/mage/cards/s/ShadowTrooper.java +++ b/Mage.Sets/src/mage/cards/s/ShadowTrooper.java @@ -1,79 +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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashAllEffect; -import mage.abilities.keyword.FlashAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterCreatureCard; -import mage.filter.predicate.mageobject.SubtypePredicate; - -/** - * - * @author Styxo - */ -public class ShadowTrooper extends CardImpl { - - private static final FilterCreatureCard filter = new FilterCreatureCard("Trooper creatures"); - - static { - filter.add(new SubtypePredicate(SubType.TROOPER)); - } - - public ShadowTrooper(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Trooper"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // Flash - this.addAbility(FlashAbility.getInstance()); - - // You may cast Trooper creature cards as though they had flash. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CastAsThoughItHadFlashAllEffect(Duration.WhileOnBattlefield, filter))); - - } - - public ShadowTrooper(final ShadowTrooper card) { - super(card); - } - - @Override - public ShadowTrooper copy() { - return new ShadowTrooper(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashAllEffect; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author Styxo + */ +public class ShadowTrooper extends CardImpl { + + private static final FilterCreatureCard filter = new FilterCreatureCard("Trooper creatures"); + + static { + filter.add(new SubtypePredicate(SubType.TROOPER)); + } + + public ShadowTrooper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.TROOPER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // You may cast Trooper creature cards as though they had flash. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CastAsThoughItHadFlashAllEffect(Duration.WhileOnBattlefield, filter))); + + } + + public ShadowTrooper(final ShadowTrooper card) { + super(card); + } + + @Override + public ShadowTrooper copy() { + return new ShadowTrooper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ShadowbornApostle.java b/Mage.Sets/src/mage/cards/s/ShadowbornApostle.java index 6ea2f10540..1de811d6a7 100644 --- a/Mage.Sets/src/mage/cards/s/ShadowbornApostle.java +++ b/Mage.Sets/src/mage/cards/s/ShadowbornApostle.java @@ -63,8 +63,8 @@ public class ShadowbornApostle extends CardImpl { public ShadowbornApostle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShadowbornDemon.java b/Mage.Sets/src/mage/cards/s/ShadowbornDemon.java index a5d83a25d4..840951721f 100644 --- a/Mage.Sets/src/mage/cards/s/ShadowbornDemon.java +++ b/Mage.Sets/src/mage/cards/s/ShadowbornDemon.java @@ -67,7 +67,7 @@ public class ShadowbornDemon extends CardImpl { public ShadowbornDemon(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/ShadowcloakVampire.java b/Mage.Sets/src/mage/cards/s/ShadowcloakVampire.java index 45d180a71c..e0c3222c01 100644 --- a/Mage.Sets/src/mage/cards/s/ShadowcloakVampire.java +++ b/Mage.Sets/src/mage/cards/s/ShadowcloakVampire.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class ShadowcloakVampire extends CardImpl { public ShadowcloakVampire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShadowedCaravel.java b/Mage.Sets/src/mage/cards/s/ShadowedCaravel.java new file mode 100644 index 0000000000..ab340946d0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShadowedCaravel.java @@ -0,0 +1,74 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreatureExploresTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.CrewAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; + +/** + * + * @author TheElk801 + */ +public class ShadowedCaravel extends CardImpl { + + public ShadowedCaravel(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + this.subtype.add(SubType.VEHICLE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever a creature you control explores, put a +1/+1 counter on Shadowed Caravel. + Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance()); + Ability ability = new CreatureExploresTriggeredAbility(effect); + this.addAbility(ability); + + // Crew 2 + this.addAbility(new CrewAbility(2)); + + } + + public ShadowedCaravel(final ShadowedCaravel card) { + super(card); + } + + @Override + public ShadowedCaravel copy() { + return new ShadowedCaravel(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ShadowmageInfiltrator.java b/Mage.Sets/src/mage/cards/s/ShadowmageInfiltrator.java index e339a39362..1850ec89c6 100644 --- a/Mage.Sets/src/mage/cards/s/ShadowmageInfiltrator.java +++ b/Mage.Sets/src/mage/cards/s/ShadowmageInfiltrator.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class ShadowmageInfiltrator extends CardImpl { public ShadowmageInfiltrator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShadowstormVizier.java b/Mage.Sets/src/mage/cards/s/ShadowstormVizier.java index 2d295a7993..aa79e55547 100644 --- a/Mage.Sets/src/mage/cards/s/ShadowstormVizier.java +++ b/Mage.Sets/src/mage/cards/s/ShadowstormVizier.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,8 +47,8 @@ public class ShadowstormVizier extends CardImpl { public ShadowstormVizier(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShaleskinBruiser.java b/Mage.Sets/src/mage/cards/s/ShaleskinBruiser.java index 79637f18ff..232051dedf 100644 --- a/Mage.Sets/src/mage/cards/s/ShaleskinBruiser.java +++ b/Mage.Sets/src/mage/cards/s/ShaleskinBruiser.java @@ -59,7 +59,7 @@ public class ShaleskinBruiser extends CardImpl { public ShaleskinBruiser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ShaleskinPlower.java b/Mage.Sets/src/mage/cards/s/ShaleskinPlower.java index 61a2875abf..6eeb447650 100644 --- a/Mage.Sets/src/mage/cards/s/ShaleskinPlower.java +++ b/Mage.Sets/src/mage/cards/s/ShaleskinPlower.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetLandPermanent; /** @@ -47,7 +48,7 @@ public class ShaleskinPlower extends CardImpl { public ShaleskinPlower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShamanEnKor.java b/Mage.Sets/src/mage/cards/s/ShamanEnKor.java index 568c2ce7ca..780c4b58da 100644 --- a/Mage.Sets/src/mage/cards/s/ShamanEnKor.java +++ b/Mage.Sets/src/mage/cards/s/ShamanEnKor.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.RedirectDamageFromSourceToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -59,9 +60,9 @@ public class ShamanEnKor extends CardImpl { public ShamanEnKor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Cleric"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShamanOfForgottenWays.java b/Mage.Sets/src/mage/cards/s/ShamanOfForgottenWays.java index a0a1839202..e9e6c2d963 100644 --- a/Mage.Sets/src/mage/cards/s/ShamanOfForgottenWays.java +++ b/Mage.Sets/src/mage/cards/s/ShamanOfForgottenWays.java @@ -45,6 +45,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -61,8 +62,8 @@ public class ShamanOfForgottenWays extends CardImpl { public ShamanOfForgottenWays(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt( 2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShamanOfSpring.java b/Mage.Sets/src/mage/cards/s/ShamanOfSpring.java index b3a12ae6dd..b195b9ba2f 100644 --- a/Mage.Sets/src/mage/cards/s/ShamanOfSpring.java +++ b/Mage.Sets/src/mage/cards/s/ShamanOfSpring.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ShamanOfSpring extends CardImpl { public ShamanOfSpring(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShamanOfTheGreatHunt.java b/Mage.Sets/src/mage/cards/s/ShamanOfTheGreatHunt.java index eb056b60da..efe482f5af 100644 --- a/Mage.Sets/src/mage/cards/s/ShamanOfTheGreatHunt.java +++ b/Mage.Sets/src/mage/cards/s/ShamanOfTheGreatHunt.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.SetTargetPointer; import mage.constants.Zone; @@ -64,8 +65,8 @@ public class ShamanOfTheGreatHunt extends CardImpl { public ShamanOfTheGreatHunt(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Orc"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShamanOfThePack.java b/Mage.Sets/src/mage/cards/s/ShamanOfThePack.java index a4d850a2d5..30c21d328a 100644 --- a/Mage.Sets/src/mage/cards/s/ShamanOfThePack.java +++ b/Mage.Sets/src/mage/cards/s/ShamanOfThePack.java @@ -59,8 +59,8 @@ public class ShamanOfThePack extends CardImpl { public ShamanOfThePack(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Shambleshark.java b/Mage.Sets/src/mage/cards/s/Shambleshark.java index 395377c37e..3224306a9b 100644 --- a/Mage.Sets/src/mage/cards/s/Shambleshark.java +++ b/Mage.Sets/src/mage/cards/s/Shambleshark.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class Shambleshark extends CardImpl { public Shambleshark(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{U}"); - this.subtype.add("Fish"); - this.subtype.add("Crab"); + this.subtype.add(SubType.FISH); + this.subtype.add(SubType.CRAB); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShamblingAttendants.java b/Mage.Sets/src/mage/cards/s/ShamblingAttendants.java index ff3e872643..fc52262575 100644 --- a/Mage.Sets/src/mage/cards/s/ShamblingAttendants.java +++ b/Mage.Sets/src/mage/cards/s/ShamblingAttendants.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.DelveAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class ShamblingAttendants extends CardImpl { public ShamblingAttendants(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{7}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/ShamblingGhoul.java b/Mage.Sets/src/mage/cards/s/ShamblingGhoul.java index 405ddc93d4..455cc0a323 100644 --- a/Mage.Sets/src/mage/cards/s/ShamblingGhoul.java +++ b/Mage.Sets/src/mage/cards/s/ShamblingGhoul.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.TapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class ShamblingGhoul extends CardImpl { public ShamblingGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShamblingGoblin.java b/Mage.Sets/src/mage/cards/s/ShamblingGoblin.java index 545f03f977..f323292460 100644 --- a/Mage.Sets/src/mage/cards/s/ShamblingGoblin.java +++ b/Mage.Sets/src/mage/cards/s/ShamblingGoblin.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -55,8 +56,8 @@ public class ShamblingGoblin extends CardImpl { public ShamblingGoblin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShamblingRemains.java b/Mage.Sets/src/mage/cards/s/ShamblingRemains.java index f160955e87..63ba8e9895 100644 --- a/Mage.Sets/src/mage/cards/s/ShamblingRemains.java +++ b/Mage.Sets/src/mage/cards/s/ShamblingRemains.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class ShamblingRemains extends CardImpl { public ShamblingRemains(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}"); - this.subtype.add("Zombie"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShamblingShell.java b/Mage.Sets/src/mage/cards/s/ShamblingShell.java index b8d2e30d94..6f677fa0c8 100644 --- a/Mage.Sets/src/mage/cards/s/ShamblingShell.java +++ b/Mage.Sets/src/mage/cards/s/ShamblingShell.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DredgeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class ShamblingShell extends CardImpl { public ShamblingShell(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShamblingStrider.java b/Mage.Sets/src/mage/cards/s/ShamblingStrider.java index ec46a9c48d..15a35a901d 100644 --- a/Mage.Sets/src/mage/cards/s/ShamblingStrider.java +++ b/Mage.Sets/src/mage/cards/s/ShamblingStrider.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class ShamblingStrider extends CardImpl { public ShamblingStrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Yeti"); + this.subtype.add(SubType.YETI); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/ShamblingSwarm.java b/Mage.Sets/src/mage/cards/s/ShamblingSwarm.java index b62c95703e..fb86d21538 100644 --- a/Mage.Sets/src/mage/cards/s/ShamblingSwarm.java +++ b/Mage.Sets/src/mage/cards/s/ShamblingSwarm.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.DistributeCountersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanentAmount; @@ -46,7 +47,7 @@ public class ShamblingSwarm extends CardImpl { public ShamblingSwarm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShamblingVent.java b/Mage.Sets/src/mage/cards/s/ShamblingVent.java index 2d8191403d..6002b57ba5 100644 --- a/Mage.Sets/src/mage/cards/s/ShamblingVent.java +++ b/Mage.Sets/src/mage/cards/s/ShamblingVent.java @@ -39,6 +39,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -79,7 +80,7 @@ class ShamblingVentToken extends Token { public ShamblingVentToken() { super("", "2/3 white and black Elemental creature with lifelink"); cardType.add(CardType.CREATURE); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); color.setWhite(true); color.setBlack(true); power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShanodinDryads.java b/Mage.Sets/src/mage/cards/s/ShanodinDryads.java index 4f9b06a71e..05d216b68b 100644 --- a/Mage.Sets/src/mage/cards/s/ShanodinDryads.java +++ b/Mage.Sets/src/mage/cards/s/ShanodinDryads.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class ShanodinDryads extends CardImpl { public ShanodinDryads(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Nymph"); - this.subtype.add("Dryad"); + this.subtype.add(SubType.NYMPH); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShapeStealer.java b/Mage.Sets/src/mage/cards/s/ShapeStealer.java index 9be0484223..4e719fb2dd 100644 --- a/Mage.Sets/src/mage/cards/s/ShapeStealer.java +++ b/Mage.Sets/src/mage/cards/s/ShapeStealer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SubLayer; @@ -52,8 +53,8 @@ public class ShapeStealer extends CardImpl { public ShapeStealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{U}"); - this.subtype.add("Shapeshifter"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SHAPESHIFTER); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShaperApprentice.java b/Mage.Sets/src/mage/cards/s/ShaperApprentice.java new file mode 100644 index 0000000000..874f84b0a0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShaperApprentice.java @@ -0,0 +1,82 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author TheElk801 + */ +public class ShaperApprentice extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("another Merfolk"); + + static { + filter.add(new SubtypePredicate(SubType.MERFOLK)); + filter.add(new AnotherPredicate()); + } + + public ShaperApprentice(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Shaper Apprentice has flying as long as you control another Merfolk. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield), + new PermanentsOnTheBattlefieldCondition(filter), "{this} has flying as long as you control another Merfolk"))); + } + + public ShaperApprentice(final ShaperApprentice card) { + super(card); + } + + @Override + public ShaperApprentice copy() { + return new ShaperApprentice(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ShaperGuildmage.java b/Mage.Sets/src/mage/cards/s/ShaperGuildmage.java index e6e5f9808a..ddcef400f2 100644 --- a/Mage.Sets/src/mage/cards/s/ShaperGuildmage.java +++ b/Mage.Sets/src/mage/cards/s/ShaperGuildmage.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -51,8 +52,8 @@ public class ShaperGuildmage extends CardImpl { public ShaperGuildmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShaperParasite.java b/Mage.Sets/src/mage/cards/s/ShaperParasite.java index ddeed89020..a6257de611 100644 --- a/Mage.Sets/src/mage/cards/s/ShaperParasite.java +++ b/Mage.Sets/src/mage/cards/s/ShaperParasite.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -54,7 +55,7 @@ public class ShaperParasite extends CardImpl { public ShaperParasite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShapersOfNature.java b/Mage.Sets/src/mage/cards/s/ShapersOfNature.java new file mode 100644 index 0000000000..bee68db9ee --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShapersOfNature.java @@ -0,0 +1,80 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCounterCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class ShapersOfNature extends CardImpl { + + public ShapersOfNature(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{U}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SHAMAN); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {3}{G}: Put a +1/+1 counter on target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance(1)), new ManaCostsImpl("{3}{G}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // {2}{U}, Remove a +1/+1 counter from a creature you control: Draw a card. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{2}{U}")); + ability.addCost(new RemoveCounterCost(new TargetControlledCreaturePermanent(), CounterType.P1P1)); + this.addAbility(ability); + } + + public ShapersOfNature(final ShapersOfNature card) { + super(card); + } + + @Override + public ShapersOfNature copy() { + return new ShapersOfNature(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ShapersSanctuary.java b/Mage.Sets/src/mage/cards/s/ShapersSanctuary.java new file mode 100644 index 0000000000..9cc3bf788e --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShapersSanctuary.java @@ -0,0 +1,103 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class ShapersSanctuary extends CardImpl { + + public ShapersSanctuary(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + + // Whenever a creature you control becomes the target of a spell or ability an opponent controls, you may draw a card. + this.addAbility(new CreaturesYouControlTargetedTriggeredAbility(new DrawCardSourceControllerEffect(1))); + } + + public ShapersSanctuary(final ShapersSanctuary card) { + super(card); + } + + @Override + public ShapersSanctuary copy() { + return new ShapersSanctuary(this); + } +} + +class CreaturesYouControlTargetedTriggeredAbility extends TriggeredAbilityImpl { + + public CreaturesYouControlTargetedTriggeredAbility(Effect effect) { + super(Zone.BATTLEFIELD, effect, true); + } + + public CreaturesYouControlTargetedTriggeredAbility(final CreaturesYouControlTargetedTriggeredAbility ability) { + super(ability); + } + + @Override + public CreaturesYouControlTargetedTriggeredAbility copy() { + return new CreaturesYouControlTargetedTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.TARGETED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId()); + Player targetter = game.getPlayer(event.getPlayerId()); + if (permanent != null && permanent.getControllerId().equals(this.getControllerId()) && permanent.isCreature()) { + Object object = game.getObject(event.getSourceId()); + if (object != null && targetter != null && targetter.hasOpponent(this.getControllerId(), game)) { + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a creature you control becomes the target of a spell or ability an opponent controls, you may draw a card."; + } +} diff --git a/Mage.Sets/src/mage/cards/s/Shapesharer.java b/Mage.Sets/src/mage/cards/s/Shapesharer.java index 7e67415fec..d54d7d77b5 100644 --- a/Mage.Sets/src/mage/cards/s/Shapesharer.java +++ b/Mage.Sets/src/mage/cards/s/Shapesharer.java @@ -58,7 +58,7 @@ public class Shapesharer extends CardImpl { public Shapesharer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Shapeshifter.java b/Mage.Sets/src/mage/cards/s/Shapeshifter.java index b935c9dae8..ef6d8049e1 100644 --- a/Mage.Sets/src/mage/cards/s/Shapeshifter.java +++ b/Mage.Sets/src/mage/cards/s/Shapeshifter.java @@ -58,7 +58,7 @@ public class Shapeshifter extends CardImpl { public Shapeshifter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/s/ShardOfBrokenGlass.java b/Mage.Sets/src/mage/cards/s/ShardOfBrokenGlass.java index c56c0f6b0a..c69a6f13cf 100644 --- a/Mage.Sets/src/mage/cards/s/ShardOfBrokenGlass.java +++ b/Mage.Sets/src/mage/cards/s/ShardOfBrokenGlass.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class ShardOfBrokenGlass extends CardImpl { public ShardOfBrokenGlass(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 0))); diff --git a/Mage.Sets/src/mage/cards/s/ShardPhoenix.java b/Mage.Sets/src/mage/cards/s/ShardPhoenix.java index 423ad12f10..9ce88ff2c4 100644 --- a/Mage.Sets/src/mage/cards/s/ShardPhoenix.java +++ b/Mage.Sets/src/mage/cards/s/ShardPhoenix.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.PhaseStep; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -60,7 +61,7 @@ public class ShardPhoenix extends CardImpl { public ShardPhoenix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Phoenix"); + this.subtype.add(SubType.PHOENIX); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShardingSphinx.java b/Mage.Sets/src/mage/cards/s/ShardingSphinx.java index 5b3388f8c1..37a898ab86 100644 --- a/Mage.Sets/src/mage/cards/s/ShardingSphinx.java +++ b/Mage.Sets/src/mage/cards/s/ShardingSphinx.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SetTargetPointer; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -54,7 +55,7 @@ public class ShardingSphinx extends CardImpl { public ShardingSphinx(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ShardlessAgent.java b/Mage.Sets/src/mage/cards/s/ShardlessAgent.java index 08574594ab..af72ee8651 100644 --- a/Mage.Sets/src/mage/cards/s/ShardlessAgent.java +++ b/Mage.Sets/src/mage/cards/s/ShardlessAgent.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.CascadeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class ShardlessAgent extends CardImpl { public ShardlessAgent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}{G}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SharpenedPitchfork.java b/Mage.Sets/src/mage/cards/s/SharpenedPitchfork.java index 2fd565be29..1c288e96be 100644 --- a/Mage.Sets/src/mage/cards/s/SharpenedPitchfork.java +++ b/Mage.Sets/src/mage/cards/s/SharpenedPitchfork.java @@ -50,7 +50,7 @@ public class SharpenedPitchfork extends CardImpl { public SharpenedPitchfork(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equip {1} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1))); diff --git a/Mage.Sets/src/mage/cards/s/SharuumTheHegemon.java b/Mage.Sets/src/mage/cards/s/SharuumTheHegemon.java index 757aca39ea..b523b85cee 100644 --- a/Mage.Sets/src/mage/cards/s/SharuumTheHegemon.java +++ b/Mage.Sets/src/mage/cards/s/SharuumTheHegemon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.common.FilterArtifactCard; import mage.target.common.TargetCardInYourGraveyard; @@ -49,7 +50,7 @@ public class SharuumTheHegemon extends CardImpl { public SharuumTheHegemon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{W}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/ShatteredAngel.java b/Mage.Sets/src/mage/cards/s/ShatteredAngel.java index 59669e3005..a3d8f09ec0 100644 --- a/Mage.Sets/src/mage/cards/s/ShatteredAngel.java +++ b/Mage.Sets/src/mage/cards/s/ShatteredAngel.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -55,7 +56,7 @@ public class ShatteredAngel extends CardImpl { public ShatteredAngel (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShatteredCrypt.java b/Mage.Sets/src/mage/cards/s/ShatteredCrypt.java new file mode 100644 index 0000000000..cc8b263651 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShatteredCrypt.java @@ -0,0 +1,80 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterCreatureCard; +import mage.game.Game; +import mage.target.Target; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author TheElk801 + */ +public class ShatteredCrypt extends CardImpl { + + public ShatteredCrypt(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{B}{B}"); + + // Return X target creature cards from your graveyard to your hand. You lose X life. + Effect effect = new ReturnFromGraveyardToHandTargetEffect(); + effect.setText("Return X target creature cards from your graveyard to your hand"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(new ManacostVariableValue())); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(1, new FilterCreatureCard())); + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability instanceof SpellAbility) { + ability.getTargets().clear(); + int xValue = ability.getManaCostsToPay().getX(); + Target target = new TargetCardInYourGraveyard(xValue, new FilterCreatureCard(new StringBuilder(xValue).append(xValue != 1 ? " creature cards" : "creature card").append(" from your graveyard").toString())); + ability.addTarget(target); + } + } + + public ShatteredCrypt(final ShatteredCrypt card) { + super(card); + } + + @Override + public ShatteredCrypt copy() { + return new ShatteredCrypt(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ShattergangBrothers.java b/Mage.Sets/src/mage/cards/s/ShattergangBrothers.java index 307fc4cdf0..7e87dd1667 100644 --- a/Mage.Sets/src/mage/cards/s/ShattergangBrothers.java +++ b/Mage.Sets/src/mage/cards/s/ShattergangBrothers.java @@ -38,6 +38,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class ShattergangBrothers extends CardImpl { public ShattergangBrothers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Goblin"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShatterskullGiant.java b/Mage.Sets/src/mage/cards/s/ShatterskullGiant.java index 5fc824595f..5620e2a422 100644 --- a/Mage.Sets/src/mage/cards/s/ShatterskullGiant.java +++ b/Mage.Sets/src/mage/cards/s/ShatterskullGiant.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class ShatterskullGiant extends CardImpl { public ShatterskullGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShatterskullRecruit.java b/Mage.Sets/src/mage/cards/s/ShatterskullRecruit.java index 146b654fdd..692c50fdc3 100644 --- a/Mage.Sets/src/mage/cards/s/ShatterskullRecruit.java +++ b/Mage.Sets/src/mage/cards/s/ShatterskullRecruit.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,9 +43,9 @@ public class ShatterskullRecruit extends CardImpl { public ShatterskullRecruit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); - this.subtype.add("Ally"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ShaukuEndbringer.java b/Mage.Sets/src/mage/cards/s/ShaukuEndbringer.java index ae59ad4afc..df6cdc6ea2 100644 --- a/Mage.Sets/src/mage/cards/s/ShaukuEndbringer.java +++ b/Mage.Sets/src/mage/cards/s/ShaukuEndbringer.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.TargetController; @@ -64,7 +65,7 @@ public class ShaukuEndbringer extends CardImpl{ public ShaukuEndbringer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/ShaukusMinion.java b/Mage.Sets/src/mage/cards/s/ShaukusMinion.java new file mode 100644 index 0000000000..cb1f7474cb --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShaukusMinion.java @@ -0,0 +1,82 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class ShaukusMinion extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("white creature"); + + static { + filter.add(new ColorPredicate(ObjectColor.WHITE)); + } + + public ShaukusMinion(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MINION); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {B}{R}, {tap}: Shauku's Minion deals 2 damage to target white creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{B}{R}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public ShaukusMinion(final ShaukusMinion card) { + super(card); + } + + @Override + public ShaukusMinion copy() { + return new ShaukusMinion(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ShefetDunes.java b/Mage.Sets/src/mage/cards/s/ShefetDunes.java index 7e97900ad8..e72434348c 100644 --- a/Mage.Sets/src/mage/cards/s/ShefetDunes.java +++ b/Mage.Sets/src/mage/cards/s/ShefetDunes.java @@ -62,7 +62,7 @@ public class ShefetDunes extends CardImpl { public ShefetDunes(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Desert"); + this.subtype.add(SubType.DESERT); // {T}: Add {C} to your mana pool. this.addAbility(new ColorlessManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/ShefetMonitor.java b/Mage.Sets/src/mage/cards/s/ShefetMonitor.java index 36e5258afa..23d2d92a76 100644 --- a/Mage.Sets/src/mage/cards/s/ShefetMonitor.java +++ b/Mage.Sets/src/mage/cards/s/ShefetMonitor.java @@ -64,7 +64,7 @@ public class ShefetMonitor extends CardImpl { public ShefetMonitor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/ShellOfTheLastKappa.java b/Mage.Sets/src/mage/cards/s/ShellOfTheLastKappa.java index 92f3c67be9..dfaeef31dc 100644 --- a/Mage.Sets/src/mage/cards/s/ShellOfTheLastKappa.java +++ b/Mage.Sets/src/mage/cards/s/ShellOfTheLastKappa.java @@ -64,13 +64,14 @@ import mage.util.CardUtil; public class ShellOfTheLastKappa extends CardImpl { private static final FilterSpell filter = new FilterSpell("instant or sorcery spell that targets you"); + static { filter.add(new TargetYouPredicate()); filter.add(Predicates.or(new CardTypePredicate(CardType.INSTANT), new CardTypePredicate(CardType.SORCERY))); } public ShellOfTheLastKappa(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); addSuperType(SuperType.LEGENDARY); // {3}, {tap}: Exile target instant or sorcery spell that targets you. @@ -117,14 +118,14 @@ class ShellOfTheLastKappaEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source)); if (spell != null) { - Permanent sourcePermanent = game.getPermanent(source.getSourceId()); + Permanent sourcePermanent = game.getPermanent(source.getSourceId()); if (sourcePermanent == null) { sourcePermanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); } if (sourcePermanent != null) { game.getStack().counter(spell.getId(), source.getSourceId(), game); Card card = spell.getCard(); - card.moveToExile(CardUtil.getCardExileZoneId(game, source), sourcePermanent.getName(), id, game); + card.moveToExile(CardUtil.getCardExileZoneId(game, source), sourcePermanent.getName(), source.getSourceId(), game); } } return false; @@ -164,7 +165,6 @@ class ShellOfTheLastKappaCastEffect extends OneShotEffect { } } - class TargetYouPredicate implements ObjectPlayerPredicate> { @Override diff --git a/Mage.Sets/src/mage/cards/s/ShellSkulkin.java b/Mage.Sets/src/mage/cards/s/ShellSkulkin.java index 8cbdf64536..bf92c1ecd9 100644 --- a/Mage.Sets/src/mage/cards/s/ShellSkulkin.java +++ b/Mage.Sets/src/mage/cards/s/ShellSkulkin.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -57,7 +58,7 @@ public class ShellSkulkin extends CardImpl { public ShellSkulkin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(3); this.toughness = new MageInt(2); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(ShroudAbility.getInstance(), Duration.EndOfTurn), new GenericManaCost(3)); diff --git a/Mage.Sets/src/mage/cards/s/ShelteredAerie.java b/Mage.Sets/src/mage/cards/s/ShelteredAerie.java index 8393ea4000..dac05c9d76 100644 --- a/Mage.Sets/src/mage/cards/s/ShelteredAerie.java +++ b/Mage.Sets/src/mage/cards/s/ShelteredAerie.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -54,7 +55,7 @@ public class ShelteredAerie extends CardImpl { public ShelteredAerie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/s/ShelteredThicket.java b/Mage.Sets/src/mage/cards/s/ShelteredThicket.java index fc9ac68714..278cf074d7 100644 --- a/Mage.Sets/src/mage/cards/s/ShelteredThicket.java +++ b/Mage.Sets/src/mage/cards/s/ShelteredThicket.java @@ -36,6 +36,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class ShelteredThicket extends CardImpl { public ShelteredThicket(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Mountain"); - this.subtype.add("Forest"); + this.subtype.add(SubType.MOUNTAIN); + this.subtype.add(SubType.FOREST); // ({T}: Add {R} or {G} to your mana pool.) this.addAbility(new RedManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/ShelteringAncient.java b/Mage.Sets/src/mage/cards/s/ShelteringAncient.java index 8060c9eef2..14052f8929 100644 --- a/Mage.Sets/src/mage/cards/s/ShelteringAncient.java +++ b/Mage.Sets/src/mage/cards/s/ShelteringAncient.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.counters.CounterType; @@ -56,7 +57,7 @@ public class ShelteringAncient extends CardImpl { public ShelteringAncient(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/ShelteringLight.java b/Mage.Sets/src/mage/cards/s/ShelteringLight.java new file mode 100644 index 0000000000..c8fdc1237e --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShelteringLight.java @@ -0,0 +1,63 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.abilities.keyword.IndestructibleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class ShelteringLight extends CardImpl { + + public ShelteringLight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); + + // Target creature gains indestructible until end of turn. Scry 1. + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new ScryEffect(1)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public ShelteringLight(final ShelteringLight card) { + super(card); + } + + @Override + public ShelteringLight copy() { + return new ShelteringLight(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SheoldredWhisperingOne.java b/Mage.Sets/src/mage/cards/s/SheoldredWhisperingOne.java index 614ed5fbf5..867c78a281 100644 --- a/Mage.Sets/src/mage/cards/s/SheoldredWhisperingOne.java +++ b/Mage.Sets/src/mage/cards/s/SheoldredWhisperingOne.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.filter.StaticFilters; @@ -52,7 +53,7 @@ public class SheoldredWhisperingOne extends CardImpl { public SheoldredWhisperingOne(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Praetor"); + this.subtype.add(SubType.PRAETOR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/ShepherdOfRot.java b/Mage.Sets/src/mage/cards/s/ShepherdOfRot.java index 65a58622d6..b8f179f58e 100644 --- a/Mage.Sets/src/mage/cards/s/ShepherdOfRot.java +++ b/Mage.Sets/src/mage/cards/s/ShepherdOfRot.java @@ -57,8 +57,8 @@ public class ShepherdOfRot extends CardImpl { public ShepherdOfRot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShepherdOfTheLost.java b/Mage.Sets/src/mage/cards/s/ShepherdOfTheLost.java index 2c228880bd..69a072a035 100644 --- a/Mage.Sets/src/mage/cards/s/ShepherdOfTheLost.java +++ b/Mage.Sets/src/mage/cards/s/ShepherdOfTheLost.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class ShepherdOfTheLost extends CardImpl { public ShepherdOfTheLost (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShieldDancer.java b/Mage.Sets/src/mage/cards/s/ShieldDancer.java index db87ba70f3..a0756c1e03 100644 --- a/Mage.Sets/src/mage/cards/s/ShieldDancer.java +++ b/Mage.Sets/src/mage/cards/s/ShieldDancer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.RedirectionEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -53,8 +54,8 @@ public class ShieldDancer extends CardImpl { public ShieldDancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShieldMate.java b/Mage.Sets/src/mage/cards/s/ShieldMate.java new file mode 100644 index 0000000000..1219778a6f --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShieldMate.java @@ -0,0 +1,72 @@ +/* + * 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.cards.s; + +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.effects.common.continuous.BoostTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class ShieldMate extends CardImpl { + + public ShieldMate(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Sacrifice Shield Mate: Target creature gets +0/+4 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(0, 4, Duration.EndOfTurn), new SacrificeSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public ShieldMate(final ShieldMate card) { + super(card); + } + + @Override + public ShieldMate copy() { + return new ShieldMate(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ShieldOfDutyAndReason.java b/Mage.Sets/src/mage/cards/s/ShieldOfDutyAndReason.java index fa3b9b0620..2460b271ca 100644 --- a/Mage.Sets/src/mage/cards/s/ShieldOfDutyAndReason.java +++ b/Mage.Sets/src/mage/cards/s/ShieldOfDutyAndReason.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class ShieldOfDutyAndReason extends CardImpl { public ShieldOfDutyAndReason(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/ShieldOfKaldra.java b/Mage.Sets/src/mage/cards/s/ShieldOfKaldra.java index 64c049950a..47c7cbc0c5 100644 --- a/Mage.Sets/src/mage/cards/s/ShieldOfKaldra.java +++ b/Mage.Sets/src/mage/cards/s/ShieldOfKaldra.java @@ -62,7 +62,7 @@ public class ShieldOfKaldra extends CardImpl { public ShieldOfKaldra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipment named Sword of Kaldra, Shield of Kaldra, and Helm of Kaldra are indestructible. Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, filter, false); diff --git a/Mage.Sets/src/mage/cards/s/ShieldOfTheAvatar.java b/Mage.Sets/src/mage/cards/s/ShieldOfTheAvatar.java index d5f9a1254c..3c1b160ec4 100644 --- a/Mage.Sets/src/mage/cards/s/ShieldOfTheAvatar.java +++ b/Mage.Sets/src/mage/cards/s/ShieldOfTheAvatar.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class ShieldOfTheAvatar extends CardImpl { public ShieldOfTheAvatar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // If a source would deal damage to equipped creature, prevent X of that damage, where X is the number of creatures you control. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ShieldOfTheAvatarPreventionEffect())); diff --git a/Mage.Sets/src/mage/cards/s/ShieldOfTheOversoul.java b/Mage.Sets/src/mage/cards/s/ShieldOfTheOversoul.java index 9ff6c95a3d..c3782772d4 100644 --- a/Mage.Sets/src/mage/cards/s/ShieldOfTheOversoul.java +++ b/Mage.Sets/src/mage/cards/s/ShieldOfTheOversoul.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -56,7 +57,7 @@ public class ShieldOfTheOversoul extends CardImpl { public ShieldOfTheOversoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G/W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/ShieldOfTheRighteous.java b/Mage.Sets/src/mage/cards/s/ShieldOfTheRighteous.java index 01418b7b6f..124e21caf2 100644 --- a/Mage.Sets/src/mage/cards/s/ShieldOfTheRighteous.java +++ b/Mage.Sets/src/mage/cards/s/ShieldOfTheRighteous.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -52,7 +53,7 @@ public class ShieldOfTheRighteous extends CardImpl { public ShieldOfTheRighteous(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{W}{U}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +0/+2 and has vigilance. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(0, 2))); diff --git a/Mage.Sets/src/mage/cards/s/ShieldSphere.java b/Mage.Sets/src/mage/cards/s/ShieldSphere.java index f171245714..291005ceac 100644 --- a/Mage.Sets/src/mage/cards/s/ShieldSphere.java +++ b/Mage.Sets/src/mage/cards/s/ShieldSphere.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.BoostCounter; /** @@ -45,7 +46,7 @@ public class ShieldSphere extends CardImpl { public ShieldSphere(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{0}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/ShieldedAetherThief.java b/Mage.Sets/src/mage/cards/s/ShieldedAetherThief.java index 42a9096945..5e4f90c6b7 100644 --- a/Mage.Sets/src/mage/cards/s/ShieldedAetherThief.java +++ b/Mage.Sets/src/mage/cards/s/ShieldedAetherThief.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -51,8 +52,8 @@ public class ShieldedAetherThief extends CardImpl { public ShieldedAetherThief(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ShieldedByFaith.java b/Mage.Sets/src/mage/cards/s/ShieldedByFaith.java index 4a6572d52b..c51ed4bcee 100644 --- a/Mage.Sets/src/mage/cards/s/ShieldedByFaith.java +++ b/Mage.Sets/src/mage/cards/s/ShieldedByFaith.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SetTargetPointer; @@ -55,7 +56,7 @@ public class ShieldedByFaith extends CardImpl { public ShieldedByFaith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/ShieldhideDragon.java b/Mage.Sets/src/mage/cards/s/ShieldhideDragon.java index b8cad46680..329a6620be 100644 --- a/Mage.Sets/src/mage/cards/s/ShieldhideDragon.java +++ b/Mage.Sets/src/mage/cards/s/ShieldhideDragon.java @@ -49,8 +49,8 @@ import mage.filter.predicate.permanent.AnotherPredicate; * @author fireshoes */ public class ShieldhideDragon extends CardImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("each other Dragon creature you control"); + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other Dragon creature you control"); static { filter.add(new AnotherPredicate()); @@ -58,20 +58,20 @@ public class ShieldhideDragon extends CardImpl { } public ShieldhideDragon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Dragon"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(3); this.toughness = new MageInt(3); // Flying this.addAbility(FlyingAbility.getInstance()); - + // Lifelink this.addAbility(LifelinkAbility.getInstance()); - + // Megamorph {5}{W}{W} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{5}{W}{W}"), true)); - + // When Shieldhide Dragon is turned face up, put a +1/+1 counter on each other Dragon you control. this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), false, false)); } diff --git a/Mage.Sets/src/mage/cards/s/ShieldingPlax.java b/Mage.Sets/src/mage/cards/s/ShieldingPlax.java index fea6926dde..b399450f15 100644 --- a/Mage.Sets/src/mage/cards/s/ShieldingPlax.java +++ b/Mage.Sets/src/mage/cards/s/ShieldingPlax.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -58,7 +59,7 @@ public class ShieldingPlax extends CardImpl { public ShieldingPlax(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G/U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/ShieldsOfVelisVel.java b/Mage.Sets/src/mage/cards/s/ShieldsOfVelisVel.java index 3cea66be8b..3d503f5367 100644 --- a/Mage.Sets/src/mage/cards/s/ShieldsOfVelisVel.java +++ b/Mage.Sets/src/mage/cards/s/ShieldsOfVelisVel.java @@ -50,7 +50,7 @@ public class ShieldsOfVelisVel extends CardImpl { public ShieldsOfVelisVel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{W}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); // Changeling this.addAbility(ChangelingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/s/ShiftingSliver.java b/Mage.Sets/src/mage/cards/s/ShiftingSliver.java index f7c21d6ca7..88e54462da 100644 --- a/Mage.Sets/src/mage/cards/s/ShiftingSliver.java +++ b/Mage.Sets/src/mage/cards/s/ShiftingSliver.java @@ -57,7 +57,7 @@ public class ShiftingSliver extends CardImpl { public ShiftingSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShiftingWall.java b/Mage.Sets/src/mage/cards/s/ShiftingWall.java index da69d43a86..f82fec7ff8 100644 --- a/Mage.Sets/src/mage/cards/s/ShiftingWall.java +++ b/Mage.Sets/src/mage/cards/s/ShiftingWall.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,7 +46,7 @@ public class ShiftingWall extends CardImpl { public ShiftingWall(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{X}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/ShiftyDoppelganger.java b/Mage.Sets/src/mage/cards/s/ShiftyDoppelganger.java new file mode 100644 index 0000000000..8375f565de --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShiftyDoppelganger.java @@ -0,0 +1,175 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.costs.common.ExileSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCardInHand; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public class ShiftyDoppelganger extends CardImpl { + + public ShiftyDoppelganger(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.SHAPESHIFTER); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {3}{U}, Exile Shifty Doppelganger: You may put a creature card from your hand onto the battlefield. If you do, that creature gains haste until end of turn. At the beginning of the next end step, sacrifice that creature. If you do, return Shifty Doppelganger to the battlefield. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ShiftyDoppelgangerExileEffect(), new ManaCostsImpl("{3}{U}")); + ability.addCost(new ExileSourceCost(true)); + this.addAbility(ability); + + } + + public ShiftyDoppelganger(final ShiftyDoppelganger card) { + super(card); + } + + @Override + public ShiftyDoppelganger copy() { + return new ShiftyDoppelganger(this); + } +} + +class ShiftyDoppelgangerExileEffect extends OneShotEffect { + + public ShiftyDoppelgangerExileEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "You may put a creature card from your hand onto the battlefield. If you do, that creature gains haste until end of turn. At the beginning of the next end step, sacrifice that creature. If you do, return {this} to the battlefield"; + } + + public ShiftyDoppelgangerExileEffect(final ShiftyDoppelgangerExileEffect effect) { + super(effect); + } + + @Override + public ShiftyDoppelgangerExileEffect copy() { + return new ShiftyDoppelgangerExileEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + FilterCreatureCard filter = new FilterCreatureCard("a creature card"); + boolean putCreature = false; + UUID creatureId = UUID.randomUUID(); + Player player = game.getPlayer(source.getControllerId()); + if (player.chooseUse(Outcome.PutCardInPlay, "Put " + filter.getMessage() + " from your hand onto the battlefield?", source, game)) { + TargetCardInHand target = new TargetCardInHand(filter); + if (player.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) { + Card card = game.getCard(target.getFirstTarget()); + if (card != null) { + putCreature = player.moveCards(card, Zone.BATTLEFIELD, source, game); + if (putCreature) { + creatureId = card.getId(); + } + } + } + } + if (putCreature) { + Permanent creature = game.getPermanent(creatureId); + if (creature != null) { + ContinuousEffect hasteEffect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn); + hasteEffect.setTargetPointer(new FixedTarget(creature, game)); + game.addEffect(hasteEffect, source); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility( + new ShiftyDoppelgangerReturnEffect(creature.getId(), creature.getZoneChangeCounter(game), (int) game.getState().getValue(source.getSourceId().toString()))); + game.addDelayedTriggeredAbility(delayedAbility, source); + } + } + return true; + } +} + +class ShiftyDoppelgangerReturnEffect extends OneShotEffect { + + private final UUID creatureId; + private final int creatureZoneCount; + private final int sourceZoneCount; + + ShiftyDoppelgangerReturnEffect(UUID creatureId, int creatureZoneCount, int sourceZoneCount) { + super(Outcome.Benefit); + this.staticText = "sacrifice that creature. If you do, return {this} to the battlefield"; + this.creatureId = creatureId; + this.creatureZoneCount = creatureZoneCount; + this.sourceZoneCount = sourceZoneCount; + } + + ShiftyDoppelgangerReturnEffect(final ShiftyDoppelgangerReturnEffect effect) { + super(effect); + this.creatureId = effect.creatureId; + this.creatureZoneCount = effect.creatureZoneCount; + this.sourceZoneCount = effect.sourceZoneCount; + } + + @Override + public ShiftyDoppelgangerReturnEffect copy() { + return new ShiftyDoppelgangerReturnEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent creature = game.getPermanent(creatureId); + Player player = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (creature != null && creature.getZoneChangeCounter(game) == this.creatureZoneCount && creature.sacrifice(source.getSourceId(), game)) { + if (player != null && sourceObject != null && sourceObject.getZoneChangeCounter(game) == this.sourceZoneCount) { + player.moveCards(game.getCard(source.getSourceId()), Zone.BATTLEFIELD, source, game); + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/ShimatsuTheBloodcloaked.java b/Mage.Sets/src/mage/cards/s/ShimatsuTheBloodcloaked.java index 9393746a36..373d4e0726 100644 --- a/Mage.Sets/src/mage/cards/s/ShimatsuTheBloodcloaked.java +++ b/Mage.Sets/src/mage/cards/s/ShimatsuTheBloodcloaked.java @@ -54,8 +54,8 @@ public class ShimatsuTheBloodcloaked extends CardImpl { public ShimatsuTheBloodcloaked(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Demon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DEMON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/ShimianSpecter.java b/Mage.Sets/src/mage/cards/s/ShimianSpecter.java index 79bb7073cd..edb5141e93 100644 --- a/Mage.Sets/src/mage/cards/s/ShimianSpecter.java +++ b/Mage.Sets/src/mage/cards/s/ShimianSpecter.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.SplitCard; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -59,7 +60,7 @@ public class ShimianSpecter extends CardImpl { public ShimianSpecter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); - this.subtype.add("Specter"); + this.subtype.add(SubType.SPECTER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShimmerMyr.java b/Mage.Sets/src/mage/cards/s/ShimmerMyr.java index 910276e661..acf27b2cde 100644 --- a/Mage.Sets/src/mage/cards/s/ShimmerMyr.java +++ b/Mage.Sets/src/mage/cards/s/ShimmerMyr.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterArtifactCard; @@ -47,7 +48,7 @@ public class ShimmerMyr extends CardImpl { public ShimmerMyr(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShimmeringBarrier.java b/Mage.Sets/src/mage/cards/s/ShimmeringBarrier.java index 58aa802646..5dd569c1b1 100644 --- a/Mage.Sets/src/mage/cards/s/ShimmeringBarrier.java +++ b/Mage.Sets/src/mage/cards/s/ShimmeringBarrier.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class ShimmeringBarrier extends CardImpl { public ShimmeringBarrier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShimmeringGlasskite.java b/Mage.Sets/src/mage/cards/s/ShimmeringGlasskite.java index b6fc838020..84357f0d97 100644 --- a/Mage.Sets/src/mage/cards/s/ShimmeringGlasskite.java +++ b/Mage.Sets/src/mage/cards/s/ShimmeringGlasskite.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -49,7 +50,7 @@ public class ShimmeringGlasskite extends CardImpl { public ShimmeringGlasskite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShimmeringMirage.java b/Mage.Sets/src/mage/cards/s/ShimmeringMirage.java index 273b7bcb0f..47761a07bd 100644 --- a/Mage.Sets/src/mage/cards/s/ShimmeringMirage.java +++ b/Mage.Sets/src/mage/cards/s/ShimmeringMirage.java @@ -43,13 +43,13 @@ import mage.target.common.TargetLandPermanent; public class ShimmeringMirage extends CardImpl { public ShimmeringMirage(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); // Target land becomes the basic land type of your choice until end of turn. this.getSpellAbility().addEffect(new BecomesBasicLandTargetEffect(Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetLandPermanent()); // Draw a card. - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).setText("

Draw a card")); } public ShimmeringMirage(final ShimmeringMirage card) { diff --git a/Mage.Sets/src/mage/cards/s/ShimmeringWings.java b/Mage.Sets/src/mage/cards/s/ShimmeringWings.java index 8b752052cd..c84277ef0f 100644 --- a/Mage.Sets/src/mage/cards/s/ShimmeringWings.java +++ b/Mage.Sets/src/mage/cards/s/ShimmeringWings.java @@ -51,7 +51,7 @@ public class ShimmeringWings extends CardImpl { public ShimmeringWings(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature (Target a creature as you cast this. This card enters the battlefield attached to that creature.) diff --git a/Mage.Sets/src/mage/cards/s/ShimmerscaleDrake.java b/Mage.Sets/src/mage/cards/s/ShimmerscaleDrake.java index f93874dc76..664c526eec 100644 --- a/Mage.Sets/src/mage/cards/s/ShimmerscaleDrake.java +++ b/Mage.Sets/src/mage/cards/s/ShimmerscaleDrake.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class ShimmerscaleDrake extends CardImpl { public ShimmerscaleDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ShinenOfFearsChill.java b/Mage.Sets/src/mage/cards/s/ShinenOfFearsChill.java index f144f48934..eccedfe621 100644 --- a/Mage.Sets/src/mage/cards/s/ShinenOfFearsChill.java +++ b/Mage.Sets/src/mage/cards/s/ShinenOfFearsChill.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ChannelAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class ShinenOfFearsChill extends CardImpl { public ShinenOfFearsChill(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShinenOfFlightsWings.java b/Mage.Sets/src/mage/cards/s/ShinenOfFlightsWings.java index 5f9ef30779..d6eca3cb9f 100644 --- a/Mage.Sets/src/mage/cards/s/ShinenOfFlightsWings.java +++ b/Mage.Sets/src/mage/cards/s/ShinenOfFlightsWings.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class ShinenOfFlightsWings extends CardImpl { public ShinenOfFlightsWings(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShinenOfFurysFire.java b/Mage.Sets/src/mage/cards/s/ShinenOfFurysFire.java index b2f4668210..4c655f466c 100644 --- a/Mage.Sets/src/mage/cards/s/ShinenOfFurysFire.java +++ b/Mage.Sets/src/mage/cards/s/ShinenOfFurysFire.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class ShinenOfFurysFire extends CardImpl { public ShinenOfFurysFire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShinenOfLifesRoar.java b/Mage.Sets/src/mage/cards/s/ShinenOfLifesRoar.java index 2dd95e5c76..71485c262e 100644 --- a/Mage.Sets/src/mage/cards/s/ShinenOfLifesRoar.java +++ b/Mage.Sets/src/mage/cards/s/ShinenOfLifesRoar.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ChannelAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class ShinenOfLifesRoar extends CardImpl { public ShinenOfLifesRoar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShinenOfStarsLight.java b/Mage.Sets/src/mage/cards/s/ShinenOfStarsLight.java index 412b4b9ff8..6efd564653 100644 --- a/Mage.Sets/src/mage/cards/s/ShinenOfStarsLight.java +++ b/Mage.Sets/src/mage/cards/s/ShinenOfStarsLight.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class ShinenOfStarsLight extends CardImpl { public ShinenOfStarsLight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Shinewend.java b/Mage.Sets/src/mage/cards/s/Shinewend.java index 56f1fd637b..6a9c7f17e0 100644 --- a/Mage.Sets/src/mage/cards/s/Shinewend.java +++ b/Mage.Sets/src/mage/cards/s/Shinewend.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetEnchantmentPermanent; @@ -52,7 +53,7 @@ public class Shinewend extends CardImpl { public Shinewend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/ShiningAerosaur.java b/Mage.Sets/src/mage/cards/s/ShiningAerosaur.java new file mode 100644 index 0000000000..62b5d94763 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShiningAerosaur.java @@ -0,0 +1,64 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class ShiningAerosaur extends CardImpl { + + public ShiningAerosaur(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + } + + public ShiningAerosaur(final ShiningAerosaur card) { + super(card); + } + + @Override + public ShiningAerosaur copy() { + return new ShiningAerosaur(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ShinkaGatekeeper.java b/Mage.Sets/src/mage/cards/s/ShinkaGatekeeper.java index 8bedd11c8c..50ce2f8957 100644 --- a/Mage.Sets/src/mage/cards/s/ShinkaGatekeeper.java +++ b/Mage.Sets/src/mage/cards/s/ShinkaGatekeeper.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -47,15 +48,15 @@ import mage.players.Player; public class ShinkaGatekeeper extends CardImpl { public ShinkaGatekeeper(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); // Whenever Shinka Gatekeeper is dealt damage, it deals that much damage to you. - this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new ShinkaGatekeeperDealDamageEffect(), false)); + this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new ShinkaGatekeeperDealDamageEffect(), false, false, true)); } public ShinkaGatekeeper(final ShinkaGatekeeper card) { @@ -68,7 +69,6 @@ public class ShinkaGatekeeper extends CardImpl { } } - class ShinkaGatekeeperDealDamageEffect extends OneShotEffect { public ShinkaGatekeeperDealDamageEffect() { diff --git a/Mage.Sets/src/mage/cards/s/ShipbreakerKraken.java b/Mage.Sets/src/mage/cards/s/ShipbreakerKraken.java index d1401e34ce..d50e6dbd19 100644 --- a/Mage.Sets/src/mage/cards/s/ShipbreakerKraken.java +++ b/Mage.Sets/src/mage/cards/s/ShipbreakerKraken.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MonstrosityAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.PhaseStep; @@ -57,7 +58,7 @@ public class ShipbreakerKraken extends CardImpl { public ShipbreakerKraken(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Kraken"); + this.subtype.add(SubType.KRAKEN); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/ShipwreckLooter.java b/Mage.Sets/src/mage/cards/s/ShipwreckLooter.java new file mode 100644 index 0000000000..dc6f2eb24b --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShipwreckLooter.java @@ -0,0 +1,73 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DrawDiscardControllerEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * + * @author TheElk801 + */ +public class ShipwreckLooter extends CardImpl { + + public ShipwreckLooter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Raid - When Shipwreck Looter enters the battlefield,if you attacked with a creature this turn, you may draw a card. If you do, discard a card. + Ability ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new DrawDiscardControllerEffect(1, 1, true)), + RaidCondition.instance, + "Raid - When {this} enters the battlefield, if you attacked with a creature this turn, you may draw a card. If you do, discard a card."); + this.addAbility(ability, new PlayerAttackedWatcher()); + } + + public ShipwreckLooter(final ShipwreckLooter card) { + super(card); + } + + @Override + public ShipwreckLooter copy() { + return new ShipwreckLooter(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ShipwreckMoray.java b/Mage.Sets/src/mage/cards/s/ShipwreckMoray.java index 0d846bb714..d7bbd0eca2 100644 --- a/Mage.Sets/src/mage/cards/s/ShipwreckMoray.java +++ b/Mage.Sets/src/mage/cards/s/ShipwreckMoray.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class ShipwreckMoray extends CardImpl { public ShipwreckMoray(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); - this.subtype.add("Fish"); + this.subtype.add(SubType.FISH); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/ShipwreckSinger.java b/Mage.Sets/src/mage/cards/s/ShipwreckSinger.java index 179adb2d7a..d7854036b9 100644 --- a/Mage.Sets/src/mage/cards/s/ShipwreckSinger.java +++ b/Mage.Sets/src/mage/cards/s/ShipwreckSinger.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -63,7 +64,7 @@ public class ShipwreckSinger extends CardImpl { public ShipwreckSinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}"); - this.subtype.add("Siren"); + this.subtype.add(SubType.SIREN); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShireiShizosCaretaker.java b/Mage.Sets/src/mage/cards/s/ShireiShizosCaretaker.java index ce1635ac7c..82897d049f 100644 --- a/Mage.Sets/src/mage/cards/s/ShireiShizosCaretaker.java +++ b/Mage.Sets/src/mage/cards/s/ShireiShizosCaretaker.java @@ -40,6 +40,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class ShireiShizosCaretaker extends CardImpl { public ShireiShizosCaretaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShisatoWhisperingHunter.java b/Mage.Sets/src/mage/cards/s/ShisatoWhisperingHunter.java index d336adfe89..674c8f6bf1 100644 --- a/Mage.Sets/src/mage/cards/s/ShisatoWhisperingHunter.java +++ b/Mage.Sets/src/mage/cards/s/ShisatoWhisperingHunter.java @@ -58,8 +58,8 @@ public class ShisatoWhisperingHunter extends CardImpl { public ShisatoWhisperingHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Snake"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShivanDragon.java b/Mage.Sets/src/mage/cards/s/ShivanDragon.java index 9e23634aa4..319f06348c 100644 --- a/Mage.Sets/src/mage/cards/s/ShivanDragon.java +++ b/Mage.Sets/src/mage/cards/s/ShivanDragon.java @@ -45,7 +45,7 @@ public class ShivanDragon extends CardImpl { public ShivanDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/ShivanEmissary.java b/Mage.Sets/src/mage/cards/s/ShivanEmissary.java index 2620421734..d07c696a10 100644 --- a/Mage.Sets/src/mage/cards/s/ShivanEmissary.java +++ b/Mage.Sets/src/mage/cards/s/ShivanEmissary.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -59,8 +60,8 @@ public class ShivanEmissary extends CardImpl { public ShivanEmissary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShivanHellkite.java b/Mage.Sets/src/mage/cards/s/ShivanHellkite.java index b90ecbb7a0..ec26f2d23b 100644 --- a/Mage.Sets/src/mage/cards/s/ShivanHellkite.java +++ b/Mage.Sets/src/mage/cards/s/ShivanHellkite.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,7 +49,7 @@ public class ShivanHellkite extends CardImpl { public ShivanHellkite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/ShivanPhoenix.java b/Mage.Sets/src/mage/cards/s/ShivanPhoenix.java index 7c548f7ff3..1660c2521e 100644 --- a/Mage.Sets/src/mage/cards/s/ShivanPhoenix.java +++ b/Mage.Sets/src/mage/cards/s/ShivanPhoenix.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class ShivanPhoenix extends CardImpl { public ShivanPhoenix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Phoenix"); + this.subtype.add(SubType.PHOENIX); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ShivanRaptor.java b/Mage.Sets/src/mage/cards/s/ShivanRaptor.java index 0bc6cf6a6c..bd590865ac 100644 --- a/Mage.Sets/src/mage/cards/s/ShivanRaptor.java +++ b/Mage.Sets/src/mage/cards/s/ShivanRaptor.java @@ -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.cards.s; import java.util.UUID; @@ -36,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,15 +44,15 @@ import mage.constants.CardType; public class ShivanRaptor extends CardImpl { public ShivanRaptor(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Lizard"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.subtype.add(SubType.DINOSAUR); this.power = new MageInt(3); this.toughness = new MageInt(1); - this.addAbility(FirstStrikeAbility.getInstance()); - this.addAbility(HasteAbility.getInstance()); - this.addAbility(new EchoAbility("{2}{R}")); + this.addAbility(FirstStrikeAbility.getInstance()); + this.addAbility(HasteAbility.getInstance()); + this.addAbility(new EchoAbility("{2}{R}")); } public ShivanRaptor(final ShivanRaptor card) { @@ -64,4 +64,4 @@ public class ShivanRaptor extends CardImpl { return new ShivanRaptor(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/s/ShivanWumpus.java b/Mage.Sets/src/mage/cards/s/ShivanWumpus.java index e26c8fc479..bcd99ecad1 100644 --- a/Mage.Sets/src/mage/cards/s/ShivanWumpus.java +++ b/Mage.Sets/src/mage/cards/s/ShivanWumpus.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterControlledLandPermanent; import mage.game.Game; @@ -52,7 +53,7 @@ public class ShivanWumpus extends CardImpl { public ShivanWumpus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/ShivanWurm.java b/Mage.Sets/src/mage/cards/s/ShivanWurm.java index a9e797b3e3..227023b229 100644 --- a/Mage.Sets/src/mage/cards/s/ShivanWurm.java +++ b/Mage.Sets/src/mage/cards/s/ShivanWurm.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -56,7 +57,7 @@ public class ShivanWurm extends CardImpl { public ShivanWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/s/ShivanZombie.java b/Mage.Sets/src/mage/cards/s/ShivanZombie.java index 8f5efdf28e..63652b1a19 100644 --- a/Mage.Sets/src/mage/cards/s/ShivanZombie.java +++ b/Mage.Sets/src/mage/cards/s/ShivanZombie.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ShivanZombie extends CardImpl { public ShivanZombie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{R}"); - this.subtype.add("Barbarian"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.BARBARIAN); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShivsEmbrace.java b/Mage.Sets/src/mage/cards/s/ShivsEmbrace.java index 4ecde0d7b9..816404ab6d 100644 --- a/Mage.Sets/src/mage/cards/s/ShivsEmbrace.java +++ b/Mage.Sets/src/mage/cards/s/ShivsEmbrace.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class ShivsEmbrace extends CardImpl { public ShivsEmbrace(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/ShizukoCallerOfAutumn.java b/Mage.Sets/src/mage/cards/s/ShizukoCallerOfAutumn.java index 97af8d9f60..6198803658 100644 --- a/Mage.Sets/src/mage/cards/s/ShizukoCallerOfAutumn.java +++ b/Mage.Sets/src/mage/cards/s/ShizukoCallerOfAutumn.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.AddManaToManaPoolTargetControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class ShizukoCallerOfAutumn extends CardImpl { public ShizukoCallerOfAutumn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Snake"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShoalSerpent.java b/Mage.Sets/src/mage/cards/s/ShoalSerpent.java index 5d415984d4..20e7d114cb 100644 --- a/Mage.Sets/src/mage/cards/s/ShoalSerpent.java +++ b/Mage.Sets/src/mage/cards/s/ShoalSerpent.java @@ -47,7 +47,7 @@ public class ShoalSerpent extends CardImpl { public ShoalSerpent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/ShockTrooper.java b/Mage.Sets/src/mage/cards/s/ShockTrooper.java index e05f2eda9d..ca38a98518 100644 --- a/Mage.Sets/src/mage/cards/s/ShockTrooper.java +++ b/Mage.Sets/src/mage/cards/s/ShockTrooper.java @@ -1,75 +1,75 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.continuous.BoostControlledEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; - -/** - * - * @author Styxo - */ -public class ShockTrooper extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures"); - - static { - filter.add(new SubtypePredicate(SubType.TROOPER)); - } - - public ShockTrooper(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Trooper"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // Trooper creatures you control get +2/+0. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(2, 0, Duration.WhileOnBattlefield, filter, false))); - - } - - public ShockTrooper(final ShockTrooper card) { - super(card); - } - - @Override - public ShockTrooper copy() { - return new ShockTrooper(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author Styxo + */ +public class ShockTrooper extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures"); + + static { + filter.add(new SubtypePredicate(SubType.TROOPER)); + } + + public ShockTrooper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.TROOPER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Trooper creatures you control get +2/+0. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(2, 0, Duration.WhileOnBattlefield, filter, false))); + + } + + public ShockTrooper(final ShockTrooper card) { + super(card); + } + + @Override + public ShockTrooper copy() { + return new ShockTrooper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ShockTroops.java b/Mage.Sets/src/mage/cards/s/ShockTroops.java index 49c2ab9e9c..035db5e4e3 100644 --- a/Mage.Sets/src/mage/cards/s/ShockTroops.java +++ b/Mage.Sets/src/mage/cards/s/ShockTroops.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -47,8 +48,8 @@ public class ShockTroops extends CardImpl { public ShockTroops(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Shocker.java b/Mage.Sets/src/mage/cards/s/Shocker.java index 744040de5a..a2246280df 100644 --- a/Mage.Sets/src/mage/cards/s/Shocker.java +++ b/Mage.Sets/src/mage/cards/s/Shocker.java @@ -36,6 +36,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -48,7 +49,7 @@ public class Shocker extends CardImpl { public Shocker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShockmawDragon.java b/Mage.Sets/src/mage/cards/s/ShockmawDragon.java index c34089e78f..79a25a0205 100644 --- a/Mage.Sets/src/mage/cards/s/ShockmawDragon.java +++ b/Mage.Sets/src/mage/cards/s/ShockmawDragon.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.StaticFilters; import mage.game.Game; @@ -51,7 +52,7 @@ public class ShockmawDragon extends CardImpl { public ShockmawDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ShoreKeeper.java b/Mage.Sets/src/mage/cards/s/ShoreKeeper.java new file mode 100644 index 0000000000..36c0826ec2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShoreKeeper.java @@ -0,0 +1,72 @@ +/* + * 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.cards.s; + +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.DrawCardSourceControllerEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class ShoreKeeper extends CardImpl { + + public ShoreKeeper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}"); + + this.subtype.add(SubType.TRILOBITE); + this.power = new MageInt(0); + this.toughness = new MageInt(3); + + // {7}{u}, {t}, Sacrifice Shore Keeper: Draw three cards. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(3), new ManaCostsImpl("{7}{U}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public ShoreKeeper(final ShoreKeeper card) { + super(card); + } + + @Override + public ShoreKeeper copy() { + return new ShoreKeeper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ShoreSnapper.java b/Mage.Sets/src/mage/cards/s/ShoreSnapper.java index f54d8d877f..1daf1b4769 100644 --- a/Mage.Sets/src/mage/cards/s/ShoreSnapper.java +++ b/Mage.Sets/src/mage/cards/s/ShoreSnapper.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.IslandwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class ShoreSnapper extends CardImpl { public ShoreSnapper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShorecrasherElemental.java b/Mage.Sets/src/mage/cards/s/ShorecrasherElemental.java index 37690d1a53..ba4d8c79a0 100644 --- a/Mage.Sets/src/mage/cards/s/ShorecrasherElemental.java +++ b/Mage.Sets/src/mage/cards/s/ShorecrasherElemental.java @@ -45,6 +45,7 @@ import mage.cards.CardSetInfo; import mage.choices.Choice; import mage.choices.ChoiceImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -60,7 +61,7 @@ public class ShorecrasherElemental extends CardImpl { public ShorecrasherElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{U}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShorecrasherMimic.java b/Mage.Sets/src/mage/cards/s/ShorecrasherMimic.java index 031f16315a..ac72bc7161 100644 --- a/Mage.Sets/src/mage/cards/s/ShorecrasherMimic.java +++ b/Mage.Sets/src/mage/cards/s/ShorecrasherMimic.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SubLayer; import mage.filter.FilterSpell; @@ -57,11 +58,11 @@ public class ShorecrasherMimic extends CardImpl { filter.add(new ColorPredicate(ObjectColor.BLUE)); } - private String rule = "Whenever you cast a spell that's both green and blue, {this} has base power and toughness 5/3 until end of turn and gains trample until end of turn"; + private String rule = "Whenever you cast a spell that's both green and blue, {this} has base power and toughness 5/3 until end of turn and gains trample until end of turn."; public ShorecrasherMimic(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G/U}"); - this.subtype.add("Shapeshifter"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G/U}"); + this.subtype.add(SubType.SHAPESHIFTER); this.color.setBlue(true); this.color.setGreen(true); diff --git a/Mage.Sets/src/mage/cards/s/ShorelineRaider.java b/Mage.Sets/src/mage/cards/s/ShorelineRaider.java index c3bb24f911..80f7632d0d 100644 --- a/Mage.Sets/src/mage/cards/s/ShorelineRaider.java +++ b/Mage.Sets/src/mage/cards/s/ShorelineRaider.java @@ -53,7 +53,7 @@ public class ShorelineRaider extends CardImpl { public ShorelineRaider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShorelineRanger.java b/Mage.Sets/src/mage/cards/s/ShorelineRanger.java index 7ac013b0e0..b0e05427d6 100644 --- a/Mage.Sets/src/mage/cards/s/ShorelineRanger.java +++ b/Mage.Sets/src/mage/cards/s/ShorelineRanger.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.IslandcyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class ShorelineRanger extends CardImpl { public ShorelineRanger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ShorelineSalvager.java b/Mage.Sets/src/mage/cards/s/ShorelineSalvager.java index edd8e6e669..1bf425a1e2 100644 --- a/Mage.Sets/src/mage/cards/s/ShorelineSalvager.java +++ b/Mage.Sets/src/mage/cards/s/ShorelineSalvager.java @@ -58,7 +58,7 @@ public class ShorelineSalvager extends CardImpl { public ShorelineSalvager(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Surrakar"); + this.subtype.add(SubType.SURRAKAR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShovingMatch.java b/Mage.Sets/src/mage/cards/s/ShovingMatch.java new file mode 100644 index 0000000000..0f059b9928 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShovingMatch.java @@ -0,0 +1,69 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class ShovingMatch extends CardImpl { + + public ShovingMatch(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}"); + + // Until end of turn, all creatures gain "{tap}: Tap target creature." + Ability ability = new SimpleActivatedAbility(new TapTargetEffect(), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect( + new GainAbilityAllEffect(ability, Duration.EndOfTurn, new FilterCreaturePermanent()) + .setText("Until end of turn, all creatures gain \"{T}: Tap target creature.\"") + ); + } + + public ShovingMatch(final ShovingMatch card) { + super(card); + } + + @Override + public ShovingMatch copy() { + return new ShovingMatch(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/ShrewdHatchling.java b/Mage.Sets/src/mage/cards/s/ShrewdHatchling.java index e6bb9652cb..a917641293 100644 --- a/Mage.Sets/src/mage/cards/s/ShrewdHatchling.java +++ b/Mage.Sets/src/mage/cards/s/ShrewdHatchling.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -74,7 +75,7 @@ public class ShrewdHatchling extends CardImpl { public ShrewdHatchling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U/R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/ShriekRaptor.java b/Mage.Sets/src/mage/cards/s/ShriekRaptor.java index 45f217e29f..2e312ce073 100644 --- a/Mage.Sets/src/mage/cards/s/ShriekRaptor.java +++ b/Mage.Sets/src/mage/cards/s/ShriekRaptor.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class ShriekRaptor extends CardImpl { public ShriekRaptor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/Shriekgeist.java b/Mage.Sets/src/mage/cards/s/Shriekgeist.java index dd0ac9fcbe..7b73933c0e 100644 --- a/Mage.Sets/src/mage/cards/s/Shriekgeist.java +++ b/Mage.Sets/src/mage/cards/s/Shriekgeist.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.DamagedPlayerEvent; @@ -51,7 +52,7 @@ public class Shriekgeist extends CardImpl { public Shriekgeist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShriekingDrake.java b/Mage.Sets/src/mage/cards/s/ShriekingDrake.java index 9c6d84abaf..a835083d9d 100644 --- a/Mage.Sets/src/mage/cards/s/ShriekingDrake.java +++ b/Mage.Sets/src/mage/cards/s/ShriekingDrake.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; /** @@ -45,7 +46,7 @@ public class ShriekingDrake extends CardImpl { public ShriekingDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShriekingGrotesque.java b/Mage.Sets/src/mage/cards/s/ShriekingGrotesque.java index 3870392b37..40ebcf7e53 100644 --- a/Mage.Sets/src/mage/cards/s/ShriekingGrotesque.java +++ b/Mage.Sets/src/mage/cards/s/ShriekingGrotesque.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.target.TargetPlayer; import mage.watchers.common.ManaSpentToCastWatcher; @@ -51,7 +52,7 @@ public class ShriekingGrotesque extends CardImpl { public ShriekingGrotesque(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Gargoyle"); + this.subtype.add(SubType.GARGOYLE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShriekingMogg.java b/Mage.Sets/src/mage/cards/s/ShriekingMogg.java index 407b151ddb..325f13feb5 100644 --- a/Mage.Sets/src/mage/cards/s/ShriekingMogg.java +++ b/Mage.Sets/src/mage/cards/s/ShriekingMogg.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -53,7 +54,7 @@ public class ShriekingMogg extends CardImpl { public ShriekingMogg(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShriekingSpecter.java b/Mage.Sets/src/mage/cards/s/ShriekingSpecter.java index cef2ede317..7a6d09eb99 100644 --- a/Mage.Sets/src/mage/cards/s/ShriekingSpecter.java +++ b/Mage.Sets/src/mage/cards/s/ShriekingSpecter.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SetTargetPointer; /** @@ -45,7 +46,7 @@ public class ShriekingSpecter extends CardImpl { public ShriekingSpecter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Specter"); + this.subtype.add(SubType.SPECTER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Shriekmaw.java b/Mage.Sets/src/mage/cards/s/Shriekmaw.java index 1a99907bba..dea6d6f6c4 100644 --- a/Mage.Sets/src/mage/cards/s/Shriekmaw.java +++ b/Mage.Sets/src/mage/cards/s/Shriekmaw.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -60,7 +61,7 @@ public class Shriekmaw extends CardImpl { public Shriekmaw(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShrikeHarpy.java b/Mage.Sets/src/mage/cards/s/ShrikeHarpy.java index 2dbfa96115..9cba215e22 100644 --- a/Mage.Sets/src/mage/cards/s/ShrikeHarpy.java +++ b/Mage.Sets/src/mage/cards/s/ShrikeHarpy.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TributeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.target.common.TargetOpponent; @@ -50,7 +51,7 @@ public class ShrikeHarpy extends CardImpl { public ShrikeHarpy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Harpy"); + this.subtype.add(SubType.HARPY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShrillHowler.java b/Mage.Sets/src/mage/cards/s/ShrillHowler.java index c705f0019a..c165fe899a 100644 --- a/Mage.Sets/src/mage/cards/s/ShrillHowler.java +++ b/Mage.Sets/src/mage/cards/s/ShrillHowler.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.h.HowlingChorus; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -49,8 +50,8 @@ public class ShrillHowler extends CardImpl { public ShrillHowler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Werewolf"); - this.subtype.add("Horror"); + this.subtype.add(SubType.WEREWOLF); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShuCavalry.java b/Mage.Sets/src/mage/cards/s/ShuCavalry.java index c57fbbfe3b..a962e6a29f 100644 --- a/Mage.Sets/src/mage/cards/s/ShuCavalry.java +++ b/Mage.Sets/src/mage/cards/s/ShuCavalry.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class ShuCavalry extends CardImpl { public ShuCavalry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShuDefender.java b/Mage.Sets/src/mage/cards/s/ShuDefender.java index 4cb3a1a808..b7299bb1c7 100644 --- a/Mage.Sets/src/mage/cards/s/ShuDefender.java +++ b/Mage.Sets/src/mage/cards/s/ShuDefender.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,8 +45,8 @@ public class ShuDefender extends CardImpl { public ShuDefender(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShuEliteCompanions.java b/Mage.Sets/src/mage/cards/s/ShuEliteCompanions.java index 86407fc6b2..5e15986905 100644 --- a/Mage.Sets/src/mage/cards/s/ShuEliteCompanions.java +++ b/Mage.Sets/src/mage/cards/s/ShuEliteCompanions.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class ShuEliteCompanions extends CardImpl { public ShuEliteCompanions(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShuEliteInfantry.java b/Mage.Sets/src/mage/cards/s/ShuEliteInfantry.java index 1e39f1921f..23b86af9ac 100644 --- a/Mage.Sets/src/mage/cards/s/ShuEliteInfantry.java +++ b/Mage.Sets/src/mage/cards/s/ShuEliteInfantry.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class ShuEliteInfantry extends CardImpl { public ShuEliteInfantry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShuFarmer.java b/Mage.Sets/src/mage/cards/s/ShuFarmer.java index a3a1ff7784..bfe2dc36c8 100644 --- a/Mage.Sets/src/mage/cards/s/ShuFarmer.java +++ b/Mage.Sets/src/mage/cards/s/ShuFarmer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class ShuFarmer extends CardImpl { public ShuFarmer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/ShuFootSoldiers.java b/Mage.Sets/src/mage/cards/s/ShuFootSoldiers.java index bb7dcb2f4f..d09878a7c3 100644 --- a/Mage.Sets/src/mage/cards/s/ShuFootSoldiers.java +++ b/Mage.Sets/src/mage/cards/s/ShuFootSoldiers.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class ShuFootSoldiers extends CardImpl { public ShuFootSoldiers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/ShuGeneral.java b/Mage.Sets/src/mage/cards/s/ShuGeneral.java index d39e1d55a9..c4f58cda99 100644 --- a/Mage.Sets/src/mage/cards/s/ShuGeneral.java +++ b/Mage.Sets/src/mage/cards/s/ShuGeneral.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ShuGeneral extends CardImpl { public ShuGeneral(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShuGrainCaravan.java b/Mage.Sets/src/mage/cards/s/ShuGrainCaravan.java index 9745fc4a1d..2e1f88c954 100644 --- a/Mage.Sets/src/mage/cards/s/ShuGrainCaravan.java +++ b/Mage.Sets/src/mage/cards/s/ShuGrainCaravan.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ShuGrainCaravan extends CardImpl { public ShuGrainCaravan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/ShuSoldierFarmers.java b/Mage.Sets/src/mage/cards/s/ShuSoldierFarmers.java index ddab59ba8a..1e58333ba7 100644 --- a/Mage.Sets/src/mage/cards/s/ShuSoldierFarmers.java +++ b/Mage.Sets/src/mage/cards/s/ShuSoldierFarmers.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ShuSoldierFarmers extends CardImpl { public ShuSoldierFarmers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/ShuYunTheSilentTempest.java b/Mage.Sets/src/mage/cards/s/ShuYunTheSilentTempest.java index e5a87d02e1..a4947565a1 100644 --- a/Mage.Sets/src/mage/cards/s/ShuYunTheSilentTempest.java +++ b/Mage.Sets/src/mage/cards/s/ShuYunTheSilentTempest.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.filter.FilterSpell; @@ -61,8 +62,8 @@ public class ShuYunTheSilentTempest extends CardImpl { public ShuYunTheSilentTempest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Shuko.java b/Mage.Sets/src/mage/cards/s/Shuko.java index c3965c368e..db76a5e933 100644 --- a/Mage.Sets/src/mage/cards/s/Shuko.java +++ b/Mage.Sets/src/mage/cards/s/Shuko.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class Shuko extends CardImpl { public Shuko(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 0))); // Equip {0} diff --git a/Mage.Sets/src/mage/cards/s/Shuriken.java b/Mage.Sets/src/mage/cards/s/Shuriken.java index 45ddade299..35b5bbedac 100644 --- a/Mage.Sets/src/mage/cards/s/Shuriken.java +++ b/Mage.Sets/src/mage/cards/s/Shuriken.java @@ -57,7 +57,7 @@ public class Shuriken extends CardImpl { public Shuriken(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has "{tap}, Unattach Shuriken: Shuriken deals 2 damage to target creature. That creature's controller gains control of Shuriken unless it was unattached from a Ninja." Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ShurikenDamageEffect(), new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/s/SibilantSpirit.java b/Mage.Sets/src/mage/cards/s/SibilantSpirit.java index 5d7860d844..8720b40d10 100644 --- a/Mage.Sets/src/mage/cards/s/SibilantSpirit.java +++ b/Mage.Sets/src/mage/cards/s/SibilantSpirit.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -48,7 +49,7 @@ public class SibilantSpirit extends CardImpl { public SibilantSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SibsigHost.java b/Mage.Sets/src/mage/cards/s/SibsigHost.java index d0083da05a..5d9166ea2b 100644 --- a/Mage.Sets/src/mage/cards/s/SibsigHost.java +++ b/Mage.Sets/src/mage/cards/s/SibsigHost.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveEachPlayerEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -44,7 +45,7 @@ public class SibsigHost extends CardImpl { public SibsigHost(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SibsigIcebreakers.java b/Mage.Sets/src/mage/cards/s/SibsigIcebreakers.java index cdc6df7820..427d6bfd50 100644 --- a/Mage.Sets/src/mage/cards/s/SibsigIcebreakers.java +++ b/Mage.Sets/src/mage/cards/s/SibsigIcebreakers.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SibsigIcebreakers extends CardImpl { public SibsigIcebreakers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SibsigMuckdraggers.java b/Mage.Sets/src/mage/cards/s/SibsigMuckdraggers.java index f605bf0fc6..e9f1681d12 100644 --- a/Mage.Sets/src/mage/cards/s/SibsigMuckdraggers.java +++ b/Mage.Sets/src/mage/cards/s/SibsigMuckdraggers.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DelveAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; @@ -47,7 +48,7 @@ public class SibsigMuckdraggers extends CardImpl { public SibsigMuckdraggers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{8}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/Sicken.java b/Mage.Sets/src/mage/cards/s/Sicken.java index ac9348b731..7a8c912285 100644 --- a/Mage.Sets/src/mage/cards/s/Sicken.java +++ b/Mage.Sets/src/mage/cards/s/Sicken.java @@ -49,7 +49,7 @@ public class Sicken extends CardImpl { public Sicken(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/SickleRipper.java b/Mage.Sets/src/mage/cards/s/SickleRipper.java index 0e23223c91..18184411d0 100644 --- a/Mage.Sets/src/mage/cards/s/SickleRipper.java +++ b/Mage.Sets/src/mage/cards/s/SickleRipper.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class SickleRipper extends CardImpl { public SickleRipper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Elemental"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Sickleslicer.java b/Mage.Sets/src/mage/cards/s/Sickleslicer.java index 42d5af5bb6..e302c797f9 100644 --- a/Mage.Sets/src/mage/cards/s/Sickleslicer.java +++ b/Mage.Sets/src/mage/cards/s/Sickleslicer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.LivingWeaponAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class Sickleslicer extends CardImpl { public Sickleslicer (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(4))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2))); this.addAbility(new LivingWeaponAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SidarJabari.java b/Mage.Sets/src/mage/cards/s/SidarJabari.java index f1ddedcc2a..f0c817878c 100644 --- a/Mage.Sets/src/mage/cards/s/SidarJabari.java +++ b/Mage.Sets/src/mage/cards/s/SidarJabari.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlankingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; @@ -53,8 +54,8 @@ public class SidarJabari extends CardImpl { public SidarJabari(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SidarKondoOfJamuraa.java b/Mage.Sets/src/mage/cards/s/SidarKondoOfJamuraa.java index f83640c3bf..fc3c2c5a75 100644 --- a/Mage.Sets/src/mage/cards/s/SidarKondoOfJamuraa.java +++ b/Mage.Sets/src/mage/cards/s/SidarKondoOfJamuraa.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.SuperType; @@ -65,8 +66,8 @@ public class SidarKondoOfJamuraa extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SidewinderNaga.java b/Mage.Sets/src/mage/cards/s/SidewinderNaga.java index 6b73fb2eaa..1ebed51f78 100644 --- a/Mage.Sets/src/mage/cards/s/SidewinderNaga.java +++ b/Mage.Sets/src/mage/cards/s/SidewinderNaga.java @@ -59,8 +59,8 @@ public class SidewinderNaga extends CardImpl { public SidewinderNaga(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Naga"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SidewinderSliver.java b/Mage.Sets/src/mage/cards/s/SidewinderSliver.java index c3a0d1639b..2feea699fc 100644 --- a/Mage.Sets/src/mage/cards/s/SidewinderSliver.java +++ b/Mage.Sets/src/mage/cards/s/SidewinderSliver.java @@ -48,20 +48,23 @@ import mage.filter.predicate.mageobject.SubtypePredicate; public class SidewinderSliver extends CardImpl { static final private FilterCreaturePermanent filter = new FilterCreaturePermanent("All Sliver creatures"); - - static{ + + static { filter.add(new SubtypePredicate(SubType.SLIVER)); } - + public SidewinderSliver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Sliver"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); // All Sliver creatures have flanking. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new FlankingAbility(), Duration.WhileOnBattlefield, filter, false))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAllEffect(new FlankingAbility(), Duration.WhileOnBattlefield, filter, false) + .setText("all Slivers have flanking") + )); } public SidewinderSliver(final SidewinderSliver card) { diff --git a/Mage.Sets/src/mage/cards/s/SidisiBroodTyrant.java b/Mage.Sets/src/mage/cards/s/SidisiBroodTyrant.java index 865d881fdd..94ceb600e4 100644 --- a/Mage.Sets/src/mage/cards/s/SidisiBroodTyrant.java +++ b/Mage.Sets/src/mage/cards/s/SidisiBroodTyrant.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.game.Game; @@ -54,8 +55,8 @@ public class SidisiBroodTyrant extends CardImpl { public SidisiBroodTyrant(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{G}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Naga"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SidisiUndeadVizier.java b/Mage.Sets/src/mage/cards/s/SidisiUndeadVizier.java index ddac10fa65..ce1dfe0abc 100644 --- a/Mage.Sets/src/mage/cards/s/SidisiUndeadVizier.java +++ b/Mage.Sets/src/mage/cards/s/SidisiUndeadVizier.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ExploitAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.FilterCard; import mage.target.common.TargetCardInLibrary; @@ -49,8 +50,8 @@ public class SidisiUndeadVizier extends CardImpl { public SidisiUndeadVizier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Zombie"); - this.subtype.add("Naga"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.NAGA); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SidisisFaithful.java b/Mage.Sets/src/mage/cards/s/SidisisFaithful.java index 7dbf186b6d..ddcaa87725 100644 --- a/Mage.Sets/src/mage/cards/s/SidisisFaithful.java +++ b/Mage.Sets/src/mage/cards/s/SidisisFaithful.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ExploitAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -46,8 +47,8 @@ public class SidisisFaithful extends CardImpl { public SidisisFaithful(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Naga"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SidisisPet.java b/Mage.Sets/src/mage/cards/s/SidisisPet.java index 65bdcbc01d..2ba9f9d2b8 100644 --- a/Mage.Sets/src/mage/cards/s/SidisisPet.java +++ b/Mage.Sets/src/mage/cards/s/SidisisPet.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class SidisisPet extends CardImpl { public SidisisPet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Ape"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.APE); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SiegeBehemoth.java b/Mage.Sets/src/mage/cards/s/SiegeBehemoth.java index 60d20fda97..c9d96b68e1 100644 --- a/Mage.Sets/src/mage/cards/s/SiegeBehemoth.java +++ b/Mage.Sets/src/mage/cards/s/SiegeBehemoth.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -52,7 +53,7 @@ public class SiegeBehemoth extends CardImpl { public SiegeBehemoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(7); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SiegeDragon.java b/Mage.Sets/src/mage/cards/s/SiegeDragon.java index fef983d447..90b3b4ac1c 100644 --- a/Mage.Sets/src/mage/cards/s/SiegeDragon.java +++ b/Mage.Sets/src/mage/cards/s/SiegeDragon.java @@ -65,7 +65,7 @@ public class SiegeDragon extends CardImpl { public SiegeDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SiegeGangCommander.java b/Mage.Sets/src/mage/cards/s/SiegeGangCommander.java index 03a8e6c47f..4e92042a52 100644 --- a/Mage.Sets/src/mage/cards/s/SiegeGangCommander.java +++ b/Mage.Sets/src/mage/cards/s/SiegeGangCommander.java @@ -61,7 +61,7 @@ public class SiegeGangCommander extends CardImpl { public SiegeGangCommander(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SiegeMastodon.java b/Mage.Sets/src/mage/cards/s/SiegeMastodon.java index 5620be8d98..3abc0125dd 100644 --- a/Mage.Sets/src/mage/cards/s/SiegeMastodon.java +++ b/Mage.Sets/src/mage/cards/s/SiegeMastodon.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SiegeMastodon extends CardImpl { public SiegeMastodon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SiegeModification.java b/Mage.Sets/src/mage/cards/s/SiegeModification.java index b4861b1114..c41be17e04 100644 --- a/Mage.Sets/src/mage/cards/s/SiegeModification.java +++ b/Mage.Sets/src/mage/cards/s/SiegeModification.java @@ -61,7 +61,7 @@ public class SiegeModification extends CardImpl { public SiegeModification(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature or Vehicle TargetPermanent auraTarget = new TargetPermanent(filter); diff --git a/Mage.Sets/src/mage/cards/s/SiegeRhino.java b/Mage.Sets/src/mage/cards/s/SiegeRhino.java index 0537db232d..d91304d160 100644 --- a/Mage.Sets/src/mage/cards/s/SiegeRhino.java +++ b/Mage.Sets/src/mage/cards/s/SiegeRhino.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,7 +48,7 @@ public class SiegeRhino extends CardImpl { public SiegeRhino(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{B}{G}"); - this.subtype.add("Rhino"); + this.subtype.add(SubType.RHINO); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SiegeWurm.java b/Mage.Sets/src/mage/cards/s/SiegeWurm.java index baaeb7df62..8923d8e899 100644 --- a/Mage.Sets/src/mage/cards/s/SiegeWurm.java +++ b/Mage.Sets/src/mage/cards/s/SiegeWurm.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SiegeWurm extends CardImpl { public SiegeWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/Siegecraft.java b/Mage.Sets/src/mage/cards/s/Siegecraft.java index f66fe26069..388e3b1055 100644 --- a/Mage.Sets/src/mage/cards/s/Siegecraft.java +++ b/Mage.Sets/src/mage/cards/s/Siegecraft.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class Siegecraft extends CardImpl { public Siegecraft(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/SifterOfSkulls.java b/Mage.Sets/src/mage/cards/s/SifterOfSkulls.java index cdabd7cfaa..90dcc33fc4 100644 --- a/Mage.Sets/src/mage/cards/s/SifterOfSkulls.java +++ b/Mage.Sets/src/mage/cards/s/SifterOfSkulls.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -59,7 +60,7 @@ public class SifterOfSkulls extends CardImpl { public SifterOfSkulls(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SifterWurm.java b/Mage.Sets/src/mage/cards/s/SifterWurm.java index e464f98f74..e2aca344a2 100644 --- a/Mage.Sets/src/mage/cards/s/SifterWurm.java +++ b/Mage.Sets/src/mage/cards/s/SifterWurm.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -53,7 +54,7 @@ public class SifterWurm extends CardImpl { public SifterWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/s/SigardaHeronsGrace.java b/Mage.Sets/src/mage/cards/s/SigardaHeronsGrace.java index 4a11c173a2..2df5794625 100644 --- a/Mage.Sets/src/mage/cards/s/SigardaHeronsGrace.java +++ b/Mage.Sets/src/mage/cards/s/SigardaHeronsGrace.java @@ -63,7 +63,7 @@ public class SigardaHeronsGrace extends CardImpl { public SigardaHeronsGrace(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SigardaHostOfHerons.java b/Mage.Sets/src/mage/cards/s/SigardaHostOfHerons.java index 382e6eae86..d096b02f28 100644 --- a/Mage.Sets/src/mage/cards/s/SigardaHostOfHerons.java +++ b/Mage.Sets/src/mage/cards/s/SigardaHostOfHerons.java @@ -53,7 +53,7 @@ public class SigardaHostOfHerons extends CardImpl { public SigardaHostOfHerons(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SigardianPriest.java b/Mage.Sets/src/mage/cards/s/SigardianPriest.java index 0cb8869eb5..482a71bc98 100644 --- a/Mage.Sets/src/mage/cards/s/SigardianPriest.java +++ b/Mage.Sets/src/mage/cards/s/SigardianPriest.java @@ -58,8 +58,8 @@ public class SigardianPriest extends CardImpl { public SigardianPriest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SightOfTheScalelords.java b/Mage.Sets/src/mage/cards/s/SightOfTheScalelords.java index 1ddb95a8b7..77fbf8d6b7 100644 --- a/Mage.Sets/src/mage/cards/s/SightOfTheScalelords.java +++ b/Mage.Sets/src/mage/cards/s/SightOfTheScalelords.java @@ -59,11 +59,11 @@ public class SightOfTheScalelords extends CardImpl { } public SightOfTheScalelords(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{G}"); // At the beginning of combat on your turn, creature you control with toughness 4 or greater get +2/+2 and gain vigilance until end of turn. - Effect effect = new BoostControlledEffect(2,2,Duration.EndOfTurn, filter, false); - effect.setText("creature you control with toughness 4 or greater get +2/+2"); + Effect effect = new BoostControlledEffect(2, 2, Duration.EndOfTurn, filter, false); + effect.setText("creatures you control with toughness 4 or greater get +2/+2"); Ability ability = new BeginningOfCombatTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false, false); effect = new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn, filter); effect.setText("and gain vigilance until end of turn"); diff --git a/Mage.Sets/src/mage/cards/s/SightedCasteSorcerer.java b/Mage.Sets/src/mage/cards/s/SightedCasteSorcerer.java index 8d84d174d7..6c7c0979e5 100644 --- a/Mage.Sets/src/mage/cards/s/SightedCasteSorcerer.java +++ b/Mage.Sets/src/mage/cards/s/SightedCasteSorcerer.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class SightedCasteSorcerer extends CardImpl { public SightedCasteSorcerer (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SightlessBrawler.java b/Mage.Sets/src/mage/cards/s/SightlessBrawler.java index dc6bdd46b1..b9ccdbf719 100644 --- a/Mage.Sets/src/mage/cards/s/SightlessBrawler.java +++ b/Mage.Sets/src/mage/cards/s/SightlessBrawler.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class SightlessBrawler extends CardImpl { public SightlessBrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SightlessGhoul.java b/Mage.Sets/src/mage/cards/s/SightlessGhoul.java index 6ae86f86f5..cc48420186 100644 --- a/Mage.Sets/src/mage/cards/s/SightlessGhoul.java +++ b/Mage.Sets/src/mage/cards/s/SightlessGhoul.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.UndyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SightlessGhoul extends CardImpl { public SightlessGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SigilCaptain.java b/Mage.Sets/src/mage/cards/s/SigilCaptain.java index 1d4ffd844b..14484d63b7 100644 --- a/Mage.Sets/src/mage/cards/s/SigilCaptain.java +++ b/Mage.Sets/src/mage/cards/s/SigilCaptain.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -51,8 +52,8 @@ public class SigilCaptain extends CardImpl { public SigilCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}{W}"); - this.subtype.add("Rhino"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.RHINO); + this.subtype.add(SubType.SOLDIER); diff --git a/Mage.Sets/src/mage/cards/s/SigilOfDistinction.java b/Mage.Sets/src/mage/cards/s/SigilOfDistinction.java index 73c02aaa26..e57fe46b7e 100644 --- a/Mage.Sets/src/mage/cards/s/SigilOfDistinction.java +++ b/Mage.Sets/src/mage/cards/s/SigilOfDistinction.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -49,7 +50,7 @@ public class SigilOfDistinction extends CardImpl { public SigilOfDistinction(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{X}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Sigil of Distinction enters the battlefield with X charge counters on it. this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.CHARGE.createInstance()))); diff --git a/Mage.Sets/src/mage/cards/s/SigilOfSleep.java b/Mage.Sets/src/mage/cards/s/SigilOfSleep.java index f268ec8445..ec67d4af28 100644 --- a/Mage.Sets/src/mage/cards/s/SigilOfSleep.java +++ b/Mage.Sets/src/mage/cards/s/SigilOfSleep.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; @@ -56,7 +57,7 @@ public class SigilOfSleep extends CardImpl { public SigilOfSleep(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SigilOfTheNayanGods.java b/Mage.Sets/src/mage/cards/s/SigilOfTheNayanGods.java index 6a485a5c90..d994e3569f 100644 --- a/Mage.Sets/src/mage/cards/s/SigilOfTheNayanGods.java +++ b/Mage.Sets/src/mage/cards/s/SigilOfTheNayanGods.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class SigilOfTheNayanGods extends CardImpl { public SigilOfTheNayanGods(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SigilOfTheNewDawn.java b/Mage.Sets/src/mage/cards/s/SigilOfTheNewDawn.java new file mode 100644 index 0000000000..49a171bb60 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SigilOfTheNewDawn.java @@ -0,0 +1,67 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.StaticFilters; + +/** + * + * @author TheElk801 + */ +public class SigilOfTheNewDawn extends CardImpl { + + public SigilOfTheNewDawn(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + + // Whenever a creature is put into your graveyard from the battlefield, you may pay {1}{W}. If you do, return that card to your hand. + Effect effect = new ReturnFromGraveyardToHandTargetEffect(); + effect.setText("return that card to your hand"); + this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility( + new DoIfCostPaid(effect, new ManaCostsImpl("{1}{W}")), + false, StaticFilters.FILTER_PERMANENT_A_CREATURE, true, true + )); + } + + public SigilOfTheNewDawn(final SigilOfTheNewDawn card) { + super(card); + } + + @Override + public SigilOfTheNewDawn copy() { + return new SigilOfTheNewDawn(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SigilOfValor.java b/Mage.Sets/src/mage/cards/s/SigilOfValor.java index 18a6a59edb..6b0c80f6ab 100644 --- a/Mage.Sets/src/mage/cards/s/SigilOfValor.java +++ b/Mage.Sets/src/mage/cards/s/SigilOfValor.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class SigilOfValor extends CardImpl { public SigilOfValor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Whenever equipped creature attacks alone, it gets +1/+1 until end of turn for each other creature you control. this.addAbility(new SigilOfValorTriggeredAbility(new SigilOfValorCount())); diff --git a/Mage.Sets/src/mage/cards/s/SigilTracer.java b/Mage.Sets/src/mage/cards/s/SigilTracer.java index fce837b475..21dbf62e57 100644 --- a/Mage.Sets/src/mage/cards/s/SigilTracer.java +++ b/Mage.Sets/src/mage/cards/s/SigilTracer.java @@ -61,8 +61,8 @@ public class SigilTracer extends CardImpl { public SigilTracer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SigiledBehemoth.java b/Mage.Sets/src/mage/cards/s/SigiledBehemoth.java index 436c3c07f6..16c767af00 100644 --- a/Mage.Sets/src/mage/cards/s/SigiledBehemoth.java +++ b/Mage.Sets/src/mage/cards/s/SigiledBehemoth.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ExaltedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SigiledBehemoth extends CardImpl { public SigiledBehemoth (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{W}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SigiledPaladin.java b/Mage.Sets/src/mage/cards/s/SigiledPaladin.java index c24458b71a..227470c6e2 100644 --- a/Mage.Sets/src/mage/cards/s/SigiledPaladin.java +++ b/Mage.Sets/src/mage/cards/s/SigiledPaladin.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class SigiledPaladin extends CardImpl { public SigiledPaladin (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SigiledSkink.java b/Mage.Sets/src/mage/cards/s/SigiledSkink.java index 6d7d443337..acd0850085 100644 --- a/Mage.Sets/src/mage/cards/s/SigiledSkink.java +++ b/Mage.Sets/src/mage/cards/s/SigiledSkink.java @@ -34,6 +34,7 @@ import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SigiledSkink extends CardImpl { public SigiledSkink(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SigiledStarfish.java b/Mage.Sets/src/mage/cards/s/SigiledStarfish.java index 101f419764..15d36c8b3b 100644 --- a/Mage.Sets/src/mage/cards/s/SigiledStarfish.java +++ b/Mage.Sets/src/mage/cards/s/SigiledStarfish.java @@ -35,6 +35,7 @@ import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class SigiledStarfish extends CardImpl { public SigiledStarfish(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Starfish"); + this.subtype.add(SubType.STARFISH); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SignalPest.java b/Mage.Sets/src/mage/cards/s/SignalPest.java index 3cdbcce162..a98a838e97 100644 --- a/Mage.Sets/src/mage/cards/s/SignalPest.java +++ b/Mage.Sets/src/mage/cards/s/SignalPest.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -61,7 +62,7 @@ public class SignalPest extends CardImpl { public SignalPest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}"); - this.subtype.add("Pest"); + this.subtype.add(SubType.PEST); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SilasRennSeekerAdept.java b/Mage.Sets/src/mage/cards/s/SilasRennSeekerAdept.java index d195a12f93..81a78149d4 100644 --- a/Mage.Sets/src/mage/cards/s/SilasRennSeekerAdept.java +++ b/Mage.Sets/src/mage/cards/s/SilasRennSeekerAdept.java @@ -54,7 +54,7 @@ public class SilasRennSeekerAdept extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SilburlindSnapper.java b/Mage.Sets/src/mage/cards/s/SilburlindSnapper.java index e2ed528ea4..93b45b4341 100644 --- a/Mage.Sets/src/mage/cards/s/SilburlindSnapper.java +++ b/Mage.Sets/src/mage/cards/s/SilburlindSnapper.java @@ -36,6 +36,7 @@ import mage.abilities.effects.RestrictionEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class SilburlindSnapper extends CardImpl { public SilburlindSnapper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Turtle"); + this.subtype.add(SubType.TURTLE); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SilenceTheBelievers.java b/Mage.Sets/src/mage/cards/s/SilenceTheBelievers.java index 6ec74cc10a..e7e06d14ab 100644 --- a/Mage.Sets/src/mage/cards/s/SilenceTheBelievers.java +++ b/Mage.Sets/src/mage/cards/s/SilenceTheBelievers.java @@ -33,6 +33,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -100,7 +101,7 @@ class SilenceTheBelieversExileEffect extends OneShotEffect { List attachments = new ArrayList<>(creature.getAttachments()); for (UUID attachmentId: attachments) { Permanent attachment = game.getPermanent(attachmentId); - if (attachment != null && attachment.getSubtype(game).contains("Aura")) { + if (attachment != null && attachment.hasSubtype(SubType.AURA, game)) { controller.moveCardToExileWithInfo(attachment, null, null, source.getSourceId(), game, Zone.BATTLEFIELD, true); } } diff --git a/Mage.Sets/src/mage/cards/s/SilentArbiter.java b/Mage.Sets/src/mage/cards/s/SilentArbiter.java index 9cc4ca89ac..c12fc841c5 100644 --- a/Mage.Sets/src/mage/cards/s/SilentArbiter.java +++ b/Mage.Sets/src/mage/cards/s/SilentArbiter.java @@ -35,6 +35,7 @@ import mage.abilities.effects.RestrictionEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -48,7 +49,7 @@ public class SilentArbiter extends CardImpl { public SilentArbiter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SilentArtisan.java b/Mage.Sets/src/mage/cards/s/SilentArtisan.java index 662f598448..a9aa06cd89 100644 --- a/Mage.Sets/src/mage/cards/s/SilentArtisan.java +++ b/Mage.Sets/src/mage/cards/s/SilentArtisan.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class SilentArtisan extends CardImpl { public SilentArtisan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SilentAttendant.java b/Mage.Sets/src/mage/cards/s/SilentAttendant.java index 1cd2d437ad..1c4a157505 100644 --- a/Mage.Sets/src/mage/cards/s/SilentAttendant.java +++ b/Mage.Sets/src/mage/cards/s/SilentAttendant.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class SilentAttendant extends CardImpl { public SilentAttendant (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SilentBladeOni.java b/Mage.Sets/src/mage/cards/s/SilentBladeOni.java index b34542386e..59b9ffce96 100644 --- a/Mage.Sets/src/mage/cards/s/SilentBladeOni.java +++ b/Mage.Sets/src/mage/cards/s/SilentBladeOni.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterNonlandCard; @@ -55,8 +56,8 @@ public class SilentBladeOni extends CardImpl { public SilentBladeOni(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}{B}{B}"); - this.subtype.add("Demon"); - this.subtype.add("Ninja"); + this.subtype.add(SubType.DEMON); + this.subtype.add(SubType.NINJA); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SilentChantZubera.java b/Mage.Sets/src/mage/cards/s/SilentChantZubera.java index 9eec4f2f1d..cdc827bf4d 100644 --- a/Mage.Sets/src/mage/cards/s/SilentChantZubera.java +++ b/Mage.Sets/src/mage/cards/s/SilentChantZubera.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.Game; import mage.watchers.common.ZuberasDiedWatcher; @@ -49,8 +50,8 @@ public class SilentChantZubera extends CardImpl { public SilentChantZubera (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Zubera"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.ZUBERA); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SilentObserver.java b/Mage.Sets/src/mage/cards/s/SilentObserver.java index 96d21f54f6..c2bc61e34e 100644 --- a/Mage.Sets/src/mage/cards/s/SilentObserver.java +++ b/Mage.Sets/src/mage/cards/s/SilentObserver.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SilentObserver extends CardImpl { public SilentObserver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SilentSentinel.java b/Mage.Sets/src/mage/cards/s/SilentSentinel.java index 3f368356ad..c7989609e5 100644 --- a/Mage.Sets/src/mage/cards/s/SilentSentinel.java +++ b/Mage.Sets/src/mage/cards/s/SilentSentinel.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -56,7 +57,7 @@ public class SilentSentinel extends CardImpl { public SilentSentinel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); - this.subtype.add("Archon"); + this.subtype.add(SubType.ARCHON); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SilentSkimmer.java b/Mage.Sets/src/mage/cards/s/SilentSkimmer.java index 3d2c0d504d..90530c5077 100644 --- a/Mage.Sets/src/mage/cards/s/SilentSkimmer.java +++ b/Mage.Sets/src/mage/cards/s/SilentSkimmer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class SilentSkimmer extends CardImpl { public SilentSkimmer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SilentSpecter.java b/Mage.Sets/src/mage/cards/s/SilentSpecter.java index 5fc27725ea..3e3f9f00e6 100644 --- a/Mage.Sets/src/mage/cards/s/SilentSpecter.java +++ b/Mage.Sets/src/mage/cards/s/SilentSpecter.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class SilentSpecter extends CardImpl { public SilentSpecter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Specter"); + this.subtype.add(SubType.SPECTER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SilhanaLedgewalker.java b/Mage.Sets/src/mage/cards/s/SilhanaLedgewalker.java index d285568539..5440cb7b02 100644 --- a/Mage.Sets/src/mage/cards/s/SilhanaLedgewalker.java +++ b/Mage.Sets/src/mage/cards/s/SilhanaLedgewalker.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -51,8 +52,8 @@ public class SilhanaLedgewalker extends CardImpl { public SilhanaLedgewalker (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SilhanaStarfletcher.java b/Mage.Sets/src/mage/cards/s/SilhanaStarfletcher.java index b264813847..95eb0cd35a 100644 --- a/Mage.Sets/src/mage/cards/s/SilhanaStarfletcher.java +++ b/Mage.Sets/src/mage/cards/s/SilhanaStarfletcher.java @@ -41,6 +41,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,9 +56,9 @@ public class SilhanaStarfletcher extends CardImpl { public SilhanaStarfletcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); - this.subtype.add("Archer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SilkbindFaerie.java b/Mage.Sets/src/mage/cards/s/SilkbindFaerie.java index 4c50b213db..ea90050d21 100644 --- a/Mage.Sets/src/mage/cards/s/SilkbindFaerie.java +++ b/Mage.Sets/src/mage/cards/s/SilkbindFaerie.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class SilkbindFaerie extends CardImpl { public SilkbindFaerie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W/U}"); - this.subtype.add("Faerie"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SilkenfistFighter.java b/Mage.Sets/src/mage/cards/s/SilkenfistFighter.java index ddd2988c99..ea82d7e92b 100644 --- a/Mage.Sets/src/mage/cards/s/SilkenfistFighter.java +++ b/Mage.Sets/src/mage/cards/s/SilkenfistFighter.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class SilkenfistFighter extends CardImpl { public SilkenfistFighter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SilkenfistOrder.java b/Mage.Sets/src/mage/cards/s/SilkenfistOrder.java index ae1e71345c..a6fc63124f 100644 --- a/Mage.Sets/src/mage/cards/s/SilkenfistOrder.java +++ b/Mage.Sets/src/mage/cards/s/SilkenfistOrder.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class SilkenfistOrder extends CardImpl { public SilkenfistOrder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SilklashSpider.java b/Mage.Sets/src/mage/cards/s/SilklashSpider.java index 64e394f524..0e33bf106c 100644 --- a/Mage.Sets/src/mage/cards/s/SilklashSpider.java +++ b/Mage.Sets/src/mage/cards/s/SilklashSpider.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -56,7 +57,7 @@ public class SilklashSpider extends CardImpl { public SilklashSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(2); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/s/SilkweaverElite.java b/Mage.Sets/src/mage/cards/s/SilkweaverElite.java index 707dc47b2c..83c9e673a3 100644 --- a/Mage.Sets/src/mage/cards/s/SilkweaverElite.java +++ b/Mage.Sets/src/mage/cards/s/SilkweaverElite.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.watchers.common.RevoltWatcher; /** @@ -49,8 +50,8 @@ public class SilkweaverElite extends CardImpl { public SilkweaverElite(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Archer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SilkwingScout.java b/Mage.Sets/src/mage/cards/s/SilkwingScout.java index d68c717caa..46f03ad004 100644 --- a/Mage.Sets/src/mage/cards/s/SilkwingScout.java +++ b/Mage.Sets/src/mage/cards/s/SilkwingScout.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; @@ -51,8 +52,8 @@ public class SilkwingScout extends CardImpl { public SilkwingScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Scout"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SiltCrawler.java b/Mage.Sets/src/mage/cards/s/SiltCrawler.java index 9c045bb5ca..b2d62773ff 100644 --- a/Mage.Sets/src/mage/cards/s/SiltCrawler.java +++ b/Mage.Sets/src/mage/cards/s/SiltCrawler.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.TapAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledLandPermanent; /** @@ -44,7 +45,7 @@ public class SiltCrawler extends CardImpl { public SiltCrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SilumgarAssassin.java b/Mage.Sets/src/mage/cards/s/SilumgarAssassin.java index e9d41f4d09..2e82fbe717 100644 --- a/Mage.Sets/src/mage/cards/s/SilumgarAssassin.java +++ b/Mage.Sets/src/mage/cards/s/SilumgarAssassin.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.TargetController; import mage.constants.Zone; @@ -62,8 +63,8 @@ public class SilumgarAssassin extends CardImpl { public SilumgarAssassin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SilumgarButcher.java b/Mage.Sets/src/mage/cards/s/SilumgarButcher.java index 1c685dc8fc..a5b1348340 100644 --- a/Mage.Sets/src/mage/cards/s/SilumgarButcher.java +++ b/Mage.Sets/src/mage/cards/s/SilumgarButcher.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ExploitAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -47,8 +48,8 @@ public class SilumgarButcher extends CardImpl { public SilumgarButcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.DJINN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SilumgarMonument.java b/Mage.Sets/src/mage/cards/s/SilumgarMonument.java index 626fdc4eb2..4c9369748d 100644 --- a/Mage.Sets/src/mage/cards/s/SilumgarMonument.java +++ b/Mage.Sets/src/mage/cards/s/SilumgarMonument.java @@ -38,6 +38,7 @@ import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -76,7 +77,7 @@ private static class OjutaiMonumentToken extends Token { cardType.add(CardType.CREATURE); color.setBlue(true); color.setBlack(true); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); power = new MageInt(4); toughness = new MageInt(4); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/s/SilumgarSorcerer.java b/Mage.Sets/src/mage/cards/s/SilumgarSorcerer.java index 0b7949c94f..855e11a213 100644 --- a/Mage.Sets/src/mage/cards/s/SilumgarSorcerer.java +++ b/Mage.Sets/src/mage/cards/s/SilumgarSorcerer.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.TargetSpell; @@ -56,8 +57,8 @@ public class SilumgarSorcerer extends CardImpl { public SilumgarSorcerer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SilumgarSpellEater.java b/Mage.Sets/src/mage/cards/s/SilumgarSpellEater.java index 4a404088aa..b065376a2f 100644 --- a/Mage.Sets/src/mage/cards/s/SilumgarSpellEater.java +++ b/Mage.Sets/src/mage/cards/s/SilumgarSpellEater.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetSpell; /** @@ -48,8 +49,8 @@ public class SilumgarSpellEater extends CardImpl { public SilumgarSpellEater(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Naga"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SilumgarTheDriftingDeath.java b/Mage.Sets/src/mage/cards/s/SilumgarTheDriftingDeath.java index 4bf8295d70..c9211e3c90 100644 --- a/Mage.Sets/src/mage/cards/s/SilumgarTheDriftingDeath.java +++ b/Mage.Sets/src/mage/cards/s/SilumgarTheDriftingDeath.java @@ -62,7 +62,7 @@ public class SilumgarTheDriftingDeath extends CardImpl { public SilumgarTheDriftingDeath(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(3); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/s/SilverDrake.java b/Mage.Sets/src/mage/cards/s/SilverDrake.java index 029bb88576..e6932f152b 100644 --- a/Mage.Sets/src/mage/cards/s/SilverDrake.java +++ b/Mage.Sets/src/mage/cards/s/SilverDrake.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -55,7 +56,7 @@ public class SilverDrake extends CardImpl { public SilverDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SilverErne.java b/Mage.Sets/src/mage/cards/s/SilverErne.java index df1f45df3b..3e4bed7776 100644 --- a/Mage.Sets/src/mage/cards/s/SilverErne.java +++ b/Mage.Sets/src/mage/cards/s/SilverErne.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SilverErne extends CardImpl { public SilverErne(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SilverInlaidDagger.java b/Mage.Sets/src/mage/cards/s/SilverInlaidDagger.java index ac823b780d..d43aa7d625 100644 --- a/Mage.Sets/src/mage/cards/s/SilverInlaidDagger.java +++ b/Mage.Sets/src/mage/cards/s/SilverInlaidDagger.java @@ -50,7 +50,7 @@ public class SilverInlaidDagger extends CardImpl { public SilverInlaidDagger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equip {2} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); diff --git a/Mage.Sets/src/mage/cards/s/SilverKnight.java b/Mage.Sets/src/mage/cards/s/SilverKnight.java index 2f247dea35..8ccb130e9b 100644 --- a/Mage.Sets/src/mage/cards/s/SilverKnight.java +++ b/Mage.Sets/src/mage/cards/s/SilverKnight.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class SilverKnight extends CardImpl { public SilverKnight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SilverMyr.java b/Mage.Sets/src/mage/cards/s/SilverMyr.java index 3809198f44..2f670e9293 100644 --- a/Mage.Sets/src/mage/cards/s/SilverMyr.java +++ b/Mage.Sets/src/mage/cards/s/SilverMyr.java @@ -34,6 +34,7 @@ import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SilverMyr extends CardImpl { public SilverMyr (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(1); this.addAbility(new BlueManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SilverSeraph.java b/Mage.Sets/src/mage/cards/s/SilverSeraph.java index 9c7ba519f4..ef144844c6 100644 --- a/Mage.Sets/src/mage/cards/s/SilverSeraph.java +++ b/Mage.Sets/src/mage/cards/s/SilverSeraph.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class SilverSeraph extends CardImpl { public SilverSeraph(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SilverWyvern.java b/Mage.Sets/src/mage/cards/s/SilverWyvern.java index c4262d1f5e..a8eebea8aa 100644 --- a/Mage.Sets/src/mage/cards/s/SilverWyvern.java +++ b/Mage.Sets/src/mage/cards/s/SilverWyvern.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterStackObject; import mage.filter.predicate.Predicate; @@ -56,7 +57,7 @@ public class SilverWyvern extends CardImpl { public SilverWyvern(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SilverbackApe.java b/Mage.Sets/src/mage/cards/s/SilverbackApe.java index 2ee8dc21d6..aa45b76603 100644 --- a/Mage.Sets/src/mage/cards/s/SilverbackApe.java +++ b/Mage.Sets/src/mage/cards/s/SilverbackApe.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class SilverbackApe extends CardImpl { public SilverbackApe(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Ape"); + this.subtype.add(SubType.APE); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SilverbladePaladin.java b/Mage.Sets/src/mage/cards/s/SilverbladePaladin.java index 7824aebfe4..3cc74fcba0 100644 --- a/Mage.Sets/src/mage/cards/s/SilverbladePaladin.java +++ b/Mage.Sets/src/mage/cards/s/SilverbladePaladin.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SoulbondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class SilverbladePaladin extends CardImpl { public SilverbladePaladin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SilverchaseFox.java b/Mage.Sets/src/mage/cards/s/SilverchaseFox.java index f6e806eb09..ba452fc3c3 100644 --- a/Mage.Sets/src/mage/cards/s/SilverchaseFox.java +++ b/Mage.Sets/src/mage/cards/s/SilverchaseFox.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetEnchantmentPermanent; @@ -47,7 +48,7 @@ public class SilverchaseFox extends CardImpl { public SilverchaseFox(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Fox"); + this.subtype.add(SubType.FOX); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SilverclawGriffin.java b/Mage.Sets/src/mage/cards/s/SilverclawGriffin.java index 446cd852ee..cfa8c77f78 100644 --- a/Mage.Sets/src/mage/cards/s/SilverclawGriffin.java +++ b/Mage.Sets/src/mage/cards/s/SilverclawGriffin.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SilverclawGriffin extends CardImpl { public SilverclawGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SilvercoatLion.java b/Mage.Sets/src/mage/cards/s/SilvercoatLion.java index 23a5b81fb8..4ef41c63cc 100644 --- a/Mage.Sets/src/mage/cards/s/SilvercoatLion.java +++ b/Mage.Sets/src/mage/cards/s/SilvercoatLion.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SilvercoatLion extends CardImpl { public SilvercoatLion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SilverfurPartisan.java b/Mage.Sets/src/mage/cards/s/SilverfurPartisan.java index 1c72d89498..7cda52f3a3 100644 --- a/Mage.Sets/src/mage/cards/s/SilverfurPartisan.java +++ b/Mage.Sets/src/mage/cards/s/SilverfurPartisan.java @@ -56,8 +56,8 @@ public class SilverfurPartisan extends CardImpl { public SilverfurPartisan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Wolf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.WOLF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SilvergillAdept.java b/Mage.Sets/src/mage/cards/s/SilvergillAdept.java index edd2970b2e..8dd399e91b 100644 --- a/Mage.Sets/src/mage/cards/s/SilvergillAdept.java +++ b/Mage.Sets/src/mage/cards/s/SilvergillAdept.java @@ -56,8 +56,8 @@ public class SilvergillAdept extends CardImpl { public SilvergillAdept(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SilvergillDouser.java b/Mage.Sets/src/mage/cards/s/SilvergillDouser.java index 88d26a2893..568c3beea7 100644 --- a/Mage.Sets/src/mage/cards/s/SilvergillDouser.java +++ b/Mage.Sets/src/mage/cards/s/SilvergillDouser.java @@ -1,84 +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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.dynamicvalue.DynamicValue; -import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.dynamicvalue.common.StaticValue; -import mage.abilities.effects.common.continuous.BoostTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Styxo - */ -public class SilvergillDouser extends CardImpl { - - private static final FilterControlledPermanent filter = new FilterControlledPermanent("Merfolk and/or Faeries you control"); - - static { - filter.add(Predicates.or(new SubtypePredicate(SubType.MERFOLK), new SubtypePredicate(SubType.FAERIE))); - } - - public SilvergillDouser(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); - this.power = new MageInt(1); - this.toughness = new MageInt(1); - - // {tap}: Target creature gets -X/-0 until end of turn, where X is the number of Merfolk and/or Faeries you control. - DynamicValue number = new PermanentsOnBattlefieldCount(new FilterControlledPermanent(filter), -1); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(number, new StaticValue(0), Duration.EndOfTurn, true), new TapSourceCost()); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability); - } - - public SilvergillDouser(final SilvergillDouser card) { - super(card); - } - - @Override - public SilvergillDouser copy() { - return new SilvergillDouser(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Styxo + */ +public class SilvergillDouser extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Merfolk and/or Faeries you control"); + + static { + filter.add(Predicates.or(new SubtypePredicate(SubType.MERFOLK), new SubtypePredicate(SubType.FAERIE))); + } + + public SilvergillDouser(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Target creature gets -X/-0 until end of turn, where X is the number of Merfolk and/or Faeries you control. + DynamicValue number = new PermanentsOnBattlefieldCount(new FilterControlledPermanent(filter), -1); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(number, new StaticValue(0), Duration.EndOfTurn, true), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public SilvergillDouser(final SilvergillDouser card) { + super(card); + } + + @Override + public SilvergillDouser copy() { + return new SilvergillDouser(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SilvergladeElemental.java b/Mage.Sets/src/mage/cards/s/SilvergladeElemental.java index 8425d9ada3..cc6f535374 100644 --- a/Mage.Sets/src/mage/cards/s/SilvergladeElemental.java +++ b/Mage.Sets/src/mage/cards/s/SilvergladeElemental.java @@ -53,7 +53,7 @@ public class SilvergladeElemental extends CardImpl { public SilvergladeElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SilvergladePathfinder.java b/Mage.Sets/src/mage/cards/s/SilvergladePathfinder.java index 56ca7c33d1..2a2591bebf 100644 --- a/Mage.Sets/src/mage/cards/s/SilvergladePathfinder.java +++ b/Mage.Sets/src/mage/cards/s/SilvergladePathfinder.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; @@ -51,8 +52,8 @@ public class SilvergladePathfinder extends CardImpl { public SilvergladePathfinder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Dryad"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.DRYAD); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SilverpeltWerewolf.java b/Mage.Sets/src/mage/cards/s/SilverpeltWerewolf.java index 365c3b922a..ec16818439 100644 --- a/Mage.Sets/src/mage/cards/s/SilverpeltWerewolf.java +++ b/Mage.Sets/src/mage/cards/s/SilverpeltWerewolf.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -50,7 +51,7 @@ public class SilverpeltWerewolf extends CardImpl { public SilverpeltWerewolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},null); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.color.setGreen(true); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SilverskinArmor.java b/Mage.Sets/src/mage/cards/s/SilverskinArmor.java index 04d79fbf80..9dfbc072d7 100644 --- a/Mage.Sets/src/mage/cards/s/SilverskinArmor.java +++ b/Mage.Sets/src/mage/cards/s/SilverskinArmor.java @@ -45,7 +45,7 @@ public class SilverskinArmor extends CardImpl { public SilverskinArmor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new EquipAbility(Outcome.BoostCreature, new ManaCostsImpl("{2}"))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1, Duration.WhileOnBattlefield))); diff --git a/Mage.Sets/src/mage/cards/s/SilverstormSamurai.java b/Mage.Sets/src/mage/cards/s/SilverstormSamurai.java index ae17b375d1..5ccfd0361a 100644 --- a/Mage.Sets/src/mage/cards/s/SilverstormSamurai.java +++ b/Mage.Sets/src/mage/cards/s/SilverstormSamurai.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SilverstormSamurai extends CardImpl { public SilverstormSamurai(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Fox"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.FOX); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SilvosRogueElemental.java b/Mage.Sets/src/mage/cards/s/SilvosRogueElemental.java index 069146b4d8..48a7984c1a 100644 --- a/Mage.Sets/src/mage/cards/s/SilvosRogueElemental.java +++ b/Mage.Sets/src/mage/cards/s/SilvosRogueElemental.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class SilvosRogueElemental extends CardImpl { public SilvosRogueElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(8); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SimaYiWeiFieldMarshal.java b/Mage.Sets/src/mage/cards/s/SimaYiWeiFieldMarshal.java index 9a3c9d117f..af663512ce 100644 --- a/Mage.Sets/src/mage/cards/s/SimaYiWeiFieldMarshal.java +++ b/Mage.Sets/src/mage/cards/s/SimaYiWeiFieldMarshal.java @@ -53,8 +53,8 @@ public class SimaYiWeiFieldMarshal extends CardImpl { public SimaYiWeiFieldMarshal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SimianBrawler.java b/Mage.Sets/src/mage/cards/s/SimianBrawler.java index 8cf847db6c..e96432efb6 100644 --- a/Mage.Sets/src/mage/cards/s/SimianBrawler.java +++ b/Mage.Sets/src/mage/cards/s/SimianBrawler.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterLandCard; @@ -47,8 +48,8 @@ public class SimianBrawler extends CardImpl { public SimianBrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Ape"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.APE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SimianGrunts.java b/Mage.Sets/src/mage/cards/s/SimianGrunts.java index 52ce5a3861..4957df283a 100644 --- a/Mage.Sets/src/mage/cards/s/SimianGrunts.java +++ b/Mage.Sets/src/mage/cards/s/SimianGrunts.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SimianGrunts extends CardImpl { public SimianGrunts(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Ape"); + this.subtype.add(SubType.APE); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SimianSpiritGuide.java b/Mage.Sets/src/mage/cards/s/SimianSpiritGuide.java index c04141a905..cf07894056 100644 --- a/Mage.Sets/src/mage/cards/s/SimianSpiritGuide.java +++ b/Mage.Sets/src/mage/cards/s/SimianSpiritGuide.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.players.Player; @@ -50,8 +51,8 @@ public class SimianSpiritGuide extends CardImpl { public SimianSpiritGuide(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Ape"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.APE); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SimicBasilisk.java b/Mage.Sets/src/mage/cards/s/SimicBasilisk.java index 48ee6926d6..bb922a95b3 100644 --- a/Mage.Sets/src/mage/cards/s/SimicBasilisk.java +++ b/Mage.Sets/src/mage/cards/s/SimicBasilisk.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.GraftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -62,8 +63,8 @@ public class SimicBasilisk extends CardImpl { public SimicBasilisk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Basilisk"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.BASILISK); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SimicFluxmage.java b/Mage.Sets/src/mage/cards/s/SimicFluxmage.java index 5907208dc3..1ef13855e7 100644 --- a/Mage.Sets/src/mage/cards/s/SimicFluxmage.java +++ b/Mage.Sets/src/mage/cards/s/SimicFluxmage.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EvolveAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -53,8 +54,8 @@ public class SimicFluxmage extends CardImpl { public SimicFluxmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SimicGuildmage.java b/Mage.Sets/src/mage/cards/s/SimicGuildmage.java index 00f3f23567..16fe53224d 100644 --- a/Mage.Sets/src/mage/cards/s/SimicGuildmage.java +++ b/Mage.Sets/src/mage/cards/s/SimicGuildmage.java @@ -73,8 +73,8 @@ public class SimicGuildmage extends CardImpl { public SimicGuildmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G/U}{G/U}"); - this.subtype.add("Elf"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SimicInitiate.java b/Mage.Sets/src/mage/cards/s/SimicInitiate.java index bf89b6b097..6cd26688c4 100644 --- a/Mage.Sets/src/mage/cards/s/SimicInitiate.java +++ b/Mage.Sets/src/mage/cards/s/SimicInitiate.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.GraftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class SimicInitiate extends CardImpl { public SimicInitiate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SimicKeyrune.java b/Mage.Sets/src/mage/cards/s/SimicKeyrune.java index ed003aea97..37145a0ba1 100644 --- a/Mage.Sets/src/mage/cards/s/SimicKeyrune.java +++ b/Mage.Sets/src/mage/cards/s/SimicKeyrune.java @@ -38,6 +38,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -75,7 +76,7 @@ public class SimicKeyrune extends CardImpl { cardType.add(CardType.CREATURE); color.setGreen(true); color.setBlue(true); - subtype.add("Crab"); + subtype.add(SubType.CRAB); power = new MageInt(2); toughness = new MageInt(3); this.addAbility(HexproofAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/s/SimicManipulator.java b/Mage.Sets/src/mage/cards/s/SimicManipulator.java index 28682aea6f..decbf8fc60 100644 --- a/Mage.Sets/src/mage/cards/s/SimicManipulator.java +++ b/Mage.Sets/src/mage/cards/s/SimicManipulator.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EvolveAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -69,8 +70,8 @@ public class SimicManipulator extends CardImpl { public SimicManipulator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Mutant"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MUTANT); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SimicRagworm.java b/Mage.Sets/src/mage/cards/s/SimicRagworm.java index 59e6c7eaa7..f2b3616d1b 100644 --- a/Mage.Sets/src/mage/cards/s/SimicRagworm.java +++ b/Mage.Sets/src/mage/cards/s/SimicRagworm.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class SimicRagworm extends CardImpl { public SimicRagworm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Worm"); + this.subtype.add(SubType.WORM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SimicSkySwallower.java b/Mage.Sets/src/mage/cards/s/SimicSkySwallower.java index e6829007de..aa8e03147c 100644 --- a/Mage.Sets/src/mage/cards/s/SimicSkySwallower.java +++ b/Mage.Sets/src/mage/cards/s/SimicSkySwallower.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class SimicSkySwallower extends CardImpl { public SimicSkySwallower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{U}"); - this.subtype.add("Leviathan"); + this.subtype.add(SubType.LEVIATHAN); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SinCollector.java b/Mage.Sets/src/mage/cards/s/SinCollector.java index 6d373278d9..3d82099e15 100644 --- a/Mage.Sets/src/mage/cards/s/SinCollector.java +++ b/Mage.Sets/src/mage/cards/s/SinCollector.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.ExileCardYouChooseTargetOpponentEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterInstantOrSorceryCard; import mage.target.common.TargetOpponent; @@ -49,8 +50,8 @@ public class SinCollector extends CardImpl { public SinCollector(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SinProdder.java b/Mage.Sets/src/mage/cards/s/SinProdder.java index 9ae64f0190..bae067a022 100644 --- a/Mage.Sets/src/mage/cards/s/SinProdder.java +++ b/Mage.Sets/src/mage/cards/s/SinProdder.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class SinProdder extends CardImpl { public SinProdder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Sindbad.java b/Mage.Sets/src/mage/cards/s/Sindbad.java index 19e0696548..a87f459862 100644 --- a/Mage.Sets/src/mage/cards/s/Sindbad.java +++ b/Mage.Sets/src/mage/cards/s/Sindbad.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -53,7 +54,7 @@ public class Sindbad extends CardImpl { public Sindbad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SinewSliver.java b/Mage.Sets/src/mage/cards/s/SinewSliver.java index 59c77864e2..59c86dcd7b 100644 --- a/Mage.Sets/src/mage/cards/s/SinewSliver.java +++ b/Mage.Sets/src/mage/cards/s/SinewSliver.java @@ -47,7 +47,7 @@ public class SinewSliver extends CardImpl { public SinewSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SingeMindOgre.java b/Mage.Sets/src/mage/cards/s/SingeMindOgre.java index 658928c316..db5a96093b 100644 --- a/Mage.Sets/src/mage/cards/s/SingeMindOgre.java +++ b/Mage.Sets/src/mage/cards/s/SingeMindOgre.java @@ -38,6 +38,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -51,8 +52,8 @@ public class SingeMindOgre extends CardImpl { public SingeMindOgre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SingingBellStrike.java b/Mage.Sets/src/mage/cards/s/SingingBellStrike.java index 4311deded1..fd7d244ee8 100644 --- a/Mage.Sets/src/mage/cards/s/SingingBellStrike.java +++ b/Mage.Sets/src/mage/cards/s/SingingBellStrike.java @@ -44,6 +44,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class SingingBellStrike extends CardImpl { public SingingBellStrike(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/SingingTree.java b/Mage.Sets/src/mage/cards/s/SingingTree.java index 0acdbae409..c17e3ffa9a 100644 --- a/Mage.Sets/src/mage/cards/s/SingingTree.java +++ b/Mage.Sets/src/mage/cards/s/SingingTree.java @@ -32,13 +32,18 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.dynamicvalue.common.StaticValue; -import mage.abilities.effects.common.continuous.SetPowerSourceEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; +import mage.constants.Outcome; import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; import mage.target.common.TargetAttackingCreature; /** @@ -46,16 +51,16 @@ import mage.target.common.TargetAttackingCreature; * @author MarcoMarin */ public class SingingTree extends CardImpl { - + public SingingTree(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Plant"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.subtype.add(SubType.PLANT); this.power = new MageInt(0); this.toughness = new MageInt(3); // {tap}: Target attacking creature's power becomes 0 until end of turn. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SetPowerSourceEffect(new StaticValue(0), Duration.EndOfTurn), new TapSourceCost()); - ability.addTarget(new TargetAttackingCreature(1)); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SingingTreeEffect(), new TapSourceCost()); + ability.addTarget(new TargetAttackingCreature()); this.addAbility(ability); } @@ -68,3 +73,31 @@ public class SingingTree extends CardImpl { return new SingingTree(this); } } + +class SingingTreeEffect extends OneShotEffect { + + public SingingTreeEffect() { + super(Outcome.Detriment); + staticText = "Target attacking creature has base power 0 until end of turn."; + } + + public SingingTreeEffect(final SingingTreeEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent targetCreature = game.getPermanent(source.getFirstTarget()); + if (targetCreature != null) { + int toughness = targetCreature.getToughness().getBaseValueModified(); + game.addEffect(new SetPowerToughnessTargetEffect(0, toughness, Duration.EndOfTurn), source); + return true; + } + return false; + } + + @Override + public Effect copy() { + return new SingingTreeEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SinisterPossession.java b/Mage.Sets/src/mage/cards/s/SinisterPossession.java index 4aa9c5bef2..5967d27ced 100644 --- a/Mage.Sets/src/mage/cards/s/SinisterPossession.java +++ b/Mage.Sets/src/mage/cards/s/SinisterPossession.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class SinisterPossession extends CardImpl { public SinisterPossession(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/SinisterStrength.java b/Mage.Sets/src/mage/cards/s/SinisterStrength.java index f8b494e211..6be9845089 100644 --- a/Mage.Sets/src/mage/cards/s/SinisterStrength.java +++ b/Mage.Sets/src/mage/cards/s/SinisterStrength.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class SinisterStrength extends CardImpl { public SinisterStrength(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SinkIntoTakenuma.java b/Mage.Sets/src/mage/cards/s/SinkIntoTakenuma.java index c94e8ea49f..f4691dd9c6 100644 --- a/Mage.Sets/src/mage/cards/s/SinkIntoTakenuma.java +++ b/Mage.Sets/src/mage/cards/s/SinkIntoTakenuma.java @@ -46,7 +46,7 @@ public class SinkIntoTakenuma extends CardImpl { public SinkIntoTakenuma(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Sweep - Return any number of Swamps you control to their owner's hand. Target player discards a card for each Swamp returned this way. diff --git a/Mage.Sets/src/mage/cards/s/SinkingFeeling.java b/Mage.Sets/src/mage/cards/s/SinkingFeeling.java index 178cbbbe92..08baf366f7 100644 --- a/Mage.Sets/src/mage/cards/s/SinkingFeeling.java +++ b/Mage.Sets/src/mage/cards/s/SinkingFeeling.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class SinkingFeeling extends CardImpl { public SinkingFeeling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/SinstrikersWill.java b/Mage.Sets/src/mage/cards/s/SinstrikersWill.java new file mode 100644 index 0000000000..649719d386 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SinstrikersWill.java @@ -0,0 +1,95 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.constants.SubType; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.target.common.TargetAttackingOrBlockingCreature; + +/** + * + * @author TheElk801 + */ +public class SinstrikersWill extends CardImpl { + + public SinstrikersWill(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature has "{tap}: This creature deals damage equal to its power to target attacking or blocking creature." + ability = new SimpleActivatedAbility(new DamageTargetEffect(new SourcePermanentPowerCount()), new TapSourceCost()); + ability.addTarget(new TargetAttackingOrBlockingCreature()); + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, + new GainAbilityAttachedEffect( + ability, + AttachmentType.AURA, + Duration.WhileOnBattlefield, + "Enchanted creature has " + + "\"{tap}: This creature deals damage " + + "equal to its power to target " + + "attacking or blocking creature.\"" + ) + )); + } + + public SinstrikersWill(final SinstrikersWill card) { + super(card); + } + + @Override + public SinstrikersWill copy() { + return new SinstrikersWill(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SinuousPredator.java b/Mage.Sets/src/mage/cards/s/SinuousPredator.java index 556e7fa561..2af30aba37 100644 --- a/Mage.Sets/src/mage/cards/s/SinuousPredator.java +++ b/Mage.Sets/src/mage/cards/s/SinuousPredator.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByMoreThanOneSourceEffe import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -44,8 +45,8 @@ public class SinuousPredator extends CardImpl { public SinuousPredator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Eldrazi"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SinuousStriker.java b/Mage.Sets/src/mage/cards/s/SinuousStriker.java index 1eca732ee0..bbdcdda44d 100644 --- a/Mage.Sets/src/mage/cards/s/SinuousStriker.java +++ b/Mage.Sets/src/mage/cards/s/SinuousStriker.java @@ -10,6 +10,7 @@ import mage.abilities.keyword.EternalizeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -19,8 +20,8 @@ public class SinuousStriker extends CardImpl { public SinuousStriker(UUID ownerId, CardSetInfo cardSetInfo){ super(ownerId, cardSetInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - subtype.add("Naga"); - subtype.add("Warrior"); + subtype.add(SubType.NAGA); + subtype.add(SubType.WARRIOR); power = new MageInt(2); toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SinuousVermin.java b/Mage.Sets/src/mage/cards/s/SinuousVermin.java index 552b877782..c231331838 100644 --- a/Mage.Sets/src/mage/cards/s/SinuousVermin.java +++ b/Mage.Sets/src/mage/cards/s/SinuousVermin.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.MonstrosityAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class SinuousVermin extends CardImpl { public SinuousVermin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Rat"); - this.subtype.add("Horror"); + this.subtype.add(SubType.RAT); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SirShandlarOfEberyn.java b/Mage.Sets/src/mage/cards/s/SirShandlarOfEberyn.java index 9da17f8509..367304dbd3 100644 --- a/Mage.Sets/src/mage/cards/s/SirShandlarOfEberyn.java +++ b/Mage.Sets/src/mage/cards/s/SirShandlarOfEberyn.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -43,8 +44,8 @@ public class SirShandlarOfEberyn extends CardImpl { public SirShandlarOfEberyn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(4); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/s/SireOfInsanity.java b/Mage.Sets/src/mage/cards/s/SireOfInsanity.java index 67e6e37c56..8e9ae1892e 100644 --- a/Mage.Sets/src/mage/cards/s/SireOfInsanity.java +++ b/Mage.Sets/src/mage/cards/s/SireOfInsanity.java @@ -36,6 +36,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.events.GameEvent; @@ -51,7 +52,7 @@ public class SireOfInsanity extends CardImpl { public SireOfInsanity (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{R}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SireOfStagnation.java b/Mage.Sets/src/mage/cards/s/SireOfStagnation.java index fabeb63cf4..e223aeecbf 100644 --- a/Mage.Sets/src/mage/cards/s/SireOfStagnation.java +++ b/Mage.Sets/src/mage/cards/s/SireOfStagnation.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SetTargetPointer; import mage.constants.TargetController; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class SireOfStagnation extends CardImpl { public SireOfStagnation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{B}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(5); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/s/SireOfTheStorm.java b/Mage.Sets/src/mage/cards/s/SireOfTheStorm.java index 2bd4126e10..017c937088 100644 --- a/Mage.Sets/src/mage/cards/s/SireOfTheStorm.java +++ b/Mage.Sets/src/mage/cards/s/SireOfTheStorm.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; /** @@ -45,7 +46,7 @@ public class SireOfTheStorm extends CardImpl { public SireOfTheStorm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SirenLookout.java b/Mage.Sets/src/mage/cards/s/SirenLookout.java new file mode 100644 index 0000000000..534845b64e --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SirenLookout.java @@ -0,0 +1,69 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.keyword.ExploreSourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class SirenLookout extends CardImpl { + + public SirenLookout(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.SIREN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Siren Lookout enters the battlefield, it explores. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ExploreSourceEffect())); + } + + public SirenLookout(final SirenLookout card) { + super(card); + } + + @Override + public SirenLookout copy() { + return new SirenLookout(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SirenOfTheFangedCoast.java b/Mage.Sets/src/mage/cards/s/SirenOfTheFangedCoast.java index ec1651565c..b3651f603c 100644 --- a/Mage.Sets/src/mage/cards/s/SirenOfTheFangedCoast.java +++ b/Mage.Sets/src/mage/cards/s/SirenOfTheFangedCoast.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TributeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -50,7 +51,7 @@ public class SirenOfTheFangedCoast extends CardImpl { public SirenOfTheFangedCoast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Siren"); + this.subtype.add(SubType.SIREN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SirenOfTheSilentSong.java b/Mage.Sets/src/mage/cards/s/SirenOfTheSilentSong.java index d6e02ec9b6..e87d712941 100644 --- a/Mage.Sets/src/mage/cards/s/SirenOfTheSilentSong.java +++ b/Mage.Sets/src/mage/cards/s/SirenOfTheSilentSong.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.InspiredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -48,8 +49,8 @@ public class SirenOfTheSilentSong extends CardImpl { public SirenOfTheSilentSong(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Siren"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.SIREN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SirenSongLyre.java b/Mage.Sets/src/mage/cards/s/SirenSongLyre.java index 0c19565ef7..56c5751985 100644 --- a/Mage.Sets/src/mage/cards/s/SirenSongLyre.java +++ b/Mage.Sets/src/mage/cards/s/SirenSongLyre.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -53,7 +54,7 @@ public class SirenSongLyre extends CardImpl { public SirenSongLyre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has "{2}, {T}: Tap target creature." Ability grantedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new GenericManaCost(2)); diff --git a/Mage.Sets/src/mage/cards/s/SirenStormtamer.java b/Mage.Sets/src/mage/cards/s/SirenStormtamer.java new file mode 100644 index 0000000000..86bfb89c89 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SirenStormtamer.java @@ -0,0 +1,184 @@ +/* + * 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.cards.s; + +import java.util.HashSet; +import java.util.Set; +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.mana.ManaCostsImpl; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.Filter; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.stack.Spell; +import mage.game.stack.StackAbility; +import mage.game.stack.StackObject; +import mage.target.Target; +import mage.target.TargetObject; +import mage.target.Targets; + +/** + * + * @author spjspj + */ +public class SirenStormtamer extends CardImpl { + + public SirenStormtamer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}"); + + this.subtype.add(SubType.SIREN); + this.subtype.add(SubType.PIRATE); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {U}, Sacrifice Siren Stormtamer: Counter target spell or ability that targets you or a creature you control. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new ManaCostsImpl("{U}")); + ability.addTarget(new SirenStormtamerTargetObject()); + ability.addCost(new SacrificeSourceCost()); + + this.addAbility(ability); + } + + public SirenStormtamer(final SirenStormtamer card) { + super(card); + } + + @Override + public SirenStormtamer copy() { + return new SirenStormtamer(this); + } +} + +class SirenStormtamerTargetObject extends TargetObject { + + public SirenStormtamerTargetObject() { + this.minNumberOfTargets = 1; + this.maxNumberOfTargets = 1; + this.zone = Zone.STACK; + this.targetName = "spell or ability that targets you or a creature you control"; + } + + public SirenStormtamerTargetObject(final SirenStormtamerTargetObject target) { + super(target); + } + + @Override + public boolean canTarget(UUID id, Ability source, Game game) { + StackObject stackObject = game.getStack().getStackObject(id); + return (stackObject instanceof Spell) || (stackObject instanceof StackAbility); + } + + @Override + public boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game) { + return canChoose(sourceControllerId, game); + } + + @Override + public boolean canChoose(UUID sourceControllerId, Game game) { + for (StackObject stackObject : game.getStack()) { + if ((stackObject instanceof Spell) || (stackObject instanceof StackAbility)) { + Targets objectTargets = stackObject.getStackAbility().getTargets(); + if (!objectTargets.isEmpty()) { + for (Target target : objectTargets) { + for (UUID targetId : target.getTargets()) { + Permanent targetedPermanent = game.getPermanentOrLKIBattlefield(targetId); + if (targetedPermanent != null + && targetedPermanent.getControllerId().equals(sourceControllerId) + && targetedPermanent.isCreature()) { + return true; + } + + if (sourceControllerId.equals(targetId)) { + return true; + } + + } + } + } + } + } + return false; + } + + @Override + public Set possibleTargets(UUID sourceId, UUID sourceControllerId, + Game game) { + return possibleTargets(sourceControllerId, game); + } + + @Override + public Set possibleTargets(UUID sourceControllerId, Game game) { + Set possibleTargets = new HashSet<>(); + for (StackObject stackObject : game.getStack()) { + if ((stackObject instanceof Spell) || (stackObject instanceof StackAbility)) { + Targets objectTargets = stackObject.getStackAbility().getTargets(); + if (!objectTargets.isEmpty()) { + for (Target target : objectTargets) { + for (UUID targetId : target.getTargets()) { + Permanent targetedPermanent = game.getPermanentOrLKIBattlefield(targetId); + if (targetedPermanent != null + && targetedPermanent.getControllerId().equals(sourceControllerId) + && targetedPermanent.isCreature()) { + possibleTargets.add(stackObject.getId()); + } + + if (sourceControllerId.equals(targetId)) { + possibleTargets.add(stackObject.getId()); + } + } + } + } + } + } + return possibleTargets; + } + + @Override + public SirenStormtamerTargetObject copy() { + return new SirenStormtamerTargetObject(this); + } + + @Override + public Filter getFilter() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } +} diff --git a/Mage.Sets/src/mage/cards/s/SirensRuse.java b/Mage.Sets/src/mage/cards/s/SirensRuse.java new file mode 100644 index 0000000000..f9a040d090 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SirensRuse.java @@ -0,0 +1,101 @@ +/* + * 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.cards.s; + +import mage.abilities.Ability; +import mage.abilities.effects.common.ExileTargetForSourceEffect; +import mage.abilities.effects.common.ReturnToBattlefieldUnderYourControlTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetControlledCreaturePermanent; + +import java.util.UUID; + +/** + * + * @author TheElk801 + */ +public class SirensRuse extends CardImpl { + + public SirensRuse(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); + + // Exile target creature you control, then return that card to the battlefield under its owner's control. If a Pirate was exiled this way, draw a card. + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + this.getSpellAbility().addEffect(new SirensRuseEffect()); + } + + public SirensRuse(final SirensRuse card) { + super(card); + } + + @Override + public SirensRuse copy() { + return new SirensRuse(this); + } +} + +class SirensRuseEffect extends ExileTargetForSourceEffect { + + SirensRuseEffect() { + super(); + this.staticText = "Exile target creature you control, then return that card to the battlefield under its owner's control. If a Pirate was exiled this way, draw a card."; + } + + SirensRuseEffect(final SirensRuseEffect effect) { + super(effect); + } + + @Override + public SirensRuseEffect copy() { + return new SirensRuseEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + boolean isPirate = false; + Player player = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null && permanent.hasSubtype(SubType.PIRATE, game)) { + isPirate = true; + } + if (super.apply(game, source)) { + new ReturnToBattlefieldUnderYourControlTargetEffect(true).apply(game, source); + if (isPirate && player != null) { + player.drawCards(1, game); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SisaysIngenuity.java b/Mage.Sets/src/mage/cards/s/SisaysIngenuity.java index b9039f604c..7834a729ae 100644 --- a/Mage.Sets/src/mage/cards/s/SisaysIngenuity.java +++ b/Mage.Sets/src/mage/cards/s/SisaysIngenuity.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class SisaysIngenuity extends CardImpl { public SisaysIngenuity(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SistersOfStoneDeath.java b/Mage.Sets/src/mage/cards/s/SistersOfStoneDeath.java index 13d12e334c..0fd4b4a636 100644 --- a/Mage.Sets/src/mage/cards/s/SistersOfStoneDeath.java +++ b/Mage.Sets/src/mage/cards/s/SistersOfStoneDeath.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -66,7 +67,7 @@ public class SistersOfStoneDeath extends CardImpl { public SistersOfStoneDeath(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}{G}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Gorgon"); + this.subtype.add(SubType.GORGON); this.power = new MageInt(7); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SistersOfTheFlame.java b/Mage.Sets/src/mage/cards/s/SistersOfTheFlame.java index 11c3c1cfe0..b8f725a530 100644 --- a/Mage.Sets/src/mage/cards/s/SistersOfTheFlame.java +++ b/Mage.Sets/src/mage/cards/s/SistersOfTheFlame.java @@ -33,6 +33,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class SistersOfTheFlame extends CardImpl { public SistersOfTheFlame(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SithAssassin.java b/Mage.Sets/src/mage/cards/s/SithAssassin.java index 80da34d278..b0bcd90e98 100644 --- a/Mage.Sets/src/mage/cards/s/SithAssassin.java +++ b/Mage.Sets/src/mage/cards/s/SithAssassin.java @@ -1,83 +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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.ObjectColor; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.condition.common.HateCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.common.DestroyTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.ColorPredicate; -import mage.target.common.TargetCreaturePermanent; -import mage.watchers.common.LifeLossOtherFromCombatWatcher; - -/** - * - * @author Styxo - */ -public class SithAssassin extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature"); - - static { - filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); - } - - public SithAssassin(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Pureblood"); - this.subtype.add("Sith"); - this.power = new MageInt(3); - this.toughness = new MageInt(2); - - // Hate — When Sith Assassin enters the battlefield, if opponent lost life from source other than combat damage this turn, you may destroy target nonblack creature. - Ability ability = new ConditionalTriggeredAbility( - new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true), - HateCondition.instance, - "Hate - When {this} enters the battlefield, if an opponent lost life from a source other than combat damage this turn, you may destroy target nonblack creature."); - ability.addTarget(new TargetCreaturePermanent(filter)); - this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); - } - - public SithAssassin(final SithAssassin card) { - super(card); - } - - @Override - public SithAssassin copy() { - return new SithAssassin(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.HateCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; + +/** + * + * @author Styxo + */ +public class SithAssassin extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature"); + + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + } + + public SithAssassin(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.subtype.add(SubType.PUREBLOOD); + this.subtype.add(SubType.SITH); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Hate — When Sith Assassin enters the battlefield, if opponent lost life from source other than combat damage this turn, you may destroy target nonblack creature. + Ability ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true), + HateCondition.instance, + "Hate - When {this} enters the battlefield, if an opponent lost life from a source other than combat damage this turn, you may destroy target nonblack creature."); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); + } + + public SithAssassin(final SithAssassin card) { + super(card); + } + + @Override + public SithAssassin copy() { + return new SithAssassin(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SithCitadel.java b/Mage.Sets/src/mage/cards/s/SithCitadel.java index 5a95d43844..c9e7712d4e 100644 --- a/Mage.Sets/src/mage/cards/s/SithCitadel.java +++ b/Mage.Sets/src/mage/cards/s/SithCitadel.java @@ -1,70 +1,70 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.Mana; -import mage.abilities.common.EntersBattlefieldTappedAbility; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.AddManaToManaPoolSourceControllerEffect; -import mage.abilities.mana.BlueManaAbility; -import mage.abilities.mana.RedManaAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class SithCitadel extends CardImpl { - - public SithCitadel(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - - // Sith Citadel enters the battlefield tapped. - this.addAbility(new EntersBattlefieldTappedAbility()); - - // When Sith Citadel enters the battlefield , add {B} to your mana pool. - this.addAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(Mana.BlackMana(1)))); - - // {T}: Add {U} or {R} to you mana pool. - this.addAbility(new BlueManaAbility()); - this.addAbility(new RedManaAbility()); - - } - - public SithCitadel(final SithCitadel card) { - super(card); - } - - @Override - public SithCitadel copy() { - return new SithCitadel(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.Mana; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.AddManaToManaPoolSourceControllerEffect; +import mage.abilities.mana.BlueManaAbility; +import mage.abilities.mana.RedManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author Styxo + */ +public class SithCitadel extends CardImpl { + + public SithCitadel(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.LAND},""); + + // Sith Citadel enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + + // When Sith Citadel enters the battlefield , add {B} to your mana pool. + this.addAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(Mana.BlackMana(1)))); + + // {T}: Add {U} or {R} to you mana pool. + this.addAbility(new BlueManaAbility()); + this.addAbility(new RedManaAbility()); + + } + + public SithCitadel(final SithCitadel card) { + super(card); + } + + @Override + public SithCitadel copy() { + return new SithCitadel(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SithEvoker.java b/Mage.Sets/src/mage/cards/s/SithEvoker.java index a1e836de18..9d45740615 100644 --- a/Mage.Sets/src/mage/cards/s/SithEvoker.java +++ b/Mage.Sets/src/mage/cards/s/SithEvoker.java @@ -1,147 +1,148 @@ -/* - * 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.cards.s; - -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.SacrificeTargetCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.GainLifeEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.choices.Choice; -import mage.choices.ChoiceImpl; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.common.TargetControlledCreaturePermanent; - -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; - -/** - * - * @author Styxo - */ -public class SithEvoker extends CardImpl { - - public SithEvoker(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Chiss"); - this.subtype.add("Sith"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // {T}, {B}, Sacrifice a creature: You gain life equal to that creature's power or toughness. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SithEvokerEffect(), new ManaCostsImpl("{B}")); - ability.addCost(new TapSourceCost()); - ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("a creature")))); - - this.addAbility(ability); - } - - public SithEvoker(final SithEvoker card) { - super(card); - } - - @Override - public SithEvoker copy() { - return new SithEvoker(this); - } -} - -class SithEvokerEffect extends OneShotEffect { - - private static final Set choices = new HashSet<>(); - - static { - choices.add("Gain life equal to creature's power"); - choices.add("Gain life equal to creature's toughness"); - } - - public SithEvokerEffect() { - super(Outcome.GainLife); - staticText = "You gain life equal to that creature's power or toughness"; - } - - public SithEvokerEffect(final SithEvokerEffect effect) { - super(effect); - } - - @Override - public SithEvokerEffect copy() { - return new SithEvokerEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Choice choice = new ChoiceImpl(true); - choice.setMessage("Choose mode"); - choice.setChoices(choices); - while (!controller.choose(outcome, choice, game)) { - if (!controller.canRespond()) { - return false; - } - } - - Card sourceCard = game.getCard(source.getSourceId()); - if (sourceCard != null) { - for (Object cost : source.getCosts()) { - if (cost instanceof SacrificeTargetCost) { - Permanent p = (Permanent) game.getLastKnownInformation(((SacrificeTargetCost) cost).getPermanents().get(0).getId(), Zone.BATTLEFIELD); - if (p != null) { - String chosen = choice.getChoice(); - switch (chosen) { - case "Gain life equal to creature's power": - new GainLifeEffect(p.getPower().getValue()).apply(game, source); - break; - default: //"Gain life equal to creature's toughness" - new GainLifeEffect(p.getToughness().getValue()).apply(game, source); - break; - } - return true; - } - } - } - } - - } - return false; - } -} +/* + * 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.cards.s; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetControlledCreaturePermanent; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + +/** + * + * @author Styxo + */ +public class SithEvoker extends CardImpl { + + public SithEvoker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.subtype.add(SubType.CHISS); + this.subtype.add(SubType.SITH); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {T}, {B}, Sacrifice a creature: You gain life equal to that creature's power or toughness. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SithEvokerEffect(), new ManaCostsImpl("{B}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("a creature")))); + + this.addAbility(ability); + } + + public SithEvoker(final SithEvoker card) { + super(card); + } + + @Override + public SithEvoker copy() { + return new SithEvoker(this); + } +} + +class SithEvokerEffect extends OneShotEffect { + + private static final Set choices = new HashSet<>(); + + static { + choices.add("Gain life equal to creature's power"); + choices.add("Gain life equal to creature's toughness"); + } + + public SithEvokerEffect() { + super(Outcome.GainLife); + staticText = "You gain life equal to that creature's power or toughness"; + } + + public SithEvokerEffect(final SithEvokerEffect effect) { + super(effect); + } + + @Override + public SithEvokerEffect copy() { + return new SithEvokerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Choice choice = new ChoiceImpl(true); + choice.setMessage("Choose mode"); + choice.setChoices(choices); + while (!controller.choose(outcome, choice, game)) { + if (!controller.canRespond()) { + return false; + } + } + + Card sourceCard = game.getCard(source.getSourceId()); + if (sourceCard != null) { + for (Object cost : source.getCosts()) { + if (cost instanceof SacrificeTargetCost) { + Permanent p = (Permanent) game.getLastKnownInformation(((SacrificeTargetCost) cost).getPermanents().get(0).getId(), Zone.BATTLEFIELD); + if (p != null) { + String chosen = choice.getChoice(); + switch (chosen) { + case "Gain life equal to creature's power": + new GainLifeEffect(p.getPower().getValue()).apply(game, source); + break; + default: //"Gain life equal to creature's toughness" + new GainLifeEffect(p.getToughness().getValue()).apply(game, source); + break; + } + return true; + } + } + } + } + + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SithHolocron.java b/Mage.Sets/src/mage/cards/s/SithHolocron.java index 0e5133eb79..b3295f95d2 100644 --- a/Mage.Sets/src/mage/cards/s/SithHolocron.java +++ b/Mage.Sets/src/mage/cards/s/SithHolocron.java @@ -1,94 +1,94 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.Mana; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.Cost; -import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.abilities.mana.BlackManaAbility; -import mage.abilities.mana.BlueManaAbility; -import mage.abilities.mana.RedManaAbility; -import mage.abilities.mana.SimpleManaAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.counters.CounterType; - -/** - * - * @author Styxo - */ -public class SithHolocron extends CardImpl { - - public SithHolocron(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - - // {T}: Put a charge counter on Sith Holocron. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance(1)), new TapSourceCost())); - - // {T}, Remove a charge counter from Sith Holocron: Add {U}, {B} or {R} to your mana pool. - Cost cost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(1)); - Ability ability = new BlueManaAbility(); - ability.addCost(cost); - this.addAbility(ability); - - ability = new BlackManaAbility(); - ability.addCost(cost); - this.addAbility(ability); - - ability = new RedManaAbility(); - ability.addCost(cost); - this.addAbility(ability); - - // {T}, Remove two charge counters from Sith Holocron: Add UB or BR to your mana pool. - cost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(2)); - - ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 0, 1, 0, 0, 0), new TapSourceCost()); - ability.addCost(cost); - this.addAbility(ability); - - ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 1, 0, 0, 0), new TapSourceCost()); - ability.addCost(cost); - this.addAbility(ability); - } - - public SithHolocron(final SithHolocron card) { - super(card); - } - - @Override - public SithHolocron copy() { - return new SithHolocron(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.mana.BlackManaAbility; +import mage.abilities.mana.BlueManaAbility; +import mage.abilities.mana.RedManaAbility; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author Styxo + */ +public class SithHolocron extends CardImpl { + + public SithHolocron(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + + // {T}: Put a charge counter on Sith Holocron. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance(1)), new TapSourceCost())); + + // {T}, Remove a charge counter from Sith Holocron: Add {U}, {B} or {R} to your mana pool. + Cost cost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(1)); + Ability ability = new BlueManaAbility(); + ability.addCost(cost); + this.addAbility(ability); + + ability = new BlackManaAbility(); + ability.addCost(cost); + this.addAbility(ability); + + ability = new RedManaAbility(); + ability.addCost(cost); + this.addAbility(ability); + + // {T}, Remove two charge counters from Sith Holocron: Add UB or BR to your mana pool. + cost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(2)); + + ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 0, 1, 0, 0, 0), new TapSourceCost()); + ability.addCost(cost); + this.addAbility(ability); + + ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 1, 0, 0, 0), new TapSourceCost()); + ability.addCost(cost); + this.addAbility(ability); + } + + public SithHolocron(final SithHolocron card) { + super(card); + } + + @Override + public SithHolocron copy() { + return new SithHolocron(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SithInquisitor.java b/Mage.Sets/src/mage/cards/s/SithInquisitor.java index 5d86033f29..90be7ec2d0 100644 --- a/Mage.Sets/src/mage/cards/s/SithInquisitor.java +++ b/Mage.Sets/src/mage/cards/s/SithInquisitor.java @@ -1,73 +1,74 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.condition.common.HateCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.common.discard.DiscardTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.target.TargetPlayer; -import mage.watchers.common.LifeLossOtherFromCombatWatcher; - -/** - * - * @author Styxo - */ -public class SithInquisitor extends CardImpl { - - public SithInquisitor(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Human"); - this.subtype.add("Sith"); - this.power = new MageInt(5); - this.toughness = new MageInt(1); - - // Hate — When Sith Assassin enters the battlefield, if opponent lost life from source other than combat damage this turn, target player discard a card at random. - Ability ability = new ConditionalTriggeredAbility( - new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1, true)), - HateCondition.instance, - "Hate — When {this} enters the battlefield, if an opponent lost life from a source other then combat damage this turn, target player discard a card at random."); - ability.addTarget(new TargetPlayer()); - this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); - } - - public SithInquisitor(final SithInquisitor card) { - super(card); - } - - @Override - public SithInquisitor copy() { - return new SithInquisitor(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.HateCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.target.TargetPlayer; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; + +/** + * + * @author Styxo + */ +public class SithInquisitor extends CardImpl { + + public SithInquisitor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SITH); + this.power = new MageInt(5); + this.toughness = new MageInt(1); + + // Hate — When Sith Assassin enters the battlefield, if opponent lost life from source other than combat damage this turn, target player discard a card at random. + Ability ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1, true)), + HateCondition.instance, + "Hate — When {this} enters the battlefield, if an opponent lost life from a source other then combat damage this turn, target player discard a card at random."); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); + } + + public SithInquisitor(final SithInquisitor card) { + super(card); + } + + @Override + public SithInquisitor copy() { + return new SithInquisitor(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SithLord.java b/Mage.Sets/src/mage/cards/s/SithLord.java index 7101607872..60255f1c54 100644 --- a/Mage.Sets/src/mage/cards/s/SithLord.java +++ b/Mage.Sets/src/mage/cards/s/SithLord.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.game.Game; @@ -52,8 +53,8 @@ public class SithLord extends CardImpl { public SithLord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Sith"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SITH); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SithMagic.java b/Mage.Sets/src/mage/cards/s/SithMagic.java index a61842a20b..8d99856f71 100644 --- a/Mage.Sets/src/mage/cards/s/SithMagic.java +++ b/Mage.Sets/src/mage/cards/s/SithMagic.java @@ -1,183 +1,183 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.DelayedTriggeredAbility; -import mage.abilities.TriggeredAbility; -import mage.abilities.common.BeginningOfCombatTriggeredAbility; -import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; -import mage.abilities.condition.common.HateCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.ContinuousEffect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.ReplacementEffectImpl; -import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.abilities.keyword.HasteAbility; -import mage.abilities.keyword.LifelinkAbility; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.filter.common.FilterCreatureCard; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.ZoneChangeEvent; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.common.TargetCardInGraveyard; -import mage.target.targetpointer.FixedTarget; -import mage.watchers.common.LifeLossOtherFromCombatWatcher; - -/** - * - * @author Styxo - */ -public class SithMagic extends CardImpl { - - public SithMagic(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}{B}{R}"); - - // Hate — At the beggining of each combat, if opponent lost life from a source other than combat damage this turn, you may return target card from a graveyard to the battlefield under your control. It gains lifelink and haste. Exile it at the beginning of the next end step or if it would leave the battlefield. - TriggeredAbility triggeredAbility = new BeginningOfCombatTriggeredAbility(new SithMagicEffect(), TargetController.ANY, true); - triggeredAbility.addEffect(new SithMagicReplacementEffect()); - Ability ability = new ConditionalTriggeredAbility( - triggeredAbility, - HateCondition.instance, - "Hate — At the beggining of each combat, if opponent lost life from a source other than combat damage this turn, you may return target card from a graveyard to the battlefield under your control. It gains lifelink and haste. Exile it at the beginning of the next end step or if it would leave the battlefield."); - ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard())); - this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); - } - - public SithMagic(final SithMagic card) { - super(card); - } - - @Override - public SithMagic copy() { - return new SithMagic(this); - } -} - -class SithMagicEffect extends OneShotEffect { - - public SithMagicEffect() { - super(Outcome.PutCreatureInPlay); - staticText = "return target card from a graveyard to the battlefield under your control. It gains lifelink and haste. Exile it at the beginning of the next end step or if it would leave the battlefield"; - } - - public SithMagicEffect(final SithMagicEffect effect) { - super(effect); - } - - @Override - public SithMagicEffect copy() { - return new SithMagicEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Card card = game.getCard(this.getTargetPointer().getFirst(game, source)); - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null && card != null) { - if (controller.moveCards(card, Zone.BATTLEFIELD, source, game)) { - Permanent creature = game.getPermanent(card.getId()); - if (creature != null) { - // gains haste - ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom); - effect.setTargetPointer(new FixedTarget(creature, game)); - game.addEffect(effect, source); - // gains lifelink - effect = new GainAbilityTargetEffect(LifelinkAbility.getInstance(), Duration.Custom); - effect.setTargetPointer(new FixedTarget(creature, game)); - game.addEffect(effect, source); - // Exile at begin of next end step - ExileTargetEffect exileEffect = new ExileTargetEffect(null, null, Zone.BATTLEFIELD); - exileEffect.setTargetPointer(new FixedTarget(creature, game)); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); - game.addDelayedTriggeredAbility(delayedAbility, source); - } - } - return true; - } - return false; - } -} - -class SithMagicReplacementEffect extends ReplacementEffectImpl { - - SithMagicReplacementEffect() { - super(Duration.EndOfTurn, Outcome.Exile); - staticText = "or if it would leave the battlefield"; - } - - SithMagicReplacementEffect(final SithMagicReplacementEffect effect) { - super(effect); - } - - @Override - public SithMagicReplacementEffect copy() { - return new SithMagicReplacementEffect(this); - } - - @Override - public boolean replaceEvent(GameEvent event, Ability source, Game game) { - Permanent permanent = game.getPermanent(source.getFirstTarget()); - Player controller = game.getPlayer(source.getControllerId()); - if (permanent != null && controller != null) { - controller.moveCardToExileWithInfo(permanent, null, null, source.getSourceId(), game, Zone.BATTLEFIELD, true); - } - return true; - } - - @Override - public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.ZONE_CHANGE; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - if (event.getTargetId().equals(source.getFirstTarget()) - && ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD - && ((ZoneChangeEvent) event).getToZone() != Zone.EXILED) { - return true; - } - return false; - } - - @Override - public boolean apply(Game game, Ability source) { - return false; - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.condition.common.HateCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.ZoneChangeEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCardInGraveyard; +import mage.target.targetpointer.FixedTarget; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; + +/** + * + * @author Styxo + */ +public class SithMagic extends CardImpl { + + public SithMagic(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}{B}{R}"); + + // Hate — At the beggining of each combat, if opponent lost life from a source other than combat damage this turn, you may return target card from a graveyard to the battlefield under your control. It gains lifelink and haste. Exile it at the beginning of the next end step or if it would leave the battlefield. + TriggeredAbility triggeredAbility = new BeginningOfCombatTriggeredAbility(new SithMagicEffect(), TargetController.ANY, true); + triggeredAbility.addEffect(new SithMagicReplacementEffect()); + Ability ability = new ConditionalTriggeredAbility( + triggeredAbility, + HateCondition.instance, + "Hate — At the beggining of each combat, if opponent lost life from a source other than combat damage this turn, you may return target card from a graveyard to the battlefield under your control. It gains lifelink and haste. Exile it at the beginning of the next end step or if it would leave the battlefield."); + ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard())); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); + } + + public SithMagic(final SithMagic card) { + super(card); + } + + @Override + public SithMagic copy() { + return new SithMagic(this); + } +} + +class SithMagicEffect extends OneShotEffect { + + public SithMagicEffect() { + super(Outcome.PutCreatureInPlay); + staticText = "return target card from a graveyard to the battlefield under your control. It gains lifelink and haste. Exile it at the beginning of the next end step or if it would leave the battlefield"; + } + + public SithMagicEffect(final SithMagicEffect effect) { + super(effect); + } + + @Override + public SithMagicEffect copy() { + return new SithMagicEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Card card = game.getCard(this.getTargetPointer().getFirst(game, source)); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null && card != null) { + if (controller.moveCards(card, Zone.BATTLEFIELD, source, game)) { + Permanent creature = game.getPermanent(card.getId()); + if (creature != null) { + // gains haste + ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom); + effect.setTargetPointer(new FixedTarget(creature, game)); + game.addEffect(effect, source); + // gains lifelink + effect = new GainAbilityTargetEffect(LifelinkAbility.getInstance(), Duration.Custom); + effect.setTargetPointer(new FixedTarget(creature, game)); + game.addEffect(effect, source); + // Exile at begin of next end step + ExileTargetEffect exileEffect = new ExileTargetEffect(null, null, Zone.BATTLEFIELD); + exileEffect.setTargetPointer(new FixedTarget(creature, game)); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); + game.addDelayedTriggeredAbility(delayedAbility, source); + } + } + return true; + } + return false; + } +} + +class SithMagicReplacementEffect extends ReplacementEffectImpl { + + SithMagicReplacementEffect() { + super(Duration.EndOfTurn, Outcome.Exile); + staticText = "or if it would leave the battlefield"; + } + + SithMagicReplacementEffect(final SithMagicReplacementEffect effect) { + super(effect); + } + + @Override + public SithMagicReplacementEffect copy() { + return new SithMagicReplacementEffect(this); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + Player controller = game.getPlayer(source.getControllerId()); + if (permanent != null && controller != null) { + controller.moveCardToExileWithInfo(permanent, null, null, source.getSourceId(), game, Zone.BATTLEFIELD, true); + } + return true; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.ZONE_CHANGE; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getTargetId().equals(source.getFirstTarget()) + && ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD + && ((ZoneChangeEvent) event).getToZone() != Zone.EXILED) { + return true; + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SithManipulator.java b/Mage.Sets/src/mage/cards/s/SithManipulator.java index 96dbdd38b4..727b2d9d00 100644 --- a/Mage.Sets/src/mage/cards/s/SithManipulator.java +++ b/Mage.Sets/src/mage/cards/s/SithManipulator.java @@ -1,84 +1,85 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.condition.InvertCondition; -import mage.abilities.condition.common.HateCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.common.ReturnToHandTargetEffect; -import mage.abilities.effects.common.ReturnToLibraryPermanentEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.target.common.TargetCreaturePermanent; -import mage.watchers.common.LifeLossOtherFromCombatWatcher; - -/** - * - * @author Styxo - */ -public class SithManipulator extends CardImpl { - - public SithManipulator(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Sith"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // When Sith Manipulator enters the battlefield, return target creature to its owner's hand. - Ability ability = new ConditionalTriggeredAbility( - new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect()), - new InvertCondition(HateCondition.instance), - "When Sith Manipulator enters the battlefield, return target creature to its owner's hand"); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); - - // Hate — If opponent lost life from source other than combat damage this turn, put that card on top of its owner's library instead. - ability = new ConditionalTriggeredAbility( - new EntersBattlefieldTriggeredAbility(new ReturnToLibraryPermanentEffect(true)), - HateCondition.instance, - "Hate — If opponent lost life from source other than combat damage this turn, put that card on top of its owner's library instead"); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); - - } - - public SithManipulator(final SithManipulator card) { - super(card); - } - - @Override - public SithManipulator copy() { - return new SithManipulator(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.InvertCondition; +import mage.abilities.condition.common.HateCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.ReturnToLibraryPermanentEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; + +/** + * + * @author Styxo + */ +public class SithManipulator extends CardImpl { + + public SithManipulator(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SITH); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Sith Manipulator enters the battlefield, return target creature to its owner's hand. + Ability ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect()), + new InvertCondition(HateCondition.instance), + "When Sith Manipulator enters the battlefield, return target creature to its owner's hand"); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); + + // Hate — If opponent lost life from source other than combat damage this turn, put that card on top of its owner's library instead. + ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new ReturnToLibraryPermanentEffect(true)), + HateCondition.instance, + "Hate — If opponent lost life from source other than combat damage this turn, put that card on top of its owner's library instead"); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); + + } + + public SithManipulator(final SithManipulator card) { + super(card); + } + + @Override + public SithManipulator copy() { + return new SithManipulator(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SithMarauder.java b/Mage.Sets/src/mage/cards/s/SithMarauder.java index b3c8924b68..d4dc48ef01 100644 --- a/Mage.Sets/src/mage/cards/s/SithMarauder.java +++ b/Mage.Sets/src/mage/cards/s/SithMarauder.java @@ -1,73 +1,74 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.condition.common.HateCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.common.DamageTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; -import mage.watchers.common.LifeLossOtherFromCombatWatcher; - -/** - * - * @author Styxo - */ -public class SithMarauder extends CardImpl { - - public SithMarauder(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Sith"); - this.power = new MageInt(5); - this.toughness = new MageInt(4); - - // Hate — When Sith Marauder enters the battlefield, if an opponent lost life from a source other than combat damage this turn, Sith Marauder deals 3 damage to target creature or player. - Ability ability = new ConditionalTriggeredAbility( - new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3)), - HateCondition.instance, - "Hate — When {this} enters the battlefield, if an opponent lost life from a source other than combat damage this turn, {this} deals 3 damage to target creature or player"); - ability.addTarget(new TargetCreatureOrPlayer()); - this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); - } - - public SithMarauder(final SithMarauder card) { - super(card); - } - - @Override - public SithMarauder copy() { - return new SithMarauder(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.HateCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.target.common.TargetCreatureOrPlayer; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; + +/** + * + * @author Styxo + */ +public class SithMarauder extends CardImpl { + + public SithMarauder(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SITH); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + // Hate — When Sith Marauder enters the battlefield, if an opponent lost life from a source other than combat damage this turn, Sith Marauder deals 3 damage to target creature or player. + Ability ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3)), + HateCondition.instance, + "Hate — When {this} enters the battlefield, if an opponent lost life from a source other than combat damage this turn, {this} deals 3 damage to target creature or player"); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); + } + + public SithMarauder(final SithMarauder card) { + super(card); + } + + @Override + public SithMarauder copy() { + return new SithMarauder(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SithMindseer.java b/Mage.Sets/src/mage/cards/s/SithMindseer.java index 1d32f616e3..bd4f53c91d 100644 --- a/Mage.Sets/src/mage/cards/s/SithMindseer.java +++ b/Mage.Sets/src/mage/cards/s/SithMindseer.java @@ -1,74 +1,75 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.condition.common.HateCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.common.continuous.GainControlTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.target.common.TargetCreaturePermanent; -import mage.watchers.common.LifeLossOtherFromCombatWatcher; - -/** - * - * @author Styxo - */ -public class SithMindseer extends CardImpl { - - public SithMindseer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}{R}"); - this.subtype.add("Human"); - this.subtype.add("Sith"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // Hate — When Sith Mindseer enters the battlefield, if an opponent loses life from a source other than combat damage, gain control of target creature for as long as Sith Mindseer remains on the battlefield. - Ability ability = new ConditionalTriggeredAbility( - new EntersBattlefieldTriggeredAbility(new GainControlTargetEffect(Duration.WhileOnBattlefield)), - HateCondition.instance, - "Hate — When Sith Mindseer enters the battlefield, if an opponent loses life from a source other than combat damage, gain control of target creature for as long as Sith Mindseer remains on the battlefield."); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); - } - - public SithMindseer(final SithMindseer card) { - super(card); - } - - @Override - public SithMindseer copy() { - return new SithMindseer(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.HateCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; + +/** + * + * @author Styxo + */ +public class SithMindseer extends CardImpl { + + public SithMindseer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}{R}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SITH); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Hate — When Sith Mindseer enters the battlefield, if an opponent loses life from a source other than combat damage, gain control of target creature for as long as Sith Mindseer remains on the battlefield. + Ability ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new GainControlTargetEffect(Duration.WhileOnBattlefield)), + HateCondition.instance, + "Hate — When Sith Mindseer enters the battlefield, if an opponent loses life from a source other than combat damage, gain control of target creature for as long as Sith Mindseer remains on the battlefield."); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); + } + + public SithMindseer(final SithMindseer card) { + super(card); + } + + @Override + public SithMindseer copy() { + return new SithMindseer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SithRavager.java b/Mage.Sets/src/mage/cards/s/SithRavager.java index 35335f6ea5..72ced66fbd 100644 --- a/Mage.Sets/src/mage/cards/s/SithRavager.java +++ b/Mage.Sets/src/mage/cards/s/SithRavager.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -50,8 +51,8 @@ public class SithRavager extends CardImpl { public SithRavager(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Sith"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SITH); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SithSorcerer.java b/Mage.Sets/src/mage/cards/s/SithSorcerer.java index 9cc5c62e63..ae8324a2da 100644 --- a/Mage.Sets/src/mage/cards/s/SithSorcerer.java +++ b/Mage.Sets/src/mage/cards/s/SithSorcerer.java @@ -1,76 +1,77 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.condition.common.HateCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.keyword.ScryEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.watchers.common.LifeLossOtherFromCombatWatcher; - -/** - * - * @author Styxo - */ -public class SithSorcerer extends CardImpl { - - public SithSorcerer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Sith"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // When Sith Sorcerer enters the battlefield, scry 2. - this.addAbility(new EntersBattlefieldTriggeredAbility(new ScryEffect(2))); - - // Hate — When Sith Assassin enters the battlefield, if opponent lost life from source other than combat damage this turn, draw a card. - Ability ability = new ConditionalTriggeredAbility( - new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)), - HateCondition.instance, - "Hate — When {this} enters the battlefield, if an opponent lost life from a source other than combat damage this turn, draw a card."); - this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); - - } - - public SithSorcerer(final SithSorcerer card) { - super(card); - } - - @Override - public SithSorcerer copy() { - return new SithSorcerer(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.HateCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; + +/** + * + * @author Styxo + */ +public class SithSorcerer extends CardImpl { + + public SithSorcerer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SITH); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Sith Sorcerer enters the battlefield, scry 2. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ScryEffect(2))); + + // Hate — When Sith Assassin enters the battlefield, if opponent lost life from source other than combat damage this turn, draw a card. + Ability ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)), + HateCondition.instance, + "Hate — When {this} enters the battlefield, if an opponent lost life from a source other than combat damage this turn, draw a card."); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); + + } + + public SithSorcerer(final SithSorcerer card) { + super(card); + } + + @Override + public SithSorcerer copy() { + return new SithSorcerer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SithThoughtseeker.java b/Mage.Sets/src/mage/cards/s/SithThoughtseeker.java index d8a90f9bb6..d772c27ac7 100644 --- a/Mage.Sets/src/mage/cards/s/SithThoughtseeker.java +++ b/Mage.Sets/src/mage/cards/s/SithThoughtseeker.java @@ -1,74 +1,75 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.condition.common.HateCondition; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalActivatedAbility; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.AbilityWord; -import mage.constants.CardType; -import mage.constants.Zone; - -/** - * - * @author Styxo - */ -public class SithThoughtseeker extends CardImpl { - - public SithThoughtseeker(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Sith"); - this.power = new MageInt(2); - this.toughness = new MageInt(1); - - // Hate — {2}{U}: Draw a card. Activate this ability only if an opponent lost life from source other than combat damage this turn. - Ability ability = new ConditionalActivatedAbility( - Zone.BATTLEFIELD, - new DrawCardSourceControllerEffect(1), - new ManaCostsImpl<>("{2}{U}"), - HateCondition.instance); - ability.setAbilityWord(AbilityWord.HATE); - this.addAbility(ability); - } - - public SithThoughtseeker(final SithThoughtseeker card) { - super(card); - } - - @Override - public SithThoughtseeker copy() { - return new SithThoughtseeker(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.condition.common.HateCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author Styxo + */ +public class SithThoughtseeker extends CardImpl { + + public SithThoughtseeker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SITH); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Hate — {2}{U}: Draw a card. Activate this ability only if an opponent lost life from source other than combat damage this turn. + Ability ability = new ConditionalActivatedAbility( + Zone.BATTLEFIELD, + new DrawCardSourceControllerEffect(1), + new ManaCostsImpl<>("{2}{U}"), + HateCondition.instance); + ability.setAbilityWord(AbilityWord.HATE); + this.addAbility(ability); + } + + public SithThoughtseeker(final SithThoughtseeker card) { + super(card); + } + + @Override + public SithThoughtseeker copy() { + return new SithThoughtseeker(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SivitriScarzam.java b/Mage.Sets/src/mage/cards/s/SivitriScarzam.java index 935e0607c5..d64a0ac174 100644 --- a/Mage.Sets/src/mage/cards/s/SivitriScarzam.java +++ b/Mage.Sets/src/mage/cards/s/SivitriScarzam.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -43,7 +44,7 @@ public class SivitriScarzam extends CardImpl { public SivitriScarzam(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SixthSense.java b/Mage.Sets/src/mage/cards/s/SixthSense.java index 60c5d533a7..661fd98ab7 100644 --- a/Mage.Sets/src/mage/cards/s/SixthSense.java +++ b/Mage.Sets/src/mage/cards/s/SixthSense.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -58,7 +59,7 @@ public class SixthSense extends CardImpl { public SixthSense(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SkaabGoliath.java b/Mage.Sets/src/mage/cards/s/SkaabGoliath.java index 898998b4fb..9102a474a7 100644 --- a/Mage.Sets/src/mage/cards/s/SkaabGoliath.java +++ b/Mage.Sets/src/mage/cards/s/SkaabGoliath.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; @@ -45,8 +46,8 @@ public class SkaabGoliath extends CardImpl { public SkaabGoliath(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Giant"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.GIANT); this.power = new MageInt(6); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/s/SkaabRuinator.java b/Mage.Sets/src/mage/cards/s/SkaabRuinator.java index c430e720e8..2aeb83644e 100644 --- a/Mage.Sets/src/mage/cards/s/SkaabRuinator.java +++ b/Mage.Sets/src/mage/cards/s/SkaabRuinator.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class SkaabRuinator extends CardImpl { public SkaabRuinator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SkarrgGoliath.java b/Mage.Sets/src/mage/cards/s/SkarrgGoliath.java index 09a105366d..b0a0a4fd74 100644 --- a/Mage.Sets/src/mage/cards/s/SkarrgGoliath.java +++ b/Mage.Sets/src/mage/cards/s/SkarrgGoliath.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -47,7 +48,7 @@ public class SkarrgGoliath extends CardImpl { public SkarrgGoliath(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(9); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/s/SkarrgGuildmage.java b/Mage.Sets/src/mage/cards/s/SkarrgGuildmage.java index 986556b780..ec7d216e75 100644 --- a/Mage.Sets/src/mage/cards/s/SkarrgGuildmage.java +++ b/Mage.Sets/src/mage/cards/s/SkarrgGuildmage.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -53,8 +54,8 @@ public class SkarrgGuildmage extends CardImpl { public SkarrgGuildmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -86,7 +87,7 @@ class SkarrgGuildmageToken extends Token { super("", "4/4 Elemental creature"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); } diff --git a/Mage.Sets/src/mage/cards/s/SkarrganFirebird.java b/Mage.Sets/src/mage/cards/s/SkarrganFirebird.java index fe8687dba3..fe8891b652 100644 --- a/Mage.Sets/src/mage/cards/s/SkarrganFirebird.java +++ b/Mage.Sets/src/mage/cards/s/SkarrganFirebird.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.watchers.common.BloodthirstWatcher; @@ -51,7 +52,7 @@ public class SkarrganFirebird extends CardImpl { public SkarrganFirebird(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Phoenix"); + this.subtype.add(SubType.PHOENIX); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkarrganPitSkulk.java b/Mage.Sets/src/mage/cards/s/SkarrganPitSkulk.java index 54f7eb94b3..9238743f9c 100644 --- a/Mage.Sets/src/mage/cards/s/SkarrganPitSkulk.java +++ b/Mage.Sets/src/mage/cards/s/SkarrganPitSkulk.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.BloodthirstAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class SkarrganPitSkulk extends CardImpl { public SkarrganPitSkulk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkarrganSkybreaker.java b/Mage.Sets/src/mage/cards/s/SkarrganSkybreaker.java index 8895c337f5..27665e9a07 100644 --- a/Mage.Sets/src/mage/cards/s/SkarrganSkybreaker.java +++ b/Mage.Sets/src/mage/cards/s/SkarrganSkybreaker.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.BloodthirstAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -50,8 +51,8 @@ public class SkarrganSkybreaker extends CardImpl { public SkarrganSkybreaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}{G}"); - this.subtype.add("Giant"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkeletalChangeling.java b/Mage.Sets/src/mage/cards/s/SkeletalChangeling.java index 466b596b24..91c8082de7 100644 --- a/Mage.Sets/src/mage/cards/s/SkeletalChangeling.java +++ b/Mage.Sets/src/mage/cards/s/SkeletalChangeling.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ChangelingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class SkeletalChangeling extends CardImpl { public SkeletalChangeling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkeletalCrocodile.java b/Mage.Sets/src/mage/cards/s/SkeletalCrocodile.java index c5b0f68108..5f570ef70e 100644 --- a/Mage.Sets/src/mage/cards/s/SkeletalCrocodile.java +++ b/Mage.Sets/src/mage/cards/s/SkeletalCrocodile.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class SkeletalCrocodile extends CardImpl { public SkeletalCrocodile(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Crocodile"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.CROCODILE); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(5); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkeletalGrimace.java b/Mage.Sets/src/mage/cards/s/SkeletalGrimace.java index bd3812fc27..02ba604f98 100644 --- a/Mage.Sets/src/mage/cards/s/SkeletalGrimace.java +++ b/Mage.Sets/src/mage/cards/s/SkeletalGrimace.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class SkeletalGrimace extends CardImpl { public SkeletalGrimace(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/SkeletalKathari.java b/Mage.Sets/src/mage/cards/s/SkeletalKathari.java index f3e2c4d5dc..d2c8627bad 100644 --- a/Mage.Sets/src/mage/cards/s/SkeletalKathari.java +++ b/Mage.Sets/src/mage/cards/s/SkeletalKathari.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -49,8 +50,8 @@ public class SkeletalKathari extends CardImpl { public SkeletalKathari(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Bird"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SkeletalSnake.java b/Mage.Sets/src/mage/cards/s/SkeletalSnake.java index 75bee318aa..a6110c4a93 100644 --- a/Mage.Sets/src/mage/cards/s/SkeletalSnake.java +++ b/Mage.Sets/src/mage/cards/s/SkeletalSnake.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class SkeletalSnake extends CardImpl { public SkeletalSnake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Snake"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkeletalVampire.java b/Mage.Sets/src/mage/cards/s/SkeletalVampire.java index 66543a92ed..f76327185d 100644 --- a/Mage.Sets/src/mage/cards/s/SkeletalVampire.java +++ b/Mage.Sets/src/mage/cards/s/SkeletalVampire.java @@ -61,8 +61,8 @@ public class SkeletalVampire extends CardImpl { public SkeletalVampire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkeletalWurm.java b/Mage.Sets/src/mage/cards/s/SkeletalWurm.java index c8f092e841..ff3e4fe966 100644 --- a/Mage.Sets/src/mage/cards/s/SkeletalWurm.java +++ b/Mage.Sets/src/mage/cards/s/SkeletalWurm.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class SkeletalWurm extends CardImpl { public SkeletalWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{7}{B}"); - this.subtype.add("Skeleton"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.SKELETON); + this.subtype.add(SubType.WURM); this.power = new MageInt(7); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SkeletonKey.java b/Mage.Sets/src/mage/cards/s/SkeletonKey.java index 1c70f75f5a..72dc2d91d3 100644 --- a/Mage.Sets/src/mage/cards/s/SkeletonKey.java +++ b/Mage.Sets/src/mage/cards/s/SkeletonKey.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class SkeletonKey extends CardImpl { public SkeletonKey(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has skulk. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new SkulkAbility(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/s/SkeletonShip.java b/Mage.Sets/src/mage/cards/s/SkeletonShip.java index 65ab677e20..c2cda92418 100644 --- a/Mage.Sets/src/mage/cards/s/SkeletonShip.java +++ b/Mage.Sets/src/mage/cards/s/SkeletonShip.java @@ -51,7 +51,7 @@ public class SkeletonShip extends CardImpl { public SkeletonShip(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkillBorrower.java b/Mage.Sets/src/mage/cards/s/SkillBorrower.java index 21d601420c..f670fa857d 100644 --- a/Mage.Sets/src/mage/cards/s/SkillBorrower.java +++ b/Mage.Sets/src/mage/cards/s/SkillBorrower.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -56,8 +57,8 @@ public class SkillBorrower extends CardImpl { public SkillBorrower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkinInvasion.java b/Mage.Sets/src/mage/cards/s/SkinInvasion.java index 657a51e6d7..1dbdcb24cf 100644 --- a/Mage.Sets/src/mage/cards/s/SkinInvasion.java +++ b/Mage.Sets/src/mage/cards/s/SkinInvasion.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class SkinInvasion extends CardImpl { public SkinInvasion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); this.transformable = true; this.secondSideCardClazz = SkinShedder.class; diff --git a/Mage.Sets/src/mage/cards/s/SkinShedder.java b/Mage.Sets/src/mage/cards/s/SkinShedder.java index 768373f36e..6c3575ca6b 100644 --- a/Mage.Sets/src/mage/cards/s/SkinShedder.java +++ b/Mage.Sets/src/mage/cards/s/SkinShedder.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class SkinShedder extends CardImpl { public SkinShedder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Insect"); - this.subtype.add("Horror"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.HORROR); this.color.setRed(true); this.nightCard = true; diff --git a/Mage.Sets/src/mage/cards/s/SkinbrandGoblin.java b/Mage.Sets/src/mage/cards/s/SkinbrandGoblin.java index c8ff4b6776..1ae40bd284 100644 --- a/Mage.Sets/src/mage/cards/s/SkinbrandGoblin.java +++ b/Mage.Sets/src/mage/cards/s/SkinbrandGoblin.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.BloodrushAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,8 +45,8 @@ public class SkinbrandGoblin extends CardImpl { public SkinbrandGoblin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Skinrender.java b/Mage.Sets/src/mage/cards/s/Skinrender.java index 8a11c21de9..059a6b0d0c 100644 --- a/Mage.Sets/src/mage/cards/s/Skinrender.java +++ b/Mage.Sets/src/mage/cards/s/Skinrender.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.target.Target; @@ -49,7 +50,7 @@ public class Skinrender extends CardImpl { public Skinrender(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/Skinshifter.java b/Mage.Sets/src/mage/cards/s/Skinshifter.java index e6f764d0bd..6b6ef5edf1 100644 --- a/Mage.Sets/src/mage/cards/s/Skinshifter.java +++ b/Mage.Sets/src/mage/cards/s/Skinshifter.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -51,8 +52,8 @@ public class Skinshifter extends CardImpl { public Skinshifter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -86,7 +87,7 @@ public class Skinshifter extends CardImpl { public RhinoToken() { super("Rhino", "Rhino with base power and toughness 4/4 and gains trample"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Rhino"); + this.subtype.add(SubType.RHINO); this.color.setGreen(true); this.power = new MageInt(4); @@ -100,7 +101,7 @@ public class Skinshifter extends CardImpl { public BirdToken() { super("Bird", "Bird with base power and toughness 2/2 and gains flying"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.color.setGreen(true); this.power = new MageInt(2); @@ -114,7 +115,7 @@ public class Skinshifter extends CardImpl { public PlantToken() { super("Plant", "Plant with base power and toughness 0/8"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Plant"); + this.subtype.add(SubType.PLANT); this.color.setGreen(true); this.power = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/Skinthinner.java b/Mage.Sets/src/mage/cards/s/Skinthinner.java index f7df436796..7f828aa3c4 100644 --- a/Mage.Sets/src/mage/cards/s/Skinthinner.java +++ b/Mage.Sets/src/mage/cards/s/Skinthinner.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,7 +58,7 @@ public class Skinthinner extends CardImpl { public Skinthinner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Skinwing.java b/Mage.Sets/src/mage/cards/s/Skinwing.java index cd78c48645..b65d022d32 100644 --- a/Mage.Sets/src/mage/cards/s/Skinwing.java +++ b/Mage.Sets/src/mage/cards/s/Skinwing.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class Skinwing extends CardImpl { public Skinwing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new LivingWeaponAbility()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2))); diff --git a/Mage.Sets/src/mage/cards/s/SkirgeFamiliar.java b/Mage.Sets/src/mage/cards/s/SkirgeFamiliar.java index 1026c5acfe..89d8c942b5 100644 --- a/Mage.Sets/src/mage/cards/s/SkirgeFamiliar.java +++ b/Mage.Sets/src/mage/cards/s/SkirgeFamiliar.java @@ -36,6 +36,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class SkirgeFamiliar extends CardImpl { public SkirgeFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SkirkAlarmist.java b/Mage.Sets/src/mage/cards/s/SkirkAlarmist.java new file mode 100644 index 0000000000..800e42a89d --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SkirkAlarmist.java @@ -0,0 +1,124 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.effects.common.TurnFaceUpTargetEffect; +import mage.constants.SubType; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.other.FaceDownPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public class SkirkAlarmist extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("face-down creature you control"); + + static { + filter.add(new FaceDownPredicate()); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public SkirkAlarmist(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // {tap}: Turn target face-down creature you control face up. At the beginning of the next end step, sacrifice it. + Ability ability = new SimpleActivatedAbility(new TurnFaceUpTargetEffect(), new TapSourceCost()); + ability.addEffect(new SkirkAlarmistEffect()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public SkirkAlarmist(final SkirkAlarmist card) { + super(card); + } + + @Override + public SkirkAlarmist copy() { + return new SkirkAlarmist(this); + } +} + +class SkirkAlarmistEffect extends OneShotEffect { + + public SkirkAlarmistEffect() { + super(Outcome.Sacrifice); + staticText = "At the beginning of the next end step, sacrifice it"; + } + + public SkirkAlarmistEffect(final SkirkAlarmistEffect effect) { + super(effect); + } + + @Override + public SkirkAlarmistEffect copy() { + return new SkirkAlarmistEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice this", source.getControllerId()); + sacrificeEffect.setTargetPointer(new FixedTarget(permanent, game)); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); + game.addDelayedTriggeredAbility(delayedAbility, source); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SkirkCommando.java b/Mage.Sets/src/mage/cards/s/SkirkCommando.java index 5777fb5f40..a091897f3b 100644 --- a/Mage.Sets/src/mage/cards/s/SkirkCommando.java +++ b/Mage.Sets/src/mage/cards/s/SkirkCommando.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.Game; @@ -50,7 +51,7 @@ public class SkirkCommando extends CardImpl { public SkirkCommando(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkirkDrillSergeant.java b/Mage.Sets/src/mage/cards/s/SkirkDrillSergeant.java index 66de7c06c3..97c26f9144 100644 --- a/Mage.Sets/src/mage/cards/s/SkirkDrillSergeant.java +++ b/Mage.Sets/src/mage/cards/s/SkirkDrillSergeant.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; @@ -49,13 +48,15 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; import mage.players.Player; +import java.util.UUID; + /** * * @author LevelX2 */ public class SkirkDrillSergeant extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("{this} or another Goblin"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("or another Goblin"); static { filter.add(new SubtypePredicate(SubType.GOBLIN)); @@ -63,7 +64,7 @@ public class SkirkDrillSergeant extends CardImpl { public SkirkDrillSergeant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkirkFireMarshal.java b/Mage.Sets/src/mage/cards/s/SkirkFireMarshal.java index 9da268a5ee..7329705bf0 100644 --- a/Mage.Sets/src/mage/cards/s/SkirkFireMarshal.java +++ b/Mage.Sets/src/mage/cards/s/SkirkFireMarshal.java @@ -61,7 +61,7 @@ public class SkirkFireMarshal extends CardImpl { public SkirkFireMarshal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SkirkMarauder.java b/Mage.Sets/src/mage/cards/s/SkirkMarauder.java index ec5f3cb2f0..b0d98f1c18 100644 --- a/Mage.Sets/src/mage/cards/s/SkirkMarauder.java +++ b/Mage.Sets/src/mage/cards/s/SkirkMarauder.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; /** @@ -47,7 +48,7 @@ public class SkirkMarauder extends CardImpl { public SkirkMarauder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkirkOutrider.java b/Mage.Sets/src/mage/cards/s/SkirkOutrider.java index 13411ef64c..d08dc3fdef 100644 --- a/Mage.Sets/src/mage/cards/s/SkirkOutrider.java +++ b/Mage.Sets/src/mage/cards/s/SkirkOutrider.java @@ -59,7 +59,7 @@ public class SkirkOutrider extends CardImpl { public SkirkOutrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SkirkProspector.java b/Mage.Sets/src/mage/cards/s/SkirkProspector.java index bf261cfe53..d8db9f1758 100644 --- a/Mage.Sets/src/mage/cards/s/SkirkProspector.java +++ b/Mage.Sets/src/mage/cards/s/SkirkProspector.java @@ -55,7 +55,7 @@ public class SkirkProspector extends CardImpl { public SkirkProspector(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkirkRidgeExhumer.java b/Mage.Sets/src/mage/cards/s/SkirkRidgeExhumer.java index b16ca59b7b..76be380430 100644 --- a/Mage.Sets/src/mage/cards/s/SkirkRidgeExhumer.java +++ b/Mage.Sets/src/mage/cards/s/SkirkRidgeExhumer.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.FesteringGoblinToken; @@ -49,8 +50,8 @@ public class SkirkRidgeExhumer extends CardImpl { public SkirkRidgeExhumer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkirkShaman.java b/Mage.Sets/src/mage/cards/s/SkirkShaman.java index 2e03a47e3a..5fcf2f3202 100644 --- a/Mage.Sets/src/mage/cards/s/SkirkShaman.java +++ b/Mage.Sets/src/mage/cards/s/SkirkShaman.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -59,8 +60,8 @@ public class SkirkShaman extends CardImpl { public SkirkShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SkirkVolcanist.java b/Mage.Sets/src/mage/cards/s/SkirkVolcanist.java index 258f8ac3e5..efdbfe4ed6 100644 --- a/Mage.Sets/src/mage/cards/s/SkirkVolcanist.java +++ b/Mage.Sets/src/mage/cards/s/SkirkVolcanist.java @@ -58,7 +58,7 @@ public class SkirkVolcanist extends CardImpl { public SkirkVolcanist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkirsdagCultist.java b/Mage.Sets/src/mage/cards/s/SkirsdagCultist.java index 7670ebf9f0..020a5e6540 100644 --- a/Mage.Sets/src/mage/cards/s/SkirsdagCultist.java +++ b/Mage.Sets/src/mage/cards/s/SkirsdagCultist.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetCreatureOrPlayer; @@ -49,8 +50,8 @@ public class SkirsdagCultist extends CardImpl { public SkirsdagCultist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SkirsdagFlayer.java b/Mage.Sets/src/mage/cards/s/SkirsdagFlayer.java index 3d4cf6288d..ee56186532 100644 --- a/Mage.Sets/src/mage/cards/s/SkirsdagFlayer.java +++ b/Mage.Sets/src/mage/cards/s/SkirsdagFlayer.java @@ -59,8 +59,8 @@ public class SkirsdagFlayer extends CardImpl { public SkirsdagFlayer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkirsdagHighPriest.java b/Mage.Sets/src/mage/cards/s/SkirsdagHighPriest.java index 5a14203331..d6c15c1b31 100644 --- a/Mage.Sets/src/mage/cards/s/SkirsdagHighPriest.java +++ b/Mage.Sets/src/mage/cards/s/SkirsdagHighPriest.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; @@ -60,8 +61,8 @@ public class SkirsdagHighPriest extends CardImpl { public SkirsdagHighPriest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SkirsdagSupplicant.java b/Mage.Sets/src/mage/cards/s/SkirsdagSupplicant.java index ce9d8d95f4..1c83fa6ec1 100644 --- a/Mage.Sets/src/mage/cards/s/SkirsdagSupplicant.java +++ b/Mage.Sets/src/mage/cards/s/SkirsdagSupplicant.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.LoseLifeAllPlayersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,8 +49,8 @@ public class SkirsdagSupplicant extends CardImpl { public SkirsdagSupplicant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkithiryxTheBlightDragon.java b/Mage.Sets/src/mage/cards/s/SkithiryxTheBlightDragon.java index bdfec16170..94d598b52c 100644 --- a/Mage.Sets/src/mage/cards/s/SkithiryxTheBlightDragon.java +++ b/Mage.Sets/src/mage/cards/s/SkithiryxTheBlightDragon.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -53,8 +54,8 @@ public class SkithiryxTheBlightDragon extends CardImpl { public SkithiryxTheBlightDragon (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.DRAGON); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SkitterOfLizards.java b/Mage.Sets/src/mage/cards/s/SkitterOfLizards.java index 5c688bb3e6..646c31235f 100644 --- a/Mage.Sets/src/mage/cards/s/SkitterOfLizards.java +++ b/Mage.Sets/src/mage/cards/s/SkitterOfLizards.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MultikickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -47,7 +48,7 @@ public class SkitterOfLizards extends CardImpl { public SkitterOfLizards(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkitteringCrustacean.java b/Mage.Sets/src/mage/cards/s/SkitteringCrustacean.java index 61844a9b87..e4bb9a59c7 100644 --- a/Mage.Sets/src/mage/cards/s/SkitteringCrustacean.java +++ b/Mage.Sets/src/mage/cards/s/SkitteringCrustacean.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.MonstrosityAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class SkitteringCrustacean extends CardImpl { public SkitteringCrustacean(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Crab"); + this.subtype.add(SubType.CRAB); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkitteringHeartstopper.java b/Mage.Sets/src/mage/cards/s/SkitteringHeartstopper.java new file mode 100644 index 0000000000..aeb338db17 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SkitteringHeartstopper.java @@ -0,0 +1,70 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ColoredManaCost; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class SkitteringHeartstopper extends CardImpl { + + public SkitteringHeartstopper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); + + this.subtype.add(SubType.INSECT); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {B}: Skittering Heartstopper gains deathtouch until end of turn. (Any amount of damage it deals to a creature is enough to destroy it.) + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilitySourceEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.B))); + } + + public SkitteringHeartstopper(final SkitteringHeartstopper card) { + super(card); + } + + @Override + public SkitteringHeartstopper copy() { + return new SkitteringHeartstopper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SkitteringHorror.java b/Mage.Sets/src/mage/cards/s/SkitteringHorror.java index 9be8cef8a6..9c07f430ff 100644 --- a/Mage.Sets/src/mage/cards/s/SkitteringHorror.java +++ b/Mage.Sets/src/mage/cards/s/SkitteringHorror.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; /** @@ -44,7 +45,7 @@ public class SkitteringHorror extends CardImpl { public SkitteringHorror(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkitteringInvasion.java b/Mage.Sets/src/mage/cards/s/SkitteringInvasion.java index 3fea5dd72f..d52e110c6a 100644 --- a/Mage.Sets/src/mage/cards/s/SkitteringInvasion.java +++ b/Mage.Sets/src/mage/cards/s/SkitteringInvasion.java @@ -33,6 +33,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.EldraziSpawnToken; /** @@ -43,7 +44,7 @@ public class SkitteringInvasion extends CardImpl { public SkitteringInvasion (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.SORCERY},"{7}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.getSpellAbility().addEffect(new CreateTokenEffect(new EldraziSpawnToken(), 5)); } diff --git a/Mage.Sets/src/mage/cards/s/SkitteringMonstrosity.java b/Mage.Sets/src/mage/cards/s/SkitteringMonstrosity.java index 74e592227e..0ab70b9a01 100644 --- a/Mage.Sets/src/mage/cards/s/SkitteringMonstrosity.java +++ b/Mage.Sets/src/mage/cards/s/SkitteringMonstrosity.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; /** @@ -44,7 +45,7 @@ public class SkitteringMonstrosity extends CardImpl { public SkitteringMonstrosity(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SkitteringSkirge.java b/Mage.Sets/src/mage/cards/s/SkitteringSkirge.java index 66f875c606..e892dccb52 100644 --- a/Mage.Sets/src/mage/cards/s/SkitteringSkirge.java +++ b/Mage.Sets/src/mage/cards/s/SkitteringSkirge.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; /** @@ -45,7 +46,7 @@ public class SkitteringSkirge extends CardImpl { public SkitteringSkirge(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Skitterskin.java b/Mage.Sets/src/mage/cards/s/Skitterskin.java index ddcf0846a8..fa5973f65e 100644 --- a/Mage.Sets/src/mage/cards/s/Skitterskin.java +++ b/Mage.Sets/src/mage/cards/s/Skitterskin.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorlessPredicate; @@ -59,8 +60,8 @@ public class Skitterskin extends CardImpl { public Skitterskin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkittishKavu.java b/Mage.Sets/src/mage/cards/s/SkittishKavu.java index ce0c3ed903..0898bbc694 100644 --- a/Mage.Sets/src/mage/cards/s/SkittishKavu.java +++ b/Mage.Sets/src/mage/cards/s/SkittishKavu.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.TargetController; @@ -62,7 +63,7 @@ public class SkittishKavu extends CardImpl { public SkittishKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkittishValesk.java b/Mage.Sets/src/mage/cards/s/SkittishValesk.java index 4b31a14c82..7b2605b3ba 100644 --- a/Mage.Sets/src/mage/cards/s/SkittishValesk.java +++ b/Mage.Sets/src/mage/cards/s/SkittishValesk.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class SkittishValesk extends CardImpl { public SkittishValesk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/Skizzik.java b/Mage.Sets/src/mage/cards/s/Skizzik.java index 0f4dbceedc..e300c3911f 100644 --- a/Mage.Sets/src/mage/cards/s/Skizzik.java +++ b/Mage.Sets/src/mage/cards/s/Skizzik.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -48,7 +49,7 @@ public class Skizzik extends CardImpl { public Skizzik(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkizzikSurger.java b/Mage.Sets/src/mage/cards/s/SkizzikSurger.java index 9f73cfd476..a5ef065e73 100644 --- a/Mage.Sets/src/mage/cards/s/SkizzikSurger.java +++ b/Mage.Sets/src/mage/cards/s/SkizzikSurger.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledLandPermanent; import mage.target.common.TargetControlledPermanent; @@ -46,7 +47,7 @@ public class SkizzikSurger extends CardImpl { public SkizzikSurger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/Skulduggery.java b/Mage.Sets/src/mage/cards/s/Skulduggery.java new file mode 100644 index 0000000000..7690f8944c --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/Skulduggery.java @@ -0,0 +1,109 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class Skulduggery extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public Skulduggery(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}"); + + // Until end of turn, target creature you control gets +1/+1 and target creature an opponent controls gets -1/-1. + this.getSpellAbility().addEffect(new SkulduggeryEffect()); + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + } + + public Skulduggery(final Skulduggery card) { + super(card); + } + + @Override + public Skulduggery copy() { + return new Skulduggery(this); + } +} + +class SkulduggeryEffect extends ContinuousEffectImpl { + + public SkulduggeryEffect() { + super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature); + this.staticText = "Until end of turn, target creature you control gets +1/+1 and target creature an opponent controls gets -1/-1"; + } + + public SkulduggeryEffect(final SkulduggeryEffect effect) { + super(effect); + } + + @Override + public SkulduggeryEffect copy() { + return new SkulduggeryEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + permanent.addPower(1); + permanent.addToughness(1); + } + permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget()); + if (permanent != null) { + permanent.addPower(-1); + permanent.addToughness(-1); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SkulkingFugitive.java b/Mage.Sets/src/mage/cards/s/SkulkingFugitive.java index ed2b9a7b33..1156142cec 100644 --- a/Mage.Sets/src/mage/cards/s/SkulkingFugitive.java +++ b/Mage.Sets/src/mage/cards/s/SkulkingFugitive.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class SkulkingFugitive extends CardImpl { public SkulkingFugitive(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Horror"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HORROR); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SkulkingGhost.java b/Mage.Sets/src/mage/cards/s/SkulkingGhost.java index e8af520862..f76b161854 100644 --- a/Mage.Sets/src/mage/cards/s/SkulkingGhost.java +++ b/Mage.Sets/src/mage/cards/s/SkulkingGhost.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class SkulkingGhost extends CardImpl { public SkulkingGhost(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkulkingKnight.java b/Mage.Sets/src/mage/cards/s/SkulkingKnight.java index cd8403a187..2115ef92d8 100644 --- a/Mage.Sets/src/mage/cards/s/SkulkingKnight.java +++ b/Mage.Sets/src/mage/cards/s/SkulkingKnight.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlankingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class SkulkingKnight extends CardImpl { public SkulkingKnight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkullCollector.java b/Mage.Sets/src/mage/cards/s/SkullCollector.java index 4e280a2ca7..e233039250 100644 --- a/Mage.Sets/src/mage/cards/s/SkullCollector.java +++ b/Mage.Sets/src/mage/cards/s/SkullCollector.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -57,8 +58,8 @@ public class SkullCollector extends CardImpl { public SkullCollector(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkullbriarTheWalkingGrave.java b/Mage.Sets/src/mage/cards/s/SkullbriarTheWalkingGrave.java index 261f63555f..a1f06691a3 100644 --- a/Mage.Sets/src/mage/cards/s/SkullbriarTheWalkingGrave.java +++ b/Mage.Sets/src/mage/cards/s/SkullbriarTheWalkingGrave.java @@ -58,8 +58,8 @@ public class SkullbriarTheWalkingGrave extends CardImpl { public SkullbriarTheWalkingGrave(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Zombie"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Skullclamp.java b/Mage.Sets/src/mage/cards/s/Skullclamp.java index f6935a83d3..709a5323ca 100644 --- a/Mage.Sets/src/mage/cards/s/Skullclamp.java +++ b/Mage.Sets/src/mage/cards/s/Skullclamp.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class Skullclamp extends CardImpl { public Skullclamp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/-1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, -1))); diff --git a/Mage.Sets/src/mage/cards/s/SkullmaneBaku.java b/Mage.Sets/src/mage/cards/s/SkullmaneBaku.java index f919196c7c..1e6e85191a 100644 --- a/Mage.Sets/src/mage/cards/s/SkullmaneBaku.java +++ b/Mage.Sets/src/mage/cards/s/SkullmaneBaku.java @@ -44,6 +44,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -60,7 +61,7 @@ public class SkullmaneBaku extends CardImpl { public SkullmaneBaku(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Skullmulcher.java b/Mage.Sets/src/mage/cards/s/Skullmulcher.java index 19c7a5983b..f921a64eb9 100644 --- a/Mage.Sets/src/mage/cards/s/Skullmulcher.java +++ b/Mage.Sets/src/mage/cards/s/Skullmulcher.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DevourAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class Skullmulcher extends CardImpl { public Skullmulcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/Skullscorch.java b/Mage.Sets/src/mage/cards/s/Skullscorch.java new file mode 100644 index 0000000000..733f936b02 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/Skullscorch.java @@ -0,0 +1,114 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.game.stack.StackObject; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author L_J (based on code by dustinconrad) + */ +public class Skullscorch extends CardImpl { + + public Skullscorch(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{R}{R}"); + + // Target player discards two cards at random unless that player has Skullscorch deal 4 damage to him or her. + this.getSpellAbility().addEffect(new SkullscorchDiscardEffect()); + this.getSpellAbility().addTarget(new TargetPlayer()); + } + + public Skullscorch(final Skullscorch card) { + super(card); + } + + @Override + public Skullscorch copy() { + return new Skullscorch(this); + } +} + +class SkullscorchDiscardEffect extends OneShotEffect { + + public SkullscorchDiscardEffect() { + super(Outcome.DrawCard); + staticText = "Target player discards two cards at random unless that player has {source} deal 4 damage to him or her"; + } + + public SkullscorchDiscardEffect(final SkullscorchDiscardEffect effect) { + super(effect); + } + + @Override + public SkullscorchDiscardEffect copy() { + return new SkullscorchDiscardEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null) { + return false; + } + StackObject spell = null; + for(StackObject object : game.getStack()){ + if(object instanceof Spell && object.getSourceId().equals(source.getSourceId())){ + spell = object; + } + } + if(spell != null){ + boolean discardCards = true; + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + if (player != null) { + if (player.chooseUse(Outcome.Detriment, "Have " + spell.getLogName() + " deal 4 damage to you?", source, game)){ + discardCards = false; + player.damage(4, source.getSourceId(), game, false, true); + game.informPlayers(player.getLogName() + " has " + spell.getLogName() + " deal 4 to him or her"); + } + if (discardCards) { + player.discard(2, true, source, game); + } + } + return discardCards; + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/cards/s/Skullsnatcher.java b/Mage.Sets/src/mage/cards/s/Skullsnatcher.java index 1f33d2d534..75c961fbf2 100644 --- a/Mage.Sets/src/mage/cards/s/Skullsnatcher.java +++ b/Mage.Sets/src/mage/cards/s/Skullsnatcher.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.NinjutsuAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.common.FilterControlledCreaturePermanent; @@ -62,8 +63,8 @@ public class Skullsnatcher extends CardImpl { public Skullsnatcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Rat"); - this.subtype.add("Ninja"); + this.subtype.add(SubType.RAT); + this.subtype.add(SubType.NINJA); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Skullwinder.java b/Mage.Sets/src/mage/cards/s/Skullwinder.java index 1385a4163d..1f4a643efb 100644 --- a/Mage.Sets/src/mage/cards/s/Skullwinder.java +++ b/Mage.Sets/src/mage/cards/s/Skullwinder.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -55,7 +56,7 @@ public class Skullwinder extends CardImpl { public Skullwinder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkyEelSchool.java b/Mage.Sets/src/mage/cards/s/SkyEelSchool.java index 3c62e68211..e4b7faf86f 100644 --- a/Mage.Sets/src/mage/cards/s/SkyEelSchool.java +++ b/Mage.Sets/src/mage/cards/s/SkyEelSchool.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class SkyEelSchool extends CardImpl { public SkyEelSchool (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Fish"); + this.subtype.add(SubType.FISH); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkyHussar.java b/Mage.Sets/src/mage/cards/s/SkyHussar.java index bd7a92b2a1..ebeb0ceed6 100644 --- a/Mage.Sets/src/mage/cards/s/SkyHussar.java +++ b/Mage.Sets/src/mage/cards/s/SkyHussar.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ForecastAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -59,8 +60,8 @@ public class SkyHussar extends CardImpl { public SkyHussar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{U}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkyRuinDrake.java b/Mage.Sets/src/mage/cards/s/SkyRuinDrake.java index 4cb04412ac..bee800a855 100644 --- a/Mage.Sets/src/mage/cards/s/SkyRuinDrake.java +++ b/Mage.Sets/src/mage/cards/s/SkyRuinDrake.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SkyRuinDrake extends CardImpl { public SkyRuinDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SkyScourer.java b/Mage.Sets/src/mage/cards/s/SkyScourer.java index 0beb682fdf..70e52fdde2 100644 --- a/Mage.Sets/src/mage/cards/s/SkyScourer.java +++ b/Mage.Sets/src/mage/cards/s/SkyScourer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorlessPredicate; @@ -54,8 +55,8 @@ public class SkyScourer extends CardImpl { public SkyScourer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SkySkiff.java b/Mage.Sets/src/mage/cards/s/SkySkiff.java index 9310361a9e..ddecf2d151 100644 --- a/Mage.Sets/src/mage/cards/s/SkySkiff.java +++ b/Mage.Sets/src/mage/cards/s/SkySkiff.java @@ -1,66 +1,66 @@ -/* - * 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.cards.s; - -import mage.MageInt; -import mage.abilities.keyword.CrewAbility; -import mage.abilities.keyword.FlyingAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; - -import java.util.UUID; - -/** - * - * @author emerald000 - */ -public class SkySkiff extends CardImpl { - - public SkySkiff(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add(SubType.VEHICLE); - this.power = new MageInt(2); - this.toughness = new MageInt(3); - - // Flying - this.addAbility(FlyingAbility.getInstance()); - // Crew 1 - this.addAbility(new CrewAbility(1)); - } - - public SkySkiff(final SkySkiff card) { - super(card); - } - - @Override - public SkySkiff copy() { - return new SkySkiff(this); - } -} +/* + * 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.cards.s; + +import mage.MageInt; +import mage.abilities.keyword.CrewAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class SkySkiff extends CardImpl { + + public SkySkiff(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + this.subtype.add(SubType.VEHICLE); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Crew 1 + this.addAbility(new CrewAbility(1)); + } + + public SkySkiff(final SkySkiff card) { + super(card); + } + + @Override + public SkySkiff copy() { + return new SkySkiff(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SkySpirit.java b/Mage.Sets/src/mage/cards/s/SkySpirit.java index 64edcff649..c92472fd50 100644 --- a/Mage.Sets/src/mage/cards/s/SkySpirit.java +++ b/Mage.Sets/src/mage/cards/s/SkySpirit.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SkySpirit extends CardImpl { public SkySpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SkySwallower.java b/Mage.Sets/src/mage/cards/s/SkySwallower.java index 4c21c29013..0044c72585 100644 --- a/Mage.Sets/src/mage/cards/s/SkySwallower.java +++ b/Mage.Sets/src/mage/cards/s/SkySwallower.java @@ -52,7 +52,7 @@ public class SkySwallower extends CardImpl { public SkySwallower(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); - this.subtype.add("Leviathan"); + this.subtype.add(SubType.LEVIATHAN); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/s/SkyTerror.java b/Mage.Sets/src/mage/cards/s/SkyTerror.java new file mode 100644 index 0000000000..fd25a46b7f --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SkyTerror.java @@ -0,0 +1,68 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class SkyTerror extends CardImpl { + + public SkyTerror(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Menace + this.addAbility(new MenaceAbility()); + + } + + public SkyTerror(final SkyTerror card) { + super(card); + } + + @Override + public SkyTerror copy() { + return new SkyTerror(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SkyWeaver.java b/Mage.Sets/src/mage/cards/s/SkyWeaver.java index ff37f16313..5c126683dc 100644 --- a/Mage.Sets/src/mage/cards/s/SkyWeaver.java +++ b/Mage.Sets/src/mage/cards/s/SkyWeaver.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -61,8 +62,8 @@ public class SkyWeaver extends CardImpl { public SkyWeaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Metathran"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.METATHRAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkybladeOfTheLegion.java b/Mage.Sets/src/mage/cards/s/SkybladeOfTheLegion.java new file mode 100644 index 0000000000..2b5bb63844 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SkybladeOfTheLegion.java @@ -0,0 +1,65 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class SkybladeOfTheLegion extends CardImpl { + + public SkybladeOfTheLegion(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + } + + public SkybladeOfTheLegion(final SkybladeOfTheLegion card) { + super(card); + } + + @Override + public SkybladeOfTheLegion copy() { + return new SkybladeOfTheLegion(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SkyblinderStaff.java b/Mage.Sets/src/mage/cards/s/SkyblinderStaff.java index c026087067..c2818f732b 100644 --- a/Mage.Sets/src/mage/cards/s/SkyblinderStaff.java +++ b/Mage.Sets/src/mage/cards/s/SkyblinderStaff.java @@ -49,7 +49,7 @@ public class SkyblinderStaff extends CardImpl { public SkyblinderStaff(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+0 and can't be blocked by creatures with flying. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 0)); diff --git a/Mage.Sets/src/mage/cards/s/SkyclawThrash.java b/Mage.Sets/src/mage/cards/s/SkyclawThrash.java index 1811a0837d..94df4e01ec 100644 --- a/Mage.Sets/src/mage/cards/s/SkyclawThrash.java +++ b/Mage.Sets/src/mage/cards/s/SkyclawThrash.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.game.Game; @@ -54,8 +55,8 @@ public class SkyclawThrash extends CardImpl { public SkyclawThrash(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{U}{R}"); - this.subtype.add("Viashino"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SkyfireKirin.java b/Mage.Sets/src/mage/cards/s/SkyfireKirin.java index 20ba298295..1410e6b31f 100644 --- a/Mage.Sets/src/mage/cards/s/SkyfireKirin.java +++ b/Mage.Sets/src/mage/cards/s/SkyfireKirin.java @@ -60,8 +60,8 @@ public class SkyfireKirin extends CardImpl { public SkyfireKirin(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Kirin"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.KIRIN); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/Skygames.java b/Mage.Sets/src/mage/cards/s/Skygames.java index 33e7ec0961..c92c2c1f7e 100644 --- a/Mage.Sets/src/mage/cards/s/Skygames.java +++ b/Mage.Sets/src/mage/cards/s/Skygames.java @@ -52,7 +52,7 @@ public class Skygames extends CardImpl { public Skygames(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land diff --git a/Mage.Sets/src/mage/cards/s/SkyhunterCub.java b/Mage.Sets/src/mage/cards/s/SkyhunterCub.java index ff1d5b962a..10f42f5ac6 100644 --- a/Mage.Sets/src/mage/cards/s/SkyhunterCub.java +++ b/Mage.Sets/src/mage/cards/s/SkyhunterCub.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -52,8 +53,8 @@ public class SkyhunterCub extends CardImpl { public SkyhunterCub(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Knight"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SkyhunterPatrol.java b/Mage.Sets/src/mage/cards/s/SkyhunterPatrol.java index 0c5d12e498..2a4bebecd0 100644 --- a/Mage.Sets/src/mage/cards/s/SkyhunterPatrol.java +++ b/Mage.Sets/src/mage/cards/s/SkyhunterPatrol.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SkyhunterPatrol extends CardImpl { public SkyhunterPatrol(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Knight"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkyhunterProwler.java b/Mage.Sets/src/mage/cards/s/SkyhunterProwler.java index 88769b6615..a104f0307c 100644 --- a/Mage.Sets/src/mage/cards/s/SkyhunterProwler.java +++ b/Mage.Sets/src/mage/cards/s/SkyhunterProwler.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SkyhunterProwler extends CardImpl { public SkyhunterProwler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Knight"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkyhunterSkirmisher.java b/Mage.Sets/src/mage/cards/s/SkyhunterSkirmisher.java index 04e574dfba..05b4d74d50 100644 --- a/Mage.Sets/src/mage/cards/s/SkyhunterSkirmisher.java +++ b/Mage.Sets/src/mage/cards/s/SkyhunterSkirmisher.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SkyhunterSkirmisher extends CardImpl { public SkyhunterSkirmisher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Knight"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkyknightLegionnaire.java b/Mage.Sets/src/mage/cards/s/SkyknightLegionnaire.java index 44d5172609..ea54ea8e06 100644 --- a/Mage.Sets/src/mage/cards/s/SkyknightLegionnaire.java +++ b/Mage.Sets/src/mage/cards/s/SkyknightLegionnaire.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class SkyknightLegionnaire extends CardImpl { public SkyknightLegionnaire (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Skylasher.java b/Mage.Sets/src/mage/cards/s/Skylasher.java index bc25448be0..380bee2b4f 100644 --- a/Mage.Sets/src/mage/cards/s/Skylasher.java +++ b/Mage.Sets/src/mage/cards/s/Skylasher.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,7 +48,7 @@ public class Skylasher extends CardImpl { public Skylasher (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SkylineDespot.java b/Mage.Sets/src/mage/cards/s/SkylineDespot.java index 7fc882d525..7524c59fc6 100644 --- a/Mage.Sets/src/mage/cards/s/SkylineDespot.java +++ b/Mage.Sets/src/mage/cards/s/SkylineDespot.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.game.permanent.token.DragonToken2; @@ -52,7 +53,7 @@ public class SkylineDespot extends CardImpl { public SkylineDespot(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SkylinePredator.java b/Mage.Sets/src/mage/cards/s/SkylinePredator.java index 9ffbbcb474..eff0480927 100644 --- a/Mage.Sets/src/mage/cards/s/SkylinePredator.java +++ b/Mage.Sets/src/mage/cards/s/SkylinePredator.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SkylinePredator extends CardImpl { public SkylinePredator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SkymarchBloodletter.java b/Mage.Sets/src/mage/cards/s/SkymarchBloodletter.java new file mode 100644 index 0000000000..ea776f269b --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SkymarchBloodletter.java @@ -0,0 +1,77 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.target.Target; +import mage.target.common.TargetOpponent; + +/** + * + * @author TheElk801 + */ +public class SkymarchBloodletter extends CardImpl { + + public SkymarchBloodletter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Skymarch Bloodletters enters the battlefield, target opponent loses 1 life and you gain 1 life. + Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(1), false); + ability.addEffect(new GainLifeEffect(1).setText("and you gain 1 life")); + Target target = new TargetOpponent(); + ability.addTarget(target); + this.addAbility(ability); + } + + public SkymarchBloodletter(final SkymarchBloodletter card) { + super(card); + } + + @Override + public SkymarchBloodletter copy() { + return new SkymarchBloodletter(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SkymarkRoc.java b/Mage.Sets/src/mage/cards/s/SkymarkRoc.java index da580ca440..428290d512 100644 --- a/Mage.Sets/src/mage/cards/s/SkymarkRoc.java +++ b/Mage.Sets/src/mage/cards/s/SkymarkRoc.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -54,7 +55,7 @@ public class SkymarkRoc extends CardImpl { public SkymarkRoc(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkyrakerGiant.java b/Mage.Sets/src/mage/cards/s/SkyrakerGiant.java index 54a19ca686..8788cd558d 100644 --- a/Mage.Sets/src/mage/cards/s/SkyrakerGiant.java +++ b/Mage.Sets/src/mage/cards/s/SkyrakerGiant.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SkyrakerGiant extends CardImpl { public SkyrakerGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkyreachManta.java b/Mage.Sets/src/mage/cards/s/SkyreachManta.java index aa654898a5..a623331efa 100644 --- a/Mage.Sets/src/mage/cards/s/SkyreachManta.java +++ b/Mage.Sets/src/mage/cards/s/SkyreachManta.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.SunburstAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SkyreachManta extends CardImpl { public SkyreachManta(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Fish"); + this.subtype.add(SubType.FISH); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SkyriderElf.java b/Mage.Sets/src/mage/cards/s/SkyriderElf.java index 1c14ce0f13..660bb49e47 100644 --- a/Mage.Sets/src/mage/cards/s/SkyriderElf.java +++ b/Mage.Sets/src/mage/cards/s/SkyriderElf.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -46,9 +47,9 @@ public class SkyriderElf extends CardImpl { public SkyriderElf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{X}{G}{U}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); - this.subtype.add("Ally"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SkyriderTrainee.java b/Mage.Sets/src/mage/cards/s/SkyriderTrainee.java index f3f36be9a2..035d0e9a36 100644 --- a/Mage.Sets/src/mage/cards/s/SkyriderTrainee.java +++ b/Mage.Sets/src/mage/cards/s/SkyriderTrainee.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class SkyriderTrainee extends CardImpl { public SkyriderTrainee(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkyshipPlunderer.java b/Mage.Sets/src/mage/cards/s/SkyshipPlunderer.java index 0d9dc6828e..ca93f7c695 100644 --- a/Mage.Sets/src/mage/cards/s/SkyshipPlunderer.java +++ b/Mage.Sets/src/mage/cards/s/SkyshipPlunderer.java @@ -1,137 +1,138 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.keyword.FlyingAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.counters.Counter; -import mage.counters.CounterType; -import mage.counters.Counters; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.common.TargetPermanentOrPlayer; - -/** - * - * @author Styxo - */ -public class SkyshipPlunderer extends CardImpl { - - public SkyshipPlunderer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - - this.subtype.add("Human"); - this.subtype.add("Pirate"); - this.power = new MageInt(2); - this.toughness = new MageInt(1); - - // Flying - this.addAbility(FlyingAbility.getInstance()); - - // Whenever Skyship Plunderer deals combat damage to a player, for each kind of counter on target permanent or player, give that permanent or player another counter of that kind. - Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new SkyshipPlundererEffect(), false); - ability.addTarget(new TargetPermanentOrPlayer()); - this.addAbility(ability); - } - - public SkyshipPlunderer(final SkyshipPlunderer card) { - super(card); - } - - @Override - public SkyshipPlunderer copy() { - return new SkyshipPlunderer(this); - } -} - -class SkyshipPlundererEffect extends OneShotEffect { - - public SkyshipPlundererEffect() { - super(Outcome.Neutral); - this.staticText = "for each kind of counter on target permanent or player, give that permanent or player another counter of that kind"; - } - - public SkyshipPlundererEffect(final SkyshipPlundererEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Player player = game.getPlayer(getTargetPointer().getFirst(game, source)); - if (player != null) { - Counters counters = player.getCounters().copy(); - for (Counter counter : counters.values()) { - CounterType counterType = CounterType.findByName(counter.getName()); - Counter counterToAdd; - if (counterType != null) { - counterToAdd = counterType.createInstance(); - } else { - counterToAdd = new Counter(counter.getName()); - } - player.addCounters(counterToAdd, game); - } - return true; - } - Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); - if (permanent != null) { - Counters counters = permanent.getCounters(game).copy(); - for (Counter counter : counters.values()) { - CounterType counterType = CounterType.findByName(counter.getName()); - Counter counterToAdd; - if (counterType != null) { - counterToAdd = counterType.createInstance(); - } else { - counterToAdd = new Counter(counter.getName()); - } - permanent.addCounters(counterToAdd, source, game); - } - } - return true; - - } - return false; - } - - @Override - public Effect copy() { - return new SkyshipPlundererEffect(this); - } - -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.counters.Counter; +import mage.counters.CounterType; +import mage.counters.Counters; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetPermanentOrPlayer; + +/** + * + * @author Styxo + */ +public class SkyshipPlunderer extends CardImpl { + + public SkyshipPlunderer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever Skyship Plunderer deals combat damage to a player, for each kind of counter on target permanent or player, give that permanent or player another counter of that kind. + Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new SkyshipPlundererEffect(), false); + ability.addTarget(new TargetPermanentOrPlayer()); + this.addAbility(ability); + } + + public SkyshipPlunderer(final SkyshipPlunderer card) { + super(card); + } + + @Override + public SkyshipPlunderer copy() { + return new SkyshipPlunderer(this); + } +} + +class SkyshipPlundererEffect extends OneShotEffect { + + public SkyshipPlundererEffect() { + super(Outcome.Neutral); + this.staticText = "for each kind of counter on target permanent or player, give that permanent or player another counter of that kind"; + } + + public SkyshipPlundererEffect(final SkyshipPlundererEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Player player = game.getPlayer(getTargetPointer().getFirst(game, source)); + if (player != null) { + Counters counters = player.getCounters().copy(); + for (Counter counter : counters.values()) { + CounterType counterType = CounterType.findByName(counter.getName()); + Counter counterToAdd; + if (counterType != null) { + counterToAdd = counterType.createInstance(); + } else { + counterToAdd = new Counter(counter.getName()); + } + player.addCounters(counterToAdd, game); + } + return true; + } + Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (permanent != null) { + Counters counters = permanent.getCounters(game).copy(); + for (Counter counter : counters.values()) { + CounterType counterType = CounterType.findByName(counter.getName()); + Counter counterToAdd; + if (counterType != null) { + counterToAdd = counterType.createInstance(); + } else { + counterToAdd = new Counter(counter.getName()); + } + permanent.addCounters(counterToAdd, source, game); + } + } + return true; + + } + return false; + } + + @Override + public Effect copy() { + return new SkyshipPlundererEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/s/SkyshipStalker.java b/Mage.Sets/src/mage/cards/s/SkyshipStalker.java index 0b7e5214ed..3daaf6bdeb 100644 --- a/Mage.Sets/src/mage/cards/s/SkyshipStalker.java +++ b/Mage.Sets/src/mage/cards/s/SkyshipStalker.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class SkyshipStalker extends CardImpl { public SkyshipStalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkyshipWeatherlight.java b/Mage.Sets/src/mage/cards/s/SkyshipWeatherlight.java index 53dd9426f8..6ee53ae9fd 100644 --- a/Mage.Sets/src/mage/cards/s/SkyshipWeatherlight.java +++ b/Mage.Sets/src/mage/cards/s/SkyshipWeatherlight.java @@ -37,7 +37,7 @@ import mage.util.CardUtil; public class SkyshipWeatherlight extends CardImpl { public SkyshipWeatherlight(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); addSuperType(SuperType.LEGENDARY); // When Skyship Weatherlight enters the battlefield, search your library for any number of artifact and/or creature cards and exile them. Then shuffle your library. @@ -73,7 +73,7 @@ class SkyshipWeatherlightEffect extends SearchEffect { public SkyshipWeatherlightEffect() { super(new TargetCardInLibrary(0, Integer.MAX_VALUE, filter), Outcome.Neutral); - this.staticText = "search your library for any number of artifact and/or creature cards and remove them from the game. Then shuffle your library"; + this.staticText = "search your library for any number of artifact and/or creature cards and exile them. Then shuffle your library"; } @@ -114,7 +114,7 @@ class SkyshipWeatherlightEffect2 extends OneShotEffect { public SkyshipWeatherlightEffect2() { super(Outcome.ReturnToHand); - this.staticText = "Choose a card at random that was removed from the game with {this}. Put that card into your hand"; + this.staticText = "Choose a card at random that was exiled with {this}. Put that card into its owner's hand"; } public SkyshipWeatherlightEffect2(final SkyshipWeatherlightEffect2 effect) { diff --git a/Mage.Sets/src/mage/cards/s/Skyshooter.java b/Mage.Sets/src/mage/cards/s/Skyshooter.java index 0c473b164e..5e85c94e0d 100644 --- a/Mage.Sets/src/mage/cards/s/Skyshooter.java +++ b/Mage.Sets/src/mage/cards/s/Skyshooter.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterAttackingOrBlockingCreature; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -57,8 +58,8 @@ public class Skyshooter extends CardImpl { public Skyshooter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Archer"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SkyshroudArcher.java b/Mage.Sets/src/mage/cards/s/SkyshroudArcher.java index 6a34eed6b3..68176663f7 100644 --- a/Mage.Sets/src/mage/cards/s/SkyshroudArcher.java +++ b/Mage.Sets/src/mage/cards/s/SkyshroudArcher.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -57,8 +58,8 @@ public class SkyshroudArcher extends CardImpl { public SkyshroudArcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Archer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkyshroudBehemoth.java b/Mage.Sets/src/mage/cards/s/SkyshroudBehemoth.java index 3760b591eb..9d99ba9d99 100644 --- a/Mage.Sets/src/mage/cards/s/SkyshroudBehemoth.java +++ b/Mage.Sets/src/mage/cards/s/SkyshroudBehemoth.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FadingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SkyshroudBehemoth extends CardImpl { public SkyshroudBehemoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(10); this.toughness = new MageInt(10); diff --git a/Mage.Sets/src/mage/cards/s/SkyshroudCondor.java b/Mage.Sets/src/mage/cards/s/SkyshroudCondor.java index a48e4d3b0a..5c7243204a 100644 --- a/Mage.Sets/src/mage/cards/s/SkyshroudCondor.java +++ b/Mage.Sets/src/mage/cards/s/SkyshroudCondor.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class SkyshroudCondor extends CardImpl { public SkyshroudCondor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SkyshroudCutter.java b/Mage.Sets/src/mage/cards/s/SkyshroudCutter.java index 5fe8149b27..ad9269ae76 100644 --- a/Mage.Sets/src/mage/cards/s/SkyshroudCutter.java +++ b/Mage.Sets/src/mage/cards/s/SkyshroudCutter.java @@ -53,7 +53,7 @@ public class SkyshroudCutter extends CardImpl { public SkyshroudCutter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SkyshroudElf.java b/Mage.Sets/src/mage/cards/s/SkyshroudElf.java index ef5105e781..3615f8dd76 100644 --- a/Mage.Sets/src/mage/cards/s/SkyshroudElf.java +++ b/Mage.Sets/src/mage/cards/s/SkyshroudElf.java @@ -37,6 +37,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class SkyshroudElf extends CardImpl { public SkyshroudElf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkyshroudElite.java b/Mage.Sets/src/mage/cards/s/SkyshroudElite.java index 59179267e7..bcfaa4d3cb 100644 --- a/Mage.Sets/src/mage/cards/s/SkyshroudElite.java +++ b/Mage.Sets/src/mage/cards/s/SkyshroudElite.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; @@ -48,7 +49,7 @@ public class SkyshroudElite extends CardImpl { public SkyshroudElite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkyshroudFalcon.java b/Mage.Sets/src/mage/cards/s/SkyshroudFalcon.java index 334f4d4812..9c64bb5adb 100644 --- a/Mage.Sets/src/mage/cards/s/SkyshroudFalcon.java +++ b/Mage.Sets/src/mage/cards/s/SkyshroudFalcon.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SkyshroudFalcon extends CardImpl { public SkyshroudFalcon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkyshroudPoacher.java b/Mage.Sets/src/mage/cards/s/SkyshroudPoacher.java index decfcb6ab9..1fd6559d5e 100644 --- a/Mage.Sets/src/mage/cards/s/SkyshroudPoacher.java +++ b/Mage.Sets/src/mage/cards/s/SkyshroudPoacher.java @@ -57,8 +57,8 @@ public class SkyshroudPoacher extends CardImpl { public SkyshroudPoacher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SkyshroudRanger.java b/Mage.Sets/src/mage/cards/s/SkyshroudRanger.java index 826d43ccf7..bb09b6d0dc 100644 --- a/Mage.Sets/src/mage/cards/s/SkyshroudRanger.java +++ b/Mage.Sets/src/mage/cards/s/SkyshroudRanger.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.PutLandFromHandOntoBattlefieldEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class SkyshroudRanger extends CardImpl { public SkyshroudRanger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkyshroudRidgeback.java b/Mage.Sets/src/mage/cards/s/SkyshroudRidgeback.java index f23355befa..66a4ee1925 100644 --- a/Mage.Sets/src/mage/cards/s/SkyshroudRidgeback.java +++ b/Mage.Sets/src/mage/cards/s/SkyshroudRidgeback.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FadingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SkyshroudRidgeback extends CardImpl { public SkyshroudRidgeback(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkyshroudSentinel.java b/Mage.Sets/src/mage/cards/s/SkyshroudSentinel.java new file mode 100644 index 0000000000..7a1d4eaaf8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SkyshroudSentinel.java @@ -0,0 +1,74 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author TheElk801 + */ +public class SkyshroudSentinel extends CardImpl { + + private static final FilterCard filter = new FilterCard("cards named Skyshroud Sentinel"); + + static { + filter.add(new NamePredicate("Skyshroud Sentinel")); + } + + public SkyshroudSentinel(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.ELF); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Skyshroud Sentinel enters the battlefield, you may search your library for up to three cards named Skyshroud Sentinel, reveal them, and put them into your hand. If you do, shuffle your library. + TargetCardInLibrary target = new TargetCardInLibrary(0, 3, filter); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(target, true, true), true)); + } + + public SkyshroudSentinel(final SkyshroudSentinel card) { + super(card); + } + + @Override + public SkyshroudSentinel copy() { + return new SkyshroudSentinel(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SkyshroudTroll.java b/Mage.Sets/src/mage/cards/s/SkyshroudTroll.java index 3e0a024a8e..37aa9a59cd 100644 --- a/Mage.Sets/src/mage/cards/s/SkyshroudTroll.java +++ b/Mage.Sets/src/mage/cards/s/SkyshroudTroll.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class SkyshroudTroll extends CardImpl { public SkyshroudTroll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Troll"); - this.subtype.add("Giant"); + this.subtype.add(SubType.TROLL); + this.subtype.add(SubType.GIANT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkyshroudTroopers.java b/Mage.Sets/src/mage/cards/s/SkyshroudTroopers.java index 5f4b83ad4e..deb06e4c6e 100644 --- a/Mage.Sets/src/mage/cards/s/SkyshroudTroopers.java +++ b/Mage.Sets/src/mage/cards/s/SkyshroudTroopers.java @@ -33,6 +33,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,9 +43,9 @@ public class SkyshroudTroopers extends CardImpl { public SkyshroudTroopers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkyshroudVampire.java b/Mage.Sets/src/mage/cards/s/SkyshroudVampire.java index 73830c1540..f68227de8c 100644 --- a/Mage.Sets/src/mage/cards/s/SkyshroudVampire.java +++ b/Mage.Sets/src/mage/cards/s/SkyshroudVampire.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -49,7 +50,7 @@ public class SkyshroudVampire extends CardImpl { public SkyshroudVampire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkysnareSpider.java b/Mage.Sets/src/mage/cards/s/SkysnareSpider.java index 623573aa0f..5393863ae4 100644 --- a/Mage.Sets/src/mage/cards/s/SkysnareSpider.java +++ b/Mage.Sets/src/mage/cards/s/SkysnareSpider.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SkysnareSpider extends CardImpl { public SkysnareSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SkyspearCavalry.java b/Mage.Sets/src/mage/cards/s/SkyspearCavalry.java index 481e99a95e..e615b11962 100644 --- a/Mage.Sets/src/mage/cards/s/SkyspearCavalry.java +++ b/Mage.Sets/src/mage/cards/s/SkyspearCavalry.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SkyspearCavalry extends CardImpl { public SkyspearCavalry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SkyswirlHarrier.java b/Mage.Sets/src/mage/cards/s/SkyswirlHarrier.java index eb7dced1ed..c450d09d23 100644 --- a/Mage.Sets/src/mage/cards/s/SkyswirlHarrier.java +++ b/Mage.Sets/src/mage/cards/s/SkyswirlHarrier.java @@ -1,61 +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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.keyword.FlyingAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author LevelX2 - */ -public class SkyswirlHarrier extends CardImpl { - - public SkyswirlHarrier(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Bird"); - this.power = new MageInt(3); - this.toughness = new MageInt(4); - - // Flying - this.addAbility(FlyingAbility.getInstance()); - } - - public SkyswirlHarrier(final SkyswirlHarrier card) { - super(card); - } - - @Override - public SkyswirlHarrier copy() { - return new SkyswirlHarrier(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author LevelX2 + */ +public class SkyswirlHarrier extends CardImpl { + + public SkyswirlHarrier(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); + this.subtype.add(SubType.BIRD); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + } + + public SkyswirlHarrier(final SkyswirlHarrier card) { + super(card); + } + + @Override + public SkyswirlHarrier copy() { + return new SkyswirlHarrier(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SkywardEyeProphets.java b/Mage.Sets/src/mage/cards/s/SkywardEyeProphets.java index b32bcc049b..81064f6b3c 100644 --- a/Mage.Sets/src/mage/cards/s/SkywardEyeProphets.java +++ b/Mage.Sets/src/mage/cards/s/SkywardEyeProphets.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class SkywardEyeProphets extends CardImpl { public SkywardEyeProphets(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{W}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkywatcherAdept.java b/Mage.Sets/src/mage/cards/s/SkywatcherAdept.java index a700b04878..271d1ee31e 100644 --- a/Mage.Sets/src/mage/cards/s/SkywatcherAdept.java +++ b/Mage.Sets/src/mage/cards/s/SkywatcherAdept.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.LevelerCardBuilder; import mage.cards.CardSetInfo; import mage.cards.LevelerCard; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -48,8 +49,8 @@ public class SkywatcherAdept extends LevelerCard { public SkywatcherAdept(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.color.setBlue(true); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkywinderDrake.java b/Mage.Sets/src/mage/cards/s/SkywinderDrake.java index a39a527a67..7b9b4030da 100644 --- a/Mage.Sets/src/mage/cards/s/SkywinderDrake.java +++ b/Mage.Sets/src/mage/cards/s/SkywinderDrake.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SkywinderDrake extends CardImpl { public SkywinderDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SkywingAven.java b/Mage.Sets/src/mage/cards/s/SkywingAven.java index b0a5584848..f983112cd0 100644 --- a/Mage.Sets/src/mage/cards/s/SkywingAven.java +++ b/Mage.Sets/src/mage/cards/s/SkywingAven.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class SkywingAven extends CardImpl { public SkywingAven(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SlabHammer.java b/Mage.Sets/src/mage/cards/s/SlabHammer.java index cd1438382f..c697b5d501 100644 --- a/Mage.Sets/src/mage/cards/s/SlabHammer.java +++ b/Mage.Sets/src/mage/cards/s/SlabHammer.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.filter.common.FilterControlledLandPermanent; @@ -51,7 +52,7 @@ public class SlabHammer extends CardImpl { public SlabHammer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Whenever equipped creature attacks, you may return a land you control to its owner's hand. If you do, the creature gets +2/+2 until end of turn. Ability ability = new AttacksAttachedTriggeredAbility( diff --git a/Mage.Sets/src/mage/cards/s/SlagFiend.java b/Mage.Sets/src/mage/cards/s/SlagFiend.java index 59eb18cc3b..08b3f14790 100644 --- a/Mage.Sets/src/mage/cards/s/SlagFiend.java +++ b/Mage.Sets/src/mage/cards/s/SlagFiend.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterArtifactCard; @@ -47,7 +48,7 @@ public class SlagFiend extends CardImpl { public SlagFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SlagwurmArmor.java b/Mage.Sets/src/mage/cards/s/SlagwurmArmor.java index 684cd41e3c..fee223bbd8 100644 --- a/Mage.Sets/src/mage/cards/s/SlagwurmArmor.java +++ b/Mage.Sets/src/mage/cards/s/SlagwurmArmor.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -45,7 +46,7 @@ public class SlagwurmArmor extends CardImpl { public SlagwurmArmor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(0, 6))); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3))); } diff --git a/Mage.Sets/src/mage/cards/s/SlashOfTalons.java b/Mage.Sets/src/mage/cards/s/SlashOfTalons.java new file mode 100644 index 0000000000..59b8aeb183 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SlashOfTalons.java @@ -0,0 +1,59 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetAttackingOrBlockingCreature; + +/** + * + * @author TheElk801 + */ +public class SlashOfTalons extends CardImpl { + + public SlashOfTalons(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); + + // Slash of Talons deals 2 damage to target attacking or blocking creature. + getSpellAbility().addEffect(new DamageTargetEffect(2)); + getSpellAbility().addTarget(new TargetAttackingOrBlockingCreature()); + } + + public SlashOfTalons(final SlashOfTalons card) { + super(card); + } + + @Override + public SlashOfTalons copy() { + return new SlashOfTalons(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SlashPanther.java b/Mage.Sets/src/mage/cards/s/SlashPanther.java index 013db32c9a..b3f88d8a1a 100644 --- a/Mage.Sets/src/mage/cards/s/SlashPanther.java +++ b/Mage.Sets/src/mage/cards/s/SlashPanther.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SlashPanther extends CardImpl { public SlashPanther(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{R/P}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SlashingTiger.java b/Mage.Sets/src/mage/cards/s/SlashingTiger.java index c613828afa..5bb96e335f 100644 --- a/Mage.Sets/src/mage/cards/s/SlashingTiger.java +++ b/Mage.Sets/src/mage/cards/s/SlashingTiger.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class SlashingTiger extends CardImpl { public SlashingTiger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SlateStreetRuffian.java b/Mage.Sets/src/mage/cards/s/SlateStreetRuffian.java index 3bb779981d..27c970ca28 100644 --- a/Mage.Sets/src/mage/cards/s/SlateStreetRuffian.java +++ b/Mage.Sets/src/mage/cards/s/SlateStreetRuffian.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -48,8 +49,8 @@ public class SlateStreetRuffian extends CardImpl { public SlateStreetRuffian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SlaughterDrone.java b/Mage.Sets/src/mage/cards/s/SlaughterDrone.java index c653aee5ff..603a18542a 100644 --- a/Mage.Sets/src/mage/cards/s/SlaughterDrone.java +++ b/Mage.Sets/src/mage/cards/s/SlaughterDrone.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class SlaughterDrone extends CardImpl { public SlaughterDrone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Slaughterhorn.java b/Mage.Sets/src/mage/cards/s/Slaughterhorn.java index 468ecdb370..d96f03ee8a 100644 --- a/Mage.Sets/src/mage/cards/s/Slaughterhorn.java +++ b/Mage.Sets/src/mage/cards/s/Slaughterhorn.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.BloodrushAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class Slaughterhorn extends CardImpl { public Slaughterhorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SlaughterhouseBouncer.java b/Mage.Sets/src/mage/cards/s/SlaughterhouseBouncer.java new file mode 100644 index 0000000000..56f90ac158 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SlaughterhouseBouncer.java @@ -0,0 +1,78 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.condition.common.HellbentCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class SlaughterhouseBouncer extends CardImpl { + + public SlaughterhouseBouncer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); + + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Hellbent - When Slaughterhouse Bouncer dies, if you have no cards in hand, target creature gets -3/-3 until end of turn. + Ability ability = new ConditionalTriggeredAbility( + new DiesTriggeredAbility(new BoostTargetEffect(-3, -3, Duration.EndOfTurn)), + HellbentCondition.instance, + "When {this} dies, if you have no cards in hand, target creature gets -3/-3 until end of turn." + ); + ability.setAbilityWord(AbilityWord.HELLBENT); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public SlaughterhouseBouncer(final SlaughterhouseBouncer card) { + super(card); + } + + @Override + public SlaughterhouseBouncer copy() { + return new SlaughterhouseBouncer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SlaveI.java b/Mage.Sets/src/mage/cards/s/SlaveI.java index 5a3c5f13f3..0d5d6b2fc9 100644 --- a/Mage.Sets/src/mage/cards/s/SlaveI.java +++ b/Mage.Sets/src/mage/cards/s/SlaveI.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SpaceflightAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.counters.CounterType; @@ -48,7 +49,7 @@ public class SlaveI extends CardImpl { public SlaveI(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Starship"); + this.subtype.add(SubType.STARSHIP); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SlaveOfBolas.java b/Mage.Sets/src/mage/cards/s/SlaveOfBolas.java index a05a6a3986..9433de0741 100644 --- a/Mage.Sets/src/mage/cards/s/SlaveOfBolas.java +++ b/Mage.Sets/src/mage/cards/s/SlaveOfBolas.java @@ -54,12 +54,12 @@ import mage.target.targetpointer.FixedTarget; public class SlaveOfBolas extends CardImpl { public SlaveOfBolas(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{U/R}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U/R}{B}"); // Gain control of target creature. Untap that creature. It gains haste until end of turn. Sacrifice it at the beginning of the next end step. this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new UntapTargetEffect()); - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap that creature")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("It gains haste until end of turn")); this.getSpellAbility().addEffect(new SlaveOfBolasEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } diff --git a/Mage.Sets/src/mage/cards/s/SlaveringNulls.java b/Mage.Sets/src/mage/cards/s/SlaveringNulls.java index 39ace40874..a0377766bc 100644 --- a/Mage.Sets/src/mage/cards/s/SlaveringNulls.java +++ b/Mage.Sets/src/mage/cards/s/SlaveringNulls.java @@ -55,8 +55,8 @@ public class SlaveringNulls extends CardImpl { public SlaveringNulls(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SlayerOfTheWicked.java b/Mage.Sets/src/mage/cards/s/SlayerOfTheWicked.java index 3d6ecc20b0..6a3a63964a 100644 --- a/Mage.Sets/src/mage/cards/s/SlayerOfTheWicked.java +++ b/Mage.Sets/src/mage/cards/s/SlayerOfTheWicked.java @@ -58,8 +58,8 @@ public class SlayerOfTheWicked extends CardImpl { public SlayerOfTheWicked(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SlayersCleaver.java b/Mage.Sets/src/mage/cards/s/SlayersCleaver.java index 5b474bc567..37f6c7d00f 100644 --- a/Mage.Sets/src/mage/cards/s/SlayersCleaver.java +++ b/Mage.Sets/src/mage/cards/s/SlayersCleaver.java @@ -48,7 +48,7 @@ public class SlayersCleaver extends CardImpl { public SlayersCleaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +3/+1 and must be blocked by an Eldrazi if able. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 1)); diff --git a/Mage.Sets/src/mage/cards/s/SlayersPlate.java b/Mage.Sets/src/mage/cards/s/SlayersPlate.java index b065eda84a..723cb89b6d 100644 --- a/Mage.Sets/src/mage/cards/s/SlayersPlate.java +++ b/Mage.Sets/src/mage/cards/s/SlayersPlate.java @@ -55,7 +55,7 @@ public class SlayersPlate extends CardImpl { public SlayersPlate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +4/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(4, 2))); diff --git a/Mage.Sets/src/mage/cards/s/SleekSchooner.java b/Mage.Sets/src/mage/cards/s/SleekSchooner.java new file mode 100644 index 0000000000..cd287022a2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SleekSchooner.java @@ -0,0 +1,64 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.CrewAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author TheElk801 + */ +public class SleekSchooner extends CardImpl { + + public SleekSchooner(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + this.subtype.add(SubType.VEHICLE); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Crew 1 + this.addAbility(new CrewAbility(1)); + + } + + public SleekSchooner(final SleekSchooner card) { + super(card); + } + + @Override + public SleekSchooner copy() { + return new SleekSchooner(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SleepParalysis.java b/Mage.Sets/src/mage/cards/s/SleepParalysis.java index 8446d5b2b0..3efa3eb3ce 100644 --- a/Mage.Sets/src/mage/cards/s/SleepParalysis.java +++ b/Mage.Sets/src/mage/cards/s/SleepParalysis.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -50,7 +51,7 @@ public class SleepParalysis extends CardImpl { public SleepParalysis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SleeperAgent.java b/Mage.Sets/src/mage/cards/s/SleeperAgent.java index f7d0fc9d2d..f7c3167367 100644 --- a/Mage.Sets/src/mage/cards/s/SleeperAgent.java +++ b/Mage.Sets/src/mage/cards/s/SleeperAgent.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -54,7 +55,7 @@ public class SleeperAgent extends CardImpl { public SleeperAgent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Minion"); + this.subtype.add(SubType.MINION); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SleepersGuile.java b/Mage.Sets/src/mage/cards/s/SleepersGuile.java index cb1b0c67d5..4fa0d7d093 100644 --- a/Mage.Sets/src/mage/cards/s/SleepersGuile.java +++ b/Mage.Sets/src/mage/cards/s/SleepersGuile.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -53,7 +54,7 @@ public class SleepersGuile extends CardImpl { public SleepersGuile(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/SleepersRobe.java b/Mage.Sets/src/mage/cards/s/SleepersRobe.java index c865797d6d..aeb5e0b334 100644 --- a/Mage.Sets/src/mage/cards/s/SleepersRobe.java +++ b/Mage.Sets/src/mage/cards/s/SleepersRobe.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -53,8 +54,8 @@ import mage.target.common.TargetCreaturePermanent; public class SleepersRobe extends CardImpl { public SleepersRobe(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}{B}"); - this.subtype.add("Aura"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{B}"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); @@ -62,12 +63,12 @@ public class SleepersRobe extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - + // Enchanted creature has fear. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FearAbility.getInstance(), AttachmentType.AURA))); - + // Whenever enchanted creature deals combat damage to an opponent, you may draw a card. - this.addAbility(new DealsDamageToAPlayerAttachedTriggeredAbility(new DrawCardSourceControllerEffect(1), "enchanted creature", true, false, false, TargetController.OPPONENT)); + this.addAbility(new DealsDamageToAPlayerAttachedTriggeredAbility(new DrawCardSourceControllerEffect(1), "enchanted creature", true, false, true, TargetController.OPPONENT)); } public SleepersRobe(final SleepersRobe card) { @@ -78,4 +79,4 @@ public class SleepersRobe extends CardImpl { public SleepersRobe copy() { return new SleepersRobe(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/s/SleepingPotion.java b/Mage.Sets/src/mage/cards/s/SleepingPotion.java index 68afd06bbf..d5f70b3b1f 100644 --- a/Mage.Sets/src/mage/cards/s/SleepingPotion.java +++ b/Mage.Sets/src/mage/cards/s/SleepingPotion.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -53,7 +54,7 @@ public class SleepingPotion extends CardImpl { public SleepingPotion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SliceinTwain.java b/Mage.Sets/src/mage/cards/s/SliceInTwain.java similarity index 86% rename from Mage.Sets/src/mage/cards/s/SliceinTwain.java rename to Mage.Sets/src/mage/cards/s/SliceInTwain.java index abb03b3116..1c01b61ab2 100644 --- a/Mage.Sets/src/mage/cards/s/SliceinTwain.java +++ b/Mage.Sets/src/mage/cards/s/SliceInTwain.java @@ -25,9 +25,9 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.s; +import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; @@ -36,28 +36,26 @@ import mage.constants.CardType; import mage.filter.StaticFilters; import mage.target.TargetPermanent; -import java.util.UUID; - /** * * @author Loki */ -public class SliceinTwain extends CardImpl { +public class SliceInTwain extends CardImpl { - public SliceinTwain (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{G}{G}"); + public SliceInTwain(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}{G}"); this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).setText("

Draw a card")); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } - public SliceinTwain (final SliceinTwain card) { + public SliceInTwain(final SliceInTwain card) { super(card); } @Override - public SliceinTwain copy() { - return new SliceinTwain(this); + public SliceInTwain copy() { + return new SliceInTwain(this); } } diff --git a/Mage.Sets/src/mage/cards/s/SlimyKavu.java b/Mage.Sets/src/mage/cards/s/SlimyKavu.java index 58a212235f..64eec8e4e6 100644 --- a/Mage.Sets/src/mage/cards/s/SlimyKavu.java +++ b/Mage.Sets/src/mage/cards/s/SlimyKavu.java @@ -50,7 +50,7 @@ public class SlimyKavu extends CardImpl { public SlimyKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SlingshotGoblin.java b/Mage.Sets/src/mage/cards/s/SlingshotGoblin.java index a8c55f5b77..3c8c5b23db 100644 --- a/Mage.Sets/src/mage/cards/s/SlingshotGoblin.java +++ b/Mage.Sets/src/mage/cards/s/SlingshotGoblin.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -58,7 +59,7 @@ public class SlingshotGoblin extends CardImpl { public SlingshotGoblin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SlinkingGiant.java b/Mage.Sets/src/mage/cards/s/SlinkingGiant.java index c97b5e52e0..e695dd56d9 100644 --- a/Mage.Sets/src/mage/cards/s/SlinkingGiant.java +++ b/Mage.Sets/src/mage/cards/s/SlinkingGiant.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class SlinkingGiant extends CardImpl { public SlinkingGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SlinkingSerpent.java b/Mage.Sets/src/mage/cards/s/SlinkingSerpent.java index 555ded5a98..83fd7995d7 100644 --- a/Mage.Sets/src/mage/cards/s/SlinkingSerpent.java +++ b/Mage.Sets/src/mage/cards/s/SlinkingSerpent.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SlinkingSerpent extends CardImpl { public SlinkingSerpent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{B}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SlinkingSkirge.java b/Mage.Sets/src/mage/cards/s/SlinkingSkirge.java index c6b31b2268..1ae357f6e5 100644 --- a/Mage.Sets/src/mage/cards/s/SlinkingSkirge.java +++ b/Mage.Sets/src/mage/cards/s/SlinkingSkirge.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,7 +49,7 @@ public class SlinkingSkirge extends CardImpl { public SlinkingSkirge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SlipperyBogle.java b/Mage.Sets/src/mage/cards/s/SlipperyBogle.java index 709b107c87..97ab930afd 100644 --- a/Mage.Sets/src/mage/cards/s/SlipperyBogle.java +++ b/Mage.Sets/src/mage/cards/s/SlipperyBogle.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SlipperyBogle extends CardImpl { public SlipperyBogle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G/U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SlipstreamEel.java b/Mage.Sets/src/mage/cards/s/SlipstreamEel.java index 69cd6a8f93..13066424c4 100644 --- a/Mage.Sets/src/mage/cards/s/SlipstreamEel.java +++ b/Mage.Sets/src/mage/cards/s/SlipstreamEel.java @@ -48,8 +48,8 @@ public class SlipstreamEel extends CardImpl { public SlipstreamEel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); - this.subtype.add("Fish"); - this.subtype.add("Beast"); + this.subtype.add(SubType.FISH); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SlipstreamSerpent.java b/Mage.Sets/src/mage/cards/s/SlipstreamSerpent.java index 721094fc3e..ae65e144c9 100644 --- a/Mage.Sets/src/mage/cards/s/SlipstreamSerpent.java +++ b/Mage.Sets/src/mage/cards/s/SlipstreamSerpent.java @@ -51,7 +51,7 @@ public class SlipstreamSerpent extends CardImpl { public SlipstreamSerpent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{7}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SliptideSerpent.java b/Mage.Sets/src/mage/cards/s/SliptideSerpent.java new file mode 100644 index 0000000000..f104a55aaa --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SliptideSerpent.java @@ -0,0 +1,65 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class SliptideSerpent extends CardImpl { + + public SliptideSerpent(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{U}"); + + this.subtype.add(SubType.SERPENT); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // {3}{U}: Return Sliptide Serpent to its owner's hand. + this.addAbility(new SimpleActivatedAbility(new ReturnToHandSourceEffect(true), new ManaCostsImpl("{3}{U}"))); + } + + public SliptideSerpent(final SliptideSerpent card) { + super(card); + } + + @Override + public SliptideSerpent copy() { + return new SliptideSerpent(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SlithAscendant.java b/Mage.Sets/src/mage/cards/s/SlithAscendant.java index 625b7064b5..d158be4963 100644 --- a/Mage.Sets/src/mage/cards/s/SlithAscendant.java +++ b/Mage.Sets/src/mage/cards/s/SlithAscendant.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,7 +46,7 @@ public class SlithAscendant extends CardImpl { public SlithAscendant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Slith"); + this.subtype.add(SubType.SLITH); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SlithBloodletter.java b/Mage.Sets/src/mage/cards/s/SlithBloodletter.java index 55f74cd9b7..2f45b6b478 100644 --- a/Mage.Sets/src/mage/cards/s/SlithBloodletter.java +++ b/Mage.Sets/src/mage/cards/s/SlithBloodletter.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -48,7 +49,7 @@ public class SlithBloodletter extends CardImpl { public SlithBloodletter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Slith"); + this.subtype.add(SubType.SLITH); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SlithFirewalker.java b/Mage.Sets/src/mage/cards/s/SlithFirewalker.java index ce2a64e5c0..29613757d5 100644 --- a/Mage.Sets/src/mage/cards/s/SlithFirewalker.java +++ b/Mage.Sets/src/mage/cards/s/SlithFirewalker.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,7 +46,7 @@ public class SlithFirewalker extends CardImpl { public SlithFirewalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{R}"); - this.subtype.add("Slith"); + this.subtype.add(SubType.SLITH); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SlithPredator.java b/Mage.Sets/src/mage/cards/s/SlithPredator.java index 0877935bb1..9672f54ffd 100644 --- a/Mage.Sets/src/mage/cards/s/SlithPredator.java +++ b/Mage.Sets/src/mage/cards/s/SlithPredator.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,7 +46,7 @@ public class SlithPredator extends CardImpl { public SlithPredator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); - this.subtype.add("Slith"); + this.subtype.add(SubType.SLITH); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SlithStrider.java b/Mage.Sets/src/mage/cards/s/SlithStrider.java index edb85191a9..bd0c7bebf3 100644 --- a/Mage.Sets/src/mage/cards/s/SlithStrider.java +++ b/Mage.Sets/src/mage/cards/s/SlithStrider.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -46,7 +47,7 @@ public class SlithStrider extends CardImpl { public SlithStrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Slith"); + this.subtype.add(SubType.SLITH); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SlitherBlade.java b/Mage.Sets/src/mage/cards/s/SlitherBlade.java index b172270254..aea28e32ac 100644 --- a/Mage.Sets/src/mage/cards/s/SlitherBlade.java +++ b/Mage.Sets/src/mage/cards/s/SlitherBlade.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SlitherBlade extends CardImpl { public SlitherBlade(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}"); - this.subtype.add("Naga"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Slitherhead.java b/Mage.Sets/src/mage/cards/s/Slitherhead.java index 91daebf189..f77372943c 100644 --- a/Mage.Sets/src/mage/cards/s/Slitherhead.java +++ b/Mage.Sets/src/mage/cards/s/Slitherhead.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ScavengeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class Slitherhead extends CardImpl { public Slitherhead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B/G}"); - this.subtype.add("Plant"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SlitheringShade.java b/Mage.Sets/src/mage/cards/s/SlitheringShade.java index d7d9f83a1b..832fe06264 100644 --- a/Mage.Sets/src/mage/cards/s/SlitheringShade.java +++ b/Mage.Sets/src/mage/cards/s/SlitheringShade.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class SlitheringShade extends CardImpl { public SlitheringShade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Shade"); + this.subtype.add(SubType.SHADE); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Slithermuse.java b/Mage.Sets/src/mage/cards/s/Slithermuse.java index 74f581e012..b083f4a875 100644 --- a/Mage.Sets/src/mage/cards/s/Slithermuse.java +++ b/Mage.Sets/src/mage/cards/s/Slithermuse.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class Slithermuse extends CardImpl { public Slithermuse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SlitheryStalker.java b/Mage.Sets/src/mage/cards/s/SlitheryStalker.java index 3fc89e95b9..93c5adde1d 100644 --- a/Mage.Sets/src/mage/cards/s/SlitheryStalker.java +++ b/Mage.Sets/src/mage/cards/s/SlitheryStalker.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -65,8 +66,8 @@ public class SlitheryStalker extends CardImpl { public SlitheryStalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Nightmare"); - this.subtype.add("Horror"); + this.subtype.add(SubType.NIGHTMARE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SliverConstruct.java b/Mage.Sets/src/mage/cards/s/SliverConstruct.java index 5fd6dde3c3..bef277e267 100644 --- a/Mage.Sets/src/mage/cards/s/SliverConstruct.java +++ b/Mage.Sets/src/mage/cards/s/SliverConstruct.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class SliverConstruct extends CardImpl { public SliverConstruct(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Sliver"); - this.subtype.add("Construct"); + this.subtype.add(SubType.SLIVER); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SliverHivelord.java b/Mage.Sets/src/mage/cards/s/SliverHivelord.java index c72d7b531a..deb245a23f 100644 --- a/Mage.Sets/src/mage/cards/s/SliverHivelord.java +++ b/Mage.Sets/src/mage/cards/s/SliverHivelord.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class SliverHivelord extends CardImpl { public SliverHivelord(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}{B}{R}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SliverLegion.java b/Mage.Sets/src/mage/cards/s/SliverLegion.java index ffacef5cef..6f948fa5ca 100644 --- a/Mage.Sets/src/mage/cards/s/SliverLegion.java +++ b/Mage.Sets/src/mage/cards/s/SliverLegion.java @@ -56,7 +56,7 @@ public class SliverLegion extends CardImpl { public SliverLegion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/s/SliverOverlord.java b/Mage.Sets/src/mage/cards/s/SliverOverlord.java index 0a23afc718..9a5fde419a 100644 --- a/Mage.Sets/src/mage/cards/s/SliverOverlord.java +++ b/Mage.Sets/src/mage/cards/s/SliverOverlord.java @@ -59,8 +59,8 @@ public class SliverOverlord extends CardImpl { public SliverOverlord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Sliver"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.SLIVER); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/s/SliverQueen.java b/Mage.Sets/src/mage/cards/s/SliverQueen.java index 39a13c18b3..facda0a996 100644 --- a/Mage.Sets/src/mage/cards/s/SliverQueen.java +++ b/Mage.Sets/src/mage/cards/s/SliverQueen.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.game.permanent.token.SliverToken; @@ -48,7 +49,7 @@ public class SliverQueen extends CardImpl { public SliverQueen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/s/Sliversmith.java b/Mage.Sets/src/mage/cards/s/Sliversmith.java index 5f5669393b..5c99346dde 100644 --- a/Mage.Sets/src/mage/cards/s/Sliversmith.java +++ b/Mage.Sets/src/mage/cards/s/Sliversmith.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.SliversmithToken; @@ -49,7 +50,7 @@ public class Sliversmith extends CardImpl { public Sliversmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SlobadGoblinTinkerer.java b/Mage.Sets/src/mage/cards/s/SlobadGoblinTinkerer.java index a00f977d62..469ce84d9b 100644 --- a/Mage.Sets/src/mage/cards/s/SlobadGoblinTinkerer.java +++ b/Mage.Sets/src/mage/cards/s/SlobadGoblinTinkerer.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -64,8 +65,8 @@ public class SlobadGoblinTinkerer extends CardImpl { public SlobadGoblinTinkerer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Goblin"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SlowMotion.java b/Mage.Sets/src/mage/cards/s/SlowMotion.java index 3c101329bf..78a3e96bd3 100644 --- a/Mage.Sets/src/mage/cards/s/SlowMotion.java +++ b/Mage.Sets/src/mage/cards/s/SlowMotion.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.game.Game; @@ -56,7 +57,7 @@ public class SlowMotion extends CardImpl { public SlowMotion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/SludgeCrawler.java b/Mage.Sets/src/mage/cards/s/SludgeCrawler.java index b9604de00e..b2ee3a43f3 100644 --- a/Mage.Sets/src/mage/cards/s/SludgeCrawler.java +++ b/Mage.Sets/src/mage/cards/s/SludgeCrawler.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.IngestAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class SludgeCrawler extends CardImpl { public SludgeCrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SludgeStrider.java b/Mage.Sets/src/mage/cards/s/SludgeStrider.java index 868328a6f4..fd29c7c1af 100644 --- a/Mage.Sets/src/mage/cards/s/SludgeStrider.java +++ b/Mage.Sets/src/mage/cards/s/SludgeStrider.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DoIfCostPaid; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class SludgeStrider extends CardImpl { public SludgeStrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}{W}{U}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/Sluggishness.java b/Mage.Sets/src/mage/cards/s/Sluggishness.java index 1c9619a7b5..cf5f49c48c 100644 --- a/Mage.Sets/src/mage/cards/s/Sluggishness.java +++ b/Mage.Sets/src/mage/cards/s/Sluggishness.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -52,7 +53,7 @@ public class Sluggishness extends CardImpl { public Sluggishness(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/SluicewayScorpion.java b/Mage.Sets/src/mage/cards/s/SluicewayScorpion.java index b68be52e9b..c2a85f6118 100644 --- a/Mage.Sets/src/mage/cards/s/SluicewayScorpion.java +++ b/Mage.Sets/src/mage/cards/s/SluicewayScorpion.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ScavengeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class SluicewayScorpion extends CardImpl { public SluicewayScorpion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{G}"); - this.subtype.add("Scorpion"); + this.subtype.add(SubType.SCORPION); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SlumReaper.java b/Mage.Sets/src/mage/cards/s/SlumReaper.java index e417724438..93515ff23f 100644 --- a/Mage.Sets/src/mage/cards/s/SlumReaper.java +++ b/Mage.Sets/src/mage/cards/s/SlumReaper.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; /** @@ -44,7 +45,7 @@ public class SlumReaper extends CardImpl { public SlumReaper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SlumberingDragon.java b/Mage.Sets/src/mage/cards/s/SlumberingDragon.java index 768380d82f..b11c444882 100644 --- a/Mage.Sets/src/mage/cards/s/SlumberingDragon.java +++ b/Mage.Sets/src/mage/cards/s/SlumberingDragon.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SetTargetPointer; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class SlumberingDragon extends CardImpl { public SlumberingDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SlumberingTora.java b/Mage.Sets/src/mage/cards/s/SlumberingTora.java index 2f54f97816..2debfd2593 100644 --- a/Mage.Sets/src/mage/cards/s/SlumberingTora.java +++ b/Mage.Sets/src/mage/cards/s/SlumberingTora.java @@ -98,7 +98,7 @@ public class SlumberingTora extends CardImpl { case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { permanent.addCardType(CardType.CREATURE); - permanent.getSubtype(game).add("Cat"); + permanent.getSubtype(game).add(SubType.CAT); } break; case PTChangingEffects_7: diff --git a/Mage.Sets/src/mage/cards/s/SlyRequisitioner.java b/Mage.Sets/src/mage/cards/s/SlyRequisitioner.java index 401ef21fb6..532461e741 100644 --- a/Mage.Sets/src/mage/cards/s/SlyRequisitioner.java +++ b/Mage.Sets/src/mage/cards/s/SlyRequisitioner.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ImproviseAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledArtifactPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.permanent.TokenPredicate; @@ -55,8 +56,8 @@ public class SlyRequisitioner extends CardImpl { public SlyRequisitioner(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SmeltWardGatekeepers.java b/Mage.Sets/src/mage/cards/s/SmeltWardGatekeepers.java index 82dd94cd63..4ce4440576 100644 --- a/Mage.Sets/src/mage/cards/s/SmeltWardGatekeepers.java +++ b/Mage.Sets/src/mage/cards/s/SmeltWardGatekeepers.java @@ -65,8 +65,8 @@ public class SmeltWardGatekeepers extends CardImpl { public SmeltWardGatekeepers (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SmiteTheMonstrous.java b/Mage.Sets/src/mage/cards/s/SmiteTheMonstrous.java index 29dca30782..990ff187e7 100644 --- a/Mage.Sets/src/mage/cards/s/SmiteTheMonstrous.java +++ b/Mage.Sets/src/mage/cards/s/SmiteTheMonstrous.java @@ -49,8 +49,7 @@ public class SmiteTheMonstrous extends CardImpl { } public SmiteTheMonstrous(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{W}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{W}"); // Destroy target creature with power 4 or greater. this.getSpellAbility().addEffect(new DestroyTargetEffect()); diff --git a/Mage.Sets/src/mage/cards/s/SmogElemental.java b/Mage.Sets/src/mage/cards/s/SmogElemental.java index 89cb6b6cb4..428065adf0 100644 --- a/Mage.Sets/src/mage/cards/s/SmogElemental.java +++ b/Mage.Sets/src/mage/cards/s/SmogElemental.java @@ -53,7 +53,7 @@ public class SmogElemental extends CardImpl { public SmogElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SmogsteedRider.java b/Mage.Sets/src/mage/cards/s/SmogsteedRider.java index d49e45f888..234864a719 100644 --- a/Mage.Sets/src/mage/cards/s/SmogsteedRider.java +++ b/Mage.Sets/src/mage/cards/s/SmogsteedRider.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterAttackingCreature; @@ -46,8 +47,8 @@ public class SmogsteedRider extends CardImpl { public SmogsteedRider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SmokeTeller.java b/Mage.Sets/src/mage/cards/s/SmokeTeller.java index a7d12549d2..30d39e67e5 100644 --- a/Mage.Sets/src/mage/cards/s/SmokeTeller.java +++ b/Mage.Sets/src/mage/cards/s/SmokeTeller.java @@ -39,6 +39,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -62,8 +63,8 @@ public class SmokeTeller extends CardImpl { public SmokeTeller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Smokebraider.java b/Mage.Sets/src/mage/cards/s/Smokebraider.java index 8f9c6991a8..ba8b178393 100644 --- a/Mage.Sets/src/mage/cards/s/Smokebraider.java +++ b/Mage.Sets/src/mage/cards/s/Smokebraider.java @@ -51,8 +51,8 @@ public class Smokebraider extends CardImpl { public Smokebraider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SmokespewInvoker.java b/Mage.Sets/src/mage/cards/s/SmokespewInvoker.java index cc4bc9bcd9..4984f2bab4 100644 --- a/Mage.Sets/src/mage/cards/s/SmokespewInvoker.java +++ b/Mage.Sets/src/mage/cards/s/SmokespewInvoker.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class SmokespewInvoker extends CardImpl { public SmokespewInvoker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SmolderInitiate.java b/Mage.Sets/src/mage/cards/s/SmolderInitiate.java index 2b10232a61..b3b6ee4851 100644 --- a/Mage.Sets/src/mage/cards/s/SmolderInitiate.java +++ b/Mage.Sets/src/mage/cards/s/SmolderInitiate.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; import mage.target.TargetPlayer; @@ -56,8 +57,8 @@ public class SmolderInitiate extends CardImpl { public SmolderInitiate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SmolderingButcher.java b/Mage.Sets/src/mage/cards/s/SmolderingButcher.java index b9b9471997..2bb3051173 100644 --- a/Mage.Sets/src/mage/cards/s/SmolderingButcher.java +++ b/Mage.Sets/src/mage/cards/s/SmolderingButcher.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SmolderingButcher extends CardImpl { public SmolderingButcher (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Elemental"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SmolderingEfreet.java b/Mage.Sets/src/mage/cards/s/SmolderingEfreet.java index 7951df16d1..c425baea0a 100644 --- a/Mage.Sets/src/mage/cards/s/SmolderingEfreet.java +++ b/Mage.Sets/src/mage/cards/s/SmolderingEfreet.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SmolderingEfreet extends CardImpl { public SmolderingEfreet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Efreet"); - this.subtype.add("Monk"); + this.subtype.add(SubType.EFREET); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SmolderingMarsh.java b/Mage.Sets/src/mage/cards/s/SmolderingMarsh.java index 14794ded7f..c983e38321 100644 --- a/Mage.Sets/src/mage/cards/s/SmolderingMarsh.java +++ b/Mage.Sets/src/mage/cards/s/SmolderingMarsh.java @@ -39,6 +39,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.SuperType; import mage.filter.common.FilterLandPermanent; @@ -58,8 +59,8 @@ public class SmolderingMarsh extends CardImpl { public SmolderingMarsh(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Swamp"); - this.subtype.add("Mountain"); + this.subtype.add(SubType.SWAMP); + this.subtype.add(SubType.MOUNTAIN); // Smoldering Marsh enters the battlefield tapped unless you control two or more basic lands. Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1)); diff --git a/Mage.Sets/src/mage/cards/s/SmolderingWerewolf.java b/Mage.Sets/src/mage/cards/s/SmolderingWerewolf.java index fa1a0fdaf3..c4ebaa696f 100644 --- a/Mage.Sets/src/mage/cards/s/SmolderingWerewolf.java +++ b/Mage.Sets/src/mage/cards/s/SmolderingWerewolf.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.e.EruptingDreadwolf; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -52,8 +53,8 @@ public class SmolderingWerewolf extends CardImpl { public SmolderingWerewolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Werewolf"); - this.subtype.add("Horror"); + this.subtype.add(SubType.WEREWOLF); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SmotheringAbomination.java b/Mage.Sets/src/mage/cards/s/SmotheringAbomination.java index 3b98bc1b24..12e7fa5237 100644 --- a/Mage.Sets/src/mage/cards/s/SmotheringAbomination.java +++ b/Mage.Sets/src/mage/cards/s/SmotheringAbomination.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -53,7 +54,7 @@ public class SmotheringAbomination extends CardImpl { public SmotheringAbomination(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SmugglersCopter.java b/Mage.Sets/src/mage/cards/s/SmugglersCopter.java index 514748b1fc..31c74ac9a5 100644 --- a/Mage.Sets/src/mage/cards/s/SmugglersCopter.java +++ b/Mage.Sets/src/mage/cards/s/SmugglersCopter.java @@ -1,75 +1,75 @@ -/* - * 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.cards.s; - -import mage.MageInt; -import mage.abilities.common.AttacksOrBlocksTriggeredAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.DrawDiscardControllerEffect; -import mage.abilities.keyword.CrewAbility; -import mage.abilities.keyword.FlyingAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; - -import java.util.UUID; - -/** - * - * @author emerald000 - */ -public class SmugglersCopter extends CardImpl { - - public SmugglersCopter(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add(SubType.VEHICLE); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // Flying - this.addAbility(FlyingAbility.getInstance()); - - // Whenever Smuggler's Copter attacks or blocks, you may draw a card. If you do, discard a card. - Effect effect = new DrawDiscardControllerEffect(); - effect.setText("you may draw a card. If you do, discard a card"); - this.addAbility(new AttacksOrBlocksTriggeredAbility(effect, true)); - - // Crew 1 - this.addAbility(new CrewAbility(1)); - } - - public SmugglersCopter(final SmugglersCopter card) { - super(card); - } - - @Override - public SmugglersCopter copy() { - return new SmugglersCopter(this); - } -} +/* + * 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.cards.s; + +import mage.MageInt; +import mage.abilities.common.AttacksOrBlocksTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawDiscardControllerEffect; +import mage.abilities.keyword.CrewAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class SmugglersCopter extends CardImpl { + + public SmugglersCopter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + this.subtype.add(SubType.VEHICLE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever Smuggler's Copter attacks or blocks, you may draw a card. If you do, discard a card. + Effect effect = new DrawDiscardControllerEffect(); + effect.setText("you may draw a card. If you do, discard a card"); + this.addAbility(new AttacksOrBlocksTriggeredAbility(effect, true)); + + // Crew 1 + this.addAbility(new CrewAbility(1)); + } + + public SmugglersCopter(final SmugglersCopter card) { + super(card); + } + + @Override + public SmugglersCopter copy() { + return new SmugglersCopter(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/Snag.java b/Mage.Sets/src/mage/cards/s/Snag.java new file mode 100644 index 0000000000..c418ebf56b --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/Snag.java @@ -0,0 +1,80 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.AlternativeCostSourceAbility; +import mage.abilities.costs.common.DiscardTargetCost; +import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.BlockedPredicate; +import mage.target.common.TargetCardInHand; + +/** + * + * @author TheElk801 + */ +public class Snag extends CardImpl { + + private static final FilterCard filter = new FilterCard("a Forest card"); + private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("unblocked creatures"); + + static { + filter.add(new SubtypePredicate(SubType.FOREST)); + filter2.add(Predicates.not(new BlockedPredicate())); + } + + public Snag(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}"); + + // You may discard a Forest card rather than pay Snag's mana cost. + Ability ability = new AlternativeCostSourceAbility(new DiscardTargetCost(new TargetCardInHand(filter))); + this.addAbility(ability); + + // Prevent all combat damage that would be dealt by unblocked creatures this turn. + this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(filter2, Duration.EndOfTurn, true)); + } + + public Snag(final Snag card) { + super(card); + } + + @Override + public Snag copy() { + return new Snag(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SnakeCultInitiation.java b/Mage.Sets/src/mage/cards/s/SnakeCultInitiation.java index 30d2c1ce52..a3debeaa08 100644 --- a/Mage.Sets/src/mage/cards/s/SnakeCultInitiation.java +++ b/Mage.Sets/src/mage/cards/s/SnakeCultInitiation.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class SnakeCultInitiation extends CardImpl { public SnakeCultInitiation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SnakeOfTheGoldenGrove.java b/Mage.Sets/src/mage/cards/s/SnakeOfTheGoldenGrove.java index 3d525e03f9..5aef70826a 100644 --- a/Mage.Sets/src/mage/cards/s/SnakeOfTheGoldenGrove.java +++ b/Mage.Sets/src/mage/cards/s/SnakeOfTheGoldenGrove.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TributeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,7 +48,7 @@ public class SnakeOfTheGoldenGrove extends CardImpl { public SnakeOfTheGoldenGrove(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SnakeUmbra.java b/Mage.Sets/src/mage/cards/s/SnakeUmbra.java index 61a870e3b6..11118133b2 100644 --- a/Mage.Sets/src/mage/cards/s/SnakeUmbra.java +++ b/Mage.Sets/src/mage/cards/s/SnakeUmbra.java @@ -52,7 +52,7 @@ public class SnakeUmbra extends CardImpl { public SnakeUmbra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SnapcasterMage.java b/Mage.Sets/src/mage/cards/s/SnapcasterMage.java index b9751f4531..8edd44f4ff 100644 --- a/Mage.Sets/src/mage/cards/s/SnapcasterMage.java +++ b/Mage.Sets/src/mage/cards/s/SnapcasterMage.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -65,8 +66,8 @@ public class SnapcasterMage extends CardImpl { public SnapcasterMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SnappingCreeper.java b/Mage.Sets/src/mage/cards/s/SnappingCreeper.java index 02a53c68d7..37e9acf7df 100644 --- a/Mage.Sets/src/mage/cards/s/SnappingCreeper.java +++ b/Mage.Sets/src/mage/cards/s/SnappingCreeper.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,7 +47,7 @@ public class SnappingCreeper extends CardImpl { public SnappingCreeper (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Plant"); + this.subtype.add(SubType.PLANT); this.color.setGreen(true); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SnappingDrake.java b/Mage.Sets/src/mage/cards/s/SnappingDrake.java index 21699d9e25..ea2a01926c 100644 --- a/Mage.Sets/src/mage/cards/s/SnappingDrake.java +++ b/Mage.Sets/src/mage/cards/s/SnappingDrake.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SnappingDrake extends CardImpl { public SnappingDrake (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SnappingGnarlid.java b/Mage.Sets/src/mage/cards/s/SnappingGnarlid.java index 0f816d5388..0e72eedd61 100644 --- a/Mage.Sets/src/mage/cards/s/SnappingGnarlid.java +++ b/Mage.Sets/src/mage/cards/s/SnappingGnarlid.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class SnappingGnarlid extends CardImpl { public SnappingGnarlid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SnappingSailback.java b/Mage.Sets/src/mage/cards/s/SnappingSailback.java new file mode 100644 index 0000000000..2fc3f7f494 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SnappingSailback.java @@ -0,0 +1,72 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author TheElk801 + */ +public class SnappingSailback extends CardImpl { + + public SnappingSailback(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // Enrage — Whenever Snapping Sailback is dealt damage, put a +1/+1 counter on it. + this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, + new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)) + .setText("put a +1/+1 counter on it"), false, true)); + } + + public SnappingSailback(final SnappingSailback card) { + super(card); + } + + @Override + public SnappingSailback copy() { + return new SnappingSailback(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SnapsailGlider.java b/Mage.Sets/src/mage/cards/s/SnapsailGlider.java index cb008a21ed..06e68fa0f7 100644 --- a/Mage.Sets/src/mage/cards/s/SnapsailGlider.java +++ b/Mage.Sets/src/mage/cards/s/SnapsailGlider.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class SnapsailGlider extends CardImpl { public SnapsailGlider (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(2); ContinuousEffect effect = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield); diff --git a/Mage.Sets/src/mage/cards/s/SnareThopter.java b/Mage.Sets/src/mage/cards/s/SnareThopter.java index 1a4227c293..935ed19627 100644 --- a/Mage.Sets/src/mage/cards/s/SnareThopter.java +++ b/Mage.Sets/src/mage/cards/s/SnareThopter.java @@ -1,64 +1,65 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.keyword.FlyingAbility; -import mage.abilities.keyword.HasteAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author LevelX2 - */ -public class SnareThopter extends CardImpl { - - public SnareThopter(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Thopter"); - this.power = new MageInt(3); - this.toughness = new MageInt(2); - - // Flying - this.addAbility(FlyingAbility.getInstance()); - // Haste - this.addAbility(HasteAbility.getInstance()); - } - - public SnareThopter(final SnareThopter card) { - super(card); - } - - @Override - public SnareThopter copy() { - return new SnareThopter(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author LevelX2 + */ +public class SnareThopter extends CardImpl { + + public SnareThopter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); + this.subtype.add(SubType.THOPTER); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Haste + this.addAbility(HasteAbility.getInstance()); + } + + public SnareThopter(final SnareThopter card) { + super(card); + } + + @Override + public SnareThopter copy() { + return new SnareThopter(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SnarlingUndorak.java b/Mage.Sets/src/mage/cards/s/SnarlingUndorak.java index 76544dc90e..004fa86f9b 100644 --- a/Mage.Sets/src/mage/cards/s/SnarlingUndorak.java +++ b/Mage.Sets/src/mage/cards/s/SnarlingUndorak.java @@ -58,7 +58,7 @@ public class SnarlingUndorak extends CardImpl { public SnarlingUndorak(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SneakyHomunculus.java b/Mage.Sets/src/mage/cards/s/SneakyHomunculus.java index f72200c8c0..0a3cac7e2b 100644 --- a/Mage.Sets/src/mage/cards/s/SneakyHomunculus.java +++ b/Mage.Sets/src/mage/cards/s/SneakyHomunculus.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.combat.CantBlockCreaturesSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; @@ -56,8 +57,8 @@ public class SneakyHomunculus extends CardImpl { public SneakyHomunculus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Homunculus"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.HOMUNCULUS); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SnortingGahr.java b/Mage.Sets/src/mage/cards/s/SnortingGahr.java index 0184563f39..8143052f60 100644 --- a/Mage.Sets/src/mage/cards/s/SnortingGahr.java +++ b/Mage.Sets/src/mage/cards/s/SnortingGahr.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class SnortingGahr extends CardImpl { public SnortingGahr(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Rhino"); - this.subtype.add("Beast"); + this.subtype.add(SubType.RHINO); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SnowCoveredForest.java b/Mage.Sets/src/mage/cards/s/SnowCoveredForest.java index c2dc151e5f..f801bfcdb8 100644 --- a/Mage.Sets/src/mage/cards/s/SnowCoveredForest.java +++ b/Mage.Sets/src/mage/cards/s/SnowCoveredForest.java @@ -32,6 +32,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -44,7 +45,7 @@ public class SnowCoveredForest extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); this.addSuperType(SuperType.BASIC); this.addSuperType(SuperType.SNOW); - this.subtype.add("Forest"); + this.subtype.add(SubType.FOREST); // G this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SnowCoveredIsland.java b/Mage.Sets/src/mage/cards/s/SnowCoveredIsland.java index 97738181d6..363856c856 100644 --- a/Mage.Sets/src/mage/cards/s/SnowCoveredIsland.java +++ b/Mage.Sets/src/mage/cards/s/SnowCoveredIsland.java @@ -32,6 +32,7 @@ import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -44,7 +45,7 @@ public class SnowCoveredIsland extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); this.addSuperType(SuperType.BASIC); this.addSuperType(SuperType.SNOW); - this.subtype.add("Island"); + this.subtype.add(SubType.ISLAND); // U this.addAbility(new BlueManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SnowCoveredMountain.java b/Mage.Sets/src/mage/cards/s/SnowCoveredMountain.java index d8566e3e11..db6a1da023 100644 --- a/Mage.Sets/src/mage/cards/s/SnowCoveredMountain.java +++ b/Mage.Sets/src/mage/cards/s/SnowCoveredMountain.java @@ -32,6 +32,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -44,7 +45,7 @@ public class SnowCoveredMountain extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); this.addSuperType(SuperType.BASIC); this.addSuperType(SuperType.SNOW); - this.subtype.add("Mountain"); + this.subtype.add(SubType.MOUNTAIN); // R this.addAbility(new RedManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SnowCoveredPlains.java b/Mage.Sets/src/mage/cards/s/SnowCoveredPlains.java index a49950c30f..c3eba25031 100644 --- a/Mage.Sets/src/mage/cards/s/SnowCoveredPlains.java +++ b/Mage.Sets/src/mage/cards/s/SnowCoveredPlains.java @@ -32,6 +32,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -44,7 +45,7 @@ public class SnowCoveredPlains extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); addSuperType(SuperType.BASIC); addSuperType(SuperType.SNOW); - this.subtype.add("Plains"); + this.subtype.add(SubType.PLAINS); // W this.addAbility(new WhiteManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SnowCoveredSwamp.java b/Mage.Sets/src/mage/cards/s/SnowCoveredSwamp.java index 34cf153039..e2a19bfa93 100644 --- a/Mage.Sets/src/mage/cards/s/SnowCoveredSwamp.java +++ b/Mage.Sets/src/mage/cards/s/SnowCoveredSwamp.java @@ -32,6 +32,7 @@ import mage.abilities.mana.BlackManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -44,7 +45,7 @@ public class SnowCoveredSwamp extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); this.addSuperType(SuperType.BASIC); this.addSuperType(SuperType.SNOW); - this.subtype.add("Swamp"); + this.subtype.add(SubType.SWAMP); // B this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SnowFortress.java b/Mage.Sets/src/mage/cards/s/SnowFortress.java new file mode 100644 index 0000000000..7ec925286b --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SnowFortress.java @@ -0,0 +1,117 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.DefenderAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author TheElk801 + */ +public class SnowFortress extends CardImpl { + + private static final SnowFortressFilter filter = new SnowFortressFilter(); + + static { + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + + public SnowFortress(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}"); + + this.subtype.add(SubType.WALL); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + + // {1}: Snow Fortress gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new GenericManaCost(1))); + + // {1}: Snow Fortress gets +0/+1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(0, 1, Duration.EndOfTurn), new GenericManaCost(1))); + + // {3}: Snow Fortress deals 1 damage to target creature without flying that's attacking you. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new GenericManaCost(3)); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public SnowFortress(final SnowFortress card) { + super(card); + } + + @Override + public SnowFortress copy() { + return new SnowFortress(this); + } +} + +class SnowFortressFilter extends FilterAttackingCreature { + + public SnowFortressFilter() { + super("creature without flying that's attacking you"); + } + + public SnowFortressFilter(final SnowFortressFilter filter) { + super(filter); + } + + @Override + public SnowFortressFilter copy() { + return new SnowFortressFilter(this); + } + + @Override + public boolean match(Permanent permanent, UUID sourceId, UUID playerId, Game game) { + return super.match(permanent, sourceId, playerId, game) + && permanent.isAttacking() // to prevent unneccessary combat checking if not attacking + && playerId.equals(game.getCombat().getDefenderId(permanent.getId())); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SnowHound.java b/Mage.Sets/src/mage/cards/s/SnowHound.java index a72812aae7..1ae5a4a13f 100644 --- a/Mage.Sets/src/mage/cards/s/SnowHound.java +++ b/Mage.Sets/src/mage/cards/s/SnowHound.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; @@ -60,7 +61,7 @@ public class SnowHound extends CardImpl { public SnowHound(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SnowTrooper.java b/Mage.Sets/src/mage/cards/s/SnowTrooper.java index f91f994b1b..de253d4809 100644 --- a/Mage.Sets/src/mage/cards/s/SnowTrooper.java +++ b/Mage.Sets/src/mage/cards/s/SnowTrooper.java @@ -1,70 +1,70 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; -import mage.abilities.keyword.FirstStrikeAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; - -/** - * - * @author Styxo - */ -public class SnowTrooper extends CardImpl { - - public SnowTrooper(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Trooper"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // Trooper creatures you control have firststrike. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield, - new FilterCreaturePermanent(SubType.TROOPER, "Trooper creatures"), false))); - } - - public SnowTrooper(final SnowTrooper card) { - super(card); - } - - @Override - public SnowTrooper copy() { - return new SnowTrooper(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author Styxo + */ +public class SnowTrooper extends CardImpl { + + public SnowTrooper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.TROOPER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Trooper creatures you control have firststrike. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield, + new FilterCreaturePermanent(SubType.TROOPER, "Trooper creatures"), false))); + } + + public SnowTrooper(final SnowTrooper card) { + super(card); + } + + @Override + public SnowTrooper copy() { + return new SnowTrooper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SnowhornRider.java b/Mage.Sets/src/mage/cards/s/SnowhornRider.java index e12e16e132..0e9cca0ebe 100644 --- a/Mage.Sets/src/mage/cards/s/SnowhornRider.java +++ b/Mage.Sets/src/mage/cards/s/SnowhornRider.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class SnowhornRider extends CardImpl { public SnowhornRider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{U}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/Soar.java b/Mage.Sets/src/mage/cards/s/Soar.java index b6a3e1f800..3def6c28e3 100644 --- a/Mage.Sets/src/mage/cards/s/Soar.java +++ b/Mage.Sets/src/mage/cards/s/Soar.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class Soar extends CardImpl { public Soar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // You may cast Soar as though it had flash. If you cast it any time a sorcery couldn't have been cast, the controller of the permanent it becomes sacrifices it at the beginning of the next cleanup step. this.addAbility(new SimpleStaticAbility(Zone.ALL, new CastAsThoughItHadFlashSourceEffect(Duration.EndOfGame))); diff --git a/Mage.Sets/src/mage/cards/s/SoaringHope.java b/Mage.Sets/src/mage/cards/s/SoaringHope.java index beb06cfd2a..ec72a2e7f8 100644 --- a/Mage.Sets/src/mage/cards/s/SoaringHope.java +++ b/Mage.Sets/src/mage/cards/s/SoaringHope.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -56,7 +57,7 @@ public class SoaringHope extends CardImpl { public SoaringHope(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/Soilshaper.java b/Mage.Sets/src/mage/cards/s/Soilshaper.java index bf76000e09..241be986d8 100644 --- a/Mage.Sets/src/mage/cards/s/Soilshaper.java +++ b/Mage.Sets/src/mage/cards/s/Soilshaper.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; import mage.game.permanent.token.Token; @@ -49,7 +50,7 @@ public class Soilshaper extends CardImpl { public Soilshaper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SokenzanBruiser.java b/Mage.Sets/src/mage/cards/s/SokenzanBruiser.java index 52ff72e4ed..f77197271c 100644 --- a/Mage.Sets/src/mage/cards/s/SokenzanBruiser.java +++ b/Mage.Sets/src/mage/cards/s/SokenzanBruiser.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SokenzanBruiser extends CardImpl { public SokenzanBruiser (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SokenzanRenegade.java b/Mage.Sets/src/mage/cards/s/SokenzanRenegade.java index af634cee43..d2a1f9d2e9 100644 --- a/Mage.Sets/src/mage/cards/s/SokenzanRenegade.java +++ b/Mage.Sets/src/mage/cards/s/SokenzanRenegade.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.BushidoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -57,9 +58,9 @@ public class SokenzanRenegade extends CardImpl { public SokenzanRenegade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Samurai"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.SAMURAI); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SokenzanSpellblade.java b/Mage.Sets/src/mage/cards/s/SokenzanSpellblade.java index 2e21c6236e..8dc2c411bc 100644 --- a/Mage.Sets/src/mage/cards/s/SokenzanSpellblade.java +++ b/Mage.Sets/src/mage/cards/s/SokenzanSpellblade.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.BushidoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,9 +51,9 @@ public class SokenzanSpellblade extends CardImpl { public SokenzanSpellblade(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Samurai"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.SAMURAI); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/Solarion.java b/Mage.Sets/src/mage/cards/s/Solarion.java index f6a42598f8..9471101726 100644 --- a/Mage.Sets/src/mage/cards/s/Solarion.java +++ b/Mage.Sets/src/mage/cards/s/Solarion.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.SunburstAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -49,7 +50,7 @@ public class Solarion extends CardImpl { public Solarion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SoldeviAdnate.java b/Mage.Sets/src/mage/cards/s/SoldeviAdnate.java index 0b725032f9..d997e199fb 100644 --- a/Mage.Sets/src/mage/cards/s/SoldeviAdnate.java +++ b/Mage.Sets/src/mage/cards/s/SoldeviAdnate.java @@ -38,6 +38,7 @@ import mage.abilities.mana.DynamicManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -58,8 +59,8 @@ public class SoldeviAdnate extends CardImpl { public SoldeviAdnate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SoldeviGolem.java b/Mage.Sets/src/mage/cards/s/SoldeviGolem.java new file mode 100644 index 0000000000..35b3d151c2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SoldeviGolem.java @@ -0,0 +1,87 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.DontUntapInControllersUntapStepSourceEffect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class SoldeviGolem extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("tapped creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + filter.add(new TappedPredicate()); + } + + public SoldeviGolem(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + + this.subtype.add(SubType.GOLEM); + this.power = new MageInt(5); + this.toughness = new MageInt(3); + + // Soldevi Golem doesn't untap during your untap step. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepSourceEffect())); + + // At the beginning of your upkeep, you may untap target tapped creature an opponent controls. If you do, untap Soldevi Golem. + Ability ability = new BeginningOfUpkeepTriggeredAbility(new UntapTargetEffect().setText("untap target tapped creature an opponent controls."), TargetController.YOU, true); + ability.addEffect(new UntapSourceEffect().setText("If you do, untap {this}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public SoldeviGolem(final SoldeviGolem card) { + super(card); + } + + @Override + public SoldeviGolem copy() { + return new SoldeviGolem(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SoldeviHeretic.java b/Mage.Sets/src/mage/cards/s/SoldeviHeretic.java new file mode 100644 index 0000000000..ac59ef8c8b --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SoldeviHeretic.java @@ -0,0 +1,81 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardTargetEffect; +import mage.abilities.effects.common.PreventDamageToTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetOpponent; +import mage.target.targetpointer.SecondTargetPointer; + +/** + * + * @author L_J + */ +public class SoldeviHeretic extends CardImpl { + + public SoldeviHeretic(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {W}, {tap}: Prevent the next 2 damage that would be dealt to target creature this turn. Target opponent may draw a card. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn ,2), new ManaCostsImpl("{W}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + Effect effect = new DrawCardTargetEffect(1, true); + effect.setTargetPointer(new SecondTargetPointer()); + ability.addEffect(effect); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public SoldeviHeretic(final SoldeviHeretic card) { + super(card); + } + + @Override + public SoldeviHeretic copy() { + return new SoldeviHeretic(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SoldeviMachinist.java b/Mage.Sets/src/mage/cards/s/SoldeviMachinist.java index 407062d0ac..017b275722 100644 --- a/Mage.Sets/src/mage/cards/s/SoldeviMachinist.java +++ b/Mage.Sets/src/mage/cards/s/SoldeviMachinist.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityType; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.Game; /** @@ -53,9 +54,9 @@ public class SoldeviMachinist extends CardImpl { public SoldeviMachinist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoldeviSage.java b/Mage.Sets/src/mage/cards/s/SoldeviSage.java index cffd08ee12..a512f2b301 100644 --- a/Mage.Sets/src/mage/cards/s/SoldeviSage.java +++ b/Mage.Sets/src/mage/cards/s/SoldeviSage.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -57,8 +58,8 @@ public class SoldeviSage extends CardImpl { public SoldeviSage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoldeviSimulacrum.java b/Mage.Sets/src/mage/cards/s/SoldeviSimulacrum.java index 2ffcc788e1..dfe17d84be 100644 --- a/Mage.Sets/src/mage/cards/s/SoldeviSimulacrum.java +++ b/Mage.Sets/src/mage/cards/s/SoldeviSimulacrum.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.CumulativeUpkeepAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class SoldeviSimulacrum extends CardImpl { public SoldeviSimulacrum(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SoldierOfFortune.java b/Mage.Sets/src/mage/cards/s/SoldierOfFortune.java index 7f7d3182e4..6b90c70df7 100644 --- a/Mage.Sets/src/mage/cards/s/SoldierOfFortune.java +++ b/Mage.Sets/src/mage/cards/s/SoldierOfFortune.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ShuffleLibraryTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -48,8 +49,8 @@ public class SoldierOfFortune extends CardImpl { public SoldierOfFortune(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoldierOfThePantheon.java b/Mage.Sets/src/mage/cards/s/SoldierOfThePantheon.java index b35e599eea..1a08844833 100644 --- a/Mage.Sets/src/mage/cards/s/SoldierOfThePantheon.java +++ b/Mage.Sets/src/mage/cards/s/SoldierOfThePantheon.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterObject; import mage.filter.FilterSpell; @@ -55,8 +56,8 @@ public class SoldierOfThePantheon extends CardImpl { public SoldierOfThePantheon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoldierReplica.java b/Mage.Sets/src/mage/cards/s/SoldierReplica.java index 7ad46bb0f8..3f6ae7b3a1 100644 --- a/Mage.Sets/src/mage/cards/s/SoldierReplica.java +++ b/Mage.Sets/src/mage/cards/s/SoldierReplica.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterAttackingOrBlockingCreature; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class SoldierReplica extends CardImpl { public SoldierReplica(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(3); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new ManaCostsImpl("{1}{W}")); diff --git a/Mage.Sets/src/mage/cards/s/SolemnRecruit.java b/Mage.Sets/src/mage/cards/s/SolemnRecruit.java index 6e0bcc4c18..3c52c539e4 100644 --- a/Mage.Sets/src/mage/cards/s/SolemnRecruit.java +++ b/Mage.Sets/src/mage/cards/s/SolemnRecruit.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.watchers.common.RevoltWatcher; @@ -49,8 +50,8 @@ public class SolemnRecruit extends CardImpl { public SolemnRecruit(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); - this.subtype.add("Dwarf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SolemnSimulacrum.java b/Mage.Sets/src/mage/cards/s/SolemnSimulacrum.java index af53f3f635..0f1722f45a 100644 --- a/Mage.Sets/src/mage/cards/s/SolemnSimulacrum.java +++ b/Mage.Sets/src/mage/cards/s/SolemnSimulacrum.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; @@ -47,7 +48,7 @@ import java.util.UUID; public class SolemnSimulacrum extends CardImpl { public SolemnSimulacrum(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(2); this.toughness = new MageInt(2); this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true), true)); diff --git a/Mage.Sets/src/mage/cards/s/SolitaryCamel.java b/Mage.Sets/src/mage/cards/s/SolitaryCamel.java index aa74ec73a7..9def0cf6e0 100644 --- a/Mage.Sets/src/mage/cards/s/SolitaryCamel.java +++ b/Mage.Sets/src/mage/cards/s/SolitaryCamel.java @@ -63,7 +63,7 @@ public class SolitaryCamel extends CardImpl { public SolitaryCamel(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Camel"); + this.subtype.add(SubType.CAMEL); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SolitaryHunter.java b/Mage.Sets/src/mage/cards/s/SolitaryHunter.java index 8866d89ffd..dee755a508 100644 --- a/Mage.Sets/src/mage/cards/s/SolitaryHunter.java +++ b/Mage.Sets/src/mage/cards/s/SolitaryHunter.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.o.OneOfThePack; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -49,9 +50,9 @@ public class SolitaryHunter extends CardImpl { public SolitaryHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/Soliton.java b/Mage.Sets/src/mage/cards/s/Soliton.java index bc189ce60f..16a1b865d0 100644 --- a/Mage.Sets/src/mage/cards/s/Soliton.java +++ b/Mage.Sets/src/mage/cards/s/Soliton.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class Soliton extends CardImpl { public Soliton (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(3); this.toughness = new MageInt(4); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new ManaCostsImpl("{U}"))); diff --git a/Mage.Sets/src/mage/cards/s/SolkanarTheSwampKing.java b/Mage.Sets/src/mage/cards/s/SolkanarTheSwampKing.java index 3825f5f9f3..4fa7f30733 100644 --- a/Mage.Sets/src/mage/cards/s/SolkanarTheSwampKing.java +++ b/Mage.Sets/src/mage/cards/s/SolkanarTheSwampKing.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class SolkanarTheSwampKing extends CardImpl { public SolkanarTheSwampKing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SoltariChampion.java b/Mage.Sets/src/mage/cards/s/SoltariChampion.java index 54a9ce1afa..4eac77cbbd 100644 --- a/Mage.Sets/src/mage/cards/s/SoltariChampion.java +++ b/Mage.Sets/src/mage/cards/s/SoltariChampion.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; @@ -46,8 +47,8 @@ public class SoltariChampion extends CardImpl { public SoltariChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Soltari"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SOLTARI); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SoltariCrusader.java b/Mage.Sets/src/mage/cards/s/SoltariCrusader.java index 029290c7ea..42685a68ae 100644 --- a/Mage.Sets/src/mage/cards/s/SoltariCrusader.java +++ b/Mage.Sets/src/mage/cards/s/SoltariCrusader.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class SoltariCrusader extends CardImpl { public SoltariCrusader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Soltari"); - this.subtype.add("Knight"); + this.subtype.add(SubType.SOLTARI); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoltariEmissary.java b/Mage.Sets/src/mage/cards/s/SoltariEmissary.java index 92899eaebb..db1041126c 100644 --- a/Mage.Sets/src/mage/cards/s/SoltariEmissary.java +++ b/Mage.Sets/src/mage/cards/s/SoltariEmissary.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class SoltariEmissary extends CardImpl { public SoltariEmissary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Soltari"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SOLTARI); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoltariFootSoldier.java b/Mage.Sets/src/mage/cards/s/SoltariFootSoldier.java index e1f2fea3b7..b053310272 100644 --- a/Mage.Sets/src/mage/cards/s/SoltariFootSoldier.java +++ b/Mage.Sets/src/mage/cards/s/SoltariFootSoldier.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class SoltariFootSoldier extends CardImpl { public SoltariFootSoldier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Soltari"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SOLTARI); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoltariGuerrillas.java b/Mage.Sets/src/mage/cards/s/SoltariGuerrillas.java index 0d700c1012..ad7107bbaa 100644 --- a/Mage.Sets/src/mage/cards/s/SoltariGuerrillas.java +++ b/Mage.Sets/src/mage/cards/s/SoltariGuerrillas.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -55,8 +56,8 @@ public class SoltariGuerrillas extends CardImpl { public SoltariGuerrillas(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{W}"); - this.subtype.add("Soltari"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SOLTARI); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SoltariLancer.java b/Mage.Sets/src/mage/cards/s/SoltariLancer.java index fe22f76a8e..65578b937b 100644 --- a/Mage.Sets/src/mage/cards/s/SoltariLancer.java +++ b/Mage.Sets/src/mage/cards/s/SoltariLancer.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,8 +49,8 @@ public class SoltariLancer extends CardImpl { public SoltariLancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Soltari"); - this.subtype.add("Knight"); + this.subtype.add(SubType.SOLTARI); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SoltariMonk.java b/Mage.Sets/src/mage/cards/s/SoltariMonk.java index 03d92a2f72..719087e871 100644 --- a/Mage.Sets/src/mage/cards/s/SoltariMonk.java +++ b/Mage.Sets/src/mage/cards/s/SoltariMonk.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,9 +45,9 @@ public class SoltariMonk extends CardImpl { public SoltariMonk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Soltari"); - this.subtype.add("Monk"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.SOLTARI); + this.subtype.add(SubType.MONK); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoltariPriest.java b/Mage.Sets/src/mage/cards/s/SoltariPriest.java index 49a10d261b..190ec3b7d8 100644 --- a/Mage.Sets/src/mage/cards/s/SoltariPriest.java +++ b/Mage.Sets/src/mage/cards/s/SoltariPriest.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class SoltariPriest extends CardImpl { public SoltariPriest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Soltari"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.SOLTARI); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoltariTrooper.java b/Mage.Sets/src/mage/cards/s/SoltariTrooper.java index a2dbb5cb04..d8bb283348 100644 --- a/Mage.Sets/src/mage/cards/s/SoltariTrooper.java +++ b/Mage.Sets/src/mage/cards/s/SoltariTrooper.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class SoltariTrooper extends CardImpl { public SoltariTrooper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Soltari"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SOLTARI); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoltariVisionary.java b/Mage.Sets/src/mage/cards/s/SoltariVisionary.java index 0d6fd42f56..78a9792f24 100644 --- a/Mage.Sets/src/mage/cards/s/SoltariVisionary.java +++ b/Mage.Sets/src/mage/cards/s/SoltariVisionary.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; @@ -52,8 +53,8 @@ public class SoltariVisionary extends CardImpl { public SoltariVisionary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Soltari"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.SOLTARI); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SomberHoverguard.java b/Mage.Sets/src/mage/cards/s/SomberHoverguard.java index 69b18a510c..2ec8c09aeb 100644 --- a/Mage.Sets/src/mage/cards/s/SomberHoverguard.java +++ b/Mage.Sets/src/mage/cards/s/SomberHoverguard.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SomberHoverguard extends CardImpl { public SomberHoverguard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Drone"); + this.subtype.add(SubType.DRONE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SomberwaldAlpha.java b/Mage.Sets/src/mage/cards/s/SomberwaldAlpha.java index 144f3824cf..0204c1507a 100644 --- a/Mage.Sets/src/mage/cards/s/SomberwaldAlpha.java +++ b/Mage.Sets/src/mage/cards/s/SomberwaldAlpha.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -61,7 +62,7 @@ public class SomberwaldAlpha extends CardImpl { public SomberwaldAlpha(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SomberwaldDryad.java b/Mage.Sets/src/mage/cards/s/SomberwaldDryad.java index c223d218e7..8074884c5a 100644 --- a/Mage.Sets/src/mage/cards/s/SomberwaldDryad.java +++ b/Mage.Sets/src/mage/cards/s/SomberwaldDryad.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SomberwaldDryad extends CardImpl { public SomberwaldDryad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Dryad"); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SomberwaldSage.java b/Mage.Sets/src/mage/cards/s/SomberwaldSage.java index ebc7470317..da362cfc38 100644 --- a/Mage.Sets/src/mage/cards/s/SomberwaldSage.java +++ b/Mage.Sets/src/mage/cards/s/SomberwaldSage.java @@ -37,6 +37,7 @@ import mage.abilities.mana.conditional.CreatureCastConditionalMana; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** @@ -46,8 +47,8 @@ public class SomberwaldSage extends CardImpl { public SomberwaldSage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SomberwaldSpider.java b/Mage.Sets/src/mage/cards/s/SomberwaldSpider.java index e1b6407087..3163a0a558 100644 --- a/Mage.Sets/src/mage/cards/s/SomberwaldSpider.java +++ b/Mage.Sets/src/mage/cards/s/SomberwaldSpider.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -47,7 +48,7 @@ public class SomberwaldSpider extends CardImpl { public SomberwaldSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SomberwaldStag.java b/Mage.Sets/src/mage/cards/s/SomberwaldStag.java index bdee1caa82..f5d6b388b5 100644 --- a/Mage.Sets/src/mage/cards/s/SomberwaldStag.java +++ b/Mage.Sets/src/mage/cards/s/SomberwaldStag.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.FightTargetSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -55,7 +56,7 @@ public class SomberwaldStag extends CardImpl { public SomberwaldStag(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Elk"); + this.subtype.add(SubType.ELK); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SomberwaldVigilante.java b/Mage.Sets/src/mage/cards/s/SomberwaldVigilante.java index 0e4a67e8ef..1d17ea1a38 100644 --- a/Mage.Sets/src/mage/cards/s/SomberwaldVigilante.java +++ b/Mage.Sets/src/mage/cards/s/SomberwaldVigilante.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SomberwaldVigilante extends CardImpl { public SomberwaldVigilante(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Somnomancer.java b/Mage.Sets/src/mage/cards/s/Somnomancer.java index 35a92db0a3..badf7c28db 100644 --- a/Mage.Sets/src/mage/cards/s/Somnomancer.java +++ b/Mage.Sets/src/mage/cards/s/Somnomancer.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -44,8 +45,8 @@ public class Somnomancer extends CardImpl { public Somnomancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W/U}"); - this.subtype.add("Kithkin"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Somnophore.java b/Mage.Sets/src/mage/cards/s/Somnophore.java new file mode 100644 index 0000000000..796fb7d69a --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/Somnophore.java @@ -0,0 +1,134 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.condition.common.SourceOnBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousRuleModifyingEffect; +import mage.abilities.effects.ContinuousRuleModifyingEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DontUntapInControllersUntapStepTargetEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class Somnophore extends CardImpl { + + public Somnophore(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + + this.subtype.add(SubType.ILLUSION); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever Somnophore deals damage to a player, tap target creature that player controls. That creature doesn't untap during its controller's untap step for as long as Somnophore remains on the battlefield. + ContinuousRuleModifyingEffect skipUntapEffect = new DontUntapInControllersUntapStepTargetEffect(Duration.WhileOnBattlefield); + skipUntapEffect.setText("That creature doesn't untap during its controller's untap step for as long as {this} remains on the battlefield"); + ConditionalContinuousRuleModifyingEffect effect = new ConditionalContinuousRuleModifyingEffect(skipUntapEffect, SourceOnBattlefieldCondition.instance); + Ability ability = new SomnophoreTriggeredAbility(new TapTargetEffect()); + ability.addTarget(new TargetCreaturePermanent()); + ability.addEffect(effect); + this.addAbility(ability); + } + + public Somnophore(final Somnophore card) { + super(card); + } + + @Override + public Somnophore copy() { + return new Somnophore(this); + } +} + +class SomnophoreTriggeredAbility extends TriggeredAbilityImpl { + + public SomnophoreTriggeredAbility(Effect effect) { + super(Zone.BATTLEFIELD, effect); + this.addTarget(new TargetCreaturePermanent()); + } + + public SomnophoreTriggeredAbility(final SomnophoreTriggeredAbility ability) { + super(ability); + } + + @Override + public SomnophoreTriggeredAbility copy() { + return new SomnophoreTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DAMAGED_PLAYER; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getSourceId().equals(this.getSourceId())) { + Player opponent = game.getPlayer(event.getPlayerId()); + if (opponent != null) { + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getLogName() + " controls"); + filter.add(new ControllerIdPredicate(opponent.getId())); + + this.getTargets().clear(); + this.addTarget(new TargetCreaturePermanent(filter)); + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever {this} deals damage to a player, " + + "tap target creature that player controls. " + + "That creature doesn't untap during its controller's untap step " + + "for as long as {this} remains on the battlefield."; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SongOfTheDryads.java b/Mage.Sets/src/mage/cards/s/SongOfTheDryads.java index cb9df59690..8f5bfb8d89 100644 --- a/Mage.Sets/src/mage/cards/s/SongOfTheDryads.java +++ b/Mage.Sets/src/mage/cards/s/SongOfTheDryads.java @@ -37,6 +37,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -54,7 +55,7 @@ public class SongOfTheDryads extends CardImpl { public SongOfTheDryads(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant permanent TargetPermanent auraTarget = new TargetPermanent(); @@ -121,7 +122,7 @@ class BecomesColorlessForestLandEffect extends ContinuousEffectImpl { permanent.getCardType().clear(); permanent.addCardType(CardType.LAND); permanent.getSubtype(game).clear(); - permanent.getSubtype(game).add("Forest"); + permanent.getSubtype(game).add(SubType.FOREST); break; } return true; diff --git a/Mage.Sets/src/mage/cards/s/Songstitcher.java b/Mage.Sets/src/mage/cards/s/Songstitcher.java new file mode 100644 index 0000000000..47e8f5f2a4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/Songstitcher.java @@ -0,0 +1,80 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.PreventDamageByTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class Songstitcher extends CardImpl { + + private static final FilterAttackingCreature filter = new FilterAttackingCreature("attacking creature with flying"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public Songstitcher(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}{W}: Prevent all combat damage that would be dealt this turn by target attacking creature with flying. + Ability ability = new SimpleActivatedAbility(new PreventDamageByTargetEffect(Duration.EndOfTurn, true), new ManaCostsImpl("{1}{W}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public Songstitcher(final Songstitcher card) { + super(card); + } + + @Override + public Songstitcher copy() { + return new Songstitcher(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SootImp.java b/Mage.Sets/src/mage/cards/s/SootImp.java index 0eee2064d2..32b8485541 100644 --- a/Mage.Sets/src/mage/cards/s/SootImp.java +++ b/Mage.Sets/src/mage/cards/s/SootImp.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.filter.FilterSpell; @@ -59,7 +60,7 @@ public class SootImp extends CardImpl { public SootImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SootfeatherFlock.java b/Mage.Sets/src/mage/cards/s/SootfeatherFlock.java index ff54ae63f6..e595439e75 100644 --- a/Mage.Sets/src/mage/cards/s/SootfeatherFlock.java +++ b/Mage.Sets/src/mage/cards/s/SootfeatherFlock.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class SootfeatherFlock extends CardImpl { public SootfeatherFlock(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SoothingBalm.java b/Mage.Sets/src/mage/cards/s/SoothingBalm.java index 8ecf9fb5fc..57fbd08945 100644 --- a/Mage.Sets/src/mage/cards/s/SoothingBalm.java +++ b/Mage.Sets/src/mage/cards/s/SoothingBalm.java @@ -1,59 +1,59 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.abilities.effects.common.GainLifeTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.target.TargetPlayer; - -/** - * - * @author Derpthemeus - */ -public class SoothingBalm extends CardImpl { - - public SoothingBalm(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); - - // Target player gains 5 life. - this.getSpellAbility().addTarget(new TargetPlayer()); - this.getSpellAbility().addEffect(new GainLifeTargetEffect(5)); - } - - public SoothingBalm(final SoothingBalm card) { - super(card); - } - - @Override - public SoothingBalm copy() { - return new SoothingBalm(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.effects.common.GainLifeTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.TargetPlayer; + +/** + * + * @author Derpthemeus + */ +public class SoothingBalm extends CardImpl { + + public SoothingBalm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); + + // Target player gains 5 life. + this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addEffect(new GainLifeTargetEffect(5)); + } + + public SoothingBalm(final SoothingBalm card) { + super(card); + } + + @Override + public SoothingBalm copy() { + return new SoothingBalm(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SootstokeKindler.java b/Mage.Sets/src/mage/cards/s/SootstokeKindler.java index 62d2f0b9a1..5beaf0a45f 100644 --- a/Mage.Sets/src/mage/cards/s/SootstokeKindler.java +++ b/Mage.Sets/src/mage/cards/s/SootstokeKindler.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -60,8 +61,8 @@ public class SootstokeKindler extends CardImpl { public SootstokeKindler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B/R}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Sootwalkers.java b/Mage.Sets/src/mage/cards/s/Sootwalkers.java index f59c820598..0636e06ed8 100644 --- a/Mage.Sets/src/mage/cards/s/Sootwalkers.java +++ b/Mage.Sets/src/mage/cards/s/Sootwalkers.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -53,8 +54,8 @@ public class Sootwalkers extends CardImpl { public Sootwalkers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B/R}{B/R}"); - this.subtype.add("Elemental"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SophicCentaur.java b/Mage.Sets/src/mage/cards/s/SophicCentaur.java index 01880eed8d..d464b65b36 100644 --- a/Mage.Sets/src/mage/cards/s/SophicCentaur.java +++ b/Mage.Sets/src/mage/cards/s/SophicCentaur.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -52,8 +53,8 @@ public class SophicCentaur extends CardImpl { public SophicCentaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoramaroFirstToDream.java b/Mage.Sets/src/mage/cards/s/SoramaroFirstToDream.java index e4d946a797..0389b27ff3 100644 --- a/Mage.Sets/src/mage/cards/s/SoramaroFirstToDream.java +++ b/Mage.Sets/src/mage/cards/s/SoramaroFirstToDream.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class SoramaroFirstToDream extends CardImpl { public SoramaroFirstToDream(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SoratamiCloudskater.java b/Mage.Sets/src/mage/cards/s/SoratamiCloudskater.java index 63166d2017..c4894778db 100644 --- a/Mage.Sets/src/mage/cards/s/SoratamiCloudskater.java +++ b/Mage.Sets/src/mage/cards/s/SoratamiCloudskater.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; @@ -52,8 +53,8 @@ public class SoratamiCloudskater extends CardImpl { public SoratamiCloudskater(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Moonfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MOONFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoratamiMindsweeper.java b/Mage.Sets/src/mage/cards/s/SoratamiMindsweeper.java index 3412093630..ddbe3c11e2 100644 --- a/Mage.Sets/src/mage/cards/s/SoratamiMindsweeper.java +++ b/Mage.Sets/src/mage/cards/s/SoratamiMindsweeper.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; @@ -54,8 +55,8 @@ public class SoratamiMindsweeper extends CardImpl { public SoratamiMindsweeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Moonfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MOONFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SoratamiMirrorGuard.java b/Mage.Sets/src/mage/cards/s/SoratamiMirrorGuard.java index 32b3c71439..b604223a23 100644 --- a/Mage.Sets/src/mage/cards/s/SoratamiMirrorGuard.java +++ b/Mage.Sets/src/mage/cards/s/SoratamiMirrorGuard.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -62,8 +63,8 @@ public class SoratamiMirrorGuard extends CardImpl { public SoratamiMirrorGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Moonfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MOONFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoratamiMirrorMage.java b/Mage.Sets/src/mage/cards/s/SoratamiMirrorMage.java index 83eba47c76..556e25598d 100644 --- a/Mage.Sets/src/mage/cards/s/SoratamiMirrorMage.java +++ b/Mage.Sets/src/mage/cards/s/SoratamiMirrorMage.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; @@ -53,8 +54,8 @@ public class SoratamiMirrorMage extends CardImpl { public SoratamiMirrorMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Moonfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MOONFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoratamiRainshaper.java b/Mage.Sets/src/mage/cards/s/SoratamiRainshaper.java index 030a9e69ac..9f12cf235f 100644 --- a/Mage.Sets/src/mage/cards/s/SoratamiRainshaper.java +++ b/Mage.Sets/src/mage/cards/s/SoratamiRainshaper.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -56,8 +57,8 @@ public class SoratamiRainshaper extends CardImpl { public SoratamiRainshaper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Moonfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MOONFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoratamiSavant.java b/Mage.Sets/src/mage/cards/s/SoratamiSavant.java index 348351d6c7..ebcc16c0f5 100644 --- a/Mage.Sets/src/mage/cards/s/SoratamiSavant.java +++ b/Mage.Sets/src/mage/cards/s/SoratamiSavant.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; @@ -54,8 +55,8 @@ public class SoratamiSavant extends CardImpl { public SoratamiSavant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Moonfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MOONFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SoratamiSeer.java b/Mage.Sets/src/mage/cards/s/SoratamiSeer.java index 206354e35b..bde7f95f59 100644 --- a/Mage.Sets/src/mage/cards/s/SoratamiSeer.java +++ b/Mage.Sets/src/mage/cards/s/SoratamiSeer.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; @@ -52,8 +53,8 @@ public class SoratamiSeer extends CardImpl { public SoratamiSeer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Moonfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MOONFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SorceressQueen.java b/Mage.Sets/src/mage/cards/s/SorceressQueen.java index 51b9c60239..410e124cf5 100644 --- a/Mage.Sets/src/mage/cards/s/SorceressQueen.java +++ b/Mage.Sets/src/mage/cards/s/SorceressQueen.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -56,8 +57,8 @@ public class SorceressQueen extends CardImpl { public SorceressQueen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SorcerousSpyglass.java b/Mage.Sets/src/mage/cards/s/SorcerousSpyglass.java new file mode 100644 index 0000000000..3bee634072 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SorcerousSpyglass.java @@ -0,0 +1,149 @@ +/* + * 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.cards.s; + +import java.util.Optional; +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.abilities.effects.common.NameACardEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.players.Player; +import mage.target.common.TargetOpponent; + +/** + * + * @author TheElk801 + */ +public class SorcerousSpyglass extends CardImpl { + + public SorcerousSpyglass(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + // As Sorcerous Spyglass enters the battlefield, look at an opponent's hand, then choose any card name. + this.addAbility(new AsEntersBattlefieldAbility(new SorcerousSpyglassEntersEffect())); + + // Activated abilities of sources with the chosen name can't be activated unless they're mana abilities. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SorcerousSpyglassActivationEffect())); + } + + public SorcerousSpyglass(final SorcerousSpyglass card) { + super(card); + } + + @Override + public SorcerousSpyglass copy() { + return new SorcerousSpyglass(this); + } +} + +class SorcerousSpyglassEntersEffect extends NameACardEffect { + + SorcerousSpyglassEntersEffect() { + super(NameACardEffect.TypeOfName.ALL); + staticText = "look at an opponent's hand, then choose any card name"; + } + + SorcerousSpyglassEntersEffect(final SorcerousSpyglassEntersEffect effect) { + super(effect); + } + + @Override + public SorcerousSpyglassEntersEffect copy() { + return new SorcerousSpyglassEntersEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + TargetOpponent target = new TargetOpponent(true); + if (player.choose(Outcome.Benefit, target, source.getSourceId(), game)) { + Player opponent = game.getPlayer(target.getFirstTarget()); + if (opponent != null) { + MageObject sourceObject = game.getObject(source.getSourceId()); + player.lookAtCards(sourceObject != null ? sourceObject.getIdName() : null, opponent.getHand(), game); + player.chooseUse(Outcome.Benefit, "Press ok to name a card", "You won't be able to resize the window once you do", "Ok", " ", source, game); + } + } + } + return super.apply(game, source); + } +} + +class SorcerousSpyglassActivationEffect extends ContinuousRuleModifyingEffectImpl { + + public SorcerousSpyglassActivationEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + staticText = "Activated abilities of sources with the chosen name can't be activated unless they're mana abilities"; + } + + public SorcerousSpyglassActivationEffect(final SorcerousSpyglassActivationEffect effect) { + super(effect); + } + + @Override + public SorcerousSpyglassActivationEffect copy() { + return new SorcerousSpyglassActivationEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.ACTIVATE_ABILITY; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + MageObject object = game.getObject(event.getSourceId()); + Optional ability = game.getAbility(event.getTargetId(), event.getSourceId()); + if (ability.isPresent() && object != null) { + if (game.getState().getPlayersInRange(source.getControllerId(), game).contains(event.getPlayerId()) // controller in range + && ability.get().getAbilityType() != AbilityType.MANA + && object.getName().equals(game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY))) { + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SorinGrimNemesis.java b/Mage.Sets/src/mage/cards/s/SorinGrimNemesis.java index 2edf7fb922..58143e6b3f 100644 --- a/Mage.Sets/src/mage/cards/s/SorinGrimNemesis.java +++ b/Mage.Sets/src/mage/cards/s/SorinGrimNemesis.java @@ -45,6 +45,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -63,7 +64,7 @@ public class SorinGrimNemesis extends CardImpl { public SorinGrimNemesis(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{W}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Sorin"); + this.subtype.add(SubType.SORIN); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(6)); diff --git a/Mage.Sets/src/mage/cards/s/SorinLordOfInnistrad.java b/Mage.Sets/src/mage/cards/s/SorinLordOfInnistrad.java index 5631232f12..f9bad9604f 100644 --- a/Mage.Sets/src/mage/cards/s/SorinLordOfInnistrad.java +++ b/Mage.Sets/src/mage/cards/s/SorinLordOfInnistrad.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -68,7 +69,7 @@ public class SorinLordOfInnistrad extends CardImpl { public SorinLordOfInnistrad(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{W}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Sorin"); + this.subtype.add(SubType.SORIN); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/s/SorinMarkov.java b/Mage.Sets/src/mage/cards/s/SorinMarkov.java index 5ec9d8e51a..da0dcfee52 100644 --- a/Mage.Sets/src/mage/cards/s/SorinMarkov.java +++ b/Mage.Sets/src/mage/cards/s/SorinMarkov.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.turn.ControlTargetPlayerNextTurnEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.game.Game; @@ -55,7 +56,7 @@ public class SorinMarkov extends CardImpl { public SorinMarkov(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{3}{B}{B}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Sorin"); + this.subtype.add(SubType.SORIN); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/s/SorinSolemnVisitor.java b/Mage.Sets/src/mage/cards/s/SorinSolemnVisitor.java index 21edb2ed4a..c22ebe14f9 100644 --- a/Mage.Sets/src/mage/cards/s/SorinSolemnVisitor.java +++ b/Mage.Sets/src/mage/cards/s/SorinSolemnVisitor.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.filter.StaticFilters; @@ -54,7 +55,7 @@ public class SorinSolemnVisitor extends CardImpl { public SorinSolemnVisitor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{W}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Sorin"); + this.subtype.add(SubType.SORIN); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/s/SosukeSonOfSeshiro.java b/Mage.Sets/src/mage/cards/s/SosukeSonOfSeshiro.java index c092800a6d..4c9d7d002d 100644 --- a/Mage.Sets/src/mage/cards/s/SosukeSonOfSeshiro.java +++ b/Mage.Sets/src/mage/cards/s/SosukeSonOfSeshiro.java @@ -64,8 +64,8 @@ public class SosukeSonOfSeshiro extends CardImpl { public SosukeSonOfSeshiro(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Snake"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.SNAKE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SoulBleed.java b/Mage.Sets/src/mage/cards/s/SoulBleed.java index c1ae303a69..149942a419 100644 --- a/Mage.Sets/src/mage/cards/s/SoulBleed.java +++ b/Mage.Sets/src/mage/cards/s/SoulBleed.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class SoulBleed extends CardImpl { public SoulBleed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/SoulChanneling.java b/Mage.Sets/src/mage/cards/s/SoulChanneling.java index 2a32d7263a..436fdc4305 100644 --- a/Mage.Sets/src/mage/cards/s/SoulChanneling.java +++ b/Mage.Sets/src/mage/cards/s/SoulChanneling.java @@ -49,7 +49,7 @@ public class SoulChanneling extends CardImpl { public SoulChanneling(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SoulCollector.java b/Mage.Sets/src/mage/cards/s/SoulCollector.java index a01478461d..98ce9ea174 100644 --- a/Mage.Sets/src/mage/cards/s/SoulCollector.java +++ b/Mage.Sets/src/mage/cards/s/SoulCollector.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class SoulCollector extends CardImpl { public SoulCollector(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SoulConduit.java b/Mage.Sets/src/mage/cards/s/SoulConduit.java index 0aa841b2fd..9fbf7f21ff 100644 --- a/Mage.Sets/src/mage/cards/s/SoulConduit.java +++ b/Mage.Sets/src/mage/cards/s/SoulConduit.java @@ -49,13 +49,12 @@ import mage.target.TargetPlayer; public class SoulConduit extends CardImpl { public SoulConduit(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{6}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); // {6}, {tap}: Two target players exchange life totals. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SoulConduitEffect(), new GenericManaCost(6)); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetPlayer()); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayer(2)); this.addAbility(ability); } @@ -87,24 +86,28 @@ class SoulConduitEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player1 = game.getPlayer(source.getFirstTarget()); - Player player2 = game.getPlayer(source.getTargets().get(1).getFirstTarget()); + Player player1 = game.getPlayer(source.getTargets().get(0).getTargets().get(0)); + Player player2 = game.getPlayer(source.getTargets().get(0).getTargets().get(1)); if (player1 != null && player2 != null) { int lifePlayer1 = player1.getLife(); int lifePlayer2 = player2.getLife(); - if (lifePlayer1 == lifePlayer2) + if (lifePlayer1 == lifePlayer2) { return false; + } - if (!player1.isLifeTotalCanChange() || !player2.isLifeTotalCanChange()) + if (!player1.isLifeTotalCanChange() || !player2.isLifeTotalCanChange()) { return false; + } // 20110930 - 118.7, 118.8 - if (lifePlayer1 < lifePlayer2 && (!player1.isCanGainLife() || !player2.isCanLoseLife())) + if (lifePlayer1 < lifePlayer2 && (!player1.isCanGainLife() || !player2.isCanLoseLife())) { return false; + } - if (lifePlayer1 > lifePlayer2 && (!player1.isCanLoseLife() || !player2.isCanGainLife())) + if (lifePlayer1 > lifePlayer2 && (!player1.isCanLoseLife() || !player2.isCanGainLife())) { return false; + } player1.setLife(lifePlayer2, game); player2.setLife(lifePlayer1, game); diff --git a/Mage.Sets/src/mage/cards/s/SoulExchange.java b/Mage.Sets/src/mage/cards/s/SoulExchange.java index 5544de1444..995a4241dd 100644 --- a/Mage.Sets/src/mage/cards/s/SoulExchange.java +++ b/Mage.Sets/src/mage/cards/s/SoulExchange.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.costs.Cost; import mage.abilities.costs.common.ExileTargetCost; @@ -37,6 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterCreatureCard; import mage.game.Game; @@ -44,22 +44,23 @@ import mage.game.permanent.Permanent; import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetControlledCreaturePermanent; +import java.util.UUID; + /** - * * @author MarcoMarin */ public class SoulExchange extends CardImpl { public SoulExchange(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}{B}"); // As an additional cost to cast Soul Exchange, exile a creature you control. Cost cost = new ExileTargetCost(new TargetControlledCreaturePermanent()); this.getSpellAbility().addCost(cost); // Return target creature card from your graveyard to the battlefield. Put a +2/+2 counter on that creature if the exiled creature was a Thrull. - this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))); - this.getSpellAbility().addEffect(new SoulExchangeEffect()); - + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))); + this.getSpellAbility().addEffect(new SoulExchangeEffect()); + } public SoulExchange(final SoulExchange card) { @@ -72,17 +73,17 @@ public class SoulExchange extends CardImpl { } } -class SoulExchangeEffect extends OneShotEffect{ - +class SoulExchangeEffect extends OneShotEffect { + public SoulExchangeEffect() { super(Outcome.Benefit); this.setText("Return target creature card from your graveyard to the battlefield. Put a +2/+2 counter on that creature if the exiled creature was a Thrull."); } - + public SoulExchangeEffect(final SoulExchangeEffect effect) { super(effect); } - + @Override public SoulExchangeEffect copy() { return new SoulExchangeEffect(this); @@ -92,22 +93,22 @@ class SoulExchangeEffect extends OneShotEffect{ public boolean apply(Game game, Ability source) { ReturnFromGraveyardToBattlefieldTargetEffect effect = new ReturnFromGraveyardToBattlefieldTargetEffect(); if (!effect.apply(game, source)) return false; - - for (Cost c : source.getCosts()){ + + for (Cost c : source.getCosts()) { /* if (!c.getTargets().isEmpty()){ UUID t = c.getTargets().getFirstTarget(); Permanent exiled = game.getPermanentOrLKIBattlefield(t);*/ if (c.isPaid() && c instanceof ExileTargetCost) { for (Permanent exiled : ((ExileTargetCost) c).getPermanents()) { - if (exiled != null){ - if(exiled.getSubtype(game).contains("Thrull")){ - game.getPermanent(source.getFirstTarget()).addCounters(CounterType.P2P2.createInstance(), source, game); - return true; + if (exiled != null) { + if (exiled.hasSubtype(SubType.THRULL, game)) { + game.getPermanent(source.getFirstTarget()).addCounters(CounterType.P2P2.createInstance(), source, game); + return true; } - } else return false; - } + } else return false; + } } - } - return true; + } + return true; } } \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/s/SoulFoundry.java b/Mage.Sets/src/mage/cards/s/SoulFoundry.java index 80e7ce2392..34544acfda 100644 --- a/Mage.Sets/src/mage/cards/s/SoulFoundry.java +++ b/Mage.Sets/src/mage/cards/s/SoulFoundry.java @@ -37,7 +37,7 @@ import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -175,7 +175,7 @@ class SoulFoundryEffect extends OneShotEffect { Card imprinted = game.getCard(soulFoundry.getImprinted().get(0)); if (imprinted != null && game.getState().getZone(imprinted.getId()) == Zone.EXILED) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(); effect.setTargetPointer(new FixedTarget(imprinted.getId(), imprinted.getZoneChangeCounter(game))); return effect.apply(game, source); } diff --git a/Mage.Sets/src/mage/cards/s/SoulKiss.java b/Mage.Sets/src/mage/cards/s/SoulKiss.java index 43899adccb..e83641ea04 100644 --- a/Mage.Sets/src/mage/cards/s/SoulKiss.java +++ b/Mage.Sets/src/mage/cards/s/SoulKiss.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class SoulKiss extends CardImpl { public SoulKiss(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SoulLink.java b/Mage.Sets/src/mage/cards/s/SoulLink.java index be19a98958..bb6ae6f21e 100644 --- a/Mage.Sets/src/mage/cards/s/SoulLink.java +++ b/Mage.Sets/src/mage/cards/s/SoulLink.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class SoulLink extends CardImpl { public SoulLink(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SoulNova.java b/Mage.Sets/src/mage/cards/s/SoulNova.java new file mode 100644 index 0000000000..8b6c677e9a --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SoulNova.java @@ -0,0 +1,102 @@ +/* + * 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.cards.s; + +import java.util.LinkedList; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetAttackingCreature; + +/** + * + * @author TheElk801 + */ +public class SoulNova extends CardImpl { + + public SoulNova(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{W}{W}"); + + // Exile target attacking creature and all Equipment attached to it. + this.getSpellAbility().addEffect(new SoulNovaEffect()); + this.getSpellAbility().addTarget(new TargetAttackingCreature()); + } + + public SoulNova(final SoulNova card) { + super(card); + } + + @Override + public SoulNova copy() { + return new SoulNova(this); + } +} + +class SoulNovaEffect extends OneShotEffect { + + public SoulNovaEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "Exile target attacking creature and all Equipment attached to it."; + } + + public SoulNovaEffect(final SoulNovaEffect effect) { + super(effect); + } + + @Override + public SoulNovaEffect copy() { + return new SoulNovaEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + LinkedList attachments = new LinkedList<>(); + attachments.addAll(permanent.getAttachments()); + + for (UUID attachmentId : attachments) { + Permanent attachment = game.getPermanent(attachmentId); + if (attachment.hasSubtype(SubType.EQUIPMENT, game)) { + attachment.moveToExile(null, "", source.getSourceId(), game); + } + } + + permanent.moveToExile(null, "", source.getSourceId(), game); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SoulOfInnistrad.java b/Mage.Sets/src/mage/cards/s/SoulOfInnistrad.java index ead7256cec..720b891829 100644 --- a/Mage.Sets/src/mage/cards/s/SoulOfInnistrad.java +++ b/Mage.Sets/src/mage/cards/s/SoulOfInnistrad.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; @@ -50,7 +51,7 @@ public class SoulOfInnistrad extends CardImpl { public SoulOfInnistrad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SoulOfMagma.java b/Mage.Sets/src/mage/cards/s/SoulOfMagma.java index 5609cd9776..233300269f 100644 --- a/Mage.Sets/src/mage/cards/s/SoulOfMagma.java +++ b/Mage.Sets/src/mage/cards/s/SoulOfMagma.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetCreaturePermanent; @@ -46,7 +47,7 @@ public class SoulOfMagma extends CardImpl { public SoulOfMagma(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SoulOfNewPhyrexia.java b/Mage.Sets/src/mage/cards/s/SoulOfNewPhyrexia.java index 6349f0b092..e7f403d813 100644 --- a/Mage.Sets/src/mage/cards/s/SoulOfNewPhyrexia.java +++ b/Mage.Sets/src/mage/cards/s/SoulOfNewPhyrexia.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class SoulOfNewPhyrexia extends CardImpl { public SoulOfNewPhyrexia(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SoulOfRavnica.java b/Mage.Sets/src/mage/cards/s/SoulOfRavnica.java index 667cf8469d..bca2eaa678 100644 --- a/Mage.Sets/src/mage/cards/s/SoulOfRavnica.java +++ b/Mage.Sets/src/mage/cards/s/SoulOfRavnica.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class SoulOfRavnica extends CardImpl { public SoulOfRavnica(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SoulOfShandalar.java b/Mage.Sets/src/mage/cards/s/SoulOfShandalar.java index 135875f03f..25e3d4e8fb 100644 --- a/Mage.Sets/src/mage/cards/s/SoulOfShandalar.java +++ b/Mage.Sets/src/mage/cards/s/SoulOfShandalar.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -58,7 +59,7 @@ public class SoulOfShandalar extends CardImpl { public SoulOfShandalar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SoulOfTheHarvest.java b/Mage.Sets/src/mage/cards/s/SoulOfTheHarvest.java index 1b94f85be8..4a50d96bd4 100644 --- a/Mage.Sets/src/mage/cards/s/SoulOfTheHarvest.java +++ b/Mage.Sets/src/mage/cards/s/SoulOfTheHarvest.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledCreaturePermanent; @@ -56,7 +57,7 @@ public class SoulOfTheHarvest extends CardImpl { public SoulOfTheHarvest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SoulOfTheros.java b/Mage.Sets/src/mage/cards/s/SoulOfTheros.java index 049cdf9022..0c8cc888c6 100644 --- a/Mage.Sets/src/mage/cards/s/SoulOfTheros.java +++ b/Mage.Sets/src/mage/cards/s/SoulOfTheros.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class SoulOfTheros extends CardImpl { public SoulOfTheros(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SoulOfZendikar.java b/Mage.Sets/src/mage/cards/s/SoulOfZendikar.java index 4bf795bce0..b5010c1109 100644 --- a/Mage.Sets/src/mage/cards/s/SoulOfZendikar.java +++ b/Mage.Sets/src/mage/cards/s/SoulOfZendikar.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.BeastToken; @@ -49,7 +50,7 @@ public class SoulOfZendikar extends CardImpl { public SoulOfZendikar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SoulRansom.java b/Mage.Sets/src/mage/cards/s/SoulRansom.java index c5f6298aa9..fd0a77a8e1 100644 --- a/Mage.Sets/src/mage/cards/s/SoulRansom.java +++ b/Mage.Sets/src/mage/cards/s/SoulRansom.java @@ -54,7 +54,7 @@ public class SoulRansom extends CardImpl { public SoulRansom(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/SoulScarMage.java b/Mage.Sets/src/mage/cards/s/SoulScarMage.java index 90c4c3d0dd..f3d499572f 100644 --- a/Mage.Sets/src/mage/cards/s/SoulScarMage.java +++ b/Mage.Sets/src/mage/cards/s/SoulScarMage.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,8 +58,8 @@ public class SoulScarMage extends CardImpl { public SoulScarMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SoulScourge.java b/Mage.Sets/src/mage/cards/s/SoulScourge.java index 9651602ed2..6ae7be3226 100644 --- a/Mage.Sets/src/mage/cards/s/SoulScourge.java +++ b/Mage.Sets/src/mage/cards/s/SoulScourge.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; @@ -55,8 +56,8 @@ public class SoulScourge extends CardImpl { public SoulScourge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Nightmare"); - this.subtype.add("Horror"); + this.subtype.add(SubType.NIGHTMARE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SoulSeizer.java b/Mage.Sets/src/mage/cards/s/SoulSeizer.java index d5d47f0b82..cd28d6dd21 100644 --- a/Mage.Sets/src/mage/cards/s/SoulSeizer.java +++ b/Mage.Sets/src/mage/cards/s/SoulSeizer.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.g.GhastlyHaunting; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -58,7 +59,7 @@ public class SoulSeizer extends CardImpl { public SoulSeizer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.transformable = true; this.secondSideCardClazz = GhastlyHaunting.class; diff --git a/Mage.Sets/src/mage/cards/s/SoulSeparator.java b/Mage.Sets/src/mage/cards/s/SoulSeparator.java index aa5f131223..d0e4b22918 100644 --- a/Mage.Sets/src/mage/cards/s/SoulSeparator.java +++ b/Mage.Sets/src/mage/cards/s/SoulSeparator.java @@ -34,12 +34,13 @@ import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; import mage.game.Game; @@ -59,8 +60,8 @@ public class SoulSeparator extends CardImpl { // {5}, {T}, Sacrifice Soul Separator: Exile target creature card from your graveyard. // Create a token that's a copy of that card except it's 1/1, it's a Spirit in addition to its other types, and it has flying. // Create a black Zombie creature token with power equal to that card's power and toughness equal that card's toughness. - PutTokenOntoBattlefieldCopyTargetEffect copyEffect = new PutTokenOntoBattlefieldCopyTargetEffect(null, null, false, 1, false, false, null, 1, 1, true); - copyEffect.setAdditionalSubType("Spirit"); + CreateTokenCopyTargetEffect copyEffect = new CreateTokenCopyTargetEffect(null, null, false, 1, false, false, null, 1, 1, true); + copyEffect.setAdditionalSubType(SubType.SPIRIT); copyEffect.setText("Create a token that's a copy of that card except it's 1/1, it's a Spirit in addition to its other types, and it has flying."); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, copyEffect, new ManaCostsImpl("{5}")); ability.addCost(new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/s/SoulShepherd.java b/Mage.Sets/src/mage/cards/s/SoulShepherd.java index 47c380d596..978d3cf753 100644 --- a/Mage.Sets/src/mage/cards/s/SoulShepherd.java +++ b/Mage.Sets/src/mage/cards/s/SoulShepherd.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; @@ -49,8 +50,8 @@ public class SoulShepherd extends CardImpl { public SoulShepherd(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoulSnuffers.java b/Mage.Sets/src/mage/cards/s/SoulSnuffers.java index cfc6589fee..e6292b333d 100644 --- a/Mage.Sets/src/mage/cards/s/SoulSnuffers.java +++ b/Mage.Sets/src/mage/cards/s/SoulSnuffers.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -46,8 +47,8 @@ public class SoulSnuffers extends CardImpl { public SoulSnuffers (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SoulSwallower.java b/Mage.Sets/src/mage/cards/s/SoulSwallower.java index 088d106be5..32ed5cc608 100644 --- a/Mage.Sets/src/mage/cards/s/SoulSwallower.java +++ b/Mage.Sets/src/mage/cards/s/SoulSwallower.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; @@ -49,7 +50,7 @@ public class SoulSwallower extends CardImpl { public SoulSwallower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SoulTithe.java b/Mage.Sets/src/mage/cards/s/SoulTithe.java index 0532ff2b40..c39854f19a 100644 --- a/Mage.Sets/src/mage/cards/s/SoulTithe.java +++ b/Mage.Sets/src/mage/cards/s/SoulTithe.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.game.Game; @@ -57,7 +58,7 @@ public class SoulTithe extends CardImpl { public SoulTithe (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant nonland permanent TargetPermanent auraTarget = new TargetNonlandPermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SoulWarden.java b/Mage.Sets/src/mage/cards/s/SoulWarden.java index 0648fa2042..f118180c70 100644 --- a/Mage.Sets/src/mage/cards/s/SoulWarden.java +++ b/Mage.Sets/src/mage/cards/s/SoulWarden.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -52,8 +53,8 @@ public class SoulWarden extends CardImpl { public SoulWarden(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoulbladeDjinn.java b/Mage.Sets/src/mage/cards/s/SoulbladeDjinn.java index 28745d13fe..b85ae749cd 100644 --- a/Mage.Sets/src/mage/cards/s/SoulbladeDjinn.java +++ b/Mage.Sets/src/mage/cards/s/SoulbladeDjinn.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -56,7 +57,7 @@ public class SoulbladeDjinn extends CardImpl { public SoulbladeDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SoulboundGuardians.java b/Mage.Sets/src/mage/cards/s/SoulboundGuardians.java index efe6669b37..09381064d2 100644 --- a/Mage.Sets/src/mage/cards/s/SoulboundGuardians.java +++ b/Mage.Sets/src/mage/cards/s/SoulboundGuardians.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class SoulboundGuardians extends CardImpl { public SoulboundGuardians (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SoulbrightFlamekin.java b/Mage.Sets/src/mage/cards/s/SoulbrightFlamekin.java index 1c98e97837..ffb8fa9917 100644 --- a/Mage.Sets/src/mage/cards/s/SoulbrightFlamekin.java +++ b/Mage.Sets/src/mage/cards/s/SoulbrightFlamekin.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class SoulbrightFlamekin extends CardImpl { public SoulbrightFlamekin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoulcageFiend.java b/Mage.Sets/src/mage/cards/s/SoulcageFiend.java index fcaf7f2258..d9e791336c 100644 --- a/Mage.Sets/src/mage/cards/s/SoulcageFiend.java +++ b/Mage.Sets/src/mage/cards/s/SoulcageFiend.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.LoseLifeAllPlayersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author noxx @@ -42,7 +43,7 @@ public class SoulcageFiend extends CardImpl { public SoulcageFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Soulcatcher.java b/Mage.Sets/src/mage/cards/s/Soulcatcher.java index 880b9a60e6..d3dbd7e09d 100644 --- a/Mage.Sets/src/mage/cards/s/Soulcatcher.java +++ b/Mage.Sets/src/mage/cards/s/Soulcatcher.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -53,8 +54,8 @@ public class Soulcatcher extends CardImpl { public Soulcatcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Souldrinker.java b/Mage.Sets/src/mage/cards/s/Souldrinker.java index e0e0bd346a..ca77995b0b 100644 --- a/Mage.Sets/src/mage/cards/s/Souldrinker.java +++ b/Mage.Sets/src/mage/cards/s/Souldrinker.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -46,7 +47,7 @@ public class Souldrinker extends CardImpl { public Souldrinker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SoulfireGrandMaster.java b/Mage.Sets/src/mage/cards/s/SoulfireGrandMaster.java index 0283ae5c5f..16435ea6f4 100644 --- a/Mage.Sets/src/mage/cards/s/SoulfireGrandMaster.java +++ b/Mage.Sets/src/mage/cards/s/SoulfireGrandMaster.java @@ -42,6 +42,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -73,8 +74,8 @@ public class SoulfireGrandMaster extends CardImpl { public SoulfireGrandMaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Soulflayer.java b/Mage.Sets/src/mage/cards/s/Soulflayer.java index f76a5b1b5f..220e340333 100644 --- a/Mage.Sets/src/mage/cards/s/Soulflayer.java +++ b/Mage.Sets/src/mage/cards/s/Soulflayer.java @@ -53,6 +53,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -70,7 +71,7 @@ public class Soulflayer extends CardImpl { public Soulflayer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SoullessOne.java b/Mage.Sets/src/mage/cards/s/SoullessOne.java index 073ba8be90..7f49415704 100644 --- a/Mage.Sets/src/mage/cards/s/SoullessOne.java +++ b/Mage.Sets/src/mage/cards/s/SoullessOne.java @@ -54,8 +54,8 @@ public class SoullessOne extends CardImpl { public SoullessOne(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/Soulmender.java b/Mage.Sets/src/mage/cards/s/Soulmender.java index 1144e4c58b..de8b78d9d3 100644 --- a/Mage.Sets/src/mage/cards/s/Soulmender.java +++ b/Mage.Sets/src/mage/cards/s/Soulmender.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class Soulmender extends CardImpl { public Soulmender(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoulsAttendant.java b/Mage.Sets/src/mage/cards/s/SoulsAttendant.java index a76290d68f..893bbd19bc 100644 --- a/Mage.Sets/src/mage/cards/s/SoulsAttendant.java +++ b/Mage.Sets/src/mage/cards/s/SoulsAttendant.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -52,8 +53,8 @@ public class SoulsAttendant extends CardImpl { public SoulsAttendant(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoulsOfTheFaultless.java b/Mage.Sets/src/mage/cards/s/SoulsOfTheFaultless.java index ee1d96eb66..3715b737bf 100644 --- a/Mage.Sets/src/mage/cards/s/SoulsOfTheFaultless.java +++ b/Mage.Sets/src/mage/cards/s/SoulsOfTheFaultless.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -54,7 +55,7 @@ public class SoulsOfTheFaultless extends CardImpl { public SoulsOfTheFaultless(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{B}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/Soulstinger.java b/Mage.Sets/src/mage/cards/s/Soulstinger.java index 7388b58099..0dce771c33 100644 --- a/Mage.Sets/src/mage/cards/s/Soulstinger.java +++ b/Mage.Sets/src/mage/cards/s/Soulstinger.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.target.common.TargetControlledCreaturePermanent; @@ -51,8 +52,8 @@ public class Soulstinger extends CardImpl { public Soulstinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Scorpion"); - this.subtype.add("Demon"); + this.subtype.add(SubType.SCORPION); + this.subtype.add(SubType.DEMON); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SoulsurgeElemental.java b/Mage.Sets/src/mage/cards/s/SoulsurgeElemental.java index 1317ae0be7..1304da5c95 100644 --- a/Mage.Sets/src/mage/cards/s/SoulsurgeElemental.java +++ b/Mage.Sets/src/mage/cards/s/SoulsurgeElemental.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -49,7 +50,7 @@ public class SoulsurgeElemental extends CardImpl { public SoulsurgeElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoulswornJury.java b/Mage.Sets/src/mage/cards/s/SoulswornJury.java index b11919e7a9..5efe3ad785 100644 --- a/Mage.Sets/src/mage/cards/s/SoulswornJury.java +++ b/Mage.Sets/src/mage/cards/s/SoulswornJury.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -57,7 +58,7 @@ public class SoulswornJury extends CardImpl { public SoulswornJury(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SoulswornSpirit.java b/Mage.Sets/src/mage/cards/s/SoulswornSpirit.java index c137259f8b..84a3586f1e 100644 --- a/Mage.Sets/src/mage/cards/s/SoulswornSpirit.java +++ b/Mage.Sets/src/mage/cards/s/SoulswornSpirit.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -55,7 +56,7 @@ public class SoulswornSpirit extends CardImpl { public SoulswornSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SoultetherGolem.java b/Mage.Sets/src/mage/cards/s/SoultetherGolem.java index 6be2a27917..0b2c666d78 100644 --- a/Mage.Sets/src/mage/cards/s/SoultetherGolem.java +++ b/Mage.Sets/src/mage/cards/s/SoultetherGolem.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.VanishingUpkeepAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; @@ -60,7 +61,7 @@ public class SoultetherGolem extends CardImpl { public SoultetherGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SoundTheCall.java b/Mage.Sets/src/mage/cards/s/SoundTheCall.java new file mode 100644 index 0000000000..27a17e9f1e --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SoundTheCall.java @@ -0,0 +1,59 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.permanent.token.SoundTheCallToken; + +/** + * + * @author TheElk801 + */ +public class SoundTheCall extends CardImpl { + + public SoundTheCall(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}"); + + + // Create a 1/1 green Wolf creature token. It has "This creature gets +1/+1 for each card named Sound the Call in each graveyard." + this.getSpellAbility().addEffect(new CreateTokenEffect(new SoundTheCallToken())); + } + + public SoundTheCall(final SoundTheCall card) { + super(card); + } + + @Override + public SoundTheCall copy() { + return new SoundTheCall(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SouthernElephant.java b/Mage.Sets/src/mage/cards/s/SouthernElephant.java index a87d05b75e..1479f73d89 100644 --- a/Mage.Sets/src/mage/cards/s/SouthernElephant.java +++ b/Mage.Sets/src/mage/cards/s/SouthernElephant.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class SouthernElephant extends CardImpl { public SouthernElephant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SouthernPaladin.java b/Mage.Sets/src/mage/cards/s/SouthernPaladin.java index be7aded8bc..d23b6ced15 100644 --- a/Mage.Sets/src/mage/cards/s/SouthernPaladin.java +++ b/Mage.Sets/src/mage/cards/s/SouthernPaladin.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -58,8 +59,8 @@ public class SouthernPaladin extends CardImpl { public SouthernPaladin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SovereignsOfLostAlara.java b/Mage.Sets/src/mage/cards/s/SovereignsOfLostAlara.java index ef4e48e336..c56d60999b 100644 --- a/Mage.Sets/src/mage/cards/s/SovereignsOfLostAlara.java +++ b/Mage.Sets/src/mage/cards/s/SovereignsOfLostAlara.java @@ -59,7 +59,7 @@ public class SovereignsOfLostAlara extends CardImpl { public SovereignsOfLostAlara(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); diff --git a/Mage.Sets/src/mage/cards/s/SowerOfTemptation.java b/Mage.Sets/src/mage/cards/s/SowerOfTemptation.java index 0334a4b683..b44bce48ba 100644 --- a/Mage.Sets/src/mage/cards/s/SowerOfTemptation.java +++ b/Mage.Sets/src/mage/cards/s/SowerOfTemptation.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.game.Game; @@ -52,8 +53,8 @@ public class SowerOfTemptation extends CardImpl { public SowerOfTemptation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SparkElemental.java b/Mage.Sets/src/mage/cards/s/SparkElemental.java index 454969ffe4..a0fcf29363 100644 --- a/Mage.Sets/src/mage/cards/s/SparkElemental.java +++ b/Mage.Sets/src/mage/cards/s/SparkElemental.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.events.GameEvent.EventType; /** @@ -46,7 +47,7 @@ public class SparkElemental extends CardImpl { public SparkElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SparkMage.java b/Mage.Sets/src/mage/cards/s/SparkMage.java index c004d0c5d8..62330ae9e8 100644 --- a/Mage.Sets/src/mage/cards/s/SparkMage.java +++ b/Mage.Sets/src/mage/cards/s/SparkMage.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; @@ -52,8 +53,8 @@ public class SparkMage extends CardImpl { public SparkMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Dwarf"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SparkTrooper.java b/Mage.Sets/src/mage/cards/s/SparkTrooper.java index 89d379542b..4a581e15a8 100644 --- a/Mage.Sets/src/mage/cards/s/SparkTrooper.java +++ b/Mage.Sets/src/mage/cards/s/SparkTrooper.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -47,8 +48,8 @@ public class SparkTrooper extends CardImpl { public SparkTrooper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}{W}"); - this.subtype.add("Elemental"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(6); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Sparkcaster.java b/Mage.Sets/src/mage/cards/s/Sparkcaster.java index 630a419bb0..12127302f1 100644 --- a/Mage.Sets/src/mage/cards/s/Sparkcaster.java +++ b/Mage.Sets/src/mage/cards/s/Sparkcaster.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,7 +58,7 @@ public class Sparkcaster extends CardImpl { public Sparkcaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SparkmageApprentice.java b/Mage.Sets/src/mage/cards/s/SparkmageApprentice.java index 624ed56170..7835ff49f6 100644 --- a/Mage.Sets/src/mage/cards/s/SparkmageApprentice.java +++ b/Mage.Sets/src/mage/cards/s/SparkmageApprentice.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; /** @@ -45,8 +46,8 @@ public class SparkmageApprentice extends CardImpl { public SparkmageApprentice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Sparksmith.java b/Mage.Sets/src/mage/cards/s/Sparksmith.java index 557c37060b..d7ea19eac7 100644 --- a/Mage.Sets/src/mage/cards/s/Sparksmith.java +++ b/Mage.Sets/src/mage/cards/s/Sparksmith.java @@ -57,7 +57,7 @@ public class Sparksmith extends CardImpl { public Sparksmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Sparkspitter.java b/Mage.Sets/src/mage/cards/s/Sparkspitter.java index fe70c4ed95..ea0d617d37 100644 --- a/Mage.Sets/src/mage/cards/s/Sparkspitter.java +++ b/Mage.Sets/src/mage/cards/s/Sparkspitter.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.SparkElementalToken; @@ -49,8 +50,8 @@ public class Sparkspitter extends CardImpl { public Sparkspitter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SparringCollar.java b/Mage.Sets/src/mage/cards/s/SparringCollar.java index 6cd48c9f4b..ace54ba669 100644 --- a/Mage.Sets/src/mage/cards/s/SparringCollar.java +++ b/Mage.Sets/src/mage/cards/s/SparringCollar.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -53,7 +54,7 @@ public class SparringCollar extends CardImpl { public SparringCollar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has first strike. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/s/SparringGolem.java b/Mage.Sets/src/mage/cards/s/SparringGolem.java index cdd2de20d5..996a8fff66 100644 --- a/Mage.Sets/src/mage/cards/s/SparringGolem.java +++ b/Mage.Sets/src/mage/cards/s/SparringGolem.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,7 +47,7 @@ public class SparringGolem extends CardImpl { public SparringGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SparringMummy.java b/Mage.Sets/src/mage/cards/s/SparringMummy.java index 7a24b2b3cb..c6e1892e47 100644 --- a/Mage.Sets/src/mage/cards/s/SparringMummy.java +++ b/Mage.Sets/src/mage/cards/s/SparringMummy.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -46,7 +47,7 @@ public class SparringMummy extends CardImpl { public SparringMummy(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SpawnOfRixMaadi.java b/Mage.Sets/src/mage/cards/s/SpawnOfRixMaadi.java index 206d46cb15..4b19f5a14c 100644 --- a/Mage.Sets/src/mage/cards/s/SpawnOfRixMaadi.java +++ b/Mage.Sets/src/mage/cards/s/SpawnOfRixMaadi.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.UnleashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SpawnOfRixMaadi extends CardImpl { public SpawnOfRixMaadi(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{R}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); diff --git a/Mage.Sets/src/mage/cards/s/SpawnOfThraxes.java b/Mage.Sets/src/mage/cards/s/SpawnOfThraxes.java index dd4acd18ce..aa6988b29b 100644 --- a/Mage.Sets/src/mage/cards/s/SpawnOfThraxes.java +++ b/Mage.Sets/src/mage/cards/s/SpawnOfThraxes.java @@ -56,7 +56,7 @@ public class SpawnOfThraxes extends CardImpl { public SpawnOfThraxes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SpawnbinderMage.java b/Mage.Sets/src/mage/cards/s/SpawnbinderMage.java index c4a9bee98c..9c819a0e46 100644 --- a/Mage.Sets/src/mage/cards/s/SpawnbinderMage.java +++ b/Mage.Sets/src/mage/cards/s/SpawnbinderMage.java @@ -62,9 +62,9 @@ public class SpawnbinderMage extends CardImpl { public SpawnbinderMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SpawningGrounds.java b/Mage.Sets/src/mage/cards/s/SpawningGrounds.java index 59a6b7c592..d10bfea142 100644 --- a/Mage.Sets/src/mage/cards/s/SpawningGrounds.java +++ b/Mage.Sets/src/mage/cards/s/SpawningGrounds.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class SpawningGrounds extends CardImpl { public SpawningGrounds(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{6}{G}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SpawnsireOfUlamog.java b/Mage.Sets/src/mage/cards/s/SpawnsireOfUlamog.java index 4a4204dcae..982c67c0f6 100644 --- a/Mage.Sets/src/mage/cards/s/SpawnsireOfUlamog.java +++ b/Mage.Sets/src/mage/cards/s/SpawnsireOfUlamog.java @@ -58,7 +58,7 @@ public class SpawnsireOfUlamog extends CardImpl { public SpawnsireOfUlamog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{10}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(7); this.toughness = new MageInt(11); diff --git a/Mage.Sets/src/mage/cards/s/Spawnwrithe.java b/Mage.Sets/src/mage/cards/s/Spawnwrithe.java index e4fa9482c2..bfedfdbbab 100644 --- a/Mage.Sets/src/mage/cards/s/Spawnwrithe.java +++ b/Mage.Sets/src/mage/cards/s/Spawnwrithe.java @@ -30,11 +30,12 @@ package mage.cards.s; import java.util.UUID; import mage.MageInt; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; -import mage.abilities.effects.PutTokenOntoBattlefieldCopySourceEffect; +import mage.abilities.effects.CreateTokenCopySourceEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class Spawnwrithe extends CardImpl { public Spawnwrithe(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -52,7 +53,7 @@ public class Spawnwrithe extends CardImpl { // Trample this.addAbility(TrampleAbility.getInstance()); // Whenever Spawnwrithe deals combat damage to a player, create a token that's a copy of Spawnwrithe. - this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new PutTokenOntoBattlefieldCopySourceEffect(), false)); + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new CreateTokenCopySourceEffect(), false)); } diff --git a/Mage.Sets/src/mage/cards/s/SpearbreakerBehemoth.java b/Mage.Sets/src/mage/cards/s/SpearbreakerBehemoth.java index ee0e8222fa..ba69703cbc 100644 --- a/Mage.Sets/src/mage/cards/s/SpearbreakerBehemoth.java +++ b/Mage.Sets/src/mage/cards/s/SpearbreakerBehemoth.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class SpearbreakerBehemoth extends CardImpl { public SpearbreakerBehemoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SpearpointOread.java b/Mage.Sets/src/mage/cards/s/SpearpointOread.java index 086d1cd88b..b9414383aa 100644 --- a/Mage.Sets/src/mage/cards/s/SpearpointOread.java +++ b/Mage.Sets/src/mage/cards/s/SpearpointOread.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -50,7 +51,7 @@ public class SpearpointOread extends CardImpl { public SpearpointOread(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{R}"); - this.subtype.add("Nymph"); + this.subtype.add(SubType.NYMPH); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SpeciesGorger.java b/Mage.Sets/src/mage/cards/s/SpeciesGorger.java index 0edd27d6c7..ddb1393f74 100644 --- a/Mage.Sets/src/mage/cards/s/SpeciesGorger.java +++ b/Mage.Sets/src/mage/cards/s/SpeciesGorger.java @@ -44,8 +44,8 @@ public class SpeciesGorger extends CardImpl { public SpeciesGorger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{U}"); - this.subtype.add("Frog"); - this.subtype.add("Beast"); + this.subtype.add(SubType.FROG); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SpectersShroud.java b/Mage.Sets/src/mage/cards/s/SpectersShroud.java index 532fd24644..b69ec43e65 100644 --- a/Mage.Sets/src/mage/cards/s/SpectersShroud.java +++ b/Mage.Sets/src/mage/cards/s/SpectersShroud.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class SpectersShroud extends CardImpl { public SpectersShroud(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 0))); diff --git a/Mage.Sets/src/mage/cards/s/SpectraWard.java b/Mage.Sets/src/mage/cards/s/SpectraWard.java index b1b2c959db..baf1863fd2 100644 --- a/Mage.Sets/src/mage/cards/s/SpectraWard.java +++ b/Mage.Sets/src/mage/cards/s/SpectraWard.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -68,7 +69,7 @@ public class SpectraWard extends CardImpl { public SpectraWard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/SpectralBears.java b/Mage.Sets/src/mage/cards/s/SpectralBears.java index a20f739bbe..5de47d8287 100644 --- a/Mage.Sets/src/mage/cards/s/SpectralBears.java +++ b/Mage.Sets/src/mage/cards/s/SpectralBears.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DontUntapInControllersNextUntapStepSourceEf import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; @@ -52,8 +53,8 @@ public class SpectralBears extends CardImpl { public SpectralBears(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Bear"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.BEAR); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SpectralCloak.java b/Mage.Sets/src/mage/cards/s/SpectralCloak.java new file mode 100644 index 0000000000..3a2d6238ae --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SpectralCloak.java @@ -0,0 +1,87 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.constants.SubType; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.InvertCondition; +import mage.abilities.condition.common.AttachedToTappedCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.ShroudAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class SpectralCloak extends CardImpl { + + public SpectralCloak(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature has shroud as long as it's untapped. + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ConditionalContinuousEffect( + new GainAbilityAttachedEffect(ShroudAbility.getInstance(), AttachmentType.AURA), + new InvertCondition(AttachedToTappedCondition.instance), + "Enchanted creature has shroud as long as it's untapped." + ) + )); + } + + public SpectralCloak(final SpectralCloak card) { + super(card); + } + + @Override + public SpectralCloak copy() { + return new SpectralCloak(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SpectralFlight.java b/Mage.Sets/src/mage/cards/s/SpectralFlight.java index 13bf108d09..3dde747924 100644 --- a/Mage.Sets/src/mage/cards/s/SpectralFlight.java +++ b/Mage.Sets/src/mage/cards/s/SpectralFlight.java @@ -49,7 +49,7 @@ public class SpectralFlight extends CardImpl { public SpectralFlight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/SpectralForce.java b/Mage.Sets/src/mage/cards/s/SpectralForce.java index a461e96b7d..089ed8e6e0 100644 --- a/Mage.Sets/src/mage/cards/s/SpectralForce.java +++ b/Mage.Sets/src/mage/cards/s/SpectralForce.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -51,8 +52,8 @@ public class SpectralForce extends CardImpl { public SpectralForce(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Elemental"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/s/SpectralGateguards.java b/Mage.Sets/src/mage/cards/s/SpectralGateguards.java index deabbc5dbf..f5051351f4 100644 --- a/Mage.Sets/src/mage/cards/s/SpectralGateguards.java +++ b/Mage.Sets/src/mage/cards/s/SpectralGateguards.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class SpectralGateguards extends CardImpl { public SpectralGateguards(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Spirit"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SpectralGrasp.java b/Mage.Sets/src/mage/cards/s/SpectralGrasp.java index 764b74fc28..d9a7fc1f12 100644 --- a/Mage.Sets/src/mage/cards/s/SpectralGrasp.java +++ b/Mage.Sets/src/mage/cards/s/SpectralGrasp.java @@ -1,89 +1,90 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.combat.CantAttackControllerAttachedEffect; -import mage.abilities.effects.common.combat.CantBlockAttachedEffect; -import mage.abilities.keyword.EnchantAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.ControllerPredicate; -import mage.target.TargetPermanent; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Styxo - */ -public class SpectralGrasp extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures you control"); - - static { - filter.add(new ControllerPredicate(TargetController.YOU)); - } - - public SpectralGrasp(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); - - // Enchant creature - TargetPermanent auraTarget = new TargetCreaturePermanent(); - this.getSpellAbility().addTarget(auraTarget); - this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); - Ability ability = new EnchantAbility(auraTarget.getTargetName()); - this.addAbility(ability); - - // Enchanted creature can't attack you or a planeswalker you control. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackControllerAttachedEffect(AttachmentType.AURA))); - - // Enchanted creature can't block creatures you control. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockAttachedEffect(AttachmentType.AURA, Duration.WhileOnBattlefield, filter))); - - } - - public SpectralGrasp(final SpectralGrasp card) { - super(card); - } - - @Override - public SpectralGrasp copy() { - return new SpectralGrasp(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.combat.CantAttackControllerAttachedEffect; +import mage.abilities.effects.common.combat.CantBlockAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Styxo + */ +public class SpectralGrasp extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures you control"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public SpectralGrasp(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature can't attack you or a planeswalker you control. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackControllerAttachedEffect(AttachmentType.AURA))); + + // Enchanted creature can't block creatures you control. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockAttachedEffect(AttachmentType.AURA, Duration.WhileOnBattlefield, filter))); + + } + + public SpectralGrasp(final SpectralGrasp card) { + super(card); + } + + @Override + public SpectralGrasp copy() { + return new SpectralGrasp(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SpectralGuardian.java b/Mage.Sets/src/mage/cards/s/SpectralGuardian.java index 7d89114c3b..eb71903315 100644 --- a/Mage.Sets/src/mage/cards/s/SpectralGuardian.java +++ b/Mage.Sets/src/mage/cards/s/SpectralGuardian.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterArtifactPermanent; @@ -59,7 +60,7 @@ public class SpectralGuardian extends CardImpl { public SpectralGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SpectralLynx.java b/Mage.Sets/src/mage/cards/s/SpectralLynx.java index e0932a260c..3b9685062e 100644 --- a/Mage.Sets/src/mage/cards/s/SpectralLynx.java +++ b/Mage.Sets/src/mage/cards/s/SpectralLynx.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,8 +49,8 @@ public class SpectralLynx extends CardImpl { public SpectralLynx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpectralPrison.java b/Mage.Sets/src/mage/cards/s/SpectralPrison.java index 5262453b48..a8f57f4299 100644 --- a/Mage.Sets/src/mage/cards/s/SpectralPrison.java +++ b/Mage.Sets/src/mage/cards/s/SpectralPrison.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class SpectralPrison extends CardImpl { public SpectralPrison(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/SpectralRider.java b/Mage.Sets/src/mage/cards/s/SpectralRider.java index e8b0d1212a..4668e2b922 100644 --- a/Mage.Sets/src/mage/cards/s/SpectralRider.java +++ b/Mage.Sets/src/mage/cards/s/SpectralRider.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.IntimidateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class SpectralRider extends CardImpl { public SpectralRider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Spirit"); - this.subtype.add("Knight"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SpectralShepherd.java b/Mage.Sets/src/mage/cards/s/SpectralShepherd.java index b093cf03a6..a90e49f00c 100644 --- a/Mage.Sets/src/mage/cards/s/SpectralShepherd.java +++ b/Mage.Sets/src/mage/cards/s/SpectralShepherd.java @@ -60,7 +60,7 @@ public class SpectralShepherd extends CardImpl { public SpectralShepherd(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SpectralSliver.java b/Mage.Sets/src/mage/cards/s/SpectralSliver.java index 61d42f9bcc..6ef405190b 100644 --- a/Mage.Sets/src/mage/cards/s/SpectralSliver.java +++ b/Mage.Sets/src/mage/cards/s/SpectralSliver.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.GainAbilityAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -50,8 +51,8 @@ public class SpectralSliver extends CardImpl { public SpectralSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Sliver"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SLIVER); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SpeederTrooper.java b/Mage.Sets/src/mage/cards/s/SpeederTrooper.java index 0f429752cd..3f19b7da3b 100644 --- a/Mage.Sets/src/mage/cards/s/SpeederTrooper.java +++ b/Mage.Sets/src/mage/cards/s/SpeederTrooper.java @@ -1,76 +1,76 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; -import mage.abilities.keyword.HasteAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; - -/** - * - * @author Styxo - */ -public class SpeederTrooper extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures"); - - static { - filter.add(new SubtypePredicate(SubType.TROOPER)); - } - - public SpeederTrooper(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Trooper"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // Trooper creatures you control have haste. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter, false))); - - } - - public SpeederTrooper(final SpeederTrooper card) { - super(card); - } - - @Override - public SpeederTrooper copy() { - return new SpeederTrooper(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author Styxo + */ +public class SpeederTrooper extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures"); + + static { + filter.add(new SubtypePredicate(SubType.TROOPER)); + } + + public SpeederTrooper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.TROOPER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Trooper creatures you control have haste. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter, false))); + + } + + public SpeederTrooper(final SpeederTrooper card) { + super(card); + } + + @Override + public SpeederTrooper copy() { + return new SpeederTrooper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SpeedwayFanatic.java b/Mage.Sets/src/mage/cards/s/SpeedwayFanatic.java index b0c892901d..2621519ebd 100644 --- a/Mage.Sets/src/mage/cards/s/SpeedwayFanatic.java +++ b/Mage.Sets/src/mage/cards/s/SpeedwayFanatic.java @@ -1,70 +1,71 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.effects.common.CrewsVehicleSourceTriggeredAbility; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.abilities.keyword.HasteAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; - -/** - * - * @author LevelX2 - */ -public class SpeedwayFanatic extends CardImpl { - - public SpeedwayFanatic(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Pilot"); - this.power = new MageInt(2); - this.toughness = new MageInt(1); - - // Haste - this.addAbility(HasteAbility.getInstance()); - - // Whenever Speedway Fanatic crews a Vehicle, that Vehicle gains haste until end of turn. - this.addAbility(new CrewsVehicleSourceTriggeredAbility(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn, - "that Vehicle gains haste until end of turn"))); - } - - public SpeedwayFanatic(final SpeedwayFanatic card) { - super(card); - } - - @Override - public SpeedwayFanatic copy() { - return new SpeedwayFanatic(this); - } -} - +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.effects.common.CrewsVehicleSourceTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; + +/** + * + * @author LevelX2 + */ +public class SpeedwayFanatic extends CardImpl { + + public SpeedwayFanatic(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PILOT); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // Whenever Speedway Fanatic crews a Vehicle, that Vehicle gains haste until end of turn. + this.addAbility(new CrewsVehicleSourceTriggeredAbility(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn, + "that Vehicle gains haste until end of turn"))); + } + + public SpeedwayFanatic(final SpeedwayFanatic card) { + super(card); + } + + @Override + public SpeedwayFanatic copy() { + return new SpeedwayFanatic(this); + } +} + diff --git a/Mage.Sets/src/mage/cards/s/SpellQueller.java b/Mage.Sets/src/mage/cards/s/SpellQueller.java index bad9d0a350..667e48e2ac 100644 --- a/Mage.Sets/src/mage/cards/s/SpellQueller.java +++ b/Mage.Sets/src/mage/cards/s/SpellQueller.java @@ -42,6 +42,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.filter.FilterSpell; @@ -69,7 +70,7 @@ public class SpellQueller extends CardImpl { public SpellQueller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SpellSwindle.java b/Mage.Sets/src/mage/cards/s/SpellSwindle.java new file mode 100644 index 0000000000..a956b52b36 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SpellSwindle.java @@ -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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.token.TreasureToken; +import mage.game.stack.StackObject; +import mage.target.TargetSpell; + +/** + * + * @author TheElk801 + */ +public class SpellSwindle extends CardImpl { + + public SpellSwindle(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}{U}"); + + // Counter target spell. Create X colorless Treasure artifact tokens, where X is that spell's converted mana cost. They have "T, Sacrifice this artifact: Add one mana of any color to your mana pool." + this.getSpellAbility().addTarget(new TargetSpell()); + this.getSpellAbility().addEffect(new SpellSwindleEffect()); + } + + public SpellSwindle(final SpellSwindle card) { + super(card); + } + + @Override + public SpellSwindle copy() { + return new SpellSwindle(this); + } +} + +class SpellSwindleEffect extends OneShotEffect { + + public SpellSwindleEffect() { + super(Outcome.Detriment); + staticText = "Counter target spell. Create X colorless Treasure artifact tokens, where X is that spell's converted mana cost. " + + "They have \"{T}, Sacrifice this artifact: Add one mana of any color to your mana pool.\""; + } + + public SpellSwindleEffect(final SpellSwindleEffect effect) { + super(effect); + } + + @Override + public SpellSwindleEffect copy() { + return new SpellSwindleEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + StackObject stackObject = game.getStack().getStackObject(targetPointer.getFirst(game, source)); + if (stackObject != null) { + game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game); + return new CreateTokenEffect(new TreasureToken(), stackObject.getConvertedManaCost()).apply(game, source); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SpellbaneCentaur.java b/Mage.Sets/src/mage/cards/s/SpellbaneCentaur.java index 776ca5529a..d0c05a53c7 100644 --- a/Mage.Sets/src/mage/cards/s/SpellbaneCentaur.java +++ b/Mage.Sets/src/mage/cards/s/SpellbaneCentaur.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.CantBeTargetedAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterObject; @@ -56,7 +57,7 @@ public class SpellbaneCentaur extends CardImpl { public SpellbaneCentaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Centaur"); + this.subtype.add(SubType.CENTAUR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Spellbinder.java b/Mage.Sets/src/mage/cards/s/Spellbinder.java index 74b02b0048..085fbde233 100644 --- a/Mage.Sets/src/mage/cards/s/Spellbinder.java +++ b/Mage.Sets/src/mage/cards/s/Spellbinder.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -60,7 +61,7 @@ public class Spellbinder extends CardImpl { public Spellbinder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Imprint - When Spellbinder enters the battlefield, you may exile an instant card from your hand. this.addAbility(new EntersBattlefieldTriggeredAbility(new SpellbinderImprintEffect(), true, "Imprint — ")); diff --git a/Mage.Sets/src/mage/cards/s/SpellboundDragon.java b/Mage.Sets/src/mage/cards/s/SpellboundDragon.java index d502bf863b..1c17f629f3 100644 --- a/Mage.Sets/src/mage/cards/s/SpellboundDragon.java +++ b/Mage.Sets/src/mage/cards/s/SpellboundDragon.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.game.Game; @@ -53,7 +54,7 @@ public class SpellboundDragon extends CardImpl { public SpellboundDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SpellbreakerBehemoth.java b/Mage.Sets/src/mage/cards/s/SpellbreakerBehemoth.java index acf160cbb2..7550fcb847 100644 --- a/Mage.Sets/src/mage/cards/s/SpellbreakerBehemoth.java +++ b/Mage.Sets/src/mage/cards/s/SpellbreakerBehemoth.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.CantBeCounteredSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; @@ -61,7 +62,7 @@ public class SpellbreakerBehemoth extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SpellgorgerBarbarian.java b/Mage.Sets/src/mage/cards/s/SpellgorgerBarbarian.java index 4bd40a78c9..f007b49b70 100644 --- a/Mage.Sets/src/mage/cards/s/SpellgorgerBarbarian.java +++ b/Mage.Sets/src/mage/cards/s/SpellgorgerBarbarian.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.discard.DiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,9 +46,9 @@ public class SpellgorgerBarbarian extends CardImpl { public SpellgorgerBarbarian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Nightmare"); - this.subtype.add("Barbarian"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NIGHTMARE); + this.subtype.add(SubType.BARBARIAN); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpellheartChimera.java b/Mage.Sets/src/mage/cards/s/SpellheartChimera.java index b06ae5a99d..6571e75dea 100644 --- a/Mage.Sets/src/mage/cards/s/SpellheartChimera.java +++ b/Mage.Sets/src/mage/cards/s/SpellheartChimera.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterInstantOrSorceryCard; @@ -49,7 +50,7 @@ public class SpellheartChimera extends CardImpl { public SpellheartChimera(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{R}"); - this.subtype.add("Chimera"); + this.subtype.add(SubType.CHIMERA); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/Spellshift.java b/Mage.Sets/src/mage/cards/s/Spellshift.java index ea167b1975..242e80b10a 100644 --- a/Mage.Sets/src/mage/cards/s/Spellshift.java +++ b/Mage.Sets/src/mage/cards/s/Spellshift.java @@ -1,123 +1,123 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.CounterTargetEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.common.FilterInstantOrSorcerySpell; -import mage.game.Game; -import mage.game.stack.Spell; -import mage.players.Library; -import mage.players.Player; -import mage.target.TargetSpell; - -/** - * - * @author Styxo - */ -public class Spellshift extends CardImpl { - - public Spellshift(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}"); - - // Counter target instant or sorcery spell. - this.getSpellAbility().addTarget(new TargetSpell(new FilterInstantOrSorcerySpell())); - this.getSpellAbility().addEffect(new CounterTargetEffect()); - - // Its controller reveals cards from the top of his or her library until he or she reveals an instant or sorcery card. That player may cast that card without paying its mana cost. Then he or she shuffles his or her library. - this.getSpellAbility().addEffect(new SpellshiftEffect()); - } - - public Spellshift(final Spellshift card) { - super(card); - } - - @Override - public Spellshift copy() { - return new Spellshift(this); - } -} - -class SpellshiftEffect extends OneShotEffect { - - public SpellshiftEffect() { - super(Outcome.Detriment); - this.staticText = "Its controller reveals cards from the top of his or her library until he or she reveals an instant or sorcery card. That player may cast that card without paying its mana cost. Then he or she shuffles his or her library"; - } - - public SpellshiftEffect(final SpellshiftEffect effect) { - super(effect); - } - - @Override - public SpellshiftEffect copy() { - return new SpellshiftEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(((Spell) game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.STACK)).getControllerId()); - if (player != null) { - Library library = player.getLibrary(); - if (library.hasCards()) { - Cards cards = new CardsImpl(); - Card card = library.removeFromTop(game); - cards.add(card); - while (!(card.isSorcery() || card.isInstant()) && library.hasCards()) { - card = library.removeFromTop(game); - cards.add(card); - } - - if (card.isSorcery() || card.isInstant()) { - if (player.chooseUse(outcome, "Cast " + card.getLogName() + " ?", source, game)) { - if (player.cast(card.getSpellAbility(), game, true)) { - cards.remove(card.getId()); - } - } - } - - if (!cards.isEmpty()) { - library.addAll(cards.getCards(game), game); - } - } - player.shuffleLibrary(source, game); - return true; - } - return false; - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterInstantOrSorcerySpell; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.players.Library; +import mage.players.Player; +import mage.target.TargetSpell; + +/** + * + * @author Styxo + */ +public class Spellshift extends CardImpl { + + public Spellshift(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}"); + + // Counter target instant or sorcery spell. + this.getSpellAbility().addTarget(new TargetSpell(new FilterInstantOrSorcerySpell())); + this.getSpellAbility().addEffect(new CounterTargetEffect()); + + // Its controller reveals cards from the top of his or her library until he or she reveals an instant or sorcery card. That player may cast that card without paying its mana cost. Then he or she shuffles his or her library. + this.getSpellAbility().addEffect(new SpellshiftEffect()); + } + + public Spellshift(final Spellshift card) { + super(card); + } + + @Override + public Spellshift copy() { + return new Spellshift(this); + } +} + +class SpellshiftEffect extends OneShotEffect { + + public SpellshiftEffect() { + super(Outcome.Detriment); + this.staticText = "Its controller reveals cards from the top of his or her library until he or she reveals an instant or sorcery card. That player may cast that card without paying its mana cost. Then he or she shuffles his or her library"; + } + + public SpellshiftEffect(final SpellshiftEffect effect) { + super(effect); + } + + @Override + public SpellshiftEffect copy() { + return new SpellshiftEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(((Spell) game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.STACK)).getControllerId()); + if (player != null) { + Library library = player.getLibrary(); + if (library.hasCards()) { + Cards cards = new CardsImpl(); + Card card = library.removeFromTop(game); + cards.add(card); + while (!(card.isSorcery() || card.isInstant()) && library.hasCards()) { + card = library.removeFromTop(game); + cards.add(card); + } + + if (card.isSorcery() || card.isInstant()) { + if (player.chooseUse(outcome, "Cast " + card.getLogName() + " ?", source, game)) { + if (player.cast(card.getSpellAbility(), game, true)) { + cards.remove(card.getId()); + } + } + } + + if (!cards.isEmpty()) { + library.addAll(cards.getCards(game), game); + } + } + player.shuffleLibrary(source, game); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/Spellskite.java b/Mage.Sets/src/mage/cards/s/Spellskite.java index 96bf870751..cd99fe9ed3 100644 --- a/Mage.Sets/src/mage/cards/s/Spellskite.java +++ b/Mage.Sets/src/mage/cards/s/Spellskite.java @@ -38,6 +38,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -57,7 +58,7 @@ public class Spellskite extends CardImpl { public Spellskite(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SpellstutterSprite.java b/Mage.Sets/src/mage/cards/s/SpellstutterSprite.java index 8c358e2745..651a91aece 100644 --- a/Mage.Sets/src/mage/cards/s/SpellstutterSprite.java +++ b/Mage.Sets/src/mage/cards/s/SpellstutterSprite.java @@ -61,8 +61,8 @@ public class SpellstutterSprite extends CardImpl { public SpellstutterSprite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpelltitheEnforcer.java b/Mage.Sets/src/mage/cards/s/SpelltitheEnforcer.java index 141043273c..84297ac869 100644 --- a/Mage.Sets/src/mage/cards/s/SpelltitheEnforcer.java +++ b/Mage.Sets/src/mage/cards/s/SpelltitheEnforcer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.SacrificeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SetTargetPointer; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -51,8 +52,8 @@ public class SpelltitheEnforcer extends CardImpl { public SpelltitheEnforcer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Elephant"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ELEPHANT); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SpellweaverEternal.java b/Mage.Sets/src/mage/cards/s/SpellweaverEternal.java index 9068820ff8..0e215ea98f 100644 --- a/Mage.Sets/src/mage/cards/s/SpellweaverEternal.java +++ b/Mage.Sets/src/mage/cards/s/SpellweaverEternal.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,9 +45,9 @@ public class SpellweaverEternal extends CardImpl { public SpellweaverEternal(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Naga"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SphereOfDuty.java b/Mage.Sets/src/mage/cards/s/SphereOfDuty.java new file mode 100644 index 0000000000..22df3290c5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SphereOfDuty.java @@ -0,0 +1,60 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.PreventDamageByColorEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class SphereOfDuty extends CardImpl { + + public SphereOfDuty(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + + // If a green source would deal damage to you, prevent 2 of that damage. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventDamageByColorEffect(ObjectColor.GREEN, 2))); + } + + public SphereOfDuty(final SphereOfDuty card) { + super(card); + } + + @Override + public SphereOfDuty copy() { + return new SphereOfDuty(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SphereOfGrace.java b/Mage.Sets/src/mage/cards/s/SphereOfGrace.java new file mode 100644 index 0000000000..c80f84d066 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SphereOfGrace.java @@ -0,0 +1,60 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.PreventDamageByColorEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class SphereOfGrace extends CardImpl { + + public SphereOfGrace(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + + // If a black source would deal damage to you, prevent 2 of that damage. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventDamageByColorEffect(ObjectColor.BLACK, 2))); + } + + public SphereOfGrace(final SphereOfGrace card) { + super(card); + } + + @Override + public SphereOfGrace copy() { + return new SphereOfGrace(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SphereOfLaw.java b/Mage.Sets/src/mage/cards/s/SphereOfLaw.java new file mode 100644 index 0000000000..66cae254c8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SphereOfLaw.java @@ -0,0 +1,60 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.PreventDamageByColorEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class SphereOfLaw extends CardImpl { + + public SphereOfLaw(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + + // If a red source would deal damage to you, prevent 2 of that damage. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventDamageByColorEffect(ObjectColor.RED, 2))); + } + + public SphereOfLaw(final SphereOfLaw card) { + super(card); + } + + @Override + public SphereOfLaw copy() { + return new SphereOfLaw(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SphereOfPurity.java b/Mage.Sets/src/mage/cards/s/SphereOfPurity.java new file mode 100644 index 0000000000..d7c691bc97 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SphereOfPurity.java @@ -0,0 +1,97 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.PreventionEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author L_J + */ +public class SphereOfPurity extends CardImpl { + + public SphereOfPurity(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + + // If an artifact would deal damage to you, prevent 1 of that damage. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SphereOfPurityEffect())); + } + + public SphereOfPurity(final SphereOfPurity card) { + super(card); + } + + @Override + public SphereOfPurity copy() { + return new SphereOfPurity(this); + } +} + +class SphereOfPurityEffect extends PreventionEffectImpl { + + public SphereOfPurityEffect() { + super(Duration.WhileOnBattlefield, 1, false, false); + this.staticText = "If an artifact would deal damage to you, prevent 1 of that damage"; + } + + public SphereOfPurityEffect(SphereOfPurityEffect effect) { + super(effect); + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DAMAGE_PLAYER; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getTargetId().equals(source.getControllerId())) { + Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId()); + if (permanent != null && permanent.isArtifact()) { + return super.applies(event, source, game); + } + } + return false; + } + + @Override + public SphereOfPurityEffect copy() { + return new SphereOfPurityEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SphereOfReason.java b/Mage.Sets/src/mage/cards/s/SphereOfReason.java new file mode 100644 index 0000000000..c7c7746fa7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SphereOfReason.java @@ -0,0 +1,60 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.PreventDamageByColorEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class SphereOfReason extends CardImpl { + + public SphereOfReason(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + + // If a blue source would deal damage to you, prevent 2 of that damage. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventDamageByColorEffect(ObjectColor.BLUE, 2))); + } + + public SphereOfReason(final SphereOfReason card) { + super(card); + } + + @Override + public SphereOfReason copy() { + return new SphereOfReason(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SphereOfTruth.java b/Mage.Sets/src/mage/cards/s/SphereOfTruth.java new file mode 100644 index 0000000000..5260505d05 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SphereOfTruth.java @@ -0,0 +1,60 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.PreventDamageByColorEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class SphereOfTruth extends CardImpl { + + public SphereOfTruth(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + + // If a white source would deal damage to you, prevent 2 of that damage. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventDamageByColorEffect(ObjectColor.WHITE, 2))); + } + + public SphereOfTruth(final SphereOfTruth card) { + super(card); + } + + @Override + public SphereOfTruth copy() { + return new SphereOfTruth(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SphinxAmbassador.java b/Mage.Sets/src/mage/cards/s/SphinxAmbassador.java index db324ac169..07b21241e1 100644 --- a/Mage.Sets/src/mage/cards/s/SphinxAmbassador.java +++ b/Mage.Sets/src/mage/cards/s/SphinxAmbassador.java @@ -41,6 +41,7 @@ import mage.cards.CardSetInfo; import mage.choices.Choice; import mage.choices.ChoiceImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class SphinxAmbassador extends CardImpl { public SphinxAmbassador(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SphinxOfJwarIsle.java b/Mage.Sets/src/mage/cards/s/SphinxOfJwarIsle.java index 3eed92a08e..39091e9d17 100644 --- a/Mage.Sets/src/mage/cards/s/SphinxOfJwarIsle.java +++ b/Mage.Sets/src/mage/cards/s/SphinxOfJwarIsle.java @@ -41,6 +41,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -54,7 +55,7 @@ public class SphinxOfJwarIsle extends CardImpl { public SphinxOfJwarIsle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SphinxOfLostTruths.java b/Mage.Sets/src/mage/cards/s/SphinxOfLostTruths.java index cb36c38bbf..dc06bfbad6 100644 --- a/Mage.Sets/src/mage/cards/s/SphinxOfLostTruths.java +++ b/Mage.Sets/src/mage/cards/s/SphinxOfLostTruths.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -50,7 +51,7 @@ public class SphinxOfLostTruths extends CardImpl { public SphinxOfLostTruths(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SphinxOfMagosi.java b/Mage.Sets/src/mage/cards/s/SphinxOfMagosi.java index 4a19b10fb3..8f74b1b334 100644 --- a/Mage.Sets/src/mage/cards/s/SphinxOfMagosi.java +++ b/Mage.Sets/src/mage/cards/s/SphinxOfMagosi.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -50,7 +51,7 @@ public class SphinxOfMagosi extends CardImpl { public SphinxOfMagosi (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SphinxOfTheChimes.java b/Mage.Sets/src/mage/cards/s/SphinxOfTheChimes.java index 5564a19839..f408fc26cd 100644 --- a/Mage.Sets/src/mage/cards/s/SphinxOfTheChimes.java +++ b/Mage.Sets/src/mage/cards/s/SphinxOfTheChimes.java @@ -44,6 +44,7 @@ import mage.cards.Cards; import mage.cards.CardsImpl; import mage.cards.SplitCard; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.common.FilterNonlandCard; @@ -60,7 +61,7 @@ public class SphinxOfTheChimes extends CardImpl { public SphinxOfTheChimes(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SphinxOfTheFinalWord.java b/Mage.Sets/src/mage/cards/s/SphinxOfTheFinalWord.java index 02ad2cb325..9dede7fdd6 100644 --- a/Mage.Sets/src/mage/cards/s/SphinxOfTheFinalWord.java +++ b/Mage.Sets/src/mage/cards/s/SphinxOfTheFinalWord.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterSpell; @@ -58,7 +59,7 @@ public class SphinxOfTheFinalWord extends CardImpl { public SphinxOfTheFinalWord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SphinxOfTheSteelWind.java b/Mage.Sets/src/mage/cards/s/SphinxOfTheSteelWind.java index a1292b7b51..352c890927 100644 --- a/Mage.Sets/src/mage/cards/s/SphinxOfTheSteelWind.java +++ b/Mage.Sets/src/mage/cards/s/SphinxOfTheSteelWind.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.*; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class SphinxOfTheSteelWind extends CardImpl { public SphinxOfTheSteelWind (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}{W}{U}{B}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SphinxOfUthuun.java b/Mage.Sets/src/mage/cards/s/SphinxOfUthuun.java index 9c41830a09..bb98ced1ab 100644 --- a/Mage.Sets/src/mage/cards/s/SphinxOfUthuun.java +++ b/Mage.Sets/src/mage/cards/s/SphinxOfUthuun.java @@ -43,6 +43,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -58,7 +59,7 @@ public class SphinxOfUthuun extends CardImpl { public SphinxOfUthuun(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SphinxSovereign.java b/Mage.Sets/src/mage/cards/s/SphinxSovereign.java index c64f096f3c..0a41737e9f 100644 --- a/Mage.Sets/src/mage/cards/s/SphinxSovereign.java +++ b/Mage.Sets/src/mage/cards/s/SphinxSovereign.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -49,7 +50,7 @@ public class SphinxSovereign extends CardImpl { public SphinxSovereign(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{W}{U}{U}{B}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SphinxSummoner.java b/Mage.Sets/src/mage/cards/s/SphinxSummoner.java index 558863e65e..8feefe91fe 100644 --- a/Mage.Sets/src/mage/cards/s/SphinxSummoner.java +++ b/Mage.Sets/src/mage/cards/s/SphinxSummoner.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -54,7 +55,7 @@ public class SphinxSummoner extends CardImpl { public SphinxSummoner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{U}{B}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SphinxsDisciple.java b/Mage.Sets/src/mage/cards/s/SphinxsDisciple.java index 652bc40627..a6b2344902 100644 --- a/Mage.Sets/src/mage/cards/s/SphinxsDisciple.java +++ b/Mage.Sets/src/mage/cards/s/SphinxsDisciple.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.InspiredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class SphinxsDisciple extends CardImpl { public SphinxsDisciple(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SphinxsHerald.java b/Mage.Sets/src/mage/cards/s/SphinxsHerald.java index 3c0daa6e13..c0ec06c961 100644 --- a/Mage.Sets/src/mage/cards/s/SphinxsHerald.java +++ b/Mage.Sets/src/mage/cards/s/SphinxsHerald.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.common.FilterControlledCreaturePermanent; @@ -65,8 +66,8 @@ public class SphinxsHerald extends CardImpl { } public SphinxsHerald(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpiderClimb.java b/Mage.Sets/src/mage/cards/s/SpiderClimb.java index 23da0427d3..a86b65a9e6 100644 --- a/Mage.Sets/src/mage/cards/s/SpiderClimb.java +++ b/Mage.Sets/src/mage/cards/s/SpiderClimb.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class SpiderClimb extends CardImpl { public SpiderClimb(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // You may cast Spider Climb as though it had flash. If you cast it any time a sorcery couldn't have been cast, the controller of the permanent it becomes sacrifices it at the beginning of the next cleanup step. this.addAbility(new SimpleStaticAbility(Zone.ALL, new CastAsThoughItHadFlashSourceEffect(Duration.EndOfGame))); diff --git a/Mage.Sets/src/mage/cards/s/SpiderUmbra.java b/Mage.Sets/src/mage/cards/s/SpiderUmbra.java index 096d8c1e3e..92e635f6ad 100644 --- a/Mage.Sets/src/mage/cards/s/SpiderUmbra.java +++ b/Mage.Sets/src/mage/cards/s/SpiderUmbra.java @@ -50,7 +50,7 @@ public class SpiderUmbra extends CardImpl { public SpiderUmbra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/SpidersilkNet.java b/Mage.Sets/src/mage/cards/s/SpidersilkNet.java index 3090191a91..4face33151 100644 --- a/Mage.Sets/src/mage/cards/s/SpidersilkNet.java +++ b/Mage.Sets/src/mage/cards/s/SpidersilkNet.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class SpidersilkNet extends CardImpl { public SpidersilkNet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{0}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(0, 2))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ReachAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/s/SpiderwigBoggart.java b/Mage.Sets/src/mage/cards/s/SpiderwigBoggart.java index e69be868e6..254069d4dc 100644 --- a/Mage.Sets/src/mage/cards/s/SpiderwigBoggart.java +++ b/Mage.Sets/src/mage/cards/s/SpiderwigBoggart.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -47,8 +48,8 @@ public class SpiderwigBoggart extends CardImpl { public SpiderwigBoggart(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SpikeBreeder.java b/Mage.Sets/src/mage/cards/s/SpikeBreeder.java index c337ec0187..4772337f37 100644 --- a/Mage.Sets/src/mage/cards/s/SpikeBreeder.java +++ b/Mage.Sets/src/mage/cards/s/SpikeBreeder.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.permanent.token.SpikeToken; @@ -53,7 +54,7 @@ public class SpikeBreeder extends CardImpl { public SpikeBreeder(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); - this.subtype.add("Spike"); + this.subtype.add(SubType.SPIKE); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SpikeCannibal.java b/Mage.Sets/src/mage/cards/s/SpikeCannibal.java index bc2ed4fea1..876717e641 100644 --- a/Mage.Sets/src/mage/cards/s/SpikeCannibal.java +++ b/Mage.Sets/src/mage/cards/s/SpikeCannibal.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -52,13 +53,13 @@ import mage.game.permanent.Permanent; public class SpikeCannibal extends CardImpl { public SpikeCannibal(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Spike"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); + this.subtype.add(SubType.SPIKE); this.power = new MageInt(0); this.toughness = new MageInt(0); // Spike Cannibal enters the battlefield with a +1/+1 counter on it. - this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), "Spike Cannibal enters the battlefield with a +1/+1 counter on it")); + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), "with a +1/+1 counter on it")); // When Spike Cannibal enters the battlefield, move all +1/+1 counters from all creatures onto it. this.addAbility(new EntersBattlefieldTriggeredAbility(new SpikeCannibalEffect())); diff --git a/Mage.Sets/src/mage/cards/s/SpikeColony.java b/Mage.Sets/src/mage/cards/s/SpikeColony.java index e71efda2e1..3638d131c1 100644 --- a/Mage.Sets/src/mage/cards/s/SpikeColony.java +++ b/Mage.Sets/src/mage/cards/s/SpikeColony.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -51,7 +52,7 @@ public class SpikeColony extends CardImpl { public SpikeColony(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Spike"); + this.subtype.add(SubType.SPIKE); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SpikeDrone.java b/Mage.Sets/src/mage/cards/s/SpikeDrone.java index fd4aea8704..8fcf113313 100644 --- a/Mage.Sets/src/mage/cards/s/SpikeDrone.java +++ b/Mage.Sets/src/mage/cards/s/SpikeDrone.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -51,8 +52,8 @@ public class SpikeDrone extends CardImpl { public SpikeDrone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Spike"); - this.subtype.add("Drone"); + this.subtype.add(SubType.SPIKE); + this.subtype.add(SubType.DRONE); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SpikeFeeder.java b/Mage.Sets/src/mage/cards/s/SpikeFeeder.java index 83c0fbeabf..82441afa25 100644 --- a/Mage.Sets/src/mage/cards/s/SpikeFeeder.java +++ b/Mage.Sets/src/mage/cards/s/SpikeFeeder.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -52,7 +53,7 @@ public class SpikeFeeder extends CardImpl { public SpikeFeeder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Spike"); + this.subtype.add(SubType.SPIKE); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SpikeHatcher.java b/Mage.Sets/src/mage/cards/s/SpikeHatcher.java index c25ef0a19f..9db666734f 100644 --- a/Mage.Sets/src/mage/cards/s/SpikeHatcher.java +++ b/Mage.Sets/src/mage/cards/s/SpikeHatcher.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -52,7 +53,7 @@ public class SpikeHatcher extends CardImpl { public SpikeHatcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}"); - this.subtype.add("Spike"); + this.subtype.add(SubType.SPIKE); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SpikeJester.java b/Mage.Sets/src/mage/cards/s/SpikeJester.java index eac005e5ed..9bb9f4cf9b 100644 --- a/Mage.Sets/src/mage/cards/s/SpikeJester.java +++ b/Mage.Sets/src/mage/cards/s/SpikeJester.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class SpikeJester extends CardImpl { public SpikeJester(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpikeRogue.java b/Mage.Sets/src/mage/cards/s/SpikeRogue.java index acbc41da12..a27148a327 100644 --- a/Mage.Sets/src/mage/cards/s/SpikeRogue.java +++ b/Mage.Sets/src/mage/cards/s/SpikeRogue.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterControlledCreaturePermanent; @@ -53,23 +54,23 @@ import mage.target.common.TargetCreaturePermanent; public class SpikeRogue extends CardImpl { public SpikeRogue(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Spike"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + this.subtype.add(SubType.SPIKE); this.power = new MageInt(0); this.toughness = new MageInt(0); // Spike Rogue enters the battlefield with two +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)))); + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), "with two +1/+1 counters on it")); // {2}, Remove a +1/+1 counter from Spike Rogue: Put a +1/+1 counter on target creature. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new GenericManaCost(2)); ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); - + // {2}, Remove a +1/+1 counter from a creature you control: Put a +1/+1 counter on Spike Rogue. Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), new GenericManaCost(2)); - ability2.addCost(new RemoveCounterCost(new TargetControlledCreaturePermanent(1,1, new FilterControlledCreaturePermanent(), true), CounterType.P1P1)); + ability2.addCost(new RemoveCounterCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent(), true), CounterType.P1P1)); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/cards/s/SpikeSoldier.java b/Mage.Sets/src/mage/cards/s/SpikeSoldier.java index 834707b498..84bce2e9f8 100644 --- a/Mage.Sets/src/mage/cards/s/SpikeSoldier.java +++ b/Mage.Sets/src/mage/cards/s/SpikeSoldier.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -53,8 +54,8 @@ public class SpikeSoldier extends CardImpl { public SpikeSoldier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Spike"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SPIKE); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SpikeTailedCeratops.java b/Mage.Sets/src/mage/cards/s/SpikeTailedCeratops.java new file mode 100644 index 0000000000..40018bcccd --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SpikeTailedCeratops.java @@ -0,0 +1,66 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.combat.CanBlockAdditionalCreatureEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class SpikeTailedCeratops extends CardImpl { + + public SpikeTailedCeratops(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Spike-Tailed Ceratops can block an additional creature each combat. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAdditionalCreatureEffect(Duration.WhileOnBattlefield, 1))); + } + + public SpikeTailedCeratops(final SpikeTailedCeratops card) { + super(card); + } + + @Override + public SpikeTailedCeratops copy() { + return new SpikeTailedCeratops(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SpikeTiller.java b/Mage.Sets/src/mage/cards/s/SpikeTiller.java new file mode 100644 index 0000000000..f34e199014 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SpikeTiller.java @@ -0,0 +1,99 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.permanent.token.Token; +import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author L_J + */ +public class SpikeTiller extends CardImpl { + + public SpikeTiller(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); + this.subtype.add(SubType.SPIKE); + + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Spike Tiller enters the battlefield with three +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), "with three +1/+1 counters on it")); + + // {2}, Remove a +1/+1 counter from Spike Tiller: Put a +1/+1 counter on target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new GenericManaCost(2)); + ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // {2}, Remove a +1/+1 counter from Spike Tiller: Target land becomes a 2/2 creature that's still a land. Put a +1/+1 counter on it. + Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new SpikeTillerToken(), false, true, Duration.EndOfGame).setText("Target land becomes a 2/2 creature that's still a land. "), new GenericManaCost(2)); + ability2.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); + ability2.addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance()).setText("Put a +1/+1 counter on it.")); + ability2.addTarget(new TargetLandPermanent()); + this.addAbility(ability2); + } + + public SpikeTiller(final SpikeTiller card) { + super(card); + } + + @Override + public SpikeTiller copy() { + return new SpikeTiller(this); + } +} + +class SpikeTillerToken extends Token { + + public SpikeTillerToken() { + super("", "2/2 creature"); + cardType.add(CardType.CREATURE); + power = new MageInt(2); + toughness = new MageInt(2); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SpikeWeaver.java b/Mage.Sets/src/mage/cards/s/SpikeWeaver.java index 5293da151f..d30ff8cce9 100644 --- a/Mage.Sets/src/mage/cards/s/SpikeWeaver.java +++ b/Mage.Sets/src/mage/cards/s/SpikeWeaver.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -52,21 +53,21 @@ import mage.target.common.TargetCreaturePermanent; public class SpikeWeaver extends CardImpl { public SpikeWeaver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Spike"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.subtype.add(SubType.SPIKE); this.power = new MageInt(0); this.toughness = new MageInt(0); // Spike Weaver enters the battlefield with three +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)))); - + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), "with three +1/+1 counters on it")); + // {2}, Remove a +1/+1 counter from Spike Weaver: Put a +1/+1 counter on target creature. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new GenericManaCost(2)); ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); - + // {1}, Remove a +1/+1 counter from Spike Weaver: Prevent all combat damage that would be dealt this turn. Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true), new GenericManaCost(1)); ability2.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); diff --git a/Mage.Sets/src/mage/cards/s/SpikeWorker.java b/Mage.Sets/src/mage/cards/s/SpikeWorker.java index cb986a01e0..f2e83d5042 100644 --- a/Mage.Sets/src/mage/cards/s/SpikeWorker.java +++ b/Mage.Sets/src/mage/cards/s/SpikeWorker.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -51,7 +52,7 @@ public class SpikeWorker extends CardImpl { public SpikeWorker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Spike"); + this.subtype.add(SubType.SPIKE); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SpikedBaloth.java b/Mage.Sets/src/mage/cards/s/SpikedBaloth.java index f87173a2f5..da432c1a4e 100644 --- a/Mage.Sets/src/mage/cards/s/SpikedBaloth.java +++ b/Mage.Sets/src/mage/cards/s/SpikedBaloth.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SpikedBaloth extends CardImpl { public SpikedBaloth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SpikeshotElder.java b/Mage.Sets/src/mage/cards/s/SpikeshotElder.java index 78e9dfe3cf..e5ae655fa8 100644 --- a/Mage.Sets/src/mage/cards/s/SpikeshotElder.java +++ b/Mage.Sets/src/mage/cards/s/SpikeshotElder.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -52,8 +53,8 @@ public class SpikeshotElder extends CardImpl { public SpikeshotElder (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpikeshotGoblin.java b/Mage.Sets/src/mage/cards/s/SpikeshotGoblin.java index 3e8d84d170..5e4a258f1c 100644 --- a/Mage.Sets/src/mage/cards/s/SpikeshotGoblin.java +++ b/Mage.Sets/src/mage/cards/s/SpikeshotGoblin.java @@ -50,8 +50,8 @@ public class SpikeshotGoblin extends CardImpl { public SpikeshotGoblin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SpiketailDrake.java b/Mage.Sets/src/mage/cards/s/SpiketailDrake.java index 16e769fc61..7ff76f2c47 100644 --- a/Mage.Sets/src/mage/cards/s/SpiketailDrake.java +++ b/Mage.Sets/src/mage/cards/s/SpiketailDrake.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetSpell; @@ -49,7 +50,7 @@ public class SpiketailDrake extends CardImpl { public SpiketailDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SpiketailDrakeling.java b/Mage.Sets/src/mage/cards/s/SpiketailDrakeling.java index fda565b175..5b3049db4e 100644 --- a/Mage.Sets/src/mage/cards/s/SpiketailDrakeling.java +++ b/Mage.Sets/src/mage/cards/s/SpiketailDrakeling.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetSpell; @@ -50,7 +51,7 @@ public class SpiketailDrakeling extends CardImpl { public SpiketailDrakeling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SpiketailHatchling.java b/Mage.Sets/src/mage/cards/s/SpiketailHatchling.java index 8a9653a829..3842081f15 100644 --- a/Mage.Sets/src/mage/cards/s/SpiketailHatchling.java +++ b/Mage.Sets/src/mage/cards/s/SpiketailHatchling.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetSpell; @@ -49,7 +50,7 @@ public class SpiketailHatchling extends CardImpl { public SpiketailHatchling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpinEngine.java b/Mage.Sets/src/mage/cards/s/SpinEngine.java index a0106a7834..7c18091538 100644 --- a/Mage.Sets/src/mage/cards/s/SpinEngine.java +++ b/Mage.Sets/src/mage/cards/s/SpinEngine.java @@ -36,6 +36,7 @@ import mage.abilities.effects.RestrictionEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -50,7 +51,7 @@ public class SpinEngine extends CardImpl { public SpinEngine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpinalEmbrace.java b/Mage.Sets/src/mage/cards/s/SpinalEmbrace.java index bb1977c5a4..2b708e2376 100644 --- a/Mage.Sets/src/mage/cards/s/SpinalEmbrace.java +++ b/Mage.Sets/src/mage/cards/s/SpinalEmbrace.java @@ -66,7 +66,7 @@ public class SpinalEmbrace extends CardImpl { } public SpinalEmbrace(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{U}{U}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}{U}{B}"); // Cast Spinal Embrace only during combat. this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(TurnPhase.COMBAT)); @@ -77,7 +77,7 @@ public class SpinalEmbrace extends CardImpl { Effect effect = new GainControlTargetEffect(Duration.EndOfTurn); effect.setText("and gain control of it"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("It gains haste until end of turn")); this.getSpellAbility().addEffect(new SpinalEmbraceAddDelayedEffect()); } diff --git a/Mage.Sets/src/mage/cards/s/SpinalGraft.java b/Mage.Sets/src/mage/cards/s/SpinalGraft.java index cf701d60ac..c5af721725 100644 --- a/Mage.Sets/src/mage/cards/s/SpinalGraft.java +++ b/Mage.Sets/src/mage/cards/s/SpinalGraft.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class SpinalGraft extends CardImpl { public SpinalGraft(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SpinalParasite.java b/Mage.Sets/src/mage/cards/s/SpinalParasite.java index bc24ccd0ee..ea5727ce88 100644 --- a/Mage.Sets/src/mage/cards/s/SpinalParasite.java +++ b/Mage.Sets/src/mage/cards/s/SpinalParasite.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.SunburstAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.TargetPermanent; @@ -49,7 +50,7 @@ public class SpinalParasite extends CardImpl { public SpinalParasite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(-1); this.toughness = new MageInt(-1); diff --git a/Mage.Sets/src/mage/cards/s/SpinalVillain.java b/Mage.Sets/src/mage/cards/s/SpinalVillain.java index 07540961b0..671a9aeb1a 100644 --- a/Mage.Sets/src/mage/cards/s/SpinalVillain.java +++ b/Mage.Sets/src/mage/cards/s/SpinalVillain.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -56,7 +57,7 @@ public class SpinalVillain extends CardImpl { public SpinalVillain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Spincrusher.java b/Mage.Sets/src/mage/cards/s/Spincrusher.java index 0349fc8b54..bd8a280cbc 100644 --- a/Mage.Sets/src/mage/cards/s/Spincrusher.java +++ b/Mage.Sets/src/mage/cards/s/Spincrusher.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -49,7 +50,7 @@ public class Spincrusher extends CardImpl { public Spincrusher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SpindriftDrake.java b/Mage.Sets/src/mage/cards/s/SpindriftDrake.java index a6287f22a4..f41e1d8a52 100644 --- a/Mage.Sets/src/mage/cards/s/SpindriftDrake.java +++ b/Mage.Sets/src/mage/cards/s/SpindriftDrake.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -46,7 +47,7 @@ public class SpindriftDrake extends CardImpl { public SpindriftDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Spinebiter.java b/Mage.Sets/src/mage/cards/s/Spinebiter.java index ec8f37ce14..ff0b074189 100644 --- a/Mage.Sets/src/mage/cards/s/Spinebiter.java +++ b/Mage.Sets/src/mage/cards/s/Spinebiter.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class Spinebiter extends CardImpl { public Spinebiter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SpinedBasher.java b/Mage.Sets/src/mage/cards/s/SpinedBasher.java index f014e9ade9..876085899b 100644 --- a/Mage.Sets/src/mage/cards/s/SpinedBasher.java +++ b/Mage.Sets/src/mage/cards/s/SpinedBasher.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SpinedBasher extends CardImpl { public SpinedBasher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Beast"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpinedFluke.java b/Mage.Sets/src/mage/cards/s/SpinedFluke.java index c8c737172c..027c0f800e 100644 --- a/Mage.Sets/src/mage/cards/s/SpinedFluke.java +++ b/Mage.Sets/src/mage/cards/s/SpinedFluke.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.SacrificeControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -49,8 +50,8 @@ public class SpinedFluke extends CardImpl { public SpinedFluke(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Worm"); - this.subtype.add("Horror"); + this.subtype.add(SubType.WORM); + this.subtype.add(SubType.HORROR); this.power = new MageInt(5); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpinedSliver.java b/Mage.Sets/src/mage/cards/s/SpinedSliver.java index 9b34e7b5d0..4de02f2bda 100644 --- a/Mage.Sets/src/mage/cards/s/SpinedSliver.java +++ b/Mage.Sets/src/mage/cards/s/SpinedSliver.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; import mage.game.Game; @@ -50,7 +51,7 @@ public class SpinedSliver extends CardImpl { public SpinedSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{G}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SpinedThopter.java b/Mage.Sets/src/mage/cards/s/SpinedThopter.java index 7fb1415e9e..393642d282 100644 --- a/Mage.Sets/src/mage/cards/s/SpinedThopter.java +++ b/Mage.Sets/src/mage/cards/s/SpinedThopter.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SpinedThopter extends CardImpl { public SpinedThopter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{U/P}"); - this.subtype.add("Thopter"); + this.subtype.add(SubType.THOPTER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpinedWurm.java b/Mage.Sets/src/mage/cards/s/SpinedWurm.java index 605e0c582b..fcd4158023 100644 --- a/Mage.Sets/src/mage/cards/s/SpinedWurm.java +++ b/Mage.Sets/src/mage/cards/s/SpinedWurm.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SpinedWurm extends CardImpl { public SpinedWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SpinelessThug.java b/Mage.Sets/src/mage/cards/s/SpinelessThug.java index 767b4fa473..1bff53f070 100644 --- a/Mage.Sets/src/mage/cards/s/SpinelessThug.java +++ b/Mage.Sets/src/mage/cards/s/SpinelessThug.java @@ -33,6 +33,7 @@ import mage.abilities.common.CantBlockAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class SpinelessThug extends CardImpl { public SpinelessThug(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SpinneretSliver.java b/Mage.Sets/src/mage/cards/s/SpinneretSliver.java index 7523c01a54..894e0a03cd 100644 --- a/Mage.Sets/src/mage/cards/s/SpinneretSliver.java +++ b/Mage.Sets/src/mage/cards/s/SpinneretSliver.java @@ -55,7 +55,7 @@ public class SpinneretSliver extends CardImpl { public SpinneretSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SpiralingDuelist.java b/Mage.Sets/src/mage/cards/s/SpiralingDuelist.java index 8ce230dd01..67bab39e81 100644 --- a/Mage.Sets/src/mage/cards/s/SpiralingDuelist.java +++ b/Mage.Sets/src/mage/cards/s/SpiralingDuelist.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class SpiralingDuelist extends CardImpl { public SpiralingDuelist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpiralingEmbers.java b/Mage.Sets/src/mage/cards/s/SpiralingEmbers.java index c0538a4878..64795d497a 100644 --- a/Mage.Sets/src/mage/cards/s/SpiralingEmbers.java +++ b/Mage.Sets/src/mage/cards/s/SpiralingEmbers.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; /** @@ -44,7 +45,7 @@ public class SpiralingEmbers extends CardImpl { public SpiralingEmbers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Spiraling Embers deals damage to target creature or player equal to the number of cards in your hand. diff --git a/Mage.Sets/src/mage/cards/s/SpireGolem.java b/Mage.Sets/src/mage/cards/s/SpireGolem.java index 23a2d9c54e..7a91ed64ad 100644 --- a/Mage.Sets/src/mage/cards/s/SpireGolem.java +++ b/Mage.Sets/src/mage/cards/s/SpireGolem.java @@ -44,7 +44,7 @@ public class SpireGolem extends CardImpl { public SpireGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SpireMonitor.java b/Mage.Sets/src/mage/cards/s/SpireMonitor.java index 4cfd353342..0107dc32fd 100644 --- a/Mage.Sets/src/mage/cards/s/SpireMonitor.java +++ b/Mage.Sets/src/mage/cards/s/SpireMonitor.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SpireMonitor extends CardImpl { public SpireMonitor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SpireOwl.java b/Mage.Sets/src/mage/cards/s/SpireOwl.java index 5046402847..e639fa4d1b 100644 --- a/Mage.Sets/src/mage/cards/s/SpireOwl.java +++ b/Mage.Sets/src/mage/cards/s/SpireOwl.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class SpireOwl extends CardImpl { public SpireOwl(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpirePatrol.java b/Mage.Sets/src/mage/cards/s/SpirePatrol.java index f61f3fc9c2..dd2b7ba0bf 100644 --- a/Mage.Sets/src/mage/cards/s/SpirePatrol.java +++ b/Mage.Sets/src/mage/cards/s/SpirePatrol.java @@ -1,74 +1,75 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; -import mage.abilities.effects.common.TapTargetEffect; -import mage.abilities.keyword.FlyingAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.target.common.TargetOpponentsCreaturePermanent; - -/** - * - * @author Styxo - */ -public class SpirePatrol extends CardImpl { - - public SpirePatrol(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{U}"); - - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.power = new MageInt(3); - this.toughness = new MageInt(2); - - // Flying - this.addAbility(FlyingAbility.getInstance()); - - // When Spire Patrol enters the battlefield, tap target creature an opponent controls. That creature does not untap during its controller's untap step. - Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect()); - ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect("That creature")); - ability.addTarget(new TargetOpponentsCreaturePermanent()); - this.addAbility(ability); - } - - public SpirePatrol(final SpirePatrol card) { - super(card); - } - - @Override - public SpirePatrol copy() { - return new SpirePatrol(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.target.common.TargetOpponentsCreaturePermanent; + +/** + * + * @author Styxo + */ +public class SpirePatrol extends CardImpl { + + public SpirePatrol(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Spire Patrol enters the battlefield, tap target creature an opponent controls. That creature does not untap during its controller's untap step. + Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect()); + ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect("That creature")); + ability.addTarget(new TargetOpponentsCreaturePermanent()); + this.addAbility(ability); + } + + public SpirePatrol(final SpirePatrol card) { + super(card); + } + + @Override + public SpirePatrol copy() { + return new SpirePatrol(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SpireSerpent.java b/Mage.Sets/src/mage/cards/s/SpireSerpent.java index b9629bc1e9..a695bbb7e2 100644 --- a/Mage.Sets/src/mage/cards/s/SpireSerpent.java +++ b/Mage.Sets/src/mage/cards/s/SpireSerpent.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class SpireSerpent extends CardImpl { public SpireSerpent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.color.setBlue(true); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SpireTracer.java b/Mage.Sets/src/mage/cards/s/SpireTracer.java index 8ff2403dbd..8c36e4d18c 100644 --- a/Mage.Sets/src/mage/cards/s/SpireTracer.java +++ b/Mage.Sets/src/mage/cards/s/SpireTracer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -50,8 +51,8 @@ public class SpireTracer extends CardImpl { public SpireTracer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpirebluffCanal.java b/Mage.Sets/src/mage/cards/s/SpirebluffCanal.java index 747942c5e9..696b327562 100644 --- a/Mage.Sets/src/mage/cards/s/SpirebluffCanal.java +++ b/Mage.Sets/src/mage/cards/s/SpirebluffCanal.java @@ -49,11 +49,11 @@ import mage.filter.StaticFilters; public class SpirebluffCanal extends CardImpl { public SpirebluffCanal(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},""); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); // Spirebluff Canal enters the battlefield tapped unless you control two or fewer other lands. Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3)); - String abilityText = "tapped unless you control fewer than 3 lands"; + String abilityText = " tapped unless you control two or fewer other lands"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); // {T}: Add {U} or {R} to your mana pool. diff --git a/Mage.Sets/src/mage/cards/s/SpiresOfOrazca.java b/Mage.Sets/src/mage/cards/s/SpiresOfOrazca.java new file mode 100644 index 0000000000..a26d61a122 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SpiresOfOrazca.java @@ -0,0 +1,87 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.RemoveFromCombatTargetEffect; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AttackingPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class SpiresOfOrazca extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("attacking creature an opponent controls"); + + static { + filter.add(new AttackingPredicate()); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public SpiresOfOrazca(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + this.nightCard = true; + + // {T}: Add {C} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {T}: Untap target attacking creature an opponent controls and remove it from combat. + Effect effect = new UntapTargetEffect(); + effect.setText("Untap target attacking creature an opponent controls and remove it from combat."); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); + effect = new RemoveFromCombatTargetEffect(); + effect.setText(" "); + ability.addEffect(effect); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public SpiresOfOrazca(final SpiresOfOrazca card) { + super(card); + } + + @Override + public SpiresOfOrazca copy() { + return new SpiresOfOrazca(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SpiresideInfiltrator.java b/Mage.Sets/src/mage/cards/s/SpiresideInfiltrator.java index 8820d05cde..fcbc8eee43 100644 --- a/Mage.Sets/src/mage/cards/s/SpiresideInfiltrator.java +++ b/Mage.Sets/src/mage/cards/s/SpiresideInfiltrator.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamagePlayersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -44,8 +45,8 @@ public class SpiresideInfiltrator extends CardImpl { public SpiresideInfiltrator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Spirespine.java b/Mage.Sets/src/mage/cards/s/Spirespine.java index e26d2d06eb..84e2e02ffd 100644 --- a/Mage.Sets/src/mage/cards/s/Spirespine.java +++ b/Mage.Sets/src/mage/cards/s/Spirespine.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ import mage.constants.Zone; public class Spirespine extends CardImpl { public Spirespine(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{G}"); - this.subtype.add("Beast"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{G}"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(1); @@ -60,12 +61,12 @@ public class Spirespine extends CardImpl { this.addAbility(new BestowAbility(this, "{4}{G}")); // Spirespine blocks each turn if able. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BlocksIfAbleSourceEffect(Duration.WhileOnBattlefield))); - // Enchanted creature gets +4/+1 and blocks each turn if able. - Effect effect = new BoostEnchantedEffect(4,1, Duration.WhileOnBattlefield); + // Enchanted creature gets +4/+1 and blocks each combat if able. + Effect effect = new BoostEnchantedEffect(4, 1, Duration.WhileOnBattlefield); effect.setText("Enchanted creature gets +4/+1"); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); effect = new BlocksIfAbleAttachedEffect(Duration.WhileOnBattlefield, AttachmentType.AURA); - effect.setText("and blocks each turn if able"); + effect.setText("and blocks each combat if able"); ability.addEffect(effect); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SpiritAway.java b/Mage.Sets/src/mage/cards/s/SpiritAway.java index 1b8bd284a4..ccb3c21da0 100644 --- a/Mage.Sets/src/mage/cards/s/SpiritAway.java +++ b/Mage.Sets/src/mage/cards/s/SpiritAway.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class SpiritAway extends CardImpl { public SpiritAway(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{5}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/SpiritEnDal.java b/Mage.Sets/src/mage/cards/s/SpiritEnDal.java index 5cd0e28b74..859924c059 100644 --- a/Mage.Sets/src/mage/cards/s/SpiritEnDal.java +++ b/Mage.Sets/src/mage/cards/s/SpiritEnDal.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class SpiritEnDal extends CardImpl { public SpiritEnDal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpiritEnKor.java b/Mage.Sets/src/mage/cards/s/SpiritEnKor.java index 04350bf7e3..4a2b64c369 100644 --- a/Mage.Sets/src/mage/cards/s/SpiritEnKor.java +++ b/Mage.Sets/src/mage/cards/s/SpiritEnKor.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -49,8 +50,8 @@ public class SpiritEnKor extends CardImpl { public SpiritEnKor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SpiritLink.java b/Mage.Sets/src/mage/cards/s/SpiritLink.java index 731b82cde9..1ba39c70a0 100644 --- a/Mage.Sets/src/mage/cards/s/SpiritLink.java +++ b/Mage.Sets/src/mage/cards/s/SpiritLink.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -50,7 +51,7 @@ public class SpiritLink extends CardImpl { public SpiritLink(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SpiritLoop.java b/Mage.Sets/src/mage/cards/s/SpiritLoop.java index 1295f35f26..41d3bb6e4e 100644 --- a/Mage.Sets/src/mage/cards/s/SpiritLoop.java +++ b/Mage.Sets/src/mage/cards/s/SpiritLoop.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class SpiritLoop extends CardImpl { public SpiritLoop(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature you control TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SpiritMantle.java b/Mage.Sets/src/mage/cards/s/SpiritMantle.java index e14aa9ea75..abb9ce1c93 100644 --- a/Mage.Sets/src/mage/cards/s/SpiritMantle.java +++ b/Mage.Sets/src/mage/cards/s/SpiritMantle.java @@ -49,7 +49,7 @@ public class SpiritMantle extends CardImpl { public SpiritMantle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/SpiritOfTheHearth.java b/Mage.Sets/src/mage/cards/s/SpiritOfTheHearth.java index e9e6984270..da8a22a157 100644 --- a/Mage.Sets/src/mage/cards/s/SpiritOfTheHearth.java +++ b/Mage.Sets/src/mage/cards/s/SpiritOfTheHearth.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class SpiritOfTheHearth extends CardImpl { public SpiritOfTheHearth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SpiritOfTheHunt.java b/Mage.Sets/src/mage/cards/s/SpiritOfTheHunt.java index d050ed2ce1..669c5d197d 100644 --- a/Mage.Sets/src/mage/cards/s/SpiritOfTheHunt.java +++ b/Mage.Sets/src/mage/cards/s/SpiritOfTheHunt.java @@ -57,8 +57,8 @@ public class SpiritOfTheHunt extends CardImpl { public SpiritOfTheHunt(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Wolf"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.WOLF); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SpiritOfTheLabyrinth.java b/Mage.Sets/src/mage/cards/s/SpiritOfTheLabyrinth.java index 0929831521..f619e4d2c1 100644 --- a/Mage.Sets/src/mage/cards/s/SpiritOfTheLabyrinth.java +++ b/Mage.Sets/src/mage/cards/s/SpiritOfTheLabyrinth.java @@ -51,7 +51,7 @@ public class SpiritOfTheLabyrinth extends CardImpl { public SpiritOfTheLabyrinth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpiritOfTheNight.java b/Mage.Sets/src/mage/cards/s/SpiritOfTheNight.java index 6c25b46ddc..a6a338ee70 100644 --- a/Mage.Sets/src/mage/cards/s/SpiritOfTheNight.java +++ b/Mage.Sets/src/mage/cards/s/SpiritOfTheNight.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.*; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class SpiritOfTheNight extends CardImpl { public SpiritOfTheNight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{B}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Demon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DEMON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SpiritShackle.java b/Mage.Sets/src/mage/cards/s/SpiritShackle.java index 8b9537e1f0..b47d8e4f19 100644 --- a/Mage.Sets/src/mage/cards/s/SpiritShackle.java +++ b/Mage.Sets/src/mage/cards/s/SpiritShackle.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.BoostCounter; import mage.target.TargetPermanent; @@ -50,7 +51,7 @@ public class SpiritShackle extends CardImpl { public SpiritShackle(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SpiritWeaver.java b/Mage.Sets/src/mage/cards/s/SpiritWeaver.java index 9d14652404..294c9e4793 100644 --- a/Mage.Sets/src/mage/cards/s/SpiritWeaver.java +++ b/Mage.Sets/src/mage/cards/s/SpiritWeaver.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -60,8 +61,8 @@ public class SpiritWeaver extends CardImpl { public SpiritWeaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Spiritmonger.java b/Mage.Sets/src/mage/cards/s/Spiritmonger.java index 1844556f9e..7f280ee5c0 100644 --- a/Mage.Sets/src/mage/cards/s/Spiritmonger.java +++ b/Mage.Sets/src/mage/cards/s/Spiritmonger.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -50,7 +51,7 @@ public class Spiritmonger extends CardImpl { public Spiritmonger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SpiritualAsylum.java b/Mage.Sets/src/mage/cards/s/SpiritualAsylum.java new file mode 100644 index 0000000000..927439e493 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SpiritualAsylum.java @@ -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.cards.s; + +import java.util.UUID; +import mage.abilities.common.AttacksCreatureYouControlTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.ShroudAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author TheElk801 + */ +public class SpiritualAsylum extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Creatures and lands you control"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.CREATURE), + new CardTypePredicate(CardType.LAND) + )); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public SpiritualAsylum(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); + + // Creatures and lands you control have shroud. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(ShroudAbility.getInstance(), + Duration.WhileOnBattlefield, filter))); + + // When a creature you control attacks, sacrifice Spiritual Asylum. + AttacksCreatureYouControlTriggeredAbility ability = new AttacksCreatureYouControlTriggeredAbility(new SacrificeSourceEffect()); + ability.setOnce(true); + this.addAbility(ability); + } + + public SpiritualAsylum(final SpiritualAsylum card) { + super(card); + } + + @Override + public SpiritualAsylum copy() { + return new SpiritualAsylum(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SpiritualGuardian.java b/Mage.Sets/src/mage/cards/s/SpiritualGuardian.java index 1a41aa844f..74042d99ae 100644 --- a/Mage.Sets/src/mage/cards/s/SpiritualGuardian.java +++ b/Mage.Sets/src/mage/cards/s/SpiritualGuardian.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SpiritualGuardian extends CardImpl { public SpiritualGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/Spitebellows.java b/Mage.Sets/src/mage/cards/s/Spitebellows.java index 279ead9d9b..b33d496150 100644 --- a/Mage.Sets/src/mage/cards/s/Spitebellows.java +++ b/Mage.Sets/src/mage/cards/s/Spitebellows.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -46,7 +47,7 @@ public class Spitebellows extends CardImpl { public Spitebellows(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpiteflameWitch.java b/Mage.Sets/src/mage/cards/s/SpiteflameWitch.java index 86eedef2c7..bef893f41d 100644 --- a/Mage.Sets/src/mage/cards/s/SpiteflameWitch.java +++ b/Mage.Sets/src/mage/cards/s/SpiteflameWitch.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.LoseLifeAllPlayersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class SpiteflameWitch extends CardImpl { public SpiteflameWitch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B/R}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpitefulBully.java b/Mage.Sets/src/mage/cards/s/SpitefulBully.java new file mode 100644 index 0000000000..9b351792f8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SpitefulBully.java @@ -0,0 +1,70 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class SpitefulBully extends CardImpl { + + public SpitefulBully(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.MERCENARY); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // At the beginning of your upkeep, Spiteful Bully deals 3 damage to target creature you control. + Ability ability = new BeginningOfUpkeepTriggeredAbility(new DamageTargetEffect(3), TargetController.YOU, false); + ability.addTarget(new TargetControlledCreaturePermanent()); + this.addAbility(ability); + } + + public SpitefulBully(final SpitefulBully card) { + super(card); + } + + @Override + public SpitefulBully copy() { + return new SpitefulBully(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SpitefulMotives.java b/Mage.Sets/src/mage/cards/s/SpitefulMotives.java index 91b6f14a15..a8961964f1 100644 --- a/Mage.Sets/src/mage/cards/s/SpitefulMotives.java +++ b/Mage.Sets/src/mage/cards/s/SpitefulMotives.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class SpitefulMotives extends CardImpl { public SpitefulMotives(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/s/SpitefulReturned.java b/Mage.Sets/src/mage/cards/s/SpitefulReturned.java index cd2e497e19..f008c8a93a 100644 --- a/Mage.Sets/src/mage/cards/s/SpitefulReturned.java +++ b/Mage.Sets/src/mage/cards/s/SpitefulReturned.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.BestowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -54,7 +55,7 @@ public class SpitefulReturned extends CardImpl { public SpitefulReturned(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpitefulShadows.java b/Mage.Sets/src/mage/cards/s/SpitefulShadows.java index 80021aeda5..6ff7d03d66 100644 --- a/Mage.Sets/src/mage/cards/s/SpitefulShadows.java +++ b/Mage.Sets/src/mage/cards/s/SpitefulShadows.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class SpitefulShadows extends CardImpl { public SpitefulShadows(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/Spitemare.java b/Mage.Sets/src/mage/cards/s/Spitemare.java index 8ffb7cf808..7940ac1172 100644 --- a/Mage.Sets/src/mage/cards/s/Spitemare.java +++ b/Mage.Sets/src/mage/cards/s/Spitemare.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -52,7 +53,7 @@ public class Spitemare extends CardImpl { public Spitemare(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R/W}{R/W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SpitfireBastion.java b/Mage.Sets/src/mage/cards/s/SpitfireBastion.java new file mode 100644 index 0000000000..5de16e5abe --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SpitfireBastion.java @@ -0,0 +1,74 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.mana.RedManaAbility; +import mage.constants.SuperType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author TheElk801 + */ +public class SpitfireBastion extends CardImpl { + + public SpitfireBastion(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + this.addSuperType(SuperType.LEGENDARY); + this.nightCard = true; + + // {T}: Add {R} to your mana pool. + this.addAbility(new RedManaAbility()); + + // {2}{R}, {T}: Spitfire Bastion deals 3 damage to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new TapSourceCost()); + ability.addCost(new ManaCostsImpl("{2}{R}")); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public SpitfireBastion(final SpitfireBastion card) { + super(card); + } + + @Override + public SpitfireBastion copy() { + return new SpitfireBastion(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SpitfireHandler.java b/Mage.Sets/src/mage/cards/s/SpitfireHandler.java new file mode 100644 index 0000000000..617161203a --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SpitfireHandler.java @@ -0,0 +1,103 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ColoredManaCost; +import mage.abilities.effects.RestrictionEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author TheElk801 + */ +public class SpitfireHandler extends CardImpl { + + public SpitfireHandler(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + + this.subtype.add(SubType.GOBLIN); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Spitfire Handler can't block creatures with power greater than Spitfire Handler's power. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpitfireHandlerCantBlockEffect())); + + // {R}: Spitfire Handler gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.R))); + } + + public SpitfireHandler(final SpitfireHandler card) { + super(card); + } + + @Override + public SpitfireHandler copy() { + return new SpitfireHandler(this); + } +} + +class SpitfireHandlerCantBlockEffect extends RestrictionEffect { + + public SpitfireHandlerCantBlockEffect() { + super(Duration.WhileOnBattlefield); + staticText = "{this} can't block creatures with power greater than {this}'s power"; + } + + public SpitfireHandlerCantBlockEffect(final SpitfireHandlerCantBlockEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return permanent.getId().equals(source.getSourceId()); + } + + @Override + public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { + return (blocker.getPower().getValue() >= attacker.getPower().getValue()); + } + + @Override + public SpitfireHandlerCantBlockEffect copy() { + return new SpitfireHandlerCantBlockEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SpittingDrake.java b/Mage.Sets/src/mage/cards/s/SpittingDrake.java index 3a5a48ee40..10a81a313f 100644 --- a/Mage.Sets/src/mage/cards/s/SpittingDrake.java +++ b/Mage.Sets/src/mage/cards/s/SpittingDrake.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class SpittingDrake extends CardImpl { public SpittingDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SpittingGourna.java b/Mage.Sets/src/mage/cards/s/SpittingGourna.java index 51714e02fe..d0b3756728 100644 --- a/Mage.Sets/src/mage/cards/s/SpittingGourna.java +++ b/Mage.Sets/src/mage/cards/s/SpittingGourna.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class SpittingGourna extends CardImpl { public SpittingGourna(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SpittingHydra.java b/Mage.Sets/src/mage/cards/s/SpittingHydra.java index 80b609b74f..2d6f4c098e 100644 --- a/Mage.Sets/src/mage/cards/s/SpittingHydra.java +++ b/Mage.Sets/src/mage/cards/s/SpittingHydra.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -52,7 +53,7 @@ public class SpittingHydra extends CardImpl { public SpittingHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SpittingImage.java b/Mage.Sets/src/mage/cards/s/SpittingImage.java index 735419229c..b1209264be 100644 --- a/Mage.Sets/src/mage/cards/s/SpittingImage.java +++ b/Mage.Sets/src/mage/cards/s/SpittingImage.java @@ -30,7 +30,7 @@ package mage.cards.s; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.keyword.RetraceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -54,7 +54,7 @@ public class SpittingImage extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{G/U}{G/U}"); // Create a token that's a copy of target creature. - this.getSpellAbility().addEffect(new PutTokenOntoBattlefieldCopyTargetEffect()); + this.getSpellAbility().addEffect(new CreateTokenCopyTargetEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); // Retrace (You may cast this card from your graveyard by discarding a land card in addition to paying its other costs.) diff --git a/Mage.Sets/src/mage/cards/s/SpittingSliver.java b/Mage.Sets/src/mage/cards/s/SpittingSliver.java index 4991ab4abc..68b1d230d4 100644 --- a/Mage.Sets/src/mage/cards/s/SpittingSliver.java +++ b/Mage.Sets/src/mage/cards/s/SpittingSliver.java @@ -55,7 +55,7 @@ public class SpittingSliver extends CardImpl { public SpittingSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SpittingSpider.java b/Mage.Sets/src/mage/cards/s/SpittingSpider.java index 6c86329bb1..6d086337eb 100644 --- a/Mage.Sets/src/mage/cards/s/SpittingSpider.java +++ b/Mage.Sets/src/mage/cards/s/SpittingSpider.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterCreaturePermanent; @@ -55,7 +56,7 @@ public class SpittingSpider extends CardImpl { } public SpittingSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SplatterThug.java b/Mage.Sets/src/mage/cards/s/SplatterThug.java index c2feffa406..1b2bc8eba3 100644 --- a/Mage.Sets/src/mage/cards/s/SplatterThug.java +++ b/Mage.Sets/src/mage/cards/s/SplatterThug.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.UnleashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SplatterThug extends CardImpl { public SplatterThug(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SplinterTwin.java b/Mage.Sets/src/mage/cards/s/SplinterTwin.java index 36a0e5fe35..db8d537e08 100644 --- a/Mage.Sets/src/mage/cards/s/SplinterTwin.java +++ b/Mage.Sets/src/mage/cards/s/SplinterTwin.java @@ -37,13 +37,14 @@ import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -60,7 +61,7 @@ public class SplinterTwin extends CardImpl { public SplinterTwin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); @@ -103,7 +104,7 @@ class SplinterTwinEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (permanent != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, true); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), null, true); effect.setTargetPointer(new FixedTarget(permanent, game)); effect.apply(game, source); for (Permanent addedToken : effect.getAddedPermanent()) { diff --git a/Mage.Sets/src/mage/cards/s/Splinterfright.java b/Mage.Sets/src/mage/cards/s/Splinterfright.java index ce92f96bc2..984d649eb5 100644 --- a/Mage.Sets/src/mage/cards/s/Splinterfright.java +++ b/Mage.Sets/src/mage/cards/s/Splinterfright.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -51,7 +52,7 @@ public class Splinterfright extends CardImpl { public Splinterfright(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SplitTailMiko.java b/Mage.Sets/src/mage/cards/s/SplitTailMiko.java index d523bd4377..2308d168d3 100644 --- a/Mage.Sets/src/mage/cards/s/SplitTailMiko.java +++ b/Mage.Sets/src/mage/cards/s/SplitTailMiko.java @@ -47,8 +47,8 @@ public class SplitTailMiko extends CardImpl { public SplitTailMiko(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Fox"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.FOX); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SplittingSlime.java b/Mage.Sets/src/mage/cards/s/SplittingSlime.java index 6322473028..a41bb37898 100644 --- a/Mage.Sets/src/mage/cards/s/SplittingSlime.java +++ b/Mage.Sets/src/mage/cards/s/SplittingSlime.java @@ -30,11 +30,12 @@ package mage.cards.s; import java.util.UUID; import mage.MageInt; import mage.abilities.common.BecomesMonstrousSourceTriggeredAbility; -import mage.abilities.effects.PutTokenOntoBattlefieldCopySourceEffect; +import mage.abilities.effects.CreateTokenCopySourceEffect; import mage.abilities.keyword.MonstrosityAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class SplittingSlime extends CardImpl { public SplittingSlime(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Ooze"); + this.subtype.add(SubType.OOZE); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -52,7 +53,7 @@ public class SplittingSlime extends CardImpl { this.addAbility(new MonstrosityAbility("{4}{G}{G}", 3)); // When Splitting Slime becomes monstrous, create a token that's a copy of Splitting Slime. - this.addAbility(new BecomesMonstrousSourceTriggeredAbility(new PutTokenOntoBattlefieldCopySourceEffect())); + this.addAbility(new BecomesMonstrousSourceTriggeredAbility(new CreateTokenCopySourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/s/SpontaneousArtist.java b/Mage.Sets/src/mage/cards/s/SpontaneousArtist.java index d55b6210bc..ebe53a10fa 100644 --- a/Mage.Sets/src/mage/cards/s/SpontaneousArtist.java +++ b/Mage.Sets/src/mage/cards/s/SpontaneousArtist.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -51,8 +52,8 @@ public class SpontaneousArtist extends CardImpl { public SpontaneousArtist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SpontaneousMutation.java b/Mage.Sets/src/mage/cards/s/SpontaneousMutation.java index b0bba0f424..db030f76a6 100644 --- a/Mage.Sets/src/mage/cards/s/SpontaneousMutation.java +++ b/Mage.Sets/src/mage/cards/s/SpontaneousMutation.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -54,7 +55,7 @@ public class SpontaneousMutation extends CardImpl { public SpontaneousMutation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/s/SporeFlower.java b/Mage.Sets/src/mage/cards/s/SporeFlower.java index c2cec450c6..b0625d1804 100644 --- a/Mage.Sets/src/mage/cards/s/SporeFlower.java +++ b/Mage.Sets/src/mage/cards/s/SporeFlower.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class SporeFlower extends CardImpl { public SporeFlower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SporeFrog.java b/Mage.Sets/src/mage/cards/s/SporeFrog.java index bd39e3ed88..f911d8c7a3 100644 --- a/Mage.Sets/src/mage/cards/s/SporeFrog.java +++ b/Mage.Sets/src/mage/cards/s/SporeFrog.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class SporeFrog extends CardImpl { public SporeFrog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Frog"); + this.subtype.add(SubType.FROG); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SporebackTroll.java b/Mage.Sets/src/mage/cards/s/SporebackTroll.java index 5cab3a4d5c..1a5a2cff9c 100644 --- a/Mage.Sets/src/mage/cards/s/SporebackTroll.java +++ b/Mage.Sets/src/mage/cards/s/SporebackTroll.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.GraftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -56,8 +57,8 @@ public class SporebackTroll extends CardImpl { public SporebackTroll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Troll"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.TROLL); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SporecapSpider.java b/Mage.Sets/src/mage/cards/s/SporecapSpider.java index df12b47d19..a521c847bf 100644 --- a/Mage.Sets/src/mage/cards/s/SporecapSpider.java +++ b/Mage.Sets/src/mage/cards/s/SporecapSpider.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SporecapSpider extends CardImpl { public SporecapSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/Sporemound.java b/Mage.Sets/src/mage/cards/s/Sporemound.java index b8de362abf..6d54f52cc5 100644 --- a/Mage.Sets/src/mage/cards/s/Sporemound.java +++ b/Mage.Sets/src/mage/cards/s/Sporemound.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.game.permanent.token.SaprolingToken; @@ -46,7 +47,7 @@ public class Sporemound extends CardImpl { public Sporemound(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SporesowerThallid.java b/Mage.Sets/src/mage/cards/s/SporesowerThallid.java index e8f686bb3c..f45c1a5d78 100644 --- a/Mage.Sets/src/mage/cards/s/SporesowerThallid.java +++ b/Mage.Sets/src/mage/cards/s/SporesowerThallid.java @@ -60,7 +60,7 @@ public class SporesowerThallid extends CardImpl { public SporesowerThallid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SporolothAncient.java b/Mage.Sets/src/mage/cards/s/SporolothAncient.java index d6302c21e2..55b14907b2 100644 --- a/Mage.Sets/src/mage/cards/s/SporolothAncient.java +++ b/Mage.Sets/src/mage/cards/s/SporolothAncient.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class SporolothAncient extends CardImpl { public SporolothAncient(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SpottedGriffin.java b/Mage.Sets/src/mage/cards/s/SpottedGriffin.java index e864a204a3..a3d3be3ab6 100644 --- a/Mage.Sets/src/mage/cards/s/SpottedGriffin.java +++ b/Mage.Sets/src/mage/cards/s/SpottedGriffin.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SpottedGriffin extends CardImpl { public SpottedGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SpreadingAlgae.java b/Mage.Sets/src/mage/cards/s/SpreadingAlgae.java index b866be7431..6dc6c1437f 100644 --- a/Mage.Sets/src/mage/cards/s/SpreadingAlgae.java +++ b/Mage.Sets/src/mage/cards/s/SpreadingAlgae.java @@ -58,7 +58,7 @@ public class SpreadingAlgae extends CardImpl { public SpreadingAlgae(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant Swamp TargetPermanent auraTarget = new TargetPermanent(filter); diff --git a/Mage.Sets/src/mage/cards/s/SpreadingRot.java b/Mage.Sets/src/mage/cards/s/SpreadingRot.java new file mode 100644 index 0000000000..d1781ff113 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SpreadingRot.java @@ -0,0 +1,61 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.LoseLifeTargetControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author TheElk801 + */ +public class SpreadingRot extends CardImpl { + + public SpreadingRot(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}"); + + // Destroy target land. Its controller loses 2 life. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addEffect(new LoseLifeTargetControllerEffect(2)); + this.getSpellAbility().addTarget(new TargetLandPermanent()); + } + + public SpreadingRot(final SpreadingRot card) { + super(card); + } + + @Override + public SpreadingRot copy() { + return new SpreadingRot(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SpreadingSeas.java b/Mage.Sets/src/mage/cards/s/SpreadingSeas.java index 3088c744c1..e49b92782c 100644 --- a/Mage.Sets/src/mage/cards/s/SpreadingSeas.java +++ b/Mage.Sets/src/mage/cards/s/SpreadingSeas.java @@ -54,7 +54,7 @@ public class SpreadingSeas extends CardImpl { public SpreadingSeas(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SpringingTiger.java b/Mage.Sets/src/mage/cards/s/SpringingTiger.java index 19edaed8c9..c9824c0daa 100644 --- a/Mage.Sets/src/mage/cards/s/SpringingTiger.java +++ b/Mage.Sets/src/mage/cards/s/SpringingTiger.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class SpringingTiger extends CardImpl { public SpringingTiger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SpringjackKnight.java b/Mage.Sets/src/mage/cards/s/SpringjackKnight.java index 4a784e67ce..32f754cfcd 100644 --- a/Mage.Sets/src/mage/cards/s/SpringjackKnight.java +++ b/Mage.Sets/src/mage/cards/s/SpringjackKnight.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class SpringjackKnight extends CardImpl { public SpringjackKnight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Knight"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpringjackShepherd.java b/Mage.Sets/src/mage/cards/s/SpringjackShepherd.java index 5909c165f1..821ec5414e 100644 --- a/Mage.Sets/src/mage/cards/s/SpringjackShepherd.java +++ b/Mage.Sets/src/mage/cards/s/SpringjackShepherd.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.game.Game; import mage.game.permanent.Permanent; @@ -51,8 +52,8 @@ public class SpringjackShepherd extends CardImpl { public SpringjackShepherd(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SprintingWarbrute.java b/Mage.Sets/src/mage/cards/s/SprintingWarbrute.java index c86ec8d14a..cfae2419ef 100644 --- a/Mage.Sets/src/mage/cards/s/SprintingWarbrute.java +++ b/Mage.Sets/src/mage/cards/s/SprintingWarbrute.java @@ -29,11 +29,12 @@ package mage.cards.s; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.keyword.DashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,13 +44,13 @@ public class SprintingWarbrute extends CardImpl { public SprintingWarbrute(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(5); this.toughness = new MageInt(4); // Sprinting Warbrute attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); // Dash {3}{R} this.addAbility(new DashAbility(this, "{3}{R}")); } diff --git a/Mage.Sets/src/mage/cards/s/SpriteNoble.java b/Mage.Sets/src/mage/cards/s/SpriteNoble.java index fd7ea9795e..121e498b75 100644 --- a/Mage.Sets/src/mage/cards/s/SpriteNoble.java +++ b/Mage.Sets/src/mage/cards/s/SpriteNoble.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -57,7 +58,7 @@ public class SpriteNoble extends CardImpl { public SpriteNoble(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SproutingPhytohydra.java b/Mage.Sets/src/mage/cards/s/SproutingPhytohydra.java index e8e6ac9974..b0deef01b2 100644 --- a/Mage.Sets/src/mage/cards/s/SproutingPhytohydra.java +++ b/Mage.Sets/src/mage/cards/s/SproutingPhytohydra.java @@ -31,11 +31,12 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.DealtDamageToSourceTriggeredAbility; import mage.abilities.effects.Effect; -import mage.abilities.effects.PutTokenOntoBattlefieldCopySourceEffect; +import mage.abilities.effects.CreateTokenCopySourceEffect; import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,15 +47,15 @@ public class SproutingPhytohydra extends CardImpl { public SproutingPhytohydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(0); this.toughness = new MageInt(2); // Defender this.addAbility(DefenderAbility.getInstance()); // Whenever Sprouting Phytohydra is dealt damage, you may create a token that's a copy of Sprouting Phytohydra. - Effect effect = new PutTokenOntoBattlefieldCopySourceEffect(); + Effect effect = new CreateTokenCopySourceEffect(); effect.setText("you may create a token that's a copy of {this}"); this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, effect, true)); } diff --git a/Mage.Sets/src/mage/cards/s/SproutingThrinax.java b/Mage.Sets/src/mage/cards/s/SproutingThrinax.java index 496205c37e..83d707c70e 100644 --- a/Mage.Sets/src/mage/cards/s/SproutingThrinax.java +++ b/Mage.Sets/src/mage/cards/s/SproutingThrinax.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.SaprolingToken; /** @@ -49,7 +50,7 @@ public class SproutingThrinax extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{R}{G}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SpurGrappler.java b/Mage.Sets/src/mage/cards/s/SpurGrappler.java index a1b2933a98..3cc931b2b4 100644 --- a/Mage.Sets/src/mage/cards/s/SpurGrappler.java +++ b/Mage.Sets/src/mage/cards/s/SpurGrappler.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -57,7 +58,7 @@ public class SpurGrappler extends CardImpl { public SpurGrappler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpurnmageAdvocate.java b/Mage.Sets/src/mage/cards/s/SpurnmageAdvocate.java index 019088491e..45cac43ef5 100644 --- a/Mage.Sets/src/mage/cards/s/SpurnmageAdvocate.java +++ b/Mage.Sets/src/mage/cards/s/SpurnmageAdvocate.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.FilterCard; @@ -60,8 +61,8 @@ public class SpurnmageAdvocate extends CardImpl { public SpurnmageAdvocate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SpurredWolverine.java b/Mage.Sets/src/mage/cards/s/SpurredWolverine.java index b952bd9ba8..2dd341dc65 100644 --- a/Mage.Sets/src/mage/cards/s/SpurredWolverine.java +++ b/Mage.Sets/src/mage/cards/s/SpurredWolverine.java @@ -62,8 +62,8 @@ public class SpurredWolverine extends CardImpl { public SpurredWolverine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Wolverine"); - this.subtype.add("Beast"); + this.subtype.add(SubType.WOLVERINE); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SquadronHawk.java b/Mage.Sets/src/mage/cards/s/SquadronHawk.java index 4ecc81b678..75677f523d 100644 --- a/Mage.Sets/src/mage/cards/s/SquadronHawk.java +++ b/Mage.Sets/src/mage/cards/s/SquadronHawk.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.NamePredicate; import mage.target.common.TargetCardInLibrary; @@ -54,7 +55,7 @@ public class SquadronHawk extends CardImpl { public SquadronHawk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SquallDrifter.java b/Mage.Sets/src/mage/cards/s/SquallDrifter.java index 927166ca7f..8d0dc088b5 100644 --- a/Mage.Sets/src/mage/cards/s/SquallDrifter.java +++ b/Mage.Sets/src/mage/cards/s/SquallDrifter.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -51,7 +52,7 @@ public class SquallDrifter extends CardImpl { public SquallDrifter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); this.addSuperType(SuperType.SNOW); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Squallmonger.java b/Mage.Sets/src/mage/cards/s/Squallmonger.java index 2c708d8273..35ba45e1bf 100644 --- a/Mage.Sets/src/mage/cards/s/Squallmonger.java +++ b/Mage.Sets/src/mage/cards/s/Squallmonger.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -58,7 +59,7 @@ public class Squallmonger extends CardImpl { public Squallmonger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Monger"); + this.subtype.add(SubType.MONGER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SqueakingPieGrubfellows.java b/Mage.Sets/src/mage/cards/s/SqueakingPieGrubfellows.java index 350ce52b90..ab1bb7af2b 100644 --- a/Mage.Sets/src/mage/cards/s/SqueakingPieGrubfellows.java +++ b/Mage.Sets/src/mage/cards/s/SqueakingPieGrubfellows.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -45,8 +46,8 @@ public class SqueakingPieGrubfellows extends CardImpl { public SqueakingPieGrubfellows(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SqueakingPieSneak.java b/Mage.Sets/src/mage/cards/s/SqueakingPieSneak.java index e974987f16..1a616cc8d7 100644 --- a/Mage.Sets/src/mage/cards/s/SqueakingPieSneak.java +++ b/Mage.Sets/src/mage/cards/s/SqueakingPieSneak.java @@ -54,8 +54,8 @@ public class SqueakingPieSneak extends CardImpl { public SqueakingPieSneak(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SquealingDevil.java b/Mage.Sets/src/mage/cards/s/SquealingDevil.java index d098afaaaa..eb94a17919 100644 --- a/Mage.Sets/src/mage/cards/s/SquealingDevil.java +++ b/Mage.Sets/src/mage/cards/s/SquealingDevil.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessConditionEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; @@ -62,7 +63,7 @@ public class SquealingDevil extends CardImpl { public SquealingDevil(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SqueeGoblinNabob.java b/Mage.Sets/src/mage/cards/s/SqueeGoblinNabob.java index 33814ac700..2694d10487 100644 --- a/Mage.Sets/src/mage/cards/s/SqueeGoblinNabob.java +++ b/Mage.Sets/src/mage/cards/s/SqueeGoblinNabob.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class SqueeGoblinNabob extends CardImpl { public SqueeGoblinNabob(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SqueesEmbrace.java b/Mage.Sets/src/mage/cards/s/SqueesEmbrace.java index 6b7935ad15..21d269ed36 100644 --- a/Mage.Sets/src/mage/cards/s/SqueesEmbrace.java +++ b/Mage.Sets/src/mage/cards/s/SqueesEmbrace.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class SqueesEmbrace extends CardImpl { public SqueesEmbrace(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SquelchingLeeches.java b/Mage.Sets/src/mage/cards/s/SquelchingLeeches.java index 8a75973202..1dcf89828b 100644 --- a/Mage.Sets/src/mage/cards/s/SquelchingLeeches.java +++ b/Mage.Sets/src/mage/cards/s/SquelchingLeeches.java @@ -55,7 +55,7 @@ public class SquelchingLeeches extends CardImpl { public SquelchingLeeches(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Leech"); + this.subtype.add(SubType.LEECH); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/Squire.java b/Mage.Sets/src/mage/cards/s/Squire.java index 283e970a75..f3c0984727 100644 --- a/Mage.Sets/src/mage/cards/s/Squire.java +++ b/Mage.Sets/src/mage/cards/s/Squire.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class Squire extends CardImpl { public Squire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SquirmingMass.java b/Mage.Sets/src/mage/cards/s/SquirmingMass.java index 15e914dacf..d6044bd860 100644 --- a/Mage.Sets/src/mage/cards/s/SquirmingMass.java +++ b/Mage.Sets/src/mage/cards/s/SquirmingMass.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SquirmingMass extends CardImpl { public SquirmingMass(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SquirrelMob.java b/Mage.Sets/src/mage/cards/s/SquirrelMob.java index 7cee6def59..411bac0409 100644 --- a/Mage.Sets/src/mage/cards/s/SquirrelMob.java +++ b/Mage.Sets/src/mage/cards/s/SquirrelMob.java @@ -53,7 +53,7 @@ public class SquirrelMob extends CardImpl { public SquirrelMob(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Squirrel"); + this.subtype.add(SubType.SQUIRREL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SquirrelNest.java b/Mage.Sets/src/mage/cards/s/SquirrelNest.java index c231b8c743..7adbf5da43 100644 --- a/Mage.Sets/src/mage/cards/s/SquirrelNest.java +++ b/Mage.Sets/src/mage/cards/s/SquirrelNest.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class SquirrelNest extends CardImpl { public SquirrelNest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land diff --git a/Mage.Sets/src/mage/cards/s/SquirrelWrangler.java b/Mage.Sets/src/mage/cards/s/SquirrelWrangler.java index 4bcf6b0fa0..d3a17d1a39 100644 --- a/Mage.Sets/src/mage/cards/s/SquirrelWrangler.java +++ b/Mage.Sets/src/mage/cards/s/SquirrelWrangler.java @@ -56,8 +56,8 @@ public class SquirrelWrangler extends CardImpl { public SquirrelWrangler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SramSeniorEdificer.java b/Mage.Sets/src/mage/cards/s/SramSeniorEdificer.java index 8bf4da584d..6425fa1d6b 100644 --- a/Mage.Sets/src/mage/cards/s/SramSeniorEdificer.java +++ b/Mage.Sets/src/mage/cards/s/SramSeniorEdificer.java @@ -58,8 +58,8 @@ public class SramSeniorEdificer extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dwarf"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StabWound.java b/Mage.Sets/src/mage/cards/s/StabWound.java index 3d8cc0e5a7..b260328ced 100644 --- a/Mage.Sets/src/mage/cards/s/StabWound.java +++ b/Mage.Sets/src/mage/cards/s/StabWound.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -56,7 +57,7 @@ public class StabWound extends CardImpl { public StabWound (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/StagBeetle.java b/Mage.Sets/src/mage/cards/s/StagBeetle.java index 54615d8198..f5c1795f8d 100644 --- a/Mage.Sets/src/mage/cards/s/StagBeetle.java +++ b/Mage.Sets/src/mage/cards/s/StagBeetle.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -53,7 +54,7 @@ public class StagBeetle extends CardImpl { public StagBeetle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/StalkerHag.java b/Mage.Sets/src/mage/cards/s/StalkerHag.java index 9b40e2ac8d..cf8c95fbf4 100644 --- a/Mage.Sets/src/mage/cards/s/StalkerHag.java +++ b/Mage.Sets/src/mage/cards/s/StalkerHag.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class StalkerHag extends CardImpl { public StalkerHag(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B/G}{B/G}{B/G}"); - this.subtype.add("Hag"); + this.subtype.add(SubType.HAG); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StalkingAssassin.java b/Mage.Sets/src/mage/cards/s/StalkingAssassin.java index a5f5ec1a7b..c2c5844050 100644 --- a/Mage.Sets/src/mage/cards/s/StalkingAssassin.java +++ b/Mage.Sets/src/mage/cards/s/StalkingAssassin.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.TappedPredicate; @@ -58,8 +59,8 @@ public class StalkingAssassin extends CardImpl { public StalkingAssassin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}"); - this.subtype.add("Human"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StalkingBloodsucker.java b/Mage.Sets/src/mage/cards/s/StalkingBloodsucker.java index 8e18552a88..748c89b59d 100644 --- a/Mage.Sets/src/mage/cards/s/StalkingBloodsucker.java +++ b/Mage.Sets/src/mage/cards/s/StalkingBloodsucker.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class StalkingBloodsucker extends CardImpl { public StalkingBloodsucker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StalkingDrone.java b/Mage.Sets/src/mage/cards/s/StalkingDrone.java index 47dfca6d85..94770641d4 100644 --- a/Mage.Sets/src/mage/cards/s/StalkingDrone.java +++ b/Mage.Sets/src/mage/cards/s/StalkingDrone.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class StalkingDrone extends CardImpl { public StalkingDrone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StalkingLeonin.java b/Mage.Sets/src/mage/cards/s/StalkingLeonin.java new file mode 100644 index 0000000000..c917e94728 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/StalkingLeonin.java @@ -0,0 +1,241 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.CostImpl; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import static mage.cards.s.StalkingLeonin.SECRET_OPPONENT; +import static mage.cards.s.StalkingLeonin.SECRET_OWNER; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterAttackingCreature; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetOpponent; +import mage.util.CardUtil; + +/** + * + * @author LevelX2 + */ +public class StalkingLeonin extends CardImpl { + + static final String SECRET_OPPONENT = "_secOpp"; + static final String SECRET_OWNER = "_secOwn"; + + public StalkingLeonin(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.CAT, SubType.ARCHER); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Stalking Leonin enters the battlefield, secretly choose an opponent. + this.addAbility(new EntersBattlefieldTriggeredAbility(new StalkingLeoninChooseOpponent(), false)); + // Reveal the player you chose: Exile target creature that's attacking you if it's controlled by the chosen player. Activate this ability only once. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new StalkingLeoninEffect(), new StalkingLeoninRevealOpponentCost()); + ability.addTarget(new TargetCreaturePermanent(new StalkingLeoninFilter())); + this.addAbility(ability); + } + + public StalkingLeonin(final StalkingLeonin card) { + super(card); + } + + @Override + public StalkingLeonin copy() { + return new StalkingLeonin(this); + } +} + +class StalkingLeoninChooseOpponent extends OneShotEffect { + + public StalkingLeoninChooseOpponent() { + super(Outcome.Neutral); + staticText = "secretly choose an opponent"; + } + + public StalkingLeoninChooseOpponent(final StalkingLeoninChooseOpponent effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject mageObject = game.getPermanentEntering(source.getSourceId()); + if (mageObject == null) { + mageObject = game.getObject(source.getSourceId()); + } + if (controller != null && mageObject != null) { + TargetOpponent targetOpponent = new TargetOpponent(); + targetOpponent.setTargetName("opponent (secretly)"); + while (!controller.choose(outcome, targetOpponent, source.getSourceId(), game)) { + if (!controller.canRespond()) { + return false; + } + } + if (targetOpponent.getTargets().isEmpty()) { + return false; + } + if (!game.isSimulation()) { + game.informPlayers(mageObject.getName() + ": " + controller.getLogName() + " has secretly chosen an opponent."); + } + game.getState().setValue(mageObject.getId() + SECRET_OPPONENT, targetOpponent.getTargets().get(0)); + game.getState().setValue(mageObject.getId() + SECRET_OWNER, controller.getId()); + if (mageObject instanceof Permanent) { + ((Permanent) mageObject).addInfo(SECRET_OPPONENT, + CardUtil.addToolTipMarkTags(controller.getLogName() + " has secretly chosen an opponent."), game); + } + } + return false; + } + + @Override + public StalkingLeoninChooseOpponent copy() { + return new StalkingLeoninChooseOpponent(this); + } + +} + +class StalkingLeoninRevealOpponentCost extends CostImpl { + + public StalkingLeoninRevealOpponentCost() { + this.text = "Reveal the player you chose"; + } + + public StalkingLeoninRevealOpponentCost(final StalkingLeoninRevealOpponentCost cost) { + super(cost); + } + + @Override + public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { + UUID playerThatChoseId = (UUID) game.getState().getValue(sourceId + SECRET_OWNER); + if (playerThatChoseId == null || !playerThatChoseId.equals(controllerId)) { + return false; + } + UUID opponentId = (UUID) game.getState().getValue(sourceId + SECRET_OPPONENT); + return opponentId != null; + } + + @Override + public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) { + UUID playerThatChoseId = (UUID) game.getState().getValue(sourceId + SECRET_OWNER); + if (playerThatChoseId == null || !playerThatChoseId.equals(controllerId)) { + return false; + } + UUID opponentId = (UUID) game.getState().getValue(sourceId + SECRET_OPPONENT); + if (opponentId != null) { + game.getState().setValue(sourceId + SECRET_OWNER, null); // because only once, the vale is set to null + Player controller = game.getPlayer(controllerId); + Player opponent = game.getPlayer(opponentId); + MageObject sourceObject = game.getObject(sourceId); + if (controller != null && opponent != null && sourceObject != null) { + if (sourceObject instanceof Permanent) { + ((Permanent) sourceObject).addInfo(SECRET_OPPONENT, null, game); + } + game.informPlayers(sourceObject.getLogName() + ": " + controller.getLogName() + " reveals the secretly chosen opponent " + opponent.getLogName()); + } + paid = true; + } + return paid; + } + + @Override + public StalkingLeoninRevealOpponentCost copy() { + return new StalkingLeoninRevealOpponentCost(this); + } + +} + +class StalkingLeoninEffect extends OneShotEffect { + + public StalkingLeoninEffect() { + super(Outcome.Exile); + this.staticText = "Exile target creature that's attacking you if it's controlled by the chosen player. Activate this ability only once"; + } + + public StalkingLeoninEffect(final StalkingLeoninEffect effect) { + super(effect); + } + + @Override + public StalkingLeoninEffect copy() { + return new StalkingLeoninEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (targetCreature != null) { + UUID opponentId = (UUID) game.getState().getValue(source.getSourceId() + SECRET_OPPONENT); + if (opponentId != null && opponentId.equals(targetCreature.getControllerId())) { + controller.moveCards(targetCreature, Zone.EXILED, source, game); + } + } + return true; + } + return false; + } +} + +class StalkingLeoninFilter extends FilterAttackingCreature { + + public StalkingLeoninFilter() { + super("creature that's attacking you"); + } + + public StalkingLeoninFilter(final StalkingLeoninFilter filter) { + super(filter); + } + + @Override + public StalkingLeoninFilter copy() { + return new StalkingLeoninFilter(this); + } + + @Override + public boolean match(Permanent permanent, UUID sourceId, UUID playerId, Game game) { + return super.match(permanent, sourceId, playerId, game) + && playerId.equals(game.getCombat().getDefenderId(permanent.getId())); + } +} diff --git a/Mage.Sets/src/mage/cards/s/StalkingTiger.java b/Mage.Sets/src/mage/cards/s/StalkingTiger.java index 2dec078022..003e8038c2 100644 --- a/Mage.Sets/src/mage/cards/s/StalkingTiger.java +++ b/Mage.Sets/src/mage/cards/s/StalkingTiger.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByMoreThanOneSourceEffe import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -44,7 +45,7 @@ public class StalkingTiger extends CardImpl { public StalkingTiger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StalkingVampire.java b/Mage.Sets/src/mage/cards/s/StalkingVampire.java index b359db6f74..46e97503ce 100644 --- a/Mage.Sets/src/mage/cards/s/StalkingVampire.java +++ b/Mage.Sets/src/mage/cards/s/StalkingVampire.java @@ -34,6 +34,7 @@ import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author nantuko @@ -42,7 +43,7 @@ public class StalkingVampire extends CardImpl { public StalkingVampire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.color.setBlack(true); this.nightCard = true; diff --git a/Mage.Sets/src/mage/cards/s/StalkingVengeance.java b/Mage.Sets/src/mage/cards/s/StalkingVengeance.java index beab1ee1ee..74ae405cf6 100644 --- a/Mage.Sets/src/mage/cards/s/StalkingVengeance.java +++ b/Mage.Sets/src/mage/cards/s/StalkingVengeance.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -61,7 +62,7 @@ public class StalkingVengeance extends CardImpl { public StalkingVengeance(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/StalkingYeti.java b/Mage.Sets/src/mage/cards/s/StalkingYeti.java new file mode 100644 index 0000000000..edb00ec5c5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/StalkingYeti.java @@ -0,0 +1,118 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.SourceOnBattlefieldCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetOpponentsCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class StalkingYeti extends CardImpl { + + public StalkingYeti(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + + this.addSuperType(SuperType.SNOW); + this.subtype.add(SubType.YETI); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Stalking Yeti enters the battlefield, if it's on the battlefield, it deals damage equal to its power to target creature an opponent controls and that creature deals damage equal to its power to Stalking Yeti. + Ability ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new StalkingYetiEffect()), + SourceOnBattlefieldCondition.instance, + "When {this} enters the battlefield, if it's on the battlefield, " + + "it deals damage equal to its power to target creature an opponent controls " + + "and that creature deals damage equal to its power to {this}." + ); + ability.addTarget(new TargetOpponentsCreaturePermanent()); + this.addAbility(ability); + + // {2}{snow}: Return Stalking Yeti to its owner's hand. Activate this ability only any time you could cast a sorcery. + this.addAbility(new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{2}{S}"))); + } + + public StalkingYeti(final StalkingYeti card) { + super(card); + } + + @Override + public StalkingYeti copy() { + return new StalkingYeti(this); + } +} + +class StalkingYetiEffect extends OneShotEffect { + + StalkingYetiEffect() { + super(Outcome.Benefit); + this.staticText = "it deals damage equal to its power to target creature an opponent controls " + + "and that creature deals damage equal to its power to {this}"; + } + + StalkingYetiEffect(final StalkingYetiEffect effect) { + super(effect); + } + + @Override + public StalkingYetiEffect copy() { + return new StalkingYetiEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent thisCreature = game.getPermanent(source.getSourceId()); + Permanent thatCreature = game.getPermanent(source.getFirstTarget()); + if (thisCreature == null || thatCreature == null) { + return false; + } + thatCreature.damage(thisCreature.getPower().getValue(), thisCreature.getId(), game, false, true); + thisCreature.damage(thatCreature.getPower().getValue(), thatCreature.getId(), game, false, true); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/s/StallionOfAshmouth.java b/Mage.Sets/src/mage/cards/s/StallionOfAshmouth.java index 9cf4be1075..666b1e587a 100644 --- a/Mage.Sets/src/mage/cards/s/StallionOfAshmouth.java +++ b/Mage.Sets/src/mage/cards/s/StallionOfAshmouth.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class StallionOfAshmouth extends CardImpl { public StallionOfAshmouth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Nightmare"); - this.subtype.add("Horse"); + this.subtype.add(SubType.NIGHTMARE); + this.subtype.add(SubType.HORSE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StalwartAven.java b/Mage.Sets/src/mage/cards/s/StalwartAven.java index 04598968af..30859d808a 100644 --- a/Mage.Sets/src/mage/cards/s/StalwartAven.java +++ b/Mage.Sets/src/mage/cards/s/StalwartAven.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.RenownAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class StalwartAven extends CardImpl { public StalwartAven(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StalwartShieldBearers.java b/Mage.Sets/src/mage/cards/s/StalwartShieldBearers.java index 5f46f6a87c..862736c2d2 100644 --- a/Mage.Sets/src/mage/cards/s/StalwartShieldBearers.java +++ b/Mage.Sets/src/mage/cards/s/StalwartShieldBearers.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -54,8 +55,8 @@ public class StalwartShieldBearers extends CardImpl { public StalwartShieldBearers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/Stamina.java b/Mage.Sets/src/mage/cards/s/Stamina.java new file mode 100644 index 0000000000..d16276abf4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/Stamina.java @@ -0,0 +1,83 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.constants.SubType; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.RegenerateAttachedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class Stamina extends CardImpl { + + public Stamina(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature has vigilance. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA))); + + // Sacrifice Stamina: Regenerate enchanted creature. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateAttachedEffect(AttachmentType.AURA), new SacrificeSourceCost())); + } + + public Stamina(final Stamina card) { + super(card); + } + + @Override + public Stamina copy() { + return new Stamina(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/StampedeDriver.java b/Mage.Sets/src/mage/cards/s/StampedeDriver.java index 1ed00ed208..4f768600a9 100644 --- a/Mage.Sets/src/mage/cards/s/StampedeDriver.java +++ b/Mage.Sets/src/mage/cards/s/StampedeDriver.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -53,8 +54,8 @@ public class StampedeDriver extends CardImpl { public StampedeDriver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StampedingElkHerd.java b/Mage.Sets/src/mage/cards/s/StampedingElkHerd.java index a57c6a2acc..1c77640ee1 100644 --- a/Mage.Sets/src/mage/cards/s/StampedingElkHerd.java +++ b/Mage.Sets/src/mage/cards/s/StampedingElkHerd.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterControlledCreaturePermanent; @@ -48,7 +49,7 @@ public class StampedingElkHerd extends CardImpl { public StampedingElkHerd(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Elk"); + this.subtype.add(SubType.ELK); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/StampedingRhino.java b/Mage.Sets/src/mage/cards/s/StampedingRhino.java index dd7a616b9e..fa724cef96 100644 --- a/Mage.Sets/src/mage/cards/s/StampedingRhino.java +++ b/Mage.Sets/src/mage/cards/s/StampedingRhino.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -42,7 +43,7 @@ public class StampedingRhino extends CardImpl { public StampedingRhino(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Rhino"); + this.subtype.add(SubType.RHINO); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StampedingSerow.java b/Mage.Sets/src/mage/cards/s/StampedingSerow.java index 683aeaca94..cf5cddf177 100644 --- a/Mage.Sets/src/mage/cards/s/StampedingSerow.java +++ b/Mage.Sets/src/mage/cards/s/StampedingSerow.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -53,8 +54,8 @@ public class StampedingSerow extends CardImpl { public StampedingSerow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Antelope"); - this.subtype.add("Beast"); + this.subtype.add(SubType.ANTELOPE); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StampedingWildebeests.java b/Mage.Sets/src/mage/cards/s/StampedingWildebeests.java index 3260ac2bda..00b4226c40 100644 --- a/Mage.Sets/src/mage/cards/s/StampedingWildebeests.java +++ b/Mage.Sets/src/mage/cards/s/StampedingWildebeests.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -55,8 +56,8 @@ public class StampedingWildebeests extends CardImpl { public StampedingWildebeests(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Antelope"); - this.subtype.add("Beast"); + this.subtype.add(SubType.ANTELOPE); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StandardBearer.java b/Mage.Sets/src/mage/cards/s/StandardBearer.java index 612383f31d..4d9c7aea4c 100644 --- a/Mage.Sets/src/mage/cards/s/StandardBearer.java +++ b/Mage.Sets/src/mage/cards/s/StandardBearer.java @@ -1,67 +1,67 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.ruleModifying.TargetsHaveToTargetPermanentIfAbleEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.FilterPermanent; - -/** - * - * @author LevelX2 - */ -public class StandardBearer extends CardImpl { - - public StandardBearer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - - this.subtype.add("Human"); - this.subtype.add("Flagbearer"); - this.power = new MageInt(1); - this.toughness = new MageInt(1); - - // While choosing targets as part of casting a spell or activating an ability, your opponents must choose at least one Flagbearer on the battlefield if able. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new TargetsHaveToTargetPermanentIfAbleEffect(new FilterPermanent(SubType.FLAGBEARER, "one Flagbearer")))); - } - - public StandardBearer(final StandardBearer card) { - super(card); - } - - @Override - public StandardBearer copy() { - return new StandardBearer(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.ruleModifying.TargetsHaveToTargetPermanentIfAbleEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterPermanent; + +/** + * + * @author LevelX2 + */ +public class StandardBearer extends CardImpl { + + public StandardBearer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.FLAGBEARER); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // While choosing targets as part of casting a spell or activating an ability, your opponents must choose at least one Flagbearer on the battlefield if able. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new TargetsHaveToTargetPermanentIfAbleEffect(new FilterPermanent(SubType.FLAGBEARER, "one Flagbearer")))); + } + + public StandardBearer(final StandardBearer card) { + super(card); + } + + @Override + public StandardBearer copy() { + return new StandardBearer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/StandingTroops.java b/Mage.Sets/src/mage/cards/s/StandingTroops.java index 6602a0cdf6..eadb14be2c 100644 --- a/Mage.Sets/src/mage/cards/s/StandingTroops.java +++ b/Mage.Sets/src/mage/cards/s/StandingTroops.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class StandingTroops extends CardImpl { public StandingTroops(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StarDestroyer.java b/Mage.Sets/src/mage/cards/s/StarDestroyer.java index 54db0188f4..9c51ba6907 100644 --- a/Mage.Sets/src/mage/cards/s/StarDestroyer.java +++ b/Mage.Sets/src/mage/cards/s/StarDestroyer.java @@ -1,98 +1,98 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.DamageTargetEffect; -import mage.abilities.effects.common.TapTargetEffect; -import mage.abilities.keyword.SpaceflightAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterCreatureOrPlayer; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.permanent.token.TIEFighterToken; -import mage.target.common.TargetCreatureOrPlayer; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Styxo - */ -public class StarDestroyer extends CardImpl { - - private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent("artifact creature"); - private static final FilterCreatureOrPlayer filter3 = new FilterCreatureOrPlayer("non-Starship creature or player"); - - static { - filter1.add(new CardTypePredicate(CardType.ARTIFACT)); - filter3.getCreatureFilter().add(Predicates.not(new SubtypePredicate(SubType.STARSHIP))); - } - - public StarDestroyer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{U}{B}{R}"); - this.subtype.add("Starship"); - this.power = new MageInt(6); - this.toughness = new MageInt(6); - - // Spaceflight - this.addAbility(SpaceflightAbility.getInstance()); - - // {2}{U}: Tap target artifact creature. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl("{2}{U}")); - ability.addTarget(new TargetCreaturePermanent(filter1)); - this.addAbility(ability); - - // {2}{B}: Create a 1/1 black Starship artifact creature token with spaceflight named TIE Fighter. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new TIEFighterToken()), new ManaCostsImpl("{2}{B}"))); - - // {2}{R}: Star Destroyer deals 2 damge to target non-Starship creature or player. - ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}{R}")); - ability.addTarget(new TargetCreatureOrPlayer(filter3)); - this.addAbility(ability); - } - - public StarDestroyer(final StarDestroyer card) { - super(card); - } - - @Override - public StarDestroyer copy() { - return new StarDestroyer(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureOrPlayer; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.TIEFighterToken; +import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Styxo + */ +public class StarDestroyer extends CardImpl { + + private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent("artifact creature"); + private static final FilterCreatureOrPlayer filter3 = new FilterCreatureOrPlayer("non-Starship creature or player"); + + static { + filter1.add(new CardTypePredicate(CardType.ARTIFACT)); + filter3.getCreatureFilter().add(Predicates.not(new SubtypePredicate(SubType.STARSHIP))); + } + + public StarDestroyer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{U}{B}{R}"); + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + + // {2}{U}: Tap target artifact creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl("{2}{U}")); + ability.addTarget(new TargetCreaturePermanent(filter1)); + this.addAbility(ability); + + // {2}{B}: Create a 1/1 black Starship artifact creature token with spaceflight named TIE Fighter. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new TIEFighterToken()), new ManaCostsImpl("{2}{B}"))); + + // {2}{R}: Star Destroyer deals 2 damge to target non-Starship creature or player. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}{R}")); + ability.addTarget(new TargetCreatureOrPlayer(filter3)); + this.addAbility(ability); + } + + public StarDestroyer(final StarDestroyer card) { + super(card); + } + + @Override + public StarDestroyer copy() { + return new StarDestroyer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/StarOfExtinction.java b/Mage.Sets/src/mage/cards/s/StarOfExtinction.java new file mode 100644 index 0000000000..15e6c31a9a --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/StarOfExtinction.java @@ -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.cards.s; + +import java.util.UUID; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author TheElk801 + */ +public class StarOfExtinction extends CardImpl { + + public StarOfExtinction(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{R}{R}"); + + // Destroy target land. Star of Extinction deals 20 damage to each creature and each planeswalker. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addEffect(new DamageAllEffect(20, new FilterCreatureOrPlaneswalkerPermanent("creature and each planeswalker"))); + this.getSpellAbility().addTarget(new TargetLandPermanent()); + } + + public StarOfExtinction(final StarOfExtinction card) { + super(card); + } + + @Override + public StarOfExtinction copy() { + return new StarOfExtinction(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/StarkeOfRath.java b/Mage.Sets/src/mage/cards/s/StarkeOfRath.java index 6a263a7dd5..64af0c44aa 100644 --- a/Mage.Sets/src/mage/cards/s/StarkeOfRath.java +++ b/Mage.Sets/src/mage/cards/s/StarkeOfRath.java @@ -64,8 +64,8 @@ public class StarkeOfRath extends CardImpl { public StarkeOfRath(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StarlightInvoker.java b/Mage.Sets/src/mage/cards/s/StarlightInvoker.java index b80ec9d332..5ab8f1f783 100644 --- a/Mage.Sets/src/mage/cards/s/StarlightInvoker.java +++ b/Mage.Sets/src/mage/cards/s/StarlightInvoker.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,9 +46,9 @@ public class StarlightInvoker extends CardImpl { public StarlightInvoker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StarlitAngel.java b/Mage.Sets/src/mage/cards/s/StarlitAngel.java index e9efb19f37..3c07e33a6f 100644 --- a/Mage.Sets/src/mage/cards/s/StarlitAngel.java +++ b/Mage.Sets/src/mage/cards/s/StarlitAngel.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class StarlitAngel extends CardImpl { public StarlitAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StartYourEngines.java b/Mage.Sets/src/mage/cards/s/StartYourEngines.java index d7232d26c6..4cc5a1ad2e 100644 --- a/Mage.Sets/src/mage/cards/s/StartYourEngines.java +++ b/Mage.Sets/src/mage/cards/s/StartYourEngines.java @@ -27,21 +27,18 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; -import mage.constants.SubLayer; +import mage.constants.*; import mage.game.Game; import mage.game.permanent.Permanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -89,7 +86,7 @@ class StartYourEnginesEffect extends ContinuousEffectImpl { @Override public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { for (Permanent permanent : game.getBattlefield().getAllActivePermanents(source.getControllerId())) { - if (permanent != null && permanent.getSubtype(game).contains("Vehicle")) { + if (permanent != null && permanent.hasSubtype(SubType.VEHICLE, game)) { if (sublayer == SubLayer.NA) { permanent.addCardType(CardType.ARTIFACT); permanent.addCardType(CardType.CREATURE);// TODO: Chcek if giving CREATURE Type is correct diff --git a/Mage.Sets/src/mage/cards/s/StarvedRusalka.java b/Mage.Sets/src/mage/cards/s/StarvedRusalka.java index 37dc617727..b46a3e4609 100644 --- a/Mage.Sets/src/mage/cards/s/StarvedRusalka.java +++ b/Mage.Sets/src/mage/cards/s/StarvedRusalka.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -49,7 +50,7 @@ public class StarvedRusalka extends CardImpl { public StarvedRusalka(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Stasis.java b/Mage.Sets/src/mage/cards/s/Stasis.java index 44923e092f..cbf628ce7c 100644 --- a/Mage.Sets/src/mage/cards/s/Stasis.java +++ b/Mage.Sets/src/mage/cards/s/Stasis.java @@ -32,22 +32,17 @@ import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.abilities.effects.common.SkipUntapStepEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.players.Player; /** * - * @author jeffwadsworth + * @author jeffwadsworth, edited by L_J */ public class Stasis extends CardImpl { @@ -71,28 +66,3 @@ public class Stasis extends CardImpl { return new Stasis(this); } } - -class SkipUntapStepEffect extends ContinuousRuleModifyingEffectImpl { - - public SkipUntapStepEffect() { - super(Duration.WhileOnBattlefield, Outcome.Neutral, false, false); - staticText = "Players skip their uptap steps"; - } - - public SkipUntapStepEffect(final SkipUntapStepEffect effect) { - super(effect); - } - - @Override - public SkipUntapStepEffect copy() { - return new SkipUntapStepEffect(this); - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - Player controller = game.getPlayer(source.getControllerId()); - return event.getType() == GameEvent.EventType.UNTAP_STEP - && controller != null - && game.getState().getPlayersInRange(controller.getId(), game).contains(event.getPlayerId()); - } -} diff --git a/Mage.Sets/src/mage/cards/s/StasisCell.java b/Mage.Sets/src/mage/cards/s/StasisCell.java index 19ce8b2ff2..9223c7d969 100644 --- a/Mage.Sets/src/mage/cards/s/StasisCell.java +++ b/Mage.Sets/src/mage/cards/s/StasisCell.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -52,7 +53,7 @@ public class StasisCell extends CardImpl { public StasisCell(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/StasisCocoon.java b/Mage.Sets/src/mage/cards/s/StasisCocoon.java index cb886ea3b9..432336b35c 100644 --- a/Mage.Sets/src/mage/cards/s/StasisCocoon.java +++ b/Mage.Sets/src/mage/cards/s/StasisCocoon.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -50,7 +51,7 @@ public class StasisCocoon extends CardImpl { public StasisCocoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant artifact TargetPermanent auraTarget = new TargetArtifactPermanent(); diff --git a/Mage.Sets/src/mage/cards/s/StaunchDefenders.java b/Mage.Sets/src/mage/cards/s/StaunchDefenders.java index fa35dfee8c..619ee16095 100644 --- a/Mage.Sets/src/mage/cards/s/StaunchDefenders.java +++ b/Mage.Sets/src/mage/cards/s/StaunchDefenders.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class StaunchDefenders extends CardImpl { public StaunchDefenders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StaunchHeartedWarrior.java b/Mage.Sets/src/mage/cards/s/StaunchHeartedWarrior.java index 90183a0b8f..1116c3d5e1 100644 --- a/Mage.Sets/src/mage/cards/s/StaunchHeartedWarrior.java +++ b/Mage.Sets/src/mage/cards/s/StaunchHeartedWarrior.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -44,8 +45,8 @@ public class StaunchHeartedWarrior extends CardImpl { public StaunchHeartedWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SteadfastArmasaur.java b/Mage.Sets/src/mage/cards/s/SteadfastArmasaur.java new file mode 100644 index 0000000000..9c299c382e --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SteadfastArmasaur.java @@ -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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.SourcePermanentToughnessValue; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.BlockedByIdPredicate; +import mage.filter.predicate.permanent.BlockingAttackerIdPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class SteadfastArmasaur extends CardImpl { + + public SteadfastArmasaur(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // {1}{W}, {T}: Steadfast Armasaur deals damage equal to its toughness to target creature blocking or blocked by it. + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature blocking or blocked by it"); + filter.add(Predicates.or(new BlockedByIdPredicate(this.getId()), + new BlockingAttackerIdPredicate(this.getId()))); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(SourcePermanentToughnessValue.getInstance()), new ManaCostsImpl("{1}{W}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public SteadfastArmasaur(final SteadfastArmasaur card) { + super(card); + } + + @Override + public SteadfastArmasaur copy() { + return new SteadfastArmasaur(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SteadfastCathar.java b/Mage.Sets/src/mage/cards/s/SteadfastCathar.java index b5c62f4cf7..1b9c4098ea 100644 --- a/Mage.Sets/src/mage/cards/s/SteadfastCathar.java +++ b/Mage.Sets/src/mage/cards/s/SteadfastCathar.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class SteadfastCathar extends CardImpl { public SteadfastCathar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SteadfastGuard.java b/Mage.Sets/src/mage/cards/s/SteadfastGuard.java index 6efea30cb8..062a2d048a 100644 --- a/Mage.Sets/src/mage/cards/s/SteadfastGuard.java +++ b/Mage.Sets/src/mage/cards/s/SteadfastGuard.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class SteadfastGuard extends CardImpl { public SteadfastGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SteadfastSentinel.java b/Mage.Sets/src/mage/cards/s/SteadfastSentinel.java index f0c439fd71..234de212f1 100644 --- a/Mage.Sets/src/mage/cards/s/SteadfastSentinel.java +++ b/Mage.Sets/src/mage/cards/s/SteadfastSentinel.java @@ -8,14 +8,15 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; public class SteadfastSentinel extends CardImpl { public SteadfastSentinel(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); - subtype.add("Human"); - subtype.add("Cleric"); + subtype.add(SubType.HUMAN); + subtype.add(SubType.CLERIC); power = new MageInt(2); toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StealArtifact.java b/Mage.Sets/src/mage/cards/s/StealArtifact.java index d3c0687c69..9aea653ef7 100644 --- a/Mage.Sets/src/mage/cards/s/StealArtifact.java +++ b/Mage.Sets/src/mage/cards/s/StealArtifact.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -49,7 +50,7 @@ public class StealArtifact extends CardImpl { public StealArtifact(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant artifact TargetPermanent auraTarget = new TargetArtifactPermanent(); diff --git a/Mage.Sets/src/mage/cards/s/StealEnchantment.java b/Mage.Sets/src/mage/cards/s/StealEnchantment.java index 1c7b2d1793..9150af9bf0 100644 --- a/Mage.Sets/src/mage/cards/s/StealEnchantment.java +++ b/Mage.Sets/src/mage/cards/s/StealEnchantment.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -49,7 +50,7 @@ public class StealEnchantment extends CardImpl { public StealEnchantment(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant enchantment diff --git a/Mage.Sets/src/mage/cards/s/StealerOfSecrets.java b/Mage.Sets/src/mage/cards/s/StealerOfSecrets.java index cb38140be5..e09050a3df 100644 --- a/Mage.Sets/src/mage/cards/s/StealerOfSecrets.java +++ b/Mage.Sets/src/mage/cards/s/StealerOfSecrets.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -52,8 +53,8 @@ public class StealerOfSecrets extends CardImpl { public StealerOfSecrets(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SteamCatapult.java b/Mage.Sets/src/mage/cards/s/SteamCatapult.java index 02df5cde0c..1754250eff 100644 --- a/Mage.Sets/src/mage/cards/s/SteamCatapult.java +++ b/Mage.Sets/src/mage/cards/s/SteamCatapult.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.TappedPredicate; @@ -56,8 +57,8 @@ public class SteamCatapult extends CardImpl { public SteamCatapult(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SteamFrigate.java b/Mage.Sets/src/mage/cards/s/SteamFrigate.java index 250fb6649d..fa6eaec396 100644 --- a/Mage.Sets/src/mage/cards/s/SteamFrigate.java +++ b/Mage.Sets/src/mage/cards/s/SteamFrigate.java @@ -46,8 +46,8 @@ public class SteamFrigate extends CardImpl { public SteamFrigate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Pirate"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SteamSpitter.java b/Mage.Sets/src/mage/cards/s/SteamSpitter.java index 1acc02eb26..dff52a098c 100644 --- a/Mage.Sets/src/mage/cards/s/SteamSpitter.java +++ b/Mage.Sets/src/mage/cards/s/SteamSpitter.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class SteamSpitter extends CardImpl { public SteamSpitter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SteamVents.java b/Mage.Sets/src/mage/cards/s/SteamVents.java index bdb10769d8..665d29799e 100644 --- a/Mage.Sets/src/mage/cards/s/SteamVents.java +++ b/Mage.Sets/src/mage/cards/s/SteamVents.java @@ -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.cards.s; import java.util.UUID; @@ -37,6 +36,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,16 +44,17 @@ import mage.constants.CardType; */ public class SteamVents extends CardImpl { - public SteamVents (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - this.subtype.add("Island"); - this.subtype.add("Mountain"); + public SteamVents(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); + this.subtype.add(SubType.ISLAND); + this.subtype.add(SubType.MOUNTAIN); + + this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); this.addAbility(new BlueManaAbility()); this.addAbility(new RedManaAbility()); - this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, Steam Vents enters the battlefield tapped")); } - public SteamVents (final SteamVents card) { + public SteamVents(final SteamVents card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/c/CrookOfComdemnation.java b/Mage.Sets/src/mage/cards/s/Steamclaw.java similarity index 67% rename from Mage.Sets/src/mage/cards/c/CrookOfComdemnation.java rename to Mage.Sets/src/mage/cards/s/Steamclaw.java index 9da5242baa..7a84e5b533 100644 --- a/Mage.Sets/src/mage/cards/c/CrookOfComdemnation.java +++ b/Mage.Sets/src/mage/cards/s/Steamclaw.java @@ -1,77 +1,73 @@ -/* - * 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.cards.c; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ExileSourceCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.ExileGraveyardAllPlayersEffect; -import mage.abilities.effects.common.ExileTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.target.common.TargetCardInGraveyard; - -/** - * - * @author jeffwadsworth - */ -public class CrookOfComdemnation extends CardImpl { - - private UUID exileId = UUID.randomUUID(); - - public CrookOfComdemnation(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); - - - // {1}, {t}: Exile target card from a graveyard. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new ManaCostsImpl("{1}")); - ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCardInGraveyard()); - this.addAbility(ability); - - // {1}, Exile Crook of Condemnation: Exile all cards from all graveyards. - Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileGraveyardAllPlayersEffect(), new ManaCostsImpl("{1}")); - ability2.addCost(new ExileSourceCost()); - this.addAbility(ability2); - - } - - public CrookOfComdemnation(final CrookOfComdemnation card) { - super(card); - } - - @Override - public CrookOfComdemnation copy() { - return new CrookOfComdemnation(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +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.GenericManaCost; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.target.common.TargetCardInGraveyard; + +/** + * + * @author TheElk801 + */ +public class Steamclaw extends CardImpl { + + public Steamclaw(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + // {3}, {tap}: Exile target card from a graveyard. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new TapSourceCost()); + ability.addCost(new GenericManaCost(3)); + ability.addTarget(new TargetCardInGraveyard()); + this.addAbility(ability); + + // {1}, Sacrifice Steamclaw: Exile target card from a graveyard. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new GenericManaCost(1)); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCardInGraveyard()); + this.addAbility(ability); + } + + public Steamclaw(final Steamclaw card) { + super(card); + } + + @Override + public Steamclaw copy() { + return new Steamclaw(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SteamcoreWeird.java b/Mage.Sets/src/mage/cards/s/SteamcoreWeird.java index 235073836d..bef7de8589 100644 --- a/Mage.Sets/src/mage/cards/s/SteamcoreWeird.java +++ b/Mage.Sets/src/mage/cards/s/SteamcoreWeird.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.target.common.TargetCreatureOrPlayer; import mage.watchers.common.ManaSpentToCastWatcher; @@ -49,7 +50,7 @@ public class SteamcoreWeird extends CardImpl { public SteamcoreWeird(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Weird"); + this.subtype.add(SubType.WEIRD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SteelGolem.java b/Mage.Sets/src/mage/cards/s/SteelGolem.java index cd0df37907..d60e59935f 100644 --- a/Mage.Sets/src/mage/cards/s/SteelGolem.java +++ b/Mage.Sets/src/mage/cards/s/SteelGolem.java @@ -47,7 +47,7 @@ public class SteelGolem extends CardImpl { public SteelGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SteelHellkite.java b/Mage.Sets/src/mage/cards/s/SteelHellkite.java index 97dcddc079..0ea95f2bdc 100644 --- a/Mage.Sets/src/mage/cards/s/SteelHellkite.java +++ b/Mage.Sets/src/mage/cards/s/SteelHellkite.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class SteelHellkite extends CardImpl { public SteelHellkite(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SteelLeafPaladin.java b/Mage.Sets/src/mage/cards/s/SteelLeafPaladin.java index e1ffeff4ef..ede2263c95 100644 --- a/Mage.Sets/src/mage/cards/s/SteelLeafPaladin.java +++ b/Mage.Sets/src/mage/cards/s/SteelLeafPaladin.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -55,8 +56,8 @@ public class SteelLeafPaladin extends CardImpl { public SteelLeafPaladin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{W}"); - this.subtype.add("Elf"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SteelOfTheGodhead.java b/Mage.Sets/src/mage/cards/s/SteelOfTheGodhead.java index ece88aea79..3777e222a5 100644 --- a/Mage.Sets/src/mage/cards/s/SteelOfTheGodhead.java +++ b/Mage.Sets/src/mage/cards/s/SteelOfTheGodhead.java @@ -45,6 +45,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -58,7 +59,7 @@ public class SteelOfTheGodhead extends CardImpl { public SteelOfTheGodhead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W/U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/SteelOverseer.java b/Mage.Sets/src/mage/cards/s/SteelOverseer.java index e21abee8a7..98956e1dc4 100644 --- a/Mage.Sets/src/mage/cards/s/SteelOverseer.java +++ b/Mage.Sets/src/mage/cards/s/SteelOverseer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; @@ -59,7 +60,7 @@ public class SteelOverseer extends CardImpl { public SteelOverseer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SteelWall.java b/Mage.Sets/src/mage/cards/s/SteelWall.java index f195fe4260..2dc6fa8256 100644 --- a/Mage.Sets/src/mage/cards/s/SteelWall.java +++ b/Mage.Sets/src/mage/cards/s/SteelWall.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SteelWall extends CardImpl { public SteelWall (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); this.addAbility(DefenderAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/s/SteelcladSerpent.java b/Mage.Sets/src/mage/cards/s/SteelcladSerpent.java index 07efd59661..a6ddefc57a 100644 --- a/Mage.Sets/src/mage/cards/s/SteelcladSerpent.java +++ b/Mage.Sets/src/mage/cards/s/SteelcladSerpent.java @@ -35,6 +35,7 @@ import mage.abilities.effects.RestrictionEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; @@ -51,7 +52,7 @@ public class SteelcladSerpent extends CardImpl { public SteelcladSerpent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SteelformSliver.java b/Mage.Sets/src/mage/cards/s/SteelformSliver.java index 818c6011d5..e9f792922f 100644 --- a/Mage.Sets/src/mage/cards/s/SteelformSliver.java +++ b/Mage.Sets/src/mage/cards/s/SteelformSliver.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -46,7 +47,7 @@ public class SteelformSliver extends CardImpl { public SteelformSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SteelshaperApprentice.java b/Mage.Sets/src/mage/cards/s/SteelshaperApprentice.java index a4689af0b8..f835cd6861 100644 --- a/Mage.Sets/src/mage/cards/s/SteelshaperApprentice.java +++ b/Mage.Sets/src/mage/cards/s/SteelshaperApprentice.java @@ -61,8 +61,8 @@ public class SteelshaperApprentice extends CardImpl { public SteelshaperApprentice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SteepleRoc.java b/Mage.Sets/src/mage/cards/s/SteepleRoc.java index 3dd37cb239..687c78b8ad 100644 --- a/Mage.Sets/src/mage/cards/s/SteepleRoc.java +++ b/Mage.Sets/src/mage/cards/s/SteepleRoc.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class SteepleRoc extends CardImpl { public SteepleRoc (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StenchOfDecay.java b/Mage.Sets/src/mage/cards/s/StenchOfDecay.java new file mode 100644 index 0000000000..8dc04666b6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/StenchOfDecay.java @@ -0,0 +1,66 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author TheElk801 + */ +public class StenchOfDecay extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Nonartifact creatures"); + + static { + filter.add(new CardTypePredicate(CardType.ARTIFACT)); + } + + public StenchOfDecay(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}{B}"); + + // Nonartifact creatures get -1/-1 until end of turn. + this.getSpellAbility().addEffect(new BoostAllEffect(-1, -1, Duration.EndOfTurn, filter, false)); + } + + public StenchOfDecay(final StenchOfDecay card) { + super(card); + } + + @Override + public StenchOfDecay copy() { + return new StenchOfDecay(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/Stenchskipper.java b/Mage.Sets/src/mage/cards/s/Stenchskipper.java index cd001af5bb..cd5ae3977b 100644 --- a/Mage.Sets/src/mage/cards/s/Stenchskipper.java +++ b/Mage.Sets/src/mage/cards/s/Stenchskipper.java @@ -46,7 +46,7 @@ public class Stenchskipper extends CardImpl { public Stenchskipper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/StensiaInnkeeper.java b/Mage.Sets/src/mage/cards/s/StensiaInnkeeper.java index 62fe86a2f9..1af3e04a47 100644 --- a/Mage.Sets/src/mage/cards/s/StensiaInnkeeper.java +++ b/Mage.Sets/src/mage/cards/s/StensiaInnkeeper.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -55,7 +56,7 @@ public class StensiaInnkeeper extends CardImpl { public StensiaInnkeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SteppeGlider.java b/Mage.Sets/src/mage/cards/s/SteppeGlider.java index 05ef28fdaf..0581e96539 100644 --- a/Mage.Sets/src/mage/cards/s/SteppeGlider.java +++ b/Mage.Sets/src/mage/cards/s/SteppeGlider.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -60,7 +61,7 @@ public class SteppeGlider extends CardImpl { public SteppeGlider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SteppeLynx.java b/Mage.Sets/src/mage/cards/s/SteppeLynx.java index 8be8998f6c..ca281f3991 100644 --- a/Mage.Sets/src/mage/cards/s/SteppeLynx.java +++ b/Mage.Sets/src/mage/cards/s/SteppeLynx.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,7 +46,7 @@ public class SteppeLynx extends CardImpl { public SteppeLynx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SternConstable.java b/Mage.Sets/src/mage/cards/s/SternConstable.java index 006f2b665b..821438577b 100644 --- a/Mage.Sets/src/mage/cards/s/SternConstable.java +++ b/Mage.Sets/src/mage/cards/s/SternConstable.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCardInHand; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class SternConstable extends CardImpl { public SternConstable(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SternJudge.java b/Mage.Sets/src/mage/cards/s/SternJudge.java new file mode 100644 index 0000000000..d2b53b9b6b --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SternJudge.java @@ -0,0 +1,107 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.OneShotEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class SternJudge extends CardImpl { + + public SternJudge(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {tap}: Each player loses 1 life for each Swamp he or she controls. + this.addAbility(new SimpleActivatedAbility(new SternJudgeEffect(), new TapSourceCost())); + } + + public SternJudge(final SternJudge card) { + super(card); + } + + @Override + public SternJudge copy() { + return new SternJudge(this); + } +} + +class SternJudgeEffect extends OneShotEffect { + + private static final FilterPermanent filter = new FilterPermanent("Swamp"); + + static { + filter.add(new SubtypePredicate(SubType.SWAMP)); + } + + SternJudgeEffect() { + super(Outcome.Benefit); + this.staticText = "Each player loses 1 life for each Swamp he or she controls."; + } + + SternJudgeEffect(final SternJudgeEffect effect) { + super(effect); + } + + @Override + public SternJudgeEffect copy() { + return new SternJudgeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (UUID playerId : game.getState().getPlayersInRange(source.getSourceId(), game)) { + Player player = game.getPlayer(source.getSourceId()); + if (player != null) { + int lifeToLose = game.getBattlefield().getAllActivePermanents(filter, playerId, game).size(); + player.loseLife(lifeToLose, game, false); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SternMarshal.java b/Mage.Sets/src/mage/cards/s/SternMarshal.java index d0bd4340ee..c32f2ee12b 100644 --- a/Mage.Sets/src/mage/cards/s/SternMarshal.java +++ b/Mage.Sets/src/mage/cards/s/SternMarshal.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class SternMarshal extends CardImpl { public SternMarshal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SternMentor.java b/Mage.Sets/src/mage/cards/s/SternMentor.java index ef1e2ae820..2088d0d96a 100644 --- a/Mage.Sets/src/mage/cards/s/SternMentor.java +++ b/Mage.Sets/src/mage/cards/s/SternMentor.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.SoulbondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -51,8 +52,8 @@ public class SternMentor extends CardImpl { public SternMentor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SternProctor.java b/Mage.Sets/src/mage/cards/s/SternProctor.java index 7003d55225..203ccc3d04 100644 --- a/Mage.Sets/src/mage/cards/s/SternProctor.java +++ b/Mage.Sets/src/mage/cards/s/SternProctor.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.TargetPermanent; @@ -47,8 +48,8 @@ public class SternProctor extends CardImpl { public SternProctor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StewardOfSolidarity.java b/Mage.Sets/src/mage/cards/s/StewardOfSolidarity.java index 8f8f948145..be9d516428 100644 --- a/Mage.Sets/src/mage/cards/s/StewardOfSolidarity.java +++ b/Mage.Sets/src/mage/cards/s/StewardOfSolidarity.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.WarriorVigilantToken; @@ -50,8 +51,8 @@ public class StewardOfSolidarity extends CardImpl { public StewardOfSolidarity(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StewardOfValeron.java b/Mage.Sets/src/mage/cards/s/StewardOfValeron.java index d99f98c21e..1166468787 100644 --- a/Mage.Sets/src/mage/cards/s/StewardOfValeron.java +++ b/Mage.Sets/src/mage/cards/s/StewardOfValeron.java @@ -35,6 +35,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,9 +45,9 @@ public class StewardOfValeron extends CardImpl { public StewardOfValeron (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StigmaLasher.java b/Mage.Sets/src/mage/cards/s/StigmaLasher.java index 72db0bbe4b..0ddb272c38 100644 --- a/Mage.Sets/src/mage/cards/s/StigmaLasher.java +++ b/Mage.Sets/src/mage/cards/s/StigmaLasher.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -51,8 +52,8 @@ public class StigmaLasher extends CardImpl { public StigmaLasher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StillLife.java b/Mage.Sets/src/mage/cards/s/StillLife.java index 7674f28435..dd07546df2 100644 --- a/Mage.Sets/src/mage/cards/s/StillLife.java +++ b/Mage.Sets/src/mage/cards/s/StillLife.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -68,7 +69,7 @@ class StillLifeCentaur extends Token { public StillLifeCentaur() { super("Centaur", "4/3 Centaur creature token"); cardType.add(CardType.CREATURE); - subtype.add("Centaur"); + subtype.add(SubType.CENTAUR); power = new MageInt(4); toughness = new MageInt(3); } diff --git a/Mage.Sets/src/mage/cards/s/StillmoonCavalier.java b/Mage.Sets/src/mage/cards/s/StillmoonCavalier.java index 4bae434a69..b430077333 100644 --- a/Mage.Sets/src/mage/cards/s/StillmoonCavalier.java +++ b/Mage.Sets/src/mage/cards/s/StillmoonCavalier.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class StillmoonCavalier extends CardImpl { public StillmoonCavalier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W/B}{W/B}"); - this.subtype.add("Zombie"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StingerflingSpider.java b/Mage.Sets/src/mage/cards/s/StingerflingSpider.java index 60a6dacfdf..707a93246e 100644 --- a/Mage.Sets/src/mage/cards/s/StingerflingSpider.java +++ b/Mage.Sets/src/mage/cards/s/StingerflingSpider.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; import mage.target.common.TargetCreaturePermanent; @@ -55,7 +56,7 @@ public class StingerflingSpider extends CardImpl { public StingerflingSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/StingingBarrier.java b/Mage.Sets/src/mage/cards/s/StingingBarrier.java index d1706890f4..b281444e16 100644 --- a/Mage.Sets/src/mage/cards/s/StingingBarrier.java +++ b/Mage.Sets/src/mage/cards/s/StingingBarrier.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,7 +49,7 @@ public class StingingBarrier extends CardImpl { public StingingBarrier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StingingLicid.java b/Mage.Sets/src/mage/cards/s/StingingLicid.java index 0e1913d237..f95bdaa088 100644 --- a/Mage.Sets/src/mage/cards/s/StingingLicid.java +++ b/Mage.Sets/src/mage/cards/s/StingingLicid.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageAttachedControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; /** @@ -47,7 +48,7 @@ public class StingingLicid extends CardImpl { public StingingLicid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Licid"); + this.subtype.add(SubType.LICID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Stingmoggie.java b/Mage.Sets/src/mage/cards/s/Stingmoggie.java index ace3f9fa48..c714639552 100644 --- a/Mage.Sets/src/mage/cards/s/Stingmoggie.java +++ b/Mage.Sets/src/mage/cards/s/Stingmoggie.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.FilterPermanent; @@ -62,7 +63,7 @@ public class Stingmoggie extends CardImpl { public Stingmoggie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/Stingscourger.java b/Mage.Sets/src/mage/cards/s/Stingscourger.java index 7adb71238b..ff153d2735 100644 --- a/Mage.Sets/src/mage/cards/s/Stingscourger.java +++ b/Mage.Sets/src/mage/cards/s/Stingscourger.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -55,8 +56,8 @@ public class Stingscourger extends CardImpl { public Stingscourger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StinkdrinkerBandit.java b/Mage.Sets/src/mage/cards/s/StinkdrinkerBandit.java index 3b7808f3c1..dd8d1a346a 100644 --- a/Mage.Sets/src/mage/cards/s/StinkdrinkerBandit.java +++ b/Mage.Sets/src/mage/cards/s/StinkdrinkerBandit.java @@ -62,8 +62,8 @@ public class StinkdrinkerBandit extends CardImpl { public StinkdrinkerBandit(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StinkdrinkerDaredevil.java b/Mage.Sets/src/mage/cards/s/StinkdrinkerDaredevil.java index 9ba3cede77..7f8e0d5e55 100644 --- a/Mage.Sets/src/mage/cards/s/StinkdrinkerDaredevil.java +++ b/Mage.Sets/src/mage/cards/s/StinkdrinkerDaredevil.java @@ -53,8 +53,8 @@ public class StinkdrinkerDaredevil extends CardImpl { public StinkdrinkerDaredevil(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StinkweedImp.java b/Mage.Sets/src/mage/cards/s/StinkweedImp.java index 1be8e10db6..d0755e68d8 100644 --- a/Mage.Sets/src/mage/cards/s/StinkweedImp.java +++ b/Mage.Sets/src/mage/cards/s/StinkweedImp.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class StinkweedImp extends CardImpl { public StinkweedImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StirringWildwood.java b/Mage.Sets/src/mage/cards/s/StirringWildwood.java index f337e02093..f534e1a1d9 100644 --- a/Mage.Sets/src/mage/cards/s/StirringWildwood.java +++ b/Mage.Sets/src/mage/cards/s/StirringWildwood.java @@ -40,6 +40,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -74,7 +75,7 @@ class StirringWildwoodToken extends Token { public StirringWildwoodToken() { super("", "3/4 green and white Elemental creature with reach"); cardType.add(CardType.CREATURE); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); color.setGreen(true); color.setWhite(true); power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StitchedDrake.java b/Mage.Sets/src/mage/cards/s/StitchedDrake.java index c225033268..b23d24091f 100644 --- a/Mage.Sets/src/mage/cards/s/StitchedDrake.java +++ b/Mage.Sets/src/mage/cards/s/StitchedDrake.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; @@ -44,8 +45,8 @@ public class StitchedDrake extends CardImpl { public StitchedDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Drake"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StitchedMangler.java b/Mage.Sets/src/mage/cards/s/StitchedMangler.java index 03c0b65775..d876c86b38 100644 --- a/Mage.Sets/src/mage/cards/s/StitchedMangler.java +++ b/Mage.Sets/src/mage/cards/s/StitchedMangler.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -56,8 +57,8 @@ public class StitchedMangler extends CardImpl { public StitchedMangler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StitcherGeralf.java b/Mage.Sets/src/mage/cards/s/StitcherGeralf.java index 6f4d0b54d5..b8dba15a73 100644 --- a/Mage.Sets/src/mage/cards/s/StitcherGeralf.java +++ b/Mage.Sets/src/mage/cards/s/StitcherGeralf.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -55,8 +56,8 @@ public class StitcherGeralf extends CardImpl { public StitcherGeralf(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StitchersApprentice.java b/Mage.Sets/src/mage/cards/s/StitchersApprentice.java index bb8d4d320e..a26f562cf7 100644 --- a/Mage.Sets/src/mage/cards/s/StitchersApprentice.java +++ b/Mage.Sets/src/mage/cards/s/StitchersApprentice.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -56,7 +57,7 @@ public class StitchersApprentice extends CardImpl { public StitchersApprentice(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Homunculus"); + this.subtype.add(SubType.HOMUNCULUS); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StitchersGraft.java b/Mage.Sets/src/mage/cards/s/StitchersGraft.java index b3e8e90fe7..bf71a08bee 100644 --- a/Mage.Sets/src/mage/cards/s/StitchersGraft.java +++ b/Mage.Sets/src/mage/cards/s/StitchersGraft.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class StitchersGraft extends CardImpl { public StitchersGraft(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +3/+3. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 3))); diff --git a/Mage.Sets/src/mage/cards/s/StitchwingSkaab.java b/Mage.Sets/src/mage/cards/s/StitchwingSkaab.java index a8658f8f45..820f440633 100644 --- a/Mage.Sets/src/mage/cards/s/StitchwingSkaab.java +++ b/Mage.Sets/src/mage/cards/s/StitchwingSkaab.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.target.common.TargetCardInHand; @@ -50,8 +51,8 @@ public class StitchwingSkaab extends CardImpl { public StitchwingSkaab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StoicAngel.java b/Mage.Sets/src/mage/cards/s/StoicAngel.java index c01889827c..54a8d8bb64 100644 --- a/Mage.Sets/src/mage/cards/s/StoicAngel.java +++ b/Mage.Sets/src/mage/cards/s/StoicAngel.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -52,7 +53,7 @@ public class StoicAngel extends CardImpl { public StoicAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}{U}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StoicBuilder.java b/Mage.Sets/src/mage/cards/s/StoicBuilder.java index e437f98c9e..ecf07a7117 100644 --- a/Mage.Sets/src/mage/cards/s/StoicBuilder.java +++ b/Mage.Sets/src/mage/cards/s/StoicBuilder.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterLandCard; import mage.target.common.TargetCardInYourGraveyard; @@ -46,7 +47,7 @@ public class StoicBuilder extends CardImpl { public StoicBuilder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StoicChampion.java b/Mage.Sets/src/mage/cards/s/StoicChampion.java index 2b4ed16148..144820f97d 100644 --- a/Mage.Sets/src/mage/cards/s/StoicChampion.java +++ b/Mage.Sets/src/mage/cards/s/StoicChampion.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,8 +45,8 @@ public class StoicChampion extends CardImpl { public StoicChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StoicEphemera.java b/Mage.Sets/src/mage/cards/s/StoicEphemera.java index 278997c297..9587de28d8 100644 --- a/Mage.Sets/src/mage/cards/s/StoicEphemera.java +++ b/Mage.Sets/src/mage/cards/s/StoicEphemera.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ import mage.constants.CardType; public class StoicEphemera extends CardImpl { public StoicEphemera(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Spirit"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(5); @@ -56,8 +57,11 @@ public class StoicEphemera extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // When Stoic Ephemera blocks, sacrifice it at end of combat. - this.addAbility(new BlocksTriggeredAbility(new CreateDelayedTriggeredAbilityEffect( - new AtTheEndOfCombatDelayedTriggeredAbility(new SacrificeSourceEffect())), false)); + this.addAbility(new BlocksTriggeredAbility( + new CreateDelayedTriggeredAbilityEffect( + new AtTheEndOfCombatDelayedTriggeredAbility(new SacrificeSourceEffect()) + ), false, false, true + )); } public StoicEphemera(final StoicEphemera card) { diff --git a/Mage.Sets/src/mage/cards/s/StolenIdentity.java b/Mage.Sets/src/mage/cards/s/StolenIdentity.java index fb5856e320..3a0d8a23f3 100644 --- a/Mage.Sets/src/mage/cards/s/StolenIdentity.java +++ b/Mage.Sets/src/mage/cards/s/StolenIdentity.java @@ -29,7 +29,7 @@ package mage.cards.s; import java.util.UUID; import mage.abilities.effects.common.CipherEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -54,7 +54,7 @@ public class StolenIdentity extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{U}{U}"); // Create a token that's a copy of target artifact or creature. - this.getSpellAbility().addEffect(new PutTokenOntoBattlefieldCopyTargetEffect()); + this.getSpellAbility().addEffect(new CreateTokenCopyTargetEffect()); this.getSpellAbility().addTarget(new TargetPermanent(filter)); // Cipher this.getSpellAbility().addEffect(new CipherEffect()); diff --git a/Mage.Sets/src/mage/cards/s/StomperCub.java b/Mage.Sets/src/mage/cards/s/StomperCub.java index bafbf0bbc6..575a24befe 100644 --- a/Mage.Sets/src/mage/cards/s/StomperCub.java +++ b/Mage.Sets/src/mage/cards/s/StomperCub.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class StomperCub extends CardImpl { public StomperCub (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StompingGround.java b/Mage.Sets/src/mage/cards/s/StompingGround.java index 9d5bc33cfd..3ceff54012 100644 --- a/Mage.Sets/src/mage/cards/s/StompingGround.java +++ b/Mage.Sets/src/mage/cards/s/StompingGround.java @@ -36,6 +36,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,14 +45,13 @@ import mage.constants.CardType; public class StompingGround extends CardImpl { public StompingGround(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - this.subtype.add("Mountain"); - this.subtype.add("Forest"); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); + this.subtype.add(SubType.MOUNTAIN); + this.subtype.add(SubType.FOREST); + this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); this.addAbility(new RedManaAbility()); this.addAbility(new GreenManaAbility()); - this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), - "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); } public StompingGround(final StompingGround card) { diff --git a/Mage.Sets/src/mage/cards/s/StoneCatapult.java b/Mage.Sets/src/mage/cards/s/StoneCatapult.java index 95596ebcba..8bb0730d23 100644 --- a/Mage.Sets/src/mage/cards/s/StoneCatapult.java +++ b/Mage.Sets/src/mage/cards/s/StoneCatapult.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -60,8 +61,8 @@ public class StoneCatapult extends CardImpl { public StoneCatapult(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StoneGiant.java b/Mage.Sets/src/mage/cards/s/StoneGiant.java index 49f12f1966..62304f3f38 100644 --- a/Mage.Sets/src/mage/cards/s/StoneGiant.java +++ b/Mage.Sets/src/mage/cards/s/StoneGiant.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -53,7 +54,7 @@ public class StoneGiant extends CardImpl { public StoneGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StoneGolem.java b/Mage.Sets/src/mage/cards/s/StoneGolem.java index 81e03e5b78..4cbf18c5d1 100644 --- a/Mage.Sets/src/mage/cards/s/StoneGolem.java +++ b/Mage.Sets/src/mage/cards/s/StoneGolem.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class StoneGolem extends CardImpl { public StoneGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StoneHavenMedic.java b/Mage.Sets/src/mage/cards/s/StoneHavenMedic.java index 2e391ad7b2..8babbb0a06 100644 --- a/Mage.Sets/src/mage/cards/s/StoneHavenMedic.java +++ b/Mage.Sets/src/mage/cards/s/StoneHavenMedic.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class StoneHavenMedic extends CardImpl { public StoneHavenMedic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StoneHavenOutfitter.java b/Mage.Sets/src/mage/cards/s/StoneHavenOutfitter.java index cb437d0962..488b0072ee 100644 --- a/Mage.Sets/src/mage/cards/s/StoneHavenOutfitter.java +++ b/Mage.Sets/src/mage/cards/s/StoneHavenOutfitter.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -58,9 +59,9 @@ public class StoneHavenOutfitter extends CardImpl { public StoneHavenOutfitter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Artificer"); - this.subtype.add("Ally"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.ARTIFICER); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StoneKavu.java b/Mage.Sets/src/mage/cards/s/StoneKavu.java index 873f0111ca..6a3cee2183 100644 --- a/Mage.Sets/src/mage/cards/s/StoneKavu.java +++ b/Mage.Sets/src/mage/cards/s/StoneKavu.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class StoneKavu extends CardImpl { public StoneKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StoneSeederHierophant.java b/Mage.Sets/src/mage/cards/s/StoneSeederHierophant.java index ccc7522cf6..a7a50a1753 100644 --- a/Mage.Sets/src/mage/cards/s/StoneSeederHierophant.java +++ b/Mage.Sets/src/mage/cards/s/StoneSeederHierophant.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.target.Target; @@ -51,8 +52,8 @@ public class StoneSeederHierophant extends CardImpl { public StoneSeederHierophant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StoneSpirit.java b/Mage.Sets/src/mage/cards/s/StoneSpirit.java index 8a528d9d63..cfd3be56e0 100644 --- a/Mage.Sets/src/mage/cards/s/StoneSpirit.java +++ b/Mage.Sets/src/mage/cards/s/StoneSpirit.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -53,8 +54,8 @@ public class StoneSpirit extends CardImpl { public StoneSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StoneThrowingDevils.java b/Mage.Sets/src/mage/cards/s/StoneThrowingDevils.java index 10ee2e23bf..647f80a5f9 100644 --- a/Mage.Sets/src/mage/cards/s/StoneThrowingDevils.java +++ b/Mage.Sets/src/mage/cards/s/StoneThrowingDevils.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class StoneThrowingDevils extends CardImpl { public StoneThrowingDevils(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StoneTongueBasilisk.java b/Mage.Sets/src/mage/cards/s/StoneTongueBasilisk.java index e4d49446b0..4aca643c0a 100644 --- a/Mage.Sets/src/mage/cards/s/StoneTongueBasilisk.java +++ b/Mage.Sets/src/mage/cards/s/StoneTongueBasilisk.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -53,7 +54,7 @@ public class StoneTongueBasilisk extends CardImpl { public StoneTongueBasilisk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}{G}"); - this.subtype.add("Basilisk"); + this.subtype.add(SubType.BASILISK); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/StonebrowKrosanHero.java b/Mage.Sets/src/mage/cards/s/StonebrowKrosanHero.java index 34a3d38057..2211de10e7 100644 --- a/Mage.Sets/src/mage/cards/s/StonebrowKrosanHero.java +++ b/Mage.Sets/src/mage/cards/s/StonebrowKrosanHero.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.filter.common.FilterControlledCreaturePermanent; @@ -55,8 +56,8 @@ public class StonebrowKrosanHero extends CardImpl { public StonebrowKrosanHero(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Centaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/Stonecloaker.java b/Mage.Sets/src/mage/cards/s/Stonecloaker.java index 12fb179619..272928f9f7 100644 --- a/Mage.Sets/src/mage/cards/s/Stonecloaker.java +++ b/Mage.Sets/src/mage/cards/s/Stonecloaker.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.target.common.TargetCardInGraveyard; @@ -49,7 +50,7 @@ public class Stonecloaker extends CardImpl { public Stonecloaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Gargoyle"); + this.subtype.add(SubType.GARGOYLE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StonefareCrocodile.java b/Mage.Sets/src/mage/cards/s/StonefareCrocodile.java index e20978dca5..906d4ae3c6 100644 --- a/Mage.Sets/src/mage/cards/s/StonefareCrocodile.java +++ b/Mage.Sets/src/mage/cards/s/StonefareCrocodile.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class StonefareCrocodile extends CardImpl { public StonefareCrocodile(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Crocodile"); + this.subtype.add(SubType.CROCODILE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StoneforgeAcolyte.java b/Mage.Sets/src/mage/cards/s/StoneforgeAcolyte.java index e8b9ac002a..d99e9ebbba 100644 --- a/Mage.Sets/src/mage/cards/s/StoneforgeAcolyte.java +++ b/Mage.Sets/src/mage/cards/s/StoneforgeAcolyte.java @@ -65,9 +65,9 @@ public class StoneforgeAcolyte extends CardImpl { public StoneforgeAcolyte(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Kor"); - this.subtype.add("Artificer"); - this.subtype.add("Ally"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.ARTIFICER); + this.subtype.add(SubType.ALLY); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StoneforgeMasterwork.java b/Mage.Sets/src/mage/cards/s/StoneforgeMasterwork.java index 2d7618c94e..561d2cdd7c 100644 --- a/Mage.Sets/src/mage/cards/s/StoneforgeMasterwork.java +++ b/Mage.Sets/src/mage/cards/s/StoneforgeMasterwork.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -52,7 +53,7 @@ public class StoneforgeMasterwork extends CardImpl { public StoneforgeMasterwork(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1 for each other creature you control that shares a creature type with it. StoneforgeMasterworkDynamicValue countEnchantments = new StoneforgeMasterworkDynamicValue(); diff --git a/Mage.Sets/src/mage/cards/s/StoneforgeMystic.java b/Mage.Sets/src/mage/cards/s/StoneforgeMystic.java index 1d3c6c6f86..d8bc4e7b8c 100644 --- a/Mage.Sets/src/mage/cards/s/StoneforgeMystic.java +++ b/Mage.Sets/src/mage/cards/s/StoneforgeMystic.java @@ -60,8 +60,8 @@ public class StoneforgeMystic extends CardImpl { public StoneforgeMystic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Stonehands.java b/Mage.Sets/src/mage/cards/s/Stonehands.java index 45c5254155..2d942f54d0 100644 --- a/Mage.Sets/src/mage/cards/s/Stonehands.java +++ b/Mage.Sets/src/mage/cards/s/Stonehands.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Outcome; @@ -53,7 +54,7 @@ public class Stonehands extends CardImpl { public Stonehands(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/StonehewerGiant.java b/Mage.Sets/src/mage/cards/s/StonehewerGiant.java index 3b794bb285..540f8488f4 100644 --- a/Mage.Sets/src/mage/cards/s/StonehewerGiant.java +++ b/Mage.Sets/src/mage/cards/s/StonehewerGiant.java @@ -59,8 +59,8 @@ public class StonehewerGiant extends CardImpl { public StonehewerGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StonehoofChieftain.java b/Mage.Sets/src/mage/cards/s/StonehoofChieftain.java index 22feebc250..7d1afdc4ff 100644 --- a/Mage.Sets/src/mage/cards/s/StonehoofChieftain.java +++ b/Mage.Sets/src/mage/cards/s/StonehoofChieftain.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SetTargetPointer; import mage.constants.TargetController; @@ -60,8 +61,8 @@ public class StonehoofChieftain extends CardImpl { public StonehoofChieftain(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{7}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/s/StonehornChanter.java b/Mage.Sets/src/mage/cards/s/StonehornChanter.java index 1204cf2ee1..4cb9dd8813 100644 --- a/Mage.Sets/src/mage/cards/s/StonehornChanter.java +++ b/Mage.Sets/src/mage/cards/s/StonehornChanter.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class StonehornChanter extends CardImpl { public StonehornChanter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Rhino"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.RHINO); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StonehornDignitary.java b/Mage.Sets/src/mage/cards/s/StonehornDignitary.java index 57bb0bda9f..c67f5026b6 100644 --- a/Mage.Sets/src/mage/cards/s/StonehornDignitary.java +++ b/Mage.Sets/src/mage/cards/s/StonehornDignitary.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.SkipNextCombatEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetOpponent; /** @@ -45,8 +46,8 @@ public class StonehornDignitary extends CardImpl { public StonehornDignitary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Rhino"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.RHINO); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StoneshakerShaman.java b/Mage.Sets/src/mage/cards/s/StoneshakerShaman.java index c5bf2833de..49c7b4fe8f 100644 --- a/Mage.Sets/src/mage/cards/s/StoneshakerShaman.java +++ b/Mage.Sets/src/mage/cards/s/StoneshakerShaman.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; @@ -53,8 +54,8 @@ public class StoneshakerShaman extends CardImpl { public StoneshakerShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StoneshockGiant.java b/Mage.Sets/src/mage/cards/s/StoneshockGiant.java index bfa392243e..5748e88d7c 100644 --- a/Mage.Sets/src/mage/cards/s/StoneshockGiant.java +++ b/Mage.Sets/src/mage/cards/s/StoneshockGiant.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MonstrosityAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -57,7 +58,7 @@ public class StoneshockGiant extends CardImpl { public StoneshockGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StonewingAntagonizer.java b/Mage.Sets/src/mage/cards/s/StonewingAntagonizer.java index c952e4a37b..68fc709e1f 100644 --- a/Mage.Sets/src/mage/cards/s/StonewingAntagonizer.java +++ b/Mage.Sets/src/mage/cards/s/StonewingAntagonizer.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class StonewingAntagonizer extends CardImpl { public StonewingAntagonizer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},""); - this.subtype.add("Gargoyle"); - this.subtype.add("Horror"); + this.subtype.add(SubType.GARGOYLE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StonewiseFortifier.java b/Mage.Sets/src/mage/cards/s/StonewiseFortifier.java index 772587ec89..991c6721ac 100644 --- a/Mage.Sets/src/mage/cards/s/StonewiseFortifier.java +++ b/Mage.Sets/src/mage/cards/s/StonewiseFortifier.java @@ -37,6 +37,7 @@ import mage.abilities.effects.PreventionEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -51,8 +52,8 @@ public class StonewiseFortifier extends CardImpl { public StonewiseFortifier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StonewoodInvoker.java b/Mage.Sets/src/mage/cards/s/StonewoodInvoker.java index 7ea2d9890e..c1ede8dbed 100644 --- a/Mage.Sets/src/mage/cards/s/StonewoodInvoker.java +++ b/Mage.Sets/src/mage/cards/s/StonewoodInvoker.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,8 +47,8 @@ public class StonewoodInvoker extends CardImpl { public StonewoodInvoker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StoneworkPuma.java b/Mage.Sets/src/mage/cards/s/StoneworkPuma.java index bd1f772e39..08b58c05be 100644 --- a/Mage.Sets/src/mage/cards/s/StoneworkPuma.java +++ b/Mage.Sets/src/mage/cards/s/StoneworkPuma.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class StoneworkPuma extends CardImpl { public StoneworkPuma(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Cat"); - this.subtype.add("Ally"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/Stonewright.java b/Mage.Sets/src/mage/cards/s/Stonewright.java index e43810961b..8cef8beb30 100644 --- a/Mage.Sets/src/mage/cards/s/Stonewright.java +++ b/Mage.Sets/src/mage/cards/s/Stonewright.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.SoulbondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class Stonewright extends CardImpl { public Stonewright(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StonybrookAngler.java b/Mage.Sets/src/mage/cards/s/StonybrookAngler.java index 93d9c73ea0..e85d37bfff 100644 --- a/Mage.Sets/src/mage/cards/s/StonybrookAngler.java +++ b/Mage.Sets/src/mage/cards/s/StonybrookAngler.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.MayTapOrUntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class StonybrookAngler extends CardImpl { public StonybrookAngler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StonybrookBanneret.java b/Mage.Sets/src/mage/cards/s/StonybrookBanneret.java index 92cbf53962..fb3a4db70c 100644 --- a/Mage.Sets/src/mage/cards/s/StonybrookBanneret.java +++ b/Mage.Sets/src/mage/cards/s/StonybrookBanneret.java @@ -57,8 +57,8 @@ public class StonybrookBanneret extends CardImpl { public StonybrookBanneret(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StonybrookSchoolmaster.java b/Mage.Sets/src/mage/cards/s/StonybrookSchoolmaster.java index d9277eb19e..48b4d4378d 100644 --- a/Mage.Sets/src/mage/cards/s/StonybrookSchoolmaster.java +++ b/Mage.Sets/src/mage/cards/s/StonybrookSchoolmaster.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.MerfolkWizardToken; /** @@ -44,8 +45,8 @@ public class StonybrookSchoolmaster extends CardImpl { public StonybrookSchoolmaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StormCrow.java b/Mage.Sets/src/mage/cards/s/StormCrow.java index f48cf25f24..24a633b186 100644 --- a/Mage.Sets/src/mage/cards/s/StormCrow.java +++ b/Mage.Sets/src/mage/cards/s/StormCrow.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class StormCrow extends CardImpl { public StormCrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StormEntity.java b/Mage.Sets/src/mage/cards/s/StormEntity.java index ccd54edfba..ae7877180e 100644 --- a/Mage.Sets/src/mage/cards/s/StormEntity.java +++ b/Mage.Sets/src/mage/cards/s/StormEntity.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.game.Game; import mage.watchers.common.CastSpellLastTurnWatcher; @@ -50,7 +51,7 @@ public class StormEntity extends CardImpl { public StormEntity(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StormFleetAerialist.java b/Mage.Sets/src/mage/cards/s/StormFleetAerialist.java new file mode 100644 index 0000000000..c62904dbd1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/StormFleetAerialist.java @@ -0,0 +1,76 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * + * @author TheElk801 + */ +public class StormFleetAerialist extends CardImpl { + + public StormFleetAerialist(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Raid - Storm Fleet Aerialist enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1), false), + RaidCondition.instance, + "Raid - {this} enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn.", + "{this} enters the battlefield with a +1/+1 counter"), + new PlayerAttackedWatcher()); + } + + public StormFleetAerialist(final StormFleetAerialist card) { + super(card); + } + + @Override + public StormFleetAerialist copy() { + return new StormFleetAerialist(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/StormFleetArsonist.java b/Mage.Sets/src/mage/cards/s/StormFleetArsonist.java new file mode 100644 index 0000000000..6988f647e3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/StormFleetArsonist.java @@ -0,0 +1,76 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.SacrificeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.target.common.TargetOpponent; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * + * @author TheElk801 + */ +public class StormFleetArsonist extends CardImpl { + + public StormFleetArsonist(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); + + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Raid - When Storm Fleet Arsonist enters the battlefield, if you attacked with a creature this turn, target opponent sacrifices a permanent. + Ability ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new SacrificeEffect(new FilterPermanent(), 1, "Target opponent")), + RaidCondition.instance, + "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, target opponent sacrifices a permanent."); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability, new PlayerAttackedWatcher()); + } + + public StormFleetArsonist(final StormFleetArsonist card) { + super(card); + } + + @Override + public StormFleetArsonist copy() { + return new StormFleetArsonist(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/StormFleetPyromancer.java b/Mage.Sets/src/mage/cards/s/StormFleetPyromancer.java new file mode 100644 index 0000000000..471c04af6c --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/StormFleetPyromancer.java @@ -0,0 +1,76 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.target.common.TargetCreatureOrPlayer; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * + * @author LevelX2 + */ +public class StormFleetPyromancer extends CardImpl { + + public StormFleetPyromancer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Raid - When Storm Fleet Pyromancer enters the battlefield, if you attacked with a creature this turn, Storm Fleet Pyromancer deals 2 damage to target creature or player. + Ability ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2)), + RaidCondition.instance, + "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, {this} deals 2 damage to target creature or player."); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability, new PlayerAttackedWatcher()); + } + + public StormFleetPyromancer(final StormFleetPyromancer card) { + super(card); + } + + @Override + public StormFleetPyromancer copy() { + return new StormFleetPyromancer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/StormFleetSpy.java b/Mage.Sets/src/mage/cards/s/StormFleetSpy.java new file mode 100644 index 0000000000..a925ad7d9e --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/StormFleetSpy.java @@ -0,0 +1,73 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * + * @author LevelX2 + */ +public class StormFleetSpy extends CardImpl { + + public StormFleetSpy(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Raid — When Storm Fleet Spy enters the battlefield, if you attacked with a creature this turn, draw a card. + Ability ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)), + RaidCondition.instance, + "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, draw a card."); + this.addAbility(ability, new PlayerAttackedWatcher()); + } + + public StormFleetSpy(final StormFleetSpy card) { + super(card); + } + + @Override + public StormFleetSpy copy() { + return new StormFleetSpy(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/StormSculptor.java b/Mage.Sets/src/mage/cards/s/StormSculptor.java new file mode 100644 index 0000000000..7ba9bdf056 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/StormSculptor.java @@ -0,0 +1,70 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect; +import mage.abilities.keyword.CantBeBlockedSourceAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class StormSculptor extends CardImpl { + + public StormSculptor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Storm Sculptor can't be blocked. + this.addAbility(new CantBeBlockedSourceAbility()); + + // When Storm Sculptor enters the battlefield, return a creature you control to its owner's hand. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(new FilterControlledCreaturePermanent()))); + } + + public StormSculptor(final StormSculptor card) { + super(card); + } + + @Override + public StormSculptor copy() { + return new StormSculptor(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/StormShaman.java b/Mage.Sets/src/mage/cards/s/StormShaman.java index 6cea2ced62..d73763046a 100644 --- a/Mage.Sets/src/mage/cards/s/StormShaman.java +++ b/Mage.Sets/src/mage/cards/s/StormShaman.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,9 +48,9 @@ public class StormShaman extends CardImpl { public StormShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StormSpirit.java b/Mage.Sets/src/mage/cards/s/StormSpirit.java index 93ed4e1f2b..4333bc27f3 100644 --- a/Mage.Sets/src/mage/cards/s/StormSpirit.java +++ b/Mage.Sets/src/mage/cards/s/StormSpirit.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class StormSpirit extends CardImpl { public StormSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{W}{U}"); - this.subtype.add("Elemental"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StormbloodBerserker.java b/Mage.Sets/src/mage/cards/s/StormbloodBerserker.java index 77fbc4d580..4970f4f179 100644 --- a/Mage.Sets/src/mage/cards/s/StormbloodBerserker.java +++ b/Mage.Sets/src/mage/cards/s/StormbloodBerserker.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author nantuko @@ -42,8 +43,8 @@ public class StormbloodBerserker extends CardImpl { public StormbloodBerserker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StormboundGeist.java b/Mage.Sets/src/mage/cards/s/StormboundGeist.java index b70cde3a89..57cc2c6ea9 100644 --- a/Mage.Sets/src/mage/cards/s/StormboundGeist.java +++ b/Mage.Sets/src/mage/cards/s/StormboundGeist.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.UndyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -43,7 +44,7 @@ public class StormboundGeist extends CardImpl { public StormboundGeist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StormbreathDragon.java b/Mage.Sets/src/mage/cards/s/StormbreathDragon.java index a09cd638a4..2d95adef18 100644 --- a/Mage.Sets/src/mage/cards/s/StormbreathDragon.java +++ b/Mage.Sets/src/mage/cards/s/StormbreathDragon.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -52,7 +53,7 @@ public class StormbreathDragon extends CardImpl { public StormbreathDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StormcallerOfKeranos.java b/Mage.Sets/src/mage/cards/s/StormcallerOfKeranos.java index 8b3211afa7..eb89532ce6 100644 --- a/Mage.Sets/src/mage/cards/s/StormcallerOfKeranos.java +++ b/Mage.Sets/src/mage/cards/s/StormcallerOfKeranos.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class StormcallerOfKeranos extends CardImpl { public StormcallerOfKeranos(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StormchaserChimera.java b/Mage.Sets/src/mage/cards/s/StormchaserChimera.java index bad7426b1f..7b0f5701a4 100644 --- a/Mage.Sets/src/mage/cards/s/StormchaserChimera.java +++ b/Mage.Sets/src/mage/cards/s/StormchaserChimera.java @@ -42,6 +42,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class StormchaserChimera extends CardImpl { public StormchaserChimera(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{R}"); - this.subtype.add("Chimera"); + this.subtype.add(SubType.CHIMERA); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StormchaserMage.java b/Mage.Sets/src/mage/cards/s/StormchaserMage.java index 21e7e2d879..ac62eb93b7 100644 --- a/Mage.Sets/src/mage/cards/s/StormchaserMage.java +++ b/Mage.Sets/src/mage/cards/s/StormchaserMage.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class StormchaserMage extends CardImpl { public StormchaserMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StormcloudDjinn.java b/Mage.Sets/src/mage/cards/s/StormcloudDjinn.java index 8791bc787e..70c509b944 100644 --- a/Mage.Sets/src/mage/cards/s/StormcloudDjinn.java +++ b/Mage.Sets/src/mage/cards/s/StormcloudDjinn.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class StormcloudDjinn extends CardImpl { public StormcloudDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StormcragElemental.java b/Mage.Sets/src/mage/cards/s/StormcragElemental.java index bb176f351d..c8d1a6e117 100644 --- a/Mage.Sets/src/mage/cards/s/StormcragElemental.java +++ b/Mage.Sets/src/mage/cards/s/StormcragElemental.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class StormcragElemental extends CardImpl { public StormcragElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/StormfrontPegasus.java b/Mage.Sets/src/mage/cards/s/StormfrontPegasus.java index c1ea6f3fa8..82af207619 100644 --- a/Mage.Sets/src/mage/cards/s/StormfrontPegasus.java +++ b/Mage.Sets/src/mage/cards/s/StormfrontPegasus.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class StormfrontPegasus extends CardImpl { public StormfrontPegasus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Pegasus"); + this.subtype.add(SubType.PEGASUS); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StormfrontRiders.java b/Mage.Sets/src/mage/cards/s/StormfrontRiders.java index ba5d10971c..ed9fb2d07f 100644 --- a/Mage.Sets/src/mage/cards/s/StormfrontRiders.java +++ b/Mage.Sets/src/mage/cards/s/StormfrontRiders.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -58,8 +59,8 @@ public class StormfrontRiders extends CardImpl { public StormfrontRiders(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StormriderRig.java b/Mage.Sets/src/mage/cards/s/StormriderRig.java index 2df8a298ad..740d3e3025 100644 --- a/Mage.Sets/src/mage/cards/s/StormriderRig.java +++ b/Mage.Sets/src/mage/cards/s/StormriderRig.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.constants.Zone; @@ -49,20 +50,20 @@ import mage.filter.common.FilterControlledCreaturePermanent; public class StormriderRig extends CardImpl { public StormriderRig(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); - + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); + // Whenever a creature enters the battlefield under your control, you may attach Stormrider Rig to it. this.addAbility(new EntersBattlefieldAllTriggeredAbility( Zone.BATTLEFIELD, new AttachEffect(Outcome.Detriment, "attach {source} to it"), - new FilterControlledCreaturePermanent(), true, SetTargetPointer.PERMANENT, null, true)); - + new FilterControlledCreaturePermanent("a creature"), true, SetTargetPointer.PERMANENT, null, true)); + // Equip {2} - this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2))); - + this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2))); + } public StormriderRig(final StormriderRig card) { diff --git a/Mage.Sets/src/mage/cards/s/StormriderSpirit.java b/Mage.Sets/src/mage/cards/s/StormriderSpirit.java index fa6eb56855..bcf885c22c 100644 --- a/Mage.Sets/src/mage/cards/s/StormriderSpirit.java +++ b/Mage.Sets/src/mage/cards/s/StormriderSpirit.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class StormriderSpirit extends CardImpl { public StormriderSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StormscapeApprentice.java b/Mage.Sets/src/mage/cards/s/StormscapeApprentice.java index d053472a0a..008b70611c 100644 --- a/Mage.Sets/src/mage/cards/s/StormscapeApprentice.java +++ b/Mage.Sets/src/mage/cards/s/StormscapeApprentice.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; @@ -51,8 +52,8 @@ public class StormscapeApprentice extends CardImpl { public StormscapeApprentice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StormscapeBattlemage.java b/Mage.Sets/src/mage/cards/s/StormscapeBattlemage.java index 2fd0ede846..fe4b5ab6cf 100644 --- a/Mage.Sets/src/mage/cards/s/StormscapeBattlemage.java +++ b/Mage.Sets/src/mage/cards/s/StormscapeBattlemage.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -58,8 +59,8 @@ public class StormscapeBattlemage extends CardImpl { public StormscapeBattlemage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Metathran"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.METATHRAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StormscapeFamiliar.java b/Mage.Sets/src/mage/cards/s/StormscapeFamiliar.java index 235b8d2163..36f745d01a 100644 --- a/Mage.Sets/src/mage/cards/s/StormscapeFamiliar.java +++ b/Mage.Sets/src/mage/cards/s/StormscapeFamiliar.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; @@ -57,7 +58,7 @@ public class StormscapeFamiliar extends CardImpl { public StormscapeFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StormscapeMaster.java b/Mage.Sets/src/mage/cards/s/StormscapeMaster.java index 24aeb4e997..2fc0a0097e 100644 --- a/Mage.Sets/src/mage/cards/s/StormscapeMaster.java +++ b/Mage.Sets/src/mage/cards/s/StormscapeMaster.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.continuous.GainProtectionFromColorTargetEff import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -48,14 +49,14 @@ import mage.target.common.TargetCreaturePermanent; /** * * @author LoneFox - + * */ public class StormscapeMaster extends CardImpl { public StormscapeMaster(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -69,7 +70,7 @@ public class StormscapeMaster extends CardImpl { // {B}{B}, {T}: Target player loses 2 life and you gain 2 life. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2), new ManaCostsImpl("{B}{B}")); - ability.addEffect(new GainLifeEffect(2)); + ability.addEffect(new GainLifeEffect(2).setText("and you gain 2 life")); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetPlayer()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/s/StormsurgeKraken.java b/Mage.Sets/src/mage/cards/s/StormsurgeKraken.java index fba12018bc..f330231c46 100644 --- a/Mage.Sets/src/mage/cards/s/StormsurgeKraken.java +++ b/Mage.Sets/src/mage/cards/s/StormsurgeKraken.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -48,7 +49,7 @@ public class StormsurgeKraken extends CardImpl { public StormsurgeKraken(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Kraken"); + this.subtype.add(SubType.KRAKEN); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/StormtideLeviathan.java b/Mage.Sets/src/mage/cards/s/StormtideLeviathan.java index 3542571038..86bbf54402 100644 --- a/Mage.Sets/src/mage/cards/s/StormtideLeviathan.java +++ b/Mage.Sets/src/mage/cards/s/StormtideLeviathan.java @@ -40,6 +40,7 @@ import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -67,7 +68,7 @@ public class StormtideLeviathan extends CardImpl { public StormtideLeviathan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}{U}"); - this.subtype.add("Leviathan"); + this.subtype.add(SubType.LEVIATHAN); this.power = new MageInt(8); this.toughness = new MageInt(8); @@ -113,8 +114,8 @@ class StormtideLeviathanEffect extends ContinuousEffectImpl { for (Permanent land : game.getBattlefield().getActivePermanents(new FilterLandPermanent(), source.getControllerId(), game)) { switch (layer) { case TypeChangingEffects_4: - if (!land.getSubtype(game).contains("Island")) { - land.getSubtype(game).add("Island"); + if (!land.hasSubtype(SubType.ISLAND, game)) { + land.getSubtype(game).add(SubType.ISLAND); } break; case AbilityAddingRemovingEffects_6: diff --git a/Mage.Sets/src/mage/cards/s/StormwatchEagle.java b/Mage.Sets/src/mage/cards/s/StormwatchEagle.java index 49917da683..beb57eb29a 100644 --- a/Mage.Sets/src/mage/cards/s/StormwatchEagle.java +++ b/Mage.Sets/src/mage/cards/s/StormwatchEagle.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.target.common.TargetControlledPermanent; @@ -48,7 +49,7 @@ public class StormwatchEagle extends CardImpl { public StormwatchEagle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StormwingDragon.java b/Mage.Sets/src/mage/cards/s/StormwingDragon.java index ad8b49a2c4..daae80e3be 100644 --- a/Mage.Sets/src/mage/cards/s/StormwingDragon.java +++ b/Mage.Sets/src/mage/cards/s/StormwingDragon.java @@ -49,8 +49,8 @@ import mage.filter.predicate.permanent.AnotherPredicate; * @author fireshoes */ public class StormwingDragon extends CardImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("each other Dragon creature you control"); + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other Dragon creature you control"); static { filter.add(new AnotherPredicate()); @@ -58,20 +58,20 @@ public class StormwingDragon extends CardImpl { } public StormwingDragon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Dragon"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(3); this.toughness = new MageInt(3); // Flying this.addAbility(FlyingAbility.getInstance()); - + // First strike this.addAbility(FirstStrikeAbility.getInstance()); - + // Megamorph {5}{R}{R} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{5}{R}{R}"), true)); - + // When Stormwing Dragon is turned face up, put a +1/+1 counter on each other Dragon creature you control. this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), false, false)); } diff --git a/Mage.Sets/src/mage/cards/s/StrandsOfUndeath.java b/Mage.Sets/src/mage/cards/s/StrandsOfUndeath.java index b0761c673b..4e6ebbd570 100644 --- a/Mage.Sets/src/mage/cards/s/StrandsOfUndeath.java +++ b/Mage.Sets/src/mage/cards/s/StrandsOfUndeath.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -54,7 +55,7 @@ public class StrandsOfUndeath extends CardImpl { public StrandsOfUndeath(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature // When Strands of Undeath enters the battlefield, target player discards two cards. diff --git a/Mage.Sets/src/mage/cards/s/Strandwalker.java b/Mage.Sets/src/mage/cards/s/Strandwalker.java index 752d89b5ac..a780283ca8 100644 --- a/Mage.Sets/src/mage/cards/s/Strandwalker.java +++ b/Mage.Sets/src/mage/cards/s/Strandwalker.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class Strandwalker extends CardImpl { public Strandwalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{5}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new LivingWeaponAbility()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 4))); diff --git a/Mage.Sets/src/mage/cards/s/StrangeAugmentation.java b/Mage.Sets/src/mage/cards/s/StrangeAugmentation.java index aee389fef7..4bd08f6290 100644 --- a/Mage.Sets/src/mage/cards/s/StrangeAugmentation.java +++ b/Mage.Sets/src/mage/cards/s/StrangeAugmentation.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class StrangeAugmentation extends CardImpl { public StrangeAugmentation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/StranglerootGeist.java b/Mage.Sets/src/mage/cards/s/StranglerootGeist.java index a7528a8d41..5f91eb2ee6 100644 --- a/Mage.Sets/src/mage/cards/s/StranglerootGeist.java +++ b/Mage.Sets/src/mage/cards/s/StranglerootGeist.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.UndyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class StranglerootGeist extends CardImpl { public StranglerootGeist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StranglingSoot.java b/Mage.Sets/src/mage/cards/s/StranglingSoot.java index a0d58fff08..e0d40c4eb8 100644 --- a/Mage.Sets/src/mage/cards/s/StranglingSoot.java +++ b/Mage.Sets/src/mage/cards/s/StranglingSoot.java @@ -45,7 +45,7 @@ import mage.target.common.TargetCreaturePermanent; */ public class StranglingSoot extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with toughess 3 or less"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with toughness 3 or less"); static { filter.add(new ToughnessPredicate(ComparisonType.FEWER_THAN, 4)); diff --git a/Mage.Sets/src/mage/cards/s/StrataScythe.java b/Mage.Sets/src/mage/cards/s/StrataScythe.java index f6dca67031..f7e08211bc 100644 --- a/Mage.Sets/src/mage/cards/s/StrataScythe.java +++ b/Mage.Sets/src/mage/cards/s/StrataScythe.java @@ -41,6 +41,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -59,7 +60,7 @@ public class StrataScythe extends CardImpl { public StrataScythe(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new EntersBattlefieldTriggeredAbility(new StrataScytheImprintEffect())); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(SameNameAsExiledCountValue.getInstance(), SameNameAsExiledCountValue.getInstance()))); this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(3))); diff --git a/Mage.Sets/src/mage/cards/s/Stratadon.java b/Mage.Sets/src/mage/cards/s/Stratadon.java index 5c50f724ce..5d3f96f73f 100644 --- a/Mage.Sets/src/mage/cards/s/Stratadon.java +++ b/Mage.Sets/src/mage/cards/s/Stratadon.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.CostModificationType; import mage.constants.Duration; import mage.constants.Outcome; @@ -52,7 +53,7 @@ public class Stratadon extends CardImpl { public Stratadon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{10}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/Stratozeppelid.java b/Mage.Sets/src/mage/cards/s/Stratozeppelid.java index 1b70b607fe..097b210919 100644 --- a/Mage.Sets/src/mage/cards/s/Stratozeppelid.java +++ b/Mage.Sets/src/mage/cards/s/Stratozeppelid.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class Stratozeppelid extends CardImpl { public Stratozeppelid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StratusDancer.java b/Mage.Sets/src/mage/cards/s/StratusDancer.java index ad7b645a90..c2b9b59e69 100644 --- a/Mage.Sets/src/mage/cards/s/StratusDancer.java +++ b/Mage.Sets/src/mage/cards/s/StratusDancer.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.TargetSpell; @@ -50,8 +51,8 @@ public class StratusDancer extends CardImpl { public StratusDancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Djinn"); - this.subtype.add("Monk"); + this.subtype.add(SubType.DJINN); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StratusWalk.java b/Mage.Sets/src/mage/cards/s/StratusWalk.java index be97528f28..508437bccc 100644 --- a/Mage.Sets/src/mage/cards/s/StratusWalk.java +++ b/Mage.Sets/src/mage/cards/s/StratusWalk.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class StratusWalk extends CardImpl { public StratusWalk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/StrawGolem.java b/Mage.Sets/src/mage/cards/s/StrawGolem.java index 8e5f720f4f..af11185b80 100644 --- a/Mage.Sets/src/mage/cards/s/StrawGolem.java +++ b/Mage.Sets/src/mage/cards/s/StrawGolem.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; /** @@ -44,7 +45,7 @@ public class StrawGolem extends CardImpl { public StrawGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StrawSoldiers.java b/Mage.Sets/src/mage/cards/s/StrawSoldiers.java index cd9c5ec93f..39060ef28f 100644 --- a/Mage.Sets/src/mage/cards/s/StrawSoldiers.java +++ b/Mage.Sets/src/mage/cards/s/StrawSoldiers.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class StrawSoldiers extends CardImpl { public StrawSoldiers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Scarecrow"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SCARECROW); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StreamHopper.java b/Mage.Sets/src/mage/cards/s/StreamHopper.java index 09e7155a12..d8e648e49d 100644 --- a/Mage.Sets/src/mage/cards/s/StreamHopper.java +++ b/Mage.Sets/src/mage/cards/s/StreamHopper.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class StreamHopper extends CardImpl { public StreamHopper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U/R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StreamOfUnconsciousness.java b/Mage.Sets/src/mage/cards/s/StreamOfUnconsciousness.java index e8e66517d8..0ef16ded60 100644 --- a/Mage.Sets/src/mage/cards/s/StreamOfUnconsciousness.java +++ b/Mage.Sets/src/mage/cards/s/StreamOfUnconsciousness.java @@ -55,7 +55,7 @@ public class StreamOfUnconsciousness extends CardImpl { public StreamOfUnconsciousness(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{U}"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.WIZARD); // Target creature gets -4/-0 until end of turn. this.getSpellAbility().addEffect(new BoostTargetEffect(-4, 0, Duration.EndOfTurn)); diff --git a/Mage.Sets/src/mage/cards/s/StreambedAquitects.java b/Mage.Sets/src/mage/cards/s/StreambedAquitects.java index 36c41796d3..b129dc46a1 100644 --- a/Mage.Sets/src/mage/cards/s/StreambedAquitects.java +++ b/Mage.Sets/src/mage/cards/s/StreambedAquitects.java @@ -62,8 +62,8 @@ public class StreambedAquitects extends CardImpl { public StreambedAquitects(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Scout"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StreetSweeper.java b/Mage.Sets/src/mage/cards/s/StreetSweeper.java index beabde26de..3a62f39c72 100644 --- a/Mage.Sets/src/mage/cards/s/StreetSweeper.java +++ b/Mage.Sets/src/mage/cards/s/StreetSweeper.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -59,7 +60,7 @@ public class StreetSweeper extends CardImpl { public StreetSweeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(4); this.toughness = new MageInt(6); @@ -107,7 +108,7 @@ class StreetSweeperDestroyEffect extends OneShotEffect { for(UUID uuid : attachments) { Permanent aura = game.getPermanent(uuid); - if(aura != null && aura.getSubtype(game).contains("Aura")) + if(aura != null && aura.hasSubtype(SubType.AURA, game)) { aura.destroy(source.getSourceId(), game, false); } diff --git a/Mage.Sets/src/mage/cards/s/StreetWraith.java b/Mage.Sets/src/mage/cards/s/StreetWraith.java index 08fbaaf8c4..fc2d0c0430 100644 --- a/Mage.Sets/src/mage/cards/s/StreetWraith.java +++ b/Mage.Sets/src/mage/cards/s/StreetWraith.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class StreetWraith extends CardImpl { public StreetWraith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Wraith"); + this.subtype.add(SubType.WRAITH); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StreetbreakerWurm.java b/Mage.Sets/src/mage/cards/s/StreetbreakerWurm.java index e7ea29e70a..3ac00d72ff 100644 --- a/Mage.Sets/src/mage/cards/s/StreetbreakerWurm.java +++ b/Mage.Sets/src/mage/cards/s/StreetbreakerWurm.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class StreetbreakerWurm extends CardImpl { public StreetbreakerWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StrengthOfCedars.java b/Mage.Sets/src/mage/cards/s/StrengthOfCedars.java index 01a4c02d79..5656f0d3f8 100644 --- a/Mage.Sets/src/mage/cards/s/StrengthOfCedars.java +++ b/Mage.Sets/src/mage/cards/s/StrengthOfCedars.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; @@ -49,7 +50,7 @@ public class StrengthOfCedars extends CardImpl { public StrengthOfCedars (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{G}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Target creature gets +X/+X until end of turn, where X is the number of lands you control. diff --git a/Mage.Sets/src/mage/cards/s/StrengthOfIsolation.java b/Mage.Sets/src/mage/cards/s/StrengthOfIsolation.java index 9c9c34e74e..ef0d7f0645 100644 --- a/Mage.Sets/src/mage/cards/s/StrengthOfIsolation.java +++ b/Mage.Sets/src/mage/cards/s/StrengthOfIsolation.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class StrengthOfIsolation extends CardImpl { public StrengthOfIsolation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/StrengthOfLunacy.java b/Mage.Sets/src/mage/cards/s/StrengthOfLunacy.java index 77ac3ba02e..902f8c9ec3 100644 --- a/Mage.Sets/src/mage/cards/s/StrengthOfLunacy.java +++ b/Mage.Sets/src/mage/cards/s/StrengthOfLunacy.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class StrengthOfLunacy extends CardImpl { public StrengthOfLunacy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/StrengthOfUnity.java b/Mage.Sets/src/mage/cards/s/StrengthOfUnity.java index 83a9df764f..8699aab765 100644 --- a/Mage.Sets/src/mage/cards/s/StrengthOfUnity.java +++ b/Mage.Sets/src/mage/cards/s/StrengthOfUnity.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -52,7 +53,7 @@ public class StrengthOfUnity extends CardImpl { public StrengthOfUnity(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/StriderHarness.java b/Mage.Sets/src/mage/cards/s/StriderHarness.java index cec09537ac..a08befbaed 100644 --- a/Mage.Sets/src/mage/cards/s/StriderHarness.java +++ b/Mage.Sets/src/mage/cards/s/StriderHarness.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class StriderHarness extends CardImpl { public StriderHarness (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(HasteAbility.getInstance(), AttachmentType.EQUIPMENT))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); diff --git a/Mage.Sets/src/mage/cards/s/StrikeTeamCommando.java b/Mage.Sets/src/mage/cards/s/StrikeTeamCommando.java index f3d05847f4..116d04fe93 100644 --- a/Mage.Sets/src/mage/cards/s/StrikeTeamCommando.java +++ b/Mage.Sets/src/mage/cards/s/StrikeTeamCommando.java @@ -1,78 +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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.DestroyTargetEffect; -import mage.abilities.keyword.SpaceflightAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.common.FilterArtifactPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.AbilityPredicate; -import mage.target.common.TargetArtifactPermanent; - -/** - * - * @author Styxo - */ -public class StrikeTeamCommando extends CardImpl { - - private static final FilterArtifactPermanent filter = new FilterArtifactPermanent("artifact without spaceflight"); - - static { - filter.add(Predicates.not(new AbilityPredicate(SpaceflightAbility.class))); - } - - public StrikeTeamCommando(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G/W}{G/W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // When Strike Team Commando enters the battlefield, you may destroy target artifact without spaceflight. - Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true); - ability.addTarget(new TargetArtifactPermanent(filter)); - this.addAbility(ability); - - } - - public StrikeTeamCommando(final StrikeTeamCommando card) { - super(card); - } - - @Override - public StrikeTeamCommando copy() { - return new StrikeTeamCommando(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterArtifactPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.common.TargetArtifactPermanent; + +/** + * + * @author Styxo + */ +public class StrikeTeamCommando extends CardImpl { + + private static final FilterArtifactPermanent filter = new FilterArtifactPermanent("artifact without spaceflight"); + + static { + filter.add(Predicates.not(new AbilityPredicate(SpaceflightAbility.class))); + } + + public StrikeTeamCommando(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G/W}{G/W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Strike Team Commando enters the battlefield, you may destroy target artifact without spaceflight. + Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true); + ability.addTarget(new TargetArtifactPermanent(filter)); + this.addAbility(ability); + + } + + public StrikeTeamCommando(final StrikeTeamCommando card) { + super(card); + } + + @Override + public StrikeTeamCommando copy() { + return new StrikeTeamCommando(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/StrikingSliver.java b/Mage.Sets/src/mage/cards/s/StrikingSliver.java index 5ab1c591e4..ccfcfd0d4e 100644 --- a/Mage.Sets/src/mage/cards/s/StrikingSliver.java +++ b/Mage.Sets/src/mage/cards/s/StrikingSliver.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -47,7 +48,7 @@ public class StrikingSliver extends CardImpl { public StrikingSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StripedBears.java b/Mage.Sets/src/mage/cards/s/StripedBears.java index e0e4e8dcd2..7f9b98d467 100644 --- a/Mage.Sets/src/mage/cards/s/StripedBears.java +++ b/Mage.Sets/src/mage/cards/s/StripedBears.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class StripedBears extends CardImpl { public StripedBears(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Bear"); + this.subtype.add(SubType.BEAR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StripedRiverwinder.java b/Mage.Sets/src/mage/cards/s/StripedRiverwinder.java index e8148f21fc..48f7bd8c2d 100644 --- a/Mage.Sets/src/mage/cards/s/StripedRiverwinder.java +++ b/Mage.Sets/src/mage/cards/s/StripedRiverwinder.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class StripedRiverwinder extends CardImpl { public StripedRiverwinder(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/StromgaldCabal.java b/Mage.Sets/src/mage/cards/s/StromgaldCabal.java index b6c88b1229..d7df8bcaa2 100644 --- a/Mage.Sets/src/mage/cards/s/StromgaldCabal.java +++ b/Mage.Sets/src/mage/cards/s/StromgaldCabal.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,8 +58,8 @@ public class StromgaldCabal extends CardImpl { public StromgaldCabal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StromgaldCrusader.java b/Mage.Sets/src/mage/cards/s/StromgaldCrusader.java index 4e058da7c3..175c2cd613 100644 --- a/Mage.Sets/src/mage/cards/s/StromgaldCrusader.java +++ b/Mage.Sets/src/mage/cards/s/StromgaldCrusader.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class StromgaldCrusader extends CardImpl { public StromgaldCrusader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StromkirkCaptain.java b/Mage.Sets/src/mage/cards/s/StromkirkCaptain.java index 7ea7ce0314..20e7e4c675 100644 --- a/Mage.Sets/src/mage/cards/s/StromkirkCaptain.java +++ b/Mage.Sets/src/mage/cards/s/StromkirkCaptain.java @@ -55,8 +55,8 @@ public class StromkirkCaptain extends CardImpl { public StromkirkCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}"); - this.subtype.add("Vampire"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StromkirkCondemned.java b/Mage.Sets/src/mage/cards/s/StromkirkCondemned.java index 990d4ee15d..493886a37b 100644 --- a/Mage.Sets/src/mage/cards/s/StromkirkCondemned.java +++ b/Mage.Sets/src/mage/cards/s/StromkirkCondemned.java @@ -54,8 +54,8 @@ public class StromkirkCondemned extends CardImpl { public StromkirkCondemned(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Horror"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StromkirkMentor.java b/Mage.Sets/src/mage/cards/s/StromkirkMentor.java index d625d11778..d441007e16 100644 --- a/Mage.Sets/src/mage/cards/s/StromkirkMentor.java +++ b/Mage.Sets/src/mage/cards/s/StromkirkMentor.java @@ -57,8 +57,8 @@ public class StromkirkMentor extends CardImpl { public StromkirkMentor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StromkirkNoble.java b/Mage.Sets/src/mage/cards/s/StromkirkNoble.java index af73b8ae83..9eabb04d78 100644 --- a/Mage.Sets/src/mage/cards/s/StromkirkNoble.java +++ b/Mage.Sets/src/mage/cards/s/StromkirkNoble.java @@ -57,7 +57,7 @@ public class StromkirkNoble extends CardImpl { public StromkirkNoble(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StromkirkOccultist.java b/Mage.Sets/src/mage/cards/s/StromkirkOccultist.java index 7480eb9271..be706bf86a 100644 --- a/Mage.Sets/src/mage/cards/s/StromkirkOccultist.java +++ b/Mage.Sets/src/mage/cards/s/StromkirkOccultist.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -58,8 +59,8 @@ public class StromkirkOccultist extends CardImpl { public StromkirkOccultist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Vampire"); - this.subtype.add("Horror"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/StromkirkPatrol.java b/Mage.Sets/src/mage/cards/s/StromkirkPatrol.java index e61f5b4ff2..86eac43351 100644 --- a/Mage.Sets/src/mage/cards/s/StromkirkPatrol.java +++ b/Mage.Sets/src/mage/cards/s/StromkirkPatrol.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -44,8 +45,8 @@ public class StromkirkPatrol extends CardImpl { public StromkirkPatrol(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StrongarmMonk.java b/Mage.Sets/src/mage/cards/s/StrongarmMonk.java index 8207b40375..6f77cc5d74 100644 --- a/Mage.Sets/src/mage/cards/s/StrongarmMonk.java +++ b/Mage.Sets/src/mage/cards/s/StrongarmMonk.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -55,8 +56,8 @@ public class StrongarmMonk extends CardImpl { public StrongarmMonk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StrongarmTactics.java b/Mage.Sets/src/mage/cards/s/StrongarmTactics.java new file mode 100644 index 0000000000..8cf580d96a --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/StrongarmTactics.java @@ -0,0 +1,124 @@ +/* + * 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.cards.s; + +import java.util.HashMap; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetDiscard; + +/** + * + * @author TheElk801 + */ +public class StrongarmTactics extends CardImpl { + + public StrongarmTactics(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}"); + + // Each player discards a card. Then each player who didn't discard a creature card this way loses 4 life. + this.getSpellAbility().addEffect(new StrongarmTacticsEffect()); + } + + public StrongarmTactics(final StrongarmTactics card) { + super(card); + } + + @Override + public StrongarmTactics copy() { + return new StrongarmTactics(this); + } +} + +class StrongarmTacticsEffect extends OneShotEffect { + + StrongarmTacticsEffect() { + super(Outcome.Discard); + this.staticText = "Each player discards a card. Then each player who didn't discard a creature card this way loses 4 life."; + } + + StrongarmTacticsEffect(final StrongarmTacticsEffect effect) { + super(effect); + } + + @Override + public StrongarmTacticsEffect copy() { + return new StrongarmTacticsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + // Store for each player the cards to discard, that's important because all discard shall happen at the same time + HashMap cardsToDiscard = new HashMap<>(); + if (controller != null) { + // choose cards to discard + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + int numberOfCardsToDiscard = Math.min(1, player.getHand().size()); + Cards cards = new CardsImpl(); + Target target = new TargetDiscard(numberOfCardsToDiscard, numberOfCardsToDiscard, new FilterCard(), playerId); + player.chooseTarget(outcome, target, source, game); + cards.addAll(target.getTargets()); + cardsToDiscard.put(playerId, cards); + } + } + // discard all choosen cards + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + Cards cardsPlayer = cardsToDiscard.get(playerId); + if (cardsPlayer != null) { + for (UUID cardId : cardsPlayer) { + Card card = game.getCard(cardId); + if (card != null) { + if (!(player.discard(card, source, game) && card.isCreature())) { + player.loseLife(4, game, false); + } + } + } + } + } + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/s/StrongarmThug.java b/Mage.Sets/src/mage/cards/s/StrongarmThug.java index 2f09041010..5358c25157 100644 --- a/Mage.Sets/src/mage/cards/s/StrongarmThug.java +++ b/Mage.Sets/src/mage/cards/s/StrongarmThug.java @@ -55,8 +55,8 @@ public class StrongarmThug extends CardImpl { public StrongarmThug(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Mercenary"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MERCENARY); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StrongholdAssassin.java b/Mage.Sets/src/mage/cards/s/StrongholdAssassin.java index 3277c59d8f..d13110dd93 100644 --- a/Mage.Sets/src/mage/cards/s/StrongholdAssassin.java +++ b/Mage.Sets/src/mage/cards/s/StrongholdAssassin.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreaturePermanent; @@ -60,8 +61,8 @@ public class StrongholdAssassin extends CardImpl { public StrongholdAssassin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StrongholdBiologist.java b/Mage.Sets/src/mage/cards/s/StrongholdBiologist.java new file mode 100644 index 0000000000..194e7508e9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/StrongholdBiologist.java @@ -0,0 +1,75 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterCreatureSpell; +import mage.target.TargetSpell; + +/** + * + * @author TheElk801 + */ +public class StrongholdBiologist extends CardImpl { + + public StrongholdBiologist(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {U}{U}, {tap}, Discard a card: Counter target creature spell. + Ability ability = new SimpleActivatedAbility(new CounterTargetEffect(), new ManaCostsImpl("{U}{U}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new DiscardCardCost()); + ability.addTarget(new TargetSpell(new FilterCreatureSpell())); + this.addAbility(ability); + } + + public StrongholdBiologist(final StrongholdBiologist card) { + super(card); + } + + @Override + public StrongholdBiologist copy() { + return new StrongholdBiologist(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/StrongholdMachinist.java b/Mage.Sets/src/mage/cards/s/StrongholdMachinist.java index 4f8b1d58d2..ddf53b898f 100644 --- a/Mage.Sets/src/mage/cards/s/StrongholdMachinist.java +++ b/Mage.Sets/src/mage/cards/s/StrongholdMachinist.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -59,8 +60,8 @@ public class StrongholdMachinist extends CardImpl { public StrongholdMachinist(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StrongholdOverseer.java b/Mage.Sets/src/mage/cards/s/StrongholdOverseer.java index 9e0d26c4cb..a0afc5b4fb 100644 --- a/Mage.Sets/src/mage/cards/s/StrongholdOverseer.java +++ b/Mage.Sets/src/mage/cards/s/StrongholdOverseer.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -61,7 +62,7 @@ public class StrongholdOverseer extends CardImpl { public StrongholdOverseer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/StrongholdRats.java b/Mage.Sets/src/mage/cards/s/StrongholdRats.java index ab5afd3bbd..3d3c294029 100644 --- a/Mage.Sets/src/mage/cards/s/StrongholdRats.java +++ b/Mage.Sets/src/mage/cards/s/StrongholdRats.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class StrongholdRats extends CardImpl { public StrongholdRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StrongholdTaskmaster.java b/Mage.Sets/src/mage/cards/s/StrongholdTaskmaster.java index 780df902e1..22b621e16e 100644 --- a/Mage.Sets/src/mage/cards/s/StrongholdTaskmaster.java +++ b/Mage.Sets/src/mage/cards/s/StrongholdTaskmaster.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -55,8 +56,8 @@ public class StrongholdTaskmaster extends CardImpl { public StrongholdTaskmaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Giant"); - this.subtype.add("Minion"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.MINION); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StrongholdZeppelin.java b/Mage.Sets/src/mage/cards/s/StrongholdZeppelin.java index a8a075205b..abd254dc8e 100644 --- a/Mage.Sets/src/mage/cards/s/StrongholdZeppelin.java +++ b/Mage.Sets/src/mage/cards/s/StrongholdZeppelin.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class StrongholdZeppelin extends CardImpl { public StrongholdZeppelin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StruggleSurvive.java b/Mage.Sets/src/mage/cards/s/StruggleSurvive.java index 5b7ac2f61e..636a48ecce 100644 --- a/Mage.Sets/src/mage/cards/s/StruggleSurvive.java +++ b/Mage.Sets/src/mage/cards/s/StruggleSurvive.java @@ -1,115 +1,115 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.DamageTargetEffect; -import mage.abilities.keyword.AftermathAbility; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.SplitCard; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.SpellAbilityType; -import mage.constants.Zone; -import mage.filter.common.FilterControlledLandPermanent; -import mage.game.Game; -import mage.players.Player; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author LevelX2 - */ -public class StruggleSurvive extends SplitCard { - - public StruggleSurvive(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{2}{R}", "{1}{G}", SpellAbilityType.SPLIT_AFTERMATH); - - // Struggle - // Struggle deals damage to target creature equal to the number of lands you control. - Effect effect = new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledLandPermanent("the number of lands you control"))); - effect.setText("Struggle deals damage to target creature equal to the number of lands you control"); - getLeftHalfCard().getSpellAbility().addEffect(effect); - getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); - - // Survive - // Aftermath - ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true)); - // Each player shuffles his or graveyard into his or her library. - getRightHalfCard().getSpellAbility().addEffect(new SurviveEffect()); - - } - - public StruggleSurvive(final StruggleSurvive card) { - super(card); - } - - @Override - public StruggleSurvive copy() { - return new StruggleSurvive(this); - } -} - -class SurviveEffect extends OneShotEffect { - - public SurviveEffect() { - super(Outcome.Neutral); - staticText = "Each player shuffles his or her graveyard into his or her library"; - } - - public SurviveEffect(final SurviveEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player sourcePlayer = game.getPlayer(source.getControllerId()); - for (UUID playerId : game.getState().getPlayersInRange(sourcePlayer.getId(), game)) { - Player player = game.getPlayer(playerId); - if (player != null) { - for (Card card : player.getGraveyard().getCards(game)) { - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - } - player.shuffleLibrary(source, game); - } - } - return true; - } - - @Override - public SurviveEffect copy() { - return new SurviveEffect(this); - } - -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.AftermathAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.SplitCard; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SpellAbilityType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledLandPermanent; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class StruggleSurvive extends SplitCard { + + public StruggleSurvive(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{2}{R}", "{1}{G}", SpellAbilityType.SPLIT_AFTERMATH); + + // Struggle + // Struggle deals damage to target creature equal to the number of lands you control. + Effect effect = new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledLandPermanent("the number of lands you control"))); + effect.setText("Struggle deals damage to target creature equal to the number of lands you control"); + getLeftHalfCard().getSpellAbility().addEffect(effect); + getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Survive + // Aftermath + ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true)); + // Each player shuffles his or graveyard into his or her library. + getRightHalfCard().getSpellAbility().addEffect(new SurviveEffect()); + + } + + public StruggleSurvive(final StruggleSurvive card) { + super(card); + } + + @Override + public StruggleSurvive copy() { + return new StruggleSurvive(this); + } +} + +class SurviveEffect extends OneShotEffect { + + public SurviveEffect() { + super(Outcome.Neutral); + staticText = "Each player shuffles his or her graveyard into his or her library"; + } + + public SurviveEffect(final SurviveEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player sourcePlayer = game.getPlayer(source.getControllerId()); + for (UUID playerId : game.getState().getPlayersInRange(sourcePlayer.getId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + for (Card card : player.getGraveyard().getCards(game)) { + card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); + } + player.shuffleLibrary(source, game); + } + } + return true; + } + + @Override + public SurviveEffect copy() { + return new SurviveEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/s/StudentOfElements.java b/Mage.Sets/src/mage/cards/s/StudentOfElements.java index db8478658c..425d136421 100644 --- a/Mage.Sets/src/mage/cards/s/StudentOfElements.java +++ b/Mage.Sets/src/mage/cards/s/StudentOfElements.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class StudentOfElements extends CardImpl { public StudentOfElements(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -114,8 +115,8 @@ class TobitaMasterOfWinds extends Token { addSuperType(SuperType.LEGENDARY); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Human"); - subtype.add("Wizard"); + subtype.add(SubType.HUMAN); + subtype.add(SubType.WIZARD); power = new MageInt(3); toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/StudentOfOjutai.java b/Mage.Sets/src/mage/cards/s/StudentOfOjutai.java index 1d06b6210a..2cb7014d07 100644 --- a/Mage.Sets/src/mage/cards/s/StudentOfOjutai.java +++ b/Mage.Sets/src/mage/cards/s/StudentOfOjutai.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -52,8 +53,8 @@ public class StudentOfOjutai extends CardImpl { public StudentOfOjutai(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/StudentOfWarfare.java b/Mage.Sets/src/mage/cards/s/StudentOfWarfare.java index 66eadc9a1f..3ead663e41 100644 --- a/Mage.Sets/src/mage/cards/s/StudentOfWarfare.java +++ b/Mage.Sets/src/mage/cards/s/StudentOfWarfare.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.LevelerCardBuilder; import mage.cards.CardSetInfo; import mage.cards.LevelerCard; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -50,8 +51,8 @@ public class StudentOfWarfare extends LevelerCard { public StudentOfWarfare (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.color.setWhite(true); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StuffyDoll.java b/Mage.Sets/src/mage/cards/s/StuffyDoll.java index 6561e8f430..5a7a8986ac 100644 --- a/Mage.Sets/src/mage/cards/s/StuffyDoll.java +++ b/Mage.Sets/src/mage/cards/s/StuffyDoll.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class StuffyDoll extends CardImpl { public StuffyDoll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StunSniper.java b/Mage.Sets/src/mage/cards/s/StunSniper.java index d84874512b..3da58a6422 100644 --- a/Mage.Sets/src/mage/cards/s/StunSniper.java +++ b/Mage.Sets/src/mage/cards/s/StunSniper.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class StunSniper extends CardImpl { public StunSniper (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{W}"); - this.subtype.add("Human"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/StuntDouble.java b/Mage.Sets/src/mage/cards/s/StuntDouble.java index cb8487c1ce..93895c8755 100644 --- a/Mage.Sets/src/mage/cards/s/StuntDouble.java +++ b/Mage.Sets/src/mage/cards/s/StuntDouble.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class StuntDouble extends CardImpl { public StuntDouble(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/StupefyingTouch.java b/Mage.Sets/src/mage/cards/s/StupefyingTouch.java index a68d5d53dc..5f84c4a1a1 100644 --- a/Mage.Sets/src/mage/cards/s/StupefyingTouch.java +++ b/Mage.Sets/src/mage/cards/s/StupefyingTouch.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class StupefyingTouch extends CardImpl { public StupefyingTouch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SturdyHatchling.java b/Mage.Sets/src/mage/cards/s/SturdyHatchling.java index cb798aa073..2aac458db7 100644 --- a/Mage.Sets/src/mage/cards/s/SturdyHatchling.java +++ b/Mage.Sets/src/mage/cards/s/SturdyHatchling.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -62,7 +63,7 @@ public class SturdyHatchling extends CardImpl { public SturdyHatchling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G/U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/Sturmgeist.java b/Mage.Sets/src/mage/cards/s/Sturmgeist.java index ee124c3f29..d032a11903 100644 --- a/Mage.Sets/src/mage/cards/s/Sturmgeist.java +++ b/Mage.Sets/src/mage/cards/s/Sturmgeist.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class Sturmgeist extends CardImpl { public Sturmgeist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SuChi.java b/Mage.Sets/src/mage/cards/s/SuChi.java index 4fa205c993..cdf19c2e5e 100644 --- a/Mage.Sets/src/mage/cards/s/SuChi.java +++ b/Mage.Sets/src/mage/cards/s/SuChi.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.BasicManaEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class SuChi extends CardImpl { public SuChi(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SubjugatorAngel.java b/Mage.Sets/src/mage/cards/s/SubjugatorAngel.java index 4ae47f5faf..2fb93628ba 100644 --- a/Mage.Sets/src/mage/cards/s/SubjugatorAngel.java +++ b/Mage.Sets/src/mage/cards/s/SubjugatorAngel.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -53,7 +54,7 @@ public class SubjugatorAngel extends CardImpl { public SubjugatorAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SublimeArchangel.java b/Mage.Sets/src/mage/cards/s/SublimeArchangel.java index b539bfdfdd..f806aaa275 100644 --- a/Mage.Sets/src/mage/cards/s/SublimeArchangel.java +++ b/Mage.Sets/src/mage/cards/s/SublimeArchangel.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -48,7 +49,7 @@ public class SublimeArchangel extends CardImpl { public SublimeArchangel(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SubterraneanScout.java b/Mage.Sets/src/mage/cards/s/SubterraneanScout.java index 6f65dd0663..ed073b951c 100644 --- a/Mage.Sets/src/mage/cards/s/SubterraneanScout.java +++ b/Mage.Sets/src/mage/cards/s/SubterraneanScout.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; @@ -54,8 +55,8 @@ public class SubterraneanScout extends CardImpl { public SubterraneanScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Scout"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SubterraneanShambler.java b/Mage.Sets/src/mage/cards/s/SubterraneanShambler.java index 0e5ae92959..05cac8abff 100644 --- a/Mage.Sets/src/mage/cards/s/SubterraneanShambler.java +++ b/Mage.Sets/src/mage/cards/s/SubterraneanShambler.java @@ -1,78 +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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.EntersBattlefieldOrLeavesSourceTriggeredAbility; -import mage.abilities.effects.common.DamageAllEffect; -import mage.abilities.keyword.EchoAbility; -import mage.abilities.keyword.FlyingAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.AbilityPredicate; - -/** - * - * @author Styxo - */ -public class SubterraneanShambler extends CardImpl { - - private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature without flying"); - - static { - filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); - } - - public SubterraneanShambler(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - - this.subtype.add("Elemental"); - this.power = new MageInt(2); - this.toughness = new MageInt(3); - - // Echo {3}{R} - this.addAbility(new EchoAbility("{3}{R}")); - - // When Subterranean Shambler enters the battlefield or leaves the battlefield, it deals 1 damage to each creature without flying. - this.addAbility(new EntersBattlefieldOrLeavesSourceTriggeredAbility(new DamageAllEffect(1, filter), false)); - - } - - public SubterraneanShambler(final SubterraneanShambler card) { - super(card); - } - - @Override - public SubterraneanShambler copy() { - return new SubterraneanShambler(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldOrLeavesSourceTriggeredAbility; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.keyword.EchoAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author Styxo + */ +public class SubterraneanShambler extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature without flying"); + + static { + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + + public SubterraneanShambler(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.ELEMENTAL); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Echo {3}{R} + this.addAbility(new EchoAbility("{3}{R}")); + + // When Subterranean Shambler enters the battlefield or leaves the battlefield, it deals 1 damage to each creature without flying. + this.addAbility(new EntersBattlefieldOrLeavesSourceTriggeredAbility(new DamageAllEffect(1, filter), false)); + + } + + public SubterraneanShambler(final SubterraneanShambler card) { + super(card); + } + + @Override + public SubterraneanShambler copy() { + return new SubterraneanShambler(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SubterraneanSpirit.java b/Mage.Sets/src/mage/cards/s/SubterraneanSpirit.java new file mode 100644 index 0000000000..bebfb90f7e --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SubterraneanSpirit.java @@ -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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author TheElk801 + */ +public class SubterraneanSpirit extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature without flying"); + + static { + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + + public SubterraneanSpirit(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SPIRIT); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Protection from red + this.addAbility(ProtectionAbility.from(ObjectColor.RED)); + + // {tap}: Subterranean Spirit deals 1 damage to each creature without flying. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageAllEffect(1, filter), new TapSourceCost()); + this.addAbility(ability); + } + + public SubterraneanSpirit(final SubterraneanSpirit card) { + super(card); + } + + @Override + public SubterraneanSpirit copy() { + return new SubterraneanSpirit(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SuddenDemise.java b/Mage.Sets/src/mage/cards/s/SuddenDemise.java index bb7fe7900c..e0607a9321 100644 --- a/Mage.Sets/src/mage/cards/s/SuddenDemise.java +++ b/Mage.Sets/src/mage/cards/s/SuddenDemise.java @@ -49,10 +49,9 @@ import mage.players.Player; public class SuddenDemise extends CardImpl { public SuddenDemise(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}"); - - // Choose a color. Sudden Demise deals X damage to each creature of the chosen color. + // Choose a color. Sudden Demise deals X damage to each creature of the chosen color. this.getSpellAbility().addEffect(new SuddenDemiseDamageEffect()); } @@ -71,7 +70,7 @@ class SuddenDemiseDamageEffect extends OneShotEffect { public SuddenDemiseDamageEffect() { super(Outcome.Damage); - this.staticText = "Choose a color. Sudden Demise deals X damage to each creature of the chosen color"; + this.staticText = "Choose a color. {this} deals X damage to each creature of the chosen color"; } public SuddenDemiseDamageEffect(final SuddenDemiseDamageEffect effect) { @@ -93,7 +92,7 @@ class SuddenDemiseDamageEffect extends OneShotEffect { final int damage = source.getManaCostsToPay().getX(); FilterPermanent filter = new FilterCreaturePermanent(); filter.add(new ColorPredicate(choice.getColor())); - for (Permanent permanent:game.getBattlefield().getActivePermanents(filter, source.getControllerId(), id, game)) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { permanent.damage(damage, source.getSourceId(), game, false, true); } return true; diff --git a/Mage.Sets/src/mage/cards/s/SulamDjinn.java b/Mage.Sets/src/mage/cards/s/SulamDjinn.java index f70101d31d..9be61d0a93 100644 --- a/Mage.Sets/src/mage/cards/s/SulamDjinn.java +++ b/Mage.Sets/src/mage/cards/s/SulamDjinn.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class SulamDjinn extends CardImpl { public SulamDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SulfurElemental.java b/Mage.Sets/src/mage/cards/s/SulfurElemental.java index 2f78da8a1a..741e04f513 100644 --- a/Mage.Sets/src/mage/cards/s/SulfurElemental.java +++ b/Mage.Sets/src/mage/cards/s/SulfurElemental.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.SplitSecondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -47,25 +48,28 @@ import mage.filter.predicate.mageobject.ColorPredicate; * @author LevelX2 */ public class SulfurElemental extends CardImpl { - + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("white creatures"); + static { filter.add(new ColorPredicate(ObjectColor.WHITE)); } public SulfurElemental(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Elemental"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(2); - // Flash - this.addAbility(FlashAbility.getInstance()); // Split second this.addAbility(new SplitSecondAbility()); + + // Flash + this.addAbility(FlashAbility.getInstance()); + // White creatures get +1/-1. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1,-1, Duration.WhileOnBattlefield, filter, false))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, -1, Duration.WhileOnBattlefield, filter, false))); } public SulfurElemental(final SulfurElemental card) { diff --git a/Mage.Sets/src/mage/cards/s/SulfurFalls.java b/Mage.Sets/src/mage/cards/s/SulfurFalls.java index fbe5ff94f7..ce4b437297 100644 --- a/Mage.Sets/src/mage/cards/s/SulfurFalls.java +++ b/Mage.Sets/src/mage/cards/s/SulfurFalls.java @@ -61,7 +61,7 @@ public class SulfurFalls extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.LAND},null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); - String abilityText = "tap it unless you control a Island or a Mountain"; + String abilityText = " tapped unless you control a Island or a Mountain"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlueManaAbility()); this.addAbility(new RedManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SultaiEmissary.java b/Mage.Sets/src/mage/cards/s/SultaiEmissary.java index 119aaf33a7..07d7f8c47a 100644 --- a/Mage.Sets/src/mage/cards/s/SultaiEmissary.java +++ b/Mage.Sets/src/mage/cards/s/SultaiEmissary.java @@ -34,6 +34,7 @@ import mage.abilities.effects.keyword.ManifestEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SultaiEmissary extends CardImpl { public SultaiEmissary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SultaiFlayer.java b/Mage.Sets/src/mage/cards/s/SultaiFlayer.java index 6ea2dd611c..e4a2e50c15 100644 --- a/Mage.Sets/src/mage/cards/s/SultaiFlayer.java +++ b/Mage.Sets/src/mage/cards/s/SultaiFlayer.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -55,8 +56,8 @@ public class SultaiFlayer extends CardImpl { public SultaiFlayer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Naga"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SultaiRunemark.java b/Mage.Sets/src/mage/cards/s/SultaiRunemark.java index c9b58ef106..f7a9979070 100644 --- a/Mage.Sets/src/mage/cards/s/SultaiRunemark.java +++ b/Mage.Sets/src/mage/cards/s/SultaiRunemark.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -65,7 +66,7 @@ public class SultaiRunemark extends CardImpl { public SultaiRunemark(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SultaiScavenger.java b/Mage.Sets/src/mage/cards/s/SultaiScavenger.java index 1da9273251..3674a20820 100644 --- a/Mage.Sets/src/mage/cards/s/SultaiScavenger.java +++ b/Mage.Sets/src/mage/cards/s/SultaiScavenger.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SultaiScavenger extends CardImpl { public SultaiScavenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Bird"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SultaiSkullkeeper.java b/Mage.Sets/src/mage/cards/s/SultaiSkullkeeper.java index 71582ae465..5cf30ab67e 100644 --- a/Mage.Sets/src/mage/cards/s/SultaiSkullkeeper.java +++ b/Mage.Sets/src/mage/cards/s/SultaiSkullkeeper.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SultaiSkullkeeper extends CardImpl { public SultaiSkullkeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Naga"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SultaiSoothsayer.java b/Mage.Sets/src/mage/cards/s/SultaiSoothsayer.java index 4a49263699..bea2d5f0c1 100644 --- a/Mage.Sets/src/mage/cards/s/SultaiSoothsayer.java +++ b/Mage.Sets/src/mage/cards/s/SultaiSoothsayer.java @@ -39,6 +39,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -54,8 +55,8 @@ public class SultaiSoothsayer extends CardImpl { public SultaiSoothsayer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{G}{U}"); - this.subtype.add("Naga"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SummitApes.java b/Mage.Sets/src/mage/cards/s/SummitApes.java index b01b56ddee..2c5f762434 100644 --- a/Mage.Sets/src/mage/cards/s/SummitApes.java +++ b/Mage.Sets/src/mage/cards/s/SummitApes.java @@ -57,7 +57,7 @@ public class SummitApes extends CardImpl { public SummitApes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Ape"); + this.subtype.add(SubType.APE); this.color.setGreen(true); this.power = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SummitProwler.java b/Mage.Sets/src/mage/cards/s/SummitProwler.java index 003517c556..ac4cd6481d 100644 --- a/Mage.Sets/src/mage/cards/s/SummitProwler.java +++ b/Mage.Sets/src/mage/cards/s/SummitProwler.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class SummitProwler extends CardImpl { public SummitProwler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Yeti"); + this.subtype.add(SubType.YETI); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SummonTheSchool.java b/Mage.Sets/src/mage/cards/s/SummonTheSchool.java index 0675ee0b5f..b3aca5f16e 100644 --- a/Mage.Sets/src/mage/cards/s/SummonTheSchool.java +++ b/Mage.Sets/src/mage/cards/s/SummonTheSchool.java @@ -59,7 +59,7 @@ public class SummonTheSchool extends CardImpl { public SummonTheSchool(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.SORCERY},"{3}{W}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); // Create two 1/1 blue Merfolk Wizard creature tokens. this.getSpellAbility().addEffect(new CreateTokenEffect(new MerfolkWizardToken(), 2)); diff --git a/Mage.Sets/src/mage/cards/s/SummonersEgg.java b/Mage.Sets/src/mage/cards/s/SummonersEgg.java index d9f673b691..23e86cfdc8 100644 --- a/Mage.Sets/src/mage/cards/s/SummonersEgg.java +++ b/Mage.Sets/src/mage/cards/s/SummonersEgg.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -54,7 +55,7 @@ public class SummonersEgg extends CardImpl { public SummonersEgg(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SunBlessedMount.java b/Mage.Sets/src/mage/cards/s/SunBlessedMount.java new file mode 100644 index 0000000000..4d98ba22cf --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SunBlessedMount.java @@ -0,0 +1,72 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.search.SearchLibraryGraveyardPutInHandEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.NamePredicate; + +/** + * + * @author TheElk801 + */ +public class SunBlessedMount extends CardImpl { + + private final static FilterCard filter = new FilterCard("Huatli, Dinosaur Knight"); + + static { + filter.add(new NamePredicate("Huatli, Dinosaur Knight")); + } + + public SunBlessedMount(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // When Sun-Blessed Mount enters the battlefield, you may search your library and/or graveyard for a card named Huatli, Dinosaur Knight, reveal it, then put it into your hand. If you searched your library this way, shuffle it. + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryGraveyardPutInHandEffect(filter), true)); + } + + public SunBlessedMount(final SunBlessedMount card) { + super(card); + } + + @Override + public SunBlessedMount copy() { + return new SunBlessedMount(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SunCeYoungConquerer.java b/Mage.Sets/src/mage/cards/s/SunCeYoungConquerer.java index 7e685e7b5c..d6fe1addf9 100644 --- a/Mage.Sets/src/mage/cards/s/SunCeYoungConquerer.java +++ b/Mage.Sets/src/mage/cards/s/SunCeYoungConquerer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class SunCeYoungConquerer extends CardImpl { public SunCeYoungConquerer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SunClasp.java b/Mage.Sets/src/mage/cards/s/SunClasp.java index 80ffe8d873..9aaa08f433 100644 --- a/Mage.Sets/src/mage/cards/s/SunClasp.java +++ b/Mage.Sets/src/mage/cards/s/SunClasp.java @@ -54,7 +54,7 @@ public class SunClasp extends CardImpl { public SunClasp(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SunCrownedHunters.java b/Mage.Sets/src/mage/cards/s/SunCrownedHunters.java new file mode 100644 index 0000000000..a433bbd376 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SunCrownedHunters.java @@ -0,0 +1,71 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.target.common.TargetOpponent; + +/** + * + * @author TheElk801 + */ +public class SunCrownedHunters extends CardImpl { + + public SunCrownedHunters(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + // Enrage — Whenever Sun-Crowned Hunters is dealt damage, it deals 3 damage to target opponent. + Ability ability = new DealtDamageToSourceTriggeredAbility( + Zone.BATTLEFIELD, new DamageTargetEffect(3).setText("it deals 3 damage to target opponent"), false, true + ); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public SunCrownedHunters(final SunCrownedHunters card) { + super(card); + } + + @Override + public SunCrownedHunters copy() { + return new SunCrownedHunters(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SunQuanLordOfWu.java b/Mage.Sets/src/mage/cards/s/SunQuanLordOfWu.java index 13f1206b83..dbd49f086e 100644 --- a/Mage.Sets/src/mage/cards/s/SunQuanLordOfWu.java +++ b/Mage.Sets/src/mage/cards/s/SunQuanLordOfWu.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class SunQuanLordOfWu extends CardImpl { public SunQuanLordOfWu(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SunTitan.java b/Mage.Sets/src/mage/cards/s/SunTitan.java index cc7d67aca3..d485e78fc8 100644 --- a/Mage.Sets/src/mage/cards/s/SunTitan.java +++ b/Mage.Sets/src/mage/cards/s/SunTitan.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -55,7 +56,7 @@ public class SunTitan extends CardImpl { public SunTitan(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SunastianFalconer.java b/Mage.Sets/src/mage/cards/s/SunastianFalconer.java index 29a4b36d1b..5074a8a20f 100644 --- a/Mage.Sets/src/mage/cards/s/SunastianFalconer.java +++ b/Mage.Sets/src/mage/cards/s/SunastianFalconer.java @@ -35,6 +35,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class SunastianFalconer extends CardImpl { public SunastianFalconer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SunbirdsInvocation.java b/Mage.Sets/src/mage/cards/s/SunbirdsInvocation.java new file mode 100644 index 0000000000..815955a089 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SunbirdsInvocation.java @@ -0,0 +1,178 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.common.FilterNonlandCard; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.stack.Spell; +import mage.players.Player; +import mage.target.TargetCard; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author spjspj + */ +public class SunbirdsInvocation extends CardImpl { + + public SunbirdsInvocation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{5}{R}"); + + // Whenever you cast a spell from your hand, reveal the top X cards of your library, where X is that spell's converted mana cost. You may cast a card revealed this way with converted mana cost X or less without paying its mana cost. Put the rest on the bottom of your library in a random order. + this.addAbility(new SunbirdsInvocationTriggeredAbility()); + } + + public SunbirdsInvocation(final SunbirdsInvocation card) { + super(card); + } + + @Override + public SunbirdsInvocation copy() { + return new SunbirdsInvocation(this); + } +} + +class SunbirdsInvocationTriggeredAbility extends SpellCastControllerTriggeredAbility { + + public SunbirdsInvocationTriggeredAbility() { + super(new SunbirdsInvocationEffect(), false); + } + + public SunbirdsInvocationTriggeredAbility(SunbirdsInvocationTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getPlayerId().equals(this.getControllerId())) { + Spell spell = game.getStack().getSpell(event.getTargetId()); + if (spell != null && spell.getFromZone() == Zone.HAND) { + if (spell.getCard() != null) { + for (Effect effect : getEffects()) { + effect.setTargetPointer(new FixedTarget(spell.getId())); + } + return true; + } + } + } + return false; + } + + @Override + public SunbirdsInvocationTriggeredAbility copy() { + return new SunbirdsInvocationTriggeredAbility(this); + } + + @Override + public String getRule() { + return "Whenever you cast a spell from your hand, " + + "reveal the top X cards of your library, " + + "where X is that spell's converted mana cost. " + + "You may cast a card revealed this way with " + + "converted mana cost X or less without paying its mana cost." + + " Put the rest on the bottom of your library in a random order."; + } +} + +class SunbirdsInvocationEffect extends OneShotEffect { + + public SunbirdsInvocationEffect() { + super(Outcome.PutCardInPlay); + staticText = "reveal the top X cards of your library, where X is that spell's converted mana cost. You may cast a card revealed this way with converted mana cost X or less without paying its mana cost. Put the rest on the bottom of your library in a random order"; + } + + public SunbirdsInvocationEffect(final SunbirdsInvocationEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (controller == null || sourceObject == null) { + return false; + } + Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source)); + if (spell == null) { + return false; + } + int xValue = spell.getConvertedManaCost(); + Cards cards = new CardsImpl(); + cards.addAll(controller.getLibrary().getTopCards(game, xValue)); + if (!cards.isEmpty()) { + controller.revealCards(sourceObject.getIdName(), cards, game); + + FilterCard filter = new FilterNonlandCard("card revealed this way with converted mana cost " + xValue + " or less"); + filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, xValue + 1)); + TargetCard target = new TargetCard(1, Zone.LIBRARY, filter); + + if (controller.chooseTarget(Outcome.PlayForFree, cards, target, source, game)) { + Card card = cards.get(target.getFirstTarget(), game); + if (card != null) { + if (controller.chooseUse(outcome, "Cast " + card.getLogName() + " without paying its mana cost?", source, game)) { + controller.cast(card.getSpellAbility(), game, true); + cards.remove(card); + } + } + } + } + + while (!cards.isEmpty()) { + Card card = cards.getRandom(game); + if (card != null) { + cards.remove(card); + card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false); + } + } + + return true; + } + + @Override + public SunbirdsInvocationEffect copy() { + return new SunbirdsInvocationEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SunbladeElf.java b/Mage.Sets/src/mage/cards/s/SunbladeElf.java index 03f7ad2817..ec32821bcd 100644 --- a/Mage.Sets/src/mage/cards/s/SunbladeElf.java +++ b/Mage.Sets/src/mage/cards/s/SunbladeElf.java @@ -58,8 +58,8 @@ public class SunbladeElf extends CardImpl { public SunbladeElf(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SunblastAngel.java b/Mage.Sets/src/mage/cards/s/SunblastAngel.java index 401f4af949..253dc26bc1 100644 --- a/Mage.Sets/src/mage/cards/s/SunblastAngel.java +++ b/Mage.Sets/src/mage/cards/s/SunblastAngel.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.TappedPredicate; @@ -54,7 +55,7 @@ public class SunblastAngel extends CardImpl { public SunblastAngel (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/Sunbond.java b/Mage.Sets/src/mage/cards/s/Sunbond.java index a3f257e3b9..7e71c144ad 100644 --- a/Mage.Sets/src/mage/cards/s/Sunbond.java +++ b/Mage.Sets/src/mage/cards/s/Sunbond.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class Sunbond extends CardImpl { public Sunbond(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/s/Suncrusher.java b/Mage.Sets/src/mage/cards/s/Suncrusher.java index 9ac2043d70..3c5c2769db 100644 --- a/Mage.Sets/src/mage/cards/s/Suncrusher.java +++ b/Mage.Sets/src/mage/cards/s/Suncrusher.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.SunburstAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -52,7 +53,7 @@ public class Suncrusher extends CardImpl { public Suncrusher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{9}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SunderingTitan.java b/Mage.Sets/src/mage/cards/s/SunderingTitan.java index ac9dc94ff5..fabc79b65e 100644 --- a/Mage.Sets/src/mage/cards/s/SunderingTitan.java +++ b/Mage.Sets/src/mage/cards/s/SunderingTitan.java @@ -56,7 +56,7 @@ public class SunderingTitan extends CardImpl { public SunderingTitan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{8}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(7); this.toughness = new MageInt(10); diff --git a/Mage.Sets/src/mage/cards/s/SunflareShaman.java b/Mage.Sets/src/mage/cards/s/SunflareShaman.java index 3607938c05..11e58a48f3 100644 --- a/Mage.Sets/src/mage/cards/s/SunflareShaman.java +++ b/Mage.Sets/src/mage/cards/s/SunflareShaman.java @@ -56,8 +56,8 @@ public class SunflareShaman extends CardImpl { public SunflareShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/Sunforger.java b/Mage.Sets/src/mage/cards/s/Sunforger.java index f5c509baf7..cd54573746 100644 --- a/Mage.Sets/src/mage/cards/s/Sunforger.java +++ b/Mage.Sets/src/mage/cards/s/Sunforger.java @@ -44,6 +44,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Outcome; @@ -67,7 +68,7 @@ public class Sunforger extends CardImpl { public Sunforger(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +4/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(4, 0, Duration.WhileOnBattlefield))); diff --git a/Mage.Sets/src/mage/cards/s/SungracePegasus.java b/Mage.Sets/src/mage/cards/s/SungracePegasus.java index 6d6a888895..e0b8adb96a 100644 --- a/Mage.Sets/src/mage/cards/s/SungracePegasus.java +++ b/Mage.Sets/src/mage/cards/s/SungracePegasus.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SungracePegasus extends CardImpl { public SungracePegasus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Pegasus"); + this.subtype.add(SubType.PEGASUS); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SunhomeEnforcer.java b/Mage.Sets/src/mage/cards/s/SunhomeEnforcer.java index 6b4f72b5ca..4876f3cab4 100644 --- a/Mage.Sets/src/mage/cards/s/SunhomeEnforcer.java +++ b/Mage.Sets/src/mage/cards/s/SunhomeEnforcer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -52,8 +53,8 @@ public class SunhomeEnforcer extends CardImpl { public SunhomeEnforcer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{W}"); - this.subtype.add("Giant"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SunhomeGuildmage.java b/Mage.Sets/src/mage/cards/s/SunhomeGuildmage.java index 7771406ff1..131f4fbb7b 100644 --- a/Mage.Sets/src/mage/cards/s/SunhomeGuildmage.java +++ b/Mage.Sets/src/mage/cards/s/SunhomeGuildmage.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.SoldierTokenWithHaste; @@ -49,8 +50,8 @@ public class SunhomeGuildmage extends CardImpl { public SunhomeGuildmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SunkenField.java b/Mage.Sets/src/mage/cards/s/SunkenField.java index c480f2cdb5..97a3830276 100644 --- a/Mage.Sets/src/mage/cards/s/SunkenField.java +++ b/Mage.Sets/src/mage/cards/s/SunkenField.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -56,7 +57,7 @@ public class SunkenField extends CardImpl { public SunkenField(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SunkenHollow.java b/Mage.Sets/src/mage/cards/s/SunkenHollow.java index d97921888f..96c024e540 100644 --- a/Mage.Sets/src/mage/cards/s/SunkenHollow.java +++ b/Mage.Sets/src/mage/cards/s/SunkenHollow.java @@ -39,6 +39,7 @@ import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.SuperType; import mage.filter.common.FilterLandPermanent; @@ -58,8 +59,8 @@ public class SunkenHollow extends CardImpl { public SunkenHollow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Island"); - this.subtype.add("Swamp"); + this.subtype.add(SubType.ISLAND); + this.subtype.add(SubType.SWAMP); // Sunken Hollow enters the battlefield tapped unless you control two or more basic lands. Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1)); diff --git a/Mage.Sets/src/mage/cards/s/SunpetalGrove.java b/Mage.Sets/src/mage/cards/s/SunpetalGrove.java index 6a7e81aed7..a608396225 100644 --- a/Mage.Sets/src/mage/cards/s/SunpetalGrove.java +++ b/Mage.Sets/src/mage/cards/s/SunpetalGrove.java @@ -24,8 +24,7 @@ * 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.cards.s; import mage.abilities.common.EntersBattlefieldAbility; @@ -59,10 +58,10 @@ public class SunpetalGrove extends CardImpl { } public SunpetalGrove(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); - String abilityText = "tap it unless you control a Forest or a Plains"; + String abilityText = " tapped unless you control a Forest or a Plains"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new GreenManaAbility()); this.addAbility(new WhiteManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SunriseSeeker.java b/Mage.Sets/src/mage/cards/s/SunriseSeeker.java new file mode 100644 index 0000000000..c5194fb74a --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SunriseSeeker.java @@ -0,0 +1,69 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.keyword.ExploreSourceEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author TheElk801 + */ +public class SunriseSeeker extends CardImpl { + + public SunriseSeeker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // When Sunrise Seeker enters the battlefield, it explores. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ExploreSourceEffect())); + } + + public SunriseSeeker(final SunriseSeeker card) { + super(card); + } + + @Override + public SunriseSeeker copy() { + return new SunriseSeeker(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SunriseSovereign.java b/Mage.Sets/src/mage/cards/s/SunriseSovereign.java index 8cf762cbf5..00fe77358e 100644 --- a/Mage.Sets/src/mage/cards/s/SunriseSovereign.java +++ b/Mage.Sets/src/mage/cards/s/SunriseSovereign.java @@ -56,8 +56,8 @@ public class SunriseSovereign extends CardImpl { public SunriseSovereign(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SunscapeApprentice.java b/Mage.Sets/src/mage/cards/s/SunscapeApprentice.java index 81ed4ad22f..1f09b28f89 100644 --- a/Mage.Sets/src/mage/cards/s/SunscapeApprentice.java +++ b/Mage.Sets/src/mage/cards/s/SunscapeApprentice.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -52,8 +53,8 @@ public class SunscapeApprentice extends CardImpl { public SunscapeApprentice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SunscapeBattlemage.java b/Mage.Sets/src/mage/cards/s/SunscapeBattlemage.java index a5edb2ffe9..7ff242e062 100644 --- a/Mage.Sets/src/mage/cards/s/SunscapeBattlemage.java +++ b/Mage.Sets/src/mage/cards/s/SunscapeBattlemage.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; import mage.target.common.TargetCreaturePermanent; @@ -57,8 +58,8 @@ public class SunscapeBattlemage extends CardImpl { public SunscapeBattlemage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SunscapeFamiliar.java b/Mage.Sets/src/mage/cards/s/SunscapeFamiliar.java index 98dd6a8920..0f91253f56 100644 --- a/Mage.Sets/src/mage/cards/s/SunscapeFamiliar.java +++ b/Mage.Sets/src/mage/cards/s/SunscapeFamiliar.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; @@ -57,7 +58,7 @@ public class SunscapeFamiliar extends CardImpl { public SunscapeFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SunscapeMaster.java b/Mage.Sets/src/mage/cards/s/SunscapeMaster.java index f0a052bcf0..ef269a7a73 100644 --- a/Mage.Sets/src/mage/cards/s/SunscapeMaster.java +++ b/Mage.Sets/src/mage/cards/s/SunscapeMaster.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -51,8 +52,8 @@ public class SunscapeMaster extends CardImpl { public SunscapeMaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SunscorchRegent.java b/Mage.Sets/src/mage/cards/s/SunscorchRegent.java index 4d5c529bc6..6d07e29406 100644 --- a/Mage.Sets/src/mage/cards/s/SunscorchRegent.java +++ b/Mage.Sets/src/mage/cards/s/SunscorchRegent.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -47,7 +48,7 @@ public class SunscorchRegent extends CardImpl { public SunscorchRegent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SunscorchedDesert.java b/Mage.Sets/src/mage/cards/s/SunscorchedDesert.java index 591e6dbca8..63d54229a8 100644 --- a/Mage.Sets/src/mage/cards/s/SunscorchedDesert.java +++ b/Mage.Sets/src/mage/cards/s/SunscorchedDesert.java @@ -35,6 +35,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -46,7 +47,7 @@ public class SunscorchedDesert extends CardImpl { public SunscorchedDesert(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Desert"); + this.subtype.add(SubType.DESERT); // When Sunscorced Desert enters the battlefield, it deals 1 damage to target player. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1)); diff --git a/Mage.Sets/src/mage/cards/s/Sunscour.java b/Mage.Sets/src/mage/cards/s/Sunscour.java index 7649c08e97..aca679b76b 100644 --- a/Mage.Sets/src/mage/cards/s/Sunscour.java +++ b/Mage.Sets/src/mage/cards/s/Sunscour.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.FilterCard; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.StaticFilters; import mage.filter.predicate.mageobject.ColorPredicate; import mage.target.common.TargetCardInHand; @@ -47,18 +47,19 @@ import mage.target.common.TargetCardInHand; public class Sunscour extends CardImpl { private static final FilterCard filter = new FilterCard("two white cards"); + static { filter.add(new ColorPredicate(ObjectColor.WHITE)); } public Sunscour(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{5}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{W}{W}"); // You may exile two white cards from your hand rather than pay Sunscour's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(2, filter)))); // Destroy all creatures. - this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterCreaturePermanent())); + this.getSpellAbility().addEffect(new DestroyAllEffect(StaticFilters.FILTER_PERMANENT_CREATURES)); } public Sunscour(final Sunscour card) { diff --git a/Mage.Sets/src/mage/cards/s/SunscourgeChampion.java b/Mage.Sets/src/mage/cards/s/SunscourgeChampion.java index 1b8287d127..0483974bfb 100644 --- a/Mage.Sets/src/mage/cards/s/SunscourgeChampion.java +++ b/Mage.Sets/src/mage/cards/s/SunscourgeChampion.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EternalizeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -55,8 +56,8 @@ public class SunscourgeChampion extends CardImpl { public SunscourgeChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SunseedNurturer.java b/Mage.Sets/src/mage/cards/s/SunseedNurturer.java index ed019bb530..d6e72f8d9d 100644 --- a/Mage.Sets/src/mage/cards/s/SunseedNurturer.java +++ b/Mage.Sets/src/mage/cards/s/SunseedNurturer.java @@ -35,6 +35,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -51,9 +52,9 @@ public class SunseedNurturer extends CardImpl { public SunseedNurturer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SunspearShikari.java b/Mage.Sets/src/mage/cards/s/SunspearShikari.java index 14ed25432b..5bee66a37a 100644 --- a/Mage.Sets/src/mage/cards/s/SunspearShikari.java +++ b/Mage.Sets/src/mage/cards/s/SunspearShikari.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -49,8 +50,8 @@ public class SunspearShikari extends CardImpl { public SunspearShikari(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SunspireGatekeepers.java b/Mage.Sets/src/mage/cards/s/SunspireGatekeepers.java index cd01ed7ba3..1a899747cf 100644 --- a/Mage.Sets/src/mage/cards/s/SunspireGatekeepers.java +++ b/Mage.Sets/src/mage/cards/s/SunspireGatekeepers.java @@ -28,7 +28,6 @@ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; @@ -43,6 +42,8 @@ import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.permanent.token.KnightToken; +import java.util.UUID; + /** * * @author LevelX2 @@ -58,8 +59,8 @@ public class SunspireGatekeepers extends CardImpl { public SunspireGatekeepers (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(4); @@ -68,7 +69,7 @@ public class SunspireGatekeepers extends CardImpl { this.addAbility(new ConditionalTriggeredAbility( new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KnightToken())), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1), - "When {this} enter the battlefield, if you control two or more Gates, create a 2/2 white Knight creature token with vigilance.")); + "When {this} enters the battlefield, if you control two or more Gates, create a 2/2 white Knight creature token with vigilance.")); } public SunspireGatekeepers (final SunspireGatekeepers card) { diff --git a/Mage.Sets/src/mage/cards/s/SunspireGriffin.java b/Mage.Sets/src/mage/cards/s/SunspireGriffin.java index 0829c67ca8..4ee147a43b 100644 --- a/Mage.Sets/src/mage/cards/s/SunspireGriffin.java +++ b/Mage.Sets/src/mage/cards/s/SunspireGriffin.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SunspireGriffin extends CardImpl { public SunspireGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SunstrikeLegionnaire.java b/Mage.Sets/src/mage/cards/s/SunstrikeLegionnaire.java index c32f1d424c..112a1832f8 100644 --- a/Mage.Sets/src/mage/cards/s/SunstrikeLegionnaire.java +++ b/Mage.Sets/src/mage/cards/s/SunstrikeLegionnaire.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -63,8 +64,8 @@ public class SunstrikeLegionnaire extends CardImpl { public SunstrikeLegionnaire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SuntailHawk.java b/Mage.Sets/src/mage/cards/s/SuntailHawk.java index 152fd1fa85..c8d455daf9 100644 --- a/Mage.Sets/src/mage/cards/s/SuntailHawk.java +++ b/Mage.Sets/src/mage/cards/s/SuntailHawk.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SuntailHawk extends CardImpl { public SuntailHawk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SuntouchedMyr.java b/Mage.Sets/src/mage/cards/s/SuntouchedMyr.java index bc71193d91..8094c5be5a 100644 --- a/Mage.Sets/src/mage/cards/s/SuntouchedMyr.java +++ b/Mage.Sets/src/mage/cards/s/SuntouchedMyr.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SunburstAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class SuntouchedMyr extends CardImpl { public SuntouchedMyr(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Myr"); + this.subtype.add(SubType.MYR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/Sunweb.java b/Mage.Sets/src/mage/cards/s/Sunweb.java index 357b55a004..2ebadddf32 100644 --- a/Mage.Sets/src/mage/cards/s/Sunweb.java +++ b/Mage.Sets/src/mage/cards/s/Sunweb.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -54,7 +55,7 @@ public class Sunweb extends CardImpl { public Sunweb(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SuperBattleDroid.java b/Mage.Sets/src/mage/cards/s/SuperBattleDroid.java index ab2123b4e0..c31d0fd5d6 100644 --- a/Mage.Sets/src/mage/cards/s/SuperBattleDroid.java +++ b/Mage.Sets/src/mage/cards/s/SuperBattleDroid.java @@ -1,61 +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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.keyword.RepairAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class SuperBattleDroid extends CardImpl { - - public SuperBattleDroid(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}{U}"); - this.subtype.add("Droid"); - this.power = new MageInt(4); - this.toughness = new MageInt(5); - - // Repair 2 - this.addAbility(new RepairAbility(2)); - } - - public SuperBattleDroid(final SuperBattleDroid card) { - super(card); - } - - @Override - public SuperBattleDroid copy() { - return new SuperBattleDroid(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.RepairAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author Styxo + */ +public class SuperBattleDroid extends CardImpl { + + public SuperBattleDroid(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}{U}"); + this.subtype.add(SubType.DROID); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // Repair 2 + this.addAbility(new RepairAbility(2)); + } + + public SuperBattleDroid(final SuperBattleDroid card) { + super(card); + } + + @Override + public SuperBattleDroid copy() { + return new SuperBattleDroid(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SupplantForm.java b/Mage.Sets/src/mage/cards/s/SupplantForm.java index bf83582175..1ed9b2032d 100644 --- a/Mage.Sets/src/mage/cards/s/SupplantForm.java +++ b/Mage.Sets/src/mage/cards/s/SupplantForm.java @@ -29,7 +29,7 @@ package mage.cards.s; import java.util.UUID; import mage.abilities.effects.Effect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -48,7 +48,7 @@ public class SupplantForm extends CardImpl { // Return target creature to its owner's hand. You create a token that's a copy of that creature. this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - Effect effect = new PutTokenOntoBattlefieldCopyTargetEffect(); + Effect effect = new CreateTokenCopyTargetEffect(); effect.setText("You create a token that's a copy of that creature"); this.getSpellAbility().addEffect(effect); } diff --git a/Mage.Sets/src/mage/cards/s/SupplyCaravan.java b/Mage.Sets/src/mage/cards/s/SupplyCaravan.java index 878cd37383..716b0ca545 100644 --- a/Mage.Sets/src/mage/cards/s/SupplyCaravan.java +++ b/Mage.Sets/src/mage/cards/s/SupplyCaravan.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.TappedPredicate; import mage.game.permanent.token.WarriorVigilantToken; @@ -56,7 +57,7 @@ public class SupplyCaravan extends CardImpl { public SupplyCaravan(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); - this.subtype.add("Camel"); + this.subtype.add(SubType.CAMEL); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SupplyLineCranes.java b/Mage.Sets/src/mage/cards/s/SupplyLineCranes.java index 09bbf2ff95..12921f35d0 100644 --- a/Mage.Sets/src/mage/cards/s/SupplyLineCranes.java +++ b/Mage.Sets/src/mage/cards/s/SupplyLineCranes.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class SupplyLineCranes extends CardImpl { public SupplyLineCranes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SuppressionBonds.java b/Mage.Sets/src/mage/cards/s/SuppressionBonds.java index 28a284f697..c4aa188b22 100644 --- a/Mage.Sets/src/mage/cards/s/SuppressionBonds.java +++ b/Mage.Sets/src/mage/cards/s/SuppressionBonds.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -50,7 +51,7 @@ public class SuppressionBonds extends CardImpl { public SuppressionBonds(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant nonland permanent TargetPermanent auraTarget = new TargetNonlandPermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SupremeExemplar.java b/Mage.Sets/src/mage/cards/s/SupremeExemplar.java index 42ae4f3928..e6e5ddbb7f 100644 --- a/Mage.Sets/src/mage/cards/s/SupremeExemplar.java +++ b/Mage.Sets/src/mage/cards/s/SupremeExemplar.java @@ -52,7 +52,7 @@ public class SupremeExemplar extends CardImpl { public SupremeExemplar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(10); this.toughness = new MageInt(10); diff --git a/Mage.Sets/src/mage/cards/s/SupremeInquisitor.java b/Mage.Sets/src/mage/cards/s/SupremeInquisitor.java index 38bed5add5..9f586f4f52 100644 --- a/Mage.Sets/src/mage/cards/s/SupremeInquisitor.java +++ b/Mage.Sets/src/mage/cards/s/SupremeInquisitor.java @@ -67,8 +67,8 @@ public class SupremeInquisitor extends CardImpl { public SupremeInquisitor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SuqAtaAssassin.java b/Mage.Sets/src/mage/cards/s/SuqAtaAssassin.java index 7c07fac2ac..499f3db3b3 100644 --- a/Mage.Sets/src/mage/cards/s/SuqAtaAssassin.java +++ b/Mage.Sets/src/mage/cards/s/SuqAtaAssassin.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class SuqAtaAssassin extends CardImpl { public SuqAtaAssassin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SuqAtaFirewalker.java b/Mage.Sets/src/mage/cards/s/SuqAtaFirewalker.java index 078191878b..b193dabb4e 100644 --- a/Mage.Sets/src/mage/cards/s/SuqAtaFirewalker.java +++ b/Mage.Sets/src/mage/cards/s/SuqAtaFirewalker.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterObject; @@ -59,8 +60,8 @@ public class SuqAtaFirewalker extends CardImpl { public SuqAtaFirewalker(UUID cardId, CardSetInfo cardSetInfo) { super(cardId, cardSetInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); - subtype.add("Human"); - subtype.add("Wizard"); + subtype.add(SubType.HUMAN); + subtype.add(SubType.WIZARD); power = new MageInt(0); toughness = new MageInt(1); color.setBlue(true); diff --git a/Mage.Sets/src/mage/cards/s/SuqAtaLancer.java b/Mage.Sets/src/mage/cards/s/SuqAtaLancer.java index a509db39f1..5743794d8d 100644 --- a/Mage.Sets/src/mage/cards/s/SuqAtaLancer.java +++ b/Mage.Sets/src/mage/cards/s/SuqAtaLancer.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SuqAtaLancer extends CardImpl { public SuqAtaLancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SurestrikeTrident.java b/Mage.Sets/src/mage/cards/s/SurestrikeTrident.java index facc471461..1b039ef383 100644 --- a/Mage.Sets/src/mage/cards/s/SurestrikeTrident.java +++ b/Mage.Sets/src/mage/cards/s/SurestrikeTrident.java @@ -45,6 +45,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -57,7 +58,7 @@ public class SurestrikeTrident extends CardImpl { public SurestrikeTrident(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has first strike and "{T}, Unattach Surestrike Trident: This creature deals damage equal to its power to target player." Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT)); diff --git a/Mage.Sets/src/mage/cards/s/SurgeOfStrength.java b/Mage.Sets/src/mage/cards/s/SurgeOfStrength.java new file mode 100644 index 0000000000..a6523b8cdd --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SurgeOfStrength.java @@ -0,0 +1,85 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.costs.common.DiscardTargetCost; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.dynamicvalue.common.TargetConvertedManaCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCardInHand; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class SurgeOfStrength extends CardImpl { + + private static final FilterCard filter = new FilterCard("a red or green card"); + static{ + filter.add(Predicates.or(new ColorPredicate(ObjectColor.RED), new ColorPredicate(ObjectColor.GREEN))); + } + + public SurgeOfStrength(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}{G}"); + + // As an additional cost to cast Surge of Strength, discard a red or green card. + this.getSpellAbility().addCost(new DiscardTargetCost(new TargetCardInHand(filter))); + + // Target creature gains trample and gets +X/+0 until end of turn, where X is that creature's converted mana cost. + Effect effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn); + effect.setText("Target creature gains trample"); + this.getSpellAbility().addEffect(effect); + effect = new BoostTargetEffect(new TargetConvertedManaCost(), new StaticValue(0), Duration.EndOfTurn, true); + effect.setText("and gets +X/+0 until end of turn, where X is that creature's converted mana cost"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public SurgeOfStrength(final SurgeOfStrength card) { + super(card); + } + + @Override + public SurgeOfStrength copy() { + return new SurgeOfStrength(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SurgeOfThoughtweft.java b/Mage.Sets/src/mage/cards/s/SurgeOfThoughtweft.java index fdd22cf1cb..086977621c 100644 --- a/Mage.Sets/src/mage/cards/s/SurgeOfThoughtweft.java +++ b/Mage.Sets/src/mage/cards/s/SurgeOfThoughtweft.java @@ -54,7 +54,7 @@ public class SurgeOfThoughtweft extends CardImpl { public SurgeOfThoughtweft(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{1}{W}"); - this.subtype.add("Kithkin"); + this.subtype.add(SubType.KITHKIN); // Creatures you control get +1/+1 until end of turn. this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn)); diff --git a/Mage.Sets/src/mage/cards/s/Surgespanner.java b/Mage.Sets/src/mage/cards/s/Surgespanner.java index 69fd447904..bb5467ee11 100644 --- a/Mage.Sets/src/mage/cards/s/Surgespanner.java +++ b/Mage.Sets/src/mage/cards/s/Surgespanner.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPermanent; /** @@ -47,8 +48,8 @@ public class Surgespanner extends CardImpl { public Surgespanner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SurgingAether.java b/Mage.Sets/src/mage/cards/s/SurgingAether.java index bb9a0b3a5f..79d406787f 100644 --- a/Mage.Sets/src/mage/cards/s/SurgingAether.java +++ b/Mage.Sets/src/mage/cards/s/SurgingAether.java @@ -42,10 +42,11 @@ import mage.target.TargetPermanent; public class SurgingAether extends CardImpl { public SurgingAether(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}"); // Ripple 4 - this.addAbility(new RippleAbility(4)); + this.addAbility(new RippleAbility(4).setRuleAtTheTop(true)); + // Return target permanent to its owner's hand. this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); this.getSpellAbility().addTarget(new TargetPermanent()); diff --git a/Mage.Sets/src/mage/cards/s/SurgingDementia.java b/Mage.Sets/src/mage/cards/s/SurgingDementia.java index dfe6b8e92c..d24c284691 100644 --- a/Mage.Sets/src/mage/cards/s/SurgingDementia.java +++ b/Mage.Sets/src/mage/cards/s/SurgingDementia.java @@ -42,10 +42,10 @@ import mage.target.TargetPlayer; public class SurgingDementia extends CardImpl { public SurgingDementia(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}"); // Ripple 4 - this.addAbility(new RippleAbility(4)); + this.addAbility(new RippleAbility(4).setRuleAtTheTop(true)); // Target player discards a card. this.getSpellAbility().getEffects().add(new DiscardTargetEffect(1)); diff --git a/Mage.Sets/src/mage/cards/s/SurgingFlame.java b/Mage.Sets/src/mage/cards/s/SurgingFlame.java index 07ab76ed79..2a7b218a35 100644 --- a/Mage.Sets/src/mage/cards/s/SurgingFlame.java +++ b/Mage.Sets/src/mage/cards/s/SurgingFlame.java @@ -42,10 +42,11 @@ import mage.target.common.TargetCreatureOrPlayer; public class SurgingFlame extends CardImpl { public SurgingFlame(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); // Ripple 4 - this.addAbility(new RippleAbility(4)); + this.addAbility(new RippleAbility(4).setRuleAtTheTop(true)); + // Surging Flame deals 2 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); diff --git a/Mage.Sets/src/mage/cards/s/SurgingMight.java b/Mage.Sets/src/mage/cards/s/SurgingMight.java index 6fba009634..4de1aca15d 100644 --- a/Mage.Sets/src/mage/cards/s/SurgingMight.java +++ b/Mage.Sets/src/mage/cards/s/SurgingMight.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.RippleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class SurgingMight extends CardImpl { public SurgingMight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/s/SurgingSentinels.java b/Mage.Sets/src/mage/cards/s/SurgingSentinels.java index 4d28b645db..43c4f40eb8 100644 --- a/Mage.Sets/src/mage/cards/s/SurgingSentinels.java +++ b/Mage.Sets/src/mage/cards/s/SurgingSentinels.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.RippleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class SurgingSentinels extends CardImpl { public SurgingSentinels(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SurpriseManeuver.java b/Mage.Sets/src/mage/cards/s/SurpriseManeuver.java index 1e2e654074..56e8aceeec 100644 --- a/Mage.Sets/src/mage/cards/s/SurpriseManeuver.java +++ b/Mage.Sets/src/mage/cards/s/SurpriseManeuver.java @@ -1,65 +1,65 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.abilities.effects.common.UntapTargetEffect; -import mage.abilities.effects.common.continuous.BoostOpponentsEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.target.common.TargetControlledCreaturePermanent; - -/** - * - * @author Styxo - */ -public class SurpriseManeuver extends CardImpl { - - public SurpriseManeuver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); - - // Untap up to two target creatures you control. - this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, 2)); - this.getSpellAbility().addEffect(new UntapTargetEffect()); - - // Creatures your opponents control get -1/-0 until end of turn. - this.getSpellAbility().addEffect(new BoostOpponentsEffect(-1, 0, Duration.EndOfTurn)); - - } - - public SurpriseManeuver(final SurpriseManeuver card) { - super(card); - } - - @Override - public SurpriseManeuver copy() { - return new SurpriseManeuver(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.continuous.BoostOpponentsEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author Styxo + */ +public class SurpriseManeuver extends CardImpl { + + public SurpriseManeuver(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); + + // Untap up to two target creatures you control. + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, 2)); + this.getSpellAbility().addEffect(new UntapTargetEffect()); + + // Creatures your opponents control get -1/-0 until end of turn. + this.getSpellAbility().addEffect(new BoostOpponentsEffect(-1, 0, Duration.EndOfTurn)); + + } + + public SurpriseManeuver(final SurpriseManeuver card) { + super(card); + } + + @Override + public SurpriseManeuver copy() { + return new SurpriseManeuver(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SurrakDragonclaw.java b/Mage.Sets/src/mage/cards/s/SurrakDragonclaw.java index 7ae24ed7eb..9365f0a691 100644 --- a/Mage.Sets/src/mage/cards/s/SurrakDragonclaw.java +++ b/Mage.Sets/src/mage/cards/s/SurrakDragonclaw.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class SurrakDragonclaw extends CardImpl { public SurrakDragonclaw(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{U}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SurrakTheHuntCaller.java b/Mage.Sets/src/mage/cards/s/SurrakTheHuntCaller.java index 82e2ab15e7..4bdcbebf12 100644 --- a/Mage.Sets/src/mage/cards/s/SurrakTheHuntCaller.java +++ b/Mage.Sets/src/mage/cards/s/SurrakTheHuntCaller.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.TargetController; @@ -52,8 +53,8 @@ public class SurrakTheHuntCaller extends CardImpl { public SurrakTheHuntCaller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SurrakarBanisher.java b/Mage.Sets/src/mage/cards/s/SurrakarBanisher.java index 2e63540c08..faa4e25c51 100644 --- a/Mage.Sets/src/mage/cards/s/SurrakarBanisher.java +++ b/Mage.Sets/src/mage/cards/s/SurrakarBanisher.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.TappedPredicate; import mage.target.common.TargetCreaturePermanent; @@ -53,7 +54,7 @@ public class SurrakarBanisher extends CardImpl { public SurrakarBanisher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Surrakar"); + this.subtype.add(SubType.SURRAKAR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SurrakarMarauder.java b/Mage.Sets/src/mage/cards/s/SurrakarMarauder.java index a8c37c31df..a9dd07f390 100644 --- a/Mage.Sets/src/mage/cards/s/SurrakarMarauder.java +++ b/Mage.Sets/src/mage/cards/s/SurrakarMarauder.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.IntimidateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,7 +46,7 @@ public class SurrakarMarauder extends CardImpl { public SurrakarMarauder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Surrakar"); + this.subtype.add(SubType.SURRAKAR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SurrakarSpellblade.java b/Mage.Sets/src/mage/cards/s/SurrakarSpellblade.java index f618efdb31..589ed82c1b 100644 --- a/Mage.Sets/src/mage/cards/s/SurrakarSpellblade.java +++ b/Mage.Sets/src/mage/cards/s/SurrakarSpellblade.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -58,7 +59,7 @@ public class SurrakarSpellblade extends CardImpl { public SurrakarSpellblade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Surrakar"); + this.subtype.add(SubType.SURRAKAR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SurveillingSprite.java b/Mage.Sets/src/mage/cards/s/SurveillingSprite.java index d9303c3dce..5525f97962 100644 --- a/Mage.Sets/src/mage/cards/s/SurveillingSprite.java +++ b/Mage.Sets/src/mage/cards/s/SurveillingSprite.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class SurveillingSprite extends CardImpl { public SurveillingSprite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SurvivalOfTheFittest.java b/Mage.Sets/src/mage/cards/s/SurvivalOfTheFittest.java index d3ccf3f2a8..c83b54b5fc 100644 --- a/Mage.Sets/src/mage/cards/s/SurvivalOfTheFittest.java +++ b/Mage.Sets/src/mage/cards/s/SurvivalOfTheFittest.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.DiscardTargetCost; @@ -43,13 +42,15 @@ import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetCardInHand; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author jeffwadsworth */ public class SurvivalOfTheFittest extends CardImpl { - private static final FilterCard filter = new FilterCard("creature card"); + private static final FilterCard filter = new FilterCard("a creature card"); static { filter.add(new CardTypePredicate(CardType.CREATURE)); diff --git a/Mage.Sets/src/mage/cards/s/SurvivorOfTheUnseen.java b/Mage.Sets/src/mage/cards/s/SurvivorOfTheUnseen.java new file mode 100644 index 0000000000..cf4c4bade3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SurvivorOfTheUnseen.java @@ -0,0 +1,118 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.constants.SubType; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInHand; + +/** + * + * @author TheElk801 + */ +public class SurvivorOfTheUnseen extends CardImpl { + + public SurvivorOfTheUnseen(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Cumulative upkeep {2} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{2}"))); + + // {T}: Draw two cards, then put a card from your hand on top of your library. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SurvivorOfTheUnseenEffect(), new TapSourceCost())); + } + + public SurvivorOfTheUnseen(final SurvivorOfTheUnseen card) { + super(card); + } + + @Override + public SurvivorOfTheUnseen copy() { + return new SurvivorOfTheUnseen(this); + } +} + +class SurvivorOfTheUnseenEffect extends OneShotEffect { + + public SurvivorOfTheUnseenEffect() { + super(Outcome.DrawCard); + staticText = "Draw two cards, then put a card from your hand on top of your library"; + } + + public SurvivorOfTheUnseenEffect(final SurvivorOfTheUnseenEffect effect) { + super(effect); + } + + @Override + public SurvivorOfTheUnseenEffect copy() { + return new SurvivorOfTheUnseenEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + player.drawCards(2, game); + putOnLibrary(player, source, game); + return true; + } + return false; + } + + private boolean putOnLibrary(Player player, Ability source, Game game) { + TargetCardInHand target = new TargetCardInHand(); + if (target.canChoose(source.getSourceId(), player.getId(), game)) { + player.chooseTarget(Outcome.ReturnToHand, target, source, game); + Card card = player.getHand().get(target.getFirstTarget(), game); + if (card != null) { + return player.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.HAND, true, false); + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SurvivorsEncampment.java b/Mage.Sets/src/mage/cards/s/SurvivorsEncampment.java index 805d828f25..1a2d726a6f 100644 --- a/Mage.Sets/src/mage/cards/s/SurvivorsEncampment.java +++ b/Mage.Sets/src/mage/cards/s/SurvivorsEncampment.java @@ -35,6 +35,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.permanent.TappedPredicate; @@ -55,7 +56,7 @@ public class SurvivorsEncampment extends CardImpl { public SurvivorsEncampment(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Desert"); + this.subtype.add(SubType.DESERT); // {T}: Add {C} to your mana pool. this.addAbility(new ColorlessManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SustainerOfTheRealm.java b/Mage.Sets/src/mage/cards/s/SustainerOfTheRealm.java index 724d5dcd04..e766a8b67a 100644 --- a/Mage.Sets/src/mage/cards/s/SustainerOfTheRealm.java +++ b/Mage.Sets/src/mage/cards/s/SustainerOfTheRealm.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,7 +46,7 @@ public class SustainerOfTheRealm extends CardImpl { public SustainerOfTheRealm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SustainingSpirit.java b/Mage.Sets/src/mage/cards/s/SustainingSpirit.java index b55900a094..08a42cbaf0 100644 --- a/Mage.Sets/src/mage/cards/s/SustainingSpirit.java +++ b/Mage.Sets/src/mage/cards/s/SustainingSpirit.java @@ -50,8 +50,8 @@ public class SustainingSpirit extends CardImpl { public SustainingSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Angel"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.ANGEL); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SuturePriest.java b/Mage.Sets/src/mage/cards/s/SuturePriest.java index a88faa982a..58947b1a42 100644 --- a/Mage.Sets/src/mage/cards/s/SuturePriest.java +++ b/Mage.Sets/src/mage/cards/s/SuturePriest.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.game.Game; @@ -54,7 +55,7 @@ public class SuturePriest extends CardImpl { public SuturePriest(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SutureSpirit.java b/Mage.Sets/src/mage/cards/s/SutureSpirit.java index 937dd883b6..25a1d84a93 100644 --- a/Mage.Sets/src/mage/cards/s/SutureSpirit.java +++ b/Mage.Sets/src/mage/cards/s/SutureSpirit.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class SutureSpirit extends CardImpl { public SutureSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SuturedGhoul.java b/Mage.Sets/src/mage/cards/s/SuturedGhoul.java index 71a2f9d2f3..00b76dbe10 100644 --- a/Mage.Sets/src/mage/cards/s/SuturedGhoul.java +++ b/Mage.Sets/src/mage/cards/s/SuturedGhoul.java @@ -43,6 +43,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -62,7 +63,7 @@ public class SuturedGhoul extends CardImpl { public SuturedGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SvogthosTheRestlessTomb.java b/Mage.Sets/src/mage/cards/s/SvogthosTheRestlessTomb.java index 28064d72c3..8d569f9170 100644 --- a/Mage.Sets/src/mage/cards/s/SvogthosTheRestlessTomb.java +++ b/Mage.Sets/src/mage/cards/s/SvogthosTheRestlessTomb.java @@ -40,6 +40,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -77,8 +78,8 @@ class SvogthosToken extends Token { public SvogthosToken() { super("", "black and green Plant Zombie creature with \"This creature's power and toughness are each equal to the number of creature cards in your graveyard.\""); cardType.add(CardType.CREATURE); - subtype.add("Plant"); - subtype.add("Zombie"); + subtype.add(SubType.PLANT); + subtype.add(SubType.ZOMBIE); color.setGreen(true); color.setBlack(true); power = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SvyelunitePriest.java b/Mage.Sets/src/mage/cards/s/SvyelunitePriest.java index 93c7b151df..cdc45ef239 100644 --- a/Mage.Sets/src/mage/cards/s/SvyelunitePriest.java +++ b/Mage.Sets/src/mage/cards/s/SvyelunitePriest.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.PhaseStep; import mage.constants.Zone; @@ -52,8 +53,8 @@ public class SvyelunitePriest extends CardImpl { public SvyelunitePriest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SwampMosquito.java b/Mage.Sets/src/mage/cards/s/SwampMosquito.java index bddeed23b2..dda38b6d9b 100644 --- a/Mage.Sets/src/mage/cards/s/SwampMosquito.java +++ b/Mage.Sets/src/mage/cards/s/SwampMosquito.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class SwampMosquito extends CardImpl { public SwampMosquito(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SwansOfBrynArgoll.java b/Mage.Sets/src/mage/cards/s/SwansOfBrynArgoll.java index 5603b5c8aa..2d87dc9523 100644 --- a/Mage.Sets/src/mage/cards/s/SwansOfBrynArgoll.java +++ b/Mage.Sets/src/mage/cards/s/SwansOfBrynArgoll.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -57,8 +58,8 @@ public class SwansOfBrynArgoll extends CardImpl { public SwansOfBrynArgoll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W/U}{W/U}"); - this.subtype.add("Bird"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SwarmIntelligence.java b/Mage.Sets/src/mage/cards/s/SwarmIntelligence.java index e20abb16e1..4c1c1064b6 100644 --- a/Mage.Sets/src/mage/cards/s/SwarmIntelligence.java +++ b/Mage.Sets/src/mage/cards/s/SwarmIntelligence.java @@ -1,60 +1,60 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.abilities.common.SpellCastControllerTriggeredAbility; -import mage.abilities.effects.common.CopyTargetSpellEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.common.FilterInstantOrSorcerySpell; - -/** - * - * @author LevelX2 - */ -public class SwarmIntelligence extends CardImpl { - - public SwarmIntelligence(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{6}{U}"); - - // Whenever you cast an instant or sorcery spell, you may copy that spell. You may choose new targets for the copy. - this.addAbility(new SpellCastControllerTriggeredAbility( - new CopyTargetSpellEffect().setText("you may copy that spell. You may choose new targets for the copy"), new FilterInstantOrSorcerySpell("an instant or sorcery spell"), true, true)); - } - - public SwarmIntelligence(final SwarmIntelligence card) { - super(card); - } - - @Override - public SwarmIntelligence copy() { - return new SwarmIntelligence(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.CopyTargetSpellEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterInstantOrSorcerySpell; + +/** + * + * @author LevelX2 + */ +public class SwarmIntelligence extends CardImpl { + + public SwarmIntelligence(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{6}{U}"); + + // Whenever you cast an instant or sorcery spell, you may copy that spell. You may choose new targets for the copy. + this.addAbility(new SpellCastControllerTriggeredAbility( + new CopyTargetSpellEffect(true).setText("you may copy that spell. You may choose new targets for the copy"), new FilterInstantOrSorcerySpell("an instant or sorcery spell"), true, true)); + } + + public SwarmIntelligence(final SwarmIntelligence card) { + super(card); + } + + @Override + public SwarmIntelligence copy() { + return new SwarmIntelligence(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SwarmOfBloodflies.java b/Mage.Sets/src/mage/cards/s/SwarmOfBloodflies.java index 80bfa5ebaf..7cde5f8eff 100644 --- a/Mage.Sets/src/mage/cards/s/SwarmOfBloodflies.java +++ b/Mage.Sets/src/mage/cards/s/SwarmOfBloodflies.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -47,7 +48,7 @@ public class SwarmOfBloodflies extends CardImpl { public SwarmOfBloodflies(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/s/SwarmOfRats.java b/Mage.Sets/src/mage/cards/s/SwarmOfRats.java index 5cac2ae81a..2ca07bf926 100644 --- a/Mage.Sets/src/mage/cards/s/SwarmOfRats.java +++ b/Mage.Sets/src/mage/cards/s/SwarmOfRats.java @@ -55,7 +55,7 @@ public class SwarmOfRats extends CardImpl { public SwarmOfRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SwarmTheSkies.java b/Mage.Sets/src/mage/cards/s/SwarmTheSkies.java index 407b4b5067..b4c695daf2 100644 --- a/Mage.Sets/src/mage/cards/s/SwarmTheSkies.java +++ b/Mage.Sets/src/mage/cards/s/SwarmTheSkies.java @@ -1,58 +1,58 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.game.permanent.token.TIEFighterToken; - -/** - * - * @author Styxo - */ -public class SwarmTheSkies extends CardImpl { - - public SwarmTheSkies(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}"); - - // Create three 1/1 black Starship artifact creature tokens with Spaceflight named TIE Fighter. - this.getSpellAbility().addEffect(new CreateTokenEffect(new TIEFighterToken(), 3)); - } - - public SwarmTheSkies(final SwarmTheSkies card) { - super(card); - } - - @Override - public SwarmTheSkies copy() { - return new SwarmTheSkies(this); - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.permanent.token.TIEFighterToken; + +/** + * + * @author Styxo + */ +public class SwarmTheSkies extends CardImpl { + + public SwarmTheSkies(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}"); + + // Create three 1/1 black Starship artifact creature tokens with Spaceflight named TIE Fighter. + this.getSpellAbility().addEffect(new CreateTokenEffect(new TIEFighterToken(), 3)); + } + + public SwarmTheSkies(final SwarmTheSkies card) { + super(card); + } + + @Override + public SwarmTheSkies copy() { + return new SwarmTheSkies(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SwarmbornGiant.java b/Mage.Sets/src/mage/cards/s/SwarmbornGiant.java index 867b0bfd2c..e5a2333fac 100644 --- a/Mage.Sets/src/mage/cards/s/SwarmbornGiant.java +++ b/Mage.Sets/src/mage/cards/s/SwarmbornGiant.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -55,8 +56,8 @@ import mage.game.events.GameEvent.EventType; public class SwarmbornGiant extends CardImpl { public SwarmbornGiant(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Giant"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(6); this.toughness = new MageInt(6); @@ -66,13 +67,13 @@ public class SwarmbornGiant extends CardImpl { // {4}{G}{G}: Monstrosity 2. this.addAbility(new MonstrosityAbility("{4}{G}{G}", 2)); - + // As long as Swarmborn Giant is monstrous, it has reach. Ability ability = new SimpleStaticAbility( Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(ReachAbility.getInstance(), Duration.WhileOnBattlefield), - MonstrousCondition.instance, - "As long as {this} is monstrous, it has reach")); + MonstrousCondition.instance, + "As long as {this} is monstrous, it has reach")); this.addAbility(ability); } @@ -117,6 +118,6 @@ class SwarmbornGiantTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever you're dealt combat damage, " + super.getRule(); + return "When you're dealt combat damage, " + super.getRule(); } } diff --git a/Mage.Sets/src/mage/cards/s/Swashbuckling.java b/Mage.Sets/src/mage/cards/s/Swashbuckling.java new file mode 100644 index 0000000000..1e35c418f0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/Swashbuckling.java @@ -0,0 +1,82 @@ +/* + * 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.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class Swashbuckling extends CardImpl { + + public Swashbuckling(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +2/+2 and has haste. + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield)); + ability.addEffect(new GainAbilityAttachedEffect(HasteAbility.getInstance(), AttachmentType.AURA) + .setText("and has haste")); + this.addAbility(ability); + } + + public Swashbuckling(final Swashbuckling card) { + super(card); + } + + @Override + public Swashbuckling copy() { + return new Swashbuckling(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SweatworksBrawler.java b/Mage.Sets/src/mage/cards/s/SweatworksBrawler.java index 09d02fcd56..83f9283dbe 100644 --- a/Mage.Sets/src/mage/cards/s/SweatworksBrawler.java +++ b/Mage.Sets/src/mage/cards/s/SweatworksBrawler.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class SweatworksBrawler extends CardImpl { public SweatworksBrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SwiftSpinner.java b/Mage.Sets/src/mage/cards/s/SwiftSpinner.java index b759d8e164..d83348de04 100644 --- a/Mage.Sets/src/mage/cards/s/SwiftSpinner.java +++ b/Mage.Sets/src/mage/cards/s/SwiftSpinner.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SwiftSpinner extends CardImpl { public SwiftSpinner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SwiftWarkite.java b/Mage.Sets/src/mage/cards/s/SwiftWarkite.java index 6369fdbef1..f8cfed71fb 100644 --- a/Mage.Sets/src/mage/cards/s/SwiftWarkite.java +++ b/Mage.Sets/src/mage/cards/s/SwiftWarkite.java @@ -44,6 +44,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Outcome; @@ -67,7 +68,7 @@ public class SwiftWarkite extends CardImpl { public SwiftWarkite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SwiftfootBoots.java b/Mage.Sets/src/mage/cards/s/SwiftfootBoots.java index c9b3fd7b63..f04bc8d8ca 100644 --- a/Mage.Sets/src/mage/cards/s/SwiftfootBoots.java +++ b/Mage.Sets/src/mage/cards/s/SwiftfootBoots.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class SwiftfootBoots extends CardImpl { public SwiftfootBoots(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has hexproof and haste. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(HexproofAbility.getInstance(), AttachmentType.EQUIPMENT)); diff --git a/Mage.Sets/src/mage/cards/s/SwirlingSpriggan.java b/Mage.Sets/src/mage/cards/s/SwirlingSpriggan.java index 7f89b76057..cba68e0aa0 100644 --- a/Mage.Sets/src/mage/cards/s/SwirlingSpriggan.java +++ b/Mage.Sets/src/mage/cards/s/SwirlingSpriggan.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BecomesColorOrColorsTargetEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -48,8 +49,8 @@ public class SwirlingSpriggan extends CardImpl { public SwirlingSpriggan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SwoopingTalon.java b/Mage.Sets/src/mage/cards/s/SwoopingTalon.java index 3a14eec132..672aa3a034 100644 --- a/Mage.Sets/src/mage/cards/s/SwoopingTalon.java +++ b/Mage.Sets/src/mage/cards/s/SwoopingTalon.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ProvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class SwoopingTalon extends CardImpl { public SwoopingTalon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SwordDancer.java b/Mage.Sets/src/mage/cards/s/SwordDancer.java index e8c859042d..e58938ac09 100644 --- a/Mage.Sets/src/mage/cards/s/SwordDancer.java +++ b/Mage.Sets/src/mage/cards/s/SwordDancer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetAttackingCreature; @@ -48,8 +49,8 @@ public class SwordDancer extends CardImpl { public SwordDancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SwordOfBodyAndMind.java b/Mage.Sets/src/mage/cards/s/SwordOfBodyAndMind.java index 2cd7bbca1f..d89ebccdae 100644 --- a/Mage.Sets/src/mage/cards/s/SwordOfBodyAndMind.java +++ b/Mage.Sets/src/mage/cards/s/SwordOfBodyAndMind.java @@ -45,6 +45,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -63,7 +64,7 @@ public class SwordOfBodyAndMind extends CardImpl { public SwordOfBodyAndMind(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+2 and has protection from green and from blue. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2)); diff --git a/Mage.Sets/src/mage/cards/s/SwordOfDungeonsAndDragons.java b/Mage.Sets/src/mage/cards/s/SwordOfDungeonsAndDragons.java index 91e15e9001..ab50290a06 100644 --- a/Mage.Sets/src/mage/cards/s/SwordOfDungeonsAndDragons.java +++ b/Mage.Sets/src/mage/cards/s/SwordOfDungeonsAndDragons.java @@ -74,7 +74,7 @@ public class SwordOfDungeonsAndDragons extends CardImpl { public SwordOfDungeonsAndDragons(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+2 and has protection from Rogues and from Clerics. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2)); diff --git a/Mage.Sets/src/mage/cards/s/SwordOfFeastAndFamine.java b/Mage.Sets/src/mage/cards/s/SwordOfFeastAndFamine.java index 5543f317a7..76ea4e143b 100644 --- a/Mage.Sets/src/mage/cards/s/SwordOfFeastAndFamine.java +++ b/Mage.Sets/src/mage/cards/s/SwordOfFeastAndFamine.java @@ -44,6 +44,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -61,7 +62,7 @@ public class SwordOfFeastAndFamine extends CardImpl { public SwordOfFeastAndFamine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ProtectionAbility.from(ObjectColor.GREEN, ObjectColor.BLACK), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/s/SwordOfFireAndIce.java b/Mage.Sets/src/mage/cards/s/SwordOfFireAndIce.java index c9d7b29ba7..2e137ff424 100644 --- a/Mage.Sets/src/mage/cards/s/SwordOfFireAndIce.java +++ b/Mage.Sets/src/mage/cards/s/SwordOfFireAndIce.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -59,7 +60,7 @@ public class SwordOfFireAndIce extends CardImpl { public SwordOfFireAndIce(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+2 and has protection from red and from blue. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2))); diff --git a/Mage.Sets/src/mage/cards/s/SwordOfKaldra.java b/Mage.Sets/src/mage/cards/s/SwordOfKaldra.java index bf97f41c51..1560a068d8 100644 --- a/Mage.Sets/src/mage/cards/s/SwordOfKaldra.java +++ b/Mage.Sets/src/mage/cards/s/SwordOfKaldra.java @@ -53,7 +53,7 @@ public class SwordOfKaldra extends CardImpl { public SwordOfKaldra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +5/+5. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(5, 5, Duration.WhileOnBattlefield))); diff --git a/Mage.Sets/src/mage/cards/s/SwordOfLightAndShadow.java b/Mage.Sets/src/mage/cards/s/SwordOfLightAndShadow.java index c00334b593..e96d1af110 100644 --- a/Mage.Sets/src/mage/cards/s/SwordOfLightAndShadow.java +++ b/Mage.Sets/src/mage/cards/s/SwordOfLightAndShadow.java @@ -44,6 +44,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -61,14 +62,16 @@ import mage.target.common.TargetCardInYourGraveyard; public class SwordOfLightAndShadow extends CardImpl { public SwordOfLightAndShadow(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+2 and has protection from white and from black. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ProtectionAbility.from(ObjectColor.WHITE, ObjectColor.BLACK), AttachmentType.EQUIPMENT))); // Whenever equipped creature deals combat damage to a player, you gain 3 life and you may return up to one target creature card from your graveyard to your hand. - this.addAbility(new SwordOfLightAndShadowAbility()); + Ability ability = new SwordOfLightAndShadowAbility(); + ability.addTarget(new TargetCardInYourGraveyard(0, 1, new FilterCreatureCard("creature card from your graveyard"))); + this.addAbility(ability); // Equip {2} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); } @@ -81,22 +84,6 @@ public class SwordOfLightAndShadow extends CardImpl { public SwordOfLightAndShadow copy() { return new SwordOfLightAndShadow(this); } - - @Override - public void adjustTargets(Ability ability, Game game) { - - if (ability instanceof SwordOfLightAndShadowAbility) { - Player controller = game.getPlayer(ability.getControllerId()); - if (controller != null) { - // Target may only be added if possible target exists. Else the gain life effect won't trigger, because there is no valid target for the - // return to hand ability - if (controller.getGraveyard().count(new FilterCreatureCard(), ability.getSourceId(), ability.getControllerId(), game) > 0) { - ability.addTarget(new TargetCardInYourGraveyard(0, 1, new FilterCreatureCard("creature card from your graveyard"))); - } - } - } - - } } class SwordOfLightAndShadowAbility extends TriggeredAbilityImpl { diff --git a/Mage.Sets/src/mage/cards/s/SwordOfTheAnimist.java b/Mage.Sets/src/mage/cards/s/SwordOfTheAnimist.java index 2d804887ef..0cdac1dc97 100644 --- a/Mage.Sets/src/mage/cards/s/SwordOfTheAnimist.java +++ b/Mage.Sets/src/mage/cards/s/SwordOfTheAnimist.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class SwordOfTheAnimist extends CardImpl { public SwordOfTheAnimist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); diff --git a/Mage.Sets/src/mage/cards/s/SwordOfTheMeek.java b/Mage.Sets/src/mage/cards/s/SwordOfTheMeek.java index 9389361b52..a9b013b348 100644 --- a/Mage.Sets/src/mage/cards/s/SwordOfTheMeek.java +++ b/Mage.Sets/src/mage/cards/s/SwordOfTheMeek.java @@ -61,7 +61,7 @@ public class SwordOfTheMeek extends CardImpl { public SwordOfTheMeek(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 2, Duration.WhileOnBattlefield))); diff --git a/Mage.Sets/src/mage/cards/s/SwordOfTheParuns.java b/Mage.Sets/src/mage/cards/s/SwordOfTheParuns.java index c2f0180690..273b4defff 100644 --- a/Mage.Sets/src/mage/cards/s/SwordOfTheParuns.java +++ b/Mage.Sets/src/mage/cards/s/SwordOfTheParuns.java @@ -43,6 +43,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -68,7 +69,7 @@ public class SwordOfTheParuns extends CardImpl { public SwordOfTheParuns(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // As long as equipped creature is tapped, tapped creatures you control get +2/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( diff --git a/Mage.Sets/src/mage/cards/s/SwordOfVengeance.java b/Mage.Sets/src/mage/cards/s/SwordOfVengeance.java index 1ce2d58252..03d0911e5b 100644 --- a/Mage.Sets/src/mage/cards/s/SwordOfVengeance.java +++ b/Mage.Sets/src/mage/cards/s/SwordOfVengeance.java @@ -44,6 +44,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class SwordOfVengeance extends CardImpl { public SwordOfVengeance(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+0 and has first strike, vigilance, trample, and haste. diff --git a/Mage.Sets/src/mage/cards/s/SwordOfWarAndPeace.java b/Mage.Sets/src/mage/cards/s/SwordOfWarAndPeace.java index 089da3cade..da7333acbd 100644 --- a/Mage.Sets/src/mage/cards/s/SwordOfWarAndPeace.java +++ b/Mage.Sets/src/mage/cards/s/SwordOfWarAndPeace.java @@ -45,6 +45,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -63,7 +64,7 @@ public class SwordOfWarAndPeace extends CardImpl { public SwordOfWarAndPeace(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+2 and has protection from red and from white. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2)); diff --git a/Mage.Sets/src/mage/cards/s/SwordPointDiplomacy.java b/Mage.Sets/src/mage/cards/s/SwordPointDiplomacy.java new file mode 100644 index 0000000000..75d9e44712 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SwordPointDiplomacy.java @@ -0,0 +1,121 @@ +/* + * 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.cards.s; + +import java.util.Set; +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class SwordPointDiplomacy extends CardImpl { + + public SwordPointDiplomacy(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}"); + + // Reveal the top three cards of your library. For each of those cards, put that card into your hand unless any opponent pays 3 life. Then exile the rest. + this.getSpellAbility().addEffect(new SwordPointDiplomacyEffect()); + } + + public SwordPointDiplomacy(final SwordPointDiplomacy card) { + super(card); + } + + @Override + public SwordPointDiplomacy copy() { + return new SwordPointDiplomacy(this); + } +} + +class SwordPointDiplomacyEffect extends OneShotEffect { + + SwordPointDiplomacyEffect() { + super(Outcome.Benefit); + this.staticText = "Reveal the top three cards of your library. For each of those cards, put that card into your hand unless any opponent pays 3 life. Then exile the rest."; + } + + SwordPointDiplomacyEffect(final SwordPointDiplomacyEffect effect) { + super(effect); + } + + @Override + public SwordPointDiplomacyEffect copy() { + return new SwordPointDiplomacyEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (controller == null || sourceObject == null) { + return false; + } + int amount = Math.min(controller.getLibrary().size(), 3); + CardsImpl cards = new CardsImpl(); + cards.addAll(controller.getLibrary().getTopCards(game, amount)); + controller.revealCards(sourceObject.getIdName(), cards, game); + Set cardsList = cards.getCards(game); + Cards cardsToHand = new CardsImpl(); + for (Card card : cardsList) { + boolean keepIt = true; + Cost cost = new PayLifeCost(3); + for (UUID oppId : game.getOpponents(controller.getId())) { + Player opponent = game.getPlayer(oppId); + if (opponent != null + && cost.canPay(source, source.getSourceId(), opponent.getId(), game) + && opponent.chooseUse(Outcome.Neutral, "Pay 3 life to prevent " + controller.getLogName() + " from getting " + card.getLogName() + "?", source, game) + && cost.pay(source, game, source.getSourceId(), opponent.getId(), true)) { + keepIt = false; + } + } + if (keepIt) { + cardsToHand.add(card); + cards.remove(card); + } + } + controller.moveCards(cardsToHand, Zone.HAND, source, game); + controller.moveCards(cards, Zone.EXILED, source, game); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SwordwiseCentaur.java b/Mage.Sets/src/mage/cards/s/SwordwiseCentaur.java index 8f769a02f3..e65c08a554 100644 --- a/Mage.Sets/src/mage/cards/s/SwordwiseCentaur.java +++ b/Mage.Sets/src/mage/cards/s/SwordwiseCentaur.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class SwordwiseCentaur extends CardImpl { public SwordwiseCentaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); - this.subtype.add("Centaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CENTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SydriGalvanicGenius.java b/Mage.Sets/src/mage/cards/s/SydriGalvanicGenius.java index 0c7cd576b6..abb6bd3e3c 100644 --- a/Mage.Sets/src/mage/cards/s/SydriGalvanicGenius.java +++ b/Mage.Sets/src/mage/cards/s/SydriGalvanicGenius.java @@ -65,8 +65,8 @@ public class SydriGalvanicGenius extends CardImpl { public SydriGalvanicGenius(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SyggRiverCutthroat.java b/Mage.Sets/src/mage/cards/s/SyggRiverCutthroat.java index 05cc80b203..5f3c233969 100644 --- a/Mage.Sets/src/mage/cards/s/SyggRiverCutthroat.java +++ b/Mage.Sets/src/mage/cards/s/SyggRiverCutthroat.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.SuperType; import mage.constants.TargetController; @@ -49,8 +50,8 @@ public class SyggRiverCutthroat extends CardImpl { public SyggRiverCutthroat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U/B}{U/B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SyggRiverGuide.java b/Mage.Sets/src/mage/cards/s/SyggRiverGuide.java index 4e3a5f4bf5..0ab153e7d1 100644 --- a/Mage.Sets/src/mage/cards/s/SyggRiverGuide.java +++ b/Mage.Sets/src/mage/cards/s/SyggRiverGuide.java @@ -57,8 +57,8 @@ public class SyggRiverGuide extends CardImpl { public SyggRiverGuide(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SylvanAdvocate.java b/Mage.Sets/src/mage/cards/s/SylvanAdvocate.java index 6af0821ce0..a28e70c996 100644 --- a/Mage.Sets/src/mage/cards/s/SylvanAdvocate.java +++ b/Mage.Sets/src/mage/cards/s/SylvanAdvocate.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; @@ -61,9 +62,9 @@ public class SylvanAdvocate extends CardImpl { public SylvanAdvocate(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); - this.subtype.add("Ally"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SylvanBasilisk.java b/Mage.Sets/src/mage/cards/s/SylvanBasilisk.java index d1dcb455f1..e4086db89e 100644 --- a/Mage.Sets/src/mage/cards/s/SylvanBasilisk.java +++ b/Mage.Sets/src/mage/cards/s/SylvanBasilisk.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SylvanBasilisk extends CardImpl { public SylvanBasilisk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Basilisk"); + this.subtype.add(SubType.BASILISK); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SylvanCaryatid.java b/Mage.Sets/src/mage/cards/s/SylvanCaryatid.java index 41016d0c87..07737efaba 100644 --- a/Mage.Sets/src/mage/cards/s/SylvanCaryatid.java +++ b/Mage.Sets/src/mage/cards/s/SylvanCaryatid.java @@ -35,6 +35,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class SylvanCaryatid extends CardImpl { public SylvanCaryatid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Plant"); + this.subtype.add(SubType.PLANT); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SylvanMessenger.java b/Mage.Sets/src/mage/cards/s/SylvanMessenger.java index be76907c07..16526cf5ff 100644 --- a/Mage.Sets/src/mage/cards/s/SylvanMessenger.java +++ b/Mage.Sets/src/mage/cards/s/SylvanMessenger.java @@ -54,7 +54,7 @@ public class SylvanMessenger extends CardImpl { public SylvanMessenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SylvanPrimordial.java b/Mage.Sets/src/mage/cards/s/SylvanPrimordial.java index 0465d47a9f..70cf7fa6a2 100644 --- a/Mage.Sets/src/mage/cards/s/SylvanPrimordial.java +++ b/Mage.Sets/src/mage/cards/s/SylvanPrimordial.java @@ -60,7 +60,7 @@ public class SylvanPrimordial extends CardImpl { public SylvanPrimordial(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(6); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/s/SylvanRanger.java b/Mage.Sets/src/mage/cards/s/SylvanRanger.java index f3adf52350..115a918c22 100644 --- a/Mage.Sets/src/mage/cards/s/SylvanRanger.java +++ b/Mage.Sets/src/mage/cards/s/SylvanRanger.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; @@ -47,15 +48,15 @@ public class SylvanRanger extends CardImpl { public SylvanRanger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); // When Sylvan Ranger enters the battlefield, you may search your library for a basic land card, reveal it, put it into your hand, then shuffle your library. TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD); - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(target, true, true))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(target, true, true), true)); } public SylvanRanger(final SylvanRanger card) { diff --git a/Mage.Sets/src/mage/cards/s/SylvanSafekeeper.java b/Mage.Sets/src/mage/cards/s/SylvanSafekeeper.java index 4c153b7f3e..bdf6293ea6 100644 --- a/Mage.Sets/src/mage/cards/s/SylvanSafekeeper.java +++ b/Mage.Sets/src/mage/cards/s/SylvanSafekeeper.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -51,8 +52,8 @@ public class SylvanSafekeeper extends CardImpl { public SylvanSafekeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SylvanYeti.java b/Mage.Sets/src/mage/cards/s/SylvanYeti.java index 622e4151fe..ff3d1b518a 100644 --- a/Mage.Sets/src/mage/cards/s/SylvanYeti.java +++ b/Mage.Sets/src/mage/cards/s/SylvanYeti.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.SetPowerSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class SylvanYeti extends CardImpl { public SylvanYeti(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Yeti"); + this.subtype.add(SubType.YETI); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SylvokExplorer.java b/Mage.Sets/src/mage/cards/s/SylvokExplorer.java index 1ea87c48b0..8cf5dd33bb 100644 --- a/Mage.Sets/src/mage/cards/s/SylvokExplorer.java +++ b/Mage.Sets/src/mage/cards/s/SylvokExplorer.java @@ -33,6 +33,7 @@ import mage.abilities.mana.AnyColorLandsProduceManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -43,8 +44,8 @@ public class SylvokExplorer extends CardImpl { public SylvokExplorer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SylvokLifestaff.java b/Mage.Sets/src/mage/cards/s/SylvokLifestaff.java index 94acd23813..aa397775f9 100644 --- a/Mage.Sets/src/mage/cards/s/SylvokLifestaff.java +++ b/Mage.Sets/src/mage/cards/s/SylvokLifestaff.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class SylvokLifestaff extends CardImpl { public SylvokLifestaff(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 0))); diff --git a/Mage.Sets/src/mage/cards/s/SylvokReplica.java b/Mage.Sets/src/mage/cards/s/SylvokReplica.java index c67cd56009..545355c42a 100644 --- a/Mage.Sets/src/mage/cards/s/SylvokReplica.java +++ b/Mage.Sets/src/mage/cards/s/SylvokReplica.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.TargetPermanent; @@ -50,7 +51,7 @@ public class SylvokReplica extends CardImpl { public SylvokReplica (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SymbioticBeast.java b/Mage.Sets/src/mage/cards/s/SymbioticBeast.java index 3910e1685a..3af2ddabbe 100644 --- a/Mage.Sets/src/mage/cards/s/SymbioticBeast.java +++ b/Mage.Sets/src/mage/cards/s/SymbioticBeast.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.InsectToken; /** @@ -44,8 +45,8 @@ public class SymbioticBeast extends CardImpl { public SymbioticBeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Insect"); - this.subtype.add("Beast"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SymbioticElf.java b/Mage.Sets/src/mage/cards/s/SymbioticElf.java index 5ec426c4fc..e229ea7b17 100644 --- a/Mage.Sets/src/mage/cards/s/SymbioticElf.java +++ b/Mage.Sets/src/mage/cards/s/SymbioticElf.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.InsectToken; /** @@ -44,7 +45,7 @@ public class SymbioticElf extends CardImpl { public SymbioticElf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SymbioticWurm.java b/Mage.Sets/src/mage/cards/s/SymbioticWurm.java index 3e2fdda0a8..dc060c6c5e 100644 --- a/Mage.Sets/src/mage/cards/s/SymbioticWurm.java +++ b/Mage.Sets/src/mage/cards/s/SymbioticWurm.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.InsectToken; /** @@ -44,7 +45,7 @@ public class SymbioticWurm extends CardImpl { public SymbioticWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/s/SynapseSliver.java b/Mage.Sets/src/mage/cards/s/SynapseSliver.java index e664a365b7..23e83cd460 100644 --- a/Mage.Sets/src/mage/cards/s/SynapseSliver.java +++ b/Mage.Sets/src/mage/cards/s/SynapseSliver.java @@ -47,7 +47,7 @@ public class SynapseSliver extends CardImpl { public SynapseSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SynchronousSliver.java b/Mage.Sets/src/mage/cards/s/SynchronousSliver.java index 5de1400513..4cdeb4e151 100644 --- a/Mage.Sets/src/mage/cards/s/SynchronousSliver.java +++ b/Mage.Sets/src/mage/cards/s/SynchronousSliver.java @@ -50,7 +50,7 @@ public class SynchronousSliver extends CardImpl { public SynchronousSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SyndicOfTithes.java b/Mage.Sets/src/mage/cards/s/SyndicOfTithes.java index e356b649c0..d50e955942 100644 --- a/Mage.Sets/src/mage/cards/s/SyndicOfTithes.java +++ b/Mage.Sets/src/mage/cards/s/SyndicOfTithes.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ExtortAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class SyndicOfTithes extends CardImpl { public SyndicOfTithes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SyndicateEnforcer.java b/Mage.Sets/src/mage/cards/s/SyndicateEnforcer.java index 1629b03858..f00c36cd68 100644 --- a/Mage.Sets/src/mage/cards/s/SyndicateEnforcer.java +++ b/Mage.Sets/src/mage/cards/s/SyndicateEnforcer.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ExtortAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class SyndicateEnforcer extends CardImpl { public SyndicateEnforcer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SyndicateEnforcerSWS.java b/Mage.Sets/src/mage/cards/s/SyndicateEnforcerSWS.java index 677141b2a8..2f5ef91347 100644 --- a/Mage.Sets/src/mage/cards/s/SyndicateEnforcerSWS.java +++ b/Mage.Sets/src/mage/cards/s/SyndicateEnforcerSWS.java @@ -1,118 +1,119 @@ -/* - * 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.cards.s; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.combat.CantBlockTargetEffect; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.counters.CounterType; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; -import mage.target.common.TargetOpponentsCreaturePermanent; - -/** - * - * @author Styxo - */ -public class SyndicateEnforcerSWS extends CardImpl { - - public SyndicateEnforcerSWS(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - this.subtype.add("Gand"); - this.subtype.add("Hunter"); - this.power = new MageInt(3); - this.toughness = new MageInt(2); - - // When {this} enters the battlefield, put a bounty counter on target creature an opponent controls - Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance())); - ability.addTarget(new TargetOpponentsCreaturePermanent()); - this.addAbility(ability); - - // Whenever a bounty counter is placed on a creature an opponents controls, that creature can't block this turn. - this.addAbility(new SyndicateEnforcerTriggeredAbility()); - } - - public SyndicateEnforcerSWS(final SyndicateEnforcerSWS card) { - super(card); - } - - @Override - public SyndicateEnforcerSWS copy() { - return new SyndicateEnforcerSWS(this); - } -} - -class SyndicateEnforcerTriggeredAbility extends TriggeredAbilityImpl { - - private static final Effect effect = new CantBlockTargetEffect(Duration.EndOfTurn); - - public SyndicateEnforcerTriggeredAbility() { - super(Zone.BATTLEFIELD, effect, false); - } - - public SyndicateEnforcerTriggeredAbility(final SyndicateEnforcerTriggeredAbility ability) { - super(ability); - } - - @Override - public SyndicateEnforcerTriggeredAbility copy() { - return new SyndicateEnforcerTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.COUNTERS_ADDED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - if (event.getData().equals(CounterType.BOUNTY.getName())) { - Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId()); - if (permanent != null) { - return true; - } - } - return false; - } - - @Override - public String getRule() { - return "Whenever a bounty counter is placed on a creature an opponents controls, that creature can't block this turn."; - } -} +/* + * 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.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.combat.CantBlockTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.common.TargetOpponentsCreaturePermanent; + +/** + * + * @author Styxo + */ +public class SyndicateEnforcerSWS extends CardImpl { + + public SyndicateEnforcerSWS(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.subtype.add(SubType.GAND); + this.subtype.add(SubType.HUNTER); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // When {this} enters the battlefield, put a bounty counter on target creature an opponent controls + Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance())); + ability.addTarget(new TargetOpponentsCreaturePermanent()); + this.addAbility(ability); + + // Whenever a bounty counter is placed on a creature an opponents controls, that creature can't block this turn. + this.addAbility(new SyndicateEnforcerTriggeredAbility()); + } + + public SyndicateEnforcerSWS(final SyndicateEnforcerSWS card) { + super(card); + } + + @Override + public SyndicateEnforcerSWS copy() { + return new SyndicateEnforcerSWS(this); + } +} + +class SyndicateEnforcerTriggeredAbility extends TriggeredAbilityImpl { + + private static final Effect effect = new CantBlockTargetEffect(Duration.EndOfTurn); + + public SyndicateEnforcerTriggeredAbility() { + super(Zone.BATTLEFIELD, effect, false); + } + + public SyndicateEnforcerTriggeredAbility(final SyndicateEnforcerTriggeredAbility ability) { + super(ability); + } + + @Override + public SyndicateEnforcerTriggeredAbility copy() { + return new SyndicateEnforcerTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.COUNTERS_ADDED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getData().equals(CounterType.BOUNTY.getName())) { + Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId()); + if (permanent != null) { + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a bounty counter is placed on a creature an opponents controls, that creature can't block this turn."; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SyndicateTrafficker.java b/Mage.Sets/src/mage/cards/s/SyndicateTrafficker.java index 6d2414d79f..092a53ed77 100644 --- a/Mage.Sets/src/mage/cards/s/SyndicateTrafficker.java +++ b/Mage.Sets/src/mage/cards/s/SyndicateTrafficker.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -53,8 +54,8 @@ public class SyndicateTrafficker extends CardImpl { public SyndicateTrafficker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Aetherborn"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.AETHERBORN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SynodArtificer.java b/Mage.Sets/src/mage/cards/s/SynodArtificer.java index 10b52e4d79..937336f0a9 100644 --- a/Mage.Sets/src/mage/cards/s/SynodArtificer.java +++ b/Mage.Sets/src/mage/cards/s/SynodArtificer.java @@ -39,11 +39,12 @@ import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetAdjustment; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.game.Game; import mage.target.TargetPermanent; /** @@ -51,20 +52,18 @@ import mage.target.TargetPermanent; * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) */ public class SynodArtificer extends CardImpl { - - private final UUID tapId; - private final UUID untapId; - private static final FilterPermanent filter = new FilterPermanent("Target noncreature artifacts"); - + + private static final FilterPermanent filter = new FilterPermanent("noncreature artifacts"); + static { filter.add(new CardTypePredicate(CardType.ARTIFACT)); filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); } public SynodArtificer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Artificer"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(2); @@ -72,32 +71,23 @@ public class SynodArtificer extends CardImpl { Effect tapEffect = new TapTargetEffect(); tapEffect.setText("Tap X target noncreature artifacts."); Ability tapAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, tapEffect, new ManaCostsImpl("{X}")); - tapAbility.addCost(new TapSourceCost()); + tapAbility.addCost(new TapSourceCost()); + tapAbility.setTargetAdjustment(TargetAdjustment.X_TARGETS); + tapAbility.addTarget(new TargetPermanent(filter)); this.addAbility(tapAbility); - + // {X}, {tap}: Untap X target noncreature artifacts. Effect untapEffect = new UntapTargetEffect(); untapEffect.setText("Untap X target noncreature artifacts."); Ability untapAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, untapEffect, new ManaCostsImpl("{X}")); untapAbility.addCost(new TapSourceCost()); + untapAbility.setTargetAdjustment(TargetAdjustment.X_TARGETS); + untapAbility.addTarget(new TargetPermanent(filter)); this.addAbility(untapAbility); - - tapId = tapAbility.getOriginalId(); - untapId = untapAbility.getOriginalId(); - } - - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(tapId) || ability.getOriginalId().equals(untapId)) { - ability.getTargets().clear(); - ability.addTarget(new TargetPermanent(ability.getManaCostsToPay().getX(), filter)); - } } public SynodArtificer(final SynodArtificer card) { super(card); - this.tapId = card.tapId; - this.untapId = card.untapId; } @Override diff --git a/Mage.Sets/src/mage/cards/s/SynodCenturion.java b/Mage.Sets/src/mage/cards/s/SynodCenturion.java index 1b946dae5f..95fe7c4ce9 100644 --- a/Mage.Sets/src/mage/cards/s/SynodCenturion.java +++ b/Mage.Sets/src/mage/cards/s/SynodCenturion.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -47,7 +48,7 @@ public class SynodCenturion extends CardImpl { public SynodCenturion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SyphonSliver.java b/Mage.Sets/src/mage/cards/s/SyphonSliver.java index 62d6a0aa6a..4d30235cee 100644 --- a/Mage.Sets/src/mage/cards/s/SyphonSliver.java +++ b/Mage.Sets/src/mage/cards/s/SyphonSliver.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -47,7 +48,7 @@ public class SyphonSliver extends CardImpl { public SyphonSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/s/SzadekLordOfSecrets.java b/Mage.Sets/src/mage/cards/s/SzadekLordOfSecrets.java index b8532483d9..87393d7bc1 100644 --- a/Mage.Sets/src/mage/cards/s/SzadekLordOfSecrets.java +++ b/Mage.Sets/src/mage/cards/s/SzadekLordOfSecrets.java @@ -53,7 +53,7 @@ public class SzadekLordOfSecrets extends CardImpl { public SzadekLordOfSecrets(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TIEBomber.java b/Mage.Sets/src/mage/cards/t/TIEBomber.java index d6aa455fd9..a25c9e9eeb 100644 --- a/Mage.Sets/src/mage/cards/t/TIEBomber.java +++ b/Mage.Sets/src/mage/cards/t/TIEBomber.java @@ -1,76 +1,77 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.condition.common.IsPhaseCondition; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.decorator.ConditionalActivatedAbility; -import mage.abilities.effects.common.continuous.LoseAbilitySourceEffect; -import mage.abilities.keyword.SpaceflightAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.TurnPhase; -import mage.constants.Zone; - -/** - * - * @author Styxo - */ -public class TIEBomber extends CardImpl { - - public TIEBomber(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Starship"); - this.power = new MageInt(3); - this.toughness = new MageInt(2); - - // Spaceflight - this.addAbility(SpaceflightAbility.getInstance()); - - // {1}: TIE Bomber loses Spaceflight until end od turn. Activate this ability only during combat. - this.addAbility(new ConditionalActivatedAbility( - Zone.BATTLEFIELD, - new LoseAbilitySourceEffect(SpaceflightAbility.getInstance(), Duration.EndOfTurn), - new GenericManaCost(1), - new IsPhaseCondition(TurnPhase.COMBAT), - "{1}: {this} loses Spaceflight until end od turn. Activate this ability only during combat.")); - } - - public TIEBomber(final TIEBomber card) { - super(card); - } - - @Override - public TIEBomber copy() { - return new TIEBomber(this); - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.condition.common.IsPhaseCondition; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.common.continuous.LoseAbilitySourceEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.TurnPhase; +import mage.constants.Zone; + +/** + * + * @author Styxo + */ +public class TIEBomber extends CardImpl { + + public TIEBomber(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{B}"); + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + + // {1}: TIE Bomber loses Spaceflight until end od turn. Activate this ability only during combat. + this.addAbility(new ConditionalActivatedAbility( + Zone.BATTLEFIELD, + new LoseAbilitySourceEffect(SpaceflightAbility.getInstance(), Duration.EndOfTurn), + new GenericManaCost(1), + new IsPhaseCondition(TurnPhase.COMBAT), + "{1}: {this} loses Spaceflight until end od turn. Activate this ability only during combat.")); + } + + public TIEBomber(final TIEBomber card) { + super(card); + } + + @Override + public TIEBomber copy() { + return new TIEBomber(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TIEInterceptor.java b/Mage.Sets/src/mage/cards/t/TIEInterceptor.java index 7104e0aa5a..0348a0ac05 100644 --- a/Mage.Sets/src/mage/cards/t/TIEInterceptor.java +++ b/Mage.Sets/src/mage/cards/t/TIEInterceptor.java @@ -1,99 +1,100 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.AttacksTriggeredAbility; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.keyword.SpaceflightAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.game.Game; -import mage.players.Player; - -/** - * - * @author Styxo - */ -public class TIEInterceptor extends CardImpl { - - public TIEInterceptor(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{B}"); - this.subtype.add("Starship"); - this.power = new MageInt(1); - this.toughness = new MageInt(1); - - // Spaceflight - this.addAbility(SpaceflightAbility.getInstance()); - - // Whenever TIE Interceptor attacks, each opponent loses 2 life. - this.addAbility(new AttacksTriggeredAbility(new TIEInterceptorEffect(), false)); - } - - public TIEInterceptor(final TIEInterceptor card) { - super(card); - } - - @Override - public TIEInterceptor copy() { - return new TIEInterceptor(this); - } -} - -class TIEInterceptorEffect extends OneShotEffect { - - TIEInterceptorEffect() { - super(Outcome.Damage); - staticText = "each opponent loses 2 life"; - } - - TIEInterceptorEffect(final TIEInterceptorEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - for (UUID opponentId : game.getOpponents(source.getControllerId())) { - Player opponent = game.getPlayer(opponentId); - if (opponent != null) { - opponent.loseLife(2, game, false); - } - } - return true; - } - - @Override - public TIEInterceptorEffect copy() { - return new TIEInterceptorEffect(this); - - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author Styxo + */ +public class TIEInterceptor extends CardImpl { + + public TIEInterceptor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{B}"); + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + + // Whenever TIE Interceptor attacks, each opponent loses 2 life. + this.addAbility(new AttacksTriggeredAbility(new TIEInterceptorEffect(), false)); + } + + public TIEInterceptor(final TIEInterceptor card) { + super(card); + } + + @Override + public TIEInterceptor copy() { + return new TIEInterceptor(this); + } +} + +class TIEInterceptorEffect extends OneShotEffect { + + TIEInterceptorEffect() { + super(Outcome.Damage); + staticText = "each opponent loses 2 life"; + } + + TIEInterceptorEffect(final TIEInterceptorEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + for (UUID opponentId : game.getOpponents(source.getControllerId())) { + Player opponent = game.getPlayer(opponentId); + if (opponent != null) { + opponent.loseLife(2, game, false); + } + } + return true; + } + + @Override + public TIEInterceptorEffect copy() { + return new TIEInterceptorEffect(this); + + } +} diff --git a/Mage.Sets/src/mage/cards/t/TahCropElite.java b/Mage.Sets/src/mage/cards/t/TahCropElite.java index 37a3ebf8f3..95cdff4dd5 100644 --- a/Mage.Sets/src/mage/cards/t/TahCropElite.java +++ b/Mage.Sets/src/mage/cards/t/TahCropElite.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -47,8 +48,8 @@ public class TahCropElite extends CardImpl { public TahCropElite(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TahCropSkirmisher.java b/Mage.Sets/src/mage/cards/t/TahCropSkirmisher.java index 361332c94c..87e711c0c1 100644 --- a/Mage.Sets/src/mage/cards/t/TahCropSkirmisher.java +++ b/Mage.Sets/src/mage/cards/t/TahCropSkirmisher.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.EmbalmAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class TahCropSkirmisher extends CardImpl { public TahCropSkirmisher(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Naga"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TahngarthTalruumHero.java b/Mage.Sets/src/mage/cards/t/TahngarthTalruumHero.java index 40c5ead3e7..f397bbbfb8 100644 --- a/Mage.Sets/src/mage/cards/t/TahngarthTalruumHero.java +++ b/Mage.Sets/src/mage/cards/t/TahngarthTalruumHero.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -51,8 +52,8 @@ public class TahngarthTalruumHero extends CardImpl { public TahngarthTalruumHero(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Minotaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TahngarthsRage.java b/Mage.Sets/src/mage/cards/t/TahngarthsRage.java new file mode 100644 index 0000000000..793446257c --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TahngarthsRage.java @@ -0,0 +1,87 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.constants.SubType; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.AttachedToMatchesFilterCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterAttackingCreature; + +/** + * + * @author TheElk801 + */ +public class TahngarthsRage extends CardImpl { + + public TahngarthsRage(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{R}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +3/+0 as long as it's attacking. Otherwise, it gets -2/-1. + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ConditionalContinuousEffect( + new BoostEnchantedEffect(3, 0, Duration.WhileOnBattlefield), + new BoostEnchantedEffect(-2, -1, Duration.WhileOnBattlefield), + new AttachedToMatchesFilterCondition(new FilterAttackingCreature()), + "Enchanted creature gets +3/+0 as long as it's attacking. Otherwise, it gets -2/-1." + ) + )); + } + + public TahngarthsRage(final TahngarthsRage card) { + super(card); + } + + @Override + public TahngarthsRage copy() { + return new TahngarthsRage(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/Taiga.java b/Mage.Sets/src/mage/cards/t/Taiga.java index cf569df60c..86673016ba 100644 --- a/Mage.Sets/src/mage/cards/t/Taiga.java +++ b/Mage.Sets/src/mage/cards/t/Taiga.java @@ -33,6 +33,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class Taiga extends CardImpl { public Taiga(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Forest"); - this.subtype.add("Mountain"); + this.subtype.add(SubType.FOREST); + this.subtype.add(SubType.MOUNTAIN); this.addAbility(new GreenManaAbility()); this.addAbility(new RedManaAbility()); diff --git a/Mage.Sets/src/mage/cards/t/TaigamOjutaiMaster.java b/Mage.Sets/src/mage/cards/t/TaigamOjutaiMaster.java index d3ec450716..f502fe550e 100644 --- a/Mage.Sets/src/mage/cards/t/TaigamOjutaiMaster.java +++ b/Mage.Sets/src/mage/cards/t/TaigamOjutaiMaster.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.DelayedTriggeredAbility; @@ -41,14 +40,7 @@ import mage.abilities.keyword.ReboundAbility; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; -import mage.constants.SubLayer; -import mage.constants.SubType; -import mage.constants.SuperType; -import mage.constants.Zone; +import mage.constants.*; import mage.filter.FilterSpell; import mage.filter.FilterStackObject; import mage.filter.predicate.Predicates; @@ -61,6 +53,8 @@ import mage.players.Player; import mage.target.targetpointer.FixedTarget; import mage.watchers.common.AttackedThisTurnWatcher; +import java.util.UUID; + /** * * @author spjspj @@ -83,8 +77,8 @@ public class TaigamOjutaiMaster extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(3); this.toughness = new MageInt(4); @@ -187,13 +181,7 @@ class TaigamOjutaiMasterGainReboundEffect extends ContinuousEffectImpl { } private void addReboundAbility(Card card, Ability source, Game game) { - boolean found = false; - for (Ability ability : card.getAbilities()) { - if (ability instanceof ReboundAbility) { - found = true; - break; - } - } + boolean found = card.getAbilities().stream().anyMatch(ability -> ability instanceof ReboundAbility); if (!found) { Ability ability = new ReboundAbility(); game.getState().addOtherAbility(card, ability); diff --git a/Mage.Sets/src/mage/cards/t/TaigamSidisisHand.java b/Mage.Sets/src/mage/cards/t/TaigamSidisisHand.java index a80ef013ff..ffa0797bd3 100644 --- a/Mage.Sets/src/mage/cards/t/TaigamSidisisHand.java +++ b/Mage.Sets/src/mage/cards/t/TaigamSidisisHand.java @@ -47,6 +47,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SuperType; @@ -71,8 +72,8 @@ public class TaigamSidisisHand extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TaintedWell.java b/Mage.Sets/src/mage/cards/t/TaintedWell.java index cac1aedf92..a70505215c 100644 --- a/Mage.Sets/src/mage/cards/t/TaintedWell.java +++ b/Mage.Sets/src/mage/cards/t/TaintedWell.java @@ -53,7 +53,7 @@ public class TaintedWell extends CardImpl { public TaintedWell(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land diff --git a/Mage.Sets/src/mage/cards/t/TajNarSwordsmith.java b/Mage.Sets/src/mage/cards/t/TajNarSwordsmith.java index 2995c7424d..1b711f4384 100644 --- a/Mage.Sets/src/mage/cards/t/TajNarSwordsmith.java +++ b/Mage.Sets/src/mage/cards/t/TajNarSwordsmith.java @@ -56,8 +56,8 @@ public class TajNarSwordsmith extends CardImpl { public TajNarSwordsmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TajicBladeOfTheLegion.java b/Mage.Sets/src/mage/cards/t/TajicBladeOfTheLegion.java index b084deed2c..b6fceb77f6 100644 --- a/Mage.Sets/src/mage/cards/t/TajicBladeOfTheLegion.java +++ b/Mage.Sets/src/mage/cards/t/TajicBladeOfTheLegion.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; @@ -47,8 +48,8 @@ public class TajicBladeOfTheLegion extends CardImpl { public TajicBladeOfTheLegion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TajuruArcher.java b/Mage.Sets/src/mage/cards/t/TajuruArcher.java index 4ac677dbcb..be4f7ed9f5 100644 --- a/Mage.Sets/src/mage/cards/t/TajuruArcher.java +++ b/Mage.Sets/src/mage/cards/t/TajuruArcher.java @@ -62,9 +62,9 @@ public class TajuruArcher extends CardImpl { public TajuruArcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Archer"); - this.subtype.add("Ally"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARCHER); + this.subtype.add(SubType.ALLY); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TajuruBeastmaster.java b/Mage.Sets/src/mage/cards/t/TajuruBeastmaster.java index ed54593313..3fa8e8de55 100644 --- a/Mage.Sets/src/mage/cards/t/TajuruBeastmaster.java +++ b/Mage.Sets/src/mage/cards/t/TajuruBeastmaster.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,9 +45,9 @@ public class TajuruBeastmaster extends CardImpl { public TajuruBeastmaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); - this.subtype.add("Ally"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TajuruPathwarden.java b/Mage.Sets/src/mage/cards/t/TajuruPathwarden.java index a98ac7aec3..c1e5dd906b 100644 --- a/Mage.Sets/src/mage/cards/t/TajuruPathwarden.java +++ b/Mage.Sets/src/mage/cards/t/TajuruPathwarden.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,9 +44,9 @@ public class TajuruPathwarden extends CardImpl { public TajuruPathwarden(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); - this.subtype.add("Ally"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TajuruPreserver.java b/Mage.Sets/src/mage/cards/t/TajuruPreserver.java index 4dcfe11fb1..6b60f4583f 100644 --- a/Mage.Sets/src/mage/cards/t/TajuruPreserver.java +++ b/Mage.Sets/src/mage/cards/t/TajuruPreserver.java @@ -49,8 +49,8 @@ public class TajuruPreserver extends CardImpl { public TajuruPreserver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TajuruStalwart.java b/Mage.Sets/src/mage/cards/t/TajuruStalwart.java index 67da198919..04ced12c8f 100644 --- a/Mage.Sets/src/mage/cards/t/TajuruStalwart.java +++ b/Mage.Sets/src/mage/cards/t/TajuruStalwart.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,9 +46,9 @@ public class TajuruStalwart extends CardImpl { public TajuruStalwart(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Scout"); - this.subtype.add("Ally"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); + this.subtype.add(SubType.ALLY); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TajuruWarcaller.java b/Mage.Sets/src/mage/cards/t/TajuruWarcaller.java index 91a9579da8..d09d026c16 100644 --- a/Mage.Sets/src/mage/cards/t/TajuruWarcaller.java +++ b/Mage.Sets/src/mage/cards/t/TajuruWarcaller.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,9 +45,9 @@ public class TajuruWarcaller extends CardImpl { public TajuruWarcaller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); - this.subtype.add("Ally"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TakePossession.java b/Mage.Sets/src/mage/cards/t/TakePossession.java index 96bce9a1ef..51aff0a9bf 100644 --- a/Mage.Sets/src/mage/cards/t/TakePossession.java +++ b/Mage.Sets/src/mage/cards/t/TakePossession.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.SplitSecondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -49,7 +50,7 @@ public class TakePossession extends CardImpl { public TakePossession(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{5}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Split second diff --git a/Mage.Sets/src/mage/cards/t/TakenoSamuraiGeneral.java b/Mage.Sets/src/mage/cards/t/TakenoSamuraiGeneral.java index af6141381e..44025caedb 100644 --- a/Mage.Sets/src/mage/cards/t/TakenoSamuraiGeneral.java +++ b/Mage.Sets/src/mage/cards/t/TakenoSamuraiGeneral.java @@ -52,8 +52,8 @@ public class TakenoSamuraiGeneral extends CardImpl { public TakenoSamuraiGeneral(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TakenosCavalry.java b/Mage.Sets/src/mage/cards/t/TakenosCavalry.java index a9242f7bdc..2252a2955a 100644 --- a/Mage.Sets/src/mage/cards/t/TakenosCavalry.java +++ b/Mage.Sets/src/mage/cards/t/TakenosCavalry.java @@ -57,9 +57,9 @@ public class TakenosCavalry extends CardImpl { public TakenosCavalry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Samurai"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TakenumaBleeder.java b/Mage.Sets/src/mage/cards/t/TakenumaBleeder.java index d386ef2b5c..bc36eae66a 100644 --- a/Mage.Sets/src/mage/cards/t/TakenumaBleeder.java +++ b/Mage.Sets/src/mage/cards/t/TakenumaBleeder.java @@ -49,8 +49,8 @@ public class TakenumaBleeder extends CardImpl { public TakenumaBleeder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Ogre"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TalarasBane.java b/Mage.Sets/src/mage/cards/t/TalarasBane.java index c89e8fb6a8..9715eeb33f 100644 --- a/Mage.Sets/src/mage/cards/t/TalarasBane.java +++ b/Mage.Sets/src/mage/cards/t/TalarasBane.java @@ -53,13 +53,12 @@ import mage.target.common.TargetOpponent; public class TalarasBane extends CardImpl { public TalarasBane(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}"); // Target opponent reveals his or her hand. You choose a green or white creature card from it. You gain life equal that creature card's toughness, then that player discards that card. this.getSpellAbility().addEffect(new TalarasBaneEffect()); this.getSpellAbility().addTarget(new TargetOpponent()); - + } public TalarasBane(final TalarasBane card) { @@ -73,9 +72,9 @@ public class TalarasBane extends CardImpl { } class TalarasBaneEffect extends OneShotEffect { - + private static final FilterCard filter = new FilterCard("a green or white creature card"); - + static { filter.add(Predicates.or( new ColorPredicate(ObjectColor.GREEN), @@ -85,7 +84,7 @@ class TalarasBaneEffect extends OneShotEffect { public TalarasBaneEffect() { super(Outcome.Detriment); - this.staticText = "Target opponent reveals his or her hand. You choose a green or white creature card from it. You gain life equal that creature card's toughness, then that player discards that card"; + this.staticText = "Target opponent reveals his or her hand. You choose a green or white creature card from it. You gain life equal to that creature card's toughness, then that player discards that card"; } public TalarasBaneEffect(final TalarasBaneEffect effect) { @@ -110,10 +109,10 @@ class TalarasBaneEffect extends OneShotEffect { } if (card != null) { int lifeGain = card.getToughness().getValue(); - you .gainLife(lifeGain, game); + you.gainLife(lifeGain, game); return targetPlayer.discard(card, source, game); } } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/t/TalarasBattalion.java b/Mage.Sets/src/mage/cards/t/TalarasBattalion.java index a32c19be7c..c197843284 100644 --- a/Mage.Sets/src/mage/cards/t/TalarasBattalion.java +++ b/Mage.Sets/src/mage/cards/t/TalarasBattalion.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.WatcherScope; @@ -58,8 +59,8 @@ public class TalarasBattalion extends CardImpl { public TalarasBattalion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TalasAirShip.java b/Mage.Sets/src/mage/cards/t/TalasAirShip.java index c9f230ddec..bb77e2de31 100644 --- a/Mage.Sets/src/mage/cards/t/TalasAirShip.java +++ b/Mage.Sets/src/mage/cards/t/TalasAirShip.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class TalasAirShip extends CardImpl { public TalasAirShip(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Pirate"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TalasExplorer.java b/Mage.Sets/src/mage/cards/t/TalasExplorer.java index 561135924a..e33b297913 100644 --- a/Mage.Sets/src/mage/cards/t/TalasExplorer.java +++ b/Mage.Sets/src/mage/cards/t/TalasExplorer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetOpponent; /** @@ -46,9 +47,9 @@ public class TalasExplorer extends CardImpl { public TalasExplorer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Pirate"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TalasMerchant.java b/Mage.Sets/src/mage/cards/t/TalasMerchant.java index bffc6a93d6..8339af5ac9 100644 --- a/Mage.Sets/src/mage/cards/t/TalasMerchant.java +++ b/Mage.Sets/src/mage/cards/t/TalasMerchant.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class TalasMerchant extends CardImpl { public TalasMerchant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Pirate"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TalasResearcher.java b/Mage.Sets/src/mage/cards/t/TalasResearcher.java index e037f34341..5c64dfb47f 100644 --- a/Mage.Sets/src/mage/cards/t/TalasResearcher.java +++ b/Mage.Sets/src/mage/cards/t/TalasResearcher.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,9 +48,9 @@ public class TalasResearcher extends CardImpl { public TalasResearcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Human"); - this.subtype.add("Pirate"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TalasScout.java b/Mage.Sets/src/mage/cards/t/TalasScout.java index 9316374bdf..eb635065f7 100644 --- a/Mage.Sets/src/mage/cards/t/TalasScout.java +++ b/Mage.Sets/src/mage/cards/t/TalasScout.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,9 +43,9 @@ public class TalasScout extends CardImpl { public TalasScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Pirate"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TalasWarrior.java b/Mage.Sets/src/mage/cards/t/TalasWarrior.java index 56260cf00f..4162e1919d 100644 --- a/Mage.Sets/src/mage/cards/t/TalasWarrior.java +++ b/Mage.Sets/src/mage/cards/t/TalasWarrior.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,9 +43,9 @@ public class TalasWarrior extends CardImpl { public TalasWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Pirate"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/Tallowisp.java b/Mage.Sets/src/mage/cards/t/Tallowisp.java index 4e6429fbda..497400e417 100644 --- a/Mage.Sets/src/mage/cards/t/Tallowisp.java +++ b/Mage.Sets/src/mage/cards/t/Tallowisp.java @@ -63,7 +63,7 @@ public class Tallowisp extends CardImpl { public Tallowisp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TalonSliver.java b/Mage.Sets/src/mage/cards/t/TalonSliver.java index b9025de54e..4dc6d4d60a 100644 --- a/Mage.Sets/src/mage/cards/t/TalonSliver.java +++ b/Mage.Sets/src/mage/cards/t/TalonSliver.java @@ -54,7 +54,7 @@ public class TalonSliver extends CardImpl { public TalonSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TalonTrooper.java b/Mage.Sets/src/mage/cards/t/TalonTrooper.java index 81dd132306..c3268a95ad 100644 --- a/Mage.Sets/src/mage/cards/t/TalonTrooper.java +++ b/Mage.Sets/src/mage/cards/t/TalonTrooper.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class TalonTrooper extends CardImpl { public TalonTrooper (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Scout"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/Talonrend.java b/Mage.Sets/src/mage/cards/t/Talonrend.java index 188dd30679..7baf6e0086 100644 --- a/Mage.Sets/src/mage/cards/t/Talonrend.java +++ b/Mage.Sets/src/mage/cards/t/Talonrend.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class Talonrend extends CardImpl { public Talonrend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TalonsOfFalkenrath.java b/Mage.Sets/src/mage/cards/t/TalonsOfFalkenrath.java index c951658210..17991efb6a 100644 --- a/Mage.Sets/src/mage/cards/t/TalonsOfFalkenrath.java +++ b/Mage.Sets/src/mage/cards/t/TalonsOfFalkenrath.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class TalonsOfFalkenrath extends CardImpl { public TalonsOfFalkenrath(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/t/TalrandSkySummoner.java b/Mage.Sets/src/mage/cards/t/TalrandSkySummoner.java index 2e6cdc25c8..0d84557599 100644 --- a/Mage.Sets/src/mage/cards/t/TalrandSkySummoner.java +++ b/Mage.Sets/src/mage/cards/t/TalrandSkySummoner.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -57,8 +58,8 @@ public class TalrandSkySummoner extends CardImpl { public TalrandSkySummoner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TalruumChampion.java b/Mage.Sets/src/mage/cards/t/TalruumChampion.java index 87b49785c0..67af81f282 100644 --- a/Mage.Sets/src/mage/cards/t/TalruumChampion.java +++ b/Mage.Sets/src/mage/cards/t/TalruumChampion.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,7 +47,7 @@ public class TalruumChampion extends CardImpl { public TalruumChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); - this.subtype.add("Minotaur"); + this.subtype.add(SubType.MINOTAUR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TalruumMinotaur.java b/Mage.Sets/src/mage/cards/t/TalruumMinotaur.java index ac2ecb3b28..5a9c49fdce 100644 --- a/Mage.Sets/src/mage/cards/t/TalruumMinotaur.java +++ b/Mage.Sets/src/mage/cards/t/TalruumMinotaur.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class TalruumMinotaur extends CardImpl { public TalruumMinotaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TalruumPiper.java b/Mage.Sets/src/mage/cards/t/TalruumPiper.java index 8142e629fa..9b54d2aa2b 100644 --- a/Mage.Sets/src/mage/cards/t/TalruumPiper.java +++ b/Mage.Sets/src/mage/cards/t/TalruumPiper.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -49,7 +50,7 @@ public class TalruumPiper extends CardImpl { public TalruumPiper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Minotaur"); + this.subtype.add(SubType.MINOTAUR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TalusPaladin.java b/Mage.Sets/src/mage/cards/t/TalusPaladin.java index 3ac75328ea..3ac3cad827 100644 --- a/Mage.Sets/src/mage/cards/t/TalusPaladin.java +++ b/Mage.Sets/src/mage/cards/t/TalusPaladin.java @@ -54,9 +54,9 @@ public class TalusPaladin extends CardImpl { public TalusPaladin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/Tamanoa.java b/Mage.Sets/src/mage/cards/t/Tamanoa.java index bf1a715974..ded6306348 100644 --- a/Mage.Sets/src/mage/cards/t/Tamanoa.java +++ b/Mage.Sets/src/mage/cards/t/Tamanoa.java @@ -1,114 +1,115 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.MageInt; -import mage.MageObject; -import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.dynamicvalue.common.NumericSetToEffectValues; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.GainLifeEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent; - -/** - * - * @author LevelX2 - */ -public class Tamanoa extends CardImpl { - - public Tamanoa(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{G}{W}"); - - this.subtype.add("Spirit"); - this.power = new MageInt(2); - this.toughness = new MageInt(4); - - // Whenever a noncreature source you control deals damage, you gain that much life. - Ability ability = new TamanoaDealsDamageTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(new NumericSetToEffectValues("that much", "damage")), false); - - this.addAbility(ability); - } - - public Tamanoa(final Tamanoa card) { - super(card); - } - - @Override - public Tamanoa copy() { - return new Tamanoa(this); - } -} - -class TamanoaDealsDamageTriggeredAbility extends TriggeredAbilityImpl { - - public TamanoaDealsDamageTriggeredAbility(Zone zone, Effect effect, boolean optional) { - super(zone, effect, optional); - } - - public TamanoaDealsDamageTriggeredAbility(final TamanoaDealsDamageTriggeredAbility ability) { - super(ability); - } - - @Override - public TamanoaDealsDamageTriggeredAbility copy() { - return new TamanoaDealsDamageTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.DAMAGED_CREATURE - || event.getType() == GameEvent.EventType.DAMAGED_PLAYER - || event.getType() == GameEvent.EventType.DAMAGED_PLANESWALKER; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - MageObject eventSourceObject = game.getObject(event.getSourceId()); - if (eventSourceObject != null && !eventSourceObject.isCreature()) { - if (getControllerId().equals(game.getControllerId(event.getSourceId()))) { - this.getEffects().forEach((effect) -> { - effect.setValue("damage", event.getAmount()); - }); - return true; - } - } - return false; - } - - @Override - public String getRule() { - return "Whenever a noncreature source you control deals damage, " + super.getRule(); - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.dynamicvalue.common.NumericSetToEffectValues; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author LevelX2 + */ +public class Tamanoa extends CardImpl { + + public Tamanoa(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{G}{W}"); + + this.subtype.add(SubType.SPIRIT); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Whenever a noncreature source you control deals damage, you gain that much life. + Ability ability = new TamanoaDealsDamageTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(new NumericSetToEffectValues("that much", "damage")), false); + + this.addAbility(ability); + } + + public Tamanoa(final Tamanoa card) { + super(card); + } + + @Override + public Tamanoa copy() { + return new Tamanoa(this); + } +} + +class TamanoaDealsDamageTriggeredAbility extends TriggeredAbilityImpl { + + public TamanoaDealsDamageTriggeredAbility(Zone zone, Effect effect, boolean optional) { + super(zone, effect, optional); + } + + public TamanoaDealsDamageTriggeredAbility(final TamanoaDealsDamageTriggeredAbility ability) { + super(ability); + } + + @Override + public TamanoaDealsDamageTriggeredAbility copy() { + return new TamanoaDealsDamageTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DAMAGED_CREATURE + || event.getType() == GameEvent.EventType.DAMAGED_PLAYER + || event.getType() == GameEvent.EventType.DAMAGED_PLANESWALKER; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + MageObject eventSourceObject = game.getObject(event.getSourceId()); + if (eventSourceObject != null && !eventSourceObject.isCreature()) { + if (getControllerId().equals(game.getControllerId(event.getSourceId()))) { + this.getEffects().forEach((effect) -> { + effect.setValue("damage", event.getAmount()); + }); + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a noncreature source you control deals damage, " + super.getRule(); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TamiyoFieldResearcher.java b/Mage.Sets/src/mage/cards/t/TamiyoFieldResearcher.java index 37bc1ac7e0..7031834a5f 100644 --- a/Mage.Sets/src/mage/cards/t/TamiyoFieldResearcher.java +++ b/Mage.Sets/src/mage/cards/t/TamiyoFieldResearcher.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.filter.FilterPermanent; @@ -75,7 +76,7 @@ public class TamiyoFieldResearcher extends CardImpl { public TamiyoFieldResearcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{1}{G}{W}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Tamiyo"); + this.subtype.add(SubType.TAMIYO); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/t/TamiyoTheMoonSage.java b/Mage.Sets/src/mage/cards/t/TamiyoTheMoonSage.java index be9c6fa647..3290e1d7cf 100644 --- a/Mage.Sets/src/mage/cards/t/TamiyoTheMoonSage.java +++ b/Mage.Sets/src/mage/cards/t/TamiyoTheMoonSage.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.TappedPredicate; @@ -58,7 +59,7 @@ public class TamiyoTheMoonSage extends CardImpl { public TamiyoTheMoonSage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{U}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Tamiyo"); + this.subtype.add(SubType.TAMIYO); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/t/TanaTheBloodsower.java b/Mage.Sets/src/mage/cards/t/TanaTheBloodsower.java index 903d676127..d2018a6252 100644 --- a/Mage.Sets/src/mage/cards/t/TanaTheBloodsower.java +++ b/Mage.Sets/src/mage/cards/t/TanaTheBloodsower.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.game.Game; @@ -54,8 +55,8 @@ public class TanaTheBloodsower extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TandemLookout.java b/Mage.Sets/src/mage/cards/t/TandemLookout.java index 0ebc1c3d2b..b695fbb1c5 100644 --- a/Mage.Sets/src/mage/cards/t/TandemLookout.java +++ b/Mage.Sets/src/mage/cards/t/TandemLookout.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.SoulbondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -49,8 +50,8 @@ public class TandemLookout extends CardImpl { public TandemLookout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TangleAngler.java b/Mage.Sets/src/mage/cards/t/TangleAngler.java index 0dfe48a22d..3d493c7b5a 100644 --- a/Mage.Sets/src/mage/cards/t/TangleAngler.java +++ b/Mage.Sets/src/mage/cards/t/TangleAngler.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class TangleAngler extends CardImpl { public TangleAngler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TangleAsp.java b/Mage.Sets/src/mage/cards/t/TangleAsp.java index 7aeb22a6ef..e970c1cc5c 100644 --- a/Mage.Sets/src/mage/cards/t/TangleAsp.java +++ b/Mage.Sets/src/mage/cards/t/TangleAsp.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class TangleAsp extends CardImpl { public TangleAsp(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.color.setGreen(true); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TangleGolem.java b/Mage.Sets/src/mage/cards/t/TangleGolem.java index 7e6eced91b..ecb34d2742 100644 --- a/Mage.Sets/src/mage/cards/t/TangleGolem.java +++ b/Mage.Sets/src/mage/cards/t/TangleGolem.java @@ -43,7 +43,7 @@ public class TangleGolem extends CardImpl { public TangleGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TangleHulk.java b/Mage.Sets/src/mage/cards/t/TangleHulk.java index ac41c30d36..1ada3b64da 100644 --- a/Mage.Sets/src/mage/cards/t/TangleHulk.java +++ b/Mage.Sets/src/mage/cards/t/TangleHulk.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class TangleHulk extends CardImpl { public TangleHulk (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(3); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{2}{G}"))); diff --git a/Mage.Sets/src/mage/cards/t/TangleMantis.java b/Mage.Sets/src/mage/cards/t/TangleMantis.java index f0a2a2cfd1..870f3e4fc3 100644 --- a/Mage.Sets/src/mage/cards/t/TangleMantis.java +++ b/Mage.Sets/src/mage/cards/t/TangleMantis.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class TangleMantis extends CardImpl { public TangleMantis (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TangleSpider.java b/Mage.Sets/src/mage/cards/t/TangleSpider.java index 5bc7aae7a8..f12cf3a0ef 100644 --- a/Mage.Sets/src/mage/cards/t/TangleSpider.java +++ b/Mage.Sets/src/mage/cards/t/TangleSpider.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -43,7 +44,7 @@ public class TangleSpider extends CardImpl { public TangleSpider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TangleclawWerewolf.java b/Mage.Sets/src/mage/cards/t/TangleclawWerewolf.java index 5adc37e630..c0dd606b7a 100644 --- a/Mage.Sets/src/mage/cards/t/TangleclawWerewolf.java +++ b/Mage.Sets/src/mage/cards/t/TangleclawWerewolf.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.f.FibrousEntangler; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class TangleclawWerewolf extends CardImpl { public TangleclawWerewolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Werewolf"); - this.subtype.add("Horror"); + this.subtype.add(SubType.WEREWOLF); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/Tanglewalker.java b/Mage.Sets/src/mage/cards/t/Tanglewalker.java index 3c18ca5313..f1fef1db64 100644 --- a/Mage.Sets/src/mage/cards/t/Tanglewalker.java +++ b/Mage.Sets/src/mage/cards/t/Tanglewalker.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -58,7 +59,7 @@ public class Tanglewalker extends CardImpl { public Tanglewalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Dryad"); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/Taniwha.java b/Mage.Sets/src/mage/cards/t/Taniwha.java index 4916ea0add..ac9524bd13 100644 --- a/Mage.Sets/src/mage/cards/t/Taniwha.java +++ b/Mage.Sets/src/mage/cards/t/Taniwha.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.TargetController; @@ -54,7 +55,7 @@ public class Taniwha extends CardImpl { public Taniwha(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/t/TankDroid.java b/Mage.Sets/src/mage/cards/t/TankDroid.java index 2defe410b2..3c9e6c3190 100644 --- a/Mage.Sets/src/mage/cards/t/TankDroid.java +++ b/Mage.Sets/src/mage/cards/t/TankDroid.java @@ -1,72 +1,73 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.AttacksOrBlocksTriggeredAbility; -import mage.abilities.common.EntersBattlefieldOrDiesSourceTriggeredAbility; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.keyword.RepairAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.game.permanent.token.DroidToken; - -/** - * - * @author Styxo - */ -public class TankDroid extends CardImpl { - - public TankDroid(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}{W}{U}{B}"); - this.subtype.add("Droid"); - this.power = new MageInt(5); - this.toughness = new MageInt(5); - - // Whenever Tank Droid enters the battlefield, attacks, blocks or dies, create a 1/1 colorless Droid token creature. - Ability ability = new AttacksOrBlocksTriggeredAbility(new CreateTokenEffect(new DroidToken()), false); - this.addAbility(ability); - ability = new EntersBattlefieldOrDiesSourceTriggeredAbility(new CreateTokenEffect(new DroidToken()), false); - this.addAbility(ability); - - // Repair 3 - this.addAbility(new RepairAbility(3)); - } - - public TankDroid(final TankDroid card) { - super(card); - } - - @Override - public TankDroid copy() { - return new TankDroid(this); - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksOrBlocksTriggeredAbility; +import mage.abilities.common.EntersBattlefieldOrDiesSourceTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.RepairAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.game.permanent.token.DroidToken; + +/** + * + * @author Styxo + */ +public class TankDroid extends CardImpl { + + public TankDroid(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}{W}{U}{B}"); + this.subtype.add(SubType.DROID); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Whenever Tank Droid enters the battlefield, attacks, blocks or dies, create a 1/1 colorless Droid token creature. + Ability ability = new AttacksOrBlocksTriggeredAbility(new CreateTokenEffect(new DroidToken()), false); + this.addAbility(ability); + ability = new EntersBattlefieldOrDiesSourceTriggeredAbility(new CreateTokenEffect(new DroidToken()), false); + this.addAbility(ability); + + // Repair 3 + this.addAbility(new RepairAbility(3)); + } + + public TankDroid(final TankDroid card) { + super(card); + } + + @Override + public TankDroid copy() { + return new TankDroid(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TaoistHermit.java b/Mage.Sets/src/mage/cards/t/TaoistHermit.java index 1fb5b66d2a..79fc8855e0 100644 --- a/Mage.Sets/src/mage/cards/t/TaoistHermit.java +++ b/Mage.Sets/src/mage/cards/t/TaoistHermit.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class TaoistHermit extends CardImpl { public TaoistHermit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Mystic"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MYSTIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TaoistMystic.java b/Mage.Sets/src/mage/cards/t/TaoistMystic.java index da6ac4ba69..e8d34e629a 100644 --- a/Mage.Sets/src/mage/cards/t/TaoistMystic.java +++ b/Mage.Sets/src/mage/cards/t/TaoistMystic.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -53,8 +54,8 @@ public class TaoistMystic extends CardImpl { public TaoistMystic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Mystic"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MYSTIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TarFiend.java b/Mage.Sets/src/mage/cards/t/TarFiend.java index c219d9e7a9..6ac8ca20a3 100644 --- a/Mage.Sets/src/mage/cards/t/TarFiend.java +++ b/Mage.Sets/src/mage/cards/t/TarFiend.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DevourAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -48,7 +49,7 @@ public class TarFiend extends CardImpl { public TarFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TarPitWarrior.java b/Mage.Sets/src/mage/cards/t/TarPitWarrior.java index ace48505ca..e806f29fa0 100644 --- a/Mage.Sets/src/mage/cards/t/TarPitWarrior.java +++ b/Mage.Sets/src/mage/cards/t/TarPitWarrior.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class TarPitWarrior extends CardImpl { public TarPitWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Cyclops"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CYCLOPS); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TarPitcher.java b/Mage.Sets/src/mage/cards/t/TarPitcher.java index 97453feea3..29e9c45c0f 100644 --- a/Mage.Sets/src/mage/cards/t/TarPitcher.java +++ b/Mage.Sets/src/mage/cards/t/TarPitcher.java @@ -58,8 +58,8 @@ public class TarPitcher extends CardImpl { public TarPitcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/Tarfire.java b/Mage.Sets/src/mage/cards/t/Tarfire.java index df7f51eebc..335c40c25e 100644 --- a/Mage.Sets/src/mage/cards/t/Tarfire.java +++ b/Mage.Sets/src/mage/cards/t/Tarfire.java @@ -32,6 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; /** @@ -42,7 +43,7 @@ public class Tarfire extends CardImpl { public Tarfire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); // Tarfire deals 2 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); diff --git a/Mage.Sets/src/mage/cards/t/TarielReckonerOfSouls.java b/Mage.Sets/src/mage/cards/t/TarielReckonerOfSouls.java index 1cde0a31b7..254ef4b348 100644 --- a/Mage.Sets/src/mage/cards/t/TarielReckonerOfSouls.java +++ b/Mage.Sets/src/mage/cards/t/TarielReckonerOfSouls.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.VigilanceAbility; import mage.cards.*; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class TarielReckonerOfSouls extends CardImpl { public TarielReckonerOfSouls(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/t/Tarmogoyf.java b/Mage.Sets/src/mage/cards/t/Tarmogoyf.java index ed9392855c..3292df697a 100644 --- a/Mage.Sets/src/mage/cards/t/Tarmogoyf.java +++ b/Mage.Sets/src/mage/cards/t/Tarmogoyf.java @@ -51,7 +51,7 @@ public class Tarmogoyf extends CardImpl { public Tarmogoyf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Lhurgoyf"); + this.subtype.add(SubType.LHURGOYF); this.power = new MageInt(0); this.toughness = new MageInt(1); @@ -73,7 +73,7 @@ public class Tarmogoyf extends CardImpl { class TarmogoyfEffect extends ContinuousEffectImpl { public TarmogoyfEffect() { - super(Duration.EndOfGame, Layer.PTChangingEffects_7, SubLayer.SetPT_7b, Outcome.BoostCreature); + super(Duration.EndOfGame, Layer.PTChangingEffects_7, SubLayer.CharacteristicDefining_7a, Outcome.BoostCreature); staticText = "{this}'s power is equal to the number of card types among cards in all graveyards and its toughness is equal to that number plus 1"; } diff --git a/Mage.Sets/src/mage/cards/t/TaroxBladewing.java b/Mage.Sets/src/mage/cards/t/TaroxBladewing.java index 5c41e18c73..c9021befeb 100644 --- a/Mage.Sets/src/mage/cards/t/TaroxBladewing.java +++ b/Mage.Sets/src/mage/cards/t/TaroxBladewing.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; @@ -49,7 +50,7 @@ public class TaroxBladewing extends CardImpl { public TaroxBladewing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/Tarpan.java b/Mage.Sets/src/mage/cards/t/Tarpan.java index a03c4dd810..8d7f515e70 100644 --- a/Mage.Sets/src/mage/cards/t/Tarpan.java +++ b/Mage.Sets/src/mage/cards/t/Tarpan.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class Tarpan extends CardImpl { public Tarpan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Horse"); + this.subtype.add(SubType.HORSE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TasigurTheGoldenFang.java b/Mage.Sets/src/mage/cards/t/TasigurTheGoldenFang.java index cb2eadfa8e..9e1bcbcb88 100644 --- a/Mage.Sets/src/mage/cards/t/TasigurTheGoldenFang.java +++ b/Mage.Sets/src/mage/cards/t/TasigurTheGoldenFang.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -59,8 +60,8 @@ public class TasigurTheGoldenFang extends CardImpl { public TasigurTheGoldenFang(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TaskForce.java b/Mage.Sets/src/mage/cards/t/TaskForce.java index 10c541db55..fa1a5f3e57 100644 --- a/Mage.Sets/src/mage/cards/t/TaskForce.java +++ b/Mage.Sets/src/mage/cards/t/TaskForce.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class TaskForce extends CardImpl { public TaskForce(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TaskMageAssembly.java b/Mage.Sets/src/mage/cards/t/TaskMageAssembly.java new file mode 100644 index 0000000000..395b642149 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TaskMageAssembly.java @@ -0,0 +1,103 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.StateTriggeredAbility; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.InfoEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class TaskMageAssembly extends CardImpl { + + public TaskMageAssembly(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + + // When there are no creatures on the battlefield, sacrifice Task Mage Assembly. + this.addAbility(new TaskMageAssemblyStateTriggeredAbility()); + + // {2}: Task Mage Assembly deals 1 damage to target creature. Any player may activate this ability but only any time he or she could cast a sorcery. + ActivateAsSorceryActivatedAbility ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{2}")); + ability.addTarget(new TargetCreaturePermanent()); + ability.setMayActivate(TargetController.ANY); + ability.addEffect(new InfoEffect("Any player may activate this ability")); + this.addAbility(ability); + } + + public TaskMageAssembly(final TaskMageAssembly card) { + super(card); + } + + @Override + public TaskMageAssembly copy() { + return new TaskMageAssembly(this); + } +} + +class TaskMageAssemblyStateTriggeredAbility extends StateTriggeredAbility { + + public TaskMageAssemblyStateTriggeredAbility() { + super(Zone.BATTLEFIELD, new SacrificeSourceEffect()); + } + + public TaskMageAssemblyStateTriggeredAbility(final TaskMageAssemblyStateTriggeredAbility ability) { + super(ability); + } + + @Override + public TaskMageAssemblyStateTriggeredAbility copy() { + return new TaskMageAssemblyStateTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return game.getBattlefield().count(new FilterCreaturePermanent(), this.getSourceId(), this.getControllerId(), game) == 0; + } + + @Override + public String getRule() { + return new StringBuilder("When there are no creatures on the battlefield, ").append(super.getRule()).toString() ; + } + +} diff --git a/Mage.Sets/src/mage/cards/t/TasseledDromedary.java b/Mage.Sets/src/mage/cards/t/TasseledDromedary.java index aa6567caec..fe79d66216 100644 --- a/Mage.Sets/src/mage/cards/t/TasseledDromedary.java +++ b/Mage.Sets/src/mage/cards/t/TasseledDromedary.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class TasseledDromedary extends CardImpl { public TasseledDromedary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Camel"); + this.subtype.add(SubType.CAMEL); this.power = new MageInt(0); this.toughness = new MageInt(4); } diff --git a/Mage.Sets/src/mage/cards/t/TasteForMayhem.java b/Mage.Sets/src/mage/cards/t/TasteForMayhem.java index 116843e691..0c1ebf089c 100644 --- a/Mage.Sets/src/mage/cards/t/TasteForMayhem.java +++ b/Mage.Sets/src/mage/cards/t/TasteForMayhem.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class TasteForMayhem extends CardImpl { public TasteForMayhem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/t/TatsumasaTheDragonsFang.java b/Mage.Sets/src/mage/cards/t/TatsumasaTheDragonsFang.java index bd1f29a50b..c92f4911ea 100644 --- a/Mage.Sets/src/mage/cards/t/TatsumasaTheDragonsFang.java +++ b/Mage.Sets/src/mage/cards/t/TatsumasaTheDragonsFang.java @@ -60,7 +60,7 @@ public class TatsumasaTheDragonsFang extends CardImpl { public TatsumasaTheDragonsFang(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +5/+5. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(5, 5))); diff --git a/Mage.Sets/src/mage/cards/t/TatteredDrake.java b/Mage.Sets/src/mage/cards/t/TatteredDrake.java index 3662c385f4..e6164e288b 100644 --- a/Mage.Sets/src/mage/cards/t/TatteredDrake.java +++ b/Mage.Sets/src/mage/cards/t/TatteredDrake.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class TatteredDrake extends CardImpl { public TatteredDrake (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Zombie"); - this.subtype.add("Drake"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TatteredHaunter.java b/Mage.Sets/src/mage/cards/t/TatteredHaunter.java index 7bf596d9cd..a13a78ecbf 100644 --- a/Mage.Sets/src/mage/cards/t/TatteredHaunter.java +++ b/Mage.Sets/src/mage/cards/t/TatteredHaunter.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class TatteredHaunter extends CardImpl { public TatteredHaunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TatteredMummy.java b/Mage.Sets/src/mage/cards/t/TatteredMummy.java index b96dc4a4e8..ab7908821a 100644 --- a/Mage.Sets/src/mage/cards/t/TatteredMummy.java +++ b/Mage.Sets/src/mage/cards/t/TatteredMummy.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.LoseLifeOpponentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class TatteredMummy extends CardImpl { public TatteredMummy(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Jackal"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.JACKAL); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/Tatterkite.java b/Mage.Sets/src/mage/cards/t/Tatterkite.java index b5f27404e7..e7997380f4 100644 --- a/Mage.Sets/src/mage/cards/t/Tatterkite.java +++ b/Mage.Sets/src/mage/cards/t/Tatterkite.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class Tatterkite extends CardImpl { public Tatterkite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TattermungeDuo.java b/Mage.Sets/src/mage/cards/t/TattermungeDuo.java index 679c1c085c..00d72aec33 100644 --- a/Mage.Sets/src/mage/cards/t/TattermungeDuo.java +++ b/Mage.Sets/src/mage/cards/t/TattermungeDuo.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,9 +58,9 @@ public class TattermungeDuo extends CardImpl { public TattermungeDuo(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R/G}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TattermungeManiac.java b/Mage.Sets/src/mage/cards/t/TattermungeManiac.java index a3be975e3e..9ed835551c 100644 --- a/Mage.Sets/src/mage/cards/t/TattermungeManiac.java +++ b/Mage.Sets/src/mage/cards/t/TattermungeManiac.java @@ -29,10 +29,11 @@ package mage.cards.t; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,13 +43,13 @@ public class TattermungeManiac extends CardImpl { public TattermungeManiac(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R/G}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public TattermungeManiac(final TattermungeManiac card) { diff --git a/Mage.Sets/src/mage/cards/t/TattermungeWitch.java b/Mage.Sets/src/mage/cards/t/TattermungeWitch.java index ca8e8bd138..51d8bff460 100644 --- a/Mage.Sets/src/mage/cards/t/TattermungeWitch.java +++ b/Mage.Sets/src/mage/cards/t/TattermungeWitch.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -57,8 +58,8 @@ public class TattermungeWitch extends CardImpl { public TattermungeWitch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R/G}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TauntingElf.java b/Mage.Sets/src/mage/cards/t/TauntingElf.java index 3e4a2452a1..7a1f29ed9c 100644 --- a/Mage.Sets/src/mage/cards/t/TauntingElf.java +++ b/Mage.Sets/src/mage/cards/t/TauntingElf.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.MustBeBlockedByAllSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -44,7 +45,7 @@ public class TauntingElf extends CardImpl { public TauntingElf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TaureanMauler.java b/Mage.Sets/src/mage/cards/t/TaureanMauler.java index f679471d26..6d99d0e985 100644 --- a/Mage.Sets/src/mage/cards/t/TaureanMauler.java +++ b/Mage.Sets/src/mage/cards/t/TaureanMauler.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ChangelingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,7 +46,7 @@ public class TaureanMauler extends CardImpl { public TaureanMauler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TavernSwindler.java b/Mage.Sets/src/mage/cards/t/TavernSwindler.java index e16f2d3be3..828f5a505c 100644 --- a/Mage.Sets/src/mage/cards/t/TavernSwindler.java +++ b/Mage.Sets/src/mage/cards/t/TavernSwindler.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -50,8 +51,8 @@ public class TavernSwindler extends CardImpl { public TavernSwindler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TawnossCoffin.java b/Mage.Sets/src/mage/cards/t/TawnossCoffin.java index 168887ac1a..2fa72e6b16 100644 --- a/Mage.Sets/src/mage/cards/t/TawnossCoffin.java +++ b/Mage.Sets/src/mage/cards/t/TawnossCoffin.java @@ -27,6 +27,8 @@ */ package mage.cards.t; +import java.util.HashSet; +import java.util.Set; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; @@ -46,17 +48,16 @@ import mage.constants.Zone; import mage.counters.Counter; import mage.counters.Counters; import mage.filter.Filter; -import mage.filter.FilterCard; import mage.filter.common.FilterEnchantmentPermanent; -import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.ExileZone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; -import mage.game.permanent.token.Token; +import mage.players.Player; import mage.target.Target; import mage.target.common.TargetCreaturePermanent; +import mage.util.CardUtil; /** * @@ -64,14 +65,12 @@ import mage.target.common.TargetCreaturePermanent; */ public class TawnossCoffin extends CardImpl { - public Counters godHelpMe = null; - public TawnossCoffin(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); // You may choose not to untap Tawnos's Coffin during your untap step. this.addAbility(new SkipUntapOptionalAbility()); - // {3}, {tap}: Exile target creature and all Auras attached to it. Note the number and kind of counters that were on that creature. + // {3}, {T}: Exile target creature and all Auras attached to it. Note the number and kind of counters that were on that creature. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TawnossCoffinEffect(), new TapSourceCost()); ability.addCost(new ManaCostsImpl("{3}")); ability.addTarget(new TargetCreaturePermanent()); @@ -114,7 +113,7 @@ class TawnossCoffinTriggeredAbility extends LeavesBattlefieldTriggeredAbility { @Override public boolean checkTrigger(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.UNTAPPED) { - return event.getTargetId().equals(sourceId); + return event.getTargetId().equals(getSourceId()); } else { return super.checkTrigger(event, game); } @@ -151,40 +150,25 @@ class TawnossCoffinEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { // Exile enchanted creature and all Auras attached to it. - Permanent enchantment = game.getPermanent(source.getSourceId()); - if (enchantment == null) { - enchantment = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); - } - UUID targetId = source.getFirstTarget(); - - if (targetId == null) { - return false; // if previous scan somehow failed, simply quit - } - if (enchantment != null) { //back to code (mostly) copied from Flickerform - Permanent enchantedCreature = game.getPermanent(targetId); + Permanent sourceObject = game.getPermanentOrLKIBattlefield(source.getSourceId()); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null && sourceObject != null) { + Permanent enchantedCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); if (enchantedCreature != null) { - UUID exileZoneId = source.getSourceId(); - enchantedCreature.moveToExile(exileZoneId, enchantment.getName(), source.getSourceId(), game); + UUID exileZoneId = CardUtil.getCardExileZoneId(game, source); + Set toExile = new HashSet<>(); + toExile.add(enchantedCreature); for (UUID attachementId : enchantedCreature.getAttachments()) { Permanent attachment = game.getPermanent(attachementId); - if (attachment != null && filter.match(attachment, game)) { - attachment.moveToExile(exileZoneId, enchantment.getName(), source.getSourceId(), game); + if (attachment != null && attachment.hasSubtype(SubType.AURA, game)) { + toExile.add(attachment); } } - - //((TawnossCoffin)enchantment.getMainCard()).godHelpMe = enchantedCreature.getCounters(game); //why doesn't work? should return the same card, no? - ((TawnossCoffin) game.getCard(source.getSourceId())).godHelpMe = enchantedCreature.getCounters(game).copy(); - - if (!(enchantedCreature instanceof Token)) { - - // If you do, return the other cards exiled this way to the battlefield under their owners' control attached to that creature - /*LeavesBattlefieldTriggeredAbility triggeredAbility = new LeavesBattlefieldTriggeredAbility( - new TawnossCoffinReturnEffect(), false); - enchantment.addAbility(triggeredAbility, source.getSourceId(), game); - */ - } - return true; + controller.moveCardsToExile(toExile, source, game, true, exileZoneId, sourceObject.getIdName()); + game.getState().setValue(exileZoneId.toString() + "NotedCounters", enchantedCreature.getCounters(game).copy()); + game.getState().setValue(exileZoneId.toString() + "EnchantedCreature", enchantedCreature.getId()); } + return true; } return false; @@ -193,17 +177,9 @@ class TawnossCoffinEffect extends OneShotEffect { class TawnossCoffinReturnEffect extends OneShotEffect { - private static final FilterCard filterAura = new FilterCard(); - - static { - filterAura.add(new CardTypePredicate(CardType.ENCHANTMENT)); - filterAura.add(new SubtypePredicate(SubType.AURA)); - } - public TawnossCoffinReturnEffect() { super(Outcome.Benefit); this.staticText = "return the exiled card to the battlefield under its owner's control tapped with the noted number and kind of counters on it. If you do, return the exiled Aura cards to the battlefield under their owner's control attached to that permanent"; - } public TawnossCoffinReturnEffect(final TawnossCoffinReturnEffect effect) { @@ -217,57 +193,66 @@ class TawnossCoffinReturnEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - ExileZone exileZone = game.getExile().getExileZone(source.getSourceId()); + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null) { + return false; + } + UUID exileZoneId = CardUtil.getCardExileZoneId(game, source); + ExileZone exileZone = game.getExile().getExileZone(exileZoneId); if (exileZone == null) { return true; } - FilterCard filter = new FilterCard(); - filter.add(new CardTypePredicate(CardType.CREATURE)); - //There should be only 1 there, but the for each loop seems the most practical to get to it - for (Card enchantedCard : exileZone.getCards(filter, game)) { - if (enchantedCard == null) { - continue; - } - enchantedCard.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), enchantedCard.getOwnerId()); - Permanent newPermanent = game.getPermanent(enchantedCard.getId()); - if (newPermanent != null) { - newPermanent.tap(game); - for (Card enchantment : exileZone.getCards(game)) { - if (filterAura.match(enchantment, game)) { - boolean canTarget = false; - for (Target target : enchantment.getSpellAbility().getTargets()) { - Filter filter2 = target.getFilter(); - if (filter2.match(newPermanent, game)) { - canTarget = true; - break; - } - } - if (!canTarget) { - // Aura stays exiled - continue; - } - game.getState().setValue("attachTo:" + enchantment.getId(), newPermanent); - } - if (enchantment.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), enchantment.getOwnerId())) { - if (filterAura.match(enchantment, game)) { - newPermanent.addAttachment(enchantment.getId(), game); - } - } - } - Card oubliette = game.getCard(source.getSourceId()); - if (oubliette == null) { - return false;//1st stab at getting those counters back - } - for (Counter c : ((TawnossCoffin) oubliette).godHelpMe.values()) { //would be nice if could just use that copy function to set the whole field + UUID enchantedCreatureId = (UUID) game.getState().getValue(exileZoneId.toString() + "EnchantedCreature"); + if (enchantedCreatureId == null) { + return false; + } + if (!exileZone.contains(enchantedCreatureId)) { + return true; // Card was removed from exile meanwhile, other card sstay in exile + } + Card enchantedCreature = game.getCard(enchantedCreatureId); + if (enchantedCreature == null) { + return false; + } + controller.moveCards(enchantedCreature, Zone.BATTLEFIELD, source, game, true, false, true, null); + Permanent newPermanent = game.getPermanent(enchantedCreature.getId()); + if (newPermanent != null) { + // Add the noted counters + Counters notedCounters = (Counters) game.getState().getValue(exileZoneId.toString() + "NotedCounters"); + if (notedCounters != null) { + for (Counter c : notedCounters.values()) { //would be nice if could just use that copy function to set the whole field if (c != null) { newPermanent.getCounters(game).addCounter(c); } } - } - return true; + // Return the exiled auras + Set returningAuras = new HashSet<>(); + for (Card enchantment : exileZone.getCards(game)) { + if (enchantment.hasSubtype(SubType.AURA, game)) { + boolean canTarget = false; + for (Target target : enchantment.getSpellAbility().getTargets()) { + Filter filter2 = target.getFilter(); + if (filter2.match(newPermanent, game)) { + canTarget = true; + break; + } + } + if (!canTarget) { + // Aura stays exiled + continue; + } + returningAuras.add(enchantment); + game.getState().setValue("attachTo:" + enchantment.getId(), newPermanent); + } + } + controller.moveCards(returningAuras, Zone.BATTLEFIELD, source, game, false, false, true, null); + for (Card enchantment : returningAuras) { + Permanent permanent = game.getPermanent(enchantment.getId()); + if (permanent != null) { + newPermanent.addAttachment(permanent.getId(), game); + } + } } - - return false; + return true; } } diff --git a/Mage.Sets/src/mage/cards/t/TeardropKami.java b/Mage.Sets/src/mage/cards/t/TeardropKami.java index d9b65cd397..8272d55458 100644 --- a/Mage.Sets/src/mage/cards/t/TeardropKami.java +++ b/Mage.Sets/src/mage/cards/t/TeardropKami.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.MayTapOrUntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class TeardropKami extends CardImpl { public TeardropKami(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TectonicFiend.java b/Mage.Sets/src/mage/cards/t/TectonicFiend.java index 0d261af006..d4bcc909c4 100644 --- a/Mage.Sets/src/mage/cards/t/TectonicFiend.java +++ b/Mage.Sets/src/mage/cards/t/TectonicFiend.java @@ -29,11 +29,12 @@ package mage.cards.t; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,14 +44,14 @@ public class TectonicFiend extends CardImpl { public TectonicFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(7); this.toughness = new MageInt(7); // Echo {4}{R}{R} this.addAbility(new EchoAbility("{4}{R}{R}")); // Tectonic Fiend attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public TectonicFiend(final TectonicFiend card) { diff --git a/Mage.Sets/src/mage/cards/t/TeekasDragon.java b/Mage.Sets/src/mage/cards/t/TeekasDragon.java index f0de3eaa83..3449efd463 100644 --- a/Mage.Sets/src/mage/cards/t/TeekasDragon.java +++ b/Mage.Sets/src/mage/cards/t/TeekasDragon.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class TeekasDragon extends CardImpl { public TeekasDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{9}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TeferiMageOfZhalfir.java b/Mage.Sets/src/mage/cards/t/TeferiMageOfZhalfir.java index fccc635fd5..a18f1963ce 100644 --- a/Mage.Sets/src/mage/cards/t/TeferiMageOfZhalfir.java +++ b/Mage.Sets/src/mage/cards/t/TeferiMageOfZhalfir.java @@ -52,8 +52,8 @@ public class TeferiMageOfZhalfir extends CardImpl { public TeferiMageOfZhalfir(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TeferiTemporalArchmage.java b/Mage.Sets/src/mage/cards/t/TeferiTemporalArchmage.java index 79ef459215..0fbad0c8ba 100644 --- a/Mage.Sets/src/mage/cards/t/TeferiTemporalArchmage.java +++ b/Mage.Sets/src/mage/cards/t/TeferiTemporalArchmage.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterCard; @@ -54,7 +55,7 @@ public class TeferiTemporalArchmage extends CardImpl { public TeferiTemporalArchmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{U}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Teferi"); + this.subtype.add(SubType.TEFERI); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); diff --git a/Mage.Sets/src/mage/cards/t/TeferisCurse.java b/Mage.Sets/src/mage/cards/t/TeferisCurse.java index 2537a3e698..cf09f6026c 100644 --- a/Mage.Sets/src/mage/cards/t/TeferisCurse.java +++ b/Mage.Sets/src/mage/cards/t/TeferisCurse.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -61,7 +62,7 @@ public class TeferisCurse extends CardImpl { public TeferisCurse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant artifact or creature TargetPermanent auraTarget = new TargetPermanent(filter); diff --git a/Mage.Sets/src/mage/cards/t/TeferisDrake.java b/Mage.Sets/src/mage/cards/t/TeferisDrake.java index 21e27c3596..36c52ba1a2 100644 --- a/Mage.Sets/src/mage/cards/t/TeferisDrake.java +++ b/Mage.Sets/src/mage/cards/t/TeferisDrake.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.PhasingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class TeferisDrake extends CardImpl { public TeferisDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TeferisHonorGuard.java b/Mage.Sets/src/mage/cards/t/TeferisHonorGuard.java index 353d455801..6a6c08f230 100644 --- a/Mage.Sets/src/mage/cards/t/TeferisHonorGuard.java +++ b/Mage.Sets/src/mage/cards/t/TeferisHonorGuard.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlankingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class TeferisHonorGuard extends CardImpl { public TeferisHonorGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TeferisVeil.java b/Mage.Sets/src/mage/cards/t/TeferisVeil.java new file mode 100644 index 0000000000..58ff55d718 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TeferisVeil.java @@ -0,0 +1,63 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.common.AttacksCreatureYouControlTriggeredAbility; +import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.PhaseOutTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class TeferisVeil extends CardImpl { + + public TeferisVeil(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + + // Whenever a creature you control attacks, it phases out at end of combat. + Effect effect = new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new PhaseOutTargetEffect("it", false))); + effect.setText("it phases out at end of combat"); + this.addAbility(new AttacksCreatureYouControlTriggeredAbility(effect, false, true)); + } + + public TeferisVeil(final TeferisVeil card) { + super(card); + } + + @Override + public TeferisVeil copy() { + return new TeferisVeil(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/Tek.java b/Mage.Sets/src/mage/cards/t/Tek.java index 11c019e003..aabd4f6dd2 100644 --- a/Mage.Sets/src/mage/cards/t/Tek.java +++ b/Mage.Sets/src/mage/cards/t/Tek.java @@ -71,7 +71,7 @@ public class Tek extends CardImpl { public Tek(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TelJiladArchers.java b/Mage.Sets/src/mage/cards/t/TelJiladArchers.java index 47f86df6fd..82be4d7901 100644 --- a/Mage.Sets/src/mage/cards/t/TelJiladArchers.java +++ b/Mage.Sets/src/mage/cards/t/TelJiladArchers.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterArtifactCard; /** @@ -44,8 +45,8 @@ public class TelJiladArchers extends CardImpl { public TelJiladArchers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Archer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TelJiladChosen.java b/Mage.Sets/src/mage/cards/t/TelJiladChosen.java index 0f808732d1..3867b4ac7f 100644 --- a/Mage.Sets/src/mage/cards/t/TelJiladChosen.java +++ b/Mage.Sets/src/mage/cards/t/TelJiladChosen.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterArtifactCard; /** @@ -43,8 +44,8 @@ public class TelJiladChosen extends CardImpl { public TelJiladChosen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TelJiladExile.java b/Mage.Sets/src/mage/cards/t/TelJiladExile.java index 43cb2aed2d..bf5a86e9fd 100644 --- a/Mage.Sets/src/mage/cards/t/TelJiladExile.java +++ b/Mage.Sets/src/mage/cards/t/TelJiladExile.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class TelJiladExile extends CardImpl { public TelJiladExile(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Troll"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.TROLL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TelJiladFallen.java b/Mage.Sets/src/mage/cards/t/TelJiladFallen.java index efdecdc0cc..c448b48a02 100644 --- a/Mage.Sets/src/mage/cards/t/TelJiladFallen.java +++ b/Mage.Sets/src/mage/cards/t/TelJiladFallen.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterArtifactCard; /** @@ -45,8 +46,8 @@ public class TelJiladFallen extends CardImpl { public TelJiladFallen (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TelJiladLifebreather.java b/Mage.Sets/src/mage/cards/t/TelJiladLifebreather.java index 1a3defb528..e681bdb960 100644 --- a/Mage.Sets/src/mage/cards/t/TelJiladLifebreather.java +++ b/Mage.Sets/src/mage/cards/t/TelJiladLifebreather.java @@ -58,8 +58,8 @@ public class TelJiladLifebreather extends CardImpl { } public TelJiladLifebreather(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Troll"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.TROLL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TelJiladOutrider.java b/Mage.Sets/src/mage/cards/t/TelJiladOutrider.java index c16f01db44..0cabb9d60f 100644 --- a/Mage.Sets/src/mage/cards/t/TelJiladOutrider.java +++ b/Mage.Sets/src/mage/cards/t/TelJiladOutrider.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterArtifactCard; /** @@ -43,8 +44,8 @@ public class TelJiladOutrider extends CardImpl { public TelJiladOutrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TelJiladWolf.java b/Mage.Sets/src/mage/cards/t/TelJiladWolf.java index d696d20a05..cea2fedd10 100644 --- a/Mage.Sets/src/mage/cards/t/TelJiladWolf.java +++ b/Mage.Sets/src/mage/cards/t/TelJiladWolf.java @@ -1,71 +1,72 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.BecomesBlockedByCreatureTriggeredAbility; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.CardTypePredicate; - -/** - * - * @author wetterlicht - */ -public class TelJiladWolf extends CardImpl { - - private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("artifact creature"); - - static { - filter.add(new CardTypePredicate(CardType.ARTIFACT)); - } - - public TelJiladWolf(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Wolf"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // Whenever Tel-Jilad Wolf becomes blocked by an artifact creature, Tel-Jilad Wolf gets +3/+3 until end of turn. - this.addAbility(new BecomesBlockedByCreatureTriggeredAbility(new BoostSourceEffect(3, 3, Duration.EndOfTurn), filter, false)); - } - - public TelJiladWolf(final TelJiladWolf card) { - super(card); - } - - @Override - public TelJiladWolf copy() { - return new TelJiladWolf(this); - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesBlockedByCreatureTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author wetterlicht + */ +public class TelJiladWolf extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("artifact creature"); + + static { + filter.add(new CardTypePredicate(CardType.ARTIFACT)); + } + + public TelJiladWolf(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.subtype.add(SubType.WOLF); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Tel-Jilad Wolf becomes blocked by an artifact creature, Tel-Jilad Wolf gets +3/+3 until end of turn. + this.addAbility(new BecomesBlockedByCreatureTriggeredAbility(new BoostSourceEffect(3, 3, Duration.EndOfTurn), filter, false)); + } + + public TelJiladWolf(final TelJiladWolf card) { + super(card); + } + + @Override + public TelJiladWolf copy() { + return new TelJiladWolf(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TelekineticSliver.java b/Mage.Sets/src/mage/cards/t/TelekineticSliver.java index d0e3858d1f..9aa9c422fd 100644 --- a/Mage.Sets/src/mage/cards/t/TelekineticSliver.java +++ b/Mage.Sets/src/mage/cards/t/TelekineticSliver.java @@ -54,7 +54,7 @@ public class TelekineticSliver extends CardImpl { public TelekineticSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TelepathicSpies.java b/Mage.Sets/src/mage/cards/t/TelepathicSpies.java index 1257dbae52..dddee5290b 100644 --- a/Mage.Sets/src/mage/cards/t/TelepathicSpies.java +++ b/Mage.Sets/src/mage/cards/t/TelepathicSpies.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.LookAtTargetPlayerHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetOpponent; /** @@ -46,8 +47,8 @@ public class TelepathicSpies extends CardImpl { public TelepathicSpies(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/Telethopter.java b/Mage.Sets/src/mage/cards/t/Telethopter.java index d39e889bc3..f97a971e45 100644 --- a/Mage.Sets/src/mage/cards/t/Telethopter.java +++ b/Mage.Sets/src/mage/cards/t/Telethopter.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -56,7 +57,7 @@ public class Telethopter extends CardImpl { public Telethopter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Thopter"); + this.subtype.add(SubType.THOPTER); this.power = new MageInt(3); this.toughness = new MageInt(1); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false)))); diff --git a/Mage.Sets/src/mage/cards/t/TelimTor.java b/Mage.Sets/src/mage/cards/t/TelimTor.java new file mode 100644 index 0000000000..ab1f3edc98 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TelimTor.java @@ -0,0 +1,82 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.abilities.keyword.FlankingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.filter.predicate.permanent.AttackingPredicate; + +/** + * + * @author TheElk801 + */ +public class TelimTor extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("all attacking creatures with flanking"); + + static { + filter.add(new AttackingPredicate()); + filter.add(new AbilityPredicate(FlankingAbility.class)); + } + + public TelimTor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flanking + this.addAbility(new FlankingAbility()); + + // Whenever Telim'Tor attacks, all attacking creatures with flanking get +1/+1 until end of turn. + this.addAbility(new AttacksTriggeredAbility(new BoostAllEffect(1, 1, Duration.EndOfTurn, filter, false), false)); + } + + public TelimTor(final TelimTor card) { + super(card); + } + + @Override + public TelimTor copy() { + return new TelimTor(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TelimTorsEdict.java b/Mage.Sets/src/mage/cards/t/TelimTorsEdict.java new file mode 100644 index 0000000000..ae732b4188 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TelimTorsEdict.java @@ -0,0 +1,92 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.ObjectPlayer; +import mage.filter.predicate.ObjectPlayerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public class TelimTorsEdict extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("permanent you own or control"); + + static { + filter.add(new TelimTorsEdictPredicate()); + } + + public TelimTorsEdict(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}"); + + // Exile target permanent you own or control. + this.getSpellAbility().addEffect(new ExileTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + + // Draw a card at the beginning of the next turn's upkeep. + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)), false)); + } + + public TelimTorsEdict(final TelimTorsEdict card) { + super(card); + } + + @Override + public TelimTorsEdict copy() { + return new TelimTorsEdict(this); + } +} + +class TelimTorsEdictPredicate implements ObjectPlayerPredicate> { + + public TelimTorsEdictPredicate() { + } + + @Override + public boolean apply(ObjectPlayer input, Game game) { + Permanent permanent = input.getObject(); + UUID playerId = input.getPlayerId(); + if (permanent.getControllerId().equals(playerId) || permanent.getOwnerId().equals(playerId)) { + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/t/TellerOfTales.java b/Mage.Sets/src/mage/cards/t/TellerOfTales.java index 95f334f0cb..cf20b96515 100644 --- a/Mage.Sets/src/mage/cards/t/TellerOfTales.java +++ b/Mage.Sets/src/mage/cards/t/TellerOfTales.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetCreaturePermanent; @@ -51,7 +52,7 @@ public class TellerOfTales extends CardImpl { public TellerOfTales(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TemmetVizierOfNaktamun.java b/Mage.Sets/src/mage/cards/t/TemmetVizierOfNaktamun.java index a0fd603e88..24fae50531 100644 --- a/Mage.Sets/src/mage/cards/t/TemmetVizierOfNaktamun.java +++ b/Mage.Sets/src/mage/cards/t/TemmetVizierOfNaktamun.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EmbalmAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.TargetController; @@ -62,8 +63,8 @@ public class TemmetVizierOfNaktamun extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/Temper.java b/Mage.Sets/src/mage/cards/t/Temper.java new file mode 100644 index 0000000000..7e004b5f95 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/Temper.java @@ -0,0 +1,145 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.PreventionEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class Temper extends CardImpl { + + public Temper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{1}{W}"); + + // Prevent the next X damage that would be dealt to target creature this turn. For each 1 damage prevented this way, put a +1/+1 counter on that creature. + this.getSpellAbility().addEffect(new TemperPreventDamageTargetEffect(new ManacostVariableValue(), Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public Temper(final Temper card) { + super(card); + } + + @Override + public Temper copy() { + return new Temper(this); + } +} + +class TemperPreventDamageTargetEffect extends PreventionEffectImpl { + + private int amount; + private final DynamicValue dVal; + private boolean initialized; + + public TemperPreventDamageTargetEffect(DynamicValue dVal, Duration duration) { + super(duration); + this.initialized = false; + this.dVal = dVal; + staticText = "Prevent the next X damage that would be dealt to target creature this turn. For each 1 damage prevented this way, put a +1/+1 counter on that creature"; + } + + public TemperPreventDamageTargetEffect(final TemperPreventDamageTargetEffect effect) { + super(effect); + this.amount = effect.amount; + this.dVal = effect.dVal; + this.initialized = effect.initialized; + } + + @Override + public TemperPreventDamageTargetEffect copy() { + return new TemperPreventDamageTargetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + if (!initialized) { + amount = dVal.calculate(game, source, this); + initialized = true; + } + GameEvent preventEvent = new GameEvent(GameEvent.EventType.PREVENT_DAMAGE, source.getFirstTarget(), source.getSourceId(), source.getControllerId(), event.getAmount(), false); + if (!game.replaceEvent(preventEvent)) { + int prevented = 0; + if (event.getAmount() >= this.amount) { + int damage = amount; + event.setAmount(event.getAmount() - amount); + this.used = true; + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, source.getFirstTarget(), source.getSourceId(), source.getControllerId(), damage)); + prevented = damage; + } else { + int damage = event.getAmount(); + event.setAmount(0); + amount -= damage; + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, source.getFirstTarget(), source.getSourceId(), source.getControllerId(), damage)); + prevented = damage; + } + + // add counters now + if (prevented > 0) { + Permanent targetPermanent = game.getPermanent(source.getTargets().getFirstTarget()); + if (targetPermanent != null) { + targetPermanent.addCounters(CounterType.P1P1.createInstance(prevented), source, game); + game.informPlayers(new StringBuilder("Temper: Prevented ").append(prevented).append(" damage ").toString()); + game.informPlayers("Temper: Adding " + prevented + " +1/+1 counters to " + targetPermanent.getName()); + } + } + } + return false; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (!this.used && super.applies(event, source, game)) { + if (source.getTargets().getFirstTarget().equals(event.getTargetId())) { + return true; + } + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/cards/t/TempestCaller.java b/Mage.Sets/src/mage/cards/t/TempestCaller.java new file mode 100644 index 0000000000..7910dfa185 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TempestCaller.java @@ -0,0 +1,70 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.TapAllTargetPlayerControlsEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetOpponent; + +/** + * + * @author TheElk801 + */ +public class TempestCaller extends CardImpl { + + public TempestCaller(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // When Tempest Caller enters the battlefield, tap all creatures target opponent controls. + Ability ability = new EntersBattlefieldTriggeredAbility(new TapAllTargetPlayerControlsEffect(new FilterCreaturePermanent("creatures"))); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public TempestCaller(final TempestCaller card) { + super(card); + } + + @Override + public TempestCaller copy() { + return new TempestCaller(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TempestDrake.java b/Mage.Sets/src/mage/cards/t/TempestDrake.java index b9a7cf4089..3277496660 100644 --- a/Mage.Sets/src/mage/cards/t/TempestDrake.java +++ b/Mage.Sets/src/mage/cards/t/TempestDrake.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class TempestDrake extends CardImpl { public TempestDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TempestOwl.java b/Mage.Sets/src/mage/cards/t/TempestOwl.java index 383b806a83..38ac51594b 100644 --- a/Mage.Sets/src/mage/cards/t/TempestOwl.java +++ b/Mage.Sets/src/mage/cards/t/TempestOwl.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.target.TargetPermanent; @@ -49,7 +50,7 @@ public class TempestOwl extends CardImpl { public TempestOwl(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TempleAcolyte.java b/Mage.Sets/src/mage/cards/t/TempleAcolyte.java index bf63f75baf..610e3de630 100644 --- a/Mage.Sets/src/mage/cards/t/TempleAcolyte.java +++ b/Mage.Sets/src/mage/cards/t/TempleAcolyte.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class TempleAcolyte extends CardImpl { public TempleAcolyte (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TempleElder.java b/Mage.Sets/src/mage/cards/t/TempleElder.java index 3993f6bab3..008150fcdf 100644 --- a/Mage.Sets/src/mage/cards/t/TempleElder.java +++ b/Mage.Sets/src/mage/cards/t/TempleElder.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class TempleElder extends CardImpl { public TempleElder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TempleGarden.java b/Mage.Sets/src/mage/cards/t/TempleGarden.java index 6f49300cc9..b7fc019c30 100644 --- a/Mage.Sets/src/mage/cards/t/TempleGarden.java +++ b/Mage.Sets/src/mage/cards/t/TempleGarden.java @@ -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.cards.t; import java.util.UUID; @@ -37,6 +36,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,16 +44,17 @@ import mage.constants.CardType; */ public class TempleGarden extends CardImpl { - public TempleGarden (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - this.subtype.add("Forest"); - this.subtype.add("Plains"); + public TempleGarden(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); + this.subtype.add(SubType.FOREST); + this.subtype.add(SubType.PLAINS); + + this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); this.addAbility(new GreenManaAbility()); this.addAbility(new WhiteManaAbility()); - this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); } - public TempleGarden (final TempleGarden card) { + public TempleGarden(final TempleGarden card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/t/TempleOfAclazotz.java b/Mage.Sets/src/mage/cards/t/TempleOfAclazotz.java new file mode 100644 index 0000000000..456e62b94c --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TempleOfAclazotz.java @@ -0,0 +1,112 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.mana.BlackManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class TempleOfAclazotz extends CardImpl { + + public TempleOfAclazotz(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + addSuperType(SuperType.LEGENDARY); + this.nightCard = true; + + // {T}: Add {B} to your mana pool + this.addAbility(new BlackManaAbility()); + + // {T}, Sacrifice a creature: You gain life equal to the sacrificed creature’s toughness. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TempleOfAclazotzEffect(), new TapSourceCost()); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature"), true))); + this.addAbility(ability); + } + + public TempleOfAclazotz(final TempleOfAclazotz card) { + super(card); + } + + @Override + public TempleOfAclazotz copy() { + return new TempleOfAclazotz(this); + } +} + +class TempleOfAclazotzEffect extends OneShotEffect { + + public TempleOfAclazotzEffect() { + super(Outcome.GainLife); + this.staticText = "You gain life equal to the sacrificed creature's toughness"; + } + + public TempleOfAclazotzEffect(final TempleOfAclazotzEffect effect) { + super(effect); + } + + @Override + public TempleOfAclazotzEffect copy() { + return new TempleOfAclazotzEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (Cost cost : source.getCosts()) { + if (cost instanceof SacrificeTargetCost) { + int amount = ((SacrificeTargetCost) cost).getPermanents().get(0).getToughness().getValue(); + if (amount > 0) { + controller.gainLife(amount, game); + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/t/TemporalAdept.java b/Mage.Sets/src/mage/cards/t/TemporalAdept.java index f1b730bd1b..61aa1c1b94 100644 --- a/Mage.Sets/src/mage/cards/t/TemporalAdept.java +++ b/Mage.Sets/src/mage/cards/t/TemporalAdept.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -48,8 +49,8 @@ public class TemporalAdept extends CardImpl { public TemporalAdept(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TemporalAperture.java b/Mage.Sets/src/mage/cards/t/TemporalAperture.java index c2fac9203a..c546181720 100644 --- a/Mage.Sets/src/mage/cards/t/TemporalAperture.java +++ b/Mage.Sets/src/mage/cards/t/TemporalAperture.java @@ -1,158 +1,158 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.AsThoughEffectImpl; -import mage.abilities.effects.ContinuousEffect; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; -import mage.constants.AsThoughEffectType; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.Game; -import mage.players.Player; - -/** - * - * @author jeffwadsworth - */ -public class TemporalAperture extends CardImpl { - - public TemporalAperture(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); - - // {5}, {tap}: Shuffle your library, then reveal the top card. Until end of turn, for as long as that card remains on top of your library, play with the top card of your library revealed and you may play that card without paying its mana cost. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TemporalApertureEffect(), new ManaCostsImpl("{5}")); - ability.addCost(new TapSourceCost()); - this.addAbility(ability); - - } - - public TemporalAperture(final TemporalAperture card) { - super(card); - } - - @Override - public TemporalAperture copy() { - return new TemporalAperture(this); - } -} - -class TemporalApertureEffect extends OneShotEffect { - - public TemporalApertureEffect() { - super(Outcome.Neutral); - staticText = "Shuffle your library, then reveal the top card. Until end of turn, for as long as that card remains on top of your library, play with the top card of your library revealed and you may play that card without paying its mana cost"; - } - - public TemporalApertureEffect(final TemporalApertureEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - controller.shuffleLibrary(source, game); - Card topCard = controller.getLibrary().getFromTop(game); - Cards cards = new CardsImpl(); - if (topCard != null) { - cards.add(topCard); - controller.revealCards("Top card of " + controller.getName() + "'s library revealed", cards, game); - ContinuousEffect effect = new TemporalApertureTopCardCastEffect(topCard); - game.addEffect(effect, source); - return true; - } - } - return false; - } - - @Override - public TemporalApertureEffect copy() { - return new TemporalApertureEffect(this); - } -} - -class TemporalApertureTopCardCastEffect extends AsThoughEffectImpl { - - private final Card card; - - public TemporalApertureTopCardCastEffect(Card card) { - super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit); - this.card = card; - staticText = "Until end of turn, for as long as that card is on top of your library, you may cast it without paying its mana costs"; - } - - public TemporalApertureTopCardCastEffect(final TemporalApertureTopCardCastEffect effect) { - super(effect); - this.card = effect.card; - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } - - @Override - public TemporalApertureTopCardCastEffect copy() { - return new TemporalApertureTopCardCastEffect(this); - } - - @Override - public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { - if (affectedControllerId.equals(source.getControllerId())) { - Card objectCard = game.getCard(objectId); - if (objectCard != null) { - Player controller = game.getPlayer(affectedControllerId); - if (controller != null - && game.getState().getZone(objectId) == Zone.LIBRARY) { - if (controller.getLibrary().getFromTop(game).equals(card)) { - if (objectCard == card - && objectCard.getSpellAbility() != null - && objectCard.getSpellAbility().spellCanBeActivatedRegularlyNow(controller.getId(), game)) { - controller.setCastSourceIdWithAlternateMana(objectId, null, null); - return true; - } - } - } - } - } - return false; - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.AsThoughEffectType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author jeffwadsworth + */ +public class TemporalAperture extends CardImpl { + + public TemporalAperture(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + // {5}, {tap}: Shuffle your library, then reveal the top card. Until end of turn, for as long as that card remains on top of your library, play with the top card of your library revealed and you may play that card without paying its mana cost. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TemporalApertureEffect(), new ManaCostsImpl("{5}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + } + + public TemporalAperture(final TemporalAperture card) { + super(card); + } + + @Override + public TemporalAperture copy() { + return new TemporalAperture(this); + } +} + +class TemporalApertureEffect extends OneShotEffect { + + public TemporalApertureEffect() { + super(Outcome.Neutral); + staticText = "Shuffle your library, then reveal the top card. Until end of turn, for as long as that card remains on top of your library, play with the top card of your library revealed and you may play that card without paying its mana cost"; + } + + public TemporalApertureEffect(final TemporalApertureEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + controller.shuffleLibrary(source, game); + Card topCard = controller.getLibrary().getFromTop(game); + Cards cards = new CardsImpl(); + if (topCard != null) { + cards.add(topCard); + controller.revealCards("Top card of " + controller.getName() + "'s library revealed", cards, game); + ContinuousEffect effect = new TemporalApertureTopCardCastEffect(topCard); + game.addEffect(effect, source); + return true; + } + } + return false; + } + + @Override + public TemporalApertureEffect copy() { + return new TemporalApertureEffect(this); + } +} + +class TemporalApertureTopCardCastEffect extends AsThoughEffectImpl { + + private final Card card; + + public TemporalApertureTopCardCastEffect(Card card) { + super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit); + this.card = card; + staticText = "Until end of turn, for as long as that card is on top of your library, you may cast it without paying its mana costs"; + } + + public TemporalApertureTopCardCastEffect(final TemporalApertureTopCardCastEffect effect) { + super(effect); + this.card = effect.card; + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public TemporalApertureTopCardCastEffect copy() { + return new TemporalApertureTopCardCastEffect(this); + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + if (affectedControllerId.equals(source.getControllerId())) { + Card objectCard = game.getCard(objectId); + if (objectCard != null) { + Player controller = game.getPlayer(affectedControllerId); + if (controller != null + && game.getState().getZone(objectId) == Zone.LIBRARY) { + if (controller.getLibrary().getFromTop(game).equals(card)) { + if (objectCard == card + && objectCard.getSpellAbility() != null + && objectCard.getSpellAbility().spellCanBeActivatedRegularlyNow(controller.getId(), game)) { + controller.setCastSourceIdWithAlternateMana(objectId, null, null); + return true; + } + } + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/t/TemporalDistortion.java b/Mage.Sets/src/mage/cards/t/TemporalDistortion.java index d7d0495ae4..302059905e 100644 --- a/Mage.Sets/src/mage/cards/t/TemporalDistortion.java +++ b/Mage.Sets/src/mage/cards/t/TemporalDistortion.java @@ -57,7 +57,7 @@ import mage.game.permanent.Permanent; */ public class TemporalDistortion extends CardImpl { - private static final FilterPermanent filter = new FilterPermanent("creature or land"); + private static final FilterPermanent filter = new FilterPermanent("a creature or land"); private static final FilterPermanent filter2 = new FilterPermanent("permanents with hourglass counters on them"); static { @@ -66,7 +66,7 @@ public class TemporalDistortion extends CardImpl { } public TemporalDistortion(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}{U}"); // Whenever a creature or land becomes tapped, put an hourglass counter on it. Effect effect = new AddCountersTargetEffect(CounterType.HOURGLASS.createInstance()); diff --git a/Mage.Sets/src/mage/cards/t/TemporalIsolation.java b/Mage.Sets/src/mage/cards/t/TemporalIsolation.java index 33360e3603..e48706316d 100644 --- a/Mage.Sets/src/mage/cards/t/TemporalIsolation.java +++ b/Mage.Sets/src/mage/cards/t/TemporalIsolation.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class TemporalIsolation extends CardImpl { public TemporalIsolation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/t/TemporaryInsanity.java b/Mage.Sets/src/mage/cards/t/TemporaryInsanity.java index 000ea57ee5..a81490af79 100644 --- a/Mage.Sets/src/mage/cards/t/TemporaryInsanity.java +++ b/Mage.Sets/src/mage/cards/t/TemporaryInsanity.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.Effect; @@ -43,6 +42,8 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author FenrisulfrX @@ -58,12 +59,12 @@ public class TemporaryInsanity extends CardImpl { // and gain control of it until end of turn. Effect effect = new GainControlTargetEffect(Duration.EndOfTurn); - effect.setText("and gain control of it until end of the turn. "); + effect.setText("and gain control of it until end of turn. "); this.getSpellAbility().addEffect(effect); // That creature gains haste until end of turn. effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn); - effect.setText("That creature gains haste until end of the turn."); + effect.setText("That creature gains haste until end of turn."); this.getSpellAbility().addEffect(effect); } diff --git a/Mage.Sets/src/mage/cards/t/TemptWithReflections.java b/Mage.Sets/src/mage/cards/t/TemptWithReflections.java index ad80e9bc86..0c75bfe781 100644 --- a/Mage.Sets/src/mage/cards/t/TemptWithReflections.java +++ b/Mage.Sets/src/mage/cards/t/TemptWithReflections.java @@ -33,7 +33,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -88,7 +88,7 @@ class TemptWithReflectionsEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanentOrLKIBattlefield(this.getTargetPointer().getFirst(game, source)); if (permanent != null) { - Effect effect = new PutTokenOntoBattlefieldCopyTargetEffect(); + Effect effect = new CreateTokenCopyTargetEffect(); effect.setTargetPointer(getTargetPointer()); effect.apply(game, source); @@ -111,13 +111,13 @@ class TemptWithReflectionsEffect extends OneShotEffect { } while (!player.getId().equals(game.getActivePlayerId())); for (UUID playerId : playersSaidYes) { - effect = new PutTokenOntoBattlefieldCopyTargetEffect(playerId); + effect = new CreateTokenCopyTargetEffect(playerId); effect.setTargetPointer(getTargetPointer()); effect.apply(game, source); } if (!playersSaidYes.isEmpty()) { - effect = new PutTokenOntoBattlefieldCopyTargetEffect(); + effect = new CreateTokenCopyTargetEffect(); effect.setTargetPointer(getTargetPointer()); effect.apply(game, source); } diff --git a/Mage.Sets/src/mage/cards/t/TemptingLicid.java b/Mage.Sets/src/mage/cards/t/TemptingLicid.java index 9f8325c10d..06e9d08e6b 100644 --- a/Mage.Sets/src/mage/cards/t/TemptingLicid.java +++ b/Mage.Sets/src/mage/cards/t/TemptingLicid.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class TemptingLicid extends CardImpl { public TemptingLicid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Licid"); + this.subtype.add(SubType.LICID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TemptingWurm.java b/Mage.Sets/src/mage/cards/t/TemptingWurm.java index 483074ce70..73f608db7b 100644 --- a/Mage.Sets/src/mage/cards/t/TemptingWurm.java +++ b/Mage.Sets/src/mage/cards/t/TemptingWurm.java @@ -39,6 +39,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -57,7 +58,7 @@ public class TemptingWurm extends CardImpl { public TemptingWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TemurCharger.java b/Mage.Sets/src/mage/cards/t/TemurCharger.java index a09f437d1f..900ca99a55 100644 --- a/Mage.Sets/src/mage/cards/t/TemurCharger.java +++ b/Mage.Sets/src/mage/cards/t/TemurCharger.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ColorPredicate; @@ -59,7 +60,7 @@ public class TemurCharger extends CardImpl { public TemurCharger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Horse"); + this.subtype.add(SubType.HORSE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TemurRunemark.java b/Mage.Sets/src/mage/cards/t/TemurRunemark.java index c327f6353b..4568f1c1b9 100644 --- a/Mage.Sets/src/mage/cards/t/TemurRunemark.java +++ b/Mage.Sets/src/mage/cards/t/TemurRunemark.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -65,7 +66,7 @@ public class TemurRunemark extends CardImpl { public TemurRunemark(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/t/TemurSabertooth.java b/Mage.Sets/src/mage/cards/t/TemurSabertooth.java index fe8496d0e6..221984bdc2 100644 --- a/Mage.Sets/src/mage/cards/t/TemurSabertooth.java +++ b/Mage.Sets/src/mage/cards/t/TemurSabertooth.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class TemurSabertooth extends CardImpl { public TemurSabertooth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TemurWarShaman.java b/Mage.Sets/src/mage/cards/t/TemurWarShaman.java index 557552eb31..ca847b372c 100644 --- a/Mage.Sets/src/mage/cards/t/TemurWarShaman.java +++ b/Mage.Sets/src/mage/cards/t/TemurWarShaman.java @@ -37,6 +37,7 @@ import mage.abilities.effects.keyword.ManifestEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.filter.common.FilterControlledCreaturePermanent; @@ -60,8 +61,8 @@ public class TemurWarShaman extends CardImpl { public TemurWarShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TenaciousDead.java b/Mage.Sets/src/mage/cards/t/TenaciousDead.java index 917b3070ed..deaaa1a966 100644 --- a/Mage.Sets/src/mage/cards/t/TenaciousDead.java +++ b/Mage.Sets/src/mage/cards/t/TenaciousDead.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlSourceE import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class TenaciousDead extends CardImpl { public TenaciousDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Skeleton"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.SKELETON); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TenaciousHunter.java b/Mage.Sets/src/mage/cards/t/TenaciousHunter.java index 7d29ebf809..e12d9e982e 100644 --- a/Mage.Sets/src/mage/cards/t/TenaciousHunter.java +++ b/Mage.Sets/src/mage/cards/t/TenaciousHunter.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.counters.CounterType; @@ -60,7 +61,7 @@ public class TenaciousHunter extends CardImpl { public TenaciousHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); - this.subtype.add("Crocodile"); + this.subtype.add(SubType.CROCODILE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TenebTheHarvester.java b/Mage.Sets/src/mage/cards/t/TenebTheHarvester.java index 72ab5aa8ce..02e7dd3b38 100644 --- a/Mage.Sets/src/mage/cards/t/TenebTheHarvester.java +++ b/Mage.Sets/src/mage/cards/t/TenebTheHarvester.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.common.FilterCreatureCard; import mage.target.Target; @@ -52,7 +53,7 @@ public class TenebTheHarvester extends CardImpl { public TenebTheHarvester(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/t/TenementCrasher.java b/Mage.Sets/src/mage/cards/t/TenementCrasher.java index dd96608fd4..9bbdf1b6e7 100644 --- a/Mage.Sets/src/mage/cards/t/TenementCrasher.java +++ b/Mage.Sets/src/mage/cards/t/TenementCrasher.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class TenementCrasher extends CardImpl { public TenementCrasher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TenzaGodosMaul.java b/Mage.Sets/src/mage/cards/t/TenzaGodosMaul.java index de90f7b0fc..74891f0343 100644 --- a/Mage.Sets/src/mage/cards/t/TenzaGodosMaul.java +++ b/Mage.Sets/src/mage/cards/t/TenzaGodosMaul.java @@ -67,7 +67,7 @@ public class TenzaGodosMaul extends CardImpl { public TenzaGodosMaul(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); diff --git a/Mage.Sets/src/mage/cards/t/Tephraderm.java b/Mage.Sets/src/mage/cards/t/Tephraderm.java index a6080eaa3a..6aa259420d 100644 --- a/Mage.Sets/src/mage/cards/t/Tephraderm.java +++ b/Mage.Sets/src/mage/cards/t/Tephraderm.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.filter.common.FilterCreaturePermanent; @@ -54,7 +55,7 @@ public class Tephraderm extends CardImpl { public Tephraderm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TerashisVerdict.java b/Mage.Sets/src/mage/cards/t/TerashisVerdict.java index 033200abbd..0ab6dc4ab0 100644 --- a/Mage.Sets/src/mage/cards/t/TerashisVerdict.java +++ b/Mage.Sets/src/mage/cards/t/TerashisVerdict.java @@ -32,6 +32,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.common.FilterAttackingCreature; import mage.filter.predicate.mageobject.PowerPredicate; @@ -51,7 +52,7 @@ public class TerashisVerdict extends CardImpl { public TerashisVerdict(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Destroy target attacking creature with power 3 or less. this.getSpellAbility().addEffect(new DestroyTargetEffect()); diff --git a/Mage.Sets/src/mage/cards/t/Terastodon.java b/Mage.Sets/src/mage/cards/t/Terastodon.java index 5dc9734eed..c794d40054 100644 --- a/Mage.Sets/src/mage/cards/t/Terastodon.java +++ b/Mage.Sets/src/mage/cards/t/Terastodon.java @@ -34,6 +34,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -63,7 +64,7 @@ public class Terastodon extends CardImpl { public Terastodon(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{G}{G}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(9); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/t/TerentatekCub.java b/Mage.Sets/src/mage/cards/t/TerentatekCub.java index f582f06dbb..0676091a2d 100644 --- a/Mage.Sets/src/mage/cards/t/TerentatekCub.java +++ b/Mage.Sets/src/mage/cards/t/TerentatekCub.java @@ -1,86 +1,86 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.condition.common.OpponentControlsPermanentCondition; -import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.effects.common.combat.AttacksIfAbleSourceEffect; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.SubtypePredicate; - -/** - * - * @author Styxo - */ -public class TerentatekCub extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Hunter or Rogue card"); - - static { - filter.add(Predicates.or(new SubtypePredicate(SubType.JEDI), new SubtypePredicate(SubType.SITH))); - } - - public TerentatekCub(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Beast"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // As long as an opponent controls a Jedi or Sith, {this} gets +1/+1 and attacks each turn if able - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( - new BoostSourceEffect(1, 1, Duration.Custom), - new OpponentControlsPermanentCondition(filter), - "As long as an opponent controls a Jedi or Sith, {this} gets +1/+1 ") - )); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( - new AttacksIfAbleSourceEffect(Duration.Custom), - new OpponentControlsPermanentCondition(filter), - "and attacks each turn if able.") - )); - } - - public TerentatekCub(final TerentatekCub card) { - super(card); - } - - @Override - public TerentatekCub copy() { - return new TerentatekCub(this); - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.OpponentControlsPermanentCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.combat.AttacksIfAbleSourceEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author Styxo + */ +public class TerentatekCub extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Hunter or Rogue card"); + + static { + filter.add(Predicates.or(new SubtypePredicate(SubType.JEDI), new SubtypePredicate(SubType.SITH))); + } + + public TerentatekCub(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.subtype.add(SubType.BEAST); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // As long as an opponent controls a Jedi or Sith, {this} gets +1/+1 and attacks each turn if able + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostSourceEffect(1, 1, Duration.Custom), + new OpponentControlsPermanentCondition(filter), + "As long as an opponent controls a Jedi or Sith, {this} gets +1/+1 ") + )); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new AttacksIfAbleSourceEffect(Duration.Custom), + new OpponentControlsPermanentCondition(filter), + "and attacks each turn if able.") + )); + } + + public TerentatekCub(final TerentatekCub card) { + super(card); + } + + @Override + public TerentatekCub copy() { + return new TerentatekCub(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TerohsFaithful.java b/Mage.Sets/src/mage/cards/t/TerohsFaithful.java index 4c4b72ec26..447ff860ff 100644 --- a/Mage.Sets/src/mage/cards/t/TerohsFaithful.java +++ b/Mage.Sets/src/mage/cards/t/TerohsFaithful.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class TerohsFaithful extends CardImpl { public TerohsFaithful(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TerohsVanguard.java b/Mage.Sets/src/mage/cards/t/TerohsVanguard.java index cbe9367b02..6b2acca1ec 100644 --- a/Mage.Sets/src/mage/cards/t/TerohsVanguard.java +++ b/Mage.Sets/src/mage/cards/t/TerohsVanguard.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -55,8 +56,8 @@ public class TerohsVanguard extends CardImpl { public TerohsVanguard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TerraRavager.java b/Mage.Sets/src/mage/cards/t/TerraRavager.java index 9db07e2c47..29785c5c9f 100644 --- a/Mage.Sets/src/mage/cards/t/TerraRavager.java +++ b/Mage.Sets/src/mage/cards/t/TerraRavager.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterLandPermanent; import mage.game.Game; @@ -52,8 +53,8 @@ public class TerraRavager extends CardImpl { public TerraRavager(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Beast"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.BEAST); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TerraStomper.java b/Mage.Sets/src/mage/cards/t/TerraStomper.java index e829002b73..6de4e4631e 100644 --- a/Mage.Sets/src/mage/cards/t/TerraStomper.java +++ b/Mage.Sets/src/mage/cards/t/TerraStomper.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class TerraStomper extends CardImpl { public TerraStomper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/t/Terraformer.java b/Mage.Sets/src/mage/cards/t/Terraformer.java index 830fcdd046..67b7d312ff 100644 --- a/Mage.Sets/src/mage/cards/t/Terraformer.java +++ b/Mage.Sets/src/mage/cards/t/Terraformer.java @@ -46,6 +46,7 @@ import mage.cards.CardSetInfo; import mage.choices.Choice; import mage.choices.ChoiceBasicLandType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -65,8 +66,8 @@ public class Terraformer extends CardImpl { public Terraformer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -144,7 +145,7 @@ class TerraformerContinuousEffect extends ContinuousEffectImpl { @Override public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { - String choice = (String) game.getState().getValue(source.getSourceId().toString() + "_Terraformer"); + SubType choice = SubType.byDescription((String) game.getState().getValue(source.getSourceId().toString() + "_Terraformer")); if (choice != null) { for (Iterator it = affectedObjectList.iterator(); it.hasNext();) { Permanent land = it.next().getPermanent(game); @@ -159,20 +160,20 @@ class TerraformerContinuousEffect extends ContinuousEffectImpl { case AbilityAddingRemovingEffects_6: if (sublayer == SubLayer.NA) { land.getAbilities().clear(); - if (choice.equals("Forest")) { - land.addAbility(new GreenManaAbility(), id, game); + if (choice.equals(SubType.FOREST)) { + land.addAbility(new GreenManaAbility(), source.getSourceId(), game); } - if (choice.equals("Plains")) { - land.addAbility(new WhiteManaAbility(), id, game); + if (choice.equals(SubType.PLAINS)) { + land.addAbility(new WhiteManaAbility(), source.getSourceId(), game); } - if (choice.equals("Mountain")) { - land.addAbility(new RedManaAbility(), id, game); + if (choice.equals(SubType.MOUNTAIN)) { + land.addAbility(new RedManaAbility(), source.getSourceId(), game); } - if (choice.equals("Island")) { - land.addAbility(new BlueManaAbility(), id, game); + if (choice.equals(SubType.ISLAND)) { + land.addAbility(new BlueManaAbility(), source.getSourceId(), game); } - if (choice.equals("Swamp")) { - land.addAbility(new BlackManaAbility(), id, game); + if (choice.equals(SubType.SWAMP)) { + land.addAbility(new BlackManaAbility(), source.getSourceId(), game); } } break; diff --git a/Mage.Sets/src/mage/cards/t/TerrainElemental.java b/Mage.Sets/src/mage/cards/t/TerrainElemental.java index 484e45c678..7d58ad2020 100644 --- a/Mage.Sets/src/mage/cards/t/TerrainElemental.java +++ b/Mage.Sets/src/mage/cards/t/TerrainElemental.java @@ -1,57 +1,58 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.MageInt; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author LevelX2 - */ -public class TerrainElemental extends CardImpl { - - public TerrainElemental(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elemental"); - this.power = new MageInt(3); - this.toughness = new MageInt(2); - } - - public TerrainElemental(final TerrainElemental card) { - super(card); - } - - @Override - public TerrainElemental copy() { - return new TerrainElemental(this); - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author LevelX2 + */ +public class TerrainElemental extends CardImpl { + + public TerrainElemental(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); + this.subtype.add(SubType.ELEMENTAL); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + } + + public TerrainElemental(final TerrainElemental card) { + super(card); + } + + @Override + public TerrainElemental copy() { + return new TerrainElemental(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TerramorphicExpanse.java b/Mage.Sets/src/mage/cards/t/TerramorphicExpanse.java index 1038660daf..5a4239c092 100644 --- a/Mage.Sets/src/mage/cards/t/TerramorphicExpanse.java +++ b/Mage.Sets/src/mage/cards/t/TerramorphicExpanse.java @@ -25,22 +25,21 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.t; -import mage.abilities.ActivatedAbilityImpl; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; /** * @@ -49,8 +48,14 @@ import java.util.UUID; public class TerramorphicExpanse extends CardImpl { public TerramorphicExpanse(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - this.addAbility(new TerramorphicExpanseAbility()); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); + + Ability ability = new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true), + new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); } public TerramorphicExpanse(final TerramorphicExpanse card) { @@ -63,24 +68,3 @@ public class TerramorphicExpanse extends CardImpl { } } - -class TerramorphicExpanseAbility extends ActivatedAbilityImpl { - - public TerramorphicExpanseAbility() { - super(Zone.BATTLEFIELD, null); - addCost(new TapSourceCost()); - addCost(new SacrificeSourceCost()); - TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD); - addEffect(new SearchLibraryPutInPlayEffect(target, true, Outcome.PutLandInPlay)); - } - - public TerramorphicExpanseAbility(final TerramorphicExpanseAbility ability) { - super(ability); - } - - @Override - public TerramorphicExpanseAbility copy() { - return new TerramorphicExpanseAbility(this); - } - -} diff --git a/Mage.Sets/src/mage/cards/t/Terravore.java b/Mage.Sets/src/mage/cards/t/Terravore.java index 0fa226e5f6..3c24ef54b2 100644 --- a/Mage.Sets/src/mage/cards/t/Terravore.java +++ b/Mage.Sets/src/mage/cards/t/Terravore.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterLandCard; @@ -48,7 +49,7 @@ public class Terravore extends CardImpl { public Terravore(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Lhurgoyf"); + this.subtype.add(SubType.LHURGOYF); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/t/TerritorialBaloth.java b/Mage.Sets/src/mage/cards/t/TerritorialBaloth.java index 2ec0ddf62b..340ba1bb5c 100644 --- a/Mage.Sets/src/mage/cards/t/TerritorialBaloth.java +++ b/Mage.Sets/src/mage/cards/t/TerritorialBaloth.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class TerritorialBaloth extends CardImpl { public TerritorialBaloth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TerritorialGorger.java b/Mage.Sets/src/mage/cards/t/TerritorialGorger.java index 7e9674daf4..d5067d576e 100644 --- a/Mage.Sets/src/mage/cards/t/TerritorialGorger.java +++ b/Mage.Sets/src/mage/cards/t/TerritorialGorger.java @@ -1,105 +1,106 @@ -/* - * 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.cards.t; - -import java.util.Objects; -import java.util.UUID; -import mage.MageInt; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.abilities.keyword.TrampleAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.counters.CounterType; -import mage.game.Game; -import mage.game.events.GameEvent; - -/** - * - * @author LevelX2 - */ -public class TerritorialGorger extends CardImpl { - - public TerritorialGorger(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Gremlin"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // Trample - this.addAbility(TrampleAbility.getInstance()); - // Whenever you get one or more {E}, Territorial Gorger gets +2/+2 until end of turn. - this.addAbility(new TerritorialGorgerTriggeredAbility()); - } - - public TerritorialGorger(final TerritorialGorger card) { - super(card); - } - - @Override - public TerritorialGorger copy() { - return new TerritorialGorger(this); - } -} - -class TerritorialGorgerTriggeredAbility extends TriggeredAbilityImpl { - - TerritorialGorgerTriggeredAbility() { - super(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), false); - } - - TerritorialGorgerTriggeredAbility(final TerritorialGorgerTriggeredAbility ability) { - super(ability); - } - - @Override - public TerritorialGorgerTriggeredAbility copy() { - return new TerritorialGorgerTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.COUNTERS_ADDED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - if (event.getData().equals(CounterType.ENERGY.getName())) { - return Objects.equals(event.getTargetId(), this.getControllerId()); - } - return false; - } - - @Override - public String getRule() { - return "Whenever you get one or more {E} (energy counters), " + super.getRule(); - } -} +/* + * 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.cards.t; + +import java.util.Objects; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author LevelX2 + */ +public class TerritorialGorger extends CardImpl { + + public TerritorialGorger(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); + this.subtype.add(SubType.GREMLIN); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + // Whenever you get one or more {E}, Territorial Gorger gets +2/+2 until end of turn. + this.addAbility(new TerritorialGorgerTriggeredAbility()); + } + + public TerritorialGorger(final TerritorialGorger card) { + super(card); + } + + @Override + public TerritorialGorger copy() { + return new TerritorialGorger(this); + } +} + +class TerritorialGorgerTriggeredAbility extends TriggeredAbilityImpl { + + TerritorialGorgerTriggeredAbility() { + super(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), false); + } + + TerritorialGorgerTriggeredAbility(final TerritorialGorgerTriggeredAbility ability) { + super(ability); + } + + @Override + public TerritorialGorgerTriggeredAbility copy() { + return new TerritorialGorgerTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.COUNTERS_ADDED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getData().equals(CounterType.ENERGY.getName())) { + return Objects.equals(event.getTargetId(), this.getControllerId()); + } + return false; + } + + @Override + public String getRule() { + return "Whenever you get one or more {E} (energy counters), " + super.getRule(); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TerritorialHammerskull.java b/Mage.Sets/src/mage/cards/t/TerritorialHammerskull.java new file mode 100644 index 0000000000..41c29ee8fa --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TerritorialHammerskull.java @@ -0,0 +1,77 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.TapTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class TerritorialHammerskull extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public TerritorialHammerskull(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Whenever Territorial Hammerskull attacks, tap target creature an opponent controls. + Ability ability = new AttacksTriggeredAbility(new TapTargetEffect(), false); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public TerritorialHammerskull(final TerritorialHammerskull card) { + super(card); + } + + @Override + public TerritorialHammerskull copy() { + return new TerritorialHammerskull(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TerritorialRoc.java b/Mage.Sets/src/mage/cards/t/TerritorialRoc.java index 926df9fe19..620c2914e2 100644 --- a/Mage.Sets/src/mage/cards/t/TerritorialRoc.java +++ b/Mage.Sets/src/mage/cards/t/TerritorialRoc.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class TerritorialRoc extends CardImpl { public TerritorialRoc(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TerrorOfKruinPass.java b/Mage.Sets/src/mage/cards/t/TerrorOfKruinPass.java index 5f60e62a49..3c2189926e 100644 --- a/Mage.Sets/src/mage/cards/t/TerrorOfKruinPass.java +++ b/Mage.Sets/src/mage/cards/t/TerrorOfKruinPass.java @@ -64,7 +64,7 @@ public class TerrorOfKruinPass extends CardImpl { public TerrorOfKruinPass(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); // this card is the second face of double-faced card this.nightCard = true; diff --git a/Mage.Sets/src/mage/cards/t/TerrorOfTheFairgrounds.java b/Mage.Sets/src/mage/cards/t/TerrorOfTheFairgrounds.java index e49a8da393..83df5c4024 100644 --- a/Mage.Sets/src/mage/cards/t/TerrorOfTheFairgrounds.java +++ b/Mage.Sets/src/mage/cards/t/TerrorOfTheFairgrounds.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class TerrorOfTheFairgrounds extends CardImpl { public TerrorOfTheFairgrounds(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Gremlin"); + this.subtype.add(SubType.GREMLIN); this.power = new MageInt(5); this.toughness = new MageInt(2); } diff --git a/Mage.Sets/src/mage/cards/t/TerrusWurm.java b/Mage.Sets/src/mage/cards/t/TerrusWurm.java index e2d2fd9290..6fe5ea9ff1 100644 --- a/Mage.Sets/src/mage/cards/t/TerrusWurm.java +++ b/Mage.Sets/src/mage/cards/t/TerrusWurm.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ScavengeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class TerrusWurm extends CardImpl { public TerrusWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WURM); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TestamentOfFaith.java b/Mage.Sets/src/mage/cards/t/TestamentOfFaith.java index 4e864b2520..d464947870 100644 --- a/Mage.Sets/src/mage/cards/t/TestamentOfFaith.java +++ b/Mage.Sets/src/mage/cards/t/TestamentOfFaith.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -178,7 +179,7 @@ class TestamentOfFaithToken extends Token { TestamentOfFaithToken() { super("Wall", "X/X Wall creature with defender"); cardType.add(CardType.CREATURE); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); color.setWhite(true); this.addAbility(DefenderAbility.getInstance()); } diff --git a/Mage.Sets/src/mage/cards/t/TetheredGriffin.java b/Mage.Sets/src/mage/cards/t/TetheredGriffin.java index 2c0fd8555e..83fc16d74e 100644 --- a/Mage.Sets/src/mage/cards/t/TetheredGriffin.java +++ b/Mage.Sets/src/mage/cards/t/TetheredGriffin.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.StaticFilters; @@ -47,7 +48,7 @@ public class TetheredGriffin extends CardImpl { public TetheredGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TetheredSkirge.java b/Mage.Sets/src/mage/cards/t/TetheredSkirge.java index dd60745425..e8f2f12ee4 100644 --- a/Mage.Sets/src/mage/cards/t/TetheredSkirge.java +++ b/Mage.Sets/src/mage/cards/t/TetheredSkirge.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class TetheredSkirge extends CardImpl { public TetheredSkirge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TethmosHighPriest.java b/Mage.Sets/src/mage/cards/t/TethmosHighPriest.java index 104af16090..a45d5c7a2f 100644 --- a/Mage.Sets/src/mage/cards/t/TethmosHighPriest.java +++ b/Mage.Sets/src/mage/cards/t/TethmosHighPriest.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -55,8 +56,8 @@ public class TethmosHighPriest extends CardImpl { public TethmosHighPriest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Cat"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/Tetravus.java b/Mage.Sets/src/mage/cards/t/Tetravus.java index f611eb56c0..db694d32a1 100644 --- a/Mage.Sets/src/mage/cards/t/Tetravus.java +++ b/Mage.Sets/src/mage/cards/t/Tetravus.java @@ -61,7 +61,7 @@ public class Tetravus extends CardImpl { public Tetravus(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TetsuoUmezawa.java b/Mage.Sets/src/mage/cards/t/TetsuoUmezawa.java index beaa20f7b9..067764fbac 100644 --- a/Mage.Sets/src/mage/cards/t/TetsuoUmezawa.java +++ b/Mage.Sets/src/mage/cards/t/TetsuoUmezawa.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -49,6 +48,8 @@ import mage.game.permanent.Permanent; import mage.game.stack.StackObject; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author JRHerlehy @@ -66,8 +67,8 @@ public class TetsuoUmezawa extends CardImpl { public TetsuoUmezawa(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -127,9 +128,9 @@ class TetsuoUmezawaEffect extends ContinuousRuleModifyingEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { - StackObject stackObject = (StackObject) game.getStack().getStackObject(event.getSourceId()); + StackObject stackObject = game.getStack().getStackObject(event.getSourceId()); if (stackObject != null && event.getTargetId().equals(source.getSourceId())) { - if (stackObject.getSubtype(game).contains("Aura")) { + if (stackObject.hasSubtype(SubType.AURA, game)) { return true; } } diff --git a/Mage.Sets/src/mage/cards/t/TeysaEnvoyOfGhosts.java b/Mage.Sets/src/mage/cards/t/TeysaEnvoyOfGhosts.java index 475c825af1..5be5d74ee5 100644 --- a/Mage.Sets/src/mage/cards/t/TeysaEnvoyOfGhosts.java +++ b/Mage.Sets/src/mage/cards/t/TeysaEnvoyOfGhosts.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; @@ -56,8 +57,8 @@ public class TeysaEnvoyOfGhosts extends CardImpl { public TeysaEnvoyOfGhosts(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TeysaOrzhovScion.java b/Mage.Sets/src/mage/cards/t/TeysaOrzhovScion.java index 72267755b4..5dcf136d09 100644 --- a/Mage.Sets/src/mage/cards/t/TeysaOrzhovScion.java +++ b/Mage.Sets/src/mage/cards/t/TeysaOrzhovScion.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.constants.Zone; @@ -69,8 +70,8 @@ public class TeysaOrzhovScion extends CardImpl { public TeysaOrzhovScion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TezzeretAgentOfBolas.java b/Mage.Sets/src/mage/cards/t/TezzeretAgentOfBolas.java index 1045ac54aa..caf6fb786b 100644 --- a/Mage.Sets/src/mage/cards/t/TezzeretAgentOfBolas.java +++ b/Mage.Sets/src/mage/cards/t/TezzeretAgentOfBolas.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SuperType; @@ -67,7 +68,7 @@ public class TezzeretAgentOfBolas extends CardImpl { public TezzeretAgentOfBolas(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{2}{U}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Tezzeret"); + this.subtype.add(SubType.TEZZERET); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/t/TezzeretMasterOfMetal.java b/Mage.Sets/src/mage/cards/t/TezzeretMasterOfMetal.java index 9b84899118..25ec748e6f 100644 --- a/Mage.Sets/src/mage/cards/t/TezzeretMasterOfMetal.java +++ b/Mage.Sets/src/mage/cards/t/TezzeretMasterOfMetal.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.RevealCardsFromLibraryUntilEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -66,7 +67,7 @@ public class TezzeretMasterOfMetal extends CardImpl { public TezzeretMasterOfMetal(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{U}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Tezzeret"); + this.subtype.add(SubType.TEZZERET); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); diff --git a/Mage.Sets/src/mage/cards/t/TezzeretTheSchemer.java b/Mage.Sets/src/mage/cards/t/TezzeretTheSchemer.java index 702ba040e5..9f00da53f1 100644 --- a/Mage.Sets/src/mage/cards/t/TezzeretTheSchemer.java +++ b/Mage.Sets/src/mage/cards/t/TezzeretTheSchemer.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.filter.common.FilterControlledArtifactPermanent; @@ -55,7 +56,7 @@ public class TezzeretTheSchemer extends CardImpl { public TezzeretTheSchemer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{U}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Tezzeret"); + this.subtype.add(SubType.TEZZERET); //Starting Loyalty - 5 this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); diff --git a/Mage.Sets/src/mage/cards/t/TezzeretTheSeeker.java b/Mage.Sets/src/mage/cards/t/TezzeretTheSeeker.java index a900b9519c..189b9ba6d6 100644 --- a/Mage.Sets/src/mage/cards/t/TezzeretTheSeeker.java +++ b/Mage.Sets/src/mage/cards/t/TezzeretTheSeeker.java @@ -59,7 +59,7 @@ public class TezzeretTheSeeker extends CardImpl { public TezzeretTheSeeker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{U}{U}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Tezzeret"); + this.subtype.add(SubType.TEZZERET); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); diff --git a/Mage.Sets/src/mage/cards/t/TezzeretsSimulacrum.java b/Mage.Sets/src/mage/cards/t/TezzeretsSimulacrum.java index dd373e99a3..46e0e464da 100644 --- a/Mage.Sets/src/mage/cards/t/TezzeretsSimulacrum.java +++ b/Mage.Sets/src/mage/cards/t/TezzeretsSimulacrum.java @@ -53,7 +53,7 @@ public class TezzeretsSimulacrum extends CardImpl { public TezzeretsSimulacrum(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TezzeretsTouch.java b/Mage.Sets/src/mage/cards/t/TezzeretsTouch.java index fafebd628c..036a72bcc8 100644 --- a/Mage.Sets/src/mage/cards/t/TezzeretsTouch.java +++ b/Mage.Sets/src/mage/cards/t/TezzeretsTouch.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class TezzeretsTouch extends CardImpl { public TezzeretsTouch(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant artifact TargetPermanent auraTarget = new TargetArtifactPermanent(); diff --git a/Mage.Sets/src/mage/cards/t/ThadaAdelAcquisitor.java b/Mage.Sets/src/mage/cards/t/ThadaAdelAcquisitor.java index b270ea747e..a81fdae044 100644 --- a/Mage.Sets/src/mage/cards/t/ThadaAdelAcquisitor.java +++ b/Mage.Sets/src/mage/cards/t/ThadaAdelAcquisitor.java @@ -55,8 +55,8 @@ public class ThadaAdelAcquisitor extends CardImpl { public ThadaAdelAcquisitor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThalakosDeceiver.java b/Mage.Sets/src/mage/cards/t/ThalakosDeceiver.java index cd8c99b988..d45ac521d2 100644 --- a/Mage.Sets/src/mage/cards/t/ThalakosDeceiver.java +++ b/Mage.Sets/src/mage/cards/t/ThalakosDeceiver.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class ThalakosDeceiver extends CardImpl { public ThalakosDeceiver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Thalakos"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.THALAKOS); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThalakosDreamsower.java b/Mage.Sets/src/mage/cards/t/ThalakosDreamsower.java index d942620da0..65461e1e70 100644 --- a/Mage.Sets/src/mage/cards/t/ThalakosDreamsower.java +++ b/Mage.Sets/src/mage/cards/t/ThalakosDreamsower.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -48,8 +49,8 @@ public class ThalakosDreamsower extends CardImpl { public ThalakosDreamsower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Thalakos"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.THALAKOS); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThalakosDrifters.java b/Mage.Sets/src/mage/cards/t/ThalakosDrifters.java index eb434d2278..05af3f5e0a 100644 --- a/Mage.Sets/src/mage/cards/t/ThalakosDrifters.java +++ b/Mage.Sets/src/mage/cards/t/ThalakosDrifters.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class ThalakosDrifters extends CardImpl { public ThalakosDrifters(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Thalakos"); + this.subtype.add(SubType.THALAKOS); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/ThalakosMistfolk.java b/Mage.Sets/src/mage/cards/t/ThalakosMistfolk.java index a5fafde001..cadf64212d 100644 --- a/Mage.Sets/src/mage/cards/t/ThalakosMistfolk.java +++ b/Mage.Sets/src/mage/cards/t/ThalakosMistfolk.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class ThalakosMistfolk extends CardImpl { public ThalakosMistfolk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Thalakos"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.THALAKOS); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThalakosScout.java b/Mage.Sets/src/mage/cards/t/ThalakosScout.java index f1f8dbbd85..49c8ec0042 100644 --- a/Mage.Sets/src/mage/cards/t/ThalakosScout.java +++ b/Mage.Sets/src/mage/cards/t/ThalakosScout.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,9 +47,9 @@ public class ThalakosScout extends CardImpl { public ThalakosScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Thalakos"); - this.subtype.add("Soldier"); - this.subtype.add("Scout"); + this.subtype.add(SubType.THALAKOS); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThalakosSeer.java b/Mage.Sets/src/mage/cards/t/ThalakosSeer.java index b4ea300627..04786202ac 100644 --- a/Mage.Sets/src/mage/cards/t/ThalakosSeer.java +++ b/Mage.Sets/src/mage/cards/t/ThalakosSeer.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class ThalakosSeer extends CardImpl { public ThalakosSeer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{U}"); - this.subtype.add("Thalakos"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.THALAKOS); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThalakosSentry.java b/Mage.Sets/src/mage/cards/t/ThalakosSentry.java index 1946eb5f41..b3d910630c 100644 --- a/Mage.Sets/src/mage/cards/t/ThalakosSentry.java +++ b/Mage.Sets/src/mage/cards/t/ThalakosSentry.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class ThalakosSentry extends CardImpl { public ThalakosSentry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Thalakos"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.THALAKOS); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThaliaGuardianOfThraben.java b/Mage.Sets/src/mage/cards/t/ThaliaGuardianOfThraben.java index f28b13d717..bbccb7e81c 100644 --- a/Mage.Sets/src/mage/cards/t/ThaliaGuardianOfThraben.java +++ b/Mage.Sets/src/mage/cards/t/ThaliaGuardianOfThraben.java @@ -51,8 +51,8 @@ public class ThaliaGuardianOfThraben extends CardImpl { public ThaliaGuardianOfThraben(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThaliaHereticCathar.java b/Mage.Sets/src/mage/cards/t/ThaliaHereticCathar.java index 847f42b8ab..492f39008e 100644 --- a/Mage.Sets/src/mage/cards/t/ThaliaHereticCathar.java +++ b/Mage.Sets/src/mage/cards/t/ThaliaHereticCathar.java @@ -50,8 +50,8 @@ public class ThaliaHereticCathar extends CardImpl { public ThaliaHereticCathar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThaliasLancers.java b/Mage.Sets/src/mage/cards/t/ThaliasLancers.java index 53a6c64fee..e46b8123d1 100644 --- a/Mage.Sets/src/mage/cards/t/ThaliasLancers.java +++ b/Mage.Sets/src/mage/cards/t/ThaliasLancers.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.SupertypePredicate; @@ -55,8 +56,8 @@ public class ThaliasLancers extends CardImpl { public ThaliasLancers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/ThaliasLieutenant.java b/Mage.Sets/src/mage/cards/t/ThaliasLieutenant.java index fc12bf64bd..106ffcadc1 100644 --- a/Mage.Sets/src/mage/cards/t/ThaliasLieutenant.java +++ b/Mage.Sets/src/mage/cards/t/ThaliasLieutenant.java @@ -57,8 +57,8 @@ public class ThaliasLieutenant extends CardImpl { public ThaliasLieutenant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/Thallid.java b/Mage.Sets/src/mage/cards/t/Thallid.java index d7f2839537..888207c7e8 100644 --- a/Mage.Sets/src/mage/cards/t/Thallid.java +++ b/Mage.Sets/src/mage/cards/t/Thallid.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; @@ -50,7 +51,7 @@ public class Thallid extends CardImpl { public Thallid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThallidDevourer.java b/Mage.Sets/src/mage/cards/t/ThallidDevourer.java index d18b152e98..e78284a237 100644 --- a/Mage.Sets/src/mage/cards/t/ThallidDevourer.java +++ b/Mage.Sets/src/mage/cards/t/ThallidDevourer.java @@ -58,7 +58,7 @@ public class ThallidDevourer extends CardImpl { public ThallidDevourer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThallidGerminator.java b/Mage.Sets/src/mage/cards/t/ThallidGerminator.java index 8acd0a965b..686b0b0e15 100644 --- a/Mage.Sets/src/mage/cards/t/ThallidGerminator.java +++ b/Mage.Sets/src/mage/cards/t/ThallidGerminator.java @@ -60,7 +60,7 @@ public class ThallidGerminator extends CardImpl { public ThallidGerminator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThallidShellDweller.java b/Mage.Sets/src/mage/cards/t/ThallidShellDweller.java index 74de1f4a92..b82dcdfa77 100644 --- a/Mage.Sets/src/mage/cards/t/ThallidShellDweller.java +++ b/Mage.Sets/src/mage/cards/t/ThallidShellDweller.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; @@ -51,7 +52,7 @@ public class ThallidShellDweller extends CardImpl { public ThallidShellDweller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/ThassaGodOfTheSea.java b/Mage.Sets/src/mage/cards/t/ThassaGodOfTheSea.java index 5c0c5ee6c7..170ee99a96 100644 --- a/Mage.Sets/src/mage/cards/t/ThassaGodOfTheSea.java +++ b/Mage.Sets/src/mage/cards/t/ThassaGodOfTheSea.java @@ -56,7 +56,7 @@ public class ThassaGodOfTheSea extends CardImpl { public ThassaGodOfTheSea(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/ThassasDevourer.java b/Mage.Sets/src/mage/cards/t/ThassasDevourer.java index 901fcd7956..b90980b144 100644 --- a/Mage.Sets/src/mage/cards/t/ThassasDevourer.java +++ b/Mage.Sets/src/mage/cards/t/ThassasDevourer.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; /** @@ -45,7 +46,7 @@ public class ThassasDevourer extends CardImpl { public ThassasDevourer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{4}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/t/ThassasEmissary.java b/Mage.Sets/src/mage/cards/t/ThassasEmissary.java index 9a80f413c7..1a514cec80 100644 --- a/Mage.Sets/src/mage/cards/t/ThassasEmissary.java +++ b/Mage.Sets/src/mage/cards/t/ThassasEmissary.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.BestowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.DamagedEvent; @@ -53,7 +54,7 @@ public class ThassasEmissary extends CardImpl { public ThassasEmissary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{U}"); - this.subtype.add("Crab"); + this.subtype.add(SubType.CRAB); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/ThaumaticCompass.java b/Mage.Sets/src/mage/cards/t/ThaumaticCompass.java new file mode 100644 index 0000000000..e8272c8103 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/ThaumaticCompass.java @@ -0,0 +1,88 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.s.SpiresOfOrazca; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.filter.common.FilterLandPermanent; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author TheElk801 + */ +public class ThaumaticCompass extends CardImpl { + + public ThaumaticCompass(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.transformable = true; + this.secondSideCardClazz = SpiresOfOrazca.class; + + // {3}, {T}: Search your library for a basic land card, reveal it, put it into your hand, then shuffle your library. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true), + new GenericManaCost(3)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + // At the beginning of your end step, if you control seven or more lands, transform Thaumatic Compass. + this.addAbility(new TransformAbility()); + TriggeredAbility ability2 = new BeginningOfEndStepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, false); + this.addAbility(new ConditionalTriggeredAbility( + ability2, + new PermanentsOnTheBattlefieldCondition(new FilterLandPermanent(), ComparisonType.MORE_THAN, 6, true), + "At the beginning of your end step, if you control seven or more lands, transform {this}.")); + } + + public ThaumaticCompass(final ThaumaticCompass card) { + super(card); + } + + @Override + public ThaumaticCompass copy() { + return new ThaumaticCompass(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/Thaumatog.java b/Mage.Sets/src/mage/cards/t/Thaumatog.java index 81eeaaff7d..854330fcc2 100644 --- a/Mage.Sets/src/mage/cards/t/Thaumatog.java +++ b/Mage.Sets/src/mage/cards/t/Thaumatog.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledEnchantmentPermanent; @@ -49,7 +50,7 @@ public class Thaumatog extends CardImpl { public Thaumatog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}"); - this.subtype.add("Atog"); + this.subtype.add(SubType.ATOG); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TheBattleOfEndor.java b/Mage.Sets/src/mage/cards/t/TheBattleOfEndor.java index 2fe6ccc4fe..82cd358d25 100644 --- a/Mage.Sets/src/mage/cards/t/TheBattleOfEndor.java +++ b/Mage.Sets/src/mage/cards/t/TheBattleOfEndor.java @@ -1,114 +1,114 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.dynamicvalue.common.ManacostVariableValue; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.continuous.GainAbilityAllEffect; -import mage.abilities.keyword.HasteAbility; -import mage.abilities.keyword.TrampleAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.counters.CounterType; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.game.permanent.token.EwokToken; -import mage.players.Player; - -/** - * - * @author Styxo - */ -public class TheBattleOfEndor extends CardImpl { - - public TheBattleOfEndor(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{X}{G}{G}{G}"); - - // Create X 1/1 green Ewok creature tokens. - this.getSpellAbility().addEffect(new CreateTokenEffect(new EwokToken(), new ManacostVariableValue())); - - // Put X +1/+1 counters on each creature you control. - this.getSpellAbility().addEffect(new TheBattleOfEndorEffect()); - - // Creatures you control gain trample and haste until end of turn. - Effect effect = new GainAbilityAllEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent()); - effect.setText("Creatures you control gain trample"); - this.getSpellAbility().addEffect(effect); - effect = new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent()); - effect.setText("and haste until end of turn"); - this.getSpellAbility().addEffect(effect); - - } - - public TheBattleOfEndor(final TheBattleOfEndor card) { - super(card); - } - - @Override - public TheBattleOfEndor copy() { - return new TheBattleOfEndor(this); - } -} - -class TheBattleOfEndorEffect extends OneShotEffect { - - TheBattleOfEndorEffect() { - super(Outcome.Benefit); - staticText = "Put X +1/+1 counters on each creature you control"; - } - - TheBattleOfEndorEffect(TheBattleOfEndorEffect effect) { - super(effect); - } - - @Override - public TheBattleOfEndorEffect copy() { - return new TheBattleOfEndorEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterControlledCreaturePermanent(), source.getControllerId(), source.getSourceId(), game)) { - permanent.addCounters(CounterType.P1P1.createInstance(source.getManaCostsToPay().getX()), source, game); - } - return true; - } - return false; - } - -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.EwokToken; +import mage.players.Player; + +/** + * + * @author Styxo + */ +public class TheBattleOfEndor extends CardImpl { + + public TheBattleOfEndor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{X}{G}{G}{G}"); + + // Create X 1/1 green Ewok creature tokens. + this.getSpellAbility().addEffect(new CreateTokenEffect(new EwokToken(), new ManacostVariableValue())); + + // Put X +1/+1 counters on each creature you control. + this.getSpellAbility().addEffect(new TheBattleOfEndorEffect()); + + // Creatures you control gain trample and haste until end of turn. + Effect effect = new GainAbilityAllEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent()); + effect.setText("Creatures you control gain trample"); + this.getSpellAbility().addEffect(effect); + effect = new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent()); + effect.setText("and haste until end of turn"); + this.getSpellAbility().addEffect(effect); + + } + + public TheBattleOfEndor(final TheBattleOfEndor card) { + super(card); + } + + @Override + public TheBattleOfEndor copy() { + return new TheBattleOfEndor(this); + } +} + +class TheBattleOfEndorEffect extends OneShotEffect { + + TheBattleOfEndorEffect() { + super(Outcome.Benefit); + staticText = "Put X +1/+1 counters on each creature you control"; + } + + TheBattleOfEndorEffect(TheBattleOfEndorEffect effect) { + super(effect); + } + + @Override + public TheBattleOfEndorEffect copy() { + return new TheBattleOfEndorEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterControlledCreaturePermanent(), source.getControllerId(), source.getSourceId(), game)) { + permanent.addCounters(CounterType.P1P1.createInstance(source.getManaCostsToPay().getX()), source, game); + } + return true; + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/cards/t/TheBattleOfGeonosis.java b/Mage.Sets/src/mage/cards/t/TheBattleOfGeonosis.java index 80359f7dbc..4203f668cd 100644 --- a/Mage.Sets/src/mage/cards/t/TheBattleOfGeonosis.java +++ b/Mage.Sets/src/mage/cards/t/TheBattleOfGeonosis.java @@ -1,76 +1,76 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.abilities.dynamicvalue.IntPlusDynamicValue; -import mage.abilities.dynamicvalue.common.ManacostVariableValue; -import mage.abilities.dynamicvalue.common.StaticValue; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.DamageAllEffect; -import mage.abilities.effects.common.DamagePlayersEffect; -import mage.abilities.effects.common.continuous.BoostControlledEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.filter.common.FilterOpponentsCreaturePermanent; - -/** - * - * @author Styxo - */ -public class TheBattleOfGeonosis extends CardImpl { - - public TheBattleOfGeonosis(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{R}{R}"); - - // The Battle of Geonosis deals X + 1 damage to each opponent and each creature your opponents control. - Effect effect = new DamagePlayersEffect(Outcome.Damage, new IntPlusDynamicValue(1, new ManacostVariableValue()), TargetController.OPPONENT); - effect.setText("The Battle of Geonosis deals X plus 1 damage to each opponent"); - this.getSpellAbility().addEffect(effect); - effect = new DamageAllEffect(new IntPlusDynamicValue(1, new ManacostVariableValue()), new FilterOpponentsCreaturePermanent()); - effect.setText("and each creature your opponents control"); - this.getSpellAbility().addEffect(effect); - - // Creatures you control get +X/+0 until end of turn. - this.getSpellAbility().addEffect(new BoostControlledEffect(new ManacostVariableValue(), new StaticValue(0), Duration.EndOfTurn)); - - } - - public TheBattleOfGeonosis(final TheBattleOfGeonosis card) { - super(card); - } - - @Override - public TheBattleOfGeonosis copy() { - return new TheBattleOfGeonosis(this); - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.dynamicvalue.IntPlusDynamicValue; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.effects.common.DamagePlayersEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.filter.common.FilterOpponentsCreaturePermanent; + +/** + * + * @author Styxo + */ +public class TheBattleOfGeonosis extends CardImpl { + + public TheBattleOfGeonosis(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{R}{R}"); + + // The Battle of Geonosis deals X + 1 damage to each opponent and each creature your opponents control. + Effect effect = new DamagePlayersEffect(Outcome.Damage, new IntPlusDynamicValue(1, new ManacostVariableValue()), TargetController.OPPONENT); + effect.setText("The Battle of Geonosis deals X plus 1 damage to each opponent"); + this.getSpellAbility().addEffect(effect); + effect = new DamageAllEffect(new IntPlusDynamicValue(1, new ManacostVariableValue()), new FilterOpponentsCreaturePermanent()); + effect.setText("and each creature your opponents control"); + this.getSpellAbility().addEffect(effect); + + // Creatures you control get +X/+0 until end of turn. + this.getSpellAbility().addEffect(new BoostControlledEffect(new ManacostVariableValue(), new StaticValue(0), Duration.EndOfTurn)); + + } + + public TheBattleOfGeonosis(final TheBattleOfGeonosis card) { + super(card); + } + + @Override + public TheBattleOfGeonosis copy() { + return new TheBattleOfGeonosis(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TheBattleOfHoth.java b/Mage.Sets/src/mage/cards/t/TheBattleOfHoth.java index 0173db6686..dccb5ba1ff 100644 --- a/Mage.Sets/src/mage/cards/t/TheBattleOfHoth.java +++ b/Mage.Sets/src/mage/cards/t/TheBattleOfHoth.java @@ -1,59 +1,59 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.abilities.dynamicvalue.common.ManacostVariableValue; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.game.permanent.token.ATATToken; - -/** - * - * @author Styxo - */ -public class TheBattleOfHoth extends CardImpl { - - public TheBattleOfHoth(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{W}{W}{W}"); - - // Create X 5/5 white artifact AT-AT creature tokens wiht "When this creature dies, create two 1/1 white Trooper creature tokens." - this.getSpellAbility().addEffect(new CreateTokenEffect(new ATATToken(), new ManacostVariableValue())); - } - - public TheBattleOfHoth(final TheBattleOfHoth card) { - super(card); - } - - @Override - public TheBattleOfHoth copy() { - return new TheBattleOfHoth(this); - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.permanent.token.ATATToken; + +/** + * + * @author Styxo + */ +public class TheBattleOfHoth extends CardImpl { + + public TheBattleOfHoth(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{W}{W}{W}"); + + // Create X 5/5 white artifact AT-AT creature tokens wiht "When this creature dies, create two 1/1 white Trooper creature tokens." + this.getSpellAbility().addEffect(new CreateTokenEffect(new ATATToken(), new ManacostVariableValue())); + } + + public TheBattleOfHoth(final TheBattleOfHoth card) { + super(card); + } + + @Override + public TheBattleOfHoth copy() { + return new TheBattleOfHoth(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TheBattleOfNaboo.java b/Mage.Sets/src/mage/cards/t/TheBattleOfNaboo.java index ec335f1464..9b08a0b648 100644 --- a/Mage.Sets/src/mage/cards/t/TheBattleOfNaboo.java +++ b/Mage.Sets/src/mage/cards/t/TheBattleOfNaboo.java @@ -1,106 +1,106 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.ReturnToHandTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.game.Game; -import mage.players.Player; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Styxo - */ -public class TheBattleOfNaboo extends CardImpl { - - public TheBattleOfNaboo(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{X}{U}{U}"); - - // Return X target creatures to their owner's hands. Draw twice that many cards. - Effect effect = new ReturnToHandTargetEffect(); - effect.setText("Return X target creatures to their owner's hands"); - this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addEffect(new TheBattleOfNabooEffect()); - - } - - @Override - public void adjustTargets(Ability ability, Game game) { - ability.getTargets().clear(); - ability.addTarget(new TargetCreaturePermanent(ability.getManaCostsToPay().getX())); - } - - public TheBattleOfNaboo(final TheBattleOfNaboo card) { - super(card); - } - - @Override - public TheBattleOfNaboo copy() { - return new TheBattleOfNaboo(this); - } -} - -class TheBattleOfNabooEffect extends OneShotEffect { - - public TheBattleOfNabooEffect() { - super(Outcome.DrawCard); - staticText = "Draw twice that many cards"; - } - - public TheBattleOfNabooEffect(final TheBattleOfNabooEffect effect) { - super(effect); - } - - @Override - public TheBattleOfNabooEffect copy() { - return new TheBattleOfNabooEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { - int x = source.getManaCostsToPay().getX(); - if (x > 0) { - player.drawCards(2 * x, game); - } - return true; - - } - return false; - } - -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Styxo + */ +public class TheBattleOfNaboo extends CardImpl { + + public TheBattleOfNaboo(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{X}{U}{U}"); + + // Return X target creatures to their owner's hands. Draw twice that many cards. + Effect effect = new ReturnToHandTargetEffect(); + effect.setText("Return X target creatures to their owner's hands"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addEffect(new TheBattleOfNabooEffect()); + + } + + @Override + public void adjustTargets(Ability ability, Game game) { + ability.getTargets().clear(); + ability.addTarget(new TargetCreaturePermanent(ability.getManaCostsToPay().getX())); + } + + public TheBattleOfNaboo(final TheBattleOfNaboo card) { + super(card); + } + + @Override + public TheBattleOfNaboo copy() { + return new TheBattleOfNaboo(this); + } +} + +class TheBattleOfNabooEffect extends OneShotEffect { + + public TheBattleOfNabooEffect() { + super(Outcome.DrawCard); + staticText = "Draw twice that many cards"; + } + + public TheBattleOfNabooEffect(final TheBattleOfNabooEffect effect) { + super(effect); + } + + @Override + public TheBattleOfNabooEffect copy() { + return new TheBattleOfNabooEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + int x = source.getManaCostsToPay().getX(); + if (x > 0) { + player.drawCards(2 * x, game); + } + return true; + + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/cards/t/TheBrute.java b/Mage.Sets/src/mage/cards/t/TheBrute.java index faae590e24..fa8b14576a 100644 --- a/Mage.Sets/src/mage/cards/t/TheBrute.java +++ b/Mage.Sets/src/mage/cards/t/TheBrute.java @@ -1,78 +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.cards.t; - -import java.util.UUID; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.RegenerateAttachedEffect; -import mage.abilities.effects.common.continuous.BoostEnchantedEffect; -import mage.abilities.keyword.EnchantAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Derpthemeus - */ -public class TheBrute extends CardImpl { - - public TheBrute(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); - - // Enchant creature - TargetCreaturePermanent auraTarget = new TargetCreaturePermanent(); - this.getSpellAbility().addTarget(auraTarget); - this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); - EnchantAbility ability = new EnchantAbility(auraTarget.getTargetName()); - this.addAbility(ability); - - // Enchanted creature gets +1/+0. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 0))); - - // {R}{R}{R}: Regenerate enchanted creature. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateAttachedEffect(AttachmentType.AURA), new ManaCostsImpl("{R}{R}{R}"))); - } - - public TheBrute(final TheBrute card) { - super(card); - } - - @Override - public TheBrute copy() { - return new TheBrute(this); - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.RegenerateAttachedEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Derpthemeus + */ +public class TheBrute extends CardImpl { + + public TheBrute(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetCreaturePermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + EnchantAbility ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +1/+0. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 0))); + + // {R}{R}{R}: Regenerate enchanted creature. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateAttachedEffect(AttachmentType.AURA), new ManaCostsImpl("{R}{R}{R}"))); + } + + public TheBrute(final TheBrute card) { + super(card); + } + + @Override + public TheBrute copy() { + return new TheBrute(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TheDeathStar.java b/Mage.Sets/src/mage/cards/t/TheDeathStar.java index e61d0eb37a..7303af7297 100644 --- a/Mage.Sets/src/mage/cards/t/TheDeathStar.java +++ b/Mage.Sets/src/mage/cards/t/TheDeathStar.java @@ -1,91 +1,91 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.DestroyTargetEffect; -import mage.abilities.effects.common.LoseGameTargetPlayerEffect; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.abilities.mana.ColorlessManaAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SuperType; -import mage.constants.Zone; -import mage.counters.CounterType; -import mage.target.TargetPermanent; -import mage.target.TargetPlayer; - -/** - * - * @author Styxo - */ -public class TheDeathStar extends CardImpl { - - public TheDeathStar(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - addSuperType(SuperType.LEGENDARY); - - // {T}: Add {C} to your mana pool. - this.addAbility(new ColorlessManaAbility()); - - // {2},{T}: Put a charge counter on The Death Star. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), new GenericManaCost(2)); - ability.addCost(new TapSourceCost()); - this.addAbility(ability); - - // {T}, Remove three charge counters from The Death Star: Destroy target permanent. - ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost()); - ability.addCost(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(3))); - ability.addTarget(new TargetPermanent()); - this.addAbility(ability); - - // {T}, Remove ten charge counters from The Death Star: Destroy target player. - Effect effect = new LoseGameTargetPlayerEffect(); - effect.setText("Destroy target player"); - ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); - ability.addCost(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(10))); - ability.addTarget(new TargetPlayer()); - this.addAbility(ability); - } - - public TheDeathStar(final TheDeathStar card) { - super(card); - } - - @Override - public TheDeathStar copy() { - return new TheDeathStar(this); - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.LoseGameTargetPlayerEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.TargetPermanent; +import mage.target.TargetPlayer; + +/** + * + * @author Styxo + */ +public class TheDeathStar extends CardImpl { + + public TheDeathStar(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.LAND},""); + addSuperType(SuperType.LEGENDARY); + + // {T}: Add {C} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {2},{T}: Put a charge counter on The Death Star. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), new GenericManaCost(2)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + // {T}, Remove three charge counters from The Death Star: Destroy target permanent. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost()); + ability.addCost(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(3))); + ability.addTarget(new TargetPermanent()); + this.addAbility(ability); + + // {T}, Remove ten charge counters from The Death Star: Destroy target player. + Effect effect = new LoseGameTargetPlayerEffect(); + effect.setText("Destroy target player"); + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); + ability.addCost(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(10))); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public TheDeathStar(final TheDeathStar card) { + super(card); + } + + @Override + public TheDeathStar copy() { + return new TheDeathStar(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TheGitrogMonster.java b/Mage.Sets/src/mage/cards/t/TheGitrogMonster.java index 8f999f1bc6..42d2668ad5 100644 --- a/Mage.Sets/src/mage/cards/t/TheGitrogMonster.java +++ b/Mage.Sets/src/mage/cards/t/TheGitrogMonster.java @@ -57,8 +57,8 @@ public class TheGitrogMonster extends CardImpl { public TheGitrogMonster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Frog"); - this.subtype.add("Horror"); + this.subtype.add(SubType.FROG); + this.subtype.add(SubType.HORROR); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/t/TheLadyOfTheMountain.java b/Mage.Sets/src/mage/cards/t/TheLadyOfTheMountain.java index 712c0855ff..11906d11c8 100644 --- a/Mage.Sets/src/mage/cards/t/TheLadyOfTheMountain.java +++ b/Mage.Sets/src/mage/cards/t/TheLadyOfTheMountain.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -43,7 +44,7 @@ public class TheLadyOfTheMountain extends CardImpl { public TheLadyOfTheMountain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TheLocustGod.java b/Mage.Sets/src/mage/cards/t/TheLocustGod.java index d7d5994bf4..593b85c5bb 100644 --- a/Mage.Sets/src/mage/cards/t/TheLocustGod.java +++ b/Mage.Sets/src/mage/cards/t/TheLocustGod.java @@ -45,6 +45,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -62,7 +63,7 @@ public class TheLocustGod extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TheMimeoplasm.java b/Mage.Sets/src/mage/cards/t/TheMimeoplasm.java index e9d0598607..3f5777c83b 100644 --- a/Mage.Sets/src/mage/cards/t/TheMimeoplasm.java +++ b/Mage.Sets/src/mage/cards/t/TheMimeoplasm.java @@ -54,7 +54,7 @@ public class TheMimeoplasm extends CardImpl { public TheMimeoplasm(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Ooze"); + this.subtype.add(SubType.OOZE); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/t/TheScarabGod.java b/Mage.Sets/src/mage/cards/t/TheScarabGod.java index f793d92e0f..94b771e9fa 100644 --- a/Mage.Sets/src/mage/cards/t/TheScarabGod.java +++ b/Mage.Sets/src/mage/cards/t/TheScarabGod.java @@ -39,8 +39,7 @@ import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbil import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; -import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.Card; import mage.cards.CardImpl; @@ -69,7 +68,7 @@ public class TheScarabGod extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(5); this.toughness = new MageInt(5); @@ -161,9 +160,9 @@ class TheScarabGodEffect2 extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null && card != null) { controller.moveCards(card, Zone.EXILED, source, game); // Also if the move to exile is replaced, the copy takes place - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, false, 1, false, false, null, 4, 4, false); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), null, false, 1, false, false, null, 4, 4, false); effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game))); - effect.setOnlySubType("Zombie"); + effect.setOnlySubType(SubType.ZOMBIE); effect.setOnlyColor(ObjectColor.BLACK); effect.apply(game, source); return true; diff --git a/Mage.Sets/src/mage/cards/t/TheScorpionGod.java b/Mage.Sets/src/mage/cards/t/TheScorpionGod.java index 7334c529af..d089f6707d 100644 --- a/Mage.Sets/src/mage/cards/t/TheScorpionGod.java +++ b/Mage.Sets/src/mage/cards/t/TheScorpionGod.java @@ -45,6 +45,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -75,7 +76,7 @@ public class TheScorpionGod extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TheUnspeakable.java b/Mage.Sets/src/mage/cards/t/TheUnspeakable.java index be5c595249..f7775e7695 100644 --- a/Mage.Sets/src/mage/cards/t/TheUnspeakable.java +++ b/Mage.Sets/src/mage/cards/t/TheUnspeakable.java @@ -58,7 +58,7 @@ public class TheUnspeakable extends CardImpl { public TheUnspeakable(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{U}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(6); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/t/TheUrDragon.java b/Mage.Sets/src/mage/cards/t/TheUrDragon.java index 8a894a982f..bf3283104f 100644 --- a/Mage.Sets/src/mage/cards/t/TheUrDragon.java +++ b/Mage.Sets/src/mage/cards/t/TheUrDragon.java @@ -27,9 +27,6 @@ */ package mage.cards.t; -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; import mage.MageInt; import mage.MageObjectReference; import mage.abilities.Ability; @@ -42,13 +39,7 @@ import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.AbilityWord; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.SubType; -import mage.constants.SuperType; -import mage.constants.WatcherScope; -import mage.constants.Zone; +import mage.constants.*; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; @@ -57,8 +48,11 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.watchers.Watcher; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + /** - * * @author TheElk801 */ public class TheUrDragon extends CardImpl { @@ -73,8 +67,8 @@ public class TheUrDragon extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{U}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.DRAGON); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(10); this.toughness = new MageInt(10); @@ -125,7 +119,7 @@ class DragonsAttackedWatcher extends Watcher { this.attackedThisTurnCreatures.clear(); } if (event.getType() == GameEvent.EventType.ATTACKER_DECLARED) { - if (game.getPermanent(event.getSourceId()).getSubtype(game).contains(SubType.DRAGON)) { + if (game.getPermanent(event.getSourceId()).hasSubtype(SubType.DRAGON, game)) { this.attackedThisTurnCreatures.add(new MageObjectReference(event.getSourceId(), game)); } } @@ -166,7 +160,10 @@ class TheUrDragonTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { for (UUID attacker : game.getCombat().getAttackers()) { Permanent creature = game.getPermanent(attacker); - if (creature != null && creature.getControllerId() == this.getControllerId() && creature.getSubtype(game).contains(SubType.DRAGON)) { + if (creature != null + && creature.getControllerId() != null + && creature.getControllerId().equals(this.getControllerId()) + && creature.hasSubtype(SubType.DRAGON, game)) { return true; } } diff --git a/Mage.Sets/src/mage/cards/t/TheWretched.java b/Mage.Sets/src/mage/cards/t/TheWretched.java index 69d0aec48e..bfeef38c44 100644 --- a/Mage.Sets/src/mage/cards/t/TheWretched.java +++ b/Mage.Sets/src/mage/cards/t/TheWretched.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.game.Game; @@ -69,7 +70,7 @@ public class TheWretched extends CardImpl { public TheWretched(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/ThelonOfHavenwood.java b/Mage.Sets/src/mage/cards/t/ThelonOfHavenwood.java index a53e6f7b20..7aed667114 100644 --- a/Mage.Sets/src/mage/cards/t/ThelonOfHavenwood.java +++ b/Mage.Sets/src/mage/cards/t/ThelonOfHavenwood.java @@ -64,8 +64,8 @@ public class ThelonOfHavenwood extends CardImpl { public ThelonOfHavenwood(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TheloniteDruid.java b/Mage.Sets/src/mage/cards/t/TheloniteDruid.java index 4d75d0f104..cd2aea0a5a 100644 --- a/Mage.Sets/src/mage/cards/t/TheloniteDruid.java +++ b/Mage.Sets/src/mage/cards/t/TheloniteDruid.java @@ -58,9 +58,9 @@ public class TheloniteDruid extends CardImpl { public TheloniteDruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TheloniteHermit.java b/Mage.Sets/src/mage/cards/t/TheloniteHermit.java index 15f212b46f..2b69241407 100644 --- a/Mage.Sets/src/mage/cards/t/TheloniteHermit.java +++ b/Mage.Sets/src/mage/cards/t/TheloniteHermit.java @@ -59,8 +59,8 @@ public class TheloniteHermit extends CardImpl { public TheloniteHermit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TheloniteMonk.java b/Mage.Sets/src/mage/cards/t/TheloniteMonk.java index 68d54206f8..08ff9e37bd 100644 --- a/Mage.Sets/src/mage/cards/t/TheloniteMonk.java +++ b/Mage.Sets/src/mage/cards/t/TheloniteMonk.java @@ -61,9 +61,9 @@ public class TheloniteMonk extends CardImpl { public TheloniteMonk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Insect"); - this.subtype.add("Monk"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.MONK); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThermalGlider.java b/Mage.Sets/src/mage/cards/t/ThermalGlider.java index e38577cf83..d8d16112f2 100644 --- a/Mage.Sets/src/mage/cards/t/ThermalGlider.java +++ b/Mage.Sets/src/mage/cards/t/ThermalGlider.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class ThermalGlider extends CardImpl { public ThermalGlider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThermalNavigator.java b/Mage.Sets/src/mage/cards/t/ThermalNavigator.java index 3e847a7dc8..82741ea969 100644 --- a/Mage.Sets/src/mage/cards/t/ThermalNavigator.java +++ b/Mage.Sets/src/mage/cards/t/ThermalNavigator.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; @@ -49,7 +50,7 @@ public class ThermalNavigator extends CardImpl { public ThermalNavigator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThermoAlchemist.java b/Mage.Sets/src/mage/cards/t/ThermoAlchemist.java index 53533cb3d4..294a63d976 100644 --- a/Mage.Sets/src/mage/cards/t/ThermoAlchemist.java +++ b/Mage.Sets/src/mage/cards/t/ThermoAlchemist.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterInstantOrSorcerySpell; @@ -51,8 +52,8 @@ public class ThermoAlchemist extends CardImpl { public ThermoAlchemist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/Thermopod.java b/Mage.Sets/src/mage/cards/t/Thermopod.java index 81d1734908..f183a4f159 100644 --- a/Mage.Sets/src/mage/cards/t/Thermopod.java +++ b/Mage.Sets/src/mage/cards/t/Thermopod.java @@ -39,6 +39,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class Thermopod extends CardImpl { public Thermopod(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); addSuperType(SuperType.SNOW); - this.subtype.add("Slug"); + this.subtype.add(SubType.SLUG); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/ThicketBasilisk.java b/Mage.Sets/src/mage/cards/t/ThicketBasilisk.java index e1e41a11ce..bb6ce44403 100644 --- a/Mage.Sets/src/mage/cards/t/ThicketBasilisk.java +++ b/Mage.Sets/src/mage/cards/t/ThicketBasilisk.java @@ -56,7 +56,7 @@ public class ThicketBasilisk extends CardImpl { public ThicketBasilisk(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); - this.subtype.add("Basilisk"); + this.subtype.add(SubType.BASILISK); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/ThicketElemental.java b/Mage.Sets/src/mage/cards/t/ThicketElemental.java index 077e5fad0a..4fc5b898f2 100644 --- a/Mage.Sets/src/mage/cards/t/ThicketElemental.java +++ b/Mage.Sets/src/mage/cards/t/ThicketElemental.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -49,7 +50,7 @@ public class ThicketElemental extends CardImpl { public ThicketElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/ThiefOfBlood.java b/Mage.Sets/src/mage/cards/t/ThiefOfBlood.java index a5522f915b..f561458951 100644 --- a/Mage.Sets/src/mage/cards/t/ThiefOfBlood.java +++ b/Mage.Sets/src/mage/cards/t/ThiefOfBlood.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.Counter; import mage.counters.CounterType; @@ -55,7 +56,7 @@ public class ThiefOfBlood extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); this.power = new MageInt(1); this.toughness = new MageInt(1); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); // Flying this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/t/ThiefOfHope.java b/Mage.Sets/src/mage/cards/t/ThiefOfHope.java index 74b8879009..82fc3e4d84 100644 --- a/Mage.Sets/src/mage/cards/t/ThiefOfHope.java +++ b/Mage.Sets/src/mage/cards/t/ThiefOfHope.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetOpponent; @@ -48,7 +49,7 @@ public class ThiefOfHope extends CardImpl { public ThiefOfHope(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThievesFortune.java b/Mage.Sets/src/mage/cards/t/ThievesFortune.java index b9c916fcbe..8b681bcd61 100644 --- a/Mage.Sets/src/mage/cards/t/ThievesFortune.java +++ b/Mage.Sets/src/mage/cards/t/ThievesFortune.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProwlAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; @@ -45,7 +46,7 @@ public class ThievesFortune extends CardImpl { public ThievesFortune(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{2}{U}"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.ROGUE); // Prowl {U} diff --git a/Mage.Sets/src/mage/cards/t/ThievingMagpie.java b/Mage.Sets/src/mage/cards/t/ThievingMagpie.java index e7783b4d1f..6e3fb62bbe 100644 --- a/Mage.Sets/src/mage/cards/t/ThievingMagpie.java +++ b/Mage.Sets/src/mage/cards/t/ThievingMagpie.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class ThievingMagpie extends CardImpl { public ThievingMagpie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/ThievingSprite.java b/Mage.Sets/src/mage/cards/t/ThievingSprite.java index b385ecb746..61ca6f17b1 100644 --- a/Mage.Sets/src/mage/cards/t/ThievingSprite.java +++ b/Mage.Sets/src/mage/cards/t/ThievingSprite.java @@ -59,8 +59,8 @@ public class ThievingSprite extends CardImpl { public ThievingSprite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Faerie"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThingFromTheDeep.java b/Mage.Sets/src/mage/cards/t/ThingFromTheDeep.java index 77aac5dc4d..5d1b175765 100644 --- a/Mage.Sets/src/mage/cards/t/ThingFromTheDeep.java +++ b/Mage.Sets/src/mage/cards/t/ThingFromTheDeep.java @@ -55,7 +55,7 @@ public class ThingFromTheDeep extends CardImpl { public ThingFromTheDeep(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{U}{U}{U}"); - this.subtype.add("Leviathan"); + this.subtype.add(SubType.LEVIATHAN); this.power = new MageInt(9); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/t/ThingInTheIce.java b/Mage.Sets/src/mage/cards/t/ThingInTheIce.java index 62be342649..358ef47805 100644 --- a/Mage.Sets/src/mage/cards/t/ThingInTheIce.java +++ b/Mage.Sets/src/mage/cards/t/ThingInTheIce.java @@ -44,6 +44,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.a.AwokenHorror; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -65,7 +66,7 @@ public class ThingInTheIce extends CardImpl { public ThingInTheIce(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/Thirst.java b/Mage.Sets/src/mage/cards/t/Thirst.java index 7c5226e542..bd03d8418b 100644 --- a/Mage.Sets/src/mage/cards/t/Thirst.java +++ b/Mage.Sets/src/mage/cards/t/Thirst.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class Thirst extends CardImpl { public Thirst(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/t/ThirstingAxe.java b/Mage.Sets/src/mage/cards/t/ThirstingAxe.java index aaa56cac5f..e7e68c417e 100644 --- a/Mage.Sets/src/mage/cards/t/ThirstingAxe.java +++ b/Mage.Sets/src/mage/cards/t/ThirstingAxe.java @@ -62,7 +62,7 @@ public class ThirstingAxe extends CardImpl { public ThirstingAxe(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +4/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(4, 0))); diff --git a/Mage.Sets/src/mage/cards/t/ThistledownDuo.java b/Mage.Sets/src/mage/cards/t/ThistledownDuo.java index a8b80cf61f..e3d3ab34e2 100644 --- a/Mage.Sets/src/mage/cards/t/ThistledownDuo.java +++ b/Mage.Sets/src/mage/cards/t/ThistledownDuo.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,9 +58,9 @@ public class ThistledownDuo extends CardImpl { public ThistledownDuo(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W/U}"); - this.subtype.add("Kithkin"); - this.subtype.add("Soldier"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThistledownLiege.java b/Mage.Sets/src/mage/cards/t/ThistledownLiege.java index 83555a4319..38f2016b6c 100644 --- a/Mage.Sets/src/mage/cards/t/ThistledownLiege.java +++ b/Mage.Sets/src/mage/cards/t/ThistledownLiege.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -57,8 +58,8 @@ public class ThistledownLiege extends CardImpl { public ThistledownLiege(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W/U}{W/U}{W/U}"); - this.subtype.add("Kithkin"); - this.subtype.add("Knight"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/ThopterArrest.java b/Mage.Sets/src/mage/cards/t/ThopterArrest.java index 45d028f70e..c3123d4ed0 100644 --- a/Mage.Sets/src/mage/cards/t/ThopterArrest.java +++ b/Mage.Sets/src/mage/cards/t/ThopterArrest.java @@ -1,80 +1,80 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.delayed.OnLeaveReturnExiledToBattlefieldAbility; -import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; -import mage.abilities.effects.common.ExileUntilSourceLeavesEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.TargetController; -import mage.filter.FilterPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.filter.predicate.permanent.ControllerPredicate; -import mage.target.TargetPermanent; - -/** - * - * @author Styxo - */ -public class ThopterArrest extends CardImpl { - - private final static FilterPermanent filter = new FilterPermanent("artifact or creature"); - - static { - filter.add(Predicates.or( - new CardTypePredicate(CardType.ARTIFACT), - new CardTypePredicate(CardType.CREATURE) - )); - filter.add(new ControllerPredicate(TargetController.OPPONENT)); - } - - public ThopterArrest(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); - - // When Thopter Arrest enters the battlefield, exile target artifact or creature an opponent controls until Thopter Arrest leaves the battlefield. - Ability ability = new EntersBattlefieldTriggeredAbility(new ExileUntilSourceLeavesEffect(filter.getMessage())); - ability.addTarget(new TargetPermanent(filter)); - ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility())); - this.addAbility(ability); - } - - public ThopterArrest(final ThopterArrest card) { - super(card); - } - - @Override - public ThopterArrest copy() { - return new ThopterArrest(this); - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.delayed.OnLeaveReturnExiledToBattlefieldAbility; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.ExileUntilSourceLeavesEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.TargetPermanent; + +/** + * + * @author Styxo + */ +public class ThopterArrest extends CardImpl { + + private final static FilterPermanent filter = new FilterPermanent("artifact or creature"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.CREATURE) + )); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public ThopterArrest(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + + // When Thopter Arrest enters the battlefield, exile target artifact or creature an opponent controls until Thopter Arrest leaves the battlefield. + Ability ability = new EntersBattlefieldTriggeredAbility(new ExileUntilSourceLeavesEffect(filter.getMessage())); + ability.addTarget(new TargetPermanent(filter)); + ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility())); + this.addAbility(ability); + } + + public ThopterArrest(final ThopterArrest card) { + super(card); + } + + @Override + public ThopterArrest copy() { + return new ThopterArrest(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/ThopterAssembly.java b/Mage.Sets/src/mage/cards/t/ThopterAssembly.java index f0b00a98ba..aa917d2bff 100644 --- a/Mage.Sets/src/mage/cards/t/ThopterAssembly.java +++ b/Mage.Sets/src/mage/cards/t/ThopterAssembly.java @@ -54,7 +54,7 @@ public class ThopterAssembly extends CardImpl { public ThopterAssembly(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Thopter"); + this.subtype.add(SubType.THOPTER); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/ThopterEngineer.java b/Mage.Sets/src/mage/cards/t/ThopterEngineer.java index 8e14a3b6a4..8933a97788 100644 --- a/Mage.Sets/src/mage/cards/t/ThopterEngineer.java +++ b/Mage.Sets/src/mage/cards/t/ThopterEngineer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -57,8 +58,8 @@ public class ThopterEngineer extends CardImpl { public ThopterEngineer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/ThopterSpyNetwork.java b/Mage.Sets/src/mage/cards/t/ThopterSpyNetwork.java index a901bc64e0..c18c86b22b 100644 --- a/Mage.Sets/src/mage/cards/t/ThopterSpyNetwork.java +++ b/Mage.Sets/src/mage/cards/t/ThopterSpyNetwork.java @@ -51,7 +51,7 @@ import mage.game.permanent.token.ThopterColorlessToken; public class ThopterSpyNetwork extends CardImpl { public ThopterSpyNetwork(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}"); // At the beginning of your upkeep, if you control an artifact, create a 1/1 colorless Thopter artifact creature token with flying. this.addAbility(new ThopterSpyNetworkUpkeepTriggeredAbility()); @@ -149,6 +149,6 @@ class ThopterSpyNetworkDamageTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever one or more artifact creatures you control deals combat damage to a player, draw a card"; + return "Whenever one or more artifact creatures you control deal combat damage to a player, draw a card"; } } diff --git a/Mage.Sets/src/mage/cards/t/ThopterSquadron.java b/Mage.Sets/src/mage/cards/t/ThopterSquadron.java index c8fe651f26..237a157631 100644 --- a/Mage.Sets/src/mage/cards/t/ThopterSquadron.java +++ b/Mage.Sets/src/mage/cards/t/ThopterSquadron.java @@ -66,7 +66,7 @@ public class ThopterSquadron extends CardImpl { public ThopterSquadron(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Thopter"); + this.subtype.add(SubType.THOPTER); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/t/ThornElemental.java b/Mage.Sets/src/mage/cards/t/ThornElemental.java index c5ff80f9cf..c13135a1a8 100644 --- a/Mage.Sets/src/mage/cards/t/ThornElemental.java +++ b/Mage.Sets/src/mage/cards/t/ThornElemental.java @@ -33,6 +33,7 @@ import mage.abilities.common.DamageAsThoughNotBlockedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class ThornElemental extends CardImpl { public ThornElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/t/ThornOfTheBlackRose.java b/Mage.Sets/src/mage/cards/t/ThornOfTheBlackRose.java index 763659b513..675607a2ac 100644 --- a/Mage.Sets/src/mage/cards/t/ThornOfTheBlackRose.java +++ b/Mage.Sets/src/mage/cards/t/ThornOfTheBlackRose.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class ThornOfTheBlackRose extends CardImpl { public ThornOfTheBlackRose(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.subtype.add("Human"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/ThornThallid.java b/Mage.Sets/src/mage/cards/t/ThornThallid.java index e266a28a8d..7a6c9ee6cb 100644 --- a/Mage.Sets/src/mage/cards/t/ThornThallid.java +++ b/Mage.Sets/src/mage/cards/t/ThornThallid.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; @@ -51,7 +52,7 @@ public class ThornThallid extends CardImpl { public ThornThallid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThornThrashViashino.java b/Mage.Sets/src/mage/cards/t/ThornThrashViashino.java index f4e9b60eab..865d6f25d7 100644 --- a/Mage.Sets/src/mage/cards/t/ThornThrashViashino.java +++ b/Mage.Sets/src/mage/cards/t/ThornThrashViashino.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,8 +50,8 @@ public class ThornThrashViashino extends CardImpl { public ThornThrashViashino(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Viashino"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThornbiteStaff.java b/Mage.Sets/src/mage/cards/t/ThornbiteStaff.java index 70c7baf0b7..fe5f2b8827 100644 --- a/Mage.Sets/src/mage/cards/t/ThornbiteStaff.java +++ b/Mage.Sets/src/mage/cards/t/ThornbiteStaff.java @@ -62,8 +62,8 @@ public class ThornbiteStaff extends CardImpl { public ThornbiteStaff(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.ARTIFACT},"{2}"); - this.subtype.add("Shaman"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.SHAMAN); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has "{2}, {T}: This creature deals 1 damage to target creature or player" and "Whenever a creature dies, untap this creature." Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new GenericManaCost(2)); diff --git a/Mage.Sets/src/mage/cards/t/ThornbowArcher.java b/Mage.Sets/src/mage/cards/t/ThornbowArcher.java index fe7febfb6e..e35d21e5ce 100644 --- a/Mage.Sets/src/mage/cards/t/ThornbowArcher.java +++ b/Mage.Sets/src/mage/cards/t/ThornbowArcher.java @@ -50,8 +50,8 @@ public class ThornbowArcher extends CardImpl { public ThornbowArcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Elf"); - this.subtype.add("Archer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThorncasterSliver.java b/Mage.Sets/src/mage/cards/t/ThorncasterSliver.java index 0049cb16c6..8a92e0610a 100644 --- a/Mage.Sets/src/mage/cards/t/ThorncasterSliver.java +++ b/Mage.Sets/src/mage/cards/t/ThorncasterSliver.java @@ -27,30 +27,31 @@ */ package mage.cards.t; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.DamageTargetEffect; -import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.common.TargetCreatureOrPlayer; +import java.util.UUID; + /** - * * @author LevelX2 */ public class ThorncasterSliver extends CardImpl { public ThorncasterSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -59,9 +60,9 @@ public class ThorncasterSliver extends CardImpl { Ability ability = new AttacksTriggeredAbility(new DamageTargetEffect(1), false); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new GainAbilityAllEffect(ability, - Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, - "Sliver creatures you control have \"Whenever this creature attacks, it deals 1 damage to target creature or player.\""))); + new GainAbilityControlledEffect(ability, + Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS) + .setText("Sliver creatures you control have \"Whenever this creature attacks, it deals 1 damage to target creature or player.\""))); } public ThorncasterSliver(final ThorncasterSliver card) { diff --git a/Mage.Sets/src/mage/cards/t/ThornedMoloch.java b/Mage.Sets/src/mage/cards/t/ThornedMoloch.java index 54275a0f47..1ee0ca0065 100644 --- a/Mage.Sets/src/mage/cards/t/ThornedMoloch.java +++ b/Mage.Sets/src/mage/cards/t/ThornedMoloch.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -49,7 +50,7 @@ public class ThornedMoloch extends CardImpl { public ThornedMoloch(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThornhideWolves.java b/Mage.Sets/src/mage/cards/t/ThornhideWolves.java index 52c808d4e0..0c84c4ff2e 100644 --- a/Mage.Sets/src/mage/cards/t/ThornhideWolves.java +++ b/Mage.Sets/src/mage/cards/t/ThornhideWolves.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class ThornhideWolves extends CardImpl { public ThornhideWolves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(4); this.toughness = new MageInt(5); } diff --git a/Mage.Sets/src/mage/cards/t/Thornling.java b/Mage.Sets/src/mage/cards/t/Thornling.java index 6e1664ad93..b3c5a95a02 100644 --- a/Mage.Sets/src/mage/cards/t/Thornling.java +++ b/Mage.Sets/src/mage/cards/t/Thornling.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -53,8 +54,8 @@ public class Thornling extends CardImpl { public Thornling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Elemental"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(4); this.toughness = new MageInt(4); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{G}"))); diff --git a/Mage.Sets/src/mage/cards/t/ThornscapeApprentice.java b/Mage.Sets/src/mage/cards/t/ThornscapeApprentice.java index bc578e1344..fb4e34ba44 100644 --- a/Mage.Sets/src/mage/cards/t/ThornscapeApprentice.java +++ b/Mage.Sets/src/mage/cards/t/ThornscapeApprentice.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,8 +51,8 @@ public class ThornscapeApprentice extends CardImpl { public ThornscapeApprentice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThornscapeBattlemage.java b/Mage.Sets/src/mage/cards/t/ThornscapeBattlemage.java index 61a8ba6c52..71493e1748 100644 --- a/Mage.Sets/src/mage/cards/t/ThornscapeBattlemage.java +++ b/Mage.Sets/src/mage/cards/t/ThornscapeBattlemage.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetArtifactPermanent; import mage.target.common.TargetCreatureOrPlayer; @@ -50,8 +51,8 @@ public class ThornscapeBattlemage extends CardImpl { public ThornscapeBattlemage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThornscapeFamiliar.java b/Mage.Sets/src/mage/cards/t/ThornscapeFamiliar.java index fa3669b608..3df10759e9 100644 --- a/Mage.Sets/src/mage/cards/t/ThornscapeFamiliar.java +++ b/Mage.Sets/src/mage/cards/t/ThornscapeFamiliar.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; @@ -56,7 +57,7 @@ public class ThornscapeFamiliar extends CardImpl { public ThornscapeFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThornscapeMaster.java b/Mage.Sets/src/mage/cards/t/ThornscapeMaster.java index ffe2400fd0..cafa06f7f2 100644 --- a/Mage.Sets/src/mage/cards/t/ThornscapeMaster.java +++ b/Mage.Sets/src/mage/cards/t/ThornscapeMaster.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.GainProtectionFromColorTargetEff import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -52,8 +53,8 @@ public class ThornscapeMaster extends CardImpl { public ThornscapeMaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThorntoothWitch.java b/Mage.Sets/src/mage/cards/t/ThorntoothWitch.java index d51f93b879..8e152b18c2 100644 --- a/Mage.Sets/src/mage/cards/t/ThorntoothWitch.java +++ b/Mage.Sets/src/mage/cards/t/ThorntoothWitch.java @@ -55,8 +55,8 @@ public class ThorntoothWitch extends CardImpl { public ThorntoothWitch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Treefolk"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/ThornwatchScarecrow.java b/Mage.Sets/src/mage/cards/t/ThornwatchScarecrow.java index 2f5d2a9487..2ab3592f71 100644 --- a/Mage.Sets/src/mage/cards/t/ThornwatchScarecrow.java +++ b/Mage.Sets/src/mage/cards/t/ThornwatchScarecrow.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -64,7 +65,7 @@ public class ThornwatchScarecrow extends CardImpl { public ThornwatchScarecrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/ThornwealdArcher.java b/Mage.Sets/src/mage/cards/t/ThornwealdArcher.java index ed4685ce1a..9ec1f39d7d 100644 --- a/Mage.Sets/src/mage/cards/t/ThornwealdArcher.java +++ b/Mage.Sets/src/mage/cards/t/ThornwealdArcher.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ThornwealdArcher extends CardImpl { public ThornwealdArcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Archer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThornwindFaeries.java b/Mage.Sets/src/mage/cards/t/ThornwindFaeries.java index d660de3462..e36c84270c 100644 --- a/Mage.Sets/src/mage/cards/t/ThornwindFaeries.java +++ b/Mage.Sets/src/mage/cards/t/ThornwindFaeries.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,7 +49,7 @@ public class ThornwindFaeries extends CardImpl { public ThornwindFaeries(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThoseWhoServe.java b/Mage.Sets/src/mage/cards/t/ThoseWhoServe.java index fc16c575f9..a769106688 100644 --- a/Mage.Sets/src/mage/cards/t/ThoseWhoServe.java +++ b/Mage.Sets/src/mage/cards/t/ThoseWhoServe.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class ThoseWhoServe extends CardImpl { public ThoseWhoServe(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(4); } diff --git a/Mage.Sets/src/mage/cards/t/ThoughtCourier.java b/Mage.Sets/src/mage/cards/t/ThoughtCourier.java index 4186028978..6be807acd9 100644 --- a/Mage.Sets/src/mage/cards/t/ThoughtCourier.java +++ b/Mage.Sets/src/mage/cards/t/ThoughtCourier.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class ThoughtCourier extends CardImpl { public ThoughtCourier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThoughtDevourer.java b/Mage.Sets/src/mage/cards/t/ThoughtDevourer.java index b091d093bf..57f6f25340 100644 --- a/Mage.Sets/src/mage/cards/t/ThoughtDevourer.java +++ b/Mage.Sets/src/mage/cards/t/ThoughtDevourer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class ThoughtDevourer extends CardImpl { public ThoughtDevourer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/ThoughtEater.java b/Mage.Sets/src/mage/cards/t/ThoughtEater.java index 85986c7aae..f706372796 100644 --- a/Mage.Sets/src/mage/cards/t/ThoughtEater.java +++ b/Mage.Sets/src/mage/cards/t/ThoughtEater.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class ThoughtEater extends CardImpl { public ThoughtEater(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThoughtGorger.java b/Mage.Sets/src/mage/cards/t/ThoughtGorger.java index 7b8264b25d..f5eeed502e 100644 --- a/Mage.Sets/src/mage/cards/t/ThoughtGorger.java +++ b/Mage.Sets/src/mage/cards/t/ThoughtGorger.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -52,7 +53,7 @@ public class ThoughtGorger extends CardImpl { public ThoughtGorger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThoughtHarvester.java b/Mage.Sets/src/mage/cards/t/ThoughtHarvester.java index dcff414285..0f642ff500 100644 --- a/Mage.Sets/src/mage/cards/t/ThoughtHarvester.java +++ b/Mage.Sets/src/mage/cards/t/ThoughtHarvester.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorlessPredicate; import mage.target.common.TargetOpponent; @@ -55,8 +56,8 @@ public class ThoughtHarvester extends CardImpl { public ThoughtHarvester(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/ThoughtKnotSeer.java b/Mage.Sets/src/mage/cards/t/ThoughtKnotSeer.java index 88eec52c62..9e05e34d13 100644 --- a/Mage.Sets/src/mage/cards/t/ThoughtKnotSeer.java +++ b/Mage.Sets/src/mage/cards/t/ThoughtKnotSeer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ExileCardYouChooseTargetOpponentEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetOpponent; @@ -48,7 +49,7 @@ public class ThoughtKnotSeer extends CardImpl { public ThoughtKnotSeer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{C}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/ThoughtNibbler.java b/Mage.Sets/src/mage/cards/t/ThoughtNibbler.java index 69f3de4da7..2c00519695 100644 --- a/Mage.Sets/src/mage/cards/t/ThoughtNibbler.java +++ b/Mage.Sets/src/mage/cards/t/ThoughtNibbler.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class ThoughtNibbler extends CardImpl { public ThoughtNibbler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThoughtcutterAgent.java b/Mage.Sets/src/mage/cards/t/ThoughtcutterAgent.java index a6e37087c3..15814283e2 100644 --- a/Mage.Sets/src/mage/cards/t/ThoughtcutterAgent.java +++ b/Mage.Sets/src/mage/cards/t/ThoughtcutterAgent.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.RevealHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -51,8 +52,8 @@ public class ThoughtcutterAgent extends CardImpl { public ThoughtcutterAgent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{U}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThoughtpickerWitch.java b/Mage.Sets/src/mage/cards/t/ThoughtpickerWitch.java index 44345b0320..7a0f37f19f 100644 --- a/Mage.Sets/src/mage/cards/t/ThoughtpickerWitch.java +++ b/Mage.Sets/src/mage/cards/t/ThoughtpickerWitch.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -59,8 +60,8 @@ public class ThoughtpickerWitch extends CardImpl { public ThoughtpickerWitch(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThoughtrenderLamia.java b/Mage.Sets/src/mage/cards/t/ThoughtrenderLamia.java index 1a64ee3d25..d003875259 100644 --- a/Mage.Sets/src/mage/cards/t/ThoughtrenderLamia.java +++ b/Mage.Sets/src/mage/cards/t/ThoughtrenderLamia.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -44,7 +45,7 @@ public class ThoughtrenderLamia extends CardImpl { public ThoughtrenderLamia(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Lamia"); + this.subtype.add(SubType.LAMIA); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/ThoughtweftTrio.java b/Mage.Sets/src/mage/cards/t/ThoughtweftTrio.java index 6ef008351b..33b040b88e 100644 --- a/Mage.Sets/src/mage/cards/t/ThoughtweftTrio.java +++ b/Mage.Sets/src/mage/cards/t/ThoughtweftTrio.java @@ -48,8 +48,8 @@ public class ThoughtweftTrio extends CardImpl { public ThoughtweftTrio(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/ThousandWinds.java b/Mage.Sets/src/mage/cards/t/ThousandWinds.java index a554cbd6bc..3be5ca6a3a 100644 --- a/Mage.Sets/src/mage/cards/t/ThousandWinds.java +++ b/Mage.Sets/src/mage/cards/t/ThousandWinds.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.TappedPredicate; @@ -56,7 +57,7 @@ public class ThousandWinds extends CardImpl { public ThousandWinds(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/t/ThousandleggedKami.java b/Mage.Sets/src/mage/cards/t/ThousandleggedKami.java index 6871cf14b2..4496bf72f9 100644 --- a/Mage.Sets/src/mage/cards/t/ThousandleggedKami.java +++ b/Mage.Sets/src/mage/cards/t/ThousandleggedKami.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -42,7 +43,7 @@ public class ThousandleggedKami extends CardImpl { public ThousandleggedKami(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/t/ThrabenDoomsayer.java b/Mage.Sets/src/mage/cards/t/ThrabenDoomsayer.java index 1ec37dcd2d..3b6090dfdb 100644 --- a/Mage.Sets/src/mage/cards/t/ThrabenDoomsayer.java +++ b/Mage.Sets/src/mage/cards/t/ThrabenDoomsayer.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.HumanToken; @@ -51,8 +52,8 @@ public class ThrabenDoomsayer extends CardImpl { public ThrabenDoomsayer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThrabenFoulbloods.java b/Mage.Sets/src/mage/cards/t/ThrabenFoulbloods.java index 71853d213d..6a55263541 100644 --- a/Mage.Sets/src/mage/cards/t/ThrabenFoulbloods.java +++ b/Mage.Sets/src/mage/cards/t/ThrabenFoulbloods.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class ThrabenFoulbloods extends CardImpl { public ThrabenFoulbloods(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Hound"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HOUND); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThrabenGargoyle.java b/Mage.Sets/src/mage/cards/t/ThrabenGargoyle.java index 049f357441..b073b2d1f1 100644 --- a/Mage.Sets/src/mage/cards/t/ThrabenGargoyle.java +++ b/Mage.Sets/src/mage/cards/t/ThrabenGargoyle.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.s.StonewingAntagonizer; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,7 +49,7 @@ public class ThrabenGargoyle extends CardImpl { public ThrabenGargoyle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}"); - this.subtype.add("Gargoyle"); + this.subtype.add(SubType.GARGOYLE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThrabenHeretic.java b/Mage.Sets/src/mage/cards/t/ThrabenHeretic.java index 7b41a398ec..fedec1f91a 100644 --- a/Mage.Sets/src/mage/cards/t/ThrabenHeretic.java +++ b/Mage.Sets/src/mage/cards/t/ThrabenHeretic.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInGraveyard; @@ -48,8 +49,8 @@ public class ThrabenHeretic extends CardImpl { public ThrabenHeretic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThrabenInspector.java b/Mage.Sets/src/mage/cards/t/ThrabenInspector.java index 6556faa18b..68fa538518 100644 --- a/Mage.Sets/src/mage/cards/t/ThrabenInspector.java +++ b/Mage.Sets/src/mage/cards/t/ThrabenInspector.java @@ -34,6 +34,7 @@ import mage.abilities.effects.keyword.InvestigateEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ThrabenInspector extends CardImpl { public ThrabenInspector(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThrabenMilitia.java b/Mage.Sets/src/mage/cards/t/ThrabenMilitia.java index 65bbf0a02a..3bd7c80b97 100644 --- a/Mage.Sets/src/mage/cards/t/ThrabenMilitia.java +++ b/Mage.Sets/src/mage/cards/t/ThrabenMilitia.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author nantuko @@ -41,8 +42,8 @@ public class ThrabenMilitia extends CardImpl { public ThrabenMilitia(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.color.setWhite(true); // this card is the second face of double-faced card diff --git a/Mage.Sets/src/mage/cards/t/ThrabenPurebloods.java b/Mage.Sets/src/mage/cards/t/ThrabenPurebloods.java index c91cd75042..0b68a8e6cf 100644 --- a/Mage.Sets/src/mage/cards/t/ThrabenPurebloods.java +++ b/Mage.Sets/src/mage/cards/t/ThrabenPurebloods.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class ThrabenPurebloods extends CardImpl { public ThrabenPurebloods(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/ThrabenSentry.java b/Mage.Sets/src/mage/cards/t/ThrabenSentry.java index 66970d95af..cf553d5504 100644 --- a/Mage.Sets/src/mage/cards/t/ThrabenSentry.java +++ b/Mage.Sets/src/mage/cards/t/ThrabenSentry.java @@ -36,24 +36,18 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.AnotherPredicate; +import mage.constants.SubType; +import mage.filter.common.FilterControlledCreaturePermanent; /** * @author nantuko */ public class ThrabenSentry extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature"); - - static { - filter.add(new AnotherPredicate()); - } public ThrabenSentry(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.transformable = true; this.secondSideCardClazz = ThrabenMilitia.class; @@ -65,7 +59,7 @@ public class ThrabenSentry extends CardImpl { // Whenever another creature you control dies, you may transform Thraben Sentry. this.addAbility(new TransformAbility()); - this.addAbility(new DiesCreatureTriggeredAbility(new TransformSourceEffect(true), true, filter)); + this.addAbility(new DiesCreatureTriggeredAbility(new TransformSourceEffect(true), true, new FilterControlledCreaturePermanent())); } public ThrabenSentry(final ThrabenSentry card) { diff --git a/Mage.Sets/src/mage/cards/t/ThrabenStandardBearer.java b/Mage.Sets/src/mage/cards/t/ThrabenStandardBearer.java index 4b03de45d1..20fdeab5cd 100644 --- a/Mage.Sets/src/mage/cards/t/ThrabenStandardBearer.java +++ b/Mage.Sets/src/mage/cards/t/ThrabenStandardBearer.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.HumanSoldierToken; @@ -49,8 +50,8 @@ public class ThrabenStandardBearer extends CardImpl { public ThrabenStandardBearer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThrabenValiant.java b/Mage.Sets/src/mage/cards/t/ThrabenValiant.java index 5dfa5210d3..57081a6d5d 100644 --- a/Mage.Sets/src/mage/cards/t/ThrabenValiant.java +++ b/Mage.Sets/src/mage/cards/t/ThrabenValiant.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class ThrabenValiant extends CardImpl { public ThrabenValiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/Thragtusk.java b/Mage.Sets/src/mage/cards/t/Thragtusk.java index c05b10b027..767ea0a573 100644 --- a/Mage.Sets/src/mage/cards/t/Thragtusk.java +++ b/Mage.Sets/src/mage/cards/t/Thragtusk.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.BeastToken; /** @@ -46,7 +47,7 @@ public class Thragtusk extends CardImpl { public Thragtusk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/ThranForge.java b/Mage.Sets/src/mage/cards/t/ThranForge.java new file mode 100644 index 0000000000..b3a9c66ed1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/ThranForge.java @@ -0,0 +1,83 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.AddCardTypeTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public class ThranForge extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.ARTIFACT))); + } + + public ThranForge(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + // {2}: Until end of turn, target nonartifact creature gets +1/+0 and becomes an artifact in addition to its other types. + Ability ability = new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new BoostTargetEffect(1, 0, Duration.EndOfTurn) + .setText("Until end of turn, target nonartifact creature gets +1/+0"), + new GenericManaCost(2)); + ability.addEffect( + new AddCardTypeTargetEffect(CardType.ARTIFACT, Duration.EndOfTurn) + .setText("and becomes an artifact in addition to its other types") + ); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + public ThranForge(final ThranForge card) { + super(card); + } + + @Override + public ThranForge copy() { + return new ThranForge(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/ThranGolem.java b/Mage.Sets/src/mage/cards/t/ThranGolem.java index a1b4a0eea0..960e9b234c 100644 --- a/Mage.Sets/src/mage/cards/t/ThranGolem.java +++ b/Mage.Sets/src/mage/cards/t/ThranGolem.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class ThranGolem extends CardImpl { public ThranGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/ThranTurbine.java b/Mage.Sets/src/mage/cards/t/ThranTurbine.java index b2480d4a6d..2ebbe11744 100644 --- a/Mage.Sets/src/mage/cards/t/ThranTurbine.java +++ b/Mage.Sets/src/mage/cards/t/ThranTurbine.java @@ -39,8 +39,6 @@ import mage.abilities.mana.builder.ConditionalManaBuilder; import mage.abilities.mana.conditional.ManaCondition; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.choices.Choice; -import mage.choices.ChoiceImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.TargetController; @@ -50,8 +48,6 @@ import mage.game.permanent.Permanent; import mage.game.stack.Spell; import mage.players.Player; -import java.util.HashSet; -import java.util.Set; import java.util.UUID; /** @@ -81,7 +77,7 @@ class ThranTurbineEffect extends OneShotEffect { public ThranTurbineEffect() { super(Outcome.Benefit); - staticText = "add {C} or {C}{C} to your mana pool. You can't spend this mana to cast spells"; + staticText = "add {C}{C} to your mana pool. You can't spend this mana to cast spells"; } public ThranTurbineEffect(final ThranTurbineEffect effect) { @@ -98,21 +94,7 @@ class ThranTurbineEffect extends OneShotEffect { Player player = game.getPlayer(targetPointer.getFirst(game, source)); if (player != null) { - Choice numberChoice = new ChoiceImpl(); - Set numbers = new HashSet<>(); - numbers.add(Integer.toString(1)); - numbers.add(Integer.toString(2)); - numberChoice.setChoices(numbers); - numberChoice.setMessage("Choose the amount of {C} mana to add"); - - while (!player.choose(Outcome.Benefit, numberChoice, game)) { - if (!player.canRespond()) { - return false; - } - } - - int count = Integer.parseInt(numberChoice.getChoice()); - new AddConditionalColorlessManaEffect(count, new ThranTurbineManaBuilder()).apply(game, source); + new AddConditionalColorlessManaEffect(2, new ThranTurbineManaBuilder()).apply(game, source); return true; } return false; diff --git a/Mage.Sets/src/mage/cards/t/ThranWarMachine.java b/Mage.Sets/src/mage/cards/t/ThranWarMachine.java index f65ac74b1d..68019c536d 100644 --- a/Mage.Sets/src/mage/cards/t/ThranWarMachine.java +++ b/Mage.Sets/src/mage/cards/t/ThranWarMachine.java @@ -29,11 +29,12 @@ package mage.cards.t; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,13 +44,13 @@ public class ThranWarMachine extends CardImpl { public ThranWarMachine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(4); this.toughness = new MageInt(5); this.addAbility(new EchoAbility("{4}")); //Thran War Machine attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public ThranWarMachine(final ThranWarMachine card) { diff --git a/Mage.Sets/src/mage/cards/t/ThrashOfRaptors.java b/Mage.Sets/src/mage/cards/t/ThrashOfRaptors.java new file mode 100644 index 0000000000..f5562f54c4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/ThrashOfRaptors.java @@ -0,0 +1,89 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author LevelX2 + */ +public class ThrashOfRaptors extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another Dinosaur"); + + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + filter.add(new AnotherPredicate()); + } + + public ThrashOfRaptors(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // As long as you control another Dinosaur, Thrash of Raptors gets +2/+0 and has trample. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostSourceEffect(2, 0, Duration.WhileOnBattlefield), + new PermanentsOnTheBattlefieldCondition(filter), + "As long as you control another Dinosaur, {this} gets +2/+0")); + ability.addEffect(new ConditionalContinuousEffect( + new GainAbilitySourceEffect(TrampleAbility.getInstance()), + new PermanentsOnTheBattlefieldCondition(filter), + "and has trample")); + this.addAbility(ability); + } + + public ThrashOfRaptors(final ThrashOfRaptors card) { + super(card); + } + + @Override + public ThrashOfRaptors copy() { + return new ThrashOfRaptors(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/ThrashingMossdog.java b/Mage.Sets/src/mage/cards/t/ThrashingMossdog.java index 07b55b0133..152d22e5f1 100644 --- a/Mage.Sets/src/mage/cards/t/ThrashingMossdog.java +++ b/Mage.Sets/src/mage/cards/t/ThrashingMossdog.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ScavengeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,8 +48,8 @@ public class ThrashingMossdog extends CardImpl { public ThrashingMossdog (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Hound"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.HOUND); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/ThrashingMudspawn.java b/Mage.Sets/src/mage/cards/t/ThrashingMudspawn.java new file mode 100644 index 0000000000..2f67e18edd --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/ThrashingMudspawn.java @@ -0,0 +1,106 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.constants.SubType; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class ThrashingMudspawn extends CardImpl { + + public ThrashingMudspawn(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + + this.subtype.add(SubType.BEAST); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Whenever Thrashing Mudspawn is dealt damage, you lose that much life. + Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new ThrashingMudspawnEffect(), false); + this.addAbility(ability); + + // Morph {1}{B}{B} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{B}{B}"))); + + } + + public ThrashingMudspawn(final ThrashingMudspawn card) { + super(card); + } + + @Override + public ThrashingMudspawn copy() { + return new ThrashingMudspawn(this); + } +} + +class ThrashingMudspawnEffect extends OneShotEffect { + + public ThrashingMudspawnEffect() { + super(Outcome.Damage); + this.staticText = "you lose that much life"; + } + + public ThrashingMudspawnEffect(final ThrashingMudspawnEffect effect) { + super(effect); + } + + @Override + public ThrashingMudspawnEffect copy() { + return new ThrashingMudspawnEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + int amount = (Integer) getValue("damage"); + if (amount > 0) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + player.loseLife(amount, game, false); + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/t/ThrashingWumpus.java b/Mage.Sets/src/mage/cards/t/ThrashingWumpus.java index 380fa25ecd..67669af645 100644 --- a/Mage.Sets/src/mage/cards/t/ThrashingWumpus.java +++ b/Mage.Sets/src/mage/cards/t/ThrashingWumpus.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageEverythingEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class ThrashingWumpus extends CardImpl { public ThrashingWumpus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/ThrasiosTritonHero.java b/Mage.Sets/src/mage/cards/t/ThrasiosTritonHero.java index e335bc118c..97c3102ced 100644 --- a/Mage.Sets/src/mage/cards/t/ThrasiosTritonHero.java +++ b/Mage.Sets/src/mage/cards/t/ThrasiosTritonHero.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -57,8 +58,8 @@ public class ThrasiosTritonHero extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/Thraximundar.java b/Mage.Sets/src/mage/cards/t/Thraximundar.java index c1a2fe868b..13f653e2c8 100644 --- a/Mage.Sets/src/mage/cards/t/Thraximundar.java +++ b/Mage.Sets/src/mage/cards/t/Thraximundar.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.counters.CounterType; @@ -57,8 +58,8 @@ public class Thraximundar extends CardImpl { public Thraximundar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Zombie"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/t/ThreadsOfDisloyalty.java b/Mage.Sets/src/mage/cards/t/ThreadsOfDisloyalty.java index d3f7d52d4f..2f8847271b 100644 --- a/Mage.Sets/src/mage/cards/t/ThreadsOfDisloyalty.java +++ b/Mage.Sets/src/mage/cards/t/ThreadsOfDisloyalty.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.Zone; @@ -60,7 +61,7 @@ public class ThreadsOfDisloyalty extends CardImpl { public ThreadsOfDisloyalty(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature with converted mana cost 2 or less TargetPermanent auraTarget = new TargetCreaturePermanent(filter); diff --git a/Mage.Sets/src/mage/cards/t/Threaten.java b/Mage.Sets/src/mage/cards/t/Threaten.java index 6dfbd42c48..99759fa85d 100644 --- a/Mage.Sets/src/mage/cards/t/Threaten.java +++ b/Mage.Sets/src/mage/cards/t/Threaten.java @@ -45,11 +45,11 @@ import mage.target.common.TargetCreaturePermanent; public class Threaten extends CardImpl { public Threaten(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}"); - this.getSpellAbility().addEffect(new UntapTargetEffect()); - this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap target creature")); + this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn).setText("and gain control of it until end of turn")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("It gains haste until end of turn.")); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } diff --git a/Mage.Sets/src/mage/cards/t/ThreeWishes.java b/Mage.Sets/src/mage/cards/t/ThreeWishes.java index 4ce11513ca..67f6b3e521 100644 --- a/Mage.Sets/src/mage/cards/t/ThreeWishes.java +++ b/Mage.Sets/src/mage/cards/t/ThreeWishes.java @@ -1,220 +1,220 @@ -/* - * 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.cards.t; - -import java.util.Set; -import java.util.UUID; -import mage.MageObject; -import mage.abilities.Ability; -import mage.abilities.DelayedTriggeredAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.common.delayed.AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility; -import mage.abilities.effects.AsThoughEffectImpl; -import mage.abilities.effects.ContinuousEffect; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.AsThoughEffectType; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.ExileZone; -import mage.game.Game; -import mage.players.Player; -import mage.target.targetpointer.FixedTarget; -import mage.util.CardUtil; - -/** - * - * @author jeffwadsworth - */ -public class ThreeWishes extends CardImpl { - - public ThreeWishes(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}{U}"); - - // Exile the top three cards of your library face down. You may look at those cards for as long as they remain exiled. Until your next turn, you may play those cards. At the beginning of your next upkeep, put any of those cards you didn't play into your graveyard. - this.getSpellAbility().addEffect(new ThreeWishesExileEffect()); - this.addAbility(new SimpleStaticAbility(Zone.ALL, new ThreeWishesLookAtCardEffect())); - - } - - public ThreeWishes(final ThreeWishes card) { - super(card); - } - - @Override - public ThreeWishes copy() { - return new ThreeWishes(this); - } -} - -class ThreeWishesExileEffect extends OneShotEffect { - - public ThreeWishesExileEffect() { - super(Outcome.DrawCard); - staticText = "Exile the top three cards of your library face down. Until your next turn, you may play those cards. At the beginning of your next upkeep, put any of those cards you didn't play into your graveyard"; - } - - public ThreeWishesExileEffect(final ThreeWishesExileEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), 0); - Set topThreeCards = controller.getLibrary().getTopCards(game, 3); - for (Card card : topThreeCards) { - if (controller.moveCardsToExile(card, source, game, true, exileId, "Three Wishes")) { - card.setFaceDown(true, game); - ContinuousEffect effect = new ThreeWishesPlayFromExileEffect(); - effect.setTargetPointer(new FixedTarget(card.getId())); - game.addEffect(effect, source); - } - } - DelayedTriggeredAbility delayed = new AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(new ThreeWishesPutIntoGraveyardEffect()); - game.addDelayedTriggeredAbility(delayed, source); - return true; - } - return false; - } - - @Override - public ThreeWishesExileEffect copy() { - return new ThreeWishesExileEffect(this); - } -} - -class ThreeWishesPutIntoGraveyardEffect extends OneShotEffect { - - public ThreeWishesPutIntoGraveyardEffect() { - super(Outcome.Neutral); - staticText = "At the beginning of your next upkeep, put any of those cards you didn't play into your graveyard"; - } - - public ThreeWishesPutIntoGraveyardEffect(final ThreeWishesPutIntoGraveyardEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), 0); - Set cardsInExile = game.getExile().getExileZone(exileId).getCards(game); - if (cardsInExile != null) { - controller.moveCardsToGraveyardWithInfo(cardsInExile, source, game, Zone.EXILED); - return true; - } - } - return false; - } - - @Override - public ThreeWishesPutIntoGraveyardEffect copy() { - return new ThreeWishesPutIntoGraveyardEffect(this); - } -} - -class ThreeWishesLookAtCardEffect extends AsThoughEffectImpl { - - public ThreeWishesLookAtCardEffect() { - super(AsThoughEffectType.LOOK_AT_FACE_DOWN, Duration.Custom, Outcome.Benefit); - staticText = "You may look at cards exiled with {this} as long as they remain exiled"; - } - - public ThreeWishesLookAtCardEffect(final ThreeWishesLookAtCardEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } - - @Override - public ThreeWishesLookAtCardEffect copy() { - return new ThreeWishesLookAtCardEffect(this); - } - - @Override - public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { - if (affectedControllerId.equals(source.getControllerId())) { - Card card = game.getCard(objectId); - if (card != null) { - MageObject sourceObject = game.getObject(source.getSourceId()); - if (sourceObject == null) { - return false; - } - UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), 0); - ExileZone exile = game.getExile().getExileZone(exileId); - return exile != null - && exile.contains(card.getId()); - } - } - return false; - } -} - -class ThreeWishesPlayFromExileEffect extends AsThoughEffectImpl { - - ThreeWishesPlayFromExileEffect() { - super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.UntilYourNextTurn, Outcome.Benefit); - staticText = "Until your next turn, you may play those cards"; - } - - ThreeWishesPlayFromExileEffect(final ThreeWishesPlayFromExileEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } - - @Override - public ThreeWishesPlayFromExileEffect copy() { - return new ThreeWishesPlayFromExileEffect(this); - } - - @Override - public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { - UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), 0); - ExileZone exile = game.getExile().getExileZone(exileId); - return exile != null - && getTargetPointer().getFirst(game, source) != null - && getTargetPointer().getFirst(game, source).equals(sourceId) - && source.getControllerId().equals(affectedControllerId) - && game.getState().getZone(sourceId) == Zone.EXILED - && exile.contains(sourceId); - } -} +/* + * 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.cards.t; + +import java.util.Set; +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.delayed.AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AsThoughEffectType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.ExileZone; +import mage.game.Game; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; +import mage.util.CardUtil; + +/** + * + * @author jeffwadsworth + */ +public class ThreeWishes extends CardImpl { + + public ThreeWishes(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}{U}"); + + // Exile the top three cards of your library face down. You may look at those cards for as long as they remain exiled. Until your next turn, you may play those cards. At the beginning of your next upkeep, put any of those cards you didn't play into your graveyard. + this.getSpellAbility().addEffect(new ThreeWishesExileEffect()); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new ThreeWishesLookAtCardEffect())); + + } + + public ThreeWishes(final ThreeWishes card) { + super(card); + } + + @Override + public ThreeWishes copy() { + return new ThreeWishes(this); + } +} + +class ThreeWishesExileEffect extends OneShotEffect { + + public ThreeWishesExileEffect() { + super(Outcome.DrawCard); + staticText = "Exile the top three cards of your library face down. Until your next turn, you may play those cards. At the beginning of your next upkeep, put any of those cards you didn't play into your graveyard"; + } + + public ThreeWishesExileEffect(final ThreeWishesExileEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), 0); + Set topThreeCards = controller.getLibrary().getTopCards(game, 3); + for (Card card : topThreeCards) { + if (controller.moveCardsToExile(card, source, game, true, exileId, "Three Wishes")) { + card.setFaceDown(true, game); + ContinuousEffect effect = new ThreeWishesPlayFromExileEffect(); + effect.setTargetPointer(new FixedTarget(card.getId())); + game.addEffect(effect, source); + } + } + DelayedTriggeredAbility delayed = new AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(new ThreeWishesPutIntoGraveyardEffect()); + game.addDelayedTriggeredAbility(delayed, source); + return true; + } + return false; + } + + @Override + public ThreeWishesExileEffect copy() { + return new ThreeWishesExileEffect(this); + } +} + +class ThreeWishesPutIntoGraveyardEffect extends OneShotEffect { + + public ThreeWishesPutIntoGraveyardEffect() { + super(Outcome.Neutral); + staticText = "At the beginning of your next upkeep, put any of those cards you didn't play into your graveyard"; + } + + public ThreeWishesPutIntoGraveyardEffect(final ThreeWishesPutIntoGraveyardEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), 0); + Set cardsInExile = game.getExile().getExileZone(exileId).getCards(game); + if (cardsInExile != null) { + controller.moveCardsToGraveyardWithInfo(cardsInExile, source, game, Zone.EXILED); + return true; + } + } + return false; + } + + @Override + public ThreeWishesPutIntoGraveyardEffect copy() { + return new ThreeWishesPutIntoGraveyardEffect(this); + } +} + +class ThreeWishesLookAtCardEffect extends AsThoughEffectImpl { + + public ThreeWishesLookAtCardEffect() { + super(AsThoughEffectType.LOOK_AT_FACE_DOWN, Duration.Custom, Outcome.Benefit); + staticText = "You may look at cards exiled with {this} as long as they remain exiled"; + } + + public ThreeWishesLookAtCardEffect(final ThreeWishesLookAtCardEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public ThreeWishesLookAtCardEffect copy() { + return new ThreeWishesLookAtCardEffect(this); + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + if (affectedControllerId.equals(source.getControllerId())) { + Card card = game.getCard(objectId); + if (card != null) { + MageObject sourceObject = game.getObject(source.getSourceId()); + if (sourceObject == null) { + return false; + } + UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), 0); + ExileZone exile = game.getExile().getExileZone(exileId); + return exile != null + && exile.contains(card.getId()); + } + } + return false; + } +} + +class ThreeWishesPlayFromExileEffect extends AsThoughEffectImpl { + + ThreeWishesPlayFromExileEffect() { + super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.UntilYourNextTurn, Outcome.Benefit); + staticText = "Until your next turn, you may play those cards"; + } + + ThreeWishesPlayFromExileEffect(final ThreeWishesPlayFromExileEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public ThreeWishesPlayFromExileEffect copy() { + return new ThreeWishesPlayFromExileEffect(this); + } + + @Override + public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { + UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), 0); + ExileZone exile = game.getExile().getExileZone(exileId); + return exile != null + && getTargetPointer().getFirst(game, source) != null + && getTargetPointer().getFirst(game, source).equals(sourceId) + && source.getControllerId().equals(affectedControllerId) + && game.getState().getZone(sourceId) == Zone.EXILED + && exile.contains(sourceId); + } +} diff --git a/Mage.Sets/src/mage/cards/t/ThresherLizard.java b/Mage.Sets/src/mage/cards/t/ThresherLizard.java index 180d3dc3a4..430012a710 100644 --- a/Mage.Sets/src/mage/cards/t/ThresherLizard.java +++ b/Mage.Sets/src/mage/cards/t/ThresherLizard.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class ThresherLizard extends CardImpl { public ThresherLizard(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThrillKillAssassin.java b/Mage.Sets/src/mage/cards/t/ThrillKillAssassin.java index 4e6c3961f8..d463ffead8 100644 --- a/Mage.Sets/src/mage/cards/t/ThrillKillAssassin.java +++ b/Mage.Sets/src/mage/cards/t/ThrillKillAssassin.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.UnleashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ThrillKillAssassin extends CardImpl { public ThrillKillAssassin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThrissNantukoPrimus.java b/Mage.Sets/src/mage/cards/t/ThrissNantukoPrimus.java index 9e4bb84eb7..7d77ec138a 100644 --- a/Mage.Sets/src/mage/cards/t/ThrissNantukoPrimus.java +++ b/Mage.Sets/src/mage/cards/t/ThrissNantukoPrimus.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class ThrissNantukoPrimus extends CardImpl { public ThrissNantukoPrimus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Insect"); - this.subtype.add("Druid"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.DRUID); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/ThrivingGrubs.java b/Mage.Sets/src/mage/cards/t/ThrivingGrubs.java index 548f604447..1899920606 100644 --- a/Mage.Sets/src/mage/cards/t/ThrivingGrubs.java +++ b/Mage.Sets/src/mage/cards/t/ThrivingGrubs.java @@ -1,71 +1,72 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.AttacksTriggeredAbility; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.common.PayEnergyCost; -import mage.abilities.effects.common.DoIfCostPaid; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.counters.CounterType; - -/** - * - * @author LevelX2 - */ -public class ThrivingGrubs extends CardImpl { - - public ThrivingGrubs(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Gremlin"); - this.power = new MageInt(2); - this.toughness = new MageInt(1); - - // When Thriving Grubs enters the battlefield, you get {E}{E}. - this.addAbility(new EntersBattlefieldTriggeredAbility(new GetEnergyCountersControllerEffect(2), false)); - - // Whenever Thriving Grubs attacks, you may pay {E}{E}. If you do, put a +1/+1 counter on it. - this.addAbility(new AttacksTriggeredAbility(new DoIfCostPaid(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new PayEnergyCost(2)), false, - "Whenever {this} attacks you may pay {E}{E}. If you do, put a +1/+1 counter on it.")); - } - - public ThrivingGrubs(final ThrivingGrubs card) { - super(card); - } - - @Override - public ThrivingGrubs copy() { - return new ThrivingGrubs(this); - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.common.PayEnergyCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; + +/** + * + * @author LevelX2 + */ +public class ThrivingGrubs extends CardImpl { + + public ThrivingGrubs(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); + this.subtype.add(SubType.GREMLIN); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // When Thriving Grubs enters the battlefield, you get {E}{E}. + this.addAbility(new EntersBattlefieldTriggeredAbility(new GetEnergyCountersControllerEffect(2), false)); + + // Whenever Thriving Grubs attacks, you may pay {E}{E}. If you do, put a +1/+1 counter on it. + this.addAbility(new AttacksTriggeredAbility(new DoIfCostPaid(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new PayEnergyCost(2)), false, + "Whenever {this} attacks you may pay {E}{E}. If you do, put a +1/+1 counter on it.")); + } + + public ThrivingGrubs(final ThrivingGrubs card) { + super(card); + } + + @Override + public ThrivingGrubs copy() { + return new ThrivingGrubs(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/ThrivingIbex.java b/Mage.Sets/src/mage/cards/t/ThrivingIbex.java index 57c82aa6e4..9b1172100f 100644 --- a/Mage.Sets/src/mage/cards/t/ThrivingIbex.java +++ b/Mage.Sets/src/mage/cards/t/ThrivingIbex.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -48,7 +49,7 @@ public class ThrivingIbex extends CardImpl { public ThrivingIbex(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Goat"); + this.subtype.add(SubType.GOAT); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/ThrivingRats.java b/Mage.Sets/src/mage/cards/t/ThrivingRats.java index b399cbbe00..01ab437233 100644 --- a/Mage.Sets/src/mage/cards/t/ThrivingRats.java +++ b/Mage.Sets/src/mage/cards/t/ThrivingRats.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -48,7 +49,7 @@ public class ThrivingRats extends CardImpl { public ThrivingRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThrivingRhino.java b/Mage.Sets/src/mage/cards/t/ThrivingRhino.java index b7057a0c03..8d469140c8 100644 --- a/Mage.Sets/src/mage/cards/t/ThrivingRhino.java +++ b/Mage.Sets/src/mage/cards/t/ThrivingRhino.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -48,7 +49,7 @@ public class ThrivingRhino extends CardImpl { public ThrivingRhino(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Rhino"); + this.subtype.add(SubType.RHINO); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/ThrivingTurtle.java b/Mage.Sets/src/mage/cards/t/ThrivingTurtle.java index f2eaaf90ad..d3935448fa 100644 --- a/Mage.Sets/src/mage/cards/t/ThrivingTurtle.java +++ b/Mage.Sets/src/mage/cards/t/ThrivingTurtle.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -48,7 +49,7 @@ public class ThrivingTurtle extends CardImpl { public ThrivingTurtle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Turtle"); + this.subtype.add(SubType.TURTLE); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/ThroatSlitter.java b/Mage.Sets/src/mage/cards/t/ThroatSlitter.java index 887b7624ae..a34785d4d3 100644 --- a/Mage.Sets/src/mage/cards/t/ThroatSlitter.java +++ b/Mage.Sets/src/mage/cards/t/ThroatSlitter.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.NinjutsuAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -56,8 +57,8 @@ public class ThroatSlitter extends CardImpl { public ThroatSlitter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Rat"); - this.subtype.add("Ninja"); + this.subtype.add(SubType.RAT); + this.subtype.add(SubType.NINJA); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThromokTheInsatiable.java b/Mage.Sets/src/mage/cards/t/ThromokTheInsatiable.java index ade004327f..f3cd1fd384 100644 --- a/Mage.Sets/src/mage/cards/t/ThromokTheInsatiable.java +++ b/Mage.Sets/src/mage/cards/t/ThromokTheInsatiable.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.DevourAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -45,7 +46,7 @@ public class ThromokTheInsatiable extends CardImpl { public ThromokTheInsatiable(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Hellion"); + this.subtype.add(SubType.HELLION); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/t/ThroneOfTheGodPharaoh.java b/Mage.Sets/src/mage/cards/t/ThroneOfTheGodPharaoh.java index 35a918525c..58a2f658d1 100644 --- a/Mage.Sets/src/mage/cards/t/ThroneOfTheGodPharaoh.java +++ b/Mage.Sets/src/mage/cards/t/ThroneOfTheGodPharaoh.java @@ -1,72 +1,72 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.abilities.common.BeginningOfEndStepTriggeredAbility; -import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.effects.common.LoseLifeOpponentsEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SuperType; -import mage.constants.TargetController; -import mage.filter.FilterPermanent; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.predicate.permanent.TappedPredicate; - -/** - * - * @author Styxo - */ -public class ThroneOfTheGodPharaoh extends CardImpl { - - private static final FilterPermanent filter = new FilterControlledCreaturePermanent("tapped creature you control"); - - static { - filter.add(new TappedPredicate()); - } - - public ThroneOfTheGodPharaoh(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); - - addSuperType(SuperType.LEGENDARY); - - // At the beginning of your end step, each opponent loses life equal to the number of tapped creatures you control. - this.addAbility(new BeginningOfEndStepTriggeredAbility(new LoseLifeOpponentsEffect(new PermanentsOnBattlefieldCount(filter)), TargetController.YOU, false)); - } - - public ThroneOfTheGodPharaoh(final ThroneOfTheGodPharaoh card) { - super(card); - } - - @Override - public ThroneOfTheGodPharaoh copy() { - return new ThroneOfTheGodPharaoh(this); - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SuperType; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.permanent.TappedPredicate; + +/** + * + * @author Styxo + */ +public class ThroneOfTheGodPharaoh extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledCreaturePermanent("tapped creature you control"); + + static { + filter.add(new TappedPredicate()); + } + + public ThroneOfTheGodPharaoh(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + addSuperType(SuperType.LEGENDARY); + + // At the beginning of your end step, each opponent loses life equal to the number of tapped creatures you control. + this.addAbility(new BeginningOfEndStepTriggeredAbility(new LoseLifeOpponentsEffect(new PermanentsOnBattlefieldCount(filter)), TargetController.YOU, false)); + } + + public ThroneOfTheGodPharaoh(final ThroneOfTheGodPharaoh card) { + super(card); + } + + @Override + public ThroneOfTheGodPharaoh copy() { + return new ThroneOfTheGodPharaoh(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/ThroneWarden.java b/Mage.Sets/src/mage/cards/t/ThroneWarden.java index 6d64464a9f..ffaaf0957b 100644 --- a/Mage.Sets/src/mage/cards/t/ThroneWarden.java +++ b/Mage.Sets/src/mage/cards/t/ThroneWarden.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; @@ -48,8 +49,8 @@ public class ThroneWarden extends CardImpl { public ThroneWarden(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThroughTheBreach.java b/Mage.Sets/src/mage/cards/t/ThroughTheBreach.java index 714e4d80c4..579d9fe66b 100644 --- a/Mage.Sets/src/mage/cards/t/ThroughTheBreach.java +++ b/Mage.Sets/src/mage/cards/t/ThroughTheBreach.java @@ -42,6 +42,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -60,7 +61,7 @@ public class ThroughTheBreach extends CardImpl { public ThroughTheBreach(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // You may put a creature card from your hand onto the battlefield. That creature gains haste. Sacrifice that creature at the beginning of the next end step. this.getSpellAbility().addEffect(new ThroughTheBreachEffect()); diff --git a/Mage.Sets/src/mage/cards/t/ThrowingKnife.java b/Mage.Sets/src/mage/cards/t/ThrowingKnife.java index 34cb799665..2bf4ca5f6e 100644 --- a/Mage.Sets/src/mage/cards/t/ThrowingKnife.java +++ b/Mage.Sets/src/mage/cards/t/ThrowingKnife.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -53,7 +54,7 @@ public class ThrowingKnife extends CardImpl { public ThrowingKnife(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0))); diff --git a/Mage.Sets/src/mage/cards/t/ThrullChampion.java b/Mage.Sets/src/mage/cards/t/ThrullChampion.java index 61d8eb83a1..a55a78d39b 100644 --- a/Mage.Sets/src/mage/cards/t/ThrullChampion.java +++ b/Mage.Sets/src/mage/cards/t/ThrullChampion.java @@ -61,7 +61,7 @@ public class ThrullChampion extends CardImpl { public ThrullChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Thrull"); + this.subtype.add(SubType.THRULL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThrullParasite.java b/Mage.Sets/src/mage/cards/t/ThrullParasite.java index d34fbf122f..66409b8965 100644 --- a/Mage.Sets/src/mage/cards/t/ThrullParasite.java +++ b/Mage.Sets/src/mage/cards/t/ThrullParasite.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ExtortAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetNonlandPermanent; @@ -49,7 +50,7 @@ public class ThrullParasite extends CardImpl { public ThrullParasite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Thrull"); + this.subtype.add(SubType.THRULL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThrullRetainer.java b/Mage.Sets/src/mage/cards/t/ThrullRetainer.java index 6adaeb011d..00e1002bc7 100644 --- a/Mage.Sets/src/mage/cards/t/ThrullRetainer.java +++ b/Mage.Sets/src/mage/cards/t/ThrullRetainer.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class ThrullRetainer extends CardImpl { public ThrullRetainer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/t/ThrullSurgeon.java b/Mage.Sets/src/mage/cards/t/ThrullSurgeon.java index f1eb1e7d6b..6d1fc04715 100644 --- a/Mage.Sets/src/mage/cards/t/ThrullSurgeon.java +++ b/Mage.Sets/src/mage/cards/t/ThrullSurgeon.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -55,7 +56,7 @@ public class ThrullSurgeon extends CardImpl { public ThrullSurgeon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Thrull"); + this.subtype.add(SubType.THRULL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThrullWizard.java b/Mage.Sets/src/mage/cards/t/ThrullWizard.java new file mode 100644 index 0000000000..0e6663321f --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/ThrullWizard.java @@ -0,0 +1,83 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.OrCost; +import mage.abilities.costs.mana.ColoredManaCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.TargetSpell; + +/** + * + * @author L_J + */ +public class ThrullWizard extends CardImpl { + private static final FilterSpell filter = new FilterSpell("black spell"); + static{ + filter.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public ThrullWizard(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); + this.subtype.add(SubType.THRULL); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}{B}: Counter target black spell unless that spell's controller pays {B} or {3}. + Cost cost = new OrCost(new ColoredManaCost(ColoredManaSymbol.B), new GenericManaCost(3), "pay {B} or pay {3}"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(cost), new ManaCostsImpl("{1}{B}")); + ability.addTarget(new TargetSpell(filter)); + this.addAbility(ability); + } + + public ThrullWizard(final ThrullWizard card) { + super(card); + } + + @Override + public ThrullWizard copy() { + return new ThrullWizard(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/Thrummingbird.java b/Mage.Sets/src/mage/cards/t/Thrummingbird.java index 7f97247fce..d45910ee29 100644 --- a/Mage.Sets/src/mage/cards/t/Thrummingbird.java +++ b/Mage.Sets/src/mage/cards/t/Thrummingbird.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki, nantuko, North @@ -44,8 +45,8 @@ public class Thrummingbird extends CardImpl { public Thrummingbird(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Horror"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.HORROR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThrunTheLastTroll.java b/Mage.Sets/src/mage/cards/t/ThrunTheLastTroll.java index f8f1e40f73..7daa4393d8 100644 --- a/Mage.Sets/src/mage/cards/t/ThrunTheLastTroll.java +++ b/Mage.Sets/src/mage/cards/t/ThrunTheLastTroll.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class ThrunTheLastTroll extends CardImpl { public ThrunTheLastTroll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Troll"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.TROLL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/ThunderBrute.java b/Mage.Sets/src/mage/cards/t/ThunderBrute.java index 4df282e2fd..bdfab986d1 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderBrute.java +++ b/Mage.Sets/src/mage/cards/t/ThunderBrute.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TributeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -50,7 +51,7 @@ public class ThunderBrute extends CardImpl { public ThunderBrute(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Cyclops"); + this.subtype.add(SubType.CYCLOPS); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/ThunderDragon.java b/Mage.Sets/src/mage/cards/t/ThunderDragon.java index 876a24593c..00068fed6c 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderDragon.java +++ b/Mage.Sets/src/mage/cards/t/ThunderDragon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -54,7 +55,7 @@ public class ThunderDragon extends CardImpl { public ThunderDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/ThunderSpirit.java b/Mage.Sets/src/mage/cards/t/ThunderSpirit.java index 4ce500a997..adbddea4b4 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderSpirit.java +++ b/Mage.Sets/src/mage/cards/t/ThunderSpirit.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ThunderSpirit extends CardImpl { public ThunderSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Elemental"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThunderThrashElder.java b/Mage.Sets/src/mage/cards/t/ThunderThrashElder.java index da9e771e42..002de62a16 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderThrashElder.java +++ b/Mage.Sets/src/mage/cards/t/ThunderThrashElder.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.DevourAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ThunderThrashElder extends CardImpl { public ThunderThrashElder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Viashino"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThunderTotem.java b/Mage.Sets/src/mage/cards/t/ThunderTotem.java index 44b0456b5e..78f1abe540 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderTotem.java +++ b/Mage.Sets/src/mage/cards/t/ThunderTotem.java @@ -38,6 +38,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -76,7 +77,7 @@ private static class ThunderTotemToken extends Token { cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); color.setWhite(true); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); power = new MageInt(2); toughness = new MageInt(2); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/t/ThunderWall.java b/Mage.Sets/src/mage/cards/t/ThunderWall.java index f02bc5b8f9..4c358cef38 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderWall.java +++ b/Mage.Sets/src/mage/cards/t/ThunderWall.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class ThunderWall extends CardImpl { public ThunderWall(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/Thunderblust.java b/Mage.Sets/src/mage/cards/t/Thunderblust.java index 9b30b9aa95..b19583cc8d 100644 --- a/Mage.Sets/src/mage/cards/t/Thunderblust.java +++ b/Mage.Sets/src/mage/cards/t/Thunderblust.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -53,7 +54,7 @@ public class Thunderblust extends CardImpl { public Thunderblust(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(7); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThunderbreakRegent.java b/Mage.Sets/src/mage/cards/t/ThunderbreakRegent.java index adf38c535d..b751837ded 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderbreakRegent.java +++ b/Mage.Sets/src/mage/cards/t/ThunderbreakRegent.java @@ -54,7 +54,7 @@ public class ThunderbreakRegent extends CardImpl { public ThunderbreakRegent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/Thunderclap.java b/Mage.Sets/src/mage/cards/t/Thunderclap.java new file mode 100644 index 0000000000..e4f0731f42 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/Thunderclap.java @@ -0,0 +1,74 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.costs.AlternativeCostSourceAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class Thunderclap extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Mountain"); + + static { + filter.add(new SubtypePredicate(SubType.MOUNTAIN)); + } + + public Thunderclap(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); + + // You may sacrifice a Mountain rather than pay Thunderclap's mana cost. + this.addAbility(new AlternativeCostSourceAbility(new SacrificeTargetCost(new TargetControlledPermanent(filter)))); + + // Thunderclap deals 3 damage to target creature. + this.getSpellAbility().addEffect(new DamageTargetEffect(3)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public Thunderclap(final Thunderclap card) { + super(card); + } + + @Override + public Thunderclap copy() { + return new Thunderclap(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/ThunderclapWyvern.java b/Mage.Sets/src/mage/cards/t/ThunderclapWyvern.java index 7c66d9f926..a3eb20740a 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderclapWyvern.java +++ b/Mage.Sets/src/mage/cards/t/ThunderclapWyvern.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -56,7 +57,7 @@ public class ThunderclapWyvern extends CardImpl { public ThunderclapWyvern(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/ThundercloudElemental.java b/Mage.Sets/src/mage/cards/t/ThundercloudElemental.java index d981b50600..337097a833 100644 --- a/Mage.Sets/src/mage/cards/t/ThundercloudElemental.java +++ b/Mage.Sets/src/mage/cards/t/ThundercloudElemental.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; @@ -61,7 +62,7 @@ public class ThundercloudElemental extends CardImpl { public ThundercloudElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/ThundercloudShaman.java b/Mage.Sets/src/mage/cards/t/ThundercloudShaman.java index 24e140fe2c..fe3b8590c0 100644 --- a/Mage.Sets/src/mage/cards/t/ThundercloudShaman.java +++ b/Mage.Sets/src/mage/cards/t/ThundercloudShaman.java @@ -59,8 +59,8 @@ public class ThundercloudShaman extends CardImpl { public ThundercloudShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/ThunderfootBaloth.java b/Mage.Sets/src/mage/cards/t/ThunderfootBaloth.java index d809fef36f..bbbec4aa90 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderfootBaloth.java +++ b/Mage.Sets/src/mage/cards/t/ThunderfootBaloth.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterControlledCreaturePermanent; @@ -49,7 +50,7 @@ public class ThunderfootBaloth extends CardImpl { public ThunderfootBaloth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/ThunderingGiant.java b/Mage.Sets/src/mage/cards/t/ThunderingGiant.java index 016a353c8c..3db5ba223c 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderingGiant.java +++ b/Mage.Sets/src/mage/cards/t/ThunderingGiant.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class ThunderingGiant extends CardImpl { public ThunderingGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/ThunderingSpineback.java b/Mage.Sets/src/mage/cards/t/ThunderingSpineback.java new file mode 100644 index 0000000000..29df536a79 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/ThunderingSpineback.java @@ -0,0 +1,81 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.DinosaurToken; + +/** + * + * @author TheElk801 + */ +public class ThunderingSpineback extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Dinosaurs"); + + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + } + + public ThunderingSpineback(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Other Dinosaurs you control get +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true))); + + // {5}{G}: Create a 3/3 green Dinosaur creature token with trample. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new DinosaurToken()), new ManaCostsImpl("{5}{G}"))); + } + + public ThunderingSpineback(final ThunderingSpineback card) { + super(card); + } + + @Override + public ThunderingSpineback copy() { + return new ThunderingSpineback(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/ThunderingTanadon.java b/Mage.Sets/src/mage/cards/t/ThunderingTanadon.java index c42ea44bbc..030a3ad1cf 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderingTanadon.java +++ b/Mage.Sets/src/mage/cards/t/ThunderingTanadon.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class ThunderingTanadon extends CardImpl { public ThunderingTanadon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{G/P}{G/P}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/ThunderingWurm.java b/Mage.Sets/src/mage/cards/t/ThunderingWurm.java index e28d9ff26b..b4180c92c6 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderingWurm.java +++ b/Mage.Sets/src/mage/cards/t/ThunderingWurm.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterLandCard; /** @@ -46,7 +47,7 @@ public class ThunderingWurm extends CardImpl { public ThunderingWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/Thundermare.java b/Mage.Sets/src/mage/cards/t/Thundermare.java index 96d802962b..45ed4058b9 100644 --- a/Mage.Sets/src/mage/cards/t/Thundermare.java +++ b/Mage.Sets/src/mage/cards/t/Thundermare.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -52,8 +53,8 @@ public class Thundermare extends CardImpl { public Thundermare(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Horse"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.HORSE); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/ThundermawHellkite.java b/Mage.Sets/src/mage/cards/t/ThundermawHellkite.java index 4ee31dfbbd..07bc483ef3 100644 --- a/Mage.Sets/src/mage/cards/t/ThundermawHellkite.java +++ b/Mage.Sets/src/mage/cards/t/ThundermawHellkite.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -61,7 +62,7 @@ public class ThundermawHellkite extends CardImpl { public ThundermawHellkite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/ThunderousMight.java b/Mage.Sets/src/mage/cards/t/ThunderousMight.java index 31dd1b480c..4ccc37d296 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderousMight.java +++ b/Mage.Sets/src/mage/cards/t/ThunderousMight.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Outcome; @@ -53,7 +54,7 @@ public class ThunderousMight extends CardImpl { public ThunderousMight(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/t/ThunderscapeApprentice.java b/Mage.Sets/src/mage/cards/t/ThunderscapeApprentice.java index cd67b60a25..212c322ed1 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderscapeApprentice.java +++ b/Mage.Sets/src/mage/cards/t/ThunderscapeApprentice.java @@ -49,8 +49,8 @@ public class ThunderscapeApprentice extends CardImpl { public ThunderscapeApprentice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThunderscapeBattlemage.java b/Mage.Sets/src/mage/cards/t/ThunderscapeBattlemage.java index 28f8f81e4d..3d4ca98789 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderscapeBattlemage.java +++ b/Mage.Sets/src/mage/cards/t/ThunderscapeBattlemage.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; import mage.target.common.TargetEnchantmentPermanent; @@ -50,8 +51,8 @@ public class ThunderscapeBattlemage extends CardImpl { public ThunderscapeBattlemage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ThunderscapeFamiliar.java b/Mage.Sets/src/mage/cards/t/ThunderscapeFamiliar.java index d3dba53206..c23d59f7dd 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderscapeFamiliar.java +++ b/Mage.Sets/src/mage/cards/t/ThunderscapeFamiliar.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; @@ -57,7 +58,7 @@ public class ThunderscapeFamiliar extends CardImpl { public ThunderscapeFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ThunderscapeMaster.java b/Mage.Sets/src/mage/cards/t/ThunderscapeMaster.java index 9216958ddb..f7e84c7e1a 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderscapeMaster.java +++ b/Mage.Sets/src/mage/cards/t/ThunderscapeMaster.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -50,16 +51,16 @@ import mage.target.TargetPlayer; public class ThunderscapeMaster extends CardImpl { public ThunderscapeMaster(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); // {B}{B}, {tap}: Target player loses 2 life and you gain 2 life. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2), new ManaCostsImpl("{B}{B}")); - ability.addEffect(new GainLifeEffect(2)); + ability.addEffect(new GainLifeEffect(2).setText("and you gain 2 life")); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetPlayer()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/t/ThundersongTrumpeter.java b/Mage.Sets/src/mage/cards/t/ThundersongTrumpeter.java index 2d9d71bfb0..408bb96c4b 100644 --- a/Mage.Sets/src/mage/cards/t/ThundersongTrumpeter.java +++ b/Mage.Sets/src/mage/cards/t/ThundersongTrumpeter.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.combat.CantAttackBlockTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class ThundersongTrumpeter extends CardImpl { public ThundersongTrumpeter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TibaltTheFiendBlooded.java b/Mage.Sets/src/mage/cards/t/TibaltTheFiendBlooded.java index 7eef24fe26..15a47fdcfa 100644 --- a/Mage.Sets/src/mage/cards/t/TibaltTheFiendBlooded.java +++ b/Mage.Sets/src/mage/cards/t/TibaltTheFiendBlooded.java @@ -46,6 +46,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -67,7 +68,7 @@ public class TibaltTheFiendBlooded extends CardImpl { public TibaltTheFiendBlooded(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{R}{R}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Tibalt"); + this.subtype.add(SubType.TIBALT); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(2)); diff --git a/Mage.Sets/src/mage/cards/t/TiborAndLumia.java b/Mage.Sets/src/mage/cards/t/TiborAndLumia.java index ebca40d9fa..a1f9937ffe 100644 --- a/Mage.Sets/src/mage/cards/t/TiborAndLumia.java +++ b/Mage.Sets/src/mage/cards/t/TiborAndLumia.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.filter.FilterSpell; @@ -66,8 +67,8 @@ public class TiborAndLumia extends CardImpl { public TiborAndLumia(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TickingGnomes.java b/Mage.Sets/src/mage/cards/t/TickingGnomes.java index cbd40e1acd..e7699c17e4 100644 --- a/Mage.Sets/src/mage/cards/t/TickingGnomes.java +++ b/Mage.Sets/src/mage/cards/t/TickingGnomes.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,7 +49,7 @@ public class TickingGnomes extends CardImpl { public TickingGnomes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Gnome"); + this.subtype.add(SubType.GNOME); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TidalControl.java b/Mage.Sets/src/mage/cards/t/TidalControl.java new file mode 100644 index 0000000000..a6d02a23fa --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TidalControl.java @@ -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.cards.t; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.CostImpl; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.costs.OrCost; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.abilities.effects.common.InfoEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.TargetSpell; + +/** + * + * @author L_J + */ +public class TidalControl extends CardImpl { + private static final FilterSpell filter = new FilterSpell("red or green spell"); + static{ + filter.add(Predicates.or(new ColorPredicate(ObjectColor.RED), new ColorPredicate(ObjectColor.GREEN))); + } + + public TidalControl(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}{U}"); + + // Cumulative upkeep-Pay {2}. + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{2}"))); + + // Pay 2 life or {2}: Counter target red or green spell. Any player may activate this ability. + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new OrCost(new PayLifeCost(2), new ManaCostsImpl("{2}"), "pay 2 life or pay {2}")); + ability.addTarget(new TargetSpell(filter)); + ability.setMayActivate(TargetController.ANY); + ability.addEffect(new InfoEffect("Any player may activate this ability")); + this.addAbility(ability); + } + + public TidalControl(final TidalControl card) { + super(card); + } + + @Override + public TidalControl copy() { + return new TidalControl(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TidalCourier.java b/Mage.Sets/src/mage/cards/t/TidalCourier.java index 0434d0d773..289ebab72d 100644 --- a/Mage.Sets/src/mage/cards/t/TidalCourier.java +++ b/Mage.Sets/src/mage/cards/t/TidalCourier.java @@ -58,7 +58,7 @@ public class TidalCourier extends CardImpl { public TidalCourier(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TidalForce.java b/Mage.Sets/src/mage/cards/t/TidalForce.java index 45fb6dcb64..5d78700e4a 100644 --- a/Mage.Sets/src/mage/cards/t/TidalForce.java +++ b/Mage.Sets/src/mage/cards/t/TidalForce.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.MayTapOrUntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.target.TargetPermanent; @@ -46,7 +47,7 @@ public class TidalForce extends CardImpl { public TidalForce(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/t/TidalKraken.java b/Mage.Sets/src/mage/cards/t/TidalKraken.java index 845ee94135..e0e7177e73 100644 --- a/Mage.Sets/src/mage/cards/t/TidalKraken.java +++ b/Mage.Sets/src/mage/cards/t/TidalKraken.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class TidalKraken extends CardImpl { public TidalKraken(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}{U}"); - this.subtype.add("Kraken"); + this.subtype.add(SubType.KRAKEN); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/t/TidalVisionary.java b/Mage.Sets/src/mage/cards/t/TidalVisionary.java index af1aa451e2..d575930d60 100644 --- a/Mage.Sets/src/mage/cards/t/TidalVisionary.java +++ b/Mage.Sets/src/mage/cards/t/TidalVisionary.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BecomesColorTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class TidalVisionary extends CardImpl { public TidalVisionary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TidalWarrior.java b/Mage.Sets/src/mage/cards/t/TidalWarrior.java index df63162431..0030bfd759 100644 --- a/Mage.Sets/src/mage/cards/t/TidalWarrior.java +++ b/Mage.Sets/src/mage/cards/t/TidalWarrior.java @@ -51,8 +51,8 @@ public class TidalWarrior extends CardImpl { public TidalWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TideDrifter.java b/Mage.Sets/src/mage/cards/t/TideDrifter.java index 6e80d4f15a..368c126fb5 100644 --- a/Mage.Sets/src/mage/cards/t/TideDrifter.java +++ b/Mage.Sets/src/mage/cards/t/TideDrifter.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -54,8 +55,8 @@ public class TideDrifter extends CardImpl { public TideDrifter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TidebinderMage.java b/Mage.Sets/src/mage/cards/t/TidebinderMage.java index 850ef1b87f..d084f053f8 100644 --- a/Mage.Sets/src/mage/cards/t/TidebinderMage.java +++ b/Mage.Sets/src/mage/cards/t/TidebinderMage.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.PhaseStep; @@ -69,8 +70,8 @@ public class TidebinderMage extends CardImpl { public TidebinderMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TideforceElemental.java b/Mage.Sets/src/mage/cards/t/TideforceElemental.java index faa2152378..4e5bfe67ae 100644 --- a/Mage.Sets/src/mage/cards/t/TideforceElemental.java +++ b/Mage.Sets/src/mage/cards/t/TideforceElemental.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -59,7 +60,7 @@ public class TideforceElemental extends CardImpl { public TideforceElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TidehollowSculler.java b/Mage.Sets/src/mage/cards/t/TidehollowSculler.java index 8e932e9482..d4c306bddf 100644 --- a/Mage.Sets/src/mage/cards/t/TidehollowSculler.java +++ b/Mage.Sets/src/mage/cards/t/TidehollowSculler.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterNonlandCard; @@ -58,7 +59,7 @@ public class TidehollowSculler extends CardImpl { public TidehollowSculler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{W}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TidehollowStrix.java b/Mage.Sets/src/mage/cards/t/TidehollowStrix.java index e470b2c80c..19174c6551 100644 --- a/Mage.Sets/src/mage/cards/t/TidehollowStrix.java +++ b/Mage.Sets/src/mage/cards/t/TidehollowStrix.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class TidehollowStrix extends CardImpl { public TidehollowStrix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{U}{B}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TideshaperMystic.java b/Mage.Sets/src/mage/cards/t/TideshaperMystic.java index d8d2c39e39..0d1818c00f 100644 --- a/Mage.Sets/src/mage/cards/t/TideshaperMystic.java +++ b/Mage.Sets/src/mage/cards/t/TideshaperMystic.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetLandPermanent; @@ -49,8 +50,8 @@ public class TideshaperMystic extends CardImpl { public TideshaperMystic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TidespoutTyrant.java b/Mage.Sets/src/mage/cards/t/TidespoutTyrant.java index 40b1c01c03..507e7b4c30 100644 --- a/Mage.Sets/src/mage/cards/t/TidespoutTyrant.java +++ b/Mage.Sets/src/mage/cards/t/TidespoutTyrant.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPermanent; /** @@ -46,7 +47,7 @@ public class TidespoutTyrant extends CardImpl { public TidespoutTyrant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}{U}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/Tidewalker.java b/Mage.Sets/src/mage/cards/t/Tidewalker.java index fd4d072120..a54eb398a5 100644 --- a/Mage.Sets/src/mage/cards/t/Tidewalker.java +++ b/Mage.Sets/src/mage/cards/t/Tidewalker.java @@ -61,7 +61,7 @@ public class Tidewalker extends CardImpl { public Tidewalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/t/TidewaterMinion.java b/Mage.Sets/src/mage/cards/t/TidewaterMinion.java index 6565703288..5b25090760 100644 --- a/Mage.Sets/src/mage/cards/t/TidewaterMinion.java +++ b/Mage.Sets/src/mage/cards/t/TidewaterMinion.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,8 +52,8 @@ public class TidewaterMinion extends CardImpl { public TidewaterMinion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Elemental"); - this.subtype.add("Minion"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.MINION); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TigerClaws.java b/Mage.Sets/src/mage/cards/t/TigerClaws.java index 41c74fc9fa..9cd3b47573 100644 --- a/Mage.Sets/src/mage/cards/t/TigerClaws.java +++ b/Mage.Sets/src/mage/cards/t/TigerClaws.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -54,7 +55,7 @@ public class TigerClaws extends CardImpl { public TigerClaws(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/t/TighteningCoils.java b/Mage.Sets/src/mage/cards/t/TighteningCoils.java index 69cde8867f..1cd8eb2fdb 100644 --- a/Mage.Sets/src/mage/cards/t/TighteningCoils.java +++ b/Mage.Sets/src/mage/cards/t/TighteningCoils.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class TighteningCoils extends CardImpl { public TighteningCoils(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/t/TillingTreefolk.java b/Mage.Sets/src/mage/cards/t/TillingTreefolk.java index 3e91d8c0cb..cb4114b50f 100644 --- a/Mage.Sets/src/mage/cards/t/TillingTreefolk.java +++ b/Mage.Sets/src/mage/cards/t/TillingTreefolk.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterLandCard; import mage.target.common.TargetCardInYourGraveyard; @@ -47,8 +48,8 @@ public class TillingTreefolk extends CardImpl { public TillingTreefolk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Druid"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TilonallisKnight.java b/Mage.Sets/src/mage/cards/t/TilonallisKnight.java new file mode 100644 index 0000000000..dba7790ec6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TilonallisKnight.java @@ -0,0 +1,82 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author TheElk801 + */ +public class TilonallisKnight extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent(); + + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + } + + public TilonallisKnight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Tilonalli's Knight attacks, if you control a Dinosaur, Tilonalli's Knight gets +1/+1 until end of turn. + Ability ability = new ConditionalTriggeredAbility( + new AttacksTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false), + new PermanentsOnTheBattlefieldCondition(filter), + "Whenever {this} attacks, if you control a Dinosaur, {this} gets +1/+1 until end of turn." + ); + this.addAbility(ability); + } + + public TilonallisKnight(final TilonallisKnight card) { + super(card); + } + + @Override + public TilonallisKnight copy() { + return new TilonallisKnight(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TilonallisSkinshifter.java b/Mage.Sets/src/mage/cards/t/TilonallisSkinshifter.java new file mode 100644 index 0000000000..546ca340dc --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TilonallisSkinshifter.java @@ -0,0 +1,120 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SuperType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.filter.predicate.permanent.AttackingPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.util.functions.EmptyApplyToPermanent; + +/** + * + * @author TheElk801 + */ +public class TilonallisSkinshifter extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + static { + filter.add(Predicates.not(new SupertypePredicate(SuperType.LEGENDARY))); + filter.add(new AttackingPredicate()); + filter.add(new AnotherPredicate()); + } + + public TilonallisSkinshifter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // Whenever Tilonalli's Skinshifter attacks, it becomes a copy of another target nonlegendary attacking creature until end of turn. + Ability ability = new AttacksTriggeredAbility(new TilonallisSkinshifterCopyEffect(), false); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + public TilonallisSkinshifter(final TilonallisSkinshifter card) { + super(card); + } + + @Override + public TilonallisSkinshifter copy() { + return new TilonallisSkinshifter(this); + } +} + +class TilonallisSkinshifterCopyEffect extends OneShotEffect { + + public TilonallisSkinshifterCopyEffect() { + super(Outcome.Copy); + this.staticText = "it becomes a copy of another target nonlegendary attacking creature until end of turn"; + } + + public TilonallisSkinshifterCopyEffect(final TilonallisSkinshifterCopyEffect effect) { + super(effect); + } + + @Override + public TilonallisSkinshifterCopyEffect copy() { + return new TilonallisSkinshifterCopyEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent sourcePermanent = game.getPermanent(source.getSourceId()); + Permanent copyFromPermanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (sourcePermanent != null && copyFromPermanent != null) { + game.copyPermanent(Duration.EndOfTurn, copyFromPermanent, sourcePermanent.getId(), source, new EmptyApplyToPermanent()); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/t/TimberProtector.java b/Mage.Sets/src/mage/cards/t/TimberProtector.java index f3ca34e312..6c9ffb0294 100644 --- a/Mage.Sets/src/mage/cards/t/TimberProtector.java +++ b/Mage.Sets/src/mage/cards/t/TimberProtector.java @@ -65,8 +65,8 @@ public class TimberProtector extends CardImpl { public TimberProtector(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/t/TimberShredder.java b/Mage.Sets/src/mage/cards/t/TimberShredder.java index c2aeba4688..71218727c9 100644 --- a/Mage.Sets/src/mage/cards/t/TimberShredder.java +++ b/Mage.Sets/src/mage/cards/t/TimberShredder.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -49,7 +50,7 @@ public class TimberShredder extends CardImpl { public TimberShredder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(4); this.toughness = new MageInt(2); this.color.setGreen(true); diff --git a/Mage.Sets/src/mage/cards/t/TimberlandGuide.java b/Mage.Sets/src/mage/cards/t/TimberlandGuide.java index 5326b45816..297da468ea 100644 --- a/Mage.Sets/src/mage/cards/t/TimberlandGuide.java +++ b/Mage.Sets/src/mage/cards/t/TimberlandGuide.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -46,8 +47,8 @@ public class TimberlandGuide extends CardImpl { public TimberlandGuide(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/Timbermare.java b/Mage.Sets/src/mage/cards/t/Timbermare.java index 5146f42dfe..8861cb4ef9 100644 --- a/Mage.Sets/src/mage/cards/t/Timbermare.java +++ b/Mage.Sets/src/mage/cards/t/Timbermare.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -53,8 +54,8 @@ public class Timbermare extends CardImpl { public Timbermare(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elemental"); - this.subtype.add("Horse"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.HORSE); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TimbermawLarva.java b/Mage.Sets/src/mage/cards/t/TimbermawLarva.java index 0b47853fb0..f99c64d6b0 100644 --- a/Mage.Sets/src/mage/cards/t/TimbermawLarva.java +++ b/Mage.Sets/src/mage/cards/t/TimbermawLarva.java @@ -58,7 +58,7 @@ public class TimbermawLarva extends CardImpl { public TimbermawLarva(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TimberpackWolf.java b/Mage.Sets/src/mage/cards/t/TimberpackWolf.java index b3c19e4ce9..0143d5544f 100644 --- a/Mage.Sets/src/mage/cards/t/TimberpackWolf.java +++ b/Mage.Sets/src/mage/cards/t/TimberpackWolf.java @@ -56,7 +56,7 @@ public class TimberpackWolf extends CardImpl { public TimberpackWolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TimberwatchElf.java b/Mage.Sets/src/mage/cards/t/TimberwatchElf.java index cdcbc47bbd..56259652bb 100644 --- a/Mage.Sets/src/mage/cards/t/TimberwatchElf.java +++ b/Mage.Sets/src/mage/cards/t/TimberwatchElf.java @@ -58,7 +58,7 @@ public class TimberwatchElf extends CardImpl { public TimberwatchElf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TimeToReflect.java b/Mage.Sets/src/mage/cards/t/TimeToReflect.java index 9b62af37b3..10114d5b0f 100644 --- a/Mage.Sets/src/mage/cards/t/TimeToReflect.java +++ b/Mage.Sets/src/mage/cards/t/TimeToReflect.java @@ -1,137 +1,137 @@ -/* - * 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.cards.t; - -import mage.MageObjectReference; -import mage.abilities.Ability; -import mage.abilities.SpellAbility; -import mage.abilities.effects.common.ExileTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.WatcherScope; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.permanent.PermanentIdPredicate; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; -import mage.target.TargetPermanent; -import mage.target.common.TargetCreaturePermanent; -import mage.watchers.Watcher; - -import java.util.*; - -/** - * @author jeffwadsworth - */ -public class TimeToReflect extends CardImpl { - - public TimeToReflect(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); - - // Exile target creature that blocked or was blocked by a Zombie this turn. - this.getSpellAbility().addEffect(new ExileTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterCreaturePermanent("creature that blocked or was blocked by a Zombie this turn."))); - this.getSpellAbility().addWatcher(new BlockedOrWasBlockedByAZombieWatcher()); - - } - - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability instanceof SpellAbility) { - List creaturesThatBlockedOrWereBlockedByAZombie = new ArrayList<>(); - FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that blocked or was blocked by a Zombie this turn.").copy(); - BlockedOrWasBlockedByAZombieWatcher watcher = (BlockedOrWasBlockedByAZombieWatcher) game.getState().getWatchers().get(BlockedOrWasBlockedByAZombieWatcher.class.getSimpleName()); - if (watcher != null) { - for (MageObjectReference mor : watcher.getBlockedThisTurnCreatures()) { - Permanent permanent = mor.getPermanent(game); - if (permanent != null) { - creaturesThatBlockedOrWereBlockedByAZombie.add(new PermanentIdPredicate(permanent.getId())); - } - } - } - filter.add(Predicates.or(creaturesThatBlockedOrWereBlockedByAZombie)); - ability.getTargets().clear(); - ability.addTarget(new TargetCreaturePermanent(filter)); - } - } - - public TimeToReflect(final TimeToReflect card) { - super(card); - } - - @Override - public TimeToReflect copy() { - return new TimeToReflect(this); - } -} - -class BlockedOrWasBlockedByAZombieWatcher extends Watcher { - - private final Set blockedOrWasBlockedByAZombieWatcher; - - public BlockedOrWasBlockedByAZombieWatcher() { - super(BlockedOrWasBlockedByAZombieWatcher.class.getSimpleName(), WatcherScope.GAME); - blockedOrWasBlockedByAZombieWatcher = new HashSet<>(); - } - - public BlockedOrWasBlockedByAZombieWatcher(final BlockedOrWasBlockedByAZombieWatcher watcher) { - super(watcher); - blockedOrWasBlockedByAZombieWatcher = new HashSet<>(watcher.blockedOrWasBlockedByAZombieWatcher); - } - - @Override - public BlockedOrWasBlockedByAZombieWatcher copy() { - return new BlockedOrWasBlockedByAZombieWatcher(this); - } - - @Override - public void watch(GameEvent event, Game game) { - if (event.getType() == GameEvent.EventType.BLOCKER_DECLARED) { - if (game.getPermanent(event.getTargetId()).hasSubtype(SubType.ZOMBIE, game)) { - this.blockedOrWasBlockedByAZombieWatcher.add(new MageObjectReference(event.getSourceId(), game)); - } - if (game.getPermanent(event.getSourceId()).hasSubtype(SubType.ZOMBIE, game)) { - this.blockedOrWasBlockedByAZombieWatcher.add(new MageObjectReference(event.getTargetId(), game)); - } - } - } - - public Set getBlockedThisTurnCreatures() { - return this.blockedOrWasBlockedByAZombieWatcher; - } - - @Override - public void reset() { - super.reset(); - blockedOrWasBlockedByAZombieWatcher.clear(); - } - -} +/* + * 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.cards.t; + +import mage.MageObjectReference; +import mage.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.WatcherScope; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.PermanentIdPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.Watcher; + +import java.util.*; + +/** + * @author jeffwadsworth + */ +public class TimeToReflect extends CardImpl { + + public TimeToReflect(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); + + // Exile target creature that blocked or was blocked by a Zombie this turn. + this.getSpellAbility().addEffect(new ExileTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(new FilterCreaturePermanent("creature that blocked or was blocked by a Zombie this turn."))); + this.getSpellAbility().addWatcher(new BlockedOrWasBlockedByAZombieWatcher()); + + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability instanceof SpellAbility) { + List creaturesThatBlockedOrWereBlockedByAZombie = new ArrayList<>(); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that blocked or was blocked by a Zombie this turn.").copy(); + BlockedOrWasBlockedByAZombieWatcher watcher = (BlockedOrWasBlockedByAZombieWatcher) game.getState().getWatchers().get(BlockedOrWasBlockedByAZombieWatcher.class.getSimpleName()); + if (watcher != null) { + for (MageObjectReference mor : watcher.getBlockedThisTurnCreatures()) { + Permanent permanent = mor.getPermanent(game); + if (permanent != null) { + creaturesThatBlockedOrWereBlockedByAZombie.add(new PermanentIdPredicate(permanent.getId())); + } + } + } + filter.add(Predicates.or(creaturesThatBlockedOrWereBlockedByAZombie)); + ability.getTargets().clear(); + ability.addTarget(new TargetCreaturePermanent(filter)); + } + } + + public TimeToReflect(final TimeToReflect card) { + super(card); + } + + @Override + public TimeToReflect copy() { + return new TimeToReflect(this); + } +} + +class BlockedOrWasBlockedByAZombieWatcher extends Watcher { + + private final Set blockedOrWasBlockedByAZombieWatcher; + + public BlockedOrWasBlockedByAZombieWatcher() { + super(BlockedOrWasBlockedByAZombieWatcher.class.getSimpleName(), WatcherScope.GAME); + blockedOrWasBlockedByAZombieWatcher = new HashSet<>(); + } + + public BlockedOrWasBlockedByAZombieWatcher(final BlockedOrWasBlockedByAZombieWatcher watcher) { + super(watcher); + blockedOrWasBlockedByAZombieWatcher = new HashSet<>(watcher.blockedOrWasBlockedByAZombieWatcher); + } + + @Override + public BlockedOrWasBlockedByAZombieWatcher copy() { + return new BlockedOrWasBlockedByAZombieWatcher(this); + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.BLOCKER_DECLARED) { + if (game.getPermanent(event.getTargetId()).hasSubtype(SubType.ZOMBIE, game)) { + this.blockedOrWasBlockedByAZombieWatcher.add(new MageObjectReference(event.getSourceId(), game)); + } + if (game.getPermanent(event.getSourceId()).hasSubtype(SubType.ZOMBIE, game)) { + this.blockedOrWasBlockedByAZombieWatcher.add(new MageObjectReference(event.getTargetId(), game)); + } + } + } + + public Set getBlockedThisTurnCreatures() { + return this.blockedOrWasBlockedByAZombieWatcher; + } + + @Override + public void reset() { + super.reset(); + blockedOrWasBlockedByAZombieWatcher.clear(); + } + +} diff --git a/Mage.Sets/src/mage/cards/t/TimelyHordemate.java b/Mage.Sets/src/mage/cards/t/TimelyHordemate.java index 4952168430..0c1be7483d 100644 --- a/Mage.Sets/src/mage/cards/t/TimelyHordemate.java +++ b/Mage.Sets/src/mage/cards/t/TimelyHordemate.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -56,16 +57,16 @@ public class TimelyHordemate extends CardImpl { } public TimelyHordemate(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); // Raid - When Timely Hordemate enters the battlefield, if you attacked this turn, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield. Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()), RaidCondition.instance, - "Raid - When {this} enters the battlefield, if you attacked with a creature this turn, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield."); + "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield."); ability.addTarget(new TargetCardInYourGraveyard(filter)); this.addAbility(ability, new PlayerAttackedWatcher()); diff --git a/Mage.Sets/src/mage/cards/t/TimidDrake.java b/Mage.Sets/src/mage/cards/t/TimidDrake.java new file mode 100644 index 0000000000..b1cd6e3fac --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TimidDrake.java @@ -0,0 +1,80 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author TheElk801 + */ +public class TimidDrake extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature"); + + static { + filter.add(new AnotherPredicate()); + } + + public TimidDrake(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.DRAKE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When another creature enters the battlefield, return Timid Drake to its owner's hand. + this.addAbility(new EntersBattlefieldAllTriggeredAbility( + Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), filter, false, + "When another creature enters the battlefield, return {this} to its owner's hand." + )); + } + + public TimidDrake(final TimidDrake card) { + super(card); + } + + @Override + public TimidDrake copy() { + return new TimidDrake(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TinStreetHooligan.java b/Mage.Sets/src/mage/cards/t/TinStreetHooligan.java index 8208da8797..a4261b94b1 100644 --- a/Mage.Sets/src/mage/cards/t/TinStreetHooligan.java +++ b/Mage.Sets/src/mage/cards/t/TinStreetHooligan.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.target.common.TargetArtifactPermanent; import mage.watchers.common.ManaSpentToCastWatcher; @@ -49,8 +50,8 @@ public class TinStreetHooligan extends CardImpl { public TinStreetHooligan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TinStreetMarket.java b/Mage.Sets/src/mage/cards/t/TinStreetMarket.java index e042946fbb..fc3d546f3e 100644 --- a/Mage.Sets/src/mage/cards/t/TinStreetMarket.java +++ b/Mage.Sets/src/mage/cards/t/TinStreetMarket.java @@ -52,7 +52,7 @@ public class TinStreetMarket extends CardImpl { public TinStreetMarket(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land diff --git a/Mage.Sets/src/mage/cards/t/TinWingChimera.java b/Mage.Sets/src/mage/cards/t/TinWingChimera.java new file mode 100644 index 0000000000..fe0cd843e3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TinWingChimera.java @@ -0,0 +1,87 @@ +/* + * 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.cards.t; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * + * @author TheElk801 + */ +public class TinWingChimera extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Chimera creature you control"); + + static { + filter.add(new SubtypePredicate(SubType.CHIMERA)); + } + + public TinWingChimera(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + + this.subtype.add(SubType.CHIMERA); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Sacrifice Tin-Wing Chimera: Put a +2/+2 counter on target Chimera creature. It gains flying. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P2P2.createInstance()), new SacrificeSourceCost()); + ability.addEffect(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield)); + ability.addTarget(new TargetCreaturePermanent(filter)); + addAbility(ability); + } + + public TinWingChimera(final TinWingChimera card) { + super(card); + } + + @Override + public TinWingChimera copy() { + return new TinWingChimera(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TinderWall.java b/Mage.Sets/src/mage/cards/t/TinderWall.java index b4639cb479..5dd64d2e84 100644 --- a/Mage.Sets/src/mage/cards/t/TinderWall.java +++ b/Mage.Sets/src/mage/cards/t/TinderWall.java @@ -42,6 +42,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.WatcherScope; import mage.constants.Zone; import mage.filter.common.FilterAttackingCreature; @@ -59,8 +60,8 @@ public class TinderWall extends CardImpl { public TinderWall(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Plant"); - this.subtype.add("Wall"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TineShrike.java b/Mage.Sets/src/mage/cards/t/TineShrike.java index 55b557d9c7..63b1063486 100644 --- a/Mage.Sets/src/mage/cards/t/TineShrike.java +++ b/Mage.Sets/src/mage/cards/t/TineShrike.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class TineShrike extends CardImpl { public TineShrike (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TirelessMissionaries.java b/Mage.Sets/src/mage/cards/t/TirelessMissionaries.java index 9f2e52e722..ca5ea8d6bd 100644 --- a/Mage.Sets/src/mage/cards/t/TirelessMissionaries.java +++ b/Mage.Sets/src/mage/cards/t/TirelessMissionaries.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class TirelessMissionaries extends CardImpl { public TirelessMissionaries(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TirelessTracker.java b/Mage.Sets/src/mage/cards/t/TirelessTracker.java index 865316682e..63f62539fd 100644 --- a/Mage.Sets/src/mage/cards/t/TirelessTracker.java +++ b/Mage.Sets/src/mage/cards/t/TirelessTracker.java @@ -60,8 +60,8 @@ public class TirelessTracker extends CardImpl { public TirelessTracker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(3); this.toughness = new MageInt(2); @@ -106,7 +106,7 @@ class TirelessTrackerTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { return event.getPlayerId().equals(this.getControllerId()) - && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).getSubtype(game).contains("Clue"); + && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).hasSubtype(SubType.CLUE, game); } @Override diff --git a/Mage.Sets/src/mage/cards/t/TirelessTribe.java b/Mage.Sets/src/mage/cards/t/TirelessTribe.java index 5bbeee8eeb..6709b375ff 100644 --- a/Mage.Sets/src/mage/cards/t/TirelessTribe.java +++ b/Mage.Sets/src/mage/cards/t/TirelessTribe.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCardInHand; @@ -47,8 +48,8 @@ public class TirelessTribe extends CardImpl { public TirelessTribe(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TishanaVoiceOfThunder.java b/Mage.Sets/src/mage/cards/t/TishanaVoiceOfThunder.java new file mode 100644 index 0000000000..01f56f31d9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TishanaVoiceOfThunder.java @@ -0,0 +1,85 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author spjspj + */ +public class TishanaVoiceOfThunder extends CardImpl { + + public TishanaVoiceOfThunder(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{U}"); + + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SHAMAN); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Tishana, Voice of Thunder's power and toughness are each equal to the number of cards in your hand. + DynamicValue xValue = new CardsInControllerHandCount(); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(xValue, Duration.EndOfGame))); + + // You have no maximum hand size. + Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.WhileOnBattlefield, MaximumHandSizeControllerEffect.HandSizeModification.SET); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + + // When Tishana enters the battlefield, draw a card for each creature you control. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent())))); + } + + public TishanaVoiceOfThunder(final TishanaVoiceOfThunder card) { + super(card); + } + + @Override + public TishanaVoiceOfThunder copy() { + return new TishanaVoiceOfThunder(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TishanasWayfinder.java b/Mage.Sets/src/mage/cards/t/TishanasWayfinder.java new file mode 100644 index 0000000000..e1f3c533f4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TishanasWayfinder.java @@ -0,0 +1,65 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.keyword.ExploreSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author TheElk801 + */ +public class TishanasWayfinder extends CardImpl { + + public TishanasWayfinder(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SCOUT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Tishana's Wayfinder enters the battlefield, it explores. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ExploreSourceEffect())); + } + + public TishanasWayfinder(final TishanasWayfinder card) { + super(card); + } + + @Override + public TishanasWayfinder copy() { + return new TishanasWayfinder(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TitanOfEternalFire.java b/Mage.Sets/src/mage/cards/t/TitanOfEternalFire.java index 24381fad89..3d7fde8cef 100644 --- a/Mage.Sets/src/mage/cards/t/TitanOfEternalFire.java +++ b/Mage.Sets/src/mage/cards/t/TitanOfEternalFire.java @@ -54,7 +54,7 @@ public class TitanOfEternalFire extends CardImpl { public TitanOfEternalFire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/t/TitaniaProtectorOfArgoth.java b/Mage.Sets/src/mage/cards/t/TitaniaProtectorOfArgoth.java index 73abc5d9f2..04dd6a1195 100644 --- a/Mage.Sets/src/mage/cards/t/TitaniaProtectorOfArgoth.java +++ b/Mage.Sets/src/mage/cards/t/TitaniaProtectorOfArgoth.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.filter.common.FilterLandCard; @@ -60,7 +61,7 @@ public class TitaniaProtectorOfArgoth extends CardImpl { public TitaniaProtectorOfArgoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TitaniasChosen.java b/Mage.Sets/src/mage/cards/t/TitaniasChosen.java index c93c3a5b64..f44b87061e 100644 --- a/Mage.Sets/src/mage/cards/t/TitaniasChosen.java +++ b/Mage.Sets/src/mage/cards/t/TitaniasChosen.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -50,8 +51,8 @@ public class TitaniasChosen extends CardImpl { public TitaniasChosen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Archer"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TitanicBulvox.java b/Mage.Sets/src/mage/cards/t/TitanicBulvox.java index 71a4da0496..8124548e73 100644 --- a/Mage.Sets/src/mage/cards/t/TitanicBulvox.java +++ b/Mage.Sets/src/mage/cards/t/TitanicBulvox.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class TitanicBulvox extends CardImpl { public TitanicBulvox(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(7); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TitanicUltimatum.java b/Mage.Sets/src/mage/cards/t/TitanicUltimatum.java index 8b2aaa7abc..b3b7dbfef9 100644 --- a/Mage.Sets/src/mage/cards/t/TitanicUltimatum.java +++ b/Mage.Sets/src/mage/cards/t/TitanicUltimatum.java @@ -28,6 +28,7 @@ package mage.cards.t; import java.util.UUID; +import mage.abilities.CompoundAbility; import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.keyword.FirstStrikeAbility; @@ -46,14 +47,14 @@ import mage.filter.StaticFilters; public class TitanicUltimatum extends CardImpl { public TitanicUltimatum(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{R}{R}{G}{G}{G}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{R}{R}{G}{G}{G}{W}{W}"); - - // Until end of turn, creatures you control get +5/+5 and gain first strike, lifelink, and trample. - this.getSpellAbility().addEffect(new BoostControlledEffect(5, 5, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES)); - this.getSpellAbility().addEffect(new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES)); - this.getSpellAbility().addEffect(new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES)); - this.getSpellAbility().addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES)); + // Until end of turn, creatures you control get +5/+5 and gain first strike, trample, and lifelink. + this.getSpellAbility().addEffect(new BoostControlledEffect(5, 5, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES) + .setText("Until end of turn, creatures you control get +5/+5")); + CompoundAbility ability = new CompoundAbility(FirstStrikeAbility.getInstance(), TrampleAbility.getInstance(), LifelinkAbility.getInstance()); + this.getSpellAbility().addEffect(new GainAbilityControlledEffect(ability, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES) + .setText("and gain first strike, trample, and lifelink")); } public TitanicUltimatum(final TitanicUltimatum card) { diff --git a/Mage.Sets/src/mage/cards/t/TitaniumGolem.java b/Mage.Sets/src/mage/cards/t/TitaniumGolem.java index b7c4f38b32..f65c242ce6 100644 --- a/Mage.Sets/src/mage/cards/t/TitaniumGolem.java +++ b/Mage.Sets/src/mage/cards/t/TitaniumGolem.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class TitaniumGolem extends CardImpl { public TitaniumGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(3); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{1}{W}"))); diff --git a/Mage.Sets/src/mage/cards/t/TitheDrinker.java b/Mage.Sets/src/mage/cards/t/TitheDrinker.java index a29ee3c21a..579f5828b8 100644 --- a/Mage.Sets/src/mage/cards/t/TitheDrinker.java +++ b/Mage.Sets/src/mage/cards/t/TitheDrinker.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class TitheDrinker extends CardImpl { public TitheDrinker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TivadarOfThorn.java b/Mage.Sets/src/mage/cards/t/TivadarOfThorn.java index 6136d36b5c..7cc5bafaa1 100644 --- a/Mage.Sets/src/mage/cards/t/TivadarOfThorn.java +++ b/Mage.Sets/src/mage/cards/t/TivadarOfThorn.java @@ -60,8 +60,8 @@ public class TivadarOfThorn extends CardImpl { public TivadarOfThorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TobiasAndrion.java b/Mage.Sets/src/mage/cards/t/TobiasAndrion.java index e5b1fef0a1..8d7024c26c 100644 --- a/Mage.Sets/src/mage/cards/t/TobiasAndrion.java +++ b/Mage.Sets/src/mage/cards/t/TobiasAndrion.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -43,8 +44,8 @@ public class TobiasAndrion extends CardImpl { public TobiasAndrion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TocatliHonorGuard.java b/Mage.Sets/src/mage/cards/t/TocatliHonorGuard.java new file mode 100644 index 0000000000..d15c16695c --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TocatliHonorGuard.java @@ -0,0 +1,65 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author spjspj + */ +public class TocatliHonorGuard extends CardImpl { + + public TocatliHonorGuard(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Creatures entering the battlefield don't cause abilities to trigger. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new TorporOrbEffect())); + } + + public TocatliHonorGuard(final TocatliHonorGuard card) { + super(card); + } + + @Override + public TocatliHonorGuard copy() { + return new TocatliHonorGuard(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TolarianDrake.java b/Mage.Sets/src/mage/cards/t/TolarianDrake.java index 1f24791e52..709f008ee6 100644 --- a/Mage.Sets/src/mage/cards/t/TolarianDrake.java +++ b/Mage.Sets/src/mage/cards/t/TolarianDrake.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.PhasingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class TolarianDrake extends CardImpl { public TolarianDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TolarianEmissary.java b/Mage.Sets/src/mage/cards/t/TolarianEmissary.java index dc4fe6c4b6..e6e7522ffb 100644 --- a/Mage.Sets/src/mage/cards/t/TolarianEmissary.java +++ b/Mage.Sets/src/mage/cards/t/TolarianEmissary.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetEnchantmentPermanent; /** @@ -50,8 +51,8 @@ public class TolarianEmissary extends CardImpl { public TolarianEmissary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TolarianEntrancer.java b/Mage.Sets/src/mage/cards/t/TolarianEntrancer.java index bb41aa353e..18442185d7 100644 --- a/Mage.Sets/src/mage/cards/t/TolarianEntrancer.java +++ b/Mage.Sets/src/mage/cards/t/TolarianEntrancer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.game.Game; import mage.game.events.GameEvent; @@ -49,8 +50,8 @@ public class TolarianEntrancer extends CardImpl { public TolarianEntrancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TolarianSentinel.java b/Mage.Sets/src/mage/cards/t/TolarianSentinel.java index a81be72942..aaf5bc5750 100644 --- a/Mage.Sets/src/mage/cards/t/TolarianSentinel.java +++ b/Mage.Sets/src/mage/cards/t/TolarianSentinel.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.target.common.TargetControlledPermanent; @@ -52,8 +53,8 @@ public class TolarianSentinel extends CardImpl { public TolarianSentinel(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TolarianSerpent.java b/Mage.Sets/src/mage/cards/t/TolarianSerpent.java index 89bfb5149f..7c2b44f50a 100644 --- a/Mage.Sets/src/mage/cards/t/TolarianSerpent.java +++ b/Mage.Sets/src/mage/cards/t/TolarianSerpent.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.events.GameEvent.EventType; /** @@ -44,7 +45,7 @@ public class TolarianSerpent extends CardImpl { public TolarianSerpent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/t/TolsimirWolfblood.java b/Mage.Sets/src/mage/cards/t/TolsimirWolfblood.java index c2bc07fb26..5ab737a550 100644 --- a/Mage.Sets/src/mage/cards/t/TolsimirWolfblood.java +++ b/Mage.Sets/src/mage/cards/t/TolsimirWolfblood.java @@ -62,8 +62,8 @@ public class TolsimirWolfblood extends CardImpl { public TolsimirWolfblood(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/Tombstalker.java b/Mage.Sets/src/mage/cards/t/Tombstalker.java index 78f4ed29e6..5dd605a403 100644 --- a/Mage.Sets/src/mage/cards/t/Tombstalker.java +++ b/Mage.Sets/src/mage/cards/t/Tombstalker.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class Tombstalker extends CardImpl { public Tombstalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TomorrowAzamisFamiliar.java b/Mage.Sets/src/mage/cards/t/TomorrowAzamisFamiliar.java index 8d3cc79618..3571012f72 100644 --- a/Mage.Sets/src/mage/cards/t/TomorrowAzamisFamiliar.java +++ b/Mage.Sets/src/mage/cards/t/TomorrowAzamisFamiliar.java @@ -50,7 +50,7 @@ public class TomorrowAzamisFamiliar extends CardImpl { public TomorrowAzamisFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TonicPeddler.java b/Mage.Sets/src/mage/cards/t/TonicPeddler.java index a9921ae003..a6b8d48579 100644 --- a/Mage.Sets/src/mage/cards/t/TonicPeddler.java +++ b/Mage.Sets/src/mage/cards/t/TonicPeddler.java @@ -1,73 +1,74 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.DiscardCardCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.GainLifeTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.target.TargetPlayer; - -/** - * - * @author Derpthemeus - */ -public class TonicPeddler extends CardImpl { - - public TonicPeddler(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); - this.power = new MageInt(1); - this.toughness = new MageInt(1); - - // {W}, {tap}, Discard a card: Target player gains 3 life. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeTargetEffect(3), new ManaCostsImpl("{W}")); - ability.addCost(new TapSourceCost()); - ability.addCost(new DiscardCardCost()); - ability.addTarget(new TargetPlayer()); - this.addAbility(ability); - } - - public TonicPeddler(final TonicPeddler card) { - super(card); - } - - @Override - public TonicPeddler copy() { - return new TonicPeddler(this); - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.GainLifeTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.target.TargetPlayer; + +/** + * + * @author Derpthemeus + */ +public class TonicPeddler extends CardImpl { + + public TonicPeddler(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {W}, {tap}, Discard a card: Target player gains 3 life. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeTargetEffect(3), new ManaCostsImpl("{W}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new DiscardCardCost()); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public TonicPeddler(final TonicPeddler card) { + super(card); + } + + @Override + public TonicPeddler copy() { + return new TonicPeddler(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/ToolcraftExemplar.java b/Mage.Sets/src/mage/cards/t/ToolcraftExemplar.java index e234930dad..77351b7792 100644 --- a/Mage.Sets/src/mage/cards/t/ToolcraftExemplar.java +++ b/Mage.Sets/src/mage/cards/t/ToolcraftExemplar.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.TargetController; @@ -55,8 +56,8 @@ public class ToolcraftExemplar extends CardImpl { public ToolcraftExemplar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Dwarf"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ToothCollector.java b/Mage.Sets/src/mage/cards/t/ToothCollector.java index 252305be15..caaa8507ba 100644 --- a/Mage.Sets/src/mage/cards/t/ToothCollector.java +++ b/Mage.Sets/src/mage/cards/t/ToothCollector.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -64,8 +65,8 @@ public class ToothCollector extends CardImpl { public ToothCollector(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TopanAscetic.java b/Mage.Sets/src/mage/cards/t/TopanAscetic.java index 1f5ec34753..53a69f4c10 100644 --- a/Mage.Sets/src/mage/cards/t/TopanAscetic.java +++ b/Mage.Sets/src/mage/cards/t/TopanAscetic.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -56,8 +57,8 @@ public class TopanAscetic extends CardImpl { public TopanAscetic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TopanFreeblade.java b/Mage.Sets/src/mage/cards/t/TopanFreeblade.java index 79af58fbce..30c983453e 100644 --- a/Mage.Sets/src/mage/cards/t/TopanFreeblade.java +++ b/Mage.Sets/src/mage/cards/t/TopanFreeblade.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class TopanFreeblade extends CardImpl { public TopanFreeblade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/Topplegeist.java b/Mage.Sets/src/mage/cards/t/Topplegeist.java index 94df6fe470..ff82f44fdc 100644 --- a/Mage.Sets/src/mage/cards/t/Topplegeist.java +++ b/Mage.Sets/src/mage/cards/t/Topplegeist.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -64,7 +65,7 @@ public class Topplegeist extends CardImpl { public Topplegeist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TorGiant.java b/Mage.Sets/src/mage/cards/t/TorGiant.java index 590a9a8eed..60ae59a74f 100644 --- a/Mage.Sets/src/mage/cards/t/TorGiant.java +++ b/Mage.Sets/src/mage/cards/t/TorGiant.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class TorGiant extends CardImpl { public TorGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TorWauki.java b/Mage.Sets/src/mage/cards/t/TorWauki.java index a9e6f80de7..e1d19b6447 100644 --- a/Mage.Sets/src/mage/cards/t/TorWauki.java +++ b/Mage.Sets/src/mage/cards/t/TorWauki.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.target.common.TargetAttackingOrBlockingCreature; @@ -49,8 +50,8 @@ public class TorWauki extends CardImpl { public TorWauki(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TorchDrake.java b/Mage.Sets/src/mage/cards/t/TorchDrake.java index ccf70066a2..7c054eb6e3 100644 --- a/Mage.Sets/src/mage/cards/t/TorchDrake.java +++ b/Mage.Sets/src/mage/cards/t/TorchDrake.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class TorchDrake extends CardImpl { public TorchDrake (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TorchFiend.java b/Mage.Sets/src/mage/cards/t/TorchFiend.java index cf97eddeee..d5c3c51cb2 100644 --- a/Mage.Sets/src/mage/cards/t/TorchFiend.java +++ b/Mage.Sets/src/mage/cards/t/TorchFiend.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.target.common.TargetArtifactPermanent; @@ -49,7 +50,7 @@ public class TorchFiend extends CardImpl { public TorchFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TorchGauntlet.java b/Mage.Sets/src/mage/cards/t/TorchGauntlet.java index 0814537626..227e862c08 100644 --- a/Mage.Sets/src/mage/cards/t/TorchGauntlet.java +++ b/Mage.Sets/src/mage/cards/t/TorchGauntlet.java @@ -1,66 +1,67 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.common.continuous.BoostEquippedEffect; -import mage.abilities.keyword.EquipAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; - -/** - * - * @author emerald000 - */ -public class TorchGauntlet extends CardImpl { - - public TorchGauntlet(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); - - // Equipped creature gets +2/+0. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0))); - - // Equip {2} - this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2))); - } - - public TorchGauntlet(final TorchGauntlet card) { - super(card); - } - - @Override - public TorchGauntlet copy() { - return new TorchGauntlet(this); - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; + +/** + * + * @author emerald000 + */ +public class TorchGauntlet extends CardImpl { + + public TorchGauntlet(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + this.subtype.add(SubType.EQUIPMENT); + + // Equipped creature gets +2/+0. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0))); + + // Equip {2} + this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2))); + } + + public TorchGauntlet(final TorchGauntlet card) { + super(card); + } + + @Override + public TorchGauntlet copy() { + return new TorchGauntlet(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TorchSlinger.java b/Mage.Sets/src/mage/cards/t/TorchSlinger.java index d7cc455883..6ea39f1baa 100644 --- a/Mage.Sets/src/mage/cards/t/TorchSlinger.java +++ b/Mage.Sets/src/mage/cards/t/TorchSlinger.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -47,8 +48,8 @@ public class TorchSlinger extends CardImpl { public TorchSlinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TorchSong.java b/Mage.Sets/src/mage/cards/t/TorchSong.java index 2da5523d9b..d6a19c2a46 100644 --- a/Mage.Sets/src/mage/cards/t/TorchSong.java +++ b/Mage.Sets/src/mage/cards/t/TorchSong.java @@ -51,13 +51,18 @@ import mage.target.common.TargetCreatureOrPlayer; public class TorchSong extends CardImpl { public TorchSong(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); // At the beginning of your upkeep, you may put a verse counter on Torch Song. this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, - new AddCountersSourceEffect(CounterType.VERSE.createInstance(), true), TargetController.YOU, true)); + new AddCountersSourceEffect(CounterType.VERSE.createInstance(), true), TargetController.YOU, true)); + // {2}{R}, Sacrifice Torch Song: Torch Song deals X damage to target creature or player, where X is the number of verse counters on Torch Song. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new CountersSourceCount(CounterType.VERSE)), new ManaCostsImpl("{2}{R}")); + Ability ability = new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new DamageTargetEffect(new CountersSourceCount(CounterType.VERSE)), + new ManaCostsImpl("{2}{R}") + ); ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/t/Torchling.java b/Mage.Sets/src/mage/cards/t/Torchling.java index a92dd494f5..9f82bbaefa 100644 --- a/Mage.Sets/src/mage/cards/t/Torchling.java +++ b/Mage.Sets/src/mage/cards/t/Torchling.java @@ -43,6 +43,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -62,7 +63,7 @@ public class Torchling extends CardImpl { public Torchling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/ToriiWatchward.java b/Mage.Sets/src/mage/cards/t/ToriiWatchward.java index 12b6af7f4b..cb0c3a45cc 100644 --- a/Mage.Sets/src/mage/cards/t/ToriiWatchward.java +++ b/Mage.Sets/src/mage/cards/t/ToriiWatchward.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class ToriiWatchward extends CardImpl { public ToriiWatchward(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/Torment.java b/Mage.Sets/src/mage/cards/t/Torment.java index a1957f3f8f..aa378c142a 100644 --- a/Mage.Sets/src/mage/cards/t/Torment.java +++ b/Mage.Sets/src/mage/cards/t/Torment.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class Torment extends CardImpl { public Torment(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/t/TormentedAngel.java b/Mage.Sets/src/mage/cards/t/TormentedAngel.java index d4d844872c..aa997d6161 100644 --- a/Mage.Sets/src/mage/cards/t/TormentedAngel.java +++ b/Mage.Sets/src/mage/cards/t/TormentedAngel.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class TormentedAngel extends CardImpl { public TormentedAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TormentedHero.java b/Mage.Sets/src/mage/cards/t/TormentedHero.java index 94c06b97e4..cf3eb73457 100644 --- a/Mage.Sets/src/mage/cards/t/TormentedHero.java +++ b/Mage.Sets/src/mage/cards/t/TormentedHero.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; @@ -47,8 +48,8 @@ public class TormentedHero extends CardImpl { public TormentedHero(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TormentedPariah.java b/Mage.Sets/src/mage/cards/t/TormentedPariah.java index 6702b9dd87..d89da23dd0 100644 --- a/Mage.Sets/src/mage/cards/t/TormentedPariah.java +++ b/Mage.Sets/src/mage/cards/t/TormentedPariah.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.r.RampagingWerewolf; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -48,9 +49,9 @@ public class TormentedPariah extends CardImpl { public TormentedPariah(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.WEREWOLF); this.transformable = true; this.secondSideCardClazz = RampagingWerewolf.class; diff --git a/Mage.Sets/src/mage/cards/t/TormentedSoul.java b/Mage.Sets/src/mage/cards/t/TormentedSoul.java index 0cf3047fec..c8d3e32b7c 100644 --- a/Mage.Sets/src/mage/cards/t/TormentedSoul.java +++ b/Mage.Sets/src/mage/cards/t/TormentedSoul.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -43,7 +44,7 @@ public class TormentedSoul extends CardImpl { public TormentedSoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TormentorExarch.java b/Mage.Sets/src/mage/cards/t/TormentorExarch.java index ac3c0ddac7..b7fbfb6954 100644 --- a/Mage.Sets/src/mage/cards/t/TormentorExarch.java +++ b/Mage.Sets/src/mage/cards/t/TormentorExarch.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class TormentorExarch extends CardImpl { public TormentorExarch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TormentorsTrident.java b/Mage.Sets/src/mage/cards/t/TormentorsTrident.java index 78070e2038..ed44f1a4c9 100644 --- a/Mage.Sets/src/mage/cards/t/TormentorsTrident.java +++ b/Mage.Sets/src/mage/cards/t/TormentorsTrident.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class TormentorsTrident extends CardImpl { public TormentorsTrident(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +3/+0 and attacks each turn if able. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 0)); diff --git a/Mage.Sets/src/mage/cards/t/TornadoElemental.java b/Mage.Sets/src/mage/cards/t/TornadoElemental.java index d2ffbba3af..7a7b96c9f0 100644 --- a/Mage.Sets/src/mage/cards/t/TornadoElemental.java +++ b/Mage.Sets/src/mage/cards/t/TornadoElemental.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -53,7 +54,7 @@ public class TornadoElemental extends CardImpl { public TornadoElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/t/TorpidMoloch.java b/Mage.Sets/src/mage/cards/t/TorpidMoloch.java index d569b1899e..6ce131c995 100644 --- a/Mage.Sets/src/mage/cards/t/TorpidMoloch.java +++ b/Mage.Sets/src/mage/cards/t/TorpidMoloch.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -49,7 +50,7 @@ public class TorpidMoloch extends CardImpl { public TorpidMoloch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TorporDust.java b/Mage.Sets/src/mage/cards/t/TorporDust.java index 49fdd3c77d..d41ca22c14 100644 --- a/Mage.Sets/src/mage/cards/t/TorporDust.java +++ b/Mage.Sets/src/mage/cards/t/TorporDust.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class TorporDust extends CardImpl { public TorporDust(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U/B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/t/TorrentElemental.java b/Mage.Sets/src/mage/cards/t/TorrentElemental.java index 663a072c60..21d31406fb 100644 --- a/Mage.Sets/src/mage/cards/t/TorrentElemental.java +++ b/Mage.Sets/src/mage/cards/t/TorrentElemental.java @@ -41,6 +41,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class TorrentElemental extends CardImpl { public TorrentElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TorrentOfFire.java b/Mage.Sets/src/mage/cards/t/TorrentOfFire.java index d07918ce53..6f6501f595 100644 --- a/Mage.Sets/src/mage/cards/t/TorrentOfFire.java +++ b/Mage.Sets/src/mage/cards/t/TorrentOfFire.java @@ -42,10 +42,12 @@ import mage.target.common.TargetCreatureOrPlayer; public class TorrentOfFire extends CardImpl { public TorrentOfFire(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); // Torrent of Fire deals damage equal to the highest converted mana cost among permanents you control to target creature or player. - this.getSpellAbility().addEffect(new DamageTargetEffect(new HighestConvertedManaCostValue())); + this.getSpellAbility().addEffect(new DamageTargetEffect(new HighestConvertedManaCostValue()) + .setText("{this} deals damage to target creature or player equal to the highest converted mana cost among permanents you control.") + ); this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } diff --git a/Mage.Sets/src/mage/cards/t/TorrentOfStone.java b/Mage.Sets/src/mage/cards/t/TorrentOfStone.java index 332f427b9d..bad2a55ea1 100644 --- a/Mage.Sets/src/mage/cards/t/TorrentOfStone.java +++ b/Mage.Sets/src/mage/cards/t/TorrentOfStone.java @@ -53,7 +53,7 @@ public class TorrentOfStone extends CardImpl { public TorrentOfStone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Torrent of Stone deals 4 damage to target creature. diff --git a/Mage.Sets/src/mage/cards/t/TorrentialGearhulk.java b/Mage.Sets/src/mage/cards/t/TorrentialGearhulk.java index c0a86a5e3e..838bf4f9ad 100644 --- a/Mage.Sets/src/mage/cards/t/TorrentialGearhulk.java +++ b/Mage.Sets/src/mage/cards/t/TorrentialGearhulk.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -66,7 +67,7 @@ public class TorrentialGearhulk extends CardImpl { public TorrentialGearhulk(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}{U}{U}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/t/TorstenVonUrsus.java b/Mage.Sets/src/mage/cards/t/TorstenVonUrsus.java index 17d23591d4..63871252f1 100644 --- a/Mage.Sets/src/mage/cards/t/TorstenVonUrsus.java +++ b/Mage.Sets/src/mage/cards/t/TorstenVonUrsus.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -43,8 +44,8 @@ public class TorstenVonUrsus extends CardImpl { public TorstenVonUrsus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/Torture.java b/Mage.Sets/src/mage/cards/t/Torture.java index 23df04bb71..b9dc1d60da 100644 --- a/Mage.Sets/src/mage/cards/t/Torture.java +++ b/Mage.Sets/src/mage/cards/t/Torture.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -54,7 +55,7 @@ public class Torture extends CardImpl { public Torture(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/t/ToshiroUmezawa.java b/Mage.Sets/src/mage/cards/t/ToshiroUmezawa.java index f9feb132a4..c3210c1224 100644 --- a/Mage.Sets/src/mage/cards/t/ToshiroUmezawa.java +++ b/Mage.Sets/src/mage/cards/t/ToshiroUmezawa.java @@ -67,8 +67,8 @@ public class ToshiroUmezawa extends CardImpl { public ToshiroUmezawa(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Samurai"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TotemGuideHartebeest.java b/Mage.Sets/src/mage/cards/t/TotemGuideHartebeest.java index 855ff9bba7..f38bca4339 100644 --- a/Mage.Sets/src/mage/cards/t/TotemGuideHartebeest.java +++ b/Mage.Sets/src/mage/cards/t/TotemGuideHartebeest.java @@ -55,7 +55,7 @@ public class TotemGuideHartebeest extends CardImpl { public TotemGuideHartebeest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Antelope"); + this.subtype.add(SubType.ANTELOPE); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TotemSpeaker.java b/Mage.Sets/src/mage/cards/t/TotemSpeaker.java index 4c235262a6..78a71a2b8d 100644 --- a/Mage.Sets/src/mage/cards/t/TotemSpeaker.java +++ b/Mage.Sets/src/mage/cards/t/TotemSpeaker.java @@ -53,8 +53,8 @@ public class TotemSpeaker extends CardImpl { public TotemSpeaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TovolarsMagehunter.java b/Mage.Sets/src/mage/cards/t/TovolarsMagehunter.java index abe6a09238..1074d413ca 100644 --- a/Mage.Sets/src/mage/cards/t/TovolarsMagehunter.java +++ b/Mage.Sets/src/mage/cards/t/TovolarsMagehunter.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.game.Game; @@ -55,7 +56,7 @@ public class TovolarsMagehunter extends CardImpl { public TovolarsMagehunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.color.setRed(true); this.power = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TowerDrake.java b/Mage.Sets/src/mage/cards/t/TowerDrake.java index 155b00e07c..7dac64c70a 100644 --- a/Mage.Sets/src/mage/cards/t/TowerDrake.java +++ b/Mage.Sets/src/mage/cards/t/TowerDrake.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class TowerDrake extends CardImpl { public TowerDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TowerGargoyle.java b/Mage.Sets/src/mage/cards/t/TowerGargoyle.java index 98d5cafb92..489c625a70 100644 --- a/Mage.Sets/src/mage/cards/t/TowerGargoyle.java +++ b/Mage.Sets/src/mage/cards/t/TowerGargoyle.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class TowerGargoyle extends CardImpl { public TowerGargoyle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}{W}{U}{B}"); - this.subtype.add("Gargoyle"); + this.subtype.add(SubType.GARGOYLE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TowerGeist.java b/Mage.Sets/src/mage/cards/t/TowerGeist.java index bfbee3f6c2..a0078dad88 100644 --- a/Mage.Sets/src/mage/cards/t/TowerGeist.java +++ b/Mage.Sets/src/mage/cards/t/TowerGeist.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; @@ -49,7 +50,7 @@ public class TowerGeist extends CardImpl { public TowerGeist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ToweringBaloth.java b/Mage.Sets/src/mage/cards/t/ToweringBaloth.java index a95c4c06ae..fc396080ec 100644 --- a/Mage.Sets/src/mage/cards/t/ToweringBaloth.java +++ b/Mage.Sets/src/mage/cards/t/ToweringBaloth.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class ToweringBaloth extends CardImpl { public ToweringBaloth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(7); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/t/ToweringIndrik.java b/Mage.Sets/src/mage/cards/t/ToweringIndrik.java index 85ed80335b..ac8f477ccc 100644 --- a/Mage.Sets/src/mage/cards/t/ToweringIndrik.java +++ b/Mage.Sets/src/mage/cards/t/ToweringIndrik.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class ToweringIndrik extends CardImpl { public ToweringIndrik(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/ToweringThunderfist.java b/Mage.Sets/src/mage/cards/t/ToweringThunderfist.java index cba3c2a77f..5e5fed1d7f 100644 --- a/Mage.Sets/src/mage/cards/t/ToweringThunderfist.java +++ b/Mage.Sets/src/mage/cards/t/ToweringThunderfist.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class ToweringThunderfist extends CardImpl { public ToweringThunderfist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TownGossipmonger.java b/Mage.Sets/src/mage/cards/t/TownGossipmonger.java index 41cb7b4252..0cae0e2973 100644 --- a/Mage.Sets/src/mage/cards/t/TownGossipmonger.java +++ b/Mage.Sets/src/mage/cards/t/TownGossipmonger.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.i.IncitedRabble; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; @@ -59,7 +60,7 @@ public class TownGossipmonger extends CardImpl { public TownGossipmonger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TownSentry.java b/Mage.Sets/src/mage/cards/t/TownSentry.java index df94f22b80..f708353bfd 100644 --- a/Mage.Sets/src/mage/cards/t/TownSentry.java +++ b/Mage.Sets/src/mage/cards/t/TownSentry.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,8 +45,8 @@ public class TownSentry extends CardImpl { public TownSentry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/ToxicIguanar.java b/Mage.Sets/src/mage/cards/t/ToxicIguanar.java index b417be54dc..20ff4b5c98 100644 --- a/Mage.Sets/src/mage/cards/t/ToxicIguanar.java +++ b/Mage.Sets/src/mage/cards/t/ToxicIguanar.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -57,7 +58,7 @@ public class ToxicIguanar extends CardImpl { public ToxicIguanar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ToxicNim.java b/Mage.Sets/src/mage/cards/t/ToxicNim.java index 2aebffb9fd..d25d6b278e 100644 --- a/Mage.Sets/src/mage/cards/t/ToxicNim.java +++ b/Mage.Sets/src/mage/cards/t/ToxicNim.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class ToxicNim extends CardImpl { public ToxicNim(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/ToxinSliver.java b/Mage.Sets/src/mage/cards/t/ToxinSliver.java index 23a5b17bad..36cfe08f38 100644 --- a/Mage.Sets/src/mage/cards/t/ToxinSliver.java +++ b/Mage.Sets/src/mage/cards/t/ToxinSliver.java @@ -46,7 +46,7 @@ public class ToxinSliver extends CardImpl { public ToxinSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/Toymaker.java b/Mage.Sets/src/mage/cards/t/Toymaker.java new file mode 100644 index 0000000000..19e1b67358 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/Toymaker.java @@ -0,0 +1,141 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.constants.Zone; +import mage.filter.common.FilterArtifactPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public class Toymaker extends CardImpl { + + private static final FilterArtifactPermanent filter = new FilterArtifactPermanent("noncreature artifact"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); + } + + public Toymaker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); + + this.subtype.add(SubType.SPELLSHAPER); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}, {tap}, Discard a card: Target noncreature artifact becomes an artifact creature with power and toughness each equal to its converted mana cost until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ToymakerEffect(), new ManaCostsImpl("{1}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new DiscardCardCost()); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + public Toymaker(final Toymaker card) { + super(card); + } + + @Override + public Toymaker copy() { + return new Toymaker(this); + } +} + +class ToymakerEffect extends ContinuousEffectImpl { + + public ToymakerEffect() { + super(Duration.EndOfTurn, Outcome.BecomeCreature); + staticText = "Target noncreature artifact becomes an artifact creature with power and toughness each equal to its converted mana cost until end of turn"; + } + + public ToymakerEffect(final ToymakerEffect effect) { + super(effect); + } + + @Override + public ToymakerEffect copy() { + return new ToymakerEffect(this); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + Permanent artifact = game.getPermanent(this.getTargetPointer().getFirst(game, source)); + if (artifact == null) { + return false; + } + switch (layer) { + case TypeChangingEffects_4: + if (sublayer == SubLayer.NA) { + if (!artifact.isCreature()) { + artifact.addCardType(CardType.CREATURE); + } + } + break; + + case PTChangingEffects_7: + if (sublayer == SubLayer.SetPT_7b) { + int cmc = artifact.getConvertedManaCost(); + artifact.getPower().setValue(cmc); + artifact.getToughness().setValue(cmc); + } + } + return true; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public boolean hasLayer(Layer layer) { + return layer == Layer.PTChangingEffects_7 || layer == Layer.TypeChangingEffects_4; + } +} diff --git a/Mage.Sets/src/mage/cards/t/TraceOfAbundance.java b/Mage.Sets/src/mage/cards/t/TraceOfAbundance.java index 91f17e9cae..9c9462bd04 100644 --- a/Mage.Sets/src/mage/cards/t/TraceOfAbundance.java +++ b/Mage.Sets/src/mage/cards/t/TraceOfAbundance.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -60,7 +61,7 @@ public class TraceOfAbundance extends CardImpl { public TraceOfAbundance(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R/W}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/t/Tracker.java b/Mage.Sets/src/mage/cards/t/Tracker.java index c84d112c24..a4578a5d02 100644 --- a/Mage.Sets/src/mage/cards/t/Tracker.java +++ b/Mage.Sets/src/mage/cards/t/Tracker.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageEachOtherEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class Tracker extends CardImpl { public Tracker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TradeFederationBattleship.java b/Mage.Sets/src/mage/cards/t/TradeFederationBattleship.java index 61c3a10a8b..74df0cd5da 100644 --- a/Mage.Sets/src/mage/cards/t/TradeFederationBattleship.java +++ b/Mage.Sets/src/mage/cards/t/TradeFederationBattleship.java @@ -1,84 +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.cards.t; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.continuous.BoostControlledEffect; -import mage.abilities.keyword.SpaceflightAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.permanent.token.DroidToken; - -/** - * - * @author Styxo - */ -public class TradeFederationBattleship extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Droid creatures"); - - static { - filter.add(new SubtypePredicate(SubType.DROID)); - } - - public TradeFederationBattleship(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{W}{U}{B}"); - this.subtype.add("Starship"); - this.power = new MageInt(0); - this.toughness = new MageInt(6); - - // Spaceflight - this.addAbility(SpaceflightAbility.getInstance()); - - // Droid creatures you control get +1/+1 - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, false))); - - // {T}: Create two 1/1 colorless Droid artifact token cretures. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new DroidToken(), 2), new TapSourceCost())); - } - - public TradeFederationBattleship(final TradeFederationBattleship card) { - super(card); - } - - @Override - public TradeFederationBattleship copy() { - return new TradeFederationBattleship(this); - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.DroidToken; + +/** + * + * @author Styxo + */ +public class TradeFederationBattleship extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Droid creatures"); + + static { + filter.add(new SubtypePredicate(SubType.DROID)); + } + + public TradeFederationBattleship(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{W}{U}{B}"); + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(0); + this.toughness = new MageInt(6); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + + // Droid creatures you control get +1/+1 + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, false))); + + // {T}: Create two 1/1 colorless Droid artifact token cretures. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new DroidToken(), 2), new TapSourceCost())); + } + + public TradeFederationBattleship(final TradeFederationBattleship card) { + super(card); + } + + @Override + public TradeFederationBattleship copy() { + return new TradeFederationBattleship(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TradeSecrets.java b/Mage.Sets/src/mage/cards/t/TradeSecrets.java index f9c8212811..63398332cd 100644 --- a/Mage.Sets/src/mage/cards/t/TradeSecrets.java +++ b/Mage.Sets/src/mage/cards/t/TradeSecrets.java @@ -1,104 +1,104 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.DrawCardTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.game.Game; -import mage.players.Player; -import mage.target.common.TargetOpponent; - -/** - * - * @author jeffwadsworth - */ -public class TradeSecrets extends CardImpl { - - public TradeSecrets(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{U}{U}"); - - // Target opponent draws two cards, then you draw up to four cards. That opponent may repeat this process as many times as he or she chooses. - this.getSpellAbility().addTarget(new TargetOpponent()); - this.getSpellAbility().addEffect(new TradeSecretsEffect()); - - } - - public TradeSecrets(final TradeSecrets card) { - super(card); - } - - @Override - public TradeSecrets copy() { - return new TradeSecrets(this); - } -} - -class TradeSecretsEffect extends OneShotEffect { - - public TradeSecretsEffect() { - super(Outcome.DrawCard); - this.staticText = "Target opponent draws two cards, then you draw up to four cards. That opponent may repeat this process as many times as he or she chooses"; - } - - public TradeSecretsEffect(final TradeSecretsEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - String message = "Do you want to draw two cards and allow the spellcaster to draw up to four cards again?"; - String message2 = "How many cards do you want to draw?"; - Player controller = game.getPlayer(source.getControllerId()); - Player targetOpponent = game.getPlayer(source.getFirstTarget()); - if (controller != null - && targetOpponent != null) { - new DrawCardTargetEffect(2).apply(game, source);//The drawcard method would not work immediately - int amountOfCardsToDraw = controller.getAmount(0, 4, message2, game); - new DrawCardSourceControllerEffect(amountOfCardsToDraw).apply(game, source); - while (targetOpponent.chooseUse(Outcome.AIDontUseIt, message, source, game)) { - new DrawCardTargetEffect(2).apply(game, source); - amountOfCardsToDraw = controller.getAmount(0, 4, message2, game); - new DrawCardSourceControllerEffect(amountOfCardsToDraw).apply(game, source); - } - return true; - } - return false; - } - - @Override - public TradeSecretsEffect copy() { - return new TradeSecretsEffect(this); - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.DrawCardTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetOpponent; + +/** + * + * @author jeffwadsworth + */ +public class TradeSecrets extends CardImpl { + + public TradeSecrets(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{U}{U}"); + + // Target opponent draws two cards, then you draw up to four cards. That opponent may repeat this process as many times as he or she chooses. + this.getSpellAbility().addTarget(new TargetOpponent()); + this.getSpellAbility().addEffect(new TradeSecretsEffect()); + + } + + public TradeSecrets(final TradeSecrets card) { + super(card); + } + + @Override + public TradeSecrets copy() { + return new TradeSecrets(this); + } +} + +class TradeSecretsEffect extends OneShotEffect { + + public TradeSecretsEffect() { + super(Outcome.DrawCard); + this.staticText = "Target opponent draws two cards, then you draw up to four cards. That opponent may repeat this process as many times as he or she chooses"; + } + + public TradeSecretsEffect(final TradeSecretsEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + String message = "Do you want to draw two cards and allow the spellcaster to draw up to four cards again?"; + String message2 = "How many cards do you want to draw?"; + Player controller = game.getPlayer(source.getControllerId()); + Player targetOpponent = game.getPlayer(source.getFirstTarget()); + if (controller != null + && targetOpponent != null) { + new DrawCardTargetEffect(2).apply(game, source);//The drawcard method would not work immediately + int amountOfCardsToDraw = controller.getAmount(0, 4, message2, game); + new DrawCardSourceControllerEffect(amountOfCardsToDraw).apply(game, source); + while (targetOpponent.chooseUse(Outcome.AIDontUseIt, message, source, game)) { + new DrawCardTargetEffect(2).apply(game, source); + amountOfCardsToDraw = controller.getAmount(0, 4, message2, game); + new DrawCardSourceControllerEffect(amountOfCardsToDraw).apply(game, source); + } + return true; + } + return false; + } + + @Override + public TradeSecretsEffect copy() { + return new TradeSecretsEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TradewindRider.java b/Mage.Sets/src/mage/cards/t/TradewindRider.java index ae67e05afd..294e5cf5d2 100644 --- a/Mage.Sets/src/mage/cards/t/TradewindRider.java +++ b/Mage.Sets/src/mage/cards/t/TradewindRider.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; @@ -58,7 +59,7 @@ public class TradewindRider extends CardImpl { public TradewindRider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TragicPoet.java b/Mage.Sets/src/mage/cards/t/TragicPoet.java index 6cabcdf861..f497812b75 100644 --- a/Mage.Sets/src/mage/cards/t/TragicPoet.java +++ b/Mage.Sets/src/mage/cards/t/TragicPoet.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -56,7 +57,7 @@ public class TragicPoet extends CardImpl { public TragicPoet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/Trailblazer.java b/Mage.Sets/src/mage/cards/t/Trailblazer.java new file mode 100644 index 0000000000..871286f0ba --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/Trailblazer.java @@ -0,0 +1,59 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class Trailblazer extends CardImpl { + + public Trailblazer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}{G}"); + + // Target creature is unblockable this turn. + this.getSpellAbility().addEffect(new CantBeBlockedTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public Trailblazer(final Trailblazer card) { + super(card); + } + + @Override + public Trailblazer copy() { + return new Trailblazer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TrailblazersBoots.java b/Mage.Sets/src/mage/cards/t/TrailblazersBoots.java index 7eb7ac3497..f21e5308e7 100644 --- a/Mage.Sets/src/mage/cards/t/TrailblazersBoots.java +++ b/Mage.Sets/src/mage/cards/t/TrailblazersBoots.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; @@ -49,7 +50,7 @@ public class TrailblazersBoots extends CardImpl { public TrailblazersBoots(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has nonbasic landwalk. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new LandwalkAbility(FilterLandPermanent.nonbasicLand()), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/t/TrainedArmodon.java b/Mage.Sets/src/mage/cards/t/TrainedArmodon.java index 262d1bc408..a6890a872f 100644 --- a/Mage.Sets/src/mage/cards/t/TrainedArmodon.java +++ b/Mage.Sets/src/mage/cards/t/TrainedArmodon.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class TrainedArmodon extends CardImpl { public TrainedArmodon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TrainedCaracal.java b/Mage.Sets/src/mage/cards/t/TrainedCaracal.java index 640a615cc6..2b5317a920 100644 --- a/Mage.Sets/src/mage/cards/t/TrainedCaracal.java +++ b/Mage.Sets/src/mage/cards/t/TrainedCaracal.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class TrainedCaracal extends CardImpl { public TrainedCaracal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TrainedCheetah.java b/Mage.Sets/src/mage/cards/t/TrainedCheetah.java index 70416016d8..91e4a0c161 100644 --- a/Mage.Sets/src/mage/cards/t/TrainedCheetah.java +++ b/Mage.Sets/src/mage/cards/t/TrainedCheetah.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class TrainedCheetah extends CardImpl { public TrainedCheetah(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TrainedCondor.java b/Mage.Sets/src/mage/cards/t/TrainedCondor.java index 0f84b9da68..752421c37e 100644 --- a/Mage.Sets/src/mage/cards/t/TrainedCondor.java +++ b/Mage.Sets/src/mage/cards/t/TrainedCondor.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -55,7 +56,7 @@ public class TrainedCondor extends CardImpl { } public TrainedCondor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TrainedJackal.java b/Mage.Sets/src/mage/cards/t/TrainedJackal.java index 524f689f77..22ee00a800 100644 --- a/Mage.Sets/src/mage/cards/t/TrainedJackal.java +++ b/Mage.Sets/src/mage/cards/t/TrainedJackal.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class TrainedJackal extends CardImpl { public TrainedJackal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Jackal"); + this.subtype.add(SubType.JACKAL); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TrainedOrgg.java b/Mage.Sets/src/mage/cards/t/TrainedOrgg.java index c4597131bd..83910d6e95 100644 --- a/Mage.Sets/src/mage/cards/t/TrainedOrgg.java +++ b/Mage.Sets/src/mage/cards/t/TrainedOrgg.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class TrainedOrgg extends CardImpl { public TrainedOrgg(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{R}"); - this.subtype.add("Orgg"); + this.subtype.add(SubType.ORGG); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/t/TrainingDrone.java b/Mage.Sets/src/mage/cards/t/TrainingDrone.java index 74d061266e..d2e58a3b9d 100644 --- a/Mage.Sets/src/mage/cards/t/TrainingDrone.java +++ b/Mage.Sets/src/mage/cards/t/TrainingDrone.java @@ -36,6 +36,7 @@ import mage.abilities.effects.RestrictionEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -49,7 +50,7 @@ public class TrainingDrone extends CardImpl { public TrainingDrone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Drone"); + this.subtype.add(SubType.DRONE); this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -85,7 +86,7 @@ class TrainingDroneEffect extends RestrictionEffect { List attachments = permanent.getAttachments(); for (UUID uuid : attachments) { Permanent attached = game.getBattlefield().getPermanent(uuid); - if (attached.getSubtype(game).contains("Equipment")) { + if (attached.hasSubtype(SubType.EQUIPMENT, game)) { return false; } } diff --git a/Mage.Sets/src/mage/cards/t/TraitorousBlood.java b/Mage.Sets/src/mage/cards/t/TraitorousBlood.java index 81f5feb49b..f240d5a7e4 100644 --- a/Mage.Sets/src/mage/cards/t/TraitorousBlood.java +++ b/Mage.Sets/src/mage/cards/t/TraitorousBlood.java @@ -46,15 +46,14 @@ import mage.target.common.TargetCreaturePermanent; public class TraitorousBlood extends CardImpl { public TraitorousBlood(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}{R}"); // Gain control of target creature until end of turn. Untap it. It gains trample and haste until end of turn. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new UntapTargetEffect()); - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap it")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn).setText("It gains trample")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("and hast until end of turn")); } public TraitorousBlood(final TraitorousBlood card) { diff --git a/Mage.Sets/src/mage/cards/t/TraitorousInstinct.java b/Mage.Sets/src/mage/cards/t/TraitorousInstinct.java index bf08200c80..cda61457d7 100644 --- a/Mage.Sets/src/mage/cards/t/TraitorousInstinct.java +++ b/Mage.Sets/src/mage/cards/t/TraitorousInstinct.java @@ -46,14 +46,13 @@ import mage.target.common.TargetCreaturePermanent; public class TraitorousInstinct extends CardImpl { public TraitorousInstinct(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}"); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new UntapTargetEffect()); - this.getSpellAbility().addEffect(new BoostTargetEffect(2, 0, Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap that creature")); + this.getSpellAbility().addEffect(new BoostTargetEffect(2, 0, Duration.EndOfTurn).setText("Until end of turn, it gets +2/+0")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("and gains haste")); } public TraitorousInstinct(final TraitorousInstinct card) { diff --git a/Mage.Sets/src/mage/cards/t/TranquilPath.java b/Mage.Sets/src/mage/cards/t/TranquilPath.java index de90b5056b..04d214cd1e 100644 --- a/Mage.Sets/src/mage/cards/t/TranquilPath.java +++ b/Mage.Sets/src/mage/cards/t/TranquilPath.java @@ -42,13 +42,12 @@ import mage.filter.common.FilterEnchantmentPermanent; public class TranquilPath extends CardImpl { public TranquilPath(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{G}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}"); // Destroy all enchantments. this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterEnchantmentPermanent("enchantments"))); // Draw a card. - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).setText("

Draw a card")); } public TranquilPath(final TranquilPath card) { diff --git a/Mage.Sets/src/mage/cards/t/TranscendentMaster.java b/Mage.Sets/src/mage/cards/t/TranscendentMaster.java index a6c9b1b256..f29386cec3 100644 --- a/Mage.Sets/src/mage/cards/t/TranscendentMaster.java +++ b/Mage.Sets/src/mage/cards/t/TranscendentMaster.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardSetInfo; import mage.cards.LevelerCard; import mage.constants.CardType; +import mage.constants.SubType; /** * @author North, noxx @@ -48,9 +49,9 @@ public class TranscendentMaster extends LevelerCard { public TranscendentMaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.AVATAR); this.color.setWhite(true); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TransguildCourier.java b/Mage.Sets/src/mage/cards/t/TransguildCourier.java index b34a645728..6d7d7e3f07 100644 --- a/Mage.Sets/src/mage/cards/t/TransguildCourier.java +++ b/Mage.Sets/src/mage/cards/t/TransguildCourier.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class TransguildCourier extends CardImpl { public TransguildCourier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/Transluminant.java b/Mage.Sets/src/mage/cards/t/Transluminant.java index 3ecb922f6d..0df5d56d1d 100644 --- a/Mage.Sets/src/mage/cards/t/Transluminant.java +++ b/Mage.Sets/src/mage/cards/t/Transluminant.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.SpiritWhiteToken; @@ -50,8 +51,8 @@ public class Transluminant extends CardImpl { public Transluminant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Dryad"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.DRYAD); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TransmogrifyingLicid.java b/Mage.Sets/src/mage/cards/t/TransmogrifyingLicid.java index 1feb65a783..df9673e6a7 100644 --- a/Mage.Sets/src/mage/cards/t/TransmogrifyingLicid.java +++ b/Mage.Sets/src/mage/cards/t/TransmogrifyingLicid.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class TransmogrifyingLicid extends CardImpl { public TransmogrifyingLicid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Licid"); + this.subtype.add(SubType.LICID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TrapDigger.java b/Mage.Sets/src/mage/cards/t/TrapDigger.java index e5753f06ab..77199d6490 100644 --- a/Mage.Sets/src/mage/cards/t/TrapDigger.java +++ b/Mage.Sets/src/mage/cards/t/TrapDigger.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterAttackingCreature; @@ -66,8 +67,8 @@ public class TrapDigger extends CardImpl { public TrapDigger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TrapjawKelpie.java b/Mage.Sets/src/mage/cards/t/TrapjawKelpie.java index 6963698e45..24d3508ad7 100644 --- a/Mage.Sets/src/mage/cards/t/TrapjawKelpie.java +++ b/Mage.Sets/src/mage/cards/t/TrapjawKelpie.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.PersistAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class TrapjawKelpie extends CardImpl { public TrapjawKelpie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G/U}{G/U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TraprootKami.java b/Mage.Sets/src/mage/cards/t/TraprootKami.java index 05d620135c..119adc5748 100644 --- a/Mage.Sets/src/mage/cards/t/TraprootKami.java +++ b/Mage.Sets/src/mage/cards/t/TraprootKami.java @@ -57,7 +57,7 @@ public class TraprootKami extends CardImpl { public TraprootKami(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/t/TravelersCloak.java b/Mage.Sets/src/mage/cards/t/TravelersCloak.java index 16aac5d06a..79b2ee29c5 100644 --- a/Mage.Sets/src/mage/cards/t/TravelersCloak.java +++ b/Mage.Sets/src/mage/cards/t/TravelersCloak.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; @@ -58,7 +59,7 @@ public class TravelersCloak extends CardImpl { public TravelersCloak(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/t/TravelingPhilosopher.java b/Mage.Sets/src/mage/cards/t/TravelingPhilosopher.java index 376d608186..455709b42f 100644 --- a/Mage.Sets/src/mage/cards/t/TravelingPhilosopher.java +++ b/Mage.Sets/src/mage/cards/t/TravelingPhilosopher.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class TravelingPhilosopher extends CardImpl { public TravelingPhilosopher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TreacherousPitDweller.java b/Mage.Sets/src/mage/cards/t/TreacherousPitDweller.java index 47bddf430a..aeb1ccac8f 100644 --- a/Mage.Sets/src/mage/cards/t/TreacherousPitDweller.java +++ b/Mage.Sets/src/mage/cards/t/TreacherousPitDweller.java @@ -50,7 +50,7 @@ public class TreacherousPitDweller extends CardImpl { public TreacherousPitDweller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TreacherousUrge.java b/Mage.Sets/src/mage/cards/t/TreacherousUrge.java new file mode 100644 index 0000000000..edaa9445bc --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TreacherousUrge.java @@ -0,0 +1,134 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetCard; +import mage.target.common.TargetOpponent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author L_J + */ +public class TreacherousUrge extends CardImpl { + + public TreacherousUrge(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{B}"); + + // Target opponent reveals his or her hand. You may put a creature card from it onto the battlefield under your control. That creature gains haste. Sacrifice it at the beginning of the next end step. + this.getSpellAbility().addEffect(new TreacherousUrgeEffect()); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public TreacherousUrge(final TreacherousUrge card) { + super(card); + } + + @Override + public TreacherousUrge copy() { + return new TreacherousUrge(this); + } +} + +class TreacherousUrgeEffect extends OneShotEffect { + + private static final FilterCreatureCard filter = new FilterCreatureCard(); + + public TreacherousUrgeEffect() { + super(Outcome.Benefit); + this.staticText = "Target opponent reveals his or her hand. You may put a creature card from it onto the battlefield under your control. That creature gains haste. Sacrifice it at the beginning of the next end step"; + } + + public TreacherousUrgeEffect(final TreacherousUrgeEffect effect) { + super(effect); + } + + @Override + public TreacherousUrgeEffect copy() { + return new TreacherousUrgeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player opponent = game.getPlayer(targetPointer.getFirst(game, source)); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (opponent != null && sourceObject != null) { + opponent.revealCards(sourceObject.getName(), opponent.getHand(), game); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int cardsHand = opponent.getHand().count(filter, game); + Card card = null; + if (cardsHand > 0) { + TargetCard target = new TargetCard(Zone.HAND, filter); + if (controller.choose(Outcome.Benefit, opponent.getHand(), target, game)) { + card = opponent.getHand().get(target.getFirstTarget(), game); + if (card != null) { + 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); + effect.setTargetPointer(new FixedTarget(permanent, game)); + game.addEffect(effect, source); + SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice " + card.getName(), source.getControllerId()); + sacrificeEffect.setTargetPointer(new FixedTarget(permanent, game)); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); + game.addDelayedTriggeredAbility(delayedAbility, source); + return true; + } + } + } + return false; + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/t/TreacherousVampire.java b/Mage.Sets/src/mage/cards/t/TreacherousVampire.java new file mode 100644 index 0000000000..aa4a80ed5f --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TreacherousVampire.java @@ -0,0 +1,100 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksOrBlocksTriggeredAbility; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CardsInControllerGraveCondition; +import mage.abilities.costs.common.ExileFromGraveCost; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DoUnlessControllerPaysEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author TheElk801 + */ +public class TreacherousVampire extends CardImpl { + + public TreacherousVampire(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); + + this.subtype.add(SubType.VAMPIRE); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever Treacherous Vampire attacks or blocks, sacrifice it unless you exile a card from your graveyard. + this.addAbility(new AttacksOrBlocksTriggeredAbility( + new DoUnlessControllerPaysEffect( + new SacrificeSourceEffect(), + new ExileFromGraveCost(new ExileFromGraveCost(new TargetCardInYourGraveyard())) + ), false + )); + + // Threshold - As long as seven or more cards are in your graveyard, Treacherous Vampire gets +2/+2 and has "When Treacherous Vampire dies, you lose 6 life." + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7), + "As long as seven or more cards are in your graveyard, {this} gets +2/+2")); + Effect effect = new ConditionalContinuousEffect( + new GainAbilitySourceEffect(new DiesTriggeredAbility(new LoseLifeSourceControllerEffect(6))), + new CardsInControllerGraveCondition(7), "and has \"When {this} dies, you lose 6 life.\"" + ); + ability.addEffect(effect); + ability.setAbilityWord(AbilityWord.THRESHOLD); + this.addAbility(ability); + } + + public TreacherousVampire(final TreacherousVampire card) { + super(card); + } + + @Override + public TreacherousVampire copy() { + return new TreacherousVampire(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TreacherousWerewolf.java b/Mage.Sets/src/mage/cards/t/TreacherousWerewolf.java new file mode 100644 index 0000000000..2b40d4a990 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TreacherousWerewolf.java @@ -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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CardsInControllerGraveCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class TreacherousWerewolf extends CardImpl { + + public TreacherousWerewolf(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.WEREWOLF); + this.subtype.add(SubType.MINION); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Threshold - As long as seven or more cards are in your graveyard, Treacherous Werewolf gets +2/+2 and has "When Treacherous Werewolf dies, you lose 4 life." + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7), + "As long as seven or more cards are in your graveyard, {this} gets +2/+2")); + Effect effect = new ConditionalContinuousEffect( + new GainAbilitySourceEffect(new DiesTriggeredAbility(new LoseLifeSourceControllerEffect(4))), + new CardsInControllerGraveCondition(7), "and has \"When {this} dies, you lose 4 life.\"" + ); + ability.addEffect(effect); + ability.setAbilityWord(AbilityWord.THRESHOLD); + this.addAbility(ability); + } + + public TreacherousWerewolf(final TreacherousWerewolf card) { + super(card); + } + + @Override + public TreacherousWerewolf copy() { + return new TreacherousWerewolf(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/Treachery.java b/Mage.Sets/src/mage/cards/t/Treachery.java index bc2a2bdc96..4fcb9dce56 100644 --- a/Mage.Sets/src/mage/cards/t/Treachery.java +++ b/Mage.Sets/src/mage/cards/t/Treachery.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class Treachery extends CardImpl { public Treachery(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/t/TreasonousOgre.java b/Mage.Sets/src/mage/cards/t/TreasonousOgre.java index ee29d73465..196becbb49 100644 --- a/Mage.Sets/src/mage/cards/t/TreasonousOgre.java +++ b/Mage.Sets/src/mage/cards/t/TreasonousOgre.java @@ -36,6 +36,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class TreasonousOgre extends CardImpl { public TreasonousOgre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TreasureCove.java b/Mage.Sets/src/mage/cards/t/TreasureCove.java new file mode 100644 index 0000000000..3f82ff8284 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TreasureCove.java @@ -0,0 +1,80 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author TheElk801 + */ +public class TreasureCove extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Treasure"); + + static { + filter.add(new SubtypePredicate(SubType.TREASURE)); + } + + public TreasureCove(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + this.nightCard = true; + + // {T}: Add {C} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {T}, Sacrifice a Treasure: Draw a card. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new TapSourceCost()); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); + this.addAbility(ability); + } + + public TreasureCove(final TreasureCove card) { + super(card); + } + + @Override + public TreasureCove copy() { + return new TreasureCove(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TreasureHunter.java b/Mage.Sets/src/mage/cards/t/TreasureHunter.java index b7f07f4532..3c8bf66038 100644 --- a/Mage.Sets/src/mage/cards/t/TreasureHunter.java +++ b/Mage.Sets/src/mage/cards/t/TreasureHunter.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterArtifactCard; import mage.target.common.TargetCardInYourGraveyard; @@ -46,7 +47,7 @@ public class TreasureHunter extends CardImpl { public TreasureHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TreasureKeeper.java b/Mage.Sets/src/mage/cards/t/TreasureKeeper.java index 8d3487f206..97cbadded9 100644 --- a/Mage.Sets/src/mage/cards/t/TreasureKeeper.java +++ b/Mage.Sets/src/mage/cards/t/TreasureKeeper.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -51,7 +52,7 @@ public class TreasureKeeper extends CardImpl { public TreasureKeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TreasureMage.java b/Mage.Sets/src/mage/cards/t/TreasureMage.java index 61e0d819ef..26a15a79ce 100644 --- a/Mage.Sets/src/mage/cards/t/TreasureMage.java +++ b/Mage.Sets/src/mage/cards/t/TreasureMage.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -57,8 +58,8 @@ public class TreasureMage extends CardImpl { public TreasureMage (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TreasureMap.java b/Mage.Sets/src/mage/cards/t/TreasureMap.java new file mode 100644 index 0000000000..941a9358a3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TreasureMap.java @@ -0,0 +1,117 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.TreasureToken; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class TreasureMap extends CardImpl { + + public TreasureMap(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + this.transformable = true; + this.secondSideCardClazz = TreasureCove.class; + + // {1}, {T}: Scry 1. Put a landmark counter on Treasure Map. Then if there are three or more landmark counters on it, remove those counters, transform Treasure Map, and create three colorless Treasure artifact tokens with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool." + this.addAbility(new TransformAbility()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TreasureMapEffect(), new ManaCostsImpl("{1}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public TreasureMap(final TreasureMap card) { + super(card); + } + + @Override + public TreasureMap copy() { + return new TreasureMap(this); + } +} + +class TreasureMapEffect extends OneShotEffect { + + TreasureMapEffect() { + super(Outcome.Benefit); + this.staticText = "Scry 1. Put a landmark counter on {this}. " + + "Then if there are three or more landmark counters on it, " + + "remove those counters, transform {this}, and create " + + "three colorless Treasure artifact tokens with \"{T}, Sacrifice this artifact: Add one mana of any color to your mana pool."; + } + + TreasureMapEffect(final TreasureMapEffect effect) { + super(effect); + } + + @Override + public TreasureMapEffect copy() { + return new TreasureMapEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + player.scry(1, source, game); + if (permanent != null) { + permanent.addCounters(CounterType.LANDMARK.createInstance(), source, game); + int counters = permanent.getCounters(game).getCount(CounterType.LANDMARK); + if (counters > 2) { + permanent.removeCounters("landmark", counters, game); + new TransformSourceEffect(true).apply(game, source); + new CreateTokenEffect(new TreasureToken("XLN"), 3).apply(game, source); + } + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/t/TreasuryThrull.java b/Mage.Sets/src/mage/cards/t/TreasuryThrull.java index 327f889e32..f024c077ea 100644 --- a/Mage.Sets/src/mage/cards/t/TreasuryThrull.java +++ b/Mage.Sets/src/mage/cards/t/TreasuryThrull.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ExtortAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -56,7 +57,7 @@ public class TreasuryThrull extends CardImpl { public TreasuryThrull(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{B}"); - this.subtype.add("Thrull"); + this.subtype.add(SubType.THRULL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TreeMonkey.java b/Mage.Sets/src/mage/cards/t/TreeMonkey.java index 7042b408b3..070a6dab0c 100644 --- a/Mage.Sets/src/mage/cards/t/TreeMonkey.java +++ b/Mage.Sets/src/mage/cards/t/TreeMonkey.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class TreeMonkey extends CardImpl { public TreeMonkey(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Monkey"); + this.subtype.add(SubType.MONKEY); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TreeOfPerdition.java b/Mage.Sets/src/mage/cards/t/TreeOfPerdition.java index 7aff691086..640ae40c31 100644 --- a/Mage.Sets/src/mage/cards/t/TreeOfPerdition.java +++ b/Mage.Sets/src/mage/cards/t/TreeOfPerdition.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -52,7 +53,7 @@ public class TreeOfPerdition extends CardImpl { public TreeOfPerdition(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Plant"); + this.subtype.add(SubType.PLANT); this.power = new MageInt(0); this.toughness = new MageInt(13); diff --git a/Mage.Sets/src/mage/cards/t/TreeOfRedemption.java b/Mage.Sets/src/mage/cards/t/TreeOfRedemption.java index c268f3f1af..cd2322bd20 100644 --- a/Mage.Sets/src/mage/cards/t/TreeOfRedemption.java +++ b/Mage.Sets/src/mage/cards/t/TreeOfRedemption.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SubLayer; @@ -54,7 +55,7 @@ public class TreeOfRedemption extends CardImpl { public TreeOfRedemption(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Plant"); + this.subtype.add(SubType.PLANT); this.power = new MageInt(0); this.toughness = new MageInt(13); diff --git a/Mage.Sets/src/mage/cards/t/TreefolkHarbinger.java b/Mage.Sets/src/mage/cards/t/TreefolkHarbinger.java index 3a6a537f5c..8267ece217 100644 --- a/Mage.Sets/src/mage/cards/t/TreefolkHarbinger.java +++ b/Mage.Sets/src/mage/cards/t/TreefolkHarbinger.java @@ -53,8 +53,8 @@ public class TreefolkHarbinger extends CardImpl { public TreefolkHarbinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Druid"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.DRUID); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TreefolkHealer.java b/Mage.Sets/src/mage/cards/t/TreefolkHealer.java index c7ef8ac710..0218d22751 100644 --- a/Mage.Sets/src/mage/cards/t/TreefolkHealer.java +++ b/Mage.Sets/src/mage/cards/t/TreefolkHealer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -49,8 +50,8 @@ public class TreefolkHealer extends CardImpl { public TreefolkHealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TreefolkMystic.java b/Mage.Sets/src/mage/cards/t/TreefolkMystic.java index 9c7e6e630b..3b29abd1b4 100644 --- a/Mage.Sets/src/mage/cards/t/TreefolkMystic.java +++ b/Mage.Sets/src/mage/cards/t/TreefolkMystic.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -49,7 +50,7 @@ public class TreefolkMystic extends CardImpl { public TreefolkMystic(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(2); this.toughness = new MageInt(4); @@ -91,7 +92,7 @@ class TreefolkMysticEffect extends OneShotEffect { attachments.addAll(permanent.getAttachments()); for (UUID uuid : attachments) { Permanent aura = game.getPermanent(uuid); - if (aura != null && aura.getSubtype(game).contains("Aura")) { + if (aura != null && aura.hasSubtype(SubType.AURA, game)) { aura.destroy(source.getSourceId(), game, false); } } diff --git a/Mage.Sets/src/mage/cards/t/TreefolkSeedlings.java b/Mage.Sets/src/mage/cards/t/TreefolkSeedlings.java index 856c61609b..8ecb4564aa 100644 --- a/Mage.Sets/src/mage/cards/t/TreefolkSeedlings.java +++ b/Mage.Sets/src/mage/cards/t/TreefolkSeedlings.java @@ -55,7 +55,7 @@ public class TreefolkSeedlings extends CardImpl { public TreefolkSeedlings(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(2); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/t/TreespringLorian.java b/Mage.Sets/src/mage/cards/t/TreespringLorian.java index d91370ae83..c4dcd457bd 100644 --- a/Mage.Sets/src/mage/cards/t/TreespringLorian.java +++ b/Mage.Sets/src/mage/cards/t/TreespringLorian.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class TreespringLorian extends CardImpl { public TreespringLorian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TreetopBracers.java b/Mage.Sets/src/mage/cards/t/TreetopBracers.java index 888356cff6..cfd90f702f 100644 --- a/Mage.Sets/src/mage/cards/t/TreetopBracers.java +++ b/Mage.Sets/src/mage/cards/t/TreetopBracers.java @@ -53,7 +53,7 @@ public class TreetopBracers extends CardImpl { public TreetopBracers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/t/TreetopDefense.java b/Mage.Sets/src/mage/cards/t/TreetopDefense.java new file mode 100644 index 0000000000..c144df4dd7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TreetopDefense.java @@ -0,0 +1,73 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility; +import mage.abilities.condition.common.AttackedThisStepCondition; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.PhaseStep; +import mage.constants.TurnPhase; +import mage.watchers.common.PlayerAttackedStepWatcher; + +/** + * + * @author TheElk801 + */ +public class TreetopDefense extends CardImpl { + + public TreetopDefense(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}"); + + // Cast Treetop Defense only during the declare attackers step and only if you've been attacked this step. + Ability ability = new CastOnlyDuringPhaseStepSourceAbility( + TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance, + "Cast {this} only during the declare attackers step and only if you've been attacked this step." + ); + ability.addWatcher(new PlayerAttackedStepWatcher()); + this.addAbility(ability); + + // Creatures you control gain reach until end of turn. + this.getSpellAbility().addEffect(new GainAbilityControlledEffect(ReachAbility.getInstance(), Duration.EndOfTurn)); + } + + public TreetopDefense(final TreetopDefense card) { + super(card); + } + + @Override + public TreetopDefense copy() { + return new TreetopDefense(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TreetopRangers.java b/Mage.Sets/src/mage/cards/t/TreetopRangers.java index f32b966b78..b00d1c348b 100644 --- a/Mage.Sets/src/mage/cards/t/TreetopRangers.java +++ b/Mage.Sets/src/mage/cards/t/TreetopRangers.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -55,7 +56,7 @@ public class TreetopRangers extends CardImpl { public TreetopRangers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TreetopScout.java b/Mage.Sets/src/mage/cards/t/TreetopScout.java index 5f1ac49040..b5bfd9e078 100644 --- a/Mage.Sets/src/mage/cards/t/TreetopScout.java +++ b/Mage.Sets/src/mage/cards/t/TreetopScout.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -55,8 +56,8 @@ public class TreetopScout extends CardImpl { public TreetopScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TreetopSentinel.java b/Mage.Sets/src/mage/cards/t/TreetopSentinel.java index b3c1a41188..9622c1a7fb 100644 --- a/Mage.Sets/src/mage/cards/t/TreetopSentinel.java +++ b/Mage.Sets/src/mage/cards/t/TreetopSentinel.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class TreetopSentinel extends CardImpl { public TreetopSentinel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TreetopVillage.java b/Mage.Sets/src/mage/cards/t/TreetopVillage.java index 191ac4b018..9dede10e44 100644 --- a/Mage.Sets/src/mage/cards/t/TreetopVillage.java +++ b/Mage.Sets/src/mage/cards/t/TreetopVillage.java @@ -38,6 +38,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -69,7 +70,7 @@ class ApeToken extends Token { ApeToken() { super("Ape", "3/3 green Ape creature with trample"); cardType.add(CardType.CREATURE); - this.subtype.add("Ape"); + this.subtype.add(SubType.APE); color.setGreen(true); power = new MageInt(3); toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TrenchGorger.java b/Mage.Sets/src/mage/cards/t/TrenchGorger.java index 07e34ff8bc..2c1f68ae66 100644 --- a/Mage.Sets/src/mage/cards/t/TrenchGorger.java +++ b/Mage.Sets/src/mage/cards/t/TrenchGorger.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SubLayer; @@ -55,7 +56,7 @@ public class TrenchGorger extends CardImpl { public TrenchGorger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{U}{U}"); - this.subtype.add("Leviathan"); + this.subtype.add(SubType.LEVIATHAN); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/t/TrenchWurm.java b/Mage.Sets/src/mage/cards/t/TrenchWurm.java index 0dc9f53923..2a0bee2726 100644 --- a/Mage.Sets/src/mage/cards/t/TrenchWurm.java +++ b/Mage.Sets/src/mage/cards/t/TrenchWurm.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetNonBasicLandPermanent; @@ -48,7 +49,7 @@ public class TrenchWurm extends CardImpl { public TrenchWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TrenchingSteed.java b/Mage.Sets/src/mage/cards/t/TrenchingSteed.java index 6d1063a15c..f0caa3b5f0 100644 --- a/Mage.Sets/src/mage/cards/t/TrenchingSteed.java +++ b/Mage.Sets/src/mage/cards/t/TrenchingSteed.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -48,8 +49,8 @@ public class TrenchingSteed extends CardImpl { public TrenchingSteed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Horse"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HORSE); + this.subtype.add(SubType.REBEL); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TrepanationBlade.java b/Mage.Sets/src/mage/cards/t/TrepanationBlade.java index 14d1a5dc8d..220c92ec2b 100644 --- a/Mage.Sets/src/mage/cards/t/TrepanationBlade.java +++ b/Mage.Sets/src/mage/cards/t/TrepanationBlade.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -57,7 +58,7 @@ public class TrepanationBlade extends CardImpl { public TrepanationBlade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Whenever equipped creature attacks, defending player reveals cards from the top of his or her library until he or she reveals a land card. // The creature gets +1/+0 until end of turn for each card revealed this way. That player puts the revealed cards into his or her graveyard. diff --git a/Mage.Sets/src/mage/cards/t/TrespasserIlVec.java b/Mage.Sets/src/mage/cards/t/TrespasserIlVec.java index 0c239e0b77..cf9eae8cfb 100644 --- a/Mage.Sets/src/mage/cards/t/TrespasserIlVec.java +++ b/Mage.Sets/src/mage/cards/t/TrespasserIlVec.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ShadowAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class TrespasserIlVec extends CardImpl { public TrespasserIlVec(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TrespassingSouleater.java b/Mage.Sets/src/mage/cards/t/TrespassingSouleater.java index d02d31bb64..fad1352e83 100644 --- a/Mage.Sets/src/mage/cards/t/TrespassingSouleater.java +++ b/Mage.Sets/src/mage/cards/t/TrespassingSouleater.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class TrespassingSouleater extends CardImpl { public TrespassingSouleater(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TrestleTroll.java b/Mage.Sets/src/mage/cards/t/TrestleTroll.java index 74d3dea9f3..4342af83a6 100644 --- a/Mage.Sets/src/mage/cards/t/TrestleTroll.java +++ b/Mage.Sets/src/mage/cards/t/TrestleTroll.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class TrestleTroll extends CardImpl { public TrestleTroll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{G}"); - this.subtype.add("Troll"); + this.subtype.add(SubType.TROLL); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TrevaTheRenewer.java b/Mage.Sets/src/mage/cards/t/TrevaTheRenewer.java index 946d569532..70884572c6 100644 --- a/Mage.Sets/src/mage/cards/t/TrevaTheRenewer.java +++ b/Mage.Sets/src/mage/cards/t/TrevaTheRenewer.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.choices.ChoiceColor; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.filter.FilterPermanent; @@ -56,7 +57,7 @@ public class TrevaTheRenewer extends CardImpl { public TrevaTheRenewer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{W}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/t/TrevasAttendant.java b/Mage.Sets/src/mage/cards/t/TrevasAttendant.java index 4eff62ab95..5ecdd6365f 100644 --- a/Mage.Sets/src/mage/cards/t/TrevasAttendant.java +++ b/Mage.Sets/src/mage/cards/t/TrevasAttendant.java @@ -37,6 +37,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class TrevasAttendant extends CardImpl { public TrevasAttendant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TriFighter.java b/Mage.Sets/src/mage/cards/t/TriFighter.java index 60d3559d9e..d2cf8c20b7 100644 --- a/Mage.Sets/src/mage/cards/t/TriFighter.java +++ b/Mage.Sets/src/mage/cards/t/TriFighter.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.SpaceflightAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class TriFighter extends CardImpl { public TriFighter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{U/B}{U/B}"); - this.subtype.add("Droid"); - this.subtype.add("Starship"); + this.subtype.add(SubType.DROID); + this.subtype.add(SubType.STARSHIP); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TriadOfFates.java b/Mage.Sets/src/mage/cards/t/TriadOfFates.java index 8c71adc9ef..fcaf65e177 100644 --- a/Mage.Sets/src/mage/cards/t/TriadOfFates.java +++ b/Mage.Sets/src/mage/cards/t/TriadOfFates.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -71,8 +72,8 @@ public class TriadOfFates extends CardImpl { public TriadOfFates(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TribalForcemage.java b/Mage.Sets/src/mage/cards/t/TribalForcemage.java index ee7b59a03b..5cce4b77ba 100644 --- a/Mage.Sets/src/mage/cards/t/TribalForcemage.java +++ b/Mage.Sets/src/mage/cards/t/TribalForcemage.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.filter.common.FilterCreaturePermanent; @@ -53,8 +54,8 @@ public class TribalForcemage extends CardImpl { public TribalForcemage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TricksOfTheTrade.java b/Mage.Sets/src/mage/cards/t/TricksOfTheTrade.java index e44fd2dc26..1318fd5416 100644 --- a/Mage.Sets/src/mage/cards/t/TricksOfTheTrade.java +++ b/Mage.Sets/src/mage/cards/t/TricksOfTheTrade.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class TricksOfTheTrade extends CardImpl { public TricksOfTheTrade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/t/TricksterMage.java b/Mage.Sets/src/mage/cards/t/TricksterMage.java index debf11e89a..66dfca106d 100644 --- a/Mage.Sets/src/mage/cards/t/TricksterMage.java +++ b/Mage.Sets/src/mage/cards/t/TricksterMage.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.MayTapOrUntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; @@ -61,8 +62,8 @@ public class TricksterMage extends CardImpl { public TricksterMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TriclopeanSight.java b/Mage.Sets/src/mage/cards/t/TriclopeanSight.java index 03d523f6fa..614afb3dc3 100644 --- a/Mage.Sets/src/mage/cards/t/TriclopeanSight.java +++ b/Mage.Sets/src/mage/cards/t/TriclopeanSight.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class TriclopeanSight extends CardImpl { public TriclopeanSight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/t/TrinketMage.java b/Mage.Sets/src/mage/cards/t/TrinketMage.java index 0e63af2b2c..445e8a0cfa 100644 --- a/Mage.Sets/src/mage/cards/t/TrinketMage.java +++ b/Mage.Sets/src/mage/cards/t/TrinketMage.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -56,8 +57,8 @@ public class TrinketMage extends CardImpl { public TrinketMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/Triskelavus.java b/Mage.Sets/src/mage/cards/t/Triskelavus.java index b6e26f800f..b0d4434443 100644 --- a/Mage.Sets/src/mage/cards/t/Triskelavus.java +++ b/Mage.Sets/src/mage/cards/t/Triskelavus.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.permanent.token.TriskelaviteToken; @@ -52,7 +53,7 @@ public class Triskelavus extends CardImpl { public Triskelavus(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{7}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/Triskelion.java b/Mage.Sets/src/mage/cards/t/Triskelion.java index 963bb77421..c4a0842929 100644 --- a/Mage.Sets/src/mage/cards/t/Triskelion.java +++ b/Mage.Sets/src/mage/cards/t/Triskelion.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreatureOrPlayer; @@ -50,7 +51,7 @@ public class Triskelion extends CardImpl { public Triskelion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TritonCavalry.java b/Mage.Sets/src/mage/cards/t/TritonCavalry.java index 351e1c2b66..9083c39f84 100644 --- a/Mage.Sets/src/mage/cards/t/TritonCavalry.java +++ b/Mage.Sets/src/mage/cards/t/TritonCavalry.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetEnchantmentPermanent; /** @@ -45,8 +46,8 @@ public class TritonCavalry extends CardImpl { public TritonCavalry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TritonFortuneHunter.java b/Mage.Sets/src/mage/cards/t/TritonFortuneHunter.java index df5154469d..44ac3fd773 100644 --- a/Mage.Sets/src/mage/cards/t/TritonFortuneHunter.java +++ b/Mage.Sets/src/mage/cards/t/TritonFortuneHunter.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class TritonFortuneHunter extends CardImpl { public TritonFortuneHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TritonShorestalker.java b/Mage.Sets/src/mage/cards/t/TritonShorestalker.java index 1737515530..e07ddb00cb 100644 --- a/Mage.Sets/src/mage/cards/t/TritonShorestalker.java +++ b/Mage.Sets/src/mage/cards/t/TritonShorestalker.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class TritonShorestalker extends CardImpl { public TritonShorestalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TritonShorethief.java b/Mage.Sets/src/mage/cards/t/TritonShorethief.java index 73c7cb34f8..44df23eaff 100644 --- a/Mage.Sets/src/mage/cards/t/TritonShorethief.java +++ b/Mage.Sets/src/mage/cards/t/TritonShorethief.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class TritonShorethief extends CardImpl { public TritonShorethief(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TrokinHighGuard.java b/Mage.Sets/src/mage/cards/t/TrokinHighGuard.java index 8d9fc92290..a3bf8d0426 100644 --- a/Mage.Sets/src/mage/cards/t/TrokinHighGuard.java +++ b/Mage.Sets/src/mage/cards/t/TrokinHighGuard.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class TrokinHighGuard extends CardImpl { public TrokinHighGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TrollAscetic.java b/Mage.Sets/src/mage/cards/t/TrollAscetic.java index 67283f7e4a..1c56a2181e 100644 --- a/Mage.Sets/src/mage/cards/t/TrollAscetic.java +++ b/Mage.Sets/src/mage/cards/t/TrollAscetic.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ import mage.constants.Zone; public class TrollAscetic extends CardImpl { public TrollAscetic (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Troll"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.TROLL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/Trollhide.java b/Mage.Sets/src/mage/cards/t/Trollhide.java index 7b106f9744..081b51422f 100644 --- a/Mage.Sets/src/mage/cards/t/Trollhide.java +++ b/Mage.Sets/src/mage/cards/t/Trollhide.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class Trollhide extends CardImpl { public Trollhide (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/t/TrollsOfTelJilad.java b/Mage.Sets/src/mage/cards/t/TrollsOfTelJilad.java index 6e1898cadb..daf186b6d8 100644 --- a/Mage.Sets/src/mage/cards/t/TrollsOfTelJilad.java +++ b/Mage.Sets/src/mage/cards/t/TrollsOfTelJilad.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.RegenerateTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -56,8 +57,8 @@ public class TrollsOfTelJilad extends CardImpl { public TrollsOfTelJilad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Troll"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.TROLL); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/t/Tromokratis.java b/Mage.Sets/src/mage/cards/t/Tromokratis.java index 5973dc684b..833ef6ae32 100644 --- a/Mage.Sets/src/mage/cards/t/Tromokratis.java +++ b/Mage.Sets/src/mage/cards/t/Tromokratis.java @@ -59,7 +59,7 @@ public class Tromokratis extends CardImpl { public Tromokratis(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Kraken"); + this.subtype.add(SubType.KRAKEN); this.power = new MageInt(8); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/t/TrooperArmor.java b/Mage.Sets/src/mage/cards/t/TrooperArmor.java index c39d32e200..151ddae836 100644 --- a/Mage.Sets/src/mage/cards/t/TrooperArmor.java +++ b/Mage.Sets/src/mage/cards/t/TrooperArmor.java @@ -48,7 +48,7 @@ public class TrooperArmor extends CardImpl { public TrooperArmor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equiped creature gets +1/+1 and is a Trooper in addition to its other types. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); diff --git a/Mage.Sets/src/mage/cards/t/TrooperCommando.java b/Mage.Sets/src/mage/cards/t/TrooperCommando.java index e51ec8322a..7493dc45c6 100644 --- a/Mage.Sets/src/mage/cards/t/TrooperCommando.java +++ b/Mage.Sets/src/mage/cards/t/TrooperCommando.java @@ -1,76 +1,76 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; -import mage.abilities.keyword.TrampleAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; - -/** - * - * @author Styxo - */ -public class TrooperCommando extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures"); - - static { - filter.add(new SubtypePredicate(SubType.TROOPER)); - } - - public TrooperCommando(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Human"); - this.subtype.add("Trooper"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // Trooper creatures you control have trample. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, filter, false))); - - } - - public TrooperCommando(final TrooperCommando card) { - super(card); - } - - @Override - public TrooperCommando copy() { - return new TrooperCommando(this); - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author Styxo + */ +public class TrooperCommando extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures"); + + static { + filter.add(new SubtypePredicate(SubType.TROOPER)); + } + + public TrooperCommando(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.TROOPER); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Trooper creatures you control have trample. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, filter, false))); + + } + + public TrooperCommando(final TrooperCommando card) { + super(card); + } + + @Override + public TrooperCommando copy() { + return new TrooperCommando(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TrophyHunter.java b/Mage.Sets/src/mage/cards/t/TrophyHunter.java new file mode 100644 index 0000000000..253c84ecf6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TrophyHunter.java @@ -0,0 +1,85 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealtDamageAndDiedTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class TrophyHunter extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public TrophyHunter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARCHER); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // {1}{G}: Trophy Hunter deals 1 damage to target creature with flying. + Ability ability = new SimpleActivatedAbility(new DamageTargetEffect(1), new ManaCostsImpl("{1}{G}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + + // Whenever a creature with flying dealt damage by Trophy Hunter this turn dies, put a +1/+1 counter on Trophy Hunter. + this.addAbility(new DealtDamageAndDiedTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter)); + } + + public TrophyHunter(final TrophyHunter card) { + super(card); + } + + @Override + public TrophyHunter copy() { + return new TrophyHunter(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TrophyMage.java b/Mage.Sets/src/mage/cards/t/TrophyMage.java index 37b4059a9b..671218e292 100644 --- a/Mage.Sets/src/mage/cards/t/TrophyMage.java +++ b/Mage.Sets/src/mage/cards/t/TrophyMage.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -56,8 +57,8 @@ public class TrophyMage extends CardImpl { public TrophyMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TropicalIsland.java b/Mage.Sets/src/mage/cards/t/TropicalIsland.java index f173c7cc65..fad4468002 100644 --- a/Mage.Sets/src/mage/cards/t/TropicalIsland.java +++ b/Mage.Sets/src/mage/cards/t/TropicalIsland.java @@ -33,6 +33,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class TropicalIsland extends CardImpl { public TropicalIsland(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Forest"); - this.subtype.add("Island"); + this.subtype.add(SubType.FOREST); + this.subtype.add(SubType.ISLAND); this.addAbility(new GreenManaAbility()); this.addAbility(new BlueManaAbility()); diff --git a/Mage.Sets/src/mage/cards/t/TropicalStorm.java b/Mage.Sets/src/mage/cards/t/TropicalStorm.java new file mode 100644 index 0000000000..a6677b511d --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TropicalStorm.java @@ -0,0 +1,73 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author TheElk801 + */ +public class TropicalStorm extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying"); + private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("blue creature"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + filter2.add(new ColorPredicate(ObjectColor.BLUE)); + } + + public TropicalStorm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{G}"); + + // Tropical Storm deals X damage to each creature with flying and 1 additional damage to each blue creature. + this.getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), filter)); + this.getSpellAbility().addEffect(new DamageAllEffect(1, filter2).setText("and 1 additional damage to each blue creature")); + + } + + public TropicalStorm(final TropicalStorm card) { + super(card); + } + + @Override + public TropicalStorm copy() { + return new TropicalStorm(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TrostaniSelesnyasVoice.java b/Mage.Sets/src/mage/cards/t/TrostaniSelesnyasVoice.java index ef9df9429b..8d6b30221c 100644 --- a/Mage.Sets/src/mage/cards/t/TrostaniSelesnyasVoice.java +++ b/Mage.Sets/src/mage/cards/t/TrostaniSelesnyasVoice.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.PopulateEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -60,7 +61,7 @@ public class TrostaniSelesnyasVoice extends CardImpl { public TrostaniSelesnyasVoice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dryad"); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TrostanisSummoner.java b/Mage.Sets/src/mage/cards/t/TrostanisSummoner.java index 13e5b66f41..6b3cf809bd 100644 --- a/Mage.Sets/src/mage/cards/t/TrostanisSummoner.java +++ b/Mage.Sets/src/mage/cards/t/TrostanisSummoner.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.CentaurToken; import mage.game.permanent.token.KnightToken; import mage.game.permanent.token.RhinoToken; @@ -47,8 +48,8 @@ public class TrostanisSummoner extends CardImpl { public TrostanisSummoner(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{W}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TroubledHealer.java b/Mage.Sets/src/mage/cards/t/TroubledHealer.java index b4b31da0bc..734c5b38ed 100644 --- a/Mage.Sets/src/mage/cards/t/TroubledHealer.java +++ b/Mage.Sets/src/mage/cards/t/TroubledHealer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -50,8 +51,8 @@ public class TroubledHealer extends CardImpl { public TroubledHealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TroublesomeSpirit.java b/Mage.Sets/src/mage/cards/t/TroublesomeSpirit.java index 45a33beb6b..2dba0b5bb8 100644 --- a/Mage.Sets/src/mage/cards/t/TroublesomeSpirit.java +++ b/Mage.Sets/src/mage/cards/t/TroublesomeSpirit.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterControlledLandPermanent; @@ -46,7 +47,7 @@ public class TroublesomeSpirit extends CardImpl { public TroublesomeSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TroveOfTemptation.java b/Mage.Sets/src/mage/cards/t/TroveOfTemptation.java new file mode 100644 index 0000000000..70ad58d291 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TroveOfTemptation.java @@ -0,0 +1,109 @@ +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.RequirementEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.TreasureToken; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class TroveOfTemptation extends CardImpl { + + public TroveOfTemptation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}"); + + // Each opponent must attack you or a planeswalker you control with at least one creature each combat if able. + addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new TroveOfTemptationForceAttackEffect(Duration.WhileOnBattlefield))); + + // At the beginning of your end step, create a colorless Treasure artifact token with "{t}, Sacrifice this artifact: Add one mana of any color to your mana pool.” + addAbility(new BeginningOfYourEndStepTriggeredAbility(new CreateTokenEffect(new TreasureToken()), false)); + } + + public TroveOfTemptation(final TroveOfTemptation card) { + super(card); + } + + @Override + public TroveOfTemptation copy() { + return new TroveOfTemptation(this); + } +} + +class TroveOfTemptationForceAttackEffect extends RequirementEffect { + + public TroveOfTemptationForceAttackEffect(Duration duration) { + super(duration, true); + staticText = "Each opponent must attack you or a planeswalker you control with at least one creature each combat if able"; + } + + public TroveOfTemptationForceAttackEffect(final TroveOfTemptationForceAttackEffect effect) { + super(effect); + } + + @Override + public TroveOfTemptationForceAttackEffect copy() { + return new TroveOfTemptationForceAttackEffect(this); + } + + @Override + public boolean mustAttack(Game game) { + return false; + } + + @Override + public boolean mustBlock(Game game) { + return false; + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + Player controller = game.getPlayer(source.getControllerId()); + return controller != null && controller.hasOpponent(game.getActivePlayerId(), game); + } + + @Override + public UUID playerMustBeAttackedIfAble(Ability source, Game game) { + return source.getControllerId(); + } + +} diff --git a/Mage.Sets/src/mage/cards/t/TrueBeliever.java b/Mage.Sets/src/mage/cards/t/TrueBeliever.java index 5b13f8771f..cda27648af 100644 --- a/Mage.Sets/src/mage/cards/t/TrueBeliever.java +++ b/Mage.Sets/src/mage/cards/t/TrueBeliever.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,8 +47,8 @@ public class TrueBeliever extends CardImpl { public TrueBeliever(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TrueConviction.java b/Mage.Sets/src/mage/cards/t/TrueConviction.java index 9e3e4051f4..66a2312b49 100644 --- a/Mage.Sets/src/mage/cards/t/TrueConviction.java +++ b/Mage.Sets/src/mage/cards/t/TrueConviction.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.Effect; @@ -39,7 +38,9 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.StaticFilters; + +import java.util.UUID; /** * @@ -51,8 +52,8 @@ public class TrueConviction extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}{W}{W}"); // Creatures you control have double strike and lifelink. - Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent())); - Effect effect = new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent()); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES)); + Effect effect = new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES); effect.setText(" and lifelink"); ability.addEffect(effect); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/t/TrueFaithCenser.java b/Mage.Sets/src/mage/cards/t/TrueFaithCenser.java index d825a716f5..5983639b0f 100644 --- a/Mage.Sets/src/mage/cards/t/TrueFaithCenser.java +++ b/Mage.Sets/src/mage/cards/t/TrueFaithCenser.java @@ -52,7 +52,7 @@ public class TrueFaithCenser extends CardImpl { public TrueFaithCenser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1 and has vigilance. Effect effect = new BoostEquippedEffect(1, 1); diff --git a/Mage.Sets/src/mage/cards/t/TrueNameNemesis.java b/Mage.Sets/src/mage/cards/t/TrueNameNemesis.java index 62fbf1af53..8791090071 100644 --- a/Mage.Sets/src/mage/cards/t/TrueNameNemesis.java +++ b/Mage.Sets/src/mage/cards/t/TrueNameNemesis.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.FilterCard; import mage.game.Game; @@ -62,8 +63,8 @@ public class TrueNameNemesis extends CardImpl { public TrueNameNemesis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TruefirePaladin.java b/Mage.Sets/src/mage/cards/t/TruefirePaladin.java index 8420c37bcb..d982339f6c 100644 --- a/Mage.Sets/src/mage/cards/t/TruefirePaladin.java +++ b/Mage.Sets/src/mage/cards/t/TruefirePaladin.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class TruefirePaladin extends CardImpl { public TruefirePaladin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TrueheartDuelist.java b/Mage.Sets/src/mage/cards/t/TrueheartDuelist.java index 8831695224..1363601a05 100644 --- a/Mage.Sets/src/mage/cards/t/TrueheartDuelist.java +++ b/Mage.Sets/src/mage/cards/t/TrueheartDuelist.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EmbalmAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class TrueheartDuelist extends CardImpl { public TrueheartDuelist(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TrueheartTwins.java b/Mage.Sets/src/mage/cards/t/TrueheartTwins.java index 1eca9ca754..48f9d779e2 100644 --- a/Mage.Sets/src/mage/cards/t/TrueheartTwins.java +++ b/Mage.Sets/src/mage/cards/t/TrueheartTwins.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ExertAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,8 +47,8 @@ public class TrueheartTwins extends CardImpl { public TrueheartTwins(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); - this.subtype.add("Jackal"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.JACKAL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TrumpetingArmodon.java b/Mage.Sets/src/mage/cards/t/TrumpetingArmodon.java index f5fa3608f1..ea2b1c1963 100644 --- a/Mage.Sets/src/mage/cards/t/TrumpetingArmodon.java +++ b/Mage.Sets/src/mage/cards/t/TrumpetingArmodon.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.combat.MustBeBlockedByTargetSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class TrumpetingArmodon extends CardImpl { public TrumpetingArmodon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TrustedAdvisor.java b/Mage.Sets/src/mage/cards/t/TrustedAdvisor.java index 76b35c18cf..660348d5a1 100644 --- a/Mage.Sets/src/mage/cards/t/TrustedAdvisor.java +++ b/Mage.Sets/src/mage/cards/t/TrustedAdvisor.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect. import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -58,8 +59,8 @@ public class TrustedAdvisor extends CardImpl { public TrustedAdvisor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TrustedForcemage.java b/Mage.Sets/src/mage/cards/t/TrustedForcemage.java index dff862b5cb..84042e4132 100644 --- a/Mage.Sets/src/mage/cards/t/TrustedForcemage.java +++ b/Mage.Sets/src/mage/cards/t/TrustedForcemage.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SoulbondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class TrustedForcemage extends CardImpl { public TrustedForcemage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TrustyCompanion.java b/Mage.Sets/src/mage/cards/t/TrustyCompanion.java index 7175f80321..eb0dac2a8d 100644 --- a/Mage.Sets/src/mage/cards/t/TrustyCompanion.java +++ b/Mage.Sets/src/mage/cards/t/TrustyCompanion.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class TrustyCompanion extends CardImpl { public TrustyCompanion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Hyena"); + this.subtype.add(SubType.HYENA); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TrustyMachete.java b/Mage.Sets/src/mage/cards/t/TrustyMachete.java index ba0f973043..0214ef2718 100644 --- a/Mage.Sets/src/mage/cards/t/TrustyMachete.java +++ b/Mage.Sets/src/mage/cards/t/TrustyMachete.java @@ -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.cards.t; import java.util.UUID; @@ -36,6 +35,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -45,14 +45,15 @@ import mage.constants.Zone; */ public class TrustyMachete extends CardImpl { - public TrustyMachete (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); - this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); + public TrustyMachete(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); + this.subtype.add(SubType.EQUIPMENT); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 1))); + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); } - public TrustyMachete (final TrustyMachete card) { + public TrustyMachete(final TrustyMachete card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/t/TrygonPredator.java b/Mage.Sets/src/mage/cards/t/TrygonPredator.java index e51615b0ef..bff517bdc8 100644 --- a/Mage.Sets/src/mage/cards/t/TrygonPredator.java +++ b/Mage.Sets/src/mage/cards/t/TrygonPredator.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; @@ -55,7 +56,7 @@ public class TrygonPredator extends CardImpl { public TrygonPredator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{U}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TsaboTavoc.java b/Mage.Sets/src/mage/cards/t/TsaboTavoc.java index ea03b0901b..767dff8a80 100644 --- a/Mage.Sets/src/mage/cards/t/TsaboTavoc.java +++ b/Mage.Sets/src/mage/cards/t/TsaboTavoc.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -62,7 +63,7 @@ public class TsaboTavoc extends CardImpl { public TsaboTavoc(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(7); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TsabosAssassin.java b/Mage.Sets/src/mage/cards/t/TsabosAssassin.java index 6a6ae1deb4..8467c89e37 100644 --- a/Mage.Sets/src/mage/cards/t/TsabosAssassin.java +++ b/Mage.Sets/src/mage/cards/t/TsabosAssassin.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,8 +57,8 @@ public class TsabosAssassin extends CardImpl { public TsabosAssassin(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TukatongueThallid.java b/Mage.Sets/src/mage/cards/t/TukatongueThallid.java index 87babd0afb..ae7dfc96f8 100644 --- a/Mage.Sets/src/mage/cards/t/TukatongueThallid.java +++ b/Mage.Sets/src/mage/cards/t/TukatongueThallid.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.SaprolingToken; /** @@ -46,7 +47,7 @@ public class TukatongueThallid extends CardImpl { public TukatongueThallid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TuknirDeathlock.java b/Mage.Sets/src/mage/cards/t/TuknirDeathlock.java index f8ddf2d13a..e37ab94ea7 100644 --- a/Mage.Sets/src/mage/cards/t/TuknirDeathlock.java +++ b/Mage.Sets/src/mage/cards/t/TuknirDeathlock.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -52,8 +53,8 @@ public class TuknirDeathlock extends CardImpl { public TuknirDeathlock(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{R}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TuktukGrunts.java b/Mage.Sets/src/mage/cards/t/TuktukGrunts.java index ee666b8af4..6b3ee24954 100644 --- a/Mage.Sets/src/mage/cards/t/TuktukGrunts.java +++ b/Mage.Sets/src/mage/cards/t/TuktukGrunts.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,9 +46,9 @@ public class TuktukGrunts extends CardImpl { public TuktukGrunts(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); - this.subtype.add("Ally"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TuktukScrapper.java b/Mage.Sets/src/mage/cards/t/TuktukScrapper.java index d995608cfb..d536e6eb2c 100644 --- a/Mage.Sets/src/mage/cards/t/TuktukScrapper.java +++ b/Mage.Sets/src/mage/cards/t/TuktukScrapper.java @@ -54,9 +54,9 @@ public class TuktukScrapper extends CardImpl { public TuktukScrapper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Artificer"); - this.subtype.add("Ally"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ARTIFICER); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TuktukTheExplorer.java b/Mage.Sets/src/mage/cards/t/TuktukTheExplorer.java index 22459beb08..8e7819c96c 100644 --- a/Mage.Sets/src/mage/cards/t/TuktukTheExplorer.java +++ b/Mage.Sets/src/mage/cards/t/TuktukTheExplorer.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.game.permanent.token.TuktukTheReturnedToken; @@ -47,7 +48,7 @@ public class TuktukTheExplorer extends CardImpl { public TuktukTheExplorer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/Tundra.java b/Mage.Sets/src/mage/cards/t/Tundra.java index a9bf242893..099a1d0c88 100644 --- a/Mage.Sets/src/mage/cards/t/Tundra.java +++ b/Mage.Sets/src/mage/cards/t/Tundra.java @@ -33,6 +33,7 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class Tundra extends CardImpl { public Tundra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Plains"); - this.subtype.add("Island"); + this.subtype.add(SubType.PLAINS); + this.subtype.add(SubType.ISLAND); this.addAbility(new WhiteManaAbility()); this.addAbility(new BlueManaAbility()); diff --git a/Mage.Sets/src/mage/cards/t/TundraKavu.java b/Mage.Sets/src/mage/cards/t/TundraKavu.java index c16924d507..dbb3f5b62a 100644 --- a/Mage.Sets/src/mage/cards/t/TundraKavu.java +++ b/Mage.Sets/src/mage/cards/t/TundraKavu.java @@ -55,7 +55,7 @@ public class TundraKavu extends CardImpl { public TundraKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TundraWolves.java b/Mage.Sets/src/mage/cards/t/TundraWolves.java index 52d1190789..13d1ca92f6 100644 --- a/Mage.Sets/src/mage/cards/t/TundraWolves.java +++ b/Mage.Sets/src/mage/cards/t/TundraWolves.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class TundraWolves extends CardImpl { public TundraWolves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TunnelIgnus.java b/Mage.Sets/src/mage/cards/t/TunnelIgnus.java index 99bd337a04..e69aaefbfe 100644 --- a/Mage.Sets/src/mage/cards/t/TunnelIgnus.java +++ b/Mage.Sets/src/mage/cards/t/TunnelIgnus.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.WatcherScope; import mage.constants.Zone; import mage.game.Game; @@ -54,7 +55,7 @@ public class TunnelIgnus extends CardImpl { public TunnelIgnus(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TunnelVision.java b/Mage.Sets/src/mage/cards/t/TunnelVision.java index 03ef8cd3b8..9c1b33d698 100644 --- a/Mage.Sets/src/mage/cards/t/TunnelVision.java +++ b/Mage.Sets/src/mage/cards/t/TunnelVision.java @@ -27,6 +27,8 @@ */ package mage.cards.t; +import java.util.HashSet; +import java.util.Set; import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; @@ -51,10 +53,10 @@ import mage.target.TargetPlayer; public class TunnelVision extends CardImpl { public TunnelVision(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{5}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{U}"); - // Name a card. Target player reveals cards from the top of his or her library until the named card is revealed. - // If it is, that player puts the rest of the revealed cards into his or her graveyard and puts the named card on top of his or her library. + // Name a card. Target player reveals cards from the top of his or her library until the named card is revealed. + // If it is, that player puts the rest of the revealed cards into his or her graveyard and puts the named card on top of his or her library. // Otherwise, the player shuffles his or her library. this.getSpellAbility().addEffect(new NameACardEffect(NameACardEffect.TypeOfName.ALL)); this.getSpellAbility().addEffect(new TunnelVisionEffect()); @@ -74,7 +76,7 @@ public class TunnelVision extends CardImpl { class TunnelVisionEffect extends OneShotEffect { public TunnelVisionEffect() { - super(Outcome.Damage); + super(Outcome.Benefit); this.staticText = "Target player reveals cards from the top of his or her library until the named card is revealed. If it is, that player puts the rest of the revealed cards into his or her graveyard and puts the named card on top of his or her library. Otherwise, the player shuffles his or her library."; } @@ -90,16 +92,16 @@ class TunnelVisionEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { MageObject sourceObject = game.getObject(source.getSourceId()); - Player targetPlayer = game.getPlayer(source.getFirstTarget()); + Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); if (sourceObject == null || targetPlayer == null || cardName == null || cardName.isEmpty()) { return false; } Cards cardsToReveal = new CardsImpl(); - Cards cardsToBury = new CardsImpl(); + Set cardsToBury = new HashSet<>(); Card namedCard = null; - + // reveal until named card found // if named card found, put all revealed cards in grave and put named card on top of library // if named card not found, shuffle library @@ -117,15 +119,15 @@ class TunnelVisionEffect extends OneShotEffect { } } } - + targetPlayer.revealCards(sourceObject.getIdName(), cardsToReveal, game); if (namedCardFound) { targetPlayer.moveCards(cardsToBury, Zone.GRAVEYARD, source, game); targetPlayer.moveCards(namedCard, Zone.LIBRARY, source, game); } else { + targetPlayer.getLibrary().addAll(cardsToBury, game); targetPlayer.shuffleLibrary(source, game); } - return true; } } diff --git a/Mage.Sets/src/mage/cards/t/TunnelerWurm.java b/Mage.Sets/src/mage/cards/t/TunnelerWurm.java index 6756b4594d..bfa86edbd2 100644 --- a/Mage.Sets/src/mage/cards/t/TunnelerWurm.java +++ b/Mage.Sets/src/mage/cards/t/TunnelerWurm.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class TunnelerWurm extends CardImpl { public TunnelerWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/t/TunnelingGeopede.java b/Mage.Sets/src/mage/cards/t/TunnelingGeopede.java index e0ba72e21c..647a777018 100644 --- a/Mage.Sets/src/mage/cards/t/TunnelingGeopede.java +++ b/Mage.Sets/src/mage/cards/t/TunnelingGeopede.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamagePlayersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -44,7 +45,7 @@ public class TunnelingGeopede extends CardImpl { public TunnelingGeopede(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TurnBurn.java b/Mage.Sets/src/mage/cards/t/TurnBurn.java index e90dec1133..de2d0b8f55 100644 --- a/Mage.Sets/src/mage/cards/t/TurnBurn.java +++ b/Mage.Sets/src/mage/cards/t/TurnBurn.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; import mage.cards.CardSetInfo; import mage.cards.SplitCard; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SpellAbilityType; import mage.game.permanent.token.Token; @@ -81,7 +82,7 @@ public class TurnBurn extends SplitCard { super("Weird", "a red Weird with base power and toughness 0/1"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Weird"); + subtype.add(SubType.WEIRD); power = new MageInt(0); toughness = new MageInt(1); } diff --git a/Mage.Sets/src/mage/cards/t/TurnToSlag.java b/Mage.Sets/src/mage/cards/t/TurnToSlag.java index 6ba23721b3..ed122abdb8 100644 --- a/Mage.Sets/src/mage/cards/t/TurnToSlag.java +++ b/Mage.Sets/src/mage/cards/t/TurnToSlag.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -82,7 +83,7 @@ class TurnToSlagEffect extends OneShotEffect { List attachments = new ArrayList<>(); for (UUID uuid : target.getAttachments()) { Permanent attached = game.getBattlefield().getPermanent(uuid); - if (attached.getSubtype(game).contains("Equipment")) { + if (attached.hasSubtype(SubType.EQUIPMENT, game)) { attachments.add(attached); } } diff --git a/Mage.Sets/src/mage/cards/t/TurntimberBasilisk.java b/Mage.Sets/src/mage/cards/t/TurntimberBasilisk.java index 9ac2ff5c71..0a48b2df31 100644 --- a/Mage.Sets/src/mage/cards/t/TurntimberBasilisk.java +++ b/Mage.Sets/src/mage/cards/t/TurntimberBasilisk.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -45,7 +46,7 @@ public class TurntimberBasilisk extends CardImpl { public TurntimberBasilisk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Basilisk"); + this.subtype.add(SubType.BASILISK); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TurntimberRanger.java b/Mage.Sets/src/mage/cards/t/TurntimberRanger.java index 13a0719381..7f6a8d7821 100644 --- a/Mage.Sets/src/mage/cards/t/TurntimberRanger.java +++ b/Mage.Sets/src/mage/cards/t/TurntimberRanger.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.game.permanent.token.WolfToken; @@ -47,9 +48,9 @@ public class TurntimberRanger extends CardImpl { public TurntimberRanger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Scout"); - this.subtype.add("Ally"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TurtleshellChangeling.java b/Mage.Sets/src/mage/cards/t/TurtleshellChangeling.java index 22c58fb1b7..82cb93808f 100644 --- a/Mage.Sets/src/mage/cards/t/TurtleshellChangeling.java +++ b/Mage.Sets/src/mage/cards/t/TurtleshellChangeling.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ChangelingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class TurtleshellChangeling extends CardImpl { public TurtleshellChangeling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TuskedColossodon.java b/Mage.Sets/src/mage/cards/t/TuskedColossodon.java index a83ccdcf83..8a9890e92c 100644 --- a/Mage.Sets/src/mage/cards/t/TuskedColossodon.java +++ b/Mage.Sets/src/mage/cards/t/TuskedColossodon.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class TuskedColossodon extends CardImpl { public TuskedColossodon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TuskguardCaptain.java b/Mage.Sets/src/mage/cards/t/TuskguardCaptain.java index 021cce5dc8..d7ae88a911 100644 --- a/Mage.Sets/src/mage/cards/t/TuskguardCaptain.java +++ b/Mage.Sets/src/mage/cards/t/TuskguardCaptain.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -64,8 +65,8 @@ public class TuskguardCaptain extends CardImpl { public TuskguardCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/Twigwalker.java b/Mage.Sets/src/mage/cards/t/Twigwalker.java new file mode 100644 index 0000000000..946821a20e --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/Twigwalker.java @@ -0,0 +1,73 @@ +/* + * 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.cards.t; + +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.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class Twigwalker extends CardImpl { + + public Twigwalker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.INSECT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {1}{G}, Sacrifice Twigwalker: Two target creatures each get +2/+2 until end of turn. + Ability ability = new SimpleActivatedAbility(new BoostTargetEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl("{1}{G}")); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreaturePermanent(2, 2, new FilterCreaturePermanent("creatures each"), false)); + this.addAbility(ability); + } + + public Twigwalker(final Twigwalker card) { + super(card); + } + + @Override + public Twigwalker copy() { + return new Twigwalker(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TwilekSeductress.java b/Mage.Sets/src/mage/cards/t/TwilekSeductress.java index 901d7ad14d..279fd2cfd3 100644 --- a/Mage.Sets/src/mage/cards/t/TwilekSeductress.java +++ b/Mage.Sets/src/mage/cards/t/TwilekSeductress.java @@ -1,71 +1,72 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.BecomesBlockedByCreatureTriggeredAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.combat.MustBeBlockedByAtLeastOneSourceEffect; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.counters.CounterType; - -/** - * - * @author Styxo - */ -public class TwilekSeductress extends CardImpl { - - public TwilekSeductress(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Twi'lek"); - this.subtype.add("Rogue"); - this.power = new MageInt(2); - this.toughness = new MageInt(1); - - // {this} must be blocked it if able. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MustBeBlockedByAtLeastOneSourceEffect(Duration.WhileOnBattlefield))); - - // Whenever {this} becomes blocked by a creature, put a bounty counter on that creature - this.addAbility(new BecomesBlockedByCreatureTriggeredAbility(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()), false)); - } - - public TwilekSeductress(final TwilekSeductress card) { - super(card); - } - - @Override - public TwilekSeductress copy() { - return new TwilekSeductress(this); - } -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesBlockedByCreatureTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.combat.MustBeBlockedByAtLeastOneSourceEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author Styxo + */ +public class TwilekSeductress extends CardImpl { + + public TwilekSeductress(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.subtype.add(SubType.TWILEK); + this.subtype.add(SubType.ROGUE); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // {this} must be blocked it if able. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MustBeBlockedByAtLeastOneSourceEffect(Duration.WhileOnBattlefield))); + + // Whenever {this} becomes blocked by a creature, put a bounty counter on that creature + this.addAbility(new BecomesBlockedByCreatureTriggeredAbility(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()), false)); + } + + public TwilekSeductress(final TwilekSeductress card) { + super(card); + } + + @Override + public TwilekSeductress copy() { + return new TwilekSeductress(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TwilightDrover.java b/Mage.Sets/src/mage/cards/t/TwilightDrover.java index 3e6b6dfd17..27981436b4 100644 --- a/Mage.Sets/src/mage/cards/t/TwilightDrover.java +++ b/Mage.Sets/src/mage/cards/t/TwilightDrover.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -59,7 +60,7 @@ public class TwilightDrover extends CardImpl { public TwilightDrover(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TwilightShepherd.java b/Mage.Sets/src/mage/cards/t/TwilightShepherd.java index b4fbd281d9..fbdcaf7965 100644 --- a/Mage.Sets/src/mage/cards/t/TwilightShepherd.java +++ b/Mage.Sets/src/mage/cards/t/TwilightShepherd.java @@ -43,6 +43,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -58,7 +59,7 @@ public class TwilightShepherd extends CardImpl { public TwilightShepherd(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TwinbladeSlasher.java b/Mage.Sets/src/mage/cards/t/TwinbladeSlasher.java index d353342172..ff9e6517c0 100644 --- a/Mage.Sets/src/mage/cards/t/TwinbladeSlasher.java +++ b/Mage.Sets/src/mage/cards/t/TwinbladeSlasher.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class TwinbladeSlasher extends CardImpl { public TwinbladeSlasher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/Twinflame.java b/Mage.Sets/src/mage/cards/t/Twinflame.java index 565e9b91b3..17bd0ce651 100644 --- a/Mage.Sets/src/mage/cards/t/Twinflame.java +++ b/Mage.Sets/src/mage/cards/t/Twinflame.java @@ -33,7 +33,7 @@ import mage.abilities.abilityword.StriveAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -101,7 +101,7 @@ class TwinflameCopyEffect extends OneShotEffect { for (UUID creatureId : this.getTargetPointer().getTargets(game, source)) { Permanent creature = game.getPermanentOrLKIBattlefield(creatureId); if (creature != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, true); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), null, true); effect.setTargetPointer(new FixedTarget(creature, game)); effect.apply(game, source); toExile.addAll(effect.getAddedPermanent()); diff --git a/Mage.Sets/src/mage/cards/t/TwinningGlass.java b/Mage.Sets/src/mage/cards/t/TwinningGlass.java index a0645cd652..687ecc7ab7 100644 --- a/Mage.Sets/src/mage/cards/t/TwinningGlass.java +++ b/Mage.Sets/src/mage/cards/t/TwinningGlass.java @@ -1,131 +1,131 @@ -/* - * 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.cards.t; - -import java.util.List; -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.FilterCard; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.filter.predicate.mageobject.NamePredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.game.stack.Spell; -import mage.players.Player; -import mage.target.common.TargetCardInHand; -import mage.watchers.common.SpellsCastWatcher; - -/** - * - * @author jeffwadsworth - */ -public class TwinningGlass extends CardImpl { - - public TwinningGlass(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); - - // {1}, {tap}: You may cast a nonland card from your hand without paying its mana cost if it has the same name as a spell that was cast this turn. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TwinningGlassEffect(), new ManaCostsImpl("{1}")); - ability.addWatcher(new SpellsCastWatcher()); - ability.addCost(new TapSourceCost()); - this.addAbility(ability); - - } - - public TwinningGlass(final TwinningGlass card) { - super(card); - } - - @Override - public TwinningGlass copy() { - return new TwinningGlass(this); - } -} - -class TwinningGlassEffect extends OneShotEffect { - - public TwinningGlassEffect() { - super(Outcome.PutCardInPlay); - this.staticText = "You may cast a nonland card from your hand without paying its mana cost if it has the same name as a spell that was cast this turn"; - } - - public TwinningGlassEffect(final TwinningGlassEffect effect) { - super(effect); - } - - @Override - public TwinningGlassEffect copy() { - return new TwinningGlassEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - FilterCard filterCard = new FilterCard(); - filterCard.add(Predicates.not(new CardTypePredicate(CardType.LAND))); - Permanent twinningGlass = game.getPermanent(source.getSourceId()); - Player controller = game.getPlayer(source.getControllerId()); - SpellsCastWatcher watcher = (SpellsCastWatcher) game.getState().getWatchers().get(SpellsCastWatcher.class.getSimpleName()); - if (twinningGlass == null) { - twinningGlass = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); - } - if (twinningGlass != null - && controller != null - && watcher != null) { - for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { - List spells = watcher.getSpellsCastThisTurn(playerId); - if (spells != null - && !spells.isEmpty()) { - for (Spell spell : spells) { - filterCard.add(new NamePredicate(spell.getName())); - } - } - } - TargetCardInHand target = new TargetCardInHand(0, 1, filterCard); - if (controller.choose(Outcome.Benefit, controller.getHand(), target, game)) { - Card chosenCard = game.getCard(target.getFirstTarget()); - if (chosenCard != null) { - if (controller.chooseUse(outcome, "Cast the card without paying mana cost?", source, game)) { - return controller.cast(chosenCard.getSpellAbility(), game, true); - } - } - } - } - return false; - } -} +/* + * 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.cards.t; + +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.stack.Spell; +import mage.players.Player; +import mage.target.common.TargetCardInHand; +import mage.watchers.common.SpellsCastWatcher; + +/** + * + * @author jeffwadsworth + */ +public class TwinningGlass extends CardImpl { + + public TwinningGlass(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); + + // {1}, {tap}: You may cast a nonland card from your hand without paying its mana cost if it has the same name as a spell that was cast this turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TwinningGlassEffect(), new ManaCostsImpl("{1}")); + ability.addWatcher(new SpellsCastWatcher()); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + } + + public TwinningGlass(final TwinningGlass card) { + super(card); + } + + @Override + public TwinningGlass copy() { + return new TwinningGlass(this); + } +} + +class TwinningGlassEffect extends OneShotEffect { + + public TwinningGlassEffect() { + super(Outcome.PutCardInPlay); + this.staticText = "You may cast a nonland card from your hand without paying its mana cost if it has the same name as a spell that was cast this turn"; + } + + public TwinningGlassEffect(final TwinningGlassEffect effect) { + super(effect); + } + + @Override + public TwinningGlassEffect copy() { + return new TwinningGlassEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + FilterCard filterCard = new FilterCard(); + filterCard.add(Predicates.not(new CardTypePredicate(CardType.LAND))); + Permanent twinningGlass = game.getPermanent(source.getSourceId()); + Player controller = game.getPlayer(source.getControllerId()); + SpellsCastWatcher watcher = (SpellsCastWatcher) game.getState().getWatchers().get(SpellsCastWatcher.class.getSimpleName()); + if (twinningGlass == null) { + twinningGlass = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); + } + if (twinningGlass != null + && controller != null + && watcher != null) { + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + List spells = watcher.getSpellsCastThisTurn(playerId); + if (spells != null + && !spells.isEmpty()) { + for (Spell spell : spells) { + filterCard.add(new NamePredicate(spell.getName())); + } + } + } + TargetCardInHand target = new TargetCardInHand(0, 1, filterCard); + if (controller.choose(Outcome.Benefit, controller.getHand(), target, game)) { + Card chosenCard = game.getCard(target.getFirstTarget()); + if (chosenCard != null) { + if (controller.chooseUse(outcome, "Cast the card without paying mana cost?", source, game)) { + return controller.cast(chosenCard.getSpellAbility(), game, true); + } + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/t/TwinsOfMaurerEstate.java b/Mage.Sets/src/mage/cards/t/TwinsOfMaurerEstate.java index 6ae4482f05..b5676b5dc9 100644 --- a/Mage.Sets/src/mage/cards/t/TwinsOfMaurerEstate.java +++ b/Mage.Sets/src/mage/cards/t/TwinsOfMaurerEstate.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MadnessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class TwinsOfMaurerEstate extends CardImpl { public TwinsOfMaurerEstate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/TwistedAbomination.java b/Mage.Sets/src/mage/cards/t/TwistedAbomination.java index ef30567949..b92a422eb9 100644 --- a/Mage.Sets/src/mage/cards/t/TwistedAbomination.java +++ b/Mage.Sets/src/mage/cards/t/TwistedAbomination.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SwampcyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class TwistedAbomination extends CardImpl { public TwistedAbomination(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/t/TwistedExperiment.java b/Mage.Sets/src/mage/cards/t/TwistedExperiment.java index 4077e59304..fc8f654408 100644 --- a/Mage.Sets/src/mage/cards/t/TwistedExperiment.java +++ b/Mage.Sets/src/mage/cards/t/TwistedExperiment.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class TwistedExperiment extends CardImpl { public TwistedExperiment(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature // Enchanted creature gets +3/-1. diff --git a/Mage.Sets/src/mage/cards/t/TwistedJustice.java b/Mage.Sets/src/mage/cards/t/TwistedJustice.java index 56f8163913..236cbe2021 100644 --- a/Mage.Sets/src/mage/cards/t/TwistedJustice.java +++ b/Mage.Sets/src/mage/cards/t/TwistedJustice.java @@ -1,112 +1,112 @@ -/* - * 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.cards.t; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.filter.predicate.permanent.ControllerPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.TargetPlayer; -import mage.target.common.TargetControlledPermanent; - -/** - * - * @author LevelX2 - */ -public class TwistedJustice extends CardImpl { - - public TwistedJustice(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}{B}"); - - // Target player sacrifices a creature. You draw cards equal to that creature's power. - this.getSpellAbility().addEffect(new TwistedJusticeEffect()); - this.getSpellAbility().addTarget(new TargetPlayer()); - } - - public TwistedJustice(final TwistedJustice card) { - super(card); - } - - @Override - public TwistedJustice copy() { - return new TwistedJustice(this); - } -} - -class TwistedJusticeEffect extends OneShotEffect { - - TwistedJusticeEffect() { - super(Outcome.Sacrifice); - staticText = "Target player sacrifices a creature. You draw cards equal to that creature's power"; - } - - TwistedJusticeEffect(TwistedJusticeEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getTargets().getFirstTarget()); - Player controller = game.getPlayer(source.getControllerId()); - - FilterControlledPermanent filter = new FilterControlledPermanent("creature"); - filter.add(new CardTypePredicate(CardType.CREATURE)); - filter.add(new ControllerPredicate(TargetController.YOU)); - TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, true); - - //A spell or ability could have removed the only legal target this player - //had, if thats the case this ability should fizzle. - if (target.canChoose(player.getId(), game)) { - player.choose(Outcome.Sacrifice, target, source.getSourceId(), game); - - Permanent permanent = game.getPermanent(target.getFirstTarget()); - if (permanent != null) { - permanent.sacrifice(source.getSourceId(), game); - controller.drawCards(permanent.getPower().getValue(), game); - } - return true; - } - return false; - } - - @Override - public TwistedJusticeEffect copy() { - return new TwistedJusticeEffect(this); - } - -} +/* + * 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.cards.t; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPlayer; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author LevelX2 + */ +public class TwistedJustice extends CardImpl { + + public TwistedJustice(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}{B}"); + + // Target player sacrifices a creature. You draw cards equal to that creature's power. + this.getSpellAbility().addEffect(new TwistedJusticeEffect()); + this.getSpellAbility().addTarget(new TargetPlayer()); + } + + public TwistedJustice(final TwistedJustice card) { + super(card); + } + + @Override + public TwistedJustice copy() { + return new TwistedJustice(this); + } +} + +class TwistedJusticeEffect extends OneShotEffect { + + TwistedJusticeEffect() { + super(Outcome.Sacrifice); + staticText = "Target player sacrifices a creature. You draw cards equal to that creature's power"; + } + + TwistedJusticeEffect(TwistedJusticeEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getTargets().getFirstTarget()); + Player controller = game.getPlayer(source.getControllerId()); + + FilterControlledPermanent filter = new FilterControlledPermanent("creature"); + filter.add(new CardTypePredicate(CardType.CREATURE)); + filter.add(new ControllerPredicate(TargetController.YOU)); + TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, true); + + //A spell or ability could have removed the only legal target this player + //had, if thats the case this ability should fizzle. + if (target.canChoose(player.getId(), game)) { + player.choose(Outcome.Sacrifice, target, source.getSourceId(), game); + + Permanent permanent = game.getPermanent(target.getFirstTarget()); + if (permanent != null) { + permanent.sacrifice(source.getSourceId(), game); + controller.drawCards(permanent.getPower().getValue(), game); + } + return true; + } + return false; + } + + @Override + public TwistedJusticeEffect copy() { + return new TwistedJusticeEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/t/TwoHeadedCerberus.java b/Mage.Sets/src/mage/cards/t/TwoHeadedCerberus.java index 27d2c35d58..a79854eb85 100644 --- a/Mage.Sets/src/mage/cards/t/TwoHeadedCerberus.java +++ b/Mage.Sets/src/mage/cards/t/TwoHeadedCerberus.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class TwoHeadedCerberus extends CardImpl { public TwoHeadedCerberus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TwoHeadedDragon.java b/Mage.Sets/src/mage/cards/t/TwoHeadedDragon.java index 7fb79169e8..53828c92d9 100644 --- a/Mage.Sets/src/mage/cards/t/TwoHeadedDragon.java +++ b/Mage.Sets/src/mage/cards/t/TwoHeadedDragon.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class TwoHeadedDragon extends CardImpl { public TwoHeadedDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TwoHeadedGiantOfForiys.java b/Mage.Sets/src/mage/cards/t/TwoHeadedGiantOfForiys.java index 24741d6362..b616779a7e 100644 --- a/Mage.Sets/src/mage/cards/t/TwoHeadedGiantOfForiys.java +++ b/Mage.Sets/src/mage/cards/t/TwoHeadedGiantOfForiys.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class TwoHeadedGiantOfForiys extends CardImpl { public TwoHeadedGiantOfForiys(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TwoHeadedSliver.java b/Mage.Sets/src/mage/cards/t/TwoHeadedSliver.java index b5d5ab6e88..d2bf0bbdea 100644 --- a/Mage.Sets/src/mage/cards/t/TwoHeadedSliver.java +++ b/Mage.Sets/src/mage/cards/t/TwoHeadedSliver.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -48,7 +49,7 @@ public class TwoHeadedSliver extends CardImpl { public TwoHeadedSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TymaretTheMurderKing.java b/Mage.Sets/src/mage/cards/t/TymaretTheMurderKing.java index 38677db217..e2b4986194 100644 --- a/Mage.Sets/src/mage/cards/t/TymaretTheMurderKing.java +++ b/Mage.Sets/src/mage/cards/t/TymaretTheMurderKing.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -54,8 +55,8 @@ public class TymaretTheMurderKing extends CardImpl { public TymaretTheMurderKing(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Zombie"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TymnaTheWeaver.java b/Mage.Sets/src/mage/cards/t/TymnaTheWeaver.java index 1ed1d1883d..443428f24e 100644 --- a/Mage.Sets/src/mage/cards/t/TymnaTheWeaver.java +++ b/Mage.Sets/src/mage/cards/t/TymnaTheWeaver.java @@ -57,8 +57,8 @@ public class TymnaTheWeaver extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/t/TyphoidRats.java b/Mage.Sets/src/mage/cards/t/TyphoidRats.java index 7c0a0c7b4b..9b8497ed3f 100644 --- a/Mage.Sets/src/mage/cards/t/TyphoidRats.java +++ b/Mage.Sets/src/mage/cards/t/TyphoidRats.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class TyphoidRats extends CardImpl { public TyphoidRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Rat"); + this.subtype.add(SubType.RAT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/t/TyrantOfDiscord.java b/Mage.Sets/src/mage/cards/t/TyrantOfDiscord.java index 1efb884dfd..f698252487 100644 --- a/Mage.Sets/src/mage/cards/t/TyrantOfDiscord.java +++ b/Mage.Sets/src/mage/cards/t/TyrantOfDiscord.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.FilterPermanent; import mage.game.Game; @@ -49,7 +50,7 @@ public class TyrantOfDiscord extends CardImpl { public TyrantOfDiscord(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/t/TyrantOfValakut.java b/Mage.Sets/src/mage/cards/t/TyrantOfValakut.java index 49028b6ced..056bda04cd 100644 --- a/Mage.Sets/src/mage/cards/t/TyrantOfValakut.java +++ b/Mage.Sets/src/mage/cards/t/TyrantOfValakut.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.SurgeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; /** @@ -48,7 +49,7 @@ public class TyrantOfValakut extends CardImpl { public TyrantOfValakut(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/t/TyrantsFamiliar.java b/Mage.Sets/src/mage/cards/t/TyrantsFamiliar.java index bebf4f9766..b6c126cbc3 100644 --- a/Mage.Sets/src/mage/cards/t/TyrantsFamiliar.java +++ b/Mage.Sets/src/mage/cards/t/TyrantsFamiliar.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.Game; @@ -55,7 +56,7 @@ public class TyrantsFamiliar extends CardImpl { public TyrantsFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/t/Tyrranax.java b/Mage.Sets/src/mage/cards/t/Tyrranax.java index 12d9b26384..ed12ed6ac8 100644 --- a/Mage.Sets/src/mage/cards/t/Tyrranax.java +++ b/Mage.Sets/src/mage/cards/t/Tyrranax.java @@ -36,6 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,9 @@ import mage.constants.Zone; public class Tyrranax extends CardImpl { public Tyrranax(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Beast"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); + this.subtype.add(SubType.DINOSAUR); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/u/UbulSarGatekeepers.java b/Mage.Sets/src/mage/cards/u/UbulSarGatekeepers.java index d7e6477fb1..e0ff692694 100644 --- a/Mage.Sets/src/mage/cards/u/UbulSarGatekeepers.java +++ b/Mage.Sets/src/mage/cards/u/UbulSarGatekeepers.java @@ -60,8 +60,8 @@ public class UbulSarGatekeepers extends CardImpl { public UbulSarGatekeepers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/u/UginTheSpiritDragon.java b/Mage.Sets/src/mage/cards/u/UginTheSpiritDragon.java index 28f190a8a7..f7b0098981 100644 --- a/Mage.Sets/src/mage/cards/u/UginTheSpiritDragon.java +++ b/Mage.Sets/src/mage/cards/u/UginTheSpiritDragon.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.SuperType; @@ -65,7 +66,7 @@ public class UginTheSpiritDragon extends CardImpl { public UginTheSpiritDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{8}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Ugin"); + this.subtype.add(SubType.UGIN); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(7)); diff --git a/Mage.Sets/src/mage/cards/u/UginsConstruct.java b/Mage.Sets/src/mage/cards/u/UginsConstruct.java index 860b4f5bec..a6cfd556c2 100644 --- a/Mage.Sets/src/mage/cards/u/UginsConstruct.java +++ b/Mage.Sets/src/mage/cards/u/UginsConstruct.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorlessPredicate; @@ -52,7 +53,7 @@ public class UginsConstruct extends CardImpl { public UginsConstruct(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/u/UgnaughtScrapWorker.java b/Mage.Sets/src/mage/cards/u/UgnaughtScrapWorker.java index 6a9cf171e8..39ece83b9c 100644 --- a/Mage.Sets/src/mage/cards/u/UgnaughtScrapWorker.java +++ b/Mage.Sets/src/mage/cards/u/UgnaughtScrapWorker.java @@ -1,73 +1,73 @@ -/* - * 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.cards.u; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.FilterCard; -import mage.filter.predicate.mageobject.SubtypePredicate; - -/** - * - * @author Styxo - */ -public class UgnaughtScrapWorker extends CardImpl { - - private static final FilterCard filter = new FilterCard("Droid spells"); - - static { - filter.add(new SubtypePredicate(SubType.DROID)); - } - - public UgnaughtScrapWorker(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Ugnaught"); - this.subtype.add("Artificier"); - this.power = new MageInt(1); - this.toughness = new MageInt(2); - - // Droid spell cost {1} less to cast. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostReductionControllerEffect(filter, 1))); - } - - public UgnaughtScrapWorker(final UgnaughtScrapWorker card) { - super(card); - } - - @Override - public UgnaughtScrapWorker copy() { - return new UgnaughtScrapWorker(this); - } -} +/* + * 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.cards.u; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author Styxo + */ +public class UgnaughtScrapWorker extends CardImpl { + + private static final FilterCard filter = new FilterCard("Droid spells"); + + static { + filter.add(new SubtypePredicate(SubType.DROID)); + } + + public UgnaughtScrapWorker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); + this.subtype.add(SubType.UGNAUGHT); + this.subtype.add(SubType.ARTIFICIER); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Droid spell cost {1} less to cast. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostReductionControllerEffect(filter, 1))); + } + + public UgnaughtScrapWorker(final UgnaughtScrapWorker card) { + super(card); + } + + @Override + public UgnaughtScrapWorker copy() { + return new UgnaughtScrapWorker(this); + } +} diff --git a/Mage.Sets/src/mage/cards/u/UktabiDrake.java b/Mage.Sets/src/mage/cards/u/UktabiDrake.java index a505654129..8231e389c1 100644 --- a/Mage.Sets/src/mage/cards/u/UktabiDrake.java +++ b/Mage.Sets/src/mage/cards/u/UktabiDrake.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class UktabiDrake extends CardImpl { public UktabiDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/u/UktabiEfreet.java b/Mage.Sets/src/mage/cards/u/UktabiEfreet.java index cb19cd594e..fa741a4401 100644 --- a/Mage.Sets/src/mage/cards/u/UktabiEfreet.java +++ b/Mage.Sets/src/mage/cards/u/UktabiEfreet.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.CumulativeUpkeepAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class UktabiEfreet extends CardImpl { public UktabiEfreet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Efreet"); + this.subtype.add(SubType.EFREET); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/u/UktabiFaerie.java b/Mage.Sets/src/mage/cards/u/UktabiFaerie.java new file mode 100644 index 0000000000..11d2308db2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/u/UktabiFaerie.java @@ -0,0 +1,75 @@ +/* + * 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.cards.u; + +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.mana.ManaCostsImpl; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetArtifactPermanent; + +/** + * + * @author TheElk801 + */ +public class UktabiFaerie extends CardImpl { + + public UktabiFaerie(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.FAERIE); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {3}{G}, Sacrifice Uktabi Faerie: Destroy target artifact. + Ability ability = new SimpleActivatedAbility(new DestroyTargetEffect(), new ManaCostsImpl("{3}{G}")); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetArtifactPermanent()); + this.addAbility(ability); + } + + public UktabiFaerie(final UktabiFaerie card) { + super(card); + } + + @Override + public UktabiFaerie copy() { + return new UktabiFaerie(this); + } +} diff --git a/Mage.Sets/src/mage/cards/u/UktabiOrangutan.java b/Mage.Sets/src/mage/cards/u/UktabiOrangutan.java index 04fe84db6f..1e0b583b43 100644 --- a/Mage.Sets/src/mage/cards/u/UktabiOrangutan.java +++ b/Mage.Sets/src/mage/cards/u/UktabiOrangutan.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetArtifactPermanent; /** @@ -45,7 +46,7 @@ public class UktabiOrangutan extends CardImpl { public UktabiOrangutan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Ape"); + this.subtype.add(SubType.APE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UktabiWildcats.java b/Mage.Sets/src/mage/cards/u/UktabiWildcats.java index 5ae906fe8d..bcda888366 100644 --- a/Mage.Sets/src/mage/cards/u/UktabiWildcats.java +++ b/Mage.Sets/src/mage/cards/u/UktabiWildcats.java @@ -63,7 +63,7 @@ public class UktabiWildcats extends CardImpl { public UktabiWildcats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/u/UkudCobra.java b/Mage.Sets/src/mage/cards/u/UkudCobra.java index fef2cf5d11..a7bf5b2d80 100644 --- a/Mage.Sets/src/mage/cards/u/UkudCobra.java +++ b/Mage.Sets/src/mage/cards/u/UkudCobra.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class UkudCobra extends CardImpl { public UkudCobra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/u/UlamogTheCeaselessHunger.java b/Mage.Sets/src/mage/cards/u/UlamogTheCeaselessHunger.java index 7cee467cd0..2cb969233e 100644 --- a/Mage.Sets/src/mage/cards/u/UlamogTheCeaselessHunger.java +++ b/Mage.Sets/src/mage/cards/u/UlamogTheCeaselessHunger.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -61,7 +62,7 @@ public class UlamogTheCeaselessHunger extends CardImpl { public UlamogTheCeaselessHunger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{10}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(10); this.toughness = new MageInt(10); diff --git a/Mage.Sets/src/mage/cards/u/UlamogTheInfiniteGyre.java b/Mage.Sets/src/mage/cards/u/UlamogTheInfiniteGyre.java index 14bac2fa1b..fd9464bf37 100644 --- a/Mage.Sets/src/mage/cards/u/UlamogTheInfiniteGyre.java +++ b/Mage.Sets/src/mage/cards/u/UlamogTheInfiniteGyre.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.target.TargetPermanent; @@ -51,7 +52,7 @@ public class UlamogTheInfiniteGyre extends CardImpl { public UlamogTheInfiniteGyre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{11}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(10); this.toughness = new MageInt(10); diff --git a/Mage.Sets/src/mage/cards/u/UlamogsCrusher.java b/Mage.Sets/src/mage/cards/u/UlamogsCrusher.java index e9043d7846..2630eacf13 100644 --- a/Mage.Sets/src/mage/cards/u/UlamogsCrusher.java +++ b/Mage.Sets/src/mage/cards/u/UlamogsCrusher.java @@ -30,11 +30,12 @@ package mage.cards.u; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.keyword.AnnihilatorAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,11 +45,11 @@ public class UlamogsCrusher extends CardImpl { public UlamogsCrusher (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{8}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(8); this.toughness = new MageInt(8); this.addAbility(new AnnihilatorAbility(2)); - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public UlamogsCrusher (final UlamogsCrusher card) { diff --git a/Mage.Sets/src/mage/cards/u/UlamogsDespoiler.java b/Mage.Sets/src/mage/cards/u/UlamogsDespoiler.java index 3e9543a1cf..6ceab0409e 100644 --- a/Mage.Sets/src/mage/cards/u/UlamogsDespoiler.java +++ b/Mage.Sets/src/mage/cards/u/UlamogsDespoiler.java @@ -38,6 +38,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -57,8 +58,8 @@ public class UlamogsDespoiler extends CardImpl { public UlamogsDespoiler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Processor"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.PROCESSOR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/u/UlamogsNullifier.java b/Mage.Sets/src/mage/cards/u/UlamogsNullifier.java index e311ed2f09..accf3183fd 100644 --- a/Mage.Sets/src/mage/cards/u/UlamogsNullifier.java +++ b/Mage.Sets/src/mage/cards/u/UlamogsNullifier.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class UlamogsNullifier extends CardImpl { public UlamogsNullifier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{B}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Processor"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.PROCESSOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/u/UlamogsReclaimer.java b/Mage.Sets/src/mage/cards/u/UlamogsReclaimer.java index 0d2a648480..f6c63e38e0 100644 --- a/Mage.Sets/src/mage/cards/u/UlamogsReclaimer.java +++ b/Mage.Sets/src/mage/cards/u/UlamogsReclaimer.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterInstantOrSorceryCard; import mage.target.common.TargetCardInYourGraveyard; @@ -49,8 +50,8 @@ public class UlamogsReclaimer extends CardImpl { public UlamogsReclaimer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Processor"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.PROCESSOR); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/u/UlashtTheHateSeed.java b/Mage.Sets/src/mage/cards/u/UlashtTheHateSeed.java index acdf82c9f5..57c30404a7 100644 --- a/Mage.Sets/src/mage/cards/u/UlashtTheHateSeed.java +++ b/Mage.Sets/src/mage/cards/u/UlashtTheHateSeed.java @@ -43,6 +43,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -65,8 +66,8 @@ public class UlashtTheHateSeed extends CardImpl { public UlashtTheHateSeed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Hellion"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HELLION); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/u/UlrichOfTheKrallenhorde.java b/Mage.Sets/src/mage/cards/u/UlrichOfTheKrallenhorde.java index 1ee74cdffa..ceb5d59f36 100644 --- a/Mage.Sets/src/mage/cards/u/UlrichOfTheKrallenhorde.java +++ b/Mage.Sets/src/mage/cards/u/UlrichOfTheKrallenhorde.java @@ -54,8 +54,8 @@ public class UlrichOfTheKrallenhorde extends CardImpl { public UlrichOfTheKrallenhorde(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/u/UlrichUncontestedAlpha.java b/Mage.Sets/src/mage/cards/u/UlrichUncontestedAlpha.java index 5547033a3f..fe2e0ac180 100644 --- a/Mage.Sets/src/mage/cards/u/UlrichUncontestedAlpha.java +++ b/Mage.Sets/src/mage/cards/u/UlrichUncontestedAlpha.java @@ -59,7 +59,7 @@ public class UlrichUncontestedAlpha extends CardImpl { public UlrichUncontestedAlpha(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(6); this.toughness = new MageInt(6); this.color.setRed(true); diff --git a/Mage.Sets/src/mage/cards/u/UlrichsKindred.java b/Mage.Sets/src/mage/cards/u/UlrichsKindred.java index 7b6d46e9b0..3eee0040b4 100644 --- a/Mage.Sets/src/mage/cards/u/UlrichsKindred.java +++ b/Mage.Sets/src/mage/cards/u/UlrichsKindred.java @@ -61,7 +61,7 @@ public class UlrichsKindred extends CardImpl { public UlrichsKindred(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UlvenwaldAbomination.java b/Mage.Sets/src/mage/cards/u/UlvenwaldAbomination.java index 7bc8bf675e..9cfb073965 100644 --- a/Mage.Sets/src/mage/cards/u/UlvenwaldAbomination.java +++ b/Mage.Sets/src/mage/cards/u/UlvenwaldAbomination.java @@ -35,6 +35,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class UlvenwaldAbomination extends CardImpl { public UlvenwaldAbomination(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Eldrazi"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/u/UlvenwaldBear.java b/Mage.Sets/src/mage/cards/u/UlvenwaldBear.java index 63fd38e8cd..711fd79afd 100644 --- a/Mage.Sets/src/mage/cards/u/UlvenwaldBear.java +++ b/Mage.Sets/src/mage/cards/u/UlvenwaldBear.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class UlvenwaldBear extends CardImpl { public UlvenwaldBear(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Bear"); + this.subtype.add(SubType.BEAR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UlvenwaldCaptive.java b/Mage.Sets/src/mage/cards/u/UlvenwaldCaptive.java index 7526e52238..e5495cdf8b 100644 --- a/Mage.Sets/src/mage/cards/u/UlvenwaldCaptive.java +++ b/Mage.Sets/src/mage/cards/u/UlvenwaldCaptive.java @@ -38,6 +38,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -48,8 +49,8 @@ public class UlvenwaldCaptive extends CardImpl { public UlvenwaldCaptive(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Werewolf"); - this.subtype.add("Horror"); + this.subtype.add(SubType.WEREWOLF); + this.subtype.add(SubType.HORROR); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UlvenwaldHydra.java b/Mage.Sets/src/mage/cards/u/UlvenwaldHydra.java index b217370f38..d3b9abe424 100644 --- a/Mage.Sets/src/mage/cards/u/UlvenwaldHydra.java +++ b/Mage.Sets/src/mage/cards/u/UlvenwaldHydra.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class UlvenwaldHydra extends CardImpl { public UlvenwaldHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/u/UlvenwaldMysteries.java b/Mage.Sets/src/mage/cards/u/UlvenwaldMysteries.java index a18776a2ff..23cd488c18 100644 --- a/Mage.Sets/src/mage/cards/u/UlvenwaldMysteries.java +++ b/Mage.Sets/src/mage/cards/u/UlvenwaldMysteries.java @@ -108,7 +108,7 @@ class UlvenwaldMysteriesTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { return event.getPlayerId().equals(this.getControllerId()) - && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).getSubtype(game).contains("Clue"); + && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).hasSubtype(SubType.CLUE, game); } @Override diff --git a/Mage.Sets/src/mage/cards/u/UlvenwaldMystics.java b/Mage.Sets/src/mage/cards/u/UlvenwaldMystics.java index 33bef67cec..09e7612a37 100644 --- a/Mage.Sets/src/mage/cards/u/UlvenwaldMystics.java +++ b/Mage.Sets/src/mage/cards/u/UlvenwaldMystics.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -47,9 +48,9 @@ public class UlvenwaldMystics extends CardImpl { public UlvenwaldMystics(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); + this.subtype.add(SubType.WEREWOLF); this.transformable = true; this.secondSideCardClazz = UlvenwaldPrimordials.class; diff --git a/Mage.Sets/src/mage/cards/u/UlvenwaldObserver.java b/Mage.Sets/src/mage/cards/u/UlvenwaldObserver.java index c698987845..5f9a619573 100644 --- a/Mage.Sets/src/mage/cards/u/UlvenwaldObserver.java +++ b/Mage.Sets/src/mage/cards/u/UlvenwaldObserver.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -55,7 +56,7 @@ public class UlvenwaldObserver extends CardImpl { public UlvenwaldObserver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/u/UlvenwaldPrimordials.java b/Mage.Sets/src/mage/cards/u/UlvenwaldPrimordials.java index 7c63ac1021..617d573676 100644 --- a/Mage.Sets/src/mage/cards/u/UlvenwaldPrimordials.java +++ b/Mage.Sets/src/mage/cards/u/UlvenwaldPrimordials.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class UlvenwaldPrimordials extends CardImpl { public UlvenwaldPrimordials(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.color.setGreen(true); // this card is the second face of double-faced card diff --git a/Mage.Sets/src/mage/cards/u/UlvenwaldTracker.java b/Mage.Sets/src/mage/cards/u/UlvenwaldTracker.java index 17cdcd8b40..a260922148 100644 --- a/Mage.Sets/src/mage/cards/u/UlvenwaldTracker.java +++ b/Mage.Sets/src/mage/cards/u/UlvenwaldTracker.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.FightTargetsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AnotherTargetPredicate; @@ -52,8 +53,8 @@ public class UlvenwaldTracker extends CardImpl { public UlvenwaldTracker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/u/UmaraEntangler.java b/Mage.Sets/src/mage/cards/u/UmaraEntangler.java index 5a819ac011..345a229600 100644 --- a/Mage.Sets/src/mage/cards/u/UmaraEntangler.java +++ b/Mage.Sets/src/mage/cards/u/UmaraEntangler.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,9 +43,9 @@ public class UmaraEntangler extends CardImpl { public UmaraEntangler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); - this.subtype.add("Ally"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); + this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/u/UmaraRaptor.java b/Mage.Sets/src/mage/cards/u/UmaraRaptor.java index be6047f3fa..278b5468ca 100644 --- a/Mage.Sets/src/mage/cards/u/UmaraRaptor.java +++ b/Mage.Sets/src/mage/cards/u/UmaraRaptor.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,8 +46,8 @@ public class UmaraRaptor extends CardImpl { public UmaraRaptor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Ally"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.ALLY); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/u/UmbraMystic.java b/Mage.Sets/src/mage/cards/u/UmbraMystic.java index 2cc1f0474b..69f8b71562 100644 --- a/Mage.Sets/src/mage/cards/u/UmbraMystic.java +++ b/Mage.Sets/src/mage/cards/u/UmbraMystic.java @@ -59,8 +59,8 @@ public class UmbraMystic extends CardImpl { public UmbraMystic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UmbraStalker.java b/Mage.Sets/src/mage/cards/u/UmbraStalker.java index b394535d8b..b0ae34b5ac 100644 --- a/Mage.Sets/src/mage/cards/u/UmbraStalker.java +++ b/Mage.Sets/src/mage/cards/u/UmbraStalker.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -52,7 +53,7 @@ public class UmbraStalker extends CardImpl { public UmbraStalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}{B}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/u/UmbralMantle.java b/Mage.Sets/src/mage/cards/u/UmbralMantle.java index f5eefac18b..a24dd15751 100644 --- a/Mage.Sets/src/mage/cards/u/UmbralMantle.java +++ b/Mage.Sets/src/mage/cards/u/UmbralMantle.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class UmbralMantle extends CardImpl { public UmbralMantle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has "{3}, {untap}: This creature gets +2/+2 until end of turn." Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl("{3}")); diff --git a/Mage.Sets/src/mage/cards/u/UmezawasJitte.java b/Mage.Sets/src/mage/cards/u/UmezawasJitte.java index 26b4acc053..014c2f77a5 100644 --- a/Mage.Sets/src/mage/cards/u/UmezawasJitte.java +++ b/Mage.Sets/src/mage/cards/u/UmezawasJitte.java @@ -58,7 +58,7 @@ public class UmezawasJitte extends CardImpl { public UmezawasJitte(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Whenever equipped creature deals combat damage, put two charge counters on Umezawa's Jitte. this.addAbility(new UmezawasJitteAbility()); diff --git a/Mage.Sets/src/mage/cards/u/UnblinkingBleb.java b/Mage.Sets/src/mage/cards/u/UnblinkingBleb.java index 0910a95352..d3d846b11c 100644 --- a/Mage.Sets/src/mage/cards/u/UnblinkingBleb.java +++ b/Mage.Sets/src/mage/cards/u/UnblinkingBleb.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; /** @@ -46,7 +47,7 @@ public class UnblinkingBleb extends CardImpl { public UnblinkingBleb(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/u/UnbreathingHorde.java b/Mage.Sets/src/mage/cards/u/UnbreathingHorde.java index d094681865..d3021b76d8 100644 --- a/Mage.Sets/src/mage/cards/u/UnbreathingHorde.java +++ b/Mage.Sets/src/mage/cards/u/UnbreathingHorde.java @@ -54,7 +54,7 @@ public class UnbreathingHorde extends CardImpl { public UnbreathingHorde(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/u/UnbridledGrowth.java b/Mage.Sets/src/mage/cards/u/UnbridledGrowth.java index 57dc533a69..989d0cb9c9 100644 --- a/Mage.Sets/src/mage/cards/u/UnbridledGrowth.java +++ b/Mage.Sets/src/mage/cards/u/UnbridledGrowth.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -57,7 +58,7 @@ public class UnbridledGrowth extends CardImpl { public UnbridledGrowth(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/u/UnclaimedTerritory.java b/Mage.Sets/src/mage/cards/u/UnclaimedTerritory.java new file mode 100644 index 0000000000..d2dc2ab2d2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/u/UnclaimedTerritory.java @@ -0,0 +1,139 @@ +/* + * 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.cards.u; + +import java.util.UUID; +import mage.ConditionalMana; +import mage.MageObject; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.TapSourceCost; +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.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author spjspj + */ +public class UnclaimedTerritory extends CardImpl { + + public UnclaimedTerritory(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + // As Unclaimed Territory enters the battlefield, choose a creature type. + this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.Benefit))); + + // {T}: Add {C} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {T}: Add one mana of any color to your mana pool. Spend this mana only to cast a creature spell of the chosen type. + this.addAbility(new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new UnclaimedTerritoryManaBuilder(), true)); + } + + public UnclaimedTerritory(final UnclaimedTerritory card) { + super(card); + } + + @Override + public UnclaimedTerritory copy() { + return new UnclaimedTerritory(this); + } +} + +class UnclaimedTerritoryManaBuilder extends ConditionalManaBuilder { + + SubType creatureType; + + @Override + public ConditionalManaBuilder setMana(Mana mana, Ability source, Game game) { + SubType value = (SubType) game.getState().getValue(source.getSourceId() + "_type"); + if (value != null) { + creatureType = 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 spent to cast creatures of type " + creatureType + ")"); + } + return super.setMana(mana, source, game); + } + + @Override + public ConditionalMana build(Object... options) { + return new UnclaimedTerritoryConditionalMana(this.mana, creatureType); + } + + @Override + public String getRule() { + return "Spend this mana only to cast a creature spell of the chosen type"; + } +} + +class UnclaimedTerritoryConditionalMana extends ConditionalMana { + + public UnclaimedTerritoryConditionalMana(Mana mana, SubType creatureType) { + super(mana); + staticText = "Spend this mana only to cast a creature spell of the chosen type"; + addCondition(new UnclaimedTerritoryManaCondition(creatureType)); + } +} + +class UnclaimedTerritoryManaCondition extends CreatureCastManaCondition { + + SubType creatureType; + + UnclaimedTerritoryManaCondition(SubType creatureType) { + this.creatureType = creatureType; + } + + @Override + public boolean apply(Game game, Ability source, UUID originalId, Cost costToPay) { + // check: ... to cast a creature spell + if (super.apply(game, source)) { + // check: ... of the chosen type + MageObject object = game.getObject(source.getSourceId()); + if (creatureType != null && object.hasSubtype(creatureType, game)) { + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/u/UncleIstvan.java b/Mage.Sets/src/mage/cards/u/UncleIstvan.java index 8fa144759e..8013328b3c 100644 --- a/Mage.Sets/src/mage/cards/u/UncleIstvan.java +++ b/Mage.Sets/src/mage/cards/u/UncleIstvan.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PreventAllDamageToSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -49,7 +50,7 @@ public class UncleIstvan extends CardImpl { public UncleIstvan(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}{B}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/u/UncontrollableAnger.java b/Mage.Sets/src/mage/cards/u/UncontrollableAnger.java index 6db1adbab6..b06e959043 100644 --- a/Mage.Sets/src/mage/cards/u/UncontrollableAnger.java +++ b/Mage.Sets/src/mage/cards/u/UncontrollableAnger.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class UncontrollableAnger extends CardImpl { public UncontrollableAnger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Flash (You may cast this spell any time you could cast an instant.) this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/u/UncontrolledInfestation.java b/Mage.Sets/src/mage/cards/u/UncontrolledInfestation.java index 0bf14b43c9..548052076f 100644 --- a/Mage.Sets/src/mage/cards/u/UncontrolledInfestation.java +++ b/Mage.Sets/src/mage/cards/u/UncontrolledInfestation.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.target.TargetPermanent; import mage.target.common.TargetNonBasicLandPermanent; @@ -47,7 +48,7 @@ import mage.target.common.TargetNonBasicLandPermanent; public class UncontrolledInfestation extends CardImpl { public UncontrolledInfestation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant nonbasic land TargetPermanent auraTarget = new TargetNonBasicLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/u/UndeadAlchemist.java b/Mage.Sets/src/mage/cards/u/UndeadAlchemist.java index 67b8b9b11b..cc269fa649 100644 --- a/Mage.Sets/src/mage/cards/u/UndeadAlchemist.java +++ b/Mage.Sets/src/mage/cards/u/UndeadAlchemist.java @@ -57,7 +57,7 @@ public class UndeadAlchemist extends CardImpl { public UndeadAlchemist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UndeadExecutioner.java b/Mage.Sets/src/mage/cards/u/UndeadExecutioner.java index c16de1fc14..0764437866 100644 --- a/Mage.Sets/src/mage/cards/u/UndeadExecutioner.java +++ b/Mage.Sets/src/mage/cards/u/UndeadExecutioner.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class UndeadExecutioner extends CardImpl { public UndeadExecutioner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UndeadGladiator.java b/Mage.Sets/src/mage/cards/u/UndeadGladiator.java index b7b3c89512..03bfc2defb 100644 --- a/Mage.Sets/src/mage/cards/u/UndeadGladiator.java +++ b/Mage.Sets/src/mage/cards/u/UndeadGladiator.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.PhaseStep; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class UndeadGladiator extends CardImpl { public UndeadGladiator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Barbarian"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.BARBARIAN); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/u/UndeadLeotau.java b/Mage.Sets/src/mage/cards/u/UndeadLeotau.java index f55de82071..eca1df7fb9 100644 --- a/Mage.Sets/src/mage/cards/u/UndeadLeotau.java +++ b/Mage.Sets/src/mage/cards/u/UndeadLeotau.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class UndeadLeotau extends CardImpl { public UndeadLeotau (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Cat"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/u/UndeadMinotaur.java b/Mage.Sets/src/mage/cards/u/UndeadMinotaur.java index 2bbb90d8f0..d15efaf1d2 100644 --- a/Mage.Sets/src/mage/cards/u/UndeadMinotaur.java +++ b/Mage.Sets/src/mage/cards/u/UndeadMinotaur.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class UndeadMinotaur extends CardImpl { public UndeadMinotaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Minotaur"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.MINOTAUR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/u/UndeadServant.java b/Mage.Sets/src/mage/cards/u/UndeadServant.java index f81ebc483d..ca627024b0 100644 --- a/Mage.Sets/src/mage/cards/u/UndeadServant.java +++ b/Mage.Sets/src/mage/cards/u/UndeadServant.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.NamePredicate; import mage.game.permanent.token.ZombieToken; @@ -53,7 +54,7 @@ public class UndeadServant extends CardImpl { public UndeadServant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UndeadSlayer.java b/Mage.Sets/src/mage/cards/u/UndeadSlayer.java index 068e142f66..fcd27c7a3f 100644 --- a/Mage.Sets/src/mage/cards/u/UndeadSlayer.java +++ b/Mage.Sets/src/mage/cards/u/UndeadSlayer.java @@ -62,8 +62,8 @@ public class UndeadSlayer extends CardImpl { public UndeadSlayer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UndeadWarchief.java b/Mage.Sets/src/mage/cards/u/UndeadWarchief.java index 260a1776e3..a050ca1208 100644 --- a/Mage.Sets/src/mage/cards/u/UndeadWarchief.java +++ b/Mage.Sets/src/mage/cards/u/UndeadWarchief.java @@ -58,7 +58,7 @@ public class UndeadWarchief extends CardImpl { public UndeadWarchief(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/u/UndercityInformer.java b/Mage.Sets/src/mage/cards/u/UndercityInformer.java index fdf79893be..64ef22c723 100644 --- a/Mage.Sets/src/mage/cards/u/UndercityInformer.java +++ b/Mage.Sets/src/mage/cards/u/UndercityInformer.java @@ -41,6 +41,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -57,8 +58,8 @@ public class UndercityInformer extends CardImpl { public UndercityInformer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UndercityShade.java b/Mage.Sets/src/mage/cards/u/UndercityShade.java index 892c9c3fb5..2b833efc8e 100644 --- a/Mage.Sets/src/mage/cards/u/UndercityShade.java +++ b/Mage.Sets/src/mage/cards/u/UndercityShade.java @@ -45,7 +45,7 @@ public class UndercityShade extends CardImpl { public UndercityShade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Shade"); + this.subtype.add(SubType.SHADE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/u/UndercityTroll.java b/Mage.Sets/src/mage/cards/u/UndercityTroll.java index d99a0ae22e..73b561007f 100644 --- a/Mage.Sets/src/mage/cards/u/UndercityTroll.java +++ b/Mage.Sets/src/mage/cards/u/UndercityTroll.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.RenownAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class UndercityTroll extends CardImpl { public UndercityTroll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Troll"); + this.subtype.add(SubType.TROLL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UndergroundSea.java b/Mage.Sets/src/mage/cards/u/UndergroundSea.java index cfe0860dba..e21847aa44 100644 --- a/Mage.Sets/src/mage/cards/u/UndergroundSea.java +++ b/Mage.Sets/src/mage/cards/u/UndergroundSea.java @@ -33,6 +33,7 @@ import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class UndergroundSea extends CardImpl { public UndergroundSea(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Island"); - this.subtype.add("Swamp"); + this.subtype.add(SubType.ISLAND); + this.subtype.add(SubType.SWAMP); this.addAbility(new BlueManaAbility()); this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/cards/u/UndergrowthChampion.java b/Mage.Sets/src/mage/cards/u/UndergrowthChampion.java index 6dccc83490..7520747ad8 100644 --- a/Mage.Sets/src/mage/cards/u/UndergrowthChampion.java +++ b/Mage.Sets/src/mage/cards/u/UndergrowthChampion.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.PhaseStep; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class UndergrowthChampion extends CardImpl { public UndergrowthChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UndergrowthScavenger.java b/Mage.Sets/src/mage/cards/u/UndergrowthScavenger.java index 77dad32d02..8dc2251f0d 100644 --- a/Mage.Sets/src/mage/cards/u/UndergrowthScavenger.java +++ b/Mage.Sets/src/mage/cards/u/UndergrowthScavenger.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterCreatureCard; @@ -47,8 +48,8 @@ public class UndergrowthScavenger extends CardImpl { public UndergrowthScavenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Fungus"); - this.subtype.add("Horror"); + this.subtype.add(SubType.FUNGUS); + this.subtype.add(SubType.HORROR); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/u/Undertaker.java b/Mage.Sets/src/mage/cards/u/Undertaker.java index da51957a3e..dd5b276a06 100644 --- a/Mage.Sets/src/mage/cards/u/Undertaker.java +++ b/Mage.Sets/src/mage/cards/u/Undertaker.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; @@ -52,8 +53,8 @@ public class Undertaker extends CardImpl { public Undertaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/u/UnderworldCerberus.java b/Mage.Sets/src/mage/cards/u/UnderworldCerberus.java index 4a025cb51d..7fe7b0a3f3 100644 --- a/Mage.Sets/src/mage/cards/u/UnderworldCerberus.java +++ b/Mage.Sets/src/mage/cards/u/UnderworldCerberus.java @@ -40,6 +40,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class UnderworldCerberus extends CardImpl { public UnderworldCerberus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{R}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/u/UnderworldCoinsmith.java b/Mage.Sets/src/mage/cards/u/UnderworldCoinsmith.java index f0fa95e0e2..8c8f6d7008 100644 --- a/Mage.Sets/src/mage/cards/u/UnderworldCoinsmith.java +++ b/Mage.Sets/src/mage/cards/u/UnderworldCoinsmith.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.LoseLifeOpponentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -49,8 +50,8 @@ public class UnderworldCoinsmith extends CardImpl { public UnderworldCoinsmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{W}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UnderworldConnections.java b/Mage.Sets/src/mage/cards/u/UnderworldConnections.java index b767e04886..e1c28b2346 100644 --- a/Mage.Sets/src/mage/cards/u/UnderworldConnections.java +++ b/Mage.Sets/src/mage/cards/u/UnderworldConnections.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class UnderworldConnections extends CardImpl { public UnderworldConnections (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); this.color.setBlack(true); // Enchant land diff --git a/Mage.Sets/src/mage/cards/u/UndyingBeast.java b/Mage.Sets/src/mage/cards/u/UndyingBeast.java index bae103fb5e..74748e6fd3 100644 --- a/Mage.Sets/src/mage/cards/u/UndyingBeast.java +++ b/Mage.Sets/src/mage/cards/u/UndyingBeast.java @@ -36,6 +36,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -49,7 +50,7 @@ public class UndyingBeast extends CardImpl { public UndyingBeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UndyingRage.java b/Mage.Sets/src/mage/cards/u/UndyingRage.java index c317afc30b..6b02621fa1 100644 --- a/Mage.Sets/src/mage/cards/u/UndyingRage.java +++ b/Mage.Sets/src/mage/cards/u/UndyingRage.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class UndyingRage extends CardImpl { public UndyingRage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/u/UneshCriosphinxSovereign.java b/Mage.Sets/src/mage/cards/u/UneshCriosphinxSovereign.java index 13e7a6f025..4764b10aa4 100644 --- a/Mage.Sets/src/mage/cards/u/UneshCriosphinxSovereign.java +++ b/Mage.Sets/src/mage/cards/u/UneshCriosphinxSovereign.java @@ -75,7 +75,7 @@ public class UneshCriosphinxSovereign extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/u/UnflinchingCourage.java b/Mage.Sets/src/mage/cards/u/UnflinchingCourage.java index b7616963be..6b443fa376 100644 --- a/Mage.Sets/src/mage/cards/u/UnflinchingCourage.java +++ b/Mage.Sets/src/mage/cards/u/UnflinchingCourage.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class UnflinchingCourage extends CardImpl { public UnflinchingCourage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/u/Unforge.java b/Mage.Sets/src/mage/cards/u/Unforge.java index 14fee63ca9..183bc779f0 100644 --- a/Mage.Sets/src/mage/cards/u/Unforge.java +++ b/Mage.Sets/src/mage/cards/u/Unforge.java @@ -1,109 +1,109 @@ -/* - * 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.cards.u; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.DestroyTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.SubType; -import mage.filter.common.FilterArtifactPermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.target.common.TargetArtifactPermanent; - -/** - * - * @author wetterlicht - */ -public class Unforge extends CardImpl { - - private static FilterArtifactPermanent filter = new FilterArtifactPermanent("equipment"); - - static{ - filter.add(new SubtypePredicate(SubType.EQUIPMENT)); - } - - public Unforge(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - - // Destroy target Equipment. If that Equipment was attached to a creature, Unforge deals 2 damage to that creature. - getSpellAbility().addTarget(new TargetArtifactPermanent(filter)); - getSpellAbility().addEffect(new DestroyTargetEffect()); - getSpellAbility().addEffect(new UnforgeEffect()); - } - - public Unforge(final Unforge card) { - super(card); - } - - @Override - public Unforge copy() { - return new Unforge(this); - } - -} - -class UnforgeEffect extends OneShotEffect{ - - public UnforgeEffect(){ - super(Outcome.Damage); - staticText = "If that Equipment was attached to a creature, Unforge deals 2 damage to that creature."; - } - - public UnforgeEffect(final UnforgeEffect effect){ - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent equipment = game.getPermanentOrLKIBattlefield(this.getTargetPointer().getFirst(game, source)); - if(equipment != null){ - Permanent creature = game.getPermanent(equipment.getAttachedTo()); - if(creature != null){ - creature.damage(2, source.getId(), game, false, true); - return true; - } - } - - return false; - } - - @Override - public Effect copy() { - return new UnforgeEffect(this); - } - - -} +/* + * 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.cards.u; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.filter.common.FilterArtifactPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetArtifactPermanent; + +/** + * + * @author wetterlicht + */ +public class Unforge extends CardImpl { + + private static FilterArtifactPermanent filter = new FilterArtifactPermanent("equipment"); + + static{ + filter.add(new SubtypePredicate(SubType.EQUIPMENT)); + } + + public Unforge(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); + + // Destroy target Equipment. If that Equipment was attached to a creature, Unforge deals 2 damage to that creature. + getSpellAbility().addTarget(new TargetArtifactPermanent(filter)); + getSpellAbility().addEffect(new DestroyTargetEffect()); + getSpellAbility().addEffect(new UnforgeEffect()); + } + + public Unforge(final Unforge card) { + super(card); + } + + @Override + public Unforge copy() { + return new Unforge(this); + } + +} + +class UnforgeEffect extends OneShotEffect{ + + public UnforgeEffect(){ + super(Outcome.Damage); + staticText = "If that Equipment was attached to a creature, Unforge deals 2 damage to that creature."; + } + + public UnforgeEffect(final UnforgeEffect effect){ + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent equipment = game.getPermanentOrLKIBattlefield(this.getTargetPointer().getFirst(game, source)); + if(equipment != null){ + Permanent creature = game.getPermanent(equipment.getAttachedTo()); + if(creature != null){ + creature.damage(2, source.getId(), game, false, true); + return true; + } + } + + return false; + } + + @Override + public Effect copy() { + return new UnforgeEffect(this); + } + + +} diff --git a/Mage.Sets/src/mage/cards/u/UnfriendlyFire.java b/Mage.Sets/src/mage/cards/u/UnfriendlyFire.java new file mode 100644 index 0000000000..6026d6d579 --- /dev/null +++ b/Mage.Sets/src/mage/cards/u/UnfriendlyFire.java @@ -0,0 +1,59 @@ +/* + * 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.cards.u; + +import java.util.UUID; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author spjspj + */ +public class UnfriendlyFire extends CardImpl { + + public UnfriendlyFire(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{R}"); + + // Unfriendly Fire deals 4 damage to target creature or player. + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addEffect(new DamageTargetEffect(4)); + } + + public UnfriendlyFire(final UnfriendlyFire card) { + super(card); + } + + @Override + public UnfriendlyFire copy() { + return new UnfriendlyFire(this); + } +} diff --git a/Mage.Sets/src/mage/cards/u/UnhallowedCathar.java b/Mage.Sets/src/mage/cards/u/UnhallowedCathar.java index 8d206b58db..d310449e63 100644 --- a/Mage.Sets/src/mage/cards/u/UnhallowedCathar.java +++ b/Mage.Sets/src/mage/cards/u/UnhallowedCathar.java @@ -33,6 +33,7 @@ import mage.abilities.common.CantBlockAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class UnhallowedCathar extends CardImpl { public UnhallowedCathar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Zombie"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.SOLDIER); this.color.setBlack(true); // this card is the second face of double-faced card diff --git a/Mage.Sets/src/mage/cards/u/UnhallowedPact.java b/Mage.Sets/src/mage/cards/u/UnhallowedPact.java index f32b2062d6..cc0041ae48 100644 --- a/Mage.Sets/src/mage/cards/u/UnhallowedPact.java +++ b/Mage.Sets/src/mage/cards/u/UnhallowedPact.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -47,7 +48,7 @@ public class UnhallowedPact extends CardImpl { public UnhallowedPact(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/u/UnholyFiend.java b/Mage.Sets/src/mage/cards/u/UnholyFiend.java index 029fb07008..9aeb8249eb 100644 --- a/Mage.Sets/src/mage/cards/u/UnholyFiend.java +++ b/Mage.Sets/src/mage/cards/u/UnholyFiend.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class UnholyFiend extends CardImpl { public UnholyFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.color.setBlack(true); diff --git a/Mage.Sets/src/mage/cards/u/UnholyStrength.java b/Mage.Sets/src/mage/cards/u/UnholyStrength.java index 0d27b146e8..c58dab0eb0 100644 --- a/Mage.Sets/src/mage/cards/u/UnholyStrength.java +++ b/Mage.Sets/src/mage/cards/u/UnholyStrength.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class UnholyStrength extends CardImpl { public UnholyStrength(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/cards/u/UnifiedStrike.java b/Mage.Sets/src/mage/cards/u/UnifiedStrike.java new file mode 100644 index 0000000000..87b42ae662 --- /dev/null +++ b/Mage.Sets/src/mage/cards/u/UnifiedStrike.java @@ -0,0 +1,107 @@ +/* + * 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.cards.u; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetAttackingCreature; + +/** + * + * @author TheElk801 + */ +public class UnifiedStrike extends CardImpl { + + public UnifiedStrike(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); + + // Exile target attacking creature if its power is less than or equal to the number of Soldiers on the battlefield. + this.getSpellAbility().addEffect(new UnifiedStrikeEffect()); + this.getSpellAbility().addTarget(new TargetAttackingCreature()); + } + + public UnifiedStrike(final UnifiedStrike card) { + super(card); + } + + @Override + public UnifiedStrike copy() { + return new UnifiedStrike(this); + } +} + +class UnifiedStrikeEffect extends OneShotEffect { + + private static final FilterPermanent filter = new FilterPermanent(); + + static { + filter.add(new SubtypePredicate(SubType.SOLDIER)); + } + + UnifiedStrikeEffect() { + super(Outcome.Benefit); + this.staticText = ""; + } + + UnifiedStrikeEffect(final UnifiedStrikeEffect effect) { + super(effect); + } + + @Override + public UnifiedStrikeEffect copy() { + return new UnifiedStrikeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent creature = game.getPermanent(source.getFirstTarget()); + Player player = game.getPlayer(source.getControllerId()); + if (creature == null || player == null) { + return false; + } + int soldierCount = game.getBattlefield() + .getActivePermanents( + filter, + source.getControllerId(), + source.getSourceId(), + game + ).size(); + return creature.getPower().getValue() <= soldierCount; + } +} diff --git a/Mage.Sets/src/mage/cards/u/UnimpededTrespasser.java b/Mage.Sets/src/mage/cards/u/UnimpededTrespasser.java index d594e3c8ec..368a932264 100644 --- a/Mage.Sets/src/mage/cards/u/UnimpededTrespasser.java +++ b/Mage.Sets/src/mage/cards/u/UnimpededTrespasser.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class UnimpededTrespasser extends CardImpl { public UnimpededTrespasser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); this.color.setBlue(true); diff --git a/Mage.Sets/src/mage/cards/u/UninvitedGeist.java b/Mage.Sets/src/mage/cards/u/UninvitedGeist.java index 4f0c9ab12c..4dd1c9776e 100644 --- a/Mage.Sets/src/mage/cards/u/UninvitedGeist.java +++ b/Mage.Sets/src/mage/cards/u/UninvitedGeist.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class UninvitedGeist extends CardImpl { public UninvitedGeist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UnityOfTheDroids.java b/Mage.Sets/src/mage/cards/u/UnityOfTheDroids.java index a06ee27ddd..9933be7216 100644 --- a/Mage.Sets/src/mage/cards/u/UnityOfTheDroids.java +++ b/Mage.Sets/src/mage/cards/u/UnityOfTheDroids.java @@ -1,89 +1,89 @@ -/* - * 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.cards.u; - -import java.util.UUID; -import mage.abilities.Mode; -import mage.abilities.dynamicvalue.common.StaticValue; -import mage.abilities.effects.common.DestroyTargetEffect; -import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; -import mage.abilities.effects.common.PreventDamageToTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.filter.FilterCard; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Styxo - */ -public class UnityOfTheDroids extends CardImpl { - - private static final FilterCreaturePermanent artifactCreatureFilter = new FilterCreaturePermanent("artifact creature"); - private static final FilterCreaturePermanent nonArtifactCreatureFilter = new FilterCreaturePermanent("nonartifact creature"); - - static { - artifactCreatureFilter.add(new CardTypePredicate(CardType.ARTIFACT)); - nonArtifactCreatureFilter.add(Predicates.not(new CardTypePredicate(CardType.ARTIFACT))); - - } - - public UnityOfTheDroids(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}{U}{B}"); - - // Choose one - Prevent all damage that would be dealt to target artifact creature this turn. - this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn)); - this.getSpellAbility().addTarget(new TargetCreaturePermanent(artifactCreatureFilter)); - - // Look at the top four cards of your library. Put one of them into your hand and the rest into your graveyard. - Mode mode = new Mode(); - mode.getEffects().add(new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), new FilterCard(), Zone.GRAVEYARD, false, false)); - this.getSpellAbility().addMode(mode); - - // Destroy target nonartifact creature. - mode = new Mode(); - mode.getEffects().add(new DestroyTargetEffect()); - mode.getTargets().add(new TargetCreaturePermanent(nonArtifactCreatureFilter)); - this.getSpellAbility().addMode(mode); - } - - public UnityOfTheDroids(final UnityOfTheDroids card) { - super(card); - } - - @Override - public UnityOfTheDroids copy() { - return new UnityOfTheDroids(this); - } -} +/* + * 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.cards.u; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; +import mage.abilities.effects.common.PreventDamageToTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Styxo + */ +public class UnityOfTheDroids extends CardImpl { + + private static final FilterCreaturePermanent artifactCreatureFilter = new FilterCreaturePermanent("artifact creature"); + private static final FilterCreaturePermanent nonArtifactCreatureFilter = new FilterCreaturePermanent("nonartifact creature"); + + static { + artifactCreatureFilter.add(new CardTypePredicate(CardType.ARTIFACT)); + nonArtifactCreatureFilter.add(Predicates.not(new CardTypePredicate(CardType.ARTIFACT))); + + } + + public UnityOfTheDroids(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}{U}{B}"); + + // Choose one - Prevent all damage that would be dealt to target artifact creature this turn. + this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(artifactCreatureFilter)); + + // Look at the top four cards of your library. Put one of them into your hand and the rest into your graveyard. + Mode mode = new Mode(); + mode.getEffects().add(new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), new FilterCard(), Zone.GRAVEYARD, false, false)); + this.getSpellAbility().addMode(mode); + + // Destroy target nonartifact creature. + mode = new Mode(); + mode.getEffects().add(new DestroyTargetEffect()); + mode.getTargets().add(new TargetCreaturePermanent(nonArtifactCreatureFilter)); + this.getSpellAbility().addMode(mode); + } + + public UnityOfTheDroids(final UnityOfTheDroids card) { + super(card); + } + + @Override + public UnityOfTheDroids copy() { + return new UnityOfTheDroids(this); + } +} diff --git a/Mage.Sets/src/mage/cards/u/UnlicensedDisintegration.java b/Mage.Sets/src/mage/cards/u/UnlicensedDisintegration.java index 18d0e11c1f..585b188358 100644 --- a/Mage.Sets/src/mage/cards/u/UnlicensedDisintegration.java +++ b/Mage.Sets/src/mage/cards/u/UnlicensedDisintegration.java @@ -1,68 +1,68 @@ -/* - * 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.cards.u; - -import java.util.UUID; -import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalOneShotEffect; -import mage.abilities.effects.common.DamageTargetControllerEffect; -import mage.abilities.effects.common.DestroyTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.common.FilterControlledArtifactPermanent; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author emerald000 - */ -public class UnlicensedDisintegration extends CardImpl { - - public UnlicensedDisintegration(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}{R}"); - - // Destroy target creature. If you control an artifact, Unlicensed Disintegration deals 3 damage to that creature's controller. - this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addEffect(new ConditionalOneShotEffect( - new DamageTargetControllerEffect(3), - new PermanentsOnTheBattlefieldCondition(new FilterControlledArtifactPermanent()), - "If you control an artifact, Unlicensed Disintegration deals 3 damage to that creature's controller")); - - } - - public UnlicensedDisintegration(final UnlicensedDisintegration card) { - super(card); - } - - @Override - public UnlicensedDisintegration copy() { - return new UnlicensedDisintegration(this); - } -} +/* + * 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.cards.u; + +import java.util.UUID; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DamageTargetControllerEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterControlledArtifactPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author emerald000 + */ +public class UnlicensedDisintegration extends CardImpl { + + public UnlicensedDisintegration(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}{R}"); + + // Destroy target creature. If you control an artifact, Unlicensed Disintegration deals 3 damage to that creature's controller. + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new DamageTargetControllerEffect(3), + new PermanentsOnTheBattlefieldCondition(new FilterControlledArtifactPermanent()), + "If you control an artifact, Unlicensed Disintegration deals 3 damage to that creature's controller")); + + } + + public UnlicensedDisintegration(final UnlicensedDisintegration card) { + super(card); + } + + @Override + public UnlicensedDisintegration copy() { + return new UnlicensedDisintegration(this); + } +} diff --git a/Mage.Sets/src/mage/cards/u/UnlikelyAlliance.java b/Mage.Sets/src/mage/cards/u/UnlikelyAlliance.java new file mode 100644 index 0000000000..fbccb91d94 --- /dev/null +++ b/Mage.Sets/src/mage/cards/u/UnlikelyAlliance.java @@ -0,0 +1,76 @@ +/* + * 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.cards.u; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.AttackingPredicate; +import mage.filter.predicate.permanent.BlockingPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class UnlikelyAlliance extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonattacking, nonblocking creature"); + + static { + filter.add(Predicates.not(new AttackingPredicate())); + filter.add(Predicates.not(new BlockingPredicate())); + } + + public UnlikelyAlliance(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + + // {1}{W}: Target nonattacking, nonblocking creature gets +0/+2 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(0, 2, Duration.EndOfTurn), new ManaCostsImpl("{1}{W}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public UnlikelyAlliance(final UnlikelyAlliance card) { + super(card); + } + + @Override + public UnlikelyAlliance copy() { + return new UnlikelyAlliance(this); + } +} diff --git a/Mage.Sets/src/mage/cards/u/UnlivingPsychopath.java b/Mage.Sets/src/mage/cards/u/UnlivingPsychopath.java new file mode 100644 index 0000000000..223d5836e6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/u/UnlivingPsychopath.java @@ -0,0 +1,104 @@ +/* + * 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.cards.u; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ColoredManaCost; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.ObjectSourcePlayer; +import mage.filter.predicate.ObjectSourcePlayerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class UnlivingPsychopath extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power less than Unliving Psychopath's power"); + + static { + filter.add(new UnlivingPsychopathPowerLessThanSourcePredicate()); + } + + public UnlivingPsychopath(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.ASSASSIN); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // {B}: Unliving Psychopath gets +1/-1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, -1, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.B))); + + // {B}, {tap}: Destroy target creature with power less than Unliving Psychopath's power. + Ability ability = new SimpleActivatedAbility(new DestroyTargetEffect(), new ColoredManaCost(ColoredManaSymbol.B)); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public UnlivingPsychopath(final UnlivingPsychopath card) { + super(card); + } + + @Override + public UnlivingPsychopath copy() { + return new UnlivingPsychopath(this); + } +} + +class UnlivingPsychopathPowerLessThanSourcePredicate implements ObjectSourcePlayerPredicate> { + + @Override + public boolean apply(ObjectSourcePlayer input, Game game) { + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(input.getSourceId()); + return sourcePermanent != null && input.getObject().getPower().getValue() < sourcePermanent.getPower().getValue(); + } + + @Override + public String toString() { + return "power less than Unliving Psychopath's power"; + } +} diff --git a/Mage.Sets/src/mage/cards/u/UnnaturalSelection.java b/Mage.Sets/src/mage/cards/u/UnnaturalSelection.java index d069036dbf..aabc4cf8ff 100644 --- a/Mage.Sets/src/mage/cards/u/UnnaturalSelection.java +++ b/Mage.Sets/src/mage/cards/u/UnnaturalSelection.java @@ -45,7 +45,7 @@ import mage.target.common.TargetCreaturePermanent; public class UnnaturalSelection extends CardImpl { public UnnaturalSelection(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); // {1}: Choose a creature type other than Wall. Target creature becomes that type until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesChosenCreatureTypeTargetEffect(true), new GenericManaCost(1)); diff --git a/Mage.Sets/src/mage/cards/u/UnnervingAssault.java b/Mage.Sets/src/mage/cards/u/UnnervingAssault.java index 9c6251028c..220e916e01 100644 --- a/Mage.Sets/src/mage/cards/u/UnnervingAssault.java +++ b/Mage.Sets/src/mage/cards/u/UnnervingAssault.java @@ -45,32 +45,31 @@ import mage.watchers.common.ManaSpentToCastWatcher; /** * * @author jeffwadsworth - + * */ public class UnnervingAssault extends CardImpl { - + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures your opponents control"); private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creatures you control"); - + static { filter.add(new ControllerPredicate(TargetController.OPPONENT)); filter2.add(new ControllerPredicate(TargetController.YOU)); } public UnnervingAssault(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U/R}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U/R}"); // Creatures your opponents control get -1/-0 until end of turn if {U} was spent to cast Unnerving Assault, and creatures you control get +1/+0 until end of turn if {R} was spent to cast it. this.getSpellAbility().addEffect(new ConditionalContinuousEffect( new BoostAllEffect(-1, 0, Duration.EndOfTurn, filter, false), - new ManaWasSpentCondition(ColoredManaSymbol.U), "Creatures your opponents control get -1/0 until end of turn if {U} was spent to cast {this},")); + new ManaWasSpentCondition(ColoredManaSymbol.U), "Creatures your opponents control get -1/-0 until end of turn if {U} was spent to cast {this},")); this.getSpellAbility().addEffect(new ConditionalContinuousEffect( new BoostAllEffect(1, 0, Duration.EndOfTurn, filter2, false), - new ManaWasSpentCondition(ColoredManaSymbol.R), " and creatures you control get +1/0 until end of turn if {R} was spent to cast it")); + new ManaWasSpentCondition(ColoredManaSymbol.R), " and creatures you control get +1/+0 until end of turn if {R} was spent to cast it")); this.getSpellAbility().addEffect(new InfoEffect("(Do both if {U}{R} was spent.)")); this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher()); - + } public UnnervingAssault(final UnnervingAssault card) { @@ -82,4 +81,3 @@ public class UnnervingAssault extends CardImpl { return new UnnervingAssault(this); } } - diff --git a/Mage.Sets/src/mage/cards/u/UnquenchableThirst.java b/Mage.Sets/src/mage/cards/u/UnquenchableThirst.java index 9933f0606a..238565428e 100644 --- a/Mage.Sets/src/mage/cards/u/UnquenchableThirst.java +++ b/Mage.Sets/src/mage/cards/u/UnquenchableThirst.java @@ -68,7 +68,7 @@ public class UnquenchableThirst extends CardImpl { public UnquenchableThirst(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/u/UnquestionedAuthority.java b/Mage.Sets/src/mage/cards/u/UnquestionedAuthority.java index ada9351e22..6a7408a02e 100644 --- a/Mage.Sets/src/mage/cards/u/UnquestionedAuthority.java +++ b/Mage.Sets/src/mage/cards/u/UnquestionedAuthority.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; @@ -54,7 +55,7 @@ public class UnquestionedAuthority extends CardImpl { public UnquestionedAuthority(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/u/UnravelingMummy.java b/Mage.Sets/src/mage/cards/u/UnravelingMummy.java index fb6e4ececa..5534479a5c 100644 --- a/Mage.Sets/src/mage/cards/u/UnravelingMummy.java +++ b/Mage.Sets/src/mage/cards/u/UnravelingMummy.java @@ -1,94 +1,94 @@ -/* - * 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.cards.u; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.abilities.keyword.DeathtouchAbility; -import mage.abilities.keyword.LifelinkAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.filter.predicate.permanent.AttackingPredicate; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author LevelX2 - */ -public class UnravelingMummy extends CardImpl { - - private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("attacking Zombie"); - - static { - filter.add(new AttackingPredicate()); - filter.add(new SubtypePredicate(SubType.ZOMBIE)); - } - - public UnravelingMummy(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{B}"); - - this.subtype.add("Zombie"); - this.power = new MageInt(2); - this.toughness = new MageInt(3); - - // {1}{W}: Target attacking Zombie gains lifelink until end of turn. - Effect effect = new GainAbilityTargetEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn); - effect.setText("Target attacking Zombie gains lifelink until end of turn."); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{W}")); - ability.addTarget(new TargetCreaturePermanent(filter)); - this.addAbility(ability); - - // {1}{B}: Target attacking Zombie gains deathtouch until end of turn. - effect = new GainAbilityTargetEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn); - effect.setText("Target attacking Zombie gains deathtouch until end of turn. (Any amount of damage it deals to a creature is enough to destroy it.)"); - ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{B}")); - ability.addTarget(new TargetCreaturePermanent(filter)); - this.addAbility(ability); - - } - - public UnravelingMummy(final UnravelingMummy card) { - super(card); - } - - @Override - public UnravelingMummy copy() { - return new UnravelingMummy(this); - } -} +/* + * 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.cards.u; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AttackingPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class UnravelingMummy extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("attacking Zombie"); + + static { + filter.add(new AttackingPredicate()); + filter.add(new SubtypePredicate(SubType.ZOMBIE)); + } + + public UnravelingMummy(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{B}"); + + this.subtype.add(SubType.ZOMBIE); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // {1}{W}: Target attacking Zombie gains lifelink until end of turn. + Effect effect = new GainAbilityTargetEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn); + effect.setText("Target attacking Zombie gains lifelink until end of turn."); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{W}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + + // {1}{B}: Target attacking Zombie gains deathtouch until end of turn. + effect = new GainAbilityTargetEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn); + effect.setText("Target attacking Zombie gains deathtouch until end of turn. (Any amount of damage it deals to a creature is enough to destroy it.)"); + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{B}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + + } + + public UnravelingMummy(final UnravelingMummy card) { + super(card); + } + + @Override + public UnravelingMummy copy() { + return new UnravelingMummy(this); + } +} diff --git a/Mage.Sets/src/mage/cards/u/UnrulyMob.java b/Mage.Sets/src/mage/cards/u/UnrulyMob.java index 1af9832b21..9159439a2f 100644 --- a/Mage.Sets/src/mage/cards/u/UnrulyMob.java +++ b/Mage.Sets/src/mage/cards/u/UnrulyMob.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -55,7 +56,7 @@ public class UnrulyMob extends CardImpl { public UnrulyMob(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/u/UnrulySureshot.java b/Mage.Sets/src/mage/cards/u/UnrulySureshot.java index 5a07035f0d..8c6bb4cbac 100644 --- a/Mage.Sets/src/mage/cards/u/UnrulySureshot.java +++ b/Mage.Sets/src/mage/cards/u/UnrulySureshot.java @@ -1,86 +1,87 @@ -/* - * 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.cards.u; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.DamageTargetEffect; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.counters.CounterType; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.CounterPredicate; -import mage.target.common.TargetCreaturePermanent; -import mage.target.common.TargetOpponentsCreaturePermanent; - -/** - * - * @author Styxo - */ -public class UnrulySureshot extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with a bounty counter on it"); - - static { - filter.add(new CounterPredicate(CounterType.BOUNTY)); - } - - public UnrulySureshot(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Human"); - this.subtype.add("Hunter"); - this.power = new MageInt(4); - this.toughness = new MageInt(4); - - // When Unruly Sureshot enters the battlefield, put a bounty counter on target creature an opponent controls. - Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance())); - ability.addTarget(new TargetOpponentsCreaturePermanent()); - this.addAbility(ability); - - // {3}{R}: Unruly Sureshot deals 2 damage to target creature with a bounty counter on it. - ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{3}{R}")); - ability.addTarget(new TargetCreaturePermanent(filter)); - this.addAbility(ability); - } - - public UnrulySureshot(final UnrulySureshot card) { - super(card); - } - - @Override - public UnrulySureshot copy() { - return new UnrulySureshot(this); - } -} +/* + * 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.cards.u; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.CounterPredicate; +import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetOpponentsCreaturePermanent; + +/** + * + * @author Styxo + */ +public class UnrulySureshot extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with a bounty counter on it"); + + static { + filter.add(new CounterPredicate(CounterType.BOUNTY)); + } + + public UnrulySureshot(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.HUNTER); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // When Unruly Sureshot enters the battlefield, put a bounty counter on target creature an opponent controls. + Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance())); + ability.addTarget(new TargetOpponentsCreaturePermanent()); + this.addAbility(ability); + + // {3}{R}: Unruly Sureshot deals 2 damage to target creature with a bounty counter on it. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{3}{R}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public UnrulySureshot(final UnrulySureshot card) { + super(card); + } + + @Override + public UnrulySureshot copy() { + return new UnrulySureshot(this); + } +} diff --git a/Mage.Sets/src/mage/cards/u/UnscytheKillerOfKings.java b/Mage.Sets/src/mage/cards/u/UnscytheKillerOfKings.java index 56d3a64886..9359dea5e0 100644 --- a/Mage.Sets/src/mage/cards/u/UnscytheKillerOfKings.java +++ b/Mage.Sets/src/mage/cards/u/UnscytheKillerOfKings.java @@ -62,7 +62,7 @@ public class UnscytheKillerOfKings extends CardImpl { public UnscytheKillerOfKings(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{U}{B}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +3/+3 and has first strike. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 3))); diff --git a/Mage.Sets/src/mage/cards/u/UnseenWalker.java b/Mage.Sets/src/mage/cards/u/UnseenWalker.java index aeeeafbd87..11369e918f 100644 --- a/Mage.Sets/src/mage/cards/u/UnseenWalker.java +++ b/Mage.Sets/src/mage/cards/u/UnseenWalker.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class UnseenWalker extends CardImpl { public UnseenWalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Dryad"); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/u/UnstableHulk.java b/Mage.Sets/src/mage/cards/u/UnstableHulk.java index bdafdcbfef..8ee88befbc 100644 --- a/Mage.Sets/src/mage/cards/u/UnstableHulk.java +++ b/Mage.Sets/src/mage/cards/u/UnstableHulk.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -51,8 +52,8 @@ public class UnstableHulk extends CardImpl { public UnstableHulk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UnstableMutation.java b/Mage.Sets/src/mage/cards/u/UnstableMutation.java index dfbab172f6..e80aad5dba 100644 --- a/Mage.Sets/src/mage/cards/u/UnstableMutation.java +++ b/Mage.Sets/src/mage/cards/u/UnstableMutation.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class UnstableMutation extends CardImpl { public UnstableMutation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/u/UnstableShapeshifter.java b/Mage.Sets/src/mage/cards/u/UnstableShapeshifter.java index b5b04e1791..f5bee08e2e 100644 --- a/Mage.Sets/src/mage/cards/u/UnstableShapeshifter.java +++ b/Mage.Sets/src/mage/cards/u/UnstableShapeshifter.java @@ -36,6 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import static mage.cards.u.UnstableShapeshifter.filterAnotherCreature; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SetTargetPointer; @@ -60,7 +61,7 @@ public class UnstableShapeshifter extends CardImpl { public UnstableShapeshifter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/u/UnstoppableAsh.java b/Mage.Sets/src/mage/cards/u/UnstoppableAsh.java index a7d0acdd2f..1dd622a934 100644 --- a/Mage.Sets/src/mage/cards/u/UnstoppableAsh.java +++ b/Mage.Sets/src/mage/cards/u/UnstoppableAsh.java @@ -59,8 +59,8 @@ public class UnstoppableAsh extends CardImpl { public UnstoppableAsh(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/u/UntamedHunger.java b/Mage.Sets/src/mage/cards/u/UntamedHunger.java index f916875b72..3e442a8d32 100644 --- a/Mage.Sets/src/mage/cards/u/UntamedHunger.java +++ b/Mage.Sets/src/mage/cards/u/UntamedHunger.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -53,7 +54,7 @@ public class UntamedHunger extends CardImpl { public UntamedHunger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/u/UnwaveringInitiate.java b/Mage.Sets/src/mage/cards/u/UnwaveringInitiate.java index 7d14535e8c..a85d24b8d9 100644 --- a/Mage.Sets/src/mage/cards/u/UnwaveringInitiate.java +++ b/Mage.Sets/src/mage/cards/u/UnwaveringInitiate.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class UnwaveringInitiate extends CardImpl { public UnwaveringInitiate(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UnworthyDead.java b/Mage.Sets/src/mage/cards/u/UnworthyDead.java index 987b2d561d..5e4339eaf9 100644 --- a/Mage.Sets/src/mage/cards/u/UnworthyDead.java +++ b/Mage.Sets/src/mage/cards/u/UnworthyDead.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class UnworthyDead extends CardImpl { public UnworthyDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/u/UnyaroBees.java b/Mage.Sets/src/mage/cards/u/UnyaroBees.java index 1647245fc8..0f1f58ae3a 100644 --- a/Mage.Sets/src/mage/cards/u/UnyaroBees.java +++ b/Mage.Sets/src/mage/cards/u/UnyaroBees.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -51,7 +52,7 @@ public class UnyaroBees extends CardImpl { public UnyaroBees(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/u/UnyaroGriffin.java b/Mage.Sets/src/mage/cards/u/UnyaroGriffin.java index ee806310f9..cb59b65d46 100644 --- a/Mage.Sets/src/mage/cards/u/UnyaroGriffin.java +++ b/Mage.Sets/src/mage/cards/u/UnyaroGriffin.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -61,7 +62,7 @@ public class UnyaroGriffin extends CardImpl { public UnyaroGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UnyieldingKrumar.java b/Mage.Sets/src/mage/cards/u/UnyieldingKrumar.java index 5ecdb62db9..dfc55c8f8f 100644 --- a/Mage.Sets/src/mage/cards/u/UnyieldingKrumar.java +++ b/Mage.Sets/src/mage/cards/u/UnyieldingKrumar.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class UnyieldingKrumar extends CardImpl { public UnyieldingKrumar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Orc"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/u/UpdraftElemental.java b/Mage.Sets/src/mage/cards/u/UpdraftElemental.java index 5d1a767486..81f37e25b0 100644 --- a/Mage.Sets/src/mage/cards/u/UpdraftElemental.java +++ b/Mage.Sets/src/mage/cards/u/UpdraftElemental.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class UpdraftElemental extends CardImpl { public UpdraftElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/u/UrabraskTheHidden.java b/Mage.Sets/src/mage/cards/u/UrabraskTheHidden.java index c7922ad098..671791e7c7 100644 --- a/Mage.Sets/src/mage/cards/u/UrabraskTheHidden.java +++ b/Mage.Sets/src/mage/cards/u/UrabraskTheHidden.java @@ -53,7 +53,7 @@ public class UrabraskTheHidden extends CardImpl { public UrabraskTheHidden(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Praetor"); + this.subtype.add(SubType.PRAETOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/u/UrbanBurgeoning.java b/Mage.Sets/src/mage/cards/u/UrbanBurgeoning.java index f33758431b..edd2f4421e 100644 --- a/Mage.Sets/src/mage/cards/u/UrbanBurgeoning.java +++ b/Mage.Sets/src/mage/cards/u/UrbanBurgeoning.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -60,7 +61,7 @@ public class UrbanBurgeoning extends CardImpl { public UrbanBurgeoning(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/u/UrbisProtector.java b/Mage.Sets/src/mage/cards/u/UrbisProtector.java index 183267ded8..6c5ca19fb9 100644 --- a/Mage.Sets/src/mage/cards/u/UrbisProtector.java +++ b/Mage.Sets/src/mage/cards/u/UrbisProtector.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.AngelToken; /** @@ -44,8 +45,8 @@ public class UrbisProtector extends CardImpl { public UrbisProtector(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/u/Urborg.java b/Mage.Sets/src/mage/cards/u/Urborg.java index 967c4d39bd..a8f163a894 100644 --- a/Mage.Sets/src/mage/cards/u/Urborg.java +++ b/Mage.Sets/src/mage/cards/u/Urborg.java @@ -31,15 +31,22 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.continuous.LoseAbilityOrAnotherAbilityTargetEffect; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.LoseAbilityTargetEffect; import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.SwampwalkAbility; import mage.abilities.mana.BlackManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; import mage.target.common.TargetCreaturePermanent; /** @@ -49,13 +56,14 @@ import mage.target.common.TargetCreaturePermanent; public class Urborg extends CardImpl { public Urborg(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},""); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); addSuperType(SuperType.LEGENDARY); // {tap}: Add {B} to your mana pool. this.addAbility(new BlackManaAbility()); + // {tap}: Target creature loses first strike or swampwalk until end of turn. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseAbilityOrAnotherAbilityTargetEffect(FirstStrikeAbility.getInstance(), new SwampwalkAbility()), new TapSourceCost()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UrborgEffect(), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } @@ -70,4 +78,38 @@ public class Urborg extends CardImpl { } } +class UrborgEffect extends OneShotEffect { + UrborgEffect() { + super(Outcome.Benefit); + this.staticText = "Target creature loses first strike or swampwalk until end of turn."; + } + + UrborgEffect(final UrborgEffect effect) { + super(effect); + } + + @Override + public UrborgEffect copy() { + return new UrborgEffect(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) { + return false; + } + Ability ability; + if (player.chooseUse(Outcome.UnboostCreature, "Which ability should be lost?", null, "First Strike", "Swampwalk", source, game)) { + ability = FirstStrikeAbility.getInstance(); + } else { + ability = new SwampwalkAbility(); + } + ContinuousEffect effect = new LoseAbilityTargetEffect(ability, Duration.EndOfTurn); +// effect.setTargetPointer(new FixedTarget(permanent, game)); + game.addEffect(effect, source); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/u/UrborgDrake.java b/Mage.Sets/src/mage/cards/u/UrborgDrake.java index 82fdda9ac8..d2b999eece 100644 --- a/Mage.Sets/src/mage/cards/u/UrborgDrake.java +++ b/Mage.Sets/src/mage/cards/u/UrborgDrake.java @@ -29,11 +29,12 @@ package mage.cards.u; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,14 +45,14 @@ public class UrborgDrake extends CardImpl { public UrborgDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(3); // Flying this.addAbility(FlyingAbility.getInstance()); // Urborg Drake attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public UrborgDrake(final UrborgDrake card) { diff --git a/Mage.Sets/src/mage/cards/u/UrborgElf.java b/Mage.Sets/src/mage/cards/u/UrborgElf.java index e5b20c4d3a..6be266b82f 100644 --- a/Mage.Sets/src/mage/cards/u/UrborgElf.java +++ b/Mage.Sets/src/mage/cards/u/UrborgElf.java @@ -35,6 +35,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class UrborgElf extends CardImpl { public UrborgElf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/u/UrborgEmissary.java b/Mage.Sets/src/mage/cards/u/UrborgEmissary.java index 0324c4f4c5..f8690f1e8a 100644 --- a/Mage.Sets/src/mage/cards/u/UrborgEmissary.java +++ b/Mage.Sets/src/mage/cards/u/UrborgEmissary.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPermanent; /** @@ -49,8 +50,8 @@ public class UrborgEmissary extends CardImpl { public UrborgEmissary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/u/UrborgMindsucker.java b/Mage.Sets/src/mage/cards/u/UrborgMindsucker.java index 5227c7942d..e828d870f4 100644 --- a/Mage.Sets/src/mage/cards/u/UrborgMindsucker.java +++ b/Mage.Sets/src/mage/cards/u/UrborgMindsucker.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetOpponent; @@ -48,7 +49,7 @@ public class UrborgMindsucker extends CardImpl { public UrborgMindsucker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UrborgPhantom.java b/Mage.Sets/src/mage/cards/u/UrborgPhantom.java index c5b0fe7eb2..f800c151c5 100644 --- a/Mage.Sets/src/mage/cards/u/UrborgPhantom.java +++ b/Mage.Sets/src/mage/cards/u/UrborgPhantom.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.PreventCombatDamageToSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class UrborgPhantom extends CardImpl { public UrborgPhantom(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Spirit"); - this.subtype.add("Minion"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.MINION); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/u/UrborgShambler.java b/Mage.Sets/src/mage/cards/u/UrborgShambler.java index f224fa006b..b58e6190dd 100644 --- a/Mage.Sets/src/mage/cards/u/UrborgShambler.java +++ b/Mage.Sets/src/mage/cards/u/UrborgShambler.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -55,7 +56,7 @@ public class UrborgShambler extends CardImpl { public UrborgShambler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/u/UrborgSkeleton.java b/Mage.Sets/src/mage/cards/u/UrborgSkeleton.java index bb5745876a..2ce0b055bd 100644 --- a/Mage.Sets/src/mage/cards/u/UrborgSkeleton.java +++ b/Mage.Sets/src/mage/cards/u/UrborgSkeleton.java @@ -24,7 +24,7 @@ * 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.cards.u; import java.util.UUID; @@ -40,20 +40,21 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; /** -* -* @author LevelX2 -*/ + * + * @author LevelX2 + */ public class UrborgSkeleton extends CardImpl { - private static final String staticText = "If Urborg Skeleton was kicked, it enters the battlefield with a +1/+1 counter on it"; + private static final String staticText = "If {this} was kicked, it enters the battlefield with a +1/+1 counter on it."; public UrborgSkeleton(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Skeleton"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(0); this.toughness = new MageInt(1); @@ -67,7 +68,7 @@ public class UrborgSkeleton extends CardImpl { // If Urborg Skeleton was kicked, it enters the battlefield with a +1/+1 counter on it. Ability ability = new EntersBattlefieldAbility( new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), - KickedCondition.instance, staticText,""); + KickedCondition.instance, staticText, ""); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/u/UrborgStalker.java b/Mage.Sets/src/mage/cards/u/UrborgStalker.java new file mode 100644 index 0000000000..1f4765e21f --- /dev/null +++ b/Mage.Sets/src/mage/cards/u/UrborgStalker.java @@ -0,0 +1,87 @@ +/* + * 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.cards.u; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author TheElk801 + */ +public class UrborgStalker extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent(); + + static { + filter.add(new ControllerPredicate(TargetController.ACTIVE)); + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + filter.add(Predicates.not(new CardTypePredicate(CardType.LAND))); + } + + public UrborgStalker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.HORROR); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // At the beginning of each player's upkeep, if that player controls a nonblack, nonland permanent, Urborg Stalker deals 1 damage to that player. + this.addAbility(new ConditionalTriggeredAbility( + new BeginningOfUpkeepTriggeredAbility(new DamageTargetEffect(1), TargetController.ANY, false), + new PermanentsOnTheBattlefieldCondition(filter), + "At the beginning of each player's upkeep, " + + "if that player controls a nonblack, nonland permanent, " + + "{this} deals 1 damage to that player." + )); + } + + public UrborgStalker(final UrborgStalker card) { + super(card); + } + + @Override + public UrborgStalker copy() { + return new UrborgStalker(this); + } +} diff --git a/Mage.Sets/src/mage/cards/u/UrborgSyphonMage.java b/Mage.Sets/src/mage/cards/u/UrborgSyphonMage.java index b236b4db6a..d50fc8fbc5 100644 --- a/Mage.Sets/src/mage/cards/u/UrborgSyphonMage.java +++ b/Mage.Sets/src/mage/cards/u/UrborgSyphonMage.java @@ -39,6 +39,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -52,8 +53,8 @@ public class UrborgSyphonMage extends CardImpl { public UrborgSyphonMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UrilTheMiststalker.java b/Mage.Sets/src/mage/cards/u/UrilTheMiststalker.java index c056fb0943..84c61b2e80 100644 --- a/Mage.Sets/src/mage/cards/u/UrilTheMiststalker.java +++ b/Mage.Sets/src/mage/cards/u/UrilTheMiststalker.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class UrilTheMiststalker extends CardImpl { public UrilTheMiststalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/u/Ursapine.java b/Mage.Sets/src/mage/cards/u/Ursapine.java index d82e647fe7..f1ef4d3098 100644 --- a/Mage.Sets/src/mage/cards/u/Ursapine.java +++ b/Mage.Sets/src/mage/cards/u/Ursapine.java @@ -46,7 +46,7 @@ public class Ursapine extends CardImpl { public Ursapine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/u/UrsineFylgja.java b/Mage.Sets/src/mage/cards/u/UrsineFylgja.java index d578fcccf5..b6f0f976bd 100644 --- a/Mage.Sets/src/mage/cards/u/UrsineFylgja.java +++ b/Mage.Sets/src/mage/cards/u/UrsineFylgja.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -51,8 +52,8 @@ public class UrsineFylgja extends CardImpl { public UrsineFylgja(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Spirit"); - this.subtype.add("Bear"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.BEAR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/u/UrzasGuilt.java b/Mage.Sets/src/mage/cards/u/UrzasGuilt.java index 76400716c3..a3224df09e 100644 --- a/Mage.Sets/src/mage/cards/u/UrzasGuilt.java +++ b/Mage.Sets/src/mage/cards/u/UrzasGuilt.java @@ -43,13 +43,12 @@ import mage.constants.CardType; public class UrzasGuilt extends CardImpl { public UrzasGuilt(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{U}{B}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}{B}"); // Each player draws two cards, then discards three cards, then loses 4 life. this.getSpellAbility().addEffect(new DrawCardAllEffect(2)); Effect effect = new DiscardEachPlayerEffect(3, false); - effect.setText("then discards three cards"); + effect.setText("then discards three cards,"); this.getSpellAbility().addEffect(effect); effect = new LoseLifeAllPlayersEffect(4); effect.setText("then loses 4 life"); diff --git a/Mage.Sets/src/mage/cards/u/UrzasMiter.java b/Mage.Sets/src/mage/cards/u/UrzasMiter.java index 17e5068e76..0c33bd236c 100644 --- a/Mage.Sets/src/mage/cards/u/UrzasMiter.java +++ b/Mage.Sets/src/mage/cards/u/UrzasMiter.java @@ -33,7 +33,7 @@ import mage.abilities.costs.Cost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DoIfCostPaid; -import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -59,8 +59,8 @@ public class UrzasMiter extends CardImpl { Watcher watcher = new UrzasMiterWatcher(); // Whenever an artifact you control is put into a graveyard from the battlefield, if it wasn't sacrificed, you may pay {3}. If you do, draw a card. - Effect effect = new UrzasMiterDoIfCostPaid(new GainLifeEffect(1), new GenericManaCost(1)); - effect.setText("you may pay {1}. If you do, you gain 1 life."); + Effect effect = new UrzasMiterDoIfCostPaid(new DrawCardSourceControllerEffect(1), new GenericManaCost(3)); + effect.setText("you may pay {3}. If you do, draw a card."); Ability ability = new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.GRAVEYARD, effect, new FilterControlledArtifactPermanent(), "Whenever an artifact you control is put into a graveyard from the battlefield, ", true); diff --git a/Mage.Sets/src/mage/cards/u/UthdenTroll.java b/Mage.Sets/src/mage/cards/u/UthdenTroll.java index fcf19ceadd..c9e7f9dcc5 100644 --- a/Mage.Sets/src/mage/cards/u/UthdenTroll.java +++ b/Mage.Sets/src/mage/cards/u/UthdenTroll.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class UthdenTroll extends CardImpl { public UthdenTroll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Troll"); + this.subtype.add(SubType.TROLL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UtopiaMycon.java b/Mage.Sets/src/mage/cards/u/UtopiaMycon.java index f519df1ec8..80b84f33ef 100644 --- a/Mage.Sets/src/mage/cards/u/UtopiaMycon.java +++ b/Mage.Sets/src/mage/cards/u/UtopiaMycon.java @@ -64,7 +64,7 @@ public class UtopiaMycon extends CardImpl { public UtopiaMycon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UtopiaSprawl.java b/Mage.Sets/src/mage/cards/u/UtopiaSprawl.java index 7aaf46d503..dcbba8453d 100644 --- a/Mage.Sets/src/mage/cards/u/UtopiaSprawl.java +++ b/Mage.Sets/src/mage/cards/u/UtopiaSprawl.java @@ -59,7 +59,7 @@ public class UtopiaSprawl extends CardImpl { public UtopiaSprawl(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant Forest TargetPermanent auraTarget = new TargetLandPermanent(filter); diff --git a/Mage.Sets/src/mage/cards/u/UtopiaTree.java b/Mage.Sets/src/mage/cards/u/UtopiaTree.java index 5821339a41..ba19ade67f 100644 --- a/Mage.Sets/src/mage/cards/u/UtopiaTree.java +++ b/Mage.Sets/src/mage/cards/u/UtopiaTree.java @@ -33,6 +33,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class UtopiaTree extends CardImpl { public UtopiaTree(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Plant"); + this.subtype.add(SubType.PLANT); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/u/UtopiaVow.java b/Mage.Sets/src/mage/cards/u/UtopiaVow.java index 177c0d6e63..1187bbc9cf 100644 --- a/Mage.Sets/src/mage/cards/u/UtopiaVow.java +++ b/Mage.Sets/src/mage/cards/u/UtopiaVow.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class UtopiaVow extends CardImpl { public UtopiaVow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/u/UtvaraHellkite.java b/Mage.Sets/src/mage/cards/u/UtvaraHellkite.java index 3a24c08259..981cc36eaa 100644 --- a/Mage.Sets/src/mage/cards/u/UtvaraHellkite.java +++ b/Mage.Sets/src/mage/cards/u/UtvaraHellkite.java @@ -54,7 +54,7 @@ public class UtvaraHellkite extends CardImpl { public UtvaraHellkite(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/u/UtvaraScalper.java b/Mage.Sets/src/mage/cards/u/UtvaraScalper.java index d647063729..428a2dd546 100644 --- a/Mage.Sets/src/mage/cards/u/UtvaraScalper.java +++ b/Mage.Sets/src/mage/cards/u/UtvaraScalper.java @@ -29,11 +29,12 @@ package mage.cards.u; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,15 +44,15 @@ public class UtvaraScalper extends CardImpl { public UtvaraScalper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Scout"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(2); // Flying this.addAbility(FlyingAbility.getInstance()); // Utvara Scalper attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public UtvaraScalper(final UtvaraScalper card) { diff --git a/Mage.Sets/src/mage/cards/u/UyoSilentProphet.java b/Mage.Sets/src/mage/cards/u/UyoSilentProphet.java index 0c41138b4f..560f9dd34f 100644 --- a/Mage.Sets/src/mage/cards/u/UyoSilentProphet.java +++ b/Mage.Sets/src/mage/cards/u/UyoSilentProphet.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -54,8 +55,8 @@ public class UyoSilentProphet extends CardImpl { public UyoSilentProphet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Moonfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MOONFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/VWing.java b/Mage.Sets/src/mage/cards/v/VWing.java index ea3f8c4430..8a0969587c 100644 --- a/Mage.Sets/src/mage/cards/v/VWing.java +++ b/Mage.Sets/src/mage/cards/v/VWing.java @@ -1,65 +1,66 @@ -/* - * 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.cards.v; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.keyword.HasteAbility; -import mage.abilities.keyword.SpaceflightAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class VWing extends CardImpl { - - public VWing(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}{R}"); - this.subtype.add("Starship"); - this.power = new MageInt(1); - this.toughness = new MageInt(2); - - // Haste - this.addAbility(HasteAbility.getInstance()); - - // Spaceflight - this.addAbility(SpaceflightAbility.getInstance()); - } - - public VWing(final VWing card) { - super(card); - } - - @Override - public VWing copy() { - return new VWing(this); - } -} +/* + * 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.cards.v; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.SpaceflightAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author Styxo + */ +public class VWing extends CardImpl { + + public VWing(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}{R}"); + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + } + + public VWing(final VWing card) { + super(card); + } + + @Override + public VWing copy() { + return new VWing(this); + } +} diff --git a/Mage.Sets/src/mage/cards/v/VaevictisAsmadi.java b/Mage.Sets/src/mage/cards/v/VaevictisAsmadi.java index 0b09a40226..11d9c7861c 100644 --- a/Mage.Sets/src/mage/cards/v/VaevictisAsmadi.java +++ b/Mage.Sets/src/mage/cards/v/VaevictisAsmadi.java @@ -48,8 +48,8 @@ public class VaevictisAsmadi extends CardImpl { public VaevictisAsmadi(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}{R}{R}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elder"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.ELDER); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/v/VagrantPlowbeasts.java b/Mage.Sets/src/mage/cards/v/VagrantPlowbeasts.java index 5daaa9a76a..c6d7e21d39 100644 --- a/Mage.Sets/src/mage/cards/v/VagrantPlowbeasts.java +++ b/Mage.Sets/src/mage/cards/v/VagrantPlowbeasts.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -55,7 +56,7 @@ public class VagrantPlowbeasts extends CardImpl { public VagrantPlowbeasts(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{W}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/v/ValakutFireboar.java b/Mage.Sets/src/mage/cards/v/ValakutFireboar.java index 6995589a35..310e597435 100644 --- a/Mage.Sets/src/mage/cards/v/ValakutFireboar.java +++ b/Mage.Sets/src/mage/cards/v/ValakutFireboar.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.SwitchPowerToughnessSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,8 +45,8 @@ public class ValakutFireboar extends CardImpl { public ValakutFireboar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Boar"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.BOAR); this.power = new MageInt(1); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/v/ValakutInvoker.java b/Mage.Sets/src/mage/cards/v/ValakutInvoker.java index d978be2e2e..19dd41cc37 100644 --- a/Mage.Sets/src/mage/cards/v/ValakutInvoker.java +++ b/Mage.Sets/src/mage/cards/v/ValakutInvoker.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -47,8 +48,8 @@ public class ValakutInvoker extends CardImpl { public ValakutInvoker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/ValakutPredator.java b/Mage.Sets/src/mage/cards/v/ValakutPredator.java index e2e773d97e..6e0fdb4e64 100644 --- a/Mage.Sets/src/mage/cards/v/ValakutPredator.java +++ b/Mage.Sets/src/mage/cards/v/ValakutPredator.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class ValakutPredator extends CardImpl { public ValakutPredator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/ValeronOutlander.java b/Mage.Sets/src/mage/cards/v/ValeronOutlander.java index 17c3f4032a..fa8b0857b2 100644 --- a/Mage.Sets/src/mage/cards/v/ValeronOutlander.java +++ b/Mage.Sets/src/mage/cards/v/ValeronOutlander.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class ValeronOutlander extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(2); this.addAbility(ProtectionAbility.from(ObjectColor.BLACK)); diff --git a/Mage.Sets/src/mage/cards/v/ValeronWardens.java b/Mage.Sets/src/mage/cards/v/ValeronWardens.java index 66b8b9ce30..dc6f811dc5 100644 --- a/Mage.Sets/src/mage/cards/v/ValeronWardens.java +++ b/Mage.Sets/src/mage/cards/v/ValeronWardens.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.RenownAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -49,8 +50,8 @@ public class ValeronWardens extends CardImpl { public ValeronWardens(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/ValiantGuard.java b/Mage.Sets/src/mage/cards/v/ValiantGuard.java index a59125e069..2001094d05 100644 --- a/Mage.Sets/src/mage/cards/v/ValiantGuard.java +++ b/Mage.Sets/src/mage/cards/v/ValiantGuard.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ValiantGuard extends CardImpl { public ValiantGuard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(0); this.toughness = new MageInt(3); } diff --git a/Mage.Sets/src/mage/cards/v/ValleyDasher.java b/Mage.Sets/src/mage/cards/v/ValleyDasher.java index 724723922f..fdb35bf12b 100644 --- a/Mage.Sets/src/mage/cards/v/ValleyDasher.java +++ b/Mage.Sets/src/mage/cards/v/ValleyDasher.java @@ -29,11 +29,12 @@ package mage.cards.v; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class ValleyDasher extends CardImpl { public ValleyDasher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -52,7 +53,7 @@ public class ValleyDasher extends CardImpl { // Haste this.addAbility(HasteAbility.getInstance()); // Valley Dasher attacks each turn if able - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); } public ValleyDasher(final ValleyDasher card) { diff --git a/Mage.Sets/src/mage/cards/v/ValleyRannet.java b/Mage.Sets/src/mage/cards/v/ValleyRannet.java index 32d0496275..2ad4f0be2c 100644 --- a/Mage.Sets/src/mage/cards/v/ValleyRannet.java +++ b/Mage.Sets/src/mage/cards/v/ValleyRannet.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MountaincyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class ValleyRannet extends CardImpl { public ValleyRannet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); diff --git a/Mage.Sets/src/mage/cards/v/Valleymaker.java b/Mage.Sets/src/mage/cards/v/Valleymaker.java index 6947b6180f..77c22e7c25 100644 --- a/Mage.Sets/src/mage/cards/v/Valleymaker.java +++ b/Mage.Sets/src/mage/cards/v/Valleymaker.java @@ -63,8 +63,8 @@ public class Valleymaker extends CardImpl { public Valleymaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R/G}"); - this.subtype.add("Giant"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/v/Valor.java b/Mage.Sets/src/mage/cards/v/Valor.java index 797b4f0421..95716d2b7c 100644 --- a/Mage.Sets/src/mage/cards/v/Valor.java +++ b/Mage.Sets/src/mage/cards/v/Valor.java @@ -63,7 +63,7 @@ public class Valor extends CardImpl { public Valor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Incarnation"); + this.subtype.add(SubType.INCARNATION); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VampireAristocrat.java b/Mage.Sets/src/mage/cards/v/VampireAristocrat.java index f43440bf24..337a7887fe 100644 --- a/Mage.Sets/src/mage/cards/v/VampireAristocrat.java +++ b/Mage.Sets/src/mage/cards/v/VampireAristocrat.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -50,8 +51,8 @@ public class VampireAristocrat extends CardImpl { public VampireAristocrat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VampireBats.java b/Mage.Sets/src/mage/cards/v/VampireBats.java index 5b5173faa2..61fde08c1a 100644 --- a/Mage.Sets/src/mage/cards/v/VampireBats.java +++ b/Mage.Sets/src/mage/cards/v/VampireBats.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class VampireBats extends CardImpl { public VampireBats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Bat"); + this.subtype.add(SubType.BAT); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VampireCutthroat.java b/Mage.Sets/src/mage/cards/v/VampireCutthroat.java index 2613d31827..a83227695c 100644 --- a/Mage.Sets/src/mage/cards/v/VampireCutthroat.java +++ b/Mage.Sets/src/mage/cards/v/VampireCutthroat.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.SkulkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class VampireCutthroat extends CardImpl { public VampireCutthroat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VampireEnvoy.java b/Mage.Sets/src/mage/cards/v/VampireEnvoy.java index fca69f4575..49c13a1062 100644 --- a/Mage.Sets/src/mage/cards/v/VampireEnvoy.java +++ b/Mage.Sets/src/mage/cards/v/VampireEnvoy.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,9 +45,9 @@ public class VampireEnvoy extends CardImpl { public VampireEnvoy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Cleric"); - this.subtype.add("Ally"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.ALLY); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/VampireHexmage.java b/Mage.Sets/src/mage/cards/v/VampireHexmage.java index 68e207c2e8..db0f6a2d06 100644 --- a/Mage.Sets/src/mage/cards/v/VampireHexmage.java +++ b/Mage.Sets/src/mage/cards/v/VampireHexmage.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.Counter; @@ -52,8 +53,8 @@ public class VampireHexmage extends CardImpl { public VampireHexmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VampireHounds.java b/Mage.Sets/src/mage/cards/v/VampireHounds.java index 3e90574c3f..4a65698a52 100644 --- a/Mage.Sets/src/mage/cards/v/VampireHounds.java +++ b/Mage.Sets/src/mage/cards/v/VampireHounds.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -48,8 +49,8 @@ public class VampireHounds extends CardImpl { public VampireHounds(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Hound"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.HOUND); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VampireInterloper.java b/Mage.Sets/src/mage/cards/v/VampireInterloper.java index 73942b0344..4aaf6d2cd8 100644 --- a/Mage.Sets/src/mage/cards/v/VampireInterloper.java +++ b/Mage.Sets/src/mage/cards/v/VampireInterloper.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author nantuko @@ -42,8 +43,8 @@ public class VampireInterloper extends CardImpl { public VampireInterloper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Scout"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VampireLacerator.java b/Mage.Sets/src/mage/cards/v/VampireLacerator.java index 821d1ad116..82cbb2295a 100644 --- a/Mage.Sets/src/mage/cards/v/VampireLacerator.java +++ b/Mage.Sets/src/mage/cards/v/VampireLacerator.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -47,8 +48,8 @@ public class VampireLacerator extends CardImpl { public VampireLacerator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VampireNighthawk.java b/Mage.Sets/src/mage/cards/v/VampireNighthawk.java index 30c063edf5..9a891f5aa1 100644 --- a/Mage.Sets/src/mage/cards/v/VampireNighthawk.java +++ b/Mage.Sets/src/mage/cards/v/VampireNighthawk.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class VampireNighthawk extends CardImpl { public VampireNighthawk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VampireNoble.java b/Mage.Sets/src/mage/cards/v/VampireNoble.java index f0afbac511..b3f410f11c 100644 --- a/Mage.Sets/src/mage/cards/v/VampireNoble.java +++ b/Mage.Sets/src/mage/cards/v/VampireNoble.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class VampireNoble extends CardImpl { public VampireNoble(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(3); this.toughness = new MageInt(2); } diff --git a/Mage.Sets/src/mage/cards/v/VampireNocturnus.java b/Mage.Sets/src/mage/cards/v/VampireNocturnus.java index 435f1eb3fe..87637e5fc5 100644 --- a/Mage.Sets/src/mage/cards/v/VampireNocturnus.java +++ b/Mage.Sets/src/mage/cards/v/VampireNocturnus.java @@ -60,7 +60,7 @@ public class VampireNocturnus extends CardImpl { public VampireNocturnus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VampireOutcasts.java b/Mage.Sets/src/mage/cards/v/VampireOutcasts.java index 9edaac2ec8..181c3c4f47 100644 --- a/Mage.Sets/src/mage/cards/v/VampireOutcasts.java +++ b/Mage.Sets/src/mage/cards/v/VampireOutcasts.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class VampireOutcasts extends CardImpl { public VampireOutcasts(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VampireWarlord.java b/Mage.Sets/src/mage/cards/v/VampireWarlord.java index 8eee32e2df..cf6edaa7f0 100644 --- a/Mage.Sets/src/mage/cards/v/VampireWarlord.java +++ b/Mage.Sets/src/mage/cards/v/VampireWarlord.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.common.TargetControlledCreaturePermanent; @@ -47,8 +48,8 @@ public class VampireWarlord extends CardImpl { public VampireWarlord(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VampiresZeal.java b/Mage.Sets/src/mage/cards/v/VampiresZeal.java new file mode 100644 index 0000000000..ce2e87c7ea --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VampiresZeal.java @@ -0,0 +1,69 @@ +/* + * 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.cards.v; + +import java.util.UUID; +import mage.abilities.condition.LockedInCondition; +import mage.abilities.condition.common.TargetHasSubtypeCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class VampiresZeal extends CardImpl { + + public VampiresZeal(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); + + // Target creature gets +2/+2 until end of turn. If it's a Vampire, it gains first strike until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new ConditionalContinuousEffect( + new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new LockedInCondition(new TargetHasSubtypeCondition(SubType.VAMPIRE)), + "If it's a Vampire, it gains first strike until end of turn")); + } + + public VampiresZeal(final VampiresZeal card) { + super(card); + } + + @Override + public VampiresZeal copy() { + return new VampiresZeal(this); + } +} diff --git a/Mage.Sets/src/mage/cards/v/VampiricDragon.java b/Mage.Sets/src/mage/cards/v/VampiricDragon.java index 5336e0c458..04e579369e 100644 --- a/Mage.Sets/src/mage/cards/v/VampiricDragon.java +++ b/Mage.Sets/src/mage/cards/v/VampiricDragon.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; @@ -51,8 +52,8 @@ public class VampiricDragon extends CardImpl { public VampiricDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{B}{R}"); - this.subtype.add("Vampire"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/v/VampiricEmbrace.java b/Mage.Sets/src/mage/cards/v/VampiricEmbrace.java index faa58d2e11..c1440a70a8 100644 --- a/Mage.Sets/src/mage/cards/v/VampiricEmbrace.java +++ b/Mage.Sets/src/mage/cards/v/VampiricEmbrace.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -56,7 +57,7 @@ public class VampiricEmbrace extends CardImpl { public VampiricEmbrace(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/v/VampiricLink.java b/Mage.Sets/src/mage/cards/v/VampiricLink.java index 0356e33f5d..d1e529c992 100644 --- a/Mage.Sets/src/mage/cards/v/VampiricLink.java +++ b/Mage.Sets/src/mage/cards/v/VampiricLink.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -50,7 +51,7 @@ public class VampiricLink extends CardImpl { public VampiricLink(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/v/VampiricSliver.java b/Mage.Sets/src/mage/cards/v/VampiricSliver.java index 5b7fb25cb7..9f46d9205d 100644 --- a/Mage.Sets/src/mage/cards/v/VampiricSliver.java +++ b/Mage.Sets/src/mage/cards/v/VampiricSliver.java @@ -57,7 +57,7 @@ public class VampiricSliver extends CardImpl { public VampiricSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VampiricSpirit.java b/Mage.Sets/src/mage/cards/v/VampiricSpirit.java index 1b5ccd4fcb..fb268c17b5 100644 --- a/Mage.Sets/src/mage/cards/v/VampiricSpirit.java +++ b/Mage.Sets/src/mage/cards/v/VampiricSpirit.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class VampiricSpirit extends CardImpl { public VampiricSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VancesBlastingCannons.java b/Mage.Sets/src/mage/cards/v/VancesBlastingCannons.java new file mode 100644 index 0000000000..ab69c1400b --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VancesBlastingCannons.java @@ -0,0 +1,194 @@ +/* + * 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.cards.v; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.TransformAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.s.SpitfireBastion; +import mage.constants.AsThoughEffectType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SuperType; +import mage.constants.TargetController; +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.targetpointer.FixedTarget; +import mage.watchers.common.CastSpellLastTurnWatcher; + +/** + * + * @author TheElk801 + */ +public class VancesBlastingCannons extends CardImpl { + + public VancesBlastingCannons(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}"); + + this.addSuperType(SuperType.LEGENDARY); + this.transformable = true; + this.secondSideCardClazz = SpitfireBastion.class; + + // At the beginning of your upkeep, exile the top card of your library. If it's a nonland card, you may cast that card this turn. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new VancesBlastingCannonsExileEffect(), TargetController.YOU, false)); + + // Whenever you cast your third spell in a turn, transform Vance's Blasting Cannons. + this.addAbility(new TransformAbility()); + this.addAbility(new VancesBlastingCannonsFlipTrigger(), new CastSpellLastTurnWatcher()); + } + + public VancesBlastingCannons(final VancesBlastingCannons card) { + super(card); + } + + @Override + public VancesBlastingCannons copy() { + return new VancesBlastingCannons(this); + } +} + +class VancesBlastingCannonsExileEffect extends OneShotEffect { + + public VancesBlastingCannonsExileEffect() { + super(Outcome.Benefit); + this.staticText = "exile the top card of your library. If it's a nonland card, you may cast that card this turn"; + } + + public VancesBlastingCannonsExileEffect(final VancesBlastingCannonsExileEffect effect) { + super(effect); + } + + @Override + public VancesBlastingCannonsExileEffect copy() { + return new VancesBlastingCannonsExileEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (controller != null && sourcePermanent != null) { + Card card = controller.getLibrary().getFromTop(game); + if (card != null) { + String exileName = sourcePermanent.getIdName() + (card.isLand() ? "" : "
Draw a card")); + } + + public VerdantRebirth(final VerdantRebirth card) { + super(card); + } + + @Override + public VerdantRebirth copy() { + return new VerdantRebirth(this); + } +} diff --git a/Mage.Sets/src/mage/cards/v/VerdantSunsAvatar.java b/Mage.Sets/src/mage/cards/v/VerdantSunsAvatar.java index 480888b4a0..c930ee1887 100644 --- a/Mage.Sets/src/mage/cards/v/VerdantSunsAvatar.java +++ b/Mage.Sets/src/mage/cards/v/VerdantSunsAvatar.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -51,14 +52,14 @@ import mage.players.Player; public class VerdantSunsAvatar extends CardImpl { public VerdantSunsAvatar(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); - this.subtype.add("Dinosaur"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.DINOSAUR); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(5); this.toughness = new MageInt(5); - // When Verdant Sun's Avatar or another creature enters the battlefield under your control, you gain life equal to that creature's toughness. + // Whenever Verdant Sun's Avatar or another creature enters the battlefield under your control, you gain life equal to that creature's toughness. this.addAbility(new VerdantSunsAvatarTriggeredAbility()); } @@ -90,7 +91,7 @@ class VerdantSunsAvatarTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent.isCreature() + if (permanent != null && permanent.isCreature() && permanent.getControllerId().equals(this.controllerId)) { Effect effect = this.getEffects().get(0); // Life is determined during resolution so it has to be retrieved there (e.g. Giant Growth before resolution) @@ -103,7 +104,7 @@ class VerdantSunsAvatarTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "When {this} or another creature enters the battlefield under your control, " + super.getRule(); + return "Whenever {this} or another creature enters the battlefield under your control, " + super.getRule(); } @Override diff --git a/Mage.Sets/src/mage/cards/v/VerdelothTheAncient.java b/Mage.Sets/src/mage/cards/v/VerdelothTheAncient.java index 753fd14926..2f6f4557ba 100644 --- a/Mage.Sets/src/mage/cards/v/VerdelothTheAncient.java +++ b/Mage.Sets/src/mage/cards/v/VerdelothTheAncient.java @@ -59,7 +59,7 @@ public class VerdelothTheAncient extends CardImpl { public VerdelothTheAncient(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(4); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/v/VerduranEmissary.java b/Mage.Sets/src/mage/cards/v/VerduranEmissary.java index 097daf2cc5..e4a7f77faf 100644 --- a/Mage.Sets/src/mage/cards/v/VerduranEmissary.java +++ b/Mage.Sets/src/mage/cards/v/VerduranEmissary.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetArtifactPermanent; /** @@ -48,8 +49,8 @@ public class VerduranEmissary extends CardImpl { public VerduranEmissary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VerduranEnchantress.java b/Mage.Sets/src/mage/cards/v/VerduranEnchantress.java index 3ab052b2fd..d59235b557 100644 --- a/Mage.Sets/src/mage/cards/v/VerduranEnchantress.java +++ b/Mage.Sets/src/mage/cards/v/VerduranEnchantress.java @@ -27,23 +27,25 @@ */ package mage.cards.v; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.CardTypePredicate; +import java.util.UUID; + /** * * @author Plopman */ public class VerduranEnchantress extends CardImpl { - private static final FilterSpell filter = new FilterSpell("an Enchantment spell"); + private static final FilterSpell filter = new FilterSpell("an enchantment spell"); static { filter.add(new CardTypePredicate(CardType.ENCHANTMENT)); @@ -51,8 +53,8 @@ public class VerduranEnchantress extends CardImpl { public VerduranEnchantress(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VerdurousGearhulk.java b/Mage.Sets/src/mage/cards/v/VerdurousGearhulk.java index 211834eeb1..fb81321c40 100644 --- a/Mage.Sets/src/mage/cards/v/VerdurousGearhulk.java +++ b/Mage.Sets/src/mage/cards/v/VerdurousGearhulk.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -56,7 +57,7 @@ public class VerdurousGearhulk extends CardImpl { public VerdurousGearhulk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/Vermiculos.java b/Mage.Sets/src/mage/cards/v/Vermiculos.java index 3ec89cb066..f1986bf9c0 100644 --- a/Mage.Sets/src/mage/cards/v/Vermiculos.java +++ b/Mage.Sets/src/mage/cards/v/Vermiculos.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class Vermiculos extends CardImpl { public Vermiculos(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VertigoSpawn.java b/Mage.Sets/src/mage/cards/v/VertigoSpawn.java index e2f2a731d7..7ddd251a3c 100644 --- a/Mage.Sets/src/mage/cards/v/VertigoSpawn.java +++ b/Mage.Sets/src/mage/cards/v/VertigoSpawn.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class VertigoSpawn extends CardImpl { public VertigoSpawn(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VesperGhoul.java b/Mage.Sets/src/mage/cards/v/VesperGhoul.java index 21fb406ca1..08174f2d52 100644 --- a/Mage.Sets/src/mage/cards/v/VesperGhoul.java +++ b/Mage.Sets/src/mage/cards/v/VesperGhoul.java @@ -37,6 +37,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class VesperGhoul extends CardImpl { public VesperGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VestigeOfEmrakul.java b/Mage.Sets/src/mage/cards/v/VestigeOfEmrakul.java index da3aa11d9a..e0c218810e 100644 --- a/Mage.Sets/src/mage/cards/v/VestigeOfEmrakul.java +++ b/Mage.Sets/src/mage/cards/v/VestigeOfEmrakul.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class VestigeOfEmrakul extends CardImpl { public VestigeOfEmrakul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/VesuvanDoppelganger.java b/Mage.Sets/src/mage/cards/v/VesuvanDoppelganger.java index 49adeaeb51..151db143ea 100644 --- a/Mage.Sets/src/mage/cards/v/VesuvanDoppelganger.java +++ b/Mage.Sets/src/mage/cards/v/VesuvanDoppelganger.java @@ -38,6 +38,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class VesuvanDoppelganger extends CardImpl { public VesuvanDoppelganger(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java b/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java index da8198b4e0..87525a45d8 100644 --- a/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java +++ b/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java @@ -44,6 +44,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -67,13 +68,10 @@ public class VesuvanShapeshifter extends CardImpl { public VesuvanShapeshifter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(0); - // Morph {1}{U} - this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{U}"))); - // As Vesuvan Shapeshifter turned face up, may choose another creature. If you do, until Vesuvan Shapeshifter is turned face down, it becomes a copy of that creature Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new AsTurnedFaceUpEffect(new VesuvanShapeshifterEffect(), false)); ability.setWorksFaceDown(true); @@ -90,6 +88,9 @@ public class VesuvanShapeshifter extends CardImpl { effect = new VesuvanShapeshifterFaceDownEffect(); ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, true); this.addAbility(ability); + + // Morph {1}{U} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{U}"))); } public VesuvanShapeshifter(final VesuvanShapeshifter card) { diff --git a/Mage.Sets/src/mage/cards/v/VeteranArmorer.java b/Mage.Sets/src/mage/cards/v/VeteranArmorer.java index af4135a517..68ee7ccb0d 100644 --- a/Mage.Sets/src/mage/cards/v/VeteranArmorer.java +++ b/Mage.Sets/src/mage/cards/v/VeteranArmorer.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -45,8 +46,8 @@ public class VeteranArmorer extends CardImpl { public VeteranArmorer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VeteranArmorsmith.java b/Mage.Sets/src/mage/cards/v/VeteranArmorsmith.java index a7e645f82c..025933b8bb 100644 --- a/Mage.Sets/src/mage/cards/v/VeteranArmorsmith.java +++ b/Mage.Sets/src/mage/cards/v/VeteranArmorsmith.java @@ -54,8 +54,8 @@ public class VeteranArmorsmith extends CardImpl { public VeteranArmorsmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VeteranBodyguard.java b/Mage.Sets/src/mage/cards/v/VeteranBodyguard.java index 0762401d3a..8a4f5adac3 100644 --- a/Mage.Sets/src/mage/cards/v/VeteranBodyguard.java +++ b/Mage.Sets/src/mage/cards/v/VeteranBodyguard.java @@ -38,6 +38,7 @@ import mage.abilities.effects.ReplacementEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class VeteranBodyguard extends CardImpl { public VeteranBodyguard(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/v/VeteranCathar.java b/Mage.Sets/src/mage/cards/v/VeteranCathar.java index dbe95b0077..0f1915af56 100644 --- a/Mage.Sets/src/mage/cards/v/VeteranCathar.java +++ b/Mage.Sets/src/mage/cards/v/VeteranCathar.java @@ -51,8 +51,8 @@ public class VeteranCathar extends CardImpl { public VeteranCathar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VeteranCavalier.java b/Mage.Sets/src/mage/cards/v/VeteranCavalier.java index 3fb8bde20b..81e77e3086 100644 --- a/Mage.Sets/src/mage/cards/v/VeteranCavalier.java +++ b/Mage.Sets/src/mage/cards/v/VeteranCavalier.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class VeteranCavalier extends CardImpl { public VeteranCavalier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VeteranExplorer.java b/Mage.Sets/src/mage/cards/v/VeteranExplorer.java index b6f30d6be4..566a4c9c88 100644 --- a/Mage.Sets/src/mage/cards/v/VeteranExplorer.java +++ b/Mage.Sets/src/mage/cards/v/VeteranExplorer.java @@ -38,6 +38,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -53,9 +54,9 @@ public class VeteranExplorer extends CardImpl { public VeteranExplorer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VeteranMotorist.java b/Mage.Sets/src/mage/cards/v/VeteranMotorist.java index 2f5cc2275b..c543c33a24 100644 --- a/Mage.Sets/src/mage/cards/v/VeteranMotorist.java +++ b/Mage.Sets/src/mage/cards/v/VeteranMotorist.java @@ -37,6 +37,7 @@ import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -47,8 +48,8 @@ public class VeteranMotorist extends CardImpl { public VeteranMotorist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{W}"); - this.subtype.add("Dwarf"); - this.subtype.add("Pilot"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.PILOT); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VeteranOfTheDepths.java b/Mage.Sets/src/mage/cards/v/VeteranOfTheDepths.java index 542a68de7e..6fb2919160 100644 --- a/Mage.Sets/src/mage/cards/v/VeteranOfTheDepths.java +++ b/Mage.Sets/src/mage/cards/v/VeteranOfTheDepths.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,8 +46,8 @@ public class VeteranOfTheDepths extends CardImpl { public VeteranOfTheDepths(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Merfolk"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VeteranSwordsmith.java b/Mage.Sets/src/mage/cards/v/VeteranSwordsmith.java index eb3228c024..a5a503bea0 100644 --- a/Mage.Sets/src/mage/cards/v/VeteranSwordsmith.java +++ b/Mage.Sets/src/mage/cards/v/VeteranSwordsmith.java @@ -53,8 +53,8 @@ public class VeteranSwordsmith extends CardImpl { public VeteranSwordsmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VeteranWarleader.java b/Mage.Sets/src/mage/cards/v/VeteranWarleader.java index 70f55a19fd..1bddfe44a9 100644 --- a/Mage.Sets/src/mage/cards/v/VeteranWarleader.java +++ b/Mage.Sets/src/mage/cards/v/VeteranWarleader.java @@ -71,9 +71,9 @@ public class VeteranWarleader extends CardImpl { public VeteranWarleader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ALLY); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/v/VeteransArmaments.java b/Mage.Sets/src/mage/cards/v/VeteransArmaments.java index b8f605da7a..f25e19013d 100644 --- a/Mage.Sets/src/mage/cards/v/VeteransArmaments.java +++ b/Mage.Sets/src/mage/cards/v/VeteransArmaments.java @@ -60,8 +60,8 @@ public class VeteransArmaments extends CardImpl { public VeteransArmaments(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.ARTIFACT},"{2}"); - this.subtype.add("Soldier"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has "Whenever this creature attacks or blocks, it gets +1/+1 until end of turn for each attacking creature." DynamicValue attackingCreatures = new AttackingCreatureCount("attacking creature"); diff --git a/Mage.Sets/src/mage/cards/v/VeteransSidearm.java b/Mage.Sets/src/mage/cards/v/VeteransSidearm.java index 91f114567b..1e890b8e1f 100644 --- a/Mage.Sets/src/mage/cards/v/VeteransSidearm.java +++ b/Mage.Sets/src/mage/cards/v/VeteransSidearm.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class VeteransSidearm extends CardImpl { public VeteransSidearm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); diff --git a/Mage.Sets/src/mage/cards/v/Vex.java b/Mage.Sets/src/mage/cards/v/Vex.java index 633ff38156..96b014a290 100644 --- a/Mage.Sets/src/mage/cards/v/Vex.java +++ b/Mage.Sets/src/mage/cards/v/Vex.java @@ -1,98 +1,98 @@ -/* - * 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.cards.v; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.game.Game; -import mage.players.Player; -import mage.target.TargetSpell; - -/** - * - * @author wetterlicht - */ -public class Vex extends CardImpl { - - public Vex(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}"); - - // Counter target spell. That spell's controller may draw a card. - getSpellAbility().addTarget(new TargetSpell()); - getSpellAbility().addEffect(new VexEffect()); - } - - public Vex(final Vex card) { - super(card); - } - - @Override - public Vex copy() { - return new Vex(this); - } -} - -class VexEffect extends OneShotEffect { - - public VexEffect() { - super(Outcome.Neutral); - this.staticText = "That spell's controller may draw a card"; - } - - public VexEffect(final VexEffect effect) { - super(effect); - } - - @Override - public VexEffect copy() { - return new VexEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - UUID targetId = source.getFirstTarget(); - Player controller = null; - boolean countered = false; - if (targetId != null) { - controller = game.getPlayer(game.getControllerId(targetId)); - } - if (targetId != null - && game.getStack().counter(targetId, source.getSourceId(), game)) { - countered = true; - } - if (controller != null) { - controller.drawCards(1, game); - } - return countered; - } -} +/* + * 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.cards.v; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetSpell; + +/** + * + * @author wetterlicht + */ +public class Vex extends CardImpl { + + public Vex(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}"); + + // Counter target spell. That spell's controller may draw a card. + getSpellAbility().addTarget(new TargetSpell()); + getSpellAbility().addEffect(new VexEffect()); + } + + public Vex(final Vex card) { + super(card); + } + + @Override + public Vex copy() { + return new Vex(this); + } +} + +class VexEffect extends OneShotEffect { + + public VexEffect() { + super(Outcome.Neutral); + this.staticText = "That spell's controller may draw a card"; + } + + public VexEffect(final VexEffect effect) { + super(effect); + } + + @Override + public VexEffect copy() { + return new VexEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + UUID targetId = source.getFirstTarget(); + Player controller = null; + boolean countered = false; + if (targetId != null) { + controller = game.getPlayer(game.getControllerId(targetId)); + } + if (targetId != null + && game.getStack().counter(targetId, source.getSourceId(), game)) { + countered = true; + } + if (controller != null) { + controller.drawCards(1, game); + } + return countered; + } +} diff --git a/Mage.Sets/src/mage/cards/v/VexingBeetle.java b/Mage.Sets/src/mage/cards/v/VexingBeetle.java new file mode 100644 index 0000000000..7e06626eeb --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VexingBeetle.java @@ -0,0 +1,86 @@ +/* + * 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.cards.v; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.InvertCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.CantBeCounteredSourceEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author TheElk801 + */ +public class VexingBeetle extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public VexingBeetle(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); + + this.subtype.add(SubType.INSECT); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Vexing Beetle can't be countered. + this.addAbility(new SimpleStaticAbility(Zone.STACK, new CantBeCounteredSourceEffect())); + + // Vexing Beetle gets +3/+3 as long as no opponent controls a creature. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostSourceEffect(3, 3, Duration.WhileOnBattlefield), + new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)), + "{this} gets +3/+3 as long as no opponent controls a creature") + )); + } + + public VexingBeetle(final VexingBeetle card) { + super(card); + } + + @Override + public VexingBeetle copy() { + return new VexingBeetle(this); + } +} diff --git a/Mage.Sets/src/mage/cards/v/VexingDevil.java b/Mage.Sets/src/mage/cards/v/VexingDevil.java index d7811dfbbd..a8d8eecf1e 100644 --- a/Mage.Sets/src/mage/cards/v/VexingDevil.java +++ b/Mage.Sets/src/mage/cards/v/VexingDevil.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -49,7 +50,7 @@ public class VexingDevil extends CardImpl { public VexingDevil(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Devil"); + this.subtype.add(SubType.DEVIL); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VexingScuttler.java b/Mage.Sets/src/mage/cards/v/VexingScuttler.java index d19afc87fc..70e203bd6e 100644 --- a/Mage.Sets/src/mage/cards/v/VexingScuttler.java +++ b/Mage.Sets/src/mage/cards/v/VexingScuttler.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EmergeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -59,8 +60,8 @@ public class VexingScuttler extends CardImpl { public VexingScuttler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{8}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Crab"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.CRAB); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/v/VexingShusher.java b/Mage.Sets/src/mage/cards/v/VexingShusher.java index faf0fcf292..80553a4fde 100644 --- a/Mage.Sets/src/mage/cards/v/VexingShusher.java +++ b/Mage.Sets/src/mage/cards/v/VexingShusher.java @@ -38,6 +38,7 @@ import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class VexingShusher extends CardImpl { public VexingShusher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R/G}{R/G}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VexingSphinx.java b/Mage.Sets/src/mage/cards/v/VexingSphinx.java index 6aa1e64e1b..d5908b2b31 100644 --- a/Mage.Sets/src/mage/cards/v/VexingSphinx.java +++ b/Mage.Sets/src/mage/cards/v/VexingSphinx.java @@ -30,7 +30,7 @@ package mage.cards.v; import java.util.UUID; import mage.MageInt; import mage.abilities.common.DiesTriggeredAbility; -import mage.abilities.costs.common.DiscardTargetCost; +import mage.abilities.costs.common.DiscardCardCost; import mage.abilities.keyword.FlyingAbility; import mage.abilities.dynamicvalue.common.CountersSourceCount; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -38,8 +38,8 @@ import mage.abilities.keyword.CumulativeUpkeepAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; -import mage.target.common.TargetCardInHand; /** * @@ -50,7 +50,7 @@ public class VexingSphinx extends CardImpl { public VexingSphinx(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -58,7 +58,7 @@ public class VexingSphinx extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Cumulative upkeep-Discard a card. - this.addAbility(new CumulativeUpkeepAbility(new DiscardTargetCost(new TargetCardInHand()))); + this.addAbility(new CumulativeUpkeepAbility(new DiscardCardCost())); // When Vexing Sphinx dies, draw a card for each age counter on it. this.addAbility(new DiesTriggeredAbility(new DrawCardSourceControllerEffect(new CountersSourceCount(CounterType.AGE)))); diff --git a/Mage.Sets/src/mage/cards/v/VhatiIlDal.java b/Mage.Sets/src/mage/cards/v/VhatiIlDal.java index 1b05f76ac4..e525a692cb 100644 --- a/Mage.Sets/src/mage/cards/v/VhatiIlDal.java +++ b/Mage.Sets/src/mage/cards/v/VhatiIlDal.java @@ -53,8 +53,8 @@ public class VhatiIlDal extends CardImpl { public VhatiIlDal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java b/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java index ae3db87d3e..1519c59b8b 100644 --- a/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java +++ b/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.PartnerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.game.Game; @@ -59,8 +60,8 @@ public class VialSmasherTheFierce extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Goblin"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoBladescout.java b/Mage.Sets/src/mage/cards/v/ViashinoBladescout.java index ebff151d76..e797ab70f5 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoBladescout.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoBladescout.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class ViashinoBladescout extends CardImpl { public ViashinoBladescout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Viashino"); - this.subtype.add("Scout"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoCutthroat.java b/Mage.Sets/src/mage/cards/v/ViashinoCutthroat.java index 26b5561313..aebb8dec62 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoCutthroat.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoCutthroat.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -45,7 +46,7 @@ public class ViashinoCutthroat extends CardImpl { public ViashinoCutthroat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Viashino"); + this.subtype.add(SubType.VIASHINO); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoFangtail.java b/Mage.Sets/src/mage/cards/v/ViashinoFangtail.java index 109752488a..5ef4ad3e26 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoFangtail.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoFangtail.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -47,8 +48,8 @@ public class ViashinoFangtail extends CardImpl { public ViashinoFangtail(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Viashino"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoFirstblade.java b/Mage.Sets/src/mage/cards/v/ViashinoFirstblade.java index 051989e2d2..bbbc0d0583 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoFirstblade.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoFirstblade.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class ViashinoFirstblade extends CardImpl { public ViashinoFirstblade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{W}"); - this.subtype.add("Viashino"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoGrappler.java b/Mage.Sets/src/mage/cards/v/ViashinoGrappler.java index 4eb89889fb..7559d77393 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoGrappler.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoGrappler.java @@ -45,7 +45,7 @@ public class ViashinoGrappler extends CardImpl { public ViashinoGrappler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Viashino"); + this.subtype.add(SubType.VIASHINO); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoHeretic.java b/Mage.Sets/src/mage/cards/v/ViashinoHeretic.java index 11b450672d..aeb6feef27 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoHeretic.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoHeretic.java @@ -38,6 +38,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -53,7 +54,7 @@ public class ViashinoHeretic extends CardImpl { public ViashinoHeretic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Viashino"); + this.subtype.add(SubType.VIASHINO); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoOutrider.java b/Mage.Sets/src/mage/cards/v/ViashinoOutrider.java index 5c20ff828d..4698b591e1 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoOutrider.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoOutrider.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class ViashinoOutrider extends CardImpl { public ViashinoOutrider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Viashino"); + this.subtype.add(SubType.VIASHINO); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoRacketeer.java b/Mage.Sets/src/mage/cards/v/ViashinoRacketeer.java index 08a082e16d..83b9fe81df 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoRacketeer.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoRacketeer.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class ViashinoRacketeer extends CardImpl { public ViashinoRacketeer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Viashino"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoRunner.java b/Mage.Sets/src/mage/cards/v/ViashinoRunner.java index 3aecac166d..82d43889c5 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoRunner.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoRunner.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class ViashinoRunner extends CardImpl { public ViashinoRunner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Viashino"); + this.subtype.add(SubType.VIASHINO); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoSandscout.java b/Mage.Sets/src/mage/cards/v/ViashinoSandscout.java index 975456f79b..d20d16bbfa 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoSandscout.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoSandscout.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -45,8 +46,8 @@ public class ViashinoSandscout extends CardImpl { public ViashinoSandscout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Viashino"); - this.subtype.add("Scout"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoSandstalker.java b/Mage.Sets/src/mage/cards/v/ViashinoSandstalker.java index e28c02eb47..10e43f6490 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoSandstalker.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoSandstalker.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -46,8 +47,8 @@ public class ViashinoSandstalker extends CardImpl { public ViashinoSandstalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Viashino"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoSandswimmer.java b/Mage.Sets/src/mage/cards/v/ViashinoSandswimmer.java index d6f936790c..0332111356 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoSandswimmer.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoSandswimmer.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -52,7 +53,7 @@ public class ViashinoSandswimmer extends CardImpl { public ViashinoSandswimmer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Viashino"); + this.subtype.add(SubType.VIASHINO); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoShanktail.java b/Mage.Sets/src/mage/cards/v/ViashinoShanktail.java index b9432b3ded..5673b91d73 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoShanktail.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoShanktail.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -47,8 +48,8 @@ public class ViashinoShanktail extends CardImpl { public ViashinoShanktail(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Viashino"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoSkeleton.java b/Mage.Sets/src/mage/cards/v/ViashinoSkeleton.java index a625dc6c1a..a319ed74da 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoSkeleton.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoSkeleton.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCardInHand; @@ -48,8 +49,8 @@ public class ViashinoSkeleton extends CardImpl { public ViashinoSkeleton(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Viashino"); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.SKELETON); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoSlasher.java b/Mage.Sets/src/mage/cards/v/ViashinoSlasher.java index 9c0732041a..d5ef31406e 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoSlasher.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoSlasher.java @@ -44,8 +44,8 @@ public class ViashinoSlasher extends CardImpl { public ViashinoSlasher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Viashino"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoSlaughtermaster.java b/Mage.Sets/src/mage/cards/v/ViashinoSlaughtermaster.java index 5c0bdb3a62..e687dd0770 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoSlaughtermaster.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoSlaughtermaster.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class ViashinoSlaughtermaster extends CardImpl { public ViashinoSlaughtermaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Viashino"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoSpearhunter.java b/Mage.Sets/src/mage/cards/v/ViashinoSpearhunter.java index c9a4d5b189..84451be110 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoSpearhunter.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoSpearhunter.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class ViashinoSpearhunter extends CardImpl { public ViashinoSpearhunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Viashino"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoWarrior.java b/Mage.Sets/src/mage/cards/v/ViashinoWarrior.java index c5b501848b..0662cfee83 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoWarrior.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoWarrior.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class ViashinoWarrior extends CardImpl { public ViashinoWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Viashino"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoWeaponsmith.java b/Mage.Sets/src/mage/cards/v/ViashinoWeaponsmith.java index f59470291e..b91a2a9629 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoWeaponsmith.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoWeaponsmith.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,7 +45,7 @@ public class ViashinoWeaponsmith extends CardImpl { public ViashinoWeaponsmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Viashino"); + this.subtype.add(SubType.VIASHINO); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/ViashivanDragon.java b/Mage.Sets/src/mage/cards/v/ViashivanDragon.java index 8bef70b19f..5e47c7e38c 100644 --- a/Mage.Sets/src/mage/cards/v/ViashivanDragon.java +++ b/Mage.Sets/src/mage/cards/v/ViashivanDragon.java @@ -9,6 +9,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -17,7 +18,7 @@ public class ViashivanDragon extends CardImpl { public ViashivanDragon(UUID cardId, CardSetInfo cardSetInfo) { super(cardId, cardSetInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}{G}{G}"); - subtype.add("Dragon"); + subtype.add(SubType.DRAGON); color.setGreen(true); color.setRed(true); power = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/ViciousConquistador.java b/Mage.Sets/src/mage/cards/v/ViciousConquistador.java new file mode 100644 index 0000000000..b36978c54d --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/ViciousConquistador.java @@ -0,0 +1,65 @@ +/* + * 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.cards.v; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class ViciousConquistador extends CardImpl { + + public ViciousConquistador(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Whenever Vicious Conquistador attacks, each opponent loses 1 life. + this.addAbility(new AttacksTriggeredAbility(new LoseLifeOpponentsEffect(1), false)); + } + + public ViciousConquistador(final ViciousConquistador card) { + super(card); + } + + @Override + public ViciousConquistador copy() { + return new ViciousConquistador(this); + } +} diff --git a/Mage.Sets/src/mage/cards/v/ViciousKavu.java b/Mage.Sets/src/mage/cards/v/ViciousKavu.java index edd15d45c0..cea78da2bb 100644 --- a/Mage.Sets/src/mage/cards/v/ViciousKavu.java +++ b/Mage.Sets/src/mage/cards/v/ViciousKavu.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,7 +46,7 @@ public class ViciousKavu extends CardImpl { public ViciousKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VictorysHerald.java b/Mage.Sets/src/mage/cards/v/VictorysHerald.java index be4cad83f2..64a99f66a1 100644 --- a/Mage.Sets/src/mage/cards/v/VictorysHerald.java +++ b/Mage.Sets/src/mage/cards/v/VictorysHerald.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterAttackingCreature; @@ -49,7 +50,7 @@ public class VictorysHerald extends CardImpl { public VictorysHerald (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/VictualSliver.java b/Mage.Sets/src/mage/cards/v/VictualSliver.java index b0222e70c5..99b060805a 100644 --- a/Mage.Sets/src/mage/cards/v/VictualSliver.java +++ b/Mage.Sets/src/mage/cards/v/VictualSliver.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.GainAbilityAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -51,7 +52,7 @@ public class VictualSliver extends CardImpl { public VictualSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{W}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VigeanGraftmage.java b/Mage.Sets/src/mage/cards/v/VigeanGraftmage.java index 7e66136bd2..f4739ed508 100644 --- a/Mage.Sets/src/mage/cards/v/VigeanGraftmage.java +++ b/Mage.Sets/src/mage/cards/v/VigeanGraftmage.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.GraftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -56,9 +57,9 @@ public class VigeanGraftmage extends CardImpl { public VigeanGraftmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Vedalken"); - this.subtype.add("Wizard"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.WIZARD); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/v/VigeanHydropon.java b/Mage.Sets/src/mage/cards/v/VigeanHydropon.java index 561d97c3da..760970ee52 100644 --- a/Mage.Sets/src/mage/cards/v/VigeanHydropon.java +++ b/Mage.Sets/src/mage/cards/v/VigeanHydropon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.GraftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -49,8 +50,8 @@ public class VigeanHydropon extends CardImpl { public VigeanHydropon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{U}"); - this.subtype.add("Plant"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/v/Vigilance.java b/Mage.Sets/src/mage/cards/v/Vigilance.java index c4e7cf1556..02e37441be 100644 --- a/Mage.Sets/src/mage/cards/v/Vigilance.java +++ b/Mage.Sets/src/mage/cards/v/Vigilance.java @@ -47,7 +47,7 @@ public class Vigilance extends CardImpl { public Vigilance (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/cards/v/VigilantDrake.java b/Mage.Sets/src/mage/cards/v/VigilantDrake.java index 1892f74c9d..92e4ec0974 100644 --- a/Mage.Sets/src/mage/cards/v/VigilantDrake.java +++ b/Mage.Sets/src/mage/cards/v/VigilantDrake.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class VigilantDrake extends CardImpl { public VigilantDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VigilantMartyr.java b/Mage.Sets/src/mage/cards/v/VigilantMartyr.java index e6d6f3d5b0..027f1e3f38 100644 --- a/Mage.Sets/src/mage/cards/v/VigilantMartyr.java +++ b/Mage.Sets/src/mage/cards/v/VigilantMartyr.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.RegenerateTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.StaticFilters; @@ -61,8 +62,8 @@ public class VigilantMartyr extends CardImpl { public VigilantMartyr(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VigilantSentry.java b/Mage.Sets/src/mage/cards/v/VigilantSentry.java index d918fb3dc8..32570ceb13 100644 --- a/Mage.Sets/src/mage/cards/v/VigilantSentry.java +++ b/Mage.Sets/src/mage/cards/v/VigilantSentry.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetAttackingOrBlockingCreature; @@ -54,8 +55,8 @@ public class VigilantSentry extends CardImpl { public VigilantSentry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/Vigor.java b/Mage.Sets/src/mage/cards/v/Vigor.java index e523da56ca..c39c680c6a 100644 --- a/Mage.Sets/src/mage/cards/v/Vigor.java +++ b/Mage.Sets/src/mage/cards/v/Vigor.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,8 +55,8 @@ public class Vigor extends CardImpl { public Vigor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}{G}"); - this.subtype.add("Elemental"); - this.subtype.add("Incarnation"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.INCARNATION); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/v/VildinPackAlpha.java b/Mage.Sets/src/mage/cards/v/VildinPackAlpha.java index 9ad08bebfd..7daece3264 100644 --- a/Mage.Sets/src/mage/cards/v/VildinPackAlpha.java +++ b/Mage.Sets/src/mage/cards/v/VildinPackAlpha.java @@ -54,7 +54,7 @@ public class VildinPackAlpha extends CardImpl { public VildinPackAlpha(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(4); this.toughness = new MageInt(3); this.color.setRed(true); diff --git a/Mage.Sets/src/mage/cards/v/VildinPackOutcast.java b/Mage.Sets/src/mage/cards/v/VildinPackOutcast.java index 560605a5ff..2f1aab511e 100644 --- a/Mage.Sets/src/mage/cards/v/VildinPackOutcast.java +++ b/Mage.Sets/src/mage/cards/v/VildinPackOutcast.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.d.DronepackKindred; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,8 +51,8 @@ public class VildinPackOutcast extends CardImpl { public VildinPackOutcast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Werewolf"); - this.subtype.add("Horror"); + this.subtype.add(SubType.WEREWOLF); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/VileAggregate.java b/Mage.Sets/src/mage/cards/v/VileAggregate.java index 48e3d10445..0c88cc3691 100644 --- a/Mage.Sets/src/mage/cards/v/VileAggregate.java +++ b/Mage.Sets/src/mage/cards/v/VileAggregate.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -58,8 +59,8 @@ public class VileAggregate extends CardImpl { public VileAggregate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/v/VileDeacon.java b/Mage.Sets/src/mage/cards/v/VileDeacon.java index 2af177f601..cbb1465f04 100644 --- a/Mage.Sets/src/mage/cards/v/VileDeacon.java +++ b/Mage.Sets/src/mage/cards/v/VileDeacon.java @@ -55,8 +55,8 @@ public class VileDeacon extends CardImpl { public VileDeacon(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VileManifestation.java b/Mage.Sets/src/mage/cards/v/VileManifestation.java index 56ef49b6f2..ae43afe3bf 100644 --- a/Mage.Sets/src/mage/cards/v/VileManifestation.java +++ b/Mage.Sets/src/mage/cards/v/VileManifestation.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterCard; @@ -60,7 +61,7 @@ public class VileManifestation extends CardImpl { public VileManifestation(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/VileRedeemer.java b/Mage.Sets/src/mage/cards/v/VileRedeemer.java index 505f892013..5f18a05263 100644 --- a/Mage.Sets/src/mage/cards/v/VileRedeemer.java +++ b/Mage.Sets/src/mage/cards/v/VileRedeemer.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.WatcherScope; import mage.game.Game; @@ -60,7 +61,7 @@ public class VileRedeemer extends CardImpl { public VileRedeemer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VileRequiem.java b/Mage.Sets/src/mage/cards/v/VileRequiem.java index f32b7afec0..4573f230b6 100644 --- a/Mage.Sets/src/mage/cards/v/VileRequiem.java +++ b/Mage.Sets/src/mage/cards/v/VileRequiem.java @@ -40,16 +40,15 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.TargetAdjustment; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ColorPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.target.common.TargetCreaturePermanent; -import mage.util.CardUtil; +import mage.target.TargetPermanent; /** * @@ -57,48 +56,33 @@ import mage.util.CardUtil; */ public class VileRequiem extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("up to X target nonblack creatures, where X is the number of verse counters on {this}"); + private static final FilterPermanent filter = new FilterPermanent("up to X target nonblack creatures, where X is the number of verse counters on {this}"); + static { filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + filter.add(new CardTypePredicate(CardType.CREATURE)); } - private final UUID originalId; public VileRequiem(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}{B}"); - - this.color.setBlack(true); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{B}"); // At the beginning of your upkeep, you may put a verse counter on Vile Requiem. this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, - new AddCountersSourceEffect(CounterType.VERSE.createInstance(), true ), TargetController.YOU, true)); + new AddCountersSourceEffect(CounterType.VERSE.createInstance(), true), TargetController.YOU, true)); + // {1}{B}, Sacrifice Vile Requiem: Destroy up to X target nonblack creatures, where X is the number of verse counters on Vile Requiem. They can't be regenerated. Effect effect = new DestroyTargetEffect(true); effect.setText("Destroy up to X target nonblack creatures, where X is the number of verse counters on {this}. They can't be regenerated"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{B}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreaturePermanent(0,0,filter, false)); + ability.addTarget(new TargetPermanent(0, 0, filter, false)); + ability.setTargetAdjustment(TargetAdjustment.VERSE_COUNTER_TARGETS); this.addAbility(ability); - originalId = ability.getOriginalId(); } - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(originalId)) { - Permanent sourcePermanent = game.getPermanent(ability.getSourceId()); - if (sourcePermanent != null) { - int numberCounters = sourcePermanent.getCounters(game).getCount(CounterType.VERSE); - ability.getTargets().clear(); - FilterCreaturePermanent newFilter = filter.copy(); - newFilter.setMessage(new StringBuilder("up to ").append(CardUtil.numberToText(numberCounters)).append(" target nonblack creatures").toString()); - ability.addTarget(new TargetCreaturePermanent(0,numberCounters,newFilter, false)); - } - } - } - public VileRequiem(final VileRequiem card) { super(card); - this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/cards/v/VillageBellRinger.java b/Mage.Sets/src/mage/cards/v/VillageBellRinger.java index 251d1dba43..41c4e86ea3 100644 --- a/Mage.Sets/src/mage/cards/v/VillageBellRinger.java +++ b/Mage.Sets/src/mage/cards/v/VillageBellRinger.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; /** @@ -47,8 +48,8 @@ public class VillageBellRinger extends CardImpl { public VillageBellRinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/VillageCannibals.java b/Mage.Sets/src/mage/cards/v/VillageCannibals.java index 4f33a0f80f..f34e8907e7 100644 --- a/Mage.Sets/src/mage/cards/v/VillageCannibals.java +++ b/Mage.Sets/src/mage/cards/v/VillageCannibals.java @@ -51,7 +51,7 @@ public class VillageCannibals extends CardImpl { public VillageCannibals(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VillageElder.java b/Mage.Sets/src/mage/cards/v/VillageElder.java index 192b49c8c1..f5740a3c5c 100644 --- a/Mage.Sets/src/mage/cards/v/VillageElder.java +++ b/Mage.Sets/src/mage/cards/v/VillageElder.java @@ -58,8 +58,8 @@ public class VillageElder extends CardImpl { public VillageElder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VillageIronsmith.java b/Mage.Sets/src/mage/cards/v/VillageIronsmith.java index 037fa2fa32..d32fafe983 100644 --- a/Mage.Sets/src/mage/cards/v/VillageIronsmith.java +++ b/Mage.Sets/src/mage/cards/v/VillageIronsmith.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.i.Ironfang; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -49,8 +50,8 @@ public class VillageIronsmith extends CardImpl { public VillageIronsmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WEREWOLF); this.transformable = true; this.secondSideCardClazz = Ironfang.class; diff --git a/Mage.Sets/src/mage/cards/v/VillageMessenger.java b/Mage.Sets/src/mage/cards/v/VillageMessenger.java index 5c38acfa04..24734fd60f 100644 --- a/Mage.Sets/src/mage/cards/v/VillageMessenger.java +++ b/Mage.Sets/src/mage/cards/v/VillageMessenger.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.m.MoonriseIntruder; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -50,8 +51,8 @@ public class VillageMessenger extends CardImpl { public VillageMessenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Human"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VillageSurvivors.java b/Mage.Sets/src/mage/cards/v/VillageSurvivors.java index 49ee65af4d..be98980044 100644 --- a/Mage.Sets/src/mage/cards/v/VillageSurvivors.java +++ b/Mage.Sets/src/mage/cards/v/VillageSurvivors.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -49,7 +50,7 @@ public class VillageSurvivors extends CardImpl { public VillageSurvivors(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/v/VillagersOfEstwald.java b/Mage.Sets/src/mage/cards/v/VillagersOfEstwald.java index c206131642..319e06ffc3 100644 --- a/Mage.Sets/src/mage/cards/v/VillagersOfEstwald.java +++ b/Mage.Sets/src/mage/cards/v/VillagersOfEstwald.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.h.HowlpackOfEstwald; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -48,8 +49,8 @@ public class VillagersOfEstwald extends CardImpl { public VillagersOfEstwald(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WEREWOLF); this.transformable = true; this.secondSideCardClazz = HowlpackOfEstwald.class; diff --git a/Mage.Sets/src/mage/cards/v/VillainousOgre.java b/Mage.Sets/src/mage/cards/v/VillainousOgre.java index fc304f4a0c..1e45daa9a7 100644 --- a/Mage.Sets/src/mage/cards/v/VillainousOgre.java +++ b/Mage.Sets/src/mage/cards/v/VillainousOgre.java @@ -57,8 +57,8 @@ public class VillainousOgre extends CardImpl { public VillainousOgre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VindictiveLich.java b/Mage.Sets/src/mage/cards/v/VindictiveLich.java index bf8182a2d2..13a0073084 100644 --- a/Mage.Sets/src/mage/cards/v/VindictiveLich.java +++ b/Mage.Sets/src/mage/cards/v/VindictiveLich.java @@ -83,7 +83,7 @@ public class VindictiveLich extends CardImpl { // *Target opponent loses 5 life. mode = new Mode(); - mode.getEffects().add(new LoseLifeTargetEffect(2)); + mode.getEffects().add(new LoseLifeTargetEffect(5)); filter = new FilterOpponent("opponent (life loss)"); filter.add(new AnotherTargetPredicate(3, true)); target = new TargetOpponent(filter, false); diff --git a/Mage.Sets/src/mage/cards/v/VindictiveMob.java b/Mage.Sets/src/mage/cards/v/VindictiveMob.java index 0646cfb746..0d9ae25bda 100644 --- a/Mage.Sets/src/mage/cards/v/VindictiveMob.java +++ b/Mage.Sets/src/mage/cards/v/VindictiveMob.java @@ -56,8 +56,8 @@ public class VindictiveMob extends CardImpl { public VindictiveMob(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/v/VineDryad.java b/Mage.Sets/src/mage/cards/v/VineDryad.java index 20b30557b2..d33fe3f15e 100644 --- a/Mage.Sets/src/mage/cards/v/VineDryad.java +++ b/Mage.Sets/src/mage/cards/v/VineDryad.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterOwnedCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardIdPredicate; @@ -51,7 +52,7 @@ public class VineDryad extends CardImpl { public VineDryad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Dryad"); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VineKami.java b/Mage.Sets/src/mage/cards/v/VineKami.java index c086671ec8..d004762114 100644 --- a/Mage.Sets/src/mage/cards/v/VineKami.java +++ b/Mage.Sets/src/mage/cards/v/VineKami.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.SoulshiftAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class VineKami extends CardImpl { public VineKami(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/VineTrellis.java b/Mage.Sets/src/mage/cards/v/VineTrellis.java index acb496be0c..321394f210 100644 --- a/Mage.Sets/src/mage/cards/v/VineTrellis.java +++ b/Mage.Sets/src/mage/cards/v/VineTrellis.java @@ -34,6 +34,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class VineTrellis extends CardImpl { public VineTrellis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Wall"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/VinelasherKudzu.java b/Mage.Sets/src/mage/cards/v/VinelasherKudzu.java index 1553445b23..885ab8b4ee 100644 --- a/Mage.Sets/src/mage/cards/v/VinelasherKudzu.java +++ b/Mage.Sets/src/mage/cards/v/VinelasherKudzu.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterControlledLandPermanent; @@ -46,7 +47,7 @@ public class VinelasherKudzu extends CardImpl { public VinelasherKudzu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Plant"); + this.subtype.add(SubType.PLANT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VineshaperMystic.java b/Mage.Sets/src/mage/cards/v/VineshaperMystic.java new file mode 100644 index 0000000000..28471aa8fc --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VineshaperMystic.java @@ -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.cards.v; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public class VineshaperMystic extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Merfolk you control"); + + static { + filter.add(new SubtypePredicate(SubType.MERFOLK)); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public VineshaperMystic(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SHAMAN); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // When Vineshaper Mystic enters the battlefield, put a +1/+1 counter on each of up to two target Merfolk you control. + Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance()); + effect.setText("put a +1/+1 counter on each of up to two target Merfolk you control"); + Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); + ability.addTarget(new TargetPermanent(0, 2, filter, false)); + this.addAbility(ability); + } + + public VineshaperMystic(final VineshaperMystic card) { + super(card); + } + + @Override + public VineshaperMystic copy() { + return new VineshaperMystic(this); + } +} diff --git a/Mage.Sets/src/mage/cards/v/Vineweft.java b/Mage.Sets/src/mage/cards/v/Vineweft.java index a1d9e177e7..d0d8437e4c 100644 --- a/Mage.Sets/src/mage/cards/v/Vineweft.java +++ b/Mage.Sets/src/mage/cards/v/Vineweft.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class Vineweft extends CardImpl { public Vineweft(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/v/VintaraElephant.java b/Mage.Sets/src/mage/cards/v/VintaraElephant.java index 462209e1d3..793f13abc0 100644 --- a/Mage.Sets/src/mage/cards/v/VintaraElephant.java +++ b/Mage.Sets/src/mage/cards/v/VintaraElephant.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class VintaraElephant extends CardImpl { public VintaraElephant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VintaraSnapper.java b/Mage.Sets/src/mage/cards/v/VintaraSnapper.java index 4261ff0e15..349ecf07aa 100644 --- a/Mage.Sets/src/mage/cards/v/VintaraSnapper.java +++ b/Mage.Sets/src/mage/cards/v/VintaraSnapper.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -58,7 +59,7 @@ public class VintaraSnapper extends CardImpl { public VintaraSnapper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); - this.subtype.add("Turtle"); + this.subtype.add(SubType.TURTLE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VioletPall.java b/Mage.Sets/src/mage/cards/v/VioletPall.java index 0a2f41c86c..c83157080f 100644 --- a/Mage.Sets/src/mage/cards/v/VioletPall.java +++ b/Mage.Sets/src/mage/cards/v/VioletPall.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -54,7 +55,7 @@ public class VioletPall extends CardImpl { public VioletPall(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{4}{B}"); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); diff --git a/Mage.Sets/src/mage/cards/v/VipersKiss.java b/Mage.Sets/src/mage/cards/v/VipersKiss.java index 739146c42b..d2dae5341a 100644 --- a/Mage.Sets/src/mage/cards/v/VipersKiss.java +++ b/Mage.Sets/src/mage/cards/v/VipersKiss.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class VipersKiss extends CardImpl { public VipersKiss(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/v/ViralDrake.java b/Mage.Sets/src/mage/cards/v/ViralDrake.java index ffa2a73fee..92d3ba4f54 100644 --- a/Mage.Sets/src/mage/cards/v/ViralDrake.java +++ b/Mage.Sets/src/mage/cards/v/ViralDrake.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class ViralDrake extends CardImpl { public ViralDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/ViridianAcolyte.java b/Mage.Sets/src/mage/cards/v/ViridianAcolyte.java index 004bfb9767..a06ba48d55 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianAcolyte.java +++ b/Mage.Sets/src/mage/cards/v/ViridianAcolyte.java @@ -37,6 +37,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -45,8 +46,8 @@ public class ViridianAcolyte extends CardImpl { public ViridianAcolyte(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/ViridianBetrayers.java b/Mage.Sets/src/mage/cards/v/ViridianBetrayers.java index 2a6bb575bd..2da4e03966 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianBetrayers.java +++ b/Mage.Sets/src/mage/cards/v/ViridianBetrayers.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -53,8 +54,8 @@ public class ViridianBetrayers extends CardImpl { public ViridianBetrayers(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.color.setGreen(true); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/ViridianClaw.java b/Mage.Sets/src/mage/cards/v/ViridianClaw.java index 327863b0ff..75272590a3 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianClaw.java +++ b/Mage.Sets/src/mage/cards/v/ViridianClaw.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class ViridianClaw extends CardImpl { public ViridianClaw (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 0))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/v/ViridianCorrupter.java b/Mage.Sets/src/mage/cards/v/ViridianCorrupter.java index d037397897..e9a3439315 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianCorrupter.java +++ b/Mage.Sets/src/mage/cards/v/ViridianCorrupter.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetArtifactPermanent; /** @@ -46,8 +47,8 @@ public class ViridianCorrupter extends CardImpl { public ViridianCorrupter (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/ViridianEmissary.java b/Mage.Sets/src/mage/cards/v/ViridianEmissary.java index 5c62fc7ee7..117bdec706 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianEmissary.java +++ b/Mage.Sets/src/mage/cards/v/ViridianEmissary.java @@ -33,6 +33,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; @@ -46,8 +47,8 @@ public class ViridianEmissary extends CardImpl { public ViridianEmissary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/ViridianHarvest.java b/Mage.Sets/src/mage/cards/v/ViridianHarvest.java index bbb2727817..334044298a 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianHarvest.java +++ b/Mage.Sets/src/mage/cards/v/ViridianHarvest.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.target.TargetPermanent; import mage.target.common.TargetArtifactPermanent; @@ -48,7 +49,7 @@ public class ViridianHarvest extends CardImpl { public ViridianHarvest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetArtifactPermanent(); diff --git a/Mage.Sets/src/mage/cards/v/ViridianJoiner.java b/Mage.Sets/src/mage/cards/v/ViridianJoiner.java index d3b17bf53c..585d0c351e 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianJoiner.java +++ b/Mage.Sets/src/mage/cards/v/ViridianJoiner.java @@ -35,6 +35,7 @@ import mage.abilities.mana.DynamicManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class ViridianJoiner extends CardImpl { public ViridianJoiner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/ViridianLongbow.java b/Mage.Sets/src/mage/cards/v/ViridianLongbow.java index f67d201234..2891ff0c7a 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianLongbow.java +++ b/Mage.Sets/src/mage/cards/v/ViridianLongbow.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -52,7 +53,7 @@ public class ViridianLongbow extends CardImpl { public ViridianLongbow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has "{tap}: This creature deals 1 damage to target creature or player." Effect effect = new DamageTargetEffect(1); diff --git a/Mage.Sets/src/mage/cards/v/ViridianLorebearers.java b/Mage.Sets/src/mage/cards/v/ViridianLorebearers.java index 76ed22f7b7..53174bb5a9 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianLorebearers.java +++ b/Mage.Sets/src/mage/cards/v/ViridianLorebearers.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class ViridianLorebearers extends CardImpl { public ViridianLorebearers(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/ViridianScout.java b/Mage.Sets/src/mage/cards/v/ViridianScout.java index 04c717b606..059b781ae5 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianScout.java +++ b/Mage.Sets/src/mage/cards/v/ViridianScout.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -55,9 +56,9 @@ public class ViridianScout extends CardImpl { } public ViridianScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/ViridianShaman.java b/Mage.Sets/src/mage/cards/v/ViridianShaman.java index ac9ad5f169..92e817d497 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianShaman.java +++ b/Mage.Sets/src/mage/cards/v/ViridianShaman.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.TargetPermanent; @@ -53,8 +54,8 @@ public class ViridianShaman extends CardImpl { public ViridianShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/ViridianZealot.java b/Mage.Sets/src/mage/cards/v/ViridianZealot.java index ccd4f184ae..258d71d71f 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianZealot.java +++ b/Mage.Sets/src/mage/cards/v/ViridianZealot.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.TargetPermanent; @@ -49,8 +50,8 @@ public class ViridianZealot extends CardImpl { public ViridianZealot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VirulentSliver.java b/Mage.Sets/src/mage/cards/v/VirulentSliver.java index 7f4081d613..1b6db3a009 100644 --- a/Mage.Sets/src/mage/cards/v/VirulentSliver.java +++ b/Mage.Sets/src/mage/cards/v/VirulentSliver.java @@ -54,7 +54,7 @@ public class VirulentSliver extends CardImpl { public VirulentSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VisaraTheDreadful.java b/Mage.Sets/src/mage/cards/v/VisaraTheDreadful.java index 823b469b1d..46dd748d82 100644 --- a/Mage.Sets/src/mage/cards/v/VisaraTheDreadful.java +++ b/Mage.Sets/src/mage/cards/v/VisaraTheDreadful.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -50,7 +51,7 @@ public class VisaraTheDreadful extends CardImpl { public VisaraTheDreadful(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Gorgon"); + this.subtype.add(SubType.GORGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/v/VisceraDragger.java b/Mage.Sets/src/mage/cards/v/VisceraDragger.java index 941fb5edd3..386a813f70 100644 --- a/Mage.Sets/src/mage/cards/v/VisceraDragger.java +++ b/Mage.Sets/src/mage/cards/v/VisceraDragger.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,9 +45,9 @@ public class VisceraDragger extends CardImpl { public VisceraDragger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VisceraSeer.java b/Mage.Sets/src/mage/cards/v/VisceraSeer.java index a97533b2b1..f765df669a 100644 --- a/Mage.Sets/src/mage/cards/v/VisceraSeer.java +++ b/Mage.Sets/src/mage/cards/v/VisceraSeer.java @@ -35,6 +35,7 @@ import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -46,8 +47,8 @@ public class VisceraSeer extends CardImpl { public VisceraSeer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VisceridArmor.java b/Mage.Sets/src/mage/cards/v/VisceridArmor.java index 746a91602b..12d1c7cd57 100644 --- a/Mage.Sets/src/mage/cards/v/VisceridArmor.java +++ b/Mage.Sets/src/mage/cards/v/VisceridArmor.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class VisceridArmor extends CardImpl { public VisceridArmor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/v/VisceridDeepwalker.java b/Mage.Sets/src/mage/cards/v/VisceridDeepwalker.java index eb14980010..85ac7ec18f 100644 --- a/Mage.Sets/src/mage/cards/v/VisceridDeepwalker.java +++ b/Mage.Sets/src/mage/cards/v/VisceridDeepwalker.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class VisceridDeepwalker extends CardImpl { public VisceridDeepwalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Homarid"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HOMARID); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VisceridDrone.java b/Mage.Sets/src/mage/cards/v/VisceridDrone.java new file mode 100644 index 0000000000..be780f4290 --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VisceridDrone.java @@ -0,0 +1,107 @@ +/* + * 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.cards.v; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.CompositeCost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SuperType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class VisceridDrone extends CardImpl { + + private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent("nonartifact creature"); + private static final FilterControlledPermanent filter2 = new FilterControlledPermanent("Swamp"); + private static final FilterControlledPermanent filter3 = new FilterControlledPermanent("snow Swamp"); + + static { + filter1.add(Predicates.not(new CardTypePredicate(CardType.ARTIFACT))); + filter2.add(new SubtypePredicate(SubType.SWAMP)); + filter3.add(new SubtypePredicate(SubType.SWAMP)); + filter3.add(new SupertypePredicate(SuperType.SNOW)); + } + + public VisceridDrone(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.HOMARID); + this.subtype.add(SubType.DRONE); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {tap}, Sacrifice a creature and a Swamp: Destroy target nonartifact creature. It can't be regenerated. + Ability ability = new SimpleActivatedAbility(new DestroyTargetEffect(true), new TapSourceCost()); + ability.addCost(new CompositeCost( + new SacrificeTargetCost(new TargetControlledCreaturePermanent()), + new SacrificeTargetCost(new TargetControlledPermanent(filter2)), + "Sacrifice a creature and a Swamp" + )); + ability.addTarget(new TargetCreaturePermanent(filter1)); + this.addAbility(ability); + + // {tap}, Sacrifice a creature and a snow Swamp: Destroy target creature. It can't be regenerated. + ability = new SimpleActivatedAbility(new DestroyTargetEffect(true), new TapSourceCost()); + ability.addCost(new CompositeCost( + new SacrificeTargetCost(new TargetControlledCreaturePermanent()), + new SacrificeTargetCost(new TargetControlledPermanent(filter3)), + "Sacrifice a creature and a snow Swamp" + )); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public VisceridDrone(final VisceridDrone card) { + super(card); + } + + @Override + public VisceridDrone copy() { + return new VisceridDrone(this); + } +} diff --git a/Mage.Sets/src/mage/cards/v/ViscidLemures.java b/Mage.Sets/src/mage/cards/v/ViscidLemures.java index af28706f9a..8c4dbeb440 100644 --- a/Mage.Sets/src/mage/cards/v/ViscidLemures.java +++ b/Mage.Sets/src/mage/cards/v/ViscidLemures.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class ViscidLemures extends CardImpl { public ViscidLemures(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/Viseling.java b/Mage.Sets/src/mage/cards/v/Viseling.java index 691c28d07b..75608929d3 100644 --- a/Mage.Sets/src/mage/cards/v/Viseling.java +++ b/Mage.Sets/src/mage/cards/v/Viseling.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.game.Game; @@ -48,7 +49,7 @@ public class Viseling extends CardImpl { public Viseling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VishKalBloodArbiter.java b/Mage.Sets/src/mage/cards/v/VishKalBloodArbiter.java index adff3ebc1f..ac18d5cf5f 100644 --- a/Mage.Sets/src/mage/cards/v/VishKalBloodArbiter.java +++ b/Mage.Sets/src/mage/cards/v/VishKalBloodArbiter.java @@ -45,6 +45,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -65,7 +66,7 @@ public class VishKalBloodArbiter extends CardImpl { public VishKalBloodArbiter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vampire"); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/v/VisionCharm.java b/Mage.Sets/src/mage/cards/v/VisionCharm.java index fea2422cbe..52d0254810 100644 --- a/Mage.Sets/src/mage/cards/v/VisionCharm.java +++ b/Mage.Sets/src/mage/cards/v/VisionCharm.java @@ -93,7 +93,7 @@ public class VisionCharm extends CardImpl { class VisionCharmEffect extends ContinuousEffectImpl { private String targetLandType; - private String targetBasicLandType; + private SubType targetBasicLandType; public VisionCharmEffect() { super(Duration.EndOfTurn, Outcome.Neutral); @@ -102,6 +102,8 @@ class VisionCharmEffect extends ContinuousEffectImpl { public VisionCharmEffect(final VisionCharmEffect effect) { super(effect); + targetLandType = effect.targetLandType; + targetBasicLandType = effect.targetBasicLandType; } @Override @@ -119,9 +121,14 @@ class VisionCharmEffect extends ContinuousEffectImpl { targetLandType = choice.getChoice(); choice = new ChoiceBasicLandType(); controller.choose(outcome, choice, game); - targetBasicLandType = choice.getChoice(); + targetBasicLandType = SubType.byDescription(choice.getChoice()); + if (targetLandType == null || targetBasicLandType == null) { + this.discard(); + return; + } } else { this.discard(); + return; } FilterPermanent filter = new FilterLandPermanent(); filter.add(new SubtypePredicate(SubType.byDescription(targetLandType))); @@ -134,6 +141,7 @@ class VisionCharmEffect extends ContinuousEffectImpl { @Override public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + // TODO fix to use SubType enum for (Iterator it = affectedObjectList.iterator(); it.hasNext();) { Permanent land = it.next().getPermanent(game); if (land != null) { @@ -145,22 +153,20 @@ class VisionCharmEffect extends ContinuousEffectImpl { case AbilityAddingRemovingEffects_6: if (sublayer == SubLayer.NA) { land.getAbilities().clear(); - switch (targetBasicLandType) { - case "Swamp": - land.addAbility(new BlackManaAbility(), source.getSourceId(), game); - break; - case "Mountain": - land.addAbility(new RedManaAbility(), source.getSourceId(), game); - break; - case "Forest": - land.addAbility(new GreenManaAbility(), source.getSourceId(), game); - break; - case "Island": - land.addAbility(new BlueManaAbility(), source.getSourceId(), game); - break; - case "Plains": - land.addAbility(new WhiteManaAbility(), source.getSourceId(), game); - break; + if (targetBasicLandType.equals(SubType.FOREST)) { + land.addAbility(new GreenManaAbility(), source.getSourceId(), game); + } + if (targetBasicLandType.equals(SubType.PLAINS)) { + land.addAbility(new WhiteManaAbility(), source.getSourceId(), game); + } + if (targetBasicLandType.equals(SubType.MOUNTAIN)) { + land.addAbility(new RedManaAbility(), source.getSourceId(), game); + } + if (targetBasicLandType.equals(SubType.ISLAND)) { + land.addAbility(new BlueManaAbility(), source.getSourceId(), game); + } + if (targetBasicLandType.equals(SubType.SWAMP)) { + land.addAbility(new BlackManaAbility(), source.getSourceId(), game); } } } @@ -168,6 +174,7 @@ class VisionCharmEffect extends ContinuousEffectImpl { it.remove(); } } + return true; } diff --git a/Mage.Sets/src/mage/cards/v/VisionaryAugmenter.java b/Mage.Sets/src/mage/cards/v/VisionaryAugmenter.java index b82917c768..f3afc571dd 100644 --- a/Mage.Sets/src/mage/cards/v/VisionaryAugmenter.java +++ b/Mage.Sets/src/mage/cards/v/VisionaryAugmenter.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FabricateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class VisionaryAugmenter extends CardImpl { public VisionaryAugmenter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Dwarf"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VisionsOfBrutality.java b/Mage.Sets/src/mage/cards/v/VisionsOfBrutality.java index d6d546c763..98e865217f 100644 --- a/Mage.Sets/src/mage/cards/v/VisionsOfBrutality.java +++ b/Mage.Sets/src/mage/cards/v/VisionsOfBrutality.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class VisionsOfBrutality extends CardImpl { public VisionsOfBrutality(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Devoid this.addAbility(new DevoidAbility(this.color)); diff --git a/Mage.Sets/src/mage/cards/v/VitalSplicer.java b/Mage.Sets/src/mage/cards/v/VitalSplicer.java index d663a1a212..542cf01d4e 100644 --- a/Mage.Sets/src/mage/cards/v/VitalSplicer.java +++ b/Mage.Sets/src/mage/cards/v/VitalSplicer.java @@ -64,8 +64,8 @@ public class VitalSplicer extends CardImpl { public VitalSplicer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VitasporeThallid.java b/Mage.Sets/src/mage/cards/v/VitasporeThallid.java index 4bb902070c..7c8bd3c435 100644 --- a/Mage.Sets/src/mage/cards/v/VitasporeThallid.java +++ b/Mage.Sets/src/mage/cards/v/VitasporeThallid.java @@ -61,7 +61,7 @@ public class VitasporeThallid extends CardImpl { public VitasporeThallid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Fungus"); + this.subtype.add(SubType.FUNGUS); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VithianRenegades.java b/Mage.Sets/src/mage/cards/v/VithianRenegades.java index 75a69d43fa..b0cb0673e8 100644 --- a/Mage.Sets/src/mage/cards/v/VithianRenegades.java +++ b/Mage.Sets/src/mage/cards/v/VithianRenegades.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetArtifactPermanent; /** @@ -45,8 +46,8 @@ public class VithianRenegades extends CardImpl { public VithianRenegades (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VithianStinger.java b/Mage.Sets/src/mage/cards/v/VithianStinger.java index e25a4ab03c..989d74ba14 100644 --- a/Mage.Sets/src/mage/cards/v/VithianStinger.java +++ b/Mage.Sets/src/mage/cards/v/VithianStinger.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -49,8 +50,8 @@ public class VithianStinger extends CardImpl { public VithianStinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VituGhaziGuildmage.java b/Mage.Sets/src/mage/cards/v/VituGhaziGuildmage.java index 153ffc7c73..2fda9af465 100644 --- a/Mage.Sets/src/mage/cards/v/VituGhaziGuildmage.java +++ b/Mage.Sets/src/mage/cards/v/VituGhaziGuildmage.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.PopulateEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class VituGhaziGuildmage extends CardImpl { public VituGhaziGuildmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}"); - this.subtype.add("Dryad"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.DRYAD); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VizierOfDeferment.java b/Mage.Sets/src/mage/cards/v/VizierOfDeferment.java index 1cf223d0a1..ca75cecf08 100644 --- a/Mage.Sets/src/mage/cards/v/VizierOfDeferment.java +++ b/Mage.Sets/src/mage/cards/v/VizierOfDeferment.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -64,8 +65,8 @@ public class VizierOfDeferment extends CardImpl { public VizierOfDeferment(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VizierOfManyFaces.java b/Mage.Sets/src/mage/cards/v/VizierOfManyFaces.java index 0fc497f943..100b368344 100644 --- a/Mage.Sets/src/mage/cards/v/VizierOfManyFaces.java +++ b/Mage.Sets/src/mage/cards/v/VizierOfManyFaces.java @@ -61,8 +61,8 @@ public class VizierOfManyFaces extends CardImpl { public VizierOfManyFaces(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); - this.subtype.add("Shapeshifter"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.SHAPESHIFTER); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/v/VizierOfRemedies.java b/Mage.Sets/src/mage/cards/v/VizierOfRemedies.java index 26e07ad003..748ff28835 100644 --- a/Mage.Sets/src/mage/cards/v/VizierOfRemedies.java +++ b/Mage.Sets/src/mage/cards/v/VizierOfRemedies.java @@ -35,6 +35,7 @@ import mage.abilities.effects.ReplacementEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class VizierOfRemedies extends CardImpl { public VizierOfRemedies(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VizierOfTheAnointed.java b/Mage.Sets/src/mage/cards/v/VizierOfTheAnointed.java index 942560a4e5..c7eabd5d8c 100644 --- a/Mage.Sets/src/mage/cards/v/VizierOfTheAnointed.java +++ b/Mage.Sets/src/mage/cards/v/VizierOfTheAnointed.java @@ -42,6 +42,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -69,8 +70,8 @@ public class VizierOfTheAnointed extends CardImpl { public VizierOfTheAnointed(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/VizierOfTheMenagerie.java b/Mage.Sets/src/mage/cards/v/VizierOfTheMenagerie.java index 5ce31a9e3b..2fecb77cb6 100644 --- a/Mage.Sets/src/mage/cards/v/VizierOfTheMenagerie.java +++ b/Mage.Sets/src/mage/cards/v/VizierOfTheMenagerie.java @@ -1,200 +1,201 @@ -/* - * 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.cards.v; - -import java.util.UUID; -import mage.MageInt; -import mage.MageObject; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.AsThoughEffectImpl; -import mage.abilities.effects.AsThoughManaEffect; -import mage.abilities.effects.ContinuousEffectImpl; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.AsThoughEffectType; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.ManaType; -import mage.constants.Outcome; -import mage.constants.SubLayer; -import mage.constants.Zone; -import mage.game.Game; -import mage.players.ManaPoolItem; -import mage.players.Player; - -/** - * - * @author jeffwadsworth - */ -public class VizierOfTheMenagerie extends CardImpl { - - public VizierOfTheMenagerie(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); - this.subtype.add("Naga"); - this.subtype.add("Cleric"); - this.power = new MageInt(3); - this.toughness = new MageInt(4); - - // You may look at the top card of your library. (You may do this at any time.) - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new VizierOfTheMenagerieTopCardRevealedEffect())); - - // You may cast the top card of your library if it's a creature card. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new VizierOfTheMenagerieTopCardCastEffect())); - - // You may spend mana as though it were mana of any type to cast creature spells. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new VizierOfTheMenagerieManaEffect())); - - } - - public VizierOfTheMenagerie(final VizierOfTheMenagerie card) { - super(card); - } - - @Override - public VizierOfTheMenagerie copy() { - return new VizierOfTheMenagerie(this); - } -} - -class VizierOfTheMenagerieTopCardRevealedEffect extends ContinuousEffectImpl { - - public VizierOfTheMenagerieTopCardRevealedEffect() { - super(Duration.WhileOnBattlefield, Layer.PlayerEffects, SubLayer.NA, Outcome.Benefit); - staticText = "You may look at the top card of your library. (You may do this at any time.)"; - } - - public VizierOfTheMenagerieTopCardRevealedEffect(final VizierOfTheMenagerieTopCardRevealedEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Card topCard = controller.getLibrary().getFromTop(game); - if (topCard != null) { - MageObject vizierOfTheMenagerie = source.getSourceObject(game); - if (vizierOfTheMenagerie != null) { - controller.lookAtCards("Top card of " + vizierOfTheMenagerie.getIdName() + " controller's library", topCard, game); - } - } - } - return true; - } - - @Override - public VizierOfTheMenagerieTopCardRevealedEffect copy() { - return new VizierOfTheMenagerieTopCardRevealedEffect(this); - } -} - -class VizierOfTheMenagerieTopCardCastEffect extends AsThoughEffectImpl { - - public VizierOfTheMenagerieTopCardCastEffect() { - super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit); - staticText = "You may cast the top card of your library if it's a creature card"; - } - - public VizierOfTheMenagerieTopCardCastEffect(final VizierOfTheMenagerieTopCardCastEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } - - @Override - public VizierOfTheMenagerieTopCardCastEffect copy() { - return new VizierOfTheMenagerieTopCardCastEffect(this); - } - - @Override - public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { - if (affectedControllerId.equals(source.getControllerId())) { - Card card = game.getCard(objectId); - if (card != null) { - Player controller = game.getPlayer(affectedControllerId); - if (controller != null) { - Card topCard = controller.getLibrary().getFromTop(game); - MageObject vizierOfTheMenagerie = game.getObject(source.getSourceId()); - if (vizierOfTheMenagerie != null - && topCard != null) { - if (topCard == card - && topCard.isCreature() - && topCard.getSpellAbility() != null - && topCard.getSpellAbility().spellCanBeActivatedRegularlyNow(controller.getId(), game)) { - return true; - } - } - } - } - } - return false; - } -} - -class VizierOfTheMenagerieManaEffect extends AsThoughEffectImpl implements AsThoughManaEffect { - - public VizierOfTheMenagerieManaEffect() { - super(AsThoughEffectType.SPEND_OTHER_MANA, Duration.WhileOnBattlefield, Outcome.Benefit); - staticText = "You may spend mana as though it were mana of any type to cast creature spells"; - } - - public VizierOfTheMenagerieManaEffect(final VizierOfTheMenagerieManaEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } - - @Override - public VizierOfTheMenagerieManaEffect copy() { - return new VizierOfTheMenagerieManaEffect(this); - } - - @Override - public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { - if (source.getControllerId().equals(affectedControllerId)) { - MageObject mageObject = game.getObject(objectId); - return mageObject != null - && mageObject.isCreature(); - } - return false; - } - - @Override - public ManaType getAsThoughManaType(ManaType manaType, ManaPoolItem mana, UUID affectedControllerId, Ability source, Game game) { - return mana.getFirstAvailable(); - } -} +/* + * 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.cards.v; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.AsThoughManaEffect; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AsThoughEffectType; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.ManaType; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.ManaPoolItem; +import mage.players.Player; + +/** + * + * @author jeffwadsworth + */ +public class VizierOfTheMenagerie extends CardImpl { + + public VizierOfTheMenagerie(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // You may look at the top card of your library. (You may do this at any time.) + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new VizierOfTheMenagerieTopCardRevealedEffect())); + + // You may cast the top card of your library if it's a creature card. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new VizierOfTheMenagerieTopCardCastEffect())); + + // You may spend mana as though it were mana of any type to cast creature spells. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new VizierOfTheMenagerieManaEffect())); + + } + + public VizierOfTheMenagerie(final VizierOfTheMenagerie card) { + super(card); + } + + @Override + public VizierOfTheMenagerie copy() { + return new VizierOfTheMenagerie(this); + } +} + +class VizierOfTheMenagerieTopCardRevealedEffect extends ContinuousEffectImpl { + + public VizierOfTheMenagerieTopCardRevealedEffect() { + super(Duration.WhileOnBattlefield, Layer.PlayerEffects, SubLayer.NA, Outcome.Benefit); + staticText = "You may look at the top card of your library. (You may do this at any time.)"; + } + + public VizierOfTheMenagerieTopCardRevealedEffect(final VizierOfTheMenagerieTopCardRevealedEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Card topCard = controller.getLibrary().getFromTop(game); + if (topCard != null) { + MageObject vizierOfTheMenagerie = source.getSourceObject(game); + if (vizierOfTheMenagerie != null) { + controller.lookAtCards("Top card of " + vizierOfTheMenagerie.getIdName() + " controller's library", topCard, game); + } + } + } + return true; + } + + @Override + public VizierOfTheMenagerieTopCardRevealedEffect copy() { + return new VizierOfTheMenagerieTopCardRevealedEffect(this); + } +} + +class VizierOfTheMenagerieTopCardCastEffect extends AsThoughEffectImpl { + + public VizierOfTheMenagerieTopCardCastEffect() { + super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = "You may cast the top card of your library if it's a creature card"; + } + + public VizierOfTheMenagerieTopCardCastEffect(final VizierOfTheMenagerieTopCardCastEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public VizierOfTheMenagerieTopCardCastEffect copy() { + return new VizierOfTheMenagerieTopCardCastEffect(this); + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + if (affectedControllerId.equals(source.getControllerId())) { + Card card = game.getCard(objectId); + if (card != null) { + Player controller = game.getPlayer(affectedControllerId); + if (controller != null) { + Card topCard = controller.getLibrary().getFromTop(game); + MageObject vizierOfTheMenagerie = game.getObject(source.getSourceId()); + if (vizierOfTheMenagerie != null + && topCard != null) { + if (topCard == card + && topCard.isCreature() + && topCard.getSpellAbility() != null + && topCard.getSpellAbility().spellCanBeActivatedRegularlyNow(controller.getId(), game)) { + return true; + } + } + } + } + } + return false; + } +} + +class VizierOfTheMenagerieManaEffect extends AsThoughEffectImpl implements AsThoughManaEffect { + + public VizierOfTheMenagerieManaEffect() { + super(AsThoughEffectType.SPEND_OTHER_MANA, Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = "You may spend mana as though it were mana of any type to cast creature spells"; + } + + public VizierOfTheMenagerieManaEffect(final VizierOfTheMenagerieManaEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public VizierOfTheMenagerieManaEffect copy() { + return new VizierOfTheMenagerieManaEffect(this); + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + if (source.getControllerId().equals(affectedControllerId)) { + MageObject mageObject = game.getObject(objectId); + return mageObject != null + && mageObject.isCreature(); + } + return false; + } + + @Override + public ManaType getAsThoughManaType(ManaType manaType, ManaPoolItem mana, UUID affectedControllerId, Ability source, Game game) { + return mana.getFirstAvailable(); + } +} diff --git a/Mage.Sets/src/mage/cards/v/VizierOfTheTrue.java b/Mage.Sets/src/mage/cards/v/VizierOfTheTrue.java index 47988736c8..8cc954a756 100644 --- a/Mage.Sets/src/mage/cards/v/VizierOfTheTrue.java +++ b/Mage.Sets/src/mage/cards/v/VizierOfTheTrue.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ExertAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -53,8 +54,8 @@ public class VizierOfTheTrue extends CardImpl { public VizierOfTheTrue(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VizierOfTumblingSands.java b/Mage.Sets/src/mage/cards/v/VizierOfTumblingSands.java index 1af269c970..386b1ff067 100644 --- a/Mage.Sets/src/mage/cards/v/VizierOfTumblingSands.java +++ b/Mage.Sets/src/mage/cards/v/VizierOfTumblingSands.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -60,8 +61,8 @@ public class VizierOfTumblingSands extends CardImpl { public VizierOfTumblingSands(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VizkopaConfessor.java b/Mage.Sets/src/mage/cards/v/VizkopaConfessor.java index 6c35626982..401ea4f2e7 100644 --- a/Mage.Sets/src/mage/cards/v/VizkopaConfessor.java +++ b/Mage.Sets/src/mage/cards/v/VizkopaConfessor.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -56,8 +57,8 @@ public class VizkopaConfessor extends CardImpl { public VizkopaConfessor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VizkopaGuildmage.java b/Mage.Sets/src/mage/cards/v/VizkopaGuildmage.java index 326de96d86..3cca073ca5 100644 --- a/Mage.Sets/src/mage/cards/v/VizkopaGuildmage.java +++ b/Mage.Sets/src/mage/cards/v/VizkopaGuildmage.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -68,8 +69,8 @@ public class VizkopaGuildmage extends CardImpl { public VizkopaGuildmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/Vizzerdrix.java b/Mage.Sets/src/mage/cards/v/Vizzerdrix.java index 6f72fee7b7..192357482f 100644 --- a/Mage.Sets/src/mage/cards/v/Vizzerdrix.java +++ b/Mage.Sets/src/mage/cards/v/Vizzerdrix.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class Vizzerdrix extends CardImpl { public Vizzerdrix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{U}"); - this.subtype.add("Rabbit"); - this.subtype.add("Beast"); + this.subtype.add(SubType.RABBIT); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/v/VodalianHypnotist.java b/Mage.Sets/src/mage/cards/v/VodalianHypnotist.java index a4d32b6c3b..c0454d02eb 100644 --- a/Mage.Sets/src/mage/cards/v/VodalianHypnotist.java +++ b/Mage.Sets/src/mage/cards/v/VodalianHypnotist.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -48,8 +49,8 @@ public class VodalianHypnotist extends CardImpl { public VodalianHypnotist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VodalianIllusionist.java b/Mage.Sets/src/mage/cards/v/VodalianIllusionist.java index 16d85a3634..7c7781cdbe 100644 --- a/Mage.Sets/src/mage/cards/v/VodalianIllusionist.java +++ b/Mage.Sets/src/mage/cards/v/VodalianIllusionist.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.PhaseOutTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class VodalianIllusionist extends CardImpl { public VodalianIllusionist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VodalianKnights.java b/Mage.Sets/src/mage/cards/v/VodalianKnights.java index 0b36d304de..5bdc0a33fd 100644 --- a/Mage.Sets/src/mage/cards/v/VodalianKnights.java +++ b/Mage.Sets/src/mage/cards/v/VodalianKnights.java @@ -51,8 +51,8 @@ public class VodalianKnights extends CardImpl { public VodalianKnights(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Knight"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VodalianMage.java b/Mage.Sets/src/mage/cards/v/VodalianMage.java index 81169ca441..9830365560 100644 --- a/Mage.Sets/src/mage/cards/v/VodalianMage.java +++ b/Mage.Sets/src/mage/cards/v/VodalianMage.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CounterUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetSpell; @@ -48,8 +49,8 @@ public class VodalianMage extends CardImpl { public VodalianMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VodalianMerchant.java b/Mage.Sets/src/mage/cards/v/VodalianMerchant.java index 979cd33360..c63300fd07 100644 --- a/Mage.Sets/src/mage/cards/v/VodalianMerchant.java +++ b/Mage.Sets/src/mage/cards/v/VodalianMerchant.java @@ -29,11 +29,12 @@ package mage.cards.v; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,13 +43,13 @@ import mage.constants.CardType; public class VodalianMerchant extends CardImpl { public VodalianMerchant(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(1); this.toughness = new MageInt(2); // When Vodalian Merchant enters the battlefield, draw a card, then discard a card. - this.addAbility(new EntersBattlefieldAbility(new DrawDiscardControllerEffect(1, 1, false))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawDiscardControllerEffect(1, 1, false))); } public VodalianMerchant(final VodalianMerchant card) { diff --git a/Mage.Sets/src/mage/cards/v/VodalianMystic.java b/Mage.Sets/src/mage/cards/v/VodalianMystic.java index 2f1abf11d0..46b1f9f14d 100644 --- a/Mage.Sets/src/mage/cards/v/VodalianMystic.java +++ b/Mage.Sets/src/mage/cards/v/VodalianMystic.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BecomesColorTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -49,8 +50,8 @@ public class VodalianMystic extends CardImpl { public VodalianMystic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VodalianSerpent.java b/Mage.Sets/src/mage/cards/v/VodalianSerpent.java index 4ae56481f2..ebd5037a9f 100644 --- a/Mage.Sets/src/mage/cards/v/VodalianSerpent.java +++ b/Mage.Sets/src/mage/cards/v/VodalianSerpent.java @@ -52,7 +52,7 @@ public class VodalianSerpent extends CardImpl { public VodalianSerpent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Serpent"); + this.subtype.add(SubType.SERPENT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VodalianSoldiers.java b/Mage.Sets/src/mage/cards/v/VodalianSoldiers.java index f66e5e8b61..dabe60e5cd 100644 --- a/Mage.Sets/src/mage/cards/v/VodalianSoldiers.java +++ b/Mage.Sets/src/mage/cards/v/VodalianSoldiers.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class VodalianSoldiers extends CardImpl { public VodalianSoldiers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VodalianZombie.java b/Mage.Sets/src/mage/cards/v/VodalianZombie.java index 0143dda057..6f80204676 100644 --- a/Mage.Sets/src/mage/cards/v/VodalianZombie.java +++ b/Mage.Sets/src/mage/cards/v/VodalianZombie.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class VodalianZombie extends CardImpl { public VodalianZombie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}"); - this.subtype.add("Merfolk"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VoiceOfAll.java b/Mage.Sets/src/mage/cards/v/VoiceOfAll.java index 28bdd8d69d..9dd44dcb4b 100644 --- a/Mage.Sets/src/mage/cards/v/VoiceOfAll.java +++ b/Mage.Sets/src/mage/cards/v/VoiceOfAll.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class VoiceOfAll extends CardImpl { public VoiceOfAll(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VoiceOfDuty.java b/Mage.Sets/src/mage/cards/v/VoiceOfDuty.java index bde6556886..8341566c46 100644 --- a/Mage.Sets/src/mage/cards/v/VoiceOfDuty.java +++ b/Mage.Sets/src/mage/cards/v/VoiceOfDuty.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class VoiceOfDuty extends CardImpl { public VoiceOfDuty(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VoiceOfGrace.java b/Mage.Sets/src/mage/cards/v/VoiceOfGrace.java index df2ce6e6b6..2c536f7768 100644 --- a/Mage.Sets/src/mage/cards/v/VoiceOfGrace.java +++ b/Mage.Sets/src/mage/cards/v/VoiceOfGrace.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class VoiceOfGrace extends CardImpl { public VoiceOfGrace(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VoiceOfLaw.java b/Mage.Sets/src/mage/cards/v/VoiceOfLaw.java index f86c11b0aa..926d752a1f 100644 --- a/Mage.Sets/src/mage/cards/v/VoiceOfLaw.java +++ b/Mage.Sets/src/mage/cards/v/VoiceOfLaw.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class VoiceOfLaw extends CardImpl { public VoiceOfLaw(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VoiceOfReason.java b/Mage.Sets/src/mage/cards/v/VoiceOfReason.java index d850fd36c8..1757f630e6 100644 --- a/Mage.Sets/src/mage/cards/v/VoiceOfReason.java +++ b/Mage.Sets/src/mage/cards/v/VoiceOfReason.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class VoiceOfReason extends CardImpl { public VoiceOfReason(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VoiceOfResurgence.java b/Mage.Sets/src/mage/cards/v/VoiceOfResurgence.java index 6ed96c266a..a83b29ee59 100644 --- a/Mage.Sets/src/mage/cards/v/VoiceOfResurgence.java +++ b/Mage.Sets/src/mage/cards/v/VoiceOfResurgence.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -50,7 +51,7 @@ public class VoiceOfResurgence extends CardImpl { public VoiceOfResurgence(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VoiceOfTheProvinces.java b/Mage.Sets/src/mage/cards/v/VoiceOfTheProvinces.java index 5755cc3400..d2cfa0c59f 100644 --- a/Mage.Sets/src/mage/cards/v/VoiceOfTheProvinces.java +++ b/Mage.Sets/src/mage/cards/v/VoiceOfTheProvinces.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.HumanToken; /** @@ -45,7 +46,7 @@ public class VoiceOfTheProvinces extends CardImpl { public VoiceOfTheProvinces(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VoiceOfTheWoods.java b/Mage.Sets/src/mage/cards/v/VoiceOfTheWoods.java index 1e82605e61..d4b3c77e64 100644 --- a/Mage.Sets/src/mage/cards/v/VoiceOfTheWoods.java +++ b/Mage.Sets/src/mage/cards/v/VoiceOfTheWoods.java @@ -60,7 +60,7 @@ public class VoiceOfTheWoods extends CardImpl { public VoiceOfTheWoods(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VoiceOfTruth.java b/Mage.Sets/src/mage/cards/v/VoiceOfTruth.java index f132a76b2e..7d6dec41ee 100644 --- a/Mage.Sets/src/mage/cards/v/VoiceOfTruth.java +++ b/Mage.Sets/src/mage/cards/v/VoiceOfTruth.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class VoiceOfTruth extends CardImpl { public VoiceOfTruth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VoicelessSpirit.java b/Mage.Sets/src/mage/cards/v/VoicelessSpirit.java index 6b0b270810..2bfdd737f1 100644 --- a/Mage.Sets/src/mage/cards/v/VoicelessSpirit.java +++ b/Mage.Sets/src/mage/cards/v/VoicelessSpirit.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class VoicelessSpirit extends CardImpl { public VoicelessSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VoidAttendant.java b/Mage.Sets/src/mage/cards/v/VoidAttendant.java index e915534a31..9ec3ab882d 100644 --- a/Mage.Sets/src/mage/cards/v/VoidAttendant.java +++ b/Mage.Sets/src/mage/cards/v/VoidAttendant.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.EldraziScionToken; @@ -50,8 +51,8 @@ public class VoidAttendant extends CardImpl { public VoidAttendant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Processor"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.PROCESSOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VoidGrafter.java b/Mage.Sets/src/mage/cards/v/VoidGrafter.java index f0f2276559..918d11a4f4 100644 --- a/Mage.Sets/src/mage/cards/v/VoidGrafter.java +++ b/Mage.Sets/src/mage/cards/v/VoidGrafter.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -57,8 +58,8 @@ public class VoidGrafter extends CardImpl { public VoidGrafter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{U}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/VoidStalker.java b/Mage.Sets/src/mage/cards/v/VoidStalker.java index f323061dec..0c5005440d 100644 --- a/Mage.Sets/src/mage/cards/v/VoidStalker.java +++ b/Mage.Sets/src/mage/cards/v/VoidStalker.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -52,7 +53,7 @@ public class VoidStalker extends CardImpl { public VoidStalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VoidWinnower.java b/Mage.Sets/src/mage/cards/v/VoidWinnower.java index 83eb22969b..84c870331f 100644 --- a/Mage.Sets/src/mage/cards/v/VoidWinnower.java +++ b/Mage.Sets/src/mage/cards/v/VoidWinnower.java @@ -37,6 +37,7 @@ import mage.abilities.effects.RestrictionEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class VoidWinnower extends CardImpl { public VoidWinnower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{9}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(11); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/v/VoidmageApprentice.java b/Mage.Sets/src/mage/cards/v/VoidmageApprentice.java index 27352c3e28..a2ca2ef1e9 100644 --- a/Mage.Sets/src/mage/cards/v/VoidmageApprentice.java +++ b/Mage.Sets/src/mage/cards/v/VoidmageApprentice.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetSpell; /** @@ -47,8 +48,8 @@ public class VoidmageApprentice extends CardImpl { public VoidmageApprentice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VoidmageHusher.java b/Mage.Sets/src/mage/cards/v/VoidmageHusher.java index dcecb37eba..fc34711d3c 100644 --- a/Mage.Sets/src/mage/cards/v/VoidmageHusher.java +++ b/Mage.Sets/src/mage/cards/v/VoidmageHusher.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetActivatedAbility; /** @@ -48,8 +49,8 @@ public class VoidmageHusher extends CardImpl { public VoidmageHusher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VoidmageProdigy.java b/Mage.Sets/src/mage/cards/v/VoidmageProdigy.java index f74ae9b332..fef9be2ef5 100644 --- a/Mage.Sets/src/mage/cards/v/VoidmageProdigy.java +++ b/Mage.Sets/src/mage/cards/v/VoidmageProdigy.java @@ -60,8 +60,8 @@ public class VoidmageProdigy extends CardImpl { public VoidmageProdigy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VoidstoneGargoyle.java b/Mage.Sets/src/mage/cards/v/VoidstoneGargoyle.java index d82c4139a9..5f2863e6ad 100644 --- a/Mage.Sets/src/mage/cards/v/VoidstoneGargoyle.java +++ b/Mage.Sets/src/mage/cards/v/VoidstoneGargoyle.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class VoidstoneGargoyle extends CardImpl { public VoidstoneGargoyle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Gargoyle"); + this.subtype.add(SubType.GARGOYLE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/Voidwielder.java b/Mage.Sets/src/mage/cards/v/Voidwielder.java index c3e6360e66..8a26195496 100644 --- a/Mage.Sets/src/mage/cards/v/Voidwielder.java +++ b/Mage.Sets/src/mage/cards/v/Voidwielder.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; /** @@ -45,8 +46,8 @@ public class Voidwielder extends CardImpl { public Voidwielder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/VolatileRig.java b/Mage.Sets/src/mage/cards/v/VolatileRig.java index be3358d009..719b7e16ed 100644 --- a/Mage.Sets/src/mage/cards/v/VolatileRig.java +++ b/Mage.Sets/src/mage/cards/v/VolatileRig.java @@ -32,13 +32,14 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.PhaseStep; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class VolatileRig extends CardImpl { public VolatileRig(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -66,7 +67,7 @@ public class VolatileRig extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // Volatile Rig attacks each turn if able. - this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new AttacksEachCombatStaticAbility()); // Whenever Volatile Rig is dealt damage, flip a coin. If you lose the flip, sacrifice Volatile Rig. this.addAbility(new VolatileRigTriggeredAbility()); diff --git a/Mage.Sets/src/mage/cards/v/VolcanicDragon.java b/Mage.Sets/src/mage/cards/v/VolcanicDragon.java index 9af645252f..1646dc837a 100644 --- a/Mage.Sets/src/mage/cards/v/VolcanicDragon.java +++ b/Mage.Sets/src/mage/cards/v/VolcanicDragon.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -43,7 +44,7 @@ public class VolcanicDragon extends CardImpl { public VolcanicDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/VolcanicIsland.java b/Mage.Sets/src/mage/cards/v/VolcanicIsland.java index 9335cccd42..e1ffda285d 100644 --- a/Mage.Sets/src/mage/cards/v/VolcanicIsland.java +++ b/Mage.Sets/src/mage/cards/v/VolcanicIsland.java @@ -33,6 +33,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class VolcanicIsland extends CardImpl { public VolcanicIsland(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Island"); - this.subtype.add("Mountain"); + this.subtype.add(SubType.ISLAND); + this.subtype.add(SubType.MOUNTAIN); this.addAbility(new BlueManaAbility()); this.addAbility(new RedManaAbility()); diff --git a/Mage.Sets/src/mage/cards/v/VolcanicRambler.java b/Mage.Sets/src/mage/cards/v/VolcanicRambler.java index 128c0c58f0..550c42363e 100644 --- a/Mage.Sets/src/mage/cards/v/VolcanicRambler.java +++ b/Mage.Sets/src/mage/cards/v/VolcanicRambler.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -47,7 +48,7 @@ public class VolcanicRambler extends CardImpl { public VolcanicRambler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/VolcanicStrength.java b/Mage.Sets/src/mage/cards/v/VolcanicStrength.java index fe0b988dbb..401af367e6 100644 --- a/Mage.Sets/src/mage/cards/v/VolcanicStrength.java +++ b/Mage.Sets/src/mage/cards/v/VolcanicStrength.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -53,7 +54,7 @@ public class VolcanicStrength extends CardImpl { public VolcanicStrength(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/v/VolcanoHellion.java b/Mage.Sets/src/mage/cards/v/VolcanoHellion.java index d8d9dffdd5..650f225c39 100644 --- a/Mage.Sets/src/mage/cards/v/VolcanoHellion.java +++ b/Mage.Sets/src/mage/cards/v/VolcanoHellion.java @@ -1,111 +1,112 @@ -/* - * 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.cards.v; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.dynamicvalue.common.ControllerLifeCount; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.keyword.EchoAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author jeffwadsworth - */ -public class VolcanoHellion extends CardImpl { - - public VolcanoHellion(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); - - this.subtype.add("Hellion"); - this.power = new MageInt(6); - this.toughness = new MageInt(5); - - // Volcano Hellion has echo {X}, where X is your life total. - this.addAbility(new EchoAbility(new ControllerLifeCount(), "{this} has echo {X}, where X is your life total.")); - - // When Volcano Hellion enters the battlefield, it deals an amount of damage of your choice to you and target creature. The damage can't be prevented. - Ability ability = new EntersBattlefieldTriggeredAbility(new VolcanoHellionEffect(), false); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability); - - } - - public VolcanoHellion(final VolcanoHellion card) { - super(card); - } - - @Override - public VolcanoHellion copy() { - return new VolcanoHellion(this); - } -} - -class VolcanoHellionEffect extends OneShotEffect { - - public VolcanoHellionEffect() { - super(Outcome.AIDontUseIt); - this.staticText = "it deals an amount of damage of your choice to you and target creature. The damage can't be prevented"; - } - - public VolcanoHellionEffect(final VolcanoHellionEffect effect) { - super(effect); - } - - @Override - public VolcanoHellionEffect copy() { - return new VolcanoHellionEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - Permanent permanent = game.getPermanent(source.getFirstTarget()); - if (controller != null) { - int amount = controller.getAmount(0, Integer.MAX_VALUE, "Choose the amount of damage to deliver to you and a target creature. The damage can't be prevented.", game); - if (amount > 0) { - controller.damage(amount, source.getSourceId(), game, false, false); - if (permanent != null) { - permanent.damage(amount, source.getSourceId(), game, false, false); - } - return true; - } - } - return false; - } -} +/* + * 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.cards.v; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.common.ControllerLifeCount; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.EchoAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author jeffwadsworth + */ +public class VolcanoHellion extends CardImpl { + + public VolcanoHellion(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + + this.subtype.add(SubType.HELLION); + this.power = new MageInt(6); + this.toughness = new MageInt(5); + + // Volcano Hellion has echo {X}, where X is your life total. + this.addAbility(new EchoAbility(new ControllerLifeCount(), "{this} has echo {X}, where X is your life total.")); + + // When Volcano Hellion enters the battlefield, it deals an amount of damage of your choice to you and target creature. The damage can't be prevented. + Ability ability = new EntersBattlefieldTriggeredAbility(new VolcanoHellionEffect(), false); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + } + + public VolcanoHellion(final VolcanoHellion card) { + super(card); + } + + @Override + public VolcanoHellion copy() { + return new VolcanoHellion(this); + } +} + +class VolcanoHellionEffect extends OneShotEffect { + + public VolcanoHellionEffect() { + super(Outcome.AIDontUseIt); + this.staticText = "it deals an amount of damage of your choice to you and target creature. The damage can't be prevented"; + } + + public VolcanoHellionEffect(final VolcanoHellionEffect effect) { + super(effect); + } + + @Override + public VolcanoHellionEffect copy() { + return new VolcanoHellionEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (controller != null) { + int amount = controller.getAmount(0, Integer.MAX_VALUE, "Choose the amount of damage to deliver to you and a target creature. The damage can't be prevented.", game); + if (amount > 0) { + controller.damage(amount, source.getSourceId(), game, false, false); + if (permanent != null) { + permanent.damage(amount, source.getSourceId(), game, false, false); + } + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/v/VolcanoImp.java b/Mage.Sets/src/mage/cards/v/VolcanoImp.java index 9646085b6b..3fdbe0f897 100644 --- a/Mage.Sets/src/mage/cards/v/VolcanoImp.java +++ b/Mage.Sets/src/mage/cards/v/VolcanoImp.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class VolcanoImp extends CardImpl { public VolcanoImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Imp"); + this.subtype.add(SubType.IMP); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VoldarenDuelist.java b/Mage.Sets/src/mage/cards/v/VoldarenDuelist.java index 385d27ec4a..604a069855 100644 --- a/Mage.Sets/src/mage/cards/v/VoldarenDuelist.java +++ b/Mage.Sets/src/mage/cards/v/VoldarenDuelist.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -47,8 +48,8 @@ public class VoldarenDuelist extends CardImpl { public VoldarenDuelist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Vampire"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VoldarenPariah.java b/Mage.Sets/src/mage/cards/v/VoldarenPariah.java index ec53dd5668..9aa2809f7a 100644 --- a/Mage.Sets/src/mage/cards/v/VoldarenPariah.java +++ b/Mage.Sets/src/mage/cards/v/VoldarenPariah.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.a.AbolisherOfBloodlines; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -59,8 +60,8 @@ public class VoldarenPariah extends CardImpl { public VoldarenPariah(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Horror"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VolitionReins.java b/Mage.Sets/src/mage/cards/v/VolitionReins.java index 80b9275b99..c6a278009f 100644 --- a/Mage.Sets/src/mage/cards/v/VolitionReins.java +++ b/Mage.Sets/src/mage/cards/v/VolitionReins.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -52,7 +53,7 @@ public class VolitionReins extends CardImpl { public VolitionReins(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant permanent TargetPermanent auraTarget = new TargetPermanent(); diff --git a/Mage.Sets/src/mage/cards/v/VolrathTheFallen.java b/Mage.Sets/src/mage/cards/v/VolrathTheFallen.java index 4609f83239..f75ac5002c 100644 --- a/Mage.Sets/src/mage/cards/v/VolrathTheFallen.java +++ b/Mage.Sets/src/mage/cards/v/VolrathTheFallen.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class VolrathTheFallen extends CardImpl { public VolrathTheFallen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/VolrathsCurse.java b/Mage.Sets/src/mage/cards/v/VolrathsCurse.java index 93521445b9..722cac5f34 100644 --- a/Mage.Sets/src/mage/cards/v/VolrathsCurse.java +++ b/Mage.Sets/src/mage/cards/v/VolrathsCurse.java @@ -45,6 +45,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import static mage.cards.v.VolrathsCurse.keyString; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -66,7 +67,7 @@ public class VolrathsCurse extends CardImpl { public VolrathsCurse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/v/VolrathsGardens.java b/Mage.Sets/src/mage/cards/v/VolrathsGardens.java new file mode 100644 index 0000000000..c6158aeb6a --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VolrathsGardens.java @@ -0,0 +1,74 @@ +/* + * 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.cards.v; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author TheElk801 + */ +public class VolrathsGardens extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creature you control"); + + static { + filter.add(Predicates.not(new TappedPredicate())); + } + + public VolrathsGardens(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); + + // {2}, Tap an untapped creature you control: You gain 2 life. Activate this ability only any time you could cast a sorcery. + Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), new GenericManaCost(2)); + ability.addCost(new TapTargetCost(new TargetControlledPermanent(filter))); + this.addAbility(ability); + } + + public VolrathsGardens(final VolrathsGardens card) { + super(card); + } + + @Override + public VolrathsGardens copy() { + return new VolrathsGardens(this); + } +} diff --git a/Mage.Sets/src/mage/cards/v/VolrathsShapeshifter.java b/Mage.Sets/src/mage/cards/v/VolrathsShapeshifter.java index 3d3be5018e..d2b980a0ec 100644 --- a/Mage.Sets/src/mage/cards/v/VolrathsShapeshifter.java +++ b/Mage.Sets/src/mage/cards/v/VolrathsShapeshifter.java @@ -27,7 +27,6 @@ */ package mage.cards.v; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -42,6 +41,8 @@ import mage.constants.*; import mage.game.Game; import mage.game.permanent.Permanent; +import java.util.UUID; + /** * @author ImperatorPrime */ @@ -49,7 +50,7 @@ public class VolrathsShapeshifter extends CardImpl { public VolrathsShapeshifter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(1); @@ -108,7 +109,7 @@ class VolrathsShapeshifterEffect extends ContinuousEffectImpl { permanent.getSubtype(game).clear(); for (SubType type : card.getSubtype(game)) { - if (!permanent.getSubtype(game).contains(type)) { + if (!permanent.hasSubtype(type, game)) { permanent.getSubtype(game).add(type); } } diff --git a/Mage.Sets/src/mage/cards/v/VoltaicBrawler.java b/Mage.Sets/src/mage/cards/v/VoltaicBrawler.java index c009685660..057a1a249b 100644 --- a/Mage.Sets/src/mage/cards/v/VoltaicBrawler.java +++ b/Mage.Sets/src/mage/cards/v/VoltaicBrawler.java @@ -1,80 +1,81 @@ -/* - * 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.cards.v; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.AttacksTriggeredAbility; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.common.PayEnergyCost; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.DoIfCostPaid; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; -import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; -import mage.abilities.keyword.TrampleAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; - -/** - * - * @author emerald000 - */ -public class VoltaicBrawler extends CardImpl { - - public VoltaicBrawler(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); - this.power = new MageInt(3); - this.toughness = new MageInt(2); - - // When Voltaic Brawler enters the battlefield, you get {E}{E}. - this.addAbility(new EntersBattlefieldTriggeredAbility(new GetEnergyCountersControllerEffect(2))); - - // Whenever Voltaic Brawler attacks, you may pay {E}. If you do, it gets +1/+1 and gains trample until end of turn. - Effect effect = new BoostSourceEffect(1, 1, Duration.EndOfTurn); - effect.setText("it gets +1/+1"); - DoIfCostPaid doIfCostPaid = new DoIfCostPaid(effect, new PayEnergyCost(1)); - effect = new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn); - effect.setText("and gains trample until end of turn"); - doIfCostPaid.addEffect(effect); - this.addAbility(new AttacksTriggeredAbility(doIfCostPaid, false)); - } - - public VoltaicBrawler(final VoltaicBrawler card) { - super(card); - } - - @Override - public VoltaicBrawler copy() { - return new VoltaicBrawler(this); - } -} +/* + * 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.cards.v; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.common.PayEnergyCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; + +/** + * + * @author emerald000 + */ +public class VoltaicBrawler extends CardImpl { + + public VoltaicBrawler(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // When Voltaic Brawler enters the battlefield, you get {E}{E}. + this.addAbility(new EntersBattlefieldTriggeredAbility(new GetEnergyCountersControllerEffect(2))); + + // Whenever Voltaic Brawler attacks, you may pay {E}. If you do, it gets +1/+1 and gains trample until end of turn. + Effect effect = new BoostSourceEffect(1, 1, Duration.EndOfTurn); + effect.setText("it gets +1/+1"); + DoIfCostPaid doIfCostPaid = new DoIfCostPaid(effect, new PayEnergyCost(1)); + effect = new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains trample until end of turn"); + doIfCostPaid.addEffect(effect); + this.addAbility(new AttacksTriggeredAbility(doIfCostPaid, false)); + } + + public VoltaicBrawler(final VoltaicBrawler card) { + super(card); + } + + @Override + public VoltaicBrawler copy() { + return new VoltaicBrawler(this); + } +} diff --git a/Mage.Sets/src/mage/cards/v/VoltaicConstruct.java b/Mage.Sets/src/mage/cards/v/VoltaicConstruct.java index b4ec413327..6bdd7fab3b 100644 --- a/Mage.Sets/src/mage/cards/v/VoltaicConstruct.java +++ b/Mage.Sets/src/mage/cards/v/VoltaicConstruct.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -55,8 +56,8 @@ public class VoltaicConstruct extends CardImpl { public VoltaicConstruct(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Golem"); - this.subtype.add("Construct"); + this.subtype.add(SubType.GOLEM); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(2); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new GenericManaCost(2)); diff --git a/Mage.Sets/src/mage/cards/v/VolunteerMilitia.java b/Mage.Sets/src/mage/cards/v/VolunteerMilitia.java index a70d3a97c3..8c4e1eb7f7 100644 --- a/Mage.Sets/src/mage/cards/v/VolunteerMilitia.java +++ b/Mage.Sets/src/mage/cards/v/VolunteerMilitia.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class VolunteerMilitia extends CardImpl { public VolunteerMilitia(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VonaButcherOfMagan.java b/Mage.Sets/src/mage/cards/v/VonaButcherOfMagan.java new file mode 100644 index 0000000000..6eb27ad110 --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VonaButcherOfMagan.java @@ -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.cards.v; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateIfConditionActivatedAbility; +import mage.abilities.condition.common.MyTurnCondition; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.abilities.keyword.VigilanceAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.target.common.TargetNonlandPermanent; + +/** + * + * @author TheElk801 + */ +public class VonaButcherOfMagan extends CardImpl { + + public VonaButcherOfMagan(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{B}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Lifelink + this.addAbility(LifelinkAbility.getInstance()); + + // {T}, Pay 7 life: Destroy target nonland permanent. Activate this ability only during your turn. + Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost(), MyTurnCondition.instance); + ability.addCost(new PayLifeCost(7)); + ability.addTarget(new TargetNonlandPermanent()); + this.addAbility(ability); + } + + public VonaButcherOfMagan(final VonaButcherOfMagan card) { + super(card); + } + + @Override + public VonaButcherOfMagan copy() { + return new VonaButcherOfMagan(this); + } +} diff --git a/Mage.Sets/src/mage/cards/v/VoraciousCobra.java b/Mage.Sets/src/mage/cards/v/VoraciousCobra.java index 1a1c67de11..27f9445f82 100644 --- a/Mage.Sets/src/mage/cards/v/VoraciousCobra.java +++ b/Mage.Sets/src/mage/cards/v/VoraciousCobra.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class VoraciousCobra extends CardImpl { public VoraciousCobra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VoraciousDragon.java b/Mage.Sets/src/mage/cards/v/VoraciousDragon.java index 152e1ca10b..aac4d5491e 100644 --- a/Mage.Sets/src/mage/cards/v/VoraciousDragon.java +++ b/Mage.Sets/src/mage/cards/v/VoraciousDragon.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetCreatureOrPlayer; @@ -55,7 +56,7 @@ public class VoraciousDragon extends CardImpl { public VoraciousDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -95,7 +96,7 @@ class TwiceDevouredGoblins implements DynamicValue { DevourEffect devourEffect = (DevourEffect) abilityEffect; int amountGoblins = 0; for (List subtypesItem :devourEffect.getSubtypes(game, sourcePermanent.getId())) { - if (subtypesItem.contains("Goblin")) { + if (subtypesItem.contains(SubType.GOBLIN)) { ++amountGoblins; } } diff --git a/Mage.Sets/src/mage/cards/v/VoraciousHatchling.java b/Mage.Sets/src/mage/cards/v/VoraciousHatchling.java index b57736ff82..bef192fb6b 100644 --- a/Mage.Sets/src/mage/cards/v/VoraciousHatchling.java +++ b/Mage.Sets/src/mage/cards/v/VoraciousHatchling.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,7 +58,7 @@ public class VoraciousHatchling extends CardImpl { public VoraciousHatchling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W/B}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/v/VoraciousNull.java b/Mage.Sets/src/mage/cards/v/VoraciousNull.java index 2db34dae12..55541548c8 100644 --- a/Mage.Sets/src/mage/cards/v/VoraciousNull.java +++ b/Mage.Sets/src/mage/cards/v/VoraciousNull.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.StaticFilters; @@ -50,7 +51,7 @@ public class VoraciousNull extends CardImpl { public VoraciousNull(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VoraciousReader.java b/Mage.Sets/src/mage/cards/v/VoraciousReader.java index 762a8fc2ce..601a1871a5 100644 --- a/Mage.Sets/src/mage/cards/v/VoraciousReader.java +++ b/Mage.Sets/src/mage/cards/v/VoraciousReader.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; @@ -56,8 +57,8 @@ public class VoraciousReader extends CardImpl { public VoraciousReader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Eldrazi"); - this.subtype.add("Homunculus"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.HOMUNCULUS); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/VoraciousWurm.java b/Mage.Sets/src/mage/cards/v/VoraciousWurm.java index 4dc8890407..5b1d53013a 100644 --- a/Mage.Sets/src/mage/cards/v/VoraciousWurm.java +++ b/Mage.Sets/src/mage/cards/v/VoraciousWurm.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.watchers.common.PlayerGainedLifeWatcher; @@ -45,7 +46,7 @@ public class VoraciousWurm extends CardImpl { public VoraciousWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/Vorapede.java b/Mage.Sets/src/mage/cards/v/Vorapede.java index 12bb6f2cc0..e8400aaa44 100644 --- a/Mage.Sets/src/mage/cards/v/Vorapede.java +++ b/Mage.Sets/src/mage/cards/v/Vorapede.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class Vorapede extends CardImpl { public Vorapede(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/VorelOfTheHullClade.java b/Mage.Sets/src/mage/cards/v/VorelOfTheHullClade.java index b3a68e3e70..e1b6422ea7 100644 --- a/Mage.Sets/src/mage/cards/v/VorelOfTheHullClade.java +++ b/Mage.Sets/src/mage/cards/v/VorelOfTheHullClade.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -66,8 +67,8 @@ public class VorelOfTheHullClade extends CardImpl { public VorelOfTheHullClade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/VorinclexVoiceOfHunger.java b/Mage.Sets/src/mage/cards/v/VorinclexVoiceOfHunger.java index f03039ef19..c37641832f 100644 --- a/Mage.Sets/src/mage/cards/v/VorinclexVoiceOfHunger.java +++ b/Mage.Sets/src/mage/cards/v/VorinclexVoiceOfHunger.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SetTargetPointer; import mage.constants.SuperType; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class VorinclexVoiceOfHunger extends CardImpl { public VorinclexVoiceOfHunger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Praetor"); + this.subtype.add(SubType.PRAETOR); this.power = new MageInt(7); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/v/VoroshTheHunter.java b/Mage.Sets/src/mage/cards/v/VoroshTheHunter.java index a076578f54..8c386f7d1a 100644 --- a/Mage.Sets/src/mage/cards/v/VoroshTheHunter.java +++ b/Mage.Sets/src/mage/cards/v/VoroshTheHunter.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.counters.CounterType; @@ -49,7 +50,7 @@ public class VoroshTheHunter extends CardImpl { public VoroshTheHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/v/VorracBattlehorns.java b/Mage.Sets/src/mage/cards/v/VorracBattlehorns.java index 003c041f2e..07325eb2a4 100644 --- a/Mage.Sets/src/mage/cards/v/VorracBattlehorns.java +++ b/Mage.Sets/src/mage/cards/v/VorracBattlehorns.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -57,7 +58,7 @@ public class VorracBattlehorns extends CardImpl { public VorracBattlehorns(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has trample and can't be blocked by more than one creature. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.EQUIPMENT)); diff --git a/Mage.Sets/src/mage/cards/v/Vorstclaw.java b/Mage.Sets/src/mage/cards/v/Vorstclaw.java index 26c4c9b4e6..891b3df104 100644 --- a/Mage.Sets/src/mage/cards/v/Vorstclaw.java +++ b/Mage.Sets/src/mage/cards/v/Vorstclaw.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class Vorstclaw extends CardImpl { public Vorstclaw(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Elemental"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.HORROR); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/v/VortexElemental.java b/Mage.Sets/src/mage/cards/v/VortexElemental.java index 6f2258ed13..9ffed7a4cf 100644 --- a/Mage.Sets/src/mage/cards/v/VortexElemental.java +++ b/Mage.Sets/src/mage/cards/v/VortexElemental.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.combat.MustBeBlockedByTargetSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -56,7 +57,7 @@ public class VortexElemental extends CardImpl { public VortexElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VotaryOfTheConclave.java b/Mage.Sets/src/mage/cards/v/VotaryOfTheConclave.java index d998ee30cf..59788f7890 100644 --- a/Mage.Sets/src/mage/cards/v/VotaryOfTheConclave.java +++ b/Mage.Sets/src/mage/cards/v/VotaryOfTheConclave.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class VotaryOfTheConclave extends CardImpl { public VotaryOfTheConclave (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VowOfDuty.java b/Mage.Sets/src/mage/cards/v/VowOfDuty.java index 5b91423bdf..dfe4169a36 100644 --- a/Mage.Sets/src/mage/cards/v/VowOfDuty.java +++ b/Mage.Sets/src/mage/cards/v/VowOfDuty.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class VowOfDuty extends CardImpl { public VowOfDuty(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/v/VowOfFlight.java b/Mage.Sets/src/mage/cards/v/VowOfFlight.java index 128d22b591..351913dd6a 100644 --- a/Mage.Sets/src/mage/cards/v/VowOfFlight.java +++ b/Mage.Sets/src/mage/cards/v/VowOfFlight.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class VowOfFlight extends CardImpl { public VowOfFlight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/v/VowOfLightning.java b/Mage.Sets/src/mage/cards/v/VowOfLightning.java index 7906b576c4..4adabe634c 100644 --- a/Mage.Sets/src/mage/cards/v/VowOfLightning.java +++ b/Mage.Sets/src/mage/cards/v/VowOfLightning.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class VowOfLightning extends CardImpl { public VowOfLightning(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/v/VowOfMalice.java b/Mage.Sets/src/mage/cards/v/VowOfMalice.java index d3ffdfb535..f741904d28 100644 --- a/Mage.Sets/src/mage/cards/v/VowOfMalice.java +++ b/Mage.Sets/src/mage/cards/v/VowOfMalice.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class VowOfMalice extends CardImpl { public VowOfMalice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/v/VowOfWildness.java b/Mage.Sets/src/mage/cards/v/VowOfWildness.java index 9c0cd73a06..b136c49682 100644 --- a/Mage.Sets/src/mage/cards/v/VowOfWildness.java +++ b/Mage.Sets/src/mage/cards/v/VowOfWildness.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class VowOfWildness extends CardImpl { public VowOfWildness(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/v/VoyagerDrake.java b/Mage.Sets/src/mage/cards/v/VoyagerDrake.java index ffd28c9926..79665ee283 100644 --- a/Mage.Sets/src/mage/cards/v/VoyagerDrake.java +++ b/Mage.Sets/src/mage/cards/v/VoyagerDrake.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.MultikickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.game.Game; import mage.target.common.TargetCreaturePermanent; @@ -54,7 +55,7 @@ public class VoyagerDrake extends CardImpl { public VoyagerDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VoyagingSatyr.java b/Mage.Sets/src/mage/cards/v/VoyagingSatyr.java index 9432709ec2..e82d9786c3 100644 --- a/Mage.Sets/src/mage/cards/v/VoyagingSatyr.java +++ b/Mage.Sets/src/mage/cards/v/VoyagingSatyr.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetLandPermanent; @@ -47,8 +48,8 @@ public class VoyagingSatyr extends CardImpl { public VoyagingSatyr(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Satyr"); - this.subtype.add("Druid"); + this.subtype.add(SubType.SATYR); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VraskaRelicSeeker.java b/Mage.Sets/src/mage/cards/v/VraskaRelicSeeker.java new file mode 100644 index 0000000000..0ca53b9549 --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VraskaRelicSeeker.java @@ -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.cards.v; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.LoyaltyAbility; +import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.PirateToken; +import mage.game.permanent.token.TreasureToken; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.target.TargetPlayer; + +/** + * + * @author TheElk801 + */ +public class VraskaRelicSeeker extends CardImpl { + + public VraskaRelicSeeker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{B}{G}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.VRASKA); + + this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(6)); + + //+2: Create a 2/2 black Pirate creature token with menace. + this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new PirateToken()), 2)); + + //-3: Destroy target artifact, creature, or enchantment. Create a colorless Treasure artifact token with "T, Sacrfice this artifact. Add one mana of any color to your mana pool." + Ability ability = new LoyaltyAbility(new VraskaRelicSeekerDestroyEffect(), -3); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_CREATURE_OR_ENCHANTMENT)); + this.addAbility(ability); + + //-10: Target player's life total becomes 1 + ability = new LoyaltyAbility(new VraskaRelicSeekerLifeTotalEffect(), -10); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public VraskaRelicSeeker(final VraskaRelicSeeker card) { + super(card); + } + + @Override + public VraskaRelicSeeker copy() { + return new VraskaRelicSeeker(this); + } +} + +class VraskaRelicSeekerDestroyEffect extends OneShotEffect { + + VraskaRelicSeekerDestroyEffect() { + super(Outcome.Benefit); + this.staticText = "Destroy target artifact, creature, or enchantment. Create a colorless Treasure artifact token with \"{T}, Sacrifice this artifact. Add one mana of any color to your mana pool.\""; + } + + VraskaRelicSeekerDestroyEffect(final VraskaRelicSeekerDestroyEffect effect) { + super(effect); + } + + @Override + public VraskaRelicSeekerDestroyEffect copy() { + return new VraskaRelicSeekerDestroyEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (UUID permanentId : targetPointer.getTargets(game, source)) { + Permanent permanent = game.getPermanent(permanentId); + if (permanent != null) { + permanent.destroy(source.getSourceId(), game, false); + } + } + return new CreateTokenEffect(new TreasureToken()).apply(game, source); + } +} + +class VraskaRelicSeekerLifeTotalEffect extends OneShotEffect { + + public VraskaRelicSeekerLifeTotalEffect() { + super(Outcome.Benefit); + staticText = "Target player's life total becomes 1"; + } + + public VraskaRelicSeekerLifeTotalEffect(VraskaRelicSeekerLifeTotalEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + if (player != null) { + player.setLife(1, game); + return true; + } + return false; + } + + @Override + public VraskaRelicSeekerLifeTotalEffect copy() { + return new VraskaRelicSeekerLifeTotalEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/v/VraskaTheUnseen.java b/Mage.Sets/src/mage/cards/v/VraskaTheUnseen.java index f046f8f9dd..cbb0601f98 100644 --- a/Mage.Sets/src/mage/cards/v/VraskaTheUnseen.java +++ b/Mage.Sets/src/mage/cards/v/VraskaTheUnseen.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -70,7 +71,7 @@ public class VraskaTheUnseen extends CardImpl { public VraskaTheUnseen(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{B}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vraska"); + this.subtype.add(SubType.VRASKA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); diff --git a/Mage.Sets/src/mage/cards/v/VrynWingmare.java b/Mage.Sets/src/mage/cards/v/VrynWingmare.java index ec59af0f7d..03d12ed087 100644 --- a/Mage.Sets/src/mage/cards/v/VrynWingmare.java +++ b/Mage.Sets/src/mage/cards/v/VrynWingmare.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.CostModificationType; import mage.constants.Duration; import mage.constants.Outcome; @@ -54,7 +55,7 @@ public class VrynWingmare extends CardImpl { public VrynWingmare(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Pegasus"); + this.subtype.add(SubType.PEGASUS); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VugLizard.java b/Mage.Sets/src/mage/cards/v/VugLizard.java index b8c9459293..26f37a05c1 100644 --- a/Mage.Sets/src/mage/cards/v/VugLizard.java +++ b/Mage.Sets/src/mage/cards/v/VugLizard.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class VugLizard extends CardImpl { public VugLizard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/v/VulpineGoliath.java b/Mage.Sets/src/mage/cards/v/VulpineGoliath.java index b09abc9637..08e6d4b06b 100644 --- a/Mage.Sets/src/mage/cards/v/VulpineGoliath.java +++ b/Mage.Sets/src/mage/cards/v/VulpineGoliath.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class VulpineGoliath extends CardImpl { public VulpineGoliath(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Fox"); + this.subtype.add(SubType.FOX); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/v/VulshokBattlegear.java b/Mage.Sets/src/mage/cards/v/VulshokBattlegear.java index bfd2e40ac2..a752d1b28f 100644 --- a/Mage.Sets/src/mage/cards/v/VulshokBattlegear.java +++ b/Mage.Sets/src/mage/cards/v/VulshokBattlegear.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class VulshokBattlegear extends CardImpl { public VulshokBattlegear (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(3))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 3))); } diff --git a/Mage.Sets/src/mage/cards/v/VulshokBattlemaster.java b/Mage.Sets/src/mage/cards/v/VulshokBattlemaster.java index e00ad921a4..f4c5722c92 100644 --- a/Mage.Sets/src/mage/cards/v/VulshokBattlemaster.java +++ b/Mage.Sets/src/mage/cards/v/VulshokBattlemaster.java @@ -51,8 +51,8 @@ public class VulshokBattlemaster extends CardImpl { public VulshokBattlemaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VulshokBerserker.java b/Mage.Sets/src/mage/cards/v/VulshokBerserker.java index c400b2b954..c93788e49a 100644 --- a/Mage.Sets/src/mage/cards/v/VulshokBerserker.java +++ b/Mage.Sets/src/mage/cards/v/VulshokBerserker.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class VulshokBerserker extends CardImpl { public VulshokBerserker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VulshokGauntlets.java b/Mage.Sets/src/mage/cards/v/VulshokGauntlets.java index 0b9e8a487d..0aa5c1f9de 100644 --- a/Mage.Sets/src/mage/cards/v/VulshokGauntlets.java +++ b/Mage.Sets/src/mage/cards/v/VulshokGauntlets.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.PhaseStep; @@ -54,7 +55,7 @@ public class VulshokGauntlets extends CardImpl { public VulshokGauntlets(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +4/+2 and doesn't untap during its controller's untap step. Effect effect = new BoostEquippedEffect(4, 2); diff --git a/Mage.Sets/src/mage/cards/v/VulshokHeartstoker.java b/Mage.Sets/src/mage/cards/v/VulshokHeartstoker.java index 596580502b..f8412c6434 100644 --- a/Mage.Sets/src/mage/cards/v/VulshokHeartstoker.java +++ b/Mage.Sets/src/mage/cards/v/VulshokHeartstoker.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -47,8 +48,8 @@ public class VulshokHeartstoker extends CardImpl { public VulshokHeartstoker (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VulshokMorningstar.java b/Mage.Sets/src/mage/cards/v/VulshokMorningstar.java index 6e0c922403..67281f192c 100644 --- a/Mage.Sets/src/mage/cards/v/VulshokMorningstar.java +++ b/Mage.Sets/src/mage/cards/v/VulshokMorningstar.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class VulshokMorningstar extends CardImpl { public VulshokMorningstar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2))); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); } diff --git a/Mage.Sets/src/mage/cards/v/VulshokRefugee.java b/Mage.Sets/src/mage/cards/v/VulshokRefugee.java index 214eb83767..3cfef77bdb 100644 --- a/Mage.Sets/src/mage/cards/v/VulshokRefugee.java +++ b/Mage.Sets/src/mage/cards/v/VulshokRefugee.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class VulshokRefugee extends CardImpl { public VulshokRefugee(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VulshokReplica.java b/Mage.Sets/src/mage/cards/v/VulshokReplica.java index 8e0891b5ff..ef2ac27da1 100644 --- a/Mage.Sets/src/mage/cards/v/VulshokReplica.java +++ b/Mage.Sets/src/mage/cards/v/VulshokReplica.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -49,7 +50,7 @@ public class VulshokReplica extends CardImpl { public VulshokReplica (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(3); this.toughness = new MageInt(1); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new ManaCostsImpl("{1}{R}")); diff --git a/Mage.Sets/src/mage/cards/v/VulshokSorcerer.java b/Mage.Sets/src/mage/cards/v/VulshokSorcerer.java index 0cb6bbf2ea..7f718b0f3b 100644 --- a/Mage.Sets/src/mage/cards/v/VulshokSorcerer.java +++ b/Mage.Sets/src/mage/cards/v/VulshokSorcerer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,8 +49,8 @@ public class VulshokSorcerer extends CardImpl { public VulshokSorcerer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/v/VulshokWarBoar.java b/Mage.Sets/src/mage/cards/v/VulshokWarBoar.java index c79b89fbc8..0f71c5901c 100644 --- a/Mage.Sets/src/mage/cards/v/VulshokWarBoar.java +++ b/Mage.Sets/src/mage/cards/v/VulshokWarBoar.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledArtifactPermanent; import mage.filter.common.FilterControlledPermanent; import mage.target.common.TargetControlledPermanent; @@ -49,8 +50,8 @@ public class VulshokWarBoar extends CardImpl { public VulshokWarBoar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Boar"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BOAR); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/v/VulturousAven.java b/Mage.Sets/src/mage/cards/v/VulturousAven.java index 94ccd8223a..d56c7d610f 100644 --- a/Mage.Sets/src/mage/cards/v/VulturousAven.java +++ b/Mage.Sets/src/mage/cards/v/VulturousAven.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -48,8 +49,8 @@ public class VulturousAven extends CardImpl { public VulturousAven(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Bird"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/v/VulturousZombie.java b/Mage.Sets/src/mage/cards/v/VulturousZombie.java index 5b3fc33f5f..e1a6cf93d1 100644 --- a/Mage.Sets/src/mage/cards/v/VulturousZombie.java +++ b/Mage.Sets/src/mage/cards/v/VulturousZombie.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.counters.CounterType; @@ -47,8 +48,8 @@ public class VulturousZombie extends CardImpl { public VulturousZombie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WailingGhoul.java b/Mage.Sets/src/mage/cards/w/WailingGhoul.java index b8f1ea7331..6bc902434a 100644 --- a/Mage.Sets/src/mage/cards/w/WailingGhoul.java +++ b/Mage.Sets/src/mage/cards/w/WailingGhoul.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class WailingGhoul extends CardImpl { public WailingGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WakeOfDestruction.java b/Mage.Sets/src/mage/cards/w/WakeOfDestruction.java index 2af8c74899..8898948e5d 100644 --- a/Mage.Sets/src/mage/cards/w/WakeOfDestruction.java +++ b/Mage.Sets/src/mage/cards/w/WakeOfDestruction.java @@ -1,59 +1,59 @@ -/* - * 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.cards.w; - -import java.util.UUID; -import mage.abilities.effects.common.DestroyAllNamedPermanentsEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.target.common.TargetLandPermanent; - -/** - * - * @author Styxo - */ -public class WakeOfDestruction extends CardImpl { - - public WakeOfDestruction(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}{R}"); - - // Destroy target land and all other lands with the same name as that land. - this.getSpellAbility().addTarget(new TargetLandPermanent()); - this.getSpellAbility().addEffect(new DestroyAllNamedPermanentsEffect()); - } - - public WakeOfDestruction(final WakeOfDestruction card) { - super(card); - } - - @Override - public WakeOfDestruction copy() { - return new WakeOfDestruction(this); - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.abilities.effects.common.DestroyAllNamedPermanentsEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author Styxo + */ +public class WakeOfDestruction extends CardImpl { + + public WakeOfDestruction(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}{R}"); + + // Destroy target land and all other lands with the same name as that land. + this.getSpellAbility().addTarget(new TargetLandPermanent()); + this.getSpellAbility().addEffect(new DestroyAllNamedPermanentsEffect()); + } + + public WakeOfDestruction(final WakeOfDestruction card) { + super(card); + } + + @Override + public WakeOfDestruction copy() { + return new WakeOfDestruction(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WakeOfVultures.java b/Mage.Sets/src/mage/cards/w/WakeOfVultures.java index de1a5cd1d4..e59d24284e 100644 --- a/Mage.Sets/src/mage/cards/w/WakeOfVultures.java +++ b/Mage.Sets/src/mage/cards/w/WakeOfVultures.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -49,7 +50,7 @@ public class WakeOfVultures extends CardImpl { public WakeOfVultures(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WakeThrasher.java b/Mage.Sets/src/mage/cards/w/WakeThrasher.java index e9ecfc4ed3..b9f7be99fe 100644 --- a/Mage.Sets/src/mage/cards/w/WakeThrasher.java +++ b/Mage.Sets/src/mage/cards/w/WakeThrasher.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -48,15 +49,15 @@ import mage.game.events.GameEvent.EventType; public class WakeThrasher extends CardImpl { public WakeThrasher(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Soldier"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); // Whenever a permanent you control becomes untapped, Wake Thrasher gets +1/+1 until end of turn. - this.addAbility(new BecomesUntappedControlledPermanentTriggeredAbility(new BoostSourceEffect(1,1, Duration.EndOfTurn), false)); + this.addAbility(new BecomesUntappedControlledPermanentTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false)); } @@ -70,7 +71,7 @@ public class WakeThrasher extends CardImpl { } } -class BecomesUntappedControlledPermanentTriggeredAbility extends TriggeredAbilityImpl{ +class BecomesUntappedControlledPermanentTriggeredAbility extends TriggeredAbilityImpl { public BecomesUntappedControlledPermanentTriggeredAbility(Effect effect, boolean optional) { super(Zone.BATTLEFIELD, effect, optional); @@ -97,7 +98,7 @@ class BecomesUntappedControlledPermanentTriggeredAbility extends TriggeredAbilit @Override public String getRule() { - return "When a permanent you control becomes untapped, " + super.getRule(); + return "Whenever a permanent you control becomes untapped, " + super.getRule(); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/w/Wakedancer.java b/Mage.Sets/src/mage/cards/w/Wakedancer.java index 51fe5ab6cb..972ab29c4e 100644 --- a/Mage.Sets/src/mage/cards/w/Wakedancer.java +++ b/Mage.Sets/src/mage/cards/w/Wakedancer.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.ZombieToken; /** @@ -49,8 +50,8 @@ public class Wakedancer extends CardImpl { public Wakedancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.color.setBlack(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WakeningSunsAvatar.java b/Mage.Sets/src/mage/cards/w/WakeningSunsAvatar.java new file mode 100644 index 0000000000..0cc7bf0a49 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WakeningSunsAvatar.java @@ -0,0 +1,81 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.CastFromHandSourceCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.watchers.common.CastFromHandWatcher; + +/** + * + * @author TheElk801 + */ +public class WakeningSunsAvatar extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Dinosaur creatures"); + + static { + filter.add(Predicates.not(new SubtypePredicate(SubType.DINOSAUR))); + } + + public WakeningSunsAvatar(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}{W}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.subtype.add(SubType.AVATAR); + this.power = new MageInt(7); + this.toughness = new MageInt(7); + + // When Wakening Sun's Avatar enters the battlefield, if you cast it from you hand, destroy all non-Dinosaur creatures. + this.addAbility(new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new DestroyAllEffect(filter), false), + CastFromHandSourceCondition.instance, + "When {this} enters the battlefield, if you cast it from your hand, destroy all non-Dinosaur creatures."), + new CastFromHandWatcher()); + } + + public WakeningSunsAvatar(final WakeningSunsAvatar card) { + super(card); + } + + @Override + public WakeningSunsAvatar copy() { + return new WakeningSunsAvatar(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WakerOfTheWilds.java b/Mage.Sets/src/mage/cards/w/WakerOfTheWilds.java index 2c93d6a8fc..ab1ff75772 100644 --- a/Mage.Sets/src/mage/cards/w/WakerOfTheWilds.java +++ b/Mage.Sets/src/mage/cards/w/WakerOfTheWilds.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterControlledLandPermanent; @@ -55,16 +56,22 @@ public class WakerOfTheWilds extends CardImpl { public WakerOfTheWilds(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); - this.subtype.add("Merfolk"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); // {X}{G}{G}: Put X +1/+1 counters on target land you control. That land becomes a 0/0 Elemental creature with haste that's still a land. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new AddCountersTargetEffect(CounterType.P1P1.createInstance(0), new ManacostVariableValue()), new ManaCostsImpl("{X}{G}{G}")); + Ability ability = new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new AddCountersTargetEffect( + CounterType.P1P1.createInstance(0), + new ManacostVariableValue() + ).setText("Put X +1/+1 counters on target land you control."), + new ManaCostsImpl("{X}{G}{G}") + ); Effect effect = new BecomesCreatureTargetEffect(new WallOfResurgenceToken(), false, true, Duration.Custom); - effect.setText("That land becomes a 0/0 Elemental creature with haste that's still a land"); + effect.setText("That land becomes a 0/0 Elemental creature with haste. It's still a land"); ability.addEffect(effect); ability.addTarget(new TargetControlledPermanent(new FilterControlledLandPermanent())); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/w/WakestoneGargoyle.java b/Mage.Sets/src/mage/cards/w/WakestoneGargoyle.java index fabe985239..7da0bda098 100644 --- a/Mage.Sets/src/mage/cards/w/WakestoneGargoyle.java +++ b/Mage.Sets/src/mage/cards/w/WakestoneGargoyle.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -56,7 +57,7 @@ public class WakestoneGargoyle extends CardImpl { public WakestoneGargoyle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Gargoyle"); + this.subtype.add(SubType.GARGOYLE); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WalkerOfSecretWays.java b/Mage.Sets/src/mage/cards/w/WalkerOfSecretWays.java index ca0b759851..084755f62d 100644 --- a/Mage.Sets/src/mage/cards/w/WalkerOfSecretWays.java +++ b/Mage.Sets/src/mage/cards/w/WalkerOfSecretWays.java @@ -27,7 +27,6 @@ */ package mage.cards.w; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.ActivateIfConditionActivatedAbility; @@ -49,6 +48,8 @@ import mage.game.Game; import mage.players.Player; import mage.target.common.TargetControlledCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -62,8 +63,8 @@ public class WalkerOfSecretWays extends CardImpl { public WalkerOfSecretWays(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Ninja"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NINJA); this.power = new MageInt(1); this.toughness = new MageInt(2); @@ -72,7 +73,7 @@ public class WalkerOfSecretWays extends CardImpl { this.addAbility(new NinjutsuAbility(new ManaCostsImpl("{1}{U}"))); // Whenever Walker of Secret Ways deals combat damage to a player, look at that player's hand. - this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new WalkerOfSecretWaysEffect(), true, true)); + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new WalkerOfSecretWaysEffect(), false, true)); // {1}{U}: Return target Ninja you control to its owner's hand. Activate this ability only during your turn. Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{1}{U}"), MyTurnCondition.instance); diff --git a/Mage.Sets/src/mage/cards/w/WalkerOfTheGrove.java b/Mage.Sets/src/mage/cards/w/WalkerOfTheGrove.java index a2dd8ea2dc..657bd63139 100644 --- a/Mage.Sets/src/mage/cards/w/WalkerOfTheGrove.java +++ b/Mage.Sets/src/mage/cards/w/WalkerOfTheGrove.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.EvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.WalkerOfTheGroveToken; /** @@ -45,7 +46,7 @@ public class WalkerOfTheGrove extends CardImpl { public WalkerOfTheGrove(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/w/WalkerOfTheWastes.java b/Mage.Sets/src/mage/cards/w/WalkerOfTheWastes.java index 714cc05394..a4c01edc1e 100644 --- a/Mage.Sets/src/mage/cards/w/WalkerOfTheWastes.java +++ b/Mage.Sets/src/mage/cards/w/WalkerOfTheWastes.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -58,7 +59,7 @@ public class WalkerOfTheWastes extends CardImpl { public WalkerOfTheWastes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{C}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WalkingArchive.java b/Mage.Sets/src/mage/cards/w/WalkingArchive.java index 57b9b7abb4..5380e6a38c 100644 --- a/Mage.Sets/src/mage/cards/w/WalkingArchive.java +++ b/Mage.Sets/src/mage/cards/w/WalkingArchive.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; @@ -52,7 +53,7 @@ public class WalkingArchive extends CardImpl { public WalkingArchive(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WalkingAtlas.java b/Mage.Sets/src/mage/cards/w/WalkingAtlas.java index 39aeb0ed3b..19a64228c4 100644 --- a/Mage.Sets/src/mage/cards/w/WalkingAtlas.java +++ b/Mage.Sets/src/mage/cards/w/WalkingAtlas.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.PutLandFromHandOntoBattlefieldEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class WalkingAtlas extends CardImpl { public WalkingAtlas (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WalkingBallista.java b/Mage.Sets/src/mage/cards/w/WalkingBallista.java index cd9f76dd79..8b25048479 100644 --- a/Mage.Sets/src/mage/cards/w/WalkingBallista.java +++ b/Mage.Sets/src/mage/cards/w/WalkingBallista.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreatureOrPlayer; @@ -54,7 +55,7 @@ public class WalkingBallista extends CardImpl { public WalkingBallista(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{X}{X}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/w/WalkingCorpse.java b/Mage.Sets/src/mage/cards/w/WalkingCorpse.java index 7b401d0876..f8dea845ee 100644 --- a/Mage.Sets/src/mage/cards/w/WalkingCorpse.java +++ b/Mage.Sets/src/mage/cards/w/WalkingCorpse.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author nantuko @@ -40,7 +41,7 @@ public class WalkingCorpse extends CardImpl { public WalkingCorpse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WalkingDead.java b/Mage.Sets/src/mage/cards/w/WalkingDead.java index 6d92fc7eeb..2bcb86def2 100644 --- a/Mage.Sets/src/mage/cards/w/WalkingDead.java +++ b/Mage.Sets/src/mage/cards/w/WalkingDead.java @@ -1,64 +1,65 @@ -/* - * 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.cards.w; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.RegenerateSourceEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; - -/** - * - * @author Derpthemeus - */ -public class WalkingDead extends CardImpl { - - public WalkingDead(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); - this.power = new MageInt(1); - this.toughness = new MageInt(1); - - // {B}: Regenerate Walking Dead. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{B}"))); - } - - public WalkingDead(final WalkingDead card) { - super(card); - } - - @Override - public WalkingDead copy() { - return new WalkingDead(this); - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.RegenerateSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author Derpthemeus + */ +public class WalkingDead extends CardImpl { + + public WalkingDead(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); + this.subtype.add(SubType.ZOMBIE); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {B}: Regenerate Walking Dead. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{B}"))); + } + + public WalkingDead(final WalkingDead card) { + super(card); + } + + @Override + public WalkingDead copy() { + return new WalkingDead(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WalkingDesecration.java b/Mage.Sets/src/mage/cards/w/WalkingDesecration.java index fcc72c627d..54988c4923 100644 --- a/Mage.Sets/src/mage/cards/w/WalkingDesecration.java +++ b/Mage.Sets/src/mage/cards/w/WalkingDesecration.java @@ -55,7 +55,7 @@ public class WalkingDesecration extends CardImpl { public WalkingDesecration(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WalkingWall.java b/Mage.Sets/src/mage/cards/w/WalkingWall.java index f94c243143..e784b8fcad 100644 --- a/Mage.Sets/src/mage/cards/w/WalkingWall.java +++ b/Mage.Sets/src/mage/cards/w/WalkingWall.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class WalkingWall extends CardImpl { public WalkingWall(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/w/WallOfAir.java b/Mage.Sets/src/mage/cards/w/WallOfAir.java index e03fad3028..970a876c44 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfAir.java +++ b/Mage.Sets/src/mage/cards/w/WallOfAir.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class WallOfAir extends CardImpl { public WallOfAir(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/w/WallOfBlood.java b/Mage.Sets/src/mage/cards/w/WallOfBlood.java index 832bf4b104..d2223b2f3b 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfBlood.java +++ b/Mage.Sets/src/mage/cards/w/WallOfBlood.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class WallOfBlood extends CardImpl { public WallOfBlood(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WallOfBlossoms.java b/Mage.Sets/src/mage/cards/w/WallOfBlossoms.java index 1ee8306c2e..d3759a3ff4 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfBlossoms.java +++ b/Mage.Sets/src/mage/cards/w/WallOfBlossoms.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class WallOfBlossoms extends CardImpl { public WallOfBlossoms(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Wall"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WallOfBone.java b/Mage.Sets/src/mage/cards/w/WallOfBone.java index 90603a8574..b769d89bbf 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfBone.java +++ b/Mage.Sets/src/mage/cards/w/WallOfBone.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,8 +48,8 @@ public class WallOfBone extends CardImpl { public WallOfBone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Skeleton"); - this.subtype.add("Wall"); + this.subtype.add(SubType.SKELETON); + this.subtype.add(SubType.WALL); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WallOfBrambles.java b/Mage.Sets/src/mage/cards/w/WallOfBrambles.java index f2e7421f94..97df00197d 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfBrambles.java +++ b/Mage.Sets/src/mage/cards/w/WallOfBrambles.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class WallOfBrambles extends CardImpl { public WallOfBrambles(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Wall"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.WALL); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WallOfDeceit.java b/Mage.Sets/src/mage/cards/w/WallOfDeceit.java index 9be5d42aa9..a949113345 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfDeceit.java +++ b/Mage.Sets/src/mage/cards/w/WallOfDeceit.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class WallOfDeceit extends CardImpl { public WallOfDeceit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/w/WallOfDenial.java b/Mage.Sets/src/mage/cards/w/WallOfDenial.java index e588413d55..cfc9219a04 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfDenial.java +++ b/Mage.Sets/src/mage/cards/w/WallOfDenial.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class WallOfDenial extends CardImpl { public WallOfDenial (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{U}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/w/WallOfDiffusion.java b/Mage.Sets/src/mage/cards/w/WallOfDiffusion.java index 8a02b95e4e..216bfe8da5 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfDiffusion.java +++ b/Mage.Sets/src/mage/cards/w/WallOfDiffusion.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class WallOfDiffusion extends CardImpl { public WallOfDiffusion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/w/WallOfDistortion.java b/Mage.Sets/src/mage/cards/w/WallOfDistortion.java new file mode 100644 index 0000000000..707924c0ce --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WallOfDistortion.java @@ -0,0 +1,76 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.constants.SubType; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.target.TargetPlayer; + +/** + * + * @author TheElk801 + */ +public class WallOfDistortion extends CardImpl { + + public WallOfDistortion(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + + this.subtype.add(SubType.WALL); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + + // {2}{B}, {tap}: Target player discards a card. Activate this ability only any time you could cast a sorcery. + Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(1), new ManaCostsImpl("{2}{B}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public WallOfDistortion(final WallOfDistortion card) { + super(card); + } + + @Override + public WallOfDistortion copy() { + return new WallOfDistortion(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WallOfEarth.java b/Mage.Sets/src/mage/cards/w/WallOfEarth.java index b8a880df17..2d910ca284 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfEarth.java +++ b/Mage.Sets/src/mage/cards/w/WallOfEarth.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class WallOfEarth extends CardImpl { public WallOfEarth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/w/WallOfEssence.java b/Mage.Sets/src/mage/cards/w/WallOfEssence.java index 604bfe0409..56222e39cb 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfEssence.java +++ b/Mage.Sets/src/mage/cards/w/WallOfEssence.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -52,7 +53,7 @@ public class WallOfEssence extends CardImpl { public WallOfEssence(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WallOfFaith.java b/Mage.Sets/src/mage/cards/w/WallOfFaith.java index be4ac52b89..37d8e98b00 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfFaith.java +++ b/Mage.Sets/src/mage/cards/w/WallOfFaith.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class WallOfFaith extends CardImpl { public WallOfFaith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/w/WallOfFire.java b/Mage.Sets/src/mage/cards/w/WallOfFire.java index 1491dd7d85..510dcf7369 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfFire.java +++ b/Mage.Sets/src/mage/cards/w/WallOfFire.java @@ -45,7 +45,7 @@ public class WallOfFire extends CardImpl { public WallOfFire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/w/WallOfForgottenPharaohs.java b/Mage.Sets/src/mage/cards/w/WallOfForgottenPharaohs.java index 6abc7f0e5a..521517ebf2 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfForgottenPharaohs.java +++ b/Mage.Sets/src/mage/cards/w/WallOfForgottenPharaohs.java @@ -64,7 +64,7 @@ public class WallOfForgottenPharaohs extends CardImpl { public WallOfForgottenPharaohs(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WallOfFrost.java b/Mage.Sets/src/mage/cards/w/WallOfFrost.java index cacfbfcc1f..fcd18307cd 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfFrost.java +++ b/Mage.Sets/src/mage/cards/w/WallOfFrost.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author BetaSteward_at_googlemail.com @@ -43,7 +44,7 @@ public class WallOfFrost extends CardImpl { public WallOfFrost(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/w/WallOfGlare.java b/Mage.Sets/src/mage/cards/w/WallOfGlare.java index dc18435326..2a46c39de9 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfGlare.java +++ b/Mage.Sets/src/mage/cards/w/WallOfGlare.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,7 +46,7 @@ public class WallOfGlare extends CardImpl { public WallOfGlare(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/w/WallOfGranite.java b/Mage.Sets/src/mage/cards/w/WallOfGranite.java index 5378a76d2d..f1cd9d691c 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfGranite.java +++ b/Mage.Sets/src/mage/cards/w/WallOfGranite.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class WallOfGranite extends CardImpl { public WallOfGranite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/w/WallOfHeat.java b/Mage.Sets/src/mage/cards/w/WallOfHeat.java index 88887cccaa..3d7642226b 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfHeat.java +++ b/Mage.Sets/src/mage/cards/w/WallOfHeat.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class WallOfHeat extends CardImpl { public WallOfHeat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(2); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/w/WallOfHope.java b/Mage.Sets/src/mage/cards/w/WallOfHope.java index 6e2a892fe5..d0a3a9e521 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfHope.java +++ b/Mage.Sets/src/mage/cards/w/WallOfHope.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,7 @@ public class WallOfHope extends CardImpl { public WallOfHope(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WallOfIce.java b/Mage.Sets/src/mage/cards/w/WallOfIce.java index 78c6bb9c90..302d1e45e5 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfIce.java +++ b/Mage.Sets/src/mage/cards/w/WallOfIce.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class WallOfIce extends CardImpl { public WallOfIce(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/w/WallOfJunk.java b/Mage.Sets/src/mage/cards/w/WallOfJunk.java new file mode 100644 index 0000000000..39bf45f978 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WallOfJunk.java @@ -0,0 +1,73 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class WallOfJunk extends CardImpl { + + public WallOfJunk(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); + this.subtype.add(SubType.WALL); + this.power = new MageInt(0); + this.toughness = new MageInt(7); + + // Defender (This creature can't attack.) + this.addAbility(DefenderAbility.getInstance()); + + // When Wall of Junk blocks, return it to its owner's hand at end of combat. + Effect effect = new CreateDelayedTriggeredAbilityEffect( + new AtTheEndOfCombatDelayedTriggeredAbility(new ReturnToHandSourceEffect(true))); + effect.setText("return it to its owner's hand at end of combat"); + this.addAbility(new BlocksTriggeredAbility(effect, false, false, true)); + } + + public WallOfJunk(final WallOfJunk card) { + super(card); + } + + @Override + public WallOfJunk copy() { + return new WallOfJunk(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WallOfKelp.java b/Mage.Sets/src/mage/cards/w/WallOfKelp.java index 7b204f8b83..9b411a7880 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfKelp.java +++ b/Mage.Sets/src/mage/cards/w/WallOfKelp.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.KelpToken; @@ -49,8 +50,8 @@ public class WallOfKelp extends CardImpl { public WallOfKelp(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{U}"); - this.subtype.add("Plant"); - this.subtype.add("Wall"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WallOfLava.java b/Mage.Sets/src/mage/cards/w/WallOfLava.java index 9c032f6f49..322b7f5e00 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfLava.java +++ b/Mage.Sets/src/mage/cards/w/WallOfLava.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class WallOfLava extends CardImpl { public WallOfLava(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WallOfLight.java b/Mage.Sets/src/mage/cards/w/WallOfLight.java index 44aee44805..09603a29f4 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfLight.java +++ b/Mage.Sets/src/mage/cards/w/WallOfLight.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class WallOfLight extends CardImpl { public WallOfLight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/w/WallOfLimbs.java b/Mage.Sets/src/mage/cards/w/WallOfLimbs.java index da86bdaeb0..ee177b3af9 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfLimbs.java +++ b/Mage.Sets/src/mage/cards/w/WallOfLimbs.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -57,8 +58,8 @@ public class WallOfLimbs extends CardImpl { public WallOfLimbs(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Wall"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WallOfMulch.java b/Mage.Sets/src/mage/cards/w/WallOfMulch.java index 0e50ccd533..48033b00dd 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfMulch.java +++ b/Mage.Sets/src/mage/cards/w/WallOfMulch.java @@ -60,7 +60,7 @@ public class WallOfMulch extends CardImpl { public WallOfMulch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WallOfNets.java b/Mage.Sets/src/mage/cards/w/WallOfNets.java index 11e36647f1..8ed660e218 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfNets.java +++ b/Mage.Sets/src/mage/cards/w/WallOfNets.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.BlockedByIdPredicate; @@ -49,7 +50,7 @@ public class WallOfNets extends CardImpl { public WallOfNets(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/w/WallOfOmens.java b/Mage.Sets/src/mage/cards/w/WallOfOmens.java index cae21384ad..3b9c04c87c 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfOmens.java +++ b/Mage.Sets/src/mage/cards/w/WallOfOmens.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class WallOfOmens extends CardImpl { public WallOfOmens(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WallOfOpposition.java b/Mage.Sets/src/mage/cards/w/WallOfOpposition.java index 6baf6966c5..ab674e83d0 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfOpposition.java +++ b/Mage.Sets/src/mage/cards/w/WallOfOpposition.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class WallOfOpposition extends CardImpl { public WallOfOpposition(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/w/WallOfPineNeedles.java b/Mage.Sets/src/mage/cards/w/WallOfPineNeedles.java index fe106988a8..5dc4eee315 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfPineNeedles.java +++ b/Mage.Sets/src/mage/cards/w/WallOfPineNeedles.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class WallOfPineNeedles extends CardImpl { public WallOfPineNeedles(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Wall"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.WALL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WallOfPutridFlesh.java b/Mage.Sets/src/mage/cards/w/WallOfPutridFlesh.java index 56691c79a0..83b4565366 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfPutridFlesh.java +++ b/Mage.Sets/src/mage/cards/w/WallOfPutridFlesh.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -55,7 +56,7 @@ public class WallOfPutridFlesh extends CardImpl { public WallOfPutridFlesh(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WallOfRazors.java b/Mage.Sets/src/mage/cards/w/WallOfRazors.java index 3c704bd41d..f710470ce3 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfRazors.java +++ b/Mage.Sets/src/mage/cards/w/WallOfRazors.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class WallOfRazors extends CardImpl { public WallOfRazors(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WallOfResurgence.java b/Mage.Sets/src/mage/cards/w/WallOfResurgence.java index 4b1ffa2641..cdea9ebfc1 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfResurgence.java +++ b/Mage.Sets/src/mage/cards/w/WallOfResurgence.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.counters.CounterType; import mage.filter.common.FilterControlledLandPermanent; @@ -52,7 +53,7 @@ public class WallOfResurgence extends CardImpl { public WallOfResurgence(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/w/WallOfReverence.java b/Mage.Sets/src/mage/cards/w/WallOfReverence.java index 97d0936f75..6d2ba020a2 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfReverence.java +++ b/Mage.Sets/src/mage/cards/w/WallOfReverence.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -52,8 +53,8 @@ public class WallOfReverence extends CardImpl { public WallOfReverence (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Spirit"); - this.subtype.add("Wall"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.WALL); this.power = new MageInt(1); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/w/WallOfRoots.java b/Mage.Sets/src/mage/cards/w/WallOfRoots.java index 2ef8e533f4..9ec4f7f40e 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfRoots.java +++ b/Mage.Sets/src/mage/cards/w/WallOfRoots.java @@ -37,6 +37,7 @@ import mage.abilities.mana.ActivateOncePerTurnManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.BoostCounter; @@ -48,8 +49,8 @@ public class WallOfRoots extends CardImpl { public WallOfRoots(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Wall"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/w/WallOfShards.java b/Mage.Sets/src/mage/cards/w/WallOfShards.java index d4d6b308cd..3f27042b37 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfShards.java +++ b/Mage.Sets/src/mage/cards/w/WallOfShards.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -47,7 +48,7 @@ public class WallOfShards extends CardImpl { public WallOfShards(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); addSuperType(SuperType.SNOW); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(1); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/w/WallOfSouls.java b/Mage.Sets/src/mage/cards/w/WallOfSouls.java index b31d5d215c..5bb91961d9 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfSouls.java +++ b/Mage.Sets/src/mage/cards/w/WallOfSouls.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -53,7 +54,7 @@ public class WallOfSouls extends CardImpl { public WallOfSouls(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WallOfSpears.java b/Mage.Sets/src/mage/cards/w/WallOfSpears.java index 7e5923c5ed..b5dd7663b1 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfSpears.java +++ b/Mage.Sets/src/mage/cards/w/WallOfSpears.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class WallOfSpears extends CardImpl { public WallOfSpears(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WallOfStone.java b/Mage.Sets/src/mage/cards/w/WallOfStone.java index 7f03141045..412a3b4d83 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfStone.java +++ b/Mage.Sets/src/mage/cards/w/WallOfStone.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class WallOfStone extends CardImpl { public WallOfStone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/w/WallOfSwords.java b/Mage.Sets/src/mage/cards/w/WallOfSwords.java index 59e3931209..b5ba637569 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfSwords.java +++ b/Mage.Sets/src/mage/cards/w/WallOfSwords.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class WallOfSwords extends CardImpl { public WallOfSwords(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/w/WallOfTanglecord.java b/Mage.Sets/src/mage/cards/w/WallOfTanglecord.java index 2be9b731c7..d781b850dc 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfTanglecord.java +++ b/Mage.Sets/src/mage/cards/w/WallOfTanglecord.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,7 +50,7 @@ public class WallOfTanglecord extends CardImpl { public WallOfTanglecord (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(6); this.addAbility(DefenderAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/w/WallOfTears.java b/Mage.Sets/src/mage/cards/w/WallOfTears.java index 24e044119a..0f0a25006d 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfTears.java +++ b/Mage.Sets/src/mage/cards/w/WallOfTears.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,7 +48,7 @@ public class WallOfTears extends CardImpl { public WallOfTears(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WallOfTorches.java b/Mage.Sets/src/mage/cards/w/WallOfTorches.java index d8c667f301..e1240552dd 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfTorches.java +++ b/Mage.Sets/src/mage/cards/w/WallOfTorches.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -42,7 +43,7 @@ public class WallOfTorches extends CardImpl { public WallOfTorches(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(4); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WallOfVines.java b/Mage.Sets/src/mage/cards/w/WallOfVines.java index 042d28d2d0..87d8c5eb1d 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfVines.java +++ b/Mage.Sets/src/mage/cards/w/WallOfVines.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class WallOfVines extends CardImpl { public WallOfVines(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Plant"); - this.subtype.add("Wall"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WallOfWater.java b/Mage.Sets/src/mage/cards/w/WallOfWater.java index fd49183d4d..799ca616f4 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfWater.java +++ b/Mage.Sets/src/mage/cards/w/WallOfWater.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class WallOfWater extends CardImpl { public WallOfWater(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/w/WallOfWonder.java b/Mage.Sets/src/mage/cards/w/WallOfWonder.java index d461d2a8c6..7479d5ad43 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfWonder.java +++ b/Mage.Sets/src/mage/cards/w/WallOfWonder.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class WallOfWonder extends CardImpl { public WallOfWonder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(1); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/w/WallOfWood.java b/Mage.Sets/src/mage/cards/w/WallOfWood.java index 77a15fe865..04e02f5dcc 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfWood.java +++ b/Mage.Sets/src/mage/cards/w/WallOfWood.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class WallOfWood extends CardImpl { public WallOfWood(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Wall"); + this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WanderbrineRootcutters.java b/Mage.Sets/src/mage/cards/w/WanderbrineRootcutters.java index 2e62bf0333..00d647fadd 100644 --- a/Mage.Sets/src/mage/cards/w/WanderbrineRootcutters.java +++ b/Mage.Sets/src/mage/cards/w/WanderbrineRootcutters.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -53,8 +54,8 @@ public class WanderbrineRootcutters extends CardImpl { public WanderbrineRootcutters(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U/B}{U/B}"); - this.subtype.add("Merfolk"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WanderguardSentry.java b/Mage.Sets/src/mage/cards/w/WanderguardSentry.java index a1d1eb28ac..92d66899cd 100644 --- a/Mage.Sets/src/mage/cards/w/WanderguardSentry.java +++ b/Mage.Sets/src/mage/cards/w/WanderguardSentry.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.LookAtTargetPlayerHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetOpponent; /** @@ -46,7 +47,7 @@ public class WanderguardSentry extends CardImpl { public WanderguardSentry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Drone"); + this.subtype.add(SubType.DRONE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WanderingChampion.java b/Mage.Sets/src/mage/cards/w/WanderingChampion.java index 4fd525d977..38685fc8f8 100644 --- a/Mage.Sets/src/mage/cards/w/WanderingChampion.java +++ b/Mage.Sets/src/mage/cards/w/WanderingChampion.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -58,8 +59,8 @@ public class WanderingChampion extends CardImpl { public WanderingChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WanderingEye.java b/Mage.Sets/src/mage/cards/w/WanderingEye.java index b5d161f90e..eb84f38722 100644 --- a/Mage.Sets/src/mage/cards/w/WanderingEye.java +++ b/Mage.Sets/src/mage/cards/w/WanderingEye.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class WanderingEye extends CardImpl { public WanderingEye(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Illusion"); + this.subtype.add(SubType.ILLUSION); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WanderingFumarole.java b/Mage.Sets/src/mage/cards/w/WanderingFumarole.java index f8de710bd3..2532d52021 100644 --- a/Mage.Sets/src/mage/cards/w/WanderingFumarole.java +++ b/Mage.Sets/src/mage/cards/w/WanderingFumarole.java @@ -40,6 +40,7 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -82,7 +83,7 @@ class WanderingFumaroleToken extends Token { public WanderingFumaroleToken() { super("", "1/4 blue and red Elemental creature with \"0: Switch this creature's power and toughness until end of turn.\""); cardType.add(CardType.CREATURE); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); color.setRed(true); color.setBlue(true); power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WanderingGoblins.java b/Mage.Sets/src/mage/cards/w/WanderingGoblins.java index 7eb1e0c1f3..5a308ffa52 100644 --- a/Mage.Sets/src/mage/cards/w/WanderingGoblins.java +++ b/Mage.Sets/src/mage/cards/w/WanderingGoblins.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,8 +49,8 @@ public class WanderingGoblins extends CardImpl { public WanderingGoblins(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WanderingGraybeard.java b/Mage.Sets/src/mage/cards/w/WanderingGraybeard.java index 1738407104..314943ba5d 100644 --- a/Mage.Sets/src/mage/cards/w/WanderingGraybeard.java +++ b/Mage.Sets/src/mage/cards/w/WanderingGraybeard.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class WanderingGraybeard extends CardImpl { public WanderingGraybeard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Giant"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WanderingMage.java b/Mage.Sets/src/mage/cards/w/WanderingMage.java index a8f4cfda51..930cc06569 100644 --- a/Mage.Sets/src/mage/cards/w/WanderingMage.java +++ b/Mage.Sets/src/mage/cards/w/WanderingMage.java @@ -69,9 +69,9 @@ public class WanderingMage extends CardImpl { public WanderingMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WanderingOnes.java b/Mage.Sets/src/mage/cards/w/WanderingOnes.java index 9c7eb77cfa..2da32188bc 100644 --- a/Mage.Sets/src/mage/cards/w/WanderingOnes.java +++ b/Mage.Sets/src/mage/cards/w/WanderingOnes.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class WanderingOnes extends CardImpl { public WanderingOnes (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WanderingTombshell.java b/Mage.Sets/src/mage/cards/w/WanderingTombshell.java index bf07a3ed4a..1ddae7ea2a 100644 --- a/Mage.Sets/src/mage/cards/w/WanderingTombshell.java +++ b/Mage.Sets/src/mage/cards/w/WanderingTombshell.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class WanderingTombshell extends CardImpl { public WanderingTombshell(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Turtle"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.TURTLE); this.power = new MageInt(1); this.toughness = new MageInt(6); } diff --git a/Mage.Sets/src/mage/cards/w/WanderingWolf.java b/Mage.Sets/src/mage/cards/w/WanderingWolf.java index 8c20e495d9..bc3bb9f754 100644 --- a/Mage.Sets/src/mage/cards/w/WanderingWolf.java +++ b/Mage.Sets/src/mage/cards/w/WanderingWolf.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesWithLessPowe import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -44,7 +45,7 @@ public class WanderingWolf extends CardImpl { public WanderingWolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/Wanderlust.java b/Mage.Sets/src/mage/cards/w/Wanderlust.java index 6279b309cf..8b58452d71 100644 --- a/Mage.Sets/src/mage/cards/w/Wanderlust.java +++ b/Mage.Sets/src/mage/cards/w/Wanderlust.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class Wanderlust extends CardImpl { public Wanderlust(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/w/WaningWurm.java b/Mage.Sets/src/mage/cards/w/WaningWurm.java index 185dba21c2..066e867743 100644 --- a/Mage.Sets/src/mage/cards/w/WaningWurm.java +++ b/Mage.Sets/src/mage/cards/w/WaningWurm.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VanishingUpkeepAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -47,8 +48,8 @@ public class WaningWurm extends CardImpl { public WaningWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WURM); this.power = new MageInt(7); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/w/WantedScoundrels.java b/Mage.Sets/src/mage/cards/w/WantedScoundrels.java new file mode 100644 index 0000000000..4c73cb94ae --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WantedScoundrels.java @@ -0,0 +1,70 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.CreateTokenTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.game.permanent.token.TreasureToken; +import mage.target.common.TargetOpponent; + +/** + * + * @author TheElk801 + */ +public class WantedScoundrels extends CardImpl { + + public WantedScoundrels(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // When Wanted Scoundrels dies, target opponent creates two colorless Treasure artifact tokens with "T, Sacrifice this artifact: Add one mana of any color to your mana pool." + Ability ability = new DiesTriggeredAbility(new CreateTokenTargetEffect(new TreasureToken(), 2), false); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public WantedScoundrels(final WantedScoundrels card) { + super(card); + } + + @Override + public WantedScoundrels copy() { + return new WantedScoundrels(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WarBehemoth.java b/Mage.Sets/src/mage/cards/w/WarBehemoth.java index e5076be7e6..892c067953 100644 --- a/Mage.Sets/src/mage/cards/w/WarBehemoth.java +++ b/Mage.Sets/src/mage/cards/w/WarBehemoth.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class WarBehemoth extends CardImpl { public WarBehemoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/w/WarDance.java b/Mage.Sets/src/mage/cards/w/WarDance.java new file mode 100644 index 0000000000..93a920d3c1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WarDance.java @@ -0,0 +1,82 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.dynamicvalue.common.CountersSourceCount; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class WarDance extends CardImpl { + + public WarDance(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + + // At the beginning of your upkeep, you may put a verse counter on War Dance. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, + new AddCountersSourceEffect(CounterType.VERSE.createInstance(), true), TargetController.YOU, true)); + + // Sacrifice War Dance: Target creature gets +X/+X until end of turn, where X is the number of verse counters on War Dance. + Ability ability = new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new BoostTargetEffect( + new CountersSourceCount(CounterType.VERSE), + new CountersSourceCount(CounterType.VERSE), + Duration.EndOfTurn + ), + new SacrificeSourceCost() + ); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public WarDance(final WarDance card) { + super(card); + } + + @Override + public WarDance copy() { + return new WarDance(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WarElemental.java b/Mage.Sets/src/mage/cards/w/WarElemental.java index 4c746e59c7..520f7a8ec5 100644 --- a/Mage.Sets/src/mage/cards/w/WarElemental.java +++ b/Mage.Sets/src/mage/cards/w/WarElemental.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -56,7 +57,7 @@ public class WarElemental extends CardImpl { public WarElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{R}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WarFalcon.java b/Mage.Sets/src/mage/cards/w/WarFalcon.java index a0a713a6ca..39a56ac956 100644 --- a/Mage.Sets/src/mage/cards/w/WarFalcon.java +++ b/Mage.Sets/src/mage/cards/w/WarFalcon.java @@ -53,7 +53,7 @@ public class WarFalcon extends CardImpl { public WarFalcon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WarMammoth.java b/Mage.Sets/src/mage/cards/w/WarMammoth.java index 686f8d455f..c32f6a9788 100644 --- a/Mage.Sets/src/mage/cards/w/WarMammoth.java +++ b/Mage.Sets/src/mage/cards/w/WarMammoth.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class WarMammoth extends CardImpl { public WarMammoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WarNameAspirant.java b/Mage.Sets/src/mage/cards/w/WarNameAspirant.java index f52bd5c5a8..6493133c3b 100644 --- a/Mage.Sets/src/mage/cards/w/WarNameAspirant.java +++ b/Mage.Sets/src/mage/cards/w/WarNameAspirant.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.counters.CounterType; @@ -57,9 +58,9 @@ public class WarNameAspirant extends CardImpl { } public WarNameAspirant(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); @@ -67,7 +68,7 @@ public class WarNameAspirant extends CardImpl { // Raid - War-Name Aspirant enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1), false), RaidCondition.instance, - "Raid - {this} enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn", + "Raid — {this} enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn", "{this} enters the battlefield with a +1/+1 counter"), new PlayerAttackedWatcher()); diff --git a/Mage.Sets/src/mage/cards/w/WarOracle.java b/Mage.Sets/src/mage/cards/w/WarOracle.java index 6dfa75d471..b228fc62b4 100644 --- a/Mage.Sets/src/mage/cards/w/WarOracle.java +++ b/Mage.Sets/src/mage/cards/w/WarOracle.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.RenownAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class WarOracle extends CardImpl { public WarOracle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WarPriestOfThune.java b/Mage.Sets/src/mage/cards/w/WarPriestOfThune.java index 82984fc085..61301e8e83 100644 --- a/Mage.Sets/src/mage/cards/w/WarPriestOfThune.java +++ b/Mage.Sets/src/mage/cards/w/WarPriestOfThune.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetEnchantmentPermanent; /** @@ -46,8 +47,8 @@ public class WarPriestOfThune extends CardImpl { public WarPriestOfThune(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WarSpikeChangeling.java b/Mage.Sets/src/mage/cards/w/WarSpikeChangeling.java index b9074de2ce..2f4241c6b0 100644 --- a/Mage.Sets/src/mage/cards/w/WarSpikeChangeling.java +++ b/Mage.Sets/src/mage/cards/w/WarSpikeChangeling.java @@ -46,7 +46,7 @@ public class WarSpikeChangeling extends CardImpl { public WarSpikeChangeling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WarTax.java b/Mage.Sets/src/mage/cards/w/WarTax.java index 5cae163e64..689779066c 100644 --- a/Mage.Sets/src/mage/cards/w/WarTax.java +++ b/Mage.Sets/src/mage/cards/w/WarTax.java @@ -1,118 +1,118 @@ -/* - * 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.cards.w; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.dynamicvalue.DynamicValue; -import mage.abilities.dynamicvalue.common.ManacostVariableValue; -import mage.abilities.effects.ReplacementEffectImpl; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.players.Player; - -/** - * - * - * @author HCrescent original code by LevelX2 edited from War Cadence - */ -public class WarTax extends CardImpl { - - public WarTax(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); - - // {X}{U}: This turn, creatures can't attack unless their controller pays {X} for each attacking creature he or she controls. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new WarTaxReplacementEffect(), new ManaCostsImpl("{X}{U}"))); - } - - public WarTax(final WarTax card) { - super(card); - } - - @Override - public WarTax copy() { - return new WarTax(this); - } -} - -class WarTaxReplacementEffect extends ReplacementEffectImpl { - - DynamicValue xCosts = new ManacostVariableValue(); - - WarTaxReplacementEffect() { - super(Duration.EndOfTurn, Outcome.Neutral); - staticText = "This turn, creatures can't attack unless their controller pays {X} for each attacking creature he or she controls"; - } - - WarTaxReplacementEffect(WarTaxReplacementEffect effect) { - super(effect); - } - - @Override - public boolean replaceEvent(GameEvent event, Ability source, Game game) { - Player player = game.getPlayer(event.getPlayerId()); - if (player != null) { - int amount = xCosts.calculate(game, source, this); - if (amount > 0) { - String mana = "{" + amount + '}'; - ManaCostsImpl cost = new ManaCostsImpl(mana); - if (cost.canPay(source, source.getSourceId(), event.getPlayerId(), game) - && player.chooseUse(Outcome.Benefit, "Pay " + mana + " to declare attacker?", source, game)) { - if (cost.payOrRollback(source, game, source.getSourceId(), event.getPlayerId())) { - return false; - } - } - return true; - } - } - return false; - } - - @Override - public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.DECLARE_ATTACKER; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - return true; - } - - @Override - public WarTaxReplacementEffect copy() { - return new WarTaxReplacementEffect(this); - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.players.Player; + +/** + * + * + * @author HCrescent original code by LevelX2 edited from War Cadence + */ +public class WarTax extends CardImpl { + + public WarTax(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + + // {X}{U}: This turn, creatures can't attack unless their controller pays {X} for each attacking creature he or she controls. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new WarTaxReplacementEffect(), new ManaCostsImpl("{X}{U}"))); + } + + public WarTax(final WarTax card) { + super(card); + } + + @Override + public WarTax copy() { + return new WarTax(this); + } +} + +class WarTaxReplacementEffect extends ReplacementEffectImpl { + + DynamicValue xCosts = new ManacostVariableValue(); + + WarTaxReplacementEffect() { + super(Duration.EndOfTurn, Outcome.Neutral); + staticText = "This turn, creatures can't attack unless their controller pays {X} for each attacking creature he or she controls"; + } + + WarTaxReplacementEffect(WarTaxReplacementEffect effect) { + super(effect); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Player player = game.getPlayer(event.getPlayerId()); + if (player != null) { + int amount = xCosts.calculate(game, source, this); + if (amount > 0) { + String mana = "{" + amount + '}'; + ManaCostsImpl cost = new ManaCostsImpl(mana); + if (cost.canPay(source, source.getSourceId(), event.getPlayerId(), game) + && player.chooseUse(Outcome.Benefit, "Pay " + mana + " to declare attacker?", source, game)) { + if (cost.payOrRollback(source, game, source.getSourceId(), event.getPlayerId())) { + return false; + } + } + return true; + } + } + return false; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DECLARE_ATTACKER; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public WarTaxReplacementEffect copy() { + return new WarTaxReplacementEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WarTorchGoblin.java b/Mage.Sets/src/mage/cards/w/WarTorchGoblin.java index d7ef1a5032..6fd5cf2c7a 100644 --- a/Mage.Sets/src/mage/cards/w/WarTorchGoblin.java +++ b/Mage.Sets/src/mage/cards/w/WarTorchGoblin.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.filter.common.FilterBlockingCreature; @@ -50,8 +51,8 @@ public class WarTorchGoblin extends CardImpl { public WarTorchGoblin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WarWingSiren.java b/Mage.Sets/src/mage/cards/w/WarWingSiren.java index f033bf8ff3..bd5d1daca6 100644 --- a/Mage.Sets/src/mage/cards/w/WarWingSiren.java +++ b/Mage.Sets/src/mage/cards/w/WarWingSiren.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,8 +46,8 @@ public class WarWingSiren extends CardImpl { public WarWingSiren(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Siren"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SIREN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WarbreakTrumpeter.java b/Mage.Sets/src/mage/cards/w/WarbreakTrumpeter.java index 239c31af47..94e70a007e 100644 --- a/Mage.Sets/src/mage/cards/w/WarbreakTrumpeter.java +++ b/Mage.Sets/src/mage/cards/w/WarbreakTrumpeter.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.GoblinToken; /** @@ -48,7 +49,7 @@ public class WarbreakTrumpeter extends CardImpl { public WarbreakTrumpeter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/Warbringer.java b/Mage.Sets/src/mage/cards/w/Warbringer.java index fa445a9e88..9b68dd4dc8 100644 --- a/Mage.Sets/src/mage/cards/w/Warbringer.java +++ b/Mage.Sets/src/mage/cards/w/Warbringer.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.CostModificationType; import mage.constants.Duration; import mage.constants.Outcome; @@ -54,8 +55,8 @@ public class Warbringer extends CardImpl { public Warbringer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Orc"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WarchanterOfMogis.java b/Mage.Sets/src/mage/cards/w/WarchanterOfMogis.java index ed2f6e3cbc..b2a37943e7 100644 --- a/Mage.Sets/src/mage/cards/w/WarchanterOfMogis.java +++ b/Mage.Sets/src/mage/cards/w/WarchanterOfMogis.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.IntimidateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetControlledCreaturePermanent; @@ -47,8 +48,8 @@ public class WarchanterOfMogis extends CardImpl { public WarchanterOfMogis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add("Minotaur"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WarchiefGiant.java b/Mage.Sets/src/mage/cards/w/WarchiefGiant.java index 010e10cc76..332ab53582 100644 --- a/Mage.Sets/src/mage/cards/w/WarchiefGiant.java +++ b/Mage.Sets/src/mage/cards/w/WarchiefGiant.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MyriadAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class WarchiefGiant extends CardImpl { public WarchiefGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Giant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WarclampMastiff.java b/Mage.Sets/src/mage/cards/w/WarclampMastiff.java index 2a9113083b..c999beb279 100644 --- a/Mage.Sets/src/mage/cards/w/WarclampMastiff.java +++ b/Mage.Sets/src/mage/cards/w/WarclampMastiff.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class WarclampMastiff extends CardImpl { public WarclampMastiff(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WardOfBones.java b/Mage.Sets/src/mage/cards/w/WardOfBones.java index 85058af51f..ca33b2b267 100644 --- a/Mage.Sets/src/mage/cards/w/WardOfBones.java +++ b/Mage.Sets/src/mage/cards/w/WardOfBones.java @@ -76,7 +76,9 @@ class WardOfBonesEffect extends ContinuousRuleModifyingEffectImpl { public WardOfBonesEffect() { super(Duration.WhileOnBattlefield, Outcome.Benefit); - staticText = "Each opponent who controls more creatures than you can't play creature cards. The same is true for artifacts, enchantments, and lands"; + staticText = "Each opponent who controls more creatures than you can't cast creature spells. " + + "The same is true for artifacts and enchantments.

" + + "Each opponent who controls more lands than you can't play lands."; } public WardOfBonesEffect(final WardOfBonesEffect effect) { diff --git a/Mage.Sets/src/mage/cards/w/WardOfLights.java b/Mage.Sets/src/mage/cards/w/WardOfLights.java index 59eb93f6a8..95c3ab2e15 100644 --- a/Mage.Sets/src/mage/cards/w/WardOfLights.java +++ b/Mage.Sets/src/mage/cards/w/WardOfLights.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class WardOfLights extends CardImpl { public WardOfLights(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // You may cast Ward of Lights as though it had flash. If you cast it any time a sorcery couldn't have been cast, the controller of the permanent it becomes sacrifices it at the beginning of the next cleanup step. this.addAbility(new SimpleStaticAbility(Zone.ALL, new CastAsThoughItHadFlashSourceEffect(Duration.EndOfGame))); diff --git a/Mage.Sets/src/mage/cards/w/WardOfPiety.java b/Mage.Sets/src/mage/cards/w/WardOfPiety.java index 9b0d341969..159788703f 100644 --- a/Mage.Sets/src/mage/cards/w/WardOfPiety.java +++ b/Mage.Sets/src/mage/cards/w/WardOfPiety.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class WardOfPiety extends CardImpl { public WardOfPiety(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/w/WardSliver.java b/Mage.Sets/src/mage/cards/w/WardSliver.java index df611175c3..5e5ef307ea 100644 --- a/Mage.Sets/src/mage/cards/w/WardSliver.java +++ b/Mage.Sets/src/mage/cards/w/WardSliver.java @@ -57,7 +57,7 @@ public class WardSliver extends CardImpl { public WardSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WardenOfEvosIsle.java b/Mage.Sets/src/mage/cards/w/WardenOfEvosIsle.java index 7869fd6602..0f4a59f770 100644 --- a/Mage.Sets/src/mage/cards/w/WardenOfEvosIsle.java +++ b/Mage.Sets/src/mage/cards/w/WardenOfEvosIsle.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -54,8 +55,8 @@ public class WardenOfEvosIsle extends CardImpl { public WardenOfEvosIsle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WardenOfGeometries.java b/Mage.Sets/src/mage/cards/w/WardenOfGeometries.java index a0ed609b74..de604acba6 100644 --- a/Mage.Sets/src/mage/cards/w/WardenOfGeometries.java +++ b/Mage.Sets/src/mage/cards/w/WardenOfGeometries.java @@ -34,6 +34,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class WardenOfGeometries extends CardImpl { public WardenOfGeometries(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Drone"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.DRONE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WardenOfTheBeyond.java b/Mage.Sets/src/mage/cards/w/WardenOfTheBeyond.java index df13b681b0..36cfc7129b 100644 --- a/Mage.Sets/src/mage/cards/w/WardenOfTheBeyond.java +++ b/Mage.Sets/src/mage/cards/w/WardenOfTheBeyond.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -52,8 +53,8 @@ public class WardenOfTheBeyond extends CardImpl { public WardenOfTheBeyond(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WardenOfTheEye.java b/Mage.Sets/src/mage/cards/w/WardenOfTheEye.java index 151ce82351..27f6035023 100644 --- a/Mage.Sets/src/mage/cards/w/WardenOfTheEye.java +++ b/Mage.Sets/src/mage/cards/w/WardenOfTheEye.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.FilterCard; @@ -59,8 +60,8 @@ public class WardenOfTheEye extends CardImpl { public WardenOfTheEye(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{R}{W}"); - this.subtype.add("Djinn"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.DJINN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WardenOfTheFirstTree.java b/Mage.Sets/src/mage/cards/w/WardenOfTheFirstTree.java index 9c427db7e9..ac74f23e22 100644 --- a/Mage.Sets/src/mage/cards/w/WardenOfTheFirstTree.java +++ b/Mage.Sets/src/mage/cards/w/WardenOfTheFirstTree.java @@ -66,7 +66,7 @@ public class WardenOfTheFirstTree extends CardImpl { public WardenOfTheFirstTree(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -112,8 +112,8 @@ class WardenOfTheFirstTree1 extends Token { public WardenOfTheFirstTree1() { super("Warden of the First Tree", "Human Warrior with base power and toughness 3/3"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -125,9 +125,9 @@ class WardenOfTheFirstTree2 extends Token { public WardenOfTheFirstTree2() { super("Warden of the First Tree", "Human Spirit Warrior with trample and lifelink"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Human"); - this.subtype.add("Spirit"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WardenOfTheWall.java b/Mage.Sets/src/mage/cards/w/WardenOfTheWall.java index 7175dcabcf..89b846074e 100644 --- a/Mage.Sets/src/mage/cards/w/WardenOfTheWall.java +++ b/Mage.Sets/src/mage/cards/w/WardenOfTheWall.java @@ -39,6 +39,7 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -78,7 +79,7 @@ class GargoyleToken extends Token { super("", "2/3 Gargoyle artifact creature with flying"); cardType.add(CardType.CREATURE); cardType.add(CardType.ARTIFACT); - subtype.add("Gargoyle"); + subtype.add(SubType.GARGOYLE); power = new MageInt(2); toughness = new MageInt(3); addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/w/WardscaleDragon.java b/Mage.Sets/src/mage/cards/w/WardscaleDragon.java index a2f0b14aa4..839e8469aa 100644 --- a/Mage.Sets/src/mage/cards/w/WardscaleDragon.java +++ b/Mage.Sets/src/mage/cards/w/WardscaleDragon.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class WardscaleDragon extends CardImpl { public WardscaleDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WarfireJavelineer.java b/Mage.Sets/src/mage/cards/w/WarfireJavelineer.java index 9fab807880..2f68928859 100644 --- a/Mage.Sets/src/mage/cards/w/WarfireJavelineer.java +++ b/Mage.Sets/src/mage/cards/w/WarfireJavelineer.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterInstantOrSorceryCard; import mage.target.common.TargetOpponentsCreaturePermanent; @@ -47,8 +48,8 @@ public class WarfireJavelineer extends CardImpl { public WarfireJavelineer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WarlordsAxe.java b/Mage.Sets/src/mage/cards/w/WarlordsAxe.java index 6c05f398dd..fdfaa17c1f 100644 --- a/Mage.Sets/src/mage/cards/w/WarlordsAxe.java +++ b/Mage.Sets/src/mage/cards/w/WarlordsAxe.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class WarlordsAxe extends CardImpl { public WarlordsAxe(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +3/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 1))); diff --git a/Mage.Sets/src/mage/cards/w/WarmindInfantry.java b/Mage.Sets/src/mage/cards/w/WarmindInfantry.java index 9da3210f1e..12607b45f0 100644 --- a/Mage.Sets/src/mage/cards/w/WarmindInfantry.java +++ b/Mage.Sets/src/mage/cards/w/WarmindInfantry.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.BattalionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,8 +45,8 @@ public class WarmindInfantry extends CardImpl { public WarmindInfantry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/Warmonger.java b/Mage.Sets/src/mage/cards/w/Warmonger.java index 4e7d4f4154..50ef6a1afd 100644 --- a/Mage.Sets/src/mage/cards/w/Warmonger.java +++ b/Mage.Sets/src/mage/cards/w/Warmonger.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -56,8 +57,8 @@ public class Warmonger extends CardImpl { public Warmonger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Minotaur"); - this.subtype.add("Monger"); + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.MONGER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WarmongerHellkite.java b/Mage.Sets/src/mage/cards/w/WarmongerHellkite.java index 493e6917a1..8ab50a3566 100644 --- a/Mage.Sets/src/mage/cards/w/WarmongerHellkite.java +++ b/Mage.Sets/src/mage/cards/w/WarmongerHellkite.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; @@ -52,7 +53,7 @@ public class WarmongerHellkite extends CardImpl { public WarmongerHellkite(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/w/WarmongersChariot.java b/Mage.Sets/src/mage/cards/w/WarmongersChariot.java index 355f1e0005..04328a54ab 100644 --- a/Mage.Sets/src/mage/cards/w/WarmongersChariot.java +++ b/Mage.Sets/src/mage/cards/w/WarmongersChariot.java @@ -48,7 +48,7 @@ public class WarmongersChariot extends CardImpl { public WarmongersChariot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2))); diff --git a/Mage.Sets/src/mage/cards/w/WarpArtifact.java b/Mage.Sets/src/mage/cards/w/WarpArtifact.java index e43d288aee..2abfbed3ee 100644 --- a/Mage.Sets/src/mage/cards/w/WarpArtifact.java +++ b/Mage.Sets/src/mage/cards/w/WarpArtifact.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class WarpArtifact extends CardImpl { public WarpArtifact(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant artifact TargetPermanent auraTarget = new TargetArtifactPermanent(); diff --git a/Mage.Sets/src/mage/cards/w/WarpathGhoul.java b/Mage.Sets/src/mage/cards/w/WarpathGhoul.java index 2995777be1..05e5839dc3 100644 --- a/Mage.Sets/src/mage/cards/w/WarpathGhoul.java +++ b/Mage.Sets/src/mage/cards/w/WarpathGhoul.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class WarpathGhoul extends CardImpl { public WarpathGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WarpedResearcher.java b/Mage.Sets/src/mage/cards/w/WarpedResearcher.java new file mode 100644 index 0000000000..7b63919ce3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WarpedResearcher.java @@ -0,0 +1,77 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.CycleAllTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ShroudAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; + +/** + * + * @author TheElk801 + */ +public class WarpedResearcher extends CardImpl { + + public WarpedResearcher(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.subtype.add(SubType.MUTANT); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Whenever a player cycles a card, Warped Researcher gains flying and shroud until end of turn. + Effect effect = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn); + effect.setText("{this} gains flying"); + Ability ability = new CycleAllTriggeredAbility(effect, false); + effect = new GainAbilitySourceEffect(ShroudAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and shroud until end of turn"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public WarpedResearcher(final WarpedResearcher card) { + super(card); + } + + @Override + public WarpedResearcher copy() { + return new WarpedResearcher(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WarrenInstigator.java b/Mage.Sets/src/mage/cards/w/WarrenInstigator.java index f4f97d7f79..afc26696a5 100644 --- a/Mage.Sets/src/mage/cards/w/WarrenInstigator.java +++ b/Mage.Sets/src/mage/cards/w/WarrenInstigator.java @@ -53,8 +53,8 @@ public class WarrenInstigator extends CardImpl { public WarrenInstigator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Berserker"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.BERSERKER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WarrenPilferers.java b/Mage.Sets/src/mage/cards/w/WarrenPilferers.java index fa132e0934..3f5a5edd52 100644 --- a/Mage.Sets/src/mage/cards/w/WarrenPilferers.java +++ b/Mage.Sets/src/mage/cards/w/WarrenPilferers.java @@ -50,8 +50,8 @@ public class WarrenPilferers extends CardImpl { public WarrenPilferers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Goblin"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WarrenScourgeElf.java b/Mage.Sets/src/mage/cards/w/WarrenScourgeElf.java index 18e906d2ff..d61bfa8c95 100644 --- a/Mage.Sets/src/mage/cards/w/WarrenScourgeElf.java +++ b/Mage.Sets/src/mage/cards/w/WarrenScourgeElf.java @@ -51,8 +51,8 @@ public class WarrenScourgeElf extends CardImpl { public WarrenScourgeElf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WarrenWeirding.java b/Mage.Sets/src/mage/cards/w/WarrenWeirding.java index 4782bfddd8..7942e453cf 100644 --- a/Mage.Sets/src/mage/cards/w/WarrenWeirding.java +++ b/Mage.Sets/src/mage/cards/w/WarrenWeirding.java @@ -63,7 +63,7 @@ public class WarrenWeirding extends CardImpl { public WarrenWeirding(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.SORCERY},"{1}{B}"); - this.subtype.add("Goblin"); + this.subtype.add(SubType.GOBLIN); // Target player sacrifices a creature. If a Goblin is sacrificed this way, that player creates two 1/1 black Goblin Rogue creature tokens, and those tokens gain haste until end of turn. diff --git a/Mage.Sets/src/mage/cards/w/WarriorAngel.java b/Mage.Sets/src/mage/cards/w/WarriorAngel.java index 5382662e62..2b9d9b3251 100644 --- a/Mage.Sets/src/mage/cards/w/WarriorAngel.java +++ b/Mage.Sets/src/mage/cards/w/WarriorAngel.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class WarriorAngel extends CardImpl { public WarriorAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Angel"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ANGEL); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WarriorEnKor.java b/Mage.Sets/src/mage/cards/w/WarriorEnKor.java index 310d899fc1..f0be290622 100644 --- a/Mage.Sets/src/mage/cards/w/WarriorEnKor.java +++ b/Mage.Sets/src/mage/cards/w/WarriorEnKor.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.RedirectDamageFromSourceToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; @@ -48,9 +49,9 @@ public class WarriorEnKor extends CardImpl { public WarriorEnKor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Kor"); - this.subtype.add("Warrior"); - this.subtype.add("Knight"); + this.subtype.add(SubType.KOR); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WarsToll.java b/Mage.Sets/src/mage/cards/w/WarsToll.java index d89629b1a0..9271aadc3d 100644 --- a/Mage.Sets/src/mage/cards/w/WarsToll.java +++ b/Mage.Sets/src/mage/cards/w/WarsToll.java @@ -38,12 +38,12 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.constants.TargetController; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; -import mage.game.permanent.Permanent; import mage.players.Player; /** @@ -99,12 +99,13 @@ class WarsTollTapEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); - filter.add(new ControllerIdPredicate(getTargetPointer().getFirst(game, source))); - for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { - permanent.tap(game); + if (getTargetPointer().getFirst(game, source) != null) { + game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_LAND, getTargetPointer().getFirst(game, source), game).forEach((permanent) -> { + permanent.tap(game); + }); + return true; } - return true; + return false; } } @@ -126,12 +127,10 @@ class WarsTollEffect extends OneShotEffect { Player opponent = game.getPlayer(game.getPermanent(getTargetPointer().getFirst(game, source)).getControllerId()); if (opponent != null) { filterOpponentCreatures.add(new ControllerIdPredicate(opponent.getId())); - for (Permanent permanent : game.getBattlefield().getAllActivePermanents(CardType.CREATURE)) { - if (filterOpponentCreatures.match(permanent, source.getSourceId(), source.getControllerId(), game)) { - //TODO: allow the player to choose between a planeswalker and player - opponent.declareAttacker(permanent.getId(), source.getControllerId(), game, false); - } - } + game.getBattlefield().getAllActivePermanents(CardType.CREATURE).stream().filter((permanent) -> (filterOpponentCreatures.match(permanent, source.getSourceId(), source.getControllerId(), game))).forEachOrdered((permanent) -> { + //TODO: allow the player to choose between a planeswalker and player + opponent.declareAttacker(permanent.getId(), source.getControllerId(), game, false); + }); return true; } return false; diff --git a/Mage.Sets/src/mage/cards/w/Warthog.java b/Mage.Sets/src/mage/cards/w/Warthog.java index fbd32a7453..493fbe7369 100644 --- a/Mage.Sets/src/mage/cards/w/Warthog.java +++ b/Mage.Sets/src/mage/cards/w/Warthog.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class Warthog extends CardImpl { public Warthog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Boar"); + this.subtype.add(SubType.BOAR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WasitoraNekoruQueen.java b/Mage.Sets/src/mage/cards/w/WasitoraNekoruQueen.java index d8ad2919a0..1a15867d24 100644 --- a/Mage.Sets/src/mage/cards/w/WasitoraNekoruQueen.java +++ b/Mage.Sets/src/mage/cards/w/WasitoraNekoruQueen.java @@ -30,8 +30,7 @@ package mage.cards.w; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.Effect; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.FlyingAbility; @@ -39,20 +38,16 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; -import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.Game; -import mage.game.events.DamagedPlayerEvent; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.game.permanent.token.WasitoraCatDragonToken; import mage.players.Player; import mage.target.TargetPermanent; -import mage.target.targetpointer.FixedTarget; /** * @@ -64,8 +59,8 @@ public class WasitoraNekoruQueen extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Cat"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(4); @@ -76,7 +71,7 @@ public class WasitoraNekoruQueen extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // Whenever Wasitora, Nekoru Queen deals combat damage to a player, that player sacrifices a creature. If the player can't, you create a 3/3 black, red, and green Cat Dragon creature token with flying - this.addAbility(new WasitoraNekoruQueenTriggeredAbility()); + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new WasitoraNekoruQueenEffect(), false, true)); } public WasitoraNekoruQueen(final WasitoraNekoruQueen card) { @@ -89,44 +84,6 @@ public class WasitoraNekoruQueen extends CardImpl { } } -class WasitoraNekoruQueenTriggeredAbility extends TriggeredAbilityImpl { - - public WasitoraNekoruQueenTriggeredAbility() { - super(Zone.BATTLEFIELD, new WasitoraNekoruQueenEffect()); - } - - public WasitoraNekoruQueenTriggeredAbility(final WasitoraNekoruQueenTriggeredAbility ability) { - super(ability); - } - - @Override - public WasitoraNekoruQueenTriggeredAbility copy() { - return new WasitoraNekoruQueenTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.DAMAGED_PLAYER; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - DamagedPlayerEvent damageEvent = (DamagedPlayerEvent) event; - if (damageEvent.isCombatDamage() && event.getSourceId().equals(this.getSourceId())) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getPlayerId())); - } - return true; - } - return false; - } - - @Override - public String getRule() { - return "Whenever {this} deals combat damage to a player, that player sacrifices a creature. If the player can't, you create a 3/3 black, red, and green Cat Dragon creature token with flying"; - } -} - class WasitoraNekoruQueenEffect extends OneShotEffect { public WasitoraNekoruQueenEffect() { @@ -150,11 +107,11 @@ class WasitoraNekoruQueenEffect extends OneShotEffect { if (damagedPlayer != null && controller != null) { FilterControlledPermanent filter = new FilterControlledPermanent("creature"); filter.add(new CardTypePredicate(CardType.CREATURE)); - TargetPermanent target = new TargetPermanent(filter); - if (damagedPlayer.choose(Outcome.Sacrifice, target, source.getId(), game)) { + TargetPermanent target = new TargetPermanent(1, 1, filter, true); + if (damagedPlayer.choose(Outcome.Sacrifice, target, source.getSourceId(), game)) { Permanent objectToBeSacrificed = game.getPermanent(target.getFirstTarget()); if (objectToBeSacrificed != null) { - if (objectToBeSacrificed.sacrifice(source.getId(), game)) { + if (objectToBeSacrificed.sacrifice(source.getSourceId(), game)) { return true; } } diff --git a/Mage.Sets/src/mage/cards/w/WaspLancer.java b/Mage.Sets/src/mage/cards/w/WaspLancer.java index e8376da21c..0179e8c57f 100644 --- a/Mage.Sets/src/mage/cards/w/WaspLancer.java +++ b/Mage.Sets/src/mage/cards/w/WaspLancer.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class WaspLancer extends CardImpl { public WaspLancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U/B}{U/B}{U/B}"); - this.subtype.add("Faerie"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WaspOfTheBitterEnd.java b/Mage.Sets/src/mage/cards/w/WaspOfTheBitterEnd.java index e68e874b7f..4b27b3c105 100644 --- a/Mage.Sets/src/mage/cards/w/WaspOfTheBitterEnd.java +++ b/Mage.Sets/src/mage/cards/w/WaspOfTheBitterEnd.java @@ -59,8 +59,8 @@ public class WaspOfTheBitterEnd extends CardImpl { public WaspOfTheBitterEnd(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Insect"); - this.subtype.add("Horror"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.HORROR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WastelandScorpion.java b/Mage.Sets/src/mage/cards/w/WastelandScorpion.java index ca60ce2fdc..6ba005dfb7 100644 --- a/Mage.Sets/src/mage/cards/w/WastelandScorpion.java +++ b/Mage.Sets/src/mage/cards/w/WastelandScorpion.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class WastelandScorpion extends CardImpl { public WastelandScorpion(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Scorpion"); + this.subtype.add(SubType.SCORPION); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WastelandStrangler.java b/Mage.Sets/src/mage/cards/w/WastelandStrangler.java index 1715ed5bd5..db508b337f 100644 --- a/Mage.Sets/src/mage/cards/w/WastelandStrangler.java +++ b/Mage.Sets/src/mage/cards/w/WastelandStrangler.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class WastelandStrangler extends CardImpl { public WastelandStrangler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Processor"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.PROCESSOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WastelandViper.java b/Mage.Sets/src/mage/cards/w/WastelandViper.java index 77c5c5fa18..6650028da4 100644 --- a/Mage.Sets/src/mage/cards/w/WastelandViper.java +++ b/Mage.Sets/src/mage/cards/w/WastelandViper.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -47,7 +48,7 @@ public class WastelandViper extends CardImpl { public WastelandViper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/Watchdog.java b/Mage.Sets/src/mage/cards/w/Watchdog.java index f8cc835cdf..04458ff411 100644 --- a/Mage.Sets/src/mage/cards/w/Watchdog.java +++ b/Mage.Sets/src/mage/cards/w/Watchdog.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterAttackingCreature; @@ -52,16 +53,16 @@ import mage.game.permanent.Permanent; public class Watchdog extends CardImpl { public Watchdog(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Hound"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(1); this.toughness = new MageInt(2); // Watchdog blocks each turn if able. - this.getAbilities().add(new SimpleStaticAbility(Zone.BATTLEFIELD, new BlocksIfAbleSourceEffect(Duration.WhileOnBattlefield))); + addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BlocksIfAbleSourceEffect(Duration.WhileOnBattlefield))); // As long as Watchdog is untapped, all creatures attacking you get -1/-0. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( - new BoostAllEffect(-1, 0, Duration.WhileOnBattlefield, new WatchdogFilter(), false), new InvertCondition(SourceTappedCondition.instance),"As long as {this} is untapped, all creatures attacking you get -1/-0"))); + addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostAllEffect(-1, 0, Duration.WhileOnBattlefield, new WatchdogFilter(), false), new InvertCondition(SourceTappedCondition.instance), "As long as {this} is untapped, all creatures attacking you get -1/-0"))); } public Watchdog(final Watchdog card) { @@ -74,14 +75,12 @@ public class Watchdog extends CardImpl { } } - class WatchdogFilter extends FilterAttackingCreature { public WatchdogFilter() { super("creatures attacking you"); } - public WatchdogFilter(final WatchdogFilter filter) { super(filter); } @@ -93,15 +92,15 @@ class WatchdogFilter extends FilterAttackingCreature { @Override public boolean match(Permanent permanent, UUID sourceId, UUID playerId, Game game) { - if(!super.match(permanent, sourceId, playerId, game)) { + if (!super.match(permanent, sourceId, playerId, game)) { return false; } - for(CombatGroup group : game.getCombat().getGroups()) { - for(UUID attacker : group.getAttackers()) { - if(attacker.equals(permanent.getId())) { + for (CombatGroup group : game.getCombat().getGroups()) { + for (UUID attacker : group.getAttackers()) { + if (attacker.equals(permanent.getId())) { UUID defenderId = group.getDefenderId(); - if(defenderId.equals(playerId)) { + if (defenderId.equals(playerId)) { return true; } } diff --git a/Mage.Sets/src/mage/cards/w/WatcherInTheWeb.java b/Mage.Sets/src/mage/cards/w/WatcherInTheWeb.java index 9029dce157..ef98b92421 100644 --- a/Mage.Sets/src/mage/cards/w/WatcherInTheWeb.java +++ b/Mage.Sets/src/mage/cards/w/WatcherInTheWeb.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class WatcherInTheWeb extends CardImpl { public WatcherInTheWeb(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Spider"); + this.subtype.add(SubType.SPIDER); this.power = new MageInt(2); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/w/WatcherOfTheRoost.java b/Mage.Sets/src/mage/cards/w/WatcherOfTheRoost.java index 8859f0d733..7bf7b738d3 100644 --- a/Mage.Sets/src/mage/cards/w/WatcherOfTheRoost.java +++ b/Mage.Sets/src/mage/cards/w/WatcherOfTheRoost.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ColorPredicate; import mage.target.common.TargetCardInHand; @@ -56,8 +57,8 @@ public class WatcherOfTheRoost extends CardImpl { public WatcherOfTheRoost(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WatcherSliver.java b/Mage.Sets/src/mage/cards/w/WatcherSliver.java index 1b5a7791f7..f73c7de075 100644 --- a/Mage.Sets/src/mage/cards/w/WatcherSliver.java +++ b/Mage.Sets/src/mage/cards/w/WatcherSliver.java @@ -49,7 +49,7 @@ public class WatcherSliver extends CardImpl { public WatcherSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WatchersOfTheDead.java b/Mage.Sets/src/mage/cards/w/WatchersOfTheDead.java index ff0588d865..f1620a0de5 100644 --- a/Mage.Sets/src/mage/cards/w/WatchersOfTheDead.java +++ b/Mage.Sets/src/mage/cards/w/WatchersOfTheDead.java @@ -1,119 +1,120 @@ -/* - * 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.cards.w; - -import java.util.UUID; -import mage.MageInt; -import mage.MageObject; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ExileSourceCost; -import mage.abilities.effects.OneShotEffect; -import mage.cards.*; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.FilterCard; -import mage.game.Game; -import mage.players.Player; -import mage.target.TargetCard; -import mage.target.common.TargetCardInYourGraveyard; -import mage.util.CardUtil; - -/** - * - * @author jeffwadsworth - */ -public class WatchersOfTheDead extends CardImpl { - - public WatchersOfTheDead(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); - this.subtype.add("Cat"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // Exile Watchers of the Dead: Each opponent chooses 2 cards in his or her graveyard and exiles the rest. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new WatchersOfTheDeadEffect(), new ExileSourceCost())); - - } - - public WatchersOfTheDead(final WatchersOfTheDead card) { - super(card); - } - - @Override - public WatchersOfTheDead copy() { - return new WatchersOfTheDead(this); - } -} - -class WatchersOfTheDeadEffect extends OneShotEffect { - - public WatchersOfTheDeadEffect() { - super(Outcome.Benefit); - this.staticText = "Each opponent chooses 2 cards in his or her graveyard and exiles the rest"; - } - - public WatchersOfTheDeadEffect(final WatchersOfTheDeadEffect effect) { - super(effect); - } - - @Override - public WatchersOfTheDeadEffect copy() { - return new WatchersOfTheDeadEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - MageObject sourceObject = game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); - if (controller != null) { - for (UUID opponentId : game.getState().getPlayersInRange(controller.getId(), game)) { - Player opponent = game.getPlayer(opponentId); - if (opponent != null - && opponent != controller) { - TargetCard target = new TargetCardInYourGraveyard(2, 2, new FilterCard()); - target.setNotTarget(true); - Cards cardsInGraveyard = opponent.getGraveyard(); - if (cardsInGraveyard.size() > 1) { - opponent.choose(outcome, cardsInGraveyard, target, game); - for (Card cardInGraveyard : cardsInGraveyard.getCards(game)) { - if (!target.getTargets().contains(cardInGraveyard.getId())) { - opponent.moveCardToExileWithInfo(cardInGraveyard, CardUtil.getCardExileZoneId(game, source.getId()), - sourceObject.getLogName(), source.getId(), game, Zone.GRAVEYARD, true); - } - } - } - - } - } - return true; - } - return false; - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileSourceCost; +import mage.abilities.effects.OneShotEffect; +import mage.cards.*; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; +import mage.target.common.TargetCardInYourGraveyard; +import mage.util.CardUtil; + +/** + * + * @author jeffwadsworth + */ +public class WatchersOfTheDead extends CardImpl { + + public WatchersOfTheDead(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); + this.subtype.add(SubType.CAT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Exile Watchers of the Dead: Each opponent chooses 2 cards in his or her graveyard and exiles the rest. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new WatchersOfTheDeadEffect(), new ExileSourceCost())); + + } + + public WatchersOfTheDead(final WatchersOfTheDead card) { + super(card); + } + + @Override + public WatchersOfTheDead copy() { + return new WatchersOfTheDead(this); + } +} + +class WatchersOfTheDeadEffect extends OneShotEffect { + + public WatchersOfTheDeadEffect() { + super(Outcome.Benefit); + this.staticText = "Each opponent chooses 2 cards in his or her graveyard and exiles the rest"; + } + + public WatchersOfTheDeadEffect(final WatchersOfTheDeadEffect effect) { + super(effect); + } + + @Override + public WatchersOfTheDeadEffect copy() { + return new WatchersOfTheDeadEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); + if (controller != null) { + for (UUID opponentId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player opponent = game.getPlayer(opponentId); + if (opponent != null + && opponent != controller) { + TargetCard target = new TargetCardInYourGraveyard(2, 2, new FilterCard()); + target.setNotTarget(true); + Cards cardsInGraveyard = opponent.getGraveyard(); + if (cardsInGraveyard.size() > 1) { + opponent.choose(outcome, cardsInGraveyard, target, game); + for (Card cardInGraveyard : cardsInGraveyard.getCards(game)) { + if (!target.getTargets().contains(cardInGraveyard.getId())) { + opponent.moveCardToExileWithInfo(cardInGraveyard, CardUtil.getCardExileZoneId(game, source.getId()), + sourceObject.getLogName(), source.getId(), game, Zone.GRAVEYARD, true); + } + } + } + + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/w/WatchfulAutomaton.java b/Mage.Sets/src/mage/cards/w/WatchfulAutomaton.java index f92f91b509..7cf6541c93 100644 --- a/Mage.Sets/src/mage/cards/w/WatchfulAutomaton.java +++ b/Mage.Sets/src/mage/cards/w/WatchfulAutomaton.java @@ -35,6 +35,7 @@ import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class WatchfulAutomaton extends CardImpl { public WatchfulAutomaton(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WatchfulNaga.java b/Mage.Sets/src/mage/cards/w/WatchfulNaga.java index 3c98e18bda..69ac727972 100644 --- a/Mage.Sets/src/mage/cards/w/WatchfulNaga.java +++ b/Mage.Sets/src/mage/cards/w/WatchfulNaga.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ExertAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class WatchfulNaga extends CardImpl { public WatchfulNaga(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Naga"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WatchwingScarecrow.java b/Mage.Sets/src/mage/cards/w/WatchwingScarecrow.java index 0be99ed005..1baf99da2c 100644 --- a/Mage.Sets/src/mage/cards/w/WatchwingScarecrow.java +++ b/Mage.Sets/src/mage/cards/w/WatchwingScarecrow.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -64,7 +65,7 @@ public class WatchwingScarecrow extends CardImpl { public WatchwingScarecrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/Watchwolf.java b/Mage.Sets/src/mage/cards/w/Watchwolf.java index 1c94f4c80e..abd6e5ea1a 100644 --- a/Mage.Sets/src/mage/cards/w/Watchwolf.java +++ b/Mage.Sets/src/mage/cards/w/Watchwolf.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class Watchwolf extends CardImpl { public Watchwolf (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WaterElemental.java b/Mage.Sets/src/mage/cards/w/WaterElemental.java index 24387ebbec..ca978d2371 100644 --- a/Mage.Sets/src/mage/cards/w/WaterElemental.java +++ b/Mage.Sets/src/mage/cards/w/WaterElemental.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class WaterElemental extends CardImpl { public WaterElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WaterServant.java b/Mage.Sets/src/mage/cards/w/WaterServant.java index 8f4aa4ea81..a225606432 100644 --- a/Mage.Sets/src/mage/cards/w/WaterServant.java +++ b/Mage.Sets/src/mage/cards/w/WaterServant.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class WaterServant extends CardImpl { public WaterServant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WaterWurm.java b/Mage.Sets/src/mage/cards/w/WaterWurm.java index 5ade8cf312..c6e3aec0e6 100644 --- a/Mage.Sets/src/mage/cards/w/WaterWurm.java +++ b/Mage.Sets/src/mage/cards/w/WaterWurm.java @@ -51,7 +51,7 @@ public class WaterWurm extends CardImpl { public WaterWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/Watercourser.java b/Mage.Sets/src/mage/cards/w/Watercourser.java index 3f804e64ef..0a1f0bd956 100644 --- a/Mage.Sets/src/mage/cards/w/Watercourser.java +++ b/Mage.Sets/src/mage/cards/w/Watercourser.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class Watercourser extends CardImpl { public Watercourser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WaterfrontBouncer.java b/Mage.Sets/src/mage/cards/w/WaterfrontBouncer.java index 32bbe9b01c..0b56bb35be 100644 --- a/Mage.Sets/src/mage/cards/w/WaterfrontBouncer.java +++ b/Mage.Sets/src/mage/cards/w/WaterfrontBouncer.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.target.common.TargetCardInHand; @@ -51,8 +52,8 @@ public class WaterfrontBouncer extends CardImpl { public WaterfrontBouncer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Spellshaper"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WaterspoutDjinn.java b/Mage.Sets/src/mage/cards/w/WaterspoutDjinn.java index 310de4040f..c81b338200 100644 --- a/Mage.Sets/src/mage/cards/w/WaterspoutDjinn.java +++ b/Mage.Sets/src/mage/cards/w/WaterspoutDjinn.java @@ -59,7 +59,7 @@ public class WaterspoutDjinn extends CardImpl { public WaterspoutDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WaterspoutElemental.java b/Mage.Sets/src/mage/cards/w/WaterspoutElemental.java index 44351bb43d..f8abdd8272 100644 --- a/Mage.Sets/src/mage/cards/w/WaterspoutElemental.java +++ b/Mage.Sets/src/mage/cards/w/WaterspoutElemental.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -56,7 +57,7 @@ public class WaterspoutElemental extends CardImpl { public WaterspoutElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(4); @@ -68,7 +69,7 @@ public class WaterspoutElemental extends CardImpl { EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandFromBattlefieldAllEffect(filter)); ability.addEffect(new SkipNextTurnSourceEffect()); this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, - "When {this} enters the battlefield, if it was kicked, return all other creatures to their owners' hands and you skip your next turn")); + "When {this} enters the battlefield, if it was kicked, return all other creatures to their owners' hands and you skip your next turn.")); } public WaterspoutElemental(final WaterspoutElemental card) { diff --git a/Mage.Sets/src/mage/cards/w/WaterspoutWeavers.java b/Mage.Sets/src/mage/cards/w/WaterspoutWeavers.java index 0f43eec0a5..da7eb7fd1c 100644 --- a/Mage.Sets/src/mage/cards/w/WaterspoutWeavers.java +++ b/Mage.Sets/src/mage/cards/w/WaterspoutWeavers.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; @@ -46,8 +47,8 @@ public class WaterspoutWeavers extends CardImpl { public WaterspoutWeavers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WatertrapWeaver.java b/Mage.Sets/src/mage/cards/w/WatertrapWeaver.java new file mode 100644 index 0000000000..2820a85eee --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WatertrapWeaver.java @@ -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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class WatertrapWeaver extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public WatertrapWeaver(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Watertrap Weaver enters the battlefield, tap target creature an opponent controls. That creature doesn't untap during its controller's next untap step. + EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect()); + ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect("that creature")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public WatertrapWeaver(final WatertrapWeaver card) { + super(card); + } + + @Override + public WatertrapWeaver copy() { + return new WatertrapWeaver(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WateryGrave.java b/Mage.Sets/src/mage/cards/w/WateryGrave.java index 779d3f9016..bf380072f0 100644 --- a/Mage.Sets/src/mage/cards/w/WateryGrave.java +++ b/Mage.Sets/src/mage/cards/w/WateryGrave.java @@ -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.cards.w; import java.util.UUID; @@ -37,6 +36,7 @@ import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,13 +45,13 @@ import mage.constants.CardType; public class WateryGrave extends CardImpl { public WateryGrave(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - this.subtype.add("Island"); - this.subtype.add("Swamp"); - + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); + this.subtype.add(SubType.ISLAND); + this.subtype.add(SubType.SWAMP); + + this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); this.addAbility(new BlueManaAbility()); this.addAbility(new BlackManaAbility()); - this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); } public WateryGrave(final WateryGrave card) { diff --git a/Mage.Sets/src/mage/cards/w/WaveElemental.java b/Mage.Sets/src/mage/cards/w/WaveElemental.java new file mode 100644 index 0000000000..a7a76f5729 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WaveElemental.java @@ -0,0 +1,83 @@ +/* + * 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.cards.w; + +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.TapTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public class WaveElemental extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures without flying"); + + static { + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + + public WaveElemental(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + + this.subtype.add(SubType.ELEMENTAL); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // {U}, {tap}, Sacrifice Wave Elemental: Tap up to three target creatures without flying. + Ability ability = new SimpleActivatedAbility(new TapTargetEffect(), new ManaCostsImpl("{U}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetPermanent(0, 4, filter, false)); + this.addAbility(ability); + } + + public WaveElemental(final WaveElemental card) { + super(card); + } + + @Override + public WaveElemental copy() { + return new WaveElemental(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WaveOfTerror.java b/Mage.Sets/src/mage/cards/w/WaveOfTerror.java new file mode 100644 index 0000000000..53747b4366 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WaveOfTerror.java @@ -0,0 +1,104 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfDrawTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author TheElk801 + */ +public class WaveOfTerror extends CardImpl { + + public WaveOfTerror(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + + // Cumulative upkeep {1} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{1}"))); + + // At the beginning of your draw step, destroy each creature with converted mana cost equal to the number of age counters on Wave of Terror. They can't be regenerated. + this.addAbility(new BeginningOfDrawTriggeredAbility(new WaveOfTerrorEffect(), TargetController.YOU, false)); + } + + public WaveOfTerror(final WaveOfTerror card) { + super(card); + } + + @Override + public WaveOfTerror copy() { + return new WaveOfTerror(this); + } +} + +class WaveOfTerrorEffect extends OneShotEffect { + + WaveOfTerrorEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "destroy each creature with converted mana cost equal to the number of age counters on {this}. They can't be regenerated."; + } + + WaveOfTerrorEffect(final WaveOfTerrorEffect effect) { + super(effect); + } + + @Override + public WaveOfTerrorEffect copy() { + return new WaveOfTerrorEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (permanent == null) { + return false; + } + FilterCreaturePermanent filter = new FilterCreaturePermanent(); + filter.add(new ConvertedManaCostPredicate( + ComparisonType.EQUAL_TO, + permanent.getCounters(game).getCount(CounterType.AGE) + )); + return new DestroyAllEffect(filter, true).apply(game, source); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WaveOfVitriol.java b/Mage.Sets/src/mage/cards/w/WaveOfVitriol.java index ea78d14de1..dd5359d18b 100644 --- a/Mage.Sets/src/mage/cards/w/WaveOfVitriol.java +++ b/Mage.Sets/src/mage/cards/w/WaveOfVitriol.java @@ -27,6 +27,7 @@ */ package mage.cards.w; +import java.util.*; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; @@ -47,8 +48,6 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCardInLibrary; -import java.util.*; - /** * * @author LevelX2 @@ -56,7 +55,7 @@ import java.util.*; public class WaveOfVitriol extends CardImpl { public WaveOfVitriol(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{5}{G}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{G}{G}"); // Each player sacrifices all artifacts, enchantments, and nonbasic lands he or she controls. For each land sacrificed this way, its controller may search his or her library for a basic land card and put it onto the battlefield tapped. Then each player who searched his or her library this way shuffles it. this.getSpellAbility().addEffect(new WaveOfVitriolEffect()); @@ -121,12 +120,11 @@ class WaveOfVitriolEffect extends OneShotEffect { } } } - game.getState().handleSimultaneousEvent(game); + game.applyEffects(); Cards toBattlefield = new CardsImpl(); Set playersToShuffle = new LinkedHashSet<>(); for (Map.Entry entry : sacrificedLands.entrySet()) { if (entry.getKey().chooseUse(Outcome.PutLandInPlay, "Search your library for up to " + entry.getValue() + " basic lands?", source, game)) { - TargetCardInLibrary target = new TargetCardInLibrary(0, entry.getValue(), StaticFilters.FILTER_BASIC_LAND_CARD); if (entry.getKey().searchLibrary(target, game)) { if (!target.getTargets().isEmpty()) { diff --git a/Mage.Sets/src/mage/cards/w/WaveWingElemental.java b/Mage.Sets/src/mage/cards/w/WaveWingElemental.java index 0d7a147cb3..fa81b48bea 100644 --- a/Mage.Sets/src/mage/cards/w/WaveWingElemental.java +++ b/Mage.Sets/src/mage/cards/w/WaveWingElemental.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,7 +46,7 @@ public class WaveWingElemental extends CardImpl { public WaveWingElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WavecrashTriton.java b/Mage.Sets/src/mage/cards/w/WavecrashTriton.java index 42cdba1fbf..1c28efe20b 100644 --- a/Mage.Sets/src/mage/cards/w/WavecrashTriton.java +++ b/Mage.Sets/src/mage/cards/w/WavecrashTriton.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -54,8 +55,8 @@ public class WavecrashTriton extends CardImpl { public WavecrashTriton(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WaveskimmerAven.java b/Mage.Sets/src/mage/cards/w/WaveskimmerAven.java index cf9a1a181f..243a57bf31 100644 --- a/Mage.Sets/src/mage/cards/w/WaveskimmerAven.java +++ b/Mage.Sets/src/mage/cards/w/WaveskimmerAven.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class WaveskimmerAven extends CardImpl { public WaveskimmerAven (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{W}{U}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2 ); diff --git a/Mage.Sets/src/mage/cards/w/WaxmaneBaku.java b/Mage.Sets/src/mage/cards/w/WaxmaneBaku.java index c93afb3acc..bf7e380438 100644 --- a/Mage.Sets/src/mage/cards/w/WaxmaneBaku.java +++ b/Mage.Sets/src/mage/cards/w/WaxmaneBaku.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -59,7 +60,7 @@ public class WaxmaneBaku extends CardImpl { public WaxmaneBaku(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WayOfTheThief.java b/Mage.Sets/src/mage/cards/w/WayOfTheThief.java index eadc8060ee..9f146e75fa 100644 --- a/Mage.Sets/src/mage/cards/w/WayOfTheThief.java +++ b/Mage.Sets/src/mage/cards/w/WayOfTheThief.java @@ -60,7 +60,7 @@ public class WayOfTheThief extends CardImpl { public WayOfTheThief(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/w/WayfaringGiant.java b/Mage.Sets/src/mage/cards/w/WayfaringGiant.java index b64aa536af..21171edd86 100644 --- a/Mage.Sets/src/mage/cards/w/WayfaringGiant.java +++ b/Mage.Sets/src/mage/cards/w/WayfaringGiant.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class WayfaringGiant extends CardImpl { public WayfaringGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Giant"); + this.subtype.add(SubType.GIANT); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WayfaringTemple.java b/Mage.Sets/src/mage/cards/w/WayfaringTemple.java index 560a1a9b1e..a6346a12c6 100644 --- a/Mage.Sets/src/mage/cards/w/WayfaringTemple.java +++ b/Mage.Sets/src/mage/cards/w/WayfaringTemple.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -50,7 +51,7 @@ public class WayfaringTemple extends CardImpl { public WayfaringTemple(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/w/WaywardAngel.java b/Mage.Sets/src/mage/cards/w/WaywardAngel.java index db43b8143f..e722d1d66d 100644 --- a/Mage.Sets/src/mage/cards/w/WaywardAngel.java +++ b/Mage.Sets/src/mage/cards/w/WaywardAngel.java @@ -46,6 +46,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -59,8 +60,8 @@ public class WaywardAngel extends CardImpl { public WaywardAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Angel"); - this.subtype.add("Horror"); + this.subtype.add(SubType.ANGEL); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WaywardDisciple.java b/Mage.Sets/src/mage/cards/w/WaywardDisciple.java index ec553b25df..061ad23ef6 100644 --- a/Mage.Sets/src/mage/cards/w/WaywardDisciple.java +++ b/Mage.Sets/src/mage/cards/w/WaywardDisciple.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -56,8 +57,8 @@ public class WaywardDisciple extends CardImpl { public WaywardDisciple(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(4); this.color.setBlack(true); diff --git a/Mage.Sets/src/mage/cards/w/WaywardGiant.java b/Mage.Sets/src/mage/cards/w/WaywardGiant.java index 2b5780b66e..853d79594a 100644 --- a/Mage.Sets/src/mage/cards/w/WaywardGiant.java +++ b/Mage.Sets/src/mage/cards/w/WaywardGiant.java @@ -1,61 +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.cards.w; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.keyword.MenaceAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author LevelX2 - */ -public class WaywardGiant extends CardImpl { - - public WaywardGiant(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Giant"); - this.power = new MageInt(4); - this.toughness = new MageInt(5); - - // Menace - this.addAbility(new MenaceAbility()); - } - - public WaywardGiant(final WaywardGiant card) { - super(card); - } - - @Override - public WaywardGiant copy() { - return new WaywardGiant(this); - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author LevelX2 + */ +public class WaywardGiant extends CardImpl { + + public WaywardGiant(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); + this.subtype.add(SubType.GIANT); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // Menace + this.addAbility(new MenaceAbility()); + } + + public WaywardGiant(final WaywardGiant card) { + super(card); + } + + @Override + public WaywardGiant copy() { + return new WaywardGiant(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WaywardServant.java b/Mage.Sets/src/mage/cards/w/WaywardServant.java index 06967014f6..cf8399284d 100644 --- a/Mage.Sets/src/mage/cards/w/WaywardServant.java +++ b/Mage.Sets/src/mage/cards/w/WaywardServant.java @@ -1,84 +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.cards.w; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.GainLifeEffect; -import mage.abilities.effects.common.LoseLifeOpponentsEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.filter.predicate.permanent.AnotherPredicate; - -/** - * - * @author jeffwadsworth - */ -public class WaywardServant extends CardImpl { - - private static final FilterControlledPermanent filter = new FilterControlledPermanent("another Zombie"); - - static { - filter.add(new SubtypePredicate(SubType.ZOMBIE)); - filter.add(new AnotherPredicate()); - } - - private static final String rule = "Whenever another Zombie enters the battlefield under your control, each opponent loses 1 life and you gain 1 life."; - - public WaywardServant(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{B}"); - - this.subtype.add("Zombie"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // Whenever another Zombie enters the battlefield under your control, each opponent loses 1 life and you gain 1 life. - Effect effect = new LoseLifeOpponentsEffect(1); - Effect effect2 = new GainLifeEffect(1); - Ability ability = new EntersBattlefieldAllTriggeredAbility(effect, filter, rule); - ability.addEffect(effect2); - this.addAbility(ability); - - } - - public WaywardServant(final WaywardServant card) { - super(card); - } - - @Override - public WaywardServant copy() { - return new WaywardServant(this); - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author jeffwadsworth + */ +public class WaywardServant extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("another Zombie"); + + static { + filter.add(new SubtypePredicate(SubType.ZOMBIE)); + filter.add(new AnotherPredicate()); + } + + private static final String rule = "Whenever another Zombie enters the battlefield under your control, each opponent loses 1 life and you gain 1 life."; + + public WaywardServant(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{B}"); + + this.subtype.add(SubType.ZOMBIE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever another Zombie enters the battlefield under your control, each opponent loses 1 life and you gain 1 life. + Effect effect = new LoseLifeOpponentsEffect(1); + Effect effect2 = new GainLifeEffect(1); + Ability ability = new EntersBattlefieldAllTriggeredAbility(effect, filter, rule); + ability.addEffect(effect2); + this.addAbility(ability); + + } + + public WaywardServant(final WaywardServant card) { + super(card); + } + + @Override + public WaywardServant copy() { + return new WaywardServant(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WaywardSoul.java b/Mage.Sets/src/mage/cards/w/WaywardSoul.java index 6ea196b7cf..10a16ca2ba 100644 --- a/Mage.Sets/src/mage/cards/w/WaywardSoul.java +++ b/Mage.Sets/src/mage/cards/w/WaywardSoul.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class WaywardSoul extends CardImpl { public WaywardSoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/Weakness.java b/Mage.Sets/src/mage/cards/w/Weakness.java index 808f1e6eb5..ed89d95270 100644 --- a/Mage.Sets/src/mage/cards/w/Weakness.java +++ b/Mage.Sets/src/mage/cards/w/Weakness.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class Weakness extends CardImpl { public Weakness(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/w/WeaponcraftEnthusiast.java b/Mage.Sets/src/mage/cards/w/WeaponcraftEnthusiast.java index 6174ffab42..d659d16a44 100644 --- a/Mage.Sets/src/mage/cards/w/WeaponcraftEnthusiast.java +++ b/Mage.Sets/src/mage/cards/w/WeaponcraftEnthusiast.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FabricateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class WeaponcraftEnthusiast extends CardImpl { public WeaponcraftEnthusiast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Aetherborn"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.AETHERBORN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WeaponsTrainer.java b/Mage.Sets/src/mage/cards/w/WeaponsTrainer.java index c5d21db64c..a2ee1278cc 100644 --- a/Mage.Sets/src/mage/cards/w/WeaponsTrainer.java +++ b/Mage.Sets/src/mage/cards/w/WeaponsTrainer.java @@ -57,9 +57,9 @@ public class WeaponsTrainer extends CardImpl { public WeaponsTrainer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Ally"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ALLY); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WeatheredBodyguards.java b/Mage.Sets/src/mage/cards/w/WeatheredBodyguards.java new file mode 100644 index 0000000000..e346bf6de8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WeatheredBodyguards.java @@ -0,0 +1,118 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.constants.SubType; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.DamagePlayerEvent; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author TheElk801 + */ +public class WeatheredBodyguards extends CardImpl { + + public WeatheredBodyguards(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(2); + this.toughness = new MageInt(5); + + // As long as Weathered Bodyguards is untapped, all combat damage that would be dealt to you by unblocked creatures is dealt to Weathered Bodyguards instead. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new WeatheredBodyguardsEffect())); + + // Morph {3}{W} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{3}{W}"))); + + } + + public WeatheredBodyguards(final WeatheredBodyguards card) { + super(card); + } + + @Override + public WeatheredBodyguards copy() { + return new WeatheredBodyguards(this); + } +} + +class WeatheredBodyguardsEffect extends ReplacementEffectImpl { + + WeatheredBodyguardsEffect() { + super(Duration.WhileOnBattlefield, Outcome.RedirectDamage); + staticText = "As long as {this} is untapped, all combat damage that would be dealt to you by unblocked creatures is dealt to {this} instead"; + } + + WeatheredBodyguardsEffect(final WeatheredBodyguardsEffect effect) { + super(effect); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + DamagePlayerEvent damageEvent = (DamagePlayerEvent) event; + Permanent damager = game.getPermanentOrLKIBattlefield(damageEvent.getSourceId()); + Permanent p = game.getPermanent(source.getSourceId()); + if (p != null && !p.isTapped() && damageEvent.isCombatDamage() && damager != null && damager.isAttacking() && !damager.isBlocked(game)) { + p.damage(damageEvent.getAmount(), event.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable()); + return true; + } + return true; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DAMAGE_PLAYER; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + return event.getPlayerId().equals(source.getControllerId()); + } + + @Override + public WeatheredBodyguardsEffect copy() { + return new WeatheredBodyguardsEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WeatheredWayfarer.java b/Mage.Sets/src/mage/cards/w/WeatheredWayfarer.java index 6ac9d83233..1bb704cd68 100644 --- a/Mage.Sets/src/mage/cards/w/WeatheredWayfarer.java +++ b/Mage.Sets/src/mage/cards/w/WeatheredWayfarer.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.filter.common.FilterLandCard; @@ -51,9 +52,9 @@ public class WeatheredWayfarer extends CardImpl { public WeatheredWayfarer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Human"); - this.subtype.add("Nomad"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOMAD); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WeatherseedElf.java b/Mage.Sets/src/mage/cards/w/WeatherseedElf.java index 32b88b3746..cc009d0e10 100644 --- a/Mage.Sets/src/mage/cards/w/WeatherseedElf.java +++ b/Mage.Sets/src/mage/cards/w/WeatherseedElf.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class WeatherseedElf extends CardImpl { public WeatherseedElf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WeatherseedFaeries.java b/Mage.Sets/src/mage/cards/w/WeatherseedFaeries.java index 4597b63428..7d573ff57f 100644 --- a/Mage.Sets/src/mage/cards/w/WeatherseedFaeries.java +++ b/Mage.Sets/src/mage/cards/w/WeatherseedFaeries.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class WeatherseedFaeries extends CardImpl { public WeatherseedFaeries(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WeatherseedTotem.java b/Mage.Sets/src/mage/cards/w/WeatherseedTotem.java new file mode 100644 index 0000000000..75299b739b --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WeatherseedTotem.java @@ -0,0 +1,113 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.Condition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.mana.GreenManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.Token; + +/** + * + * @author TheElk801 + */ +public class WeatherseedTotem extends CardImpl { + + public WeatherseedTotem(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + // {tap}: Add {G} to your mana pool. + this.addAbility(new GreenManaAbility()); + + // {2}{G}{G}{G}: Weatherseed Totem becomes a 5/3 green Treefolk artifact creature with trample until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new WeatherseedTotemToken(), "", Duration.EndOfTurn), new ManaCostsImpl<>("{2}{G}{G}{G}"))); + + // When Weatherseed Totem is put into a graveyard from the battlefield, if it was a creature, return this card to its owner's hand. + this.addAbility(new ConditionalTriggeredAbility( + new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new ReturnToHandSourceEffect()), + new WeatherseedTotemCondition(), + "When {this} is put into a graveyard from the battlefield, " + + "if it was a creature, return this card to its owner's hand" + )); + } + + public WeatherseedTotem(final WeatherseedTotem card) { + super(card); + } + + @Override + public WeatherseedTotem copy() { + return new WeatherseedTotem(this); + } +} + +class WeatherseedTotemCondition implements Condition { + + public WeatherseedTotemCondition() { + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (permanent != null) { + return permanent.isCreature(); + } + return false; + } +} + +class WeatherseedTotemToken extends Token { + + public WeatherseedTotemToken() { + super("", "5/3 green Treefolk artifact creature with trample"); + cardType.add(CardType.CREATURE); + cardType.add(CardType.ARTIFACT); + subtype.add(SubType.TREEFOLK); + color.setGreen(true); + power = new MageInt(5); + toughness = new MageInt(3); + this.addAbility(TrampleAbility.getInstance()); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WeatherseedTreefolk.java b/Mage.Sets/src/mage/cards/w/WeatherseedTreefolk.java index 9b50dce8d4..ee965e301b 100644 --- a/Mage.Sets/src/mage/cards/w/WeatherseedTreefolk.java +++ b/Mage.Sets/src/mage/cards/w/WeatherseedTreefolk.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class WeatherseedTreefolk extends CardImpl { public WeatherseedTreefolk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WeaverOfCurrents.java b/Mage.Sets/src/mage/cards/w/WeaverOfCurrents.java index dfd1541ce2..04d363f6ec 100644 --- a/Mage.Sets/src/mage/cards/w/WeaverOfCurrents.java +++ b/Mage.Sets/src/mage/cards/w/WeaverOfCurrents.java @@ -35,6 +35,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class WeaverOfCurrents extends CardImpl { public WeaverOfCurrents(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{U}"); - this.subtype.add("Naga"); - this.subtype.add("Druid"); + this.subtype.add(SubType.NAGA); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WeaverOfLies.java b/Mage.Sets/src/mage/cards/w/WeaverOfLies.java new file mode 100644 index 0000000000..f43b429040 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WeaverOfLies.java @@ -0,0 +1,121 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; +import mage.constants.SubType; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BecomesFaceDownCreatureAllEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicate; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.filter.predicate.permanent.PermanentIdPredicate; +import mage.game.Game; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class WeaverOfLies extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("other creatures with a morph ability"); + + static { + filter.add(new AbilityPredicate(MorphAbility.class)); + filter.add(new AnotherPredicate()); + } + + public WeaverOfLies(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}"); + + this.subtype.add(SubType.BEAST); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Morph {4}{U} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{4}{U}"))); + + // When Weaver of Lies is turned face up, turn any number of target creatures with a morph ability other than Weaver of Lies face down. + Ability ability = new TurnedFaceUpSourceTriggeredAbility(new WeaverOfLiesEffect(), false, false); + ability.addTarget(new TargetCreaturePermanent(0, Integer.MAX_VALUE, filter, false)); + this.addAbility(ability); + } + + public WeaverOfLies(final WeaverOfLies card) { + super(card); + } + + @Override + public WeaverOfLies copy() { + return new WeaverOfLies(this); + } +} + +class WeaverOfLiesEffect extends OneShotEffect { + + WeaverOfLiesEffect() { + super(Outcome.Benefit); + this.staticText = "turn any number of target creatures with a morph ability other than {this} face down"; + } + + WeaverOfLiesEffect(final WeaverOfLiesEffect effect) { + super(effect); + } + + @Override + public WeaverOfLiesEffect copy() { + return new WeaverOfLiesEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Predicate pred = new PermanentIdPredicate(UUID.randomUUID()); + for (Target target : source.getTargets()) { + for (UUID targetId : target.getTargets()) { + pred = Predicates.or(pred, new PermanentIdPredicate(targetId)); + } + } + FilterCreaturePermanent filter = new FilterCreaturePermanent(); + filter.add(pred); + game.addEffect(new BecomesFaceDownCreatureAllEffect(filter), source); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/w/WeaverOfLightning.java b/Mage.Sets/src/mage/cards/w/WeaverOfLightning.java index 61c1090f75..349f5ccb4a 100644 --- a/Mage.Sets/src/mage/cards/w/WeaverOfLightning.java +++ b/Mage.Sets/src/mage/cards/w/WeaverOfLightning.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterInstantOrSorcerySpell; @@ -56,8 +57,8 @@ public class WeaverOfLightning extends CardImpl { public WeaverOfLightning(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/Web.java b/Mage.Sets/src/mage/cards/w/Web.java index f11689e2ff..bec44c6cfc 100644 --- a/Mage.Sets/src/mage/cards/w/Web.java +++ b/Mage.Sets/src/mage/cards/w/Web.java @@ -50,7 +50,7 @@ public class Web extends CardImpl { public Web(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/w/WebOfInertia.java b/Mage.Sets/src/mage/cards/w/WebOfInertia.java index f2765aff77..983170a04c 100644 --- a/Mage.Sets/src/mage/cards/w/WebOfInertia.java +++ b/Mage.Sets/src/mage/cards/w/WebOfInertia.java @@ -1,152 +1,152 @@ -/* - * 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.cards.w; - -import java.util.UUID; -import mage.MageObject; -import mage.abilities.Ability; -import mage.abilities.Mode; -import mage.abilities.common.BeginningOfCombatTriggeredAbility; -import mage.abilities.costs.Cost; -import mage.abilities.costs.common.ExileFromGraveCost; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.RestrictionEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.common.TargetCardInYourGraveyard; - -/** - * - * @author Styxo - */ -public class WebOfInertia extends CardImpl { - - public WebOfInertia(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); - - // At the beginning of combat on each opponent's turn, that player may exile a card from his or her graveyard. If the player doesn't, creatures he or she controls can't attack you this turn. - this.addAbility(new BeginningOfCombatTriggeredAbility(Zone.BATTLEFIELD, new WebOfInertiaEffect(), TargetController.OPPONENT, false, true)); - } - - public WebOfInertia(final WebOfInertia card) { - super(card); - } - - @Override - public WebOfInertia copy() { - return new WebOfInertia(this); - } -} - -class WebOfInertiaEffect extends OneShotEffect { - - public WebOfInertiaEffect() { - super(Outcome.Detriment); - staticText = "that player may exile a card from his or her graveyard. If the player doesn't, creatures he or she controls can't attack you this turn"; - } - - public WebOfInertiaEffect(final WebOfInertiaEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(getTargetPointer().getFirst(game, source)); - MageObject sourceObject = game.getObject(source.getSourceId()); - if (player != null && sourceObject != null) { - Cost cost = new ExileFromGraveCost(new TargetCardInYourGraveyard()); - if (cost.canPay(source, source.getSourceId(), player.getId(), game) && player.chooseUse(Outcome.Detriment, "Exile a card from your graveyard?", source, game)) { - cost.clearPaid(); - if (cost.pay(source, game, source.getSourceId(), player.getId(), false, null)) { - if (!game.isSimulation()) { - game.informPlayers(player.getLogName() + " pays the cost to prevent the effect"); - } - } - } else { - game.addEffect(new WebOfInertiaRestrictionEffect(player.getId()), source); - } - return true; - } - return false; - } - - @Override - public String getText(Mode mode) { - return staticText; - } - - @Override - public WebOfInertiaEffect copy() { - return new WebOfInertiaEffect(this); - } - -} - -class WebOfInertiaRestrictionEffect extends RestrictionEffect { - - private final UUID attackerID; - - public WebOfInertiaRestrictionEffect(UUID attackerID) { - super(Duration.EndOfTurn); - this.attackerID = attackerID; - } - - public WebOfInertiaRestrictionEffect(final WebOfInertiaRestrictionEffect effect) { - super(effect); - this.attackerID = effect.attackerID; - } - - @Override - public boolean applies(Permanent permanent, Ability source, Game game) { - return permanent.getControllerId().equals(attackerID); - } - - @Override - public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) { - return !defenderId.equals(source.getControllerId()); - } - - @Override - public String getText(Mode mode) { - return staticText; - } - - @Override - public WebOfInertiaRestrictionEffect copy() { - return new WebOfInertiaRestrictionEffect(this); - } - -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.ExileFromGraveCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.RestrictionEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author Styxo + */ +public class WebOfInertia extends CardImpl { + + public WebOfInertia(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + + // At the beginning of combat on each opponent's turn, that player may exile a card from his or her graveyard. If the player doesn't, creatures he or she controls can't attack you this turn. + this.addAbility(new BeginningOfCombatTriggeredAbility(Zone.BATTLEFIELD, new WebOfInertiaEffect(), TargetController.OPPONENT, false, true)); + } + + public WebOfInertia(final WebOfInertia card) { + super(card); + } + + @Override + public WebOfInertia copy() { + return new WebOfInertia(this); + } +} + +class WebOfInertiaEffect extends OneShotEffect { + + public WebOfInertiaEffect() { + super(Outcome.Detriment); + staticText = "that player may exile a card from his or her graveyard. If the player doesn't, creatures he or she controls can't attack you this turn"; + } + + public WebOfInertiaEffect(final WebOfInertiaEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(getTargetPointer().getFirst(game, source)); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (player != null && sourceObject != null) { + Cost cost = new ExileFromGraveCost(new TargetCardInYourGraveyard()); + if (cost.canPay(source, source.getSourceId(), player.getId(), game) && player.chooseUse(Outcome.Detriment, "Exile a card from your graveyard?", source, game)) { + cost.clearPaid(); + if (cost.pay(source, game, source.getSourceId(), player.getId(), false, null)) { + if (!game.isSimulation()) { + game.informPlayers(player.getLogName() + " pays the cost to prevent the effect"); + } + } + } else { + game.addEffect(new WebOfInertiaRestrictionEffect(player.getId()), source); + } + return true; + } + return false; + } + + @Override + public String getText(Mode mode) { + return staticText; + } + + @Override + public WebOfInertiaEffect copy() { + return new WebOfInertiaEffect(this); + } + +} + +class WebOfInertiaRestrictionEffect extends RestrictionEffect { + + private final UUID attackerID; + + public WebOfInertiaRestrictionEffect(UUID attackerID) { + super(Duration.EndOfTurn); + this.attackerID = attackerID; + } + + public WebOfInertiaRestrictionEffect(final WebOfInertiaRestrictionEffect effect) { + super(effect); + this.attackerID = effect.attackerID; + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return permanent.getControllerId().equals(attackerID); + } + + @Override + public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) { + return !defenderId.equals(source.getControllerId()); + } + + @Override + public String getText(Mode mode) { + return staticText; + } + + @Override + public WebOfInertiaRestrictionEffect copy() { + return new WebOfInertiaRestrictionEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/w/WeeDragonauts.java b/Mage.Sets/src/mage/cards/w/WeeDragonauts.java index 6764f7cadb..735518a1d5 100644 --- a/Mage.Sets/src/mage/cards/w/WeeDragonauts.java +++ b/Mage.Sets/src/mage/cards/w/WeeDragonauts.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterInstantOrSorcerySpell; @@ -45,8 +46,8 @@ public class WeeDragonauts extends CardImpl { public WeeDragonauts(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{R}"); - this.subtype.add("Faerie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WeedPrunerPoplar.java b/Mage.Sets/src/mage/cards/w/WeedPrunerPoplar.java index 0a47d8941a..0c82575e42 100644 --- a/Mage.Sets/src/mage/cards/w/WeedPrunerPoplar.java +++ b/Mage.Sets/src/mage/cards/w/WeedPrunerPoplar.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; @@ -55,8 +56,8 @@ public class WeedPrunerPoplar extends CardImpl { public WeedPrunerPoplar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Treefolk"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WeequayBeastmaster.java b/Mage.Sets/src/mage/cards/w/WeequayBeastmaster.java index 07638a55c6..ca7dcc929b 100644 --- a/Mage.Sets/src/mage/cards/w/WeequayBeastmaster.java +++ b/Mage.Sets/src/mage/cards/w/WeequayBeastmaster.java @@ -1,71 +1,72 @@ -/* - * 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.cards.w; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.BecomesMonstrousTriggeredAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.cost.AbilitiesCostReductionControllerEffect; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.abilities.keyword.MonstrosityAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.counters.CounterType; - -/** - * - * @author Styxo - */ -public class WeequayBeastmaster extends CardImpl { - - public WeequayBeastmaster(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Weequay"); - this.subtype.add("Shaman"); - this.power = new MageInt(2); - this.toughness = new MageInt(1); - - // Monstrosity abilities you activate cost {1} less to activate. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AbilitiesCostReductionControllerEffect(MonstrosityAbility.class, "Monstrosity"))); - - // Whenever a creature you control becomes monstrous, put an additional +1/+1 counter on that creature. - this.addAbility(new BecomesMonstrousTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()))); - } - - public WeequayBeastmaster(final WeequayBeastmaster card) { - super(card); - } - - @Override - public WeequayBeastmaster copy() { - return new WeequayBeastmaster(this); - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesMonstrousTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.cost.AbilitiesCostReductionControllerEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.MonstrosityAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author Styxo + */ +public class WeequayBeastmaster extends CardImpl { + + public WeequayBeastmaster(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); + this.subtype.add(SubType.WEEQUAY); + this.subtype.add(SubType.SHAMAN); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Monstrosity abilities you activate cost {1} less to activate. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AbilitiesCostReductionControllerEffect(MonstrosityAbility.class, "Monstrosity"))); + + // Whenever a creature you control becomes monstrous, put an additional +1/+1 counter on that creature. + this.addAbility(new BecomesMonstrousTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()))); + } + + public WeequayBeastmaster(final WeequayBeastmaster card) { + super(card); + } + + @Override + public WeequayBeastmaster copy() { + return new WeequayBeastmaster(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WeiAmbushForce.java b/Mage.Sets/src/mage/cards/w/WeiAmbushForce.java index 2e0bd814b5..229c864090 100644 --- a/Mage.Sets/src/mage/cards/w/WeiAmbushForce.java +++ b/Mage.Sets/src/mage/cards/w/WeiAmbushForce.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -44,8 +45,8 @@ public class WeiAmbushForce extends CardImpl { public WeiAmbushForce(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WeiAssassins.java b/Mage.Sets/src/mage/cards/w/WeiAssassins.java new file mode 100644 index 0000000000..282f9b0dc0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WeiAssassins.java @@ -0,0 +1,116 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.TargetPermanent; +import mage.target.common.TargetOpponent; + +/** + * + * @author TheElk801 + */ +public class WeiAssassins extends CardImpl { + + public WeiAssassins(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ASSASSIN); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // When Wei Assassins enters the battlefield, target opponent chooses a creature he or she controls. Destroy it. + Ability ability = new EntersBattlefieldTriggeredAbility(new WeiAssassinsEffect(), false); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public WeiAssassins(final WeiAssassins card) { + super(card); + } + + @Override + public WeiAssassins copy() { + return new WeiAssassins(this); + } +} + +class WeiAssassinsEffect extends OneShotEffect { + + WeiAssassinsEffect() { + super(Outcome.Benefit); + this.staticText = "target opponent chooses a creature he or she controls. Destroy it."; + } + + WeiAssassinsEffect(final WeiAssassinsEffect effect) { + super(effect); + } + + @Override + public WeiAssassinsEffect copy() { + return new WeiAssassinsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getFirstTarget()); + if (player == null) { + return false; + } + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you control"); + filter.add(new ControllerIdPredicate(player.getId())); + Target target = new TargetPermanent(1, 1, filter, true); + if (target.canChoose(source.getSourceId(), player.getId(), game)) { + while (!target.isChosen() && target.canChoose(player.getId(), game) && player.canRespond()) { + player.chooseTarget(Outcome.DestroyPermanent, target, source, game); + } + Permanent permanent = game.getPermanent(target.getFirstTarget()); + if (permanent != null) { + permanent.destroy(source.getSourceId(), game, false); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/w/WeiEliteCompanions.java b/Mage.Sets/src/mage/cards/w/WeiEliteCompanions.java index 6aa470f624..0fbd3e64fd 100644 --- a/Mage.Sets/src/mage/cards/w/WeiEliteCompanions.java +++ b/Mage.Sets/src/mage/cards/w/WeiEliteCompanions.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class WeiEliteCompanions extends CardImpl { public WeiEliteCompanions(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WeiInfantry.java b/Mage.Sets/src/mage/cards/w/WeiInfantry.java index c54a0cc0ab..a9db729b58 100644 --- a/Mage.Sets/src/mage/cards/w/WeiInfantry.java +++ b/Mage.Sets/src/mage/cards/w/WeiInfantry.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class WeiInfantry extends CardImpl { public WeiInfantry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WeiNightRaiders.java b/Mage.Sets/src/mage/cards/w/WeiNightRaiders.java index 18dd55d4ec..ea37830a4d 100644 --- a/Mage.Sets/src/mage/cards/w/WeiNightRaiders.java +++ b/Mage.Sets/src/mage/cards/w/WeiNightRaiders.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class WeiNightRaiders extends CardImpl { public WeiNightRaiders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WeiScout.java b/Mage.Sets/src/mage/cards/w/WeiScout.java index ecfe7ddb0c..10fb441c5d 100644 --- a/Mage.Sets/src/mage/cards/w/WeiScout.java +++ b/Mage.Sets/src/mage/cards/w/WeiScout.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,9 +43,9 @@ public class WeiScout extends CardImpl { public WeiScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WeiStrikeForce.java b/Mage.Sets/src/mage/cards/w/WeiStrikeForce.java index fa351bdefe..8ee51f3477 100644 --- a/Mage.Sets/src/mage/cards/w/WeiStrikeForce.java +++ b/Mage.Sets/src/mage/cards/w/WeiStrikeForce.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class WeiStrikeForce extends CardImpl { public WeiStrikeForce(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WeightOfConscience.java b/Mage.Sets/src/mage/cards/w/WeightOfConscience.java index 0c39b0ef6a..36b54970e4 100644 --- a/Mage.Sets/src/mage/cards/w/WeightOfConscience.java +++ b/Mage.Sets/src/mage/cards/w/WeightOfConscience.java @@ -60,7 +60,7 @@ public class WeightOfConscience extends CardImpl { public WeightOfConscience(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/w/WeightOfTheUnderworld.java b/Mage.Sets/src/mage/cards/w/WeightOfTheUnderworld.java index d433a0dfab..c3eec97a2e 100644 --- a/Mage.Sets/src/mage/cards/w/WeightOfTheUnderworld.java +++ b/Mage.Sets/src/mage/cards/w/WeightOfTheUnderworld.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class WeightOfTheUnderworld extends CardImpl { public WeightOfTheUnderworld(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/w/WeirdedVampire.java b/Mage.Sets/src/mage/cards/w/WeirdedVampire.java index fc8d787105..e78de516d3 100644 --- a/Mage.Sets/src/mage/cards/w/WeirdedVampire.java +++ b/Mage.Sets/src/mage/cards/w/WeirdedVampire.java @@ -1,63 +1,64 @@ -/* - * 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.cards.w; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.keyword.MadnessAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author LevelX2 - */ -public class WeirdedVampire extends CardImpl { - - public WeirdedVampire(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Horror"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // Madness {2}{B} - this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{2}{B}"))); - } - - public WeirdedVampire(final WeirdedVampire card) { - super(card); - } - - @Override - public WeirdedVampire copy() { - return new WeirdedVampire(this); - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MadnessAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author LevelX2 + */ +public class WeirdedVampire extends CardImpl { + + public WeirdedVampire(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.HORROR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Madness {2}{B} + this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{2}{B}"))); + } + + public WeirdedVampire(final WeirdedVampire card) { + super(card); + } + + @Override + public WeirdedVampire copy() { + return new WeirdedVampire(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WeirdingShaman.java b/Mage.Sets/src/mage/cards/w/WeirdingShaman.java index ca78196793..870b554cff 100644 --- a/Mage.Sets/src/mage/cards/w/WeirdingShaman.java +++ b/Mage.Sets/src/mage/cards/w/WeirdingShaman.java @@ -58,8 +58,8 @@ public class WeirdingShaman extends CardImpl { public WeirdingShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WeirdingWood.java b/Mage.Sets/src/mage/cards/w/WeirdingWood.java index f9b92c6746..6ae484043c 100644 --- a/Mage.Sets/src/mage/cards/w/WeirdingWood.java +++ b/Mage.Sets/src/mage/cards/w/WeirdingWood.java @@ -43,6 +43,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; @@ -56,7 +57,7 @@ public class WeirdingWood extends CardImpl { public WeirdingWood(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); diff --git a/Mage.Sets/src/mage/cards/w/WelderAutomaton.java b/Mage.Sets/src/mage/cards/w/WelderAutomaton.java index 052f4af0d0..78b0c0bb1b 100644 --- a/Mage.Sets/src/mage/cards/w/WelderAutomaton.java +++ b/Mage.Sets/src/mage/cards/w/WelderAutomaton.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamagePlayersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class WelderAutomaton extends CardImpl { public WelderAutomaton(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WeldfastEngineer.java b/Mage.Sets/src/mage/cards/w/WeldfastEngineer.java index 6a02f410c8..3637d96a82 100644 --- a/Mage.Sets/src/mage/cards/w/WeldfastEngineer.java +++ b/Mage.Sets/src/mage/cards/w/WeldfastEngineer.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.filter.common.FilterControlledCreaturePermanent; @@ -56,8 +57,8 @@ public class WeldfastEngineer extends CardImpl { public WeldfastEngineer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WeldfastMonitor.java b/Mage.Sets/src/mage/cards/w/WeldfastMonitor.java index d6359ad6f1..78d2919763 100644 --- a/Mage.Sets/src/mage/cards/w/WeldfastMonitor.java +++ b/Mage.Sets/src/mage/cards/w/WeldfastMonitor.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class WeldfastMonitor extends CardImpl { public WeldfastMonitor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WeldfastWingsmith.java b/Mage.Sets/src/mage/cards/w/WeldfastWingsmith.java index 1918332c7d..f84e23a817 100644 --- a/Mage.Sets/src/mage/cards/w/WeldfastWingsmith.java +++ b/Mage.Sets/src/mage/cards/w/WeldfastWingsmith.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.common.FilterControlledArtifactPermanent; @@ -46,8 +47,8 @@ public class WeldfastWingsmith extends CardImpl { public WeldfastWingsmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WeldingSparks.java b/Mage.Sets/src/mage/cards/w/WeldingSparks.java index 345165b05f..eeb1750a7b 100644 --- a/Mage.Sets/src/mage/cards/w/WeldingSparks.java +++ b/Mage.Sets/src/mage/cards/w/WeldingSparks.java @@ -1,65 +1,65 @@ -/* - * 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.cards.w; - -import java.util.UUID; -import mage.abilities.dynamicvalue.IntPlusDynamicValue; -import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.DamageTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.common.FilterControlledArtifactPermanent; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author LevelX2 - */ -public class WeldingSparks extends CardImpl { - - public WeldingSparks(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - - // Welding Sparks deals X damage to target creature, where X is 3 plus the number of artifacts you control. - Effect effect = new DamageTargetEffect(new IntPlusDynamicValue(3, new PermanentsOnBattlefieldCount(new FilterControlledArtifactPermanent("artifacts you control")))); - effect.setText("{this} deals X damage to target creature, where X is 3 plus the number of artifacts you control"); - this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - } - - public WeldingSparks(final WeldingSparks card) { - super(card); - } - - @Override - public WeldingSparks copy() { - return new WeldingSparks(this); - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.abilities.dynamicvalue.IntPlusDynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterControlledArtifactPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class WeldingSparks extends CardImpl { + + public WeldingSparks(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); + + // Welding Sparks deals X damage to target creature, where X is 3 plus the number of artifacts you control. + Effect effect = new DamageTargetEffect(new IntPlusDynamicValue(3, new PermanentsOnBattlefieldCount(new FilterControlledArtifactPermanent("artifacts you control")))); + effect.setText("{this} deals X damage to target creature, where X is 3 plus the number of artifacts you control"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public WeldingSparks(final WeldingSparks card) { + super(card); + } + + @Override + public WeldingSparks copy() { + return new WeldingSparks(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WelkinGuide.java b/Mage.Sets/src/mage/cards/w/WelkinGuide.java index 74328a2431..3176583274 100644 --- a/Mage.Sets/src/mage/cards/w/WelkinGuide.java +++ b/Mage.Sets/src/mage/cards/w/WelkinGuide.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -48,8 +49,8 @@ public class WelkinGuide extends CardImpl { public WelkinGuide(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WelkinHawk.java b/Mage.Sets/src/mage/cards/w/WelkinHawk.java index dc1dedd657..81cb90cac0 100644 --- a/Mage.Sets/src/mage/cards/w/WelkinHawk.java +++ b/Mage.Sets/src/mage/cards/w/WelkinHawk.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.NamePredicate; import mage.target.common.TargetCardInLibrary; @@ -43,9 +44,8 @@ import mage.target.common.TargetCardInLibrary; * * @author fireshoes */ - public class WelkinHawk extends CardImpl { - + private static final FilterCard filter = new FilterCard("card named Welkin Hawk"); static { @@ -53,16 +53,16 @@ public class WelkinHawk extends CardImpl { } public WelkinHawk(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Bird"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); // Flying this.addAbility(FlyingAbility.getInstance()); - + // When Welkin Hawk dies, you may search your library for a card named Welkin Hawk, reveal that card, put it into your hand, then shuffle your library. - TargetCardInLibrary target = new TargetCardInLibrary(0, 1, filter); + TargetCardInLibrary target = new TargetCardInLibrary(1, 1, filter); this.addAbility(new DiesTriggeredAbility(new SearchLibraryPutInHandEffect(target, true, true), true)); } diff --git a/Mage.Sets/src/mage/cards/w/WelkinTern.java b/Mage.Sets/src/mage/cards/w/WelkinTern.java index 7e56f3ae39..f101d7938a 100644 --- a/Mage.Sets/src/mage/cards/w/WelkinTern.java +++ b/Mage.Sets/src/mage/cards/w/WelkinTern.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class WelkinTern extends CardImpl { public WelkinTern (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(2 ); this.toughness = new MageInt( 1); diff --git a/Mage.Sets/src/mage/cards/w/WellOfKnowledge.java b/Mage.Sets/src/mage/cards/w/WellOfKnowledge.java index 7860b1080b..d735337165 100644 --- a/Mage.Sets/src/mage/cards/w/WellOfKnowledge.java +++ b/Mage.Sets/src/mage/cards/w/WellOfKnowledge.java @@ -1,144 +1,141 @@ -/* - * 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.cards.w; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.ActivatedAbilityImpl; -import mage.abilities.condition.Condition; -import mage.abilities.condition.common.IsStepCondition; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.Effects; -import mage.abilities.effects.OneShotEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.EffectType; -import mage.constants.Outcome; -import mage.constants.PhaseStep; -import mage.constants.Zone; -import mage.game.Game; -import mage.players.Player; - -/** - * - * @author Styxo - */ -public class WellOfKnowledge extends CardImpl { - - public WellOfKnowledge(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); - - // {2}: Draw a card. Any player may activate this ability but only during his or her draw step. - this.addAbility(new WellOfKnowledgeConditionalActivatedAbility()); - - } - - public WellOfKnowledge(final WellOfKnowledge card) { - super(card); - } - - @Override - public WellOfKnowledge copy() { - return new WellOfKnowledge(this); - } -} - -class WellOfKnowledgeConditionalActivatedAbility extends ActivatedAbilityImpl { - - private final Condition condition; - - public WellOfKnowledgeConditionalActivatedAbility() { - super(Zone.BATTLEFIELD, new WellOfKnowledgeEffect(), new GenericManaCost(2)); - condition = new IsStepCondition(PhaseStep.DRAW, false); - } - - public WellOfKnowledgeConditionalActivatedAbility(final WellOfKnowledgeConditionalActivatedAbility ability) { - super(ability); - this.condition = ability.condition; - } - - @Override - public Effects getEffects(Game game, EffectType effectType) { - if (!condition.apply(game, this)) { - return new Effects(); - } - return super.getEffects(game, effectType); - } - - @Override - public boolean canActivate(UUID playerId, Game game) { - if (condition.apply(game, this) - && costs.canPay(this, sourceId, playerId, game) - && game.getActivePlayerId().equals(playerId)) { - this.activatorId = playerId; - return true; - } - return false; - - } - - @Override - public WellOfKnowledgeConditionalActivatedAbility copy() { - return new WellOfKnowledgeConditionalActivatedAbility(this); - } - - @Override - public String getRule() { - return "{2}: Draw a card. Any player may activate this ability but only during his or her draw step."; - } -} - -class WellOfKnowledgeEffect extends OneShotEffect { - - public WellOfKnowledgeEffect() { - super(Outcome.DrawCard); - } - - public WellOfKnowledgeEffect(final WellOfKnowledgeEffect effect) { - super(effect); - } - - @Override - public WellOfKnowledgeEffect copy() { - return new WellOfKnowledgeEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - if (source instanceof ActivatedAbilityImpl) { - Player activator = game.getPlayer(((ActivatedAbilityImpl) source).getActivatorId()); - if (activator != null) { - activator.drawCards(1, game); - return true; - } - - } - return false; - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.ActivatedAbilityImpl; +import mage.abilities.condition.common.IsStepCondition; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.Effects; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.EffectType; +import mage.constants.Outcome; +import mage.constants.PhaseStep; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author Styxo + */ +public class WellOfKnowledge extends CardImpl { + + public WellOfKnowledge(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + // {2}: Draw a card. Any player may activate this ability but only during his or her draw step. + this.addAbility(new WellOfKnowledgeConditionalActivatedAbility()); + + } + + public WellOfKnowledge(final WellOfKnowledge card) { + super(card); + } + + @Override + public WellOfKnowledge copy() { + return new WellOfKnowledge(this); + } +} + +class WellOfKnowledgeConditionalActivatedAbility extends ActivatedAbilityImpl { + + public WellOfKnowledgeConditionalActivatedAbility() { + super(Zone.BATTLEFIELD, new WellOfKnowledgeEffect(), new GenericManaCost(2)); + condition = new IsStepCondition(PhaseStep.DRAW, false); + } + + public WellOfKnowledgeConditionalActivatedAbility(final WellOfKnowledgeConditionalActivatedAbility ability) { + super(ability); + this.condition = ability.condition; + } + + @Override + public Effects getEffects(Game game, EffectType effectType) { + if (!condition.apply(game, this)) { + return new Effects(); + } + return super.getEffects(game, effectType); + } + + @Override + public boolean canActivate(UUID playerId, Game game) { + if (condition.apply(game, this) + && costs.canPay(this, sourceId, playerId, game) + && game.getActivePlayerId().equals(playerId)) { + this.activatorId = playerId; + return true; + } + return false; + + } + + @Override + public WellOfKnowledgeConditionalActivatedAbility copy() { + return new WellOfKnowledgeConditionalActivatedAbility(this); + } + + @Override + public String getRule() { + return "{2}: Draw a card. Any player may activate this ability but only during his or her draw step."; + } +} + +class WellOfKnowledgeEffect extends OneShotEffect { + + public WellOfKnowledgeEffect() { + super(Outcome.DrawCard); + } + + public WellOfKnowledgeEffect(final WellOfKnowledgeEffect effect) { + super(effect); + } + + @Override + public WellOfKnowledgeEffect copy() { + return new WellOfKnowledgeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + if (source instanceof ActivatedAbilityImpl) { + Player activator = game.getPlayer(((ActivatedAbilityImpl) source).getActivatorId()); + if (activator != null) { + activator.drawCards(1, game); + return true; + } + + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/w/WellgabberApothecary.java b/Mage.Sets/src/mage/cards/w/WellgabberApothecary.java index f89078e693..fb1d5beabd 100644 --- a/Mage.Sets/src/mage/cards/w/WellgabberApothecary.java +++ b/Mage.Sets/src/mage/cards/w/WellgabberApothecary.java @@ -59,8 +59,8 @@ public class WellgabberApothecary extends CardImpl { public WellgabberApothecary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); - this.subtype.add("Merfolk"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/Wellwisher.java b/Mage.Sets/src/mage/cards/w/Wellwisher.java index feb5d5066b..7721f5f871 100644 --- a/Mage.Sets/src/mage/cards/w/Wellwisher.java +++ b/Mage.Sets/src/mage/cards/w/Wellwisher.java @@ -55,7 +55,7 @@ public class Wellwisher extends CardImpl { public Wellwisher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/Werebear.java b/Mage.Sets/src/mage/cards/w/Werebear.java index 7df2f353bb..f7193b7b07 100644 --- a/Mage.Sets/src/mage/cards/w/Werebear.java +++ b/Mage.Sets/src/mage/cards/w/Werebear.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,9 +51,9 @@ public class Werebear extends CardImpl { public Werebear(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Bear"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BEAR); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WerewolfOfAncientHunger.java b/Mage.Sets/src/mage/cards/w/WerewolfOfAncientHunger.java index 4ea23641fa..4f319fa6a6 100644 --- a/Mage.Sets/src/mage/cards/w/WerewolfOfAncientHunger.java +++ b/Mage.Sets/src/mage/cards/w/WerewolfOfAncientHunger.java @@ -45,6 +45,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class WerewolfOfAncientHunger extends CardImpl { public WerewolfOfAncientHunger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(0); this.toughness = new MageInt(0); this.color.setGreen(true); diff --git a/Mage.Sets/src/mage/cards/w/WerewolfRansacker.java b/Mage.Sets/src/mage/cards/w/WerewolfRansacker.java index 5e256931bf..e58df1473e 100644 --- a/Mage.Sets/src/mage/cards/w/WerewolfRansacker.java +++ b/Mage.Sets/src/mage/cards/w/WerewolfRansacker.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class WerewolfRansacker extends CardImpl { public WerewolfRansacker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.color.setRed(true); // this card is the second face of double-faced card diff --git a/Mage.Sets/src/mage/cards/w/WesternPaladin.java b/Mage.Sets/src/mage/cards/w/WesternPaladin.java index 58d527a94a..8c247afbe9 100644 --- a/Mage.Sets/src/mage/cards/w/WesternPaladin.java +++ b/Mage.Sets/src/mage/cards/w/WesternPaladin.java @@ -40,6 +40,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -59,8 +60,8 @@ public class WesternPaladin extends CardImpl { public WesternPaladin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WestvaleCultLeader.java b/Mage.Sets/src/mage/cards/w/WestvaleCultLeader.java index 43c205b692..3ee71d9144 100644 --- a/Mage.Sets/src/mage/cards/w/WestvaleCultLeader.java +++ b/Mage.Sets/src/mage/cards/w/WestvaleCultLeader.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -53,8 +54,8 @@ public class WestvaleCultLeader extends CardImpl { public WestvaleCultLeader(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(0); this.toughness = new MageInt(0); this.color.setWhite(true); diff --git a/Mage.Sets/src/mage/cards/w/WetlandSambar.java b/Mage.Sets/src/mage/cards/w/WetlandSambar.java index 76c4d3ce0a..71c11a1d4b 100644 --- a/Mage.Sets/src/mage/cards/w/WetlandSambar.java +++ b/Mage.Sets/src/mage/cards/w/WetlandSambar.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class WetlandSambar extends CardImpl { public WetlandSambar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Elk"); + this.subtype.add(SubType.ELK); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WharfInfiltrator.java b/Mage.Sets/src/mage/cards/w/WharfInfiltrator.java index 3ccebe349d..9e3116fc85 100644 --- a/Mage.Sets/src/mage/cards/w/WharfInfiltrator.java +++ b/Mage.Sets/src/mage/cards/w/WharfInfiltrator.java @@ -41,6 +41,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -55,8 +56,8 @@ public class WharfInfiltrator extends CardImpl { public WharfInfiltrator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.HORROR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WheelOfFate.java b/Mage.Sets/src/mage/cards/w/WheelOfFate.java index fa76391cce..4dd0bd1ae0 100644 --- a/Mage.Sets/src/mage/cards/w/WheelOfFate.java +++ b/Mage.Sets/src/mage/cards/w/WheelOfFate.java @@ -43,7 +43,7 @@ import mage.constants.CardType; public class WheelOfFate extends CardImpl { public WheelOfFate(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},""); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, ""); this.color.setRed(true); @@ -51,7 +51,7 @@ public class WheelOfFate extends CardImpl { this.addAbility(new SuspendAbility(4, new ManaCostsImpl("{1}{R}"), this)); // Each player discards his or her hand, then draws seven cards. this.getSpellAbility().addEffect(new DiscardHandAllEffect()); - this.getSpellAbility().addEffect(new DrawCardAllEffect(7)); + this.getSpellAbility().addEffect(new DrawCardAllEffect(7).setText(", then draws seven cards")); } public WheelOfFate(final WheelOfFate card) { diff --git a/Mage.Sets/src/mage/cards/w/WheelOfSunAndMoon.java b/Mage.Sets/src/mage/cards/w/WheelOfSunAndMoon.java index 6ea6909d99..4daa21c581 100644 --- a/Mage.Sets/src/mage/cards/w/WheelOfSunAndMoon.java +++ b/Mage.Sets/src/mage/cards/w/WheelOfSunAndMoon.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -59,7 +60,7 @@ public class WheelOfSunAndMoon extends CardImpl { public WheelOfSunAndMoon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G/W}{G/W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant player TargetPlayer auraTarget = new TargetPlayer(); diff --git a/Mage.Sets/src/mage/cards/w/Whimwader.java b/Mage.Sets/src/mage/cards/w/Whimwader.java index 08b64d9f69..297017558d 100644 --- a/Mage.Sets/src/mage/cards/w/Whimwader.java +++ b/Mage.Sets/src/mage/cards/w/Whimwader.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CantAttackUnlessDefenderControllsPer import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -54,7 +55,7 @@ public class Whimwader extends CardImpl { public Whimwader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WhipSergeant.java b/Mage.Sets/src/mage/cards/w/WhipSergeant.java index 2acaafe9d1..5d2ea865a0 100644 --- a/Mage.Sets/src/mage/cards/w/WhipSergeant.java +++ b/Mage.Sets/src/mage/cards/w/WhipSergeant.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class WhipSergeant extends CardImpl { public WhipSergeant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WhipSilk.java b/Mage.Sets/src/mage/cards/w/WhipSilk.java index ff229d329a..60ed899405 100644 --- a/Mage.Sets/src/mage/cards/w/WhipSilk.java +++ b/Mage.Sets/src/mage/cards/w/WhipSilk.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,7 +56,7 @@ public class WhipSilk extends CardImpl { public WhipSilk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/w/WhipSpineDrake.java b/Mage.Sets/src/mage/cards/w/WhipSpineDrake.java index 55ef5ad112..07c898f2a1 100644 --- a/Mage.Sets/src/mage/cards/w/WhipSpineDrake.java +++ b/Mage.Sets/src/mage/cards/w/WhipSpineDrake.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class WhipSpineDrake extends CardImpl { public WhipSpineDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WhipVine.java b/Mage.Sets/src/mage/cards/w/WhipVine.java index 2a69e0bdd6..54989897a7 100644 --- a/Mage.Sets/src/mage/cards/w/WhipVine.java +++ b/Mage.Sets/src/mage/cards/w/WhipVine.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -55,8 +56,8 @@ public class WhipVine extends CardImpl { public WhipVine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Wall"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.WALL); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/Whipcorder.java b/Mage.Sets/src/mage/cards/w/Whipcorder.java index 64c8389f2f..f582cabdd3 100644 --- a/Mage.Sets/src/mage/cards/w/Whipcorder.java +++ b/Mage.Sets/src/mage/cards/w/Whipcorder.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,9 +50,9 @@ public class Whipcorder extends CardImpl { public Whipcorder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Rebel"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.REBEL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/Whipkeeper.java b/Mage.Sets/src/mage/cards/w/Whipkeeper.java index 0759ec97fc..898e2a9e16 100644 --- a/Mage.Sets/src/mage/cards/w/Whipkeeper.java +++ b/Mage.Sets/src/mage/cards/w/Whipkeeper.java @@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -50,7 +51,7 @@ public class Whipkeeper extends CardImpl { public Whipkeeper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); - this.subtype.add("Dwarf"); + this.subtype.add(SubType.DWARF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WhipstitchedZombie.java b/Mage.Sets/src/mage/cards/w/WhipstitchedZombie.java index d1dce98cf8..2b7ffcfdd1 100644 --- a/Mage.Sets/src/mage/cards/w/WhipstitchedZombie.java +++ b/Mage.Sets/src/mage/cards/w/WhipstitchedZombie.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; /** @@ -45,7 +46,7 @@ public class WhipstitchedZombie extends CardImpl { public WhipstitchedZombie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WhiptailMoloch.java b/Mage.Sets/src/mage/cards/w/WhiptailMoloch.java index bfe8a387c3..6c28b90be8 100644 --- a/Mage.Sets/src/mage/cards/w/WhiptailMoloch.java +++ b/Mage.Sets/src/mage/cards/w/WhiptailMoloch.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetControlledCreaturePermanent; /** @@ -45,7 +46,7 @@ public class WhiptailMoloch extends CardImpl { public WhiptailMoloch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Lizard"); + this.subtype.add(SubType.LIZARD); this.power = new MageInt(6); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WhiptailWurm.java b/Mage.Sets/src/mage/cards/w/WhiptailWurm.java index b61cfacef2..0ef63f06a8 100644 --- a/Mage.Sets/src/mage/cards/w/WhiptailWurm.java +++ b/Mage.Sets/src/mage/cards/w/WhiptailWurm.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class WhiptailWurm extends CardImpl { public WhiptailWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(8); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/w/WhiptongueFrog.java b/Mage.Sets/src/mage/cards/w/WhiptongueFrog.java index 8506760f7a..336d479aed 100644 --- a/Mage.Sets/src/mage/cards/w/WhiptongueFrog.java +++ b/Mage.Sets/src/mage/cards/w/WhiptongueFrog.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class WhiptongueFrog extends CardImpl { public WhiptongueFrog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Frog"); + this.subtype.add(SubType.FROG); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WhirlerRogue.java b/Mage.Sets/src/mage/cards/w/WhirlerRogue.java index 114f8560b2..2253708acd 100644 --- a/Mage.Sets/src/mage/cards/w/WhirlerRogue.java +++ b/Mage.Sets/src/mage/cards/w/WhirlerRogue.java @@ -39,6 +39,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -60,9 +61,9 @@ public class WhirlerRogue extends CardImpl { public WhirlerRogue(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WhirlerVirtuoso.java b/Mage.Sets/src/mage/cards/w/WhirlerVirtuoso.java index 774fbe42c2..7e3b73a009 100644 --- a/Mage.Sets/src/mage/cards/w/WhirlerVirtuoso.java +++ b/Mage.Sets/src/mage/cards/w/WhirlerVirtuoso.java @@ -1,71 +1,72 @@ -/* - * 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.cards.w; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.PayEnergyCost; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.game.permanent.token.ThopterColorlessToken; - -/** - * - * @author emerald000 - */ -public class WhirlerVirtuoso extends CardImpl { - - public WhirlerVirtuoso(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{R}"); - this.subtype.add("Vedalken"); - this.subtype.add("Artificer"); - this.power = new MageInt(2); - this.toughness = new MageInt(3); - - // When Whirler Virtuoso enters the battlefield, you get {E}{E}{E}. - this.addAbility(new EntersBattlefieldTriggeredAbility(new GetEnergyCountersControllerEffect(3))); - - // Pay {E}{E}{E}: Create a 1/1 colorless Thopter artifact creature token with flying. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ThopterColorlessToken()), new PayEnergyCost(3))); - } - - public WhirlerVirtuoso(final WhirlerVirtuoso card) { - super(card); - } - - @Override - public WhirlerVirtuoso copy() { - return new WhirlerVirtuoso(this); - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.PayEnergyCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.permanent.token.ThopterColorlessToken; + +/** + * + * @author emerald000 + */ +public class WhirlerVirtuoso extends CardImpl { + + public WhirlerVirtuoso(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{R}"); + this.subtype.add(SubType.VEDALKEN); + this.subtype.add(SubType.ARTIFICER); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // When Whirler Virtuoso enters the battlefield, you get {E}{E}{E}. + this.addAbility(new EntersBattlefieldTriggeredAbility(new GetEnergyCountersControllerEffect(3))); + + // Pay {E}{E}{E}: Create a 1/1 colorless Thopter artifact creature token with flying. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ThopterColorlessToken()), new PayEnergyCost(3))); + } + + public WhirlerVirtuoso(final WhirlerVirtuoso card) { + super(card); + } + + @Override + public WhirlerVirtuoso copy() { + return new WhirlerVirtuoso(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WhirlingCatapult.java b/Mage.Sets/src/mage/cards/w/WhirlingCatapult.java new file mode 100644 index 0000000000..6f943a8593 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WhirlingCatapult.java @@ -0,0 +1,72 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileFromTopOfLibraryCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageEverythingEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author L_J + */ +public class WhirlingCatapult extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying"); + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public WhirlingCatapult(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); + + // {2}, Exile the top two cards of your library: Whirling Catapult deals 1 damage to each creature with flying and each player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageEverythingEffect(1, filter), new ManaCostsImpl("{2}")); + ability.addCost(new ExileFromTopOfLibraryCost(2)); + this.addAbility(ability); + } + + public WhirlingCatapult(final WhirlingCatapult card) { + super(card); + } + + @Override + public WhirlingCatapult copy() { + return new WhirlingCatapult(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WhirlingDervish.java b/Mage.Sets/src/mage/cards/w/WhirlingDervish.java index c094984322..7e82ef2452 100644 --- a/Mage.Sets/src/mage/cards/w/WhirlingDervish.java +++ b/Mage.Sets/src/mage/cards/w/WhirlingDervish.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.game.events.GameEvent; @@ -52,8 +53,8 @@ public class WhirlingDervish extends CardImpl { public WhirlingDervish(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); - this.subtype.add("Human"); - this.subtype.add("Monk"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); this.color.setGreen(true); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WhirlpoolDrake.java b/Mage.Sets/src/mage/cards/w/WhirlpoolDrake.java index 89108c3cf1..dbac3e9732 100644 --- a/Mage.Sets/src/mage/cards/w/WhirlpoolDrake.java +++ b/Mage.Sets/src/mage/cards/w/WhirlpoolDrake.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class WhirlpoolDrake extends CardImpl { public WhirlpoolDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WhirlpoolRider.java b/Mage.Sets/src/mage/cards/w/WhirlpoolRider.java index e6aa709004..0dffcb7264 100644 --- a/Mage.Sets/src/mage/cards/w/WhirlpoolRider.java +++ b/Mage.Sets/src/mage/cards/w/WhirlpoolRider.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.ShuffleHandIntoLibraryDrawThatManySourceEff import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class WhirlpoolRider extends CardImpl { public WhirlpoolRider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Merfolk"); + this.subtype.add(SubType.MERFOLK); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WhirlpoolWarrior.java b/Mage.Sets/src/mage/cards/w/WhirlpoolWarrior.java index f6f4a0dcae..99ff8e5a38 100644 --- a/Mage.Sets/src/mage/cards/w/WhirlpoolWarrior.java +++ b/Mage.Sets/src/mage/cards/w/WhirlpoolWarrior.java @@ -42,6 +42,7 @@ import mage.abilities.effects.common.ShuffleHandIntoLibraryDrawThatManySourceEff import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -55,8 +56,8 @@ public class WhirlpoolWarrior extends CardImpl { public WhirlpoolWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WhirlwindAdept.java b/Mage.Sets/src/mage/cards/w/WhirlwindAdept.java index a971c27dcd..1002efe9eb 100644 --- a/Mage.Sets/src/mage/cards/w/WhirlwindAdept.java +++ b/Mage.Sets/src/mage/cards/w/WhirlwindAdept.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class WhirlwindAdept extends CardImpl { public WhirlwindAdept(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Djinn"); - this.subtype.add("Monk"); + this.subtype.add(SubType.DJINN); + this.subtype.add(SubType.MONK); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WhispererOfTheWilds.java b/Mage.Sets/src/mage/cards/w/WhispererOfTheWilds.java index 54256ac85e..3395b81fdf 100644 --- a/Mage.Sets/src/mage/cards/w/WhispererOfTheWilds.java +++ b/Mage.Sets/src/mage/cards/w/WhispererOfTheWilds.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -50,8 +51,8 @@ public class WhispererOfTheWilds extends CardImpl { public WhispererOfTheWilds(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WhisperingShade.java b/Mage.Sets/src/mage/cards/w/WhisperingShade.java index 07c4b26cb9..f3dbd448d1 100644 --- a/Mage.Sets/src/mage/cards/w/WhisperingShade.java +++ b/Mage.Sets/src/mage/cards/w/WhisperingShade.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class WhisperingShade extends CardImpl { public WhisperingShade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); - this.subtype.add("Shade"); + this.subtype.add(SubType.SHADE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WhisperingSpecter.java b/Mage.Sets/src/mage/cards/w/WhisperingSpecter.java index 70d2913c35..2bd58e7667 100644 --- a/Mage.Sets/src/mage/cards/w/WhisperingSpecter.java +++ b/Mage.Sets/src/mage/cards/w/WhisperingSpecter.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.game.Game; @@ -51,7 +52,7 @@ public class WhisperingSpecter extends CardImpl { public WhisperingSpecter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.subtype.add("Specter"); + this.subtype.add(SubType.SPECTER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WhispersilkCloak.java b/Mage.Sets/src/mage/cards/w/WhispersilkCloak.java index 8e12c30937..a12ae65d0f 100644 --- a/Mage.Sets/src/mage/cards/w/WhispersilkCloak.java +++ b/Mage.Sets/src/mage/cards/w/WhispersilkCloak.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class WhispersilkCloak extends CardImpl { public WhispersilkCloak(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature can't be blocked and has shroud. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedAttachedEffect(AttachmentType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/w/WhisperwoodElemental.java b/Mage.Sets/src/mage/cards/w/WhisperwoodElemental.java index 5307c27720..78dd31c1b8 100644 --- a/Mage.Sets/src/mage/cards/w/WhisperwoodElemental.java +++ b/Mage.Sets/src/mage/cards/w/WhisperwoodElemental.java @@ -40,6 +40,7 @@ import mage.abilities.effects.keyword.ManifestEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -63,7 +64,7 @@ public class WhisperwoodElemental extends CardImpl { public WhisperwoodElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WhiteKnight.java b/Mage.Sets/src/mage/cards/w/WhiteKnight.java index a6e5d24368..5982650370 100644 --- a/Mage.Sets/src/mage/cards/w/WhiteKnight.java +++ b/Mage.Sets/src/mage/cards/w/WhiteKnight.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,8 +46,8 @@ public class WhiteKnight extends CardImpl { public WhiteKnight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WhiteManaBattery.java b/Mage.Sets/src/mage/cards/w/WhiteManaBattery.java index fada4c7f92..d2304d34b9 100644 --- a/Mage.Sets/src/mage/cards/w/WhiteManaBattery.java +++ b/Mage.Sets/src/mage/cards/w/WhiteManaBattery.java @@ -64,10 +64,10 @@ public class WhiteManaBattery extends CardImpl { Mana.WhiteMana(1), new IntPlusDynamicValue(1, new RemovedCountersForCostValue()), new TapSourceCost(), - "Add {W} to your mana pool, then add {W} to your mana pool for each storage counter removed this way", - true, new CountersSourceCount(CounterType.STORAGE)); - ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(), - "Remove X storage counters from {this}")); + "Add {W} to your mana pool, then add {W} to your mana pool for each charge counter removed this way", + true, new CountersSourceCount(CounterType.CHARGE)); + ability.addCost(new RemoveVariableCountersSourceCost(CounterType.CHARGE.createInstance(), + "Remove any number of charge counters from {this}")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WhiteScarab.java b/Mage.Sets/src/mage/cards/w/WhiteScarab.java index c3cfce7e79..c1c684653d 100644 --- a/Mage.Sets/src/mage/cards/w/WhiteScarab.java +++ b/Mage.Sets/src/mage/cards/w/WhiteScarab.java @@ -42,6 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -68,7 +69,7 @@ public class WhiteScarab extends CardImpl { public WhiteScarab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/w/WhiteShieldCrusader.java b/Mage.Sets/src/mage/cards/w/WhiteShieldCrusader.java index 9e6e7b07ff..e3ba1c42b6 100644 --- a/Mage.Sets/src/mage/cards/w/WhiteShieldCrusader.java +++ b/Mage.Sets/src/mage/cards/w/WhiteShieldCrusader.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class WhiteShieldCrusader extends CardImpl { public WhiteShieldCrusader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WhiteWard.java b/Mage.Sets/src/mage/cards/w/WhiteWard.java index 4559369a50..326f86d42c 100644 --- a/Mage.Sets/src/mage/cards/w/WhiteWard.java +++ b/Mage.Sets/src/mage/cards/w/WhiteWard.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -60,7 +61,7 @@ public class WhiteWard extends CardImpl { public WhiteWard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/w/WhitemaneLion.java b/Mage.Sets/src/mage/cards/w/WhitemaneLion.java index e434b4ddb0..beed3402d2 100644 --- a/Mage.Sets/src/mage/cards/w/WhitemaneLion.java +++ b/Mage.Sets/src/mage/cards/w/WhitemaneLion.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; /** @@ -45,7 +46,7 @@ public class WhitemaneLion extends CardImpl { public WhitemaneLion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WhitewaterNaiads.java b/Mage.Sets/src/mage/cards/w/WhitewaterNaiads.java index 5910e07a40..437244c280 100644 --- a/Mage.Sets/src/mage/cards/w/WhitewaterNaiads.java +++ b/Mage.Sets/src/mage/cards/w/WhitewaterNaiads.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -46,7 +47,7 @@ public class WhitewaterNaiads extends CardImpl { public WhitewaterNaiads(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Nymph"); + this.subtype.add(SubType.NYMPH); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WickedAkuba.java b/Mage.Sets/src/mage/cards/w/WickedAkuba.java index 35596bda25..6eef697f29 100644 --- a/Mage.Sets/src/mage/cards/w/WickedAkuba.java +++ b/Mage.Sets/src/mage/cards/w/WickedAkuba.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.filter.FilterPlayer; @@ -60,7 +61,7 @@ public class WickedAkuba extends CardImpl { public WickedAkuba(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WickerWarcrawler.java b/Mage.Sets/src/mage/cards/w/WickerWarcrawler.java index 4d48da2af4..4918cc2788 100644 --- a/Mage.Sets/src/mage/cards/w/WickerWarcrawler.java +++ b/Mage.Sets/src/mage/cards/w/WickerWarcrawler.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -48,7 +49,7 @@ public class WickerWarcrawler extends CardImpl { public WickerWarcrawler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/w/WickerWitch.java b/Mage.Sets/src/mage/cards/w/WickerWitch.java index a8bb3dc060..5370a3dcb3 100644 --- a/Mage.Sets/src/mage/cards/w/WickerWitch.java +++ b/Mage.Sets/src/mage/cards/w/WickerWitch.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class WickerWitch extends CardImpl { public WickerWitch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(3); this.toughness = new MageInt(1); } diff --git a/Mage.Sets/src/mage/cards/w/WickerboughElder.java b/Mage.Sets/src/mage/cards/w/WickerboughElder.java index ad74f13525..842b8e7774 100644 --- a/Mage.Sets/src/mage/cards/w/WickerboughElder.java +++ b/Mage.Sets/src/mage/cards/w/WickerboughElder.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.counters.CounterType; @@ -53,8 +54,8 @@ public class WickerboughElder extends CardImpl { public WickerboughElder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WightOfPrecinctSix.java b/Mage.Sets/src/mage/cards/w/WightOfPrecinctSix.java index b60f223417..5b2c17c835 100644 --- a/Mage.Sets/src/mage/cards/w/WightOfPrecinctSix.java +++ b/Mage.Sets/src/mage/cards/w/WightOfPrecinctSix.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterCard; @@ -54,7 +55,7 @@ public class WightOfPrecinctSix extends CardImpl { public WightOfPrecinctSix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WildAesthir.java b/Mage.Sets/src/mage/cards/w/WildAesthir.java index 7cb4763a74..2bd40f02d6 100644 --- a/Mage.Sets/src/mage/cards/w/WildAesthir.java +++ b/Mage.Sets/src/mage/cards/w/WildAesthir.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class WildAesthir extends CardImpl { public WildAesthir(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WildBeastmaster.java b/Mage.Sets/src/mage/cards/w/WildBeastmaster.java index fbd440079a..d0576ef81f 100644 --- a/Mage.Sets/src/mage/cards/w/WildBeastmaster.java +++ b/Mage.Sets/src/mage/cards/w/WildBeastmaster.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.filter.StaticFilters; @@ -49,8 +50,8 @@ public class WildBeastmaster extends CardImpl { public WildBeastmaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.color.setGreen(true); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WildCantor.java b/Mage.Sets/src/mage/cards/w/WildCantor.java index dcb520bc65..dc2c5a7522 100644 --- a/Mage.Sets/src/mage/cards/w/WildCantor.java +++ b/Mage.Sets/src/mage/cards/w/WildCantor.java @@ -34,6 +34,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class WildCantor extends CardImpl { public WildCantor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R/G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WildCelebrants.java b/Mage.Sets/src/mage/cards/w/WildCelebrants.java index f517319b8f..90fb662858 100644 --- a/Mage.Sets/src/mage/cards/w/WildCelebrants.java +++ b/Mage.Sets/src/mage/cards/w/WildCelebrants.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.Target; import mage.target.common.TargetArtifactPermanent; @@ -46,7 +47,7 @@ public class WildCelebrants extends CardImpl { public WildCelebrants(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Satyr"); + this.subtype.add(SubType.SATYR); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WildColos.java b/Mage.Sets/src/mage/cards/w/WildColos.java index ec64087009..d01f061134 100644 --- a/Mage.Sets/src/mage/cards/w/WildColos.java +++ b/Mage.Sets/src/mage/cards/w/WildColos.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class WildColos extends CardImpl { public WildColos(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Goat"); - this.subtype.add("Beast"); + this.subtype.add(SubType.GOAT); + this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WildDogs.java b/Mage.Sets/src/mage/cards/w/WildDogs.java index b1e7038de5..c2d56fe6b2 100644 --- a/Mage.Sets/src/mage/cards/w/WildDogs.java +++ b/Mage.Sets/src/mage/cards/w/WildDogs.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; @@ -55,7 +56,7 @@ public class WildDogs extends CardImpl { public WildDogs(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WildElephant.java b/Mage.Sets/src/mage/cards/w/WildElephant.java index 144b1413c0..38c9b149fd 100644 --- a/Mage.Sets/src/mage/cards/w/WildElephant.java +++ b/Mage.Sets/src/mage/cards/w/WildElephant.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class WildElephant extends CardImpl { public WildElephant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elephant"); + this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WildFieldScarecrow.java b/Mage.Sets/src/mage/cards/w/WildFieldScarecrow.java index 474cab0b91..a12e1b938e 100644 --- a/Mage.Sets/src/mage/cards/w/WildFieldScarecrow.java +++ b/Mage.Sets/src/mage/cards/w/WildFieldScarecrow.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; @@ -51,7 +52,7 @@ public class WildFieldScarecrow extends CardImpl { public WildFieldScarecrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WildGriffin.java b/Mage.Sets/src/mage/cards/w/WildGriffin.java index 47042a1fb7..a7d73a1eb2 100644 --- a/Mage.Sets/src/mage/cards/w/WildGriffin.java +++ b/Mage.Sets/src/mage/cards/w/WildGriffin.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class WildGriffin extends CardImpl { public WildGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Griffin"); + this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WildGrowth.java b/Mage.Sets/src/mage/cards/w/WildGrowth.java index 0d621218ba..82a4dd34a5 100644 --- a/Mage.Sets/src/mage/cards/w/WildGrowth.java +++ b/Mage.Sets/src/mage/cards/w/WildGrowth.java @@ -38,6 +38,7 @@ import mage.abilities.mana.TriggeredManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class WildGrowth extends CardImpl { public WildGrowth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land diff --git a/Mage.Sets/src/mage/cards/w/WildHolocron.java b/Mage.Sets/src/mage/cards/w/WildHolocron.java index 847ffe5ca1..59c6bb06a4 100644 --- a/Mage.Sets/src/mage/cards/w/WildHolocron.java +++ b/Mage.Sets/src/mage/cards/w/WildHolocron.java @@ -1,94 +1,94 @@ -/* - * 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.cards.w; - -import java.util.UUID; -import mage.Mana; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.Cost; -import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.abilities.mana.GreenManaAbility; -import mage.abilities.mana.RedManaAbility; -import mage.abilities.mana.SimpleManaAbility; -import mage.abilities.mana.WhiteManaAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.counters.CounterType; - -/** - * - * @author Styxo - */ -public class WildHolocron extends CardImpl { - - public WildHolocron(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); - - // {T}: Put a charge counter on Wild Holocron. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance(1)), new TapSourceCost())); - - // {T}, Remove a charge counter from Wild Holocron: Add {R}, {G} or {W} to your mana pool. - Cost cost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(1)); - Ability ability = new RedManaAbility(); - ability.addCost(cost); - this.addAbility(ability); - - ability = new GreenManaAbility(); - ability.addCost(cost); - this.addAbility(ability); - - ability = new WhiteManaAbility(); - ability.addCost(cost); - this.addAbility(ability); - - // {T}, Remove two charge counters from Wild Holocron: Add RG or GW to your mana pool. - cost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(2)); - - ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 0, 0, 0, 0, 0, 0), new TapSourceCost()); - ability.addCost(cost); - this.addAbility(ability); - - ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 0, 1, 0, 0, 0, 0), new TapSourceCost()); - ability.addCost(cost); - this.addAbility(ability); - } - - public WildHolocron(final WildHolocron card) { - super(card); - } - - @Override - public WildHolocron copy() { - return new WildHolocron(this); - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.mana.GreenManaAbility; +import mage.abilities.mana.RedManaAbility; +import mage.abilities.mana.SimpleManaAbility; +import mage.abilities.mana.WhiteManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author Styxo + */ +public class WildHolocron extends CardImpl { + + public WildHolocron(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + // {T}: Put a charge counter on Wild Holocron. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance(1)), new TapSourceCost())); + + // {T}, Remove a charge counter from Wild Holocron: Add {R}, {G} or {W} to your mana pool. + Cost cost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(1)); + Ability ability = new RedManaAbility(); + ability.addCost(cost); + this.addAbility(ability); + + ability = new GreenManaAbility(); + ability.addCost(cost); + this.addAbility(ability); + + ability = new WhiteManaAbility(); + ability.addCost(cost); + this.addAbility(ability); + + // {T}, Remove two charge counters from Wild Holocron: Add RG or GW to your mana pool. + cost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(2)); + + ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 1, 0, 0, 0, 0, 0, 0), new TapSourceCost()); + ability.addCost(cost); + this.addAbility(ability); + + ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 0, 1, 0, 0, 0, 0), new TapSourceCost()); + ability.addCost(cost); + this.addAbility(ability); + } + + public WildHolocron(final WildHolocron card) { + super(card); + } + + @Override + public WildHolocron copy() { + return new WildHolocron(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WildJhovall.java b/Mage.Sets/src/mage/cards/w/WildJhovall.java index df0ca818ed..54015077f9 100644 --- a/Mage.Sets/src/mage/cards/w/WildJhovall.java +++ b/Mage.Sets/src/mage/cards/w/WildJhovall.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class WildJhovall extends CardImpl { public WildJhovall(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WildLeotau.java b/Mage.Sets/src/mage/cards/w/WildLeotau.java index ecb19f8393..9bf545c5f4 100644 --- a/Mage.Sets/src/mage/cards/w/WildLeotau.java +++ b/Mage.Sets/src/mage/cards/w/WildLeotau.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.TargetController; @@ -46,7 +47,7 @@ public class WildLeotau extends CardImpl { public WildLeotau(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WildMongrel.java b/Mage.Sets/src/mage/cards/w/WildMongrel.java index eddaadea23..119206fa72 100644 --- a/Mage.Sets/src/mage/cards/w/WildMongrel.java +++ b/Mage.Sets/src/mage/cards/w/WildMongrel.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCardInHand; @@ -49,7 +50,7 @@ public class WildMongrel extends CardImpl { public WildMongrel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WildNacatl.java b/Mage.Sets/src/mage/cards/w/WildNacatl.java index 256805a04d..72e877f205 100644 --- a/Mage.Sets/src/mage/cards/w/WildNacatl.java +++ b/Mage.Sets/src/mage/cards/w/WildNacatl.java @@ -57,8 +57,8 @@ public class WildNacatl extends CardImpl { public WildNacatl(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Cat"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WildOx.java b/Mage.Sets/src/mage/cards/w/WildOx.java index bfaee3a529..dfba3af0ba 100644 --- a/Mage.Sets/src/mage/cards/w/WildOx.java +++ b/Mage.Sets/src/mage/cards/w/WildOx.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class WildOx extends CardImpl { public WildOx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Ox"); + this.subtype.add(SubType.OX); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WildWanderer.java b/Mage.Sets/src/mage/cards/w/WildWanderer.java index 14ddaed187..65c5c2329e 100644 --- a/Mage.Sets/src/mage/cards/w/WildWanderer.java +++ b/Mage.Sets/src/mage/cards/w/WildWanderer.java @@ -33,6 +33,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; @@ -46,8 +47,8 @@ public class WildWanderer extends CardImpl { public WildWanderer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WildWurm.java b/Mage.Sets/src/mage/cards/w/WildWurm.java index d7bee888b1..0d5783fc7d 100644 --- a/Mage.Sets/src/mage/cards/w/WildWurm.java +++ b/Mage.Sets/src/mage/cards/w/WildWurm.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -49,7 +50,7 @@ public class WildWurm extends CardImpl { public WildWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WildbloodPack.java b/Mage.Sets/src/mage/cards/w/WildbloodPack.java index 5bf8352d95..a52e6ba200 100644 --- a/Mage.Sets/src/mage/cards/w/WildbloodPack.java +++ b/Mage.Sets/src/mage/cards/w/WildbloodPack.java @@ -50,7 +50,7 @@ public class WildbloodPack extends CardImpl { public WildbloodPack(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.WEREWOLF); this.color.setRed(true); // this card is the second face of double-faced card diff --git a/Mage.Sets/src/mage/cards/w/WildernessElemental.java b/Mage.Sets/src/mage/cards/w/WildernessElemental.java index d06602540f..6dabff311b 100644 --- a/Mage.Sets/src/mage/cards/w/WildernessElemental.java +++ b/Mage.Sets/src/mage/cards/w/WildernessElemental.java @@ -56,7 +56,7 @@ public class WildernessElemental extends CardImpl { public WildernessElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WildernessHypnotist.java b/Mage.Sets/src/mage/cards/w/WildernessHypnotist.java index 7c4c474bf2..0420027509 100644 --- a/Mage.Sets/src/mage/cards/w/WildernessHypnotist.java +++ b/Mage.Sets/src/mage/cards/w/WildernessHypnotist.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -59,8 +60,8 @@ public class WildernessHypnotist extends CardImpl { public WildernessHypnotist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WildfireCerberus.java b/Mage.Sets/src/mage/cards/w/WildfireCerberus.java index 4f04ac2d3f..fc5ebf81e0 100644 --- a/Mage.Sets/src/mage/cards/w/WildfireCerberus.java +++ b/Mage.Sets/src/mage/cards/w/WildfireCerberus.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.MonstrosityAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -56,7 +57,7 @@ public class WildfireCerberus extends CardImpl { public WildfireCerberus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WildfireEmissary.java b/Mage.Sets/src/mage/cards/w/WildfireEmissary.java index 901ff38ebf..7fe82e6568 100644 --- a/Mage.Sets/src/mage/cards/w/WildfireEmissary.java +++ b/Mage.Sets/src/mage/cards/w/WildfireEmissary.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class WildfireEmissary extends CardImpl { public WildfireEmissary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Efreet"); + this.subtype.add(SubType.EFREET); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WildfireEternal.java b/Mage.Sets/src/mage/cards/w/WildfireEternal.java index ed524222e2..26c358865f 100644 --- a/Mage.Sets/src/mage/cards/w/WildfireEternal.java +++ b/Mage.Sets/src/mage/cards/w/WildfireEternal.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.FilterCard; import mage.filter.common.FilterInstantOrSorceryCard; @@ -54,9 +55,9 @@ public class WildfireEternal extends CardImpl { public WildfireEternal(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - this.subtype.add("Zombie"); - this.subtype.add("Jackal"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.JACKAL); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WildgrowthWalker.java b/Mage.Sets/src/mage/cards/w/WildgrowthWalker.java new file mode 100644 index 0000000000..7830ef9d03 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WildgrowthWalker.java @@ -0,0 +1,73 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreatureExploresTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; + +/** + * + * @author TheElk801 + */ +public class WildgrowthWalker extends CardImpl { + + public WildgrowthWalker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.ELEMENTAL); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Whenever a creature you control explores, put a +1/+1 counter on Wildgrowth Walker and you gain 3 life. + Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance()); + Ability ability = new CreatureExploresTriggeredAbility(effect); + effect = new GainLifeEffect(3); + effect.setText("and you gain 3 life"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public WildgrowthWalker(final WildgrowthWalker card) { + super(card); + } + + @Override + public WildgrowthWalker copy() { + return new WildgrowthWalker(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WildheartInvoker.java b/Mage.Sets/src/mage/cards/w/WildheartInvoker.java index f124abbf3e..610fdcd88f 100644 --- a/Mage.Sets/src/mage/cards/w/WildheartInvoker.java +++ b/Mage.Sets/src/mage/cards/w/WildheartInvoker.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,8 +50,8 @@ public class WildheartInvoker extends CardImpl { public WildheartInvoker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WildslayerElves.java b/Mage.Sets/src/mage/cards/w/WildslayerElves.java index 4d2f2cc308..c6eb0b1488 100644 --- a/Mage.Sets/src/mage/cards/w/WildslayerElves.java +++ b/Mage.Sets/src/mage/cards/w/WildslayerElves.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class WildslayerElves extends CardImpl { public WildslayerElves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WildwoodGeist.java b/Mage.Sets/src/mage/cards/w/WildwoodGeist.java index 51f112016a..84f3bf0e5a 100644 --- a/Mage.Sets/src/mage/cards/w/WildwoodGeist.java +++ b/Mage.Sets/src/mage/cards/w/WildwoodGeist.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class WildwoodGeist extends CardImpl { public WildwoodGeist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WillForgedGolem.java b/Mage.Sets/src/mage/cards/w/WillForgedGolem.java index e0662e725b..5447f79926 100644 --- a/Mage.Sets/src/mage/cards/w/WillForgedGolem.java +++ b/Mage.Sets/src/mage/cards/w/WillForgedGolem.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ConvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class WillForgedGolem extends CardImpl { public WillForgedGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WillOTheWisp.java b/Mage.Sets/src/mage/cards/w/WillOTheWisp.java index 44aa860e3b..f4511906c1 100644 --- a/Mage.Sets/src/mage/cards/w/WillOTheWisp.java +++ b/Mage.Sets/src/mage/cards/w/WillOTheWisp.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class WillOTheWisp extends CardImpl { public WillOTheWisp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/Willbender.java b/Mage.Sets/src/mage/cards/w/Willbender.java index 19183508cd..6cdaa831c9 100644 --- a/Mage.Sets/src/mage/cards/w/Willbender.java +++ b/Mage.Sets/src/mage/cards/w/Willbender.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterStackObject; import mage.filter.predicate.mageobject.NumberOfTargetsPredicate; import mage.target.TargetStackObject; @@ -55,8 +56,8 @@ public class Willbender extends CardImpl { public Willbender(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/Willbreaker.java b/Mage.Sets/src/mage/cards/w/Willbreaker.java index dc0fc83dcf..757bb20d2b 100644 --- a/Mage.Sets/src/mage/cards/w/Willbreaker.java +++ b/Mage.Sets/src/mage/cards/w/Willbreaker.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; @@ -54,8 +55,8 @@ public class Willbreaker extends CardImpl { public Willbreaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WillowDryad.java b/Mage.Sets/src/mage/cards/w/WillowDryad.java index 5c1d294b3e..6a51d35ece 100644 --- a/Mage.Sets/src/mage/cards/w/WillowDryad.java +++ b/Mage.Sets/src/mage/cards/w/WillowDryad.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class WillowDryad extends CardImpl { public WillowDryad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Dryad"); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WillowElf.java b/Mage.Sets/src/mage/cards/w/WillowElf.java index 4636f1610f..5cd70e66db 100644 --- a/Mage.Sets/src/mage/cards/w/WillowElf.java +++ b/Mage.Sets/src/mage/cards/w/WillowElf.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class WillowElf extends CardImpl { public WillowElf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WillowFaerie.java b/Mage.Sets/src/mage/cards/w/WillowFaerie.java index abcbbd77d1..981f2e4176 100644 --- a/Mage.Sets/src/mage/cards/w/WillowFaerie.java +++ b/Mage.Sets/src/mage/cards/w/WillowFaerie.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class WillowFaerie extends CardImpl { public WillowFaerie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WillowPriestess.java b/Mage.Sets/src/mage/cards/w/WillowPriestess.java index 50c66333a9..3b1d6e2e34 100644 --- a/Mage.Sets/src/mage/cards/w/WillowPriestess.java +++ b/Mage.Sets/src/mage/cards/w/WillowPriestess.java @@ -66,8 +66,8 @@ public class WillowPriestess extends CardImpl { public WillowPriestess(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Faerie"); - this.subtype.add("Druid"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WillowSatyr.java b/Mage.Sets/src/mage/cards/w/WillowSatyr.java index 51f2133afa..1e4e04e867 100644 --- a/Mage.Sets/src/mage/cards/w/WillowSatyr.java +++ b/Mage.Sets/src/mage/cards/w/WillowSatyr.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -62,7 +63,7 @@ public class WillowSatyr extends CardImpl { public WillowSatyr(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Satyr"); + this.subtype.add(SubType.SATYR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WiltLeafCavaliers.java b/Mage.Sets/src/mage/cards/w/WiltLeafCavaliers.java index 0934ad3f55..73cd76177d 100644 --- a/Mage.Sets/src/mage/cards/w/WiltLeafCavaliers.java +++ b/Mage.Sets/src/mage/cards/w/WiltLeafCavaliers.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class WiltLeafCavaliers extends CardImpl { public WiltLeafCavaliers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G/W}{G/W}{G/W}"); - this.subtype.add("Elf"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WiltLeafLiege.java b/Mage.Sets/src/mage/cards/w/WiltLeafLiege.java index 7372802dac..ebabd4d310 100644 --- a/Mage.Sets/src/mage/cards/w/WiltLeafLiege.java +++ b/Mage.Sets/src/mage/cards/w/WiltLeafLiege.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; @@ -60,8 +61,8 @@ public class WiltLeafLiege extends CardImpl { public WiltLeafLiege(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G/W}{G/W}{G/W}"); - this.subtype.add("Elf"); - this.subtype.add("Knight"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WilyBandar.java b/Mage.Sets/src/mage/cards/w/WilyBandar.java index 853895d36f..d46345060c 100644 --- a/Mage.Sets/src/mage/cards/w/WilyBandar.java +++ b/Mage.Sets/src/mage/cards/w/WilyBandar.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class WilyBandar extends CardImpl { public WilyBandar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Cat"); - this.subtype.add("Monkey"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.MONKEY); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WilyGoblin.java b/Mage.Sets/src/mage/cards/w/WilyGoblin.java new file mode 100644 index 0000000000..af39361b1c --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WilyGoblin.java @@ -0,0 +1,66 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.game.permanent.token.TreasureToken; + +/** + * + * @author TheElk801 + */ +public class WilyGoblin extends CardImpl { + + public WilyGoblin(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{R}"); + + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Wily Goblin enters the battlefield, create a colorless Treasure artifact token with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool." + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new TreasureToken()))); + } + + public WilyGoblin(final WilyGoblin card) { + super(card); + } + + @Override + public WilyGoblin copy() { + return new WilyGoblin(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WindDancer.java b/Mage.Sets/src/mage/cards/w/WindDancer.java index 07d5acc946..dbe93ba359 100644 --- a/Mage.Sets/src/mage/cards/w/WindDancer.java +++ b/Mage.Sets/src/mage/cards/w/WindDancer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class WindDancer extends CardImpl { public WindDancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Faerie"); + this.subtype.add(SubType.FAERIE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WindDrake.java b/Mage.Sets/src/mage/cards/w/WindDrake.java index 093f472d01..a93ad6ee41 100644 --- a/Mage.Sets/src/mage/cards/w/WindDrake.java +++ b/Mage.Sets/src/mage/cards/w/WindDrake.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class WindDrake extends CardImpl { public WindDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WindKinRaiders.java b/Mage.Sets/src/mage/cards/w/WindKinRaiders.java index 57122841e4..e6e321151c 100644 --- a/Mage.Sets/src/mage/cards/w/WindKinRaiders.java +++ b/Mage.Sets/src/mage/cards/w/WindKinRaiders.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ImproviseAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class WindKinRaiders extends CardImpl { public WindKinRaiders(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{U}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WindSpirit.java b/Mage.Sets/src/mage/cards/w/WindSpirit.java index d47ca1fa0f..399e0b9523 100644 --- a/Mage.Sets/src/mage/cards/w/WindSpirit.java +++ b/Mage.Sets/src/mage/cards/w/WindSpirit.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class WindSpirit extends CardImpl { public WindSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Elemental"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WindStrider.java b/Mage.Sets/src/mage/cards/w/WindStrider.java new file mode 100644 index 0000000000..32d97120db --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WindStrider.java @@ -0,0 +1,69 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.constants.SubType; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class WindStrider extends CardImpl { + + public WindStrider(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + } + + public WindStrider(final WindStrider card) { + super(card); + } + + @Override + public WindStrider copy() { + return new WindStrider(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WindZendikon.java b/Mage.Sets/src/mage/cards/w/WindZendikon.java index be9ea6627f..b37dec0063 100644 --- a/Mage.Sets/src/mage/cards/w/WindZendikon.java +++ b/Mage.Sets/src/mage/cards/w/WindZendikon.java @@ -52,7 +52,7 @@ public class WindZendikon extends CardImpl { public WindZendikon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant land @@ -86,7 +86,7 @@ public class WindZendikon extends CardImpl { super("", "2/2 blue Elemental creature with flying"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(2); toughness = new MageInt(2); addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/w/WindbornMuse.java b/Mage.Sets/src/mage/cards/w/WindbornMuse.java index beeb8a99d9..f18198f17c 100644 --- a/Mage.Sets/src/mage/cards/w/WindbornMuse.java +++ b/Mage.Sets/src/mage/cards/w/WindbornMuse.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class WindbornMuse extends CardImpl { public WindbornMuse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WindbriskRaptor.java b/Mage.Sets/src/mage/cards/w/WindbriskRaptor.java index 737ded1020..5dcb009243 100644 --- a/Mage.Sets/src/mage/cards/w/WindbriskRaptor.java +++ b/Mage.Sets/src/mage/cards/w/WindbriskRaptor.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -57,7 +58,7 @@ public class WindbriskRaptor extends CardImpl { public WindbriskRaptor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(5); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/w/WindingCanyons.java b/Mage.Sets/src/mage/cards/w/WindingCanyons.java index a9edf4795b..2200386991 100644 --- a/Mage.Sets/src/mage/cards/w/WindingCanyons.java +++ b/Mage.Sets/src/mage/cards/w/WindingCanyons.java @@ -50,14 +50,14 @@ import mage.filter.common.FilterCreatureCard; public class WindingCanyons extends CardImpl { public WindingCanyons(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},""); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); // {tap}: Add {C} to your mana pool. this.addAbility(new ColorlessManaAbility()); - - // {2}, {tap}: Until end of turn, you may play creature cards as though they had flash. + + // {2}, {tap}: Until end of turn, you may cast creature spells as though they had flash. Effect effect = new AddContinuousEffectToGame(new CastAsThoughItHadFlashAllEffect(Duration.EndOfTurn, new FilterCreatureCard())); - effect.setText("Until end of turn, you may play creature cards as though they had flash"); + effect.setText("Until end of turn, you may cast creature spells as though they had flash."); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/w/WindingConstrictor.java b/Mage.Sets/src/mage/cards/w/WindingConstrictor.java index 93399a6cd7..1b49a03c04 100644 --- a/Mage.Sets/src/mage/cards/w/WindingConstrictor.java +++ b/Mage.Sets/src/mage/cards/w/WindingConstrictor.java @@ -35,6 +35,7 @@ import mage.abilities.effects.ReplacementEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class WindingConstrictor extends CardImpl { public WindingConstrictor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WindingWurm.java b/Mage.Sets/src/mage/cards/w/WindingWurm.java index a55bd795f9..4149b5e4ae 100644 --- a/Mage.Sets/src/mage/cards/w/WindingWurm.java +++ b/Mage.Sets/src/mage/cards/w/WindingWurm.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class WindingWurm extends CardImpl { public WindingWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/w/WindreaderSphinx.java b/Mage.Sets/src/mage/cards/w/WindreaderSphinx.java index 2f5447cb89..4144fe0491 100644 --- a/Mage.Sets/src/mage/cards/w/WindreaderSphinx.java +++ b/Mage.Sets/src/mage/cards/w/WindreaderSphinx.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; @@ -51,7 +52,7 @@ public class WindreaderSphinx extends CardImpl { public WindreaderSphinx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); - this.subtype.add("Sphinx"); + this.subtype.add(SubType.SPHINX); this.power = new MageInt(3); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/w/WindreaperFalcon.java b/Mage.Sets/src/mage/cards/w/WindreaperFalcon.java index 29d247e4cb..bf4eb10562 100644 --- a/Mage.Sets/src/mage/cards/w/WindreaperFalcon.java +++ b/Mage.Sets/src/mage/cards/w/WindreaperFalcon.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class WindreaperFalcon extends CardImpl { public WindreaperFalcon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{G}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/Windreaver.java b/Mage.Sets/src/mage/cards/w/Windreaver.java index 453f41bad2..316686daa5 100644 --- a/Mage.Sets/src/mage/cards/w/Windreaver.java +++ b/Mage.Sets/src/mage/cards/w/Windreaver.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,7 +52,7 @@ public class Windreaver extends CardImpl { public Windreaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{U}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WindriderEel.java b/Mage.Sets/src/mage/cards/w/WindriderEel.java index e2c95c3940..d1fb982ec2 100644 --- a/Mage.Sets/src/mage/cards/w/WindriderEel.java +++ b/Mage.Sets/src/mage/cards/w/WindriderEel.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -46,7 +47,7 @@ public class WindriderEel extends CardImpl { public WindriderEel (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Fish"); + this.subtype.add(SubType.FISH); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WindriderPatrol.java b/Mage.Sets/src/mage/cards/w/WindriderPatrol.java index c3f596dd25..2b9945e9a7 100644 --- a/Mage.Sets/src/mage/cards/w/WindriderPatrol.java +++ b/Mage.Sets/src/mage/cards/w/WindriderPatrol.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class WindriderPatrol extends CardImpl { public WindriderPatrol(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/Windscouter.java b/Mage.Sets/src/mage/cards/w/Windscouter.java new file mode 100644 index 0000000000..4cce776c0b --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/Windscouter.java @@ -0,0 +1,75 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksOrBlocksTriggeredAbility; +import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class Windscouter extends CardImpl { + + public Windscouter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever Windscouter attacks or blocks, return it to its owner's hand at end of combat. + Effect effect = new CreateDelayedTriggeredAbilityEffect( + new AtTheEndOfCombatDelayedTriggeredAbility(new ReturnToHandSourceEffect(true))); + effect.setText("return it to its owner's hand at end of combat"); + this.addAbility(new AttacksOrBlocksTriggeredAbility(effect, false)); + } + + public Windscouter(final Windscouter card) { + super(card); + } + + @Override + public Windscouter copy() { + return new Windscouter(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WindseekerCentaur.java b/Mage.Sets/src/mage/cards/w/WindseekerCentaur.java index 9f10ee178d..4b10bc7b0e 100644 --- a/Mage.Sets/src/mage/cards/w/WindseekerCentaur.java +++ b/Mage.Sets/src/mage/cards/w/WindseekerCentaur.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class WindseekerCentaur extends CardImpl { public WindseekerCentaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); - this.subtype.add("Centaur"); + this.subtype.add(SubType.CENTAUR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WindwrightMage.java b/Mage.Sets/src/mage/cards/w/WindwrightMage.java index f17ed8d8d7..23bb5f5935 100644 --- a/Mage.Sets/src/mage/cards/w/WindwrightMage.java +++ b/Mage.Sets/src/mage/cards/w/WindwrightMage.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterCard; @@ -54,8 +55,8 @@ public class WindwrightMage extends CardImpl { public WindwrightMage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{W}{U}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WingSplicer.java b/Mage.Sets/src/mage/cards/w/WingSplicer.java index 3e9f1c0db4..c3d895c623 100644 --- a/Mage.Sets/src/mage/cards/w/WingSplicer.java +++ b/Mage.Sets/src/mage/cards/w/WingSplicer.java @@ -60,8 +60,8 @@ public class WingSplicer extends CardImpl { public WingSplicer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Artificer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WingbeatWarrior.java b/Mage.Sets/src/mage/cards/w/WingbeatWarrior.java index e8f43edd9d..9152240998 100644 --- a/Mage.Sets/src/mage/cards/w/WingbeatWarrior.java +++ b/Mage.Sets/src/mage/cards/w/WingbeatWarrior.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -50,9 +51,9 @@ public class WingbeatWarrior extends CardImpl { public WingbeatWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Bird"); - this.subtype.add("Soldier"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/Wingcrafter.java b/Mage.Sets/src/mage/cards/w/Wingcrafter.java index 9f347e09cd..10170a885f 100644 --- a/Mage.Sets/src/mage/cards/w/Wingcrafter.java +++ b/Mage.Sets/src/mage/cards/w/Wingcrafter.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.SoulbondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -49,8 +50,8 @@ public class Wingcrafter extends CardImpl { public Wingcrafter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WingedCoatl.java b/Mage.Sets/src/mage/cards/w/WingedCoatl.java index b43f3008cc..4bc2fb60c3 100644 --- a/Mage.Sets/src/mage/cards/w/WingedCoatl.java +++ b/Mage.Sets/src/mage/cards/w/WingedCoatl.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class WingedCoatl extends CardImpl { public WingedCoatl (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{U}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WingedShepherd.java b/Mage.Sets/src/mage/cards/w/WingedShepherd.java index ce9d83e40b..2334f29271 100644 --- a/Mage.Sets/src/mage/cards/w/WingedShepherd.java +++ b/Mage.Sets/src/mage/cards/w/WingedShepherd.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class WingedShepherd extends CardImpl { public WingedShepherd(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WingedSliver.java b/Mage.Sets/src/mage/cards/w/WingedSliver.java index 44bb1631e9..2c99157c12 100644 --- a/Mage.Sets/src/mage/cards/w/WingedSliver.java +++ b/Mage.Sets/src/mage/cards/w/WingedSliver.java @@ -54,7 +54,7 @@ public class WingedSliver extends CardImpl { public WingedSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Sliver"); + this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WingmateRoc.java b/Mage.Sets/src/mage/cards/w/WingmateRoc.java index 51fc6ab2bb..991446ce4e 100644 --- a/Mage.Sets/src/mage/cards/w/WingmateRoc.java +++ b/Mage.Sets/src/mage/cards/w/WingmateRoc.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.WingmateRocToken; import mage.watchers.common.PlayerAttackedWatcher; @@ -52,7 +53,7 @@ public class WingmateRoc extends CardImpl { public WingmateRoc(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); - this.subtype.add("Bird"); + this.subtype.add(SubType.BIRD); this.power = new MageInt(3); this.toughness = new MageInt(4); @@ -62,7 +63,7 @@ public class WingmateRoc extends CardImpl { // Raid - When Wingmate Roc enters the battlefield, if you attacked with a creature this turn, create a 3/4 white Bird creature token with flying. this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WingmateRocToken())), RaidCondition.instance, - "Raid - When {this} enters the battlefield, if you attacked with a creature this turn, create a 3/4 white Bird creature token with flying."), + "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, create a 3/4 white Bird creature token with flying."), new PlayerAttackedWatcher()); // Whenever Wingmate Roc attacks, you gain 1 life for each attacking creature. diff --git a/Mage.Sets/src/mage/cards/w/WingrattleScarecrow.java b/Mage.Sets/src/mage/cards/w/WingrattleScarecrow.java index 2026158609..a791876c0e 100644 --- a/Mage.Sets/src/mage/cards/w/WingrattleScarecrow.java +++ b/Mage.Sets/src/mage/cards/w/WingrattleScarecrow.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.PersistAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -63,7 +64,7 @@ public class WingrattleScarecrow extends CardImpl { public WingrattleScarecrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WingsOfAesthir.java b/Mage.Sets/src/mage/cards/w/WingsOfAesthir.java index 8754524364..42ff9c980f 100644 --- a/Mage.Sets/src/mage/cards/w/WingsOfAesthir.java +++ b/Mage.Sets/src/mage/cards/w/WingsOfAesthir.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class WingsOfAesthir extends CardImpl { public WingsOfAesthir(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/w/WingsOfHope.java b/Mage.Sets/src/mage/cards/w/WingsOfHope.java index 7dc2432c33..8fa8dc2a12 100644 --- a/Mage.Sets/src/mage/cards/w/WingsOfHope.java +++ b/Mage.Sets/src/mage/cards/w/WingsOfHope.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class WingsOfHope extends CardImpl { public WingsOfHope(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/w/WingsOfTheGuard.java b/Mage.Sets/src/mage/cards/w/WingsOfTheGuard.java index c57bd8799a..db43873c67 100644 --- a/Mage.Sets/src/mage/cards/w/WingsOfTheGuard.java +++ b/Mage.Sets/src/mage/cards/w/WingsOfTheGuard.java @@ -1,64 +1,65 @@ -/* - * 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.cards.w; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.keyword.FlyingAbility; -import mage.abilities.keyword.MeleeAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author emerald000 - */ -public class WingsOfTheGuard extends CardImpl { - - public WingsOfTheGuard(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Bird"); - this.power = new MageInt(1); - this.toughness = new MageInt(1); - - // Flying - this.addAbility(FlyingAbility.getInstance()); - // Melee - this.addAbility(new MeleeAbility()); - } - - public WingsOfTheGuard(final WingsOfTheGuard card) { - super(card); - } - - @Override - public WingsOfTheGuard copy() { - return new WingsOfTheGuard(this); - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.MeleeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author emerald000 + */ +public class WingsOfTheGuard extends CardImpl { + + public WingsOfTheGuard(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); + this.subtype.add(SubType.BIRD); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Melee + this.addAbility(new MeleeAbility()); + } + + public WingsOfTheGuard(final WingsOfTheGuard card) { + super(card); + } + + @Override + public WingsOfTheGuard copy() { + return new WingsOfTheGuard(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WingsOfVelisVel.java b/Mage.Sets/src/mage/cards/w/WingsOfVelisVel.java index 0376437b80..2cb67c03be 100644 --- a/Mage.Sets/src/mage/cards/w/WingsOfVelisVel.java +++ b/Mage.Sets/src/mage/cards/w/WingsOfVelisVel.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.SubLayer; @@ -49,7 +50,7 @@ public class WingsOfVelisVel extends CardImpl { public WingsOfVelisVel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{1}{U}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); // Changeling this.addAbility(ChangelingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/w/WingsteedRider.java b/Mage.Sets/src/mage/cards/w/WingsteedRider.java index 1ec89c3748..a9a2794caa 100644 --- a/Mage.Sets/src/mage/cards/w/WingsteedRider.java +++ b/Mage.Sets/src/mage/cards/w/WingsteedRider.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -45,8 +46,8 @@ public class WingsteedRider extends CardImpl { public WingsteedRider(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WinnowerPatrol.java b/Mage.Sets/src/mage/cards/w/WinnowerPatrol.java index f6a188c82e..c7e0269886 100644 --- a/Mage.Sets/src/mage/cards/w/WinnowerPatrol.java +++ b/Mage.Sets/src/mage/cards/w/WinnowerPatrol.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -44,8 +45,8 @@ public class WinnowerPatrol extends CardImpl { public WinnowerPatrol(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WinterBlast.java b/Mage.Sets/src/mage/cards/w/WinterBlast.java new file mode 100644 index 0000000000..97a6d3103d --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WinterBlast.java @@ -0,0 +1,107 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class WinterBlast extends CardImpl { + + public WinterBlast(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{G}"); + + // Tap X target creatures. Winter Blast deals 2 damage to each of those creatures with flying. + this.getSpellAbility().addEffect(new WinterBlastEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability instanceof SpellAbility) { + ability.getTargets().clear(); + int xValue = ability.getManaCostsToPay().getX(); + ability.addTarget(new TargetCreaturePermanent(xValue)); + } + } + + public WinterBlast(final WinterBlast card) { + super(card); + } + + @Override + public WinterBlast copy() { + return new WinterBlast(this); + } +} + +class WinterBlastEffect extends OneShotEffect { + + WinterBlastEffect() { + super(Outcome.Benefit); + this.staticText = "Tap X target creatures. {this} deals 2 damage to each of those creatures with flying."; + } + + WinterBlastEffect(final WinterBlastEffect effect) { + super(effect); + } + + @Override + public WinterBlastEffect copy() { + return new WinterBlastEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + int affectedTargets = 0; + for (UUID permanentId : targetPointer.getTargets(game, source)) { + Permanent permanent = game.getPermanent(permanentId); + if (permanent != null) { + permanent.tap(game); + if (permanent.getAbilities().contains(FlyingAbility.getInstance())) { + permanent.damage(2, source.getSourceId(), game, false, true); + } + affectedTargets++; + } + } + return affectedTargets > 0; + } +} diff --git a/Mage.Sets/src/mage/cards/w/WintersNight.java b/Mage.Sets/src/mage/cards/w/WintersNight.java new file mode 100644 index 0000000000..115056ee57 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WintersNight.java @@ -0,0 +1,80 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.TapForManaAllTriggeredManaAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AddManaOfAnyTypeProducedEffect; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; +import mage.abilities.effects.common.ManaEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SetTargetPointer; +import mage.constants.SuperType; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author L_J + */ +public class WintersNight extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent("a player taps a snow land"); + { + filter.add(new SupertypePredicate(SuperType.SNOW)); + } + + public WintersNight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}{G}{W}"); + addSuperType(SuperType.WORLD); + + // Whenever a player taps a snow land for mana, that player adds one mana to his or her mana pool of any type that land produced. + // That land doesn't untap during its controller's next untap step. + ManaEffect effect = new AddManaOfAnyTypeProducedEffect(); + effect.setText("that player adds one mana to his or her mana pool of any type that land produced"); + Ability ability = new TapForManaAllTriggeredManaAbility(effect, filter, SetTargetPointer.PERMANENT); + Effect effect2 = new DontUntapInControllersNextUntapStepTargetEffect(); + effect2.setText("That land doesn't untap during its controller's next untap step"); + ability.addEffect(effect2); + this.addAbility(ability); + } + + public WintersNight(final WintersNight card) { + super(card); + } + + @Override + public WintersNight copy() { + return new WintersNight(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/Wirecat.java b/Mage.Sets/src/mage/cards/w/Wirecat.java index 04280c5c5d..8ebbb66d74 100644 --- a/Mage.Sets/src/mage/cards/w/Wirecat.java +++ b/Mage.Sets/src/mage/cards/w/Wirecat.java @@ -34,6 +34,7 @@ import mage.abilities.effects.RestrictionEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; @@ -50,7 +51,7 @@ public class Wirecat extends CardImpl { public Wirecat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); - this.subtype.add("Cat"); + this.subtype.add(SubType.CAT); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WirewoodChanneler.java b/Mage.Sets/src/mage/cards/w/WirewoodChanneler.java index 44db9ef1f9..fa970506fe 100644 --- a/Mage.Sets/src/mage/cards/w/WirewoodChanneler.java +++ b/Mage.Sets/src/mage/cards/w/WirewoodChanneler.java @@ -54,8 +54,8 @@ public class WirewoodChanneler extends CardImpl { public WirewoodChanneler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WirewoodElf.java b/Mage.Sets/src/mage/cards/w/WirewoodElf.java index d3e72cc810..93452638af 100644 --- a/Mage.Sets/src/mage/cards/w/WirewoodElf.java +++ b/Mage.Sets/src/mage/cards/w/WirewoodElf.java @@ -33,6 +33,7 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ import mage.constants.CardType; public class WirewoodElf extends CardImpl { public WirewoodElf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WirewoodGuardian.java b/Mage.Sets/src/mage/cards/w/WirewoodGuardian.java index d52cc42441..5c642957b5 100644 --- a/Mage.Sets/src/mage/cards/w/WirewoodGuardian.java +++ b/Mage.Sets/src/mage/cards/w/WirewoodGuardian.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ForestcyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class WirewoodGuardian extends CardImpl { public WirewoodGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Mutant"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.MUTANT); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/w/WirewoodHerald.java b/Mage.Sets/src/mage/cards/w/WirewoodHerald.java index 0392d894cc..b2f17ed509 100644 --- a/Mage.Sets/src/mage/cards/w/WirewoodHerald.java +++ b/Mage.Sets/src/mage/cards/w/WirewoodHerald.java @@ -53,7 +53,7 @@ public class WirewoodHerald extends CardImpl { public WirewoodHerald(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WirewoodHivemaster.java b/Mage.Sets/src/mage/cards/w/WirewoodHivemaster.java index 4402dc0a4e..6e9a59973f 100644 --- a/Mage.Sets/src/mage/cards/w/WirewoodHivemaster.java +++ b/Mage.Sets/src/mage/cards/w/WirewoodHivemaster.java @@ -57,7 +57,7 @@ public class WirewoodHivemaster extends CardImpl { } public WirewoodHivemaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WirewoodSavage.java b/Mage.Sets/src/mage/cards/w/WirewoodSavage.java index 445a01d7e1..2ce7601f34 100644 --- a/Mage.Sets/src/mage/cards/w/WirewoodSavage.java +++ b/Mage.Sets/src/mage/cards/w/WirewoodSavage.java @@ -53,7 +53,7 @@ public class WirewoodSavage extends CardImpl { public WirewoodSavage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WirewoodSymbiote.java b/Mage.Sets/src/mage/cards/w/WirewoodSymbiote.java index c4dd6e911b..8609cf59bf 100644 --- a/Mage.Sets/src/mage/cards/w/WirewoodSymbiote.java +++ b/Mage.Sets/src/mage/cards/w/WirewoodSymbiote.java @@ -57,7 +57,7 @@ public class WirewoodSymbiote extends CardImpl { public WirewoodSymbiote(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/Wispmare.java b/Mage.Sets/src/mage/cards/w/Wispmare.java index 696155fe5e..2ac3ab4b94 100644 --- a/Mage.Sets/src/mage/cards/w/Wispmare.java +++ b/Mage.Sets/src/mage/cards/w/Wispmare.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetEnchantmentPermanent; /** @@ -47,7 +48,7 @@ public class Wispmare extends CardImpl { public Wispmare(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WispweaverAngel.java b/Mage.Sets/src/mage/cards/w/WispweaverAngel.java index 5d931a22d0..21c0c3db4f 100644 --- a/Mage.Sets/src/mage/cards/w/WispweaverAngel.java +++ b/Mage.Sets/src/mage/cards/w/WispweaverAngel.java @@ -42,6 +42,7 @@ import mage.cards.Cards; import mage.cards.CardsImpl; import mage.cards.MeldCard; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -66,7 +67,7 @@ public class WispweaverAngel extends CardImpl { public WispweaverAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); - this.subtype.add("Angel"); + this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WistfulSelkie.java b/Mage.Sets/src/mage/cards/w/WistfulSelkie.java index 18879d3f88..3d15ad1ec3 100644 --- a/Mage.Sets/src/mage/cards/w/WistfulSelkie.java +++ b/Mage.Sets/src/mage/cards/w/WistfulSelkie.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,8 +45,8 @@ public class WistfulSelkie extends CardImpl { public WistfulSelkie (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G/U}{G/U}{G/U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WitchEngine.java b/Mage.Sets/src/mage/cards/w/WitchEngine.java index 0c7380cc44..2d5659e4d3 100644 --- a/Mage.Sets/src/mage/cards/w/WitchEngine.java +++ b/Mage.Sets/src/mage/cards/w/WitchEngine.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -56,7 +57,7 @@ public class WitchEngine extends CardImpl { public WitchEngine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WitchHunter.java b/Mage.Sets/src/mage/cards/w/WitchHunter.java index be64f3543e..81c637527c 100644 --- a/Mage.Sets/src/mage/cards/w/WitchHunter.java +++ b/Mage.Sets/src/mage/cards/w/WitchHunter.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -59,8 +60,8 @@ public class WitchHunter extends CardImpl { public WitchHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WitchMawNephilim.java b/Mage.Sets/src/mage/cards/w/WitchMawNephilim.java index 17eed6fbb5..2a20a46694 100644 --- a/Mage.Sets/src/mage/cards/w/WitchMawNephilim.java +++ b/Mage.Sets/src/mage/cards/w/WitchMawNephilim.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.counters.CounterType; @@ -52,7 +53,7 @@ public class WitchMawNephilim extends CardImpl { public WitchMawNephilim(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}{U}{B}"); - this.subtype.add("Nephilim"); + this.subtype.add(SubType.NEPHILIM); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WitchbaneOrb.java b/Mage.Sets/src/mage/cards/w/WitchbaneOrb.java index 2eeb027bb3..6e6e7ba200 100644 --- a/Mage.Sets/src/mage/cards/w/WitchbaneOrb.java +++ b/Mage.Sets/src/mage/cards/w/WitchbaneOrb.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -91,7 +92,7 @@ class WitchbaneOrbEffect extends OneShotEffect { List toDestroy = new ArrayList<>(); for (UUID attachmentId : controller.getAttachments()) { Permanent attachment = game.getPermanent(attachmentId); - if (attachment != null && attachment.getSubtype(game).contains("Curse")) { + if (attachment != null && attachment.hasSubtype(SubType.CURSE, game)) { toDestroy.add(attachment); } } diff --git a/Mage.Sets/src/mage/cards/w/WitchesEye.java b/Mage.Sets/src/mage/cards/w/WitchesEye.java index 0eeef310e5..4ffb3bc77a 100644 --- a/Mage.Sets/src/mage/cards/w/WitchesEye.java +++ b/Mage.Sets/src/mage/cards/w/WitchesEye.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class WitchesEye extends CardImpl { public WitchesEye(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has "{1}, {T}: Scry 1." Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryEffect(1), new GenericManaCost(1)); diff --git a/Mage.Sets/src/mage/cards/w/WitchsFamiliar.java b/Mage.Sets/src/mage/cards/w/WitchsFamiliar.java index 37beed5253..9a3867f880 100644 --- a/Mage.Sets/src/mage/cards/w/WitchsFamiliar.java +++ b/Mage.Sets/src/mage/cards/w/WitchsFamiliar.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class WitchsFamiliar extends CardImpl { public WitchsFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Frog"); + this.subtype.add(SubType.FROG); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/Witchstalker.java b/Mage.Sets/src/mage/cards/w/Witchstalker.java index 17810b954d..076ff2b401 100644 --- a/Mage.Sets/src/mage/cards/w/Witchstalker.java +++ b/Mage.Sets/src/mage/cards/w/Witchstalker.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.FilterCard; @@ -54,7 +55,7 @@ public class Witchstalker extends CardImpl { public Witchstalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/Withdraw.java b/Mage.Sets/src/mage/cards/w/Withdraw.java index b56eadce60..c5890a7eb4 100644 --- a/Mage.Sets/src/mage/cards/w/Withdraw.java +++ b/Mage.Sets/src/mage/cards/w/Withdraw.java @@ -1,119 +1,119 @@ -/* - * 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.cards.w; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.costs.Cost; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.ReturnToHandTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.AnotherTargetPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.Target; -import mage.target.common.TargetCreaturePermanent; -import mage.target.targetpointer.FixedTarget; - -/** - * - * @author emerald000 - */ -public class Withdraw extends CardImpl { - - public Withdraw(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}{U}"); - - // Return target creature to its owner's hand. Then return another target creature to its owner's hand unless its controller pays {1}. - this.getSpellAbility().addEffect(new WithdrawEffect()); - Target target = new TargetCreaturePermanent(new FilterCreaturePermanent("creature to return unconditionally")); - target.setTargetTag(1); - this.getSpellAbility().addTarget(target); - - FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature to return unless {1} is paid"); - filter.add(new AnotherTargetPredicate(2)); - target = new TargetCreaturePermanent(filter); - target.setTargetTag(2); - this.getSpellAbility().addTarget(target); - } - - public Withdraw(final Withdraw card) { - super(card); - } - - @Override - public Withdraw copy() { - return new Withdraw(this); - } -} - -class WithdrawEffect extends OneShotEffect { - - WithdrawEffect() { - super(Outcome.ReturnToHand); - this.staticText = "Return target creature to its owner's hand. Then return another target creature to its owner's hand unless its controller pays {1}"; - } - - WithdrawEffect(final WithdrawEffect effect) { - super(effect); - } - - @Override - public WithdrawEffect copy() { - return new WithdrawEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Effect effect = new ReturnToHandTargetEffect(); - effect.setTargetPointer(new FixedTarget(source.getFirstTarget())); - effect.apply(game, source); - Permanent secondCreature = game.getPermanent(source.getTargets().get(1).getFirstTarget()); - if (secondCreature != null) { - Player creatureController = game.getPlayer(secondCreature.getControllerId()); - if (creatureController != null) { - Cost cost = new GenericManaCost(1); - if (creatureController.chooseUse(Outcome.Benefit, "Pay {1}? (Otherwise " + secondCreature.getName() + " will be returned to its owner's hand)", source, game)) { - cost.pay(source, game, source.getSourceId(), creatureController.getId(), false); - } - if (!cost.isPaid()) { - creatureController.moveCards(secondCreature, Zone.HAND, source, game); - } - } - } - return true; - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.Cost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AnotherTargetPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author emerald000 + */ +public class Withdraw extends CardImpl { + + public Withdraw(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}{U}"); + + // Return target creature to its owner's hand. Then return another target creature to its owner's hand unless its controller pays {1}. + this.getSpellAbility().addEffect(new WithdrawEffect()); + Target target = new TargetCreaturePermanent(new FilterCreaturePermanent("creature to return unconditionally")); + target.setTargetTag(1); + this.getSpellAbility().addTarget(target); + + FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature to return unless {1} is paid"); + filter.add(new AnotherTargetPredicate(2)); + target = new TargetCreaturePermanent(filter); + target.setTargetTag(2); + this.getSpellAbility().addTarget(target); + } + + public Withdraw(final Withdraw card) { + super(card); + } + + @Override + public Withdraw copy() { + return new Withdraw(this); + } +} + +class WithdrawEffect extends OneShotEffect { + + WithdrawEffect() { + super(Outcome.ReturnToHand); + this.staticText = "Return target creature to its owner's hand. Then return another target creature to its owner's hand unless its controller pays {1}"; + } + + WithdrawEffect(final WithdrawEffect effect) { + super(effect); + } + + @Override + public WithdrawEffect copy() { + return new WithdrawEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Effect effect = new ReturnToHandTargetEffect(); + effect.setTargetPointer(new FixedTarget(source.getFirstTarget())); + effect.apply(game, source); + Permanent secondCreature = game.getPermanent(source.getTargets().get(1).getFirstTarget()); + if (secondCreature != null) { + Player creatureController = game.getPlayer(secondCreature.getControllerId()); + if (creatureController != null) { + Cost cost = new GenericManaCost(1); + if (creatureController.chooseUse(Outcome.Benefit, "Pay {1}? (Otherwise " + secondCreature.getName() + " will be returned to its owner's hand)", source, game)) { + cost.pay(source, game, source.getSourceId(), creatureController.getId(), false); + } + if (!cost.isPaid()) { + creatureController.moveCards(secondCreature, Zone.HAND, source, game); + } + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/w/WithengarUnbound.java b/Mage.Sets/src/mage/cards/w/WithengarUnbound.java index fe10af2dc9..de4a7c7d51 100644 --- a/Mage.Sets/src/mage/cards/w/WithengarUnbound.java +++ b/Mage.Sets/src/mage/cards/w/WithengarUnbound.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.counters.CounterType; @@ -53,7 +54,7 @@ public class WithengarUnbound extends CardImpl { public WithengarUnbound(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.color.setBlack(true); // this card is the second face of double-faced card diff --git a/Mage.Sets/src/mage/cards/w/WitheredWretch.java b/Mage.Sets/src/mage/cards/w/WitheredWretch.java index 442216a26e..10388bee0b 100644 --- a/Mage.Sets/src/mage/cards/w/WitheredWretch.java +++ b/Mage.Sets/src/mage/cards/w/WitheredWretch.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCardInGraveyard; @@ -47,8 +48,8 @@ public class WitheredWretch extends CardImpl { public WitheredWretch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WitheringHex.java b/Mage.Sets/src/mage/cards/w/WitheringHex.java new file mode 100644 index 0000000000..38727833a1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WitheringHex.java @@ -0,0 +1,90 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.constants.SubType; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.CycleAllTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.MultipliedValue; +import mage.abilities.dynamicvalue.common.CountersSourceCount; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author TheElk801 + */ +public class WitheringHex extends CardImpl { + + public WitheringHex(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Whenever a player cycles a card, put a plague counter on Withering Hex. + this.addAbility(new CycleAllTriggeredAbility(new AddCountersSourceEffect(CounterType.PLAGUE.createInstance()), false)); + + // Enchanted creature gets -1/-1 for each plague counter on Withering Hex. + DynamicValue value = new MultipliedValue(new CountersSourceCount(CounterType.PLAGUE), -1); + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, + new BoostEnchantedEffect(value, value, Duration.WhileOnBattlefield) + .setText("Enchanted creature gets -1/-1 for each plague counter on {this}.") + )); + } + + public WitheringHex(final WitheringHex card) { + super(card); + } + + @Override + public WitheringHex copy() { + return new WitheringHex(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WitheringWisps.java b/Mage.Sets/src/mage/cards/w/WitheringWisps.java new file mode 100644 index 0000000000..016f2091e0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WitheringWisps.java @@ -0,0 +1,115 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.abilities.ActivatedAbilityImpl; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.OnEventTriggeredAbility; +import mage.abilities.condition.common.CreatureCountCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DamageEverythingEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author L_J + */ +public class WitheringWisps extends CardImpl { + + private static final String ruleText = "At the beginning of the end step, if no creatures are on the battlefield, sacrifice {this}."; + + public WitheringWisps(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}{B}"); + + // At the beginning of the end step, if no creatures are on the battlefield, sacrifice Withering Wisps. + TriggeredAbility triggered = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new SacrificeSourceEffect()); + this.addAbility(new ConditionalTriggeredAbility(triggered, new CreatureCountCondition(0, TargetController.ANY), ruleText)); + + // {B}: Withering Wisps deals 1 damage to each creature and each player. Activate this ability no more times each turn than the number of snow Swamps you control. + this.addAbility(new WitheringWispsActivatedAbility()); + } + + public WitheringWisps(final WitheringWisps card) { + super(card); + } + + @Override + public WitheringWisps copy() { + return new WitheringWisps(this); + } +} + +class WitheringWispsActivatedAbility extends ActivatedAbilityImpl { + + private static final FilterPermanent filter = new FilterPermanent("snow Swamps you control"); + + static { + filter.add(new SupertypePredicate(SuperType.SNOW)); + filter.add(new SubtypePredicate(SubType.SWAMP)); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + @Override + public int getMaxActivationsPerTurn(Game game) { + return game.getBattlefield().getAllActivePermanents(filter, game).size(); + } + + public WitheringWispsActivatedAbility() { + super(Zone.BATTLEFIELD, new DamageEverythingEffect(1), new ManaCostsImpl("{B}")); + + } + + public WitheringWispsActivatedAbility(final WitheringWispsActivatedAbility ability) { + super(ability); + } + + @Override + public String getRule() { + return super.getRule() + " Activate this ability no more times each turn than the number of snow Swamps you control."; + } + + @Override + public WitheringWispsActivatedAbility copy() { + return new WitheringWispsActivatedAbility(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WitherscaleWurm.java b/Mage.Sets/src/mage/cards/w/WitherscaleWurm.java index 98134e5f16..bb506a98cd 100644 --- a/Mage.Sets/src/mage/cards/w/WitherscaleWurm.java +++ b/Mage.Sets/src/mage/cards/w/WitherscaleWurm.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -51,7 +52,7 @@ public class WitherscaleWurm extends CardImpl { public WitherscaleWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(9); this.toughness = new MageInt(9); diff --git a/Mage.Sets/src/mage/cards/w/WitnessOfTheAges.java b/Mage.Sets/src/mage/cards/w/WitnessOfTheAges.java index 266bc10f73..e96891f695 100644 --- a/Mage.Sets/src/mage/cards/w/WitnessOfTheAges.java +++ b/Mage.Sets/src/mage/cards/w/WitnessOfTheAges.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class WitnessOfTheAges extends CardImpl { public WitnessOfTheAges(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Golem"); + this.subtype.add(SubType.GOLEM); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WizardMentor.java b/Mage.Sets/src/mage/cards/w/WizardMentor.java index 93a5ad40f8..82b38ead53 100644 --- a/Mage.Sets/src/mage/cards/w/WizardMentor.java +++ b/Mage.Sets/src/mage/cards/w/WizardMentor.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -56,8 +57,8 @@ public class WizardMentor extends CardImpl { public WizardMentor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WizardReplica.java b/Mage.Sets/src/mage/cards/w/WizardReplica.java index 63834fc99a..dbc051bf33 100644 --- a/Mage.Sets/src/mage/cards/w/WizardReplica.java +++ b/Mage.Sets/src/mage/cards/w/WizardReplica.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.target.TargetSpell; @@ -51,7 +52,7 @@ public class WizardReplica extends CardImpl { public WizardReplica(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(3); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/w/WizenedCenn.java b/Mage.Sets/src/mage/cards/w/WizenedCenn.java index e0a0507a62..16fbc4c3a9 100644 --- a/Mage.Sets/src/mage/cards/w/WizenedCenn.java +++ b/Mage.Sets/src/mage/cards/w/WizenedCenn.java @@ -54,8 +54,8 @@ public class WizenedCenn extends CardImpl { public WizenedCenn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); - this.subtype.add("Kithkin"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.KITHKIN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WizenedSnitches.java b/Mage.Sets/src/mage/cards/w/WizenedSnitches.java index 90290d20a2..3e8e696756 100644 --- a/Mage.Sets/src/mage/cards/w/WizenedSnitches.java +++ b/Mage.Sets/src/mage/cards/w/WizenedSnitches.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -45,8 +46,8 @@ public class WizenedSnitches extends CardImpl { public WizenedSnitches(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Faerie"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/Woebearer.java b/Mage.Sets/src/mage/cards/w/Woebearer.java index 9baf1fa466..36f290e964 100644 --- a/Mage.Sets/src/mage/cards/w/Woebearer.java +++ b/Mage.Sets/src/mage/cards/w/Woebearer.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; @@ -47,7 +48,7 @@ public class Woebearer extends CardImpl { public Woebearer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WoebringerDemon.java b/Mage.Sets/src/mage/cards/w/WoebringerDemon.java index 001226a9fb..4f0077da36 100644 --- a/Mage.Sets/src/mage/cards/w/WoebringerDemon.java +++ b/Mage.Sets/src/mage/cards/w/WoebringerDemon.java @@ -1,118 +1,119 @@ -/* - * 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.cards.w; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.keyword.FlyingAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.common.TargetControlledCreaturePermanent; - -/** - * - * @author LevelX2 - */ -public class WoebringerDemon extends CardImpl { - - public WoebringerDemon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); - - this.subtype.add("Demon"); - this.power = new MageInt(4); - this.toughness = new MageInt(4); - - // Flying - this.addAbility(FlyingAbility.getInstance()); - - // At the beginning of each player's upkeep, that player sacrifices a creature. If the player can't, sacrifice Woebringer Demon. - this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new WoebringerDemonEffect(), TargetController.ANY, false, true)); - } - - public WoebringerDemon(final WoebringerDemon card) { - super(card); - } - - @Override - public WoebringerDemon copy() { - return new WoebringerDemon(this); - } -} - -class WoebringerDemonEffect extends OneShotEffect { - - public WoebringerDemonEffect() { - super(Outcome.Detriment); - this.staticText = "that player sacrifices a creature. If the player can't, sacrifice {this}"; - } - - public WoebringerDemonEffect(final WoebringerDemonEffect effect) { - super(effect); - } - - @Override - public WoebringerDemonEffect copy() { - return new WoebringerDemonEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Player currentPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); - if (currentPlayer != null) { - TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent(); - target.setNotTarget(true); - if (target.canChoose(currentPlayer.getId(), game)) { - currentPlayer.chooseTarget(Outcome.Sacrifice, target, source, game); - Permanent permanent = game.getPermanent(target.getFirstTarget()); - if (permanent != null) { - permanent.sacrifice(source.getSourceId(), game); - return true; - } - } - } - Permanent sourceObject = game.getPermanent(source.getSourceId()); - if (sourceObject != null && sourceObject.getZoneChangeCounter(game) == source.getSourceObjectZoneChangeCounter()) { - sourceObject.sacrifice(source.getSourceId(), game); - } - return true; - } - return false; - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class WoebringerDemon extends CardImpl { + + public WoebringerDemon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + + this.subtype.add(SubType.DEMON); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // At the beginning of each player's upkeep, that player sacrifices a creature. If the player can't, sacrifice Woebringer Demon. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new WoebringerDemonEffect(), TargetController.ANY, false, true)); + } + + public WoebringerDemon(final WoebringerDemon card) { + super(card); + } + + @Override + public WoebringerDemon copy() { + return new WoebringerDemon(this); + } +} + +class WoebringerDemonEffect extends OneShotEffect { + + public WoebringerDemonEffect() { + super(Outcome.Detriment); + this.staticText = "that player sacrifices a creature. If the player can't, sacrifice {this}"; + } + + public WoebringerDemonEffect(final WoebringerDemonEffect effect) { + super(effect); + } + + @Override + public WoebringerDemonEffect copy() { + return new WoebringerDemonEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Player currentPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); + if (currentPlayer != null) { + TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent(); + target.setNotTarget(true); + if (target.canChoose(currentPlayer.getId(), game)) { + currentPlayer.chooseTarget(Outcome.Sacrifice, target, source, game); + Permanent permanent = game.getPermanent(target.getFirstTarget()); + if (permanent != null) { + permanent.sacrifice(source.getSourceId(), game); + return true; + } + } + } + Permanent sourceObject = game.getPermanent(source.getSourceId()); + if (sourceObject != null && sourceObject.getZoneChangeCounter(game) == source.getSourceObjectZoneChangeCounter()) { + sourceObject.sacrifice(source.getSourceId(), game); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/w/Woeleecher.java b/Mage.Sets/src/mage/cards/w/Woeleecher.java index 83a704ff7a..64afd4c412 100644 --- a/Mage.Sets/src/mage/cards/w/Woeleecher.java +++ b/Mage.Sets/src/mage/cards/w/Woeleecher.java @@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; @@ -54,7 +55,7 @@ public class Woeleecher extends CardImpl { public Woeleecher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/w/WojekApothecary.java b/Mage.Sets/src/mage/cards/w/WojekApothecary.java index 3ebed12aba..3344891da5 100644 --- a/Mage.Sets/src/mage/cards/w/WojekApothecary.java +++ b/Mage.Sets/src/mage/cards/w/WojekApothecary.java @@ -40,6 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -59,8 +60,8 @@ public class WojekApothecary extends CardImpl { public WojekApothecary(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WojekEmbermage.java b/Mage.Sets/src/mage/cards/w/WojekEmbermage.java index 37d5f3aef1..082c826880 100644 --- a/Mage.Sets/src/mage/cards/w/WojekEmbermage.java +++ b/Mage.Sets/src/mage/cards/w/WojekEmbermage.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -54,8 +55,8 @@ public class WojekEmbermage extends CardImpl { public WojekEmbermage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WojekHalberdiers.java b/Mage.Sets/src/mage/cards/w/WojekHalberdiers.java index e22ac8261a..04978c6fea 100644 --- a/Mage.Sets/src/mage/cards/w/WojekHalberdiers.java +++ b/Mage.Sets/src/mage/cards/w/WojekHalberdiers.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class WojekHalberdiers extends CardImpl { public WojekHalberdiers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{W}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WolfOfDevilsBreach.java b/Mage.Sets/src/mage/cards/w/WolfOfDevilsBreach.java index 6edf3ba66a..8120ae5565 100644 --- a/Mage.Sets/src/mage/cards/w/WolfOfDevilsBreach.java +++ b/Mage.Sets/src/mage/cards/w/WolfOfDevilsBreach.java @@ -44,6 +44,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.Game; import mage.target.common.TargetCreatureOrPlaneswalker; @@ -55,8 +56,8 @@ public class WolfOfDevilsBreach extends CardImpl { public WolfOfDevilsBreach(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); - this.subtype.add("Elemental"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.WOLF); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/w/WolfPack.java b/Mage.Sets/src/mage/cards/w/WolfPack.java index 57b4f5abd0..c14cff893d 100644 --- a/Mage.Sets/src/mage/cards/w/WolfPack.java +++ b/Mage.Sets/src/mage/cards/w/WolfPack.java @@ -33,6 +33,7 @@ import mage.abilities.common.DamageAsThoughNotBlockedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class WolfPack extends CardImpl { public WolfPack(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}{G}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(7); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/w/WolfSkullShaman.java b/Mage.Sets/src/mage/cards/w/WolfSkullShaman.java index 4bb0801af5..d7bdc3dfbf 100644 --- a/Mage.Sets/src/mage/cards/w/WolfSkullShaman.java +++ b/Mage.Sets/src/mage/cards/w/WolfSkullShaman.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.WolfToken; /** @@ -44,8 +45,8 @@ public class WolfSkullShaman extends CardImpl { public WolfSkullShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WolfbittenCaptive.java b/Mage.Sets/src/mage/cards/w/WolfbittenCaptive.java index 3e3e81ef2d..88e77b6ac5 100644 --- a/Mage.Sets/src/mage/cards/w/WolfbittenCaptive.java +++ b/Mage.Sets/src/mage/cards/w/WolfbittenCaptive.java @@ -51,8 +51,8 @@ public class WolfbittenCaptive extends CardImpl { public WolfbittenCaptive(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Werewolf"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WolfbriarElemental.java b/Mage.Sets/src/mage/cards/w/WolfbriarElemental.java index 96e5daef19..3488bfbe75 100644 --- a/Mage.Sets/src/mage/cards/w/WolfbriarElemental.java +++ b/Mage.Sets/src/mage/cards/w/WolfbriarElemental.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.MultikickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.WolfToken; /** @@ -47,7 +48,7 @@ public class WolfbriarElemental extends CardImpl { public WolfbriarElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WolfhuntersQuiver.java b/Mage.Sets/src/mage/cards/w/WolfhuntersQuiver.java index b974d00a1d..9ea6a87f46 100644 --- a/Mage.Sets/src/mage/cards/w/WolfhuntersQuiver.java +++ b/Mage.Sets/src/mage/cards/w/WolfhuntersQuiver.java @@ -59,7 +59,7 @@ public class WolfhuntersQuiver extends CardImpl { public WolfhuntersQuiver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature has "{T}: This creature deals 1 damage to target creature or player" Ability abilityToGain = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/w/WolfirAvenger.java b/Mage.Sets/src/mage/cards/w/WolfirAvenger.java index 59f33c5033..2c472458f3 100644 --- a/Mage.Sets/src/mage/cards/w/WolfirAvenger.java +++ b/Mage.Sets/src/mage/cards/w/WolfirAvenger.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class WolfirAvenger extends CardImpl { public WolfirAvenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Wolf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.WOLF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WolfirSilverheart.java b/Mage.Sets/src/mage/cards/w/WolfirSilverheart.java index 4902b4064c..412a5a9de5 100644 --- a/Mage.Sets/src/mage/cards/w/WolfirSilverheart.java +++ b/Mage.Sets/src/mage/cards/w/WolfirSilverheart.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.SoulbondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,8 +47,8 @@ public class WolfirSilverheart extends CardImpl { public WolfirSilverheart(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Wolf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.WOLF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WolfkinBond.java b/Mage.Sets/src/mage/cards/w/WolfkinBond.java index 29202496a2..e1b67a2e1c 100644 --- a/Mage.Sets/src/mage/cards/w/WolfkinBond.java +++ b/Mage.Sets/src/mage/cards/w/WolfkinBond.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -53,7 +54,7 @@ public class WolfkinBond extends CardImpl { public WolfkinBond(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/w/WolverinePack.java b/Mage.Sets/src/mage/cards/w/WolverinePack.java index 938f799001..62cb83e049 100644 --- a/Mage.Sets/src/mage/cards/w/WolverinePack.java +++ b/Mage.Sets/src/mage/cards/w/WolverinePack.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.RampageAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class WolverinePack extends CardImpl { public WolverinePack(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Wolverine"); + this.subtype.add(SubType.WOLVERINE); this.power = new MageInt(2); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WompRat.java b/Mage.Sets/src/mage/cards/w/WompRat.java index ec48e84cb5..902b8048b9 100644 --- a/Mage.Sets/src/mage/cards/w/WompRat.java +++ b/Mage.Sets/src/mage/cards/w/WompRat.java @@ -1,71 +1,72 @@ -/* - * 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.cards.w; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.BecomesMonstrousSourceTriggeredAbility; -import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.keyword.MonstrosityAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.target.common.TargetCardInGraveyard; - -/** - * - * @author Styxo - */ -public class WompRat extends CardImpl { - - public WompRat(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Rat"); - this.subtype.add("Beast"); - this.power = new MageInt(3); - this.toughness = new MageInt(2); - - // {4}{W}: Monstrosity 1 - this.addAbility(new MonstrosityAbility("{4}{W}", 1)); - - // When Womp Rat becomes monstrous you may exilte target card from a graveyard - Ability ability = new BecomesMonstrousSourceTriggeredAbility(new ExileTargetEffect(), true); - ability.addTarget(new TargetCardInGraveyard()); - this.addAbility(ability); - } - - public WompRat(final WompRat card) { - super(card); - } - - @Override - public WompRat copy() { - return new WompRat(this); - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BecomesMonstrousSourceTriggeredAbility; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.keyword.MonstrosityAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.target.common.TargetCardInGraveyard; + +/** + * + * @author Styxo + */ +public class WompRat extends CardImpl { + + public WompRat(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.subtype.add(SubType.RAT); + this.subtype.add(SubType.BEAST); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // {4}{W}: Monstrosity 1 + this.addAbility(new MonstrosityAbility("{4}{W}", 1)); + + // When Womp Rat becomes monstrous you may exilte target card from a graveyard + Ability ability = new BecomesMonstrousSourceTriggeredAbility(new ExileTargetEffect(), true); + ability.addTarget(new TargetCardInGraveyard()); + this.addAbility(ability); + } + + public WompRat(final WompRat card) { + super(card); + } + + @Override + public WompRat copy() { + return new WompRat(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/Wonder.java b/Mage.Sets/src/mage/cards/w/Wonder.java index d446e772a7..cf8434f0b6 100644 --- a/Mage.Sets/src/mage/cards/w/Wonder.java +++ b/Mage.Sets/src/mage/cards/w/Wonder.java @@ -63,7 +63,7 @@ public class Wonder extends CardImpl { public Wonder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Incarnation"); + this.subtype.add(SubType.INCARNATION); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WoodElves.java b/Mage.Sets/src/mage/cards/w/WoodElves.java index 83a6047eda..b4818f1cdc 100644 --- a/Mage.Sets/src/mage/cards/w/WoodElves.java +++ b/Mage.Sets/src/mage/cards/w/WoodElves.java @@ -27,7 +27,6 @@ */ package mage.cards.w; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; @@ -39,21 +38,23 @@ import mage.filter.common.FilterLandCard; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Plopman */ public class WoodElves extends CardImpl { - private static final FilterLandCard filter = new FilterLandCard("Forest"); + private static final FilterLandCard filter = new FilterLandCard("Forest card"); static{ filter.add(new SubtypePredicate(SubType.FOREST)); } public WoodElves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Scout"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WoodSage.java b/Mage.Sets/src/mage/cards/w/WoodSage.java index c562393390..12f79ba6d5 100644 --- a/Mage.Sets/src/mage/cards/w/WoodSage.java +++ b/Mage.Sets/src/mage/cards/w/WoodSage.java @@ -41,6 +41,7 @@ import mage.cards.repository.CardRepository; import mage.choices.Choice; import mage.choices.ChoiceImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -56,8 +57,8 @@ public class WoodSage extends CardImpl { public WoodSage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{U}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WoodbornBehemoth.java b/Mage.Sets/src/mage/cards/w/WoodbornBehemoth.java index 477f7c8116..d9e18d040f 100644 --- a/Mage.Sets/src/mage/cards/w/WoodbornBehemoth.java +++ b/Mage.Sets/src/mage/cards/w/WoodbornBehemoth.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; @@ -52,7 +53,7 @@ public class WoodbornBehemoth extends CardImpl { public WoodbornBehemoth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/Woodcloaker.java b/Mage.Sets/src/mage/cards/w/Woodcloaker.java index 1a2d7036e1..6c5cd5bd48 100644 --- a/Mage.Sets/src/mage/cards/w/Woodcloaker.java +++ b/Mage.Sets/src/mage/cards/w/Woodcloaker.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +50,7 @@ public class Woodcloaker extends CardImpl { public Woodcloaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WoodenStake.java b/Mage.Sets/src/mage/cards/w/WoodenStake.java index 7e0fa8b940..d400758308 100644 --- a/Mage.Sets/src/mage/cards/w/WoodenStake.java +++ b/Mage.Sets/src/mage/cards/w/WoodenStake.java @@ -54,7 +54,7 @@ public class WoodenStake extends CardImpl { public WoodenStake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equip {1} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1))); diff --git a/Mage.Sets/src/mage/cards/w/WoodfallPrimus.java b/Mage.Sets/src/mage/cards/w/WoodfallPrimus.java index 5764e5d948..05642cabcc 100644 --- a/Mage.Sets/src/mage/cards/w/WoodfallPrimus.java +++ b/Mage.Sets/src/mage/cards/w/WoodfallPrimus.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -55,8 +56,8 @@ public class WoodfallPrimus extends CardImpl { public WoodfallPrimus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}{G}"); - this.subtype.add("Treefolk"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.TREEFOLK); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/w/WoodlandBellower.java b/Mage.Sets/src/mage/cards/w/WoodlandBellower.java index bf082159f0..c8520397d5 100644 --- a/Mage.Sets/src/mage/cards/w/WoodlandBellower.java +++ b/Mage.Sets/src/mage/cards/w/WoodlandBellower.java @@ -37,6 +37,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.SuperType; @@ -59,7 +60,7 @@ public class WoodlandBellower extends CardImpl { public WoodlandBellower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/w/WoodlandCemetery.java b/Mage.Sets/src/mage/cards/w/WoodlandCemetery.java index 7df123b93b..9592895cc8 100644 --- a/Mage.Sets/src/mage/cards/w/WoodlandCemetery.java +++ b/Mage.Sets/src/mage/cards/w/WoodlandCemetery.java @@ -24,8 +24,7 @@ * 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.cards.w; import mage.abilities.common.EntersBattlefieldAbility; @@ -58,10 +57,10 @@ public class WoodlandCemetery extends CardImpl { } public WoodlandCemetery(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); - String abilityText = "tap it unless you control a Swamp or a Forest"; + String abilityText = " tapped unless you control a Swamp or a Forest"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlackManaAbility()); this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/cards/w/WoodlandChangeling.java b/Mage.Sets/src/mage/cards/w/WoodlandChangeling.java index 4016a8e3f9..ba7d328483 100644 --- a/Mage.Sets/src/mage/cards/w/WoodlandChangeling.java +++ b/Mage.Sets/src/mage/cards/w/WoodlandChangeling.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ChangelingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class WoodlandChangeling extends CardImpl { public WoodlandChangeling(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WoodlandDruid.java b/Mage.Sets/src/mage/cards/w/WoodlandDruid.java index f7088f9d62..31101a0629 100644 --- a/Mage.Sets/src/mage/cards/w/WoodlandDruid.java +++ b/Mage.Sets/src/mage/cards/w/WoodlandDruid.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class WoodlandDruid extends CardImpl { public WoodlandDruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WoodlandPatrol.java b/Mage.Sets/src/mage/cards/w/WoodlandPatrol.java index b3e1cf8e09..94b18038da 100644 --- a/Mage.Sets/src/mage/cards/w/WoodlandPatrol.java +++ b/Mage.Sets/src/mage/cards/w/WoodlandPatrol.java @@ -1,62 +1,63 @@ -/* - * 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.cards.w; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.keyword.VigilanceAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author LevelX2 - */ -public class WoodlandPatrol extends CardImpl { - - public WoodlandPatrol(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); - this.power = new MageInt(3); - this.toughness = new MageInt(2); - - // Vigilance - this.addAbility(VigilanceAbility.getInstance()); - } - - public WoodlandPatrol(final WoodlandPatrol card) { - super(card); - } - - @Override - public WoodlandPatrol copy() { - return new WoodlandPatrol(this); - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author LevelX2 + */ +public class WoodlandPatrol extends CardImpl { + + public WoodlandPatrol(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + } + + public WoodlandPatrol(final WoodlandPatrol card) { + super(card); + } + + @Override + public WoodlandPatrol copy() { + return new WoodlandPatrol(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WoodlandSleuth.java b/Mage.Sets/src/mage/cards/w/WoodlandSleuth.java index edb9a28e99..23a05db93a 100644 --- a/Mage.Sets/src/mage/cards/w/WoodlandSleuth.java +++ b/Mage.Sets/src/mage/cards/w/WoodlandSleuth.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -56,8 +57,8 @@ public class WoodlandSleuth extends CardImpl { public WoodlandSleuth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Human"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); this.color.setGreen(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WoodlandWanderer.java b/Mage.Sets/src/mage/cards/w/WoodlandWanderer.java index 1592c03eac..2175669a83 100644 --- a/Mage.Sets/src/mage/cards/w/WoodlandWanderer.java +++ b/Mage.Sets/src/mage/cards/w/WoodlandWanderer.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; /** @@ -47,7 +48,7 @@ public class WoodlandWanderer extends CardImpl { public WoodlandWanderer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WoodlotCrawler.java b/Mage.Sets/src/mage/cards/w/WoodlotCrawler.java index 5b080da1cb..382b210635 100644 --- a/Mage.Sets/src/mage/cards/w/WoodlotCrawler.java +++ b/Mage.Sets/src/mage/cards/w/WoodlotCrawler.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class WoodlotCrawler extends CardImpl { public WoodlotCrawler (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WoodlurkerMimic.java b/Mage.Sets/src/mage/cards/w/WoodlurkerMimic.java index 5d05a33035..7104eb6d29 100644 --- a/Mage.Sets/src/mage/cards/w/WoodlurkerMimic.java +++ b/Mage.Sets/src/mage/cards/w/WoodlurkerMimic.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SubLayer; import mage.filter.FilterSpell; @@ -61,7 +62,7 @@ public class WoodlurkerMimic extends CardImpl { public WoodlurkerMimic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B/G}"); - this.subtype.add("Shapeshifter"); + this.subtype.add(SubType.SHAPESHIFTER); this.color.setGreen(true); this.color.setBlack(true); diff --git a/Mage.Sets/src/mage/cards/w/Woodripper.java b/Mage.Sets/src/mage/cards/w/Woodripper.java index f83146970d..59f6799a13 100644 --- a/Mage.Sets/src/mage/cards/w/Woodripper.java +++ b/Mage.Sets/src/mage/cards/w/Woodripper.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FadingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetArtifactPermanent; @@ -50,7 +51,7 @@ public class Woodripper extends CardImpl { public Woodripper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/w/WoodvineElemental.java b/Mage.Sets/src/mage/cards/w/WoodvineElemental.java index cb99f88a99..b021f63a07 100644 --- a/Mage.Sets/src/mage/cards/w/WoodvineElemental.java +++ b/Mage.Sets/src/mage/cards/w/WoodvineElemental.java @@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.filter.common.FilterAttackingCreature; @@ -57,7 +58,7 @@ public class WoodvineElemental extends CardImpl { public WoodvineElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{W}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WoodweaversPuzzleknot.java b/Mage.Sets/src/mage/cards/w/WoodweaversPuzzleknot.java index 3957fe02c5..5b40dcb213 100644 --- a/Mage.Sets/src/mage/cards/w/WoodweaversPuzzleknot.java +++ b/Mage.Sets/src/mage/cards/w/WoodweaversPuzzleknot.java @@ -1,75 +1,75 @@ -/* - * 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.cards.w; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.SacrificeSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.GainLifeEffect; -import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Zone; - -/** - * - * @author emerald000 - */ -public class WoodweaversPuzzleknot extends CardImpl { - - public WoodweaversPuzzleknot(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - - // When Woodweaver's Puzzleknot enters the battlefield, you gain 3 life and get {E}{E}{E}. - Ability ability = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3)); - Effect effect = new GetEnergyCountersControllerEffect(3); - effect.setText("and get {E}{E}{E}"); - ability.addEffect(effect); - this.addAbility(ability); - - // {2}{G}, Sacrifice Woodweaver's Puzzleknot: You gain 3 life and get {E}{E}{E}. - ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(3), new ManaCostsImpl<>("{2}{G}")); - ability.addCost(new SacrificeSourceCost()); - ability.addEffect(effect); - this.addAbility(ability); - } - - public WoodweaversPuzzleknot(final WoodweaversPuzzleknot card) { - super(card); - } - - @Override - public WoodweaversPuzzleknot copy() { - return new WoodweaversPuzzleknot(this); - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * + * @author emerald000 + */ +public class WoodweaversPuzzleknot extends CardImpl { + + public WoodweaversPuzzleknot(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + + // When Woodweaver's Puzzleknot enters the battlefield, you gain 3 life and get {E}{E}{E}. + Ability ability = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3)); + Effect effect = new GetEnergyCountersControllerEffect(3); + effect.setText("and get {E}{E}{E}"); + ability.addEffect(effect); + this.addAbility(ability); + + // {2}{G}, Sacrifice Woodweaver's Puzzleknot: You gain 3 life and get {E}{E}{E}. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(3), new ManaCostsImpl<>("{2}{G}")); + ability.addCost(new SacrificeSourceCost()); + ability.addEffect(effect); + this.addAbility(ability); + } + + public WoodweaversPuzzleknot(final WoodweaversPuzzleknot card) { + super(card); + } + + @Override + public WoodweaversPuzzleknot copy() { + return new WoodweaversPuzzleknot(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WoodwraithCorrupter.java b/Mage.Sets/src/mage/cards/w/WoodwraithCorrupter.java index e4b3a67be6..306d63197b 100644 --- a/Mage.Sets/src/mage/cards/w/WoodwraithCorrupter.java +++ b/Mage.Sets/src/mage/cards/w/WoodwraithCorrupter.java @@ -1,98 +1,98 @@ -/* - * 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.cards.w; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterLandPermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.permanent.token.Token; -import mage.target.TargetPermanent; - -/** - * - * @author LevelX2 - */ -public class WoodwraithCorrupter extends CardImpl { - - private static final FilterLandPermanent filter = new FilterLandPermanent("Forest"); - - static { - filter.add(new SubtypePredicate(SubType.FOREST)); - } - - public WoodwraithCorrupter(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}{G}"); - - this.subtype.add("Elemental"); - this.subtype.add("Horror"); - this.power = new MageInt(3); - this.toughness = new MageInt(6); - - // {1}{B}{G}, {tap}: Target Forest becomes a 4/4 black and green Elemental Horror creature. It's still a land. - Effect effect = new BecomesCreatureTargetEffect(new WoodwraithCorrupterToken(), false, true, Duration.EndOfGame); - effect.setText("Target Forest becomes a 4/4 black and green Elemental Horror creature. It's still a land"); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{1}{B}{G}")); - ability.addTarget(new TargetPermanent(filter)); - ability.addCost(new TapSourceCost()); - this.addAbility(ability); - } - - public WoodwraithCorrupter(final WoodwraithCorrupter card) { - super(card); - } - - @Override - public WoodwraithCorrupter copy() { - return new WoodwraithCorrupter(this); - } -} - -class WoodwraithCorrupterToken extends Token { - - public WoodwraithCorrupterToken() { - super("", "4/4 black and green Elemental Horror creature"); - cardType.add(CardType.CREATURE); - subtype.add("Elemental"); - subtype.add("Horror"); - power = new MageInt(4); - toughness = new MageInt(4); - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.Token; +import mage.target.TargetPermanent; + +/** + * + * @author LevelX2 + */ +public class WoodwraithCorrupter extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent("Forest"); + + static { + filter.add(new SubtypePredicate(SubType.FOREST)); + } + + public WoodwraithCorrupter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}{G}"); + + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.HORROR); + this.power = new MageInt(3); + this.toughness = new MageInt(6); + + // {1}{B}{G}, {tap}: Target Forest becomes a 4/4 black and green Elemental Horror creature. It's still a land. + Effect effect = new BecomesCreatureTargetEffect(new WoodwraithCorrupterToken(), false, true, Duration.EndOfGame); + effect.setText("Target Forest becomes a 4/4 black and green Elemental Horror creature. It's still a land"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{1}{B}{G}")); + ability.addTarget(new TargetPermanent(filter)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public WoodwraithCorrupter(final WoodwraithCorrupter card) { + super(card); + } + + @Override + public WoodwraithCorrupter copy() { + return new WoodwraithCorrupter(this); + } +} + +class WoodwraithCorrupterToken extends Token { + + public WoodwraithCorrupterToken() { + super("", "4/4 black and green Elemental Horror creature"); + cardType.add(CardType.CREATURE); + subtype.add(SubType.ELEMENTAL); + subtype.add(SubType.HORROR); + power = new MageInt(4); + toughness = new MageInt(4); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WoodwraithStrangler.java b/Mage.Sets/src/mage/cards/w/WoodwraithStrangler.java index 000e8a501a..639636d3d9 100644 --- a/Mage.Sets/src/mage/cards/w/WoodwraithStrangler.java +++ b/Mage.Sets/src/mage/cards/w/WoodwraithStrangler.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; @@ -47,8 +48,8 @@ public class WoodwraithStrangler extends CardImpl { public WoodwraithStrangler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{G}"); - this.subtype.add("Plant"); - this.subtype.add("Zombie"); + this.subtype.add(SubType.PLANT); + this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WookieeBountyHunter.java b/Mage.Sets/src/mage/cards/w/WookieeBountyHunter.java index 50f320903a..899dce3cc8 100644 --- a/Mage.Sets/src/mage/cards/w/WookieeBountyHunter.java +++ b/Mage.Sets/src/mage/cards/w/WookieeBountyHunter.java @@ -1,63 +1,64 @@ -/* - * 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.cards.w; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.effects.common.GainLifeEffect; -import mage.abilities.keyword.BountyAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class WookieeBountyHunter extends CardImpl { - - public WookieeBountyHunter(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Wookiee"); - this.subtype.add("Hunter"); - this.power = new MageInt(4); - this.toughness = new MageInt(5); - - // Bounty — Whenever a creature an opponent controls with a bounty counter on it dies, you gain 3 life. - this.addAbility(new BountyAbility(new GainLifeEffect(3))); - } - - public WookieeBountyHunter(final WookieeBountyHunter card) { - super(card); - } - - @Override - public WookieeBountyHunter copy() { - return new WookieeBountyHunter(this); - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.keyword.BountyAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author Styxo + */ +public class WookieeBountyHunter extends CardImpl { + + public WookieeBountyHunter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); + this.subtype.add(SubType.WOOKIEE); + this.subtype.add(SubType.HUNTER); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // Bounty — Whenever a creature an opponent controls with a bounty counter on it dies, you gain 3 life. + this.addAbility(new BountyAbility(new GainLifeEffect(3))); + } + + public WookieeBountyHunter(final WookieeBountyHunter card) { + super(card); + } + + @Override + public WookieeBountyHunter copy() { + return new WookieeBountyHunter(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WookieeMystic.java b/Mage.Sets/src/mage/cards/w/WookieeMystic.java index 05211b9399..fc4376f37f 100644 --- a/Mage.Sets/src/mage/cards/w/WookieeMystic.java +++ b/Mage.Sets/src/mage/cards/w/WookieeMystic.java @@ -1,163 +1,164 @@ -/* - * 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.cards.w; - -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; -import mage.MageInt; -import mage.MageObject; -import mage.Mana; -import mage.abilities.Ability; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.BasicManaEffect; -import mage.abilities.effects.common.ManaEffect; -import mage.abilities.mana.SimpleManaAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.WatcherScope; -import mage.constants.Zone; -import mage.counters.CounterType; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.ZoneChangeEvent; -import mage.game.permanent.Permanent; -import mage.game.stack.Spell; -import mage.watchers.Watcher; - -/** - * - * @author Styxo - */ -public class WookieeMystic extends CardImpl { - - public WookieeMystic(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}{W}"); - this.subtype.add("Wookiee"); - this.subtype.add("Shaman"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // {T}: Add {R}, {G} or {W} to your mana pool. If that mana is spent on a creature spell, it enters the battlefield with a +1/+1 counter on it. - Mana mana = Mana.RedMana(1); - mana.setFlag(true); - ManaEffect effect = new BasicManaEffect(mana); - effect.setText("Add {R} to your mana pool. If that mana is spent on a creature spell, it enters the battlefield with a +1/+1 counter on it"); - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); - this.addAbility(ability, new WookieeMysticWatcher(ability)); - - mana = Mana.GreenMana(1); - mana.setFlag(true); - effect = new BasicManaEffect(mana); - effect.setText("Add {G} to your mana pool. If that mana is spent on a creature spell, it enters the battlefield with a +1/+1 counter on it"); - ability = new SimpleManaAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); - this.addAbility(ability, new WookieeMysticWatcher(ability)); - - mana = Mana.WhiteMana(1); - mana.setFlag(true); - effect = new BasicManaEffect(mana); - effect.setText("Add {W} to your mana pool. If that mana is spent on a creature spell, it enters the battlefield with a +1/+1 counter on it"); - ability = new SimpleManaAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); - this.addAbility(ability, new WookieeMysticWatcher(ability)); - } - - public WookieeMystic(final WookieeMystic card) { - super(card); - } - - @Override - public WookieeMystic copy() { - return new WookieeMystic(this); - } -} - -class WookieeMysticWatcher extends Watcher { - - private final Ability source; - private final List creatures = new ArrayList<>(); - - WookieeMysticWatcher(Ability source) { - super("HallOfTheBanditLordWatcher", WatcherScope.CARD); - this.source = source; - } - - WookieeMysticWatcher(final WookieeMysticWatcher watcher) { - super(watcher); - this.creatures.addAll(watcher.creatures); - this.source = watcher.source; - } - - @Override - public WookieeMysticWatcher copy() { - return new WookieeMysticWatcher(this); - } - - @Override - public void watch(GameEvent event, Game game) { - if (event.getType() == GameEvent.EventType.MANA_PAID) { - MageObject target = game.getObject(event.getTargetId()); - if (event.getSourceId() != null - && event.getSourceId().equals(this.getSourceId()) - && target != null && target.isCreature() - && event.getFlag()) { - if (target instanceof Spell) { - this.creatures.add(((Spell) target).getCard().getId()); - } - } - } - if (event.getType() == GameEvent.EventType.COUNTERED) { - if (creatures.contains(event.getTargetId())) { - creatures.remove(event.getSourceId()); - } - } - if (event.getType() == GameEvent.EventType.ZONE_CHANGE) { - if (creatures.contains(event.getSourceId())) { - ZoneChangeEvent zEvent = (ZoneChangeEvent) event; - // spell was e.g. exiled and goes again to stack, so previous cast has not resolved. - if (zEvent.getToZone() == Zone.STACK) { - creatures.remove(event.getSourceId()); - } - } - } - if (event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD) { - if (creatures.contains(event.getSourceId())) { - Permanent creature = game.getPermanent(event.getSourceId()); - creature.addCounters(CounterType.P1P1.createInstance(), source, game); - creatures.remove(event.getSourceId()); - } - } - } - - @Override - public void reset() { - super.reset(); - creatures.clear(); - } - -} +/* + * 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.cards.w; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.BasicManaEffect; +import mage.abilities.effects.common.ManaEffect; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.WatcherScope; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.ZoneChangeEvent; +import mage.game.permanent.Permanent; +import mage.game.stack.Spell; +import mage.watchers.Watcher; + +/** + * + * @author Styxo + */ +public class WookieeMystic extends CardImpl { + + public WookieeMystic(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}{W}"); + this.subtype.add(SubType.WOOKIEE); + this.subtype.add(SubType.SHAMAN); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {T}: Add {R}, {G} or {W} to your mana pool. If that mana is spent on a creature spell, it enters the battlefield with a +1/+1 counter on it. + Mana mana = Mana.RedMana(1); + mana.setFlag(true); + ManaEffect effect = new BasicManaEffect(mana); + effect.setText("Add {R} to your mana pool. If that mana is spent on a creature spell, it enters the battlefield with a +1/+1 counter on it"); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); + this.addAbility(ability, new WookieeMysticWatcher(ability)); + + mana = Mana.GreenMana(1); + mana.setFlag(true); + effect = new BasicManaEffect(mana); + effect.setText("Add {G} to your mana pool. If that mana is spent on a creature spell, it enters the battlefield with a +1/+1 counter on it"); + ability = new SimpleManaAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); + this.addAbility(ability, new WookieeMysticWatcher(ability)); + + mana = Mana.WhiteMana(1); + mana.setFlag(true); + effect = new BasicManaEffect(mana); + effect.setText("Add {W} to your mana pool. If that mana is spent on a creature spell, it enters the battlefield with a +1/+1 counter on it"); + ability = new SimpleManaAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); + this.addAbility(ability, new WookieeMysticWatcher(ability)); + } + + public WookieeMystic(final WookieeMystic card) { + super(card); + } + + @Override + public WookieeMystic copy() { + return new WookieeMystic(this); + } +} + +class WookieeMysticWatcher extends Watcher { + + private final Ability source; + private final List creatures = new ArrayList<>(); + + WookieeMysticWatcher(Ability source) { + super("HallOfTheBanditLordWatcher", WatcherScope.CARD); + this.source = source; + } + + WookieeMysticWatcher(final WookieeMysticWatcher watcher) { + super(watcher); + this.creatures.addAll(watcher.creatures); + this.source = watcher.source; + } + + @Override + public WookieeMysticWatcher copy() { + return new WookieeMysticWatcher(this); + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.MANA_PAID) { + MageObject target = game.getObject(event.getTargetId()); + if (event.getSourceId() != null + && event.getSourceId().equals(this.getSourceId()) + && target != null && target.isCreature() + && event.getFlag()) { + if (target instanceof Spell) { + this.creatures.add(((Spell) target).getCard().getId()); + } + } + } + if (event.getType() == GameEvent.EventType.COUNTERED) { + if (creatures.contains(event.getTargetId())) { + creatures.remove(event.getSourceId()); + } + } + if (event.getType() == GameEvent.EventType.ZONE_CHANGE) { + if (creatures.contains(event.getSourceId())) { + ZoneChangeEvent zEvent = (ZoneChangeEvent) event; + // spell was e.g. exiled and goes again to stack, so previous cast has not resolved. + if (zEvent.getToZone() == Zone.STACK) { + creatures.remove(event.getSourceId()); + } + } + } + if (event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD) { + if (creatures.contains(event.getSourceId())) { + Permanent creature = game.getPermanent(event.getSourceId()); + creature.addCounters(CounterType.P1P1.createInstance(), source, game); + creatures.remove(event.getSourceId()); + } + } + } + + @Override + public void reset() { + super.reset(); + creatures.clear(); + } + +} diff --git a/Mage.Sets/src/mage/cards/w/WookieeRaidleader.java b/Mage.Sets/src/mage/cards/w/WookieeRaidleader.java index 4cfe2f5790..0d1bad37e6 100644 --- a/Mage.Sets/src/mage/cards/w/WookieeRaidleader.java +++ b/Mage.Sets/src/mage/cards/w/WookieeRaidleader.java @@ -1,78 +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.cards.w; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.AttacksTriggeredAbility; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.abilities.keyword.TrampleAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.AnotherPredicate; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Styxo - */ -public class WookieeRaidleader extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another target creature"); - - static { - filter.add(new AnotherPredicate()); - } - - public WookieeRaidleader(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R/G}{R/G}"); - this.subtype.add("Wookiee"); - this.subtype.add("Warrior"); - this.power = new MageInt(3); - this.toughness = new MageInt(4); - - // Whenever Wookiee Raidleader attacks, antoher target creature gains trample until end of turn - Ability ability = new AttacksTriggeredAbility(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn), false); - ability.addTarget(new TargetCreaturePermanent(filter)); - this.addAbility(ability); - - } - - public WookieeRaidleader(final WookieeRaidleader card) { - super(card); - } - - @Override - public WookieeRaidleader copy() { - return new WookieeRaidleader(this); - } -} +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Styxo + */ +public class WookieeRaidleader extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another target creature"); + + static { + filter.add(new AnotherPredicate()); + } + + public WookieeRaidleader(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R/G}{R/G}"); + this.subtype.add(SubType.WOOKIEE); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Whenever Wookiee Raidleader attacks, antoher target creature gains trample until end of turn + Ability ability = new AttacksTriggeredAbility(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn), false); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + + } + + public WookieeRaidleader(final WookieeRaidleader card) { + super(card); + } + + @Override + public WookieeRaidleader copy() { + return new WookieeRaidleader(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WoollyLoxodon.java b/Mage.Sets/src/mage/cards/w/WoollyLoxodon.java index 512c049acb..1b0a45d74f 100644 --- a/Mage.Sets/src/mage/cards/w/WoollyLoxodon.java +++ b/Mage.Sets/src/mage/cards/w/WoollyLoxodon.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class WoollyLoxodon extends CardImpl { public WoollyLoxodon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Elephant"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELEPHANT); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(6); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/w/WoollyMammoths.java b/Mage.Sets/src/mage/cards/w/WoollyMammoths.java new file mode 100644 index 0000000000..e6e7e01424 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WoollyMammoths.java @@ -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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SuperType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author TheElk801 + */ +public class WoollyMammoths extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("snow land"); + + static { + filter.add(new SupertypePredicate(SuperType.SNOW)); + filter.add(new CardTypePredicate(CardType.LAND)); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public WoollyMammoths(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + + this.subtype.add(SubType.ELEPHANT); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Woolly Mammoths has trample as long as you control a snow land. + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ConditionalContinuousEffect( + new GainAbilitySourceEffect( + TrampleAbility.getInstance(), + Duration.WhileOnBattlefield + ), + new PermanentsOnTheBattlefieldCondition(filter), + "{this} has trample as long as you control a snow land" + ) + )); + } + + public WoollyMammoths(final WoollyMammoths card) { + super(card); + } + + @Override + public WoollyMammoths copy() { + return new WoollyMammoths(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WoollyRazorback.java b/Mage.Sets/src/mage/cards/w/WoollyRazorback.java index 8d2c7a59a0..05544ba8a7 100644 --- a/Mage.Sets/src/mage/cards/w/WoollyRazorback.java +++ b/Mage.Sets/src/mage/cards/w/WoollyRazorback.java @@ -44,6 +44,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -56,8 +57,8 @@ public class WoollyRazorback extends CardImpl { public WoollyRazorback(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); - this.subtype.add("Boar"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BOAR); + this.subtype.add(SubType.BEAST); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/w/WoollyThoctar.java b/Mage.Sets/src/mage/cards/w/WoollyThoctar.java index d46da30a3c..881e4ab2b3 100644 --- a/Mage.Sets/src/mage/cards/w/WoollyThoctar.java +++ b/Mage.Sets/src/mage/cards/w/WoollyThoctar.java @@ -33,6 +33,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class WoollyThoctar extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}{W}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(4); } diff --git a/Mage.Sets/src/mage/cards/w/Workhorse.java b/Mage.Sets/src/mage/cards/w/Workhorse.java index 7176f9ccd2..9ebc1302a0 100644 --- a/Mage.Sets/src/mage/cards/w/Workhorse.java +++ b/Mage.Sets/src/mage/cards/w/Workhorse.java @@ -37,6 +37,7 @@ import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; @@ -48,7 +49,7 @@ public class Workhorse extends CardImpl { public Workhorse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); - this.subtype.add("Horse"); + this.subtype.add(SubType.HORSE); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/w/WorkshopAssistant.java b/Mage.Sets/src/mage/cards/w/WorkshopAssistant.java index 86baf17704..14414b6741 100644 --- a/Mage.Sets/src/mage/cards/w/WorkshopAssistant.java +++ b/Mage.Sets/src/mage/cards/w/WorkshopAssistant.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterArtifactCard; import mage.filter.predicate.mageobject.AnotherCardPredicate; import mage.target.common.TargetCardInYourGraveyard; @@ -54,7 +55,7 @@ public class WorkshopAssistant extends CardImpl { public WorkshopAssistant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Construct"); + this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WorldBreaker.java b/Mage.Sets/src/mage/cards/w/WorldBreaker.java index 123c14c71d..ad439c20fe 100644 --- a/Mage.Sets/src/mage/cards/w/WorldBreaker.java +++ b/Mage.Sets/src/mage/cards/w/WorldBreaker.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledLandPermanent; @@ -66,7 +67,7 @@ public class WorldBreaker extends CardImpl { public WorldBreaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}"); - this.subtype.add("Eldrazi"); + this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(5); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/w/WorldQueller.java b/Mage.Sets/src/mage/cards/w/WorldQueller.java index ede1c4738b..9b52e7df2e 100644 --- a/Mage.Sets/src/mage/cards/w/WorldQueller.java +++ b/Mage.Sets/src/mage/cards/w/WorldQueller.java @@ -37,6 +37,7 @@ import mage.cards.CardSetInfo; import mage.choices.Choice; import mage.choices.ChoiceImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.filter.common.FilterControlledPermanent; @@ -57,7 +58,7 @@ public class WorldQueller extends CardImpl { public WorldQueller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.AVATAR); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/Worldfire.java b/Mage.Sets/src/mage/cards/w/Worldfire.java index c56ac04a6a..40a0c987c2 100644 --- a/Mage.Sets/src/mage/cards/w/Worldfire.java +++ b/Mage.Sets/src/mage/cards/w/Worldfire.java @@ -47,8 +47,7 @@ import mage.players.Player; public class Worldfire extends CardImpl { public Worldfire(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{6}{R}{R}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{6}{R}{R}{R}"); // Exile all permanents. Exile all cards from all hands and graveyards. Each player's life total becomes 1. this.getSpellAbility().addEffect(new WorldfireEffect()); @@ -65,9 +64,9 @@ public class Worldfire extends CardImpl { } class WorldfireEffect extends OneShotEffect { - + private static FilterPermanent filter = new FilterPermanent(); - + public WorldfireEffect() { super(Outcome.Detriment); staticText = "Exile all permanents. Exile all cards from all hands and graveyards. Each player's life total becomes 1"; @@ -85,7 +84,7 @@ class WorldfireEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { - permanent.moveToExile(id, "all permanents", id, game); + permanent.moveToExile(null, "", source.getSourceId(), game); } for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { Player player = game.getPlayer(playerId); diff --git a/Mage.Sets/src/mage/cards/w/WorldgorgerDragon.java b/Mage.Sets/src/mage/cards/w/WorldgorgerDragon.java index c83eec427a..6a73cf7124 100644 --- a/Mage.Sets/src/mage/cards/w/WorldgorgerDragon.java +++ b/Mage.Sets/src/mage/cards/w/WorldgorgerDragon.java @@ -42,6 +42,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -62,8 +63,8 @@ public class WorldgorgerDragon extends CardImpl { public WorldgorgerDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}{R}"); - this.subtype.add("Nightmare"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.NIGHTMARE); + this.subtype.add(SubType.DRAGON); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/w/WorldheartPhoenix.java b/Mage.Sets/src/mage/cards/w/WorldheartPhoenix.java index 7d65b64cee..3ab8444db9 100644 --- a/Mage.Sets/src/mage/cards/w/WorldheartPhoenix.java +++ b/Mage.Sets/src/mage/cards/w/WorldheartPhoenix.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AsThoughEffectType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class WorldheartPhoenix extends CardImpl { public WorldheartPhoenix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Phoenix"); + this.subtype.add(SubType.PHOENIX); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/Worldslayer.java b/Mage.Sets/src/mage/cards/w/Worldslayer.java index 8a71eee020..2c74e45ece 100644 --- a/Mage.Sets/src/mage/cards/w/Worldslayer.java +++ b/Mage.Sets/src/mage/cards/w/Worldslayer.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -54,7 +55,7 @@ public class Worldslayer extends CardImpl { public Worldslayer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{5}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Whenever equipped creature deals combat damage to a player, destroy all permanents other than Worldslayer. this.addAbility(new WorldslayerTriggeredAbility()); diff --git a/Mage.Sets/src/mage/cards/w/WorldspineWurm.java b/Mage.Sets/src/mage/cards/w/WorldspineWurm.java index bb7ed36946..0758e9b328 100644 --- a/Mage.Sets/src/mage/cards/w/WorldspineWurm.java +++ b/Mage.Sets/src/mage/cards/w/WorldspineWurm.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.WurmToken2; /** @@ -47,7 +48,7 @@ public class WorldspineWurm extends CardImpl { public WorldspineWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{8}{G}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(15); this.toughness = new MageInt(15); diff --git a/Mage.Sets/src/mage/cards/w/WormfangDrake.java b/Mage.Sets/src/mage/cards/w/WormfangDrake.java index 36cc5a1bbf..d225ab2adc 100644 --- a/Mage.Sets/src/mage/cards/w/WormfangDrake.java +++ b/Mage.Sets/src/mage/cards/w/WormfangDrake.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -59,8 +60,8 @@ public class WormfangDrake extends CardImpl { public WormfangDrake(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Nightmare"); - this.subtype.add("Drake"); + this.subtype.add(SubType.NIGHTMARE); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WormfangManta.java b/Mage.Sets/src/mage/cards/w/WormfangManta.java new file mode 100644 index 0000000000..f0ea8b752d --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WormfangManta.java @@ -0,0 +1,72 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.effects.common.turn.AddExtraTurnControllerEffect; +import mage.abilities.effects.common.turn.SkipNextTurnSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class WormfangManta extends CardImpl { + + public WormfangManta(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}"); + this.subtype.add(SubType.NIGHTMARE); + this.subtype.add(SubType.FISH); + this.subtype.add(SubType.BEAST); + this.power = new MageInt(6); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // When Wormfang Manta enters the battlefield, you skip your next turn. + this.addAbility(new EntersBattlefieldTriggeredAbility(new SkipNextTurnSourceEffect())); + // When Wormfang Manta leaves the battlefield, you take an extra turn after this one. + this.addAbility(new LeavesBattlefieldTriggeredAbility(new AddExtraTurnControllerEffect(), false)); + } + + public WormfangManta(final WormfangManta card) { + super(card); + } + + @Override + public WormfangManta copy() { + return new WormfangManta(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WormwoodDryad.java b/Mage.Sets/src/mage/cards/w/WormwoodDryad.java index 90daeda73f..3751876afd 100644 --- a/Mage.Sets/src/mage/cards/w/WormwoodDryad.java +++ b/Mage.Sets/src/mage/cards/w/WormwoodDryad.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -49,21 +50,21 @@ import mage.constants.Zone; public class WormwoodDryad extends CardImpl { public WormwoodDryad(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Dryad"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(3); this.toughness = new MageInt(1); // {G}: Wormwood Dryad gains forestwalk until end of turn and deals 1 damage to you. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(new ForestwalkAbility(false), Duration.EndOfTurn), new ManaCostsImpl("{G}")); - ability.addEffect(new DamageControllerEffect(1)); + ability.addEffect(new DamageControllerEffect(1).setText("and deals 1 damage to you")); this.addAbility(ability); // {B}: Wormwood Dryad gains swampwalk until end of turn and deals 1 damage to you. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(new SwampwalkAbility(false), Duration.EndOfTurn), new ManaCostsImpl("{B}")); - ability.addEffect(new DamageControllerEffect(1)); + ability.addEffect(new DamageControllerEffect(1).setText("and deals 1 damage to you")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WormwoodTreefolk.java b/Mage.Sets/src/mage/cards/w/WormwoodTreefolk.java index 6b922af325..09ea9d11fe 100644 --- a/Mage.Sets/src/mage/cards/w/WormwoodTreefolk.java +++ b/Mage.Sets/src/mage/cards/w/WormwoodTreefolk.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.SwampwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class WormwoodTreefolk extends CardImpl { public WormwoodTreefolk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WorryBeads.java b/Mage.Sets/src/mage/cards/w/WorryBeads.java new file mode 100644 index 0000000000..6966036f9b --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WorryBeads.java @@ -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.cards.w; + +import java.util.UUID; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class WorryBeads extends CardImpl { + + public WorryBeads(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + // At the beginning of each player's upkeep, that player puts the top card of his or her library into his or her graveyard. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, + new PutLibraryIntoGraveTargetEffect(1).setText("that player puts the top card of his or her library into his or her graveyard"), + TargetController.ANY, false, true)); + } + + public WorryBeads(final WorryBeads card) { + super(card); + } + + @Override + public WorryBeads copy() { + return new WorryBeads(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WortBoggartAuntie.java b/Mage.Sets/src/mage/cards/w/WortBoggartAuntie.java index a5d3f70235..d87bbeb15c 100644 --- a/Mage.Sets/src/mage/cards/w/WortBoggartAuntie.java +++ b/Mage.Sets/src/mage/cards/w/WortBoggartAuntie.java @@ -58,8 +58,8 @@ public class WortBoggartAuntie extends CardImpl { public WortBoggartAuntie(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WortTheRaidmother.java b/Mage.Sets/src/mage/cards/w/WortTheRaidmother.java index 2fe89eab31..2f19c5a797 100644 --- a/Mage.Sets/src/mage/cards/w/WortTheRaidmother.java +++ b/Mage.Sets/src/mage/cards/w/WortTheRaidmother.java @@ -56,8 +56,8 @@ public class WortTheRaidmother extends CardImpl { public WortTheRaidmother(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R/G}{R/G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WreathofGeists.java b/Mage.Sets/src/mage/cards/w/WreathofGeists.java index 14a185efc6..a31bb8b0c1 100644 --- a/Mage.Sets/src/mage/cards/w/WreathofGeists.java +++ b/Mage.Sets/src/mage/cards/w/WreathofGeists.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -52,7 +53,7 @@ public class WreathofGeists extends CardImpl { public WreathofGeists(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/w/WreckingOgre.java b/Mage.Sets/src/mage/cards/w/WreckingOgre.java index ff81800a68..09bbe354ed 100644 --- a/Mage.Sets/src/mage/cards/w/WreckingOgre.java +++ b/Mage.Sets/src/mage/cards/w/WreckingOgre.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -47,8 +48,8 @@ public class WreckingOgre extends CardImpl { public WreckingOgre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); - this.subtype.add("Ogre"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WrensRunPackmaster.java b/Mage.Sets/src/mage/cards/w/WrensRunPackmaster.java index 15a9747e4d..7e5aafa941 100644 --- a/Mage.Sets/src/mage/cards/w/WrensRunPackmaster.java +++ b/Mage.Sets/src/mage/cards/w/WrensRunPackmaster.java @@ -59,8 +59,8 @@ public class WrensRunPackmaster extends CardImpl { public WrensRunPackmaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/w/WrensRunVanquisher.java b/Mage.Sets/src/mage/cards/w/WrensRunVanquisher.java index d2536be5df..a5d876a41e 100644 --- a/Mage.Sets/src/mage/cards/w/WrensRunVanquisher.java +++ b/Mage.Sets/src/mage/cards/w/WrensRunVanquisher.java @@ -54,8 +54,8 @@ public class WrensRunVanquisher extends CardImpl { public WrensRunVanquisher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WretchedAnurid.java b/Mage.Sets/src/mage/cards/w/WretchedAnurid.java index e6269a6800..a761f0fbb5 100644 --- a/Mage.Sets/src/mage/cards/w/WretchedAnurid.java +++ b/Mage.Sets/src/mage/cards/w/WretchedAnurid.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -52,9 +53,9 @@ public class WretchedAnurid extends CardImpl { public WretchedAnurid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Frog"); - this.subtype.add("Beast"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.FROG); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WretchedCamel.java b/Mage.Sets/src/mage/cards/w/WretchedCamel.java index c790a744fc..0b959978a2 100644 --- a/Mage.Sets/src/mage/cards/w/WretchedCamel.java +++ b/Mage.Sets/src/mage/cards/w/WretchedCamel.java @@ -62,8 +62,8 @@ public class WretchedCamel extends CardImpl { public WretchedCamel(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Camel"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.CAMEL); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WretchedGryff.java b/Mage.Sets/src/mage/cards/w/WretchedGryff.java index abad76feae..12f73550ff 100644 --- a/Mage.Sets/src/mage/cards/w/WretchedGryff.java +++ b/Mage.Sets/src/mage/cards/w/WretchedGryff.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,8 +47,8 @@ public class WretchedGryff extends CardImpl { public WretchedGryff(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{7}"); - this.subtype.add("Eldrazi"); - this.subtype.add("Hippogriff"); + this.subtype.add(SubType.ELDRAZI); + this.subtype.add(SubType.HIPPOGRIFF); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/w/WrexialTheRisenDeep.java b/Mage.Sets/src/mage/cards/w/WrexialTheRisenDeep.java index 47d61884d0..a98bd2de1e 100644 --- a/Mage.Sets/src/mage/cards/w/WrexialTheRisenDeep.java +++ b/Mage.Sets/src/mage/cards/w/WrexialTheRisenDeep.java @@ -61,7 +61,7 @@ public class WrexialTheRisenDeep extends CardImpl { public WrexialTheRisenDeep(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Kraken"); + this.subtype.add(SubType.KRAKEN); this.power = new MageInt(5); this.toughness = new MageInt(8); diff --git a/Mage.Sets/src/mage/cards/w/WritOfPassage.java b/Mage.Sets/src/mage/cards/w/WritOfPassage.java index 13f47d7df4..4f280d0e33 100644 --- a/Mage.Sets/src/mage/cards/w/WritOfPassage.java +++ b/Mage.Sets/src/mage/cards/w/WritOfPassage.java @@ -47,6 +47,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.filter.FilterPermanent; @@ -64,7 +65,7 @@ public class WritOfPassage extends CardImpl { public WritOfPassage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/w/WuAdmiral.java b/Mage.Sets/src/mage/cards/w/WuAdmiral.java index ff6d1d4742..4978a4a92f 100644 --- a/Mage.Sets/src/mage/cards/w/WuAdmiral.java +++ b/Mage.Sets/src/mage/cards/w/WuAdmiral.java @@ -51,8 +51,8 @@ public class WuAdmiral extends CardImpl { public WuAdmiral(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WuEliteCavalry.java b/Mage.Sets/src/mage/cards/w/WuEliteCavalry.java index b88e77da86..2ec5d4cd6a 100644 --- a/Mage.Sets/src/mage/cards/w/WuEliteCavalry.java +++ b/Mage.Sets/src/mage/cards/w/WuEliteCavalry.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class WuEliteCavalry extends CardImpl { public WuEliteCavalry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WuInfantry.java b/Mage.Sets/src/mage/cards/w/WuInfantry.java index ba0087a4ac..4867124e93 100644 --- a/Mage.Sets/src/mage/cards/w/WuInfantry.java +++ b/Mage.Sets/src/mage/cards/w/WuInfantry.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,8 +42,8 @@ public class WuInfantry extends CardImpl { public WuInfantry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WuLightCavalry.java b/Mage.Sets/src/mage/cards/w/WuLightCavalry.java index 56e1a41854..976ff8a259 100644 --- a/Mage.Sets/src/mage/cards/w/WuLightCavalry.java +++ b/Mage.Sets/src/mage/cards/w/WuLightCavalry.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class WuLightCavalry extends CardImpl { public WuLightCavalry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WuLongbowman.java b/Mage.Sets/src/mage/cards/w/WuLongbowman.java index 30ab1a12be..8cec137c8a 100644 --- a/Mage.Sets/src/mage/cards/w/WuLongbowman.java +++ b/Mage.Sets/src/mage/cards/w/WuLongbowman.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -48,9 +49,9 @@ public class WuLongbowman extends CardImpl { public WuLongbowman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Archer"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WuScout.java b/Mage.Sets/src/mage/cards/w/WuScout.java index cdd00d4d1e..1889be7a59 100644 --- a/Mage.Sets/src/mage/cards/w/WuScout.java +++ b/Mage.Sets/src/mage/cards/w/WuScout.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetOpponent; /** @@ -47,9 +48,9 @@ public class WuScout extends CardImpl { public WuScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Scout"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WuSpy.java b/Mage.Sets/src/mage/cards/w/WuSpy.java index 5c7ae22755..3b86994d12 100644 --- a/Mage.Sets/src/mage/cards/w/WuSpy.java +++ b/Mage.Sets/src/mage/cards/w/WuSpy.java @@ -38,6 +38,7 @@ import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -55,9 +56,9 @@ public class WuSpy extends CardImpl { public WuSpy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/w/WuWarship.java b/Mage.Sets/src/mage/cards/w/WuWarship.java index b7657a87c3..bb75fe6411 100644 --- a/Mage.Sets/src/mage/cards/w/WuWarship.java +++ b/Mage.Sets/src/mage/cards/w/WuWarship.java @@ -46,8 +46,8 @@ public class WuWarship extends CardImpl { public WuWarship(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WurmcoilEngine.java b/Mage.Sets/src/mage/cards/w/WurmcoilEngine.java index 0bb96afffa..8a5d104b8e 100644 --- a/Mage.Sets/src/mage/cards/w/WurmcoilEngine.java +++ b/Mage.Sets/src/mage/cards/w/WurmcoilEngine.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.Wurm1Token; import mage.game.permanent.token.Wurm2Token; @@ -48,7 +49,7 @@ public class WurmcoilEngine extends CardImpl { public WurmcoilEngine(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/w/WurmskinForger.java b/Mage.Sets/src/mage/cards/w/WurmskinForger.java index 37551ac6ad..415848c959 100644 --- a/Mage.Sets/src/mage/cards/w/WurmskinForger.java +++ b/Mage.Sets/src/mage/cards/w/WurmskinForger.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.DistributeCountersEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanentAmount; @@ -46,8 +47,8 @@ public class WurmskinForger extends CardImpl { public WurmskinForger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/w/WurmweaverCoil.java b/Mage.Sets/src/mage/cards/w/WurmweaverCoil.java index 59205cea4a..35df281afb 100644 --- a/Mage.Sets/src/mage/cards/w/WurmweaverCoil.java +++ b/Mage.Sets/src/mage/cards/w/WurmweaverCoil.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -64,7 +65,7 @@ public class WurmweaverCoil extends CardImpl { public WurmweaverCoil(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{G}{G}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); TargetPermanent auraTarget = new TargetCreaturePermanent(filter); this.getSpellAbility().addTarget(auraTarget); diff --git a/Mage.Sets/src/mage/cards/w/WydwenTheBitingGale.java b/Mage.Sets/src/mage/cards/w/WydwenTheBitingGale.java index ae5f4b0a4f..af01f5efa3 100644 --- a/Mage.Sets/src/mage/cards/w/WydwenTheBitingGale.java +++ b/Mage.Sets/src/mage/cards/w/WydwenTheBitingGale.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class WydwenTheBitingGale extends CardImpl { public WydwenTheBitingGale(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Faerie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/w/WyluliWolf.java b/Mage.Sets/src/mage/cards/w/WyluliWolf.java index 4426b8253d..44a561abba 100644 --- a/Mage.Sets/src/mage/cards/w/WyluliWolf.java +++ b/Mage.Sets/src/mage/cards/w/WyluliWolf.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; @@ -48,7 +49,7 @@ public class WyluliWolf extends CardImpl { public WyluliWolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/x/XWing.java b/Mage.Sets/src/mage/cards/x/XWing.java index 5524bf413b..b5d97b947d 100644 --- a/Mage.Sets/src/mage/cards/x/XWing.java +++ b/Mage.Sets/src/mage/cards/x/XWing.java @@ -1,72 +1,73 @@ -/* - * 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.cards.x; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; -import mage.abilities.keyword.SpaceflightAbility; -import mage.abilities.keyword.VigilanceAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; - -/** - * - * @author Styxo - */ -public class XWing extends CardImpl { - - public XWing(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{W}"); - this.subtype.add("Rebel"); - this.subtype.add("Starship"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // Spaceflight - this.addAbility(SpaceflightAbility.getInstance()); - - // {W}: X-Wing gains viginlance until end of turn. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{W}"))); - - } - - public XWing(final XWing card) { - super(card); - } - - @Override - public XWing copy() { - return new XWing(this); - } -} +/* + * 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.cards.x; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author Styxo + */ +public class XWing extends CardImpl { + + public XWing(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{W}"); + this.subtype.add(SubType.REBEL); + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + + // {W}: X-Wing gains viginlance until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{W}"))); + + } + + public XWing(final XWing card) { + super(card); + } + + @Override + public XWing copy() { + return new XWing(this); + } +} diff --git a/Mage.Sets/src/mage/cards/x/XantidSwarm.java b/Mage.Sets/src/mage/cards/x/XantidSwarm.java index d4147bc615..5b64ca502d 100644 --- a/Mage.Sets/src/mage/cards/x/XantidSwarm.java +++ b/Mage.Sets/src/mage/cards/x/XantidSwarm.java @@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class XantidSwarm extends CardImpl { public XantidSwarm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/x/XathridDemon.java b/Mage.Sets/src/mage/cards/x/XathridDemon.java index 02499500c9..c74a285a07 100644 --- a/Mage.Sets/src/mage/cards/x/XathridDemon.java +++ b/Mage.Sets/src/mage/cards/x/XathridDemon.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -57,7 +58,7 @@ public class XathridDemon extends CardImpl { public XathridDemon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(7); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/x/XathridGorgon.java b/Mage.Sets/src/mage/cards/x/XathridGorgon.java index 8073fa7469..df29417c95 100644 --- a/Mage.Sets/src/mage/cards/x/XathridGorgon.java +++ b/Mage.Sets/src/mage/cards/x/XathridGorgon.java @@ -45,6 +45,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; @@ -60,7 +61,7 @@ public class XathridGorgon extends CardImpl { public XathridGorgon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); - this.subtype.add("Gorgon"); + this.subtype.add(SubType.GORGON); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/x/XathridNecromancer.java b/Mage.Sets/src/mage/cards/x/XathridNecromancer.java index 83d82c5eca..0141bc2719 100644 --- a/Mage.Sets/src/mage/cards/x/XathridNecromancer.java +++ b/Mage.Sets/src/mage/cards/x/XathridNecromancer.java @@ -58,8 +58,8 @@ public class XathridNecromancer extends CardImpl { public XathridNecromancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/x/XathridSlyblade.java b/Mage.Sets/src/mage/cards/x/XathridSlyblade.java index 853ecfe6de..763f30cd87 100644 --- a/Mage.Sets/src/mage/cards/x/XathridSlyblade.java +++ b/Mage.Sets/src/mage/cards/x/XathridSlyblade.java @@ -41,6 +41,7 @@ import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class XathridSlyblade extends CardImpl { public XathridSlyblade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Assassin"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/x/XenagosGodOfRevels.java b/Mage.Sets/src/mage/cards/x/XenagosGodOfRevels.java index c68f0525cf..f6202b07e0 100644 --- a/Mage.Sets/src/mage/cards/x/XenagosGodOfRevels.java +++ b/Mage.Sets/src/mage/cards/x/XenagosGodOfRevels.java @@ -64,7 +64,7 @@ public class XenagosGodOfRevels extends CardImpl { public XenagosGodOfRevels(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("God"); + this.subtype.add(SubType.GOD); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/x/XenagosTheReveler.java b/Mage.Sets/src/mage/cards/x/XenagosTheReveler.java index a9ff1ca1dd..aa0367a1f1 100644 --- a/Mage.Sets/src/mage/cards/x/XenagosTheReveler.java +++ b/Mage.Sets/src/mage/cards/x/XenagosTheReveler.java @@ -43,6 +43,7 @@ import mage.cards.CardsImpl; import mage.choices.Choice; import mage.choices.ChoiceImpl; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -64,7 +65,7 @@ public class XenagosTheReveler extends CardImpl { public XenagosTheReveler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{R}{G}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Xenagos"); + this.subtype.add(SubType.XENAGOS); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/x/XenicPoltergeist.java b/Mage.Sets/src/mage/cards/x/XenicPoltergeist.java index a2d7ed67f7..c17170e71d 100644 --- a/Mage.Sets/src/mage/cards/x/XenicPoltergeist.java +++ b/Mage.Sets/src/mage/cards/x/XenicPoltergeist.java @@ -36,6 +36,7 @@ import mage.abilities.effects.ContinuousEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -63,7 +64,7 @@ public class XenicPoltergeist extends CardImpl { public XenicPoltergeist(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/x/Xenograft.java b/Mage.Sets/src/mage/cards/x/Xenograft.java index 7014fb3001..49ca70239b 100644 --- a/Mage.Sets/src/mage/cards/x/Xenograft.java +++ b/Mage.Sets/src/mage/cards/x/Xenograft.java @@ -84,7 +84,7 @@ class XenograftAddSubtypeEffect extends ContinuousEffectImpl { if (subtype != null) { List permanents = game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), game); for (Permanent permanent : permanents) { - if (permanent != null && !permanent.getSubtype(game).contains(subtype)) { + if (permanent != null && !permanent.hasSubtype(subtype, game)) { permanent.getSubtype(game).add(subtype); } } diff --git a/Mage.Sets/src/mage/cards/x/XiahouDunTheOneEyed.java b/Mage.Sets/src/mage/cards/x/XiahouDunTheOneEyed.java index 70d287a22f..84ae28f199 100644 --- a/Mage.Sets/src/mage/cards/x/XiahouDunTheOneEyed.java +++ b/Mage.Sets/src/mage/cards/x/XiahouDunTheOneEyed.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterCard; @@ -60,8 +61,8 @@ public class XiahouDunTheOneEyed extends CardImpl { public XiahouDunTheOneEyed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/x/XiraArien.java b/Mage.Sets/src/mage/cards/x/XiraArien.java index 2d9eef2e5e..c530fe7f8f 100644 --- a/Mage.Sets/src/mage/cards/x/XiraArien.java +++ b/Mage.Sets/src/mage/cards/x/XiraArien.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.target.TargetPlayer; @@ -51,8 +52,8 @@ public class XiraArien extends CardImpl { public XiraArien(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Insect"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.INSECT); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/x/XunYuWeiAdvisor.java b/Mage.Sets/src/mage/cards/x/XunYuWeiAdvisor.java index f2c723a107..93b58a3cbe 100644 --- a/Mage.Sets/src/mage/cards/x/XunYuWeiAdvisor.java +++ b/Mage.Sets/src/mage/cards/x/XunYuWeiAdvisor.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -51,8 +52,8 @@ public class XunYuWeiAdvisor extends CardImpl { public XunYuWeiAdvisor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); this.addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Advisor"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/y/YWing.java b/Mage.Sets/src/mage/cards/y/YWing.java index 16fb13ac86..93b8a651e6 100644 --- a/Mage.Sets/src/mage/cards/y/YWing.java +++ b/Mage.Sets/src/mage/cards/y/YWing.java @@ -1,77 +1,78 @@ -/* - * 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.cards.y; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.CantBlockAbility; -import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; -import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; -import mage.abilities.effects.common.TapTargetEffect; -import mage.abilities.keyword.SpaceflightAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.target.common.TargetOpponentsCreaturePermanent; - -/** - * - * @author Styxo - */ -public class YWing extends CardImpl { - - public YWing(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{U}"); - this.subtype.add("Rebel"); - this.subtype.add("Starship"); - this.power = new MageInt(2); - this.toughness = new MageInt(3); - - // Spaceflight - this.addAbility(SpaceflightAbility.getInstance()); - - // Y-Wing can't block - this.addAbility(new CantBlockAbility()); - - // Whenever Y-Wing can't deals combat damage to a player, tap target creature an opponent controls. It doesn't untap during its controller's next untap step. - Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new TapTargetEffect("target creature an opponent controls."), false); - ability.addTarget(new TargetOpponentsCreaturePermanent()); - ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect(" It")); - this.addAbility(ability); - } - - public YWing(final YWing card) { - super(card); - } - - @Override - public YWing copy() { - return new YWing(this); - } -} +/* + * 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.cards.y; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.CantBlockAbility; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.target.common.TargetOpponentsCreaturePermanent; + +/** + * + * @author Styxo + */ +public class YWing extends CardImpl { + + public YWing(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{U}"); + this.subtype.add(SubType.REBEL); + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + + // Y-Wing can't block + this.addAbility(new CantBlockAbility()); + + // Whenever Y-Wing can't deals combat damage to a player, tap target creature an opponent controls. It doesn't untap during its controller's next untap step. + Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new TapTargetEffect("target creature an opponent controls."), false); + ability.addTarget(new TargetOpponentsCreaturePermanent()); + ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect(" It")); + this.addAbility(ability); + } + + public YWing(final YWing card) { + super(card); + } + + @Override + public YWing copy() { + return new YWing(this); + } +} diff --git a/Mage.Sets/src/mage/cards/y/YahenniUndyingPartisan.java b/Mage.Sets/src/mage/cards/y/YahenniUndyingPartisan.java index bd643003b6..428f583208 100644 --- a/Mage.Sets/src/mage/cards/y/YahenniUndyingPartisan.java +++ b/Mage.Sets/src/mage/cards/y/YahenniUndyingPartisan.java @@ -39,6 +39,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -57,8 +58,8 @@ public class YahenniUndyingPartisan extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Aetherborn"); - this.subtype.add("Vampire"); + this.subtype.add(SubType.AETHERBORN); + this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/y/YasovaDragonclaw.java b/Mage.Sets/src/mage/cards/y/YasovaDragonclaw.java index 348de0cc74..3fcc58af8d 100644 --- a/Mage.Sets/src/mage/cards/y/YasovaDragonclaw.java +++ b/Mage.Sets/src/mage/cards/y/YasovaDragonclaw.java @@ -42,6 +42,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.TargetController; @@ -67,10 +68,10 @@ public class YasovaDragonclaw extends CardImpl { } public YasovaDragonclaw(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(2); @@ -82,7 +83,7 @@ public class YasovaDragonclaw extends CardImpl { effect2.setText(", untap that creature"); effect.addEffect(effect2); effect.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn, ", and it gains haste until end of turn")); - Ability ability = new BeginningOfCombatTriggeredAbility(effect, TargetController.YOU, false); + Ability ability = new BeginningOfCombatTriggeredAbility(effect, TargetController.YOU, false); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); } @@ -101,7 +102,7 @@ class YasovaDragonclawPowerLessThanSourcePredicate implements ObjectSourcePlayer @Override public boolean apply(ObjectSourcePlayer input, Game game) { - Permanent sourcePermanent = game.getPermanent(input.getSourceId()); + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(input.getSourceId()); return sourcePermanent != null && input.getObject().getPower().getValue() < sourcePermanent.getPower().getValue(); } diff --git a/Mage.Sets/src/mage/cards/y/YavimayaAncients.java b/Mage.Sets/src/mage/cards/y/YavimayaAncients.java index 09c4c83366..6814240378 100644 --- a/Mage.Sets/src/mage/cards/y/YavimayaAncients.java +++ b/Mage.Sets/src/mage/cards/y/YavimayaAncients.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -46,7 +47,7 @@ public class YavimayaAncients extends CardImpl { public YavimayaAncients(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(2); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/y/YavimayaAnts.java b/Mage.Sets/src/mage/cards/y/YavimayaAnts.java index 7d325fcf95..81dbf762ca 100644 --- a/Mage.Sets/src/mage/cards/y/YavimayaAnts.java +++ b/Mage.Sets/src/mage/cards/y/YavimayaAnts.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class YavimayaAnts extends CardImpl { public YavimayaAnts(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(5); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/y/YavimayaBarbarian.java b/Mage.Sets/src/mage/cards/y/YavimayaBarbarian.java index 508c0d17c6..9d7c2560a6 100644 --- a/Mage.Sets/src/mage/cards/y/YavimayaBarbarian.java +++ b/Mage.Sets/src/mage/cards/y/YavimayaBarbarian.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class YavimayaBarbarian extends CardImpl { public YavimayaBarbarian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Barbarian"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.BARBARIAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/y/YavimayaDryad.java b/Mage.Sets/src/mage/cards/y/YavimayaDryad.java index cc426f94f6..e1f25b2298 100644 --- a/Mage.Sets/src/mage/cards/y/YavimayaDryad.java +++ b/Mage.Sets/src/mage/cards/y/YavimayaDryad.java @@ -61,7 +61,7 @@ public class YavimayaDryad extends CardImpl { public YavimayaDryad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Dryad"); + this.subtype.add(SubType.DRYAD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/y/YavimayaElder.java b/Mage.Sets/src/mage/cards/y/YavimayaElder.java index 6ee9b4c864..923032b126 100644 --- a/Mage.Sets/src/mage/cards/y/YavimayaElder.java +++ b/Mage.Sets/src/mage/cards/y/YavimayaElder.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; @@ -52,8 +53,8 @@ public class YavimayaElder extends CardImpl { public YavimayaElder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/y/YavimayaEnchantress.java b/Mage.Sets/src/mage/cards/y/YavimayaEnchantress.java index b27bf9c0b1..6595aea294 100644 --- a/Mage.Sets/src/mage/cards/y/YavimayaEnchantress.java +++ b/Mage.Sets/src/mage/cards/y/YavimayaEnchantress.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -54,8 +55,8 @@ public class YavimayaEnchantress extends CardImpl { public YavimayaEnchantress(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Human"); - this.subtype.add("Druid"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/y/YavimayaGnats.java b/Mage.Sets/src/mage/cards/y/YavimayaGnats.java index 3c6dcb405d..cae880d2a6 100644 --- a/Mage.Sets/src/mage/cards/y/YavimayaGnats.java +++ b/Mage.Sets/src/mage/cards/y/YavimayaGnats.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -46,7 +47,7 @@ public class YavimayaGnats extends CardImpl { public YavimayaGnats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/y/YavimayaGranger.java b/Mage.Sets/src/mage/cards/y/YavimayaGranger.java index ebd5fba8b8..466d8a128f 100644 --- a/Mage.Sets/src/mage/cards/y/YavimayaGranger.java +++ b/Mage.Sets/src/mage/cards/y/YavimayaGranger.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; @@ -48,7 +49,7 @@ public class YavimayaGranger extends CardImpl { public YavimayaGranger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); + this.subtype.add(SubType.ELF); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/y/YavimayaKavu.java b/Mage.Sets/src/mage/cards/y/YavimayaKavu.java index 65d38f77d3..d885a375fa 100644 --- a/Mage.Sets/src/mage/cards/y/YavimayaKavu.java +++ b/Mage.Sets/src/mage/cards/y/YavimayaKavu.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.SetToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -58,7 +59,7 @@ public class YavimayaKavu extends CardImpl { public YavimayaKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}"); - this.subtype.add("Kavu"); + this.subtype.add(SubType.KAVU); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage.Sets/src/mage/cards/y/YavimayaScion.java b/Mage.Sets/src/mage/cards/y/YavimayaScion.java index c1be429579..4a8d046dee 100644 --- a/Mage.Sets/src/mage/cards/y/YavimayaScion.java +++ b/Mage.Sets/src/mage/cards/y/YavimayaScion.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterArtifactCard; /** @@ -43,7 +44,7 @@ public class YavimayaScion extends CardImpl { public YavimayaScion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/y/YavimayaWurm.java b/Mage.Sets/src/mage/cards/y/YavimayaWurm.java index 147fbe1305..aac7e57eef 100644 --- a/Mage.Sets/src/mage/cards/y/YavimayaWurm.java +++ b/Mage.Sets/src/mage/cards/y/YavimayaWurm.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class YavimayaWurm extends CardImpl { public YavimayaWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); - this.subtype.add("Wurm"); + this.subtype.add(SubType.WURM); this.power = new MageInt(6); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/y/YavimayasEmbrace.java b/Mage.Sets/src/mage/cards/y/YavimayasEmbrace.java index 8eeca5683a..a868d226b6 100644 --- a/Mage.Sets/src/mage/cards/y/YavimayasEmbrace.java +++ b/Mage.Sets/src/mage/cards/y/YavimayasEmbrace.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; @@ -56,7 +57,7 @@ public class YavimayasEmbrace extends CardImpl { public YavimayasEmbrace(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{5}{G}{U}{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/y/YawgmothDemon.java b/Mage.Sets/src/mage/cards/y/YawgmothDemon.java index 17e063ff4b..b95f7b21ae 100644 --- a/Mage.Sets/src/mage/cards/y/YawgmothDemon.java +++ b/Mage.Sets/src/mage/cards/y/YawgmothDemon.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -54,7 +55,7 @@ public class YawgmothDemon extends CardImpl { public YawgmothDemon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); - this.subtype.add("Demon"); + this.subtype.add(SubType.DEMON); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/y/YdwenEfreet.java b/Mage.Sets/src/mage/cards/y/YdwenEfreet.java index f234cf40fc..93f9d4ba91 100644 --- a/Mage.Sets/src/mage/cards/y/YdwenEfreet.java +++ b/Mage.Sets/src/mage/cards/y/YdwenEfreet.java @@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -49,7 +50,7 @@ public class YdwenEfreet extends CardImpl { public YdwenEfreet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{R}{R}"); - this.subtype.add("Efreet"); + this.subtype.add(SubType.EFREET); this.power = new MageInt(3); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/y/YellowScarvesCavalry.java b/Mage.Sets/src/mage/cards/y/YellowScarvesCavalry.java index 4dedfd6255..ab0ab72fd1 100644 --- a/Mage.Sets/src/mage/cards/y/YellowScarvesCavalry.java +++ b/Mage.Sets/src/mage/cards/y/YellowScarvesCavalry.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class YellowScarvesCavalry extends CardImpl { public YellowScarvesCavalry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/y/YellowScarvesGeneral.java b/Mage.Sets/src/mage/cards/y/YellowScarvesGeneral.java index 1b953cafa9..de092cdd72 100644 --- a/Mage.Sets/src/mage/cards/y/YellowScarvesGeneral.java +++ b/Mage.Sets/src/mage/cards/y/YellowScarvesGeneral.java @@ -34,6 +34,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class YellowScarvesGeneral extends CardImpl { public YellowScarvesGeneral(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/y/YellowScarvesTroops.java b/Mage.Sets/src/mage/cards/y/YellowScarvesTroops.java index 2dfd0934bf..f3de95452b 100644 --- a/Mage.Sets/src/mage/cards/y/YellowScarvesTroops.java +++ b/Mage.Sets/src/mage/cards/y/YellowScarvesTroops.java @@ -33,6 +33,7 @@ import mage.abilities.common.CantBlockAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class YellowScarvesTroops extends CardImpl { public YellowScarvesTroops(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/y/YevaNaturesHerald.java b/Mage.Sets/src/mage/cards/y/YevaNaturesHerald.java index 9cf9fbe536..4c5e1d7336 100644 --- a/Mage.Sets/src/mage/cards/y/YevaNaturesHerald.java +++ b/Mage.Sets/src/mage/cards/y/YevaNaturesHerald.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; @@ -56,8 +57,8 @@ public class YevaNaturesHerald extends CardImpl { public YevaNaturesHerald(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/y/YevasForcemage.java b/Mage.Sets/src/mage/cards/y/YevasForcemage.java index e56b76c981..dc70b9c688 100644 --- a/Mage.Sets/src/mage/cards/y/YevasForcemage.java +++ b/Mage.Sets/src/mage/cards/y/YevasForcemage.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -46,8 +47,8 @@ public class YevasForcemage extends CardImpl { public YevasForcemage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); - this.subtype.add("Elf"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/y/YewSpirit.java b/Mage.Sets/src/mage/cards/y/YewSpirit.java index c2cc3906a6..a0faad57fc 100644 --- a/Mage.Sets/src/mage/cards/y/YewSpirit.java +++ b/Mage.Sets/src/mage/cards/y/YewSpirit.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,8 +48,8 @@ public class YewSpirit extends CardImpl { public YewSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Spirit"); - this.subtype.add("Treefolk"); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/y/YidrisMaelstromWielder.java b/Mage.Sets/src/mage/cards/y/YidrisMaelstromWielder.java index 15de4a1c52..12973e228d 100644 --- a/Mage.Sets/src/mage/cards/y/YidrisMaelstromWielder.java +++ b/Mage.Sets/src/mage/cards/y/YidrisMaelstromWielder.java @@ -52,8 +52,8 @@ public class YidrisMaelstromWielder extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Ogre"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(5); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/y/YisanTheWandererBard.java b/Mage.Sets/src/mage/cards/y/YisanTheWandererBard.java index 573fe80228..718561d6e5 100644 --- a/Mage.Sets/src/mage/cards/y/YisanTheWandererBard.java +++ b/Mage.Sets/src/mage/cards/y/YisanTheWandererBard.java @@ -39,6 +39,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.SuperType; @@ -61,8 +62,8 @@ public class YisanTheWandererBard extends CardImpl { public YisanTheWandererBard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/y/YixlidJailer.java b/Mage.Sets/src/mage/cards/y/YixlidJailer.java index 11f5cc08ae..f7512a5b0c 100644 --- a/Mage.Sets/src/mage/cards/y/YixlidJailer.java +++ b/Mage.Sets/src/mage/cards/y/YixlidJailer.java @@ -48,8 +48,8 @@ public class YixlidJailer extends CardImpl { public YixlidJailer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/y/YodaJediMaster.java b/Mage.Sets/src/mage/cards/y/YodaJediMaster.java index ec26413750..fed889a31d 100644 --- a/Mage.Sets/src/mage/cards/y/YodaJediMaster.java +++ b/Mage.Sets/src/mage/cards/y/YodaJediMaster.java @@ -41,6 +41,7 @@ import mage.abilities.effects.common.ReturnToBattlefieldUnderYourControlTargetEf import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; @@ -69,7 +70,7 @@ public class YodaJediMaster extends CardImpl { public YodaJediMaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{1}{G}{U}"); - this.subtype.add("Yoda"); + this.subtype.add(SubType.YODA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); diff --git a/Mage.Sets/src/mage/cards/y/YokeOfTheDamned.java b/Mage.Sets/src/mage/cards/y/YokeOfTheDamned.java index 3702359306..470ac80554 100644 --- a/Mage.Sets/src/mage/cards/y/YokeOfTheDamned.java +++ b/Mage.Sets/src/mage/cards/y/YokeOfTheDamned.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.filter.StaticFilters; import mage.target.TargetPermanent; @@ -50,7 +51,7 @@ public class YokeOfTheDamned extends CardImpl { public YokeOfTheDamned(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/y/YokedOx.java b/Mage.Sets/src/mage/cards/y/YokedOx.java index f772d1c084..a2b87b6b02 100644 --- a/Mage.Sets/src/mage/cards/y/YokedOx.java +++ b/Mage.Sets/src/mage/cards/y/YokedOx.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class YokedOx extends CardImpl { public YokedOx(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); - this.subtype.add("Ox"); + this.subtype.add(SubType.OX); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/y/YokedPlowbeast.java b/Mage.Sets/src/mage/cards/y/YokedPlowbeast.java index 7d9b8875c4..5f7d6e653e 100644 --- a/Mage.Sets/src/mage/cards/y/YokedPlowbeast.java +++ b/Mage.Sets/src/mage/cards/y/YokedPlowbeast.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class YokedPlowbeast extends CardImpl { public YokedPlowbeast (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/y/YomijiWhoBarsTheWay.java b/Mage.Sets/src/mage/cards/y/YomijiWhoBarsTheWay.java index f90c825fa9..662a8f4ff6 100644 --- a/Mage.Sets/src/mage/cards/y/YomijiWhoBarsTheWay.java +++ b/Mage.Sets/src/mage/cards/y/YomijiWhoBarsTheWay.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SupertypePredicate; @@ -49,7 +50,7 @@ public class YomijiWhoBarsTheWay extends CardImpl { public YomijiWhoBarsTheWay(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/y/YoreTillerNephilim.java b/Mage.Sets/src/mage/cards/y/YoreTillerNephilim.java index 9c76eb028b..110fb4f7e9 100644 --- a/Mage.Sets/src/mage/cards/y/YoreTillerNephilim.java +++ b/Mage.Sets/src/mage/cards/y/YoreTillerNephilim.java @@ -36,6 +36,7 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; @@ -52,7 +53,7 @@ public class YoreTillerNephilim extends CardImpl { public YoreTillerNephilim(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}{B}{R}"); - this.subtype.add("Nephilim"); + this.subtype.add(SubType.NEPHILIM); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/y/YoseiTheMorningStar.java b/Mage.Sets/src/mage/cards/y/YoseiTheMorningStar.java index 9f6cd183bc..bbc1cd0fb0 100644 --- a/Mage.Sets/src/mage/cards/y/YoseiTheMorningStar.java +++ b/Mage.Sets/src/mage/cards/y/YoseiTheMorningStar.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.filter.FilterPermanent; @@ -59,8 +60,8 @@ public class YoseiTheMorningStar extends CardImpl { public YoseiTheMorningStar(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Dragon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DRAGON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/y/YotianSoldier.java b/Mage.Sets/src/mage/cards/y/YotianSoldier.java index c656481151..9de7737d28 100644 --- a/Mage.Sets/src/mage/cards/y/YotianSoldier.java +++ b/Mage.Sets/src/mage/cards/y/YotianSoldier.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class YotianSoldier extends CardImpl { public YotianSoldier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/y/YoungPyromancer.java b/Mage.Sets/src/mage/cards/y/YoungPyromancer.java index 7dfecd13c4..62a07866f1 100644 --- a/Mage.Sets/src/mage/cards/y/YoungPyromancer.java +++ b/Mage.Sets/src/mage/cards/y/YoungPyromancer.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.game.permanent.token.YoungPyromancerElementalToken; @@ -45,8 +46,8 @@ public class YoungPyromancer extends CardImpl { public YoungPyromancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/y/YoungWeiRecruits.java b/Mage.Sets/src/mage/cards/y/YoungWeiRecruits.java index 957e87c3ed..7f6e4ba05e 100644 --- a/Mage.Sets/src/mage/cards/y/YoungWeiRecruits.java +++ b/Mage.Sets/src/mage/cards/y/YoungWeiRecruits.java @@ -33,6 +33,7 @@ import mage.abilities.common.CantBlockAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class YoungWeiRecruits extends CardImpl { public YoungWeiRecruits(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/y/YoungWolf.java b/Mage.Sets/src/mage/cards/y/YoungWolf.java index 4d225e8d0b..58f5263e9c 100644 --- a/Mage.Sets/src/mage/cards/y/YoungWolf.java +++ b/Mage.Sets/src/mage/cards/y/YoungWolf.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.UndyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class YoungWolf extends CardImpl { public YoungWolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/y/YouthfulKnight.java b/Mage.Sets/src/mage/cards/y/YouthfulKnight.java index 5dd41170ed..bdc075b743 100644 --- a/Mage.Sets/src/mage/cards/y/YouthfulKnight.java +++ b/Mage.Sets/src/mage/cards/y/YouthfulKnight.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class YouthfulKnight extends CardImpl { public YouthfulKnight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); - this.subtype.add("Human"); - this.subtype.add("Knight"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/y/YouthfulScholar.java b/Mage.Sets/src/mage/cards/y/YouthfulScholar.java index c83c8f7f6a..04ee70d3ea 100644 --- a/Mage.Sets/src/mage/cards/y/YouthfulScholar.java +++ b/Mage.Sets/src/mage/cards/y/YouthfulScholar.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,8 +44,8 @@ public class YouthfulScholar extends CardImpl { public YouthfulScholar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/y/YuanShaoTheIndecisive.java b/Mage.Sets/src/mage/cards/y/YuanShaoTheIndecisive.java index 516afd861e..f64257b25f 100644 --- a/Mage.Sets/src/mage/cards/y/YuanShaoTheIndecisive.java +++ b/Mage.Sets/src/mage/cards/y/YuanShaoTheIndecisive.java @@ -35,6 +35,7 @@ import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -48,8 +49,8 @@ public class YuanShaoTheIndecisive extends CardImpl { public YuanShaoTheIndecisive(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/y/YuanShaosInfantry.java b/Mage.Sets/src/mage/cards/y/YuanShaosInfantry.java index ae05ddbac5..3589e126fa 100644 --- a/Mage.Sets/src/mage/cards/y/YuanShaosInfantry.java +++ b/Mage.Sets/src/mage/cards/y/YuanShaosInfantry.java @@ -35,6 +35,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; /** @@ -45,8 +46,8 @@ public class YuanShaosInfantry extends CardImpl { public YuanShaosInfantry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Human"); - this.subtype.add("Soldier"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/y/YukiOnna.java b/Mage.Sets/src/mage/cards/y/YukiOnna.java index 96c4a742e9..d1257f29eb 100644 --- a/Mage.Sets/src/mage/cards/y/YukiOnna.java +++ b/Mage.Sets/src/mage/cards/y/YukiOnna.java @@ -37,6 +37,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.target.common.TargetArtifactPermanent; @@ -47,7 +48,7 @@ public class YukiOnna extends CardImpl { public YukiOnna(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/y/YukoraThePrisoner.java b/Mage.Sets/src/mage/cards/y/YukoraThePrisoner.java index bb2e60b5c3..c6cabc0697 100644 --- a/Mage.Sets/src/mage/cards/y/YukoraThePrisoner.java +++ b/Mage.Sets/src/mage/cards/y/YukoraThePrisoner.java @@ -60,8 +60,8 @@ public class YukoraThePrisoner extends CardImpl { public YukoraThePrisoner(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Demon"); - this.subtype.add("Spirit"); + this.subtype.add(SubType.DEMON); + this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/z/ZadaHedronGrinder.java b/Mage.Sets/src/mage/cards/z/ZadaHedronGrinder.java index 90ffe363c1..d4498f3f01 100644 --- a/Mage.Sets/src/mage/cards/z/ZadaHedronGrinder.java +++ b/Mage.Sets/src/mage/cards/z/ZadaHedronGrinder.java @@ -154,10 +154,7 @@ class ZadaHedronGrinderEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source)); - if (spell == null) { - spell = (Spell) game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.STACK); - } + Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source)); Player controller = game.getPlayer(source.getControllerId()); if (spell != null && controller != null) { // search the target that targets source diff --git a/Mage.Sets/src/mage/cards/z/ZadasCommando.java b/Mage.Sets/src/mage/cards/z/ZadasCommando.java index c13fcb7a1c..9834f741c6 100644 --- a/Mage.Sets/src/mage/cards/z/ZadasCommando.java +++ b/Mage.Sets/src/mage/cards/z/ZadasCommando.java @@ -64,9 +64,9 @@ public class ZadasCommando extends CardImpl { public ZadasCommando(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); this.subtype.add(SubType.GOBLIN, SubType.ARCHER, SubType.ALLY); - //this.subtype.add("Goblin"); - //this.subtype.add("Archer"); - //this.subtype.add("Ally"); + //this.subtype.add(SubType.GOBLIN); + //this.subtype.add(SubType.ARCHER); + //this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/z/ZanamDjinn.java b/Mage.Sets/src/mage/cards/z/ZanamDjinn.java index ebf6a06ed2..9db5b8e7ca 100644 --- a/Mage.Sets/src/mage/cards/z/ZanamDjinn.java +++ b/Mage.Sets/src/mage/cards/z/ZanamDjinn.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -50,7 +51,7 @@ public class ZanamDjinn extends CardImpl { public ZanamDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}"); - this.subtype.add("Djinn"); + this.subtype.add(SubType.DJINN); this.power = new MageInt(5); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/z/ZealotsEnDal.java b/Mage.Sets/src/mage/cards/z/ZealotsEnDal.java new file mode 100644 index 0000000000..ff44831c4b --- /dev/null +++ b/Mage.Sets/src/mage/cards/z/ZealotsEnDal.java @@ -0,0 +1,85 @@ +/* + * 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.cards.z; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.InvertCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author TheElk801 + */ +public class ZealotsEnDal extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent(); + + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.WHITE))); + filter.add(Predicates.not(new CardTypePredicate(CardType.LAND))); + } + + public ZealotsEnDal(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // At the beginning of your upkeep, if all nonland permanents you control are white, you gain 1 life. + this.addAbility(new ConditionalTriggeredAbility( + new BeginningOfUpkeepTriggeredAbility(new GainLifeEffect(1), TargetController.YOU, false), + new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)), + "At the beginning of your upkeep, if all nonland permanents you control are white, you gain 1 life." + )); + } + + public ZealotsEnDal(final ZealotsEnDal card) { + super(card); + } + + @Override + public ZealotsEnDal copy() { + return new ZealotsEnDal(this); + } +} diff --git a/Mage.Sets/src/mage/cards/z/ZephyrSpirit.java b/Mage.Sets/src/mage/cards/z/ZephyrSpirit.java index 1696fcde21..dc852ff723 100644 --- a/Mage.Sets/src/mage/cards/z/ZephyrSpirit.java +++ b/Mage.Sets/src/mage/cards/z/ZephyrSpirit.java @@ -51,7 +51,9 @@ public class ZephyrSpirit extends CardImpl { // When Zephyr Spirit blocks, return it to its owner's hand. this.addAbility(new BlocksTriggeredAbility( - new ReturnToHandSourceEffect(true).setText("return it to its owner's hand"), false)); + new ReturnToHandSourceEffect(true).setText("return it to its owner's hand"), + false, false, true + )); } public ZephyrSpirit(final ZephyrSpirit card) { diff --git a/Mage.Sets/src/mage/cards/z/ZombieMusher.java b/Mage.Sets/src/mage/cards/z/ZombieMusher.java new file mode 100644 index 0000000000..8a3e091f1f --- /dev/null +++ b/Mage.Sets/src/mage/cards/z/ZombieMusher.java @@ -0,0 +1,80 @@ +/* + * 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.cards.z; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.RegenerateSourceEffect; +import mage.abilities.keyword.LandwalkAbility; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.SupertypePredicate; + +/** + * + * @author TheElk801 + */ +public class ZombieMusher extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent("snow land"); + + static { + filter.add(new SupertypePredicate(SuperType.SNOW)); + } + + public ZombieMusher(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.addSuperType(SuperType.SNOW); + this.subtype.add(SubType.ZOMBIE); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Snow landwalk + this.addAbility(new LandwalkAbility(filter)); + + // {snow}: Regenerate Zombie Musher. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{S}"))); + } + + public ZombieMusher(final ZombieMusher card) { + super(card); + } + + @Override + public ZombieMusher copy() { + return new ZombieMusher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/AjaniVsNicolBolas.java b/Mage.Sets/src/mage/sets/AjaniVsNicolBolas.java index 9bd61db22d..a7dcb875cf 100644 --- a/Mage.Sets/src/mage/sets/AjaniVsNicolBolas.java +++ b/Mage.Sets/src/mage/sets/AjaniVsNicolBolas.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -37,6 +36,7 @@ import mage.constants.SetType; * @author LevelX2 */ public class AjaniVsNicolBolas extends ExpansionSet { + private static final AjaniVsNicolBolas instance = new AjaniVsNicolBolas(); public static AjaniVsNicolBolas getInstance() { @@ -128,4 +128,4 @@ public class AjaniVsNicolBolas extends ExpansionSet { cards.add(new SetCardInfo("Wild Nacatl", 4, Rarity.COMMON, mage.cards.w.WildNacatl.class)); cards.add(new SetCardInfo("Woolly Thoctar", 13, Rarity.UNCOMMON, mage.cards.w.WoollyThoctar.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/Alliances.java b/Mage.Sets/src/mage/sets/Alliances.java index 87f01b760f..6144a6e8bb 100644 --- a/Mage.Sets/src/mage/sets/Alliances.java +++ b/Mage.Sets/src/mage/sets/Alliances.java @@ -22,6 +22,7 @@ import mage.constants.Rarity; import mage.constants.SetType; public class Alliances extends ExpansionSet { + private static final Alliances instance = new Alliances(); public static Alliances getInstance() { @@ -57,6 +58,7 @@ public class Alliances extends ExpansionSet { cards.add(new SetCardInfo("Burnout", 101, Rarity.UNCOMMON, mage.cards.b.Burnout.class)); cards.add(new SetCardInfo("Carrier Pigeons", 125, Rarity.COMMON, CarrierPigeons.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Carrier Pigeons", 126, Rarity.COMMON, CarrierPigeons.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Chaos Harlequin", 102, Rarity.RARE, mage.cards.c.ChaosHarlequin.class)); cards.add(new SetCardInfo("Contagion", 4, Rarity.UNCOMMON, mage.cards.c.Contagion.class)); cards.add(new SetCardInfo("Deadly Insect", 64, Rarity.COMMON, mage.cards.d.DeadlyInsect.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Deadly Insect", 65, Rarity.COMMON, mage.cards.d.DeadlyInsect.class, NON_FULL_USE_VARIOUS)); @@ -67,6 +69,7 @@ public class Alliances extends ExpansionSet { cards.add(new SetCardInfo("Elvish Ranger", 67, Rarity.COMMON, mage.cards.e.ElvishRanger.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Elvish Ranger", 68, Rarity.COMMON, mage.cards.e.ElvishRanger.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Elvish Spirit Guide", 69, Rarity.UNCOMMON, mage.cards.e.ElvishSpiritGuide.class)); + cards.add(new SetCardInfo("Energy Arc", 190, Rarity.UNCOMMON, mage.cards.e.EnergyArc.class)); cards.add(new SetCardInfo("Enslaved Scout", 104, Rarity.COMMON, EnslavedScout.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Enslaved Scout", 105, Rarity.COMMON, EnslavedScout.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Exile", 129, Rarity.RARE, mage.cards.e.Exile.class)); @@ -78,6 +81,8 @@ public class Alliances extends ExpansionSet { cards.add(new SetCardInfo("Fevered Strength", 11, Rarity.COMMON, FeveredStrength.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Floodwater Dam", 161, Rarity.RARE, mage.cards.f.FloodwaterDam.class)); cards.add(new SetCardInfo("Force of Will", 42, Rarity.UNCOMMON, mage.cards.f.ForceOfWill.class)); + cards.add(new SetCardInfo("Foresight", 43, Rarity.COMMON, mage.cards.f.Foresight.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Foresight", 44, Rarity.COMMON, mage.cards.f.Foresight.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Gorilla Berserkers", 75, Rarity.COMMON, GorillaBerserkers.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Gorilla Berserkers", 76, Rarity.COMMON, GorillaBerserkers.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Gorilla Chieftain", 77, Rarity.COMMON, mage.cards.g.GorillaChieftain.class, NON_FULL_USE_VARIOUS)); @@ -88,6 +93,7 @@ public class Alliances extends ExpansionSet { cards.add(new SetCardInfo("Gorilla War Cry", 109, Rarity.COMMON, mage.cards.g.GorillaWarCry.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Guerrilla Tactics", 110, Rarity.COMMON, mage.cards.g.GuerrillaTactics.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Guerrilla Tactics", 111, Rarity.COMMON, mage.cards.g.GuerrillaTactics.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Hail Storm", 79, Rarity.UNCOMMON, mage.cards.h.HailStorm.class)); cards.add(new SetCardInfo("Heart of Yavimaya", 183, Rarity.RARE, mage.cards.h.HeartOfYavimaya.class)); cards.add(new SetCardInfo("Helm of Obedience", 163, Rarity.RARE, mage.cards.h.HelmOfObedience.class)); cards.add(new SetCardInfo("Inheritance", 130, Rarity.UNCOMMON, mage.cards.i.Inheritance.class)); @@ -96,7 +102,9 @@ public class Alliances extends ExpansionSet { cards.add(new SetCardInfo("Juniper Order Advocate", 132, Rarity.UNCOMMON, mage.cards.j.JuniperOrderAdvocate.class)); cards.add(new SetCardInfo("Kaysa", 80, Rarity.RARE, mage.cards.k.Kaysa.class)); cards.add(new SetCardInfo("Keeper of Tresserhorn", 14, Rarity.RARE, mage.cards.k.KeeperOfTresserhorn.class)); + cards.add(new SetCardInfo("Kjeldoran Home Guard", 135, Rarity.UNCOMMON, mage.cards.k.KjeldoranHomeGuard.class)); cards.add(new SetCardInfo("Kjeldoran Outpost", 184, Rarity.RARE, mage.cards.k.KjeldoranOutpost.class)); + cards.add(new SetCardInfo("Krovikan Plague", 16, Rarity.UNCOMMON, mage.cards.k.KrovikanPlague.class)); cards.add(new SetCardInfo("Lake of the Dead", 185, Rarity.RARE, mage.cards.l.LakeOfTheDead.class)); cards.add(new SetCardInfo("Library of Lat-Nam", 47, Rarity.RARE, mage.cards.l.LibraryOfLatNam.class)); cards.add(new SetCardInfo("Lim-Dul's High Guard", 17, Rarity.COMMON, LimDulsHighGuard.class, NON_FULL_USE_VARIOUS)); @@ -104,8 +112,18 @@ public class Alliances extends ExpansionSet { cards.add(new SetCardInfo("Lim-Dul's Paladin", 191, Rarity.UNCOMMON, mage.cards.l.LimDulsPaladin.class)); cards.add(new SetCardInfo("Lim-Dul's Vault", 192, Rarity.UNCOMMON, mage.cards.l.LimDulsVault.class)); cards.add(new SetCardInfo("Lord of Tresserhorn", 193, Rarity.RARE, mage.cards.l.LordOfTresserhorn.class)); + cards.add(new SetCardInfo("Mishra's Groundbreaker", 165, Rarity.UNCOMMON, mage.cards.m.MishrasGroundbreaker.class)); cards.add(new SetCardInfo("Mystic Compass", 166, Rarity.UNCOMMON, mage.cards.m.MysticCompass.class)); + cards.add(new SetCardInfo("Nature's Chosen", 81, Rarity.UNCOMMON, mage.cards.n.NaturesChosen.class)); + cards.add(new SetCardInfo("Nature's Wrath", 82, Rarity.RARE, mage.cards.n.NaturesWrath.class)); + cards.add(new SetCardInfo("Noble Steeds", 140, Rarity.COMMON, mage.cards.n.NobleSteeds.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Noble Steeds", 141, Rarity.COMMON, mage.cards.n.NobleSteeds.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Omen of Fire", 112, Rarity.RARE, mage.cards.o.OmenOfFire.class)); + cards.add(new SetCardInfo("Phantasmal Fiend", 20, Rarity.COMMON, mage.cards.p.PhantasmalFiend.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Phantasmal Fiend", 21, Rarity.COMMON, mage.cards.p.PhantasmalFiend.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Phelddagrif", 196, Rarity.RARE, mage.cards.p.Phelddagrif.class)); + cards.add(new SetCardInfo("Phyrexian Boon", 22, Rarity.COMMON, mage.cards.p.PhyrexianBoon.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Phyrexian Boon", 23, Rarity.COMMON, mage.cards.p.PhyrexianBoon.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Phyrexian Devourer", 167, Rarity.RARE, mage.cards.p.PhyrexianDevourer.class)); cards.add(new SetCardInfo("Phyrexian War Beast", 169, Rarity.COMMON, PhyrexianWarBeast.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Phyrexian War Beast", 170, Rarity.COMMON, PhyrexianWarBeast.class, NON_FULL_USE_VARIOUS)); @@ -116,6 +134,7 @@ public class Alliances extends ExpansionSet { cards.add(new SetCardInfo("Reprisal", 144, Rarity.COMMON, mage.cards.r.Reprisal.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Reprisal", 145, Rarity.COMMON, mage.cards.r.Reprisal.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Ritual of the Machine", 24, Rarity.RARE, mage.cards.r.RitualOfTheMachine.class)); + cards.add(new SetCardInfo("Royal Decree", 146, Rarity.RARE, mage.cards.r.RoyalDecree.class)); cards.add(new SetCardInfo("Royal Herbalist", 147, Rarity.COMMON, RoyalHerbalist.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Royal Herbalist", 148, Rarity.COMMON, RoyalHerbalist.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("School of the Unseen", 186, Rarity.UNCOMMON, mage.cards.s.SchoolOfTheUnseen.class)); @@ -126,29 +145,41 @@ public class Alliances extends ExpansionSet { cards.add(new SetCardInfo("Soldevi Adnate", 26, Rarity.COMMON, SoldeviAdnate.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Soldevi Digger", 174, Rarity.RARE, mage.cards.s.SoldeviDigger.class)); cards.add(new SetCardInfo("Soldevi Excavations", 188, Rarity.RARE, mage.cards.s.SoldeviExcavations.class)); + cards.add(new SetCardInfo("Soldevi Heretic", 49, Rarity.COMMON, mage.cards.s.SoldeviHeretic.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Soldevi Heretic", 50, Rarity.COMMON, mage.cards.s.SoldeviHeretic.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Soldevi Sage", 51, Rarity.COMMON, SoldeviSage.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Soldevi Sage", 52, Rarity.COMMON, SoldeviSage.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Soldier of Fortune", 117, Rarity.UNCOMMON, mage.cards.s.SoldierOfFortune.class)); cards.add(new SetCardInfo("Sol Grail", 173, Rarity.UNCOMMON, mage.cards.s.SolGrail.class)); + cards.add(new SetCardInfo("Stench of Decay", 27, Rarity.COMMON, mage.cards.s.StenchOfDecay.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Stench of Decay", 28, Rarity.COMMON, mage.cards.s.StenchOfDecay.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Storm Cauldron", 179, Rarity.RARE, mage.cards.s.StormCauldron.class)); cards.add(new SetCardInfo("Storm Crow", 54, Rarity.COMMON, mage.cards.s.StormCrow.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Storm Crow", 55, Rarity.COMMON, mage.cards.s.StormCrow.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Storm Shaman", 118, Rarity.COMMON, StormShaman.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Storm Shaman", 119, Rarity.UNCOMMON, StormShaman.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Surge of Strength", 197, Rarity.UNCOMMON, mage.cards.s.SurgeOfStrength.class)); cards.add(new SetCardInfo("Sustaining Spirit", 151, Rarity.RARE, mage.cards.s.SustainingSpirit.class)); cards.add(new SetCardInfo("Swamp Mosquito", 30, Rarity.COMMON, SwampMosquito.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Swamp Mosquito", 31, Rarity.COMMON, SwampMosquito.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Thawing Glaciers", 189, Rarity.RARE, mage.cards.t.ThawingGlaciers.class)); cards.add(new SetCardInfo("Thought Lash", 58, Rarity.RARE, mage.cards.t.ThoughtLash.class)); + cards.add(new SetCardInfo("Tidal Control", 59, Rarity.RARE, mage.cards.t.TidalControl.class)); cards.add(new SetCardInfo("Tornado", 86, Rarity.RARE, mage.cards.t.Tornado.class)); - cards.add(new SetCardInfo("Varchild's War-Riders", 122, Rarity.RARE, mage.cards.v.VarchildsWarRiders.class)); + cards.add(new SetCardInfo("Unlikely Alliance", 153, Rarity.UNCOMMON, mage.cards.u.UnlikelyAlliance.class)); + cards.add(new SetCardInfo("Varchild's Crusader", 120, Rarity.COMMON, mage.cards.v.VarchildsCrusader.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Varchild's Crusader", 121, Rarity.COMMON, mage.cards.v.VarchildsCrusader.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Varchild's War-Riders", 122, Rarity.RARE, mage.cards.v.VarchildsWarRiders.class)); cards.add(new SetCardInfo("Viscerid Armor", 60, Rarity.COMMON, mage.cards.v.VisceridArmor.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Viscerid Armor", 61, Rarity.COMMON, mage.cards.v.VisceridArmor.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Viscerid Drone", 62, Rarity.UNCOMMON, mage.cards.v.VisceridDrone.class)); cards.add(new SetCardInfo("Wandering Mage", 198, Rarity.RARE, mage.cards.w.WanderingMage.class)); cards.add(new SetCardInfo("Whip Vine", 89, Rarity.COMMON, WhipVine.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Whip Vine", 90, Rarity.COMMON, WhipVine.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Whirling Catapult", 181, Rarity.UNCOMMON, mage.cards.w.WhirlingCatapult.class)); cards.add(new SetCardInfo("Wild Aesthir", 154, Rarity.COMMON, mage.cards.w.WildAesthir.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Wild Aesthir", 155, Rarity.COMMON, mage.cards.w.WildAesthir.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Winter's Night", 199, Rarity.RARE, mage.cards.w.WintersNight.class)); cards.add(new SetCardInfo("Yavimaya Ancients", 91, Rarity.COMMON, mage.cards.y.YavimayaAncients.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Yavimaya Ancients", 92, Rarity.COMMON, mage.cards.y.YavimayaAncients.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Yavimaya Ants", 93, Rarity.UNCOMMON, mage.cards.y.YavimayaAnts.class)); diff --git a/Mage.Sets/src/mage/sets/Amonkhet.java b/Mage.Sets/src/mage/sets/Amonkhet.java index b8ae0a7253..006da239d6 100644 --- a/Mage.Sets/src/mage/sets/Amonkhet.java +++ b/Mage.Sets/src/mage/sets/Amonkhet.java @@ -152,7 +152,7 @@ public class Amonkhet extends ExpansionSet { cards.add(new SetCardInfo("Flameblade Adept", 131, Rarity.UNCOMMON, mage.cards.f.FlamebladeAdept.class)); cards.add(new SetCardInfo("Fling", 132, Rarity.COMMON, mage.cards.f.Fling.class)); cards.add(new SetCardInfo("Floodwaters", 53, Rarity.COMMON, mage.cards.f.Floodwaters.class)); - cards.add(new SetCardInfo("Forest", 254, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Forest", 254, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Forest", 267, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Forest", 268, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Forest", 269, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); @@ -202,7 +202,7 @@ public class Amonkhet extends ExpansionSet { cards.add(new SetCardInfo("Initiate's Companion", 174, Rarity.COMMON, mage.cards.i.InitiatesCompanion.class)); cards.add(new SetCardInfo("Insult // Injury", 213, Rarity.RARE, mage.cards.i.InsultInjury.class)); cards.add(new SetCardInfo("Irrigated Farmland", 245, Rarity.RARE, mage.cards.i.IrrigatedFarmland.class)); - cards.add(new SetCardInfo("Island", 251, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Island", 251, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Island", 258, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Island", 259, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Island", 260, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); @@ -227,7 +227,7 @@ public class Amonkhet extends ExpansionSet { cards.add(new SetCardInfo("Miasmic Mummy", 100, Rarity.COMMON, mage.cards.m.MiasmicMummy.class)); cards.add(new SetCardInfo("Mighty Leap", 20, Rarity.COMMON, mage.cards.m.MightyLeap.class)); cards.add(new SetCardInfo("Minotaur Sureshot", 143, Rarity.COMMON, mage.cards.m.MinotaurSureshot.class)); - cards.add(new SetCardInfo("Mountain", 253, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mountain", 253, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Mountain", 264, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mountain", 265, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mountain", 266, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); @@ -255,7 +255,7 @@ public class Amonkhet extends ExpansionSet { cards.add(new SetCardInfo("Pitiless Vizier", 103, Rarity.COMMON, mage.cards.p.PitilessVizier.class)); cards.add(new SetCardInfo("Plague Belcher", 104, Rarity.RARE, mage.cards.p.PlagueBelcher.class)); cards.add(new SetCardInfo("Pyramid of the Pantheon", 235, Rarity.RARE, mage.cards.p.PyramidOfThePantheon.class)); - cards.add(new SetCardInfo("Plains", 250, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Plains", 250, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Plains", 255, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Plains", 256, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Plains", 257, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); @@ -307,7 +307,7 @@ public class Amonkhet extends ExpansionSet { cards.add(new SetCardInfo("Sunscorched Desert", 249, Rarity.COMMON, mage.cards.s.SunscorchedDesert.class)); cards.add(new SetCardInfo("Supernatural Stamina", 111, Rarity.COMMON, mage.cards.s.SupernaturalStamina.class)); cards.add(new SetCardInfo("Supply Caravan", 30, Rarity.COMMON, mage.cards.s.SupplyCaravan.class)); - cards.add(new SetCardInfo("Swamp", 252, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Swamp", 252, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Swamp", 261, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Swamp", 262, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Swamp", 263, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); diff --git a/Mage.Sets/src/mage/sets/Apocalypse.java b/Mage.Sets/src/mage/sets/Apocalypse.java index 8dd861e76e..187bc0ff8b 100644 --- a/Mage.Sets/src/mage/sets/Apocalypse.java +++ b/Mage.Sets/src/mage/sets/Apocalypse.java @@ -5,6 +5,7 @@ import mage.constants.Rarity; import mage.constants.SetType; public class Apocalypse extends ExpansionSet { + private static final Apocalypse instance = new Apocalypse(); public static Apocalypse getInstance() { @@ -24,11 +25,13 @@ public class Apocalypse extends ExpansionSet { this.ratioBoosterMythic = 0; cards.add(new SetCardInfo("Aether Mutation", 91, Rarity.UNCOMMON, mage.cards.a.AetherMutation.class)); cards.add(new SetCardInfo("Ana Disciple", 73, Rarity.COMMON, mage.cards.a.AnaDisciple.class)); + cards.add(new SetCardInfo("Ana Sanctuary", 74, Rarity.UNCOMMON, mage.cards.a.AnaSanctuary.class)); cards.add(new SetCardInfo("Anavolver", 75, Rarity.RARE, mage.cards.a.Anavolver.class)); cards.add(new SetCardInfo("Angelfire Crusader", 1, Rarity.COMMON, mage.cards.a.AngelfireCrusader.class)); cards.add(new SetCardInfo("Battlefield Forge", 139, Rarity.RARE, mage.cards.b.BattlefieldForge.class)); cards.add(new SetCardInfo("Bloodfire Colossus", 55, Rarity.RARE, mage.cards.b.BloodfireColossus.class)); cards.add(new SetCardInfo("Bloodfire Dwarf", 56, Rarity.COMMON, mage.cards.b.BloodfireDwarf.class)); + cards.add(new SetCardInfo("Bloodfire Infusion", 57, Rarity.COMMON, mage.cards.b.BloodfireInfusion.class)); cards.add(new SetCardInfo("Bloodfire Kavu", 58, Rarity.UNCOMMON, mage.cards.b.BloodfireKavu.class)); cards.add(new SetCardInfo("Bog Gnarr", 76, Rarity.COMMON, mage.cards.b.BogGnarr.class)); cards.add(new SetCardInfo("Brass Herald", 133, Rarity.UNCOMMON, mage.cards.b.BrassHerald.class)); @@ -36,8 +39,8 @@ public class Apocalypse extends ExpansionSet { cards.add(new SetCardInfo("Ceta Disciple", 19, Rarity.COMMON, mage.cards.c.CetaDisciple.class)); cards.add(new SetCardInfo("Ceta Sanctuary", 20, Rarity.UNCOMMON, mage.cards.c.CetaSanctuary.class)); cards.add(new SetCardInfo("Cetavolver", 21, Rarity.RARE, mage.cards.c.Cetavolver.class)); - cards.add(new SetCardInfo("Coalition Flag", 2, Rarity.UNCOMMON, mage.cards.c.CoalitionFlag.class)); - cards.add(new SetCardInfo("Coalition Honor Guard", 3, Rarity.COMMON, mage.cards.c.CoalitionHonorGuard.class)); + cards.add(new SetCardInfo("Coalition Flag", 2, Rarity.UNCOMMON, mage.cards.c.CoalitionFlag.class)); + cards.add(new SetCardInfo("Coalition Honor Guard", 3, Rarity.COMMON, mage.cards.c.CoalitionHonorGuard.class)); cards.add(new SetCardInfo("Coastal Drake", 22, Rarity.COMMON, mage.cards.c.CoastalDrake.class)); cards.add(new SetCardInfo("Consume Strength", 93, Rarity.COMMON, mage.cards.c.ConsumeStrength.class)); cards.add(new SetCardInfo("Cromat", 94, Rarity.RARE, mage.cards.c.Cromat.class)); @@ -45,6 +48,7 @@ public class Apocalypse extends ExpansionSet { cards.add(new SetCardInfo("Death Grasp", 95, Rarity.RARE, mage.cards.d.DeathGrasp.class)); cards.add(new SetCardInfo("Death Mutation", 96, Rarity.UNCOMMON, mage.cards.d.DeathMutation.class)); cards.add(new SetCardInfo("Dega Disciple", 4, Rarity.COMMON, mage.cards.d.DegaDisciple.class)); + cards.add(new SetCardInfo("Dega Sanctuary", 5, Rarity.UNCOMMON, mage.cards.d.DegaSanctuary.class)); cards.add(new SetCardInfo("Degavolver", 6, Rarity.RARE, mage.cards.d.Degavolver.class)); cards.add(new SetCardInfo("Desolation Angel", 38, Rarity.RARE, mage.cards.d.DesolationAngel.class)); cards.add(new SetCardInfo("Desolation Giant", 59, Rarity.RARE, mage.cards.d.DesolationGiant.class)); @@ -70,9 +74,10 @@ public class Apocalypse extends ExpansionSet { cards.add(new SetCardInfo("Goblin Ringleader", 62, Rarity.UNCOMMON, mage.cards.g.GoblinRingleader.class)); cards.add(new SetCardInfo("Goblin Trenches", 104, Rarity.RARE, mage.cards.g.GoblinTrenches.class)); cards.add(new SetCardInfo("Grave Defiler", 40, Rarity.UNCOMMON, mage.cards.g.GraveDefiler.class)); + cards.add(new SetCardInfo("Guided Passage", 105, Rarity.RARE, mage.cards.g.GuidedPassage.class)); cards.add(new SetCardInfo("Haunted Angel", 12, Rarity.UNCOMMON, mage.cards.h.HauntedAngel.class)); cards.add(new SetCardInfo("Helionaut", 13, Rarity.COMMON, mage.cards.h.Helionaut.class)); - cards.add(new SetCardInfo("Ice Cave", 24, Rarity.RARE, mage.cards.i.IceCave.class)); + cards.add(new SetCardInfo("Ice Cave", 24, Rarity.RARE, mage.cards.i.IceCave.class)); cards.add(new SetCardInfo("Illuminate", 63, Rarity.UNCOMMON, mage.cards.i.Illuminate.class)); cards.add(new SetCardInfo("Illusion // Reality", 129, Rarity.UNCOMMON, mage.cards.i.IllusionReality.class)); cards.add(new SetCardInfo("Index", 25, Rarity.COMMON, mage.cards.i.Index.class)); @@ -98,6 +103,7 @@ public class Apocalypse extends ExpansionSet { cards.add(new SetCardInfo("Mournful Zombie", 43, Rarity.COMMON, mage.cards.m.MournfulZombie.class)); cards.add(new SetCardInfo("Mystic Snake", 112, Rarity.RARE, mage.cards.m.MysticSnake.class)); cards.add(new SetCardInfo("Necra Disciple", 44, Rarity.COMMON, mage.cards.n.NecraDisciple.class)); + cards.add(new SetCardInfo("Necra Sanctuary", 45, Rarity.UNCOMMON, mage.cards.n.NecraSanctuary.class)); cards.add(new SetCardInfo("Necravolver", 46, Rarity.RARE, mage.cards.n.Necravolver.class)); cards.add(new SetCardInfo("Night // Day", 131, Rarity.UNCOMMON, mage.cards.n.NightDay.class)); cards.add(new SetCardInfo("Order // Chaos", 132, Rarity.UNCOMMON, mage.cards.o.OrderChaos.class)); @@ -117,6 +123,7 @@ public class Apocalypse extends ExpansionSet { cards.add(new SetCardInfo("Quagmire Druid", 51, Rarity.COMMON, mage.cards.q.QuagmireDruid.class)); cards.add(new SetCardInfo("Quicksilver Dagger", 118, Rarity.COMMON, mage.cards.q.QuicksilverDagger.class)); cards.add(new SetCardInfo("Raka Disciple", 66, Rarity.COMMON, mage.cards.r.RakaDisciple.class)); + cards.add(new SetCardInfo("Raka Sanctuary", 67, Rarity.UNCOMMON, mage.cards.r.RakaSanctuary.class)); cards.add(new SetCardInfo("Rakavolver", 68, Rarity.RARE, mage.cards.r.Rakavolver.class)); cards.add(new SetCardInfo("Razorfin Hunter", 119, Rarity.COMMON, mage.cards.r.RazorfinHunter.class)); cards.add(new SetCardInfo("Reef Shaman", 29, Rarity.COMMON, mage.cards.r.ReefShaman.class)); @@ -130,7 +137,7 @@ public class Apocalypse extends ExpansionSet { cards.add(new SetCardInfo("Spiritmonger", 121, Rarity.RARE, mage.cards.s.Spiritmonger.class)); cards.add(new SetCardInfo("Squee's Embrace", 122, Rarity.COMMON, mage.cards.s.SqueesEmbrace.class)); cards.add(new SetCardInfo("Squee's Revenge", 123, Rarity.UNCOMMON, mage.cards.s.SqueesRevenge.class)); - cards.add(new SetCardInfo("Standard Bearer", 18, Rarity.COMMON, mage.cards.s.StandardBearer.class)); + cards.add(new SetCardInfo("Standard Bearer", 18, Rarity.COMMON, mage.cards.s.StandardBearer.class)); cards.add(new SetCardInfo("Strength of Night", 86, Rarity.COMMON, mage.cards.s.StrengthOfNight.class)); cards.add(new SetCardInfo("Suffocating Blast", 124, Rarity.RARE, mage.cards.s.SuffocatingBlast.class)); cards.add(new SetCardInfo("Sylvan Messenger", 87, Rarity.UNCOMMON, mage.cards.s.SylvanMessenger.class)); diff --git a/Mage.Sets/src/mage/sets/ArabianNights.java b/Mage.Sets/src/mage/sets/ArabianNights.java index d9fd0bab01..eb76776430 100644 --- a/Mage.Sets/src/mage/sets/ArabianNights.java +++ b/Mage.Sets/src/mage/sets/ArabianNights.java @@ -130,6 +130,7 @@ public class ArabianNights extends ExpansionSet { cards.add(new SetCardInfo("Piety", 65, Rarity.COMMON, Piety.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Pyramids", 81, Rarity.RARE, mage.cards.p.Pyramids.class)); cards.add(new SetCardInfo("Repentant Blacksmith", 66, Rarity.RARE, mage.cards.r.RepentantBlacksmith.class)); + cards.add(new SetCardInfo("Ring of Ma'rûf", 82, Rarity.RARE, mage.cards.r.RingOfMaruf.class)); cards.add(new SetCardInfo("Rukh Egg", 52, Rarity.COMMON, RukhEgg.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Rukh Egg", 53, Rarity.COMMON, RukhEgg.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Sandals of Abdallah", 83, Rarity.UNCOMMON, mage.cards.s.SandalsOfAbdallah.class)); diff --git a/Mage.Sets/src/mage/sets/Archenemy.java b/Mage.Sets/src/mage/sets/Archenemy.java index ce903819b6..4e52682db2 100644 --- a/Mage.Sets/src/mage/sets/Archenemy.java +++ b/Mage.Sets/src/mage/sets/Archenemy.java @@ -35,7 +35,6 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class Archenemy extends ExpansionSet { private static final Archenemy instance = new Archenemy(); diff --git a/Mage.Sets/src/mage/sets/ArchenemyNicolBolas.java b/Mage.Sets/src/mage/sets/ArchenemyNicolBolas.java index 8a66ae6e8c..55ad9c4361 100644 --- a/Mage.Sets/src/mage/sets/ArchenemyNicolBolas.java +++ b/Mage.Sets/src/mage/sets/ArchenemyNicolBolas.java @@ -35,7 +35,6 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class ArchenemyNicolBolas extends ExpansionSet { private static final ArchenemyNicolBolas instance = new ArchenemyNicolBolas(); diff --git a/Mage.Sets/src/mage/sets/ArenaLeague.java b/Mage.Sets/src/mage/sets/ArenaLeague.java index f89961843b..784ed48a44 100644 --- a/Mage.Sets/src/mage/sets/ArenaLeague.java +++ b/Mage.Sets/src/mage/sets/ArenaLeague.java @@ -35,7 +35,6 @@ import mage.constants.SetType; * * @author fireshoes */ - public class ArenaLeague extends ExpansionSet { private static final ArenaLeague instance = new ArenaLeague(); diff --git a/Mage.Sets/src/mage/sets/AsiaPacificLandProgram.java b/Mage.Sets/src/mage/sets/AsiaPacificLandProgram.java index 50d4e21404..e1bb071cea 100644 --- a/Mage.Sets/src/mage/sets/AsiaPacificLandProgram.java +++ b/Mage.Sets/src/mage/sets/AsiaPacificLandProgram.java @@ -35,7 +35,6 @@ import mage.constants.SetType; * * @author fireshoes */ - public class AsiaPacificLandProgram extends ExpansionSet { private static final AsiaPacificLandProgram instance = new AsiaPacificLandProgram(); diff --git a/Mage.Sets/src/mage/sets/BlessedVsCursed.java b/Mage.Sets/src/mage/sets/BlessedVsCursed.java index 7729502575..b86613d97b 100644 --- a/Mage.Sets/src/mage/sets/BlessedVsCursed.java +++ b/Mage.Sets/src/mage/sets/BlessedVsCursed.java @@ -36,6 +36,7 @@ import mage.constants.SetType; * @author fireshoes */ public class BlessedVsCursed extends ExpansionSet { + private static final BlessedVsCursed instance = new BlessedVsCursed(); public static BlessedVsCursed getInstance() { diff --git a/Mage.Sets/src/mage/sets/BornOfTheGods.java b/Mage.Sets/src/mage/sets/BornOfTheGods.java index 9c72e443b8..87f0768b01 100644 --- a/Mage.Sets/src/mage/sets/BornOfTheGods.java +++ b/Mage.Sets/src/mage/sets/BornOfTheGods.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; diff --git a/Mage.Sets/src/mage/sets/ChampionsOfKamigawa.java b/Mage.Sets/src/mage/sets/ChampionsOfKamigawa.java index 024e370bb3..a1e51043d1 100644 --- a/Mage.Sets/src/mage/sets/ChampionsOfKamigawa.java +++ b/Mage.Sets/src/mage/sets/ChampionsOfKamigawa.java @@ -6,6 +6,7 @@ import mage.constants.Rarity; import mage.constants.SetType; public class ChampionsOfKamigawa extends ExpansionSet { + private static final ChampionsOfKamigawa instance = new ChampionsOfKamigawa(); public static ChampionsOfKamigawa getInstance() { diff --git a/Mage.Sets/src/mage/sets/Champs.java b/Mage.Sets/src/mage/sets/Champs.java index 190ada247d..b6bc28ce60 100644 --- a/Mage.Sets/src/mage/sets/Champs.java +++ b/Mage.Sets/src/mage/sets/Champs.java @@ -35,7 +35,6 @@ import mage.constants.SetType; * * @author fireshoes */ - public class Champs extends ExpansionSet { private static final Champs instance = new Champs(); diff --git a/Mage.Sets/src/mage/sets/Chronicles.java b/Mage.Sets/src/mage/sets/Chronicles.java index f6a5f8a6c8..add6a9345f 100644 --- a/Mage.Sets/src/mage/sets/Chronicles.java +++ b/Mage.Sets/src/mage/sets/Chronicles.java @@ -57,11 +57,13 @@ public class Chronicles extends ExpansionSet { cards.add(new SetCardInfo("Active Volcano", 43, Rarity.COMMON, mage.cards.a.ActiveVolcano.class)); cards.add(new SetCardInfo("Akron Legionnaire", 58, Rarity.RARE, mage.cards.a.AkronLegionnaire.class)); cards.add(new SetCardInfo("Aladdin", 44, Rarity.RARE, mage.cards.a.Aladdin.class)); + cards.add(new SetCardInfo("Angelic Voices", 59, Rarity.RARE, mage.cards.a.AngelicVoices.class)); cards.add(new SetCardInfo("Arcades Sabboth", 106, Rarity.RARE, mage.cards.a.ArcadesSabboth.class)); cards.add(new SetCardInfo("Arena of the Ancients", 71, Rarity.RARE, mage.cards.a.ArenaOfTheAncients.class)); cards.add(new SetCardInfo("Argothian Pixies", 29, Rarity.COMMON, mage.cards.a.ArgothianPixies.class)); cards.add(new SetCardInfo("Ashnod's Altar", 72, Rarity.COMMON, mage.cards.a.AshnodsAltar.class)); cards.add(new SetCardInfo("Ashnod's Transmogrant", 73, Rarity.COMMON, mage.cards.a.AshnodsTransmogrant.class)); + cards.add(new SetCardInfo("Axelrod Gunnarson", 107, Rarity.RARE, mage.cards.a.AxelrodGunnarson.class)); cards.add(new SetCardInfo("Azure Drake", 15, Rarity.UNCOMMON, mage.cards.a.AzureDrake.class)); cards.add(new SetCardInfo("Barl's Cage", 74, Rarity.RARE, mage.cards.b.BarlsCage.class)); cards.add(new SetCardInfo("Beasts of Bogardan", 45, Rarity.UNCOMMON, mage.cards.b.BeastsOfBogardan.class)); @@ -96,11 +98,13 @@ public class Chronicles extends ExpansionSet { cards.add(new SetCardInfo("Hasran Ogress", 6, Rarity.COMMON, mage.cards.h.HasranOgress.class)); cards.add(new SetCardInfo("Hell's Caretaker", 7, Rarity.RARE, mage.cards.h.HellsCaretaker.class)); cards.add(new SetCardInfo("Horn of Deafening", 80, Rarity.RARE, mage.cards.h.HornOfDeafening.class)); + cards.add(new SetCardInfo("Indestructible Aura", 63, Rarity.COMMON, mage.cards.i.IndestructibleAura.class)); cards.add(new SetCardInfo("Ivory Guardians", 64, Rarity.UNCOMMON, mage.cards.i.IvoryGuardians.class)); cards.add(new SetCardInfo("Jalum Tome", 81, Rarity.RARE, mage.cards.j.JalumTome.class)); cards.add(new SetCardInfo("Juxtapose", 22, Rarity.RARE, mage.cards.j.Juxtapose.class)); cards.add(new SetCardInfo("Keepers of the Faith", 65, Rarity.COMMON, mage.cards.k.KeepersOfTheFaith.class)); cards.add(new SetCardInfo("Kei Takahashi", 113, Rarity.UNCOMMON, mage.cards.k.KeiTakahashi.class)); + cards.add(new SetCardInfo("Land's Edge", 52, Rarity.RARE, mage.cards.l.LandsEdge.class)); cards.add(new SetCardInfo("Living Armor", 83, Rarity.COMMON, mage.cards.l.LivingArmor.class)); cards.add(new SetCardInfo("Marhault Elsdragon", 114, Rarity.UNCOMMON, mage.cards.m.MarhaultElsdragon.class)); cards.add(new SetCardInfo("Metamorphosis", 38, Rarity.COMMON, mage.cards.m.Metamorphosis.class)); diff --git a/Mage.Sets/src/mage/sets/ClashPack.java b/Mage.Sets/src/mage/sets/ClashPack.java index f90951d9a8..6e64ea196a 100644 --- a/Mage.Sets/src/mage/sets/ClashPack.java +++ b/Mage.Sets/src/mage/sets/ClashPack.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -37,6 +36,7 @@ import mage.constants.SetType; * @author LevelX2 */ public class ClashPack extends ExpansionSet { + private static final ClashPack instance = new ClashPack(); public static ClashPack getInstance() { @@ -59,4 +59,4 @@ public class ClashPack extends ExpansionSet { cards.add(new SetCardInfo("Temple of Mystery", 6, Rarity.SPECIAL, mage.cards.t.TempleOfMystery.class)); cards.add(new SetCardInfo("Whip of Erebos", 11, Rarity.SPECIAL, mage.cards.w.WhipOfErebos.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/Coldsnap.java b/Mage.Sets/src/mage/sets/Coldsnap.java index 5e66af96d7..2274bb439f 100644 --- a/Mage.Sets/src/mage/sets/Coldsnap.java +++ b/Mage.Sets/src/mage/sets/Coldsnap.java @@ -58,6 +58,7 @@ public class Coldsnap extends ExpansionSet { cards.add(new SetCardInfo("Adarkar Windform", 26, Rarity.UNCOMMON, mage.cards.a.AdarkarWindform.class)); cards.add(new SetCardInfo("Allosaurus Rider", 101, Rarity.RARE, mage.cards.a.AllosaurusRider.class)); cards.add(new SetCardInfo("Arctic Flats", 143, Rarity.UNCOMMON, mage.cards.a.ArcticFlats.class)); + cards.add(new SetCardInfo("Arctic Nishoba", 102, Rarity.UNCOMMON, mage.cards.a.ArcticNishoba.class)); cards.add(new SetCardInfo("Arcum Dagsson", 27, Rarity.RARE, mage.cards.a.ArcumDagsson.class)); cards.add(new SetCardInfo("Aurochs Herd", 103, Rarity.COMMON, mage.cards.a.AurochsHerd.class)); cards.add(new SetCardInfo("Balduvian Rage", 76, Rarity.UNCOMMON, mage.cards.b.BalduvianRage.class)); @@ -83,22 +84,25 @@ public class Coldsnap extends ExpansionSet { cards.add(new SetCardInfo("Diamond Faerie", 128, Rarity.RARE, mage.cards.d.DiamondFaerie.class)); cards.add(new SetCardInfo("Disciple of Tevesh Szat", 55, Rarity.COMMON, mage.cards.d.DiscipleOfTeveshSzat.class)); cards.add(new SetCardInfo("Drelnoch", 32, Rarity.COMMON, mage.cards.d.Drelnoch.class)); + cards.add(new SetCardInfo("Earthen Goo", 80, Rarity.UNCOMMON, mage.cards.e.EarthenGoo.class)); cards.add(new SetCardInfo("Field Marshal", 5, Rarity.RARE, mage.cards.f.FieldMarshal.class)); cards.add(new SetCardInfo("Flashfreeze", 33, Rarity.UNCOMMON, mage.cards.f.Flashfreeze.class)); - cards.add(new SetCardInfo("Freyalise's Radiance", 108, Rarity.UNCOMMON, mage.cards.f.FreyalisesRadiance.class)); + cards.add(new SetCardInfo("Freyalise's Radiance", 108, Rarity.UNCOMMON, mage.cards.f.FreyalisesRadiance.class)); cards.add(new SetCardInfo("Frost Marsh", 146, Rarity.UNCOMMON, mage.cards.f.FrostMarsh.class)); cards.add(new SetCardInfo("Frost Raptor", 34, Rarity.COMMON, mage.cards.f.FrostRaptor.class)); cards.add(new SetCardInfo("Frozen Solid", 35, Rarity.COMMON, mage.cards.f.FrozenSolid.class)); cards.add(new SetCardInfo("Fury of the Horde", 81, Rarity.RARE, mage.cards.f.FuryOfTheHorde.class)); cards.add(new SetCardInfo("Garza Zol, Plague Queen", 129, Rarity.RARE, mage.cards.g.GarzaZolPlagueQueen.class)); cards.add(new SetCardInfo("Gelid Shackles", 6, Rarity.COMMON, mage.cards.g.GelidShackles.class)); + cards.add(new SetCardInfo("Glacial Plating", 7, Rarity.UNCOMMON, mage.cards.g.GlacialPlating.class)); + cards.add(new SetCardInfo("Goblin Rimerunner", 83, Rarity.COMMON, mage.cards.g.GoblinRimerunner.class)); cards.add(new SetCardInfo("Greater Stone Spirit", 84, Rarity.UNCOMMON, mage.cards.g.GreaterStoneSpirit.class)); cards.add(new SetCardInfo("Grim Harvest", 58, Rarity.COMMON, mage.cards.g.GrimHarvest.class)); cards.add(new SetCardInfo("Gristle Grinner", 59, Rarity.UNCOMMON, mage.cards.g.GristleGrinner.class)); cards.add(new SetCardInfo("Gutless Ghoul", 60, Rarity.COMMON, mage.cards.g.GutlessGhoul.class)); cards.add(new SetCardInfo("Haakon, Stromgald Scourge", 61, Rarity.RARE, mage.cards.h.HaakonStromgaldScourge.class)); cards.add(new SetCardInfo("Heidar, Rimewind Master", 36, Rarity.RARE, mage.cards.h.HeidarRimewindMaster.class)); - cards.add(new SetCardInfo("Herald of Leshrac", 62, Rarity.RARE, mage.cards.h.HeraldOfLeshrac.class)); + cards.add(new SetCardInfo("Herald of Leshrac", 62, Rarity.RARE, mage.cards.h.HeraldOfLeshrac.class)); cards.add(new SetCardInfo("Hibernation's End", 110, Rarity.RARE, mage.cards.h.HibernationsEnd.class)); cards.add(new SetCardInfo("Highland Weald", 147, Rarity.UNCOMMON, mage.cards.h.HighlandWeald.class)); cards.add(new SetCardInfo("Icefall", 85, Rarity.COMMON, mage.cards.i.Icefall.class)); @@ -106,18 +110,23 @@ public class Coldsnap extends ExpansionSet { cards.add(new SetCardInfo("Jester's Scepter", 137, Rarity.RARE, mage.cards.j.JestersScepter.class)); cards.add(new SetCardInfo("Jokulmorder", 37, Rarity.RARE, mage.cards.j.Jokulmorder.class)); cards.add(new SetCardInfo("Jotun Grunt", 8, Rarity.UNCOMMON, mage.cards.j.JotunGrunt.class)); + cards.add(new SetCardInfo("Jotun Owl Keeper", 9, Rarity.UNCOMMON, mage.cards.j.JotunOwlKeeper.class)); cards.add(new SetCardInfo("Juniper Order Ranger", 130, Rarity.UNCOMMON, mage.cards.j.JuniperOrderRanger.class)); + cards.add(new SetCardInfo("Karplusan Minotaur", 86, Rarity.RARE, mage.cards.k.KarplusanMinotaur.class)); cards.add(new SetCardInfo("Karplusan Strider", 112, Rarity.UNCOMMON, mage.cards.k.KarplusanStrider.class)); cards.add(new SetCardInfo("Karplusan Wolverine", 87, Rarity.COMMON, mage.cards.k.KarplusanWolverine.class)); cards.add(new SetCardInfo("Kjeldoran Gargoyle", 10, Rarity.UNCOMMON, mage.cards.k.KjeldoranGargoyle.class)); + cards.add(new SetCardInfo("Kjeldoran Javelineer", 11, Rarity.COMMON, mage.cards.k.KjeldoranJavelineer.class)); cards.add(new SetCardInfo("Kjeldoran Outrider", 12, Rarity.COMMON, mage.cards.k.KjeldoranOutrider.class)); cards.add(new SetCardInfo("Krovikan Mist", 38, Rarity.COMMON, mage.cards.k.KrovikanMist.class)); cards.add(new SetCardInfo("Krovikan Rot", 63, Rarity.UNCOMMON, mage.cards.k.KrovikanRot.class)); cards.add(new SetCardInfo("Krovikan Scoundrel", 64, Rarity.COMMON, mage.cards.k.KrovikanScoundrel.class)); + cards.add(new SetCardInfo("Krovikan Whispers", 39, Rarity.UNCOMMON, mage.cards.k.KrovikanWhispers.class)); cards.add(new SetCardInfo("Lightning Serpent", 88, Rarity.RARE, mage.cards.l.LightningSerpent.class)); cards.add(new SetCardInfo("Lightning Storm", 89, Rarity.UNCOMMON, mage.cards.l.LightningStorm.class)); cards.add(new SetCardInfo("Lovisa Coldeyes", 90, Rarity.RARE, mage.cards.l.LovisaColdeyes.class)); cards.add(new SetCardInfo("Luminesce", 14, Rarity.UNCOMMON, mage.cards.l.Luminesce.class)); + cards.add(new SetCardInfo("Magmatic Core", 91, Rarity.UNCOMMON, mage.cards.m.MagmaticCore.class)); cards.add(new SetCardInfo("Martyr of Ashes", 92, Rarity.COMMON, mage.cards.m.MartyrOfAshes.class)); cards.add(new SetCardInfo("Martyr of Bones", 65, Rarity.COMMON, mage.cards.m.MartyrOfBones.class)); cards.add(new SetCardInfo("Martyr of Frost", 40, Rarity.COMMON, mage.cards.m.MartyrOfFrost.class)); @@ -131,17 +140,20 @@ public class Coldsnap extends ExpansionSet { cards.add(new SetCardInfo("Orcish Bloodpainter", 94, Rarity.COMMON, mage.cards.o.OrcishBloodpainter.class)); cards.add(new SetCardInfo("Perilous Research", 41, Rarity.UNCOMMON, mage.cards.p.PerilousResearch.class)); cards.add(new SetCardInfo("Phobian Phantasm", 66, Rarity.UNCOMMON, mage.cards.p.PhobianPhantasm.class)); + cards.add(new SetCardInfo("Phyrexian Etchings", 67, Rarity.RARE, mage.cards.p.PhyrexianEtchings.class)); cards.add(new SetCardInfo("Phyrexian Ironfoot", 139, Rarity.UNCOMMON, mage.cards.p.PhyrexianIronfoot.class)); cards.add(new SetCardInfo("Phyrexian Snowcrusher", 140, Rarity.UNCOMMON, mage.cards.p.PhyrexianSnowcrusher.class)); cards.add(new SetCardInfo("Phyrexian Soulgorger", 141, Rarity.RARE, mage.cards.p.PhyrexianSoulgorger.class)); cards.add(new SetCardInfo("Resize", 117, Rarity.UNCOMMON, mage.cards.r.Resize.class)); cards.add(new SetCardInfo("Rimebound Dead", 69, Rarity.COMMON, mage.cards.r.RimeboundDead.class)); cards.add(new SetCardInfo("Rime Transfusion", 68, Rarity.UNCOMMON, mage.cards.r.RimeTransfusion.class)); + cards.add(new SetCardInfo("Rimefeather Owl", 42, Rarity.RARE, mage.cards.r.RimefeatherOwl.class)); cards.add(new SetCardInfo("Rimescale Dragon", 95, Rarity.RARE, mage.cards.r.RimescaleDragon.class)); cards.add(new SetCardInfo("Rimewind Cryomancer", 43, Rarity.UNCOMMON, mage.cards.r.RimewindCryomancer.class)); cards.add(new SetCardInfo("Rimewind Taskmage", 44, Rarity.COMMON, mage.cards.r.RimewindTaskmage.class)); cards.add(new SetCardInfo("Rite of Flame", 96, Rarity.COMMON, mage.cards.r.RiteOfFlame.class)); cards.add(new SetCardInfo("Ronom Hulk", 119, Rarity.COMMON, mage.cards.r.RonomHulk.class)); + cards.add(new SetCardInfo("Ronom Serpent", 45, Rarity.COMMON, mage.cards.r.RonomSerpent.class)); cards.add(new SetCardInfo("Ronom Unicorn", 16, Rarity.COMMON, mage.cards.r.RonomUnicorn.class)); cards.add(new SetCardInfo("Rune Snag", 46, Rarity.COMMON, mage.cards.r.RuneSnag.class)); cards.add(new SetCardInfo("Scrying Sheets", 149, Rarity.RARE, mage.cards.s.ScryingSheets.class)); @@ -155,7 +167,9 @@ public class Coldsnap extends ExpansionSet { cards.add(new SetCardInfo("Snow-Covered Plains", 151, Rarity.COMMON, mage.cards.s.SnowCoveredPlains.class)); cards.add(new SetCardInfo("Snow-Covered Swamp", 153, Rarity.COMMON, mage.cards.s.SnowCoveredSwamp.class)); cards.add(new SetCardInfo("Soul Spike", 70, Rarity.RARE, mage.cards.s.SoulSpike.class)); + cards.add(new SetCardInfo("Sound the Call", 123, Rarity.COMMON, mage.cards.s.SoundTheCall.class)); cards.add(new SetCardInfo("Squall Drifter", 17, Rarity.COMMON, mage.cards.s.SquallDrifter.class)); + cards.add(new SetCardInfo("Stalking Yeti", 98, Rarity.UNCOMMON, mage.cards.s.StalkingYeti.class)); cards.add(new SetCardInfo("Steam Spitter", 124, Rarity.UNCOMMON, mage.cards.s.SteamSpitter.class)); cards.add(new SetCardInfo("Stromgald Crusader", 71, Rarity.UNCOMMON, mage.cards.s.StromgaldCrusader.class)); cards.add(new SetCardInfo("Sun's Bounty", 18, Rarity.COMMON, mage.cards.s.SunsBounty.class)); @@ -165,8 +179,9 @@ public class Coldsnap extends ExpansionSet { cards.add(new SetCardInfo("Surging Flame", 99, Rarity.COMMON, mage.cards.s.SurgingFlame.class)); cards.add(new SetCardInfo("Surging Might", 125, Rarity.COMMON, mage.cards.s.SurgingMight.class)); cards.add(new SetCardInfo("Surging Sentinels", 20, Rarity.COMMON, mage.cards.s.SurgingSentinels.class)); + cards.add(new SetCardInfo("Survivor of the Unseen", 48, Rarity.COMMON, mage.cards.s.SurvivorOfTheUnseen.class)); cards.add(new SetCardInfo("Swift Maneuver", 21, Rarity.COMMON, mage.cards.s.SwiftManeuver.class)); - cards.add(new SetCardInfo("Tamanoa", 132, Rarity.RARE, mage.cards.t.Tamanoa.class)); + cards.add(new SetCardInfo("Tamanoa", 132, Rarity.RARE, mage.cards.t.Tamanoa.class)); cards.add(new SetCardInfo("Thermopod", 100, Rarity.COMMON, mage.cards.t.Thermopod.class)); cards.add(new SetCardInfo("Thrumming Stone", 142, Rarity.RARE, mage.cards.t.ThrummingStone.class)); cards.add(new SetCardInfo("Tresserhorn Sinks", 150, Rarity.UNCOMMON, mage.cards.t.TresserhornSinks.class)); @@ -177,6 +192,7 @@ public class Coldsnap extends ExpansionSet { cards.add(new SetCardInfo("White Shield Crusader", 24, Rarity.UNCOMMON, mage.cards.w.WhiteShieldCrusader.class)); cards.add(new SetCardInfo("Wilderness Elemental", 134, Rarity.UNCOMMON, mage.cards.w.WildernessElemental.class)); cards.add(new SetCardInfo("Woolly Razorback", 25, Rarity.RARE, mage.cards.w.WoollyRazorback.class)); + cards.add(new SetCardInfo("Zombie Musher", 75, Rarity.COMMON, mage.cards.z.ZombieMusher.class)); cards.add(new SetCardInfo("Zur the Enchanter", 135, Rarity.RARE, mage.cards.z.ZurTheEnchanter.class)); } } diff --git a/Mage.Sets/src/mage/sets/Commander.java b/Mage.Sets/src/mage/sets/Commander.java index 3e5be9f5be..a87566d11e 100644 --- a/Mage.Sets/src/mage/sets/Commander.java +++ b/Mage.Sets/src/mage/sets/Commander.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -36,7 +35,6 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class Commander extends ExpansionSet { private static final Commander instance = new Commander(); @@ -267,7 +265,7 @@ public class Commander extends ExpansionSet { cards.add(new SetCardInfo("Relic Crush", 168, Rarity.COMMON, mage.cards.r.RelicCrush.class)); cards.add(new SetCardInfo("Repulse", 58, Rarity.COMMON, mage.cards.r.Repulse.class)); cards.add(new SetCardInfo("Return to Dust", 28, Rarity.UNCOMMON, mage.cards.r.ReturnToDust.class)); - cards.add(new SetCardInfo("Riddlekeeper", 59, Rarity.RARE, mage.cards.r.Riddlekeeper.class)); + cards.add(new SetCardInfo("Riddlekeeper", 59, Rarity.RARE, mage.cards.r.Riddlekeeper.class)); cards.add(new SetCardInfo("Righteous Cause", 29, Rarity.UNCOMMON, mage.cards.r.RighteousCause.class)); cards.add(new SetCardInfo("Riku of Two Reflections", 220, Rarity.MYTHIC, mage.cards.r.RikuOfTwoReflections.class)); cards.add(new SetCardInfo("Rise from the Grave", 96, Rarity.UNCOMMON, mage.cards.r.RiseFromTheGrave.class)); @@ -367,4 +365,4 @@ public class Commander extends ExpansionSet { cards.add(new SetCardInfo("Zoetic Cavern", 298, Rarity.UNCOMMON, mage.cards.z.ZoeticCavern.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/Commander2013.java b/Mage.Sets/src/mage/sets/Commander2013.java index d16160f195..16892d6876 100644 --- a/Mage.Sets/src/mage/sets/Commander2013.java +++ b/Mage.Sets/src/mage/sets/Commander2013.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -37,7 +36,6 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class Commander2013 extends ExpansionSet { private static final Commander2013 instance = new Commander2013(); @@ -317,7 +315,7 @@ public class Commander2013 extends ExpansionSet { cards.add(new SetCardInfo("Skyscribing", 57, Rarity.UNCOMMON, mage.cards.s.Skyscribing.class)); cards.add(new SetCardInfo("Skyward Eye Prophets", 214, Rarity.UNCOMMON, mage.cards.s.SkywardEyeProphets.class)); cards.add(new SetCardInfo("Slice and Dice", 119, Rarity.UNCOMMON, mage.cards.s.SliceAndDice.class)); - cards.add(new SetCardInfo("Slice in Twain", 170, Rarity.UNCOMMON, mage.cards.s.SliceinTwain.class)); + cards.add(new SetCardInfo("Slice in Twain", 170, Rarity.UNCOMMON, mage.cards.s.SliceInTwain.class)); cards.add(new SetCardInfo("Slippery Karst", 324, Rarity.COMMON, mage.cards.s.SlipperyKarst.class)); cards.add(new SetCardInfo("Smoldering Crater", 325, Rarity.COMMON, mage.cards.s.SmolderingCrater.class)); cards.add(new SetCardInfo("Sol Ring", 259, Rarity.UNCOMMON, mage.cards.s.SolRing.class)); diff --git a/Mage.Sets/src/mage/sets/Commander2014.java b/Mage.Sets/src/mage/sets/Commander2014.java index 5a9a13688c..8b077c9a68 100644 --- a/Mage.Sets/src/mage/sets/Commander2014.java +++ b/Mage.Sets/src/mage/sets/Commander2014.java @@ -35,7 +35,6 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class Commander2014 extends ExpansionSet { private static final Commander2014 instance = new Commander2014(); diff --git a/Mage.Sets/src/mage/sets/Commander2015.java b/Mage.Sets/src/mage/sets/Commander2015.java index b4a9b889e2..618597c29f 100644 --- a/Mage.Sets/src/mage/sets/Commander2015.java +++ b/Mage.Sets/src/mage/sets/Commander2015.java @@ -35,7 +35,6 @@ import mage.constants.SetType; * * @author fireshoes */ - public class Commander2015 extends ExpansionSet { private static final Commander2015 instance = new Commander2015(); diff --git a/Mage.Sets/src/mage/sets/Commander2017.java b/Mage.Sets/src/mage/sets/Commander2017.java index 770048533a..44bdb8329c 100644 --- a/Mage.Sets/src/mage/sets/Commander2017.java +++ b/Mage.Sets/src/mage/sets/Commander2017.java @@ -222,6 +222,7 @@ public class Commander2017 extends ExpansionSet { cards.add(new SetCardInfo("Nazahn, Revered Bladesmith", 44, Rarity.MYTHIC, mage.cards.n.NazahnReveredBladesmith.class)); cards.add(new SetCardInfo("Necromantic Selection", 117, Rarity.RARE, mage.cards.n.NecromanticSelection.class)); cards.add(new SetCardInfo("Nevinyrral's Disk", 217, Rarity.RARE, mage.cards.n.NevinyrralsDisk.class)); + cards.add(new SetCardInfo("New Blood", 19, Rarity.RARE, mage.cards.n.NewBlood.class)); cards.add(new SetCardInfo("Nihil Spellbomb", 218, Rarity.COMMON, mage.cards.n.NihilSpellbomb.class)); cards.add(new SetCardInfo("Nin, the Pain Artist", 183, Rarity.RARE, mage.cards.n.NinThePainArtist.class)); cards.add(new SetCardInfo("Nissa's Pilgrimage", 155, Rarity.COMMON, mage.cards.n.NissasPilgrimage.class)); @@ -300,6 +301,7 @@ public class Commander2017 extends ExpansionSet { cards.add(new SetCardInfo("Spelltwine", 94, Rarity.RARE, mage.cards.s.Spelltwine.class)); cards.add(new SetCardInfo("Spirit of the Hearth", 73, Rarity.RARE, mage.cards.s.SpiritOfTheHearth.class)); cards.add(new SetCardInfo("Staff of Nin", 224, Rarity.RARE, mage.cards.s.StaffOfNin.class)); + cards.add(new SetCardInfo("Stalking Leonin", 7, Rarity.RARE, mage.cards.s.StalkingLeonin.class)); cards.add(new SetCardInfo("Steel Hellkite", 225, Rarity.RARE, mage.cards.s.SteelHellkite.class)); cards.add(new SetCardInfo("Stirring Wildwood", 281, Rarity.RARE, mage.cards.s.StirringWildwood.class)); cards.add(new SetCardInfo("Stone Quarry", 282, Rarity.UNCOMMON, mage.cards.s.StoneQuarry.class)); diff --git a/Mage.Sets/src/mage/sets/CommanderAnthology.java b/Mage.Sets/src/mage/sets/CommanderAnthology.java index f0a30197dd..fc943136b2 100644 --- a/Mage.Sets/src/mage/sets/CommanderAnthology.java +++ b/Mage.Sets/src/mage/sets/CommanderAnthology.java @@ -36,6 +36,7 @@ import mage.constants.SetType; * @author fireshoes */ public class CommanderAnthology extends ExpansionSet { + private static final CommanderAnthology instance = new CommanderAnthology(); public static CommanderAnthology getInstance() { @@ -246,7 +247,7 @@ public class CommanderAnthology extends ExpansionSet { cards.add(new SetCardInfo("Plains", 290, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Plains", 291, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Plains", 292, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Polluted Mire", 265, Rarity.COMMON, mage.cards.p.PollutedMire.class)); + cards.add(new SetCardInfo("Polluted Mire", 265, Rarity.COMMON, mage.cards.p.PollutedMire.class)); cards.add(new SetCardInfo("Praetor's Counsel", 134, Rarity.MYTHIC, mage.cards.p.PraetorsCounsel.class)); cards.add(new SetCardInfo("Predator, Flagship", 225, Rarity.RARE, mage.cards.p.PredatorFlagship.class)); cards.add(new SetCardInfo("Presence of Gond", 135, Rarity.COMMON, mage.cards.p.PresenceOfGond.class)); diff --git a/Mage.Sets/src/mage/sets/CommandersArsenal.java b/Mage.Sets/src/mage/sets/CommandersArsenal.java index 91cde73760..f400cd6add 100644 --- a/Mage.Sets/src/mage/sets/CommandersArsenal.java +++ b/Mage.Sets/src/mage/sets/CommandersArsenal.java @@ -35,7 +35,6 @@ import mage.constants.SetType; * * @author fireshoes */ - public class CommandersArsenal extends ExpansionSet { private static final CommandersArsenal instance = new CommandersArsenal(); diff --git a/Mage.Sets/src/mage/sets/Conflux.java b/Mage.Sets/src/mage/sets/Conflux.java index 4e78923fab..82606f9983 100644 --- a/Mage.Sets/src/mage/sets/Conflux.java +++ b/Mage.Sets/src/mage/sets/Conflux.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; diff --git a/Mage.Sets/src/mage/sets/Conspiracy.java b/Mage.Sets/src/mage/sets/Conspiracy.java index 64cbdc9864..caa71dafb6 100644 --- a/Mage.Sets/src/mage/sets/Conspiracy.java +++ b/Mage.Sets/src/mage/sets/Conspiracy.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -36,7 +35,6 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class Conspiracy extends ExpansionSet { private static final Conspiracy instance = new Conspiracy(); @@ -239,4 +237,4 @@ public class Conspiracy extends ExpansionSet { cards.add(new SetCardInfo("Zombie Goliath", 135, Rarity.COMMON, mage.cards.z.ZombieGoliath.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/ConspiracyTakeTheCrown.java b/Mage.Sets/src/mage/sets/ConspiracyTakeTheCrown.java index 4a707eeba6..0cda5865fd 100644 --- a/Mage.Sets/src/mage/sets/ConspiracyTakeTheCrown.java +++ b/Mage.Sets/src/mage/sets/ConspiracyTakeTheCrown.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -36,7 +35,6 @@ import mage.constants.SetType; * * @author fireshoes */ - public class ConspiracyTakeTheCrown extends ExpansionSet { private static final ConspiracyTakeTheCrown instance = new ConspiracyTakeTheCrown(); @@ -131,6 +129,7 @@ public class ConspiracyTakeTheCrown extends ExpansionSet { cards.add(new SetCardInfo("Goblin Tunneler", 160, Rarity.COMMON, mage.cards.g.GoblinTunneler.class)); cards.add(new SetCardInfo("Gods Willing", 88, Rarity.COMMON, mage.cards.g.GodsWilling.class)); cards.add(new SetCardInfo("Gratuitous Violence", 161, Rarity.RARE, mage.cards.g.GratuitousViolence.class)); + cards.add(new SetCardInfo("Grenzo's Ruffians", 55, Rarity.UNCOMMON, mage.cards.g.GrenzosRuffians.class)); cards.add(new SetCardInfo("Grenzo, Havoc Raiser", 54, Rarity.RARE, mage.cards.g.GrenzoHavocRaiser.class)); cards.add(new SetCardInfo("Gruul War Chant", 203, Rarity.UNCOMMON, mage.cards.g.GruulWarChant.class)); cards.add(new SetCardInfo("Guardian of the Gateless", 89, Rarity.UNCOMMON, mage.cards.g.GuardianOfTheGateless.class)); diff --git a/Mage.Sets/src/mage/sets/DarkAscension.java b/Mage.Sets/src/mage/sets/DarkAscension.java index 919dab51ce..6655d39aa6 100644 --- a/Mage.Sets/src/mage/sets/DarkAscension.java +++ b/Mage.Sets/src/mage/sets/DarkAscension.java @@ -24,7 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -226,4 +226,4 @@ public class DarkAscension extends ExpansionSet { cards.add(new SetCardInfo("Young Wolf", 134, Rarity.COMMON, mage.cards.y.YoungWolf.class)); cards.add(new SetCardInfo("Zombie Apocalypse", 80, Rarity.RARE, mage.cards.z.ZombieApocalypse.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/Darksteel.java b/Mage.Sets/src/mage/sets/Darksteel.java index d26fe1ecd7..eae36ce1cd 100644 --- a/Mage.Sets/src/mage/sets/Darksteel.java +++ b/Mage.Sets/src/mage/sets/Darksteel.java @@ -30,7 +30,7 @@ public class Darksteel extends ExpansionSet { cards.add(new SetCardInfo("Arcane Spyglass", 93, Rarity.COMMON, mage.cards.a.ArcaneSpyglass.class)); cards.add(new SetCardInfo("Arcbound Bruiser", 94, Rarity.COMMON, mage.cards.a.ArcboundBruiser.class)); cards.add(new SetCardInfo("Arcbound Crusher", 95, Rarity.UNCOMMON, mage.cards.a.ArcboundCrusher.class)); - cards.add(new SetCardInfo("Arcbound Fiend", 96, Rarity.UNCOMMON, mage.cards.a.ArcboundFiend.class)); + cards.add(new SetCardInfo("Arcbound Fiend", 96, Rarity.UNCOMMON, mage.cards.a.ArcboundFiend.class)); cards.add(new SetCardInfo("Arcbound Hybrid", 97, Rarity.COMMON, mage.cards.a.ArcboundHybrid.class)); cards.add(new SetCardInfo("Arcbound Lancer", 98, Rarity.UNCOMMON, mage.cards.a.ArcboundLancer.class)); cards.add(new SetCardInfo("Arcbound Overseer", 99, Rarity.RARE, mage.cards.a.ArcboundOverseer.class)); @@ -44,7 +44,7 @@ public class Darksteel extends ExpansionSet { cards.add(new SetCardInfo("Barbed Lightning", 55, Rarity.COMMON, mage.cards.b.BarbedLightning.class)); cards.add(new SetCardInfo("Blinkmoth Nexus", 163, Rarity.RARE, mage.cards.b.BlinkmothNexus.class)); cards.add(new SetCardInfo("Burden of Greed", 38, Rarity.COMMON, mage.cards.b.BurdenOfGreed.class)); - cards.add(new SetCardInfo("Carry Away", 19, Rarity.UNCOMMON, mage.cards.c.CarryAway.class)); + cards.add(new SetCardInfo("Carry Away", 19, Rarity.UNCOMMON, mage.cards.c.CarryAway.class)); cards.add(new SetCardInfo("Chimeric Egg", 106, Rarity.UNCOMMON, mage.cards.c.ChimericEgg.class)); cards.add(new SetCardInfo("Chittering Rats", 39, Rarity.COMMON, mage.cards.c.ChitteringRats.class)); cards.add(new SetCardInfo("Chromescale Drake", 20, Rarity.RARE, mage.cards.c.ChromescaleDrake.class)); @@ -78,6 +78,7 @@ public class Darksteel extends ExpansionSet { cards.add(new SetCardInfo("Fireball", 60, Rarity.UNCOMMON, mage.cards.f.Fireball.class)); cards.add(new SetCardInfo("Flamebreak", 61, Rarity.RARE, mage.cards.f.Flamebreak.class)); cards.add(new SetCardInfo("Furnace Dragon", 62, Rarity.RARE, mage.cards.f.FurnaceDragon.class)); + cards.add(new SetCardInfo("Gemini Engine", 121, Rarity.RARE, mage.cards.g.GeminiEngine.class)); cards.add(new SetCardInfo("Genesis Chamber", 122, Rarity.UNCOMMON, mage.cards.g.GenesisChamber.class)); cards.add(new SetCardInfo("Geth's Grimoire", 123, Rarity.UNCOMMON, mage.cards.g.GethsGrimoire.class)); cards.add(new SetCardInfo("Goblin Archaeologist", 63, Rarity.UNCOMMON, mage.cards.g.GoblinArchaeologist.class)); @@ -87,7 +88,7 @@ public class Darksteel extends ExpansionSet { cards.add(new SetCardInfo("Heartseeker", 124, Rarity.RARE, mage.cards.h.Heartseeker.class)); cards.add(new SetCardInfo("Hoverguard Observer", 22, Rarity.UNCOMMON, mage.cards.h.HoverguardObserver.class)); cards.add(new SetCardInfo("Hunger of the Nim", 46, Rarity.COMMON, mage.cards.h.HungerOfTheNim.class)); - cards.add(new SetCardInfo("Infested Roothold", 76, Rarity.UNCOMMON, mage.cards.i.InfestedRoothold.class)); + cards.add(new SetCardInfo("Infested Roothold", 76, Rarity.UNCOMMON, mage.cards.i.InfestedRoothold.class)); cards.add(new SetCardInfo("Inflame", 64, Rarity.COMMON, mage.cards.i.Inflame.class)); cards.add(new SetCardInfo("Juggernaut", 125, Rarity.UNCOMMON, mage.cards.j.Juggernaut.class)); cards.add(new SetCardInfo("Karstoderm", 77, Rarity.UNCOMMON, mage.cards.k.Karstoderm.class)); @@ -136,7 +137,7 @@ public class Darksteel extends ExpansionSet { cards.add(new SetCardInfo("Savage Beating", 67, Rarity.RARE, mage.cards.s.SavageBeating.class)); cards.add(new SetCardInfo("Scavenging Scarab", 51, Rarity.COMMON, mage.cards.s.ScavengingScarab.class)); cards.add(new SetCardInfo("Screams from Within", 52, Rarity.UNCOMMON, mage.cards.s.ScreamsFromWithin.class)); - cards.add(new SetCardInfo("Second Sight", 33, Rarity.UNCOMMON, mage.cards.s.SecondSight.class)); + cards.add(new SetCardInfo("Second Sight", 33, Rarity.UNCOMMON, mage.cards.s.SecondSight.class)); cards.add(new SetCardInfo("Serum Powder", 138, Rarity.RARE, mage.cards.s.SerumPowder.class)); cards.add(new SetCardInfo("Shield of Kaldra", 139, Rarity.RARE, mage.cards.s.ShieldOfKaldra.class)); cards.add(new SetCardInfo("Shunt", 68, Rarity.RARE, mage.cards.s.Shunt.class)); @@ -165,7 +166,7 @@ public class Darksteel extends ExpansionSet { cards.add(new SetCardInfo("Test of Faith", 17, Rarity.UNCOMMON, mage.cards.t.TestOfFaith.class)); cards.add(new SetCardInfo("Thunderstaff", 153, Rarity.UNCOMMON, mage.cards.t.Thunderstaff.class)); cards.add(new SetCardInfo("Trinisphere", 154, Rarity.RARE, mage.cards.t.Trinisphere.class)); - cards.add(new SetCardInfo("Turn the Tables", 18, Rarity.RARE, mage.cards.t.TurnTheTables.class)); + cards.add(new SetCardInfo("Turn the Tables", 18, Rarity.RARE, mage.cards.t.TurnTheTables.class)); cards.add(new SetCardInfo("Unforge", 71, Rarity.COMMON, mage.cards.u.Unforge.class)); cards.add(new SetCardInfo("Ur-Golem's Eye", 155, Rarity.COMMON, mage.cards.u.UrGolemsEye.class)); cards.add(new SetCardInfo("Vedalken Engineer", 35, Rarity.COMMON, mage.cards.v.VedalkenEngineer.class)); diff --git a/Mage.Sets/src/mage/sets/Dissension.java b/Mage.Sets/src/mage/sets/Dissension.java index 86ce3a307e..3bc0aaaf64 100644 --- a/Mage.Sets/src/mage/sets/Dissension.java +++ b/Mage.Sets/src/mage/sets/Dissension.java @@ -24,7 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -71,6 +71,7 @@ public class Dissension extends ExpansionSet { cards.add(new SetCardInfo("Blood Crypt", 171, Rarity.RARE, mage.cards.b.BloodCrypt.class)); cards.add(new SetCardInfo("Bond of Agony", 38, Rarity.UNCOMMON, mage.cards.b.BondOfAgony.class)); cards.add(new SetCardInfo("Bound // Determined", 149, Rarity.RARE, mage.cards.b.BoundDetermined.class)); + cards.add(new SetCardInfo("Brace for Impact", 5, Rarity.UNCOMMON, mage.cards.b.BraceForImpact.class)); cards.add(new SetCardInfo("Brain Pry", 39, Rarity.UNCOMMON, mage.cards.b.BrainPry.class)); cards.add(new SetCardInfo("Breeding Pool", 172, Rarity.RARE, mage.cards.b.BreedingPool.class)); cards.add(new SetCardInfo("Bronze Bombshell", 160, Rarity.RARE, mage.cards.b.BronzeBombshell.class)); @@ -91,6 +92,7 @@ public class Dissension extends ExpansionSet { cards.add(new SetCardInfo("Dovescape", 143, Rarity.RARE, mage.cards.d.Dovescape.class)); cards.add(new SetCardInfo("Dread Slag", 109, Rarity.RARE, mage.cards.d.DreadSlag.class)); cards.add(new SetCardInfo("Drekavac", 43, Rarity.UNCOMMON, mage.cards.d.Drekavac.class)); + cards.add(new SetCardInfo("Elemental Resonance", 83, Rarity.RARE, mage.cards.e.ElementalResonance.class)); cards.add(new SetCardInfo("Enemy of the Guildpact", 44, Rarity.COMMON, mage.cards.e.EnemyOfTheGuildpact.class)); cards.add(new SetCardInfo("Enigma Eidolon", 24, Rarity.COMMON, mage.cards.e.EnigmaEidolon.class)); cards.add(new SetCardInfo("Entropic Eidolon", 45, Rarity.COMMON, mage.cards.e.EntropicEidolon.class)); @@ -178,6 +180,7 @@ public class Dissension extends ExpansionSet { cards.add(new SetCardInfo("Skullmead Cauldron", 167, Rarity.UNCOMMON, mage.cards.s.SkullmeadCauldron.class)); cards.add(new SetCardInfo("Sky Hussar", 131, Rarity.UNCOMMON, mage.cards.s.SkyHussar.class)); cards.add(new SetCardInfo("Skyscribing", 32, Rarity.UNCOMMON, mage.cards.s.Skyscribing.class)); + cards.add(new SetCardInfo("Slaughterhouse Bouncer", 54, Rarity.COMMON, mage.cards.s.SlaughterhouseBouncer.class)); cards.add(new SetCardInfo("Slithering Shade", 55, Rarity.UNCOMMON, mage.cards.s.SlitheringShade.class)); cards.add(new SetCardInfo("Soulsworn Jury", 17, Rarity.COMMON, mage.cards.s.SoulswornJury.class)); cards.add(new SetCardInfo("Spell Snare", 33, Rarity.UNCOMMON, mage.cards.s.SpellSnare.class)); @@ -196,6 +199,7 @@ public class Dissension extends ExpansionSet { cards.add(new SetCardInfo("Trial // Error", 158, Rarity.UNCOMMON, mage.cards.t.TrialError.class)); cards.add(new SetCardInfo("Trygon Predator", 133, Rarity.UNCOMMON, mage.cards.t.TrygonPredator.class)); cards.add(new SetCardInfo("Twinstrike", 134, Rarity.UNCOMMON, mage.cards.t.Twinstrike.class)); + cards.add(new SetCardInfo("Unliving Psychopath", 56, Rarity.RARE, mage.cards.u.UnlivingPsychopath.class)); cards.add(new SetCardInfo("Utopia Sprawl", 99, Rarity.COMMON, mage.cards.u.UtopiaSprawl.class)); cards.add(new SetCardInfo("Utvara Scalper", 76, Rarity.COMMON, mage.cards.u.UtvaraScalper.class)); cards.add(new SetCardInfo("Valor Made Real", 20, Rarity.COMMON, mage.cards.v.ValorMadeReal.class)); diff --git a/Mage.Sets/src/mage/sets/DivineVsDemonic.java b/Mage.Sets/src/mage/sets/DivineVsDemonic.java index f8c5463fa5..004315de58 100644 --- a/Mage.Sets/src/mage/sets/DivineVsDemonic.java +++ b/Mage.Sets/src/mage/sets/DivineVsDemonic.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -36,8 +35,8 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class DivineVsDemonic extends ExpansionSet { + private static final DivineVsDemonic instance = new DivineVsDemonic(); public static DivineVsDemonic getInstance() { @@ -111,4 +110,4 @@ public class DivineVsDemonic extends ExpansionSet { cards.add(new SetCardInfo("Unholy Strength", 47, Rarity.COMMON, mage.cards.u.UnholyStrength.class)); cards.add(new SetCardInfo("Venerable Monk", 5, Rarity.COMMON, mage.cards.v.VenerableMonk.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/DragonsMaze.java b/Mage.Sets/src/mage/sets/DragonsMaze.java index a02daa833a..259c830fbd 100644 --- a/Mage.Sets/src/mage/sets/DragonsMaze.java +++ b/Mage.Sets/src/mage/sets/DragonsMaze.java @@ -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; import java.util.ArrayList; @@ -42,7 +41,6 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class DragonsMaze extends ExpansionSet { private static final DragonsMaze instance = new DragonsMaze(); diff --git a/Mage.Sets/src/mage/sets/DragonsOfTarkir.java b/Mage.Sets/src/mage/sets/DragonsOfTarkir.java index f7f361d4dc..c47434c7e4 100644 --- a/Mage.Sets/src/mage/sets/DragonsOfTarkir.java +++ b/Mage.Sets/src/mage/sets/DragonsOfTarkir.java @@ -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; import mage.cards.ExpansionSet; @@ -36,7 +35,6 @@ import mage.constants.SetType; * * @author fireshoes */ - public class DragonsOfTarkir extends ExpansionSet { private static final DragonsOfTarkir instance = new DragonsOfTarkir(); diff --git a/Mage.Sets/src/mage/sets/DuelsOfThePlaneswalkers.java b/Mage.Sets/src/mage/sets/DuelsOfThePlaneswalkers.java index 90e6b7ee4a..ad91681447 100644 --- a/Mage.Sets/src/mage/sets/DuelsOfThePlaneswalkers.java +++ b/Mage.Sets/src/mage/sets/DuelsOfThePlaneswalkers.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -36,8 +35,8 @@ import mage.constants.SetType; * * @author Shootbot */ - public class DuelsOfThePlaneswalkers extends ExpansionSet { + private static final DuelsOfThePlaneswalkers instance = new DuelsOfThePlaneswalkers(); public static DuelsOfThePlaneswalkers getInstance() { diff --git a/Mage.Sets/src/mage/sets/EighthEdition.java b/Mage.Sets/src/mage/sets/EighthEdition.java index c8f54418b5..1d6c7f307a 100644 --- a/Mage.Sets/src/mage/sets/EighthEdition.java +++ b/Mage.Sets/src/mage/sets/EighthEdition.java @@ -347,7 +347,7 @@ public class EighthEdition extends ExpansionSet { cards.add(new SetCardInfo("Urza's Power Plant", 329, Rarity.COMMON, mage.cards.u.UrzasPowerPlant.class)); cards.add(new SetCardInfo("Urza's Tower", 330, Rarity.COMMON, mage.cards.u.UrzasTower.class)); cards.add(new SetCardInfo("Vampiric Spirit", 170, Rarity.RARE, mage.cards.v.VampiricSpirit.class)); - cards.add(new SetCardInfo("Venerable Monk", 55, Rarity.COMMON, mage.cards.v.VenerableMonk.class)); + cards.add(new SetCardInfo("Venerable Monk", 55, Rarity.COMMON, mage.cards.v.VenerableMonk.class)); cards.add(new SetCardInfo("Verduran Enchantress", 285, Rarity.RARE, mage.cards.v.VerduranEnchantress.class)); cards.add(new SetCardInfo("Vernal Bloom", 286, Rarity.RARE, mage.cards.v.VernalBloom.class)); cards.add(new SetCardInfo("Viashino Sandstalker", 230, Rarity.UNCOMMON, mage.cards.v.ViashinoSandstalker.class)); diff --git a/Mage.Sets/src/mage/sets/EighthEditionBox.java b/Mage.Sets/src/mage/sets/EighthEditionBox.java index 1bf413e65f..5806e8b36f 100644 --- a/Mage.Sets/src/mage/sets/EighthEditionBox.java +++ b/Mage.Sets/src/mage/sets/EighthEditionBox.java @@ -5,17 +5,16 @@ import mage.constants.Rarity; import mage.constants.SetType; public class EighthEditionBox extends ExpansionSet { - + private static final EighthEditionBox instance = new EighthEditionBox(); - + public static EighthEditionBox getInstance() { return instance; } - private EighthEditionBox() { - super("EighthEditionBox","8EB", ExpansionSet.buildDate(2003, 7, 28), SetType.CORE); - this.hasBoosters=false; + super("EighthEditionBox", "8EB", ExpansionSet.buildDate(2003, 7, 28), SetType.CORE); + this.hasBoosters = false; cards.add(new SetCardInfo("Eager Cadet", 1, Rarity.COMMON, mage.cards.e.EagerCadet.class)); cards.add(new SetCardInfo("Vengeance", 2, Rarity.UNCOMMON, mage.cards.v.Vengeance.class)); cards.add(new SetCardInfo("Giant Octopus", 3, Rarity.COMMON, mage.cards.g.GiantOctopus.class)); @@ -24,4 +23,4 @@ public class EighthEditionBox extends ExpansionSet { cards.add(new SetCardInfo("Enormous Baloth", 6, Rarity.UNCOMMON, mage.cards.e.EnormousBaloth.class)); cards.add(new SetCardInfo("Silverback Ape", 7, Rarity.UNCOMMON, mage.cards.s.SilverbackApe.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/ElspethVsKiora.java b/Mage.Sets/src/mage/sets/ElspethVsKiora.java index b04f325d84..20fefabd2c 100644 --- a/Mage.Sets/src/mage/sets/ElspethVsKiora.java +++ b/Mage.Sets/src/mage/sets/ElspethVsKiora.java @@ -37,6 +37,7 @@ import mage.constants.SetType; * @author fireshoes */ public class ElspethVsKiora extends ExpansionSet { + private static final ElspethVsKiora instance = new ElspethVsKiora(); public static ElspethVsKiora getInstance() { diff --git a/Mage.Sets/src/mage/sets/ElspethVsTezzeret.java b/Mage.Sets/src/mage/sets/ElspethVsTezzeret.java index 95189a69dd..d598225404 100644 --- a/Mage.Sets/src/mage/sets/ElspethVsTezzeret.java +++ b/Mage.Sets/src/mage/sets/ElspethVsTezzeret.java @@ -5,6 +5,7 @@ import mage.constants.Rarity; import mage.constants.SetType; public class ElspethVsTezzeret extends ExpansionSet { + private static final ElspethVsTezzeret instance = new ElspethVsTezzeret(); public static ElspethVsTezzeret getInstance() { diff --git a/Mage.Sets/src/mage/sets/ElvesVsGoblins.java b/Mage.Sets/src/mage/sets/ElvesVsGoblins.java index 596c5b1282..544d12d780 100644 --- a/Mage.Sets/src/mage/sets/ElvesVsGoblins.java +++ b/Mage.Sets/src/mage/sets/ElvesVsGoblins.java @@ -3,7 +3,6 @@ * To change this template file, choose Tools | Templates * and open the template in the editor. */ - package mage.sets; import mage.cards.ExpansionSet; @@ -14,8 +13,8 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class ElvesVsGoblins extends ExpansionSet { + private static final ElvesVsGoblins instance = new ElvesVsGoblins(); public static ElvesVsGoblins getInstance() { @@ -89,4 +88,4 @@ public class ElvesVsGoblins extends ExpansionSet { cards.add(new SetCardInfo("Wood Elves", 18, Rarity.COMMON, mage.cards.w.WoodElves.class)); cards.add(new SetCardInfo("Wren's Run Vanquisher", 19, Rarity.UNCOMMON, mage.cards.w.WrensRunVanquisher.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/EternalMasters.java b/Mage.Sets/src/mage/sets/EternalMasters.java index 34725c51ce..547271a0ff 100644 --- a/Mage.Sets/src/mage/sets/EternalMasters.java +++ b/Mage.Sets/src/mage/sets/EternalMasters.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -92,7 +91,7 @@ public class EternalMasters extends ExpansionSet { cards.add(new SetCardInfo("Chain Lightning", 123, Rarity.UNCOMMON, mage.cards.c.ChainLightning.class)); cards.add(new SetCardInfo("Chrome Mox", 219, Rarity.MYTHIC, mage.cards.c.ChromeMox.class)); cards.add(new SetCardInfo("Civic Wayfinder", 161, Rarity.COMMON, mage.cards.c.CivicWayfinder.class)); - cards.add(new SetCardInfo("Coalition Honor Guard", 6, Rarity.COMMON, mage.cards.c.CoalitionHonorGuard.class)); + cards.add(new SetCardInfo("Coalition Honor Guard", 6, Rarity.COMMON, mage.cards.c.CoalitionHonorGuard.class)); cards.add(new SetCardInfo("Commune with the Gods", 162, Rarity.COMMON, mage.cards.c.CommuneWithTheGods.class)); cards.add(new SetCardInfo("Control Magic", 42, Rarity.RARE, mage.cards.c.ControlMagic.class)); cards.add(new SetCardInfo("Counterspell", 43, Rarity.COMMON, mage.cards.c.Counterspell.class)); diff --git a/Mage.Sets/src/mage/sets/Eventide.java b/Mage.Sets/src/mage/sets/Eventide.java index 825c59b56f..b478ca71b1 100644 --- a/Mage.Sets/src/mage/sets/Eventide.java +++ b/Mage.Sets/src/mage/sets/Eventide.java @@ -5,6 +5,7 @@ import mage.constants.Rarity; import mage.constants.SetType; public class Eventide extends ExpansionSet { + private static final Eventide instance = new Eventide(); public static Eventide getInstance() { diff --git a/Mage.Sets/src/mage/sets/Exodus.java b/Mage.Sets/src/mage/sets/Exodus.java index 0221bc232c..65d7537e62 100644 --- a/Mage.Sets/src/mage/sets/Exodus.java +++ b/Mage.Sets/src/mage/sets/Exodus.java @@ -76,6 +76,7 @@ public class Exodus extends ExpansionSet { cards.add(new SetCardInfo("Dauthi Warlord", 59, Rarity.UNCOMMON, mage.cards.d.DauthiWarlord.class)); cards.add(new SetCardInfo("Death's Duet", 60, Rarity.COMMON, mage.cards.d.DeathsDuet.class)); cards.add(new SetCardInfo("Dominating Licid", 30, Rarity.RARE, mage.cards.d.DominatingLicid.class)); + cards.add(new SetCardInfo("Elven Palisade", 109, Rarity.UNCOMMON, mage.cards.e.ElvenPalisade.class)); cards.add(new SetCardInfo("Elvish Berserker", 110, Rarity.COMMON, mage.cards.e.ElvishBerserker.class)); cards.add(new SetCardInfo("Entropic Specter", 61, Rarity.RARE, mage.cards.e.EntropicSpecter.class)); cards.add(new SetCardInfo("Ephemeron", 31, Rarity.RARE, mage.cards.e.Ephemeron.class)); @@ -103,6 +104,7 @@ public class Exodus extends ExpansionSet { cards.add(new SetCardInfo("Merfolk Looter", 39, Rarity.COMMON, mage.cards.m.MerfolkLooter.class)); cards.add(new SetCardInfo("Mindless Automaton", 135, Rarity.RARE, mage.cards.m.MindlessAutomaton.class)); cards.add(new SetCardInfo("Mind Over Matter", 40, Rarity.RARE, mage.cards.m.MindOverMatter.class)); + cards.add(new SetCardInfo("Mirozel", 41, Rarity.UNCOMMON, mage.cards.m.Mirozel.class)); cards.add(new SetCardInfo("Mirri, Cat Warrior", 114, Rarity.RARE, mage.cards.m.MirriCatWarrior.class)); cards.add(new SetCardInfo("Nausea", 67, Rarity.COMMON, mage.cards.n.Nausea.class)); cards.add(new SetCardInfo("Necrologia", 68, Rarity.UNCOMMON, mage.cards.n.Necrologia.class)); @@ -121,6 +123,7 @@ public class Exodus extends ExpansionSet { cards.add(new SetCardInfo("Pit Spawn", 70, Rarity.RARE, mage.cards.p.PitSpawn.class)); cards.add(new SetCardInfo("Plaguebearer", 71, Rarity.RARE, mage.cards.p.Plaguebearer.class)); cards.add(new SetCardInfo("Plated Rootwalla", 116, Rarity.COMMON, mage.cards.p.PlatedRootwalla.class)); + cards.add(new SetCardInfo("Predatory Hunger", 117, Rarity.COMMON, mage.cards.p.PredatoryHunger.class)); cards.add(new SetCardInfo("Price of Progress", 95, Rarity.UNCOMMON, mage.cards.p.PriceOfProgress.class)); cards.add(new SetCardInfo("Pygmy Troll", 118, Rarity.COMMON, mage.cards.p.PygmyTroll.class)); cards.add(new SetCardInfo("Rabid Wolverines", 119, Rarity.COMMON, mage.cards.r.RabidWolverines.class)); @@ -131,15 +134,19 @@ public class Exodus extends ExpansionSet { cards.add(new SetCardInfo("Reclaim", 120, Rarity.COMMON, mage.cards.r.Reclaim.class)); cards.add(new SetCardInfo("Reconnaissance", 17, Rarity.UNCOMMON, mage.cards.r.Reconnaissance.class)); cards.add(new SetCardInfo("Recurring Nightmare", 72, Rarity.RARE, mage.cards.r.RecurringNightmare.class)); + cards.add(new SetCardInfo("Resuscitate", 121, Rarity.UNCOMMON, mage.cards.r.Resuscitate.class)); cards.add(new SetCardInfo("Robe of Mirrors", 43, Rarity.COMMON, mage.cards.r.RobeOfMirrors.class)); cards.add(new SetCardInfo("Rootwater Alligator", 122, Rarity.COMMON, mage.cards.r.RootwaterAlligator.class)); cards.add(new SetCardInfo("Rootwater Mystic", 44, Rarity.COMMON, mage.cards.r.RootwaterMystic.class)); cards.add(new SetCardInfo("Sabertooth Wyvern", 99, Rarity.UNCOMMON, mage.cards.s.SabertoothWyvern.class)); + cards.add(new SetCardInfo("Scalding Salamander", 100, Rarity.UNCOMMON, mage.cards.s.ScaldingSalamander.class)); + cards.add(new SetCardInfo("Scare Tactics", 73, Rarity.COMMON, mage.cards.s.ScareTactics.class)); cards.add(new SetCardInfo("School of Piranha", 45, Rarity.COMMON, mage.cards.s.SchoolOfPiranha.class)); cards.add(new SetCardInfo("Scrivener", 46, Rarity.UNCOMMON, mage.cards.s.Scrivener.class)); cards.add(new SetCardInfo("Seismic Assault", 101, Rarity.RARE, mage.cards.s.SeismicAssault.class)); cards.add(new SetCardInfo("Shackles", 18, Rarity.COMMON, mage.cards.s.Shackles.class)); cards.add(new SetCardInfo("Shattering Pulse", 102, Rarity.COMMON, mage.cards.s.ShatteringPulse.class)); + cards.add(new SetCardInfo("Shield Mate", 19, Rarity.COMMON, mage.cards.s.ShieldMate.class)); cards.add(new SetCardInfo("Skyshaper", 137, Rarity.UNCOMMON, mage.cards.s.Skyshaper.class)); cards.add(new SetCardInfo("Skyshroud Elite", 123, Rarity.UNCOMMON, mage.cards.s.SkyshroudElite.class)); cards.add(new SetCardInfo("Slaughter", 74, Rarity.UNCOMMON, mage.cards.s.Slaughter.class)); @@ -171,5 +178,6 @@ public class Exodus extends ExpansionSet { cards.add(new SetCardInfo("Whiptongue Frog", 52, Rarity.COMMON, mage.cards.w.WhiptongueFrog.class)); cards.add(new SetCardInfo("Wood Elves", 130, Rarity.COMMON, mage.cards.w.WoodElves.class)); cards.add(new SetCardInfo("Workhorse", 142, Rarity.RARE, mage.cards.w.Workhorse.class)); + cards.add(new SetCardInfo("Zealots en-Dal", 26, Rarity.UNCOMMON, mage.cards.z.ZealotsEnDal.class)); } } diff --git a/Mage.Sets/src/mage/sets/FallenEmpires.java b/Mage.Sets/src/mage/sets/FallenEmpires.java index 77c084713f..aa73229d50 100644 --- a/Mage.Sets/src/mage/sets/FallenEmpires.java +++ b/Mage.Sets/src/mage/sets/FallenEmpires.java @@ -235,6 +235,7 @@ public class FallenEmpires extends ExpansionSet { cards.add(new SetCardInfo("Thorn Thallid", 99, Rarity.COMMON, ThornThallid.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Thrull Champion", 29, Rarity.RARE, mage.cards.t.ThrullChampion.class)); cards.add(new SetCardInfo("Thrull Retainer", 30, Rarity.UNCOMMON, mage.cards.t.ThrullRetainer.class)); + cards.add(new SetCardInfo("Thrull Wizard", 31, Rarity.UNCOMMON, mage.cards.t.ThrullWizard.class)); cards.add(new SetCardInfo("Tidal Influence", 57, Rarity.UNCOMMON, mage.cards.t.TidalInfluence.class)); cards.add(new SetCardInfo("Vodalian Knights", 58, Rarity.RARE, mage.cards.v.VodalianKnights.class)); cards.add(new SetCardInfo("Vodalian Mage", 59, Rarity.COMMON, VodalianMage.class, NON_FULL_USE_VARIOUS)); diff --git a/Mage.Sets/src/mage/sets/FifthEdition.java b/Mage.Sets/src/mage/sets/FifthEdition.java index 57d1187fe9..c04cc7dae8 100644 --- a/Mage.Sets/src/mage/sets/FifthEdition.java +++ b/Mage.Sets/src/mage/sets/FifthEdition.java @@ -38,6 +38,7 @@ public class FifthEdition extends ExpansionSet { cards.add(new SetCardInfo("Adarkar Wastes", 410, Rarity.RARE, mage.cards.a.AdarkarWastes.class)); cards.add(new SetCardInfo("Air Elemental", 71, Rarity.UNCOMMON, mage.cards.a.AirElemental.class)); cards.add(new SetCardInfo("Akron Legionnaire", 278, Rarity.RARE, mage.cards.a.AkronLegionnaire.class)); + cards.add(new SetCardInfo("Alabaster Potion", 279, Rarity.COMMON, mage.cards.a.AlabasterPotion.class)); cards.add(new SetCardInfo("Aladdin's Ring", 346, Rarity.RARE, mage.cards.a.AladdinsRing.class)); cards.add(new SetCardInfo("Ambush Party", 208, Rarity.COMMON, mage.cards.a.AmbushParty.class)); cards.add(new SetCardInfo("Amulet of Kroog", 347, Rarity.COMMON, mage.cards.a.AmuletOfKroog.class)); @@ -176,6 +177,7 @@ public class FifthEdition extends ExpansionSet { cards.add(new SetCardInfo("Forest", 419, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Forest", 420, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Forget", 89, Rarity.RARE, mage.cards.f.Forget.class)); + cards.add(new SetCardInfo("Foxfire", 157, Rarity.COMMON, mage.cards.f.Foxfire.class)); cards.add(new SetCardInfo("Fountain of Youth", 372, Rarity.UNCOMMON, mage.cards.f.FountainOfYouth.class)); cards.add(new SetCardInfo("Frozen Shade", 25, Rarity.COMMON, mage.cards.f.FrozenShade.class)); cards.add(new SetCardInfo("Fungusaur", 158, Rarity.RARE, mage.cards.f.Fungusaur.class)); @@ -195,6 +197,7 @@ public class FifthEdition extends ExpansionSet { cards.add(new SetCardInfo("Goblin War Drums", 237, Rarity.COMMON, GoblinWarDrums.class)); cards.add(new SetCardInfo("Goblin Warrens", 238, Rarity.RARE, mage.cards.g.GoblinWarrens.class)); cards.add(new SetCardInfo("Grapeshot Catapult", 375, Rarity.COMMON, mage.cards.g.GrapeshotCatapult.class)); + cards.add(new SetCardInfo("Greater Realm of Preservation", 307, Rarity.UNCOMMON, mage.cards.g.GreaterRealmOfPreservation.class)); cards.add(new SetCardInfo("Grizzly Bears", 163, Rarity.COMMON, mage.cards.g.GrizzlyBears.class)); cards.add(new SetCardInfo("Havenwood Battleground", 421, Rarity.UNCOMMON, mage.cards.h.HavenwoodBattleground.class)); cards.add(new SetCardInfo("Heal", 308, Rarity.COMMON, mage.cards.h.Heal.class)); @@ -217,6 +220,7 @@ public class FifthEdition extends ExpansionSet { cards.add(new SetCardInfo("Imposing Visage", 241, Rarity.COMMON, mage.cards.i.ImposingVisage.class)); cards.add(new SetCardInfo("Incinerate", 242, Rarity.COMMON, mage.cards.i.Incinerate.class)); cards.add(new SetCardInfo("Inferno", 243, Rarity.RARE, mage.cards.i.Inferno.class)); + cards.add(new SetCardInfo("Infinite Hourglass", 378, Rarity.RARE, mage.cards.i.InfiniteHourglass.class)); cards.add(new SetCardInfo("Initiates of the Ebon Hand", 31, Rarity.COMMON, InitiatesOfTheEbonHand.class)); cards.add(new SetCardInfo("Instill Energy", 166, Rarity.UNCOMMON, mage.cards.i.InstillEnergy.class)); cards.add(new SetCardInfo("Ironclaw Orcs", 245, Rarity.COMMON, mage.cards.i.IronclawOrcs.class)); @@ -248,7 +252,9 @@ public class FifthEdition extends ExpansionSet { cards.add(new SetCardInfo("Knight of Stromgald", 33, Rarity.UNCOMMON, mage.cards.k.KnightOfStromgald.class)); cards.add(new SetCardInfo("Krovikan Fetish", 34, Rarity.COMMON, mage.cards.k.KrovikanFetish.class)); cards.add(new SetCardInfo("Krovikan Sorcerer", 96, Rarity.COMMON, mage.cards.k.KrovikanSorcerer.class)); + cards.add(new SetCardInfo("Labyrinth Minotaur", 97, Rarity.COMMON, mage.cards.l.LabyrinthMinotaur.class)); cards.add(new SetCardInfo("Leshrac's Rite", 35, Rarity.UNCOMMON, mage.cards.l.LeshracsRite.class)); + cards.add(new SetCardInfo("Leviathan", 98, Rarity.RARE, mage.cards.l.Leviathan.class)); cards.add(new SetCardInfo("Ley Druid", 170, Rarity.COMMON, mage.cards.l.LeyDruid.class)); cards.add(new SetCardInfo("Lhurgoyf", 171, Rarity.RARE, mage.cards.l.Lhurgoyf.class)); cards.add(new SetCardInfo("Library of Leng", 387, Rarity.UNCOMMON, mage.cards.l.LibraryOfLeng.class)); @@ -294,6 +300,7 @@ public class FifthEdition extends ExpansionSet { cards.add(new SetCardInfo("Orcish Artillery", 253, Rarity.UNCOMMON, mage.cards.o.OrcishArtillery.class)); cards.add(new SetCardInfo("Orcish Captain", 254, Rarity.UNCOMMON, mage.cards.o.OrcishCaptain.class)); cards.add(new SetCardInfo("Orcish Oriflamme", 257, Rarity.UNCOMMON, mage.cards.o.OrcishOriflamme.class)); + cards.add(new SetCardInfo("Orcish Squatters", 258, Rarity.RARE, mage.cards.o.OrcishSquatters.class)); cards.add(new SetCardInfo("Order of the Sacred Torch", 324, Rarity.RARE, mage.cards.o.OrderOfTheSacredTorch.class)); cards.add(new SetCardInfo("Order of the White Shield", 325, Rarity.UNCOMMON, mage.cards.o.OrderOfTheWhiteShield.class)); cards.add(new SetCardInfo("Orgg", 259, Rarity.RARE, mage.cards.o.Orgg.class)); @@ -352,6 +359,7 @@ public class FifthEdition extends ExpansionSet { cards.add(new SetCardInfo("Segovian Leviathan", 122, Rarity.UNCOMMON, mage.cards.s.SegovianLeviathan.class)); cards.add(new SetCardInfo("Sengir Autocrat", 55, Rarity.RARE, mage.cards.s.SengirAutocrat.class)); cards.add(new SetCardInfo("Serpent Generator", 397, Rarity.RARE, mage.cards.s.SerpentGenerator.class)); + cards.add(new SetCardInfo("Serra Paladin", 337, Rarity.UNCOMMON, mage.cards.s.SerraPaladin.class)); cards.add(new SetCardInfo("Shanodin Dryads", 187, Rarity.COMMON, mage.cards.s.ShanodinDryads.class)); cards.add(new SetCardInfo("Shapeshifter", 398, Rarity.UNCOMMON, mage.cards.s.Shapeshifter.class)); cards.add(new SetCardInfo("Shatter", 265, Rarity.COMMON, mage.cards.s.Shatter.class)); @@ -429,6 +437,7 @@ public class FifthEdition extends ExpansionSet { cards.add(new SetCardInfo("Wild Growth", 204, Rarity.COMMON, mage.cards.w.WildGrowth.class)); cards.add(new SetCardInfo("Winds of Change", 275, Rarity.RARE, mage.cards.w.WindsOfChange.class)); cards.add(new SetCardInfo("Wind Spirit", 136, Rarity.UNCOMMON, mage.cards.w.WindSpirit.class)); + cards.add(new SetCardInfo("Winter Blast", 205, Rarity.UNCOMMON, mage.cards.w.WinterBlast.class)); cards.add(new SetCardInfo("Winter Orb", 408, Rarity.RARE, mage.cards.w.WinterOrb.class)); cards.add(new SetCardInfo("Wolverine Pack", 206, Rarity.UNCOMMON, mage.cards.w.WolverinePack.class)); cards.add(new SetCardInfo("Wooden Sphere", 409, Rarity.UNCOMMON, mage.cards.w.WoodenSphere.class)); diff --git a/Mage.Sets/src/mage/sets/FourthEdition.java b/Mage.Sets/src/mage/sets/FourthEdition.java index 3f99bab8b0..f44d101070 100644 --- a/Mage.Sets/src/mage/sets/FourthEdition.java +++ b/Mage.Sets/src/mage/sets/FourthEdition.java @@ -55,6 +55,7 @@ public class FourthEdition extends ExpansionSet { this.ratioBoosterMythic = 0; cards.add(new SetCardInfo("Abomination", 1, Rarity.UNCOMMON, mage.cards.a.Abomination.class)); cards.add(new SetCardInfo("Air Elemental", 59, Rarity.UNCOMMON, mage.cards.a.AirElemental.class)); + cards.add(new SetCardInfo("Alabaster Potion", 251, Rarity.COMMON, mage.cards.a.AlabasterPotion.class)); cards.add(new SetCardInfo("Aladdin's Lamp", 309, Rarity.RARE, mage.cards.a.AladdinsLamp.class)); cards.add(new SetCardInfo("Aladdin's Ring", 310, Rarity.RARE, mage.cards.a.AladdinsRing.class)); cards.add(new SetCardInfo("Ali Baba", 193, Rarity.UNCOMMON, mage.cards.a.AliBaba.class)); @@ -150,6 +151,7 @@ public class FourthEdition extends ExpansionSet { cards.add(new SetCardInfo("Earthquake", 207, Rarity.RARE, mage.cards.e.Earthquake.class)); cards.add(new SetCardInfo("Ebony Horse", 336, Rarity.RARE, mage.cards.e.EbonyHorse.class)); cards.add(new SetCardInfo("El-Hajjaj", 18, Rarity.RARE, mage.cards.e.ElHajjaj.class)); + cards.add(new SetCardInfo("Elder Land Wurm", 274, Rarity.RARE, mage.cards.e.ElderLandWurm.class)); cards.add(new SetCardInfo("Elven Riders", 126, Rarity.UNCOMMON, mage.cards.e.ElvenRiders.class)); cards.add(new SetCardInfo("Elvish Archers", 127, Rarity.RARE, mage.cards.e.ElvishArchers.class)); cards.add(new SetCardInfo("Energy Flux", 68, Rarity.UNCOMMON, mage.cards.e.EnergyFlux.class)); @@ -229,6 +231,7 @@ public class FourthEdition extends ExpansionSet { cards.add(new SetCardInfo("Kormus Bell", 350, Rarity.RARE, mage.cards.k.KormusBell.class)); cards.add(new SetCardInfo("Land Leeches", 139, Rarity.COMMON, mage.cards.l.LandLeeches.class)); cards.add(new SetCardInfo("Land Tax", 284, Rarity.RARE, mage.cards.l.LandTax.class)); + cards.add(new SetCardInfo("Leviathan", 80, Rarity.RARE, mage.cards.l.Leviathan.class)); cards.add(new SetCardInfo("Ley Druid", 140, Rarity.UNCOMMON, mage.cards.l.LeyDruid.class)); cards.add(new SetCardInfo("Library of Leng", 351, Rarity.UNCOMMON, mage.cards.l.LibraryOfLeng.class)); cards.add(new SetCardInfo("Lifeforce", 141, Rarity.UNCOMMON, mage.cards.l.Lifeforce.class)); @@ -294,6 +297,7 @@ public class FourthEdition extends ExpansionSet { cards.add(new SetCardInfo("Pradesh Gypsies", 149, Rarity.COMMON, mage.cards.p.PradeshGypsies.class)); cards.add(new SetCardInfo("Primal Clay", 360, Rarity.RARE, mage.cards.p.PrimalClay.class)); cards.add(new SetCardInfo("Prodigal Sorcerer", 94, Rarity.COMMON, mage.cards.p.ProdigalSorcerer.class)); + cards.add(new SetCardInfo("Psionic Entity", 95, Rarity.RARE, mage.cards.p.PsionicEntity.class)); cards.add(new SetCardInfo("Psychic Venom", 96, Rarity.COMMON, mage.cards.p.PsychicVenom.class)); cards.add(new SetCardInfo("Purelace", 293, Rarity.RARE, mage.cards.p.Purelace.class)); cards.add(new SetCardInfo("Pyrotechnics", 235, Rarity.UNCOMMON, mage.cards.p.Pyrotechnics.class)); @@ -395,6 +399,7 @@ public class FourthEdition extends ExpansionSet { cards.add(new SetCardInfo("Wild Growth", 173, Rarity.COMMON, mage.cards.w.WildGrowth.class)); cards.add(new SetCardInfo("Will-o'-the-Wisp", 55, Rarity.RARE, mage.cards.w.WillOTheWisp.class)); cards.add(new SetCardInfo("Winds of Change", 250, Rarity.RARE, mage.cards.w.WindsOfChange.class)); + cards.add(new SetCardInfo("Winter Blast", 174, Rarity.UNCOMMON, mage.cards.w.WinterBlast.class)); cards.add(new SetCardInfo("Winter Orb", 376, Rarity.RARE, mage.cards.w.WinterOrb.class)); cards.add(new SetCardInfo("Wooden Sphere", 377, Rarity.UNCOMMON, mage.cards.w.WoodenSphere.class)); cards.add(new SetCardInfo("Word of Binding", 56, Rarity.COMMON, mage.cards.w.WordOfBinding.class)); diff --git a/Mage.Sets/src/mage/sets/FridayNightMagic.java b/Mage.Sets/src/mage/sets/FridayNightMagic.java index ccdf496885..89064a4c5f 100644 --- a/Mage.Sets/src/mage/sets/FridayNightMagic.java +++ b/Mage.Sets/src/mage/sets/FridayNightMagic.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; diff --git a/Mage.Sets/src/mage/sets/FutureSight.java b/Mage.Sets/src/mage/sets/FutureSight.java index b36d3af419..14ab9c9bfc 100644 --- a/Mage.Sets/src/mage/sets/FutureSight.java +++ b/Mage.Sets/src/mage/sets/FutureSight.java @@ -105,6 +105,7 @@ public class FutureSight extends ExpansionSet { cards.add(new SetCardInfo("Gathan Raiders", 99, Rarity.COMMON, mage.cards.g.GathanRaiders.class)); cards.add(new SetCardInfo("Ghostfire", 115, Rarity.COMMON, mage.cards.g.Ghostfire.class)); cards.add(new SetCardInfo("Gibbering Descent", 66, Rarity.RARE, mage.cards.g.GibberingDescent.class)); + cards.add(new SetCardInfo("Gift of Granite", 7, Rarity.COMMON, mage.cards.g.GiftOfGranite.class)); cards.add(new SetCardInfo("Glittering Wish", 156, Rarity.RARE, mage.cards.g.GlitteringWish.class)); cards.add(new SetCardInfo("Goldmeadow Lookout", 22, Rarity.UNCOMMON, mage.cards.g.GoldmeadowLookout.class)); cards.add(new SetCardInfo("Graven Cairns", 175, Rarity.RARE, mage.cards.g.GravenCairns.class)); @@ -118,6 +119,7 @@ public class FutureSight extends ExpansionSet { cards.add(new SetCardInfo("Homing Sliver", 118, Rarity.COMMON, mage.cards.h.HomingSliver.class)); cards.add(new SetCardInfo("Horizon Canopy", 177, Rarity.RARE, mage.cards.h.HorizonCanopy.class)); cards.add(new SetCardInfo("Ichor Slick", 68, Rarity.COMMON, mage.cards.i.IchorSlick.class)); + cards.add(new SetCardInfo("Imperial Mask", 23, Rarity.RARE, mage.cards.i.ImperialMask.class)); cards.add(new SetCardInfo("Imperiosaur", 145, Rarity.UNCOMMON, mage.cards.i.Imperiosaur.class)); cards.add(new SetCardInfo("Infiltrator il-Kor", 37, Rarity.COMMON, mage.cards.i.InfiltratorIlKor.class)); cards.add(new SetCardInfo("Intervention Pact", 8, Rarity.RARE, mage.cards.i.InterventionPact.class)); diff --git a/Mage.Sets/src/mage/sets/GameDay.java b/Mage.Sets/src/mage/sets/GameDay.java index c3d2702289..2935fa2844 100644 --- a/Mage.Sets/src/mage/sets/GameDay.java +++ b/Mage.Sets/src/mage/sets/GameDay.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; diff --git a/Mage.Sets/src/mage/sets/GarrukVsLiliana.java b/Mage.Sets/src/mage/sets/GarrukVsLiliana.java index 7e3c6f18ed..f3c0889bcc 100644 --- a/Mage.Sets/src/mage/sets/GarrukVsLiliana.java +++ b/Mage.Sets/src/mage/sets/GarrukVsLiliana.java @@ -3,7 +3,6 @@ * To change this template file, choose Tools | Templates * and open the template in the editor. */ - package mage.sets; import mage.cards.ExpansionSet; @@ -14,8 +13,8 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class GarrukVsLiliana extends ExpansionSet { + private static final GarrukVsLiliana instance = new GarrukVsLiliana(); public static GarrukVsLiliana getInstance() { @@ -90,4 +89,4 @@ public class GarrukVsLiliana extends ExpansionSet { cards.add(new SetCardInfo("Windstorm", 25, Rarity.UNCOMMON, mage.cards.w.Windstorm.class)); cards.add(new SetCardInfo("Wirewood Savage", 6, Rarity.COMMON, mage.cards.w.WirewoodSavage.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/GrandPrix.java b/Mage.Sets/src/mage/sets/GrandPrix.java index 144ea8de41..6fde3e6c14 100644 --- a/Mage.Sets/src/mage/sets/GrandPrix.java +++ b/Mage.Sets/src/mage/sets/GrandPrix.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -63,4 +62,4 @@ public class GrandPrix extends ExpansionSet { cards.add(new SetCardInfo("Umezawa's Jitte", 4, Rarity.RARE, mage.cards.u.UmezawasJitte.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/Guildpact.java b/Mage.Sets/src/mage/sets/Guildpact.java index 9cdde04922..5b51825dd8 100644 --- a/Mage.Sets/src/mage/sets/Guildpact.java +++ b/Mage.Sets/src/mage/sets/Guildpact.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -36,6 +35,7 @@ import mage.constants.SetType; * Created by IntelliJ IDEA. User: Loki Date: 20.12.10 Time: 21:01 */ public class Guildpact extends ExpansionSet { + private static final Guildpact instance = new Guildpact(); public static Guildpact getInstance() { @@ -61,6 +61,7 @@ public class Guildpact extends ExpansionSet { cards.add(new SetCardInfo("Beastmaster's Magemark", 80, Rarity.COMMON, mage.cards.b.BeastmastersMagemark.class)); cards.add(new SetCardInfo("Belfry Spirit", 2, Rarity.UNCOMMON, mage.cards.b.BelfrySpirit.class)); cards.add(new SetCardInfo("Benediction of Moons", 3, Rarity.COMMON, mage.cards.b.BenedictionOfMoons.class)); + cards.add(new SetCardInfo("Bioplasm", 81, Rarity.RARE, mage.cards.b.Bioplasm.class)); cards.add(new SetCardInfo("Blind Hunter", 102, Rarity.COMMON, mage.cards.b.BlindHunter.class)); cards.add(new SetCardInfo("Bloodscale Prowler", 64, Rarity.COMMON, mage.cards.b.BloodscaleProwler.class)); cards.add(new SetCardInfo("Borborygmos", 103, Rarity.RARE, mage.cards.b.Borborygmos.class)); @@ -69,7 +70,7 @@ public class Guildpact extends ExpansionSet { cards.add(new SetCardInfo("Castigate", 106, Rarity.COMMON, mage.cards.c.Castigate.class)); cards.add(new SetCardInfo("Caustic Rain", 44, Rarity.UNCOMMON, mage.cards.c.CausticRain.class)); cards.add(new SetCardInfo("Cerebral Vortex", 107, Rarity.RARE, mage.cards.c.CerebralVortex.class)); - cards.add(new SetCardInfo("Crash Landing", 82, Rarity.UNCOMMON, mage.cards.c.CrashLanding.class)); + cards.add(new SetCardInfo("Crash Landing", 82, Rarity.UNCOMMON, mage.cards.c.CrashLanding.class)); cards.add(new SetCardInfo("Cremate", 45, Rarity.COMMON, mage.cards.c.Cremate.class)); cards.add(new SetCardInfo("Cry of Contrition", 46, Rarity.COMMON, mage.cards.c.CryOfContrition.class)); cards.add(new SetCardInfo("Crystal Seer", 23, Rarity.UNCOMMON, mage.cards.c.CrystalSeer.class)); @@ -78,6 +79,7 @@ public class Guildpact extends ExpansionSet { cards.add(new SetCardInfo("Debtors' Knell", 141, Rarity.RARE, mage.cards.d.DebtorsKnell.class)); cards.add(new SetCardInfo("Djinn Illuminatus", 142, Rarity.RARE, mage.cards.d.DjinnIlluminatus.class)); cards.add(new SetCardInfo("Douse in Gloom", 49, Rarity.COMMON, mage.cards.d.DouseInGloom.class)); + cards.add(new SetCardInfo("Droning Bureaucrats", 4, Rarity.UNCOMMON, mage.cards.d.DroningBureaucrats.class)); cards.add(new SetCardInfo("Drowned Rusalka", 24, Rarity.UNCOMMON, mage.cards.d.DrownedRusalka.class)); cards.add(new SetCardInfo("Dryad Sophisticate", 83, Rarity.UNCOMMON, mage.cards.d.DryadSophisticate.class)); cards.add(new SetCardInfo("Dune-Brood Nephilim", 110, Rarity.RARE, mage.cards.d.DuneBroodNephilim.class)); @@ -119,6 +121,7 @@ public class Guildpact extends ExpansionSet { cards.add(new SetCardInfo("Izzet Chronarch", 119, Rarity.COMMON, mage.cards.i.IzzetChronarch.class)); cards.add(new SetCardInfo("Izzet Guildmage", 145, Rarity.UNCOMMON, mage.cards.i.IzzetGuildmage.class)); cards.add(new SetCardInfo("Izzet Signet", 152, Rarity.COMMON, mage.cards.i.IzzetSignet.class)); + cards.add(new SetCardInfo("Killer Instinct", 120, Rarity.RARE, mage.cards.k.KillerInstinct.class)); cards.add(new SetCardInfo("Leap of Flame", 121, Rarity.COMMON, mage.cards.l.LeapOfFlame.class)); cards.add(new SetCardInfo("Leyline of Lifeforce", 90, Rarity.RARE, mage.cards.l.LeylineOfLifeforce.class)); cards.add(new SetCardInfo("Leyline of Lightning", 68, Rarity.RARE, mage.cards.l.LeylineOfLightning.class)); @@ -127,7 +130,9 @@ public class Guildpact extends ExpansionSet { cards.add(new SetCardInfo("Leyline of the Void", 52, Rarity.RARE, mage.cards.l.LeylineOfTheVoid.class)); cards.add(new SetCardInfo("Lionheart Maverick", 11, Rarity.COMMON, mage.cards.l.LionheartMaverick.class)); cards.add(new SetCardInfo("Martyred Rusalka", 12, Rarity.UNCOMMON, mage.cards.m.MartyredRusalka.class)); + cards.add(new SetCardInfo("Mimeofacture", 30, Rarity.RARE, mage.cards.m.Mimeofacture.class)); cards.add(new SetCardInfo("Mizzium Transreliquat", 153, Rarity.RARE, mage.cards.m.MizziumTransreliquat.class)); + cards.add(new SetCardInfo("Moratorium Stone", 154, Rarity.RARE, mage.cards.m.MoratoriumStone.class)); cards.add(new SetCardInfo("Mortify", 122, Rarity.UNCOMMON, mage.cards.m.Mortify.class)); cards.add(new SetCardInfo("Mourning Thrull", 146, Rarity.COMMON, mage.cards.m.MourningThrull.class)); cards.add(new SetCardInfo("Necromancer's Magemark", 53, Rarity.COMMON, mage.cards.n.NecromancersMagemark.class)); @@ -147,6 +152,7 @@ public class Guildpact extends ExpansionSet { cards.add(new SetCardInfo("Pillory of the Sleepless", 125, Rarity.COMMON, mage.cards.p.PilloryOfTheSleepless.class)); cards.add(new SetCardInfo("Plagued Rusalka", 56, Rarity.UNCOMMON, mage.cards.p.PlaguedRusalka.class)); cards.add(new SetCardInfo("Poisonbelly Ogre", 57, Rarity.COMMON, mage.cards.p.PoisonbellyOgre.class)); + cards.add(new SetCardInfo("Primeval Light", 93, Rarity.UNCOMMON, mage.cards.p.PrimevalLight.class)); cards.add(new SetCardInfo("Pyromatics", 72, Rarity.COMMON, mage.cards.p.Pyromatics.class)); cards.add(new SetCardInfo("Quicken", 31, Rarity.RARE, mage.cards.q.Quicken.class)); cards.add(new SetCardInfo("Rabble-Rouser", 73, Rarity.UNCOMMON, mage.cards.r.RabbleRouser.class)); @@ -160,12 +166,14 @@ public class Guildpact extends ExpansionSet { cards.add(new SetCardInfo("Scab-Clan Mauler", 128, Rarity.COMMON, mage.cards.s.ScabClanMauler.class)); cards.add(new SetCardInfo("Schismotivate", 129, Rarity.UNCOMMON, mage.cards.s.Schismotivate.class)); cards.add(new SetCardInfo("Scorched Rusalka", 74, Rarity.UNCOMMON, mage.cards.s.ScorchedRusalka.class)); + cards.add(new SetCardInfo("Seize the Soul", 61, Rarity.RARE, mage.cards.s.SeizeTheSoul.class)); cards.add(new SetCardInfo("Shadow Lance", 14, Rarity.UNCOMMON, mage.cards.s.ShadowLance.class)); cards.add(new SetCardInfo("Shattering Spree", 75, Rarity.UNCOMMON, mage.cards.s.ShatteringSpree.class)); cards.add(new SetCardInfo("Shrieking Grotesque", 15, Rarity.COMMON, mage.cards.s.ShriekingGrotesque.class)); cards.add(new SetCardInfo("Siege of Towers", 76, Rarity.RARE, mage.cards.s.SiegeOfTowers.class)); cards.add(new SetCardInfo("Silhana Ledgewalker", 94, Rarity.COMMON, mage.cards.s.SilhanaLedgewalker.class)); cards.add(new SetCardInfo("Silhana Starfletcher", 95, Rarity.COMMON, mage.cards.s.SilhanaStarfletcher.class)); + cards.add(new SetCardInfo("Sinstriker's Will", 16, Rarity.UNCOMMON, mage.cards.s.SinstrikersWill.class)); cards.add(new SetCardInfo("Skarrgan Firebird", 77, Rarity.RARE, mage.cards.s.SkarrganFirebird.class)); cards.add(new SetCardInfo("Skarrgan Pit-Skulk", 96, Rarity.COMMON, mage.cards.s.SkarrganPitSkulk.class)); cards.add(new SetCardInfo("Skarrgan Skybreaker", 130, Rarity.UNCOMMON, mage.cards.s.SkarrganSkybreaker.class)); diff --git a/Mage.Sets/src/mage/sets/Guru.java b/Mage.Sets/src/mage/sets/Guru.java index 4e61a7e1c8..7c4ad17f65 100644 --- a/Mage.Sets/src/mage/sets/Guru.java +++ b/Mage.Sets/src/mage/sets/Guru.java @@ -5,6 +5,7 @@ import mage.constants.Rarity; import mage.constants.SetType; public class Guru extends ExpansionSet { + private static final Guru instance = new Guru(); public static Guru getInstance() { diff --git a/Mage.Sets/src/mage/sets/HasconPromo2017.java b/Mage.Sets/src/mage/sets/HasconPromo2017.java index ad69eeeff8..6ceec640ac 100644 --- a/Mage.Sets/src/mage/sets/HasconPromo2017.java +++ b/Mage.Sets/src/mage/sets/HasconPromo2017.java @@ -36,6 +36,7 @@ import mage.constants.SetType; * @author Saga */ public class HasconPromo2017 extends ExpansionSet { + private static final HasconPromo2017 instance = new HasconPromo2017(); public static HasconPromo2017 getInstance() { diff --git a/Mage.Sets/src/mage/sets/HeroesVsMonsters.java b/Mage.Sets/src/mage/sets/HeroesVsMonsters.java index f2a3b6e390..d2443ae168 100644 --- a/Mage.Sets/src/mage/sets/HeroesVsMonsters.java +++ b/Mage.Sets/src/mage/sets/HeroesVsMonsters.java @@ -35,8 +35,8 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class HeroesVsMonsters extends ExpansionSet { + private static final HeroesVsMonsters instance = new HeroesVsMonsters(); public static HeroesVsMonsters getInstance() { @@ -129,4 +129,4 @@ public class HeroesVsMonsters extends ExpansionSet { cards.add(new SetCardInfo("Winds of Rath", 31, Rarity.RARE, mage.cards.w.WindsOfRath.class)); cards.add(new SetCardInfo("Zhur-Taa Druid", 48, Rarity.COMMON, mage.cards.z.ZhurTaaDruid.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/Homelands.java b/Mage.Sets/src/mage/sets/Homelands.java index 26330b1180..6113b95dca 100644 --- a/Mage.Sets/src/mage/sets/Homelands.java +++ b/Mage.Sets/src/mage/sets/Homelands.java @@ -82,20 +82,26 @@ public class Homelands extends ExpansionSet { cards.add(new SetCardInfo("An-Havva Constable", 51, Rarity.RARE, mage.cards.a.AnHavvaConstable.class)); cards.add(new SetCardInfo("An-Havva Inn", 52, Rarity.UNCOMMON, mage.cards.a.AnHavvaInn.class)); cards.add(new SetCardInfo("An-Havva Township", 136, Rarity.UNCOMMON, mage.cards.a.AnHavvaTownship.class)); + cards.add(new SetCardInfo("An-Zerrin Ruins", 87, Rarity.RARE, mage.cards.a.AnZerrinRuins.class)); cards.add(new SetCardInfo("Aysen Abbey", 137, Rarity.UNCOMMON, mage.cards.a.AysenAbbey.class)); cards.add(new SetCardInfo("Aysen Bureaucrats", 104, Rarity.COMMON, mage.cards.a.AysenBureaucrats.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Aysen Bureaucrats", 105, Rarity.COMMON, mage.cards.a.AysenBureaucrats.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Aysen Crusader", 106, Rarity.RARE, mage.cards.a.AysenCrusader.class)); cards.add(new SetCardInfo("Aysen Highway", 107, Rarity.RARE, mage.cards.a.AysenHighway.class)); + cards.add(new SetCardInfo("Baki's Curse", 27, Rarity.RARE, mage.cards.b.BakisCurse.class)); cards.add(new SetCardInfo("Baron Sengir", 1, Rarity.RARE, mage.cards.b.BaronSengir.class)); cards.add(new SetCardInfo("Black Carriage", 2, Rarity.RARE, mage.cards.b.BlackCarriage.class)); - cards.add(new SetCardInfo("Carapace", 55, Rarity.COMMON, mage.cards.c.Carapace.class)); + cards.add(new SetCardInfo("Carapace", 54, Rarity.COMMON, mage.cards.c.Carapace.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Carapace", 55, Rarity.COMMON, mage.cards.c.Carapace.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Castle Sengir", 138, Rarity.UNCOMMON, mage.cards.c.CastleSengir.class)); cards.add(new SetCardInfo("Cemetery Gate", 4, Rarity.COMMON, CemeteryGate.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Cemetery Gate", 5, Rarity.COMMON, CemeteryGate.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Chain Stasis", 28, Rarity.RARE, mage.cards.c.ChainStasis.class)); cards.add(new SetCardInfo("Chandler", 88, Rarity.COMMON, mage.cards.c.Chandler.class)); cards.add(new SetCardInfo("Clockwork Gnomes", 127, Rarity.COMMON, mage.cards.c.ClockworkGnomes.class)); + cards.add(new SetCardInfo("Clockwork Swarm", 129, Rarity.COMMON, mage.cards.c.ClockworkSwarm.class)); cards.add(new SetCardInfo("Coral Reef", 29, Rarity.COMMON, mage.cards.c.CoralReef.class)); + cards.add(new SetCardInfo("Dark Maze", 30, Rarity.COMMON, mage.cards.d.DarkMaze.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Dark Maze", 31, Rarity.COMMON, mage.cards.d.DarkMaze.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Daughter of Autumn", 56, Rarity.RARE, mage.cards.d.DaughterOfAutumn.class)); cards.add(new SetCardInfo("Death Speakers", 109, Rarity.UNCOMMON, mage.cards.d.DeathSpeakers.class)); @@ -127,6 +133,7 @@ public class Homelands extends ExpansionSet { cards.add(new SetCardInfo("Joven", 97, Rarity.COMMON, mage.cards.j.Joven.class)); cards.add(new SetCardInfo("Koskun Falls", 18, Rarity.RARE, mage.cards.k.KoskunFalls.class)); cards.add(new SetCardInfo("Koskun Keep", 139, Rarity.UNCOMMON, mage.cards.k.KoskunKeep.class)); + cards.add(new SetCardInfo("Labyrinth Minotaur", 38, Rarity.COMMON, mage.cards.l.LabyrinthMinotaur.class)); cards.add(new SetCardInfo("Leaping Lizard", 63, Rarity.COMMON, mage.cards.l.LeapingLizard.class)); cards.add(new SetCardInfo("Leeches", 111, Rarity.RARE, mage.cards.l.Leeches.class)); cards.add(new SetCardInfo("Marjhan", 39, Rarity.RARE, mage.cards.m.Marjhan.class)); @@ -150,8 +157,10 @@ public class Homelands extends ExpansionSet { cards.add(new SetCardInfo("Sengir Bats", 20, Rarity.COMMON, SengirBats.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Sengir Bats", 21, Rarity.COMMON, SengirBats.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Serra Aviary", 118, Rarity.RARE, mage.cards.s.SerraAviary.class)); + cards.add(new SetCardInfo("Serra Paladin", 121, Rarity.COMMON, mage.cards.s.SerraPaladin.class)); cards.add(new SetCardInfo("Serrated Arrows", 135, Rarity.COMMON, mage.cards.s.SerratedArrows.class)); - cards.add(new SetCardInfo("Shrink", 71, Rarity.COMMON, mage.cards.s.Shrink.class)); + cards.add(new SetCardInfo("Shrink", 70, Rarity.COMMON, mage.cards.s.Shrink.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Shrink", 71, Rarity.COMMON, mage.cards.s.Shrink.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Spectral Bears", 72, Rarity.UNCOMMON, mage.cards.s.SpectralBears.class)); cards.add(new SetCardInfo("Torture", 23, Rarity.COMMON, Torture.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Torture", 24, Rarity.COMMON, Torture.class, NON_FULL_USE_VARIOUS)); diff --git a/Mage.Sets/src/mage/sets/IceAge.java b/Mage.Sets/src/mage/sets/IceAge.java index d4958f465a..2f96059ac1 100644 --- a/Mage.Sets/src/mage/sets/IceAge.java +++ b/Mage.Sets/src/mage/sets/IceAge.java @@ -61,7 +61,9 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Arenson's Aura", 227, Rarity.COMMON, mage.cards.a.ArensonsAura.class)); cards.add(new SetCardInfo("Armor of Faith", 228, Rarity.COMMON, mage.cards.a.ArmorOfFaith.class)); cards.add(new SetCardInfo("Arnjlot's Ascent", 57, Rarity.COMMON, mage.cards.a.ArnjlotsAscent.class)); + cards.add(new SetCardInfo("Ashen Ghoul", 2, Rarity.UNCOMMON, mage.cards.a.AshenGhoul.class)); cards.add(new SetCardInfo("Aurochs", 113, Rarity.COMMON, mage.cards.a.Aurochs.class)); + cards.add(new SetCardInfo("Avalanche", 171, Rarity.UNCOMMON, mage.cards.a.Avalanche.class)); cards.add(new SetCardInfo("Balduvian Barbarians", 172, Rarity.COMMON, mage.cards.b.BalduvianBarbarians.class)); cards.add(new SetCardInfo("Balduvian Bears", 114, Rarity.COMMON, mage.cards.b.BalduvianBears.class)); cards.add(new SetCardInfo("Balduvian Conjurer", 58, Rarity.UNCOMMON, mage.cards.b.BalduvianConjurer.class)); @@ -75,6 +77,7 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Blue Scarab", 233, Rarity.UNCOMMON, mage.cards.b.BlueScarab.class)); cards.add(new SetCardInfo("Brainstorm", 61, Rarity.COMMON, mage.cards.b.Brainstorm.class)); cards.add(new SetCardInfo("Brand of Ill Omen", 177, Rarity.RARE, mage.cards.b.BrandOfIllOmen.class)); + cards.add(new SetCardInfo("Breath of Dreams", 62, Rarity.UNCOMMON, mage.cards.b.BreathOfDreams.class)); cards.add(new SetCardInfo("Brine Shaman", 3, Rarity.COMMON, mage.cards.b.BrineShaman.class)); cards.add(new SetCardInfo("Brown Ouphe", 116, Rarity.COMMON, mage.cards.b.BrownOuphe.class)); cards.add(new SetCardInfo("Brushland", 327, Rarity.RARE, mage.cards.b.Brushland.class)); @@ -83,6 +86,7 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Caribou Range", 235, Rarity.RARE, mage.cards.c.CaribouRange.class)); cards.add(new SetCardInfo("Celestial Sword", 289, Rarity.RARE, mage.cards.c.CelestialSword.class)); cards.add(new SetCardInfo("Centaur Archer", 360, Rarity.UNCOMMON, mage.cards.c.CentaurArcher.class)); + cards.add(new SetCardInfo("Chaos Moon", 179, Rarity.RARE, mage.cards.c.ChaosMoon.class)); cards.add(new SetCardInfo("Chub Toad", 117, Rarity.COMMON, mage.cards.c.ChubToad.class)); cards.add(new SetCardInfo("Circle of Protection: Black", 236, Rarity.COMMON, mage.cards.c.CircleOfProtectionBlack.class)); cards.add(new SetCardInfo("Circle of Protection: Blue", 237, Rarity.COMMON, mage.cards.c.CircleOfProtectionBlue.class)); @@ -102,14 +106,20 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Deflection", 65, Rarity.RARE, mage.cards.d.Deflection.class)); cards.add(new SetCardInfo("Demonic Consultation", 9, Rarity.UNCOMMON, mage.cards.d.DemonicConsultation.class)); cards.add(new SetCardInfo("Despotic Scepter", 291, Rarity.RARE, mage.cards.d.DespoticScepter.class)); - cards.add(new SetCardInfo("Diabolic Vision", 362, Rarity.UNCOMMON, mage.cards.d.DiabolicVision.class)); + cards.add(new SetCardInfo("Diabolic Vision", 362, Rarity.UNCOMMON, mage.cards.d.DiabolicVision.class)); cards.add(new SetCardInfo("Disenchant", 244, Rarity.COMMON, mage.cards.d.Disenchant.class)); + cards.add(new SetCardInfo("Drift of the Dead", 11, Rarity.UNCOMMON, mage.cards.d.DriftOfTheDead.class)); cards.add(new SetCardInfo("Dwarven Armory", 182, Rarity.RARE, mage.cards.d.DwarvenArmory.class)); + cards.add(new SetCardInfo("Earthlore", 119, Rarity.COMMON, mage.cards.e.Earthlore.class)); + cards.add(new SetCardInfo("Earthlink", 363, Rarity.RARE, mage.cards.e.Earthlink.class)); cards.add(new SetCardInfo("Elder Druid", 120, Rarity.RARE, mage.cards.e.ElderDruid.class)); cards.add(new SetCardInfo("Elemental Augury", 364, Rarity.RARE, mage.cards.e.ElementalAugury.class)); cards.add(new SetCardInfo("Enduring Renewal", 247, Rarity.RARE, mage.cards.e.EnduringRenewal.class)); + cards.add(new SetCardInfo("Energy Storm", 248, Rarity.RARE, mage.cards.e.EnergyStorm.class)); cards.add(new SetCardInfo("Enervate", 67, Rarity.COMMON, mage.cards.e.Enervate.class)); cards.add(new SetCardInfo("Errantry", 183, Rarity.COMMON, mage.cards.e.Errantry.class)); + cards.add(new SetCardInfo("Essence Filter", 121, Rarity.COMMON, mage.cards.e.EssenceFilter.class)); + cards.add(new SetCardInfo("Essence Flare", 69, Rarity.COMMON, mage.cards.e.EssenceFlare.class)); cards.add(new SetCardInfo("Fanatical Fever", 122, Rarity.UNCOMMON, mage.cards.f.FanaticalFever.class)); cards.add(new SetCardInfo("Fear", 12, Rarity.COMMON, mage.cards.f.Fear.class)); cards.add(new SetCardInfo("Fiery Justice", 366, Rarity.RARE, mage.cards.f.FieryJustice.class)); @@ -126,11 +136,14 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Forest", 330, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Forgotten Lore", 125, Rarity.UNCOMMON, mage.cards.f.ForgottenLore.class)); cards.add(new SetCardInfo("Foul Familiar", 14, Rarity.COMMON, mage.cards.f.FoulFamiliar.class)); + cards.add(new SetCardInfo("Freyalise's Charm", 128, Rarity.UNCOMMON, mage.cards.f.FreyalisesCharm.class)); + cards.add(new SetCardInfo("Foxfire", 126, Rarity.COMMON, mage.cards.f.Foxfire.class)); cards.add(new SetCardInfo("Fumarole", 369, Rarity.UNCOMMON, mage.cards.f.Fumarole.class)); cards.add(new SetCardInfo("Fyndhorn Bow", 293, Rarity.UNCOMMON, mage.cards.f.FyndhornBow.class)); cards.add(new SetCardInfo("Fyndhorn Brownie", 130, Rarity.COMMON, mage.cards.f.FyndhornBrownie.class)); cards.add(new SetCardInfo("Fyndhorn Elder", 131, Rarity.UNCOMMON, mage.cards.f.FyndhornElder.class)); cards.add(new SetCardInfo("Fyndhorn Elves", 132, Rarity.COMMON, mage.cards.f.FyndhornElves.class)); + cards.add(new SetCardInfo("Fyndhorn Pollen", 133, Rarity.RARE, mage.cards.f.FyndhornPollen.class)); cards.add(new SetCardInfo("Game of Chaos", 186, Rarity.RARE, mage.cards.g.GameOfChaos.class)); cards.add(new SetCardInfo("Gangrenous Zombies", 15, Rarity.COMMON, mage.cards.g.GangrenousZombies.class)); cards.add(new SetCardInfo("Giant Growth", 134, Rarity.COMMON, mage.cards.g.GiantGrowth.class)); @@ -164,6 +177,8 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Imposing Visage", 193, Rarity.COMMON, mage.cards.i.ImposingVisage.class)); cards.add(new SetCardInfo("Incinerate", 194, Rarity.COMMON, mage.cards.i.Incinerate.class)); cards.add(new SetCardInfo("Infernal Darkness", 23, Rarity.RARE, mage.cards.i.InfernalDarkness.class)); + cards.add(new SetCardInfo("Infernal Denizen", 24, Rarity.RARE, mage.cards.i.InfernalDenizen.class)); + cards.add(new SetCardInfo("Infinite Hourglass", 298, Rarity.RARE, mage.cards.i.InfiniteHourglass.class)); cards.add(new SetCardInfo("Infuse", 80, Rarity.COMMON, mage.cards.i.Infuse.class)); cards.add(new SetCardInfo("Island", 334, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Island", 335, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); @@ -176,9 +191,11 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Juniper Order Druid", 139, Rarity.COMMON, mage.cards.j.JuniperOrderDruid.class)); cards.add(new SetCardInfo("Justice", 256, Rarity.UNCOMMON, mage.cards.j.Justice.class)); cards.add(new SetCardInfo("Karplusan Forest", 337, Rarity.RARE, mage.cards.k.KarplusanForest.class)); + cards.add(new SetCardInfo("Karplusan Giant", 196, Rarity.UNCOMMON, mage.cards.k.KarplusanGiant.class)); cards.add(new SetCardInfo("Karplusan Yeti", 197, Rarity.RARE, mage.cards.k.KarplusanYeti.class)); + cards.add(new SetCardInfo("Kelsinko Ranger", 257, Rarity.COMMON, mage.cards.k.KelsinkoRanger.class)); cards.add(new SetCardInfo("Kjeldoran Dead", 25, Rarity.COMMON, mage.cards.k.KjeldoranDead.class)); - cards.add(new SetCardInfo("Kjeldoran Frostbeast", 374, Rarity.UNCOMMON, mage.cards.k.KjeldoranFrostbeast.class)); + cards.add(new SetCardInfo("Kjeldoran Frostbeast", 374, Rarity.UNCOMMON, mage.cards.k.KjeldoranFrostbeast.class)); cards.add(new SetCardInfo("Kjeldoran Royal Guard", 262, Rarity.RARE, mage.cards.k.KjeldoranRoyalGuard.class)); cards.add(new SetCardInfo("Knight of Stromgald", 26, Rarity.UNCOMMON, mage.cards.k.KnightOfStromgald.class)); cards.add(new SetCardInfo("Krovikan Fetish", 28, Rarity.COMMON, mage.cards.k.KrovikanFetish.class)); @@ -196,9 +213,11 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Marton Stromgald", 199, Rarity.RARE, mage.cards.m.MartonStromgald.class)); cards.add(new SetCardInfo("Merieke Ri Berit", 375, Rarity.RARE, mage.cards.m.MeriekeRiBerit.class)); cards.add(new SetCardInfo("Mesmeric Trance", 83, Rarity.RARE, mage.cards.m.MesmericTrance.class)); + cards.add(new SetCardInfo("Meteor Shower", 202, Rarity.COMMON, mage.cards.m.MeteorShower.class)); cards.add(new SetCardInfo("Mind Ravel", 35, Rarity.COMMON, mage.cards.m.MindRavel.class)); cards.add(new SetCardInfo("Mind Warp", 36, Rarity.UNCOMMON, mage.cards.m.MindWarp.class)); cards.add(new SetCardInfo("Minion of Leshrac", 38, Rarity.RARE, mage.cards.m.MinionOfLeshrac.class)); + cards.add(new SetCardInfo("Minion of Tevesh Szat", 39, Rarity.RARE, mage.cards.m.MinionOfTeveshSzat.class)); cards.add(new SetCardInfo("Mole Worms", 40, Rarity.UNCOMMON, mage.cards.m.MoleWorms.class)); cards.add(new SetCardInfo("Moor Fiend", 41, Rarity.COMMON, mage.cards.m.MoorFiend.class)); cards.add(new SetCardInfo("Mountain", 340, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); @@ -217,6 +236,7 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Orcish Healer", 208, Rarity.UNCOMMON, mage.cards.o.OrcishHealer.class)); cards.add(new SetCardInfo("Orcish Librarian", 209, Rarity.RARE, mage.cards.o.OrcishLibrarian.class)); cards.add(new SetCardInfo("Orcish Lumberjack", 210, Rarity.COMMON, mage.cards.o.OrcishLumberjack.class)); + cards.add(new SetCardInfo("Orcish Squatters", 211, Rarity.RARE, mage.cards.o.OrcishSquatters.class)); cards.add(new SetCardInfo("Order of the Sacred Torch", 269, Rarity.RARE, mage.cards.o.OrderOfTheSacredTorch.class)); cards.add(new SetCardInfo("Order of the White Shield", 270, Rarity.UNCOMMON, mage.cards.o.OrderOfTheWhiteShield.class)); cards.add(new SetCardInfo("Pale Bears", 144, Rarity.RARE, mage.cards.p.PaleBears.class)); @@ -238,6 +258,7 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Rally", 272, Rarity.COMMON, mage.cards.r.Rally.class)); cards.add(new SetCardInfo("Ray of Command", 92, Rarity.COMMON, mage.cards.r.RayOfCommand.class)); cards.add(new SetCardInfo("Ray of Erasure", 93, Rarity.COMMON, mage.cards.r.RayOfErasure.class)); + cards.add(new SetCardInfo("Reality Twist", 94, Rarity.RARE, mage.cards.r.RealityTwist.class)); cards.add(new SetCardInfo("Reclamation", 378, Rarity.RARE, mage.cards.r.Reclamation.class)); cards.add(new SetCardInfo("Red Scarab", 273, Rarity.UNCOMMON, mage.cards.r.RedScarab.class)); cards.add(new SetCardInfo("Regeneration", 147, Rarity.COMMON, mage.cards.r.Regeneration.class)); @@ -255,12 +276,14 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Silver Erne", 98, Rarity.UNCOMMON, mage.cards.s.SilverErne.class)); cards.add(new SetCardInfo("Skeleton Ship", 379, Rarity.RARE, mage.cards.s.SkeletonShip.class)); cards.add(new SetCardInfo("Skull Catapult", 311, Rarity.UNCOMMON, mage.cards.s.SkullCatapult.class)); + cards.add(new SetCardInfo("Snow Fortress", 312, Rarity.RARE, mage.cards.s.SnowFortress.class)); cards.add(new SetCardInfo("Snow-Covered Forest", 347, Rarity.COMMON, mage.cards.s.SnowCoveredForest.class)); cards.add(new SetCardInfo("Snow-Covered Island", 348, Rarity.COMMON, mage.cards.s.SnowCoveredIsland.class)); cards.add(new SetCardInfo("Snow-Covered Mountain", 349, Rarity.COMMON, mage.cards.s.SnowCoveredMountain.class)); cards.add(new SetCardInfo("Snow-Covered Plains", 350, Rarity.COMMON, mage.cards.s.SnowCoveredPlains.class)); cards.add(new SetCardInfo("Snow-Covered Swamp", 351, Rarity.COMMON, mage.cards.s.SnowCoveredSwamp.class)); cards.add(new SetCardInfo("Snow Hound", 277, Rarity.UNCOMMON, mage.cards.s.SnowHound.class)); + cards.add(new SetCardInfo("Soldevi Golem", 313, Rarity.RARE, mage.cards.s.SoldeviGolem.class)); cards.add(new SetCardInfo("Soldevi Machinist", 102, Rarity.UNCOMMON, mage.cards.s.SoldeviMachinist.class)); cards.add(new SetCardInfo("Soldevi Simulacrum", 314, Rarity.UNCOMMON, mage.cards.s.SoldeviSimulacrum.class)); cards.add(new SetCardInfo("Songs of the Damned", 48, Rarity.COMMON, mage.cards.s.SongsOfTheDamned.class)); @@ -291,6 +314,7 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Tinder Wall", 158, Rarity.COMMON, mage.cards.t.TinderWall.class)); cards.add(new SetCardInfo("Tor Giant", 220, Rarity.COMMON, mage.cards.t.TorGiant.class)); cards.add(new SetCardInfo("Touch of Death", 55, Rarity.COMMON, mage.cards.t.TouchOfDeath.class)); + cards.add(new SetCardInfo("Trailblazer", 160, Rarity.RARE, mage.cards.t.Trailblazer.class)); cards.add(new SetCardInfo("Underground River", 357, Rarity.RARE, mage.cards.u.UndergroundRiver.class)); cards.add(new SetCardInfo("Updraft", 105, Rarity.UNCOMMON, mage.cards.u.Updraft.class)); cards.add(new SetCardInfo("Urza's Bauble", 318, Rarity.UNCOMMON, mage.cards.u.UrzasBauble.class)); @@ -307,6 +331,8 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Wild Growth", 165, Rarity.COMMON, mage.cards.w.WildGrowth.class)); cards.add(new SetCardInfo("Wind Spirit", 106, Rarity.UNCOMMON, mage.cards.w.WindSpirit.class)); cards.add(new SetCardInfo("Wings of Aesthir", 383, Rarity.UNCOMMON, mage.cards.w.WingsOfAesthir.class)); + cards.add(new SetCardInfo("Withering Wisps", 56, Rarity.UNCOMMON, mage.cards.w.WitheringWisps.class)); + cards.add(new SetCardInfo("Woolly Mammoths", 166, Rarity.COMMON, mage.cards.w.WoollyMammoths.class)); cards.add(new SetCardInfo("Word of Blasting", 224, Rarity.UNCOMMON, mage.cards.w.WordOfBlasting.class)); cards.add(new SetCardInfo("Wrath of Marit Lage", 109, Rarity.RARE, mage.cards.w.WrathOfMaritLage.class)); cards.add(new SetCardInfo("Yavimaya Gnats", 168, Rarity.UNCOMMON, mage.cards.y.YavimayaGnats.class)); diff --git a/Mage.Sets/src/mage/sets/IconicMasters.java b/Mage.Sets/src/mage/sets/IconicMasters.java index ec12aaa6fe..f592ee24fa 100644 --- a/Mage.Sets/src/mage/sets/IconicMasters.java +++ b/Mage.Sets/src/mage/sets/IconicMasters.java @@ -24,16 +24,16 @@ * 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 mage.cards.ExpansionSet; +import mage.constants.Rarity; import mage.constants.SetType; /** * - * @author fireshoes + * @author MajorLazar */ public class IconicMasters extends ExpansionSet { @@ -54,5 +54,255 @@ public class IconicMasters extends ExpansionSet { this.numBoosterRare = 1; this.ratioBoosterMythic = 8; + cards.add(new SetCardInfo("Scion of Ugin", 1, Rarity.COMMON, mage.cards.s.ScionOfUgin.class)); + cards.add(new SetCardInfo("Abzan Battle Priest", 2, Rarity.UNCOMMON, mage.cards.a.AbzanBattlePriest.class)); + cards.add(new SetCardInfo("Abzan Falconer", 3, Rarity.UNCOMMON, mage.cards.a.AbzanFalconer.class)); + cards.add(new SetCardInfo("Ainok Bond-Kin", 4, Rarity.COMMON, mage.cards.a.AinokBondKin.class)); + cards.add(new SetCardInfo("Ajani's Pridemate", 5, Rarity.UNCOMMON, mage.cards.a.AjanisPridemate.class)); + cards.add(new SetCardInfo("Angel of Mercy", 6, Rarity.COMMON, mage.cards.a.AngelOfMercy.class)); + cards.add(new SetCardInfo("Angelic Accord", 7, Rarity.UNCOMMON, mage.cards.a.AngelicAccord.class)); + cards.add(new SetCardInfo("Archangel of Thune", 8, Rarity.MYTHIC, mage.cards.a.ArchangelOfThune.class)); + cards.add(new SetCardInfo("Auriok Champion", 9, Rarity.RARE, mage.cards.a.AuriokChampion.class)); + cards.add(new SetCardInfo("Austere Command", 10, Rarity.RARE, mage.cards.a.AustereCommand.class)); + cards.add(new SetCardInfo("Avacyn, Angel of Hope", 11, Rarity.MYTHIC, mage.cards.a.AvacynAngelOfHope.class)); + cards.add(new SetCardInfo("Benevolent Ancestor", 12, Rarity.COMMON, mage.cards.b.BenevolentAncestor.class)); + cards.add(new SetCardInfo("Blinding Mage", 13, Rarity.COMMON, mage.cards.b.BlindingMage.class)); + cards.add(new SetCardInfo("Burrenton Forge-Tender", 14, Rarity.UNCOMMON, mage.cards.b.BurrentonForgeTender.class)); + cards.add(new SetCardInfo("Disenchant", 15, Rarity.COMMON, mage.cards.d.Disenchant.class)); + cards.add(new SetCardInfo("Doomed Traveler", 16, Rarity.COMMON, mage.cards.d.DoomedTraveler.class)); + cards.add(new SetCardInfo("Dragon Bell Monk", 17, Rarity.COMMON, mage.cards.d.DragonBellMonk.class)); + cards.add(new SetCardInfo("Elesh Norn, Grand Cenobite", 18, Rarity.MYTHIC, mage.cards.e.EleshNornGrandCenobite.class)); + cards.add(new SetCardInfo("Emerge Unscathed", 19, Rarity.COMMON, mage.cards.e.EmergeUnscathed.class)); + cards.add(new SetCardInfo("Emeria Angel", 20, Rarity.RARE, mage.cards.e.EmeriaAngel.class)); + cards.add(new SetCardInfo("Great Teacher's Decree", 21, Rarity.UNCOMMON, mage.cards.g.GreatTeachersDecree.class)); + cards.add(new SetCardInfo("Guard Duty", 22, Rarity.COMMON, mage.cards.g.GuardDuty.class)); + cards.add(new SetCardInfo("Guided Strike", 23, Rarity.COMMON, mage.cards.g.GuidedStrike.class)); + cards.add(new SetCardInfo("Infantry Veteran", 24, Rarity.COMMON, mage.cards.i.InfantryVeteran.class)); + cards.add(new SetCardInfo("Iona's Judgment", 25, Rarity.COMMON, mage.cards.i.IonasJudgment.class)); + cards.add(new SetCardInfo("Path of Bravery", 26, Rarity.RARE, mage.cards.p.PathOfBravery.class)); + cards.add(new SetCardInfo("Pentarch Ward", 27, Rarity.COMMON, mage.cards.p.PentarchWard.class)); + cards.add(new SetCardInfo("Restoration Angel", 28, Rarity.RARE, mage.cards.r.RestorationAngel.class)); + cards.add(new SetCardInfo("Seeker of the Way", 29, Rarity.COMMON, mage.cards.s.SeekerOfTheWay.class)); + cards.add(new SetCardInfo("Serra Angel", 30, Rarity.UNCOMMON, mage.cards.s.SerraAngel.class)); + cards.add(new SetCardInfo("Serra Ascendant", 31, Rarity.RARE, mage.cards.s.SerraAscendant.class)); + cards.add(new SetCardInfo("Stalwart Aven", 32, Rarity.COMMON, mage.cards.s.StalwartAven.class)); + cards.add(new SetCardInfo("Student of Ojutai", 33, Rarity.COMMON, mage.cards.s.StudentOfOjutai.class)); + cards.add(new SetCardInfo("Survival Cache", 34, Rarity.COMMON, mage.cards.s.SurvivalCache.class)); + cards.add(new SetCardInfo("Sustainer of the Realm", 35, Rarity.COMMON, mage.cards.s.SustainerOfTheRealm.class)); + cards.add(new SetCardInfo("Swords to Plowshares", 36, Rarity.UNCOMMON, mage.cards.s.SwordsToPlowshares.class)); + cards.add(new SetCardInfo("Topan Freeblade", 37, Rarity.UNCOMMON, mage.cards.t.TopanFreeblade.class)); + cards.add(new SetCardInfo("Wing Shards", 38, Rarity.UNCOMMON, mage.cards.w.WingShards.class)); + cards.add(new SetCardInfo("Yosei, the Morning Star", 39, Rarity.RARE, mage.cards.y.YoseiTheMorningStar.class)); + cards.add(new SetCardInfo("Aetherize", 40, Rarity.UNCOMMON, mage.cards.a.Aetherize.class)); + cards.add(new SetCardInfo("Amass the Components", 41, Rarity.COMMON, mage.cards.a.AmassTheComponents.class)); + cards.add(new SetCardInfo("Ancestral Vision", 42, Rarity.RARE, mage.cards.a.AncestralVision.class)); + cards.add(new SetCardInfo("Bewilder", 43, Rarity.COMMON, mage.cards.b.Bewilder.class)); + cards.add(new SetCardInfo("Cephalid Broker", 44, Rarity.UNCOMMON, mage.cards.c.CephalidBroker.class)); + cards.add(new SetCardInfo("Claustrophobia", 45, Rarity.COMMON, mage.cards.c.Claustrophobia.class)); + cards.add(new SetCardInfo("Condescend", 46, Rarity.UNCOMMON, mage.cards.c.Condescend.class)); + cards.add(new SetCardInfo("Consecrated Sphinx", 47, Rarity.MYTHIC, mage.cards.c.ConsecratedSphinx.class)); + cards.add(new SetCardInfo("Cryptic Command", 48, Rarity.RARE, mage.cards.c.CrypticCommand.class)); + cards.add(new SetCardInfo("Day of the Dragons", 49, Rarity.RARE, mage.cards.d.DayOfTheDragons.class)); + cards.add(new SetCardInfo("Diminish", 50, Rarity.COMMON, mage.cards.d.Diminish.class)); + cards.add(new SetCardInfo("Dissolve", 51, Rarity.COMMON, mage.cards.d.Dissolve.class)); + cards.add(new SetCardInfo("Distortion Strike", 52, Rarity.UNCOMMON, mage.cards.d.DistortionStrike.class)); + cards.add(new SetCardInfo("Doorkeeper", 53, Rarity.COMMON, mage.cards.d.Doorkeeper.class)); + cards.add(new SetCardInfo("Elusive Spellfist", 54, Rarity.COMMON, mage.cards.e.ElusiveSpellfist.class)); + cards.add(new SetCardInfo("Flusterstorm", 55, Rarity.RARE, mage.cards.f.Flusterstorm.class)); + cards.add(new SetCardInfo("Fog Bank", 56, Rarity.UNCOMMON, mage.cards.f.FogBank.class)); + cards.add(new SetCardInfo("Frost Lynx", 57, Rarity.COMMON, mage.cards.f.FrostLynx.class)); + cards.add(new SetCardInfo("Illusory Ambusher", 58, Rarity.UNCOMMON, mage.cards.i.IllusoryAmbusher.class)); + cards.add(new SetCardInfo("Illusory Angel", 59, Rarity.UNCOMMON, mage.cards.i.IllusoryAngel.class)); + cards.add(new SetCardInfo("Jace's Phantasm", 60, Rarity.COMMON, mage.cards.j.JacesPhantasm.class)); + cards.add(new SetCardInfo("Jhessian Thief", 61, Rarity.COMMON, mage.cards.j.JhessianThief.class)); + cards.add(new SetCardInfo("Jin-Gitaxias, Core Augur", 62, Rarity.MYTHIC, mage.cards.j.JinGitaxiasCoreAugur.class)); + cards.add(new SetCardInfo("Keiga, the Tide Star", 63, Rarity.RARE, mage.cards.k.KeigaTheTideStar.class)); + cards.add(new SetCardInfo("Mahamoti Djinn", 64, Rarity.UNCOMMON, mage.cards.m.MahamotiDjinn.class)); + cards.add(new SetCardInfo("Mana Drain", 65, Rarity.MYTHIC, mage.cards.m.ManaDrain.class)); + cards.add(new SetCardInfo("Mana Leak", 66, Rarity.COMMON, mage.cards.m.ManaLeak.class)); + cards.add(new SetCardInfo("Mnemonic Wall", 67, Rarity.COMMON, mage.cards.m.MnemonicWall.class)); + cards.add(new SetCardInfo("Ojutai's Breath", 68, Rarity.COMMON, mage.cards.o.OjutaisBreath.class)); + cards.add(new SetCardInfo("Phantom Monster", 69, Rarity.COMMON, mage.cards.p.PhantomMonster.class)); + cards.add(new SetCardInfo("Repeal", 70, Rarity.COMMON, mage.cards.r.Repeal.class)); + cards.add(new SetCardInfo("Riverwheel Aerialists", 71, Rarity.COMMON, mage.cards.r.RiverwheelAerialists.class)); + cards.add(new SetCardInfo("Shriekgeist", 72, Rarity.COMMON, mage.cards.s.Shriekgeist.class)); + cards.add(new SetCardInfo("Skywise Teachings", 73, Rarity.UNCOMMON, mage.cards.s.SkywiseTeachings.class)); + cards.add(new SetCardInfo("Sphinx of Uthuun", 74, Rarity.RARE, mage.cards.s.SphinxOfUthuun.class)); + cards.add(new SetCardInfo("Teferi, Mage of Zhalfir", 75, Rarity.RARE, mage.cards.t.TeferiMageOfZhalfir.class)); + cards.add(new SetCardInfo("Thought Scour", 76, Rarity.COMMON, mage.cards.t.ThoughtScour.class)); + cards.add(new SetCardInfo("Windfall", 77, Rarity.UNCOMMON, mage.cards.w.Windfall.class)); + cards.add(new SetCardInfo("Abyssal Persecutor", 78, Rarity.RARE, mage.cards.a.AbyssalPersecutor.class)); + cards.add(new SetCardInfo("Bala Ged Scorpion", 79, Rarity.COMMON, mage.cards.b.BalaGedScorpion.class)); + cards.add(new SetCardInfo("Balustrade Spy", 80, Rarity.COMMON, mage.cards.b.BalustradeSpy.class)); + cards.add(new SetCardInfo("Bladewing's Thrall", 81, Rarity.UNCOMMON, mage.cards.b.BladewingsThrall.class)); + cards.add(new SetCardInfo("Bloodghast", 82, Rarity.RARE, mage.cards.b.Bloodghast.class)); + cards.add(new SetCardInfo("Bogbrew Witch", 83, Rarity.UNCOMMON, mage.cards.b.BogbrewWitch.class)); + cards.add(new SetCardInfo("Butcher's Glee", 84, Rarity.COMMON, mage.cards.b.ButchersGlee.class)); + cards.add(new SetCardInfo("Child of Night", 85, Rarity.COMMON, mage.cards.c.ChildOfNight.class)); + cards.add(new SetCardInfo("Dead Reveler", 86, Rarity.COMMON, mage.cards.d.DeadReveler.class)); + cards.add(new SetCardInfo("Doom Blade", 87, Rarity.UNCOMMON, mage.cards.d.DoomBlade.class)); + cards.add(new SetCardInfo("Duress", 88, Rarity.COMMON, mage.cards.d.Duress.class)); + cards.add(new SetCardInfo("Eternal Thirst", 89, Rarity.COMMON, mage.cards.e.EternalThirst.class)); + cards.add(new SetCardInfo("Festering Newt", 90, Rarity.COMMON, mage.cards.f.FesteringNewt.class)); + cards.add(new SetCardInfo("Foul-Tongue Invocation", 91, Rarity.COMMON, mage.cards.f.FoulTongueInvocation.class)); + cards.add(new SetCardInfo("Grisly Spectacle", 92, Rarity.COMMON, mage.cards.g.GrislySpectacle.class)); + cards.add(new SetCardInfo("Indulgent Tormentor", 93, Rarity.UNCOMMON, mage.cards.i.IndulgentTormentor.class)); + cards.add(new SetCardInfo("Haunting Hymn", 94, Rarity.UNCOMMON, mage.cards.h.HauntingHymn.class)); + cards.add(new SetCardInfo("Kokusho, the Evening Star", 95, Rarity.RARE, mage.cards.k.KokushoTheEveningStar.class)); + cards.add(new SetCardInfo("Lord of the Pit", 96, Rarity.RARE, mage.cards.l.LordOfThePit.class)); + cards.add(new SetCardInfo("Mer-Ek Nightblade", 97, Rarity.UNCOMMON, mage.cards.m.MerEkNightblade.class)); + cards.add(new SetCardInfo("Necropotence", 98, Rarity.MYTHIC, mage.cards.n.Necropotence.class)); + cards.add(new SetCardInfo("Night of Souls' Betrayal", 99, Rarity.RARE, mage.cards.n.NightOfSoulsBetrayal.class)); + cards.add(new SetCardInfo("Noxious Dragon", 100, Rarity.UNCOMMON, mage.cards.n.NoxiousDragon.class)); + cards.add(new SetCardInfo("Ob Nixilis, the Fallen", 101, Rarity.MYTHIC, mage.cards.o.ObNixilisTheFallen.class)); + cards.add(new SetCardInfo("Phyrexian Rager", 102, Rarity.COMMON, mage.cards.p.PhyrexianRager.class)); + cards.add(new SetCardInfo("Rakdos Drake", 103, Rarity.COMMON, mage.cards.r.RakdosDrake.class)); + cards.add(new SetCardInfo("Reave Soul", 104, Rarity.COMMON, mage.cards.r.ReaveSoul.class)); + cards.add(new SetCardInfo("Rotfeaster Maggot", 105, Rarity.COMMON, mage.cards.r.RotfeasterMaggot.class)); + cards.add(new SetCardInfo("Rune-Scarred Demon", 106, Rarity.RARE, mage.cards.r.RuneScarredDemon.class)); + cards.add(new SetCardInfo("Sanguine Bond", 107, Rarity.UNCOMMON, mage.cards.s.SanguineBond.class)); + cards.add(new SetCardInfo("Sheoldred, Whispering One", 108, Rarity.MYTHIC, mage.cards.s.SheoldredWhisperingOne.class)); + cards.add(new SetCardInfo("Tavern Swindler", 109, Rarity.UNCOMMON, mage.cards.t.TavernSwindler.class)); + cards.add(new SetCardInfo("Thoughtseize", 110, Rarity.RARE, mage.cards.t.Thoughtseize.class)); + cards.add(new SetCardInfo("Thrill-Kill Assassin", 111, Rarity.COMMON, mage.cards.t.ThrillKillAssassin.class)); + cards.add(new SetCardInfo("Virulent Swipe", 112, Rarity.COMMON, mage.cards.v.VirulentSwipe.class)); + cards.add(new SetCardInfo("Wight of Precinct Six", 113, Rarity.COMMON, mage.cards.w.WightOfPrecinctSix.class)); + cards.add(new SetCardInfo("Ulcerate", 114, Rarity.UNCOMMON, mage.cards.u.Ulcerate.class)); + cards.add(new SetCardInfo("Wrench Mind", 115, Rarity.COMMON, mage.cards.w.WrenchMind.class)); + cards.add(new SetCardInfo("Anger of the Gods", 116, Rarity.RARE, mage.cards.a.AngerOfTheGods.class)); + cards.add(new SetCardInfo("Battle-Rattle Shaman", 117, Rarity.COMMON, mage.cards.b.BattleRattleShaman.class)); + cards.add(new SetCardInfo("Bogardan Hellkite", 118, Rarity.RARE, mage.cards.b.BogardanHellkite.class)); + cards.add(new SetCardInfo("Borderland Marauder", 119, Rarity.COMMON, mage.cards.b.BorderlandMarauder.class)); + cards.add(new SetCardInfo("Charmbreaker Devils", 120, Rarity.RARE, mage.cards.c.CharmbreakerDevils.class)); + cards.add(new SetCardInfo("Coordinated Assault", 121, Rarity.UNCOMMON, mage.cards.c.CoordinatedAssault.class)); + cards.add(new SetCardInfo("Crucible of Fire", 122, Rarity.RARE, mage.cards.c.CrucibleOfFire.class)); + cards.add(new SetCardInfo("Draconic Roar", 123, Rarity.COMMON, mage.cards.d.DraconicRoar.class)); + cards.add(new SetCardInfo("Dragon Egg", 124, Rarity.COMMON, mage.cards.d.DragonEgg.class)); + cards.add(new SetCardInfo("Dragon Tempest", 125, Rarity.UNCOMMON, mage.cards.d.DragonTempest.class)); + cards.add(new SetCardInfo("Dragonlord's Servant", 126, Rarity.COMMON, mage.cards.d.DragonlordsServant.class)); + cards.add(new SetCardInfo("Earth Elemental", 127, Rarity.COMMON, mage.cards.e.EarthElemental.class)); + cards.add(new SetCardInfo("Fireball", 128, Rarity.UNCOMMON, mage.cards.f.Fireball.class)); + cards.add(new SetCardInfo("Furnace Whelp", 129, Rarity.COMMON, mage.cards.f.FurnaceWhelp.class)); + cards.add(new SetCardInfo("Fury Charm", 130, Rarity.COMMON, mage.cards.f.FuryCharm.class)); + cards.add(new SetCardInfo("Guttersnipe", 131, Rarity.UNCOMMON, mage.cards.g.Guttersnipe.class)); + cards.add(new SetCardInfo("Hammerhand", 132, Rarity.COMMON, mage.cards.h.Hammerhand.class)); + cards.add(new SetCardInfo("Heat Ray", 133, Rarity.COMMON, mage.cards.h.HeatRay.class)); + cards.add(new SetCardInfo("Hoarding Dragon", 134, Rarity.UNCOMMON, mage.cards.h.HoardingDragon.class)); + cards.add(new SetCardInfo("Keldon Halberdier", 135, Rarity.COMMON, mage.cards.k.KeldonHalberdier.class)); + cards.add(new SetCardInfo("Kiki-Jiki, Mirror Breaker", 136, Rarity.MYTHIC, mage.cards.k.KikiJikiMirrorBreaker.class)); + cards.add(new SetCardInfo("Kiln Fiend", 137, Rarity.COMMON, mage.cards.k.KilnFiend.class)); + cards.add(new SetCardInfo("Mark of Mutiny", 138, Rarity.COMMON, mage.cards.m.MarkOfMutiny.class)); + cards.add(new SetCardInfo("Magus of the Moon", 139, Rarity.RARE, mage.cards.m.MagusOfTheMoon.class)); + cards.add(new SetCardInfo("Monastery Swiftspear", 140, Rarity.UNCOMMON, mage.cards.m.MonasterySwiftspear.class)); + cards.add(new SetCardInfo("Pillar of Flame", 141, Rarity.COMMON, mage.cards.p.PillarOfFlame.class)); + cards.add(new SetCardInfo("Prodigal Pyromancer", 142, Rarity.UNCOMMON, mage.cards.p.ProdigalPyromancer.class)); + cards.add(new SetCardInfo("Rift Bolt", 143, Rarity.UNCOMMON, mage.cards.r.RiftBolt.class)); + cards.add(new SetCardInfo("Ryusei, the Falling Star", 144, Rarity.RARE, mage.cards.r.RyuseiTheFallingStar.class)); + cards.add(new SetCardInfo("Scourge of Valkas", 145, Rarity.RARE, mage.cards.s.ScourgeOfValkas.class)); + cards.add(new SetCardInfo("Splatter Thug", 146, Rarity.COMMON, mage.cards.s.SplatterThug.class)); + cards.add(new SetCardInfo("Staggershock", 147, Rarity.UNCOMMON, mage.cards.s.Staggershock.class)); + cards.add(new SetCardInfo("Surreal Memoir", 148, Rarity.UNCOMMON, mage.cards.s.SurrealMemoir.class)); + cards.add(new SetCardInfo("Thundermaw Hellkite", 149, Rarity.MYTHIC, mage.cards.t.ThundermawHellkite.class)); + cards.add(new SetCardInfo("Tormenting Voice", 150, Rarity.COMMON, mage.cards.t.TormentingVoice.class)); + cards.add(new SetCardInfo("Trumpet Blast", 151, Rarity.COMMON, mage.cards.t.TrumpetBlast.class)); + cards.add(new SetCardInfo("Urabrask the Hidden", 152, Rarity.MYTHIC, mage.cards.u.UrabraskTheHidden.class)); + cards.add(new SetCardInfo("Vent Sentinel", 153, Rarity.COMMON, mage.cards.v.VentSentinel.class)); + cards.add(new SetCardInfo("Aerial Predation", 154, Rarity.COMMON, mage.cards.a.AerialPredation.class)); + cards.add(new SetCardInfo("Assault Formation", 155, Rarity.UNCOMMON, mage.cards.a.AssaultFormation.class)); + cards.add(new SetCardInfo("Carven Caryatid", 156, Rarity.UNCOMMON, mage.cards.c.CarvenCaryatid.class)); + cards.add(new SetCardInfo("Channel", 157, Rarity.MYTHIC, mage.cards.c.Channel.class)); + cards.add(new SetCardInfo("Crowned Ceratok", 158, Rarity.COMMON, mage.cards.c.CrownedCeratok.class)); + cards.add(new SetCardInfo("Curse of Predation", 159, Rarity.RARE, mage.cards.c.CurseOfPredation.class)); + cards.add(new SetCardInfo("Durkwood Baloth", 160, Rarity.COMMON, mage.cards.d.DurkwoodBaloth.class)); + cards.add(new SetCardInfo("Duskdale Wurm", 161, Rarity.COMMON, mage.cards.d.DuskdaleWurm.class)); + cards.add(new SetCardInfo("Enlarge", 162, Rarity.UNCOMMON, mage.cards.e.Enlarge.class)); + cards.add(new SetCardInfo("Genesis Hydra", 163, Rarity.RARE, mage.cards.g.GenesisHydra.class)); + cards.add(new SetCardInfo("Genesis Wave", 164, Rarity.RARE, mage.cards.g.GenesisWave.class)); + cards.add(new SetCardInfo("Greater Basilisk", 165, Rarity.COMMON, mage.cards.g.GreaterBasilisk.class)); + cards.add(new SetCardInfo("Heroes' Bane", 166, Rarity.UNCOMMON, mage.cards.h.HeroesBane.class)); + cards.add(new SetCardInfo("Hunting Pack", 167, Rarity.UNCOMMON, mage.cards.h.HuntingPack.class)); + cards.add(new SetCardInfo("Hunt the Weak", 168, Rarity.COMMON, mage.cards.h.HuntTheWeak.class)); + cards.add(new SetCardInfo("Inspiring Call", 169, Rarity.UNCOMMON, mage.cards.i.InspiringCall.class)); + cards.add(new SetCardInfo("Ivy Elemental", 170, Rarity.COMMON, mage.cards.i.IvyElemental.class)); + cards.add(new SetCardInfo("Jaddi Offshoot", 171, Rarity.COMMON, mage.cards.j.JaddiOffshoot.class)); + cards.add(new SetCardInfo("Jugan, the Rising Star", 172, Rarity.RARE, mage.cards.j.JuganTheRisingStar.class)); + cards.add(new SetCardInfo("Lead the Stampede", 173, Rarity.COMMON, mage.cards.l.LeadTheStampede.class)); + cards.add(new SetCardInfo("Lotus Cobra", 174, Rarity.RARE, mage.cards.l.LotusCobra.class)); + cards.add(new SetCardInfo("Lure", 175, Rarity.UNCOMMON, mage.cards.l.Lure.class)); + cards.add(new SetCardInfo("Nantuko Shaman", 176, Rarity.COMMON, mage.cards.n.NantukoShaman.class)); + cards.add(new SetCardInfo("Nature's Claim", 177, Rarity.COMMON, mage.cards.n.NaturesClaim.class)); + cards.add(new SetCardInfo("Netcaster Spider", 178, Rarity.COMMON, mage.cards.n.NetcasterSpider.class)); + cards.add(new SetCardInfo("Obstinate Baloth", 179, Rarity.RARE, mage.cards.o.ObstinateBaloth.class)); + cards.add(new SetCardInfo("Overgrown Battlement", 180, Rarity.UNCOMMON, mage.cards.o.OvergrownBattlement.class)); + cards.add(new SetCardInfo("Phantom Tiger", 181, Rarity.COMMON, mage.cards.p.PhantomTiger.class)); + cards.add(new SetCardInfo("Prey's Vengeance", 182, Rarity.COMMON, mage.cards.p.PreysVengeance.class)); + cards.add(new SetCardInfo("Primeval Titan", 183, Rarity.MYTHIC, mage.cards.p.PrimevalTitan.class)); + cards.add(new SetCardInfo("Rampaging Baloths", 184, Rarity.RARE, mage.cards.r.RampagingBaloths.class)); + cards.add(new SetCardInfo("Search for Tomorrow", 185, Rarity.COMMON, mage.cards.s.SearchForTomorrow.class)); + cards.add(new SetCardInfo("Sultai Flayer", 186, Rarity.UNCOMMON, mage.cards.s.SultaiFlayer.class)); + cards.add(new SetCardInfo("Timberland Guide", 187, Rarity.COMMON, mage.cards.t.TimberlandGuide.class)); + cards.add(new SetCardInfo("Undercity Troll", 188, Rarity.UNCOMMON, mage.cards.u.UndercityTroll.class)); + cards.add(new SetCardInfo("Vorinclex, Voice of Hunger", 189, Rarity.MYTHIC, mage.cards.v.VorinclexVoiceOfHunger.class)); + cards.add(new SetCardInfo("Wall of Roots", 190, Rarity.COMMON, mage.cards.w.WallOfRoots.class)); + cards.add(new SetCardInfo("Wildsize", 191, Rarity.COMMON, mage.cards.w.Wildsize.class)); + cards.add(new SetCardInfo("Azorius Charm", 192, Rarity.UNCOMMON, mage.cards.a.AzoriusCharm.class)); + cards.add(new SetCardInfo("Bladewing the Risen", 193, Rarity.UNCOMMON, mage.cards.b.BladewingTheRisen.class)); + cards.add(new SetCardInfo("Blizzard Specter", 194, Rarity.UNCOMMON, mage.cards.b.BlizzardSpecter.class)); + cards.add(new SetCardInfo("Blood Baron of Vizkopa", 195, Rarity.RARE, mage.cards.b.BloodBaronOfVizkopa.class)); + cards.add(new SetCardInfo("Chronicler of Heroes", 196, Rarity.UNCOMMON, mage.cards.c.ChroniclerOfHeroes.class)); + cards.add(new SetCardInfo("Corpsejack Menace", 197, Rarity.UNCOMMON, mage.cards.c.CorpsejackMenace.class)); + cards.add(new SetCardInfo("Electrolyze", 198, Rarity.UNCOMMON, mage.cards.e.Electrolyze.class)); + cards.add(new SetCardInfo("Firemane Angel", 199, Rarity.RARE, mage.cards.f.FiremaneAngel.class)); + cards.add(new SetCardInfo("Glimpse the Unthinkable", 200, Rarity.RARE, mage.cards.g.GlimpseTheUnthinkable.class)); + cards.add(new SetCardInfo("Hypersonic Dragon", 201, Rarity.RARE, mage.cards.h.HypersonicDragon.class)); + cards.add(new SetCardInfo("Jungle Barrier", 202, Rarity.UNCOMMON, mage.cards.j.JungleBarrier.class)); + cards.add(new SetCardInfo("Knight of the Reliquary", 203, Rarity.RARE, mage.cards.k.KnightOfTheReliquary.class)); + cards.add(new SetCardInfo("Lightning Helix", 204, Rarity.UNCOMMON, mage.cards.l.LightningHelix.class)); + cards.add(new SetCardInfo("Malfegor", 205, Rarity.RARE, mage.cards.m.Malfegor.class)); + cards.add(new SetCardInfo("Rosheen Meanderer", 206, Rarity.UNCOMMON, mage.cards.r.RosheenMeanderer.class)); + cards.add(new SetCardInfo("Savageborn Hydra", 207, Rarity.RARE, mage.cards.s.SavagebornHydra.class)); + cards.add(new SetCardInfo("Simic Sky Swallower", 208, Rarity.RARE, mage.cards.s.SimicSkySwallower.class)); + cards.add(new SetCardInfo("Spiritmonger", 209, Rarity.RARE, mage.cards.s.Spiritmonger.class)); + cards.add(new SetCardInfo("Supreme Verdict", 210, Rarity.RARE, mage.cards.s.SupremeVerdict.class)); + cards.add(new SetCardInfo("Vizkopa Guildmage", 211, Rarity.UNCOMMON, mage.cards.v.VizkopaGuildmage.class)); + cards.add(new SetCardInfo("Aether Vial", 212, Rarity.RARE, mage.cards.a.AetherVial.class)); + cards.add(new SetCardInfo("Bubbling Cauldron", 213, Rarity.UNCOMMON, mage.cards.b.BubblingCauldron.class)); + cards.add(new SetCardInfo("Darksteel Axe", 214, Rarity.COMMON, mage.cards.d.DarksteelAxe.class)); + cards.add(new SetCardInfo("Dragonloft Idol", 215, Rarity.UNCOMMON, mage.cards.d.DragonloftIdol.class)); + cards.add(new SetCardInfo("Guardian Idol", 216, Rarity.COMMON, mage.cards.g.GuardianIdol.class)); + cards.add(new SetCardInfo("Kolaghan Monument", 217, Rarity.UNCOMMON, mage.cards.k.KolaghanMonument.class)); + cards.add(new SetCardInfo("Manakin", 218, Rarity.COMMON, mage.cards.m.Manakin.class)); + cards.add(new SetCardInfo("Mind Stone", 219, Rarity.COMMON, mage.cards.m.MindStone.class)); + cards.add(new SetCardInfo("Mindcrank", 220, Rarity.UNCOMMON, mage.cards.m.Mindcrank.class)); + cards.add(new SetCardInfo("Mishra's Bauble", 221, Rarity.UNCOMMON, mage.cards.m.MishrasBauble.class)); + cards.add(new SetCardInfo("Moonglove Extract", 222, Rarity.COMMON, mage.cards.m.MoongloveExtract.class)); + cards.add(new SetCardInfo("Oblivion Stone", 223, Rarity.RARE, mage.cards.o.OblivionStone.class)); + cards.add(new SetCardInfo("Palladium Myr", 224, Rarity.UNCOMMON, mage.cards.p.PalladiumMyr.class)); + cards.add(new SetCardInfo("Pristine Talisman", 225, Rarity.UNCOMMON, mage.cards.p.PristineTalisman.class)); + cards.add(new SetCardInfo("Runed Servitor", 226, Rarity.COMMON, mage.cards.r.RunedServitor.class)); + cards.add(new SetCardInfo("Sandstone Oracle", 227, Rarity.UNCOMMON, mage.cards.s.SandstoneOracle.class)); + cards.add(new SetCardInfo("Serum Powder", 228, Rarity.RARE, mage.cards.s.SerumPowder.class)); + cards.add(new SetCardInfo("Star Compass", 229, Rarity.COMMON, mage.cards.s.StarCompass.class)); + cards.add(new SetCardInfo("Thran Dynamo", 230, Rarity.UNCOMMON, mage.cards.t.ThranDynamo.class)); + cards.add(new SetCardInfo("Trepanation Blade", 231, Rarity.UNCOMMON, mage.cards.t.TrepanationBlade.class)); + cards.add(new SetCardInfo("Azorius Chancery", 232, Rarity.UNCOMMON, mage.cards.a.AzoriusChancery.class)); + cards.add(new SetCardInfo("Boros Garrison", 233, Rarity.UNCOMMON, mage.cards.b.BorosGarrison.class)); + cards.add(new SetCardInfo("Dimir Aqueduct", 234, Rarity.UNCOMMON, mage.cards.d.DimirAqueduct.class)); + cards.add(new SetCardInfo("Evolving Wilds", 235, Rarity.COMMON, mage.cards.e.EvolvingWilds.class)); + cards.add(new SetCardInfo("Golgari Rot Farm", 236, Rarity.UNCOMMON, mage.cards.g.GolgariRotFarm.class)); + cards.add(new SetCardInfo("Graven Cairns", 237, Rarity.RARE, mage.cards.g.GravenCairns.class)); + cards.add(new SetCardInfo("Grove of the Burnwillows", 238, Rarity.RARE, mage.cards.g.GroveOfTheBurnwillows.class)); + cards.add(new SetCardInfo("Gruul Turf", 239, Rarity.UNCOMMON, mage.cards.g.GruulTurf.class)); + cards.add(new SetCardInfo("Horizon Canopy", 240, Rarity.RARE, mage.cards.h.HorizonCanopy.class)); + cards.add(new SetCardInfo("Izzet Boilerworks", 241, Rarity.UNCOMMON, mage.cards.i.IzzetBoilerworks.class)); + cards.add(new SetCardInfo("Nimbus Maze", 242, Rarity.RARE, mage.cards.n.NimbusMaze.class)); + cards.add(new SetCardInfo("Orzhov Basilica", 243, Rarity.UNCOMMON, mage.cards.o.OrzhovBasilica.class)); + cards.add(new SetCardInfo("Radiant Fountain", 244, Rarity.COMMON, mage.cards.r.RadiantFountain.class)); + cards.add(new SetCardInfo("Rakdos Carnarium", 245, Rarity.UNCOMMON, mage.cards.r.RakdosCarnarium.class)); + cards.add(new SetCardInfo("River of Tears", 246, Rarity.RARE, mage.cards.r.RiverOfTears.class)); + cards.add(new SetCardInfo("Selesnya Sanctuary", 247, Rarity.UNCOMMON, mage.cards.s.SelesnyaSanctuary.class)); + cards.add(new SetCardInfo("Shimmering Grotto", 248, Rarity.COMMON, mage.cards.s.ShimmeringGrotto.class)); + cards.add(new SetCardInfo("Simic Growth Chamber", 249, Rarity.UNCOMMON, mage.cards.s.SimicGrowthChamber.class)); + } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/Innistrad.java b/Mage.Sets/src/mage/sets/Innistrad.java index b25384762b..7b7ce3f254 100644 --- a/Mage.Sets/src/mage/sets/Innistrad.java +++ b/Mage.Sets/src/mage/sets/Innistrad.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; diff --git a/Mage.Sets/src/mage/sets/Invasion.java b/Mage.Sets/src/mage/sets/Invasion.java index 90cc7bf4b5..1a287d0fe7 100644 --- a/Mage.Sets/src/mage/sets/Invasion.java +++ b/Mage.Sets/src/mage/sets/Invasion.java @@ -36,6 +36,7 @@ import mage.constants.SetType; * @author North */ public class Invasion extends ExpansionSet { + private static final Invasion instance = new Invasion(); public static Invasion getInstance() { @@ -74,6 +75,7 @@ public class Invasion extends ExpansionSet { cards.add(new SetCardInfo("Aura Mutation", 232, Rarity.RARE, mage.cards.a.AuraMutation.class)); cards.add(new SetCardInfo("Aura Shards", 233, Rarity.UNCOMMON, mage.cards.a.AuraShards.class)); cards.add(new SetCardInfo("Backlash", 234, Rarity.UNCOMMON, mage.cards.b.Backlash.class)); + cards.add(new SetCardInfo("Barrin's Spite", 235, Rarity.RARE, mage.cards.b.BarrinsSpite.class)); cards.add(new SetCardInfo("Barrin's Unmaking", 46, Rarity.COMMON, mage.cards.b.BarrinsUnmaking.class)); cards.add(new SetCardInfo("Benalish Emissary", 5, Rarity.UNCOMMON, mage.cards.b.BenalishEmissary.class)); cards.add(new SetCardInfo("Benalish Heralds", 6, Rarity.UNCOMMON, mage.cards.b.BenalishHeralds.class)); diff --git a/Mage.Sets/src/mage/sets/Ixalan.java b/Mage.Sets/src/mage/sets/Ixalan.java index 2fa373381a..3e35230b86 100644 --- a/Mage.Sets/src/mage/sets/Ixalan.java +++ b/Mage.Sets/src/mage/sets/Ixalan.java @@ -27,19 +27,311 @@ public class Ixalan extends ExpansionSet { this.hasBoosters = true; this.hasBasicLands = true; this.numBoosterLands = 1; - this.numBoosterCommon = 11; + this.numBoosterCommon = 10; this.numBoosterUncommon = 3; this.numBoosterRare = 1; this.ratioBoosterMythic = 8; + this.numBoosterDoubleFaced = -1; + this.maxCardNumberInBooster = 279; + + cards.add(new SetCardInfo("Adanto, the First Fort", 22, Rarity.RARE, mage.cards.a.AdantoTheFirstFort.class)); + cards.add(new SetCardInfo("Adanto Vanguard", 1, Rarity.UNCOMMON, mage.cards.a.AdantoVanguard.class)); + cards.add(new SetCardInfo("Admiral Beckett Brass", 217, Rarity.MYTHIC, mage.cards.a.AdmiralBeckettBrass.class)); + cards.add(new SetCardInfo("Air Elemental", 45, Rarity.UNCOMMON, mage.cards.a.AirElemental.class)); + cards.add(new SetCardInfo("Ancient Brontodon", 175, Rarity.COMMON, mage.cards.a.AncientBrontodon.class)); + cards.add(new SetCardInfo("Angrath's Marauders", 132, Rarity.RARE, mage.cards.a.AngrathsMarauders.class)); + cards.add(new SetCardInfo("Anointed Deacon", 89, Rarity.COMMON, mage.cards.a.AnointedDeacon.class)); + cards.add(new SetCardInfo("Arcane Adaptation", 46, Rarity.RARE, mage.cards.a.ArcaneAdaptation.class)); + cards.add(new SetCardInfo("Arguel's Blood Fast", 90, Rarity.RARE, mage.cards.a.ArguelsBloodFast.class)); + cards.add(new SetCardInfo("Ashes of the Abhorrent", 2, Rarity.RARE, mage.cards.a.AshesOfTheAbhorrent.class)); + cards.add(new SetCardInfo("Atzocan Archer", 176, Rarity.UNCOMMON, mage.cards.a.AtzocanArcher.class)); + cards.add(new SetCardInfo("Axis of Mortality", 3, Rarity.MYTHIC, mage.cards.a.AxisOfMortality.class)); + cards.add(new SetCardInfo("Azcanta, the Sunken Ruin", 74, Rarity.RARE, mage.cards.a.AzcantaTheSunkenRuin.class)); + cards.add(new SetCardInfo("Belligerent Brontodon", 218, Rarity.UNCOMMON, mage.cards.b.BelligerentBrontodon.class)); + cards.add(new SetCardInfo("Bellowing Aegisaur", 4, Rarity.UNCOMMON, mage.cards.b.BellowingAegisaur.class)); + cards.add(new SetCardInfo("Bishop of Rebirth", 5, Rarity.RARE, mage.cards.b.BishopOfRebirth.class)); + cards.add(new SetCardInfo("Bishop of the Bloodstained", 91, Rarity.UNCOMMON, mage.cards.b.BishopOfTheBloodstained.class)); + cards.add(new SetCardInfo("Bishop's Soldier", 6, Rarity.COMMON, mage.cards.b.BishopsSoldier.class)); + cards.add(new SetCardInfo("Blight Keeper", 92, Rarity.COMMON, mage.cards.b.BlightKeeper.class)); + cards.add(new SetCardInfo("Blinding Fog", 177, Rarity.COMMON, mage.cards.b.BlindingFog.class)); + cards.add(new SetCardInfo("Bloodcrazed Paladin", 93, Rarity.RARE, mage.cards.b.BloodcrazedPaladin.class)); + cards.add(new SetCardInfo("Blossom Dryad", 178, Rarity.COMMON, mage.cards.b.BlossomDryad.class)); + cards.add(new SetCardInfo("Bonded Horncrest", 133, Rarity.UNCOMMON, mage.cards.b.BondedHorncrest.class)); + cards.add(new SetCardInfo("Boneyard Parley", 94, Rarity.MYTHIC, mage.cards.b.BoneyardParley.class)); + cards.add(new SetCardInfo("Brazen Buccaneers", 134, Rarity.COMMON, mage.cards.b.BrazenBuccaneers.class)); + cards.add(new SetCardInfo("Bright Reprisal", 7, Rarity.UNCOMMON, mage.cards.b.BrightReprisal.class)); + cards.add(new SetCardInfo("Burning Sun's Avatar", 135, Rarity.RARE, mage.cards.b.BurningSunsAvatar.class)); + cards.add(new SetCardInfo("Call to the Feast", 219, Rarity.UNCOMMON, mage.cards.c.CallToTheFeast.class)); + cards.add(new SetCardInfo("Cancel", 47, Rarity.COMMON, mage.cards.c.Cancel.class)); + cards.add(new SetCardInfo("Captain Lannery Storm", 136, Rarity.RARE, mage.cards.c.CaptainLanneryStorm.class)); + cards.add(new SetCardInfo("Captivating Crew", 137, Rarity.RARE, mage.cards.c.CaptivatingCrew.class)); + cards.add(new SetCardInfo("Carnage Tyrant", 179, Rarity.MYTHIC, mage.cards.c.CarnageTyrant.class)); + cards.add(new SetCardInfo("Castaway's Despair", 281, Rarity.COMMON, mage.cards.c.CastawaysDespair.class)); + cards.add(new SetCardInfo("Charging Monstrosaur", 138, Rarity.UNCOMMON, mage.cards.c.ChargingMonstrosaur.class)); + cards.add(new SetCardInfo("Chart a Course", 48, Rarity.UNCOMMON, mage.cards.c.ChartACourse.class)); + cards.add(new SetCardInfo("Cobbled Wings", 233, Rarity.COMMON, mage.cards.c.CobbledWings.class)); + cards.add(new SetCardInfo("Colossal Dreadmaw", 180, Rarity.COMMON, mage.cards.c.ColossalDreadmaw.class)); + cards.add(new SetCardInfo("Commune with Dinosaurs", 181, Rarity.COMMON, mage.cards.c.CommuneWithDinosaurs.class)); + cards.add(new SetCardInfo("Conqueror's Foothold", 234, Rarity.RARE, mage.cards.c.ConquerorsFoothold.class)); + cards.add(new SetCardInfo("Conqueror's Galleon", 234, Rarity.RARE, mage.cards.c.ConquerorsGalleon.class)); + cards.add(new SetCardInfo("Contract Killing", 95, Rarity.COMMON, mage.cards.c.ContractKilling.class)); + cards.add(new SetCardInfo("Costly Plunder", 96, Rarity.COMMON, mage.cards.c.CostlyPlunder.class)); + cards.add(new SetCardInfo("Crash the Ramparts", 182, Rarity.COMMON, mage.cards.c.CrashTheRamparts.class)); + cards.add(new SetCardInfo("Crushing Canopy", 183, Rarity.COMMON, mage.cards.c.CrushingCanopy.class)); + cards.add(new SetCardInfo("Daring Saboteur", 49, Rarity.RARE, mage.cards.d.DaringSaboteur.class)); + cards.add(new SetCardInfo("Dark Nourishment", 97, Rarity.UNCOMMON, mage.cards.d.DarkNourishment.class)); + cards.add(new SetCardInfo("Deadeye Plunderers", 220, Rarity.UNCOMMON, mage.cards.d.DeadeyePlunderers.class)); + cards.add(new SetCardInfo("Deadeye Quartermaster", 50, Rarity.UNCOMMON, mage.cards.d.DeadeyeQuartermaster.class)); + cards.add(new SetCardInfo("Deadeye Tormentor", 98, Rarity.COMMON, mage.cards.d.DeadeyeTormentor.class)); + cards.add(new SetCardInfo("Deadeye Tracker", 99, Rarity.RARE, mage.cards.d.DeadeyeTracker.class)); + cards.add(new SetCardInfo("Deathgorge Scavenger", 184, Rarity.RARE, mage.cards.d.DeathgorgeScavenger.class)); + cards.add(new SetCardInfo("Deathless Ancient", 100, Rarity.UNCOMMON, mage.cards.d.DeathlessAncient.class)); + cards.add(new SetCardInfo("Deeproot Champion", 185, Rarity.RARE, mage.cards.d.DeeprootChampion.class)); + cards.add(new SetCardInfo("Deeproot Warrior", 186, Rarity.COMMON, mage.cards.d.DeeprootWarrior.class)); + cards.add(new SetCardInfo("Deeproot Waters", 51, Rarity.UNCOMMON, mage.cards.d.DeeprootWaters.class)); + cards.add(new SetCardInfo("Demolish", 139, Rarity.COMMON, mage.cards.d.Demolish.class)); + cards.add(new SetCardInfo("Demystify", 8, Rarity.COMMON, mage.cards.d.Demystify.class)); + cards.add(new SetCardInfo("Depths of Desire", 52, Rarity.COMMON, mage.cards.d.DepthsOfDesire.class)); + cards.add(new SetCardInfo("Desperate Castaways", 101, Rarity.COMMON, mage.cards.d.DesperateCastaways.class)); + cards.add(new SetCardInfo("Dinosaur Stampede", 140, Rarity.UNCOMMON, mage.cards.d.DinosaurStampede.class)); + cards.add(new SetCardInfo("Dire Fleet Captain", 221, Rarity.UNCOMMON, mage.cards.d.DireFleetCaptain.class)); + cards.add(new SetCardInfo("Dire Fleet Hoarder", 102, Rarity.COMMON, mage.cards.d.DireFleetHoarder.class)); + cards.add(new SetCardInfo("Dire Fleet Interloper", 103, Rarity.COMMON, mage.cards.d.DireFleetInterloper.class)); + cards.add(new SetCardInfo("Dire Fleet Ravager", 104, Rarity.MYTHIC, mage.cards.d.DireFleetRavager.class)); + cards.add(new SetCardInfo("Dive Down", 53, Rarity.COMMON, mage.cards.d.DiveDown.class)); + cards.add(new SetCardInfo("Dowsing Dagger", 235, Rarity.RARE, mage.cards.d.DowsingDagger.class)); cards.add(new SetCardInfo("Dragonskull Summit", 252, Rarity.RARE, mage.cards.d.DragonskullSummit.class)); + cards.add(new SetCardInfo("Dreamcaller Siren", 54, Rarity.RARE, mage.cards.d.DreamcallerSiren.class)); + cards.add(new SetCardInfo("Drover of the Mighty", 187, Rarity.UNCOMMON, mage.cards.d.DroverOfTheMighty.class)); cards.add(new SetCardInfo("Drowned Catacomb", 253, Rarity.RARE, mage.cards.d.DrownedCatacomb.class)); + cards.add(new SetCardInfo("Dual Shot", 141, Rarity.COMMON, mage.cards.d.DualShot.class)); + cards.add(new SetCardInfo("Duress", 105, Rarity.COMMON, mage.cards.d.Duress.class)); + cards.add(new SetCardInfo("Duskborne Skymarcher", 9, Rarity.UNCOMMON, mage.cards.d.DuskborneSkymarcher.class)); + cards.add(new SetCardInfo("Dusk Legion Dreadnought", 236, Rarity.UNCOMMON, mage.cards.d.DuskLegionDreadnought.class)); + cards.add(new SetCardInfo("Elaborate Firecannon", 237, Rarity.UNCOMMON, mage.cards.e.ElaborateFirecannon.class)); + cards.add(new SetCardInfo("Emergent Growth", 188, Rarity.UNCOMMON, mage.cards.e.EmergentGrowth.class)); + cards.add(new SetCardInfo("Emissary of Sunrise", 10, Rarity.UNCOMMON, mage.cards.e.EmissaryOfSunrise.class)); + cards.add(new SetCardInfo("Emperor's Vanguard", 189, Rarity.RARE, mage.cards.e.EmperorsVanguard.class)); + cards.add(new SetCardInfo("Encampment Keeper", 11, Rarity.COMMON, mage.cards.e.EncampmentKeeper.class)); + cards.add(new SetCardInfo("Entrancing Melody", 55, Rarity.RARE, mage.cards.e.EntrancingMelody.class)); + cards.add(new SetCardInfo("Fathom Fleet Captain", 106, Rarity.RARE, mage.cards.f.FathomFleetCaptain.class)); + cards.add(new SetCardInfo("Fathom Fleet Cutthroat", 107, Rarity.COMMON, mage.cards.f.FathomFleetCutthroat.class)); + cards.add(new SetCardInfo("Fathom Fleet Firebrand", 142, Rarity.COMMON, mage.cards.f.FathomFleetFirebrand.class)); + cards.add(new SetCardInfo("Favorable Winds", 56, Rarity.UNCOMMON, mage.cards.f.FavorableWinds.class)); + cards.add(new SetCardInfo("Fell Flagship", 238, Rarity.RARE, mage.cards.f.FellFlagship.class)); + cards.add(new SetCardInfo("Field of Ruin", 254, Rarity.UNCOMMON, mage.cards.f.FieldOfRuin.class)); + cards.add(new SetCardInfo("Fiery Cannonade", 143, Rarity.UNCOMMON, mage.cards.f.FieryCannonade.class)); + cards.add(new SetCardInfo("Fire Shrine Keeper", 144, Rarity.COMMON, mage.cards.f.FireShrineKeeper.class)); + cards.add(new SetCardInfo("Firecannon Blast", 145, Rarity.COMMON, mage.cards.f.FirecannonBlast.class)); + cards.add(new SetCardInfo("Fleet Swallower", 57, Rarity.RARE, mage.cards.f.FleetSwallower.class)); + cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class)); + cards.add(new SetCardInfo("Forest", 277, Rarity.LAND, mage.cards.basiclands.Forest.class)); + cards.add(new SetCardInfo("Forest", 278, Rarity.LAND, mage.cards.basiclands.Forest.class)); + cards.add(new SetCardInfo("Forest", 279, Rarity.LAND, mage.cards.basiclands.Forest.class)); + cards.add(new SetCardInfo("Frenzied Raptor", 146, Rarity.COMMON, mage.cards.f.FrenziedRaptor.class)); + cards.add(new SetCardInfo("Gilded Sentinel", 239, Rarity.COMMON, mage.cards.g.GildedSentinel.class)); + cards.add(new SetCardInfo("Gishath, Sun's Avatar", 222, Rarity.MYTHIC, mage.cards.g.GishathSunsAvatar.class)); cards.add(new SetCardInfo("Glacial Fortress", 255, Rarity.RARE, mage.cards.g.GlacialFortress.class)); + cards.add(new SetCardInfo("Glorifier of Dusk", 12, Rarity.UNCOMMON, mage.cards.g.GlorifierOfDusk.class)); + cards.add(new SetCardInfo("Goring Ceratops", 13, Rarity.RARE, mage.cards.g.GoringCeratops.class)); + cards.add(new SetCardInfo("Grasping Current", 282, Rarity.RARE, mage.cards.g.GraspingCurrent.class)); + cards.add(new SetCardInfo("Grazing Whiptail", 190, Rarity.COMMON, mage.cards.g.GrazingWhiptail.class)); + cards.add(new SetCardInfo("Grim Captain's Call", 108, Rarity.UNCOMMON, mage.cards.g.GrimCaptainsCall.class)); + cards.add(new SetCardInfo("Growing Rites of Itlimoc", 191, Rarity.RARE, mage.cards.g.GrowingRitesOfItlimoc.class)); + cards.add(new SetCardInfo("Headstrong Brute", 147, Rarity.COMMON, mage.cards.h.HeadstrongBrute.class)); + cards.add(new SetCardInfo("Headwater Sentries", 58, Rarity.COMMON, mage.cards.h.HeadwaterSentries.class)); + cards.add(new SetCardInfo("Heartless Pillage", 109, Rarity.UNCOMMON, mage.cards.h.HeartlessPillage.class)); + cards.add(new SetCardInfo("Herald of Secret Streams", 59, Rarity.RARE, mage.cards.h.HeraldOfSecretStreams.class)); + cards.add(new SetCardInfo("Hierophant's Chalice", 240, Rarity.COMMON, mage.cards.h.HierophantsChalice.class)); + cards.add(new SetCardInfo("Hijack", 148, Rarity.COMMON, mage.cards.h.Hijack.class)); + cards.add(new SetCardInfo("Hostage Taker", 223, Rarity.RARE, mage.cards.h.HostageTaker.class)); + cards.add(new SetCardInfo("Huatli, Dinosaur Knight", 285, Rarity.MYTHIC, mage.cards.h.HuatliDinosaurKnight.class)); + cards.add(new SetCardInfo("Huatli's Snubhorn", 286, Rarity.COMMON, mage.cards.h.HuatlisSnubhorn.class)); + cards.add(new SetCardInfo("Huatli's Spurring", 287, Rarity.UNCOMMON, mage.cards.h.HuatlisSpurring.class)); + cards.add(new SetCardInfo("Huatli, Warrior Poet", 224, Rarity.MYTHIC, mage.cards.h.HuatliWarriorPoet.class)); + cards.add(new SetCardInfo("Imperial Aerosaur", 14, Rarity.UNCOMMON, mage.cards.i.ImperialAerosaur.class)); + cards.add(new SetCardInfo("Imperial Lancer", 15, Rarity.UNCOMMON, mage.cards.i.ImperialLancer.class)); + cards.add(new SetCardInfo("Inspiring Cleric", 16, Rarity.UNCOMMON, mage.cards.i.InspiringCleric.class)); + cards.add(new SetCardInfo("Island", 264, Rarity.LAND, mage.cards.basiclands.Island.class)); + cards.add(new SetCardInfo("Island", 265, Rarity.LAND, mage.cards.basiclands.Island.class)); + cards.add(new SetCardInfo("Island", 266, Rarity.LAND, mage.cards.basiclands.Island.class)); + cards.add(new SetCardInfo("Island", 267, Rarity.LAND, mage.cards.basiclands.Island.class)); + cards.add(new SetCardInfo("Itlimoc, Cradle of the Sun", 191, Rarity.RARE, mage.cards.i.ItlimocCradleOfTheSun.class)); + cards.add(new SetCardInfo("Ixalan's Binding", 17, Rarity.UNCOMMON, mage.cards.i.IxalansBinding.class)); + cards.add(new SetCardInfo("Ixalli's Diviner", 192, Rarity.COMMON, mage.cards.i.IxallisDiviner.class)); + cards.add(new SetCardInfo("Ixalli's Keeper", 193, Rarity.COMMON, mage.cards.i.IxallisKeeper.class)); + cards.add(new SetCardInfo("Jace, Cunning Castaway", 60, Rarity.MYTHIC, mage.cards.j.JaceCunningCastaway.class)); + cards.add(new SetCardInfo("Jace, Ingenious Mind-Mage", 280, Rarity.MYTHIC, mage.cards.j.JaceIngeniousMindMage.class)); + cards.add(new SetCardInfo("Jace's Sentinel", 283, Rarity.UNCOMMON, mage.cards.j.JacesSentinel.class)); + cards.add(new SetCardInfo("Jade Guardian", 194, Rarity.COMMON, mage.cards.j.JadeGuardian.class)); + cards.add(new SetCardInfo("Jungle Delver", 195, Rarity.COMMON, mage.cards.j.JungleDelver.class)); + cards.add(new SetCardInfo("Kinjalli's Caller", 18, Rarity.COMMON, mage.cards.k.KinjallisCaller.class)); + cards.add(new SetCardInfo("Kinjalli's Sunwing", 19, Rarity.RARE, mage.cards.k.KinjallisSunwing.class)); + cards.add(new SetCardInfo("Kitesail Freebooter", 110, Rarity.UNCOMMON, mage.cards.k.KitesailFreebooter.class)); + cards.add(new SetCardInfo("Kopala, Warden of Waves", 61, Rarity.RARE, mage.cards.k.KopalaWardenOfWaves.class)); + cards.add(new SetCardInfo("Kumena's Speaker", 196, Rarity.UNCOMMON, mage.cards.k.KumenasSpeaker.class)); + cards.add(new SetCardInfo("Legion Conquistador", 20, Rarity.COMMON, mage.cards.l.LegionConquistador.class)); + cards.add(new SetCardInfo("Legion's Judgment", 21, Rarity.COMMON, mage.cards.l.LegionsJudgment.class)); + cards.add(new SetCardInfo("Legion's Landing", 22, Rarity.RARE, mage.cards.l.LegionsLanding.class)); + cards.add(new SetCardInfo("Lightning-Rig Crew", 150, Rarity.UNCOMMON, mage.cards.l.LightningRigCrew.class)); + cards.add(new SetCardInfo("Lightning Strike", 149, Rarity.UNCOMMON, mage.cards.l.LightningStrike.class)); + cards.add(new SetCardInfo("Lookout's Dispersal", 62, Rarity.UNCOMMON, mage.cards.l.LookoutsDispersal.class)); + cards.add(new SetCardInfo("Looming Altisaur", 23, Rarity.COMMON, mage.cards.l.LoomingAltisaur.class)); + cards.add(new SetCardInfo("Lost Vale", 235, Rarity.RARE, mage.cards.l.LostVale.class)); + cards.add(new SetCardInfo("Lurking Chupacabra", 111, Rarity.UNCOMMON, mage.cards.l.LurkingChupacabra.class)); + cards.add(new SetCardInfo("Makeshift Munitions", 151, Rarity.UNCOMMON, mage.cards.m.MakeshiftMunitions.class)); + cards.add(new SetCardInfo("Marauding Looter", 225, Rarity.UNCOMMON, mage.cards.m.MaraudingLooter.class)); + cards.add(new SetCardInfo("March of the Drowned", 112, Rarity.COMMON, mage.cards.m.MarchOfTheDrowned.class)); + cards.add(new SetCardInfo("Mark of the Vampire", 113, Rarity.COMMON, mage.cards.m.MarkOfTheVampire.class)); + cards.add(new SetCardInfo("Mavren Fein, Dusk Apostle", 24, Rarity.RARE, mage.cards.m.MavrenFeinDuskApostle.class)); + cards.add(new SetCardInfo("Merfolk Branchwalker", 197, Rarity.UNCOMMON, mage.cards.m.MerfolkBranchwalker.class)); + cards.add(new SetCardInfo("Mountain", 272, Rarity.LAND, mage.cards.basiclands.Mountain.class)); + cards.add(new SetCardInfo("Mountain", 273, Rarity.LAND, mage.cards.basiclands.Mountain.class)); + cards.add(new SetCardInfo("Mountain", 274, Rarity.LAND, mage.cards.basiclands.Mountain.class)); + cards.add(new SetCardInfo("Mountain", 275, Rarity.LAND, mage.cards.basiclands.Mountain.class)); + cards.add(new SetCardInfo("Navigator's Ruin", 63, Rarity.UNCOMMON, mage.cards.n.NavigatorsRuin.class)); + cards.add(new SetCardInfo("New Horizons", 198, Rarity.COMMON, mage.cards.n.NewHorizons.class)); + cards.add(new SetCardInfo("Nest Robber", 152, Rarity.COMMON, mage.cards.n.NestRobber.class)); + cards.add(new SetCardInfo("Old-Growth Dryads", 199, Rarity.RARE, mage.cards.o.OldGrowthDryads.class)); + cards.add(new SetCardInfo("One With the Wind", 64, Rarity.COMMON, mage.cards.o.OneWithTheWind.class)); + cards.add(new SetCardInfo("Opt", 65, Rarity.COMMON, mage.cards.o.Opt.class)); + cards.add(new SetCardInfo("Otepec Huntmaster", 153, Rarity.UNCOMMON, mage.cards.o.OtepecHuntmaster.class)); + cards.add(new SetCardInfo("Overflowing Insight", 66, Rarity.MYTHIC, mage.cards.o.OverflowingInsight.class)); + cards.add(new SetCardInfo("Paladin of the Bloodstained", 25, Rarity.COMMON, mage.cards.p.PaladinOfTheBloodstained.class)); + cards.add(new SetCardInfo("Perilous Voyage", 67, Rarity.UNCOMMON, mage.cards.p.PerilousVoyage.class)); + cards.add(new SetCardInfo("Pillar of Origins", 241, Rarity.UNCOMMON, mage.cards.p.PillarOfOrigins.class)); + cards.add(new SetCardInfo("Pious Interdiction", 26, Rarity.COMMON, mage.cards.p.PiousInterdiction.class)); + cards.add(new SetCardInfo("Pirate's Cutlass", 242, Rarity.COMMON, mage.cards.p.PiratesCutlass.class)); + cards.add(new SetCardInfo("Pirate's Prize", 68, Rarity.COMMON, mage.cards.p.PiratesPrize.class)); + cards.add(new SetCardInfo("Plains", 260, Rarity.LAND, mage.cards.basiclands.Plains.class)); + cards.add(new SetCardInfo("Plains", 261, Rarity.LAND, mage.cards.basiclands.Plains.class)); + cards.add(new SetCardInfo("Plains", 262, Rarity.LAND, mage.cards.basiclands.Plains.class)); + cards.add(new SetCardInfo("Plains", 263, Rarity.LAND, mage.cards.basiclands.Plains.class)); + cards.add(new SetCardInfo("Pounce", 200, Rarity.COMMON, mage.cards.p.Pounce.class)); + cards.add(new SetCardInfo("Priest of the Wakening Sun", 27, Rarity.RARE, mage.cards.p.PriestOfTheWakeningSun.class)); + cards.add(new SetCardInfo("Primal Amulet", 243, Rarity.RARE, mage.cards.p.PrimalAmulet.class)); + cards.add(new SetCardInfo("Primal Wellspring", 243, Rarity.RARE, mage.cards.p.PrimalWellspring.class)); + cards.add(new SetCardInfo("Prosperous Pirates", 69, Rarity.COMMON, mage.cards.p.ProsperousPirates.class)); + cards.add(new SetCardInfo("Prying Blade", 244, Rarity.COMMON, mage.cards.p.PryingBlade.class)); + cards.add(new SetCardInfo("Pterodon Knight", 28, Rarity.COMMON, mage.cards.p.PterodonKnight.class)); + cards.add(new SetCardInfo("Queen's Agent", 114, Rarity.COMMON, mage.cards.q.QueensAgent.class)); + cards.add(new SetCardInfo("Queen's Bay Soldier", 115, Rarity.COMMON, mage.cards.q.QueensBaySoldier.class)); + cards.add(new SetCardInfo("Queen's Commission", 29, Rarity.COMMON, mage.cards.q.QueensCommission.class)); + cards.add(new SetCardInfo("Raging Swordtooth", 226, Rarity.UNCOMMON, mage.cards.r.RagingSwordtooth.class)); + cards.add(new SetCardInfo("Raiders' Wake", 116, Rarity.UNCOMMON, mage.cards.r.RaidersWake.class)); + cards.add(new SetCardInfo("Rallying Roar", 30, Rarity.UNCOMMON, mage.cards.r.RallyingRoar.class)); + cards.add(new SetCardInfo("Rampaging Ferocidon", 154, Rarity.RARE, mage.cards.r.RampagingFerocidon.class)); + cards.add(new SetCardInfo("Ranging Raptors", 201, Rarity.UNCOMMON, mage.cards.r.RangingRaptors.class)); + cards.add(new SetCardInfo("Raptor Companion", 31, Rarity.COMMON, mage.cards.r.RaptorCompanion.class)); + cards.add(new SetCardInfo("Raptor Hatchling", 155, Rarity.UNCOMMON, mage.cards.r.RaptorHatchling.class)); + cards.add(new SetCardInfo("Ravenous Daggertooth", 202, Rarity.COMMON, mage.cards.r.RavenousDaggertooth.class)); + cards.add(new SetCardInfo("Regisaur Alpha", 227, Rarity.RARE, mage.cards.r.RegisaurAlpha.class)); + cards.add(new SetCardInfo("Repeating Barrage", 156, Rarity.RARE, mage.cards.r.RepeatingBarrage.class)); + cards.add(new SetCardInfo("Revel in Riches", 117, Rarity.RARE, mage.cards.r.RevelInRiches.class)); + cards.add(new SetCardInfo("Rigging Runner", 157, Rarity.UNCOMMON, mage.cards.r.RiggingRunner.class)); + cards.add(new SetCardInfo("Rile", 158, Rarity.COMMON, mage.cards.r.Rile.class)); + cards.add(new SetCardInfo("Ripjaw Raptor", 203, Rarity.RARE, mage.cards.r.RipjawRaptor.class)); + cards.add(new SetCardInfo("River Heralds' Boon", 204, Rarity.COMMON, mage.cards.r.RiverHeraldsBoon.class)); + cards.add(new SetCardInfo("Ritual of Rejuvenation", 32, Rarity.COMMON, mage.cards.r.RitualOfRejuvenation.class)); + cards.add(new SetCardInfo("River Sneak", 70, Rarity.UNCOMMON, mage.cards.r.RiverSneak.class)); + cards.add(new SetCardInfo("River's Rebuke", 71, Rarity.RARE, mage.cards.r.RiversRebuke.class)); cards.add(new SetCardInfo("Rootbound Crag", 256, Rarity.RARE, mage.cards.r.RootboundCrag.class)); + cards.add(new SetCardInfo("Rowdy Crew", 159, Rarity.MYTHIC, mage.cards.r.RowdyCrew.class)); + cards.add(new SetCardInfo("Ruin Raider", 118, Rarity.RARE, mage.cards.r.RuinRaider.class)); + cards.add(new SetCardInfo("Rummaging Goblin", 160, Rarity.COMMON, mage.cards.r.RummagingGoblin.class)); + cards.add(new SetCardInfo("Run Aground", 72, Rarity.COMMON, mage.cards.r.RunAground.class)); + cards.add(new SetCardInfo("Ruthless Knave", 119, Rarity.UNCOMMON, mage.cards.r.RuthlessKnave.class)); + cards.add(new SetCardInfo("Sailor of Means", 73, Rarity.COMMON, mage.cards.s.SailorOfMeans.class)); + cards.add(new SetCardInfo("Sanctum Seeker", 120, Rarity.RARE, mage.cards.s.SanctumSeeker.class)); + cards.add(new SetCardInfo("Sanguine Sacrament", 33, Rarity.RARE, mage.cards.s.SanguineSacrament.class)); + cards.add(new SetCardInfo("Savage Stomp", 205, Rarity.UNCOMMON, mage.cards.s.SavageStomp.class)); + cards.add(new SetCardInfo("Search for Azcanta", 74, Rarity.RARE, mage.cards.s.SearchForAzcanta.class)); + cards.add(new SetCardInfo("Seekers' Squire", 121, Rarity.UNCOMMON, mage.cards.s.SeekersSquire.class)); + cards.add(new SetCardInfo("Sentinel Totem", 245, Rarity.UNCOMMON, mage.cards.s.SentinelTotem.class)); + cards.add(new SetCardInfo("Settle the Wreckage", 34, Rarity.RARE, mage.cards.s.SettleTheWreckage.class)); + cards.add(new SetCardInfo("Shadowed Caravel", 246, Rarity.RARE, mage.cards.s.ShadowedCaravel.class)); + cards.add(new SetCardInfo("Shaper Apprentice", 75, Rarity.COMMON, mage.cards.s.ShaperApprentice.class)); + cards.add(new SetCardInfo("Shapers of Nature", 228, Rarity.UNCOMMON, mage.cards.s.ShapersOfNature.class)); + cards.add(new SetCardInfo("Shapers' Sanctuary", 206, Rarity.RARE, mage.cards.s.ShapersSanctuary.class)); + cards.add(new SetCardInfo("Sheltering Light", 35, Rarity.UNCOMMON, mage.cards.s.ShelteringLight.class)); + cards.add(new SetCardInfo("Shining Aerosaur", 36, Rarity.COMMON, mage.cards.s.ShiningAerosaur.class)); + cards.add(new SetCardInfo("Shipwreck Looter", 76, Rarity.COMMON, mage.cards.s.ShipwreckLooter.class)); + cards.add(new SetCardInfo("Shore Keeper", 77, Rarity.COMMON, mage.cards.s.ShoreKeeper.class)); + cards.add(new SetCardInfo("Siren Lookout", 78, Rarity.COMMON, mage.cards.s.SirenLookout.class)); + cards.add(new SetCardInfo("Siren Stormtamer", 79, Rarity.UNCOMMON, mage.cards.s.SirenStormtamer.class)); + cards.add(new SetCardInfo("Siren's Ruse", 80, Rarity.COMMON, mage.cards.s.SirensRuse.class)); + cards.add(new SetCardInfo("Skittering Heartstopper", 122, Rarity.COMMON, mage.cards.s.SkitteringHeartstopper.class)); + cards.add(new SetCardInfo("Skulduggery", 123, Rarity.COMMON, mage.cards.s.Skulduggery.class)); + cards.add(new SetCardInfo("Sky Terror", 229, Rarity.UNCOMMON, mage.cards.s.SkyTerror.class)); + cards.add(new SetCardInfo("Skyblade of the Legion", 37, Rarity.COMMON, mage.cards.s.SkybladeOfTheLegion.class)); + cards.add(new SetCardInfo("Skymarch Bloodletter", 124, Rarity.COMMON, mage.cards.s.SkymarchBloodletter.class)); + cards.add(new SetCardInfo("Slash of Talons", 38, Rarity.COMMON, mage.cards.s.SlashOfTalons.class)); + cards.add(new SetCardInfo("Sleek Schooner", 247, Rarity.UNCOMMON, mage.cards.s.SleekSchooner.class)); + cards.add(new SetCardInfo("Slice in Twain", 207, Rarity.UNCOMMON, mage.cards.s.SliceInTwain.class)); + cards.add(new SetCardInfo("Snapping Sailback", 208, Rarity.UNCOMMON, mage.cards.s.SnappingSailback.class)); + cards.add(new SetCardInfo("Sorcerous Spyglass", 248, Rarity.RARE, mage.cards.s.SorcerousSpyglass.class)); + cards.add(new SetCardInfo("Spell Pierce", 81, Rarity.COMMON, mage.cards.s.SpellPierce.class)); + cards.add(new SetCardInfo("Spell Swindle", 82, Rarity.RARE, mage.cards.s.SpellSwindle.class)); + cards.add(new SetCardInfo("Spike-Tailed Ceratops", 209, Rarity.COMMON, mage.cards.s.SpikeTailedCeratops.class)); + cards.add(new SetCardInfo("Spires of Orazca", 249, Rarity.RARE, mage.cards.s.SpiresOfOrazca.class)); + cards.add(new SetCardInfo("Spitfire Bastion", 173, Rarity.RARE, mage.cards.s.SpitfireBastion.class)); + cards.add(new SetCardInfo("Spreading Rot", 125, Rarity.COMMON, mage.cards.s.SpreadingRot.class)); + cards.add(new SetCardInfo("Star of Extinction", 161, Rarity.MYTHIC, mage.cards.s.StarOfExtinction.class)); + cards.add(new SetCardInfo("Steadfast Armasaur", 39, Rarity.UNCOMMON, mage.cards.s.SteadfastArmasaur.class)); + cards.add(new SetCardInfo("Stone Quarry", 289, Rarity.COMMON, mage.cards.s.StoneQuarry.class)); + cards.add(new SetCardInfo("Storm Fleet Aerialist", 83, Rarity.UNCOMMON, mage.cards.s.StormFleetAerialist.class)); + cards.add(new SetCardInfo("Storm Fleet Arsonist", 162, Rarity.UNCOMMON, mage.cards.s.StormFleetArsonist.class)); + cards.add(new SetCardInfo("Storm Fleet Pyromancer", 163, Rarity.COMMON, mage.cards.s.StormFleetPyromancer.class)); + cards.add(new SetCardInfo("Storm Fleet Spy", 84, Rarity.UNCOMMON, mage.cards.s.StormFleetSpy.class)); + cards.add(new SetCardInfo("Storm Sculptor", 85, Rarity.COMMON, mage.cards.s.StormSculptor.class)); + cards.add(new SetCardInfo("Sunbird's Invocation", 165, Rarity.RARE, mage.cards.s.SunbirdsInvocation.class)); + cards.add(new SetCardInfo("Sun-Blessed Mount", 288, Rarity.RARE, mage.cards.s.SunBlessedMount.class)); + cards.add(new SetCardInfo("Sun-Crowned Hunters", 164, Rarity.COMMON, mage.cards.s.SunCrownedHunters.class)); cards.add(new SetCardInfo("Sunpetal Grove", 257, Rarity.RARE, mage.cards.s.SunpetalGrove.class)); + cards.add(new SetCardInfo("Sunrise Seeker", 40, Rarity.COMMON, mage.cards.s.SunriseSeeker.class)); + cards.add(new SetCardInfo("Sure Strike", 166, Rarity.COMMON, mage.cards.s.SureStrike.class)); + cards.add(new SetCardInfo("Swamp", 268, Rarity.LAND, mage.cards.basiclands.Swamp.class)); + cards.add(new SetCardInfo("Swamp", 269, Rarity.LAND, mage.cards.basiclands.Swamp.class)); + cards.add(new SetCardInfo("Swamp", 270, Rarity.LAND, mage.cards.basiclands.Swamp.class)); + cards.add(new SetCardInfo("Swamp", 271, Rarity.LAND, mage.cards.basiclands.Swamp.class)); + cards.add(new SetCardInfo("Swashbuckling", 167, Rarity.COMMON, mage.cards.s.Swashbuckling.class)); + cards.add(new SetCardInfo("Sword-Point Diplomacy", 126, Rarity.RARE, mage.cards.s.SwordPointDiplomacy.class)); + cards.add(new SetCardInfo("Tempest Caller", 86, Rarity.UNCOMMON, mage.cards.t.TempestCaller.class)); + cards.add(new SetCardInfo("Temple of Aclazotz", 90, Rarity.RARE, mage.cards.t.TempleOfAclazotz.class)); + cards.add(new SetCardInfo("Territorial Hammerskull", 41, Rarity.COMMON, mage.cards.t.TerritorialHammerskull.class)); + cards.add(new SetCardInfo("Thaumatic Compass", 249, Rarity.RARE, mage.cards.t.ThaumaticCompass.class)); + cards.add(new SetCardInfo("Thrash of Raptors", 168, Rarity.COMMON, mage.cards.t.ThrashOfRaptors.class)); + cards.add(new SetCardInfo("Thundering Spineback", 210, Rarity.UNCOMMON, mage.cards.t.ThunderingSpineback.class)); + cards.add(new SetCardInfo("Tilonalli's Knight", 169, Rarity.COMMON, mage.cards.t.TilonallisKnight.class)); + cards.add(new SetCardInfo("Tilonalli's Skinshifter", 170, Rarity.RARE, mage.cards.t.TilonallisSkinshifter.class)); + cards.add(new SetCardInfo("Tishana's Wayfinder", 211, Rarity.COMMON, mage.cards.t.TishanasWayfinder.class)); + cards.add(new SetCardInfo("Tishana, Voice of Thunder", 230, Rarity.MYTHIC, mage.cards.t.TishanaVoiceOfThunder.class)); + cards.add(new SetCardInfo("Tocatli Honor Guard", 42, Rarity.RARE, mage.cards.t.TocatliHonorGuard.class)); + cards.add(new SetCardInfo("Treasure Cove", 250, Rarity.RARE, mage.cards.t.TreasureCove.class)); + cards.add(new SetCardInfo("Treasure Map", 250, Rarity.RARE, mage.cards.t.TreasureMap.class)); + cards.add(new SetCardInfo("Trove of Temptation", 171, Rarity.UNCOMMON, mage.cards.t.TroveOfTemptation.class)); + cards.add(new SetCardInfo("Unclaimed Territory", 258, Rarity.UNCOMMON, mage.cards.u.UnclaimedTerritory.class)); + cards.add(new SetCardInfo("Unfriendly Fire", 172, Rarity.COMMON, mage.cards.u.UnfriendlyFire.class)); + cards.add(new SetCardInfo("Unknown Shores", 259, Rarity.COMMON, mage.cards.u.UnknownShores.class)); + cards.add(new SetCardInfo("Vampire's Zeal", 43, Rarity.COMMON, mage.cards.v.VampiresZeal.class)); + cards.add(new SetCardInfo("Vance's Blasting Cannons", 173, Rarity.RARE, mage.cards.v.VancesBlastingCannons.class)); + cards.add(new SetCardInfo("Vanquish the Weak", 127, Rarity.COMMON, mage.cards.v.VanquishTheWeak.class)); cards.add(new SetCardInfo("Vanquisher's Banner", 251, Rarity.RARE, mage.cards.v.VanquishersBanner.class)); + cards.add(new SetCardInfo("Verdant Rebirth", 212, Rarity.UNCOMMON, mage.cards.v.VerdantRebirth.class)); cards.add(new SetCardInfo("Verdant Sun's Avatar", 213, Rarity.RARE, mage.cards.v.VerdantSunsAvatar.class)); + cards.add(new SetCardInfo("Vicious Conquistador", 128, Rarity.UNCOMMON, mage.cards.v.ViciousConquistador.class)); + cards.add(new SetCardInfo("Vineshaper Mystic", 214, Rarity.UNCOMMON, mage.cards.v.VineshaperMystic.class)); + cards.add(new SetCardInfo("Vona, Butcher of Magan", 231, Rarity.MYTHIC, mage.cards.v.VonaButcherOfMagan.class)); + cards.add(new SetCardInfo("Vraska, Relic Seeker", 232, Rarity.MYTHIC, mage.cards.v.VraskaRelicSeeker.class)); cards.add(new SetCardInfo("Vraska's Contempt", 129, Rarity.RARE, mage.cards.v.VraskasContempt.class)); + cards.add(new SetCardInfo("Wakening Sun's Avatar", 44, Rarity.MYTHIC, mage.cards.w.WakeningSunsAvatar.class)); cards.add(new SetCardInfo("Waker of the Wilds", 215, Rarity.RARE, mage.cards.w.WakerOfTheWilds.class)); cards.add(new SetCardInfo("Walk the Plank", 130, Rarity.UNCOMMON, mage.cards.w.WalkThePlank.class)); + cards.add(new SetCardInfo("Wanted Scoundrels", 131, Rarity.UNCOMMON, mage.cards.w.WantedScoundrels.class)); + cards.add(new SetCardInfo("Watertrap Weaver", 87, Rarity.COMMON, mage.cards.w.WatertrapWeaver.class)); + cards.add(new SetCardInfo("Wildgrowth Walker", 216, Rarity.UNCOMMON, mage.cards.w.WildgrowthWalker.class)); + cards.add(new SetCardInfo("Wily Goblin", 174, Rarity.UNCOMMON, mage.cards.w.WilyGoblin.class)); + cards.add(new SetCardInfo("Wind Strider", 88, Rarity.COMMON, mage.cards.w.WindStrider.class)); + cards.add(new SetCardInfo("Woodland Stream", 284, Rarity.COMMON, mage.cards.w.WoodlandStream.class)); } } diff --git a/Mage.Sets/src/mage/sets/IzzetVsGolgari.java b/Mage.Sets/src/mage/sets/IzzetVsGolgari.java index e362dc0ab3..eb89bd38f9 100644 --- a/Mage.Sets/src/mage/sets/IzzetVsGolgari.java +++ b/Mage.Sets/src/mage/sets/IzzetVsGolgari.java @@ -35,8 +35,8 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class IzzetVsGolgari extends ExpansionSet { + private static final IzzetVsGolgari instance = new IzzetVsGolgari(); public static IzzetVsGolgari getInstance() { diff --git a/Mage.Sets/src/mage/sets/JaceVsChandra.java b/Mage.Sets/src/mage/sets/JaceVsChandra.java index ab5680022e..ae9e0a6298 100644 --- a/Mage.Sets/src/mage/sets/JaceVsChandra.java +++ b/Mage.Sets/src/mage/sets/JaceVsChandra.java @@ -3,7 +3,6 @@ * To change this template file, choose Tools | Templates * and open the template in the editor. */ - package mage.sets; import mage.cards.ExpansionSet; @@ -14,8 +13,8 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class JaceVsChandra extends ExpansionSet { + private static final JaceVsChandra instance = new JaceVsChandra(); public static JaceVsChandra getInstance() { diff --git a/Mage.Sets/src/mage/sets/JaceVsVraska.java b/Mage.Sets/src/mage/sets/JaceVsVraska.java index 4f70196040..1feb574329 100644 --- a/Mage.Sets/src/mage/sets/JaceVsVraska.java +++ b/Mage.Sets/src/mage/sets/JaceVsVraska.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -36,8 +35,8 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class JaceVsVraska extends ExpansionSet { + private static final JaceVsVraska instance = new JaceVsVraska(); public static JaceVsVraska getInstance() { diff --git a/Mage.Sets/src/mage/sets/JourneyIntoNyx.java b/Mage.Sets/src/mage/sets/JourneyIntoNyx.java index d8c195adad..cdec13c9bf 100644 --- a/Mage.Sets/src/mage/sets/JourneyIntoNyx.java +++ b/Mage.Sets/src/mage/sets/JourneyIntoNyx.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; diff --git a/Mage.Sets/src/mage/sets/Judgment.java b/Mage.Sets/src/mage/sets/Judgment.java index 77c542931b..4f46a7b417 100644 --- a/Mage.Sets/src/mage/sets/Judgment.java +++ b/Mage.Sets/src/mage/sets/Judgment.java @@ -118,6 +118,7 @@ public class Judgment extends ExpansionSet { cards.add(new SetCardInfo("Krosan Reclamation", 122, Rarity.UNCOMMON, mage.cards.k.KrosanReclamation.class)); cards.add(new SetCardInfo("Krosan Verge", 141, Rarity.UNCOMMON, mage.cards.k.KrosanVerge.class)); cards.add(new SetCardInfo("Krosan Wayfarer", 123, Rarity.COMMON, mage.cards.k.KrosanWayfarer.class)); + cards.add(new SetCardInfo("Laquatus's Disdain", 44, Rarity.UNCOMMON, mage.cards.l.LaquatussDisdain.class)); cards.add(new SetCardInfo("Lava Dart", 94, Rarity.COMMON, mage.cards.l.LavaDart.class)); cards.add(new SetCardInfo("Lead Astray", 14, Rarity.COMMON, mage.cards.l.LeadAstray.class)); cards.add(new SetCardInfo("Liberated Dwarf", 95, Rarity.COMMON, mage.cards.l.LiberatedDwarf.class)); @@ -127,7 +128,7 @@ public class Judgment extends ExpansionSet { cards.add(new SetCardInfo("Mental Note", 46, Rarity.COMMON, mage.cards.m.MentalNote.class)); cards.add(new SetCardInfo("Mirari's Wake", 139, Rarity.RARE, mage.cards.m.MirarisWake.class)); cards.add(new SetCardInfo("Mirror Wall", 47, Rarity.COMMON, mage.cards.m.MirrorWall.class)); - cards.add(new SetCardInfo("Mist of Stagnation", 48, Rarity.RARE, mage.cards.m.MistOfStagnation.class)); + cards.add(new SetCardInfo("Mist of Stagnation", 48, Rarity.RARE, mage.cards.m.MistOfStagnation.class)); cards.add(new SetCardInfo("Nantuko Monastery", 142, Rarity.UNCOMMON, mage.cards.n.NantukoMonastery.class)); cards.add(new SetCardInfo("Nantuko Tracer", 125, Rarity.COMMON, mage.cards.n.NantukoTracer.class)); cards.add(new SetCardInfo("Nomad Mythmaker", 15, Rarity.RARE, mage.cards.n.NomadMythmaker.class)); @@ -162,7 +163,9 @@ public class Judgment extends ExpansionSet { cards.add(new SetCardInfo("Sylvan Safekeeper", 133, Rarity.RARE, mage.cards.s.SylvanSafekeeper.class)); cards.add(new SetCardInfo("Test of Endurance", 29, Rarity.RARE, mage.cards.t.TestOfEndurance.class)); cards.add(new SetCardInfo("Thriss, Nantuko Primus", 134, Rarity.RARE, mage.cards.t.ThrissNantukoPrimus.class)); - cards.add(new SetCardInfo("Toxic Stench", 74, Rarity.COMMON, mage.cards.t.ToxicStench.class)); + cards.add(new SetCardInfo("Toxic Stench", 74, Rarity.COMMON, mage.cards.t.ToxicStench.class)); + cards.add(new SetCardInfo("Treacherous Vampire", 75, Rarity.UNCOMMON, mage.cards.t.TreacherousVampire.class)); + cards.add(new SetCardInfo("Treacherous Werewolf", 76, Rarity.COMMON, mage.cards.t.TreacherousWerewolf.class)); cards.add(new SetCardInfo("Tunneler Wurm", 135, Rarity.UNCOMMON, mage.cards.t.TunnelerWurm.class)); cards.add(new SetCardInfo("Unquestioned Authority", 31, Rarity.UNCOMMON, mage.cards.u.UnquestionedAuthority.class)); cards.add(new SetCardInfo("Valor", 32, Rarity.UNCOMMON, mage.cards.v.Valor.class)); @@ -172,5 +175,6 @@ public class Judgment extends ExpansionSet { cards.add(new SetCardInfo("Wonder", 54, Rarity.UNCOMMON, mage.cards.w.Wonder.class)); cards.add(new SetCardInfo("Worldgorger Dragon", 103, Rarity.RARE, mage.cards.w.WorldgorgerDragon.class)); cards.add(new SetCardInfo("Wormfang Drake", 57, Rarity.COMMON, mage.cards.w.WormfangDrake.class)); + cards.add(new SetCardInfo("Wormfang Manta", 58, Rarity.RARE, mage.cards.w.WormfangManta.class)); } } diff --git a/Mage.Sets/src/mage/sets/KhansOfTarkir.java b/Mage.Sets/src/mage/sets/KhansOfTarkir.java index 44360f2d5c..6988b69ee6 100644 --- a/Mage.Sets/src/mage/sets/KhansOfTarkir.java +++ b/Mage.Sets/src/mage/sets/KhansOfTarkir.java @@ -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; import mage.cards.ExpansionSet; @@ -36,7 +35,6 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class KhansOfTarkir extends ExpansionSet { private static final KhansOfTarkir instance = new KhansOfTarkir(); diff --git a/Mage.Sets/src/mage/sets/KnightsVsDragons.java b/Mage.Sets/src/mage/sets/KnightsVsDragons.java index 5c347f1c07..b2e4bd1556 100644 --- a/Mage.Sets/src/mage/sets/KnightsVsDragons.java +++ b/Mage.Sets/src/mage/sets/KnightsVsDragons.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -36,8 +35,8 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class KnightsVsDragons extends ExpansionSet { + private static final KnightsVsDragons instance = new KnightsVsDragons(); public static KnightsVsDragons getInstance() { @@ -130,4 +129,4 @@ public class KnightsVsDragons extends ExpansionSet { cards.add(new SetCardInfo("Wilt-Leaf Cavaliers", 15, Rarity.UNCOMMON, mage.cards.w.WiltLeafCavaliers.class)); cards.add(new SetCardInfo("Zhalfirin Commander", 13, Rarity.UNCOMMON, mage.cards.z.ZhalfirinCommander.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/LaunchParty.java b/Mage.Sets/src/mage/sets/LaunchParty.java index ee9d6f02fd..614aa174d7 100644 --- a/Mage.Sets/src/mage/sets/LaunchParty.java +++ b/Mage.Sets/src/mage/sets/LaunchParty.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -53,6 +52,7 @@ public class LaunchParty extends ExpansionSet { cards.add(new SetCardInfo("Angel of Deliverance", 35, Rarity.RARE, mage.cards.a.AngelOfDeliverance.class)); cards.add(new SetCardInfo("Ant Queen", 7, Rarity.RARE, mage.cards.a.AntQueen.class)); cards.add(new SetCardInfo("Bident of Thassa", 24, Rarity.RARE, mage.cards.b.BidentOfThassa.class)); + cards.add(new SetCardInfo("Bishop of Rebirth", 41, Rarity.RARE, mage.cards.b.BishopOfRebirth.class)); cards.add(new SetCardInfo("Blight Herder", 32, Rarity.RARE, mage.cards.b.BlightHerder.class)); cards.add(new SetCardInfo("Breaking // Entering", 22, Rarity.RARE, mage.cards.b.BreakingEntering.class)); cards.add(new SetCardInfo("Colossal Whale", 23, Rarity.RARE, mage.cards.c.ColossalWhale.class)); diff --git a/Mage.Sets/src/mage/sets/Legends.java b/Mage.Sets/src/mage/sets/Legends.java index 6c6865ca0d..62385b2f40 100644 --- a/Mage.Sets/src/mage/sets/Legends.java +++ b/Mage.Sets/src/mage/sets/Legends.java @@ -59,28 +59,31 @@ public class Legends extends ExpansionSet { cards.add(new SetCardInfo("Aerathi Berserker", 131, Rarity.UNCOMMON, mage.cards.a.AerathiBerserker.class)); cards.add(new SetCardInfo("Aisling Leprechaun", 87, Rarity.COMMON, mage.cards.a.AislingLeprechaun.class)); cards.add(new SetCardInfo("Akron Legionnaire", 170, Rarity.RARE, mage.cards.a.AkronLegionnaire.class)); + cards.add(new SetCardInfo("Alabaster Potion", 171, Rarity.COMMON, mage.cards.a.AlabasterPotion.class)); cards.add(new SetCardInfo("Alchor's Tomb", 214, Rarity.RARE, mage.cards.a.AlchorsTomb.class)); cards.add(new SetCardInfo("All Hallow's Eve", 2, Rarity.RARE, mage.cards.a.AllHallowsEve.class)); cards.add(new SetCardInfo("Amrou Kithkin", 172, Rarity.COMMON, mage.cards.a.AmrouKithkin.class)); + cards.add(new SetCardInfo("Angelic Voices", 173, Rarity.RARE, mage.cards.a.AngelicVoices.class)); cards.add(new SetCardInfo("Angus Mackenzie", 257, Rarity.RARE, mage.cards.a.AngusMackenzie.class)); cards.add(new SetCardInfo("Arcades Sabboth", 258, Rarity.RARE, mage.cards.a.ArcadesSabboth.class)); cards.add(new SetCardInfo("Arena of the Ancients", 215, Rarity.RARE, mage.cards.a.ArenaOfTheAncients.class)); cards.add(new SetCardInfo("Avoid Fate", 89, Rarity.COMMON, mage.cards.a.AvoidFate.class)); + cards.add(new SetCardInfo("Axelrod Gunnarson", 259, Rarity.RARE, mage.cards.a.AxelrodGunnarson.class)); cards.add(new SetCardInfo("Azure Drake", 46, Rarity.UNCOMMON, mage.cards.a.AzureDrake.class)); cards.add(new SetCardInfo("Backfire", 47, Rarity.UNCOMMON, mage.cards.b.Backfire.class)); cards.add(new SetCardInfo("Barbary Apes", 90, Rarity.COMMON, mage.cards.b.BarbaryApes.class)); cards.add(new SetCardInfo("Barktooth Warbeard", 261, Rarity.UNCOMMON, mage.cards.b.BarktoothWarbeard.class)); cards.add(new SetCardInfo("Bartel Runeaxe", 262, Rarity.RARE, mage.cards.b.BartelRuneaxe.class)); cards.add(new SetCardInfo("Beasts of Bogardan", 133, Rarity.UNCOMMON, mage.cards.b.BeastsOfBogardan.class)); - cards.add(new SetCardInfo("Black Mana Battery", 216, Rarity.UNCOMMON, mage.cards.b.BlackManaBattery.class)); + cards.add(new SetCardInfo("Black Mana Battery", 216, Rarity.UNCOMMON, mage.cards.b.BlackManaBattery.class)); cards.add(new SetCardInfo("Blight", 3, Rarity.UNCOMMON, mage.cards.b.Blight.class)); cards.add(new SetCardInfo("Blood Lust", 135, Rarity.UNCOMMON, mage.cards.b.BloodLust.class)); - cards.add(new SetCardInfo("Blue Mana Battery", 217, Rarity.UNCOMMON, mage.cards.b.BlueManaBattery.class)); + cards.add(new SetCardInfo("Blue Mana Battery", 217, Rarity.UNCOMMON, mage.cards.b.BlueManaBattery.class)); cards.add(new SetCardInfo("Boomerang", 48, Rarity.COMMON, mage.cards.b.Boomerang.class)); cards.add(new SetCardInfo("Boris Devilboon", 263, Rarity.RARE, mage.cards.b.BorisDevilboon.class)); cards.add(new SetCardInfo("Carrion Ants", 4, Rarity.RARE, mage.cards.c.CarrionAnts.class)); cards.add(new SetCardInfo("Cat Warriors", 91, Rarity.COMMON, mage.cards.c.CatWarriors.class)); - cards.add(new SetCardInfo("Caverns of Despair", 136, Rarity.RARE, mage.cards.c.CavernsOfDespair.class)); + cards.add(new SetCardInfo("Caverns of Despair", 136, Rarity.RARE, mage.cards.c.CavernsOfDespair.class)); cards.add(new SetCardInfo("Chain Lightning", 137, Rarity.COMMON, mage.cards.c.ChainLightning.class)); cards.add(new SetCardInfo("Chains of Mephistopheles", 5, Rarity.RARE, mage.cards.c.ChainsOfMephistopheles.class)); cards.add(new SetCardInfo("Chromium", 264, Rarity.RARE, mage.cards.c.Chromium.class)); @@ -98,11 +101,13 @@ public class Legends extends ExpansionSet { cards.add(new SetCardInfo("D'Avenant Archer", 176, Rarity.COMMON, mage.cards.d.DAvenantArcher.class)); cards.add(new SetCardInfo("Demonic Torment", 9, Rarity.UNCOMMON, mage.cards.d.DemonicTorment.class)); cards.add(new SetCardInfo("Devouring Deep", 50, Rarity.COMMON, mage.cards.d.DevouringDeep.class)); + cards.add(new SetCardInfo("Disharmony", 140, Rarity.RARE, mage.cards.d.Disharmony.class)); cards.add(new SetCardInfo("Divine Intervention", 177, Rarity.RARE, mage.cards.d.DivineIntervention.class)); cards.add(new SetCardInfo("Divine Offering", 178, Rarity.COMMON, mage.cards.d.DivineOffering.class)); cards.add(new SetCardInfo("Divine Transformation", 179, Rarity.RARE, mage.cards.d.DivineTransformation.class)); cards.add(new SetCardInfo("Durkwood Boars", 96, Rarity.COMMON, mage.cards.d.DurkwoodBoars.class)); cards.add(new SetCardInfo("Dwarven Song", 141, Rarity.UNCOMMON, mage.cards.d.DwarvenSong.class)); + cards.add(new SetCardInfo("Elder Land Wurm", 180, Rarity.RARE, mage.cards.e.ElderLandWurm.class)); cards.add(new SetCardInfo("Elven Riders", 97, Rarity.RARE, mage.cards.e.ElvenRiders.class)); cards.add(new SetCardInfo("Emerald Dragonfly", 98, Rarity.COMMON, mage.cards.e.EmeraldDragonfly.class)); cards.add(new SetCardInfo("Energy Tap", 54, Rarity.COMMON, mage.cards.e.EnergyTap.class)); @@ -114,19 +119,24 @@ public class Legends extends ExpansionSet { cards.add(new SetCardInfo("Fire Sprites", 100, Rarity.COMMON, mage.cards.f.FireSprites.class)); cards.add(new SetCardInfo("Flash Counter", 56, Rarity.COMMON, mage.cards.f.FlashCounter.class)); cards.add(new SetCardInfo("Flash Flood", 57, Rarity.COMMON, mage.cards.f.FlashFlood.class)); + cards.add(new SetCardInfo("Floral Spuzzem", 101, Rarity.UNCOMMON, mage.cards.f.FloralSpuzzem.class)); cards.add(new SetCardInfo("Force Spike", 58, Rarity.COMMON, mage.cards.f.ForceSpike.class)); cards.add(new SetCardInfo("Frost Giant", 146, Rarity.UNCOMMON, mage.cards.f.FrostGiant.class)); cards.add(new SetCardInfo("Gaseous Form", 59, Rarity.COMMON, mage.cards.g.GaseousForm.class)); cards.add(new SetCardInfo("Ghosts of the Damned", 12, Rarity.COMMON, mage.cards.g.GhostsOfTheDamned.class)); cards.add(new SetCardInfo("Giant Strength", 147, Rarity.COMMON, mage.cards.g.GiantStrength.class)); + cards.add(new SetCardInfo("Giant Turtle", 102, Rarity.COMMON, mage.cards.g.GiantTurtle.class)); cards.add(new SetCardInfo("Gravity Sphere", 149, Rarity.RARE, mage.cards.g.GravitySphere.class)); cards.add(new SetCardInfo("Great Defender", 185, Rarity.UNCOMMON, mage.cards.g.GreatDefender.class)); + cards.add(new SetCardInfo("Greater Realm of Preservation", 187, Rarity.UNCOMMON, mage.cards.g.GreaterRealmOfPreservation.class)); cards.add(new SetCardInfo("Greed", 15, Rarity.RARE, mage.cards.g.Greed.class)); - cards.add(new SetCardInfo("Green Mana Battery", 223, Rarity.UNCOMMON, mage.cards.g.GreenManaBattery.class)); + cards.add(new SetCardInfo("Green Mana Battery", 223, Rarity.UNCOMMON, mage.cards.g.GreenManaBattery.class)); cards.add(new SetCardInfo("Gwendlyn Di Corci", 268, Rarity.RARE, mage.cards.g.GwendlynDiCorci.class)); + cards.add(new SetCardInfo("Hammerheim", 247, Rarity.UNCOMMON, mage.cards.h.Hammerheim.class)); cards.add(new SetCardInfo("Hazezon Tamar", 270, Rarity.RARE, mage.cards.h.HazezonTamar.class)); cards.add(new SetCardInfo("Headless Horseman", 16, Rarity.COMMON, mage.cards.h.HeadlessHorseman.class)); cards.add(new SetCardInfo("Heaven's Gate", 188, Rarity.UNCOMMON, mage.cards.h.HeavensGate.class)); + cards.add(new SetCardInfo("Hell Swarm", 17, Rarity.COMMON, mage.cards.h.HellSwarm.class)); cards.add(new SetCardInfo("Hellfire", 18, Rarity.RARE, mage.cards.h.Hellfire.class)); cards.add(new SetCardInfo("Hell's Caretaker", 19, Rarity.RARE, mage.cards.h.HellsCaretaker.class)); cards.add(new SetCardInfo("Holy Day", 189, Rarity.COMMON, mage.cards.h.HolyDay.class)); @@ -137,6 +147,7 @@ public class Legends extends ExpansionSet { cards.add(new SetCardInfo("Hyperion Blacksmith", 150, Rarity.UNCOMMON, mage.cards.h.HyperionBlacksmith.class)); cards.add(new SetCardInfo("Immolation", 151, Rarity.COMMON, mage.cards.i.Immolation.class)); cards.add(new SetCardInfo("In the Eye of Chaos", 61, Rarity.RARE, mage.cards.i.InTheEyeOfChaos.class)); + cards.add(new SetCardInfo("Indestructible Aura", 190, Rarity.COMMON, mage.cards.i.IndestructibleAura.class)); cards.add(new SetCardInfo("Invoke Prejudice", 62, Rarity.RARE, mage.cards.i.InvokePrejudice.class)); cards.add(new SetCardInfo("Ivory Guardians", 192, Rarity.UNCOMMON, mage.cards.i.IvoryGuardians.class)); cards.add(new SetCardInfo("Jacques le Vert", 272, Rarity.RARE, mage.cards.j.JacquesLeVert.class)); @@ -159,6 +170,8 @@ public class Legends extends ExpansionSet { cards.add(new SetCardInfo("Lady Orca", 281, Rarity.UNCOMMON, mage.cards.l.LadyOrca.class)); cards.add(new SetCardInfo("Land Equilibrium", 64, Rarity.RARE, mage.cards.l.LandEquilibrium.class)); cards.add(new SetCardInfo("Land Tax", 195, Rarity.UNCOMMON, mage.cards.l.LandTax.class)); + cards.add(new SetCardInfo("Land's Edge", 155, Rarity.RARE, mage.cards.l.LandsEdge.class)); + cards.add(new SetCardInfo("Life Chisel", 228, Rarity.UNCOMMON, mage.cards.l.LifeChisel.class)); cards.add(new SetCardInfo("Lifeblood", 196, Rarity.RARE, mage.cards.l.Lifeblood.class)); cards.add(new SetCardInfo("Living Plane", 107, Rarity.RARE, mage.cards.l.LivingPlane.class)); cards.add(new SetCardInfo("Livonya Silone", 282, Rarity.RARE, mage.cards.l.LivonyaSilone.class)); @@ -184,6 +197,7 @@ public class Legends extends ExpansionSet { cards.add(new SetCardInfo("Pradesh Gypsies", 111, Rarity.UNCOMMON, mage.cards.p.PradeshGypsies.class)); cards.add(new SetCardInfo("Presence of the Master", 200, Rarity.UNCOMMON, mage.cards.p.PresenceOfTheMaster.class)); cards.add(new SetCardInfo("Princess Lucrezia", 289, Rarity.UNCOMMON, mage.cards.p.PrincessLucrezia.class)); + cards.add(new SetCardInfo("Psionic Entity", 67, Rarity.RARE, mage.cards.p.PsionicEntity.class)); cards.add(new SetCardInfo("Pyrotechnics", 158, Rarity.COMMON, mage.cards.p.Pyrotechnics.class)); cards.add(new SetCardInfo("Rabid Wombat", 112, Rarity.UNCOMMON, mage.cards.r.RabidWombat.class)); cards.add(new SetCardInfo("Radjan Spirit", 113, Rarity.UNCOMMON, mage.cards.r.RadjanSpirit.class)); @@ -193,7 +207,7 @@ public class Legends extends ExpansionSet { cards.add(new SetCardInfo("Ramses Overdark", 292, Rarity.RARE, mage.cards.r.RamsesOverdark.class)); cards.add(new SetCardInfo("Rasputin Dreamweaver", 293, Rarity.RARE, mage.cards.r.RasputinDreamweaver.class)); cards.add(new SetCardInfo("Recall", 70, Rarity.RARE, mage.cards.r.Recall.class)); - cards.add(new SetCardInfo("Red Mana Battery", 236, Rarity.UNCOMMON, mage.cards.r.RedManaBattery.class)); + cards.add(new SetCardInfo("Red Mana Battery", 236, Rarity.UNCOMMON, mage.cards.r.RedManaBattery.class)); cards.add(new SetCardInfo("Reincarnation", 115, Rarity.UNCOMMON, mage.cards.r.Reincarnation.class)); cards.add(new SetCardInfo("Relic Barrier", 237, Rarity.UNCOMMON, mage.cards.r.RelicBarrier.class)); cards.add(new SetCardInfo("Remove Soul", 72, Rarity.COMMON, mage.cards.r.RemoveSoul.class)); @@ -202,8 +216,9 @@ public class Legends extends ExpansionSet { cards.add(new SetCardInfo("Righteous Avengers", 203, Rarity.UNCOMMON, mage.cards.r.RighteousAvengers.class)); cards.add(new SetCardInfo("Ring of Immortals", 238, Rarity.RARE, mage.cards.r.RingOfImmortals.class)); cards.add(new SetCardInfo("Riven Turnbull", 294, Rarity.UNCOMMON, mage.cards.r.RivenTurnbull.class)); + cards.add(new SetCardInfo("Rohgahh of Kher Keep", 295, Rarity.RARE, mage.cards.r.RohgahhOfKherKeep.class)); cards.add(new SetCardInfo("Rubinia Soulsinger", 296, Rarity.RARE, mage.cards.r.RubiniaSoulsinger.class)); - cards.add(new SetCardInfo("Rust", 49, Rarity.COMMON, mage.cards.r.Rust.class)); + cards.add(new SetCardInfo("Rust", 49, Rarity.COMMON, mage.cards.r.Rust.class)); cards.add(new SetCardInfo("Sea Kings' Blessing", 75, Rarity.UNCOMMON, mage.cards.s.SeaKingsBlessing.class)); cards.add(new SetCardInfo("Segovian Leviathan", 76, Rarity.UNCOMMON, mage.cards.s.SegovianLeviathan.class)); cards.add(new SetCardInfo("Sentinel", 239, Rarity.RARE, mage.cards.s.Sentinel.class)); @@ -212,11 +227,12 @@ public class Legends extends ExpansionSet { cards.add(new SetCardInfo("Sir Shandlar of Eberyn", 297, Rarity.UNCOMMON, mage.cards.s.SirShandlarOfEberyn.class)); cards.add(new SetCardInfo("Sivitri Scarzam", 298, Rarity.UNCOMMON, mage.cards.s.SivitriScarzam.class)); cards.add(new SetCardInfo("Sol'kanar the Swamp King", 299, Rarity.RARE, mage.cards.s.SolkanarTheSwampKing.class)); + cards.add(new SetCardInfo("Spectral Cloak", 78, Rarity.UNCOMMON, mage.cards.s.SpectralCloak.class)); cards.add(new SetCardInfo("Spinal Villain", 161, Rarity.RARE, mage.cards.s.SpinalVillain.class)); cards.add(new SetCardInfo("Spirit Link", 206, Rarity.UNCOMMON, mage.cards.s.SpiritLink.class)); cards.add(new SetCardInfo("Spirit Shackle", 31, Rarity.COMMON, mage.cards.s.SpiritShackle.class)); cards.add(new SetCardInfo("Storm Seeker", 119, Rarity.UNCOMMON, mage.cards.s.StormSeeker.class)); - cards.add(new SetCardInfo("Storm World", 162, Rarity.RARE, mage.cards.s.StormWorld.class)); + cards.add(new SetCardInfo("Storm World", 162, Rarity.RARE, mage.cards.s.StormWorld.class)); cards.add(new SetCardInfo("Sunastian Falconer", 301, Rarity.UNCOMMON, mage.cards.s.SunastianFalconer.class)); cards.add(new SetCardInfo("Sylvan Library", 121, Rarity.UNCOMMON, mage.cards.s.SylvanLibrary.class)); cards.add(new SetCardInfo("Sylvan Paradise", 122, Rarity.UNCOMMON, mage.cards.s.SylvanParadise.class)); @@ -249,9 +265,10 @@ public class Legends extends ExpansionSet { cards.add(new SetCardInfo("Wall of Putrid Flesh", 41, Rarity.UNCOMMON, mage.cards.w.WallOfPutridFlesh.class)); cards.add(new SetCardInfo("Wall of Wonder", 85, Rarity.UNCOMMON, mage.cards.w.WallOfWonder.class)); cards.add(new SetCardInfo("Whirling Dervish", 125, Rarity.UNCOMMON, mage.cards.w.WhirlingDervish.class)); - cards.add(new SetCardInfo("White Mana Battery", 244, Rarity.UNCOMMON, mage.cards.w.WhiteManaBattery.class)); + cards.add(new SetCardInfo("White Mana Battery", 244, Rarity.UNCOMMON, mage.cards.w.WhiteManaBattery.class)); cards.add(new SetCardInfo("Willow Satyr", 126, Rarity.RARE, mage.cards.w.WillowSatyr.class)); cards.add(new SetCardInfo("Winds of Change", 169, Rarity.UNCOMMON, mage.cards.w.WindsOfChange.class)); + cards.add(new SetCardInfo("Winter Blast", 127, Rarity.RARE, mage.cards.w.WinterBlast.class)); cards.add(new SetCardInfo("Wolverine Pack", 128, Rarity.COMMON, mage.cards.w.WolverinePack.class)); cards.add(new SetCardInfo("Xira Arien", 310, Rarity.RARE, mage.cards.x.XiraArien.class)); cards.add(new SetCardInfo("Zephyr Falcon", 86, Rarity.COMMON, mage.cards.z.ZephyrFalcon.class)); diff --git a/Mage.Sets/src/mage/sets/Legions.java b/Mage.Sets/src/mage/sets/Legions.java index 6f407f9535..2622f22cb0 100644 --- a/Mage.Sets/src/mage/sets/Legions.java +++ b/Mage.Sets/src/mage/sets/Legions.java @@ -64,11 +64,13 @@ public class Legions extends ExpansionSet { cards.add(new SetCardInfo("Berserk Murlodont", 117, Rarity.COMMON, mage.cards.b.BerserkMurlodont.class)); cards.add(new SetCardInfo("Blade Sliver", 88, Rarity.UNCOMMON, mage.cards.b.BladeSliver.class)); cards.add(new SetCardInfo("Blood Celebrant", 61, Rarity.COMMON, mage.cards.b.BloodCelebrant.class)); + cards.add(new SetCardInfo("Bloodstoke Howler", 89, Rarity.COMMON, mage.cards.b.BloodstokeHowler.class)); cards.add(new SetCardInfo("Branchsnap Lorian", 118, Rarity.UNCOMMON, mage.cards.b.BranchsnapLorian.class)); cards.add(new SetCardInfo("Brontotherium", 119, Rarity.UNCOMMON, mage.cards.b.Brontotherium.class)); cards.add(new SetCardInfo("Brood Sliver", 120, Rarity.RARE, mage.cards.b.BroodSliver.class)); cards.add(new SetCardInfo("Caller of the Claw", 121, Rarity.RARE, mage.cards.c.CallerOfTheClaw.class)); cards.add(new SetCardInfo("Canopy Crawler", 122, Rarity.UNCOMMON, mage.cards.c.CanopyCrawler.class)); + cards.add(new SetCardInfo("Celestial Gatekeeper", 6, Rarity.RARE, mage.cards.c.CelestialGatekeeper.class)); cards.add(new SetCardInfo("Cephalid Pathmage", 31, Rarity.COMMON, mage.cards.c.CephalidPathmage.class)); cards.add(new SetCardInfo("Chromeshell Crab", 32, Rarity.RARE, mage.cards.c.ChromeshellCrab.class)); cards.add(new SetCardInfo("Clickslither", 90, Rarity.RARE, mage.cards.c.Clickslither.class)); @@ -88,6 +90,7 @@ public class Legions extends ExpansionSet { cards.add(new SetCardInfo("Deftblade Elite", 12, Rarity.COMMON, mage.cards.d.DeftbladeElite.class)); cards.add(new SetCardInfo("Dermoplasm", 35, Rarity.RARE, mage.cards.d.Dermoplasm.class)); cards.add(new SetCardInfo("Dreamborn Muse", 36, Rarity.RARE, mage.cards.d.DreambornMuse.class)); + cards.add(new SetCardInfo("Drinker of Sorrow", 66, Rarity.RARE, mage.cards.d.DrinkerOfSorrow.class)); cards.add(new SetCardInfo("Dripping Dead", 67, Rarity.COMMON, mage.cards.d.DrippingDead.class)); cards.add(new SetCardInfo("Earthblighter", 68, Rarity.UNCOMMON, mage.cards.e.Earthblighter.class)); cards.add(new SetCardInfo("Echo Tracer", 37, Rarity.COMMON, mage.cards.e.EchoTracer.class)); @@ -97,10 +100,12 @@ public class Legions extends ExpansionSet { cards.add(new SetCardInfo("Essence Sliver", 13, Rarity.RARE, mage.cards.e.EssenceSliver.class)); cards.add(new SetCardInfo("Feral Throwback", 126, Rarity.RARE, mage.cards.f.FeralThrowback.class)); cards.add(new SetCardInfo("Flamewave Invoker", 92, Rarity.COMMON, mage.cards.f.FlamewaveInvoker.class)); + cards.add(new SetCardInfo("Frenetic Raptor", 93, Rarity.UNCOMMON, mage.cards.f.FreneticRaptor.class)); cards.add(new SetCardInfo("Fugitive Wizard", 38, Rarity.COMMON, mage.cards.f.FugitiveWizard.class)); cards.add(new SetCardInfo("Gempalm Avenger", 14, Rarity.COMMON, mage.cards.g.GempalmAvenger.class)); cards.add(new SetCardInfo("Gempalm Incinerator", 94, Rarity.UNCOMMON, mage.cards.g.GempalmIncinerator.class)); cards.add(new SetCardInfo("Gempalm Polluter", 70, Rarity.COMMON, mage.cards.g.GempalmPolluter.class)); + cards.add(new SetCardInfo("Gempalm Sorcerer", 39, Rarity.UNCOMMON, mage.cards.g.GempalmSorcerer.class)); cards.add(new SetCardInfo("Gempalm Strider", 127, Rarity.UNCOMMON, mage.cards.g.GempalmStrider.class)); cards.add(new SetCardInfo("Ghastly Remains", 71, Rarity.RARE, mage.cards.g.GhastlyRemains.class)); cards.add(new SetCardInfo("Glintwing Invoker", 40, Rarity.COMMON, mage.cards.g.GlintwingInvoker.class)); @@ -131,7 +136,9 @@ public class Legions extends ExpansionSet { cards.add(new SetCardInfo("Lowland Tracker", 17, Rarity.COMMON, mage.cards.l.LowlandTracker.class)); cards.add(new SetCardInfo("Macetail Hystrodon", 106, Rarity.COMMON, mage.cards.m.MacetailHystrodon.class)); cards.add(new SetCardInfo("Magma Sliver", 107, Rarity.RARE, mage.cards.m.MagmaSliver.class)); + cards.add(new SetCardInfo("Master of the Veil", 43, Rarity.UNCOMMON, mage.cards.m.MasterOfTheVeil.class)); cards.add(new SetCardInfo("Merchant of Secrets", 44, Rarity.COMMON, mage.cards.m.MerchantOfSecrets.class)); + cards.add(new SetCardInfo("Mistform Seaswift", 45, Rarity.COMMON, mage.cards.m.MistformSeaswift.class)); cards.add(new SetCardInfo("Mistform Sliver", 46, Rarity.COMMON, mage.cards.m.MistformSliver.class)); cards.add(new SetCardInfo("Mistform Ultimus", 47, Rarity.RARE, mage.cards.m.MistformUltimus.class)); cards.add(new SetCardInfo("Nantuko Vigilante", 132, Rarity.COMMON, mage.cards.n.NantukoVigilante.class)); @@ -146,6 +153,7 @@ public class Legions extends ExpansionSet { cards.add(new SetCardInfo("Quick Sliver", 136, Rarity.COMMON, mage.cards.q.QuickSliver.class)); cards.add(new SetCardInfo("Ridgetop Raptor", 108, Rarity.UNCOMMON, mage.cards.r.RidgetopRaptor.class)); cards.add(new SetCardInfo("Riptide Director", 50, Rarity.RARE, mage.cards.r.RiptideDirector.class)); + cards.add(new SetCardInfo("Riptide Mangler", 51, Rarity.RARE, mage.cards.r.RiptideMangler.class)); cards.add(new SetCardInfo("Rockshard Elemental", 109, Rarity.RARE, mage.cards.r.RockshardElemental.class)); cards.add(new SetCardInfo("Root Sliver", 137, Rarity.UNCOMMON, mage.cards.r.RootSliver.class)); cards.add(new SetCardInfo("Scion of Darkness", 79, Rarity.RARE, mage.cards.s.ScionOfDarkness.class)); @@ -153,6 +161,7 @@ public class Legions extends ExpansionSet { cards.add(new SetCardInfo("Shaleskin Plower", 110, Rarity.COMMON, mage.cards.s.ShaleskinPlower.class)); cards.add(new SetCardInfo("Shifting Sliver", 52, Rarity.UNCOMMON, mage.cards.s.ShiftingSliver.class)); cards.add(new SetCardInfo("Skinthinner", 80, Rarity.COMMON, mage.cards.s.Skinthinner.class)); + cards.add(new SetCardInfo("Skirk Alarmist", 111, Rarity.RARE, mage.cards.s.SkirkAlarmist.class)); cards.add(new SetCardInfo("Skirk Drill Sergeant", 112, Rarity.UNCOMMON, mage.cards.s.SkirkDrillSergeant.class)); cards.add(new SetCardInfo("Skirk Marauder", 113, Rarity.COMMON, mage.cards.s.SkirkMarauder.class)); cards.add(new SetCardInfo("Skirk Outrider", 114, Rarity.COMMON, mage.cards.s.SkirkOutrider.class)); @@ -170,12 +179,15 @@ public class Legions extends ExpansionSet { cards.add(new SetCardInfo("Toxin Sliver", 84, Rarity.RARE, mage.cards.t.ToxinSliver.class)); cards.add(new SetCardInfo("Tribal Forcemage", 142, Rarity.RARE, mage.cards.t.TribalForcemage.class)); cards.add(new SetCardInfo("Unstable Hulk", 115, Rarity.RARE, mage.cards.u.UnstableHulk.class)); + cards.add(new SetCardInfo("Vexing Beetle", 143, Rarity.RARE, mage.cards.v.VexingBeetle.class)); cards.add(new SetCardInfo("Vile Deacon", 85, Rarity.COMMON, mage.cards.v.VileDeacon.class)); cards.add(new SetCardInfo("Voidmage Apprentice", 54, Rarity.COMMON, mage.cards.v.VoidmageApprentice.class)); cards.add(new SetCardInfo("Wall of Deceit", 55, Rarity.UNCOMMON, mage.cards.w.WallOfDeceit.class)); cards.add(new SetCardInfo("Wall of Hope", 24, Rarity.COMMON, mage.cards.w.WallOfHope.class)); cards.add(new SetCardInfo("Warbreak Trumpeter", 116, Rarity.UNCOMMON, mage.cards.w.WarbreakTrumpeter.class)); cards.add(new SetCardInfo("Ward Sliver", 25, Rarity.UNCOMMON, mage.cards.w.WardSliver.class)); + cards.add(new SetCardInfo("Warped Researcher", 56, Rarity.UNCOMMON, mage.cards.w.WarpedResearcher.class)); + cards.add(new SetCardInfo("Weaver of Lies", 57, Rarity.RARE, mage.cards.w.WeaverOfLies.class)); cards.add(new SetCardInfo("White Knight", 27, Rarity.UNCOMMON, mage.cards.w.WhiteKnight.class)); cards.add(new SetCardInfo("Willbender", 58, Rarity.UNCOMMON, mage.cards.w.Willbender.class)); cards.add(new SetCardInfo("Windborn Muse", 28, Rarity.RARE, mage.cards.w.WindbornMuse.class)); diff --git a/Mage.Sets/src/mage/sets/MasterpieceSeriesAmonkhet.java b/Mage.Sets/src/mage/sets/MasterpieceSeriesAmonkhet.java index a106928283..291c6782fe 100644 --- a/Mage.Sets/src/mage/sets/MasterpieceSeriesAmonkhet.java +++ b/Mage.Sets/src/mage/sets/MasterpieceSeriesAmonkhet.java @@ -107,4 +107,4 @@ public class MasterpieceSeriesAmonkhet extends ExpansionSet { cards.add(new SetCardInfo("Worship", 6, Rarity.SPECIAL, mage.cards.w.Worship.class)); cards.add(new SetCardInfo("Wrath of God", 7, Rarity.SPECIAL, mage.cards.w.WrathOfGod.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/Masters25.java b/Mage.Sets/src/mage/sets/Masters25.java index 9e8aa34b04..cb35f2c36f 100644 --- a/Mage.Sets/src/mage/sets/Masters25.java +++ b/Mage.Sets/src/mage/sets/Masters25.java @@ -31,7 +31,6 @@ package mage.sets; * * @author fireshoes */ - import mage.cards.ExpansionSet; import mage.constants.SetType; diff --git a/Mage.Sets/src/mage/sets/MastersEdition.java b/Mage.Sets/src/mage/sets/MastersEdition.java index d049d73b11..5adcbf72ba 100644 --- a/Mage.Sets/src/mage/sets/MastersEdition.java +++ b/Mage.Sets/src/mage/sets/MastersEdition.java @@ -108,6 +108,7 @@ public class MastersEdition extends ExpansionSet { cards.add(new SetCardInfo("Dwarven Catapult", 91, Rarity.UNCOMMON, mage.cards.d.DwarvenCatapult.class)); cards.add(new SetCardInfo("Dwarven Soldier", 92, Rarity.COMMON, DwarvenSoldier.class)); cards.add(new SetCardInfo("Eater of the Dead", 67, Rarity.UNCOMMON, mage.cards.e.EaterOfTheDead.class)); + cards.add(new SetCardInfo("Elder Land Wurm", 11, Rarity.UNCOMMON, mage.cards.e.ElderLandWurm.class)); cards.add(new SetCardInfo("Erg Raiders", 68, Rarity.COMMON, mage.cards.e.ErgRaiders.class)); cards.add(new SetCardInfo("Eureka", 117, Rarity.RARE, mage.cards.e.Eureka.class)); cards.add(new SetCardInfo("Exile", 12, Rarity.COMMON, mage.cards.e.Exile.class)); @@ -128,6 +129,7 @@ public class MastersEdition extends ExpansionSet { cards.add(new SetCardInfo("Goblins of the Flarg", 98, Rarity.COMMON, mage.cards.g.GoblinsOfTheFlarg.class)); cards.add(new SetCardInfo("Goblin Wizard", 97, Rarity.RARE, mage.cards.g.GoblinWizard.class)); cards.add(new SetCardInfo("Granite Gargoyle", 99, Rarity.UNCOMMON, mage.cards.g.GraniteGargoyle.class)); + cards.add(new SetCardInfo("Greater Realm of Preservation", 13, Rarity.UNCOMMON, mage.cards.g.GreaterRealmOfPreservation.class)); cards.add(new SetCardInfo("Hallowed Ground", 14, Rarity.UNCOMMON, mage.cards.h.HallowedGround.class)); cards.add(new SetCardInfo("Hand of Justice", 15, Rarity.RARE, mage.cards.h.HandOfJustice.class)); cards.add(new SetCardInfo("Hecatomb", 71, Rarity.RARE, mage.cards.h.Hecatomb.class)); @@ -183,6 +185,7 @@ public class MastersEdition extends ExpansionSet { cards.add(new SetCardInfo("Paralyze", 80, Rarity.COMMON, mage.cards.p.Paralyze.class)); cards.add(new SetCardInfo("Phantom Monster", 43, Rarity.COMMON, mage.cards.p.PhantomMonster.class)); cards.add(new SetCardInfo("Phelddagrif", 150, Rarity.RARE, mage.cards.p.Phelddagrif.class)); + cards.add(new SetCardInfo("Phyrexian Boon", 81, Rarity.COMMON, mage.cards.p.PhyrexianBoon.class)); cards.add(new SetCardInfo("Phyrexian War Beast", 162, Rarity.UNCOMMON, PhyrexianWarBeast.class)); cards.add(new SetCardInfo("Plains", 181, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Plains", 182, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); @@ -196,6 +199,7 @@ public class MastersEdition extends ExpansionSet { cards.add(new SetCardInfo("Rabid Wombat", 126, Rarity.UNCOMMON, mage.cards.r.RabidWombat.class)); cards.add(new SetCardInfo("Rainbow Vale", 179, Rarity.RARE, mage.cards.r.RainbowVale.class)); cards.add(new SetCardInfo("Righteous Avengers", 25, Rarity.COMMON, mage.cards.r.RighteousAvengers.class)); + cards.add(new SetCardInfo("Ring of Ma'rûf", 163, Rarity.RARE, mage.cards.r.RingOfMaruf.class)); cards.add(new SetCardInfo("River Merfolk", 47, Rarity.COMMON, mage.cards.r.RiverMerfolk.class)); cards.add(new SetCardInfo("Roots", 127, Rarity.COMMON, mage.cards.r.Roots.class)); cards.add(new SetCardInfo("Scryb Sprites", 128, Rarity.COMMON, mage.cards.s.ScrybSprites.class)); @@ -229,12 +233,13 @@ public class MastersEdition extends ExpansionSet { cards.add(new SetCardInfo("Tornado", 136, Rarity.RARE, mage.cards.t.Tornado.class)); cards.add(new SetCardInfo("Urza's Bauble", 170, Rarity.UNCOMMON, mage.cards.u.UrzasBauble.class)); cards.add(new SetCardInfo("Urza's Chalice", 171, Rarity.COMMON, mage.cards.u.UrzasChalice.class)); - cards.add(new SetCardInfo("Varchild's War-Riders", 110, Rarity.RARE, mage.cards.v.VarchildsWarRiders.class)); + cards.add(new SetCardInfo("Varchild's War-Riders", 110, Rarity.RARE, mage.cards.v.VarchildsWarRiders.class)); cards.add(new SetCardInfo("Vesuvan Doppelganger", 54, Rarity.RARE, mage.cards.v.VesuvanDoppelganger.class)); cards.add(new SetCardInfo("Vodalian Knights", 55, Rarity.UNCOMMON, mage.cards.v.VodalianKnights.class)); cards.add(new SetCardInfo("Walking Wall", 172, Rarity.UNCOMMON, mage.cards.w.WalkingWall.class)); cards.add(new SetCardInfo("Wanderlust", 137, Rarity.COMMON, mage.cards.w.Wanderlust.class)); cards.add(new SetCardInfo("Winds of Change", 111, Rarity.UNCOMMON, mage.cards.w.WindsOfChange.class)); + cards.add(new SetCardInfo("Winter Blast", 138, Rarity.UNCOMMON, mage.cards.w.WinterBlast.class)); cards.add(new SetCardInfo("Winter Orb", 173, Rarity.RARE, mage.cards.w.WinterOrb.class)); cards.add(new SetCardInfo("Wyluli Wolf", 139, Rarity.COMMON, mage.cards.w.WyluliWolf.class)); cards.add(new SetCardInfo("Yavimaya Ants", 140, Rarity.UNCOMMON, mage.cards.y.YavimayaAnts.class)); diff --git a/Mage.Sets/src/mage/sets/MastersEditionII.java b/Mage.Sets/src/mage/sets/MastersEditionII.java index dafcebca4f..2b276c52b3 100644 --- a/Mage.Sets/src/mage/sets/MastersEditionII.java +++ b/Mage.Sets/src/mage/sets/MastersEditionII.java @@ -69,14 +69,17 @@ public class MastersEditionII extends ExpansionSet { cards.add(new SetCardInfo("Adarkar Sentinel", 201, Rarity.COMMON, mage.cards.a.AdarkarSentinel.class)); cards.add(new SetCardInfo("Aeolipile", 202, Rarity.COMMON, mage.cards.a.Aeolipile.class)); cards.add(new SetCardInfo("Ambush Party", 115, Rarity.COMMON, mage.cards.a.AmbushParty.class)); + cards.add(new SetCardInfo("An-Zerrin Ruins", 117, Rarity.RARE, mage.cards.a.AnZerrinRuins.class)); cards.add(new SetCardInfo("Anarchy", 116, Rarity.RARE, mage.cards.a.Anarchy.class)); cards.add(new SetCardInfo("Angel of Fury", 2, Rarity.RARE, mage.cards.a.AngelOfFury.class)); cards.add(new SetCardInfo("Angel of Light", 3, Rarity.UNCOMMON, mage.cards.a.AngelOfLight.class)); cards.add(new SetCardInfo("Armored Griffin", 5, Rarity.COMMON, mage.cards.a.ArmoredGriffin.class)); cards.add(new SetCardInfo("Armor of Faith", 4, Rarity.COMMON, mage.cards.a.ArmorOfFaith.class)); cards.add(new SetCardInfo("Armor Thrull", 77, Rarity.COMMON, ArmorThrull.class)); + cards.add(new SetCardInfo("Ashen Ghoul", 78, Rarity.UNCOMMON, mage.cards.a.AshenGhoul.class)); cards.add(new SetCardInfo("Aurochs", 153, Rarity.COMMON, mage.cards.a.Aurochs.class)); cards.add(new SetCardInfo("Aysen Bureaucrats", 6, Rarity.COMMON, mage.cards.a.AysenBureaucrats.class)); + cards.add(new SetCardInfo("Aysen Crusader", 7, Rarity.UNCOMMON, mage.cards.a.AysenCrusader.class)); cards.add(new SetCardInfo("Badlands", 225, Rarity.RARE, mage.cards.b.Badlands.class)); cards.add(new SetCardInfo("Balduvian Conjurer", 40, Rarity.COMMON, mage.cards.b.BalduvianConjurer.class)); cards.add(new SetCardInfo("Balduvian Dead", 79, Rarity.UNCOMMON, mage.cards.b.BalduvianDead.class)); @@ -104,8 +107,10 @@ public class MastersEditionII extends ExpansionSet { cards.add(new SetCardInfo("Despotic Scepter", 206, Rarity.RARE, mage.cards.d.DespoticScepter.class)); cards.add(new SetCardInfo("Diabolic Vision", 191, Rarity.UNCOMMON, mage.cards.d.DiabolicVision.class)); cards.add(new SetCardInfo("Disenchant", 10, Rarity.COMMON, mage.cards.d.Disenchant.class)); + cards.add(new SetCardInfo("Drift of the Dead", 86, Rarity.COMMON, mage.cards.d.DriftOfTheDead.class)); cards.add(new SetCardInfo("Dwarven Ruins", 227, Rarity.UNCOMMON, mage.cards.d.DwarvenRuins.class)); cards.add(new SetCardInfo("Dystopia", 88, Rarity.RARE, mage.cards.d.Dystopia.class)); + cards.add(new SetCardInfo("Earthlink", 192, Rarity.RARE, mage.cards.e.Earthlink.class)); cards.add(new SetCardInfo("Ebon Praetor", 89, Rarity.RARE, mage.cards.e.EbonPraetor.class)); cards.add(new SetCardInfo("Ebon Stronghold", 228, Rarity.UNCOMMON, mage.cards.e.EbonStronghold.class)); cards.add(new SetCardInfo("Elemental Augury", 193, Rarity.RARE, mage.cards.e.ElementalAugury.class)); @@ -114,8 +119,11 @@ public class MastersEditionII extends ExpansionSet { cards.add(new SetCardInfo("Elvish Hunter", 157, Rarity.COMMON, ElvishHunter.class)); cards.add(new SetCardInfo("Elvish Ranger", 158, Rarity.COMMON, mage.cards.e.ElvishRanger.class)); cards.add(new SetCardInfo("Elvish Spirit Guide", 159, Rarity.UNCOMMON, mage.cards.e.ElvishSpiritGuide.class)); + cards.add(new SetCardInfo("Energy Storm", 11, Rarity.RARE, mage.cards.e.EnergyStorm.class)); cards.add(new SetCardInfo("Enervate", 47, Rarity.COMMON, mage.cards.e.Enervate.class)); cards.add(new SetCardInfo("Errantry", 124, Rarity.COMMON, mage.cards.e.Errantry.class)); + cards.add(new SetCardInfo("Essence Filter", 160, Rarity.UNCOMMON, mage.cards.e.EssenceFilter.class)); + cards.add(new SetCardInfo("Essence Flare", 48, Rarity.COMMON, mage.cards.e.EssenceFlare.class)); cards.add(new SetCardInfo("Farrel's Mantle", 13, Rarity.UNCOMMON, mage.cards.f.FarrelsMantle.class)); cards.add(new SetCardInfo("Farrel's Zealot", 14, Rarity.UNCOMMON, FarrelsZealot.class)); cards.add(new SetCardInfo("Feral Thallid", 161, Rarity.COMMON, mage.cards.f.FeralThallid.class)); @@ -127,6 +135,7 @@ public class MastersEditionII extends ExpansionSet { cards.add(new SetCardInfo("Foul Familiar", 90, Rarity.COMMON, mage.cards.f.FoulFamiliar.class)); cards.add(new SetCardInfo("Fumarole", 194, Rarity.UNCOMMON, mage.cards.f.Fumarole.class)); cards.add(new SetCardInfo("Fungal Bloom", 165, Rarity.RARE, mage.cards.f.FungalBloom.class)); + cards.add(new SetCardInfo("Fyndhorn Pollen", 166, Rarity.RARE, mage.cards.f.FyndhornPollen.class)); cards.add(new SetCardInfo("Gangrenous Zombies", 92, Rarity.COMMON, mage.cards.g.GangrenousZombies.class)); cards.add(new SetCardInfo("Giant Growth", 167, Rarity.COMMON, mage.cards.g.GiantGrowth.class)); cards.add(new SetCardInfo("Giant Trap Door Spider", 195, Rarity.UNCOMMON, mage.cards.g.GiantTrapDoorSpider.class)); @@ -153,8 +162,10 @@ public class MastersEditionII extends ExpansionSet { cards.add(new SetCardInfo("Jeweled Amulet", 212, Rarity.UNCOMMON, mage.cards.j.JeweledAmulet.class)); cards.add(new SetCardInfo("Johtull Wurm", 168, Rarity.UNCOMMON, mage.cards.j.JohtullWurm.class)); cards.add(new SetCardInfo("Juniper Order Advocate", 20, Rarity.UNCOMMON, mage.cards.j.JuniperOrderAdvocate.class)); + cards.add(new SetCardInfo("Karplusan Giant", 133, Rarity.UNCOMMON, mage.cards.k.KarplusanGiant.class)); cards.add(new SetCardInfo("Kaysa", 170, Rarity.RARE, mage.cards.k.Kaysa.class)); cards.add(new SetCardInfo("Kjeldoran Dead", 98, Rarity.COMMON, mage.cards.k.KjeldoranDead.class)); + cards.add(new SetCardInfo("Kjeldoran Home Guard", 22, Rarity.UNCOMMON, mage.cards.k.KjeldoranHomeGuard.class)); cards.add(new SetCardInfo("Kjeldoran Outpost", 233, Rarity.RARE, mage.cards.k.KjeldoranOutpost.class)); cards.add(new SetCardInfo("Knight of Stromgald", 99, Rarity.UNCOMMON, mage.cards.k.KnightOfStromgald.class)); cards.add(new SetCardInfo("Krovikan Fetish", 100, Rarity.COMMON, mage.cards.k.KrovikanFetish.class)); @@ -165,9 +176,11 @@ public class MastersEditionII extends ExpansionSet { cards.add(new SetCardInfo("Mana Crypt", 214, Rarity.RARE, mage.cards.m.ManaCrypt.class)); cards.add(new SetCardInfo("Marjhan", 54, Rarity.RARE, mage.cards.m.Marjhan.class)); cards.add(new SetCardInfo("Mesmeric Trance", 55, Rarity.RARE, mage.cards.m.MesmericTrance.class)); + cards.add(new SetCardInfo("Meteor Shower", 135, Rarity.COMMON, mage.cards.m.MeteorShower.class)); cards.add(new SetCardInfo("Minion of Leshrac", 104, Rarity.RARE, mage.cards.m.MinionOfLeshrac.class)); cards.add(new SetCardInfo("Mudslide", 136, Rarity.RARE, mage.cards.m.Mudslide.class)); cards.add(new SetCardInfo("Narwhal", 57, Rarity.UNCOMMON, mage.cards.n.Narwhal.class)); + cards.add(new SetCardInfo("Nature's Wrath", 172, Rarity.RARE, mage.cards.n.NaturesWrath.class)); cards.add(new SetCardInfo("Necrite", 106, Rarity.COMMON, Necrite.class)); cards.add(new SetCardInfo("Necropotence", 107, Rarity.RARE, mage.cards.n.Necropotence.class)); cards.add(new SetCardInfo("Night Soil", 173, Rarity.UNCOMMON, NightSoil.class)); @@ -175,11 +188,13 @@ public class MastersEditionII extends ExpansionSet { cards.add(new SetCardInfo("Orcish Cannoneers", 138, Rarity.UNCOMMON, mage.cards.o.OrcishCannoneers.class)); cards.add(new SetCardInfo("Orcish Captain", 139, Rarity.UNCOMMON, mage.cards.o.OrcishCaptain.class)); cards.add(new SetCardInfo("Orcish Lumberjack", 142, Rarity.COMMON, mage.cards.o.OrcishLumberjack.class)); + cards.add(new SetCardInfo("Orcish Squatters", 143, Rarity.RARE, mage.cards.o.OrcishSquatters.class)); cards.add(new SetCardInfo("Orcish Veteran", 144, Rarity.COMMON, OrcishVeteran.class)); cards.add(new SetCardInfo("Order of the Sacred Torch", 25, Rarity.RARE, mage.cards.o.OrderOfTheSacredTorch.class)); cards.add(new SetCardInfo("Order of the White Shield", 26, Rarity.UNCOMMON, mage.cards.o.OrderOfTheWhiteShield.class)); cards.add(new SetCardInfo("Panic", 145, Rarity.COMMON, mage.cards.p.Panic.class)); cards.add(new SetCardInfo("Personal Tutor", 58, Rarity.UNCOMMON, mage.cards.p.PersonalTutor.class)); + cards.add(new SetCardInfo("Phantasmal Fiend", 108, Rarity.COMMON, mage.cards.p.PhantasmalFiend.class)); cards.add(new SetCardInfo("Phyrexian Devourer", 216, Rarity.UNCOMMON, mage.cards.p.PhyrexianDevourer.class)); cards.add(new SetCardInfo("Pillage", 146, Rarity.UNCOMMON, mage.cards.p.Pillage.class)); cards.add(new SetCardInfo("Portent", 60, Rarity.COMMON, mage.cards.p.Portent.class)); @@ -190,6 +205,7 @@ public class MastersEditionII extends ExpansionSet { cards.add(new SetCardInfo("Reinforcements", 28, Rarity.COMMON, mage.cards.r.Reinforcements.class)); cards.add(new SetCardInfo("Reprisal", 29, Rarity.COMMON, mage.cards.r.Reprisal.class)); cards.add(new SetCardInfo("Righteous Fury", 30, Rarity.RARE, mage.cards.r.RighteousFury.class)); + cards.add(new SetCardInfo("Ritual of Subdual", 174, Rarity.RARE, mage.cards.r.RitualOfSubdual.class)); cards.add(new SetCardInfo("Ritual of the Machine", 109, Rarity.RARE, mage.cards.r.RitualOfTheMachine.class)); cards.add(new SetCardInfo("Roterothopter", 218, Rarity.COMMON, mage.cards.r.Roterothopter.class)); cards.add(new SetCardInfo("Royal Trooper", 32, Rarity.COMMON, mage.cards.r.RoyalTrooper.class)); @@ -202,6 +218,7 @@ public class MastersEditionII extends ExpansionSet { cards.add(new SetCardInfo("Sibilant Spirit", 67, Rarity.RARE, mage.cards.s.SibilantSpirit.class)); cards.add(new SetCardInfo("Skeleton Ship", 197, Rarity.RARE, mage.cards.s.SkeletonShip.class)); cards.add(new SetCardInfo("Skull Catapult", 219, Rarity.UNCOMMON, mage.cards.s.SkullCatapult.class)); + cards.add(new SetCardInfo("Snow Fortress", 220, Rarity.UNCOMMON, mage.cards.s.SnowFortress.class)); cards.add(new SetCardInfo("Snow-Covered Forest", 245, Rarity.LAND, mage.cards.s.SnowCoveredForest.class)); cards.add(new SetCardInfo("Snow-Covered Island", 242, Rarity.LAND, mage.cards.s.SnowCoveredIsland.class)); cards.add(new SetCardInfo("Snow-Covered Mountain", 244, Rarity.LAND, mage.cards.s.SnowCoveredMountain.class)); @@ -236,14 +253,17 @@ public class MastersEditionII extends ExpansionSet { cards.add(new SetCardInfo("Tundra", 239, Rarity.RARE, mage.cards.t.Tundra.class)); cards.add(new SetCardInfo("Underground Sea", 240, Rarity.RARE, mage.cards.u.UndergroundSea.class)); cards.add(new SetCardInfo("Viscerid Armor", 72, Rarity.COMMON, mage.cards.v.VisceridArmor.class)); + cards.add(new SetCardInfo("Viscerid Drone", 73, Rarity.UNCOMMON, mage.cards.v.VisceridDrone.class)); cards.add(new SetCardInfo("Wall of Kelp", 74, Rarity.COMMON, mage.cards.w.WallOfKelp.class)); cards.add(new SetCardInfo("Warning", 38, Rarity.COMMON, mage.cards.w.Warning.class)); cards.add(new SetCardInfo("Whiteout", 185, Rarity.COMMON, mage.cards.w.Whiteout.class)); cards.add(new SetCardInfo("Wind Spirit", 75, Rarity.UNCOMMON, mage.cards.w.WindSpirit.class)); cards.add(new SetCardInfo("Wings of Aesthir", 199, Rarity.UNCOMMON, mage.cards.w.WingsOfAesthir.class)); + cards.add(new SetCardInfo("Withering Wisps", 114, Rarity.UNCOMMON, mage.cards.w.WitheringWisps.class)); cards.add(new SetCardInfo("Wolf Pack", 187, Rarity.RARE, mage.cards.w.WolfPack.class)); + cards.add(new SetCardInfo("Woolly Mammoths", 188, Rarity.COMMON, mage.cards.w.WoollyMammoths.class)); cards.add(new SetCardInfo("Yavimaya Ancients", 190, Rarity.UNCOMMON, mage.cards.y.YavimayaAncients.class)); cards.add(new SetCardInfo("Zuran Spellcaster", 76, Rarity.COMMON, mage.cards.z.ZuranSpellcaster.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/MastersEditionIII.java b/Mage.Sets/src/mage/sets/MastersEditionIII.java index bafe726bff..a9a8ee82a1 100644 --- a/Mage.Sets/src/mage/sets/MastersEditionIII.java +++ b/Mage.Sets/src/mage/sets/MastersEditionIII.java @@ -55,6 +55,7 @@ public class MastersEditionIII extends ExpansionSet { this.ratioBoosterMythic = 0; cards.add(new SetCardInfo("Active Volcano", 85, Rarity.UNCOMMON, mage.cards.a.ActiveVolcano.class)); cards.add(new SetCardInfo("Akron Legionnaire", 1, Rarity.RARE, mage.cards.a.AkronLegionnaire.class)); + cards.add(new SetCardInfo("Alabaster Potion", 2, Rarity.UNCOMMON, mage.cards.a.AlabasterPotion.class)); cards.add(new SetCardInfo("All Hallow's Eve", 57, Rarity.RARE, mage.cards.a.AllHallowsEve.class)); cards.add(new SetCardInfo("Amrou Kithkin", 3, Rarity.COMMON, mage.cards.a.AmrouKithkin.class)); cards.add(new SetCardInfo("Anaba Ancestor", 86, Rarity.COMMON, mage.cards.a.AnabaAncestor.class)); @@ -64,6 +65,7 @@ public class MastersEditionIII extends ExpansionSet { cards.add(new SetCardInfo("Arena of the Ancients", 188, Rarity.RARE, mage.cards.a.ArenaOfTheAncients.class)); cards.add(new SetCardInfo("Ashes to Ashes", 58, Rarity.UNCOMMON, mage.cards.a.AshesToAshes.class)); cards.add(new SetCardInfo("Astrolabe", 189, Rarity.COMMON, mage.cards.a.Astrolabe.class)); + cards.add(new SetCardInfo("Axelrod Gunnarson", 143, Rarity.UNCOMMON, mage.cards.a.AxelrodGunnarson.class)); cards.add(new SetCardInfo("Barktooth Warbeard", 144, Rarity.COMMON, mage.cards.b.BarktoothWarbeard.class)); cards.add(new SetCardInfo("Barl's Cage", 190, Rarity.RARE, mage.cards.b.BarlsCage.class)); cards.add(new SetCardInfo("Bartel Runeaxe", 145, Rarity.UNCOMMON, mage.cards.b.BartelRuneaxe.class)); @@ -77,7 +79,7 @@ public class MastersEditionIII extends ExpansionSet { cards.add(new SetCardInfo("Borrowing 100,000 Arrows", 31, Rarity.UNCOMMON, mage.cards.b.Borrowing100000Arrows.class)); cards.add(new SetCardInfo("Brilliant Plan", 32, Rarity.COMMON, mage.cards.b.BrilliantPlan.class)); cards.add(new SetCardInfo("Burning of Xinye", 89, Rarity.RARE, mage.cards.b.BurningOfXinye.class)); - cards.add(new SetCardInfo("Call to Arms", 4, Rarity.UNCOMMON, mage.cards.c.CallToArms.class)); + cards.add(new SetCardInfo("Call to Arms", 4, Rarity.UNCOMMON, mage.cards.c.CallToArms.class)); cards.add(new SetCardInfo("Capture of Jingzhou", 33, Rarity.RARE, mage.cards.c.CaptureOfJingzhou.class)); cards.add(new SetCardInfo("Carrion Ants", 60, Rarity.UNCOMMON, mage.cards.c.CarrionAnts.class)); cards.add(new SetCardInfo("Chain Lightning", 90, Rarity.COMMON, mage.cards.c.ChainLightning.class)); @@ -98,8 +100,10 @@ public class MastersEditionIII extends ExpansionSet { cards.add(new SetCardInfo("Desperate Charge", 63, Rarity.COMMON, mage.cards.d.DesperateCharge.class)); cards.add(new SetCardInfo("Didgeridoo", 194, Rarity.UNCOMMON, mage.cards.d.Didgeridoo.class)); cards.add(new SetCardInfo("Disenchant", 7, Rarity.COMMON, mage.cards.d.Disenchant.class)); + cards.add(new SetCardInfo("Disharmony", 95, Rarity.UNCOMMON, mage.cards.d.Disharmony.class)); cards.add(new SetCardInfo("Divine Intervention", 8, Rarity.RARE, mage.cards.d.DivineIntervention.class)); cards.add(new SetCardInfo("Dong Zhou, the Tyrant", 96, Rarity.RARE, mage.cards.d.DongZhouTheTyrant.class)); + cards.add(new SetCardInfo("Eightfold Maze", 9, Rarity.UNCOMMON, mage.cards.e.EightfoldMaze.class)); cards.add(new SetCardInfo("Elves of Deep Shadow", 116, Rarity.COMMON, mage.cards.e.ElvesOfDeepShadow.class)); cards.add(new SetCardInfo("Evil Presence", 64, Rarity.COMMON, mage.cards.e.EvilPresence.class)); cards.add(new SetCardInfo("Exorcist", 10, Rarity.UNCOMMON, mage.cards.e.Exorcist.class)); @@ -126,6 +130,7 @@ public class MastersEditionIII extends ExpansionSet { cards.add(new SetCardInfo("Guan Yu's 1,000-Li March", 13, Rarity.RARE, mage.cards.g.GuanYus1000LiMarch.class)); cards.add(new SetCardInfo("Guan Yu, Sainted Warrior", 12, Rarity.UNCOMMON, mage.cards.g.GuanYuSaintedWarrior.class)); cards.add(new SetCardInfo("Gwendlyn Di Corci", 149, Rarity.RARE, mage.cards.g.GwendlynDiCorci.class)); + cards.add(new SetCardInfo("Hammerheim", 207, Rarity.UNCOMMON, mage.cards.h.Hammerheim.class)); cards.add(new SetCardInfo("Hazezon Tamar", 151, Rarity.RARE, mage.cards.h.HazezonTamar.class)); cards.add(new SetCardInfo("Heal", 14, Rarity.COMMON, mage.cards.h.Heal.class)); cards.add(new SetCardInfo("Hellfire", 70, Rarity.RARE, mage.cards.h.Hellfire.class)); @@ -145,17 +150,19 @@ public class MastersEditionIII extends ExpansionSet { cards.add(new SetCardInfo("Karakas", 208, Rarity.RARE, mage.cards.k.Karakas.class)); cards.add(new SetCardInfo("Kei Takahashi", 155, Rarity.UNCOMMON, mage.cards.k.KeiTakahashi.class)); cards.add(new SetCardInfo("Killer Bees", 126, Rarity.UNCOMMON, mage.cards.k.KillerBees.class)); - cards.add(new SetCardInfo("Kjeldoran Frostbeast", 156, Rarity.UNCOMMON, mage.cards.k.KjeldoranFrostbeast.class)); + cards.add(new SetCardInfo("Kjeldoran Frostbeast", 156, Rarity.UNCOMMON, mage.cards.k.KjeldoranFrostbeast.class)); cards.add(new SetCardInfo("Kobold Drill Sergeant", 104, Rarity.UNCOMMON, mage.cards.k.KoboldDrillSergeant.class)); cards.add(new SetCardInfo("Kobold Overlord", 105, Rarity.UNCOMMON, mage.cards.k.KoboldOverlord.class)); cards.add(new SetCardInfo("Kobolds of Kher Keep", 107, Rarity.COMMON, mage.cards.k.KoboldsOfKherKeep.class)); cards.add(new SetCardInfo("Kobold Taskmaster", 106, Rarity.COMMON, mage.cards.k.KoboldTaskmaster.class)); cards.add(new SetCardInfo("Kongming, 'Sleeping Dragon'", 16, Rarity.RARE, mage.cards.k.KongmingSleepingDragon.class)); + cards.add(new SetCardInfo("Labyrinth Minotaur", 39, Rarity.COMMON, mage.cards.l.LabyrinthMinotaur.class)); cards.add(new SetCardInfo("Lady Caleria", 157, Rarity.UNCOMMON, mage.cards.l.LadyCaleria.class)); cards.add(new SetCardInfo("Lady Evangela", 158, Rarity.UNCOMMON, mage.cards.l.LadyEvangela.class)); cards.add(new SetCardInfo("Lady Orca", 159, Rarity.COMMON, mage.cards.l.LadyOrca.class)); cards.add(new SetCardInfo("Land Equilibrium", 40, Rarity.RARE, mage.cards.l.LandEquilibrium.class)); cards.add(new SetCardInfo("Land Tax", 17, Rarity.RARE, mage.cards.l.LandTax.class)); + cards.add(new SetCardInfo("Life Chisel", 199, Rarity.RARE, mage.cards.l.LifeChisel.class)); cards.add(new SetCardInfo("Lightning Blow", 18, Rarity.COMMON, mage.cards.l.LightningBlow.class)); cards.add(new SetCardInfo("Liu Bei, Lord of Shu", 19, Rarity.RARE, mage.cards.l.LiuBeiLordOfShu.class)); cards.add(new SetCardInfo("Living Plane", 127, Rarity.RARE, mage.cards.l.LivingPlane.class)); @@ -197,6 +204,7 @@ public class MastersEditionIII extends ExpansionSet { cards.add(new SetCardInfo("Reveka, Wizard Savant", 49, Rarity.UNCOMMON, mage.cards.r.RevekaWizardSavant.class)); cards.add(new SetCardInfo("Riding the Dilu Horse", 131, Rarity.UNCOMMON, mage.cards.r.RidingTheDiluHorse.class)); cards.add(new SetCardInfo("Riven Turnbull", 171, Rarity.UNCOMMON, mage.cards.r.RivenTurnbull.class)); + cards.add(new SetCardInfo("Rohgahh of Kher Keep", 172, Rarity.RARE, mage.cards.r.RohgahhOfKherKeep.class)); cards.add(new SetCardInfo("Rolling Earthquake", 110, Rarity.RARE, mage.cards.r.RollingEarthquake.class)); cards.add(new SetCardInfo("Rubinia Soulsinger", 173, Rarity.RARE, mage.cards.r.RubiniaSoulsinger.class)); cards.add(new SetCardInfo("Scrubland", 210, Rarity.RARE, mage.cards.s.Scrubland.class)); @@ -255,4 +263,4 @@ public class MastersEditionIII extends ExpansionSet { cards.add(new SetCardInfo("Zodiac Dragon", 112, Rarity.RARE, mage.cards.z.ZodiacDragon.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/MastersEditionIV.java b/Mage.Sets/src/mage/sets/MastersEditionIV.java index 520f0dedb2..25979eabb1 100644 --- a/Mage.Sets/src/mage/sets/MastersEditionIV.java +++ b/Mage.Sets/src/mage/sets/MastersEditionIV.java @@ -37,7 +37,6 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class MastersEditionIV extends ExpansionSet { private static final MastersEditionIV instance = new MastersEditionIV(); @@ -65,6 +64,7 @@ public class MastersEditionIV extends ExpansionSet { cards.add(new SetCardInfo("Ali from Cairo", 107, Rarity.RARE, mage.cards.a.AliFromCairo.class)); cards.add(new SetCardInfo("Alluring Scent", 141, Rarity.COMMON, mage.cards.a.AlluringScent.class)); cards.add(new SetCardInfo("Amulet of Kroog", 179, Rarity.COMMON, mage.cards.a.AmuletOfKroog.class)); + cards.add(new SetCardInfo("Angelic Voices", 3, Rarity.UNCOMMON, mage.cards.a.AngelicVoices.class)); cards.add(new SetCardInfo("Animate Artifact", 38, Rarity.UNCOMMON, mage.cards.a.AnimateArtifact.class)); cards.add(new SetCardInfo("Argivian Blacksmith", 4, Rarity.UNCOMMON, mage.cards.a.ArgivianBlacksmith.class)); cards.add(new SetCardInfo("Argothian Pixies", 142, Rarity.COMMON, mage.cards.a.ArgothianPixies.class)); @@ -88,12 +88,14 @@ public class MastersEditionIV extends ExpansionSet { cards.add(new SetCardInfo("Brass Man", 185, Rarity.COMMON, mage.cards.b.BrassMan.class)); cards.add(new SetCardInfo("Candelabra of Tawnos", 187, Rarity.RARE, mage.cards.c.CandelabraOfTawnos.class)); cards.add(new SetCardInfo("Celestial Sword", 188, Rarity.UNCOMMON, mage.cards.c.CelestialSword.class)); + cards.add(new SetCardInfo("Champion Lancer", 8, Rarity.RARE, mage.cards.c.ChampionLancer.class)); cards.add(new SetCardInfo("Channel", 145, Rarity.RARE, mage.cards.c.Channel.class)); cards.add(new SetCardInfo("Citanul Druid", 146, Rarity.COMMON, mage.cards.c.CitanulDruid.class)); cards.add(new SetCardInfo("City of Brass", 243, Rarity.RARE, mage.cards.c.CityOfBrass.class)); cards.add(new SetCardInfo("Clay Statue", 189, Rarity.UNCOMMON, mage.cards.c.ClayStatue.class)); cards.add(new SetCardInfo("Clockwork Avian", 190, Rarity.UNCOMMON, mage.cards.c.ClockworkAvian.class)); cards.add(new SetCardInfo("Clockwork Gnomes", 191, Rarity.UNCOMMON, mage.cards.c.ClockworkGnomes.class)); + cards.add(new SetCardInfo("Clockwork Swarm", 192, Rarity.COMMON, mage.cards.c.ClockworkSwarm.class)); cards.add(new SetCardInfo("Cloud Dragon", 41, Rarity.RARE, mage.cards.c.CloudDragon.class)); cards.add(new SetCardInfo("Cloud Spirit", 42, Rarity.COMMON, mage.cards.c.CloudSpirit.class)); cards.add(new SetCardInfo("Colossus of Sardia", 193, Rarity.RARE, mage.cards.c.ColossusOfSardia.class)); @@ -188,6 +190,7 @@ public class MastersEditionIV extends ExpansionSet { cards.add(new SetCardInfo("Maze of Ith", 246, Rarity.RARE, mage.cards.m.MazeOfIth.class)); cards.add(new SetCardInfo("Mightstone", 215, Rarity.COMMON, mage.cards.m.Mightstone.class)); cards.add(new SetCardInfo("Mijae Djinn", 127, Rarity.RARE, mage.cards.m.MijaeDjinn.class)); + cards.add(new SetCardInfo("Minion of Tevesh Szat", 91, Rarity.RARE, mage.cards.m.MinionOfTeveshSzat.class)); cards.add(new SetCardInfo("Mishra's Workshop", 247, Rarity.RARE, mage.cards.m.MishrasWorkshop.class)); cards.add(new SetCardInfo("Mystic Decree", 53, Rarity.UNCOMMON, mage.cards.m.MysticDecree.class)); cards.add(new SetCardInfo("Naked Singularity", 216, Rarity.RARE, mage.cards.n.NakedSingularity.class)); @@ -224,6 +227,7 @@ public class MastersEditionIV extends ExpansionSet { cards.add(new SetCardInfo("Sandstorm", 164, Rarity.COMMON, mage.cards.s.Sandstorm.class)); cards.add(new SetCardInfo("Savannah", 250, Rarity.RARE, mage.cards.s.Savannah.class)); cards.add(new SetCardInfo("Savannah Lions", 24, Rarity.UNCOMMON, mage.cards.s.SavannahLions.class)); + cards.add(new SetCardInfo("Scarwood Bandits", 165, Rarity.RARE, mage.cards.s.ScarwoodBandits.class)); cards.add(new SetCardInfo("Scavenger Folk", 166, Rarity.COMMON, mage.cards.s.ScavengerFolk.class)); cards.add(new SetCardInfo("Scavenging Ghoul", 95, Rarity.UNCOMMON, mage.cards.s.ScavengingGhoul.class)); cards.add(new SetCardInfo("Scrubland", 251, Rarity.RARE, mage.cards.s.Scrubland.class)); @@ -238,8 +242,10 @@ public class MastersEditionIV extends ExpansionSet { cards.add(new SetCardInfo("Sinkhole", 97, Rarity.RARE, mage.cards.s.Sinkhole.class)); cards.add(new SetCardInfo("Sleight of Hand", 62, Rarity.COMMON, mage.cards.s.SleightOfHand.class)); cards.add(new SetCardInfo("Smoke", 137, Rarity.RARE, mage.cards.s.Smoke.class)); + cards.add(new SetCardInfo("Soldevi Golem", 228, Rarity.UNCOMMON, mage.cards.s.SoldeviGolem.class)); cards.add(new SetCardInfo("Soldevi Machinist", 63, Rarity.UNCOMMON, mage.cards.s.SoldeviMachinist.class)); cards.add(new SetCardInfo("Sol Ring", 227, Rarity.RARE, mage.cards.s.SolRing.class)); + cards.add(new SetCardInfo("Soldevi Golem", 228, Rarity.UNCOMMON, mage.cards.s.SoldeviGolem.class)); cards.add(new SetCardInfo("Soul Shred", 98, Rarity.COMMON, mage.cards.s.SoulShred.class)); cards.add(new SetCardInfo("Southern Elephant", 167, Rarity.COMMON, mage.cards.s.SouthernElephant.class)); cards.add(new SetCardInfo("Spotted Griffin", 28, Rarity.COMMON, mage.cards.s.SpottedGriffin.class)); @@ -277,7 +283,7 @@ public class MastersEditionIV extends ExpansionSet { cards.add(new SetCardInfo("Urza's Power Plant", 258, Rarity.LAND, mage.cards.u.UrzasPowerPlant.class)); cards.add(new SetCardInfo("Urza's Tower", 259, Rarity.LAND, mage.cards.u.UrzasTower.class)); cards.add(new SetCardInfo("Veteran Bodyguard", 32, Rarity.RARE, mage.cards.v.VeteranBodyguard.class)); - cards.add(new SetCardInfo("Vibrating Sphere", 238, Rarity.RARE, mage.cards.v.VibratingSphere.class)); + cards.add(new SetCardInfo("Vibrating Sphere", 238, Rarity.RARE, mage.cards.v.VibratingSphere.class)); cards.add(new SetCardInfo("Volcanic Island", 260, Rarity.RARE, mage.cards.v.VolcanicIsland.class)); cards.add(new SetCardInfo("War Mammoth", 172, Rarity.COMMON, mage.cards.w.WarMammoth.class)); cards.add(new SetCardInfo("Warp Artifact", 100, Rarity.COMMON, mage.cards.w.WarpArtifact.class)); @@ -296,4 +302,4 @@ public class MastersEditionIV extends ExpansionSet { cards.add(new SetCardInfo("Zombie Master", 105, Rarity.UNCOMMON, mage.cards.z.ZombieMaster.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/MediaInserts.java b/Mage.Sets/src/mage/sets/MediaInserts.java index 6e08198edf..34abf63710 100644 --- a/Mage.Sets/src/mage/sets/MediaInserts.java +++ b/Mage.Sets/src/mage/sets/MediaInserts.java @@ -68,6 +68,7 @@ public class MediaInserts extends ExpansionSet { cards.add(new SetCardInfo("Breath of Malfegor", 58, Rarity.COMMON, mage.cards.b.BreathOfMalfegor.class)); cards.add(new SetCardInfo("Brion Stoutarm", 17, Rarity.RARE, mage.cards.b.BrionStoutarm.class)); cards.add(new SetCardInfo("Broodmate Dragon", 19, Rarity.RARE, mage.cards.b.BroodmateDragon.class)); + cards.add(new SetCardInfo("Burning Sun's Avatar", 183, Rarity.RARE, mage.cards.b.BurningSunsAvatar.class)); cards.add(new SetCardInfo("Canopy Vista", 167, Rarity.RARE, mage.cards.c.CanopyVista.class)); cards.add(new SetCardInfo("Cathedral of War", 51, Rarity.RARE, mage.cards.c.CathedralOfWar.class)); cards.add(new SetCardInfo("Celestial Colonnade", 23, Rarity.SPECIAL, mage.cards.c.CelestialColonnade.class)); diff --git a/Mage.Sets/src/mage/sets/MercadianMasques.java b/Mage.Sets/src/mage/sets/MercadianMasques.java index 8fb42c57ac..d8ceae0219 100644 --- a/Mage.Sets/src/mage/sets/MercadianMasques.java +++ b/Mage.Sets/src/mage/sets/MercadianMasques.java @@ -51,6 +51,7 @@ public class MercadianMasques extends ExpansionSet { this.numBoosterUncommon = 3; this.numBoosterRare = 1; this.ratioBoosterMythic = 0; + cards.add(new SetCardInfo("Aerial Caravan", 58, Rarity.RARE, mage.cards.a.AerialCaravan.class)); cards.add(new SetCardInfo("Afterlife", 1, Rarity.UNCOMMON, mage.cards.a.Afterlife.class)); cards.add(new SetCardInfo("Alabaster Wall", 2, Rarity.COMMON, mage.cards.a.AlabasterWall.class)); cards.add(new SetCardInfo("Alley Grifters", 115, Rarity.COMMON, mage.cards.a.AlleyGrifters.class)); @@ -66,12 +67,14 @@ public class MercadianMasques extends ExpansionSet { cards.add(new SetCardInfo("Black Market", 116, Rarity.RARE, mage.cards.b.BlackMarket.class)); cards.add(new SetCardInfo("Blaster Mage", 175, Rarity.COMMON, mage.cards.b.BlasterMage.class)); cards.add(new SetCardInfo("Blockade Runner", 60, Rarity.COMMON, mage.cards.b.BlockadeRunner.class)); - cards.add(new SetCardInfo("Blood Hound", 176, Rarity.RARE, mage.cards.b.BloodHound.class)); - cards.add(new SetCardInfo("Boa Constrictor", 231, Rarity.UNCOMMON, mage.cards.b.BoaConstrictor.class)); + cards.add(new SetCardInfo("Blood Hound", 176, Rarity.RARE, mage.cards.b.BloodHound.class)); + cards.add(new SetCardInfo("Blood Oath", 177, Rarity.RARE, mage.cards.b.BloodOath.class)); + cards.add(new SetCardInfo("Boa Constrictor", 231, Rarity.UNCOMMON, mage.cards.b.BoaConstrictor.class)); cards.add(new SetCardInfo("Bog Smugglers", 117, Rarity.COMMON, mage.cards.b.BogSmugglers.class)); cards.add(new SetCardInfo("Bog Witch", 118, Rarity.COMMON, mage.cards.b.BogWitch.class)); cards.add(new SetCardInfo("Brainstorm", 61, Rarity.COMMON, mage.cards.b.Brainstorm.class)); - cards.add(new SetCardInfo("Briar Patch", 232, Rarity.UNCOMMON, mage.cards.b.BriarPatch.class)); + cards.add(new SetCardInfo("Brawl", 178, Rarity.RARE, mage.cards.b.Brawl.class)); + cards.add(new SetCardInfo("Briar Patch", 232, Rarity.UNCOMMON, mage.cards.b.BriarPatch.class)); cards.add(new SetCardInfo("Bribery", 62, Rarity.RARE, mage.cards.b.Bribery.class)); cards.add(new SetCardInfo("Buoyancy", 63, Rarity.COMMON, mage.cards.b.Buoyancy.class)); cards.add(new SetCardInfo("Cackling Witch", 119, Rarity.UNCOMMON, mage.cards.c.CacklingWitch.class)); @@ -87,10 +90,10 @@ public class MercadianMasques extends ExpansionSet { cards.add(new SetCardInfo("Cave-In", 180, Rarity.RARE, mage.cards.c.CaveIn.class)); cards.add(new SetCardInfo("Cavern Crawler", 181, Rarity.COMMON, mage.cards.c.CavernCrawler.class)); cards.add(new SetCardInfo("Cave Sense", 179, Rarity.COMMON, mage.cards.c.CaveSense.class)); - cards.add(new SetCardInfo("Ceremonial Guard", 182, Rarity.COMMON, mage.cards.c.CeremonialGuard.class)); + cards.add(new SetCardInfo("Ceremonial Guard", 182, Rarity.COMMON, mage.cards.c.CeremonialGuard.class)); cards.add(new SetCardInfo("Chambered Nautilus", 64, Rarity.UNCOMMON, mage.cards.c.ChamberedNautilus.class)); cards.add(new SetCardInfo("Charisma", 66, Rarity.RARE, mage.cards.c.Charisma.class)); - cards.add(new SetCardInfo("Charmed Griffin", 7, Rarity.UNCOMMON, mage.cards.c.CharmedGriffin.class)); + cards.add(new SetCardInfo("Charmed Griffin", 7, Rarity.UNCOMMON, mage.cards.c.CharmedGriffin.class)); cards.add(new SetCardInfo("Cho-Arrim Alchemist", 8, Rarity.RARE, mage.cards.c.ChoArrimAlchemist.class)); cards.add(new SetCardInfo("Cho-Arrim Bruiser", 9, Rarity.RARE, mage.cards.c.ChoArrimBruiser.class)); cards.add(new SetCardInfo("Cho-Arrim Legate", 10, Rarity.UNCOMMON, mage.cards.c.ChoArrimLegate.class)); @@ -101,18 +104,19 @@ public class MercadianMasques extends ExpansionSet { cards.add(new SetCardInfo("Cloud Sprite", 67, Rarity.COMMON, mage.cards.c.CloudSprite.class)); cards.add(new SetCardInfo("Coastal Piracy", 68, Rarity.UNCOMMON, mage.cards.c.CoastalPiracy.class)); cards.add(new SetCardInfo("Collective Unconscious", 236, Rarity.RARE, mage.cards.c.CollectiveUnconscious.class)); - cards.add(new SetCardInfo("Common Cause", 13, Rarity.RARE, mage.cards.c.CommonCause.class)); + cards.add(new SetCardInfo("Common Cause", 13, Rarity.RARE, mage.cards.c.CommonCause.class)); cards.add(new SetCardInfo("Conspiracy", 127, Rarity.RARE, mage.cards.c.Conspiracy.class)); cards.add(new SetCardInfo("Corrupt Official", 128, Rarity.RARE, mage.cards.c.CorruptOfficial.class)); cards.add(new SetCardInfo("Counterspell", 69, Rarity.COMMON, mage.cards.c.Counterspell.class)); cards.add(new SetCardInfo("Cowardice", 70, Rarity.RARE, mage.cards.c.Cowardice.class)); cards.add(new SetCardInfo("Crackdown", 15, Rarity.RARE, mage.cards.c.Crackdown.class)); cards.add(new SetCardInfo("Crash", 186, Rarity.COMMON, mage.cards.c.Crash.class)); - cards.add(new SetCardInfo("Credit Voucher", 289, Rarity.UNCOMMON, mage.cards.c.CreditVoucher.class)); + cards.add(new SetCardInfo("Credit Voucher", 289, Rarity.UNCOMMON, mage.cards.c.CreditVoucher.class)); cards.add(new SetCardInfo("Crenellated Wall", 290, Rarity.UNCOMMON, mage.cards.c.CrenellatedWall.class)); - cards.add(new SetCardInfo("Crooked Scales", 291, Rarity.RARE, mage.cards.c.CrookedScales.class)); + cards.add(new SetCardInfo("Crooked Scales", 291, Rarity.RARE, mage.cards.c.CrookedScales.class)); cards.add(new SetCardInfo("Crossbow Infantry", 16, Rarity.COMMON, mage.cards.c.CrossbowInfantry.class)); cards.add(new SetCardInfo("Crumbling Sanctuary", 292, Rarity.RARE, mage.cards.c.CrumblingSanctuary.class)); + cards.add(new SetCardInfo("Customs Depot", 71, Rarity.UNCOMMON, mage.cards.c.CustomsDepot.class)); cards.add(new SetCardInfo("Dark Ritual", 129, Rarity.COMMON, mage.cards.d.DarkRitual.class)); cards.add(new SetCardInfo("Darting Merfolk", 72, Rarity.COMMON, mage.cards.d.DartingMerfolk.class)); cards.add(new SetCardInfo("Dawnstrider", 237, Rarity.RARE, mage.cards.d.Dawnstrider.class)); @@ -124,7 +128,7 @@ public class MercadianMasques extends ExpansionSet { cards.add(new SetCardInfo("Deepwood Tantiv", 241, Rarity.UNCOMMON, mage.cards.d.DeepwoodTantiv.class)); cards.add(new SetCardInfo("Deepwood Wolverine", 242, Rarity.COMMON, mage.cards.d.DeepwoodWolverine.class)); cards.add(new SetCardInfo("Dehydration", 73, Rarity.COMMON, mage.cards.d.Dehydration.class)); - cards.add(new SetCardInfo("Delraich", 133, Rarity.RARE, mage.cards.d.Delraich.class)); + cards.add(new SetCardInfo("Delraich", 133, Rarity.RARE, mage.cards.d.Delraich.class)); cards.add(new SetCardInfo("Desert Twister", 243, Rarity.UNCOMMON, mage.cards.d.DesertTwister.class)); cards.add(new SetCardInfo("Devout Witness", 17, Rarity.COMMON, mage.cards.d.DevoutWitness.class)); cards.add(new SetCardInfo("Diplomatic Escort", 74, Rarity.UNCOMMON, mage.cards.d.DiplomaticEscort.class)); @@ -135,11 +139,13 @@ public class MercadianMasques extends ExpansionSet { cards.add(new SetCardInfo("Dust Bowl", 316, Rarity.RARE, mage.cards.d.DustBowl.class)); cards.add(new SetCardInfo("Embargo", 77, Rarity.RARE, mage.cards.e.Embargo.class)); cards.add(new SetCardInfo("Energy Flux", 78, Rarity.UNCOMMON, mage.cards.e.EnergyFlux.class)); + cards.add(new SetCardInfo("Extortion", 135, Rarity.RARE, mage.cards.e.Extortion.class)); cards.add(new SetCardInfo("Eye of Ramos", 294, Rarity.RARE, mage.cards.e.EyeOfRamos.class)); cards.add(new SetCardInfo("False Demise", 80, Rarity.UNCOMMON, mage.cards.f.FalseDemise.class)); cards.add(new SetCardInfo("Flailing Manticore", 187, Rarity.RARE, mage.cards.f.FlailingManticore.class)); cards.add(new SetCardInfo("Flailing Ogre", 188, Rarity.UNCOMMON, mage.cards.f.FlailingOgre.class)); cards.add(new SetCardInfo("Flailing Soldier", 189, Rarity.COMMON, mage.cards.f.FlailingSoldier.class)); + cards.add(new SetCardInfo("Flaming Sword", 190, Rarity.COMMON, mage.cards.f.FlamingSword.class)); cards.add(new SetCardInfo("Food Chain", 246, Rarity.RARE, mage.cards.f.FoodChain.class)); cards.add(new SetCardInfo("Forced March", 136, Rarity.RARE, mage.cards.f.ForcedMarch.class)); cards.add(new SetCardInfo("Forest", 347, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); @@ -151,9 +157,11 @@ public class MercadianMasques extends ExpansionSet { cards.add(new SetCardInfo("Fountain Watch", 19, Rarity.RARE, mage.cards.f.FountainWatch.class)); cards.add(new SetCardInfo("Fresh Volunteers", 20, Rarity.COMMON, mage.cards.f.FreshVolunteers.class)); cards.add(new SetCardInfo("Furious Assault", 191, Rarity.COMMON, mage.cards.f.FuriousAssault.class)); + cards.add(new SetCardInfo("Game Preserve", 248, Rarity.RARE, mage.cards.g.GamePreserve.class)); cards.add(new SetCardInfo("Gerrard's Irregulars", 192, Rarity.COMMON, mage.cards.g.GerrardsIrregulars.class)); cards.add(new SetCardInfo("Ghoul's Feast", 137, Rarity.UNCOMMON, mage.cards.g.GhoulsFeast.class)); cards.add(new SetCardInfo("Giant Caterpillar", 249, Rarity.COMMON, mage.cards.g.GiantCaterpillar.class)); + cards.add(new SetCardInfo("Glowing Anemone", 81, Rarity.UNCOMMON, mage.cards.g.GlowingAnemone.class)); cards.add(new SetCardInfo("Groundskeeper", 250, Rarity.UNCOMMON, mage.cards.g.Groundskeeper.class)); cards.add(new SetCardInfo("Gush", 82, Rarity.COMMON, mage.cards.g.Gush.class)); cards.add(new SetCardInfo("Hammer Mage", 193, Rarity.UNCOMMON, mage.cards.h.HammerMage.class)); @@ -183,6 +191,7 @@ public class MercadianMasques extends ExpansionSet { cards.add(new SetCardInfo("Ivory Mask", 24, Rarity.RARE, mage.cards.i.IvoryMask.class)); cards.add(new SetCardInfo("Jhovall Queen", 25, Rarity.RARE, mage.cards.j.JhovallQueen.class)); cards.add(new SetCardInfo("Jhovall Rider", 26, Rarity.UNCOMMON, mage.cards.j.JhovallRider.class)); + cards.add(new SetCardInfo("Karn's Touch", 86, Rarity.RARE, mage.cards.k.KarnsTouch.class)); cards.add(new SetCardInfo("Kris Mage", 195, Rarity.COMMON, mage.cards.k.KrisMage.class)); cards.add(new SetCardInfo("Kyren Glider", 196, Rarity.COMMON, mage.cards.k.KyrenGlider.class)); cards.add(new SetCardInfo("Kyren Legate", 197, Rarity.UNCOMMON, mage.cards.k.KyrenLegate.class)); @@ -193,6 +202,7 @@ public class MercadianMasques extends ExpansionSet { cards.add(new SetCardInfo("Larceny", 143, Rarity.UNCOMMON, mage.cards.l.Larceny.class)); cards.add(new SetCardInfo("Last Breath", 27, Rarity.UNCOMMON, mage.cards.l.LastBreath.class)); cards.add(new SetCardInfo("Lava Runner", 200, Rarity.RARE, mage.cards.l.LavaRunner.class)); + cards.add(new SetCardInfo("Liability", 144, Rarity.RARE, mage.cards.l.Liability.class)); cards.add(new SetCardInfo("Lightning Hounds", 201, Rarity.COMMON, mage.cards.l.LightningHounds.class)); cards.add(new SetCardInfo("Lithophage", 202, Rarity.RARE, mage.cards.l.Lithophage.class)); cards.add(new SetCardInfo("Lumbering Satyr", 257, Rarity.UNCOMMON, mage.cards.l.LumberingSatyr.class)); @@ -222,6 +232,7 @@ public class MercadianMasques extends ExpansionSet { cards.add(new SetCardInfo("Notorious Assassin", 150, Rarity.RARE, mage.cards.n.NotoriousAssassin.class)); cards.add(new SetCardInfo("Ogre Taskmaster", 206, Rarity.UNCOMMON, mage.cards.o.OgreTaskmaster.class)); cards.add(new SetCardInfo("Overtaker", 89, Rarity.RARE, mage.cards.o.Overtaker.class)); + cards.add(new SetCardInfo("Panacea", 308, Rarity.UNCOMMON, mage.cards.p.Panacea.class)); cards.add(new SetCardInfo("Pangosaur", 261, Rarity.RARE, mage.cards.p.Pangosaur.class)); cards.add(new SetCardInfo("Peat Bog", 322, Rarity.COMMON, mage.cards.p.PeatBog.class)); cards.add(new SetCardInfo("Pious Warrior", 34, Rarity.COMMON, mage.cards.p.PiousWarrior.class)); @@ -232,6 +243,7 @@ public class MercadianMasques extends ExpansionSet { cards.add(new SetCardInfo("Power Matrix", 309, Rarity.RARE, mage.cards.p.PowerMatrix.class)); cards.add(new SetCardInfo("Primeval Shambler", 152, Rarity.UNCOMMON, mage.cards.p.PrimevalShambler.class)); cards.add(new SetCardInfo("Pulverize", 207, Rarity.RARE, mage.cards.p.Pulverize.class)); + cards.add(new SetCardInfo("Putrefaction", 153, Rarity.UNCOMMON, mage.cards.p.Putrefaction.class)); cards.add(new SetCardInfo("Puppet's Verdict", 208, Rarity.RARE, mage.cards.p.PuppetsVerdict.class)); cards.add(new SetCardInfo("Quagmire Lamprey", 154, Rarity.UNCOMMON, mage.cards.q.QuagmireLamprey.class)); cards.add(new SetCardInfo("Rain of Tears", 155, Rarity.UNCOMMON, mage.cards.r.RainOfTears.class)); @@ -251,8 +263,10 @@ public class MercadianMasques extends ExpansionSet { cards.add(new SetCardInfo("Rishadan Brigand", 92, Rarity.RARE, mage.cards.r.RishadanBrigand.class)); cards.add(new SetCardInfo("Rishadan Cutpurse", 93, Rarity.COMMON, mage.cards.r.RishadanCutpurse.class)); cards.add(new SetCardInfo("Rishadan Footpad", 94, Rarity.UNCOMMON, mage.cards.r.RishadanFootpad.class)); + cards.add(new SetCardInfo("Rishadan Pawnshop", 311, Rarity.RARE, mage.cards.r.RishadanPawnshop.class)); cards.add(new SetCardInfo("Rishadan Port", 324, Rarity.RARE, mage.cards.r.RishadanPort.class)); cards.add(new SetCardInfo("Rock Badger", 210, Rarity.UNCOMMON, mage.cards.r.RockBadger.class)); + cards.add(new SetCardInfo("Rouse", 157, Rarity.COMMON, mage.cards.r.Rouse.class)); cards.add(new SetCardInfo("Rushwood Dryad", 263, Rarity.COMMON, mage.cards.r.RushwoodDryad.class)); cards.add(new SetCardInfo("Rushwood Elemental", 264, Rarity.RARE, mage.cards.r.RushwoodElemental.class)); cards.add(new SetCardInfo("Rushwood Grove", 325, Rarity.UNCOMMON, mage.cards.r.RushwoodGrove.class)); @@ -267,9 +281,12 @@ public class MercadianMasques extends ExpansionSet { cards.add(new SetCardInfo("Saprazzan Legate", 100, Rarity.UNCOMMON, mage.cards.s.SaprazzanLegate.class)); cards.add(new SetCardInfo("Saprazzan Raider", 102, Rarity.COMMON, mage.cards.s.SaprazzanRaider.class)); cards.add(new SetCardInfo("Saprazzan Skerry", 328, Rarity.COMMON, mage.cards.s.SaprazzanSkerry.class)); + cards.add(new SetCardInfo("Scandalmonger", 158, Rarity.UNCOMMON, mage.cards.s.Scandalmonger.class)); + cards.add(new SetCardInfo("Security Detail", 47, Rarity.RARE, mage.cards.s.SecurityDetail.class)); cards.add(new SetCardInfo("Seismic Mage", 211, Rarity.RARE, mage.cards.s.SeismicMage.class)); cards.add(new SetCardInfo("Sever Soul", 159, Rarity.COMMON, mage.cards.s.SeverSoul.class)); cards.add(new SetCardInfo("Shock Troops", 212, Rarity.COMMON, mage.cards.s.ShockTroops.class)); + cards.add(new SetCardInfo("Shoving Match", 103, Rarity.UNCOMMON, mage.cards.s.ShovingMatch.class)); cards.add(new SetCardInfo("Silverglade Elemental", 269, Rarity.COMMON, mage.cards.s.SilvergladeElemental.class)); cards.add(new SetCardInfo("Silverglade Pathfinder", 270, Rarity.UNCOMMON, mage.cards.s.SilvergladePathfinder.class)); cards.add(new SetCardInfo("Sizzle", 213, Rarity.COMMON, mage.cards.s.Sizzle.class)); @@ -288,6 +305,7 @@ public class MercadianMasques extends ExpansionSet { cards.add(new SetCardInfo("Squallmonger", 276, Rarity.UNCOMMON, mage.cards.s.Squallmonger.class)); cards.add(new SetCardInfo("Squee, Goblin Nabob", 214, Rarity.RARE, mage.cards.s.SqueeGoblinNabob.class)); cards.add(new SetCardInfo("Squeeze", 105, Rarity.RARE, mage.cards.s.Squeeze.class)); + cards.add(new SetCardInfo("Stamina", 277, Rarity.UNCOMMON, mage.cards.s.Stamina.class)); cards.add(new SetCardInfo("Statecraft", 106, Rarity.RARE, mage.cards.s.Statecraft.class)); cards.add(new SetCardInfo("Steadfast Guard", 50, Rarity.COMMON, mage.cards.s.SteadfastGuard.class)); cards.add(new SetCardInfo("Stinging Barrier", 107, Rarity.COMMON, mage.cards.s.StingingBarrier.class)); @@ -306,13 +324,16 @@ public class MercadianMasques extends ExpansionSet { cards.add(new SetCardInfo("Thermal Glider", 53, Rarity.COMMON, mage.cards.t.ThermalGlider.class)); cards.add(new SetCardInfo("Thieves' Auction", 218, Rarity.RARE, mage.cards.t.ThievesAuction.class)); cards.add(new SetCardInfo("Thrashing Wumpus", 166, Rarity.RARE, mage.cards.t.ThrashingWumpus.class)); + cards.add(new SetCardInfo("Thunderclap", 219, Rarity.COMMON, mage.cards.t.Thunderclap.class)); cards.add(new SetCardInfo("Thwart", 108, Rarity.UNCOMMON, mage.cards.t.Thwart.class)); cards.add(new SetCardInfo("Tidal Bore", 109, Rarity.COMMON, mage.cards.t.TidalBore.class)); cards.add(new SetCardInfo("Tidal Kraken", 110, Rarity.RARE, mage.cards.t.TidalKraken.class)); cards.add(new SetCardInfo("Tiger Claws", 279, Rarity.COMMON, mage.cards.t.TigerClaws.class)); + cards.add(new SetCardInfo("Timid Drake", 111, Rarity.UNCOMMON, mage.cards.t.TimidDrake.class)); cards.add(new SetCardInfo("Tonic Peddler", 54, Rarity.UNCOMMON, mage.cards.t.TonicPeddler.class)); cards.add(new SetCardInfo("Tooth of Ramos", 313, Rarity.RARE, mage.cards.t.ToothOfRamos.class)); cards.add(new SetCardInfo("Tower of the Magistrate", 330, Rarity.RARE, mage.cards.t.TowerOfTheMagistrate.class)); + cards.add(new SetCardInfo("Toymaker", 314, Rarity.UNCOMMON, mage.cards.t.Toymaker.class)); cards.add(new SetCardInfo("Trade Routes", 112, Rarity.RARE, mage.cards.t.TradeRoutes.class)); cards.add(new SetCardInfo("Tranquility", 280, Rarity.COMMON, mage.cards.t.Tranquility.class)); cards.add(new SetCardInfo("Tremor", 220, Rarity.COMMON, mage.cards.t.Tremor.class)); @@ -324,6 +345,7 @@ public class MercadianMasques extends ExpansionSet { cards.add(new SetCardInfo("Vernal Equinox", 283, Rarity.RARE, mage.cards.v.VernalEquinox.class)); cards.add(new SetCardInfo("Vine Dryad", 284, Rarity.RARE, mage.cards.v.VineDryad.class)); cards.add(new SetCardInfo("Vine Trellis", 285, Rarity.COMMON, mage.cards.v.VineTrellis.class)); + cards.add(new SetCardInfo("Wall of Distortion", 171, Rarity.COMMON, mage.cards.w.WallOfDistortion.class)); cards.add(new SetCardInfo("War Cadence", 224, Rarity.UNCOMMON, mage.cards.w.WarCadence.class)); cards.add(new SetCardInfo("War Tax", 113, Rarity.UNCOMMON, mage.cards.w.WarTax.class)); cards.add(new SetCardInfo("Warmonger", 225, Rarity.UNCOMMON, mage.cards.w.Warmonger.class)); @@ -331,5 +353,6 @@ public class MercadianMasques extends ExpansionSet { cards.add(new SetCardInfo("Wave of Reckoning", 56, Rarity.RARE, mage.cards.w.WaveOfReckoning.class)); cards.add(new SetCardInfo("Wild Jhovall", 227, Rarity.COMMON, mage.cards.w.WildJhovall.class)); cards.add(new SetCardInfo("Word of Blasting", 228, Rarity.UNCOMMON, mage.cards.w.WordOfBlasting.class)); + cards.add(new SetCardInfo("Worry Beads", 315, Rarity.RARE, mage.cards.w.WorryBeads.class)); } } diff --git a/Mage.Sets/src/mage/sets/MerfolkVsGoblins.java b/Mage.Sets/src/mage/sets/MerfolkVsGoblins.java index 691edb31d6..caab14c36c 100644 --- a/Mage.Sets/src/mage/sets/MerfolkVsGoblins.java +++ b/Mage.Sets/src/mage/sets/MerfolkVsGoblins.java @@ -35,6 +35,7 @@ import mage.constants.SetType; * @author fireshoes */ public class MerfolkVsGoblins extends ExpansionSet { + private static final MerfolkVsGoblins instance = new MerfolkVsGoblins(); public static MerfolkVsGoblins getInstance() { diff --git a/Mage.Sets/src/mage/sets/MindVsMight.java b/Mage.Sets/src/mage/sets/MindVsMight.java index 427ac6ebac..f0da25b515 100644 --- a/Mage.Sets/src/mage/sets/MindVsMight.java +++ b/Mage.Sets/src/mage/sets/MindVsMight.java @@ -3,7 +3,6 @@ * To change this template file, choose Tools | Templates * and open the template in the editor. */ - package mage.sets; import mage.cards.ExpansionSet; @@ -14,8 +13,8 @@ import mage.constants.SetType; * * @author fireshoes */ - public class MindVsMight extends ExpansionSet { + private static final MindVsMight instance = new MindVsMight(); public static MindVsMight getInstance() { diff --git a/Mage.Sets/src/mage/sets/Mirage.java b/Mage.Sets/src/mage/sets/Mirage.java index 9443d093e9..2100e30fab 100644 --- a/Mage.Sets/src/mage/sets/Mirage.java +++ b/Mage.Sets/src/mage/sets/Mirage.java @@ -79,6 +79,7 @@ public class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Boomerang", 56, Rarity.COMMON, mage.cards.b.Boomerang.class)); cards.add(new SetCardInfo("Breathstealer", 7, Rarity.COMMON, mage.cards.b.Breathstealer.class)); cards.add(new SetCardInfo("Brushwagg", 106, Rarity.RARE, mage.cards.b.Brushwagg.class)); + cards.add(new SetCardInfo("Burning Palm Efreet", 161, Rarity.UNCOMMON, mage.cards.b.BurningPalmEfreet.class)); cards.add(new SetCardInfo("Burning Shield Askari", 162, Rarity.COMMON, mage.cards.b.BurningShieldAskari.class)); cards.add(new SetCardInfo("Cadaverous Bloom", 318, Rarity.RARE, mage.cards.c.CadaverousBloom.class)); cards.add(new SetCardInfo("Cadaverous Knight", 8, Rarity.COMMON, mage.cards.c.CadaverousKnight.class)); @@ -109,6 +110,7 @@ public class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Disenchant", 214, Rarity.COMMON, mage.cards.d.Disenchant.class)); cards.add(new SetCardInfo("Dissipate", 61, Rarity.UNCOMMON, mage.cards.d.Dissipate.class)); cards.add(new SetCardInfo("Divine Offering", 215, Rarity.COMMON, mage.cards.d.DivineOffering.class)); + cards.add(new SetCardInfo("Divine Retribution", 216, Rarity.RARE, mage.cards.d.DivineRetribution.class)); cards.add(new SetCardInfo("Drain Life", 16, Rarity.COMMON, mage.cards.d.DrainLife.class)); cards.add(new SetCardInfo("Dread Specter", 17, Rarity.UNCOMMON, mage.cards.d.DreadSpecter.class)); cards.add(new SetCardInfo("Dream Cache", 62, Rarity.COMMON, mage.cards.d.DreamCache.class)); @@ -118,11 +120,14 @@ public class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Ebony Charm", 18, Rarity.COMMON, mage.cards.e.EbonyCharm.class)); cards.add(new SetCardInfo("Ekundu Griffin", 217, Rarity.COMMON, mage.cards.e.EkunduGriffin.class)); cards.add(new SetCardInfo("Elixir of Vitality", 265, Rarity.UNCOMMON, mage.cards.e.ElixirOfVitality.class)); + cards.add(new SetCardInfo("Emberwilde Djinn", 172, Rarity.RARE, mage.cards.e.EmberwildeDjinn.class)); + cards.add(new SetCardInfo("Energy Bolt", 323, Rarity.RARE, mage.cards.e.EnergyBolt.class)); cards.add(new SetCardInfo("Enfeeblement", 19, Rarity.COMMON, mage.cards.e.Enfeeblement.class)); cards.add(new SetCardInfo("Enlightened Tutor", 218, Rarity.UNCOMMON, mage.cards.e.EnlightenedTutor.class)); cards.add(new SetCardInfo("Ersatz Gnomes", 266, Rarity.UNCOMMON, mage.cards.e.ErsatzGnomes.class)); cards.add(new SetCardInfo("Ethereal Champion", 219, Rarity.RARE, mage.cards.e.EtherealChampion.class)); cards.add(new SetCardInfo("Fallow Earth", 112, Rarity.UNCOMMON, mage.cards.f.FallowEarth.class)); + cards.add(new SetCardInfo("Favorable Destiny", 220, Rarity.UNCOMMON, mage.cards.f.FavorableDestiny.class)); cards.add(new SetCardInfo("Femeref Archers", 113, Rarity.UNCOMMON, mage.cards.f.FemerefArchers.class)); cards.add(new SetCardInfo("Femeref Healer", 221, Rarity.COMMON, mage.cards.f.FemerefHealer.class)); cards.add(new SetCardInfo("Femeref Knight", 222, Rarity.COMMON, mage.cards.f.FemerefKnight.class)); @@ -132,6 +137,7 @@ public class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Final Fortune", 173, Rarity.RARE, mage.cards.f.FinalFortune.class)); cards.add(new SetCardInfo("Firebreathing", 174, Rarity.COMMON, mage.cards.f.Firebreathing.class)); cards.add(new SetCardInfo("Fire Diamond", 267, Rarity.UNCOMMON, mage.cards.f.FireDiamond.class)); + cards.add(new SetCardInfo("Flame Elemental", 175, Rarity.UNCOMMON, mage.cards.f.FlameElemental.class)); cards.add(new SetCardInfo("Flare", 176, Rarity.COMMON, mage.cards.f.Flare.class)); cards.add(new SetCardInfo("Flash", 66, Rarity.RARE, mage.cards.f.Flash.class)); cards.add(new SetCardInfo("Flood Plain", 291, Rarity.UNCOMMON, mage.cards.f.FloodPlain.class)); @@ -145,6 +151,7 @@ public class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Forsaken Wastes", 23, Rarity.RARE, mage.cards.f.ForsakenWastes.class)); cards.add(new SetCardInfo("Frenetic Efreet", 324, Rarity.RARE, mage.cards.f.FreneticEfreet.class)); cards.add(new SetCardInfo("Giant Mantis", 116, Rarity.COMMON, mage.cards.g.GiantMantis.class)); + cards.add(new SetCardInfo("Gibbering Hyenas", 117, Rarity.COMMON, mage.cards.g.GibberingHyenas.class)); cards.add(new SetCardInfo("Goblin Elite Infantry", 177, Rarity.COMMON, mage.cards.g.GoblinEliteInfantry.class)); cards.add(new SetCardInfo("Goblin Scouts", 178, Rarity.UNCOMMON, mage.cards.g.GoblinScouts.class)); cards.add(new SetCardInfo("Goblin Soothsayer", 179, Rarity.COMMON, mage.cards.g.GoblinSoothsayer.class)); @@ -154,9 +161,11 @@ public class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Gravebane Zombie", 25, Rarity.COMMON, mage.cards.g.GravebaneZombie.class)); cards.add(new SetCardInfo("Grave Servitude", 24, Rarity.COMMON, mage.cards.g.GraveServitude.class)); cards.add(new SetCardInfo("Grinning Totem", 268, Rarity.RARE, mage.cards.g.GrinningTotem.class)); + cards.add(new SetCardInfo("Hakim, Loreweaver", 68, Rarity.RARE, mage.cards.h.HakimLoreweaver.class)); cards.add(new SetCardInfo("Hall of Gemstone", 119, Rarity.RARE, mage.cards.h.HallOfGemstone.class)); cards.add(new SetCardInfo("Hammer of Bogardan", 181, Rarity.RARE, mage.cards.h.HammerOfBogardan.class)); cards.add(new SetCardInfo("Harbinger of Night", 26, Rarity.RARE, mage.cards.h.HarbingerOfNight.class)); + cards.add(new SetCardInfo("Harbor Guardian", 326, Rarity.UNCOMMON, mage.cards.h.HarborGuardian.class)); cards.add(new SetCardInfo("Harmattan Efreet", 69, Rarity.UNCOMMON, mage.cards.h.HarmattanEfreet.class)); cards.add(new SetCardInfo("Hazerider Drake", 328, Rarity.UNCOMMON, mage.cards.h.HazeriderDrake.class)); cards.add(new SetCardInfo("Healing Salve", 224, Rarity.COMMON, mage.cards.h.HealingSalve.class)); @@ -178,10 +187,13 @@ public class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Jungle Patrol", 121, Rarity.RARE, mage.cards.j.JunglePatrol.class)); cards.add(new SetCardInfo("Jungle Troll", 329, Rarity.UNCOMMON, mage.cards.j.JungleTroll.class)); cards.add(new SetCardInfo("Jungle Wurm", 122, Rarity.COMMON, mage.cards.j.JungleWurm.class)); + cards.add(new SetCardInfo("Kaervek's Hex", 28, Rarity.UNCOMMON, mage.cards.k.KaerveksHex.class)); cards.add(new SetCardInfo("Kaervek's Torch", 185, Rarity.COMMON, mage.cards.k.KaerveksTorch.class)); cards.add(new SetCardInfo("Karoo Meerkat", 123, Rarity.UNCOMMON, mage.cards.k.KarooMeerkat.class)); + cards.add(new SetCardInfo("Kukemssa Pirates", 71, Rarity.RARE, mage.cards.k.KukemssaPirates.class)); cards.add(new SetCardInfo("Kukemssa Serpent", 72, Rarity.COMMON, mage.cards.k.KukemssaSerpent.class)); cards.add(new SetCardInfo("Lead Golem", 271, Rarity.UNCOMMON, mage.cards.l.LeadGolem.class)); + cards.add(new SetCardInfo("Leering Gargoyle", 331, Rarity.RARE, mage.cards.l.LeeringGargoyle.class)); cards.add(new SetCardInfo("Lightning Reflexes", 186, Rarity.COMMON, mage.cards.l.LightningReflexes.class)); cards.add(new SetCardInfo("Lion's Eye Diamond", 272, Rarity.RARE, mage.cards.l.LionsEyeDiamond.class)); cards.add(new SetCardInfo("Locust Swarm", 124, Rarity.UNCOMMON, mage.cards.l.LocustSwarm.class)); @@ -193,6 +205,8 @@ public class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Memory Lapse", 74, Rarity.COMMON, mage.cards.m.MemoryLapse.class)); cards.add(new SetCardInfo("Merfolk Raiders", 75, Rarity.COMMON, mage.cards.m.MerfolkRaiders.class)); cards.add(new SetCardInfo("Merfolk Seer", 76, Rarity.COMMON, mage.cards.m.MerfolkSeer.class)); + cards.add(new SetCardInfo("Mind Harness", 78, Rarity.UNCOMMON, mage.cards.m.MindHarness.class)); + cards.add(new SetCardInfo("Mire Shade", 29, Rarity.UNCOMMON, mage.cards.m.MireShade.class)); cards.add(new SetCardInfo("Mist Dragon", 79, Rarity.RARE, mage.cards.m.MistDragon.class)); cards.add(new SetCardInfo("Moss Diamond", 277, Rarity.UNCOMMON, mage.cards.m.MossDiamond.class)); cards.add(new SetCardInfo("Mountain", 301, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); @@ -222,7 +236,10 @@ public class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Political Trickery", 81, Rarity.RARE, mage.cards.p.PoliticalTrickery.class)); cards.add(new SetCardInfo("Polymorph", 82, Rarity.RARE, mage.cards.p.Polymorph.class)); cards.add(new SetCardInfo("Power Sink", 83, Rarity.COMMON, mage.cards.p.PowerSink.class)); + cards.add(new SetCardInfo("Prismatic Circle", 238, Rarity.COMMON, mage.cards.p.PrismaticCircle.class)); + cards.add(new SetCardInfo("Prismatic Lace", 84, Rarity.RARE, mage.cards.p.PrismaticLace.class)); cards.add(new SetCardInfo("Psychic Transfer", 85, Rarity.RARE, mage.cards.p.PsychicTransfer.class)); + cards.add(new SetCardInfo("Purraj of Urborg", 33, Rarity.RARE, mage.cards.p.PurrajOfUrborg.class)); cards.add(new SetCardInfo("Quirion Elves", 132, Rarity.COMMON, mage.cards.q.QuirionElves.class)); cards.add(new SetCardInfo("Radiant Essence", 336, Rarity.UNCOMMON, mage.cards.r.RadiantEssence.class)); cards.add(new SetCardInfo("Raging Spirit", 188, Rarity.COMMON, mage.cards.r.RagingSpirit.class)); @@ -232,6 +249,7 @@ public class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Reality Ripple", 87, Rarity.COMMON, mage.cards.r.RealityRipple.class)); cards.add(new SetCardInfo("Reckless Embermage", 189, Rarity.RARE, mage.cards.r.RecklessEmbermage.class)); cards.add(new SetCardInfo("Regeneration", 134, Rarity.COMMON, mage.cards.r.Regeneration.class)); + cards.add(new SetCardInfo("Reign of Chaos", 190, Rarity.UNCOMMON, mage.cards.r.ReignOfChaos.class)); cards.add(new SetCardInfo("Reparations", 338, Rarity.RARE, mage.cards.r.Reparations.class)); cards.add(new SetCardInfo("Restless Dead", 36, Rarity.COMMON, mage.cards.r.RestlessDead.class)); cards.add(new SetCardInfo("Ritual of Steel", 240, Rarity.COMMON, mage.cards.r.RitualOfSteel.class)); @@ -243,6 +261,7 @@ public class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Sandstorm", 137, Rarity.COMMON, mage.cards.s.Sandstorm.class)); cards.add(new SetCardInfo("Sapphire Charm", 89, Rarity.COMMON, mage.cards.s.SapphireCharm.class)); cards.add(new SetCardInfo("Savage Twister", 340, Rarity.UNCOMMON, mage.cards.s.SavageTwister.class)); + cards.add(new SetCardInfo("Sawback Manticore", 341, Rarity.RARE, mage.cards.s.SawbackManticore.class)); cards.add(new SetCardInfo("Searing Spear Askari", 191, Rarity.COMMON, mage.cards.s.SearingSpearAskari.class)); cards.add(new SetCardInfo("Sea Scryer", 90, Rarity.COMMON, mage.cards.s.SeaScryer.class)); cards.add(new SetCardInfo("Seedling Charm", 138, Rarity.COMMON, mage.cards.s.SeedlingCharm.class)); @@ -252,6 +271,7 @@ public class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Shadow Guildmage", 38, Rarity.COMMON, mage.cards.s.ShadowGuildmage.class)); cards.add(new SetCardInfo("Shallow Grave", 39, Rarity.RARE, mage.cards.s.ShallowGrave.class)); cards.add(new SetCardInfo("Shaper Guildmage", 91, Rarity.COMMON, mage.cards.s.ShaperGuildmage.class)); + cards.add(new SetCardInfo("Shauku's Minion", 343, Rarity.UNCOMMON, mage.cards.s.ShaukusMinion.class)); cards.add(new SetCardInfo("Shauku, Endbringer", 40, Rarity.RARE, mage.cards.s.ShaukuEndbringer.class)); cards.add(new SetCardInfo("Shimmer", 92, Rarity.RARE, mage.cards.s.Shimmer.class)); cards.add(new SetCardInfo("Sidar Jabari", 243, Rarity.RARE, mage.cards.s.SidarJabari.class)); @@ -259,11 +279,13 @@ public class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Sky Diamond", 284, Rarity.UNCOMMON, mage.cards.s.SkyDiamond.class)); cards.add(new SetCardInfo("Soar", 93, Rarity.COMMON, mage.cards.s.Soar.class)); cards.add(new SetCardInfo("Soul Rend", 42, Rarity.UNCOMMON, mage.cards.s.SoulRend.class)); + cards.add(new SetCardInfo("Spectral Guardian", 245, Rarity.RARE, mage.cards.s.SpectralGuardian.class)); cards.add(new SetCardInfo("Spirit of the Night", 44, Rarity.RARE, mage.cards.s.SpiritOfTheNight.class)); cards.add(new SetCardInfo("Spitting Earth", 193, Rarity.COMMON, mage.cards.s.SpittingEarth.class)); cards.add(new SetCardInfo("Stalking Tiger", 141, Rarity.COMMON, mage.cards.s.StalkingTiger.class)); cards.add(new SetCardInfo("Stone Rain", 194, Rarity.COMMON, mage.cards.s.StoneRain.class)); cards.add(new SetCardInfo("Stupor", 45, Rarity.UNCOMMON, mage.cards.s.Stupor.class)); + cards.add(new SetCardInfo("Subterranean Spirit", 195, Rarity.RARE, mage.cards.s.SubterraneanSpirit.class)); cards.add(new SetCardInfo("Sunweb", 246, Rarity.RARE, mage.cards.s.Sunweb.class)); cards.add(new SetCardInfo("Suq'Ata Firewalker", 94, Rarity.UNCOMMON, mage.cards.s.SuqAtaFirewalker.class)); cards.add(new SetCardInfo("Swamp", 311, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); @@ -276,10 +298,14 @@ public class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Teferi's Curse", 96, Rarity.COMMON, mage.cards.t.TeferisCurse.class)); cards.add(new SetCardInfo("Teferi's Drake", 97, Rarity.COMMON, mage.cards.t.TeferisDrake.class)); cards.add(new SetCardInfo("Teferi's Isle", 315, Rarity.RARE, mage.cards.t.TeferisIsle.class)); + cards.add(new SetCardInfo("Telim'Tor", 197, Rarity.RARE, mage.cards.t.TelimTor.class)); cards.add(new SetCardInfo("Telim'Tor's Darts", 286, Rarity.UNCOMMON, mage.cards.t.TelimTorsDarts.class)); + cards.add(new SetCardInfo("Telim'Tor's Edict", 198, Rarity.RARE, mage.cards.t.TelimTorsEdict.class)); cards.add(new SetCardInfo("Thirst", 99, Rarity.COMMON, mage.cards.t.Thirst.class)); cards.add(new SetCardInfo("Tidal Wave", 100, Rarity.UNCOMMON, mage.cards.t.TidalWave.class)); cards.add(new SetCardInfo("Tranquil Domain", 143, Rarity.COMMON, mage.cards.t.TranquilDomain.class)); + cards.add(new SetCardInfo("Tropical Storm", 144, Rarity.UNCOMMON, mage.cards.t.TropicalStorm.class)); + cards.add(new SetCardInfo("Uktabi Faerie", 145, Rarity.COMMON, mage.cards.u.UktabiFaerie.class)); cards.add(new SetCardInfo("Uktabi Wildcats", 146, Rarity.RARE, mage.cards.u.UktabiWildcats.class)); cards.add(new SetCardInfo("Unfulfilled Desires", 345, Rarity.RARE, mage.cards.u.UnfulfilledDesires.class)); cards.add(new SetCardInfo("Unseen Walker", 147, Rarity.UNCOMMON, mage.cards.u.UnseenWalker.class)); @@ -296,6 +322,7 @@ public class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Waiting in the Weeds", 150, Rarity.RARE, mage.cards.w.WaitingInTheWeeds.class)); cards.add(new SetCardInfo("Wall of Roots", 151, Rarity.COMMON, mage.cards.w.WallOfRoots.class)); cards.add(new SetCardInfo("Ward of Lights", 251, Rarity.COMMON, mage.cards.w.WardOfLights.class)); + cards.add(new SetCardInfo("Wave Elemental", 102, Rarity.UNCOMMON, mage.cards.w.WaveElemental.class)); cards.add(new SetCardInfo("Wild Elephant", 152, Rarity.COMMON, mage.cards.w.WildElephant.class)); cards.add(new SetCardInfo("Wildfire Emissary", 203, Rarity.UNCOMMON, mage.cards.w.WildfireEmissary.class)); cards.add(new SetCardInfo("Windreaper Falcon", 349, Rarity.UNCOMMON, mage.cards.w.WindreaperFalcon.class)); diff --git a/Mage.Sets/src/mage/sets/Mirrodin.java b/Mage.Sets/src/mage/sets/Mirrodin.java index 3a7768c523..7222f68d8a 100644 --- a/Mage.Sets/src/mage/sets/Mirrodin.java +++ b/Mage.Sets/src/mage/sets/Mirrodin.java @@ -5,6 +5,7 @@ import mage.constants.Rarity; import mage.constants.SetType; public class Mirrodin extends ExpansionSet { + private static final Mirrodin instance = new Mirrodin(); public static Mirrodin getInstance() { @@ -46,7 +47,7 @@ public class Mirrodin extends ExpansionSet { cards.add(new SetCardInfo("Bosh, Iron Golem", 147, Rarity.RARE, mage.cards.b.BoshIronGolem.class)); cards.add(new SetCardInfo("Bottle Gnomes", 148, Rarity.UNCOMMON, mage.cards.b.BottleGnomes.class)); cards.add(new SetCardInfo("Broodstar", 31, Rarity.RARE, mage.cards.b.Broodstar.class)); - cards.add(new SetCardInfo("Brown Ouphe", 115, Rarity.UNCOMMON, mage.cards.b.BrownOuphe.class)); + cards.add(new SetCardInfo("Brown Ouphe", 115, Rarity.UNCOMMON, mage.cards.b.BrownOuphe.class)); cards.add(new SetCardInfo("Cathodion", 149, Rarity.UNCOMMON, mage.cards.c.Cathodion.class)); cards.add(new SetCardInfo("Chalice of the Void", 150, Rarity.RARE, mage.cards.c.ChaliceOfTheVoid.class)); cards.add(new SetCardInfo("Chimney Imp", 59, Rarity.COMMON, mage.cards.c.ChimneyImp.class)); @@ -95,6 +96,7 @@ public class Mirrodin extends ExpansionSet { cards.add(new SetCardInfo("Forest", 305, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Forest", 306, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Forge Armor", 92, Rarity.UNCOMMON, mage.cards.f.ForgeArmor.class)); + cards.add(new SetCardInfo("Fractured Loyalty", 93, Rarity.UNCOMMON, mage.cards.f.FracturedLoyalty.class)); cards.add(new SetCardInfo("Frogmite", 172, Rarity.COMMON, mage.cards.f.Frogmite.class)); cards.add(new SetCardInfo("Galvanic Key", 173, Rarity.COMMON, mage.cards.g.GalvanicKey.class)); cards.add(new SetCardInfo("Gate to the Aether", 174, Rarity.RARE, mage.cards.g.GateToTheAether.class)); @@ -160,6 +162,7 @@ public class Mirrodin extends ExpansionSet { cards.add(new SetCardInfo("Mesmeric Orb", 204, Rarity.RARE, mage.cards.m.MesmericOrb.class)); cards.add(new SetCardInfo("Mind's Eye", 205, Rarity.RARE, mage.cards.m.MindsEye.class)); cards.add(new SetCardInfo("Mindslaver", 206, Rarity.RARE, mage.cards.m.Mindslaver.class)); + cards.add(new SetCardInfo("Mindstorm Crown", 207, Rarity.UNCOMMON, mage.cards.m.MindstormCrown.class)); cards.add(new SetCardInfo("Molder Slug", 125, Rarity.RARE, mage.cards.m.MolderSlug.class)); cards.add(new SetCardInfo("Molten Rain", 101, Rarity.COMMON, mage.cards.m.MoltenRain.class)); cards.add(new SetCardInfo("Moriok Scavenger", 68, Rarity.COMMON, mage.cards.m.MoriokScavenger.class)); @@ -245,7 +248,9 @@ public class Mirrodin extends ExpansionSet { cards.add(new SetCardInfo("Solemn Simulacrum", 245, Rarity.RARE, mage.cards.s.SolemnSimulacrum.class)); cards.add(new SetCardInfo("Somber Hoverguard", 51, Rarity.COMMON, mage.cards.s.SomberHoverguard.class)); cards.add(new SetCardInfo("Soul Foundry", 246, Rarity.RARE, mage.cards.s.SoulFoundry.class)); + cards.add(new SetCardInfo("Soul Nova", 25, Rarity.UNCOMMON, mage.cards.s.SoulNova.class)); cards.add(new SetCardInfo("Spellweaver Helix", 247, Rarity.RARE, mage.cards.s.SpellweaverHelix.class)); + cards.add(new SetCardInfo("Sphere of Purity", 26, Rarity.COMMON, mage.cards.s.SphereOfPurity.class)); cards.add(new SetCardInfo("Spikeshot Goblin", 108, Rarity.COMMON, mage.cards.s.SpikeshotGoblin.class)); cards.add(new SetCardInfo("Spoils of the Vault", 78, Rarity.RARE, mage.cards.s.SpoilsOfTheVault.class)); cards.add(new SetCardInfo("Stalking Stones", 284, Rarity.UNCOMMON, mage.cards.s.StalkingStones.class)); diff --git a/Mage.Sets/src/mage/sets/MirrodinBesieged.java b/Mage.Sets/src/mage/sets/MirrodinBesieged.java index 0208baa0d3..23677de00c 100644 --- a/Mage.Sets/src/mage/sets/MirrodinBesieged.java +++ b/Mage.Sets/src/mage/sets/MirrodinBesieged.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; diff --git a/Mage.Sets/src/mage/sets/ModernMasters.java b/Mage.Sets/src/mage/sets/ModernMasters.java index 3ddf81344c..1546ae073d 100644 --- a/Mage.Sets/src/mage/sets/ModernMasters.java +++ b/Mage.Sets/src/mage/sets/ModernMasters.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; diff --git a/Mage.Sets/src/mage/sets/ModernMasters2015.java b/Mage.Sets/src/mage/sets/ModernMasters2015.java index 7f1b96b75e..633f35b513 100644 --- a/Mage.Sets/src/mage/sets/ModernMasters2015.java +++ b/Mage.Sets/src/mage/sets/ModernMasters2015.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; diff --git a/Mage.Sets/src/mage/sets/Nemesis.java b/Mage.Sets/src/mage/sets/Nemesis.java index 34e3d6e696..b8225ffd6a 100644 --- a/Mage.Sets/src/mage/sets/Nemesis.java +++ b/Mage.Sets/src/mage/sets/Nemesis.java @@ -64,6 +64,7 @@ public class Nemesis extends ExpansionSet { cards.add(new SetCardInfo("Ascendant Evincar", 51, Rarity.RARE, mage.cards.a.AscendantEvincar.class)); cards.add(new SetCardInfo("Avenger en-Dal", 2, Rarity.RARE, mage.cards.a.AvengerEnDal.class)); cards.add(new SetCardInfo("Battlefield Percher", 52, Rarity.UNCOMMON, mage.cards.b.BattlefieldPercher.class)); + cards.add(new SetCardInfo("Belbe's Armor", 126, Rarity.UNCOMMON, mage.cards.b.BelbesArmor.class)); cards.add(new SetCardInfo("Belbe's Percher", 53, Rarity.COMMON, mage.cards.b.BelbesPercher.class)); cards.add(new SetCardInfo("Belbe's Portal", 127, Rarity.RARE, mage.cards.b.BelbesPortal.class)); cards.add(new SetCardInfo("Blastoderm", 102, Rarity.COMMON, mage.cards.b.Blastoderm.class)); @@ -90,21 +91,26 @@ public class Nemesis extends ExpansionSet { cards.add(new SetCardInfo("Flowstone Crusher", 81, Rarity.COMMON, mage.cards.f.FlowstoneCrusher.class)); cards.add(new SetCardInfo("Flowstone Overseer", 82, Rarity.RARE, mage.cards.f.FlowstoneOverseer.class)); cards.add(new SetCardInfo("Flowstone Slide", 83, Rarity.RARE, mage.cards.f.FlowstoneSlide.class)); + cards.add(new SetCardInfo("Flowstone Strike", 84, Rarity.COMMON, mage.cards.f.FlowstoneStrike.class)); + cards.add(new SetCardInfo("Flowstone Surge", 85, Rarity.UNCOMMON, mage.cards.f.FlowstoneSurge.class)); cards.add(new SetCardInfo("Flowstone Thopter", 132, Rarity.UNCOMMON, mage.cards.f.FlowstoneThopter.class)); cards.add(new SetCardInfo("Flowstone Wall", 86, Rarity.COMMON, mage.cards.f.FlowstoneWall.class)); cards.add(new SetCardInfo("Infiltrate", 33, Rarity.COMMON, mage.cards.i.Infiltrate.class)); cards.add(new SetCardInfo("Jolting Merfolk", 34, Rarity.UNCOMMON, mage.cards.j.JoltingMerfolk.class)); cards.add(new SetCardInfo("Kill Switch", 133, Rarity.RARE, mage.cards.k.KillSwitch.class)); cards.add(new SetCardInfo("Kor Haven", 141, Rarity.RARE, mage.cards.k.KorHaven.class)); + cards.add(new SetCardInfo("Lashknife", 9, Rarity.COMMON, mage.cards.l.Lashknife.class)); cards.add(new SetCardInfo("Lawbringer", 10, Rarity.COMMON, mage.cards.l.Lawbringer.class)); cards.add(new SetCardInfo("Lightbringer", 11, Rarity.COMMON, mage.cards.l.Lightbringer.class)); cards.add(new SetCardInfo("Lin Sivvi, Defiant Hero", 12, Rarity.RARE, mage.cards.l.LinSivviDefiantHero.class)); cards.add(new SetCardInfo("Massacre", 58, Rarity.UNCOMMON, mage.cards.m.Massacre.class)); cards.add(new SetCardInfo("Mind Slash", 59, Rarity.UNCOMMON, mage.cards.m.MindSlash.class)); + cards.add(new SetCardInfo("Mind Swords", 60, Rarity.COMMON, mage.cards.m.MindSwords.class)); cards.add(new SetCardInfo("Mogg Alarm", 93, Rarity.UNCOMMON, mage.cards.m.MoggAlarm.class)); cards.add(new SetCardInfo("Moggcatcher", 96, Rarity.RARE, mage.cards.m.Moggcatcher.class)); cards.add(new SetCardInfo("Mogg Salvage", 94, Rarity.UNCOMMON, mage.cards.m.MoggSalvage.class)); cards.add(new SetCardInfo("Murderous Betrayal", 61, Rarity.RARE, mage.cards.m.MurderousBetrayal.class)); + cards.add(new SetCardInfo("Nesting Wurm", 107, Rarity.UNCOMMON, mage.cards.n.NestingWurm.class)); cards.add(new SetCardInfo("Netter en-Dal", 13, Rarity.COMMON, mage.cards.n.NetterEnDal.class)); cards.add(new SetCardInfo("Noble Stand", 14, Rarity.UNCOMMON, mage.cards.n.NobleStand.class)); cards.add(new SetCardInfo("Off Balance", 15, Rarity.COMMON, mage.cards.o.OffBalance.class)); @@ -112,6 +118,7 @@ public class Nemesis extends ExpansionSet { cards.add(new SetCardInfo("Oraxid", 35, Rarity.COMMON, mage.cards.o.Oraxid.class)); cards.add(new SetCardInfo("Overlaid Terrain", 108, Rarity.RARE, mage.cards.o.OverlaidTerrain.class)); cards.add(new SetCardInfo("Pack Hunt", 109, Rarity.RARE, mage.cards.p.PackHunt.class)); + cards.add(new SetCardInfo("Pale Moon", 36, Rarity.RARE, mage.cards.p.PaleMoon.class)); cards.add(new SetCardInfo("Parallax Dementia", 62, Rarity.COMMON, mage.cards.p.ParallaxDementia.class)); cards.add(new SetCardInfo("Parallax Inhibitor", 134, Rarity.RARE, mage.cards.p.ParallaxInhibitor.class)); cards.add(new SetCardInfo("Parallax Nexus", 63, Rarity.RARE, mage.cards.p.ParallaxNexus.class)); @@ -121,6 +128,7 @@ public class Nemesis extends ExpansionSet { cards.add(new SetCardInfo("Phyrexian Prowler", 65, Rarity.UNCOMMON, mage.cards.p.PhyrexianProwler.class)); cards.add(new SetCardInfo("Plague Witch", 66, Rarity.COMMON, mage.cards.p.PlagueWitch.class)); cards.add(new SetCardInfo("Predator, Flagship", 135, Rarity.RARE, mage.cards.p.PredatorFlagship.class)); + cards.add(new SetCardInfo("Rackling", 136, Rarity.UNCOMMON, mage.cards.r.Rackling.class)); cards.add(new SetCardInfo("Rathi Assassin", 67, Rarity.RARE, mage.cards.r.RathiAssassin.class)); cards.add(new SetCardInfo("Rathi Fiend", 68, Rarity.UNCOMMON, mage.cards.r.RathiFiend.class)); cards.add(new SetCardInfo("Rathi Intimidator", 69, Rarity.COMMON, mage.cards.r.RathiIntimidator.class)); @@ -150,9 +158,14 @@ public class Nemesis extends ExpansionSet { cards.add(new SetCardInfo("Skyshroud Cutter", 118, Rarity.COMMON, mage.cards.s.SkyshroudCutter.class)); cards.add(new SetCardInfo("Skyshroud Poacher", 119, Rarity.RARE, mage.cards.s.SkyshroudPoacher.class)); cards.add(new SetCardInfo("Skyshroud Ridgeback", 120, Rarity.COMMON, mage.cards.s.SkyshroudRidgeback.class)); + cards.add(new SetCardInfo("Skyshroud Sentinel", 121, Rarity.COMMON, mage.cards.s.SkyshroudSentinel.class)); + cards.add(new SetCardInfo("Sliptide Serpent", 43, Rarity.RARE, mage.cards.s.SliptideSerpent.class)); cards.add(new SetCardInfo("Sneaky Homunculus", 44, Rarity.COMMON, mage.cards.s.SneakyHomunculus.class)); cards.add(new SetCardInfo("Spineless Thug", 71, Rarity.COMMON, mage.cards.s.SpinelessThug.class)); + cards.add(new SetCardInfo("Spiritual Asylum", 23, Rarity.RARE, mage.cards.s.SpiritualAsylum.class)); + cards.add(new SetCardInfo("Spiteful Bully", 72, Rarity.COMMON, mage.cards.s.SpitefulBully.class)); cards.add(new SetCardInfo("Stampede Driver", 122, Rarity.UNCOMMON, mage.cards.s.StampedeDriver.class)); + cards.add(new SetCardInfo("Stronghold Biologist", 45, Rarity.UNCOMMON, mage.cards.s.StrongholdBiologist.class)); cards.add(new SetCardInfo("Stronghold Discipline", 73, Rarity.COMMON, mage.cards.s.StrongholdDiscipline.class)); cards.add(new SetCardInfo("Stronghold Gambit", 100, Rarity.RARE, mage.cards.s.StrongholdGambit.class)); cards.add(new SetCardInfo("Stronghold Machinist", 46, Rarity.UNCOMMON, mage.cards.s.StrongholdMachinist.class)); diff --git a/Mage.Sets/src/mage/sets/NewPhyrexia.java b/Mage.Sets/src/mage/sets/NewPhyrexia.java index a7d8c06cc5..10af6d4c5b 100644 --- a/Mage.Sets/src/mage/sets/NewPhyrexia.java +++ b/Mage.Sets/src/mage/sets/NewPhyrexia.java @@ -5,6 +5,7 @@ import mage.constants.Rarity; import mage.constants.SetType; public class NewPhyrexia extends ExpansionSet { + private static final NewPhyrexia instance = new NewPhyrexia(); public static NewPhyrexia getInstance() { diff --git a/Mage.Sets/src/mage/sets/NinthEdition.java b/Mage.Sets/src/mage/sets/NinthEdition.java index 8d40115a2f..b8415c89c0 100644 --- a/Mage.Sets/src/mage/sets/NinthEdition.java +++ b/Mage.Sets/src/mage/sets/NinthEdition.java @@ -372,4 +372,4 @@ public class NinthEdition extends ExpansionSet { cards.add(new SetCardInfo("Zur's Weirding", 114, Rarity.RARE, mage.cards.z.ZursWeirding.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/Odyssey.java b/Mage.Sets/src/mage/sets/Odyssey.java index 95185534b3..046a90917c 100644 --- a/Mage.Sets/src/mage/sets/Odyssey.java +++ b/Mage.Sets/src/mage/sets/Odyssey.java @@ -36,6 +36,7 @@ import mage.constants.SetType; * @author North */ public class Odyssey extends ExpansionSet { + private static final Odyssey instance = new Odyssey(); public static Odyssey getInstance() { @@ -120,6 +121,7 @@ public class Odyssey extends ExpansionSet { cards.add(new SetCardInfo("Crashing Centaur", 235, Rarity.UNCOMMON, mage.cards.c.CrashingCentaur.class)); cards.add(new SetCardInfo("Crypt Creeper", 125, Rarity.COMMON, mage.cards.c.CryptCreeper.class)); cards.add(new SetCardInfo("Crystal Quarry", 318, Rarity.RARE, mage.cards.c.CrystalQuarry.class)); + cards.add(new SetCardInfo("Cultural Exchange", 79, Rarity.RARE, mage.cards.c.CulturalExchange.class)); cards.add(new SetCardInfo("Cursed Monstrosity", 126, Rarity.RARE, mage.cards.c.CursedMonstrosity.class)); cards.add(new SetCardInfo("Darkwater Catacombs", 319, Rarity.RARE, mage.cards.d.DarkwaterCatacombs.class)); cards.add(new SetCardInfo("Darkwater Egg", 299, Rarity.UNCOMMON, mage.cards.d.DarkwaterEgg.class)); @@ -152,9 +154,10 @@ public class Odyssey extends ExpansionSet { cards.add(new SetCardInfo("Earth Rift", 189, Rarity.COMMON, mage.cards.e.EarthRift.class)); cards.add(new SetCardInfo("Elephant Ambush", 240, Rarity.COMMON, mage.cards.e.ElephantAmbush.class)); cards.add(new SetCardInfo("Ember Beast", 190, Rarity.COMMON, mage.cards.e.EmberBeast.class)); + cards.add(new SetCardInfo("Embolden", 22, Rarity.COMMON, mage.cards.e.Embolden.class)); cards.add(new SetCardInfo("Engulfing Flames", 191, Rarity.UNCOMMON, mage.cards.e.EngulfingFlames.class)); cards.add(new SetCardInfo("Entomb", 132, Rarity.RARE, mage.cards.e.Entomb.class)); - cards.add(new SetCardInfo("Epicenter", 192, Rarity.RARE, mage.cards.e.Epicenter.class)); + cards.add(new SetCardInfo("Epicenter", 192, Rarity.RARE, mage.cards.e.Epicenter.class)); cards.add(new SetCardInfo("Escape Artist", 84, Rarity.COMMON, mage.cards.e.EscapeArtist.class)); cards.add(new SetCardInfo("Execute", 133, Rarity.UNCOMMON, mage.cards.e.Execute.class)); cards.add(new SetCardInfo("Extract", 85, Rarity.RARE, mage.cards.e.Extract.class)); @@ -191,6 +194,7 @@ public class Odyssey extends ExpansionSet { cards.add(new SetCardInfo("Island", 337, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Island", 338, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Ivy Elemental", 245, Rarity.RARE, mage.cards.i.IvyElemental.class)); + cards.add(new SetCardInfo("Junk Golem", 300, Rarity.RARE, mage.cards.j.JunkGolem.class)); cards.add(new SetCardInfo("Kamahl, Pit Fighter", 198, Rarity.RARE, mage.cards.k.KamahlPitFighter.class)); cards.add(new SetCardInfo("Kamahl's Desire", 199, Rarity.COMMON, mage.cards.k.KamahlsDesire.class)); cards.add(new SetCardInfo("Karmic Justice", 26, Rarity.RARE, mage.cards.k.KarmicJustice.class)); @@ -204,6 +208,7 @@ public class Odyssey extends ExpansionSet { cards.add(new SetCardInfo("Leaf Dancer", 249, Rarity.COMMON, mage.cards.l.LeafDancer.class)); cards.add(new SetCardInfo("Lieutenant Kirtar", 29, Rarity.RARE, mage.cards.l.LieutenantKirtar.class)); cards.add(new SetCardInfo("Life Burst", 30, Rarity.COMMON, mage.cards.l.LifeBurst.class)); + cards.add(new SetCardInfo("Limestone Golem", 301, Rarity.UNCOMMON, mage.cards.l.LimestoneGolem.class)); cards.add(new SetCardInfo("Liquid Fire", 201, Rarity.UNCOMMON, mage.cards.l.LiquidFire.class)); cards.add(new SetCardInfo("Lithatog", 289, Rarity.UNCOMMON, mage.cards.l.Lithatog.class)); cards.add(new SetCardInfo("Luminous Guardian", 31, Rarity.UNCOMMON, mage.cards.l.LuminousGuardian.class)); @@ -214,6 +219,7 @@ public class Odyssey extends ExpansionSet { cards.add(new SetCardInfo("Metamorphic Wurm", 250, Rarity.UNCOMMON, mage.cards.m.MetamorphicWurm.class)); cards.add(new SetCardInfo("Millikin", 302, Rarity.UNCOMMON, mage.cards.m.Millikin.class)); cards.add(new SetCardInfo("Mindslicer", 149, Rarity.RARE, mage.cards.m.Mindslicer.class)); + cards.add(new SetCardInfo("Mine Layer", 205, Rarity.RARE, mage.cards.m.MineLayer.class)); cards.add(new SetCardInfo("Minotaur Explorer", 206, Rarity.UNCOMMON, mage.cards.m.MinotaurExplorer.class)); cards.add(new SetCardInfo("Mirari", 303, Rarity.RARE, mage.cards.m.Mirari.class)); cards.add(new SetCardInfo("Molten Influence", 207, Rarity.RARE, mage.cards.m.MoltenInfluence.class)); @@ -245,6 +251,7 @@ public class Odyssey extends ExpansionSet { cards.add(new SetCardInfo("Nomad Stadium", 322, Rarity.UNCOMMON, mage.cards.n.NomadStadium.class)); cards.add(new SetCardInfo("Nut Collector", 259, Rarity.RARE, mage.cards.n.NutCollector.class)); cards.add(new SetCardInfo("Obstinate Familiar", 210, Rarity.RARE, mage.cards.o.ObstinateFamiliar.class)); + cards.add(new SetCardInfo("Otarian Juggernaut", 305, Rarity.RARE, mage.cards.o.OtarianJuggernaut.class)); cards.add(new SetCardInfo("Overeager Apprentice", 154, Rarity.COMMON, mage.cards.o.OvereagerApprentice.class)); cards.add(new SetCardInfo("Overrun", 260, Rarity.UNCOMMON, mage.cards.o.Overrun.class)); cards.add(new SetCardInfo("Pardic Firecat", 211, Rarity.COMMON, mage.cards.p.PardicFirecat.class)); @@ -291,6 +298,7 @@ public class Odyssey extends ExpansionSet { cards.add(new SetCardInfo("Sandstone Deadfall", 307, Rarity.UNCOMMON, mage.cards.s.SandstoneDeadfall.class)); cards.add(new SetCardInfo("Sarcatog", 293, Rarity.UNCOMMON, mage.cards.s.Sarcatog.class)); cards.add(new SetCardInfo("Savage Firecat", 218, Rarity.RARE, mage.cards.s.SavageFirecat.class)); + cards.add(new SetCardInfo("Scorching Missile", 219, Rarity.COMMON, mage.cards.s.ScorchingMissile.class)); cards.add(new SetCardInfo("Screams of the Damned", 160, Rarity.UNCOMMON, mage.cards.s.ScreamsOfTheDamned.class)); cards.add(new SetCardInfo("Scrivener", 100, Rarity.COMMON, mage.cards.s.Scrivener.class)); cards.add(new SetCardInfo("Seafloor Debris", 325, Rarity.COMMON, mage.cards.s.SeafloorDebris.class)); @@ -302,6 +310,7 @@ public class Odyssey extends ExpansionSet { cards.add(new SetCardInfo("Shadowblood Ridge", 326, Rarity.RARE, mage.cards.s.ShadowbloodRidge.class)); cards.add(new SetCardInfo("Shadowmage Infiltrator", 294, Rarity.RARE, mage.cards.s.ShadowmageInfiltrator.class)); cards.add(new SetCardInfo("Shelter", 46, Rarity.COMMON, mage.cards.s.Shelter.class)); + cards.add(new SetCardInfo("Shifty Doppelganger", 101, Rarity.RARE, mage.cards.s.ShiftyDoppelganger.class)); cards.add(new SetCardInfo("Shower of Coals", 221, Rarity.UNCOMMON, mage.cards.s.ShowerOfCoals.class)); cards.add(new SetCardInfo("Simplify", 269, Rarity.COMMON, mage.cards.s.Simplify.class)); cards.add(new SetCardInfo("Skeletal Scrying", 161, Rarity.UNCOMMON, mage.cards.s.SkeletalScrying.class)); @@ -312,12 +321,18 @@ public class Odyssey extends ExpansionSet { cards.add(new SetCardInfo("Soulcatcher", 47, Rarity.UNCOMMON, mage.cards.s.Soulcatcher.class)); cards.add(new SetCardInfo("Spark Mage", 222, Rarity.UNCOMMON, mage.cards.s.SparkMage.class)); cards.add(new SetCardInfo("Spellbane Centaur", 271, Rarity.RARE, mage.cards.s.SpellbaneCentaur.class)); + cards.add(new SetCardInfo("Sphere of Duty", 48, Rarity.UNCOMMON, mage.cards.s.SphereOfDuty.class)); + cards.add(new SetCardInfo("Sphere of Grace", 49, Rarity.UNCOMMON, mage.cards.s.SphereOfGrace.class)); + cards.add(new SetCardInfo("Sphere of Law", 50, Rarity.UNCOMMON, mage.cards.s.SphereOfLaw.class)); + cards.add(new SetCardInfo("Sphere of Reason", 51, Rarity.UNCOMMON, mage.cards.s.SphereOfReason.class)); + cards.add(new SetCardInfo("Sphere of Truth", 52, Rarity.UNCOMMON, mage.cards.s.SphereOfTruth.class)); cards.add(new SetCardInfo("Spiritualize", 53, Rarity.UNCOMMON, mage.cards.s.Spiritualize.class)); cards.add(new SetCardInfo("Springing Tiger", 272, Rarity.COMMON, mage.cards.s.SpringingTiger.class)); cards.add(new SetCardInfo("Squirrel Mob", 273, Rarity.RARE, mage.cards.s.SquirrelMob.class)); cards.add(new SetCardInfo("Squirrel Nest", 274, Rarity.UNCOMMON, mage.cards.s.SquirrelNest.class)); cards.add(new SetCardInfo("Stalking Bloodsucker", 163, Rarity.RARE, mage.cards.s.StalkingBloodsucker.class)); cards.add(new SetCardInfo("Standstill", 102, Rarity.UNCOMMON, mage.cards.s.Standstill.class)); + cards.add(new SetCardInfo("Steamclaw", 310, Rarity.UNCOMMON, mage.cards.s.Steamclaw.class)); cards.add(new SetCardInfo("Still Life", 275, Rarity.UNCOMMON, mage.cards.s.StillLife.class)); cards.add(new SetCardInfo("Stone-Tongue Basilisk", 276, Rarity.RARE, mage.cards.s.StoneTongueBasilisk.class)); cards.add(new SetCardInfo("Sungrass Egg", 311, Rarity.UNCOMMON, mage.cards.s.SungrassEgg.class)); @@ -346,6 +361,7 @@ public class Odyssey extends ExpansionSet { cards.add(new SetCardInfo("Traumatize", 110, Rarity.RARE, mage.cards.t.Traumatize.class)); cards.add(new SetCardInfo("Treetop Sentinel", 111, Rarity.UNCOMMON, mage.cards.t.TreetopSentinel.class)); cards.add(new SetCardInfo("Tremble", 225, Rarity.COMMON, mage.cards.t.Tremble.class)); + cards.add(new SetCardInfo("Twigwalker", 279, Rarity.UNCOMMON, mage.cards.t.Twigwalker.class)); cards.add(new SetCardInfo("Unifying Theory", 112, Rarity.RARE, mage.cards.u.UnifyingTheory.class)); cards.add(new SetCardInfo("Upheaval", 113, Rarity.RARE, mage.cards.u.Upheaval.class)); cards.add(new SetCardInfo("Vampiric Dragon", 296, Rarity.RARE, mage.cards.v.VampiricDragon.class)); diff --git a/Mage.Sets/src/mage/sets/Onslaught.java b/Mage.Sets/src/mage/sets/Onslaught.java index 493fbb2b48..ae21f921fc 100644 --- a/Mage.Sets/src/mage/sets/Onslaught.java +++ b/Mage.Sets/src/mage/sets/Onslaught.java @@ -7,6 +7,7 @@ import mage.constants.Rarity; import mage.constants.SetType; public class Onslaught extends ExpansionSet { + private static final Onslaught instance = new Onslaught(); public static Onslaught getInstance() { @@ -36,7 +37,7 @@ public class Onslaught extends ExpansionSet { cards.add(new SetCardInfo("Aphetto Alchemist", 64, Rarity.UNCOMMON, mage.cards.a.AphettoAlchemist.class)); cards.add(new SetCardInfo("Aphetto Dredging", 125, Rarity.COMMON, mage.cards.a.AphettoDredging.class)); cards.add(new SetCardInfo("Aphetto Grifter", 65, Rarity.UNCOMMON, mage.cards.a.AphettoGrifter.class)); - cards.add(new SetCardInfo("Aphetto Vulture", 126, Rarity.UNCOMMON, mage.cards.a.AphettoVulture.class)); + cards.add(new SetCardInfo("Aphetto Vulture", 126, Rarity.UNCOMMON, mage.cards.a.AphettoVulture.class)); cards.add(new SetCardInfo("Arcanis the Omnipotent", 66, Rarity.RARE, mage.cards.a.ArcanisTheOmnipotent.class)); cards.add(new SetCardInfo("Ascending Aven", 68, Rarity.COMMON, mage.cards.a.AscendingAven.class)); cards.add(new SetCardInfo("Astral Slide", 4, Rarity.UNCOMMON, mage.cards.a.AstralSlide.class)); @@ -46,6 +47,7 @@ public class Onslaught extends ExpansionSet { cards.add(new SetCardInfo("Aven Brigadier", 7, Rarity.RARE, mage.cards.a.AvenBrigadier.class)); cards.add(new SetCardInfo("Aven Fateshaper", 69, Rarity.UNCOMMON, mage.cards.a.AvenFateshaper.class)); cards.add(new SetCardInfo("Aven Soulgazer", 8, Rarity.UNCOMMON, mage.cards.a.AvenSoulgazer.class)); + cards.add(new SetCardInfo("Backslide", 70, Rarity.COMMON, mage.cards.b.Backslide.class)); cards.add(new SetCardInfo("Barkhide Mauler", 246, Rarity.COMMON, mage.cards.b.BarkhideMauler.class)); cards.add(new SetCardInfo("Barren Moor", 312, Rarity.COMMON, mage.cards.b.BarrenMoor.class)); cards.add(new SetCardInfo("Battering Craghorn", 188, Rarity.COMMON, mage.cards.b.BatteringCraghorn.class)); @@ -55,9 +57,9 @@ public class Onslaught extends ExpansionSet { cards.add(new SetCardInfo("Blatant Thievery", 71, Rarity.RARE, mage.cards.b.BlatantThievery.class)); cards.add(new SetCardInfo("Blistering Firecat", 189, Rarity.RARE, mage.cards.b.BlisteringFirecat.class)); cards.add(new SetCardInfo("Bloodline Shaman", 249, Rarity.UNCOMMON, mage.cards.b.BloodlineShaman.class)); - cards.add(new SetCardInfo("Bloodstained Mire", 313, Rarity.RARE, mage.cards.b.BloodstainedMire.class, new CardGraphicInfo(new ObjectColor("RB"), null,false))); + cards.add(new SetCardInfo("Bloodstained Mire", 313, Rarity.RARE, mage.cards.b.BloodstainedMire.class, new CardGraphicInfo(new ObjectColor("RB"), null, false))); cards.add(new SetCardInfo("Boneknitter", 128, Rarity.UNCOMMON, mage.cards.b.Boneknitter.class)); - cards.add(new SetCardInfo("Break Open", 190, Rarity.COMMON, mage.cards.b.BreakOpen.class)); + cards.add(new SetCardInfo("Break Open", 190, Rarity.COMMON, mage.cards.b.BreakOpen.class)); cards.add(new SetCardInfo("Brightstone Ritual", 191, Rarity.COMMON, mage.cards.b.BrightstoneRitual.class)); cards.add(new SetCardInfo("Broodhatch Nantuko", 250, Rarity.UNCOMMON, mage.cards.b.BroodhatchNantuko.class)); cards.add(new SetCardInfo("Cabal Archon", 129, Rarity.UNCOMMON, mage.cards.c.CabalArchon.class)); @@ -66,10 +68,10 @@ public class Onslaught extends ExpansionSet { cards.add(new SetCardInfo("Catapult Master", 10, Rarity.RARE, mage.cards.c.CatapultMaster.class)); cards.add(new SetCardInfo("Catapult Squad", 11, Rarity.UNCOMMON, mage.cards.c.CatapultSquad.class)); cards.add(new SetCardInfo("Centaur Glade", 251, Rarity.UNCOMMON, mage.cards.c.CentaurGlade.class)); - cards.add(new SetCardInfo("Chain of Acid", 252, Rarity.UNCOMMON, mage.cards.c.ChainOfAcid.class)); + cards.add(new SetCardInfo("Chain of Acid", 252, Rarity.UNCOMMON, mage.cards.c.ChainOfAcid.class)); cards.add(new SetCardInfo("Chain of Plasma", 193, Rarity.UNCOMMON, mage.cards.c.ChainOfPlasma.class)); - cards.add(new SetCardInfo("Chain of Silence", 12, Rarity.UNCOMMON, mage.cards.c.ChainOfSilence.class)); - cards.add(new SetCardInfo("Chain of Smog", 132, Rarity.UNCOMMON, mage.cards.c.ChainOfSmog.class)); + cards.add(new SetCardInfo("Chain of Silence", 12, Rarity.UNCOMMON, mage.cards.c.ChainOfSilence.class)); + cards.add(new SetCardInfo("Chain of Smog", 132, Rarity.UNCOMMON, mage.cards.c.ChainOfSmog.class)); cards.add(new SetCardInfo("Chain of Vapor", 73, Rarity.UNCOMMON, mage.cards.c.ChainOfVapor.class)); cards.add(new SetCardInfo("Charging Slateback", 194, Rarity.COMMON, mage.cards.c.ChargingSlateback.class)); cards.add(new SetCardInfo("Choking Tethers", 74, Rarity.COMMON, mage.cards.c.ChokingTethers.class)); @@ -83,12 +85,12 @@ public class Onslaught extends ExpansionSet { cards.add(new SetCardInfo("Crude Rampart", 17, Rarity.UNCOMMON, mage.cards.c.CrudeRampart.class)); cards.add(new SetCardInfo("Cruel Revival", 135, Rarity.COMMON, mage.cards.c.CruelRevival.class)); cards.add(new SetCardInfo("Cryptic Gateway", 306, Rarity.RARE, mage.cards.c.CrypticGateway.class)); - cards.add(new SetCardInfo("Custody Battle", 197, Rarity.UNCOMMON, mage.cards.c.CustodyBattle.class)); + cards.add(new SetCardInfo("Custody Battle", 197, Rarity.UNCOMMON, mage.cards.c.CustodyBattle.class)); cards.add(new SetCardInfo("Daru Cavalier", 18, Rarity.COMMON, mage.cards.d.DaruCavalier.class)); cards.add(new SetCardInfo("Daru Encampment", 315, Rarity.UNCOMMON, mage.cards.d.DaruEncampment.class)); - cards.add(new SetCardInfo("Daru Healer", 19, Rarity.COMMON, mage.cards.d.DaruHealer.class)); + cards.add(new SetCardInfo("Daru Healer", 19, Rarity.COMMON, mage.cards.d.DaruHealer.class)); cards.add(new SetCardInfo("Daru Lancer", 20, Rarity.COMMON, mage.cards.d.DaruLancer.class)); - cards.add(new SetCardInfo("Daunting Defender", 21, Rarity.COMMON, mage.cards.d.DauntingDefender.class)); + cards.add(new SetCardInfo("Daunting Defender", 21, Rarity.COMMON, mage.cards.d.DauntingDefender.class)); cards.add(new SetCardInfo("Dawning Purist", 22, Rarity.UNCOMMON, mage.cards.d.DawningPurist.class)); cards.add(new SetCardInfo("Death Match", 136, Rarity.RARE, mage.cards.d.DeathMatch.class)); cards.add(new SetCardInfo("Death Pulse", 137, Rarity.UNCOMMON, mage.cards.d.DeathPulse.class)); @@ -127,6 +129,7 @@ public class Onslaught extends ExpansionSet { cards.add(new SetCardInfo("Festering Goblin", 148, Rarity.COMMON, mage.cards.f.FesteringGoblin.class)); cards.add(new SetCardInfo("Fever Charm", 202, Rarity.COMMON, mage.cards.f.FeverCharm.class)); cards.add(new SetCardInfo("Flamestick Courier", 203, Rarity.UNCOMMON, mage.cards.f.FlamestickCourier.class)); + cards.add(new SetCardInfo("Fleeting Aven", 83, Rarity.UNCOMMON, mage.cards.f.FleetingAven.class)); cards.add(new SetCardInfo("Flooded Strand", 316, Rarity.RARE, mage.cards.f.FloodedStrand.class, new CardGraphicInfo(new ObjectColor("UW"), null, false))); cards.add(new SetCardInfo("Foothill Guide", 29, Rarity.COMMON, mage.cards.f.FoothillGuide.class)); cards.add(new SetCardInfo("Forest", 347, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); @@ -194,7 +197,13 @@ public class Onslaught extends ExpansionSet { cards.add(new SetCardInfo("Mana Echoes", 218, Rarity.RARE, mage.cards.m.ManaEchoes.class)); cards.add(new SetCardInfo("Menacing Ogre", 219, Rarity.RARE, mage.cards.m.MenacingOgre.class)); cards.add(new SetCardInfo("Misery Charm", 158, Rarity.COMMON, mage.cards.m.MiseryCharm.class)); + cards.add(new SetCardInfo("Mistform Dreamer", 93, Rarity.COMMON, mage.cards.m.MistformDreamer.class)); + cards.add(new SetCardInfo("Mistform Mask", 94, Rarity.COMMON, mage.cards.m.MistformMask.class)); cards.add(new SetCardInfo("Mistform Mutant", 95, Rarity.UNCOMMON, mage.cards.m.MistformMutant.class)); + cards.add(new SetCardInfo("Mistform Shrieker", 96, Rarity.UNCOMMON, mage.cards.m.MistformShrieker.class)); + cards.add(new SetCardInfo("Mistform Skyreaver", 97, Rarity.RARE, mage.cards.m.MistformSkyreaver.class)); + cards.add(new SetCardInfo("Mistform Stalker", 98, Rarity.UNCOMMON, mage.cards.m.MistformStalker.class)); + cards.add(new SetCardInfo("Mistform Wall", 99, Rarity.COMMON, mage.cards.m.MistformWall.class)); cards.add(new SetCardInfo("Mobilization", 44, Rarity.RARE, mage.cards.m.Mobilization.class)); cards.add(new SetCardInfo("Mountain", 343, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mountain", 344, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); @@ -223,7 +232,7 @@ public class Onslaught extends ExpansionSet { cards.add(new SetCardInfo("Primal Boost", 277, Rarity.UNCOMMON, mage.cards.p.PrimalBoost.class)); cards.add(new SetCardInfo("Profane Prayers", 162, Rarity.COMMON, mage.cards.p.ProfanePrayers.class)); cards.add(new SetCardInfo("Prowling Pangolin", 163, Rarity.UNCOMMON, mage.cards.p.ProwlingPangolin.class)); - cards.add(new SetCardInfo("Psychic Trance", 102, Rarity.RARE, mage.cards.p.PsychicTrance.class)); + cards.add(new SetCardInfo("Psychic Trance", 102, Rarity.RARE, mage.cards.p.PsychicTrance.class)); cards.add(new SetCardInfo("Quicksilver Dragon", 103, Rarity.RARE, mage.cards.q.QuicksilverDragon.class)); cards.add(new SetCardInfo("Ravenous Baloth", 278, Rarity.RARE, mage.cards.r.RavenousBaloth.class)); cards.add(new SetCardInfo("Read the Runes", 104, Rarity.RARE, mage.cards.r.ReadTheRunes.class)); @@ -233,7 +242,7 @@ public class Onslaught extends ExpansionSet { cards.add(new SetCardInfo("Righteous Cause", 51, Rarity.UNCOMMON, mage.cards.r.RighteousCause.class)); cards.add(new SetCardInfo("Riptide Biologist", 106, Rarity.COMMON, mage.cards.r.RiptideBiologist.class)); cards.add(new SetCardInfo("Riptide Chronologist", 107, Rarity.UNCOMMON, mage.cards.r.RiptideChronologist.class)); - cards.add(new SetCardInfo("Riptide Entrancer", 108, Rarity.RARE, mage.cards.r.RiptideEntrancer.class)); + cards.add(new SetCardInfo("Riptide Entrancer", 108, Rarity.RARE, mage.cards.r.RiptideEntrancer.class)); cards.add(new SetCardInfo("Riptide Laboratory", 322, Rarity.RARE, mage.cards.r.RiptideLaboratory.class)); cards.add(new SetCardInfo("Riptide Replicator", 309, Rarity.RARE, mage.cards.r.RiptideReplicator.class)); cards.add(new SetCardInfo("Riptide Shapeshifter", 109, Rarity.UNCOMMON, mage.cards.r.RiptideShapeshifter.class)); @@ -242,6 +251,7 @@ public class Onslaught extends ExpansionSet { cards.add(new SetCardInfo("Rummaging Wizard", 110, Rarity.UNCOMMON, mage.cards.r.RummagingWizard.class)); cards.add(new SetCardInfo("Run Wild", 279, Rarity.UNCOMMON, mage.cards.r.RunWild.class)); cards.add(new SetCardInfo("Sage Aven", 111, Rarity.COMMON, mage.cards.s.SageAven.class)); + cards.add(new SetCardInfo("Sandskin", 52, Rarity.COMMON, mage.cards.s.Sandskin.class)); cards.add(new SetCardInfo("Screaming Seahawk", 112, Rarity.COMMON, mage.cards.s.ScreamingSeahawk.class)); cards.add(new SetCardInfo("Screeching Buzzard", 165, Rarity.COMMON, mage.cards.s.ScreechingBuzzard.class)); cards.add(new SetCardInfo("Searing Flesh", 225, Rarity.UNCOMMON, mage.cards.s.SearingFlesh.class)); @@ -254,6 +264,7 @@ public class Onslaught extends ExpansionSet { cards.add(new SetCardInfo("Shared Triumph", 53, Rarity.RARE, mage.cards.s.SharedTriumph.class)); cards.add(new SetCardInfo("Shepherd of Rot", 168, Rarity.COMMON, mage.cards.s.ShepherdOfRot.class)); cards.add(new SetCardInfo("Shock", 227, Rarity.COMMON, mage.cards.s.Shock.class)); + cards.add(new SetCardInfo("Sigil of the New Dawn", 55, Rarity.RARE, mage.cards.s.SigilOfTheNewDawn.class)); cards.add(new SetCardInfo("Silent Specter", 169, Rarity.RARE, mage.cards.s.SilentSpecter.class)); cards.add(new SetCardInfo("Silklash Spider", 281, Rarity.RARE, mage.cards.s.SilklashSpider.class)); cards.add(new SetCardInfo("Silvos, Rogue Elemental", 282, Rarity.RARE, mage.cards.s.SilvosRogueElemental.class)); @@ -269,6 +280,7 @@ public class Onslaught extends ExpansionSet { cards.add(new SetCardInfo("Soulless One", 171, Rarity.UNCOMMON, mage.cards.s.SoullessOne.class)); cards.add(new SetCardInfo("Sparksmith", 235, Rarity.COMMON, mage.cards.s.Sparksmith.class)); cards.add(new SetCardInfo("Spined Basher", 172, Rarity.COMMON, mage.cards.s.SpinedBasher.class)); + cards.add(new SetCardInfo("Spitfire Handler", 236, Rarity.UNCOMMON, mage.cards.s.SpitfireHandler.class)); cards.add(new SetCardInfo("Spitting Gourna", 284, Rarity.COMMON, mage.cards.s.SpittingGourna.class)); cards.add(new SetCardInfo("Spurred Wolverine", 237, Rarity.COMMON, mage.cards.s.SpurredWolverine.class)); cards.add(new SetCardInfo("Stag Beetle", 285, Rarity.RARE, mage.cards.s.StagBeetle.class)); @@ -276,6 +288,7 @@ public class Onslaught extends ExpansionSet { cards.add(new SetCardInfo("Starlit Sanctum", 325, Rarity.UNCOMMON, mage.cards.s.StarlitSanctum.class)); cards.add(new SetCardInfo("Starstorm", 238, Rarity.RARE, mage.cards.s.Starstorm.class)); cards.add(new SetCardInfo("Steely Resolve", 286, Rarity.RARE, mage.cards.s.SteelyResolve.class)); + cards.add(new SetCardInfo("Strongarm Tactics", 173, Rarity.RARE, mage.cards.s.StrongarmTactics.class)); cards.add(new SetCardInfo("Sunfire Balm", 56, Rarity.UNCOMMON, mage.cards.s.SunfireBalm.class)); cards.add(new SetCardInfo("Supreme Inquisitor", 117, Rarity.RARE, mage.cards.s.SupremeInquisitor.class)); cards.add(new SetCardInfo("Swamp", 339, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); @@ -291,6 +304,7 @@ public class Onslaught extends ExpansionSet { cards.add(new SetCardInfo("Taunting Elf", 290, Rarity.COMMON, mage.cards.t.TauntingElf.class)); cards.add(new SetCardInfo("Tempting Wurm", 291, Rarity.RARE, mage.cards.t.TemptingWurm.class)); cards.add(new SetCardInfo("Tephraderm", 239, Rarity.RARE, mage.cards.t.Tephraderm.class)); + cards.add(new SetCardInfo("Thrashing Mudspawn", 177, Rarity.UNCOMMON, mage.cards.t.ThrashingMudspawn.class)); cards.add(new SetCardInfo("Threaten", 241, Rarity.UNCOMMON, mage.cards.t.Threaten.class)); cards.add(new SetCardInfo("Thunder of Hooves", 242, Rarity.UNCOMMON, mage.cards.t.ThunderOfHooves.class)); cards.add(new SetCardInfo("Towering Baloth", 292, Rarity.UNCOMMON, mage.cards.t.ToweringBaloth.class)); @@ -302,6 +316,7 @@ public class Onslaught extends ExpansionSet { cards.add(new SetCardInfo("True Believer", 57, Rarity.RARE, mage.cards.t.TrueBeliever.class)); cards.add(new SetCardInfo("Undead Gladiator", 178, Rarity.RARE, mage.cards.u.UndeadGladiator.class)); cards.add(new SetCardInfo("Unholy Grotto", 327, Rarity.RARE, mage.cards.u.UnholyGrotto.class)); + cards.add(new SetCardInfo("Unified Strike", 58, Rarity.COMMON, mage.cards.u.UnifiedStrike.class)); cards.add(new SetCardInfo("Venomspout Brackus", 295, Rarity.UNCOMMON, mage.cards.v.VenomspoutBrackus.class)); cards.add(new SetCardInfo("Visara the Dreadful", 179, Rarity.RARE, mage.cards.v.VisaraTheDreadful.class)); cards.add(new SetCardInfo("Vitality Charm", 296, Rarity.COMMON, mage.cards.v.VitalityCharm.class)); @@ -321,6 +336,7 @@ public class Onslaught extends ExpansionSet { cards.add(new SetCardInfo("Wirewood Lodge", 329, Rarity.RARE, mage.cards.w.WirewoodLodge.class)); cards.add(new SetCardInfo("Wirewood Pride", 303, Rarity.COMMON, mage.cards.w.WirewoodPride.class)); cards.add(new SetCardInfo("Wirewood Savage", 304, Rarity.COMMON, mage.cards.w.WirewoodSavage.class)); + cards.add(new SetCardInfo("Withering Hex", 181, Rarity.UNCOMMON, mage.cards.w.WitheringHex.class)); cards.add(new SetCardInfo("Wooded Foothills", 330, Rarity.RARE, mage.cards.w.WoodedFoothills.class, new CardGraphicInfo(new ObjectColor("RG"), null, false))); cards.add(new SetCardInfo("Words of War", 244, Rarity.RARE, mage.cards.w.WordsOfWar.class)); cards.add(new SetCardInfo("Words of Waste", 182, Rarity.RARE, mage.cards.w.WordsOfWaste.class)); diff --git a/Mage.Sets/src/mage/sets/PDSGraveborn.java b/Mage.Sets/src/mage/sets/PDSGraveborn.java index 93b3c1da6f..91192951d8 100644 --- a/Mage.Sets/src/mage/sets/PDSGraveborn.java +++ b/Mage.Sets/src/mage/sets/PDSGraveborn.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -37,6 +36,7 @@ import mage.constants.SetType; * @author fireshoes */ public class PDSGraveborn extends ExpansionSet { + private static final PDSGraveborn instance = new PDSGraveborn(); public static PDSGraveborn getInstance() { @@ -76,4 +76,4 @@ public class PDSGraveborn extends ExpansionSet { cards.add(new SetCardInfo("Verdant Force", 8, Rarity.RARE, mage.cards.v.VerdantForce.class)); cards.add(new SetCardInfo("Zombie Infestation", 19, Rarity.UNCOMMON, mage.cards.z.ZombieInfestation.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/PDSSlivers.java b/Mage.Sets/src/mage/sets/PDSSlivers.java index 091a396478..ac9c361d38 100644 --- a/Mage.Sets/src/mage/sets/PDSSlivers.java +++ b/Mage.Sets/src/mage/sets/PDSSlivers.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -37,6 +36,7 @@ import mage.constants.SetType; * @author fireshoes */ public class PDSSlivers extends ExpansionSet { + private static final PDSSlivers instance = new PDSSlivers(); public static PDSSlivers getInstance() { @@ -88,4 +88,4 @@ public class PDSSlivers extends ExpansionSet { cards.add(new SetCardInfo("Wild Pair", 30, Rarity.RARE, mage.cards.w.WildPair.class)); cards.add(new SetCardInfo("Winged Sliver", 4, Rarity.COMMON, mage.cards.w.WingedSliver.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/PlanarChaos.java b/Mage.Sets/src/mage/sets/PlanarChaos.java index 8c99068372..d68966c157 100644 --- a/Mage.Sets/src/mage/sets/PlanarChaos.java +++ b/Mage.Sets/src/mage/sets/PlanarChaos.java @@ -123,6 +123,7 @@ public class PlanarChaos extends ExpansionSet { cards.add(new SetCardInfo("Kavu Predator", 132, Rarity.UNCOMMON, mage.cards.k.KavuPredator.class)); cards.add(new SetCardInfo("Keen Sense", 152, Rarity.UNCOMMON, mage.cards.k.KeenSense.class)); cards.add(new SetCardInfo("Keldon Marauders", 102, Rarity.COMMON, mage.cards.k.KeldonMarauders.class)); + cards.add(new SetCardInfo("Kor Dirge", 87, Rarity.UNCOMMON, mage.cards.k.KorDirge.class)); cards.add(new SetCardInfo("Lavacore Elemental", 103, Rarity.UNCOMMON, mage.cards.l.LavacoreElemental.class)); cards.add(new SetCardInfo("Life and Limb", 133, Rarity.RARE, mage.cards.l.LifeAndLimb.class)); cards.add(new SetCardInfo("Magus of the Arena", 104, Rarity.RARE, mage.cards.m.MagusOfTheArena.class)); @@ -132,12 +133,14 @@ public class PlanarChaos extends ExpansionSet { cards.add(new SetCardInfo("Magus of the Tabernacle", 8, Rarity.RARE, mage.cards.m.MagusOfTheTabernacle.class)); cards.add(new SetCardInfo("Malach of the Dawn", 24, Rarity.UNCOMMON, mage.cards.m.MalachOfTheDawn.class)); cards.add(new SetCardInfo("Mana Tithe", 25, Rarity.COMMON, mage.cards.m.ManaTithe.class)); + cards.add(new SetCardInfo("Mantle of Leadership", 9, Rarity.UNCOMMON, mage.cards.m.MantleOfLeadership.class)); cards.add(new SetCardInfo("Melancholy", 88, Rarity.COMMON, mage.cards.m.Melancholy.class)); cards.add(new SetCardInfo("Merfolk Thaumaturgist", 56, Rarity.COMMON, mage.cards.m.MerfolkThaumaturgist.class)); cards.add(new SetCardInfo("Mesa Enchantress", 26, Rarity.RARE, mage.cards.m.MesaEnchantress.class)); cards.add(new SetCardInfo("Midnight Charm", 74, Rarity.COMMON, mage.cards.m.MidnightCharm.class)); cards.add(new SetCardInfo("Mire Boa", 135, Rarity.COMMON, mage.cards.m.MireBoa.class)); cards.add(new SetCardInfo("Mirri the Cursed", 75, Rarity.RARE, mage.cards.m.MirriTheCursed.class)); + cards.add(new SetCardInfo("Muck Drubb", 76, Rarity.UNCOMMON, mage.cards.m.MuckDrubb.class)); cards.add(new SetCardInfo("Mycologist", 27, Rarity.UNCOMMON, mage.cards.m.Mycologist.class)); cards.add(new SetCardInfo("Necrotic Sliver", 159, Rarity.UNCOMMON, mage.cards.n.NecroticSliver.class)); cards.add(new SetCardInfo("Needlepeak Spider", 105, Rarity.COMMON, mage.cards.n.NeedlepeakSpider.class)); @@ -197,10 +200,12 @@ public class PlanarChaos extends ExpansionSet { cards.add(new SetCardInfo("Timbermare", 140, Rarity.RARE, mage.cards.t.Timbermare.class)); cards.add(new SetCardInfo("Timecrafting", 109, Rarity.UNCOMMON, mage.cards.t.Timecrafting.class)); cards.add(new SetCardInfo("Torchling", 110, Rarity.RARE, mage.cards.t.Torchling.class)); + cards.add(new SetCardInfo("Treacherous Urge", 82, Rarity.UNCOMMON, mage.cards.t.TreacherousUrge.class)); cards.add(new SetCardInfo("Uktabi Drake", 141, Rarity.COMMON, mage.cards.u.UktabiDrake.class)); cards.add(new SetCardInfo("Urborg, Tomb of Yawgmoth", 165, Rarity.RARE, mage.cards.u.UrborgTombOfYawgmoth.class)); cards.add(new SetCardInfo("Utopia Vow", 142, Rarity.COMMON, mage.cards.u.UtopiaVow.class)); cards.add(new SetCardInfo("Vampiric Link", 92, Rarity.COMMON, mage.cards.v.VampiricLink.class)); + cards.add(new SetCardInfo("Veiling Oddity", 51, Rarity.COMMON, mage.cards.v.VeilingOddity.class)); cards.add(new SetCardInfo("Venarian Glimmer", 52, Rarity.UNCOMMON, mage.cards.v.VenarianGlimmer.class)); cards.add(new SetCardInfo("Vitaspore Thallid", 143, Rarity.COMMON, mage.cards.v.VitasporeThallid.class)); cards.add(new SetCardInfo("Voidstone Gargoyle", 21, Rarity.RARE, mage.cards.v.VoidstoneGargoyle.class)); diff --git a/Mage.Sets/src/mage/sets/Planechase.java b/Mage.Sets/src/mage/sets/Planechase.java index 1596b66141..e59ada3153 100644 --- a/Mage.Sets/src/mage/sets/Planechase.java +++ b/Mage.Sets/src/mage/sets/Planechase.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; diff --git a/Mage.Sets/src/mage/sets/Planechase2012.java b/Mage.Sets/src/mage/sets/Planechase2012.java index 67f09835e3..d2fc87f364 100644 --- a/Mage.Sets/src/mage/sets/Planechase2012.java +++ b/Mage.Sets/src/mage/sets/Planechase2012.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -204,4 +203,4 @@ public class Planechase2012 extends ExpansionSet { cards.add(new SetCardInfo("Whispersilk Cloak", 115, Rarity.UNCOMMON, mage.cards.w.WhispersilkCloak.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/Planeshift.java b/Mage.Sets/src/mage/sets/Planeshift.java index 73998c3b7e..c44e08f37c 100644 --- a/Mage.Sets/src/mage/sets/Planeshift.java +++ b/Mage.Sets/src/mage/sets/Planeshift.java @@ -99,7 +99,8 @@ public class Planeshift extends ExpansionSet { cards.add(new SetCardInfo("Gaea's Might", 81, Rarity.COMMON, mage.cards.g.GaeasMight.class)); cards.add(new SetCardInfo("Gainsay", 26, Rarity.UNCOMMON, mage.cards.g.Gainsay.class)); cards.add(new SetCardInfo("Gerrard's Command", 109, Rarity.COMMON, mage.cards.g.GerrardsCommand.class)); - cards.add(new SetCardInfo("Heroic Defiance", 6, Rarity.COMMON, mage.cards.h.HeroicDefiance.class)); + cards.add(new SetCardInfo("Goblin Game", 61, Rarity.RARE, mage.cards.g.GoblinGame.class)); + cards.add(new SetCardInfo("Heroic Defiance", 6, Rarity.COMMON, mage.cards.h.HeroicDefiance.class)); cards.add(new SetCardInfo("Hobble", 7, Rarity.COMMON, mage.cards.h.Hobble.class)); cards.add(new SetCardInfo("Honorable Scout", 8, Rarity.COMMON, mage.cards.h.HonorableScout.class)); cards.add(new SetCardInfo("Horned Kavu", 110, Rarity.COMMON, mage.cards.h.HornedKavu.class)); @@ -196,4 +197,4 @@ public class Planeshift extends ExpansionSet { cards.add(new SetCardInfo("Warped Devotion", 57, Rarity.UNCOMMON, mage.cards.w.WarpedDevotion.class)); cards.add(new SetCardInfo("Waterspout Elemental", 38, Rarity.RARE, mage.cards.w.WaterspoutElemental.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/Portal.java b/Mage.Sets/src/mage/sets/Portal.java index 8ca792f068..8c15c619ed 100644 --- a/Mage.Sets/src/mage/sets/Portal.java +++ b/Mage.Sets/src/mage/sets/Portal.java @@ -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; import mage.cards.ExpansionSet; @@ -39,7 +38,6 @@ import mage.constants.SetType; * * @author Plopman */ - public class Portal extends ExpansionSet { private static final Portal instance = new Portal(); @@ -73,6 +71,7 @@ public class Portal extends ExpansionSet { cards.add(new SetCardInfo("Armageddon", 167, Rarity.RARE, mage.cards.a.Armageddon.class)); cards.add(new SetCardInfo("Armored Pegasus", 168, Rarity.COMMON, mage.cards.a.ArmoredPegasus.class)); cards.add(new SetCardInfo("Arrogant Vampire", 1, Rarity.UNCOMMON, mage.cards.a.ArrogantVampire.class)); + cards.add(new SetCardInfo("Assassin's Blade", 2, Rarity.UNCOMMON, mage.cards.a.AssassinsBlade.class)); cards.add(new SetCardInfo("Balance of Power", 42, Rarity.RARE, mage.cards.b.BalanceOfPower.class)); cards.add(new SetCardInfo("Baleful Stare", 43, Rarity.UNCOMMON, mage.cards.b.BalefulStare.class)); cards.add(new SetCardInfo("Bee Sting", 83, Rarity.UNCOMMON, mage.cards.b.BeeSting.class)); @@ -96,12 +95,14 @@ public class Portal extends ExpansionSet { cards.add(new SetCardInfo("Cloud Dragon", 46, Rarity.RARE, mage.cards.c.CloudDragon.class)); cards.add(new SetCardInfo("Cloud Pirates", 47, Rarity.COMMON, mage.cards.c.CloudPirates.class)); cards.add(new SetCardInfo("Cloud Spirit", 48, Rarity.UNCOMMON, mage.cards.c.CloudSpirit.class)); + cards.add(new SetCardInfo("Command of Unsummoning", 49, Rarity.UNCOMMON, mage.cards.c.CommandOfUnsummoning.class)); cards.add(new SetCardInfo("Coral Eel", 50, Rarity.COMMON, mage.cards.c.CoralEel.class)); cards.add(new SetCardInfo("Craven Giant", 126, Rarity.COMMON, mage.cards.c.CravenGiant.class)); cards.add(new SetCardInfo("Craven Knight", 7, Rarity.COMMON, mage.cards.c.CravenKnight.class)); cards.add(new SetCardInfo("Cruel Bargain", 8, Rarity.RARE, mage.cards.c.CruelBargain.class)); cards.add(new SetCardInfo("Cruel Tutor", 9, Rarity.RARE, mage.cards.c.CruelTutor.class)); cards.add(new SetCardInfo("Deep-Sea Serpent", 52, Rarity.UNCOMMON, mage.cards.d.DeepSeaSerpent.class)); + cards.add(new SetCardInfo("Defiant Stand", 174, Rarity.UNCOMMON, mage.cards.d.DefiantStand.class)); cards.add(new SetCardInfo("Deja Vu", 53, Rarity.COMMON, mage.cards.d.DejaVu.class)); cards.add(new SetCardInfo("Desert Drake", 127, Rarity.UNCOMMON, mage.cards.d.DesertDrake.class)); cards.add(new SetCardInfo("Devastation", 128, Rarity.RARE, mage.cards.d.Devastation.class)); @@ -126,7 +127,7 @@ public class Portal extends ExpansionSet { cards.add(new SetCardInfo("Fire Tempest", 133, Rarity.RARE, mage.cards.f.FireTempest.class)); cards.add(new SetCardInfo("Flashfires", 134, Rarity.UNCOMMON, mage.cards.f.Flashfires.class)); cards.add(new SetCardInfo("Fleet-Footed Monk", 177, Rarity.COMMON, mage.cards.f.FleetFootedMonk.class)); - cards.add(new SetCardInfo("Flux", 56, Rarity.UNCOMMON, mage.cards.f.Flux.class)); + cards.add(new SetCardInfo("Flux", 56, Rarity.UNCOMMON, mage.cards.f.Flux.class)); cards.add(new SetCardInfo("Foot Soldiers", 178, Rarity.COMMON, mage.cards.f.FootSoldiers.class)); cards.add(new SetCardInfo("Forest", 203, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Forest", 204, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); @@ -216,6 +217,7 @@ public class Portal extends ExpansionSet { cards.add(new SetCardInfo("Sacred Knight", 186, Rarity.COMMON, mage.cards.s.SacredKnight.class)); cards.add(new SetCardInfo("Sacred Nectar", 187, Rarity.COMMON, mage.cards.s.SacredNectar.class)); cards.add(new SetCardInfo("Scorching Spear", 154, Rarity.COMMON, mage.cards.s.ScorchingSpear.class)); + cards.add(new SetCardInfo("Scorching Winds", 155, Rarity.UNCOMMON, mage.cards.s.ScorchingWinds.class)); cards.add(new SetCardInfo("Seasoned Marshal", 188, Rarity.UNCOMMON, mage.cards.s.SeasonedMarshal.class)); cards.add(new SetCardInfo("Serpent Assassin", 31, Rarity.RARE, mage.cards.s.SerpentAssassin.class)); cards.add(new SetCardInfo("Serpent Warrior", 32, Rarity.COMMON, mage.cards.s.SerpentWarrior.class)); @@ -250,6 +252,7 @@ public class Portal extends ExpansionSet { cards.add(new SetCardInfo("Tidal Surge", 75, Rarity.COMMON, mage.cards.t.TidalSurge.class)); cards.add(new SetCardInfo("Time Ebb", 76, Rarity.COMMON, mage.cards.t.TimeEbb.class)); cards.add(new SetCardInfo("Touch of Brilliance", 77, Rarity.COMMON, mage.cards.t.TouchOfBrilliance.class)); + cards.add(new SetCardInfo("Treetop Defense", 116, Rarity.RARE, mage.cards.t.TreetopDefense.class)); cards.add(new SetCardInfo("Undying Beast", 36, Rarity.COMMON, mage.cards.u.UndyingBeast.class)); cards.add(new SetCardInfo("Untamed Wilds", 117, Rarity.UNCOMMON, mage.cards.u.UntamedWilds.class)); cards.add(new SetCardInfo("Valorous Charge", 196, Rarity.UNCOMMON, mage.cards.v.ValorousCharge.class)); @@ -274,4 +277,4 @@ public class Portal extends ExpansionSet { cards.add(new SetCardInfo("Wood Elves", 121, Rarity.RARE, mage.cards.w.WoodElves.class)); cards.add(new SetCardInfo("Wrath of God", 202, Rarity.RARE, mage.cards.w.WrathOfGod.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/PortalSecondAge.java b/Mage.Sets/src/mage/sets/PortalSecondAge.java index 06f1b13f45..ced4eb2baf 100644 --- a/Mage.Sets/src/mage/sets/PortalSecondAge.java +++ b/Mage.Sets/src/mage/sets/PortalSecondAge.java @@ -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; import mage.cards.ExpansionSet; @@ -36,7 +35,6 @@ import mage.constants.SetType; * * @author Plopman */ - public class PortalSecondAge extends ExpansionSet { private static final PortalSecondAge instance = new PortalSecondAge(); @@ -66,6 +64,7 @@ public class PortalSecondAge extends ExpansionSet { cards.add(new SetCardInfo("Alaborn Musketeer", 123, Rarity.COMMON, mage.cards.a.AlabornMusketeer.class)); cards.add(new SetCardInfo("Alaborn Trooper", 124, Rarity.COMMON, mage.cards.a.AlabornTrooper.class)); cards.add(new SetCardInfo("Alaborn Veteran", 125, Rarity.RARE, mage.cards.a.AlabornVeteran.class)); + cards.add(new SetCardInfo("Alaborn Zealot", 126, Rarity.UNCOMMON, mage.cards.a.AlabornZealot.class)); cards.add(new SetCardInfo("Alluring Scent", 61, Rarity.RARE, mage.cards.a.AlluringScent.class)); cards.add(new SetCardInfo("Ancient Craving", 2, Rarity.RARE, mage.cards.a.AncientCraving.class)); cards.add(new SetCardInfo("Angelic Blessing", 129, Rarity.COMMON, mage.cards.a.AngelicBlessing.class)); @@ -166,8 +165,12 @@ public class PortalSecondAge extends ExpansionSet { cards.add(new SetCardInfo("Raiding Nightstalker", 24, Rarity.COMMON, mage.cards.r.RaidingNightstalker.class)); cards.add(new SetCardInfo("Rain of Daggers", 25, Rarity.RARE, mage.cards.r.RainOfDaggers.class)); cards.add(new SetCardInfo("Raise Dead", 26, Rarity.COMMON, mage.cards.r.RaiseDead.class)); + cards.add(new SetCardInfo("Rally the Troops", 139, Rarity.UNCOMMON, mage.cards.r.RallyTheTroops.class)); cards.add(new SetCardInfo("Ravenous Rats", 27, Rarity.COMMON, mage.cards.r.RavenousRats.class)); cards.add(new SetCardInfo("Razorclaw Bear", 82, Rarity.RARE, mage.cards.r.RazorclawBear.class)); + cards.add(new SetCardInfo("Remove", 43, Rarity.UNCOMMON, mage.cards.r.Remove.class)); + cards.add(new SetCardInfo("Renewing Touch", 83, Rarity.UNCOMMON, mage.cards.r.RenewingTouch.class)); + cards.add(new SetCardInfo("Return of the Nightstalkers", 28, Rarity.RARE, mage.cards.r.ReturnOfTheNightstalkers.class)); cards.add(new SetCardInfo("Righteous Charge", 140, Rarity.COMMON, mage.cards.r.RighteousCharge.class)); cards.add(new SetCardInfo("Righteous Fury", 141, Rarity.RARE, mage.cards.r.RighteousFury.class)); cards.add(new SetCardInfo("River Bear", 84, Rarity.UNCOMMON, mage.cards.r.RiverBear.class)); @@ -213,4 +216,4 @@ public class PortalSecondAge extends ExpansionSet { cards.add(new SetCardInfo("Wild Ox", 90, Rarity.UNCOMMON, mage.cards.w.WildOx.class)); cards.add(new SetCardInfo("Wind Sail", 60, Rarity.COMMON, mage.cards.w.WindSail.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/PortalThreeKingdoms.java b/Mage.Sets/src/mage/sets/PortalThreeKingdoms.java index d640a66d09..bc64a4afe9 100644 --- a/Mage.Sets/src/mage/sets/PortalThreeKingdoms.java +++ b/Mage.Sets/src/mage/sets/PortalThreeKingdoms.java @@ -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; import mage.cards.ExpansionSet; @@ -69,6 +68,7 @@ public class PortalThreeKingdoms extends ExpansionSet { cards.add(new SetCardInfo("Cao Cao, Lord of Wei", 68, Rarity.RARE, mage.cards.c.CaoCaoLordOfWei.class)); cards.add(new SetCardInfo("Cao Ren, Wei Commander", 69, Rarity.RARE, mage.cards.c.CaoRenWeiCommander.class)); cards.add(new SetCardInfo("Capture of Jingzhou", 38, Rarity.RARE, mage.cards.c.CaptureOfJingzhou.class)); + cards.add(new SetCardInfo("Champion's Victory", 39, Rarity.UNCOMMON, mage.cards.c.ChampionsVictory.class)); cards.add(new SetCardInfo("Coercion", 70, Rarity.UNCOMMON, mage.cards.c.Coercion.class)); cards.add(new SetCardInfo("Control of the Court", 105, Rarity.UNCOMMON, mage.cards.c.ControlOfTheCourt.class)); cards.add(new SetCardInfo("Corrupt Court Official", 71, Rarity.UNCOMMON, mage.cards.c.CorruptCourtOfficial.class)); @@ -81,6 +81,7 @@ public class PortalThreeKingdoms extends ExpansionSet { cards.add(new SetCardInfo("Desperate Charge", 74, Rarity.UNCOMMON, mage.cards.d.DesperateCharge.class)); cards.add(new SetCardInfo("Diaochan, Artful Beauty", 108, Rarity.RARE, mage.cards.d.DiaochanArtfulBeauty.class)); cards.add(new SetCardInfo("Dong Zhou, the Tyrant", 109, Rarity.RARE, mage.cards.d.DongZhouTheTyrant.class)); + cards.add(new SetCardInfo("Eightfold Maze", 2, Rarity.RARE, mage.cards.e.EightfoldMaze.class)); cards.add(new SetCardInfo("Empty City Ruse", 3, Rarity.UNCOMMON, mage.cards.e.EmptyCityRuse.class)); cards.add(new SetCardInfo("Exhaustion", 42, Rarity.RARE, mage.cards.e.Exhaustion.class)); cards.add(new SetCardInfo("Extinguish", 43, Rarity.COMMON, mage.cards.e.Extinguish.class)); @@ -101,13 +102,14 @@ public class PortalThreeKingdoms extends ExpansionSet { cards.add(new SetCardInfo("Huang Zhong, Shu General", 8, Rarity.RARE, mage.cards.h.HuangZhongShuGeneral.class)); cards.add(new SetCardInfo("Hua Tuo, Honored Physician", 137, Rarity.RARE, mage.cards.h.HuaTuoHonoredPhysician.class)); cards.add(new SetCardInfo("Hunting Cheetah", 138, Rarity.UNCOMMON, mage.cards.h.HuntingCheetah.class)); + cards.add(new SetCardInfo("Imperial Edict", 77, Rarity.COMMON, mage.cards.i.ImperialEdict.class)); cards.add(new SetCardInfo("Imperial Recruiter", 113, Rarity.UNCOMMON, mage.cards.i.ImperialRecruiter.class)); cards.add(new SetCardInfo("Imperial Seal", 78, Rarity.RARE, mage.cards.i.ImperialSeal.class)); cards.add(new SetCardInfo("Independent Troops", 114, Rarity.COMMON, mage.cards.i.IndependentTroops.class)); cards.add(new SetCardInfo("Island", 169, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Island", 170, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Island", 171, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Kongming, 'Sleeping Dragon'", 9, Rarity.RARE, mage.cards.k.KongmingSleepingDragon.class)); + cards.add(new SetCardInfo("Kongming, \"Sleeping Dragon\"", 9, Rarity.RARE, mage.cards.k.KongmingSleepingDragon.class)); cards.add(new SetCardInfo("Lady Sun", 45, Rarity.RARE, mage.cards.l.LadySun.class)); cards.add(new SetCardInfo("Lady Zhurong, Warrior Queen", 139, Rarity.RARE, mage.cards.l.LadyZhurongWarriorQueen.class)); cards.add(new SetCardInfo("Liu Bei, Lord of Shu", 11, Rarity.RARE, mage.cards.l.LiuBeiLordOfShu.class)); @@ -128,13 +130,14 @@ public class PortalThreeKingdoms extends ExpansionSet { cards.add(new SetCardInfo("Mountain Bandit", 117, Rarity.COMMON, mage.cards.m.MountainBandit.class)); cards.add(new SetCardInfo("Mystic Denial", 49, Rarity.UNCOMMON, mage.cards.m.MysticDenial.class)); cards.add(new SetCardInfo("Overwhelming Forces", 79, Rarity.RARE, mage.cards.o.OverwhelmingForces.class)); - cards.add(new SetCardInfo("Pang Tong, 'Young Phoenix'", 14, Rarity.RARE, mage.cards.p.PangTongYoungPhoenix.class)); + cards.add(new SetCardInfo("Pang Tong, \"Young Phoenix\"", 14, Rarity.RARE, mage.cards.p.PangTongYoungPhoenix.class)); cards.add(new SetCardInfo("Peach Garden Oath", 15, Rarity.UNCOMMON, mage.cards.p.PeachGardenOath.class)); cards.add(new SetCardInfo("Plains", 166, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Plains", 167, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Plains", 168, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Poison Arrow", 80, Rarity.UNCOMMON, mage.cards.p.PoisonArrow.class)); cards.add(new SetCardInfo("Preemptive Strike", 50, Rarity.COMMON, mage.cards.p.PreemptiveStrike.class)); + cards.add(new SetCardInfo("Rally the Troops", 16, Rarity.UNCOMMON, mage.cards.r.RallyTheTroops.class)); cards.add(new SetCardInfo("Ravages of War", 17, Rarity.RARE, mage.cards.r.RavagesOfWar.class)); cards.add(new SetCardInfo("Ravaging Horde", 118, Rarity.UNCOMMON, mage.cards.r.RavagingHorde.class)); cards.add(new SetCardInfo("Red Cliffs Armada", 51, Rarity.UNCOMMON, mage.cards.r.RedCliffsArmada.class)); @@ -183,6 +186,7 @@ public class PortalThreeKingdoms extends ExpansionSet { cards.add(new SetCardInfo("Volunteer Militia", 30, Rarity.COMMON, mage.cards.v.VolunteerMilitia.class)); cards.add(new SetCardInfo("Warrior's Oath", 124, Rarity.RARE, mage.cards.w.WarriorsOath.class)); cards.add(new SetCardInfo("Wei Ambush Force", 85, Rarity.COMMON, mage.cards.w.WeiAmbushForce.class)); + cards.add(new SetCardInfo("Wei Assassins", 86, Rarity.UNCOMMON, mage.cards.w.WeiAssassins.class)); cards.add(new SetCardInfo("Wei Elite Companions", 87, Rarity.UNCOMMON, mage.cards.w.WeiEliteCompanions.class)); cards.add(new SetCardInfo("Wei Infantry", 88, Rarity.COMMON, mage.cards.w.WeiInfantry.class)); cards.add(new SetCardInfo("Wei Night Raiders", 89, Rarity.UNCOMMON, mage.cards.w.WeiNightRaiders.class)); @@ -226,4 +230,4 @@ public class PortalThreeKingdoms extends ExpansionSet { cards.add(new SetCardInfo("Zodiac Tiger", 164, Rarity.UNCOMMON, mage.cards.z.ZodiacTiger.class)); cards.add(new SetCardInfo("Zuo Ci, the Mocking Sage", 165, Rarity.RARE, mage.cards.z.ZuoCiTheMockingSage.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/PrereleaseEvents.java b/Mage.Sets/src/mage/sets/PrereleaseEvents.java index 7333d1bb17..8c551de767 100644 --- a/Mage.Sets/src/mage/sets/PrereleaseEvents.java +++ b/Mage.Sets/src/mage/sets/PrereleaseEvents.java @@ -5,6 +5,7 @@ import mage.constants.Rarity; import mage.constants.SetType; public class PrereleaseEvents extends ExpansionSet { + private static final PrereleaseEvents instance = new PrereleaseEvents(); public static PrereleaseEvents getInstance() { diff --git a/Mage.Sets/src/mage/sets/Prophecy.java b/Mage.Sets/src/mage/sets/Prophecy.java index 0a6bea024a..10b7c6d885 100644 --- a/Mage.Sets/src/mage/sets/Prophecy.java +++ b/Mage.Sets/src/mage/sets/Prophecy.java @@ -74,13 +74,15 @@ public class Prophecy extends ExpansionSet { cards.add(new SetCardInfo("Chimeric Idol", 136, Rarity.UNCOMMON, mage.cards.c.ChimericIdol.class)); cards.add(new SetCardInfo("Citadel of Pain", 86, Rarity.UNCOMMON, mage.cards.c.CitadelOfPain.class)); cards.add(new SetCardInfo("Coastal Hornclaw", 31, Rarity.COMMON, mage.cards.c.CoastalHornclaw.class)); - cards.add(new SetCardInfo("Coffin Puppets", 60, Rarity.RARE, mage.cards.c.CoffinPuppets.class)); + cards.add(new SetCardInfo("Coffin Puppets", 60, Rarity.RARE, mage.cards.c.CoffinPuppets.class)); cards.add(new SetCardInfo("Copper-Leaf Angel", 137, Rarity.RARE, mage.cards.c.CopperLeafAngel.class)); cards.add(new SetCardInfo("Darba", 111, Rarity.UNCOMMON, mage.cards.d.Darba.class)); cards.add(new SetCardInfo("Denying Wind", 32, Rarity.RARE, mage.cards.d.DenyingWind.class)); cards.add(new SetCardInfo("Despoil", 62, Rarity.COMMON, mage.cards.d.Despoil.class)); cards.add(new SetCardInfo("Devastate", 87, Rarity.COMMON, mage.cards.d.Devastate.class)); cards.add(new SetCardInfo("Diving Griffin", 6, Rarity.COMMON, mage.cards.d.DivingGriffin.class)); + cards.add(new SetCardInfo("Dual Nature", 112, Rarity.RARE, mage.cards.d.DualNature.class)); + cards.add(new SetCardInfo("Elephant Resurgence", 113, Rarity.RARE, mage.cards.e.ElephantResurgence.class)); cards.add(new SetCardInfo("Entangler", 7, Rarity.UNCOMMON, mage.cards.e.Entangler.class)); cards.add(new SetCardInfo("Excavation", 33, Rarity.UNCOMMON, mage.cards.e.Excavation.class)); cards.add(new SetCardInfo("Fault Riders", 88, Rarity.COMMON, mage.cards.f.FaultRiders.class)); @@ -88,6 +90,7 @@ public class Prophecy extends ExpansionSet { cards.add(new SetCardInfo("Flameshot", 90, Rarity.UNCOMMON, mage.cards.f.Flameshot.class)); cards.add(new SetCardInfo("Flowering Field", 9, Rarity.UNCOMMON, mage.cards.f.FloweringField.class)); cards.add(new SetCardInfo("Foil", 34, Rarity.UNCOMMON, mage.cards.f.Foil.class)); + cards.add(new SetCardInfo("Forgotten Harvest", 114, Rarity.RARE, mage.cards.f.ForgottenHarvest.class)); cards.add(new SetCardInfo("Greel's Caress", 67, Rarity.COMMON, mage.cards.g.GreelsCaress.class)); cards.add(new SetCardInfo("Greel, Mind Raker", 66, Rarity.RARE, mage.cards.g.GreelMindRaker.class)); cards.add(new SetCardInfo("Gulf Squid", 35, Rarity.COMMON, mage.cards.g.GulfSquid.class)); @@ -99,6 +102,7 @@ public class Prophecy extends ExpansionSet { cards.add(new SetCardInfo("Jolrael, Empress of Beasts", 115, Rarity.RARE, mage.cards.j.JolraelEmpressOfBeasts.class)); cards.add(new SetCardInfo("Jolrael's Favor", 116, Rarity.COMMON, mage.cards.j.JolraelsFavor.class)); cards.add(new SetCardInfo("Keldon Arsonist", 92, Rarity.UNCOMMON, mage.cards.k.KeldonArsonist.class)); + cards.add(new SetCardInfo("Keldon Berserker", 93, Rarity.COMMON, mage.cards.k.KeldonBerserker.class)); cards.add(new SetCardInfo("Keldon Firebombers", 94, Rarity.RARE, mage.cards.k.KeldonFirebombers.class)); cards.add(new SetCardInfo("Latulla, Keldon Overseer", 95, Rarity.RARE, mage.cards.l.LatullaKeldonOverseer.class)); cards.add(new SetCardInfo("Lesser Gargadon", 97, Rarity.UNCOMMON, mage.cards.l.LesserGargadon.class)); @@ -118,10 +122,12 @@ public class Prophecy extends ExpansionSet { cards.add(new SetCardInfo("Pit Raptor", 72, Rarity.UNCOMMON, mage.cards.p.PitRaptor.class)); cards.add(new SetCardInfo("Plague Fiend", 73, Rarity.COMMON, mage.cards.p.PlagueFiend.class)); cards.add(new SetCardInfo("Plague Wind", 74, Rarity.RARE, mage.cards.p.PlagueWind.class)); + cards.add(new SetCardInfo("Psychic Theft", 40, Rarity.RARE, mage.cards.p.PsychicTheft.class)); cards.add(new SetCardInfo("Pygmy Razorback", 120, Rarity.COMMON, mage.cards.p.PygmyRazorback.class)); cards.add(new SetCardInfo("Quicksilver Wall", 41, Rarity.UNCOMMON, mage.cards.q.QuicksilverWall.class)); cards.add(new SetCardInfo("Rebel Informer", 75, Rarity.RARE, mage.cards.r.RebelInformer.class)); cards.add(new SetCardInfo("Rethink", 42, Rarity.COMMON, mage.cards.r.Rethink.class)); + cards.add(new SetCardInfo("Reveille Squad", 18, Rarity.UNCOMMON, mage.cards.r.ReveilleSquad.class)); cards.add(new SetCardInfo("Rhystic Circle", 19, Rarity.COMMON, mage.cards.r.RhysticCircle.class)); cards.add(new SetCardInfo("Rhystic Study", 45, Rarity.COMMON, mage.cards.r.RhysticStudy.class)); cards.add(new SetCardInfo("Rhystic Tutor", 77, Rarity.RARE, mage.cards.r.RhysticTutor.class)); @@ -129,10 +135,12 @@ public class Prophecy extends ExpansionSet { cards.add(new SetCardInfo("Rib Cage Spider", 121, Rarity.COMMON, mage.cards.r.RibCageSpider.class)); cards.add(new SetCardInfo("Ridgeline Rager", 100, Rarity.COMMON, mage.cards.r.RidgelineRager.class)); cards.add(new SetCardInfo("Root Cage", 122, Rarity.UNCOMMON, mage.cards.r.RootCage.class)); + cards.add(new SetCardInfo("Samite Sanctuary", 21, Rarity.RARE, mage.cards.s.SamiteSanctuary.class)); cards.add(new SetCardInfo("Scoria Cat", 101, Rarity.UNCOMMON, mage.cards.s.ScoriaCat.class)); cards.add(new SetCardInfo("Searing Wind", 103, Rarity.RARE, mage.cards.s.SearingWind.class)); cards.add(new SetCardInfo("Shield Dancer", 23, Rarity.UNCOMMON, mage.cards.s.ShieldDancer.class)); cards.add(new SetCardInfo("Silt Crawler", 123, Rarity.COMMON, mage.cards.s.SiltCrawler.class)); + cards.add(new SetCardInfo("Snag", 124, Rarity.UNCOMMON, mage.cards.s.Snag.class)); cards.add(new SetCardInfo("Spiketail Drake", 48, Rarity.UNCOMMON, mage.cards.s.SpiketailDrake.class)); cards.add(new SetCardInfo("Spiketail Hatchling", 49, Rarity.COMMON, mage.cards.s.SpiketailHatchling.class)); cards.add(new SetCardInfo("Spitting Spider", 125, Rarity.UNCOMMON, mage.cards.s.SpittingSpider.class)); @@ -143,6 +151,7 @@ public class Prophecy extends ExpansionSet { cards.add(new SetCardInfo("Stormwatch Eagle", 50, Rarity.COMMON, mage.cards.s.StormwatchEagle.class)); cards.add(new SetCardInfo("Sunken Field", 51, Rarity.UNCOMMON, mage.cards.s.SunkenField.class)); cards.add(new SetCardInfo("Sword Dancer", 25, Rarity.UNCOMMON, mage.cards.s.SwordDancer.class)); + cards.add(new SetCardInfo("Task Mage Assembly", 105, Rarity.RARE, mage.cards.t.TaskMageAssembly.class)); cards.add(new SetCardInfo("Thrive", 129, Rarity.COMMON, mage.cards.t.Thrive.class)); cards.add(new SetCardInfo("Trenching Steed", 26, Rarity.COMMON, mage.cards.t.TrenchingSteed.class)); cards.add(new SetCardInfo("Troubled Healer", 27, Rarity.COMMON, mage.cards.t.TroubledHealer.class)); @@ -150,12 +159,13 @@ public class Prophecy extends ExpansionSet { cards.add(new SetCardInfo("Verdant Field", 130, Rarity.UNCOMMON, mage.cards.v.VerdantField.class)); cards.add(new SetCardInfo("Vintara Elephant", 131, Rarity.COMMON, mage.cards.v.VintaraElephant.class)); cards.add(new SetCardInfo("Vintara Snapper", 132, Rarity.UNCOMMON, mage.cards.v.VintaraSnapper.class)); - cards.add(new SetCardInfo("Vitalizing Wind", 133, Rarity.RARE, mage.cards.v.VitalizingWind.class)); + cards.add(new SetCardInfo("Vitalizing Wind", 133, Rarity.RARE, mage.cards.v.VitalizingWind.class)); cards.add(new SetCardInfo("Well of Discovery", 140, Rarity.RARE, mage.cards.w.WellOfDiscovery.class)); cards.add(new SetCardInfo("Well of Life", 141, Rarity.UNCOMMON, mage.cards.w.WellOfLife.class)); cards.add(new SetCardInfo("Whip Sergeant", 107, Rarity.UNCOMMON, mage.cards.w.WhipSergeant.class)); cards.add(new SetCardInfo("Whipstitched Zombie", 81, Rarity.COMMON, mage.cards.w.WhipstitchedZombie.class)); cards.add(new SetCardInfo("Wild Might", 134, Rarity.COMMON, mage.cards.w.WildMight.class)); + cards.add(new SetCardInfo("Windscouter", 53, Rarity.UNCOMMON, mage.cards.w.Windscouter.class)); cards.add(new SetCardInfo("Wintermoon Mesa", 143, Rarity.RARE, mage.cards.w.WintermoonMesa.class)); cards.add(new SetCardInfo("Withdraw", 54, Rarity.COMMON, mage.cards.w.Withdraw.class)); cards.add(new SetCardInfo("Zerapa Minotaur", 108, Rarity.COMMON, mage.cards.z.ZerapaMinotaur.class)); diff --git a/Mage.Sets/src/mage/sets/RavnicaCityOfGuilds.java b/Mage.Sets/src/mage/sets/RavnicaCityOfGuilds.java index 394bee7e14..8bea79044a 100644 --- a/Mage.Sets/src/mage/sets/RavnicaCityOfGuilds.java +++ b/Mage.Sets/src/mage/sets/RavnicaCityOfGuilds.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -37,6 +36,7 @@ import mage.constants.SetType; * @author loki */ public class RavnicaCityOfGuilds extends ExpansionSet { + private static final RavnicaCityOfGuilds instance = new RavnicaCityOfGuilds(); public static RavnicaCityOfGuilds getInstance() { @@ -137,7 +137,7 @@ public class RavnicaCityOfGuilds extends ExpansionSet { cards.add(new SetCardInfo("Eye of the Storm", 48, Rarity.RARE, mage.cards.e.EyeOfTheStorm.class)); cards.add(new SetCardInfo("Faith's Fetters", 16, Rarity.COMMON, mage.cards.f.FaithsFetters.class)); cards.add(new SetCardInfo("Farseek", 163, Rarity.COMMON, mage.cards.f.Farseek.class)); - cards.add(new SetCardInfo("Festival of the Guildpact", 17, Rarity.UNCOMMON, mage.cards.f.FestivalOfTheGuildpact.class)); + cards.add(new SetCardInfo("Festival of the Guildpact", 17, Rarity.UNCOMMON, mage.cards.f.FestivalOfTheGuildpact.class)); cards.add(new SetCardInfo("Fiery Conclusion", 122, Rarity.COMMON, mage.cards.f.FieryConclusion.class)); cards.add(new SetCardInfo("Firemane Angel", 205, Rarity.RARE, mage.cards.f.FiremaneAngel.class)); cards.add(new SetCardInfo("Fists of Ironwood", 164, Rarity.COMMON, mage.cards.f.FistsOfIronwood.class)); @@ -326,6 +326,7 @@ public class RavnicaCityOfGuilds extends ExpansionSet { cards.add(new SetCardInfo("Tolsimir Wolfblood", 236, Rarity.RARE, mage.cards.t.TolsimirWolfblood.class)); cards.add(new SetCardInfo("Torpid Moloch", 147, Rarity.COMMON, mage.cards.t.TorpidMoloch.class)); cards.add(new SetCardInfo("Transluminant", 186, Rarity.COMMON, mage.cards.t.Transluminant.class)); + cards.add(new SetCardInfo("Trophy Hunter", 187, Rarity.UNCOMMON, mage.cards.t.TrophyHunter.class)); cards.add(new SetCardInfo("Tunnel Vision", 72, Rarity.RARE, mage.cards.t.TunnelVision.class)); cards.add(new SetCardInfo("Twilight Drover", 33, Rarity.RARE, mage.cards.t.TwilightDrover.class)); cards.add(new SetCardInfo("Twisted Justice", 237, Rarity.UNCOMMON, mage.cards.t.TwistedJustice.class)); diff --git a/Mage.Sets/src/mage/sets/RiseOfTheEldrazi.java b/Mage.Sets/src/mage/sets/RiseOfTheEldrazi.java index c9e160b330..36acd42558 100644 --- a/Mage.Sets/src/mage/sets/RiseOfTheEldrazi.java +++ b/Mage.Sets/src/mage/sets/RiseOfTheEldrazi.java @@ -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; import mage.cards.ExpansionSet; diff --git a/Mage.Sets/src/mage/sets/ScarsOfMirrodin.java b/Mage.Sets/src/mage/sets/ScarsOfMirrodin.java index 7271d76581..24db557f77 100644 --- a/Mage.Sets/src/mage/sets/ScarsOfMirrodin.java +++ b/Mage.Sets/src/mage/sets/ScarsOfMirrodin.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -247,7 +246,7 @@ public class ScarsOfMirrodin extends ExpansionSet { cards.add(new SetCardInfo("Skinrender", 78, Rarity.UNCOMMON, mage.cards.s.Skinrender.class)); cards.add(new SetCardInfo("Skithiryx, the Blight Dragon", 79, Rarity.MYTHIC, mage.cards.s.SkithiryxTheBlightDragon.class)); cards.add(new SetCardInfo("Sky-Eel School", 44, Rarity.COMMON, mage.cards.s.SkyEelSchool.class)); - cards.add(new SetCardInfo("Slice in Twain", 127, Rarity.UNCOMMON, mage.cards.s.SliceinTwain.class)); + cards.add(new SetCardInfo("Slice in Twain", 127, Rarity.UNCOMMON, mage.cards.s.SliceInTwain.class)); cards.add(new SetCardInfo("Snapsail Glider", 203, Rarity.COMMON, mage.cards.s.SnapsailGlider.class)); cards.add(new SetCardInfo("Soliton", 204, Rarity.COMMON, mage.cards.s.Soliton.class)); cards.add(new SetCardInfo("Soul Parry", 21, Rarity.COMMON, mage.cards.s.SoulParry.class)); diff --git a/Mage.Sets/src/mage/sets/Scourge.java b/Mage.Sets/src/mage/sets/Scourge.java index 73d0ee6c7d..d3462236f7 100644 --- a/Mage.Sets/src/mage/sets/Scourge.java +++ b/Mage.Sets/src/mage/sets/Scourge.java @@ -55,6 +55,7 @@ public class Scourge extends ExpansionSet { this.numBoosterRare = 1; this.ratioBoosterMythic = 0; cards.add(new SetCardInfo("Accelerated Mutation", 109, Rarity.COMMON, mage.cards.a.AcceleratedMutation.class)); + cards.add(new SetCardInfo("Ageless Sentinels", 1, Rarity.RARE, mage.cards.a.AgelessSentinels.class)); cards.add(new SetCardInfo("Alpha Status", 110, Rarity.UNCOMMON, mage.cards.a.AlphaStatus.class)); cards.add(new SetCardInfo("Ambush Commander", 111, Rarity.RARE, mage.cards.a.AmbushCommander.class)); cards.add(new SetCardInfo("Ancient Ooze", 112, Rarity.RARE, mage.cards.a.AncientOoze.class)); @@ -65,15 +66,16 @@ public class Scourge extends ExpansionSet { cards.add(new SetCardInfo("Aven Liberator", 4, Rarity.COMMON, mage.cards.a.AvenLiberator.class)); cards.add(new SetCardInfo("Bladewing's Thrall", 55, Rarity.UNCOMMON, mage.cards.b.BladewingsThrall.class)); cards.add(new SetCardInfo("Bladewing the Risen", 136, Rarity.RARE, mage.cards.b.BladewingTheRisen.class)); + cards.add(new SetCardInfo("Bonethorn Valesk", 82, Rarity.COMMON, mage.cards.b.BonethornValesk.class)); cards.add(new SetCardInfo("Brain Freeze", 29, Rarity.UNCOMMON, mage.cards.b.BrainFreeze.class)); cards.add(new SetCardInfo("Break Asunder", 113, Rarity.COMMON, mage.cards.b.BreakAsunder.class)); cards.add(new SetCardInfo("Cabal Conditioning", 56, Rarity.RARE, mage.cards.c.CabalConditioning.class)); - cards.add(new SetCardInfo("Cabal Interrogator", 57, Rarity.UNCOMMON, mage.cards.c.CabalInterrogator.class)); + cards.add(new SetCardInfo("Cabal Interrogator", 57, Rarity.UNCOMMON, mage.cards.c.CabalInterrogator.class)); cards.add(new SetCardInfo("Call to the Grave", 58, Rarity.RARE, mage.cards.c.CallToTheGrave.class)); cards.add(new SetCardInfo("Carbonize", 83, Rarity.UNCOMMON, mage.cards.c.Carbonize.class)); cards.add(new SetCardInfo("Carrion Feeder", 59, Rarity.COMMON, mage.cards.c.CarrionFeeder.class)); cards.add(new SetCardInfo("Chartooth Cougar", 84, Rarity.COMMON, mage.cards.c.ChartoothCougar.class)); - cards.add(new SetCardInfo("Chill Haunting", 60, Rarity.UNCOMMON, mage.cards.c.ChillHaunting.class)); + cards.add(new SetCardInfo("Chill Haunting", 60, Rarity.UNCOMMON, mage.cards.c.ChillHaunting.class)); cards.add(new SetCardInfo("Claws of Wirewood", 114, Rarity.UNCOMMON, mage.cards.c.ClawsOfWirewood.class)); cards.add(new SetCardInfo("Clutch of Undeath", 61, Rarity.COMMON, mage.cards.c.ClutchOfUndeath.class)); cards.add(new SetCardInfo("Coast Watcher", 30, Rarity.COMMON, mage.cards.c.CoastWatcher.class)); @@ -131,6 +133,7 @@ public class Scourge extends ExpansionSet { cards.add(new SetCardInfo("Mind's Desire", 41, Rarity.RARE, mage.cards.m.MindsDesire.class)); cards.add(new SetCardInfo("Mischievous Quanar", 42, Rarity.RARE, mage.cards.m.MischievousQuanar.class)); cards.add(new SetCardInfo("Misguided Rage", 99, Rarity.COMMON, mage.cards.m.MisguidedRage.class)); + cards.add(new SetCardInfo("Mistform Warchief", 43, Rarity.UNCOMMON, mage.cards.m.MistformWarchief.class)); cards.add(new SetCardInfo("Nefashu", 70, Rarity.RARE, mage.cards.n.Nefashu.class)); cards.add(new SetCardInfo("Noble Templar", 19, Rarity.COMMON, mage.cards.n.NobleTemplar.class)); cards.add(new SetCardInfo("One with Nature", 125, Rarity.UNCOMMON, mage.cards.o.OneWithNature.class)); @@ -139,6 +142,7 @@ public class Scourge extends ExpansionSet { cards.add(new SetCardInfo("Putrid Raptor", 71, Rarity.UNCOMMON, mage.cards.p.PutridRaptor.class)); cards.add(new SetCardInfo("Pyrostatic Pillar", 100, Rarity.UNCOMMON, mage.cards.p.PyrostaticPillar.class)); cards.add(new SetCardInfo("Rain of Blades", 20, Rarity.UNCOMMON, mage.cards.r.RainOfBlades.class)); + cards.add(new SetCardInfo("Raven Guild Initiate", 46, Rarity.COMMON, mage.cards.r.RavenGuildInitiate.class)); cards.add(new SetCardInfo("Raven Guild Master", 47, Rarity.RARE, mage.cards.r.RavenGuildMaster.class)); cards.add(new SetCardInfo("Reaping the Graves", 72, Rarity.COMMON, mage.cards.r.ReapingTheGraves.class)); cards.add(new SetCardInfo("Recuperate", 21, Rarity.COMMON, mage.cards.r.Recuperate.class)); diff --git a/Mage.Sets/src/mage/sets/ShardsOfAlara.java b/Mage.Sets/src/mage/sets/ShardsOfAlara.java index 4dd7548d6e..a53e4700f3 100644 --- a/Mage.Sets/src/mage/sets/ShardsOfAlara.java +++ b/Mage.Sets/src/mage/sets/ShardsOfAlara.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; diff --git a/Mage.Sets/src/mage/sets/SorinVsTibalt.java b/Mage.Sets/src/mage/sets/SorinVsTibalt.java index db1d5652f5..598857fb9a 100644 --- a/Mage.Sets/src/mage/sets/SorinVsTibalt.java +++ b/Mage.Sets/src/mage/sets/SorinVsTibalt.java @@ -35,8 +35,8 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class SorinVsTibalt extends ExpansionSet { + private static final SorinVsTibalt instance = new SorinVsTibalt(); public static SorinVsTibalt getInstance() { @@ -128,4 +128,4 @@ public class SorinVsTibalt extends ExpansionSet { cards.add(new SetCardInfo("Wall of Omens", 4, Rarity.UNCOMMON, mage.cards.w.WallOfOmens.class)); cards.add(new SetCardInfo("Zealous Persecution", 23, Rarity.UNCOMMON, mage.cards.z.ZealousPersecution.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/SpeedVsCunning.java b/Mage.Sets/src/mage/sets/SpeedVsCunning.java index 851d7fdd06..84c4846b53 100644 --- a/Mage.Sets/src/mage/sets/SpeedVsCunning.java +++ b/Mage.Sets/src/mage/sets/SpeedVsCunning.java @@ -35,8 +35,8 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class SpeedVsCunning extends ExpansionSet { + private static final SpeedVsCunning instance = new SpeedVsCunning(); public static SpeedVsCunning getInstance() { @@ -129,4 +129,4 @@ public class SpeedVsCunning extends ExpansionSet { cards.add(new SetCardInfo("Willbender", 47, Rarity.UNCOMMON, mage.cards.w.Willbender.class)); cards.add(new SetCardInfo("Zurgo Helmsmasher", 1, Rarity.MYTHIC, mage.cards.z.ZurgoHelmsmasher.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/Starter1999.java b/Mage.Sets/src/mage/sets/Starter1999.java index 94dd0179bc..6f6a511916 100644 --- a/Mage.Sets/src/mage/sets/Starter1999.java +++ b/Mage.Sets/src/mage/sets/Starter1999.java @@ -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; import mage.cards.ExpansionSet; @@ -73,6 +72,7 @@ public class Starter1999 extends ExpansionSet { cards.add(new SetCardInfo("Border Guard", 9, Rarity.COMMON, mage.cards.b.BorderGuard.class)); cards.add(new SetCardInfo("Breath of Life", 10, Rarity.UNCOMMON, mage.cards.b.BreathOfLife.class)); cards.add(new SetCardInfo("Bull Hippo", 126, Rarity.UNCOMMON, mage.cards.b.BullHippo.class)); + cards.add(new SetCardInfo("Champion Lancer", 11, Rarity.RARE, mage.cards.c.ChampionLancer.class)); cards.add(new SetCardInfo("Charging Paladin", 12, Rarity.UNCOMMON, mage.cards.c.ChargingPaladin.class)); cards.add(new SetCardInfo("Chorus of Woe", 68, Rarity.COMMON, mage.cards.c.ChorusOfWoe.class)); cards.add(new SetCardInfo("Cinder Storm", 93, Rarity.UNCOMMON, mage.cards.c.CinderStorm.class)); @@ -168,6 +168,7 @@ public class Starter1999 extends ExpansionSet { cards.add(new SetCardInfo("Relearn", 48, Rarity.UNCOMMON, mage.cards.r.Relearn.class)); cards.add(new SetCardInfo("Relentless Assault", 115, Rarity.RARE, mage.cards.r.RelentlessAssault.class)); cards.add(new SetCardInfo("Remove Soul", 49, Rarity.COMMON, mage.cards.r.RemoveSoul.class)); + cards.add(new SetCardInfo("Renewing Touch", 140, Rarity.UNCOMMON, mage.cards.r.RenewingTouch.class)); cards.add(new SetCardInfo("Righteous Charge", 22, Rarity.UNCOMMON, mage.cards.r.RighteousCharge.class)); cards.add(new SetCardInfo("Righteous Fury", 23, Rarity.RARE, mage.cards.r.RighteousFury.class)); cards.add(new SetCardInfo("Royal Falcon", 24, Rarity.COMMON, mage.cards.r.RoyalFalcon.class)); @@ -223,4 +224,4 @@ public class Starter1999 extends ExpansionSet { cards.add(new SetCardInfo("Wind Sail", 62, Rarity.UNCOMMON, mage.cards.w.WindSail.class)); cards.add(new SetCardInfo("Wood Elves", 153, Rarity.UNCOMMON, mage.cards.w.WoodElves.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/Starter2000.java b/Mage.Sets/src/mage/sets/Starter2000.java index 1020e05ab3..da05799bc2 100644 --- a/Mage.Sets/src/mage/sets/Starter2000.java +++ b/Mage.Sets/src/mage/sets/Starter2000.java @@ -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; import mage.cards.ExpansionSet; @@ -36,7 +35,6 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class Starter2000 extends ExpansionSet { private static final Starter2000 instance = new Starter2000(); @@ -116,4 +114,4 @@ public class Starter2000 extends ExpansionSet { cards.add(new SetCardInfo("Willow Elf", 20, Rarity.COMMON, mage.cards.w.WillowElf.class)); cards.add(new SetCardInfo("Wind Drake", 75, Rarity.COMMON, mage.cards.w.WindDrake.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/Stronghold.java b/Mage.Sets/src/mage/sets/Stronghold.java index 98ca6e6269..a08e4c7440 100644 --- a/Mage.Sets/src/mage/sets/Stronghold.java +++ b/Mage.Sets/src/mage/sets/Stronghold.java @@ -106,6 +106,7 @@ public class Stronghold extends ExpansionSet { cards.add(new SetCardInfo("Hornet Cannon", 130, Rarity.UNCOMMON, mage.cards.h.HornetCannon.class)); cards.add(new SetCardInfo("Horn of Greed", 129, Rarity.RARE, mage.cards.h.HornOfGreed.class)); cards.add(new SetCardInfo("Intruder Alarm", 34, Rarity.RARE, mage.cards.i.IntruderAlarm.class)); + cards.add(new SetCardInfo("Invasion Plans", 89, Rarity.RARE, mage.cards.i.InvasionPlans.class)); cards.add(new SetCardInfo("Jinxed Ring", 131, Rarity.RARE, mage.cards.j.JinxedRing.class)); cards.add(new SetCardInfo("Lab Rats", 11, Rarity.COMMON, mage.cards.l.LabRats.class)); cards.add(new SetCardInfo("Lancers en-Kor", 108, Rarity.UNCOMMON, mage.cards.l.LancersEnKor.class)); @@ -164,6 +165,7 @@ public class Stronghold extends ExpansionSet { cards.add(new SetCardInfo("Stronghold Assassin", 21, Rarity.RARE, mage.cards.s.StrongholdAssassin.class)); cards.add(new SetCardInfo("Stronghold Taskmaster", 22, Rarity.UNCOMMON, mage.cards.s.StrongholdTaskmaster.class)); cards.add(new SetCardInfo("Sword of the Chosen", 135, Rarity.RARE, mage.cards.s.SwordOfTheChosen.class)); + cards.add(new SetCardInfo("Temper", 120, Rarity.UNCOMMON, mage.cards.t.Temper.class)); cards.add(new SetCardInfo("Tempting Licid", 72, Rarity.UNCOMMON, mage.cards.t.TemptingLicid.class)); cards.add(new SetCardInfo("Thalakos Deceiver", 45, Rarity.RARE, mage.cards.t.ThalakosDeceiver.class)); cards.add(new SetCardInfo("Tidal Surge", 46, Rarity.COMMON, mage.cards.t.TidalSurge.class)); @@ -173,6 +175,7 @@ public class Stronghold extends ExpansionSet { cards.add(new SetCardInfo("Venerable Monk", 121, Rarity.COMMON, mage.cards.v.VenerableMonk.class)); cards.add(new SetCardInfo("Verdant Touch", 73, Rarity.RARE, mage.cards.v.VerdantTouch.class)); cards.add(new SetCardInfo("Victual Sliver", 143, Rarity.UNCOMMON, mage.cards.v.VictualSliver.class)); + cards.add(new SetCardInfo("Volrath's Gardens", 74, Rarity.RARE, mage.cards.v.VolrathsGardens.class)); cards.add(new SetCardInfo("Volrath's Laboratory", 136, Rarity.RARE, mage.cards.v.VolrathsLaboratory.class)); cards.add(new SetCardInfo("Volrath's Shapeshifter", 48, Rarity.RARE, mage.cards.v.VolrathsShapeshifter.class)); cards.add(new SetCardInfo("Volrath's Stronghold", 137, Rarity.RARE, mage.cards.v.VolrathsStronghold.class)); diff --git a/Mage.Sets/src/mage/sets/SuperSeries.java b/Mage.Sets/src/mage/sets/SuperSeries.java index 891277b663..a10bb67142 100644 --- a/Mage.Sets/src/mage/sets/SuperSeries.java +++ b/Mage.Sets/src/mage/sets/SuperSeries.java @@ -35,7 +35,6 @@ import mage.constants.SetType; * * @author fireshoes */ - public class SuperSeries extends ExpansionSet { private static final SuperSeries instance = new SuperSeries(); diff --git a/Mage.Sets/src/mage/sets/Tempest.java b/Mage.Sets/src/mage/sets/Tempest.java index 3544542f8d..eb67ac2a83 100644 --- a/Mage.Sets/src/mage/sets/Tempest.java +++ b/Mage.Sets/src/mage/sets/Tempest.java @@ -97,6 +97,7 @@ public class Tempest extends ExpansionSet { cards.add(new SetCardInfo("Dream Cache", 59, Rarity.COMMON, mage.cards.d.DreamCache.class)); cards.add(new SetCardInfo("Dregs of Sorrow", 25, Rarity.RARE, mage.cards.d.DregsOfSorrow.class)); cards.add(new SetCardInfo("Earthcraft", 116, Rarity.RARE, mage.cards.e.Earthcraft.class)); + cards.add(new SetCardInfo("Echo Chamber", 272, Rarity.RARE, mage.cards.e.EchoChamber.class)); cards.add(new SetCardInfo("Eladamri, Lord of Leaves", 117, Rarity.RARE, mage.cards.e.EladamriLordOfLeaves.class)); cards.add(new SetCardInfo("Eladamri's Vineyard", 118, Rarity.RARE, mage.cards.e.EladamrisVineyard.class)); cards.add(new SetCardInfo("Elite Javelineer", 229, Rarity.COMMON, mage.cards.e.EliteJavelineer.class)); @@ -156,6 +157,7 @@ public class Tempest extends ExpansionSet { cards.add(new SetCardInfo("Humility", 236, Rarity.RARE, mage.cards.h.Humility.class)); cards.add(new SetCardInfo("Imps' Taunt", 32, Rarity.UNCOMMON, mage.cards.i.ImpsTaunt.class)); cards.add(new SetCardInfo("Insight", 68, Rarity.UNCOMMON, mage.cards.i.Insight.class)); + cards.add(new SetCardInfo("Interdict", 69, Rarity.UNCOMMON, mage.cards.i.Interdict.class)); cards.add(new SetCardInfo("Intuition", 70, Rarity.RARE, mage.cards.i.Intuition.class)); cards.add(new SetCardInfo("Invulnerability", 237, Rarity.UNCOMMON, mage.cards.i.Invulnerability.class)); cards.add(new SetCardInfo("Island", 313, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); @@ -318,6 +320,7 @@ public class Tempest extends ExpansionSet { cards.add(new SetCardInfo("Swamp", 335, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Swamp", 336, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Swamp", 337, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Tahngarth's Rage", 209, Rarity.UNCOMMON, mage.cards.t.TahngarthsRage.class)); cards.add(new SetCardInfo("Talon Sliver", 262, Rarity.COMMON, mage.cards.t.TalonSliver.class)); cards.add(new SetCardInfo("Telethopter", 301, Rarity.UNCOMMON, mage.cards.t.Telethopter.class)); cards.add(new SetCardInfo("Thalakos Dreamsower", 92, Rarity.UNCOMMON, mage.cards.t.ThalakosDreamsower.class)); diff --git a/Mage.Sets/src/mage/sets/TempestRemastered.java b/Mage.Sets/src/mage/sets/TempestRemastered.java index 4353752872..9dd04d7b7b 100644 --- a/Mage.Sets/src/mage/sets/TempestRemastered.java +++ b/Mage.Sets/src/mage/sets/TempestRemastered.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; diff --git a/Mage.Sets/src/mage/sets/TenthEdition.java b/Mage.Sets/src/mage/sets/TenthEdition.java index c8b967f4d9..7ad9e23b79 100644 --- a/Mage.Sets/src/mage/sets/TenthEdition.java +++ b/Mage.Sets/src/mage/sets/TenthEdition.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; diff --git a/Mage.Sets/src/mage/sets/TheDark.java b/Mage.Sets/src/mage/sets/TheDark.java index 7ff996766d..bacad0e06f 100644 --- a/Mage.Sets/src/mage/sets/TheDark.java +++ b/Mage.Sets/src/mage/sets/TheDark.java @@ -68,10 +68,11 @@ public class TheDark extends ExpansionSet { cards.add(new SetCardInfo("Carnivorous Plant", 38, Rarity.COMMON, mage.cards.c.CarnivorousPlant.class)); cards.add(new SetCardInfo("Cave People", 59, Rarity.UNCOMMON, mage.cards.c.CavePeople.class)); cards.add(new SetCardInfo("City of Shadows", 113, Rarity.RARE, mage.cards.c.CityOfShadows.class)); - cards.add(new SetCardInfo("Cleansing", 77, Rarity.RARE, mage.cards.c.Cleansing.class)); + cards.add(new SetCardInfo("Cleansing", 77, Rarity.RARE, mage.cards.c.Cleansing.class)); cards.add(new SetCardInfo("Coal Golem", 96, Rarity.UNCOMMON, mage.cards.c.CoalGolem.class)); cards.add(new SetCardInfo("Dance of Many", 21, Rarity.RARE, mage.cards.d.DanceOfMany.class)); cards.add(new SetCardInfo("Dark Heart of the Wood", 117, Rarity.COMMON, mage.cards.d.DarkHeartOfTheWood.class)); + cards.add(new SetCardInfo("Deep Water", 22, Rarity.COMMON, mage.cards.d.DeepWater.class)); cards.add(new SetCardInfo("Diabolic Machine", 98, Rarity.UNCOMMON, mage.cards.d.DiabolicMachine.class)); cards.add(new SetCardInfo("Drowned", 23, Rarity.COMMON, mage.cards.d.Drowned.class)); cards.add(new SetCardInfo("Dust to Dust", 78, Rarity.COMMON, mage.cards.d.DustToDust.class)); @@ -97,6 +98,7 @@ public class TheDark extends ExpansionSet { cards.add(new SetCardInfo("Holy Light", 83, Rarity.COMMON, mage.cards.h.HolyLight.class)); cards.add(new SetCardInfo("Inferno", 70, Rarity.RARE, mage.cards.i.Inferno.class)); cards.add(new SetCardInfo("Land Leeches", 42, Rarity.COMMON, mage.cards.l.LandLeeches.class)); + cards.add(new SetCardInfo("Leviathan", 29, Rarity.RARE, mage.cards.l.Leviathan.class)); cards.add(new SetCardInfo("Living Armor", 101, Rarity.UNCOMMON, mage.cards.l.LivingArmor.class)); cards.add(new SetCardInfo("Mana Clash", 71, Rarity.RARE, mage.cards.m.ManaClash.class)); cards.add(new SetCardInfo("Mana Vortex", 30, Rarity.RARE, mage.cards.m.ManaVortex.class)); @@ -105,7 +107,8 @@ public class TheDark extends ExpansionSet { cards.add(new SetCardInfo("Marsh Viper", 44, Rarity.COMMON, mage.cards.m.MarshViper.class)); cards.add(new SetCardInfo("Maze of Ith", 114, Rarity.UNCOMMON, mage.cards.m.MazeOfIth.class)); cards.add(new SetCardInfo("Merfolk Assassin", 31, Rarity.UNCOMMON, mage.cards.m.MerfolkAssassin.class)); - cards.add(new SetCardInfo("Mind Bomb", 32, Rarity.RARE, mage.cards.m.MindBomb.class)); + cards.add(new SetCardInfo("Mind Bomb", 32, Rarity.RARE, mage.cards.m.MindBomb.class)); + cards.add(new SetCardInfo("Miracle Worker", 86, Rarity.COMMON, mage.cards.m.MiracleWorker.class)); cards.add(new SetCardInfo("Morale", 87, Rarity.COMMON, mage.cards.m.Morale.class)); cards.add(new SetCardInfo("Murk Dwellers", 11, Rarity.COMMON, mage.cards.m.MurkDwellers.class)); cards.add(new SetCardInfo("Niall Silvain", 45, Rarity.RARE, mage.cards.n.NiallSilvain.class)); @@ -116,6 +119,7 @@ public class TheDark extends ExpansionSet { cards.add(new SetCardInfo("Riptide", 34, Rarity.COMMON, mage.cards.r.Riptide.class)); cards.add(new SetCardInfo("Safe Haven", 115, Rarity.RARE, mage.cards.s.SafeHaven.class)); cards.add(new SetCardInfo("Savaen Elves", 47, Rarity.COMMON, mage.cards.s.SavaenElves.class)); + cards.add(new SetCardInfo("Scarwood Bandits", 48, Rarity.RARE, mage.cards.s.ScarwoodBandits.class)); cards.add(new SetCardInfo("Scarwood Goblins", 119, Rarity.COMMON, mage.cards.s.ScarwoodGoblins.class)); cards.add(new SetCardInfo("Scarwood Hag", 49, Rarity.UNCOMMON, mage.cards.s.ScarwoodHag.class)); cards.add(new SetCardInfo("Scavenger Folk", 50, Rarity.COMMON, mage.cards.s.ScavengerFolk.class)); diff --git a/Mage.Sets/src/mage/sets/TimeSpiral.java b/Mage.Sets/src/mage/sets/TimeSpiral.java index f83334a8aa..900cf73069 100644 --- a/Mage.Sets/src/mage/sets/TimeSpiral.java +++ b/Mage.Sets/src/mage/sets/TimeSpiral.java @@ -73,7 +73,8 @@ public class TimeSpiral extends ExpansionSet { cards.add(new SetCardInfo("Deep-Sea Kraken", 56, Rarity.RARE, mage.cards.d.DeepSeaKraken.class)); cards.add(new SetCardInfo("Dementia Sliver", 236, Rarity.UNCOMMON, mage.cards.d.DementiaSliver.class)); cards.add(new SetCardInfo("Demonic Collusion", 103, Rarity.RARE, mage.cards.d.DemonicCollusion.class)); - cards.add(new SetCardInfo("Divine Congregation", 13, Rarity.COMMON, mage.cards.d.DivineCongregation.class)); + cards.add(new SetCardInfo("Detainment Spell", 12, Rarity.COMMON, mage.cards.d.DetainmentSpell.class)); + cards.add(new SetCardInfo("Divine Congregation", 13, Rarity.COMMON, mage.cards.d.DivineCongregation.class)); cards.add(new SetCardInfo("Draining Whelk", 57, Rarity.RARE, mage.cards.d.DrainingWhelk.class)); cards.add(new SetCardInfo("Dralnu, Lich Lord", 237, Rarity.RARE, mage.cards.d.DralnuLichLord.class)); cards.add(new SetCardInfo("Dread Return", 104, Rarity.UNCOMMON, mage.cards.d.DreadReturn.class)); @@ -100,6 +101,7 @@ public class TimeSpiral extends ExpansionSet { cards.add(new SetCardInfo("Flamecore Elemental", 154, Rarity.COMMON, mage.cards.f.FlamecoreElemental.class)); cards.add(new SetCardInfo("Fledgling Mawcor", 63, Rarity.UNCOMMON, mage.cards.f.FledglingMawcor.class)); cards.add(new SetCardInfo("Flickering Spirit", 17, Rarity.COMMON, mage.cards.f.FlickeringSpirit.class)); + cards.add(new SetCardInfo("Flowstone Channeler", 155, Rarity.COMMON, mage.cards.f.FlowstoneChanneler.class)); cards.add(new SetCardInfo("Fool's Demise", 64, Rarity.UNCOMMON, mage.cards.f.FoolsDemise.class)); cards.add(new SetCardInfo("Forest", 298, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Forest", 299, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); @@ -244,6 +246,7 @@ public class TimeSpiral extends ExpansionSet { cards.add(new SetCardInfo("Spectral Force", 217, Rarity.RARE, mage.cards.s.SpectralForce.class)); cards.add(new SetCardInfo("Spell Burst", 79, Rarity.UNCOMMON, mage.cards.s.SpellBurst.class)); cards.add(new SetCardInfo("Spiketail Drakeling", 80, Rarity.COMMON, mage.cards.s.SpiketailDrakeling.class)); + cards.add(new SetCardInfo("Spike Tiller", 218, Rarity.RARE, mage.cards.s.SpikeTiller.class)); cards.add(new SetCardInfo("Spinneret Sliver", 219, Rarity.COMMON, mage.cards.s.SpinneretSliver.class)); cards.add(new SetCardInfo("Spirit Loop", 42, Rarity.UNCOMMON, mage.cards.s.SpiritLoop.class)); cards.add(new SetCardInfo("Sporesower Thallid", 220, Rarity.UNCOMMON, mage.cards.s.SporesowerThallid.class)); @@ -305,6 +308,8 @@ public class TimeSpiral extends ExpansionSet { cards.add(new SetCardInfo("Volcanic Awakening", 186, Rarity.UNCOMMON, mage.cards.v.VolcanicAwakening.class)); cards.add(new SetCardInfo("Walk the Aeons", 93, Rarity.RARE, mage.cards.w.WalkTheAeons.class)); cards.add(new SetCardInfo("Watcher Sliver", 45, Rarity.COMMON, mage.cards.w.WatcherSliver.class)); + cards.add(new SetCardInfo("Weathered Bodyguards", 46, Rarity.RARE, mage.cards.w.WeatheredBodyguards.class)); + cards.add(new SetCardInfo("Weatherseed Totem", 268, Rarity.UNCOMMON, mage.cards.w.WeatherseedTotem.class)); cards.add(new SetCardInfo("Wheel of Fate", 187, Rarity.RARE, mage.cards.w.WheelOfFate.class)); cards.add(new SetCardInfo("Wipe Away", 94, Rarity.UNCOMMON, mage.cards.w.WipeAway.class)); cards.add(new SetCardInfo("Word of Seizing", 188, Rarity.RARE, mage.cards.w.WordOfSeizing.class)); diff --git a/Mage.Sets/src/mage/sets/TimeSpiralTimeshifted.java b/Mage.Sets/src/mage/sets/TimeSpiralTimeshifted.java index 30de3684fc..6702f567dd 100644 --- a/Mage.Sets/src/mage/sets/TimeSpiralTimeshifted.java +++ b/Mage.Sets/src/mage/sets/TimeSpiralTimeshifted.java @@ -52,6 +52,7 @@ public class TimeSpiralTimeshifted extends ExpansionSet { this.hasBasicLands = false; cards.add(new SetCardInfo("Akroma, Angel of Wrath", 1, Rarity.COMMON, mage.cards.a.AkromaAngelOfWrath.class)); cards.add(new SetCardInfo("Arena", 117, Rarity.SPECIAL, mage.cards.a.Arena.class)); + cards.add(new SetCardInfo("Assault // Battery", 106, Rarity.SPECIAL, mage.cards.a.AssaultBattery.class)); cards.add(new SetCardInfo("Auratog", 2, Rarity.COMMON, mage.cards.a.Auratog.class)); cards.add(new SetCardInfo("Avalanche Riders", 55, Rarity.COMMON, mage.cards.a.AvalancheRiders.class)); cards.add(new SetCardInfo("Avatar of Woe", 37, Rarity.SPECIAL, mage.cards.a.AvatarOfWoe.class)); @@ -94,12 +95,14 @@ public class TimeSpiralTimeshifted extends ExpansionSet { cards.add(new SetCardInfo("Ghost Ship", 21, Rarity.SPECIAL, mage.cards.g.GhostShip.class)); cards.add(new SetCardInfo("Goblin Snowman", 64, Rarity.UNCOMMON, mage.cards.g.GoblinSnowman.class)); cards.add(new SetCardInfo("Grinning Totem", 110, Rarity.SPECIAL, mage.cards.g.GrinningTotem.class)); + cards.add(new SetCardInfo("Hail Storm", 79, Rarity.SPECIAL, mage.cards.h.HailStorm.class)); cards.add(new SetCardInfo("Hunting Moa", 80, Rarity.COMMON, mage.cards.h.HuntingMoa.class)); cards.add(new SetCardInfo("Icatian Javelineers", 10, Rarity.SPECIAL, IcatianJavelineers.class)); cards.add(new SetCardInfo("Jasmine Boreal", 93, Rarity.COMMON, mage.cards.j.JasmineBoreal.class)); cards.add(new SetCardInfo("Jolrael, Empress of Beasts", 81, Rarity.SPECIAL, mage.cards.j.JolraelEmpressOfBeasts.class)); cards.add(new SetCardInfo("Kobold Taskmaster", 65, Rarity.SPECIAL, mage.cards.k.KoboldTaskmaster.class)); cards.add(new SetCardInfo("Krosan Cloudscraper", 82, Rarity.SPECIAL, mage.cards.k.KrosanCloudscraper.class)); + cards.add(new SetCardInfo("Leviathan", 23, Rarity.RARE, mage.cards.l.Leviathan.class)); cards.add(new SetCardInfo("Lightning Angel", 94, Rarity.COMMON, mage.cards.l.LightningAngel.class)); cards.add(new SetCardInfo("Lord of Atlantis", 24, Rarity.RARE, mage.cards.l.LordOfAtlantis.class)); cards.add(new SetCardInfo("Merfolk Assassin", 25, Rarity.SPECIAL, mage.cards.m.MerfolkAssassin.class)); @@ -113,6 +116,7 @@ public class TimeSpiralTimeshifted extends ExpansionSet { cards.add(new SetCardInfo("Nicol Bolas", 98, Rarity.SPECIAL, mage.cards.n.NicolBolas.class)); cards.add(new SetCardInfo("Orcish Librarian", 66, Rarity.SPECIAL, mage.cards.o.OrcishLibrarian.class)); cards.add(new SetCardInfo("Orgg", 67, Rarity.SPECIAL, mage.cards.o.Orgg.class)); + cards.add(new SetCardInfo("Ovinomancer", 27, Rarity.SPECIAL, mage.cards.o.Ovinomancer.class)); cards.add(new SetCardInfo("Pandemonium", 68, Rarity.SPECIAL, mage.cards.p.Pandemonium.class)); cards.add(new SetCardInfo("Pendelhaven", 120, Rarity.COMMON, mage.cards.p.Pendelhaven.class)); cards.add(new SetCardInfo("Pirate Ship", 28, Rarity.SPECIAL, mage.cards.p.PirateShip.class)); diff --git a/Mage.Sets/src/mage/sets/Torment.java b/Mage.Sets/src/mage/sets/Torment.java index 3a579e84d1..a0d03e5286 100644 --- a/Mage.Sets/src/mage/sets/Torment.java +++ b/Mage.Sets/src/mage/sets/Torment.java @@ -106,6 +106,7 @@ public class Torment extends ExpansionSet { cards.add(new SetCardInfo("Hydromorph Guardian", 39, Rarity.COMMON, mage.cards.h.HydromorphGuardian.class)); cards.add(new SetCardInfo("Hydromorph Gull", 40, Rarity.UNCOMMON, mage.cards.h.HydromorphGull.class)); cards.add(new SetCardInfo("Hypochondria", 7, Rarity.UNCOMMON, mage.cards.h.Hypochondria.class)); + cards.add(new SetCardInfo("Hypnox", 64, Rarity.RARE, mage.cards.h.Hypnox.class)); cards.add(new SetCardInfo("Ichorid", 65, Rarity.RARE, mage.cards.i.Ichorid.class)); cards.add(new SetCardInfo("Insidious Dreams", 66, Rarity.RARE, mage.cards.i.InsidiousDreams.class)); cards.add(new SetCardInfo("Insist", 127, Rarity.RARE, mage.cards.i.Insist.class)); @@ -114,8 +115,10 @@ public class Torment extends ExpansionSet { cards.add(new SetCardInfo("Krosan Constrictor", 129, Rarity.COMMON, mage.cards.k.KrosanConstrictor.class)); cards.add(new SetCardInfo("Krosan Restorer", 130, Rarity.COMMON, mage.cards.k.KrosanRestorer.class)); cards.add(new SetCardInfo("Laquatus's Champion", 67, Rarity.RARE, mage.cards.l.LaquatussChampion.class)); + cards.add(new SetCardInfo("Last Laugh", 68, Rarity.RARE, mage.cards.l.LastLaugh.class)); cards.add(new SetCardInfo("Liquify", 41, Rarity.COMMON, mage.cards.l.Liquify.class)); cards.add(new SetCardInfo("Llawan, Cephalid Empress", 42, Rarity.RARE, mage.cards.l.LlawanCephalidEmpress.class)); + cards.add(new SetCardInfo("Longhorn Firebeast", 103, Rarity.COMMON, mage.cards.l.LonghornFirebeast.class)); cards.add(new SetCardInfo("Major Teroh", 8, Rarity.RARE, mage.cards.m.MajorTeroh.class)); cards.add(new SetCardInfo("Mesmeric Fiend", 69, Rarity.COMMON, mage.cards.m.MesmericFiend.class)); cards.add(new SetCardInfo("Militant Monk", 9, Rarity.COMMON, mage.cards.m.MilitantMonk.class)); @@ -151,16 +154,19 @@ public class Torment extends ExpansionSet { cards.add(new SetCardInfo("Pyromania", 112, Rarity.UNCOMMON, mage.cards.p.Pyromania.class)); cards.add(new SetCardInfo("Radiate", 113, Rarity.RARE, mage.cards.r.Radiate.class)); cards.add(new SetCardInfo("Rancid Earth", 78, Rarity.COMMON, mage.cards.r.RancidEarth.class)); + cards.add(new SetCardInfo("Reborn Hero", 14, Rarity.RARE, mage.cards.r.RebornHero.class)); cards.add(new SetCardInfo("Restless Dreams", 79, Rarity.COMMON, mage.cards.r.RestlessDreams.class)); cards.add(new SetCardInfo("Sengir Vampire", 80, Rarity.RARE, mage.cards.s.SengirVampire.class)); cards.add(new SetCardInfo("Seton's Scout", 138, Rarity.UNCOMMON, mage.cards.s.SetonsScout.class)); cards.add(new SetCardInfo("Shade's Form", 81, Rarity.COMMON, mage.cards.s.ShadesForm.class)); cards.add(new SetCardInfo("Shambling Swarm", 82, Rarity.RARE, mage.cards.s.ShamblingSwarm.class)); cards.add(new SetCardInfo("Sickening Dreams", 83, Rarity.UNCOMMON, mage.cards.s.SickeningDreams.class)); + cards.add(new SetCardInfo("Skullscorch", 114, Rarity.RARE, mage.cards.s.Skullscorch.class)); cards.add(new SetCardInfo("Skywing Aven", 47, Rarity.COMMON, mage.cards.s.SkywingAven.class)); cards.add(new SetCardInfo("Slithery Stalker", 84, Rarity.UNCOMMON, mage.cards.s.SlitheryStalker.class)); cards.add(new SetCardInfo("Sonic Seizure", 115, Rarity.COMMON, mage.cards.s.SonicSeizure.class)); cards.add(new SetCardInfo("Soul Scourge", 85, Rarity.COMMON, mage.cards.s.SoulScourge.class)); + cards.add(new SetCardInfo("Stern Judge", 16, Rarity.UNCOMMON, mage.cards.s.SternJudge.class)); cards.add(new SetCardInfo("Strength of Isolation", 17, Rarity.UNCOMMON, mage.cards.s.StrengthOfIsolation.class)); cards.add(new SetCardInfo("Strength of Lunacy", 86, Rarity.UNCOMMON, mage.cards.s.StrengthOfLunacy.class)); cards.add(new SetCardInfo("Stupefying Touch", 48, Rarity.UNCOMMON, mage.cards.s.StupefyingTouch.class)); diff --git a/Mage.Sets/src/mage/sets/UginsFate.java b/Mage.Sets/src/mage/sets/UginsFate.java index c5ec9788cf..a54fa8d598 100644 --- a/Mage.Sets/src/mage/sets/UginsFate.java +++ b/Mage.Sets/src/mage/sets/UginsFate.java @@ -35,7 +35,6 @@ import mage.constants.SetType; * * @author fireshoes */ - public class UginsFate extends ExpansionSet { private static final UginsFate instance = new UginsFate(); diff --git a/Mage.Sets/src/mage/sets/Unglued.java b/Mage.Sets/src/mage/sets/Unglued.java index b775c77245..824c1b65b8 100644 --- a/Mage.Sets/src/mage/sets/Unglued.java +++ b/Mage.Sets/src/mage/sets/Unglued.java @@ -11,6 +11,7 @@ import mage.constants.SetType; * @author lopho */ public class Unglued extends ExpansionSet { + private static final Unglued instance = new Unglued(); public static Unglued getInstance() { diff --git a/Mage.Sets/src/mage/sets/Unhinged.java b/Mage.Sets/src/mage/sets/Unhinged.java index efb8f262cd..e272086b89 100644 --- a/Mage.Sets/src/mage/sets/Unhinged.java +++ b/Mage.Sets/src/mage/sets/Unhinged.java @@ -11,6 +11,7 @@ import mage.constants.SetType; * @author magenoxx */ public class Unhinged extends ExpansionSet { + private static final Unhinged instance = new Unhinged(); public static Unhinged getInstance() { diff --git a/Mage.Sets/src/mage/sets/Unstable.java b/Mage.Sets/src/mage/sets/Unstable.java index 147fec1ae4..338e9e4d38 100644 --- a/Mage.Sets/src/mage/sets/Unstable.java +++ b/Mage.Sets/src/mage/sets/Unstable.java @@ -36,6 +36,7 @@ import mage.constants.SetType; * @author fireshoes */ public class Unstable extends ExpansionSet { + private static final Unstable instance = new Unstable(); public static Unstable getInstance() { diff --git a/Mage.Sets/src/mage/sets/UrzasDestiny.java b/Mage.Sets/src/mage/sets/UrzasDestiny.java index 8d85982e31..6a243198e5 100644 --- a/Mage.Sets/src/mage/sets/UrzasDestiny.java +++ b/Mage.Sets/src/mage/sets/UrzasDestiny.java @@ -73,7 +73,7 @@ public class UrzasDestiny extends ExpansionSet { cards.add(new SetCardInfo("Capashen Standard", 4, Rarity.COMMON, mage.cards.c.CapashenStandard.class)); cards.add(new SetCardInfo("Capashen Templar", 5, Rarity.COMMON, mage.cards.c.CapashenTemplar.class)); cards.add(new SetCardInfo("Carnival of Souls", 55, Rarity.RARE, mage.cards.c.CarnivalOfSouls.class)); - cards.add(new SetCardInfo("Chime of Night", 56, Rarity.COMMON, mage.cards.c.ChimeOfNight.class)); + cards.add(new SetCardInfo("Chime of Night", 56, Rarity.COMMON, mage.cards.c.ChimeOfNight.class)); cards.add(new SetCardInfo("Colos Yearling", 79, Rarity.COMMON, mage.cards.c.ColosYearling.class)); cards.add(new SetCardInfo("Compost", 102, Rarity.UNCOMMON, mage.cards.c.Compost.class)); cards.add(new SetCardInfo("Covetous Dragon", 80, Rarity.RARE, mage.cards.c.CovetousDragon.class)); @@ -95,6 +95,7 @@ public class UrzasDestiny extends ExpansionSet { cards.add(new SetCardInfo("Fodder Cannon", 131, Rarity.UNCOMMON, mage.cards.f.FodderCannon.class)); cards.add(new SetCardInfo("Gamekeeper", 106, Rarity.UNCOMMON, mage.cards.g.Gamekeeper.class)); cards.add(new SetCardInfo("Goblin Berserker", 82, Rarity.UNCOMMON, mage.cards.g.GoblinBerserker.class)); + cards.add(new SetCardInfo("Goblin Festival", 83, Rarity.RARE, mage.cards.g.GoblinFestival.class)); cards.add(new SetCardInfo("Goblin Gardener", 84, Rarity.COMMON, mage.cards.g.GoblinGardener.class)); cards.add(new SetCardInfo("Goblin Marshal", 85, Rarity.RARE, mage.cards.g.GoblinMarshal.class)); cards.add(new SetCardInfo("Goblin Masons", 86, Rarity.COMMON, mage.cards.g.GoblinMasons.class)); @@ -104,6 +105,7 @@ public class UrzasDestiny extends ExpansionSet { cards.add(new SetCardInfo("Hunting Moa", 109, Rarity.UNCOMMON, mage.cards.h.HuntingMoa.class)); cards.add(new SetCardInfo("Illuminated Wings", 34, Rarity.COMMON, mage.cards.i.IlluminatedWings.class)); cards.add(new SetCardInfo("Impatience", 88, Rarity.RARE, mage.cards.i.Impatience.class)); + cards.add(new SetCardInfo("Iridescent Drake", 35, Rarity.UNCOMMON, mage.cards.i.IridescentDrake.class)); cards.add(new SetCardInfo("Junk Diver", 132, Rarity.RARE, mage.cards.j.JunkDiver.class)); cards.add(new SetCardInfo("Keldon Champion", 90, Rarity.UNCOMMON, mage.cards.k.KeldonChampion.class)); cards.add(new SetCardInfo("Keldon Vandals", 91, Rarity.COMMON, mage.cards.k.KeldonVandals.class)); @@ -139,6 +141,7 @@ public class UrzasDestiny extends ExpansionSet { cards.add(new SetCardInfo("Rescue", 44, Rarity.COMMON, mage.cards.r.Rescue.class)); cards.add(new SetCardInfo("Rofellos, Llanowar Emissary", 118, Rarity.RARE, mage.cards.r.RofellosLlanowarEmissary.class)); cards.add(new SetCardInfo("Sanctimony", 16, Rarity.UNCOMMON, mage.cards.s.Sanctimony.class)); + cards.add(new SetCardInfo("Scent of Jasmine", 17, Rarity.COMMON, mage.cards.s.ScentOfJasmine.class)); cards.add(new SetCardInfo("Scour", 18, Rarity.UNCOMMON, mage.cards.s.Scour.class)); cards.add(new SetCardInfo("Serra Advocate", 19, Rarity.UNCOMMON, mage.cards.s.SerraAdvocate.class)); cards.add(new SetCardInfo("Sigil of Sleep", 46, Rarity.COMMON, mage.cards.s.SigilOfSleep.class)); diff --git a/Mage.Sets/src/mage/sets/UrzasLegacy.java b/Mage.Sets/src/mage/sets/UrzasLegacy.java index af856f22ba..f180744195 100644 --- a/Mage.Sets/src/mage/sets/UrzasLegacy.java +++ b/Mage.Sets/src/mage/sets/UrzasLegacy.java @@ -120,8 +120,10 @@ public class UrzasLegacy extends ExpansionSet { cards.add(new SetCardInfo("Miscalculation", 36, Rarity.COMMON, mage.cards.m.Miscalculation.class)); cards.add(new SetCardInfo("Molten Hydra", 85, Rarity.RARE, mage.cards.m.MoltenHydra.class)); cards.add(new SetCardInfo("Mother of Runes", 14, Rarity.UNCOMMON, mage.cards.m.MotherOfRunes.class)); + cards.add(new SetCardInfo("Multani's Presence", 109, Rarity.UNCOMMON, mage.cards.m.MultanisPresence.class)); cards.add(new SetCardInfo("Multani, Maro-Sorcerer", 107, Rarity.RARE, mage.cards.m.MultaniMaroSorcerer.class)); cards.add(new SetCardInfo("Multani's Acolyte", 108, Rarity.COMMON, mage.cards.m.MultanisAcolyte.class)); + cards.add(new SetCardInfo("Multani's Presence", 109, Rarity.UNCOMMON, mage.cards.m.MultanisPresence.class)); cards.add(new SetCardInfo("No Mercy", 56, Rarity.RARE, mage.cards.n.NoMercy.class)); cards.add(new SetCardInfo("Opal Champion", 16, Rarity.COMMON, mage.cards.o.OpalChampion.class)); cards.add(new SetCardInfo("Opportunity", 37, Rarity.UNCOMMON, mage.cards.o.Opportunity.class)); diff --git a/Mage.Sets/src/mage/sets/UrzasSaga.java b/Mage.Sets/src/mage/sets/UrzasSaga.java index b17f45aa9f..3968d93c04 100644 --- a/Mage.Sets/src/mage/sets/UrzasSaga.java +++ b/Mage.Sets/src/mage/sets/UrzasSaga.java @@ -150,6 +150,7 @@ public class UrzasSaga extends ExpansionSet { cards.add(new SetCardInfo("Fertile Ground", 252, Rarity.COMMON, mage.cards.f.FertileGround.class)); cards.add(new SetCardInfo("Fiery Mantle", 186, Rarity.COMMON, mage.cards.f.FieryMantle.class)); cards.add(new SetCardInfo("Fire Ants", 187, Rarity.UNCOMMON, mage.cards.f.FireAnts.class)); + cards.add(new SetCardInfo("Flesh Reaver", 136, Rarity.UNCOMMON, mage.cards.f.FleshReaver.class)); cards.add(new SetCardInfo("Fluctuator", 295, Rarity.RARE, mage.cards.f.Fluctuator.class)); cards.add(new SetCardInfo("Fog Bank", 75, Rarity.UNCOMMON, mage.cards.f.FogBank.class)); cards.add(new SetCardInfo("Forest", 347, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); @@ -175,8 +176,10 @@ public class UrzasSaga extends ExpansionSet { cards.add(new SetCardInfo("Grafted Skullcap", 296, Rarity.RARE, mage.cards.g.GraftedSkullcap.class)); cards.add(new SetCardInfo("Greater Good", 257, Rarity.RARE, mage.cards.g.GreaterGood.class)); cards.add(new SetCardInfo("Great Whale", 77, Rarity.RARE, mage.cards.g.GreatWhale.class)); + cards.add(new SetCardInfo("Greener Pastures", 258, Rarity.RARE, mage.cards.g.GreenerPastures.class)); cards.add(new SetCardInfo("Guma", 197, Rarity.UNCOMMON, mage.cards.g.Guma.class)); cards.add(new SetCardInfo("Hawkeater Moth", 259, Rarity.UNCOMMON, mage.cards.h.HawkeaterMoth.class)); + cards.add(new SetCardInfo("Headlong Rush", 198, Rarity.COMMON, mage.cards.h.HeadlongRush.class)); cards.add(new SetCardInfo("Healing Salve", 16, Rarity.COMMON, mage.cards.h.HealingSalve.class)); cards.add(new SetCardInfo("Heat Ray", 199, Rarity.COMMON, mage.cards.h.HeatRay.class)); cards.add(new SetCardInfo("Herald of Serra", 17, Rarity.RARE, mage.cards.h.HeraldOfSerra.class)); @@ -184,8 +187,10 @@ public class UrzasSaga extends ExpansionSet { cards.add(new SetCardInfo("Hibernation", 79, Rarity.UNCOMMON, mage.cards.h.Hibernation.class)); cards.add(new SetCardInfo("Hidden Ancients", 260, Rarity.UNCOMMON, mage.cards.h.HiddenAncients.class)); cards.add(new SetCardInfo("Hidden Guerrillas", 261, Rarity.UNCOMMON, mage.cards.h.HiddenGuerrillas.class)); + cards.add(new SetCardInfo("Hidden Herd", 262, Rarity.RARE, mage.cards.h.HiddenHerd.class)); cards.add(new SetCardInfo("Hidden Spider", 264, Rarity.COMMON, mage.cards.h.HiddenSpider.class)); cards.add(new SetCardInfo("Hollow Dogs", 137, Rarity.COMMON, mage.cards.h.HollowDogs.class)); + cards.add(new SetCardInfo("Hopping Automaton", 297, Rarity.UNCOMMON, mage.cards.h.HoppingAutomaton.class)); cards.add(new SetCardInfo("Horseshoe Crab", 80, Rarity.COMMON, mage.cards.h.HorseshoeCrab.class)); cards.add(new SetCardInfo("Humble", 18, Rarity.UNCOMMON, mage.cards.h.Humble.class)); cards.add(new SetCardInfo("Hush", 266, Rarity.COMMON, mage.cards.h.Hush.class)); @@ -260,15 +265,18 @@ public class UrzasSaga extends ExpansionSet { cards.add(new SetCardInfo("Rain of Salt", 206, Rarity.UNCOMMON, mage.cards.r.RainOfSalt.class)); cards.add(new SetCardInfo("Ravenous Skirge", 152, Rarity.COMMON, mage.cards.r.RavenousSkirge.class)); cards.add(new SetCardInfo("Raze", 207, Rarity.COMMON, mage.cards.r.Raze.class)); + cards.add(new SetCardInfo("Recantation", 91, Rarity.RARE, mage.cards.r.Recantation.class)); + cards.add(new SetCardInfo("Reclusive Wight", 153, Rarity.UNCOMMON, mage.cards.r.ReclusiveWight.class)); cards.add(new SetCardInfo("Redeem", 33, Rarity.UNCOMMON, mage.cards.r.Redeem.class)); cards.add(new SetCardInfo("Reflexes", 208, Rarity.COMMON, mage.cards.r.Reflexes.class)); cards.add(new SetCardInfo("Rejuvenate", 271, Rarity.COMMON, mage.cards.r.Rejuvenate.class)); - cards.add(new SetCardInfo("Remembrance", 34, Rarity.RARE, mage.cards.r.Remembrance.class)); + cards.add(new SetCardInfo("Remembrance", 34, Rarity.RARE, mage.cards.r.Remembrance.class)); cards.add(new SetCardInfo("Remote Isle", 324, Rarity.COMMON, mage.cards.r.RemoteIsle.class)); cards.add(new SetCardInfo("Reprocess", 154, Rarity.RARE, mage.cards.r.Reprocess.class)); cards.add(new SetCardInfo("Rescind", 92, Rarity.COMMON, mage.cards.r.Rescind.class)); cards.add(new SetCardInfo("Retaliation", 272, Rarity.UNCOMMON, mage.cards.r.Retaliation.class)); cards.add(new SetCardInfo("Rewind", 93, Rarity.COMMON, mage.cards.r.Rewind.class)); + cards.add(new SetCardInfo("Rumbling Crescendo", 210, Rarity.RARE, mage.cards.r.RumblingCrescendo.class)); cards.add(new SetCardInfo("Rune of Protection: Artifacts", 35, Rarity.UNCOMMON, mage.cards.r.RuneOfProtectionArtifacts.class)); cards.add(new SetCardInfo("Rune of Protection: Black", 36, Rarity.COMMON, mage.cards.r.RuneOfProtectionBlack.class)); cards.add(new SetCardInfo("Rune of Protection: Blue", 37, Rarity.COMMON, mage.cards.r.RuneOfProtectionBlue.class)); @@ -287,6 +295,7 @@ public class UrzasSaga extends ExpansionSet { cards.add(new SetCardInfo("Seasoned Marshal", 44, Rarity.UNCOMMON, mage.cards.s.SeasonedMarshal.class)); cards.add(new SetCardInfo("Serra Avatar", 45, Rarity.RARE, mage.cards.s.SerraAvatar.class)); cards.add(new SetCardInfo("Serra's Embrace", 47, Rarity.UNCOMMON, mage.cards.s.SerrasEmbrace.class)); + cards.add(new SetCardInfo("Serra's Liturgy", 49, Rarity.RARE, mage.cards.s.SerrasLiturgy.class)); cards.add(new SetCardInfo("Serra's Sanctum", 325, Rarity.RARE, mage.cards.s.SerrasSanctum.class)); cards.add(new SetCardInfo("Serra Zealot", 46, Rarity.COMMON, mage.cards.s.SerraZealot.class)); cards.add(new SetCardInfo("Shimmering Barrier", 50, Rarity.UNCOMMON, mage.cards.s.ShimmeringBarrier.class)); @@ -305,6 +314,8 @@ public class UrzasSaga extends ExpansionSet { cards.add(new SetCardInfo("Smokestack", 309, Rarity.RARE, mage.cards.s.Smokestack.class)); cards.add(new SetCardInfo("Smoldering Crater", 328, Rarity.COMMON, mage.cards.s.SmolderingCrater.class)); cards.add(new SetCardInfo("Sneak Attack", 218, Rarity.RARE, mage.cards.s.SneakAttack.class)); + cards.add(new SetCardInfo("Somnophore", 97, Rarity.RARE, mage.cards.s.Somnophore.class)); + cards.add(new SetCardInfo("Songstitcher", 52, Rarity.UNCOMMON, mage.cards.s.Songstitcher.class)); cards.add(new SetCardInfo("Spined Fluke", 160, Rarity.UNCOMMON, mage.cards.s.SpinedFluke.class)); cards.add(new SetCardInfo("Spire Owl", 98, Rarity.COMMON, mage.cards.s.SpireOwl.class)); cards.add(new SetCardInfo("Spreading Algae", 274, Rarity.UNCOMMON, mage.cards.s.SpreadingAlgae.class)); @@ -319,6 +330,7 @@ public class UrzasSaga extends ExpansionSet { cards.add(new SetCardInfo("Symbiosis", 275, Rarity.COMMON, mage.cards.s.Symbiosis.class)); cards.add(new SetCardInfo("Tainted Aether", 161, Rarity.RARE, mage.cards.t.TaintedAether.class)); cards.add(new SetCardInfo("Telepathy", 102, Rarity.UNCOMMON, mage.cards.t.Telepathy.class)); + cards.add(new SetCardInfo("Temporal Aperture", 310, Rarity.RARE, mage.cards.t.TemporalAperture.class)); cards.add(new SetCardInfo("Thran Quarry", 329, Rarity.RARE, mage.cards.t.ThranQuarry.class)); cards.add(new SetCardInfo("Thran Turbine", 311, Rarity.UNCOMMON, mage.cards.t.ThranTurbine.class)); cards.add(new SetCardInfo("Thundering Giant", 221, Rarity.UNCOMMON, mage.cards.t.ThunderingGiant.class)); @@ -336,6 +348,7 @@ public class UrzasSaga extends ExpansionSet { cards.add(new SetCardInfo("Unworthy Dead", 163, Rarity.COMMON, mage.cards.u.UnworthyDead.class)); cards.add(new SetCardInfo("Urza's Armor", 313, Rarity.UNCOMMON, mage.cards.u.UrzasArmor.class)); cards.add(new SetCardInfo("Vampiric Embrace", 164, Rarity.UNCOMMON, mage.cards.v.VampiricEmbrace.class)); + cards.add(new SetCardInfo("Vebulid", 165, Rarity.RARE, mage.cards.v.Vebulid.class)); cards.add(new SetCardInfo("Vernal Bloom", 281, Rarity.RARE, mage.cards.v.VernalBloom.class)); cards.add(new SetCardInfo("Viashino Outrider", 223, Rarity.COMMON, mage.cards.v.ViashinoOutrider.class)); cards.add(new SetCardInfo("Viashino Runner", 224, Rarity.COMMON, mage.cards.v.ViashinoRunner.class)); @@ -347,6 +360,8 @@ public class UrzasSaga extends ExpansionSet { cards.add(new SetCardInfo("Voice of Law", 55, Rarity.UNCOMMON, mage.cards.v.VoiceOfLaw.class)); cards.add(new SetCardInfo("Voltaic Key", 314, Rarity.UNCOMMON, mage.cards.v.VoltaicKey.class)); cards.add(new SetCardInfo("Vug Lizard", 227, Rarity.UNCOMMON, mage.cards.v.VugLizard.class)); + cards.add(new SetCardInfo("War Dance", 282, Rarity.UNCOMMON, mage.cards.w.WarDance.class)); + cards.add(new SetCardInfo("Wall of Junk", 315, Rarity.UNCOMMON, mage.cards.w.WallOfJunk.class)); cards.add(new SetCardInfo("Western Paladin", 168, Rarity.RARE, mage.cards.w.WesternPaladin.class)); cards.add(new SetCardInfo("Whetstone", 316, Rarity.RARE, mage.cards.w.Whetstone.class)); cards.add(new SetCardInfo("Whirlwind", 283, Rarity.RARE, mage.cards.w.Whirlwind.class)); diff --git a/Mage.Sets/src/mage/sets/VenserVsKoth.java b/Mage.Sets/src/mage/sets/VenserVsKoth.java index 02d696d433..c945ed85ec 100644 --- a/Mage.Sets/src/mage/sets/VenserVsKoth.java +++ b/Mage.Sets/src/mage/sets/VenserVsKoth.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -36,8 +35,8 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class VenserVsKoth extends ExpansionSet { + private static final VenserVsKoth instance = new VenserVsKoth(); public static VenserVsKoth getInstance() { diff --git a/Mage.Sets/src/mage/sets/VintageMasters.java b/Mage.Sets/src/mage/sets/VintageMasters.java index 74905543cd..df3d41db5d 100644 --- a/Mage.Sets/src/mage/sets/VintageMasters.java +++ b/Mage.Sets/src/mage/sets/VintageMasters.java @@ -24,8 +24,7 @@ * 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.List; diff --git a/Mage.Sets/src/mage/sets/Visions.java b/Mage.Sets/src/mage/sets/Visions.java index f79367c58f..06465ba0d5 100644 --- a/Mage.Sets/src/mage/sets/Visions.java +++ b/Mage.Sets/src/mage/sets/Visions.java @@ -54,6 +54,7 @@ public class Visions extends ExpansionSet { this.numBoosterUncommon = 3; this.numBoosterRare = 1; this.ratioBoosterMythic = 0; + cards.add(new SetCardInfo("Aku Djinn", 1, Rarity.RARE, mage.cards.a.AkuDjinn.class)); cards.add(new SetCardInfo("Anvil of Bogardan", 141, Rarity.RARE, mage.cards.a.AnvilOfBogardan.class)); cards.add(new SetCardInfo("Archangel", 101, Rarity.RARE, mage.cards.a.Archangel.class)); cards.add(new SetCardInfo("Army Ants", 126, Rarity.UNCOMMON, mage.cards.a.ArmyAnts.class)); @@ -104,6 +105,7 @@ public class Visions extends ExpansionSet { cards.add(new SetCardInfo("Impulse", 34, Rarity.COMMON, mage.cards.i.Impulse.class)); cards.add(new SetCardInfo("Infantry Veteran", 109, Rarity.COMMON, mage.cards.i.InfantryVeteran.class)); cards.add(new SetCardInfo("Inspiration", 35, Rarity.COMMON, mage.cards.i.Inspiration.class)); + cards.add(new SetCardInfo("Iron-Heart Chimera", 146, Rarity.UNCOMMON, mage.cards.i.IronHeartChimera.class)); cards.add(new SetCardInfo("Jamuraan Lion", 110, Rarity.COMMON, mage.cards.j.JamuraanLion.class)); cards.add(new SetCardInfo("Jungle Basin", 164, Rarity.UNCOMMON, mage.cards.j.JungleBasin.class)); cards.add(new SetCardInfo("Kaervek's Spite", 13, Rarity.RARE, mage.cards.k.KaerveksSpite.class)); @@ -112,6 +114,10 @@ public class Visions extends ExpansionSet { cards.add(new SetCardInfo("Keeper of Kookus", 85, Rarity.COMMON, mage.cards.k.KeeperOfKookus.class)); cards.add(new SetCardInfo("King Cheetah", 60, Rarity.COMMON, mage.cards.k.KingCheetah.class)); cards.add(new SetCardInfo("Knight of Valor", 111, Rarity.COMMON, mage.cards.k.KnightOfValor.class)); + cards.add(new SetCardInfo("Knight of the Mists", 36, Rarity.COMMON, mage.cards.k.KnightOfTheMists.class)); + cards.add(new SetCardInfo("Kookus", 85, Rarity.RARE, mage.cards.k.Kookus.class)); + cards.add(new SetCardInfo("Lead-Belly Chimera", 148, Rarity.UNCOMMON, mage.cards.l.LeadBellyChimera.class)); + cards.add(new SetCardInfo("Lichenthrope", 62, Rarity.RARE, mage.cards.l.Lichenthrope.class)); cards.add(new SetCardInfo("Lightning Cloud", 87, Rarity.RARE, mage.cards.l.LightningCloud.class)); cards.add(new SetCardInfo("Longbow Archer", 112, Rarity.UNCOMMON, mage.cards.l.LongbowArcher.class)); cards.add(new SetCardInfo("Magma Mine", 149, Rarity.UNCOMMON, mage.cards.m.MagmaMine.class)); @@ -124,6 +130,7 @@ public class Visions extends ExpansionSet { cards.add(new SetCardInfo("Necromancy", 14, Rarity.UNCOMMON, mage.cards.n.Necromancy.class)); cards.add(new SetCardInfo("Necrosavant", 15, Rarity.RARE, mage.cards.n.Necrosavant.class)); cards.add(new SetCardInfo("Nekrataal", 16, Rarity.UNCOMMON, mage.cards.n.Nekrataal.class)); + cards.add(new SetCardInfo("Ovinomancer", 39, Rarity.UNCOMMON, mage.cards.o.Ovinomancer.class)); cards.add(new SetCardInfo("Panther Warriors", 65, Rarity.COMMON, mage.cards.p.PantherWarriors.class)); cards.add(new SetCardInfo("Parapet", 114, Rarity.COMMON, mage.cards.p.Parapet.class)); cards.add(new SetCardInfo("Phyrexian Marauder", 151, Rarity.RARE, mage.cards.p.PhyrexianMarauder.class)); @@ -141,7 +148,9 @@ public class Visions extends ExpansionSet { cards.add(new SetCardInfo("Retribution of the Meek", 119, Rarity.RARE, mage.cards.r.RetributionOfTheMeek.class)); cards.add(new SetCardInfo("Righteous Aura", 120, Rarity.COMMON, mage.cards.r.RighteousAura.class)); cards.add(new SetCardInfo("River Boa", 68, Rarity.COMMON, mage.cards.r.RiverBoa.class)); + cards.add(new SetCardInfo("Rock Slide", 92, Rarity.COMMON, mage.cards.r.RockSlide.class)); cards.add(new SetCardInfo("Rowen", 69, Rarity.RARE, mage.cards.r.Rowen.class)); + cards.add(new SetCardInfo("Sands of Time", 153, Rarity.RARE, mage.cards.s.SandsOfTime.class)); cards.add(new SetCardInfo("Scalebane's Elite", 135, Rarity.UNCOMMON, mage.cards.s.ScalebanesElite.class)); cards.add(new SetCardInfo("Shrieking Drake", 43, Rarity.COMMON, mage.cards.s.ShriekingDrake.class)); cards.add(new SetCardInfo("Simoon", 136, Rarity.UNCOMMON, mage.cards.s.Simoon.class)); @@ -164,6 +173,7 @@ public class Visions extends ExpansionSet { cards.add(new SetCardInfo("Teferi's Realm", 44, Rarity.RARE, mage.cards.t.TeferisRealm.class)); cards.add(new SetCardInfo("Tempest Drake", 139, Rarity.UNCOMMON, mage.cards.t.TempestDrake.class)); cards.add(new SetCardInfo("Three Wishes", 45, Rarity.RARE, mage.cards.t.ThreeWishes.class)); + cards.add(new SetCardInfo("Tin-Wing Chimera", 157, Rarity.UNCOMMON, mage.cards.t.TinWingChimera.class)); cards.add(new SetCardInfo("Tithe", 123, Rarity.RARE, mage.cards.t.Tithe.class)); cards.add(new SetCardInfo("Tremor", 99, Rarity.COMMON, mage.cards.t.Tremor.class)); cards.add(new SetCardInfo("Triangle of War", 158, Rarity.RARE, mage.cards.t.TriangleOfWar.class)); diff --git a/Mage.Sets/src/mage/sets/Weatherlight.java b/Mage.Sets/src/mage/sets/Weatherlight.java index 1db6ab52f3..6d2f6558d7 100644 --- a/Mage.Sets/src/mage/sets/Weatherlight.java +++ b/Mage.Sets/src/mage/sets/Weatherlight.java @@ -125,6 +125,7 @@ public class Weatherlight extends ExpansionSet { cards.add(new SetCardInfo("Hidden Horror", 14, Rarity.UNCOMMON, mage.cards.h.HiddenHorror.class)); cards.add(new SetCardInfo("Hurloon Shaman", 108, Rarity.UNCOMMON, mage.cards.h.HurloonShaman.class)); cards.add(new SetCardInfo("Infernal Tribute", 15, Rarity.RARE, mage.cards.i.InfernalTribute.class)); + cards.add(new SetCardInfo("Inner Sanctum", 134, Rarity.RARE, mage.cards.i.InnerSanctum.class)); cards.add(new SetCardInfo("Jabari's Banner", 150, Rarity.UNCOMMON, mage.cards.j.JabarisBanner.class)); cards.add(new SetCardInfo("Lava Hounds", 109, Rarity.UNCOMMON, mage.cards.l.LavaHounds.class)); cards.add(new SetCardInfo("Llanowar Behemoth", 74, Rarity.UNCOMMON, mage.cards.l.LlanowarBehemoth.class)); @@ -169,6 +170,7 @@ public class Weatherlight extends ExpansionSet { cards.add(new SetCardInfo("Serra's Blessing", 141, Rarity.UNCOMMON, mage.cards.s.SerrasBlessing.class)); cards.add(new SetCardInfo("Serrated Biskelion", 156, Rarity.UNCOMMON, mage.cards.s.SerratedBiskelion.class)); cards.add(new SetCardInfo("Shadow Rider", 21, Rarity.COMMON, mage.cards.s.ShadowRider.class)); + cards.add(new SetCardInfo("Shattered Crypt", 22, Rarity.COMMON, mage.cards.s.ShatteredCrypt.class)); cards.add(new SetCardInfo("Soul Shepherd", 142, Rarity.COMMON, mage.cards.s.SoulShepherd.class)); cards.add(new SetCardInfo("Southern Paladin", 143, Rarity.RARE, mage.cards.s.SouthernPaladin.class)); cards.add(new SetCardInfo("Spinning Darkness", 23, Rarity.COMMON, mage.cards.s.SpinningDarkness.class)); @@ -177,9 +179,12 @@ public class Weatherlight extends ExpansionSet { cards.add(new SetCardInfo("Straw Golem", 158, Rarity.UNCOMMON, mage.cards.s.StrawGolem.class)); cards.add(new SetCardInfo("Striped Bears", 82, Rarity.COMMON, mage.cards.s.StripedBears.class)); cards.add(new SetCardInfo("Tariff", 144, Rarity.RARE, mage.cards.t.Tariff.class)); + cards.add(new SetCardInfo("Teferi's Veil", 53, Rarity.UNCOMMON, mage.cards.t.TeferisVeil.class)); cards.add(new SetCardInfo("Tendrils of Despair", 25, Rarity.COMMON, mage.cards.t.TendrilsOfDespair.class)); + cards.add(new SetCardInfo("Thran Forge", 159, Rarity.UNCOMMON, mage.cards.t.ThranForge.class)); cards.add(new SetCardInfo("Thunderbolt", 115, Rarity.COMMON, mage.cards.t.Thunderbolt.class)); cards.add(new SetCardInfo("Thundermare", 116, Rarity.RARE, mage.cards.t.Thundermare.class)); + cards.add(new SetCardInfo("Timid Drake", 54, Rarity.UNCOMMON, mage.cards.t.TimidDrake.class)); cards.add(new SetCardInfo("Tolarian Drake", 55, Rarity.COMMON, mage.cards.t.TolarianDrake.class)); cards.add(new SetCardInfo("Tolarian Entrancer", 56, Rarity.RARE, mage.cards.t.TolarianEntrancer.class)); cards.add(new SetCardInfo("Tolarian Serpent", 57, Rarity.RARE, mage.cards.t.TolarianSerpent.class)); @@ -187,9 +192,11 @@ public class Weatherlight extends ExpansionSet { cards.add(new SetCardInfo("Tranquil Grove", 84, Rarity.RARE, mage.cards.t.TranquilGrove.class)); cards.add(new SetCardInfo("Uktabi Efreet", 85, Rarity.COMMON, mage.cards.u.UktabiEfreet.class)); cards.add(new SetCardInfo("Urborg Justice", 26, Rarity.RARE, mage.cards.u.UrborgJustice.class)); + cards.add(new SetCardInfo("Urborg Stalker", 27, Rarity.RARE, mage.cards.u.UrborgStalker.class)); cards.add(new SetCardInfo("Veteran Explorer", 86, Rarity.UNCOMMON, mage.cards.v.VeteranExplorer.class)); cards.add(new SetCardInfo("Vitalize", 87, Rarity.COMMON, mage.cards.v.Vitalize.class)); cards.add(new SetCardInfo("Vodalian Illusionist", 58, Rarity.UNCOMMON, mage.cards.v.VodalianIllusionist.class)); + cards.add(new SetCardInfo("Wave of Terror", 28, Rarity.RARE, mage.cards.w.WaveOfTerror.class)); cards.add(new SetCardInfo("Well of Knowledge", 162, Rarity.RARE, mage.cards.w.WellOfKnowledge.class)); cards.add(new SetCardInfo("Winding Canyons", 167, Rarity.RARE, mage.cards.w.WindingCanyons.class)); cards.add(new SetCardInfo("Xanthic Statue", 163, Rarity.RARE, mage.cards.x.XanthicStatue.class)); diff --git a/Mage.Sets/src/mage/sets/WelcomeDeck2016.java b/Mage.Sets/src/mage/sets/WelcomeDeck2016.java index 7989eb3e09..f79a2ab141 100644 --- a/Mage.Sets/src/mage/sets/WelcomeDeck2016.java +++ b/Mage.Sets/src/mage/sets/WelcomeDeck2016.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -37,6 +36,7 @@ import mage.constants.SetType; * @author escplan9 */ public class WelcomeDeck2016 extends ExpansionSet { + private static final WelcomeDeck2016 instance = new WelcomeDeck2016(); public static WelcomeDeck2016 getInstance() { @@ -64,4 +64,4 @@ public class WelcomeDeck2016 extends ExpansionSet { cards.add(new SetCardInfo("Sphinx of Magosi", 6, Rarity.RARE, mage.cards.s.SphinxOfMagosi.class)); cards.add(new SetCardInfo("Walking Corpse", 10, Rarity.COMMON, mage.cards.w.WalkingCorpse.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/WelcomeDeck2017.java b/Mage.Sets/src/mage/sets/WelcomeDeck2017.java index 565535ca75..4d740ea5e9 100644 --- a/Mage.Sets/src/mage/sets/WelcomeDeck2017.java +++ b/Mage.Sets/src/mage/sets/WelcomeDeck2017.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -37,6 +36,7 @@ import mage.constants.SetType; * @author escplan9 */ public class WelcomeDeck2017 extends ExpansionSet { + private static final WelcomeDeck2017 instance = new WelcomeDeck2017(); public static WelcomeDeck2017 getInstance() { @@ -47,7 +47,7 @@ public class WelcomeDeck2017 extends ExpansionSet { super("Welcome Deck 2017", "W17", ExpansionSet.buildDate(2017, 4, 15), SetType.SUPPLEMENTAL_STANDARD_LEGAL); this.hasBasicLands = false; this.hasBoosters = false; - + cards.add(new SetCardInfo("Divine Verdict", 1, Rarity.COMMON, mage.cards.d.DivineVerdict.class)); cards.add(new SetCardInfo("Glory Seeker", 2, Rarity.COMMON, mage.cards.g.GlorySeeker.class)); cards.add(new SetCardInfo("Serra Angel", 3, Rarity.UNCOMMON, mage.cards.s.SerraAngel.class)); @@ -79,4 +79,4 @@ public class WelcomeDeck2017 extends ExpansionSet { cards.add(new SetCardInfo("Stampeding Rhino", 29, Rarity.COMMON, mage.cards.s.StampedingRhino.class)); cards.add(new SetCardInfo("Wing Snare", 30, Rarity.UNCOMMON, mage.cards.w.WingSnare.class)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/WorldMagicCupQualifier.java b/Mage.Sets/src/mage/sets/WorldMagicCupQualifier.java index c37a71f21f..84be56aece 100644 --- a/Mage.Sets/src/mage/sets/WorldMagicCupQualifier.java +++ b/Mage.Sets/src/mage/sets/WorldMagicCupQualifier.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; diff --git a/Mage.Sets/src/mage/sets/Zendikar.java b/Mage.Sets/src/mage/sets/Zendikar.java index b28131d968..8bd0ad46e5 100644 --- a/Mage.Sets/src/mage/sets/Zendikar.java +++ b/Mage.Sets/src/mage/sets/Zendikar.java @@ -24,8 +24,7 @@ * 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 mage.ObjectColor; @@ -48,7 +47,7 @@ public class Zendikar extends ExpansionSet { } private Zendikar() { - super("Zendikar", "ZEN", ExpansionSet.buildDate(2009, 8, 26), SetType.EXPANSION); + super("Zendikar", "ZEN", ExpansionSet.buildDate(2009, 10, 2), SetType.EXPANSION); // October 2nd, 2009 this.blockName = "Zendikar"; this.hasBoosters = true; this.numBoosterLands = 1; diff --git a/Mage.Sets/src/mage/sets/ZendikarVsEldrazi.java b/Mage.Sets/src/mage/sets/ZendikarVsEldrazi.java index 7b4016d027..a39362d81f 100644 --- a/Mage.Sets/src/mage/sets/ZendikarVsEldrazi.java +++ b/Mage.Sets/src/mage/sets/ZendikarVsEldrazi.java @@ -24,8 +24,7 @@ * 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 mage.cards.ExpansionSet; @@ -36,8 +35,8 @@ import mage.constants.SetType; * * @author fireshoes */ - public class ZendikarVsEldrazi extends ExpansionSet { + private static final ZendikarVsEldrazi instance = new ZendikarVsEldrazi(); public static ZendikarVsEldrazi getInstance() { diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/CrewTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/CrewTest.java index df510eb126..8c7f7b8bd5 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/CrewTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/CrewTest.java @@ -30,6 +30,7 @@ package org.mage.test.cards.abilities.keywords; import mage.abilities.keyword.HasteAbility; import mage.constants.CardType; import mage.constants.PhaseStep; +import mage.constants.SubType; import mage.constants.Zone; import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; @@ -57,7 +58,7 @@ public class CrewTest extends CardTestPlayerBase { assertTappedCount("Silvercoat Lion", true, 2); assertPowerToughness(playerA, "Cultivator's Caravan", 5, 5); - assertType("Cultivator's Caravan", CardType.CREATURE, "Vehicle"); + assertType("Cultivator's Caravan", CardType.CREATURE, SubType.VEHICLE); } @Test @@ -78,7 +79,7 @@ public class CrewTest extends CardTestPlayerBase { assertTappedCount("Speedway Fanatic", true, 1); assertPowerToughness(playerA, "Smuggler's Copter", 3, 3); assertAbility(playerA, "Smuggler's Copter", HasteAbility.getInstance(), true); - assertType("Smuggler's Copter", CardType.CREATURE, "Vehicle"); + assertType("Smuggler's Copter", CardType.CREATURE, SubType.VEHICLE); } @Test diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/DeathtouchTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/DeathtouchTest.java index 5d6ec647d1..387bc7127e 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/DeathtouchTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/DeathtouchTest.java @@ -88,7 +88,7 @@ public class DeathtouchTest extends CardTestPlayerBase { activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip {2}", "Marath, Will of the Wild", "Marath, Will of the Wild", StackClause.WHILE_NOT_ON_STACK); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{X},Remove X +1/+1 counters from Marath", "Archangel of Thune"); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{X}, Remove X +1/+1 counters from Marath", "Archangel of Thune"); setChoice(playerA, "X=3"); setModeChoice(playerA, "2"); // Marath deals X damage to target creature or player @@ -132,7 +132,7 @@ public class DeathtouchTest extends CardTestPlayerBase { activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip {2}", "Marath, Will of the Wild"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{X},Remove X +1/+1 counters from Marath", "Elesh Norn, Grand Cenobite"); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{X}, Remove X +1/+1 counters from Marath", "Elesh Norn, Grand Cenobite"); setModeChoice(playerA, "2"); // Marath deals X damage to target creature or player setChoice(playerA, "X=1"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java index 4d9ad42869..058c8787f8 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java @@ -273,7 +273,7 @@ public class ManifestTest extends CardTestPlayerBase { skipInitShuffling(); - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}{B},{T}, Sacrifice another creature"); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}{B}, {T}, Sacrifice another creature"); addTarget(playerB, "Silvercoat Lion"); setStopAt(2, PhaseStep.BEGIN_COMBAT); @@ -309,7 +309,7 @@ public class ManifestTest extends CardTestPlayerBase { skipInitShuffling(); - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}{B},{T}, Sacrifice another creature"); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}{B}, {T}, Sacrifice another creature"); addTarget(playerB, "Silvercoat Lion"); activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "{5}{G}: Turn"); @@ -353,7 +353,7 @@ public class ManifestTest extends CardTestPlayerBase { skipInitShuffling(); - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}{B},{T}, Sacrifice another creature"); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}{B}, {T}, Sacrifice another creature"); addTarget(playerB, "Silvercoat Lion"); setStopAt(2, PhaseStep.END_TURN); @@ -431,7 +431,7 @@ public class ManifestTest extends CardTestPlayerBase { skipInitShuffling(); - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}{B},{T}, Sacrifice another creature"); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}{B}, {T}, Sacrifice another creature"); setChoice(playerB, "Silvercoat Lion"); activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "Sacrifice a creature"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SuspendTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SuspendTest.java index b57d4b3c5a..9f25fe66a1 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SuspendTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SuspendTest.java @@ -82,7 +82,7 @@ public class SuspendTest extends CardTestPlayerBase { addCard(Zone.HAND, playerA, "Silvercoat Lion", 1); addCard(Zone.BATTLEFIELD, playerA, "Jhoira of the Ghitu", 1); - activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},Exile a nonland card from your hand: Put four time counters on the exiled card. If it doesn't have suspend, it gains suspend"); + activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, Exile a nonland card from your hand: Put four time counters on the exiled card. If it doesn't have suspend, it gains suspend"); setChoice(playerA, "Silvercoat Lion"); setStopAt(11, PhaseStep.PRECOMBAT_MAIN); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/exile/ExileAndReturnTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/exile/ExileAndReturnTest.java new file mode 100644 index 0000000000..9d950e8a0f --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/exile/ExileAndReturnTest.java @@ -0,0 +1,145 @@ +/* + * 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 org.mage.test.cards.abilities.oneshot.exile; + +import mage.abilities.keyword.ReachAbility; +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class ExileAndReturnTest extends CardTestPlayerBase { + + @Test + public void testExileAndReturn() { + addCard(Zone.BATTLEFIELD, playerA, "Plains", 7); + // You may choose not to untap Tawnos's Coffin during your untap step. + // {3}, {T}: Exile target creature and all Auras attached to it. Note the number and kind of counters that were on that creature. + // When Tawnos's Coffin leaves the battlefield or becomes untapped, return the exiled card to the battlefield under + // its owner's control tapped with the noted number and kind of counters on it, and if you do, return the exiled Aura + // cards to the battlefield under their owner's control attached to that permanent. + addCard(Zone.HAND, playerA, "Tawnos's Coffin"); // Artifact {4} + + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tawnos's Coffin"); + + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3}, {T}", "Silvercoat Lion"); + + setStopAt(3, PhaseStep.PRECOMBAT_MAIN); + execute(); + + assertPermanentCount(playerA, "Tawnos's Coffin", 1); + assertTapped("Tawnos's Coffin", false); + + assertPermanentCount(playerB, "Silvercoat Lion", 1); + + } + + @Test + public void testExileAndReturnWithCounters() { + addCard(Zone.BATTLEFIELD, playerA, "Plains", 7); + // You may choose not to untap Tawnos's Coffin during your untap step. + // {3}, {T}: Exile target creature and all Auras attached to it. Note the number and kind of counters that were on that creature. + // When Tawnos's Coffin leaves the battlefield or becomes untapped, return the exiled card to the battlefield under + // its owner's control tapped with the noted number and kind of counters on it, and if you do, return the exiled Aura + // cards to the battlefield under their owner's control attached to that permanent. + addCard(Zone.HAND, playerA, "Tawnos's Coffin"); // Artifact {4} + + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion"); + // Put a +1/+1 counter on target creature. + addCard(Zone.BATTLEFIELD, playerB, "Forest", 1); + addCard(Zone.HAND, playerB, "Battlegrowth"); // Instant {G} + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tawnos's Coffin"); + + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Battlegrowth", "Silvercoat Lion"); + activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "{3}, {T}", "Silvercoat Lion"); + + setStopAt(3, PhaseStep.PRECOMBAT_MAIN); + execute(); + + assertPermanentCount(playerA, "Tawnos's Coffin", 1); + assertTapped("Tawnos's Coffin", false); + assertGraveyardCount(playerB, "Battlegrowth", 1); + assertPermanentCount(playerB, "Silvercoat Lion", 1); + assertPowerToughness(playerB, "Silvercoat Lion", 3, 3); + } + + @Test + public void testExileAndReturnWithCountersAndAuras() { + addCard(Zone.BATTLEFIELD, playerA, "Plains", 7); + // You may choose not to untap Tawnos's Coffin during your untap step. + // {3}, {T}: Exile target creature and all Auras attached to it. Note the number and kind of counters that were on that creature. + // When Tawnos's Coffin leaves the battlefield or becomes untapped, return the exiled card to the battlefield under + // its owner's control tapped with the noted number and kind of counters on it, and if you do, return the exiled Aura + // cards to the battlefield under their owner's control attached to that permanent. + addCard(Zone.HAND, playerA, "Tawnos's Coffin"); // Artifact {4} + + // Whenever an Aura becomes attached to Bramble Elemental, put two 1/1 green Saproling creature tokens onto the battlefield. + addCard(Zone.BATTLEFIELD, playerB, "Bramble Elemental"); // Creature 4/4 + // Put a +1/+1 counter on target creature. + addCard(Zone.BATTLEFIELD, playerB, "Forest", 5); + addCard(Zone.HAND, playerB, "Battlegrowth"); // Instant {G} + // Enchant creature (Target a creature as you cast this. This card enters the battlefield attached to that creature.) + // Enchanted creature gets +1/+1 for each Forest you control. + addCard(Zone.HAND, playerB, "Blanchwood Armor"); // Enchantment Aura {2}{G} + // Enchant creature + // When Frog Tongue enters the battlefield, draw a card. + // Enchanted creature has reach. (It can block creatures with flying.) + addCard(Zone.HAND, playerB, "Frog Tongue"); // Enchantment Aura {G} + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tawnos's Coffin"); + + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Battlegrowth", "Bramble Elemental"); + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Blanchwood Armor", "Bramble Elemental"); + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Frog Tongue", "Bramble Elemental"); + activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "{3}, {T}", "Bramble Elemental"); + + setStopAt(3, PhaseStep.PRECOMBAT_MAIN); + execute(); + + assertPermanentCount(playerA, "Tawnos's Coffin", 1); + assertTapped("Tawnos's Coffin", false); + assertGraveyardCount(playerB, "Battlegrowth", 1); + assertPermanentCount(playerB, "Bramble Elemental", 1); + assertGraveyardCount(playerB, "Blanchwood Armor", 0); + assertPermanentCount(playerB, "Blanchwood Armor", 1); + assertGraveyardCount(playerB, "Frog Tongue", 0); + assertPermanentCount(playerB, "Frog Tongue", 1); + assertPermanentCount(playerB, "Saproling", 8); + assertPowerToughness(playerB, "Bramble Elemental", 10, 10); + assertAbility(playerB, "Bramble Elemental", ReachAbility.getInstance(), true); + + assertHandCount(playerB, 3); // 1 from Turn 2 and 2 from Frog Tongue + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/sacrifice/TradingPostTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/sacrifice/TradingPostTest.java index 2ca85699eb..f1e1a6900f 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/sacrifice/TradingPostTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/sacrifice/TradingPostTest.java @@ -59,7 +59,7 @@ public class TradingPostTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Act of Treason", "Savannah Lions"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1},{T}, Sacrifice a creature", "Helm of Possession", "Act of Treason", StackClause.WHILE_NOT_ON_STACK); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}, {T}, Sacrifice a creature", "Helm of Possession", "Act of Treason", StackClause.WHILE_NOT_ON_STACK); setChoice(playerA, "Savannah Lions"); setStopAt(1, PhaseStep.BEGIN_COMBAT); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/other/SoulfireGrandMasterTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/other/SoulfireGrandMasterTest.java index 32387a9896..d180cdadf6 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/other/SoulfireGrandMasterTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/other/SoulfireGrandMasterTest.java @@ -185,7 +185,7 @@ public class SoulfireGrandMasterTest extends CardTestPlayerBase { // {3}, {T}: Rod of Ruin deals 1 damage to target creature or player. addCard(Zone.BATTLEFIELD, playerA, "Rod of Ruin", 1); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3},{T}"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3}, {T}"); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/AngelOfJubilationTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/AngelOfJubilationTest.java index b5acc76e54..e5ce6a0800 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/AngelOfJubilationTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/AngelOfJubilationTest.java @@ -82,7 +82,7 @@ public class AngelOfJubilationTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Island", 4); addCard(Zone.BATTLEFIELD, playerB, "Food Chain"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerB, "{2},Sacrifice a permanent you control: Return target creature to its owner's hand."); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerB, "{2}, Sacrifice a permanent you control: Return target creature to its owner's hand."); playerB.addChoice("Food Chain"); playerA.addTarget("Angel of Jubilation"); @@ -100,7 +100,7 @@ public class AngelOfJubilationTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Nantuko Husk"); addCard(Zone.BATTLEFIELD, playerB, "Llanowar Elves", 2); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerB, "{2},Sacrifice a permanent you control: Return target creature to its owner's hand."); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerB, "{2}, Sacrifice a permanent you control: Return target creature to its owner's hand."); playerB.addChoice("Nantuko Husk"); playerA.addTarget("Angel of Jubilation"); @@ -151,7 +151,7 @@ public class AngelOfJubilationTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Tomb of Urami"); addCard(Zone.BATTLEFIELD, playerB, "Swamp", 4); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerB, "{2}{B}{B},{T}, Sacrifice all lands you control: Create a legendary 5/5 black Demon Spirit creature token with flying named Urami."); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerB, "{2}{B}{B}, {T}, Sacrifice all lands you control: Create a legendary 5/5 black Demon Spirit creature token with flying named Urami."); setStopAt(1, PhaseStep.END_TURN); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/BecomesCreatureTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/BecomesCreatureTest.java index 7fdf646142..8038507fdb 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/BecomesCreatureTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/BecomesCreatureTest.java @@ -29,6 +29,7 @@ package org.mage.test.cards.continuous; import mage.constants.CardType; import mage.constants.PhaseStep; +import mage.constants.SubType; import mage.constants.Zone; import org.junit.Assert; import org.junit.Test; @@ -57,7 +58,7 @@ public class BecomesCreatureTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Chimeric Mass", 1); assertPowerToughness(playerA, "Chimeric Mass", 3, 3); - assertType("Chimeric Mass", CardType.CREATURE, "Construct"); + assertType("Chimeric Mass", CardType.CREATURE, SubType.CONSTRUCT); } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/DaxosTheReturnedTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/DaxosTheReturnedTest.java index 3950923821..f3e52785b4 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/DaxosTheReturnedTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/DaxosTheReturnedTest.java @@ -29,6 +29,7 @@ package org.mage.test.cards.continuous; import mage.constants.CardType; import mage.constants.PhaseStep; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.Filter; @@ -69,7 +70,7 @@ public class DaxosTheReturnedTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Underworld Dreams", 2); assertCounterCount(playerA, CounterType.EXPERIENCE, 2); assertPowerToughness(playerA, "Spirit", 2, 2, Filter.ComparisonScope.All); - assertType("Spirit", CardType.ENCHANTMENT, "Spirit"); + assertType("Spirit", CardType.ENCHANTMENT, SubType.SPIRIT); } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/LandTypeChangingEffectsTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/LandTypeChangingEffectsTest.java index c2cd947b48..a973ff839b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/LandTypeChangingEffectsTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/LandTypeChangingEffectsTest.java @@ -74,7 +74,7 @@ public class LandTypeChangingEffectsTest extends CardTestPlayerBase { assertPermanentCount(playerB, "Chromatic Lantern", 1); - assertType("Canopy Vista", CardType.LAND, "Mountain"); + assertType("Canopy Vista", CardType.LAND, SubType.MOUNTAIN); assertAbility(playerB, "Canopy Vista", new AnyColorManaAbility(), true); } @@ -99,7 +99,7 @@ public class LandTypeChangingEffectsTest extends CardTestPlayerBase { assertPermanentCount(playerB, "Chromatic Lantern", 1); assertPermanentCount(playerA, "Magus of the Moon", 1); - assertType("Canopy Vista", CardType.LAND, "Mountain"); + assertType("Canopy Vista", CardType.LAND, SubType.MOUNTAIN); assertAbility(playerB, "Canopy Vista", new AnyColorManaAbility(), true); } @@ -131,7 +131,7 @@ public class LandTypeChangingEffectsTest extends CardTestPlayerBase { assertPermanentCount(playerB, "Forbidding Watchtower", 1); assertCounterCount("Forbidding Watchtower", CounterType.FLOOD, 1); - assertType("Forbidding Watchtower", CardType.LAND, "Island"); + assertType("Forbidding Watchtower", CardType.LAND, SubType.ISLAND); assertPowerToughness(playerB, "Forbidding Watchtower", 1, 5); } @@ -164,11 +164,11 @@ public class LandTypeChangingEffectsTest extends CardTestPlayerBase { assertPermanentCount(playerA, bloodmoon, 1); assertPermanentCount(playerA, urborgtoy, 1); - assertType(canopyvista, CardType.LAND, "Mountain"); - assertNotSubtype(canopyvista, "Island"); - assertNotSubtype(canopyvista, "Swamp"); - assertType(urborgtoy, CardType.LAND, "Mountain"); - assertNotSubtype(urborgtoy, "Swamp"); + assertType(canopyvista, CardType.LAND, SubType.MOUNTAIN); + assertNotSubtype(canopyvista, SubType.ISLAND); + assertNotSubtype(canopyvista, SubType.SWAMP); + assertType(urborgtoy, CardType.LAND, SubType.MOUNTAIN); + assertNotSubtype(urborgtoy, SubType.SWAMP); Assert.assertTrue("The mana the land can produce should be [{R}] but it's " + playerB.getManaAvailable(currentGame).toString(), playerB.getManaAvailable(currentGame).toString().equals("[{R}]")); } @@ -197,11 +197,11 @@ public class LandTypeChangingEffectsTest extends CardTestPlayerBase { assertPermanentCount(playerA, bloodmoon, 1); assertPermanentCount(playerA, urborgtoy, 1); - assertType(canopyvista, CardType.LAND, "Mountain"); - assertNotSubtype(canopyvista, "Island"); - assertNotSubtype(canopyvista, "Swamp"); - assertType(urborgtoy, CardType.LAND, "Mountain"); - assertNotSubtype(urborgtoy, "Swamp"); + assertType(canopyvista, CardType.LAND, SubType.MOUNTAIN); + assertNotSubtype(canopyvista, SubType.ISLAND); + assertNotSubtype(canopyvista, SubType.SWAMP); + assertType(urborgtoy, CardType.LAND, SubType.MOUNTAIN); + assertNotSubtype(urborgtoy, SubType.SWAMP); Assert.assertTrue("The mana the land can produce should be [{R}] but it's " + playerB.getManaAvailable(currentGame).toString(), playerB.getManaAvailable(currentGame).toString().equals("[{R}]")); } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/LayerTests.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/LayerTests.java index 8de5dce172..c5e0c22786 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/LayerTests.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/LayerTests.java @@ -30,6 +30,7 @@ package org.mage.test.cards.continuous; import mage.constants.CardType; import mage.constants.PhaseStep; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.Filter; import org.junit.Ignore; @@ -53,10 +54,10 @@ public class LayerTests extends CardTestPlayerBase { setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); execute(); - assertType("Urborg, Tomb of Yawgmoth", CardType.LAND, "Mountain"); // Urborg is a Mountain now + assertType("Urborg, Tomb of Yawgmoth", CardType.LAND, SubType.MOUNTAIN); // Urborg is a Mountain now assertPermanentCount(playerA, "Swamp", 0); // no Swamp subtypes on the battlefield assertPermanentCount(playerA, "Plains", 1); // the Plains is not affected by the Urborg - assertType("Plains", CardType.LAND, "Plains"); + assertType("Plains", CardType.LAND, SubType.PLAINS); } @@ -111,7 +112,7 @@ public class LayerTests extends CardTestPlayerBase { setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); execute(); - assertType("Urborg, Tomb of Yawgmoth", CardType.CREATURE, "Swamp"); // Urborg is a creature + assertType("Urborg, Tomb of Yawgmoth", CardType.CREATURE, SubType.SWAMP); // Urborg is a creature assertPowerToughness(playerA, "Urborg, Tomb of Yawgmoth", 0, 1); // Urborg is a 0/1 creature } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/SerraAscendantTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/SerraAscendantTest.java index 1e19212192..ceed83b997 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/SerraAscendantTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/SerraAscendantTest.java @@ -69,7 +69,7 @@ public class SerraAscendantTest extends CardTestPlayerBase { playLand(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Plains"); castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Martyr of Sands"); - activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{1},You may reveal X white cards from your hand"); + activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}, You may reveal X white cards from your hand"); setChoice(playerA,"X=3"); attack(3, playerA, "Serra Ascendant"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/SubTypeChangingEffectsTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/SubTypeChangingEffectsTest.java new file mode 100644 index 0000000000..f8a3f00856 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/SubTypeChangingEffectsTest.java @@ -0,0 +1,307 @@ +/* + * 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 org.mage.test.cards.continuous; + +import mage.cards.Card; +import mage.constants.PhaseStep; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.permanent.Permanent; +import org.junit.Assert; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class SubTypeChangingEffectsTest extends CardTestPlayerBase { + + @Test + public void testConspiracyGiveType() { + // As Conspiracy enters the battlefield, choose a creature type. + // Creature cards you own that aren't on the battlefield, creature spells you control, and creatures you control are the chosen type. + addCard(Zone.HAND, playerA, "Conspiracy", 1); // Enchantment {3}{B}{B} + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5); + + addCard(Zone.HAND, playerA, "Silvercoat Lion"); + addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion"); + addCard(Zone.GRAVEYARD, playerA, "Silvercoat Lion"); + + addCard(Zone.HAND, playerB, "Silvercoat Lion"); + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion"); + addCard(Zone.GRAVEYARD, playerA, "Silvercoat Lion"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Conspiracy"); + setChoice(playerA, "Orc"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Conspiracy", 1); + + Permanent silvercoatLion = getPermanent("Silvercoat Lion", playerA); + Assert.assertEquals(false, silvercoatLion.getSubtype(currentGame).contains(SubType.CAT)); + Assert.assertEquals(true, silvercoatLion.getSubtype(currentGame).contains(SubType.ORC)); + + silvercoatLion = getPermanent("Silvercoat Lion", playerB); + Assert.assertEquals(true, silvercoatLion.getSubtype(currentGame).contains(SubType.CAT)); + Assert.assertEquals(false, silvercoatLion.getSubtype(currentGame).contains(SubType.ORC)); + + for (Card card : playerA.getLibrary().getCards(currentGame)) { + if (card.isCreature()) { + Assert.assertEquals(card.getName() + " should have ORC type", true, card.getSubtype(currentGame).contains(SubType.ORC)); + Assert.assertEquals(card.getName() + " should not have CAT type", false, card.getSubtype(currentGame).contains(SubType.CAT)); + } + } + for (Card card : playerB.getLibrary().getCards(currentGame)) { + if (card.isCreature()) { + Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC)); + Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT)); + } + } + + for (Card card : playerA.getHand().getCards(currentGame)) { + if (card.isCreature()) { + Assert.assertEquals(card.getName() + " should have ORC type", true, card.getSubtype(currentGame).contains(SubType.ORC)); + } + } + for (Card card : playerB.getHand().getCards(currentGame)) { + if (card.isCreature()) { + Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC)); + } + } + for (Card card : playerA.getGraveyard().getCards(currentGame)) { + if (card.isCreature()) { + Assert.assertEquals(card.getName() + " should have ORC type", true, card.getSubtype(currentGame).contains(SubType.ORC)); + } + + } + for (Card card : playerB.getGraveyard().getCards(currentGame)) { + if (card.isCreature()) { + Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC)); + + } + } + + } + + /** + * Conspiracy doesn't revert creature types of non-permanent cards when it + * leaves the battlefield + */ + @Test + public void testConspiracyIsRestCorrectly() { + // As Conspiracy enters the battlefield, choose a creature type. + // Creature cards you own that aren't on the battlefield, creature spells you control, and creatures you control are the chosen type. + addCard(Zone.HAND, playerA, "Conspiracy", 1); // Enchantment {3}{B}{B} + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5); + + addCard(Zone.HAND, playerA, "Silvercoat Lion"); + addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion"); + addCard(Zone.GRAVEYARD, playerA, "Silvercoat Lion"); + + addCard(Zone.HAND, playerB, "Disenchant", 1); // Instant + addCard(Zone.BATTLEFIELD, playerB, "Plains", 2); + + addCard(Zone.HAND, playerB, "Silvercoat Lion"); + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion"); + addCard(Zone.GRAVEYARD, playerA, "Silvercoat Lion"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Conspiracy"); + setChoice(playerA, "Orc"); + + castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Disenchant", "Conspiracy"); + + setStopAt(1, PhaseStep.END_TURN); + execute(); + + assertGraveyardCount(playerA, "Conspiracy", 1); + assertGraveyardCount(playerB, "Disenchant", 1); + + Permanent silvercoatLion = getPermanent("Silvercoat Lion", playerA); + Assert.assertEquals(true, silvercoatLion.getSubtype(currentGame).contains(SubType.CAT)); + Assert.assertEquals(false, silvercoatLion.getSubtype(currentGame).contains(SubType.ORC)); + + for (Card card : playerA.getLibrary().getCards(currentGame)) { + if (card.isCreature()) { + Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC)); + Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT)); + } + } + + for (Card card : playerA.getHand().getCards(currentGame)) { + if (card.isCreature()) { + Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC)); + Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT)); + } + } + + for (Card card : playerA.getGraveyard().getCards(currentGame)) { + if (card.isCreature()) { + Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC)); + Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT)); + } + + } + + } + + @Test + public void testArcaneAdaptationGiveType() { + // As Arcane Adaptation enters the battlefield, choose a creature type. + // Creatures you control are the chosen type in addition to their other types. The same is true for creature spells you control and creature cards you own that aren't on the battlefield. + addCard(Zone.HAND, playerA, "Arcane Adaptation", 1); // Enchantment {2}{U} + addCard(Zone.BATTLEFIELD, playerA, "Island", 3); + + addCard(Zone.HAND, playerA, "Silvercoat Lion"); + addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion"); + addCard(Zone.GRAVEYARD, playerA, "Silvercoat Lion"); + + addCard(Zone.HAND, playerB, "Silvercoat Lion"); + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion"); + addCard(Zone.GRAVEYARD, playerA, "Silvercoat Lion"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Arcane Adaptation"); + setChoice(playerA, "Orc"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Arcane Adaptation", 1); + + Permanent silvercoatLion = getPermanent("Silvercoat Lion", playerA); + Assert.assertEquals(true, silvercoatLion.getSubtype(currentGame).contains(SubType.CAT)); + Assert.assertEquals(true, silvercoatLion.getSubtype(currentGame).contains(SubType.ORC)); + + silvercoatLion = getPermanent("Silvercoat Lion", playerB); + Assert.assertEquals(true, silvercoatLion.getSubtype(currentGame).contains(SubType.CAT)); + Assert.assertEquals(false, silvercoatLion.getSubtype(currentGame).contains(SubType.ORC)); + + for (Card card : playerA.getLibrary().getCards(currentGame)) { + if (card.isCreature()) { + Assert.assertEquals(card.getName() + " should have ORC type", true, card.getSubtype(currentGame).contains(SubType.ORC)); + Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT)); + } + } + for (Card card : playerB.getLibrary().getCards(currentGame)) { + if (card.isCreature()) { + Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC)); + Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT)); + } + } + + for (Card card : playerA.getHand().getCards(currentGame)) { + if (card.isCreature()) { + Assert.assertEquals(card.getName() + " should have ORC type", true, card.getSubtype(currentGame).contains(SubType.ORC)); + Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT)); + } + } + for (Card card : playerB.getHand().getCards(currentGame)) { + if (card.isCreature()) { + Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC)); + Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT)); + } + } + for (Card card : playerA.getGraveyard().getCards(currentGame)) { + if (card.isCreature()) { + Assert.assertEquals(card.getName() + " should have ORC type", true, card.getSubtype(currentGame).contains(SubType.ORC)); + Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT)); + } + + } + for (Card card : playerB.getGraveyard().getCards(currentGame)) { + if (card.isCreature()) { + Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC)); + Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT)); + } + } + + } + + /** + * Arcane Adaptation doesn't revert creature types of non-permanent cards + * when it leaves the battlefield + */ + @Test + public void testArcaneAdaptationIsRestCorrectly() { + // As Arcane Adaptation enters the battlefield, choose a creature type. + // Creatures you control are the chosen type in addition to their other types. The same is true for creature spells you control and creature cards you own that aren't on the battlefield. + addCard(Zone.HAND, playerA, "Arcane Adaptation", 1); // Enchantment {2}{U} + addCard(Zone.BATTLEFIELD, playerA, "Island", 3); + + addCard(Zone.HAND, playerA, "Silvercoat Lion"); + addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion"); + addCard(Zone.GRAVEYARD, playerA, "Silvercoat Lion"); + + addCard(Zone.HAND, playerB, "Disenchant", 1); // Instant + addCard(Zone.BATTLEFIELD, playerB, "Plains", 2); + + addCard(Zone.HAND, playerB, "Silvercoat Lion"); + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion"); + addCard(Zone.GRAVEYARD, playerA, "Silvercoat Lion"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Arcane Adaptation"); + setChoice(playerA, "Orc"); + + castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Disenchant", "Arcane Adaptation"); + + setStopAt(1, PhaseStep.END_TURN); + execute(); + + assertGraveyardCount(playerA, "Arcane Adaptation", 1); + assertGraveyardCount(playerB, "Disenchant", 1); + + Permanent silvercoatLion = getPermanent("Silvercoat Lion", playerA); + Assert.assertEquals(true, silvercoatLion.getSubtype(currentGame).contains(SubType.CAT)); + Assert.assertEquals(false, silvercoatLion.getSubtype(currentGame).contains(SubType.ORC)); + + for (Card card : playerA.getLibrary().getCards(currentGame)) { + if (card.isCreature()) { + Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC)); + Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT)); + } + } + + for (Card card : playerA.getHand().getCards(currentGame)) { + if (card.isCreature()) { + Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC)); + Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT)); + } + } + + for (Card card : playerA.getGraveyard().getCards(currentGame)) { + if (card.isCreature()) { + Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC)); + Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT)); + } + + } + + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/WardenOfTheFirstTreeTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/WardenOfTheFirstTreeTest.java index fcd088bd56..edd60a8a74 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/WardenOfTheFirstTreeTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/WardenOfTheFirstTreeTest.java @@ -31,6 +31,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.abilities.keyword.TrampleAbility; import mage.constants.CardType; import mage.constants.PhaseStep; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.Filter; import org.junit.Test; @@ -58,8 +59,8 @@ public class WardenOfTheFirstTreeTest extends CardTestPlayerBase { execute(); assertPowerToughness(playerA, "Warden of the First Tree", 3, 3, Filter.ComparisonScope.Any); - assertType("Warden of the First Tree", CardType.CREATURE, "Human"); - assertType("Warden of the First Tree", CardType.CREATURE, "Warrior"); + assertType("Warden of the First Tree", CardType.CREATURE, SubType.HUMAN); + assertType("Warden of the First Tree", CardType.CREATURE, SubType.WARRIOR); assertAbility(playerA, "Warden of the First Tree", TrampleAbility.getInstance(), false); assertAbility(playerA, "Warden of the First Tree", LifelinkAbility.getInstance(), false); } @@ -81,9 +82,9 @@ public class WardenOfTheFirstTreeTest extends CardTestPlayerBase { execute(); assertPowerToughness(playerA, "Warden of the First Tree", 3, 3, Filter.ComparisonScope.Any); - assertType("Warden of the First Tree", CardType.CREATURE, "Human"); - assertType("Warden of the First Tree", CardType.CREATURE, "Spirit"); - assertType("Warden of the First Tree", CardType.CREATURE, "Warrior"); + assertType("Warden of the First Tree", CardType.CREATURE, SubType.HUMAN); + assertType("Warden of the First Tree", CardType.CREATURE, SubType.SPIRIT); + assertType("Warden of the First Tree", CardType.CREATURE, SubType.WARRIOR); assertAbility(playerA, "Warden of the First Tree", TrampleAbility.getInstance(), true); assertAbility(playerA, "Warden of the First Tree", LifelinkAbility.getInstance(), true); } @@ -107,9 +108,9 @@ public class WardenOfTheFirstTreeTest extends CardTestPlayerBase { execute(); assertPowerToughness(playerA, "Warden of the First Tree", 8, 8, Filter.ComparisonScope.Any); - assertType("Warden of the First Tree", CardType.CREATURE, "Human"); - assertType("Warden of the First Tree", CardType.CREATURE, "Spirit"); - assertType("Warden of the First Tree", CardType.CREATURE, "Warrior"); + assertType("Warden of the First Tree", CardType.CREATURE, SubType.HUMAN); + assertType("Warden of the First Tree", CardType.CREATURE, SubType.SPIRIT); + assertType("Warden of the First Tree", CardType.CREATURE, SubType.WARRIOR); assertAbility(playerA, "Warden of the First Tree", TrampleAbility.getInstance(), true); assertAbility(playerA, "Warden of the First Tree", LifelinkAbility.getInstance(), true); } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/control/ExchangeControlTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/control/ExchangeControlTest.java index 9eba9d61cb..038f5665e8 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/control/ExchangeControlTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/control/ExchangeControlTest.java @@ -214,7 +214,7 @@ public class ExchangeControlTest extends CardTestPlayerBase { addTarget(playerA, "Manta Riders"); // now use the activated ability to make the "Silvercoat Lions" (that became Mana Riders) flying - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{U}: {this} gains Flying until end of turn."); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{U}: {this} gains flying until end of turn."); setStopAt(1, PhaseStep.END_TURN); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlDiedCastAgainTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlDiedCastAgainTest.java index f6cf2fd3f1..2246c955a1 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlDiedCastAgainTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlDiedCastAgainTest.java @@ -100,7 +100,7 @@ public class GainControlDiedCastAgainTest extends CardTestPlayerBase { castSpell(4, PhaseStep.POSTCOMBAT_MAIN, playerB, "Akroma's Vengeance"); // Put Elesh Norn back on library - activateAbility(5, PhaseStep.END_TURN, playerB, "{1}{B},{T}: Put target creature card", "Elesh Norn, Grand Cenobite"); + activateAbility(5, PhaseStep.END_TURN, playerB, "{1}{B}, {T}: Put target creature card", "Elesh Norn, Grand Cenobite"); castSpell(6, PhaseStep.PRECOMBAT_MAIN, playerB, "Elesh Norn, Grand Cenobite"); setStopAt(6, PhaseStep.BEGIN_COMBAT); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlTargetEffectTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlTargetEffectTest.java index 075d4f1ac0..3a169d8f9d 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlTargetEffectTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlTargetEffectTest.java @@ -60,10 +60,10 @@ public class GainControlTargetEffectTest extends CardTestPlayerBase { // Persist (When this creature dies, if it had no -1/-1 counters on it, return it to the battlefield under its owner's control with a -1/-1 counter on it.) addCard(Zone.BATTLEFIELD, playerB, "Glen Elendra Archmage"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Gain control of target creature with power less than or equal to the number of Islands you control for as long as {this} remains tapped.", "Glen Elendra Archmage"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}: Gain control of target creature with power less than or equal to the number of Islands you control for as long as {this} remains tapped.", "Glen Elendra Archmage"); castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Strike", playerA); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{U},Sacrifice {this}: Counter target noncreature spell.", "Lightning Strike"); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{U}, Sacrifice {this}: Counter target noncreature spell.", "Lightning Strike"); setStopAt(1, PhaseStep.END_TURN); execute(); @@ -94,7 +94,7 @@ public class GainControlTargetEffectTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Mutavault", 1); activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}: Until end of turn {this} becomes"); - activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "{2},{T}: Gain control", "Mutavault"); + activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "{2}, {T}: Gain control", "Mutavault"); setChoice(playerA, "No"); // Don't untap the Shackles setStopAt(3, PhaseStep.PRECOMBAT_MAIN); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/control/WillbreakerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/control/WillbreakerTest.java index 103c8848bb..893bd4fd0d 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/control/WillbreakerTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/control/WillbreakerTest.java @@ -60,7 +60,7 @@ public class WillbreakerTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{B},Remove", "Silvercoat Lion"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{B}, Remove", "Silvercoat Lion"); setChoice(playerA, "X=0"); setStopAt(1, PhaseStep.BEGIN_COMBAT); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/FeldonOfTheThirdPathTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/FeldonOfTheThirdPathTest.java index d157967cb5..29f0bf95f4 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/FeldonOfTheThirdPathTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/FeldonOfTheThirdPathTest.java @@ -58,7 +58,7 @@ public class FeldonOfTheThirdPathTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3); activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerA, - "{2}{R},{T}: Create a token that's a copy of target creature card in your graveyard, except it's an artifact in addition to its other types. It gains haste. Sacrifice it at the beginning of the next end step.", + "{2}{R}, {T}: Create a token that's a copy of target creature card in your graveyard, except it's an artifact in addition to its other types. It gains haste. Sacrifice it at the beginning of the next end step.", "Highway Robber"); setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); execute(); @@ -82,7 +82,7 @@ public class FeldonOfTheThirdPathTest extends CardTestPlayerBase { addCard(Zone.GRAVEYARD, playerB, "Silvercoat Lion", 1); activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerA, - "{2}{R},{T}: Create a token that's a copy of target creature card in your graveyard, except it's an artifact in addition to its other types. It gains haste. Sacrifice it at the beginning of the next end step.", + "{2}{R}, {T}: Create a token that's a copy of target creature card in your graveyard, except it's an artifact in addition to its other types. It gains haste. Sacrifice it at the beginning of the next end step.", "Sepulchral Primordial"); addTarget(playerA, "Silvercoat Lion"); // target for ETB Sepulchral Primordial setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/IdentityThiefTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/IdentityThiefTest.java index 9c148eb115..7cbddace35 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/IdentityThiefTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/IdentityThiefTest.java @@ -1,129 +1,129 @@ -/* - * 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 org.mage.test.cards.copy; - -import mage.constants.PhaseStep; -import mage.constants.Zone; -import mage.counters.CounterType; -import org.junit.Test; -import org.mage.test.serverside.base.CardTestPlayerBase; - -/** - * - * @author LevelX2 - */ -public class IdentityThiefTest extends CardTestPlayerBase { - - /** - * This is probably a narrow case of a wider problem base. Identity Thief - * copied Molten Sentry and died immediately (should have been either a 5/2 - * or a 2/5, whatever the original Molten Sentry was). - */ - @Test - public void testCopyCreature() { - addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4); - // As Molten Sentry enters the battlefield, flip a coin. If the coin comes up heads, Molten Sentry enters the battlefield as a 5/2 creature with haste. - // If it comes up tails, Molten Sentry enters the battlefield as a 2/5 creature with defender. - addCard(Zone.HAND, playerA, "Molten Sentry"); // {3}{R} - - // Whenever Identity Thief attacks, you may exile another target nontoken creature. - // If you do, Identity Thief becomes a copy of that creature until end of turn. - // Return the exiled card to the battlefield under its owner's control at the beginning of the next end step. - addCard(Zone.BATTLEFIELD, playerB, "Identity Thief"); // {2}{U}{U} - - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Molten Sentry"); - - attack(2, playerB, "Identity Thief"); - addTarget(playerB, "Molten Sentry"); - - setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); - execute(); - - assertExileCount(playerA, 1); - assertExileCount("Molten Sentry", 1); - - assertPermanentCount(playerB, "Identity Thief", 0); - assertPermanentCount(playerB, "Molten Sentry", 1); - } - - @Test - public void testCopyPrimalClay() { - addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4); - // As Primal Clay enters the battlefield, it becomes your choice of a 3/3 artifact creature, a 2/2 artifact creature with flying, or a 1/6 Wall artifact creature with defender in addition to its other types. - addCard(Zone.HAND, playerA, "Primal Clay"); // {4} - - // Whenever Identity Thief attacks, you may exile another target nontoken creature. - // If you do, Identity Thief becomes a copy of that creature until end of turn. - // Return the exiled card to the battlefield under its owner's control at the beginning of the next end step. - addCard(Zone.BATTLEFIELD, playerB, "Identity Thief"); // {2}{U}{U} - - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Primal Clay"); - - attack(2, playerB, "Identity Thief"); - addTarget(playerB, "Primal Clay"); - - setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); - execute(); - - assertExileCount(playerA, 1); - assertExileCount("Primal Clay", 1); - - assertPermanentCount(playerB, "Identity Thief", 0); - assertPermanentCount(playerB, "Primal Clay", 1); - } - - @Test - public void testShouldNotCopyP1P1Counters() { - addCard(Zone.BATTLEFIELD, playerA, "Sylvan Advocate", 1); // {1}{G} 2/3 vigilance - addCard(Zone.BATTLEFIELD, playerA, "Forest", 1); - addCard(Zone.HAND, playerA, "Battlegrowth"); // {G} instant - Put a +1/+1 counter on target creature. - - // Whenever Identity Thief attacks, you may exile another target nontoken creature. - // If you do, Identity Thief becomes a copy of that creature until end of turn. - // Return the exiled card to the battlefield under its owner's control at the beginning of the next end step. - addCard(Zone.BATTLEFIELD, playerB, "Identity Thief"); // {2}{U}{U} - - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Battlegrowth"); - addTarget(playerA, "Sylvan Advocate"); - - attack(2, playerB, "Identity Thief"); - addTarget(playerB, "Sylvan Advocate"); - - setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); - execute(); - - assertExileCount(playerA, 1); - assertExileCount("Sylvan Advocate", 1); - - assertGraveyardCount(playerA, "Battlegrowth", 1); - assertPermanentCount(playerB, "Identity Thief", 0); - assertPermanentCount(playerB, "Sylvan Advocate", 1); - assertCounterCount(playerB, "Sylvan Advocate", CounterType.P1P1, 0); - assertPowerToughness(playerB, "Sylvan Advocate", 2, 3); // finds it with 3 power 4 toughness - } -} +/* + * 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 org.mage.test.cards.copy; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import mage.counters.CounterType; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class IdentityThiefTest extends CardTestPlayerBase { + + /** + * This is probably a narrow case of a wider problem base. Identity Thief + * copied Molten Sentry and died immediately (should have been either a 5/2 + * or a 2/5, whatever the original Molten Sentry was). + */ + @Test + public void testCopyCreature() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4); + // As Molten Sentry enters the battlefield, flip a coin. If the coin comes up heads, Molten Sentry enters the battlefield as a 5/2 creature with haste. + // If it comes up tails, Molten Sentry enters the battlefield as a 2/5 creature with defender. + addCard(Zone.HAND, playerA, "Molten Sentry"); // {3}{R} + + // Whenever Identity Thief attacks, you may exile another target nontoken creature. + // If you do, Identity Thief becomes a copy of that creature until end of turn. + // Return the exiled card to the battlefield under its owner's control at the beginning of the next end step. + addCard(Zone.BATTLEFIELD, playerB, "Identity Thief"); // {2}{U}{U} + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Molten Sentry"); + + attack(2, playerB, "Identity Thief"); + addTarget(playerB, "Molten Sentry"); + + setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertExileCount(playerA, 1); + assertExileCount("Molten Sentry", 1); + + assertPermanentCount(playerB, "Identity Thief", 0); + assertPermanentCount(playerB, "Molten Sentry", 1); + } + + @Test + public void testCopyPrimalClay() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4); + // As Primal Clay enters the battlefield, it becomes your choice of a 3/3 artifact creature, a 2/2 artifact creature with flying, or a 1/6 Wall artifact creature with defender in addition to its other types. + addCard(Zone.HAND, playerA, "Primal Clay"); // {4} + + // Whenever Identity Thief attacks, you may exile another target nontoken creature. + // If you do, Identity Thief becomes a copy of that creature until end of turn. + // Return the exiled card to the battlefield under its owner's control at the beginning of the next end step. + addCard(Zone.BATTLEFIELD, playerB, "Identity Thief"); // {2}{U}{U} + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Primal Clay"); + + attack(2, playerB, "Identity Thief"); + addTarget(playerB, "Primal Clay"); + + setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertExileCount(playerA, 1); + assertExileCount("Primal Clay", 1); + + assertPermanentCount(playerB, "Identity Thief", 0); + assertPermanentCount(playerB, "Primal Clay", 1); + } + + @Test + public void testShouldNotCopyP1P1Counters() { + addCard(Zone.BATTLEFIELD, playerA, "Sylvan Advocate", 1); // {1}{G} 2/3 vigilance + addCard(Zone.BATTLEFIELD, playerA, "Forest", 1); + addCard(Zone.HAND, playerA, "Battlegrowth"); // {G} instant - Put a +1/+1 counter on target creature. + + // Whenever Identity Thief attacks, you may exile another target nontoken creature. + // If you do, Identity Thief becomes a copy of that creature until end of turn. + // Return the exiled card to the battlefield under its owner's control at the beginning of the next end step. + addCard(Zone.BATTLEFIELD, playerB, "Identity Thief"); // {2}{U}{U} + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Battlegrowth"); + addTarget(playerA, "Sylvan Advocate"); + + attack(2, playerB, "Identity Thief"); + addTarget(playerB, "Sylvan Advocate"); + + setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertExileCount(playerA, 1); + assertExileCount("Sylvan Advocate", 1); + + assertGraveyardCount(playerA, "Battlegrowth", 1); + assertPermanentCount(playerB, "Identity Thief", 0); + assertPermanentCount(playerB, "Sylvan Advocate", 1); + assertCounterCount(playerB, "Sylvan Advocate", CounterType.P1P1, 0); + assertPowerToughness(playerB, "Sylvan Advocate", 2, 3); // finds it with 3 power 4 toughness + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/IsochronScepterTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/IsochronScepterTest.java index 2036f56dc2..8369719040 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/IsochronScepterTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/IsochronScepterTest.java @@ -71,7 +71,7 @@ public class IsochronScepterTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Isochron Scepter"); addTarget(playerA, "Lightning Bolt"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{2},{T}:"); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{2}, {T}:"); setChoice(playerA, "Yes"); setChoice(playerA, "Yes"); @@ -93,7 +93,7 @@ public class IsochronScepterTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Isochron Scepter"); addTarget(playerA, "Lightning Bolt"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{2},{T}:"); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{2}, {T}:"); setChoice(playerA, "Yes"); setChoice(playerA, "No"); @@ -136,7 +136,7 @@ public class IsochronScepterTest extends CardTestPlayerBase { attack(2, playerB, "Dross Crocodile"); attack(2, playerB, "Dross Crocodile"); - activateAbility(2, PhaseStep.DECLARE_BLOCKERS, playerA, "{2},{T}:"); + activateAbility(2, PhaseStep.DECLARE_BLOCKERS, playerA, "{2}, {T}:"); setChoice(playerA, "Yes"); setChoice(playerA, "Yes"); @@ -180,7 +180,7 @@ public class IsochronScepterTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Isochron Scepter"); addTarget(playerA, "Silence"); - activateAbility(2, PhaseStep.UPKEEP, playerA, "{2},{T}:"); + activateAbility(2, PhaseStep.UPKEEP, playerA, "{2}, {T}:"); setChoice(playerA, "Yes"); setChoice(playerA, "Yes"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/LazavDimirMastermindTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/LazavDimirMastermindTest.java index 9586b31992..6d0c8f0519 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/LazavDimirMastermindTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/LazavDimirMastermindTest.java @@ -1,6 +1,7 @@ package org.mage.test.cards.copy; import mage.abilities.keyword.DeathtouchAbility; +import mage.constants.SubType; import mage.abilities.keyword.FlyingAbility; import mage.constants.PhaseStep; import mage.constants.Zone; @@ -48,7 +49,7 @@ public class LazavDimirMastermindTest extends CardTestPlayerBase { assertPowerToughness(playerA, "Lazav, Dimir Mastermind", 3, 2); Permanent lazav = getPermanent("Lazav, Dimir Mastermind", playerA.getId()); - Assert.assertTrue(lazav.getSubtype(currentGame).contains("Griffin")); + Assert.assertTrue(lazav.getSubtype(currentGame).contains(SubType.GRIFFIN)); Assert.assertTrue("Lazav, Dimir Mastermind must have flying",lazav.getAbilities().contains(FlyingAbility.getInstance())); } @@ -74,8 +75,8 @@ public class LazavDimirMastermindTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Lazav, Dimir Mastermind", 1); assertPowerToughness(playerA, "Lazav, Dimir Mastermind", 3, 3); Permanent lazav = getPermanent("Lazav, Dimir Mastermind", playerA.getId()); - Assert.assertTrue(lazav.getSubtype(currentGame).contains("Ogre")); - Assert.assertTrue(lazav.getSubtype(currentGame).contains("Rogue")); + Assert.assertTrue(lazav.getSubtype(currentGame).contains(SubType.OGRE)); + Assert.assertTrue(lazav.getSubtype(currentGame).contains(SubType.ROGUE)); Permanent gutterSkulk = getPermanent("Gutter Skulk", playerA.getId()); Assert.assertTrue("Gutter Skulk should have deathtouch but hasn't", gutterSkulk.getAbilities().contains(DeathtouchAbility.getInstance())); @@ -116,7 +117,7 @@ public class LazavDimirMastermindTest extends CardTestPlayerBase { Permanent lazav = getPermanent("Lazav, Dimir Mastermind", playerA.getId()); Assert.assertTrue(lazav.getAbilities().contains(FlyingAbility.getInstance())); - Assert.assertTrue(lazav.getSubtype(currentGame).contains("Specter")); + Assert.assertTrue(lazav.getSubtype(currentGame).contains(SubType.SPECTER)); Assert.assertTrue(lazav.isLegendary()); assertPermanentCount(playerA, "Silvercoat Lion", 1); @@ -146,7 +147,7 @@ public class LazavDimirMastermindTest extends CardTestPlayerBase { assertPowerToughness(playerA, "Lazav, Dimir Mastermind", 2, 2); Permanent lazav = getPermanent("Lazav, Dimir Mastermind", playerA.getId()); - Assert.assertTrue(lazav.getSubtype(currentGame).contains("Cat")); + Assert.assertTrue(lazav.getSubtype(currentGame).contains(SubType.CAT)); Assert.assertTrue(lazav.isLegendary()); } @@ -190,7 +191,7 @@ public class LazavDimirMastermindTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Lazav, Dimir Mastermind", 1); assertPowerToughness(playerA, "Lazav, Dimir Mastermind", 3, 3); Permanent lazav = getPermanent("Lazav, Dimir Mastermind", playerA.getId()); - Assert.assertFalse(lazav.getSubtype(currentGame).contains("Griffin")); // no Griffin type + Assert.assertFalse(lazav.getSubtype(currentGame).contains(SubType.GRIFFIN)); // no Griffin type Assert.assertFalse("Lazav, Dimir Mastermind must have flying",lazav.getAbilities().contains(FlyingAbility.getInstance())); @@ -226,7 +227,7 @@ public class LazavDimirMastermindTest extends CardTestPlayerBase { assertPowerToughness(playerA, "Lazav, Dimir Mastermind", 3, 2); Permanent lazav = getPermanent("Lazav, Dimir Mastermind", playerA.getId()); - Assert.assertTrue(lazav.getSubtype(currentGame).contains("Griffin")); + Assert.assertTrue(lazav.getSubtype(currentGame).contains(SubType.GRIFFIN)); Assert.assertTrue("Lazav, Dimir Mastermind must have flying",lazav.getAbilities().contains(FlyingAbility.getInstance())); } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/MimicVatTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/MimicVatTest.java index ca5ab2ebfd..b708a3d6c9 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/MimicVatTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/MimicVatTest.java @@ -1,114 +1,114 @@ -/* - * 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 org.mage.test.cards.copy; - -import mage.constants.PhaseStep; -import mage.constants.Zone; -import org.junit.Test; -import org.mage.test.serverside.base.CardTestPlayerBase; - -/** - * - * @author LevelX2 - */ -public class MimicVatTest extends CardTestPlayerBase { - - /** - * All the clone type cards that may enter as a copy of something don't work - * correctly with Mimic Vat. The only one I found that works (the token - * being able to clone something) is Phyrexian Metamorph. Phyrexian - * Metamorph is implemented differently than the rest of similar functioning - * cards, ie. Clone, Phantasmal Image, Body Double, Clever Impersonator. - * Also The copy ability on Phyrexian Metamorph is optional but it is forced - * in game - */ - @Test - public void TestClone() { - addCard(Zone.BATTLEFIELD, playerA, "Island", 6); - // Imprint - Whenever a nontoken creature dies, you may exile that card. If you do, return each other card exiled with Mimic Vat to its owner's graveyard. - // {3}, {T}: Create a tokenonto the battlefield that's a copy of the exiled card. It gains haste. Exile it at the beginning of the next end step. - addCard(Zone.BATTLEFIELD, playerA, "Mimic Vat", 1); // Artifact {3} - // {2}, {T}, Sacrifice a creature: Draw a card. - addCard(Zone.BATTLEFIELD, playerA, "Phyrexian Vault", 1); - - // You may have Clone enter the battlefield as a copy of any creature on the battlefield. - addCard(Zone.HAND, playerA, "Clone", 1);// Creature {3}{U} - - addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); - - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Clone"); - setChoice(playerA, "Silvercoat Lion"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}, Sacrifice a creature"); - setChoice(playerA, "Yes"); - - activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{3},{T}: Create a token"); - setChoice(playerA, "Silvercoat Lion"); - - setStopAt(3, PhaseStep.BEGIN_COMBAT); - execute(); - - assertExileCount("Clone", 1); - assertPermanentCount(playerB, "Silvercoat Lion", 1); - assertPermanentCount(playerA, "Silvercoat Lion", 1); - - } - - @Test - public void TestPhyrexianMetamorph() { - addCard(Zone.BATTLEFIELD, playerA, "Island", 6); - // Imprint - Whenever a nontoken creature dies, you may exile that card. If you do, return each other card exiled with Mimic Vat to its owner's graveyard. - // {3}, {T}: Create a token that's a copy of a card exiled with Mimic Vat. It gains haste. Exile it at the beginning of the next end step. - addCard(Zone.BATTLEFIELD, playerA, "Mimic Vat", 1); // Artifact {3} - // {2}, {T}, Sacrifice a creature: Draw a card. - addCard(Zone.BATTLEFIELD, playerA, "Phyrexian Vault", 1); - - // You may have Phyrexian Metamorph enter the battlefield as a copy of any artifact or creature on the battlefield, except it's an artifact in addition to its other types. - addCard(Zone.HAND, playerA, "Phyrexian Metamorph", 1);// Creature {3}{U/P} - - addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); - - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Phyrexian Metamorph"); - setChoice(playerA, "Yes"); - setChoice(playerA, "Silvercoat Lion"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}, Sacrifice a creature"); - setChoice(playerA, "Yes"); - - activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{3},{T}: Create a token that's a copy of a card exiled with "); - setChoice(playerA, "Yes"); - setChoice(playerA, "Silvercoat Lion"); - - setStopAt(3, PhaseStep.BEGIN_COMBAT); - execute(); - - assertExileCount("Phyrexian Metamorph", 1); - assertPermanentCount(playerB, "Silvercoat Lion", 1); - assertPermanentCount(playerA, "Silvercoat Lion", 1); - - } - -} +/* + * 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 org.mage.test.cards.copy; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class MimicVatTest extends CardTestPlayerBase { + + /** + * All the clone type cards that may enter as a copy of something don't work + * correctly with Mimic Vat. The only one I found that works (the token + * being able to clone something) is Phyrexian Metamorph. Phyrexian + * Metamorph is implemented differently than the rest of similar functioning + * cards, ie. Clone, Phantasmal Image, Body Double, Clever Impersonator. + * Also The copy ability on Phyrexian Metamorph is optional but it is forced + * in game + */ + @Test + public void TestClone() { + addCard(Zone.BATTLEFIELD, playerA, "Island", 6); + // Imprint - Whenever a nontoken creature dies, you may exile that card. If you do, return each other card exiled with Mimic Vat to its owner's graveyard. + // {3}, {T}: Create a tokenonto the battlefield that's a copy of the exiled card. It gains haste. Exile it at the beginning of the next end step. + addCard(Zone.BATTLEFIELD, playerA, "Mimic Vat", 1); // Artifact {3} + // {2}, {T}, Sacrifice a creature: Draw a card. + addCard(Zone.BATTLEFIELD, playerA, "Phyrexian Vault", 1); + + // You may have Clone enter the battlefield as a copy of any creature on the battlefield. + addCard(Zone.HAND, playerA, "Clone", 1);// Creature {3}{U} + + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Clone"); + setChoice(playerA, "Silvercoat Lion"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}, Sacrifice a creature"); + setChoice(playerA, "Yes"); + + activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{3}, {T}: Create a token"); + setChoice(playerA, "Silvercoat Lion"); + + setStopAt(3, PhaseStep.BEGIN_COMBAT); + execute(); + + assertExileCount("Clone", 1); + assertPermanentCount(playerB, "Silvercoat Lion", 1); + assertPermanentCount(playerA, "Silvercoat Lion", 1); + + } + + @Test + public void TestPhyrexianMetamorph() { + addCard(Zone.BATTLEFIELD, playerA, "Island", 6); + // Imprint - Whenever a nontoken creature dies, you may exile that card. If you do, return each other card exiled with Mimic Vat to its owner's graveyard. + // {3}, {T}: Create a token that's a copy of a card exiled with Mimic Vat. It gains haste. Exile it at the beginning of the next end step. + addCard(Zone.BATTLEFIELD, playerA, "Mimic Vat", 1); // Artifact {3} + // {2}, {T}, Sacrifice a creature: Draw a card. + addCard(Zone.BATTLEFIELD, playerA, "Phyrexian Vault", 1); + + // You may have Phyrexian Metamorph enter the battlefield as a copy of any artifact or creature on the battlefield, except it's an artifact in addition to its other types. + addCard(Zone.HAND, playerA, "Phyrexian Metamorph", 1);// Creature {3}{U/P} + + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Phyrexian Metamorph"); + setChoice(playerA, "Yes"); + setChoice(playerA, "Silvercoat Lion"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}, Sacrifice a creature"); + setChoice(playerA, "Yes"); + + activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{3}, {T}: Create a token that's a copy of a card exiled with "); + setChoice(playerA, "Yes"); + setChoice(playerA, "Silvercoat Lion"); + + setStopAt(3, PhaseStep.BEGIN_COMBAT); + execute(); + + assertExileCount("Phyrexian Metamorph", 1); + assertPermanentCount(playerB, "Silvercoat Lion", 1); + assertPermanentCount(playerA, "Silvercoat Lion", 1); + + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/VolrathsShapshifterTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/VolrathsShapshifterTest.java index 72e517ed03..0bd4bc3f91 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/VolrathsShapshifterTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/VolrathsShapshifterTest.java @@ -1,6 +1,7 @@ package org.mage.test.cards.copy; import mage.abilities.Ability; +import mage.constants.SubType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.discard.DiscardControllerEffect; @@ -43,7 +44,7 @@ public class VolrathsShapshifterTest extends CardTestPlayerBase { assertPowerToughness(playerA, "Assault Griffin", 3, 2); Permanent shapeshifter = getPermanent("Assault Griffin", playerA.getId()); - Assert.assertTrue(shapeshifter.getSubtype(currentGame).contains("Griffin")); + Assert.assertTrue(shapeshifter.getSubtype(currentGame).contains(SubType.GRIFFIN)); Assert.assertTrue("Volrath's Shapeshifter must have flying", shapeshifter.getAbilities().contains(FlyingAbility.getInstance())); Assert.assertTrue("Volrath's Shapeshifter must have {2} : Discard a card", hasShapeshiftersOriginalAbility(shapeshifter)); } @@ -73,7 +74,7 @@ public class VolrathsShapshifterTest extends CardTestPlayerBase { assertPowerToughness(playerA, "Volrath's Shapeshifter", 0, 1); Permanent shapeshifter = getPermanent("Volrath's Shapeshifter", playerA.getId()); - Assert.assertTrue(shapeshifter.getSubtype(currentGame).contains("Shapeshifter")); + Assert.assertTrue(shapeshifter.getSubtype(currentGame).contains(SubType.SHAPESHIFTER)); Assert.assertTrue("Volrath's Shapeshifter must have {2} : Discard a card", hasShapeshiftersOriginalAbility(shapeshifter)); } @@ -100,7 +101,7 @@ public class VolrathsShapshifterTest extends CardTestPlayerBase { assertPowerToughness(playerA, "Dutiful Thrull", 1, 1); Permanent shapeshifter = getPermanent("Dutiful Thrull", playerA.getId()); - Assert.assertTrue(shapeshifter.getSubtype(currentGame).contains("Thrull")); + Assert.assertTrue(shapeshifter.getSubtype(currentGame).contains(SubType.THRULL)); Assert.assertTrue("Volrath's Shapeshifter must have {2} : Discard a card", hasShapeshiftersOriginalAbility(shapeshifter)); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/cost/additional/RemoveCounterCostTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/cost/additional/RemoveCounterCostTest.java index 96f73b57b8..d2650054c7 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/cost/additional/RemoveCounterCostTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/cost/additional/RemoveCounterCostTest.java @@ -48,7 +48,7 @@ public class RemoveCounterCostTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Novijen Sages"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1},Remove two +1/+1 counters"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}, Remove two +1/+1 counters"); setChoice(playerA, "X=2"); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/cost/modification/CostModificationTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/cost/modification/CostModificationTest.java index 0cb57e8457..73ee7046d9 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/cost/modification/CostModificationTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/cost/modification/CostModificationTest.java @@ -2,6 +2,7 @@ package org.mage.test.cards.cost.modification; import mage.constants.PhaseStep; import mage.constants.Zone; +import mage.counters.CounterType; import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; @@ -140,44 +141,80 @@ public class CostModificationTest extends CardTestPlayerBase { assertGraveyardCount(playerA, "Fated Conflagration", 1); assertGraveyardCount(playerB, "Carnivorous Moss-Beast", 1); } - + /* * Reported bug: Grand Arbiter Augustin IV makes moth spells you cast and your opponent cast {1} more. Should only affect opponent's spells costs. - */ + */ @Test public void testArbiterIncreasingCostBothPlayers() { - + String gArbiter = "Grand Arbiter Augustin IV"; String divination = "Divination"; String doomBlade = "Doom Blade"; - + /* - Grand Arbiter Augustin IV {2}{W}{U} + Grand Arbiter Augustin IV {2}{W}{U} 2/3 Legendary Creature - Human Advisor White spells you cast cost 1 less to cast. Blue spells you cast cost 1 less to cast. Spells your opponents cast cost 1 more to cast. - */ + */ addCard(Zone.BATTLEFIELD, playerA, gArbiter); addCard(Zone.HAND, playerA, divination); // {2}{U} Sorcery: draw two cards addCard(Zone.BATTLEFIELD, playerA, "Island", 2); - + addCard(Zone.HAND, playerB, doomBlade); addCard(Zone.BATTLEFIELD, playerB, "Swamp", 2); // {1}{B} Instant: destroy target non-black creature - + // Divination should only cost {1}{U} now with the cost reduction in place for your blue spells. castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, divination); - + // Doom Blade cast by the opponent should cost {2}{B} now with the cost increase in effect for opponent spells. castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, doomBlade, gArbiter); - + setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); - + assertGraveyardCount(playerA, divination, 1); assertHandCount(playerA, 2); assertTappedCount("Island", true, 2); assertPermanentCount(playerA, gArbiter, 1); assertHandCount(playerB, doomBlade, 1); } + + /** + * Zoetic Cavern's cast as creature cost is not modified as Animar, Soul of + * Elements gains counters. + */ + @Test + public void ReduceCostToCastZoeticCavern() { + + // Protection from white and from black + // Whenever you cast a creature spell, put a +1/+1 counter on Animar, Soul of Elements. + // Creature spells you cast cost {1} less to cast for each +1/+1 counter on Animar. + addCard(Zone.BATTLEFIELD, playerA, "Animar, Soul of Elements"); + + addCard(Zone.HAND, playerA, "Silvercoat Lion", 2); + addCard(Zone.BATTLEFIELD, playerA, "Plains", 6); + + addCard(Zone.HAND, playerA, "Zoetic Cavern"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Silvercoat Lion"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Silvercoat Lion"); + + playLand(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Zoetic Cavern"); + setChoice(playerA, "Yes"); + + setStopAt(1, PhaseStep.END_TURN); + execute(); + + assertPermanentCount(playerA, "Silvercoat Lion", 2); + assertCounterCount(playerA, "Animar, Soul of Elements", CounterType.P1P1, 3); + + assertHandCount(playerA, "Zoetic Cavern", 0); + assertPermanentCount(playerA, "Zoetic Cavern", 0); + + assertTappedCount("Plains", false, 2); // 2 for 1st Lion 1 for 2nd lion and only 1 mana needed to cast face down Zoetic + + } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/cost/modification/HeartstoneTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/cost/modification/HeartstoneTest.java index 9310dcbf95..f33ff1c4fb 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/cost/modification/HeartstoneTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/cost/modification/HeartstoneTest.java @@ -54,7 +54,7 @@ public class HeartstoneTest extends CardTestPlayerBase { addCard(Zone.HAND, playerB, "Lightning Bolt"); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", playerA); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{U},Tap two untapped Wizards you control: Copy target instant or sorcery spell. You may choose new targets for the copy.", "Lightning Bolt"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{U}, Tap two untapped Wizards you control: Copy target instant or sorcery spell. You may choose new targets for the copy.", "Lightning Bolt"); setChoice(playerA, "Yes"); addTarget(playerA, playerB); setStopAt(1, PhaseStep.BEGIN_COMBAT); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/cost/splitcards/CastSplitCardsFromOtherZonesTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/cost/splitcards/CastSplitCardsFromOtherZonesTest.java new file mode 100644 index 0000000000..fcec6f5e2c --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/cost/splitcards/CastSplitCardsFromOtherZonesTest.java @@ -0,0 +1,127 @@ +/* + * 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 org.mage.test.cards.cost.splitcards; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class CastSplitCardsFromOtherZonesTest extends CardTestPlayerBase { + + /** + * I attempted to cast Wear // Tear from my opponent's hand with Mindclaw + * Shaman - the card is selectable, but doesn't do anything at all after it + * gets selected to cast. To my best knowledge, Mindclaw Shaman should be + * able to cast one side, the other or both (only in the case of Fuse + * cards). + */ + @Test + public void testCastTearFromOpponentsHand() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5); + // When Mindclaw Shaman enters the battlefield, target opponent reveals his or her hand. + // You may cast an instant or sorcery card from it without paying its mana cost. + addCard(Zone.HAND, playerA, "Mindclaw Shaman"); // Creature {4}{R} + + addCard(Zone.BATTLEFIELD, playerB, "Sanguine Bond", 1); // Enchantment to destroy + // Wear + // Destroy target artifact. + // Tear + // Destroy target enchantment. + addCard(Zone.HAND, playerB, "Wear // Tear"); // Instant {1}{R} // {W} + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Mindclaw Shaman"); + addTarget(playerA, "Sanguine Bond"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Mindclaw Shaman", 1); + assertGraveyardCount(playerB, "Wear // Tear", 1); + assertGraveyardCount(playerB, "Sanguine Bond", 1); + + } + + @Test + public void testCastFearFromOpponentsHand() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5); + // When Mindclaw Shaman enters the battlefield, target opponent reveals his or her hand. + // You may cast an instant or sorcery card from it without paying its mana cost. + addCard(Zone.HAND, playerA, "Mindclaw Shaman"); // Creature {4}{R} + + addCard(Zone.BATTLEFIELD, playerB, "Icy Manipulator", 1); // Artifact to destroy + // Wear + // Destroy target artifact. + // Tear + // Destroy target enchantment. + addCard(Zone.HAND, playerB, "Wear // Tear"); // Instant {1}{R} // {W} + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Mindclaw Shaman"); + addTarget(playerA, "Icy Manipulator"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Mindclaw Shaman", 1); + assertGraveyardCount(playerB, "Wear // Tear", 1); + assertGraveyardCount(playerB, "Icy Manipulator", 1); + + } + + @Test + public void testCastFusedFromOpponentsHand() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5); + // When Mindclaw Shaman enters the battlefield, target opponent reveals his or her hand. + // You may cast an instant or sorcery card from it without paying its mana cost. + addCard(Zone.HAND, playerA, "Mindclaw Shaman"); // Creature {4}{R} + + addCard(Zone.BATTLEFIELD, playerB, "Sanguine Bond", 1); // Enchantment to destroy + addCard(Zone.BATTLEFIELD, playerB, "Icy Manipulator", 1); // Artifact to destroy + // Wear + // Destroy target artifact. + // Tear + // Destroy target enchantment. + addCard(Zone.HAND, playerB, "Wear // Tear"); // Instant {1}{R} // {W} + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Mindclaw Shaman"); + addTarget(playerA, "Sanguine Bond"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Mindclaw Shaman", 1); + assertGraveyardCount(playerB, "Wear // Tear", 1); + assertGraveyardCount(playerB, "Sanguine Bond", 1); + assertGraveyardCount(playerB, "Icy Manipulator", 1); + + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/AnimateArtifactTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/AnimateArtifactTest.java index b1a0337004..3bfe0a9d20 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/AnimateArtifactTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/AnimateArtifactTest.java @@ -29,6 +29,7 @@ package org.mage.test.cards.enchantments; import mage.constants.CardType; import mage.constants.PhaseStep; +import mage.constants.SubType; import mage.constants.Zone; import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; @@ -79,7 +80,7 @@ public class AnimateArtifactTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Juggernaut", 1); assertPermanentCount(playerA, "Animate Artifact", 1); - assertType("Juggernaut", CardType.CREATURE, "Juggernaut"); + assertType("Juggernaut", CardType.CREATURE, SubType.JUGGERNAUT); assertPowerToughness(playerA, "Juggernaut", 5, 3); } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/LignifyTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/LignifyTest.java index 483c3a6bc0..342991774a 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/LignifyTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/LignifyTest.java @@ -29,6 +29,7 @@ package org.mage.test.cards.enchantments; import mage.abilities.keyword.IndestructibleAbility; import mage.constants.PhaseStep; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.Permanent; import org.junit.Assert; @@ -70,7 +71,7 @@ public class LignifyTest extends CardTestPlayerBase { Permanent hivelord = getPermanent("Sliver Hivelord", playerB); - Assert.assertFalse("Sliver Hivelord may not be of subtype Sliver", hivelord.getSubtype(currentGame).contains("Sliver")); + Assert.assertFalse("Sliver Hivelord may not be of subtype Sliver", hivelord.getSubtype(currentGame).contains(SubType.SLIVER)); } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/SkullclampTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/SkullclampTest.java index 2d00ce3f91..71ea880114 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/SkullclampTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/SkullclampTest.java @@ -69,7 +69,7 @@ public class SkullclampTest extends CardTestPlayerBase { activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip", "Silvercoat Lion"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "{X},Sacrifice"); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "{X}, Sacrifice"); setChoice(playerB, "X=2"); setStopAt(1, PhaseStep.END_TURN); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/SpreadingSeasTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/SpreadingSeasTest.java index 9711860d23..c44ce2e37d 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/SpreadingSeasTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/SpreadingSeasTest.java @@ -28,6 +28,7 @@ package org.mage.test.cards.enchantments; import mage.constants.PhaseStep; +import mage.constants.SubType; import mage.constants.Zone; import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; @@ -95,7 +96,7 @@ public class SpreadingSeasTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Spreading Seas", "Forest"); setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); execute(); - assertNotSubtype("Forest", "Forest"); + assertNotSubtype("Forest", SubType.FOREST); } @@ -107,7 +108,7 @@ public class SpreadingSeasTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Spreading Seas", "Urza's Tower"); setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); execute(); - assertNotSubtype("Urza's Tower", "Urza's"); - assertNotSubtype("Urza's Tower", "Tower"); + assertNotSubtype("Urza's Tower", SubType.URZAS); + assertNotSubtype("Urza's Tower", SubType.TOWER); } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/ConditionalManaTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/ConditionalManaTest.java index 4c68018520..104cebecbf 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/ConditionalManaTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/ConditionalManaTest.java @@ -128,7 +128,7 @@ public class ConditionalManaTest extends CardTestPlayerBase { activateManaAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "{T}: Add {C}{C}{C}{C}"); - activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "{X},{T}: Untap"); + activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "{X}, {T}: Untap"); setChoice(playerB, "X=4"); addTarget(playerB, "Island"); addTarget(playerB, "Island"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/CryptGhastTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/CryptGhastTest.java index b178bc6472..54f9684f2e 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/CryptGhastTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/CryptGhastTest.java @@ -84,7 +84,7 @@ public class CryptGhastTest extends CardTestPlayerBase { // {X}{U}{R},{T}: Nin, the Pain Artist deals X damage to target creature. That creature's controller draws X cards. addCard(Zone.BATTLEFIELD, playerB, "Nin, the Pain Artist", 1); - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{X}{U}{R},{T}: {this} deals X damage to target creature", "Crypt Ghast"); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{X}{U}{R}, {T}: {this} deals X damage to target creature", "Crypt Ghast"); setChoice(playerB, "X=2"); // Crypt Ghast may no longer give additional mana diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/DoublingCubeTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/DoublingCubeTest.java index 19b042b09d..e5d467026c 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/DoublingCubeTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/DoublingCubeTest.java @@ -1,12 +1,10 @@ package org.mage.test.cards.mana; -import mage.abilities.costs.mana.ColorlessManaCost; import mage.constants.ManaType; import mage.constants.PhaseStep; import mage.constants.Zone; import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; -import org.mage.test.serverside.base.impl.CardTestAPIImpl; public class DoublingCubeTest extends CardTestPlayerBase { @@ -26,18 +24,16 @@ public class DoublingCubeTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, cube); addCard(Zone.BATTLEFIELD, playerA, upwelling); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {G} to your mana pool"); activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {G} to your mana pool"); activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {G} to your mana pool"); activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {C}{C}"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3},{T}:"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3}, {T}:"); setStopAt(1, PhaseStep.PRECOMBAT_MAIN); execute(); assertManaPool(playerA, ManaType.COLORLESS, 4); - } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/HarvesterDruidTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/HarvesterDruidTest.java index 48ce51cda9..f03c021f1c 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/HarvesterDruidTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/HarvesterDruidTest.java @@ -52,8 +52,8 @@ public class HarvesterDruidTest extends CardTestPlayerBase { execute(); ManaOptions options = playerA.getAvailableManaTest(currentGame); - Assert.assertEquals("Player should be able to create 2 red and 1 blue mana", "{R}{R}{U}", options.get(0).toString()); - Assert.assertEquals("Player should be able to create 1 red and 3 blue mana", "{R}{U}{U}", options.get(1).toString()); + Assert.assertEquals("Player should be able to create 2 red and 1 blue mana", "{U}{R}{R}", options.get(0).toString()); + Assert.assertEquals("Player should be able to create 1 red and 3 blue mana", "{U}{U}{R}", options.get(1).toString()); } @Test @@ -68,9 +68,9 @@ public class HarvesterDruidTest extends CardTestPlayerBase { execute(); ManaOptions options = playerA.getAvailableManaTest(currentGame); - Assert.assertEquals("Player should be able to create 3 red and 1 blue mana", "{R}{R}{R}{U}", options.get(0).toString()); - Assert.assertEquals("Player should be able to create 2 red and 2 blue mana", "{R}{R}{U}{U}", options.get(1).toString()); - Assert.assertEquals("Player should be able to create 2 red and 2 blue mana", "{R}{R}{U}{U}", options.get(2).toString()); - Assert.assertEquals("Player should be able to create 1 red and 3 blue mana", "{R}{U}{U}{U}", options.get(3).toString()); + Assert.assertEquals("Player should be able to create 3 red and 1 blue mana", "{U}{R}{R}{R}", options.get(0).toString()); + Assert.assertEquals("Player should be able to create 2 red and 2 blue mana", "{U}{U}{R}{R}", options.get(1).toString()); + Assert.assertEquals("Player should be able to create 2 red and 2 blue mana", "{U}{U}{R}{R}", options.get(2).toString()); + Assert.assertEquals("Player should be able to create 1 red and 3 blue mana", "{U}{U}{U}{R}", options.get(3).toString()); } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/NykthosShrineToNyxTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/NykthosShrineToNyxTest.java index 2c7a35b08c..29df140553 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/NykthosShrineToNyxTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/NykthosShrineToNyxTest.java @@ -52,7 +52,7 @@ public class NykthosShrineToNyxTest extends CardTestPlayerBase { // Omnath, Locus of Mana gets +1/+1 for each green mana in your mana pool. addCard(Zone.BATTLEFIELD, playerA, "Omnath, Locus of Mana", 1); - activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); + activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); setChoice(playerA, "Green"); setStopAt(1, PhaseStep.PRECOMBAT_MAIN); @@ -75,12 +75,12 @@ public class NykthosShrineToNyxTest extends CardTestPlayerBase { // Omnath, Locus of Mana gets +1/+1 for each green mana in your mana pool. addCard(Zone.BATTLEFIELD, playerA, "Omnath, Locus of Mana", 1); - activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); + activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); setChoice(playerA, "Green"); activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Untap another target permanent.", "Nykthos, Shrine to Nyx"); - activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); + activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); setChoice(playerA, "Green"); setStopAt(1, PhaseStep.PRECOMBAT_MAIN); @@ -106,12 +106,12 @@ public class NykthosShrineToNyxTest extends CardTestPlayerBase { // If unused mana would empty from your mana pool, that mana becomes colorless instead. addCard(Zone.BATTLEFIELD, playerA, "Kruphix, God of Horizons", 1); // 1 G devotion - activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); + activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); setChoice(playerA, "Green"); activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Untap another target permanent.", "Nykthos, Shrine to Nyx"); - activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); + activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); setChoice(playerA, "Green"); setStopAt(1, PhaseStep.BEGIN_COMBAT); @@ -143,7 +143,7 @@ public class NykthosShrineToNyxTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cackling Counterpart"); addTarget(playerA, "Simic Guildmage"); - activateManaAbility(1, PhaseStep.BEGIN_COMBAT, playerA, "{2},{T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); + activateManaAbility(1, PhaseStep.BEGIN_COMBAT, playerA, "{2}, {T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); setChoice(playerA, "Green"); setStopAt(1, PhaseStep.BEGIN_COMBAT); @@ -205,7 +205,7 @@ public class NykthosShrineToNyxTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Wastes", 2); // two colorless to pay for nykthos addCard(Zone.HAND, playerA, pObliterator); // just for something to cast for 4 black mana - activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); + activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); setChoice(playerA, "Black"); // should produce 4 black mana castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, pObliterator); // costs exactly 4 black mana should be castable diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/ReflectingPoolTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/ReflectingPoolTest.java index 862b036a30..8479228d8b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/ReflectingPoolTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/ReflectingPoolTest.java @@ -174,13 +174,13 @@ public class ReflectingPoolTest extends CardTestPlayerBase { ManaOptions options = playerA.getAvailableManaTest(currentGame); Assert.assertEquals("Player A should be able to create the ", "{G}{G}{G}", options.get(0).toString()); - Assert.assertEquals("Player A should be able to create the ", "{G}{G}{W}", options.get(1).toString()); - Assert.assertEquals("Player A should be able to create the ", "{G}{G}{W}", options.get(2).toString()); // ManaOption type optimzing seems not optimal yet - Assert.assertEquals("Player A should be able to create the ", "{G}{W}{W}", options.get(3).toString()); + Assert.assertEquals("Player A should be able to create the ", "{W}{G}{G}", options.get(1).toString()); + Assert.assertEquals("Player A should be able to create the ", "{W}{G}{G}", options.get(2).toString()); // ManaOption type optimzing seems not optimal yet + Assert.assertEquals("Player A should be able to create the ", "{W}{W}{G}", options.get(3).toString()); Assert.assertEquals("Player A should be able to create only 3 different mana options", 4, options.size()); options = playerB.getAvailableManaTest(currentGame); - Assert.assertEquals("Player B should be able to create the ", "{G}{W}", options.get(0).toString()); + Assert.assertEquals("Player B should be able to create the ", "{W}{G}", options.get(0).toString()); Assert.assertEquals("Player B should be able to create the ", "{W}{W}", options.get(1).toString()); Assert.assertEquals("Player B should be able to create only 3 different mana options", 2, options.size()); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/SylvokExplorerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/SylvokExplorerTest.java index be7cc9427c..3c6fce6f11 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/SylvokExplorerTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/SylvokExplorerTest.java @@ -70,8 +70,8 @@ public class SylvokExplorerTest extends CardTestPlayerBase { execute(); ManaOptions options = playerA.getAvailableManaTest(currentGame); - Assert.assertEquals("Player should be able to create 1 red and 1 white mana", "{R}{W}", options.get(0).toString()); - Assert.assertEquals("Player should be able to create 1 blue and 1 white mana", "{U}{W}", options.get(1).toString()); + Assert.assertEquals("Player should be able to create 1 red and 1 white mana", "{W}{R}", options.get(0).toString()); + Assert.assertEquals("Player should be able to create 1 blue and 1 white mana", "{W}{U}", options.get(1).toString()); } @Test diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/AjaniTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/AjaniTest.java index 7e0b24aa51..6a341d7b9b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/AjaniTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/AjaniTest.java @@ -81,7 +81,7 @@ public class AjaniTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Kor Ally", 2); assertPermanentCount(playerA, "Oath of Gideon", 1); assertPermanentCount(playerA, "Ajani Goldmane", 1); - assertCounterCount("Ajani Goldmane", CounterType.LOYALTY, 6); // 5 + 1 = 5 + assertCounterCount("Ajani Goldmane", CounterType.LOYALTY, 6); // 4 + 1 + 1 = 6 assertLife(playerA, 22); assertLife(playerB, 20); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/LilianaTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/LilianaTest.java index bc1e5de6a2..62fc6ce811 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/LilianaTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/LilianaTest.java @@ -2,6 +2,7 @@ package org.mage.test.cards.planeswalker; import mage.constants.CardType; import mage.constants.PhaseStep; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import org.junit.Test; @@ -61,8 +62,8 @@ public class LilianaTest extends CardTestPlayerBase { assertPermanentCount(playerA, wShepherd, 1); assertPermanentCount(playerB, yOx, 1); assertCounterCount(playerA, liliannaDM, CounterType.LOYALTY, 2); - assertType(wShepherd, CardType.CREATURE, "Zombie"); // should have subtype zombie on top of angel type - assertType(wShepherd, CardType.CREATURE, "Angel"); + assertType(wShepherd, CardType.CREATURE, SubType.ZOMBIE); // should have subtype zombie on top of angel type + assertType(wShepherd, CardType.CREATURE, SubType.ANGEL); assertTapped(yOx, true); } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/GrindstoneTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/GrindstoneTest.java index eea4e061a7..56e6ce1d86 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/GrindstoneTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/GrindstoneTest.java @@ -37,12 +37,11 @@ import org.mage.test.serverside.base.CardTestPlayerBase; * * @author LevelX2 */ - public class GrindstoneTest extends CardTestPlayerBase { /** - * Tests that Grindstone mills all cards to graveyard while Painter's Servant is in play - * Leaving one Progenius in play + * Tests that Grindstone mills all cards to graveyard while Painter's + * Servant is in play Leaving one Progenius in play */ @Test public void testGrindstoneProgenius() { @@ -61,19 +60,19 @@ public class GrindstoneTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Painter's Servant"); setChoice(playerA, "Blue"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{3},{T}: Target player puts the top two cards of his or her library into his or her graveyard. If both cards share a color, repeat this process."); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{3}, {T}: Target player puts the top two cards of his or her library into his or her graveyard. If both cards share a color, repeat this process."); addTarget(playerA, playerB); setStopAt(1, PhaseStep.END_TURN); execute(); - - Assert.assertEquals("Progenitus has to be in the libarary", 1, playerB.getLibrary().size()); + + Assert.assertEquals("Progenitus has to be in the libarary", 1, playerB.getLibrary().size()); assertPermanentCount(playerA, "Painter's Servant", 1); } - + /** - * Tests that Grindstone mills all cards to graveyard while Painter's Servant is in play - * Iterating with two Progenius for a draw + * Tests that Grindstone mills all cards to graveyard while Painter's + * Servant is in play Iterating with two Progenius for a draw */ @Test public void testGrindstoneProgeniusDraw() { @@ -92,19 +91,19 @@ public class GrindstoneTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Painter's Servant"); setChoice(playerA, "Blue"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{3},{T}: Target player puts the top two cards of his or her library into his or her graveyard. If both cards share a color, repeat this process."); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{3}, {T}: Target player puts the top two cards of his or her library into his or her graveyard. If both cards share a color, repeat this process."); addTarget(playerA, playerB); setStopAt(1, PhaseStep.END_TURN); execute(); - + Assert.assertTrue("Has to be a draw because of endless iteration", currentGame.isADraw()); assertPermanentCount(playerA, "Painter's Servant", 1); } - -/** - * Tests that Grindstone mills all cards to graveyard while Painter's Servant is in play - * Iterating with two Progenius for a draw + + /** + * Tests that Grindstone mills all cards to graveyard while Painter's + * Servant is in play Iterating with two Progenius for a draw */ @Test public void testGrindstoneUlamog() { @@ -125,16 +124,14 @@ public class GrindstoneTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Painter's Servant"); setChoice(playerA, "Blue"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{3},{T}: Target player puts the top two cards of his or her library into his or her graveyard. If both cards share a color, repeat this process."); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{3}, {T}: Target player puts the top two cards of his or her library into his or her graveyard. If both cards share a color, repeat this process."); addTarget(playerA, playerB); setStopAt(1, PhaseStep.END_TURN); execute(); - + // No cards in graveyard because Ulamog shuffle all cards back to Lib assertGraveyardCount(playerB, 0); assertPermanentCount(playerA, "Painter's Servant", 1); - } + } } - - diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/LeylineOfTheVoidTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/LeylineOfTheVoidTest.java index 9ef378862f..52168da7c8 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/LeylineOfTheVoidTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/LeylineOfTheVoidTest.java @@ -59,7 +59,7 @@ public class LeylineOfTheVoidTest extends CardTestPlayerBase { // {X}, {T}: Target opponent puts cards from the top of his or her library into his or her graveyard until a creature card or X cards are put into that graveyard this way, whichever comes first. If a creature card is put into that graveyard this way, sacrifice Helm of Obedience and put that card onto the battlefield under your control. X can't be 0. addCard(Zone.BATTLEFIELD, playerA, "Helm of Obedience"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{X},{T}: Target opponent puts cards", playerB); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{X}, {T}: Target opponent puts cards", playerB); setChoice(playerA, "X=1"); setStopAt(1, PhaseStep.END_TURN); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/ZoneChangeReplacementTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/ZoneChangeReplacementTest.java index d9c413363f..6680c84977 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/ZoneChangeReplacementTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/ZoneChangeReplacementTest.java @@ -332,7 +332,7 @@ public class ZoneChangeReplacementTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Swamp", 4); addCard(Zone.GRAVEYARD, playerB, "Silvercoat Lion"); - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{2}{B}{B},{T}: Return target creature", "Silvercoat Lion"); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{2}{B}{B}, {T}: Return target creature", "Silvercoat Lion"); castSpell(2, PhaseStep.BEGIN_COMBAT, playerA, "Terror", "Silvercoat Lion"); setStopAt(2, PhaseStep.END_COMBAT); @@ -364,7 +364,7 @@ public class ZoneChangeReplacementTest extends CardTestPlayerBase { addCard(Zone.GRAVEYARD, playerB, "Swamp", 5); addCard(Zone.GRAVEYARD, playerB, "Jace, Vryn's Prodigy"); - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{2}{B}{B},{T}: Return target creature", "Jace, Vryn's Prodigy"); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{2}{B}{B}, {T}: Return target creature", "Jace, Vryn's Prodigy"); // {T}: Draw a card, then discard a card. If there are five or more cards in your graveyard, exile Jace, Vryn's Prodigy, then return him to the battefield transformed under his owner's control. activateAbility(2, PhaseStep.BEGIN_COMBAT, playerB, "{T}: Draw a card, then discard a card. If there are five or more cards in your graveyard"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/ContagionEngineTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/ContagionEngineTest.java index ff91ebf653..2b24a74680 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/ContagionEngineTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/ContagionEngineTest.java @@ -85,7 +85,7 @@ public class ContagionEngineTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Contagion Engine"); addTarget(playerA, playerB); - activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{4},{T}: Proliferate"); + activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{4}, {T}: Proliferate"); setChoice(playerA, "Wall of Frost^Kalonian Behemoth^Plated Slagwurm^Teysa, Envoy of Ghosts^Ajani Goldmane"); setChoice(playerA, "Wall of Frost^Kalonian Behemoth^Plated Slagwurm^Teysa, Envoy of Ghosts^Ajani Goldmane"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/MagewrightStoneTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/MagewrightStoneTest.java index bc6de56293..9f931fbd17 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/MagewrightStoneTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/MagewrightStoneTest.java @@ -17,7 +17,7 @@ public class MagewrightStoneTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, meanderer, 1, true); addCard(Zone.BATTLEFIELD, playerA, magewrightStone); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1},{T}: Untap target creature", meanderer); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}, {T}: Untap target creature", meanderer); setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/SoulFoundryTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/SoulFoundryTest.java index 09a5327a48..59aae8be99 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/SoulFoundryTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/SoulFoundryTest.java @@ -53,7 +53,7 @@ public class SoulFoundryTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Soul Foundry"); setChoice(playerA, "Yes"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{X},{T}: Create a token"); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{X}, {T}: Create a token"); setStopAt(1, PhaseStep.END_TURN); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/WardenOfTheWallTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/WardenOfTheWallTest.java index 7551df6338..33a4947a5b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/WardenOfTheWallTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/WardenOfTheWallTest.java @@ -2,6 +2,7 @@ package org.mage.test.cards.single; import mage.constants.CardType; import mage.constants.PhaseStep; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.Filter; import org.junit.Test; @@ -42,7 +43,7 @@ public class WardenOfTheWallTest extends CardTestPlayerBase { assertLife(playerA, 20); assertLife(playerB, 20); assertPowerToughness(playerA, "Warden of the Wall", 2, 3, Filter.ComparisonScope.All); - assertType("Warden of the Wall", CardType.CREATURE, "Gargoyle"); + assertType("Warden of the Wall", CardType.CREATURE, SubType.GARGOYLE); } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/aer/HopeOfGhirapurTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/aer/HopeOfGhirapurTest.java index b0340abb5b..df838afba5 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/aer/HopeOfGhirapurTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/aer/HopeOfGhirapurTest.java @@ -35,16 +35,19 @@ public class HopeOfGhirapurTest extends CardTestPlayerBase { // from the battlefield and returned back. @Test public void testWhenHopeOfGhirapurWasRemovedAndReturnedBack() { + // Flying + // Sacrifice Hope of Ghirapur: Until your next turn, target player who was dealt combat damage by Hope of Ghirapur this turn can't cast noncreature spells. addCard(Zone.BATTLEFIELD, playerA, "Hope of Ghirapur"); addCard(Zone.BATTLEFIELD, playerA, "Plains", 1); + // Exile target creature you control, then return that card to the battlefield under your control. addCard(Zone.HAND, playerA, "Cloudshift"); addCard(Zone.BATTLEFIELD, playerB, "Mountain", 1); addCard(Zone.HAND, playerB, "Shock"); attack(1, playerA, "Hope of Ghirapur"); - castSpell(1, PhaseStep.END_COMBAT, playerA, "Cloudshift", "Hope of Ghirapur"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Sacrifice", playerB); + castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Cloudshift", "Hope of Ghirapur"); + activateAbility(1, PhaseStep.END_TURN, playerA, "Sacrifice", playerB); castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Shock", playerA); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/emn/SoulSeparatorTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/emn/SoulSeparatorTest.java index 5ab20b8a43..02eb4769fa 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/emn/SoulSeparatorTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/emn/SoulSeparatorTest.java @@ -4,6 +4,7 @@ import mage.abilities.keyword.DefenderAbility; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.VigilanceAbility; import mage.constants.PhaseStep; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.Permanent; import org.junit.Assert; @@ -40,7 +41,7 @@ public class SoulSeparatorTest extends CardTestPlayerBase { Permanent saToken = getPermanent("Sylvan Advocate", playerA); Assert.assertTrue(saToken.getAbilities().contains(FlyingAbility.getInstance())); - Assert.assertTrue(saToken.getSubtype(currentGame).contains("Spirit")); + Assert.assertTrue(saToken.getSubtype(currentGame).contains(SubType.SPIRIT)); Assert.assertTrue(saToken.getAbilities().contains(VigilanceAbility.getInstance())); assertPowerToughness(playerA, "Sylvan Advocate", 1, 1); } @@ -76,7 +77,7 @@ public class SoulSeparatorTest extends CardTestPlayerBase { Permanent treeToken = getPermanent("Tree of Perdition", playerA); Assert.assertTrue(treeToken.getAbilities().contains(FlyingAbility.getInstance())); - Assert.assertTrue(treeToken.getSubtype(currentGame).contains("Spirit")); + Assert.assertTrue(treeToken.getSubtype(currentGame).contains(SubType.SPIRIT)); Assert.assertTrue(treeToken.getAbilities().contains(DefenderAbility.getInstance())); assertLife(playerA, 20); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/mir/GrinningTotemTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/mir/GrinningTotemTest.java index 0484faccaa..8069e2d2e1 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/mir/GrinningTotemTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/mir/GrinningTotemTest.java @@ -12,7 +12,7 @@ public class GrinningTotemTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2); addCard(Zone.BATTLEFIELD, playerA, "Grinning Totem"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}, Sacrifice {this}: Search target opponent's library for a card and exile it", playerB); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}, Sacrifice {this}: Search target opponent's library for a card and exile it", playerB); setStopAt(3, PhaseStep.BEGIN_COMBAT); execute(); @@ -28,7 +28,7 @@ public class GrinningTotemTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Tormod's Crypt"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}, Sacrifice {this}: Search target opponent's library for a card and exile it", playerB); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}, Sacrifice {this}: Search target opponent's library for a card and exile it", playerB); activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "{T}, Sacrifice {this}: Exile all cards", playerA); setStopAt(3, PhaseStep.BEGIN_COMBAT); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/BecomesTheTargetTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/BecomesTheTargetTest.java index 7f90d651e3..6cf97093b4 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/BecomesTheTargetTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/BecomesTheTargetTest.java @@ -52,7 +52,7 @@ public class BecomesTheTargetTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1); - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{W/P},{T}: Tap target creature", "Silvercoat Lion"); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{W/P}, {T}: Tap target creature", "Silvercoat Lion"); setStopAt(2, PhaseStep.BEGIN_COMBAT); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/FathomMageTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/FathomMageTest.java index c9191ff255..99a884487b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/FathomMageTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/FathomMageTest.java @@ -1,6 +1,7 @@ package org.mage.test.cards.triggers; import mage.constants.PhaseStep; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.Permanent; import org.junit.Assert; @@ -60,7 +61,7 @@ public class FathomMageTest extends CardTestPlayerBase { assertPowerToughness(playerA, "Fathom Mage", 3, 3); Permanent fathomMage = getPermanent("Fathom Mage", playerA); - Assert.assertEquals("Fathom Mage has to be a Mutant", true, fathomMage.getSubtype(currentGame).contains("Mutant")); + Assert.assertEquals("Fathom Mage has to be a Mutant", true, fathomMage.getSubtype(currentGame).contains(SubType.MUTANT)); assertHandCount(playerA, 2); } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/SpellskiteTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/SpellskiteTest.java index d342098352..28ca2c83e0 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/SpellskiteTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/SpellskiteTest.java @@ -97,7 +97,7 @@ public class SpellskiteTest extends CardTestPlayerBase { // Whenever Frost Titan enters the battlefield or attacks, tap target permanent. It doesn't untap during its controller's next untap step. addCard(Zone.HAND, playerB, "Frost Titan", 1); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Gain control", "Spellskite"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}: Gain control", "Spellskite"); castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Frost Titan"); addTarget(playerB, "Silvercoat Lion"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/watchers/FellShepherdTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/watchers/FellShepherdTest.java index 160f68428f..01a5e9eb1b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/watchers/FellShepherdTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/watchers/FellShepherdTest.java @@ -29,7 +29,7 @@ public class FellShepherdTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Fell Shepherd"); playerA.addChoice("Craw Wurm"); - activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{B},Sacrifice another creature: Target creature gets -2/-2 until end of turn.", "Raging Goblin"); + activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{B}, Sacrifice another creature: Target creature gets -2/-2 until end of turn.", "Raging Goblin"); attack(3, playerA, "Fell Shepherd"); setStopAt(3, PhaseStep.END_TURN); diff --git a/Mage.Tests/src/test/java/org/mage/test/multiplayer/BloodchiefAscensionTest.java b/Mage.Tests/src/test/java/org/mage/test/multiplayer/BloodchiefAscensionTest.java index 0bcc381376..1569a8ec8d 100644 --- a/Mage.Tests/src/test/java/org/mage/test/multiplayer/BloodchiefAscensionTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/multiplayer/BloodchiefAscensionTest.java @@ -172,7 +172,7 @@ public class BloodchiefAscensionTest extends CardTestMultiPlayerBase { addCard(Zone.HAND, playerB, "Bellows Lizard", 5); // Player order: A -> D -> C -> B - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerD, "{U},{T}: Each player discards"); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerD, "{U}, {T}: Each player discards"); setStopAt(2, PhaseStep.BEGIN_COMBAT); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/serverside/base/impl/CardTestPlayerAPIImpl.java b/Mage.Tests/src/test/java/org/mage/test/serverside/base/impl/CardTestPlayerAPIImpl.java index 026a5052fc..fcf5b769b0 100644 --- a/Mage.Tests/src/test/java/org/mage/test/serverside/base/impl/CardTestPlayerAPIImpl.java +++ b/Mage.Tests/src/test/java/org/mage/test/serverside/base/impl/CardTestPlayerAPIImpl.java @@ -700,11 +700,11 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement * @param type A type to test for * @param subType a subtype to test for */ - public void assertType(String cardName, CardType type, String subType) throws AssertionError { + public void assertType(String cardName, CardType type, SubType subType) throws AssertionError { Permanent found = getPermanent(cardName); Assert.assertTrue("(Battlefield) card type not found (" + cardName + ':' + type + ')', found.getCardType().contains(type)); if (subType != null) { - Assert.assertTrue("(Battlefield) card sub-type not equal (" + cardName + ':' + subType + ')', found.getSubtype(currentGame).contains(subType)); + Assert.assertTrue("(Battlefield) card sub-type not equal (" + cardName + ':' + subType.getDescription() + ')', found.getSubtype(currentGame).contains(subType)); } } @@ -725,10 +725,10 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement * @param cardName Name of the permanent that should be checked. * @param subType a subtype to test for */ - public void assertNotSubtype(String cardName, String subType) throws AssertionError { + public void assertNotSubtype(String cardName, SubType subType) throws AssertionError { Permanent found = getPermanent(cardName); if (subType != null) { - Assert.assertFalse("(Battlefield) card sub-type equal (" + cardName + ':' + subType + ')', found.getSubtype(currentGame).contains(subType)); + Assert.assertFalse("(Battlefield) card sub-type equal (" + cardName + ':' + subType.getDescription() + ')', found.getSubtype(currentGame).contains(subType)); } } diff --git a/Mage.Tests/src/test/java/org/mage/test/serverside/cards/abilities/ProtectionFromTypeTest.java b/Mage.Tests/src/test/java/org/mage/test/serverside/cards/abilities/ProtectionFromTypeTest.java index 08c6b54f2f..6c11c32730 100644 --- a/Mage.Tests/src/test/java/org/mage/test/serverside/cards/abilities/ProtectionFromTypeTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/serverside/cards/abilities/ProtectionFromTypeTest.java @@ -17,7 +17,7 @@ public class ProtectionFromTypeTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Tel-Jilad Fallen"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},Remove a charge counter from {this}, {T}: put a -1/-1 counter on target creature.", "Tel-Jilad Fallen"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, Remove a charge counter from {this}, {T}: put a -1/-1 counter on target creature.", "Tel-Jilad Fallen"); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); @@ -32,7 +32,7 @@ public class ProtectionFromTypeTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Coral Merfolk"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},Remove a charge counter from {this}, {T}: Put a -1/-1 counter on target creature.", "Coral Merfolk"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, Remove a charge counter from {this}, {T}: Put a -1/-1 counter on target creature.", "Coral Merfolk"); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/utils/ManaOptionsTest.java b/Mage.Tests/src/test/java/org/mage/test/utils/ManaOptionsTest.java index 0f45a8e717..91ea81bf86 100644 --- a/Mage.Tests/src/test/java/org/mage/test/utils/ManaOptionsTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/utils/ManaOptionsTest.java @@ -72,9 +72,9 @@ public class ManaOptionsTest extends CardTestPlayerBase { Assert.assertEquals("mana variations don't fit", 4, manaOptions.size()); Assert.assertEquals("{G}{G}{G}", getManaOption(0, manaOptions)); - Assert.assertEquals("{R}{G}{G}{W}", getManaOption(1, manaOptions)); - Assert.assertEquals("{R}{R}{G}{W}{W}", getManaOption(2, manaOptions)); - Assert.assertEquals("{R}{R}{R}{W}{W}{W}", getManaOption(3, manaOptions)); + Assert.assertEquals("{W}{R}{G}{G}", getManaOption(1, manaOptions)); + Assert.assertEquals("{W}{W}{R}{R}{G}", getManaOption(2, manaOptions)); + Assert.assertEquals("{W}{W}{W}{R}{R}{R}", getManaOption(3, manaOptions)); } @@ -95,11 +95,11 @@ public class ManaOptionsTest extends CardTestPlayerBase { Assert.assertEquals("{C}{C}{W}", getManaOption(1, manaOptions)); Assert.assertEquals("{C}{C}{U}", getManaOption(2, manaOptions)); Assert.assertEquals("{C}{W}{W}", getManaOption(3, manaOptions)); - Assert.assertEquals("{C}{U}{W}", getManaOption(4, manaOptions)); + Assert.assertEquals("{C}{W}{U}", getManaOption(4, manaOptions)); Assert.assertEquals("{C}{U}{U}", getManaOption(5, manaOptions)); Assert.assertEquals("{W}{W}{W}", getManaOption(6, manaOptions)); - Assert.assertEquals("{U}{W}{W}", getManaOption(7, manaOptions)); - Assert.assertEquals("{U}{U}{W}", getManaOption(8, manaOptions)); + Assert.assertEquals("{W}{W}{U}", getManaOption(7, manaOptions)); + Assert.assertEquals("{W}{U}{U}", getManaOption(8, manaOptions)); Assert.assertEquals("{U}{U}{U}", getManaOption(9, manaOptions)); } @@ -151,7 +151,7 @@ public class ManaOptionsTest extends CardTestPlayerBase { ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame); Assert.assertEquals("mana variations don't fit", 1, manaOptions.size()); - Assert.assertEquals("{C}{G}{G}{W}{W}", getManaOption(0, manaOptions)); + Assert.assertEquals("{C}{W}{W}{G}{G}", getManaOption(0, manaOptions)); } // Crystal Quarry @@ -169,8 +169,8 @@ public class ManaOptionsTest extends CardTestPlayerBase { ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame); Assert.assertEquals("mana variations don't fit", 2, manaOptions.size()); - Assert.assertEquals("{C}{G}{G}{G}{W}{W}", getManaOption(0, manaOptions)); - Assert.assertEquals("{R}{G}{U}{W}{B}", getManaOption(1, manaOptions)); + Assert.assertEquals("{C}{W}{W}{G}{G}{G}", getManaOption(0, manaOptions)); + Assert.assertEquals("{W}{U}{B}{R}{G}", getManaOption(1, manaOptions)); } // Nykthos, Shrine to Nyx diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index e715c8bfef..a0b1a11314 100644 --- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java +++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java @@ -152,7 +152,7 @@ public class VerifyCardDataTest { Collection expected = ref.subtypes; if (expected != null && expected.contains("Urza’s")) { expected = new ArrayList<>(expected); - for (ListIterator it = ((List) expected).listIterator(); it.hasNext(); ) { + for (ListIterator it = ((List) expected).listIterator(); it.hasNext();) { if (it.next().equals("Urza’s")) { it.set("Urza's"); } diff --git a/Mage/src/main/java/mage/MageObject.java b/Mage/src/main/java/mage/MageObject.java index 7be5a06d3e..567b0dca0e 100644 --- a/Mage/src/main/java/mage/MageObject.java +++ b/Mage/src/main/java/mage/MageObject.java @@ -5,6 +5,7 @@ import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCosts; import mage.abilities.keyword.ChangelingAbility; +import mage.abilities.text.TextPart; import mage.cards.Card; import mage.cards.FrameStyle; import mage.constants.CardType; @@ -16,6 +17,7 @@ import mage.util.SubTypeList; import java.io.Serializable; import java.util.EnumSet; +import java.util.List; import java.util.UUID; public interface MageObject extends MageItem, Serializable { @@ -58,7 +60,6 @@ public interface MageObject extends MageItem, Serializable { int getStartingLoyalty(); - void adjustCosts(Ability ability, Game game); void adjustTargets(Ability ability, Game game); @@ -85,7 +86,6 @@ public interface MageObject extends MageItem, Serializable { void setZoneChangeCounter(int value, Game game); - default boolean isCreature() { return getCardType().contains(CardType.CREATURE); } @@ -163,7 +163,6 @@ public interface MageObject extends MageItem, Serializable { return false; } - default boolean shareSubtypes(Card otherCard, Game game) { if (otherCard == null) { @@ -179,7 +178,7 @@ public interface MageObject extends MageItem, Serializable { } } for (SubType subtype : this.getSubtype(game)) { - if (otherCard.getSubtype(game).contains(subtype)) { + if (otherCard.hasSubtype(subtype, game)) { return true; } } @@ -191,7 +190,17 @@ public interface MageObject extends MageItem, Serializable { void setIsAllCreatureTypes(boolean value); - default void addCardTypes(EnumSet cardType){ + default void addCardTypes(EnumSet cardType) { getCardType().addAll(cardType); } + + List getTextParts(); + + TextPart addTextPart(TextPart textPart); + + void removePTCDA(); + + default void changeSubType(SubType fromSubType, SubType toSubType) { + + } } diff --git a/Mage/src/main/java/mage/MageObjectImpl.java b/Mage/src/main/java/mage/MageObjectImpl.java index 461a3fccd6..e733dc1fba 100644 --- a/Mage/src/main/java/mage/MageObjectImpl.java +++ b/Mage/src/main/java/mage/MageObjectImpl.java @@ -27,6 +27,11 @@ */ package mage; +import java.util.ArrayList; +import java.util.EnumSet; +import java.util.Iterator; +import java.util.List; +import java.util.UUID; import mage.abilities.Abilities; import mage.abilities.AbilitiesImpl; import mage.abilities.Ability; @@ -34,10 +39,15 @@ import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.Effect; import mage.abilities.keyword.ChangelingAbility; import mage.abilities.mana.ActivatedManaAbilityImpl; +import mage.abilities.text.TextPart; +import mage.abilities.text.TextPartSubType; import mage.cards.FrameStyle; import mage.constants.CardType; +import mage.constants.SubLayer; import mage.constants.SubType; import mage.constants.SubTypeSet; import mage.constants.SuperType; @@ -46,10 +56,6 @@ import mage.game.events.ZoneChangeEvent; import mage.util.GameLog; import mage.util.SubTypeList; -import java.util.EnumSet; -import java.util.List; -import java.util.UUID; - public abstract class MageObjectImpl implements MageObject { protected UUID objectId; @@ -68,6 +74,7 @@ public abstract class MageObjectImpl implements MageObject { protected MageInt power; protected MageInt toughness; protected boolean copy; + protected List textParts; public MageObjectImpl() { this(UUID.randomUUID()); @@ -82,6 +89,7 @@ public abstract class MageObjectImpl implements MageObject { frameStyle = FrameStyle.M15_NORMAL; manaCost = new ManaCostsImpl<>(""); abilities = new AbilitiesImpl<>(); + textParts = new ArrayList<>(); } public MageObjectImpl(final MageObjectImpl object) { @@ -99,6 +107,8 @@ public abstract class MageObjectImpl implements MageObject { this.subtype.addAll(object.subtype); supertype.addAll(object.supertype); this.copy = object.copy; + textParts = new ArrayList<>(); + textParts.addAll(object.textParts); } @Override @@ -303,13 +313,48 @@ public abstract class MageObjectImpl implements MageObject { } @Override - public boolean isAllCreatureTypes(){ + public boolean isAllCreatureTypes() { return isAllCreatureTypes; } @Override - public void setIsAllCreatureTypes(boolean value){ + public void setIsAllCreatureTypes(boolean value) { isAllCreatureTypes = value; } + @Override + public List getTextParts() { + return textParts; + } + + @Override + public TextPart addTextPart(TextPart textPart) { + textParts.add(textPart); + return textPart; + } + + @Override + public void changeSubType(SubType fromSubType, SubType toSubType) { + for (TextPart textPart : textParts) { + if (textPart instanceof TextPartSubType && textPart.getCurrentValue().equals(fromSubType)) { + textPart.replaceWith(toSubType); + } + } + } + + /** + * Remove power/toughness character defining abilities + */ + @Override + public void removePTCDA() { + for (Iterator iter = this.getAbilities().iterator(); iter.hasNext();) { + Ability ability = iter.next(); + for (Effect effect : ability.getEffects()) { + if (effect instanceof ContinuousEffect && ((ContinuousEffect) effect).getSublayer() == SubLayer.CharacteristicDefining_7a) { + iter.remove(); + break; + } + } + } + } } diff --git a/Mage/src/main/java/mage/MageObjectReference.java b/Mage/src/main/java/mage/MageObjectReference.java index 0e04688fc4..0c4cde8808 100644 --- a/Mage/src/main/java/mage/MageObjectReference.java +++ b/Mage/src/main/java/mage/MageObjectReference.java @@ -81,9 +81,9 @@ public class MageObjectReference implements Comparable, Ser if (game.getPlayerList().contains(sourceId)) { this.zoneChangeCounter = 0; } else { - logger.error("The provided sourceId is not connected to an object in the game id:" + sourceId); + logger.error("The provided sourceId is not connected to an object in the game id: " + sourceId); for (StackObject stackObject : game.getStack()) { - logger.error("StackObject: " + stackObject.getId() + " sourceId" + stackObject.getSourceId() + " name" + stackObject.getName()); + logger.error("StackObject: " + stackObject.getId() + " sourceId " + stackObject.getSourceId() + " name " + stackObject.getName()); } mageObject = game.getLastKnownInformation(sourceId, Zone.STACK); if (mageObject != null) { diff --git a/Mage/src/main/java/mage/Mana.java b/Mage/src/main/java/mage/Mana.java index 3eae16609c..5e4ea50e9a 100644 --- a/Mage/src/main/java/mage/Mana.java +++ b/Mage/src/main/java/mage/Mana.java @@ -480,21 +480,21 @@ public class Mana implements Comparable, Serializable, Copyable { for (int i = 0; i < colorless; i++) { sbMana.append("{C}"); } + for (int i = 0; i < white; i++) { + sbMana.append("{W}"); + } + for (int i = 0; i < blue; i++) { + sbMana.append("{U}"); + } + for (int i = 0; i < black; i++) { + sbMana.append("{B}"); + } for (int i = 0; i < red; i++) { sbMana.append("{R}"); } for (int i = 0; i < green; i++) { sbMana.append("{G}"); } - for (int i = 0; i < blue; i++) { - sbMana.append("{U}"); - } - for (int i = 0; i < white; i++) { - sbMana.append("{W}"); - } - for (int i = 0; i < black; i++) { - sbMana.append("{B}"); - } for (int i = 0; i < any; i++) { sbMana.append("{Any}"); } @@ -846,15 +846,20 @@ public class Mana implements Comparable, Serializable, Copyable { return false; } + public boolean containsAny(final Mana mana) { + return containsAny(mana, false); + } + /** * Returns if this objects mana contains any coloured mana the same as the * passed in {@link Mana}'s mana. * * @param mana the mana to check for + * @param includeColorless also check for colorless * @return true if this contains any of the same type of coloured mana that * this has */ - public boolean containsAny(final Mana mana) { + public boolean containsAny(final Mana mana, boolean includeColorless) { if (mana.black > 0 && this.black > 0) { return true; } else if (mana.blue > 0 && this.blue > 0) { @@ -865,6 +870,8 @@ public class Mana implements Comparable, Serializable, Copyable { return true; } else if (mana.green > 0 && this.green > 0) { return true; + } else if (mana.colorless > 0 && this.colorless > 0 && includeColorless) { + return true; } return false; diff --git a/Mage/src/main/java/mage/abilities/Abilities.java b/Mage/src/main/java/mage/abilities/Abilities.java index 2e4c629a2c..d0425f6fd7 100644 --- a/Mage/src/main/java/mage/abilities/Abilities.java +++ b/Mage/src/main/java/mage/abilities/Abilities.java @@ -61,6 +61,8 @@ public interface Abilities extends List, Serializable { */ List getRules(String source); + List getRules(String source, boolean capitalize); + /** * Retrieves all activated abilities for the given {@link Zone}. * diff --git a/Mage/src/main/java/mage/abilities/AbilitiesImpl.java b/Mage/src/main/java/mage/abilities/AbilitiesImpl.java index 9f2fba4438..a7a10a3236 100644 --- a/Mage/src/main/java/mage/abilities/AbilitiesImpl.java +++ b/Mage/src/main/java/mage/abilities/AbilitiesImpl.java @@ -27,6 +27,8 @@ */ package mage.abilities; +import java.util.*; +import java.util.stream.Collectors; import mage.abilities.common.ZoneChangeTriggeredAbility; import mage.abilities.costs.Cost; import mage.abilities.keyword.ProtectionAbility; @@ -37,9 +39,6 @@ import mage.game.Game; import mage.util.ThreadLocalStringBuilder; import org.apache.log4j.Logger; -import java.util.*; -import java.util.stream.Collectors; - /** * @param * @author BetaSteward_at_googlemail.com @@ -70,6 +69,11 @@ public class AbilitiesImpl extends ArrayList implements Ab @Override public List getRules(String source) { + return getRules(source, true); + } + + @Override + public List getRules(String source, boolean capitalize) { List rules = new ArrayList<>(); for (T ability : this) { @@ -79,7 +83,9 @@ public class AbilitiesImpl extends ArrayList implements Ab if (!(ability instanceof SpellAbility || ability instanceof PlayLandAbility)) { String rule = ability.getRule(); if (rule != null && rule.length() > 3) { - rule = Character.toUpperCase(rule.charAt(0)) + rule.substring(1); + if (capitalize) { + rule = Character.toUpperCase(rule.charAt(0)) + rule.substring(1); + } if (ability.getRuleAtTheTop()) { rules.add(0, rule); } else { @@ -164,7 +170,6 @@ public class AbilitiesImpl extends ArrayList implements Ab .filter(ability -> ability.getZone().match(zone)) .collect(Collectors.toCollection(AbilitiesImpl::new)); - } @Override @@ -241,7 +246,7 @@ public class AbilitiesImpl extends ArrayList implements Ab @Override public boolean contains(T ability) { - for (Iterator iterator = this.iterator(); iterator.hasNext(); ) { // simple loop can cause java.util.ConcurrentModificationException + for (Iterator iterator = this.iterator(); iterator.hasNext();) { // simple loop can cause java.util.ConcurrentModificationException T test = iterator.next(); // Checking also by getRule() without other restrictions is a problem when a triggered ability will be copied to a permanent that had the same ability // already before the copy. Because then it keeps the triggered ability twice and it triggers twice. @@ -280,7 +285,7 @@ public class AbilitiesImpl extends ArrayList implements Ab @Override public boolean containsKey(UUID abilityId) { - return stream().anyMatch(ability -> ability.getId().equals(abilityId)); + return stream().anyMatch(ability -> abilityId.equals(ability.getId())); } @Override @@ -295,7 +300,7 @@ public class AbilitiesImpl extends ArrayList implements Ab @Override public int getOutcomeTotal() { return stream().mapToInt(ability -> ability.getEffects().getOutcomeTotal()).sum(); - } + } @Override public String getValue() { diff --git a/Mage/src/main/java/mage/abilities/Ability.java b/Mage/src/main/java/mage/abilities/Ability.java index fcc0a5db82..d6baff95d4 100644 --- a/Mage/src/main/java/mage/abilities/Ability.java +++ b/Mage/src/main/java/mage/abilities/Ability.java @@ -40,6 +40,7 @@ import mage.abilities.effects.Effects; import mage.constants.AbilityType; import mage.constants.AbilityWord; import mage.constants.EffectType; +import mage.constants.TargetAdjustment; import mage.constants.Zone; import mage.game.Controllable; import mage.game.Game; @@ -539,4 +540,8 @@ public interface Ability extends Controllable, Serializable { void setCanFizzle(boolean canFizzle); boolean canFizzle(); + + void setTargetAdjustment(TargetAdjustment targetAdjustment); + + TargetAdjustment getTargetAdjustment(); } diff --git a/Mage/src/main/java/mage/abilities/AbilityImpl.java b/Mage/src/main/java/mage/abilities/AbilityImpl.java index 33f84c4e63..8e52732e5d 100644 --- a/Mage/src/main/java/mage/abilities/AbilityImpl.java +++ b/Mage/src/main/java/mage/abilities/AbilityImpl.java @@ -47,6 +47,7 @@ import mage.abilities.effects.common.ManaEffect; import mage.abilities.keyword.FlashbackAbility; import mage.abilities.mana.ActivatedManaAbilityImpl; import mage.cards.Card; +import mage.cards.SplitCard; import mage.constants.*; import mage.game.Game; import mage.game.command.Emblem; @@ -98,6 +99,7 @@ public abstract class AbilityImpl implements Ability { protected List watchers = null; protected List subAbilities = null; protected boolean canFizzle = true; + protected TargetAdjustment targetAdjustment = TargetAdjustment.NONE; public AbilityImpl(AbilityType abilityType, Zone zone) { this.id = UUID.randomUUID(); @@ -146,6 +148,7 @@ public abstract class AbilityImpl implements Ability { this.sourceObject = ability.sourceObject; this.sourceObjectZoneChangeCounter = ability.sourceObjectZoneChangeCounter; this.canFizzle = ability.canFizzle; + this.targetAdjustment = ability.targetAdjustment; } @Override @@ -770,7 +773,7 @@ public abstract class AbilityImpl implements Ability { } if (!costs.isEmpty()) { if (sbRule.length() > 0) { - sbRule.append(','); + sbRule.append(", "); } sbRule.append(costs.getText()); } @@ -886,14 +889,28 @@ public abstract class AbilityImpl implements Ability { @Override public boolean canChooseTarget(Game game) { + if (this instanceof SpellAbility) { + if (SpellAbilityType.SPLIT_FUSED.equals(((SpellAbility) this).getSpellAbilityType())) { + Card card = game.getCard(getSourceId()); + if (card != null) { + return canChooseTargetAbility(((SplitCard) card).getLeftHalfCard().getSpellAbility(), game, getControllerId()) + && canChooseTargetAbility(((SplitCard) card).getRightHalfCard().getSpellAbility(), game, getControllerId()); + } + return false; + } + } + return canChooseTargetAbility(this, game, getControllerId()); + } + + private static boolean canChooseTargetAbility(Ability ability, Game game, UUID controllerId) { int found = 0; - for (Mode mode : getModes().values()) { - if (mode.getTargets().canChoose(sourceId, controllerId, game)) { + for (Mode mode : ability.getModes().values()) { + if (mode.getTargets().canChoose(ability.getSourceId(), ability.getControllerId(), game)) { found++; - if (getModes().isEachModeMoreThanOnce()) { + if (ability.getModes().isEachModeMoreThanOnce()) { return true; } - if (found >= getModes().getMinModes()) { + if (found >= ability.getModes().getMinModes()) { return true; } } @@ -1218,4 +1235,13 @@ public abstract class AbilityImpl implements Ability { this.canFizzle = canFizzle; } + @Override + public void setTargetAdjustment(TargetAdjustment targetAdjustment) { + this.targetAdjustment = targetAdjustment; + } + + @Override + public TargetAdjustment getTargetAdjustment() { + return targetAdjustment; + } } diff --git a/Mage/src/main/java/mage/abilities/ActivatedAbility.java b/Mage/src/main/java/mage/abilities/ActivatedAbility.java index be4df4d366..11de964ed9 100644 --- a/Mage/src/main/java/mage/abilities/ActivatedAbility.java +++ b/Mage/src/main/java/mage/abilities/ActivatedAbility.java @@ -29,6 +29,7 @@ package mage.abilities; import java.util.UUID; import mage.abilities.mana.ManaOptions; +import mage.constants.TargetController; import mage.game.Game; /** @@ -39,6 +40,8 @@ public interface ActivatedAbility extends Ability { boolean canActivate(UUID playerId, Game game); + public void setMayActivate(TargetController mayActivate); + /** * Returns the minimal possible cost for what the ability can be activated * or cast diff --git a/Mage/src/main/java/mage/abilities/ActivatedAbilityImpl.java b/Mage/src/main/java/mage/abilities/ActivatedAbilityImpl.java index 5021a83896..0c63d4595b 100644 --- a/Mage/src/main/java/mage/abilities/ActivatedAbilityImpl.java +++ b/Mage/src/main/java/mage/abilities/ActivatedAbilityImpl.java @@ -29,6 +29,7 @@ package mage.abilities; import java.util.UUID; import mage.MageObject; +import mage.abilities.condition.Condition; import mage.abilities.costs.Cost; import mage.abilities.costs.Costs; import mage.abilities.costs.mana.ManaCosts; @@ -45,6 +46,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.command.Emblem; import mage.game.permanent.Permanent; +import mage.util.CardUtil; /** * @@ -52,6 +54,19 @@ import mage.game.permanent.Permanent; */ public abstract class ActivatedAbilityImpl extends AbilityImpl implements ActivatedAbility { + protected static class ActivationInfo { + + public int turnNum; + public int activationCounter; + + public ActivationInfo(int turnNum, int activationCounter) { + this.turnNum = turnNum; + this.activationCounter = activationCounter; + } + } + + protected int maxActivationsPerTurn = Integer.MAX_VALUE; + protected Condition condition; protected TimingRule timing = TimingRule.INSTANT; protected TargetController mayActivate = TargetController.YOU; protected UUID activatorId; @@ -68,6 +83,8 @@ public abstract class ActivatedAbilityImpl extends AbilityImpl implements Activa mayActivate = ability.mayActivate; activatorId = ability.activatorId; checkPlayableMode = ability.checkPlayableMode; + maxActivationsPerTurn = ability.maxActivationsPerTurn; + condition = ability.condition; } public ActivatedAbilityImpl(Zone zone) { @@ -161,6 +178,9 @@ public abstract class ActivatedAbilityImpl extends AbilityImpl implements Activa @Override public boolean canActivate(UUID playerId, Game game) { //20091005 - 602.2 + if (!(hasMoreActivationsThisTurn(game) && (condition == null || condition.apply(game, this)))) { + return false; + } switch (mayActivate) { case ANY: break; @@ -255,4 +275,55 @@ public abstract class ActivatedAbilityImpl extends AbilityImpl implements Activa return checkPlayableMode; } + protected boolean hasMoreActivationsThisTurn(Game game) { + if (getMaxActivationsPerTurn(game) == Integer.MAX_VALUE) { + return true; + } + ActivationInfo activationInfo = getActivationInfo(game); + return activationInfo == null + || activationInfo.turnNum != game.getTurnNum() + || activationInfo.activationCounter < getMaxActivationsPerTurn(game); + } + + @Override + public boolean activate(Game game, boolean noMana) { + if (hasMoreActivationsThisTurn(game)) { + if (super.activate(game, noMana)) { + ActivationInfo activationInfo = getActivationInfo(game); + if (activationInfo == null) { + activationInfo = new ActivationInfo(game.getTurnNum(), 1); + } else if (activationInfo.turnNum != game.getTurnNum()) { + activationInfo.turnNum = game.getTurnNum(); + activationInfo.activationCounter = 1; + } else { + activationInfo.activationCounter++; + } + setActivationInfo(activationInfo, game); + return true; + } + } + return false; + } + + public void setMaxActivationsPerTurn(int maxActivationsPerTurn) { + this.maxActivationsPerTurn = maxActivationsPerTurn; + } + + public int getMaxActivationsPerTurn(Game game) { + return maxActivationsPerTurn; + } + + protected ActivationInfo getActivationInfo(Game game) { + Integer turnNum = (Integer) game.getState().getValue(CardUtil.getCardZoneString("activationsTurn" + originalId, sourceId, game)); + Integer activationCount = (Integer) game.getState().getValue(CardUtil.getCardZoneString("activationsCount" + originalId, sourceId, game)); + if (turnNum == null || activationCount == null) { + return null; + } + return new ActivationInfo(turnNum, activationCount); + } + + protected void setActivationInfo(ActivationInfo activationInfo, Game game) { + game.getState().setValue(CardUtil.getCardZoneString("activationsTurn" + originalId, sourceId, game), activationInfo.turnNum); + game.getState().setValue(CardUtil.getCardZoneString("activationsCount" + originalId, sourceId, game), activationInfo.activationCounter); + } } diff --git a/Mage/src/main/java/mage/abilities/CompoundAbility.java b/Mage/src/main/java/mage/abilities/CompoundAbility.java index d122735f84..e07d934980 100644 --- a/Mage/src/main/java/mage/abilities/CompoundAbility.java +++ b/Mage/src/main/java/mage/abilities/CompoundAbility.java @@ -31,7 +31,7 @@ public class CompoundAbility extends AbilitiesImpl { } StringBuilder sb = new StringBuilder(); - List rules = super.getRules(null); + List rules = super.getRules(null,false); for (int index = 0; index < rules.size(); index++) { if (index > 0) { if (index < rules.size() - 1) { diff --git a/Mage/src/main/java/mage/abilities/Gender.java b/Mage/src/main/java/mage/abilities/Gender.java index d7dd334967..be6f398006 100644 --- a/Mage/src/main/java/mage/abilities/Gender.java +++ b/Mage/src/main/java/mage/abilities/Gender.java @@ -4,7 +4,7 @@ package mage.abilities; * Created by IGOUDT on 5-3-2017. */ public enum Gender { - MALE("his", "him"), FEMALE("her", "her"); + MALE("his", "him"), FEMALE("her", "her"), NEUTRAL("its", "it"); String personalPronoun; String possesivePronoun; @@ -22,5 +22,4 @@ public enum Gender { return possesivePronoun; } - } diff --git a/Mage/src/main/java/mage/abilities/SpellAbility.java b/Mage/src/main/java/mage/abilities/SpellAbility.java index 37bc8917a5..f09f246b7f 100644 --- a/Mage/src/main/java/mage/abilities/SpellAbility.java +++ b/Mage/src/main/java/mage/abilities/SpellAbility.java @@ -97,9 +97,11 @@ public class SpellAbility extends ActivatedAbilityImpl { return false; } // fix for Gitaxian Probe and casting opponent's spells - if (!game.getContinuousEffects().asThough(getSourceId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, playerId, game) - && !controllerId.equals(playerId)) { - return false; + if (!game.getContinuousEffects().asThough(getSourceId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, playerId, game)) { + Card card = game.getCard(sourceId); + if (!(card != null && card.getOwnerId() == playerId)) { + return false; + } } // Check if rule modifying events prevent to cast the spell in check playable mode if (this.isCheckPlayableMode()) { diff --git a/Mage/src/main/java/mage/abilities/TriggeredAbilities.java b/Mage/src/main/java/mage/abilities/TriggeredAbilities.java index a8eebfb296..5feca7f7af 100644 --- a/Mage/src/main/java/mage/abilities/TriggeredAbilities.java +++ b/Mage/src/main/java/mage/abilities/TriggeredAbilities.java @@ -30,7 +30,6 @@ package mage.abilities; import mage.MageObject; import mage.constants.Zone; -import mage.designations.Designation; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.NumberOfTriggersEvent; @@ -41,12 +40,11 @@ import java.util.*; import java.util.concurrent.ConcurrentHashMap; /** - * * @author BetaSteward_at_googlemail.com - * - * This class uses ConcurrentHashMap to avoid ConcurrentModificationExceptions. - * See ticket https://github.com/magefree/mage/issues/966 and - * https://github.com/magefree/mage/issues/473 + *

+ * This class uses ConcurrentHashMap to avoid ConcurrentModificationExceptions. + * See ticket https://github.com/magefree/mage/issues/966 and + * https://github.com/magefree/mage/issues/473 */ public class TriggeredAbilities extends ConcurrentHashMap { @@ -65,7 +63,7 @@ public class TriggeredAbilities extends ConcurrentHashMap it = this.values().iterator(); it.hasNext();) { + for (Iterator it = this.values().iterator(); it.hasNext(); ) { TriggeredAbility ability = it.next(); if (ability instanceof StateTriggeredAbility && ((StateTriggeredAbility) ability).canTrigger(game)) { checkTrigger(ability, null, game); @@ -74,7 +72,7 @@ public class TriggeredAbilities extends ConcurrentHashMap it = this.values().iterator(); it.hasNext();) { + for (Iterator it = this.values().iterator(); it.hasNext(); ) { TriggeredAbility ability = it.next(); if (ability.checkEventType(event, game)) { checkTrigger(ability, event, game); @@ -132,8 +130,8 @@ public class TriggeredAbilities extends ConcurrentHashMap keysToRemove = new ArrayList<>(); - for (String key : this.keySet()) { - if (key.endsWith(sourceId.toString())) { - keysToRemove.add(key); - } - } - for (String key : keysToRemove) { - remove(key); - } + keySet().removeIf(key -> key.endsWith(sourceId.toString())); } public void removeAllGainedAbilities() { @@ -182,19 +173,10 @@ public class TriggeredAbilities extends ConcurrentHashMap keysToRemove = new ArrayList<>(); - Abilities: - for (Entry entry : this.entrySet()) { - if (game.getObject(entry.getValue().getSourceId()) == null) { - for (Designation designation : game.getState().getDesignations()) { - if (designation.getId().equals(entry.getValue().getSourceId())) { - continue Abilities; - } - } - keysToRemove.add(entry.getKey()); - } - } - this.keySet().removeAll(keysToRemove); + + entrySet().removeIf(entry -> game.getObject(entry.getValue().getSourceId()) == null + && game.getState().getDesignations().stream().noneMatch(designation -> designation.getId().equals(entry.getValue().getSourceId()))); + } public TriggeredAbilities copy() { diff --git a/Mage/src/main/java/mage/abilities/common/ActivateIfConditionActivatedAbility.java b/Mage/src/main/java/mage/abilities/common/ActivateIfConditionActivatedAbility.java index 1e0753ce92..c44fe6cb16 100644 --- a/Mage/src/main/java/mage/abilities/common/ActivateIfConditionActivatedAbility.java +++ b/Mage/src/main/java/mage/abilities/common/ActivateIfConditionActivatedAbility.java @@ -25,10 +25,8 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.common; -import java.util.UUID; import mage.abilities.ActivatedAbilityImpl; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -43,8 +41,6 @@ import mage.game.Game; */ public class ActivateIfConditionActivatedAbility extends ActivatedAbilityImpl { - private final Condition condition; - public ActivateIfConditionActivatedAbility(Zone zone, Effect effect, Cost cost, Condition condition) { super(zone, effect, cost); this.condition = condition; @@ -52,31 +48,11 @@ public class ActivateIfConditionActivatedAbility extends ActivatedAbilityImpl { public ActivateIfConditionActivatedAbility(ActivateIfConditionActivatedAbility ability) { super(ability); - this.condition = ability.condition; - } - - @Override - public boolean canActivate(UUID playerId, Game game) { - if (condition.apply(game, this)) { - return super.canActivate(playerId, game); - } - return false; - } - - @Override - public boolean activate(Game game, boolean noMana) { - if (canActivate(this.controllerId, game)) { - return super.activate(game, noMana); - } - return false; } @Override public boolean resolve(Game game) { - if (super.resolve(game)) { - return true; - } - return false; + return super.resolve(game); } @Override @@ -88,15 +64,15 @@ public class ActivateIfConditionActivatedAbility extends ActivatedAbilityImpl { sb.append(" Activate this ability only "); } if (condition.toString() != null) { - if (!condition.toString().startsWith("during") && - !condition.toString().startsWith("before")) { + if (!condition.toString().startsWith("during") + && !condition.toString().startsWith("before")) { sb.append("if "); } sb.append(condition.toString()).append('.'); } else { sb.append(" [Condition toString() == null] "); } - return sb.toString() ; + return sb.toString(); } @Override diff --git a/Mage/src/main/java/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java index 2445b391bb..37f535e7a5 100644 --- a/Mage/src/main/java/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java @@ -44,6 +44,7 @@ public class AttacksCreatureYouControlTriggeredAbility extends TriggeredAbilityI protected FilterControlledCreaturePermanent filter; protected boolean setTargetPointer; + protected boolean once = false; public AttacksCreatureYouControlTriggeredAbility(Effect effect) { this(effect, false); @@ -73,6 +74,10 @@ public class AttacksCreatureYouControlTriggeredAbility extends TriggeredAbilityI this.setTargetPointer = ability.setTargetPointer; } + public void setOnce(boolean once) { + this.once = once; + } + @Override public boolean checkEventType(GameEvent event, Game game) { return event.getType() == GameEvent.EventType.ATTACKER_DECLARED; @@ -97,7 +102,6 @@ public class AttacksCreatureYouControlTriggeredAbility extends TriggeredAbilityI @Override public String getRule() { - return "Whenever a " + filter.getMessage() + " attacks, " + super.getRule(); + return "When" + (once ? "" : "ever") + " a" + (filter.getMessage().startsWith("a") ? "n " : " ") + filter.getMessage() + " attacks, " + super.getRule(); } - } diff --git a/Mage/src/main/java/mage/abilities/common/AuraAttachedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/AuraAttachedTriggeredAbility.java index 4ab0f259ef..54937ec333 100644 --- a/Mage/src/main/java/mage/abilities/common/AuraAttachedTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/AuraAttachedTriggeredAbility.java @@ -29,6 +29,7 @@ package mage.abilities.common; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -57,7 +58,7 @@ public class AuraAttachedTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (event.getTargetId().equals(this.getSourceId())) { Permanent attachment = game.getPermanent(event.getSourceId()); - if (attachment != null && attachment.getSubtype(game).contains("Aura")) { + if (attachment != null && attachment.hasSubtype(SubType.AURA, game)) { return true; } } diff --git a/Mage/src/main/java/mage/abilities/common/BlocksTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BlocksTriggeredAbility.java index d82fe4c8ba..bb5da984e8 100644 --- a/Mage/src/main/java/mage/abilities/common/BlocksTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/BlocksTriggeredAbility.java @@ -41,19 +41,26 @@ import mage.target.targetpointer.FixedTarget; public class BlocksTriggeredAbility extends TriggeredAbilityImpl { private boolean setTargetPointer; + private boolean once = false; public BlocksTriggeredAbility(Effect effect, boolean optional) { this(effect, optional, false); } public BlocksTriggeredAbility(Effect effect, boolean optional, boolean setTargetPointer) { + this(effect, optional, setTargetPointer, false); + } + + public BlocksTriggeredAbility(Effect effect, boolean optional, boolean setTargetPointer, boolean once) { super(Zone.BATTLEFIELD, effect, optional); this.setTargetPointer = setTargetPointer; + this.once = once; } public BlocksTriggeredAbility(final BlocksTriggeredAbility ability) { super(ability); this.setTargetPointer = ability.setTargetPointer; + this.once = ability.once; } @Override @@ -76,7 +83,7 @@ public class BlocksTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever {this} blocks" + (setTargetPointer ? " a creature, " : ", ") + super.getRule(); + return "When" + (once ? "" : "ever") + " {this} blocks" + (setTargetPointer ? " a creature, " : ", ") + super.getRule(); } @Override diff --git a/Mage/src/main/java/mage/abilities/common/CantBlockAbility.java b/Mage/src/main/java/mage/abilities/common/CantBlockAbility.java index 0e00876367..409af297ef 100644 --- a/Mage/src/main/java/mage/abilities/common/CantBlockAbility.java +++ b/Mage/src/main/java/mage/abilities/common/CantBlockAbility.java @@ -47,7 +47,7 @@ public class CantBlockAbility extends SimpleStaticAbility { @Override public String getRule() { - return "{this} can't block"; + return "{this} can't block."; } @Override diff --git a/Mage/src/main/java/mage/abilities/common/DealtDamageAndDiedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DealtDamageAndDiedTriggeredAbility.java index 9bb5f4458e..bb080f081d 100644 --- a/Mage/src/main/java/mage/abilities/common/DealtDamageAndDiedTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/DealtDamageAndDiedTriggeredAbility.java @@ -3,8 +3,8 @@ package mage.abilities.common; import mage.MageObjectReference; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; -import mage.constants.CardType; import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.ZoneChangeEvent; @@ -12,16 +12,24 @@ import mage.target.targetpointer.FixedTarget; public class DealtDamageAndDiedTriggeredAbility extends TriggeredAbilityImpl { + private final FilterCreaturePermanent filter; + public DealtDamageAndDiedTriggeredAbility(Effect effect) { this(effect, false); } public DealtDamageAndDiedTriggeredAbility(Effect effect, boolean optional) { + this(effect, optional, new FilterCreaturePermanent()); + } + + public DealtDamageAndDiedTriggeredAbility(Effect effect, boolean optional, FilterCreaturePermanent filter) { super(Zone.ALL, effect, optional); + this.filter = filter; } public DealtDamageAndDiedTriggeredAbility(final DealtDamageAndDiedTriggeredAbility ability) { super(ability); + this.filter = ability.filter; } @Override @@ -36,9 +44,9 @@ public class DealtDamageAndDiedTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - if (((ZoneChangeEvent)event).isDiesEvent()) { + if (((ZoneChangeEvent) event).isDiesEvent()) { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; - if (zEvent.getTarget().isCreature()) { + if (filter.match(zEvent.getTarget(), game)) { boolean damageDealt = false; for (MageObjectReference mor : zEvent.getTarget().getDealtDamageByThisTurn()) { if (mor.refersTo(getSourceObject(game), game)) { @@ -59,6 +67,6 @@ public class DealtDamageAndDiedTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever a creature dealt damage by {this} this turn dies, " + super.getRule(); + return "Whenever a " + filter.getMessage() + " dealt damage by {this} this turn dies, " + super.getRule(); } -} \ No newline at end of file +} diff --git a/Mage/src/main/java/mage/abilities/common/DealtDamageToSourceTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DealtDamageToSourceTriggeredAbility.java index d421a58078..59c5a26c94 100644 --- a/Mage/src/main/java/mage/abilities/common/DealtDamageToSourceTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/DealtDamageToSourceTriggeredAbility.java @@ -1,4 +1,4 @@ - /* +/* * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -25,28 +25,45 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.common; import mage.constants.Zone; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; import mage.game.Game; +import mage.game.events.DamagedCreatureEvent; import mage.game.events.GameEvent; /** * * @author LevelX2 */ - public class DealtDamageToSourceTriggeredAbility extends TriggeredAbilityImpl { + private final boolean enrage; + private final boolean useValue; + private boolean usedForCombatDamageStep; + public DealtDamageToSourceTriggeredAbility(Zone zone, Effect effect, boolean optional) { + this(zone, effect, optional, false); + } + + public DealtDamageToSourceTriggeredAbility(Zone zone, Effect effect, boolean optional, boolean enrage) { + this(zone, effect, optional, enrage, false); + } + + public DealtDamageToSourceTriggeredAbility(Zone zone, Effect effect, boolean optional, boolean enrage, boolean useValue) { super(zone, effect, optional); + this.enrage = enrage; + this.useValue = useValue; + this.usedForCombatDamageStep = false; } public DealtDamageToSourceTriggeredAbility(final DealtDamageToSourceTriggeredAbility ability) { super(ability); + this.enrage = ability.enrage; + this.useValue = ability.useValue; + this.usedForCombatDamageStep = ability.usedForCombatDamageStep; } @Override @@ -56,22 +73,38 @@ public class DealtDamageToSourceTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.DAMAGED_CREATURE; + return event.getType() == GameEvent.EventType.DAMAGED_CREATURE || event.getType() == GameEvent.EventType.COMBAT_DAMAGE_STEP_POST; } @Override public boolean checkTrigger(GameEvent event, Game game) { - if (event.getTargetId().equals(getSourceId())) { - for (Effect effect : this.getEffects()) { + if (event.getType() == GameEvent.EventType.DAMAGED_CREATURE && event.getTargetId().equals(getSourceId())) { + if (useValue) { +// TODO: this ability should only trigger once for multiple creatures dealing combat damage. +// If the damaged creature uses the amount (e.g. Boros Reckoner), this will still trigger separately instead of all at once + for (Effect effect : this.getEffects()) { effect.setValue("damage", event.getAmount()); + } + return true; + } else { + if (((DamagedCreatureEvent) event).isCombatDamage()) { + if (!usedForCombatDamageStep) { + usedForCombatDamageStep = true; + return true; + } + } else { + return true; + } } - return true; + } + if (event.getType() == GameEvent.EventType.COMBAT_DAMAGE_STEP_POST) { + usedForCombatDamageStep = false; } return false; } @Override public String getRule() { - return "Whenever {this} is dealt damage, " + super.getRule(); + return (enrage ? "Enrage — " : "") + "Whenever {this} is dealt damage, " + super.getRule(); } } diff --git a/Mage/src/main/java/mage/abilities/common/DiesCreatureTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DiesCreatureTriggeredAbility.java index 6e160f7020..671945e5f9 100644 --- a/Mage/src/main/java/mage/abilities/common/DiesCreatureTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/DiesCreatureTriggeredAbility.java @@ -3,6 +3,7 @@ package mage.abilities.common; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; import mage.constants.Zone; +import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; import mage.game.Game; @@ -15,7 +16,7 @@ import mage.target.targetpointer.FixedTarget; */ public class DiesCreatureTriggeredAbility extends TriggeredAbilityImpl { - protected FilterCreaturePermanent filter; + protected FilterPermanent filter; private boolean setTargetPointer; public DiesCreatureTriggeredAbility(Effect effect, boolean optional) { @@ -34,15 +35,15 @@ public class DiesCreatureTriggeredAbility extends TriggeredAbilityImpl { this.setTargetPointer = setTargetPointer; } - public DiesCreatureTriggeredAbility(Effect effect, boolean optional, FilterCreaturePermanent filter) { + public DiesCreatureTriggeredAbility(Effect effect, boolean optional, FilterPermanent filter) { this(effect, optional, filter, false); } - public DiesCreatureTriggeredAbility(Effect effect, boolean optional, FilterCreaturePermanent filter, boolean setTargetPointer) { + public DiesCreatureTriggeredAbility(Effect effect, boolean optional, FilterPermanent filter, boolean setTargetPointer) { this(Zone.BATTLEFIELD, effect, optional, filter, setTargetPointer); } - public DiesCreatureTriggeredAbility(Zone zone, Effect effect, boolean optional, FilterCreaturePermanent filter, boolean setTargetPointer) { + public DiesCreatureTriggeredAbility(Zone zone, Effect effect, boolean optional, FilterPermanent filter, boolean setTargetPointer) { super(zone, effect, optional); this.filter = filter; this.setTargetPointer = setTargetPointer; @@ -68,7 +69,7 @@ public class DiesCreatureTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) { - if (filter.match(zEvent.getTarget(), sourceId, controllerId, game)) { + if (filter.match(zEvent.getTarget(), sourceId, controllerId, game) && zEvent.getTarget().isCreature()) { if (setTargetPointer) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getTargetId())); diff --git a/Mage/src/main/java/mage/abilities/common/EndOfCombatTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/EndOfCombatTriggeredAbility.java index cdff752da7..3c332a232b 100644 --- a/Mage/src/main/java/mage/abilities/common/EndOfCombatTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/EndOfCombatTriggeredAbility.java @@ -15,7 +15,6 @@ import mage.game.events.GameEvent; * * @author LevelX2 */ - public class EndOfCombatTriggeredAbility extends TriggeredAbilityImpl { public EndOfCombatTriggeredAbility(Effect effect, boolean optional) { @@ -35,7 +34,7 @@ public class EndOfCombatTriggeredAbility extends TriggeredAbilityImpl { public boolean checkEventType(GameEvent event, Game game) { return event.getType() == GameEvent.EventType.END_COMBAT_STEP_PRE; } - + @Override public boolean checkTrigger(GameEvent event, Game game) { return true; @@ -43,6 +42,6 @@ public class EndOfCombatTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "At the end of combat, " + super.getRule(); + return "At end of combat, " + super.getRule(); } -} \ No newline at end of file +} diff --git a/Mage/src/main/java/mage/abilities/common/EntersBattlefieldAbility.java b/Mage/src/main/java/mage/abilities/common/EntersBattlefieldAbility.java index a7cb368a6c..01c582f52c 100644 --- a/Mage/src/main/java/mage/abilities/common/EntersBattlefieldAbility.java +++ b/Mage/src/main/java/mage/abilities/common/EntersBattlefieldAbility.java @@ -95,7 +95,7 @@ public class EntersBattlefieldAbility extends StaticAbility { return; } } - super.addEffect(effect); //To change body of generated methods, choose Tools | Templates. + super.addEffect(effect); } @Override @@ -108,6 +108,7 @@ public class EntersBattlefieldAbility extends StaticAbility { if (abilityRule != null && !abilityRule.isEmpty()) { return abilityRule; } - return (optional ? "you may have " : "") + "{this} enter" + (optional ? "" : "s") + " the battlefield " + super.getRule(); + String superRule = super.getRule(); + return (optional ? "you may have " : "") + "{this} enter" + (optional ? "" : "s") + " the battlefield" + (superRule.charAt(0) == ' ' ? "" : " ") + superRule; } } diff --git a/Mage/src/main/java/mage/abilities/common/FeralDeceiverAbility.java b/Mage/src/main/java/mage/abilities/common/FeralDeceiverAbility.java deleted file mode 100644 index 49c73bb613..0000000000 --- a/Mage/src/main/java/mage/abilities/common/FeralDeceiverAbility.java +++ /dev/null @@ -1,50 +0,0 @@ -package mage.abilities.common; - -import mage.abilities.costs.Cost; -import mage.abilities.effects.Effect; -import mage.cards.Card; -import mage.cards.Cards; -import mage.cards.CardsImpl; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.game.Game; -import mage.players.Player; - -/** - * Created by Eric on 9/24/2016. - */ -public class FeralDeceiverAbility extends LimitedTimesPerTurnActivatedAbility { - - public FeralDeceiverAbility(Zone zone, Effect effect, Cost cost) { - super(zone, effect, cost); - } - - public FeralDeceiverAbility(FeralDeceiverAbility ability) { - super(ability); - } - - @Override - public FeralDeceiverAbility copy() { - return new FeralDeceiverAbility(this); - } - - @Override - public boolean checkIfClause(Game game) { - Player player = game.getPlayer(this.getControllerId()); - if (player != null) { - Cards cards = new CardsImpl(); - Card card = player.getLibrary().getFromTop(game); - cards.add(card); - player.revealCards("Feral Deceiver", cards, game); - if (card != null && card.isLand()) { - return true; - } - } - return false; - } - - @Override - public String getRule() { - return "{2}: Reveal the top card of your library. If it's a land card, {this} gets +2/+2 and gains trample until end of turn. Activate this ability only once each turn."; - } -} diff --git a/Mage/src/main/java/mage/abilities/common/LeavesBattlefieldAllTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/LeavesBattlefieldAllTriggeredAbility.java index 2c05677467..5ed3b300b7 100644 --- a/Mage/src/main/java/mage/abilities/common/LeavesBattlefieldAllTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/LeavesBattlefieldAllTriggeredAbility.java @@ -30,12 +30,14 @@ package mage.abilities.common; import java.util.UUID; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; +import mage.constants.SetTargetPointer; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.ZoneChangeEvent; import mage.game.permanent.Permanent; +import mage.target.targetpointer.FixedTarget; /** * @@ -44,6 +46,7 @@ import mage.game.permanent.Permanent; public class LeavesBattlefieldAllTriggeredAbility extends TriggeredAbilityImpl { protected FilterPermanent filter; + protected SetTargetPointer setTargetPointer; public LeavesBattlefieldAllTriggeredAbility(Effect effect, FilterPermanent filter) { this(effect, filter, false); @@ -54,13 +57,19 @@ public class LeavesBattlefieldAllTriggeredAbility extends TriggeredAbilityImpl { } public LeavesBattlefieldAllTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter, boolean optional) { + this(zone, effect, filter, optional, SetTargetPointer.NONE); + } + + public LeavesBattlefieldAllTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter, boolean optional, SetTargetPointer setTargetPointer) { super(zone, effect, optional); this.filter = filter; + this.setTargetPointer = setTargetPointer; } public LeavesBattlefieldAllTriggeredAbility(final LeavesBattlefieldAllTriggeredAbility ability) { super(ability); filter = ability.filter; + setTargetPointer = ability.setTargetPointer; } @Override @@ -79,8 +88,20 @@ public class LeavesBattlefieldAllTriggeredAbility extends TriggeredAbilityImpl { if (zEvent.getFromZone() == Zone.BATTLEFIELD) { UUID targetId = event.getTargetId(); Permanent permanent = game.getPermanentOrLKIBattlefield(targetId); - if (permanent != null) { - return filter.match(permanent, getSourceId(), getControllerId(), game); + if (permanent != null && filter.match(permanent, getSourceId(), getControllerId(), game)) { + if (setTargetPointer != SetTargetPointer.NONE) { + for (Effect effect : this.getEffects()) { + switch (setTargetPointer) { + case PERMANENT: + effect.setTargetPointer(new FixedTarget(permanent.getId())); + break; + case PLAYER: + effect.setTargetPointer(new FixedTarget(permanent.getControllerId())); + break; + } + } + } + return true; } } return false; diff --git a/Mage/src/main/java/mage/abilities/common/LicidAbility.java b/Mage/src/main/java/mage/abilities/common/LicidAbility.java index 545eb9313a..1d9afab34b 100644 --- a/Mage/src/main/java/mage/abilities/common/LicidAbility.java +++ b/Mage/src/main/java/mage/abilities/common/LicidAbility.java @@ -47,6 +47,7 @@ import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; import mage.constants.SubLayer; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; @@ -142,7 +143,7 @@ class LicidContinuousEffect extends ContinuousEffectImpl { licid.getCardType().clear(); licid.addCardType(CardType.ENCHANTMENT); licid.getSubtype(game).clear(); - licid.getSubtype(game).add("Aura"); + licid.getSubtype(game).add(SubType.AURA); break; case AbilityAddingRemovingEffects_6: ArrayList toRemove = new ArrayList<>(); diff --git a/Mage/src/main/java/mage/abilities/common/LimitedTimesPerTurnActivatedAbility.java b/Mage/src/main/java/mage/abilities/common/LimitedTimesPerTurnActivatedAbility.java index 4e42a1678c..3358d9dd9f 100644 --- a/Mage/src/main/java/mage/abilities/common/LimitedTimesPerTurnActivatedAbility.java +++ b/Mage/src/main/java/mage/abilities/common/LimitedTimesPerTurnActivatedAbility.java @@ -36,28 +36,12 @@ import mage.constants.Zone; import mage.game.Game; import mage.util.CardUtil; -import java.util.UUID; - /** * * @author BetaSteward_at_googlemail.com */ public class LimitedTimesPerTurnActivatedAbility extends ActivatedAbilityImpl { - static class ActivationInfo { - - public int turnNum; - public int activationCounter; - - public ActivationInfo(int turnNum, int activationCounter) { - this.turnNum = turnNum; - this.activationCounter = activationCounter; - } - } - - private int maxActivationsPerTurn; - private Condition condition; - public LimitedTimesPerTurnActivatedAbility(Zone zone, Effect effect, Cost cost) { this(zone, effect, cost, 1); } @@ -78,38 +62,6 @@ public class LimitedTimesPerTurnActivatedAbility extends ActivatedAbilityImpl { this.condition = ability.condition; } - @Override - public boolean canActivate(UUID playerId, Game game) { - return super.canActivate(playerId, game) - && hasMoreActivationsThisTurn(game) - && (condition == null || condition.apply(game, this)); - } - - private boolean hasMoreActivationsThisTurn(Game game) { - ActivationInfo activationInfo = getActivationInfo(game); - return activationInfo == null || activationInfo.turnNum != game.getTurnNum() || activationInfo.activationCounter < maxActivationsPerTurn; - } - - @Override - public boolean activate(Game game, boolean noMana) { - if (hasMoreActivationsThisTurn(game)) { - if (super.activate(game, noMana)) { - ActivationInfo activationInfo = getActivationInfo(game); - if (activationInfo == null) { - activationInfo = new ActivationInfo(game.getTurnNum(), 1); - } else if (activationInfo.turnNum != game.getTurnNum()) { - activationInfo.turnNum = game.getTurnNum(); - activationInfo.activationCounter = 1; - } else { - activationInfo.activationCounter++; - } - setActivationInfo(activationInfo, game); - return true; - } - } - return false; - } - @Override public boolean resolve(Game game) { return super.resolve(game); @@ -142,18 +94,4 @@ public class LimitedTimesPerTurnActivatedAbility extends ActivatedAbilityImpl { public LimitedTimesPerTurnActivatedAbility copy() { return new LimitedTimesPerTurnActivatedAbility(this); } - - private ActivationInfo getActivationInfo(Game game) { - Integer turnNum = (Integer) game.getState().getValue(CardUtil.getCardZoneString("activationsTurn", sourceId, game)); - Integer activationCount = (Integer) game.getState().getValue(CardUtil.getCardZoneString("activationsCount", sourceId, game)); - if (turnNum == null || activationCount == null) { - return null; - } - return new ActivationInfo(turnNum, activationCount); - } - - private void setActivationInfo(ActivationInfo activationInfo, Game game) { - game.getState().setValue(CardUtil.getCardZoneString("activationsTurn", sourceId, game), activationInfo.turnNum); - game.getState().setValue(CardUtil.getCardZoneString("activationsCount", sourceId, game), activationInfo.activationCounter); - } } diff --git a/Mage/src/main/java/mage/abilities/common/PayMoreToCastAsThoughtItHadFlashAbility.java b/Mage/src/main/java/mage/abilities/common/PayMoreToCastAsThoughtItHadFlashAbility.java index 599b1a2d81..3faa62f5c4 100644 --- a/Mage/src/main/java/mage/abilities/common/PayMoreToCastAsThoughtItHadFlashAbility.java +++ b/Mage/src/main/java/mage/abilities/common/PayMoreToCastAsThoughtItHadFlashAbility.java @@ -26,7 +26,7 @@ public class PayMoreToCastAsThoughtItHadFlashAbility extends SpellAbility { super(card.getSpellAbility().getManaCosts().copy(), card.getName() + " as though it had flash", Zone.HAND, SpellAbilityType.BASE_ALTERNATE); this.costsToAdd = costsToAdd; this.timing = TimingRule.INSTANT; - + this.ruleAtTheTop = true; CardUtil.increaseCost(this, costsToAdd); } diff --git a/Mage/src/main/java/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java index 48e36b1da9..0817a4ac1b 100644 --- a/Mage/src/main/java/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java @@ -82,7 +82,7 @@ public class PutIntoGraveFromBattlefieldAllTriggeredAbility extends TriggeredAbi } if (setTargetPointer) { for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getTargetId())); + effect.setTargetPointer(new FixedTarget(event.getTargetId(), game.getObject(event.getTargetId()).getZoneChangeCounter(game))); } } return true; diff --git a/Mage/src/main/java/mage/abilities/common/SacrificePermanentTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/SacrificePermanentTriggeredAbility.java new file mode 100644 index 0000000000..6222095098 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/common/SacrificePermanentTriggeredAbility.java @@ -0,0 +1,80 @@ +/* + * 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.abilities.common; + +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author TheElk801 + */ +public class SacrificePermanentTriggeredAbility extends TriggeredAbilityImpl { + + private FilterPermanent filter; + + public SacrificePermanentTriggeredAbility(Effect effect) { + this(effect, new FilterPermanent()); + } + + public SacrificePermanentTriggeredAbility(Effect effect, FilterPermanent filter) { + super(Zone.BATTLEFIELD, effect); + setLeavesTheBattlefieldTrigger(true); + this.filter = filter; + } + + public SacrificePermanentTriggeredAbility(final SacrificePermanentTriggeredAbility ability) { + super(ability); + this.filter = ability.filter; + } + + @Override + public SacrificePermanentTriggeredAbility copy() { + return new SacrificePermanentTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.SACRIFICED_PERMANENT; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return event.getPlayerId().equals(this.getControllerId()) + && filter.match(game.getPermanentOrLKIBattlefield(event.getTargetId()), game); + } + + @Override + public String getRule() { + return "Whenever you sacrifice " + filter.getMessage() + ", " + super.getRule(); + } +} diff --git a/Mage/src/main/java/mage/abilities/common/SanctuaryTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/SanctuaryTriggeredAbility.java new file mode 100644 index 0000000000..9023e003cb --- /dev/null +++ b/Mage/src/main/java/mage/abilities/common/SanctuaryTriggeredAbility.java @@ -0,0 +1,80 @@ +/* + * 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.abilities.common; + +import mage.ObjectColor; +import mage.abilities.TriggeredAbility; +import mage.abilities.condition.CompoundCondition; +import mage.abilities.condition.Condition; +import mage.abilities.condition.InvertCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author TheElk801 + */ +public class SanctuaryTriggeredAbility extends ConditionalTriggeredAbility { + + private static Condition makeOrCondition(ObjectColor color1, ObjectColor color2) { + FilterPermanent filter = new FilterPermanent(); + filter.add(Predicates.or( + new ColorPredicate(color1), + new ColorPredicate(color2) + )); + return new PermanentsOnTheBattlefieldCondition(filter); + } + + private static Condition makeAndCondition(ObjectColor color1, ObjectColor color2) { + FilterPermanent filter1 = new FilterPermanent(); + filter1.add(new ColorPredicate(color1)); + Condition condition1 = new PermanentsOnTheBattlefieldCondition(filter1); + FilterPermanent filter2 = new FilterPermanent(); + filter2.add(new ColorPredicate(color2)); + Condition condition2 = new PermanentsOnTheBattlefieldCondition(filter2); + return new CompoundCondition(condition1, condition2); + } + + private static TriggeredAbility makeTrigger(OneShotEffect effect1, OneShotEffect effect2, ObjectColor color1, ObjectColor color2) { + TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility( + new ConditionalOneShotEffect(effect1, new InvertCondition(makeAndCondition(color1, color2))), TargetController.YOU, false + ); + ability.addEffect(new ConditionalOneShotEffect(effect2, makeAndCondition(color1, color2))); + return ability; + } + + public SanctuaryTriggeredAbility(OneShotEffect effect1, OneShotEffect effect2, ObjectColor color1, ObjectColor color2, String text) { + super(makeTrigger(effect1, effect2, color1, color2), makeOrCondition(color1, color2), text); + } +} diff --git a/Mage/src/main/java/mage/abilities/common/SimpleActivatedAbility.java b/Mage/src/main/java/mage/abilities/common/SimpleActivatedAbility.java index 9b9b93d93d..c32908472a 100644 --- a/Mage/src/main/java/mage/abilities/common/SimpleActivatedAbility.java +++ b/Mage/src/main/java/mage/abilities/common/SimpleActivatedAbility.java @@ -24,8 +24,7 @@ * 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.abilities.common; import mage.constants.Zone; @@ -41,6 +40,14 @@ import mage.abilities.effects.Effect; */ public class SimpleActivatedAbility extends ActivatedAbilityImpl { + public SimpleActivatedAbility(Effect effect, ManaCosts cost) { + super(Zone.BATTLEFIELD, effect, cost); + } + + public SimpleActivatedAbility(Effect effect, Cost cost) { + super(Zone.BATTLEFIELD, effect, cost); + } + public SimpleActivatedAbility(Zone zone, Effect effect, ManaCosts cost) { super(zone, effect, cost); } diff --git a/Mage/src/main/java/mage/abilities/condition/common/AttackedThisStepCondition.java b/Mage/src/main/java/mage/abilities/condition/common/AttackedThisStepCondition.java new file mode 100644 index 0000000000..7ecc8fb53c --- /dev/null +++ b/Mage/src/main/java/mage/abilities/condition/common/AttackedThisStepCondition.java @@ -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.abilities.condition.common; + +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.game.Game; +import mage.watchers.common.PlayerAttackedStepWatcher; + +/** + * @author LevelX2 + */ +public enum AttackedThisStepCondition implements Condition { + + instance; + + @Override + public boolean apply(Game game, Ability source) { + PlayerAttackedStepWatcher watcher = (PlayerAttackedStepWatcher) game.getState().getWatchers().get(PlayerAttackedStepWatcher.class.getSimpleName()); + return watcher != null + && watcher.getNumberAttackingCurrentStep(source.getControllerId()) > 0; + } + + public String toString() { + return "during the declare attackers step and only if you've been attacked this step."; + } +} diff --git a/Mage/src/main/java/mage/abilities/condition/common/BuybackCondition.java b/Mage/src/main/java/mage/abilities/condition/common/BuybackCondition.java index 6cc4f4aebe..20e914124b 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/BuybackCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/BuybackCondition.java @@ -46,7 +46,7 @@ public enum BuybackCondition implements Condition { if (card != null) { return card.getAbilities().stream() .filter(a -> a instanceof BuybackAbility) - .anyMatch(b -> ((BuybackAbility) b).isActivated()); + .anyMatch(Ability::isActivated); } return false; } diff --git a/Mage/src/main/java/mage/abilities/condition/common/CardsInHandCondition.java b/Mage/src/main/java/mage/abilities/condition/common/CardsInHandCondition.java index 9025cf0af4..e434c86002 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/CardsInHandCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/CardsInHandCondition.java @@ -45,7 +45,6 @@ import mage.util.CardUtil; */ public class CardsInHandCondition implements Condition { - private Condition condition; private ComparisonType type; private int count; @@ -114,7 +113,7 @@ public class CardsInHandCondition implements Condition { @Override public String toString() { int workCount = count; - StringBuilder sb = new StringBuilder("if "); + StringBuilder sb = new StringBuilder("if"); switch (targetController) { case YOU: sb.append(" you have"); diff --git a/Mage/src/main/java/mage/abilities/condition/common/CreatureCountCondition.java b/Mage/src/main/java/mage/abilities/condition/common/CreatureCountCondition.java index 89705f8e40..6b2686030d 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/CreatureCountCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/CreatureCountCondition.java @@ -72,10 +72,16 @@ public class CreatureCountCondition implements Condition { sb.append(" are on the battlefield"); return sb.toString(); } - sb.append(" control exactly "); - sb.append(creatureCount); - sb.append(' '); + sb.append(" control"); + if (creatureCount == 0) { + sb.append(" no "); + } else { + sb.append(" exactly "); + sb.append(creatureCount); + sb.append(' '); + } sb.append(filter.getMessage()); + sb.append(creatureCount != 1 ? "s" : ""); return sb.toString(); } diff --git a/Mage/src/main/java/mage/abilities/condition/common/EquippedMultipleSourceCondition.java b/Mage/src/main/java/mage/abilities/condition/common/EquippedMultipleSourceCondition.java index 3524942743..1d4da7cf8a 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/EquippedMultipleSourceCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/EquippedMultipleSourceCondition.java @@ -29,6 +29,7 @@ package mage.abilities.condition.common; import mage.abilities.Ability; import mage.abilities.condition.Condition; +import mage.constants.SubType; import mage.game.Game; import mage.game.permanent.Permanent; @@ -50,7 +51,7 @@ public enum EquippedMultipleSourceCondition implements Condition { if (permanent != null) { for (UUID uuid : permanent.getAttachments()) { Permanent attached = game.getBattlefield().getPermanent(uuid); - if (attached != null && attached.getSubtype(game).contains("Equipment")) { + if (attached != null && attached.hasSubtype(SubType.EQUIPMENT, game)) { countEquipped++; if (countEquipped >= 2) { return true; diff --git a/Mage/src/main/java/mage/abilities/condition/common/EquippedSourceCondition.java b/Mage/src/main/java/mage/abilities/condition/common/EquippedSourceCondition.java index 90d079d1b8..c311bc24ce 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/EquippedSourceCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/EquippedSourceCondition.java @@ -33,6 +33,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import java.util.UUID; +import mage.constants.SubType; /** * Describes condition when creature is equipped. @@ -49,7 +50,7 @@ public enum EquippedSourceCondition implements Condition { if (permanent != null) { for (UUID uuid : permanent.getAttachments()) { Permanent attached = game.getBattlefield().getPermanent(uuid); - if (attached != null && attached.getSubtype(game).contains("Equipment")) { + if (attached != null && attached.hasSubtype(SubType.EQUIPMENT, game)) { return true; } } diff --git a/Mage/src/main/java/mage/abilities/condition/common/IsStepCondition.java b/Mage/src/main/java/mage/abilities/condition/common/IsStepCondition.java index 9f144749af..9fc545d982 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/IsStepCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/IsStepCondition.java @@ -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.abilities.condition.common; import mage.abilities.Ability; @@ -42,11 +41,11 @@ public class IsStepCondition implements Condition { protected PhaseStep phaseStep; protected boolean onlyDuringYourSteps; - public IsStepCondition(PhaseStep phaseStep) { + public IsStepCondition(PhaseStep phaseStep) { this(phaseStep, true); } - - public IsStepCondition(PhaseStep phaseStep, boolean onlyDuringYourSteps) { + + public IsStepCondition(PhaseStep phaseStep, boolean onlyDuringYourSteps) { this.phaseStep = phaseStep; this.onlyDuringYourSteps = onlyDuringYourSteps; } @@ -58,7 +57,15 @@ public class IsStepCondition implements Condition { @Override public String toString() { - return new StringBuilder("during ").append(onlyDuringYourSteps ? "your ":"the ").append(phaseStep.getStepText()).toString(); + StringBuilder sb = new StringBuilder("during "); + if (onlyDuringYourSteps) { + sb.append("your ").append(phaseStep.getStepText()); + } else if (phaseStep == PhaseStep.UPKEEP) { + sb.append("any upkeep step"); + } else { + sb.append("the ").append(phaseStep.getStepText()); + } + return sb.toString(); } } diff --git a/Mage/src/main/java/mage/abilities/condition/common/PermanentsOnTheBattlefieldCondition.java b/Mage/src/main/java/mage/abilities/condition/common/PermanentsOnTheBattlefieldCondition.java index bfd4b7798e..90173e068d 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/PermanentsOnTheBattlefieldCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/PermanentsOnTheBattlefieldCondition.java @@ -28,14 +28,14 @@ package mage.abilities.condition.common; import mage.abilities.Ability; -import mage.constants.ComparisonType; import mage.abilities.condition.Condition; +import mage.constants.ComparisonType; import mage.filter.FilterPermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.Game; /** - * Battlefield checking condition. This condition can decorate other conditions + * Battlefield checking condition. This condition can decorate other conditions * as well as be used standalone. * * @author nantuko @@ -63,9 +63,10 @@ public class PermanentsOnTheBattlefieldCondition implements Condition { } /** - * Applies a filter, a {@link ComparisonType}, and count to permanents on the - * battlefield when checking the condition during the - * {@link #apply(mage.game.Game, mage.abilities.Ability) apply} method invocation. + * Applies a filter, a {@link ComparisonType}, and count to permanents on + * the battlefield when checking the condition during the + * {@link #apply(mage.game.Game, mage.abilities.Ability) apply} method + * invocation. * * @param filter * @param type @@ -83,10 +84,10 @@ public class PermanentsOnTheBattlefieldCondition implements Condition { } /** - * Applies a filter, a {@link ComparisonType}, and count to permanents on the - * battlefield and calls the decorated condition to see if it - * {@link #apply(mage.game.Game, mage.abilities.Ability) applies} - * as well. This will force both conditions to apply for this to be true. + * Applies a filter, a {@link ComparisonType}, and count to permanents on + * the battlefield and calls the decorated condition to see if it + * {@link #apply(mage.game.Game, mage.abilities.Ability) applies} as well. + * This will force both conditions to apply for this to be true. * * @param filter * @param type @@ -100,7 +101,7 @@ public class PermanentsOnTheBattlefieldCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - boolean conditionApplies = false; + boolean conditionApplies; FilterPermanent localFilter = filter.copy(); if (onlyControlled) { diff --git a/Mage/src/main/java/mage/abilities/condition/common/RaidCondition.java b/Mage/src/main/java/mage/abilities/condition/common/RaidCondition.java index 72856c0629..f71ad50471 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/RaidCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/RaidCondition.java @@ -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.abilities.condition.common; import mage.abilities.Ability; @@ -45,4 +44,8 @@ public enum RaidCondition implements Condition { PlayerAttackedWatcher watcher = (PlayerAttackedWatcher) game.getState().getWatchers().get(PlayerAttackedWatcher.class.getSimpleName()); return watcher != null && watcher.getNumberOfAttackersCurrentTurn(source.getControllerId()) > 0; } + + public String toString() { + return "if you attacked with a creature this turn"; + } } diff --git a/Mage/src/main/java/mage/abilities/condition/common/SourceMatchesFilterCondition.java b/Mage/src/main/java/mage/abilities/condition/common/SourceMatchesFilterCondition.java index adac2b8cf1..16a32d9c2b 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/SourceMatchesFilterCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/SourceMatchesFilterCondition.java @@ -41,9 +41,15 @@ import mage.game.permanent.Permanent; public class SourceMatchesFilterCondition implements Condition { private FilterPermanent FILTER; + private String text; public SourceMatchesFilterCondition(FilterPermanent filter) { + this(null, filter); + } + + public SourceMatchesFilterCondition(String text, FilterPermanent filter) { this.FILTER = filter; + this.text = text; } @Override @@ -56,4 +62,12 @@ public class SourceMatchesFilterCondition implements Condition { } return false; } + + @Override + public String toString() { + if (text != null) { + return text; + } + return super.toString(); + } } diff --git a/Mage/src/main/java/mage/abilities/condition/common/SuspendedCondition.java b/Mage/src/main/java/mage/abilities/condition/common/SuspendedCondition.java index 3642ce382b..73113094a2 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/SuspendedCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/SuspendedCondition.java @@ -52,21 +52,12 @@ public enum SuspendedCondition implements Condition { @Override public boolean apply(Game game, Ability source) { Card card = game.getCard(source.getSourceId()); - boolean found = false; if (card != null) { - for (Ability ability: card.getAbilities()) { - if (ability instanceof SuspendAbility) { - found = true; - break; - } - } + boolean found = card.getAbilities().stream().anyMatch(ability -> ability instanceof SuspendAbility); + if (!found) { - for (Ability ability: game.getState().getAllOtherAbilities(source.getSourceId())) { - if (ability instanceof SuspendAbility) { - found = true; - break; - } - } + found = game.getState().getAllOtherAbilities(source.getSourceId()).stream().anyMatch(ability -> ability instanceof SuspendAbility); + } if (found) { if (game.getState().getZone(card.getId()) == Zone.EXILED && diff --git a/Mage/src/main/java/mage/abilities/condition/common/XorLessLifeCondition.java b/Mage/src/main/java/mage/abilities/condition/common/XorLessLifeCondition.java index a31c03f293..3e3288622c 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/XorLessLifeCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/XorLessLifeCondition.java @@ -62,7 +62,7 @@ public class XorLessLifeCondition implements Condition { } break; case CONTROLLER: - conditionApplies |= game.getPlayer(source.getControllerId()).getLife() <= amount; + conditionApplies = game.getPlayer(source.getControllerId()).getLife() <= amount; break; case TARGET_OPPONENT: //TODO: Implement this. @@ -78,7 +78,7 @@ public class XorLessLifeCondition implements Condition { } } } - conditionApplies |= maxLife <= amount; + conditionApplies = maxLife <= amount; break; } diff --git a/Mage/src/main/java/mage/abilities/costs/common/ExileFromGraveCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileFromGraveCost.java index 58806243da..c7adda1c79 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/ExileFromGraveCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/ExileFromGraveCost.java @@ -53,12 +53,13 @@ public class ExileFromGraveCost extends CostImpl { private final List exiledCards = new ArrayList<>(); public ExileFromGraveCost(TargetCardInYourGraveyard target) { + target.setNotTarget(true); this.addTarget(target); if (target.getMaxNumberOfTargets() > 1) { this.text = "Exile " + (target.getNumberOfTargets() == 1 && target.getMaxNumberOfTargets() == Integer.MAX_VALUE ? "one or more" - : ((target.getNumberOfTargets() < target.getMaxNumberOfTargets() ? "up to " : "")) - + CardUtil.numberToText(target.getMaxNumberOfTargets())) + : ((target.getNumberOfTargets() < target.getMaxNumberOfTargets() ? "up to " : "")) + + CardUtil.numberToText(target.getMaxNumberOfTargets())) + ' ' + target.getTargetName(); } else { this.text = "Exile " + target.getTargetName(); @@ -69,11 +70,13 @@ public class ExileFromGraveCost extends CostImpl { } public ExileFromGraveCost(TargetCardInYourGraveyard target, String text) { - this(target); + target.setNotTarget(true); + this.addTarget(target); this.text = text; } public ExileFromGraveCost(TargetCardInASingleGraveyard target) { + target.setNotTarget(true); this.addTarget(target); this.text = "Exile " + target.getTargetName(); } diff --git a/Mage/src/main/java/mage/abilities/costs/common/ExileFromStackCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileFromStackCost.java index 28576b5eed..5f692b1a26 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/ExileFromStackCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/ExileFromStackCost.java @@ -61,10 +61,15 @@ public class ExileFromStackCost extends CostImpl { if (spellToExile == null) { return false; } - spellToExile.moveToExile(null, "", ability.getSourceId(), game); + String spellName = spellToExile.getName(); + if (spellToExile.isCopy()) { + game.getStack().remove(spellToExile); + } else { + spellToExile.moveToExile(null, "", ability.getSourceId(), game); + } paid = true; if (!game.isSimulation()) { - game.informPlayers(player.getLogName() + " exiles " + spellToExile.getName() + " (as costs)"); + game.informPlayers(player.getLogName() + " exiles " + spellName + " (as costs)"); } } } diff --git a/Mage/src/main/java/mage/abilities/costs/common/ExileSourceCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileSourceCost.java index 9afd2fbd7b..8678db2a98 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/ExileSourceCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/ExileSourceCost.java @@ -47,7 +47,7 @@ public class ExileSourceCost extends CostImpl { private boolean toUniqueExileZone; public ExileSourceCost() { - this.text = "Exile {this}"; + this.text = "exile {this}"; } /** @@ -57,7 +57,7 @@ public class ExileSourceCost extends CostImpl { * Deadeye Navigator) can identify the card */ public ExileSourceCost(boolean toUniqueExileZone) { - this.text = "Exile {this}"; + this.text = "exile {this}"; this.toUniqueExileZone = toUniqueExileZone; } @@ -76,6 +76,7 @@ public class ExileSourceCost extends CostImpl { if (toUniqueExileZone) { exileZoneId = CardUtil.getExileZoneId(game, ability.getSourceId(), ability.getSourceObjectZoneChangeCounter()); exileZoneName = sourceObject.getName(); + game.getState().setValue(sourceObject.getId().toString(), ability.getSourceObjectZoneChangeCounter()); } controller.moveCardToExileWithInfo((Card) sourceObject, exileZoneId, exileZoneName, sourceId, game, game.getState().getZone(sourceObject.getId()), true); // 117.11. The actions performed when paying a cost may be modified by effects. diff --git a/Mage/src/main/java/mage/abilities/costs/common/SacrificeAttachedCost.java b/Mage/src/main/java/mage/abilities/costs/common/SacrificeAttachedCost.java new file mode 100644 index 0000000000..713cbdae73 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/costs/common/SacrificeAttachedCost.java @@ -0,0 +1,72 @@ +/* + * 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.abilities.costs.common; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.Cost; +import mage.abilities.costs.CostImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author L_J (based on BetaSteward_at_googlemail.com) + */ +public class SacrificeAttachedCost extends CostImpl { + + public SacrificeAttachedCost() { + this.text = "Sacrifice enchanted creature"; + } + + public SacrificeAttachedCost(SacrificeAttachedCost cost) { + super(cost); + } + + @Override + public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) { + Permanent attachment = game.getPermanentOrLKIBattlefield(sourceId); + Permanent permanent = game.getPermanent(attachment.getAttachedTo()); + if (permanent != null) { + paid = permanent.sacrifice(sourceId, game); + } + return paid; + } + + @Override + public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { + Permanent attachment = game.getPermanentOrLKIBattlefield(sourceId); + Permanent permanent = game.getPermanent(attachment.getAttachedTo()); + return permanent != null && game.getPlayer(controllerId).canPaySacrificeCost(permanent, sourceId, controllerId, game); + } + + @Override + public SacrificeAttachedCost copy() { + return new SacrificeAttachedCost(this); + } +} diff --git a/Mage/src/main/java/mage/abilities/costs/common/TapAttachedCost.java b/Mage/src/main/java/mage/abilities/costs/common/TapAttachedCost.java new file mode 100644 index 0000000000..3cdb97185e --- /dev/null +++ b/Mage/src/main/java/mage/abilities/costs/common/TapAttachedCost.java @@ -0,0 +1,76 @@ +/* + * 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.abilities.costs.common; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.Cost; +import mage.abilities.costs.CostImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author L_J + */ +public class TapAttachedCost extends CostImpl { + + public TapAttachedCost() { + this.text = "Tap enchanted creature"; + } + + public TapAttachedCost(TapAttachedCost cost) { + super(cost); + } + + @Override + public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) { + Permanent attachment = game.getPermanentOrLKIBattlefield(sourceId); + Permanent permanent = game.getPermanent(attachment.getAttachedTo()); + if (permanent != null) { + paid = permanent.tap(game); + } + return paid; + } + + @Override + public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { + Permanent attachment = game.getPermanentOrLKIBattlefield(sourceId); + Permanent permanent = game.getPermanent(attachment.getAttachedTo()); + if (permanent != null) { + // return true; // Technically the more correct implementation, but all cards using this cost also come with an "untapped" condition + return !permanent.isTapped(); + } + return false; + } + + @Override + public TapAttachedCost copy() { + return new TapAttachedCost(this); + } +} diff --git a/Mage/src/main/java/mage/abilities/costs/common/UntapTargetCost.java b/Mage/src/main/java/mage/abilities/costs/common/UntapTargetCost.java index 6f58c745bd..9eca132786 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/UntapTargetCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/UntapTargetCost.java @@ -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.abilities.costs.common; import mage.constants.Outcome; @@ -38,6 +37,7 @@ import mage.target.common.TargetControlledPermanent; import java.util.List; import java.util.UUID; import mage.abilities.costs.Cost; +import mage.util.CardUtil; /** * @@ -49,7 +49,7 @@ public class UntapTargetCost extends CostImpl { public UntapTargetCost(TargetControlledPermanent target) { this.target = target; - this.text = "Untap " + target.getMaxNumberOfTargets() + ' ' + target.getTargetName(); + this.text = "Untap " + CardUtil.numberToText(target.getMaxNumberOfTargets(), "") + ' ' + target.getTargetName(); } public UntapTargetCost(final UntapTargetCost cost) { @@ -60,10 +60,11 @@ public class UntapTargetCost extends CostImpl { @Override public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) { if (target.choose(Outcome.Untap, controllerId, sourceId, game)) { - for (UUID targetId: (List)target.getTargets()) { + for (UUID targetId : (List) target.getTargets()) { Permanent permanent = game.getPermanent(targetId); - if (permanent == null) + if (permanent == null) { return false; + } paid |= permanent.untap(game); } } @@ -80,5 +81,4 @@ public class UntapTargetCost extends CostImpl { return new UntapTargetCost(this); } - } diff --git a/Mage/src/main/java/mage/abilities/decorator/ConditionalActivatedAbility.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalActivatedAbility.java index 38339c569d..5f6cc15444 100644 --- a/Mage/src/main/java/mage/abilities/decorator/ConditionalActivatedAbility.java +++ b/Mage/src/main/java/mage/abilities/decorator/ConditionalActivatedAbility.java @@ -4,7 +4,6 @@ */ package mage.abilities.decorator; -import java.util.UUID; import mage.abilities.ActivatedAbilityImpl; import mage.abilities.condition.Condition; import mage.abilities.costs.Cost; @@ -24,7 +23,6 @@ public class ConditionalActivatedAbility extends ActivatedAbilityImpl { private static final Effects emptyEffects = new Effects(); - private final Condition condition; private String ruleText = null; public ConditionalActivatedAbility(Zone zone, Effect effect, Cost cost, Condition condition) { @@ -52,7 +50,6 @@ public class ConditionalActivatedAbility extends ActivatedAbilityImpl { public ConditionalActivatedAbility(final ConditionalActivatedAbility ability) { super(ability); - this.condition = ability.condition; this.ruleText = ability.ruleText; } @@ -64,14 +61,6 @@ public class ConditionalActivatedAbility extends ActivatedAbilityImpl { return super.getEffects(game, effectType); } - @Override - public boolean canActivate(UUID playerId, Game game) { - if (!condition.apply(game, this)) { - return false; - } - return super.canActivate(playerId, game); - } - @Override public ConditionalActivatedAbility copy() { return new ConditionalActivatedAbility(this); @@ -82,6 +71,6 @@ public class ConditionalActivatedAbility extends ActivatedAbilityImpl { if (ruleText != null && !ruleText.isEmpty()) { return ruleText; } - return super.getRule() + " Activate this ability only " + condition.toString(); + return super.getRule() + " Activate this ability only " + condition.toString() + "."; } } diff --git a/Mage/src/main/java/mage/abilities/decorator/ConditionalGainActivatedAbility.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalGainActivatedAbility.java index 9fe5123f83..41660dda3e 100644 --- a/Mage/src/main/java/mage/abilities/decorator/ConditionalGainActivatedAbility.java +++ b/Mage/src/main/java/mage/abilities/decorator/ConditionalGainActivatedAbility.java @@ -46,7 +46,6 @@ import mage.game.Game; */ public class ConditionalGainActivatedAbility extends ActivatedAbilityImpl { - private final Condition condition; private String staticText = ""; private static final Effects emptyEffects = new Effects(); @@ -71,7 +70,6 @@ public class ConditionalGainActivatedAbility extends ActivatedAbilityImpl { public ConditionalGainActivatedAbility(ConditionalGainActivatedAbility ability) { super(ability); - this.condition = ability.condition; this.staticText = ability.staticText; } diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/AuraAttachedCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/AuraAttachedCount.java index 0f6daf2562..b537a92bd9 100644 --- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/AuraAttachedCount.java +++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/AuraAttachedCount.java @@ -32,6 +32,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.effects.Effect; +import mage.constants.SubType; import mage.game.Game; import mage.game.permanent.Permanent; @@ -63,7 +64,7 @@ public class AuraAttachedCount implements DynamicValue { List attachments = p.getAttachments(); for (UUID attachmentId : attachments) { Permanent attached = game.getPermanent(attachmentId); - if (attached != null && attached.getSubtype(game).contains("Aura")) { + if (attached != null && attached.hasSubtype(SubType.AURA, game)) { count++; } } diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/DomainValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/DomainValue.java index 22b789deec..61ae15257d 100644 --- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/DomainValue.java +++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/DomainValue.java @@ -1,13 +1,14 @@ package mage.abilities.dynamicvalue.common; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.effects.Effect; -import mage.constants.CardType; +import mage.constants.SubType; import mage.game.Game; import mage.game.permanent.Permanent; +import java.util.UUID; + /** * @author Loki */ @@ -62,19 +63,19 @@ public class DomainValue implements DynamicValue { } for (Permanent p : game.getBattlefield().getAllActivePermanents(targetPlayer)) { if (p.isLand()) { - if (havePlains == 0 && p.getSubtype(game).contains("Plains")) { + if (havePlains == 0 && p.hasSubtype(SubType.PLAINS, game)) { havePlains = 1; } - if (haveIslands == 0 && p.getSubtype(game).contains("Island")) { + if (haveIslands == 0 && p.hasSubtype(SubType.ISLAND, game)) { haveIslands = 1; } - if (haveMountains == 0 && p.getSubtype(game).contains("Mountain")) { + if (haveMountains == 0 && p.hasSubtype(SubType.MOUNTAIN, game)) { haveMountains = 1; } - if (haveSwamps == 0 && p.getSubtype(game).contains("Swamp")) { + if (haveSwamps == 0 && p.hasSubtype(SubType.SWAMP, game)) { haveSwamps = 1; } - if (haveForests == 0 && p.getSubtype(game).contains("Forest")) { + if (haveForests == 0 && p.hasSubtype(SubType.FOREST, game)) { haveForests = 1; } } diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/EquipmentAttachedCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/EquipmentAttachedCount.java index c7881cdc35..15c87cfaba 100644 --- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/EquipmentAttachedCount.java +++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/EquipmentAttachedCount.java @@ -27,14 +27,16 @@ */ package mage.abilities.dynamicvalue.common; -import java.util.List; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.effects.Effect; +import mage.constants.SubType; import mage.game.Game; import mage.game.permanent.Permanent; +import java.util.List; +import java.util.UUID; + /** * * @author North, noxx @@ -63,7 +65,7 @@ public class EquipmentAttachedCount implements DynamicValue { List attachments = permanent.getAttachments(); for (UUID attachmentId : attachments) { Permanent attached = game.getPermanent(attachmentId); - if (attached != null && attached.getSubtype(game).contains("Equipment")) { + if (attached != null && attached.hasSubtype(SubType.EQUIPMENT, game)) { count++; } } diff --git a/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java b/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java index e1ac2ffa00..f7933a870f 100644 --- a/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java +++ b/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java @@ -243,20 +243,22 @@ public class ContinuousEffects implements Serializable { return effects.stream().filter(effect -> effect.hasLayer(layer)).collect(Collectors.toList()); } - public Map> getApplicableRequirementEffects(Permanent permanent, Game game) { + public Map> getApplicableRequirementEffects(Permanent permanent, boolean playerRealted, Game game) { Map> effects = new HashMap<>(); for (RequirementEffect effect : requirementEffects) { - Set abilities = requirementEffects.getAbility(effect.getId()); - Set applicableAbilities = new HashSet<>(); - for (Ability ability : abilities) { - if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, ability instanceof MageSingleton ? permanent : null, null)) { - if (effect.applies(permanent, ability, game)) { - applicableAbilities.add(ability); + if (playerRealted == effect.isPlayerRelated()) { + Set abilities = requirementEffects.getAbility(effect.getId()); + Set applicableAbilities = new HashSet<>(); + for (Ability ability : abilities) { + if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, ability instanceof MageSingleton ? permanent : null, null)) { + if (effect.applies(permanent, ability, game)) { + applicableAbilities.add(ability); + } } } - } - if (!applicableAbilities.isEmpty()) { - effects.put(effect, abilities); + if (!applicableAbilities.isEmpty()) { + effects.put(effect, abilities); + } } } return effects; diff --git a/Mage/src/main/java/mage/abilities/effects/ContinuousEffectsList.java b/Mage/src/main/java/mage/abilities/effects/ContinuousEffectsList.java index 2a32d80895..c8033bfc68 100644 --- a/Mage/src/main/java/mage/abilities/effects/ContinuousEffectsList.java +++ b/Mage/src/main/java/mage/abilities/effects/ContinuousEffectsList.java @@ -78,6 +78,7 @@ public class ContinuousEffectsList extends ArrayList } public void removeEndOfCombatEffects() { + for (Iterator i = this.iterator(); i.hasNext(); ) { T entry = i.next(); if (entry.getDuration() == Duration.EndOfCombat) { diff --git a/Mage/src/main/java/mage/abilities/effects/PutTokenOntoBattlefieldCopySourceEffect.java b/Mage/src/main/java/mage/abilities/effects/CreateTokenCopySourceEffect.java similarity index 52% rename from Mage/src/main/java/mage/abilities/effects/PutTokenOntoBattlefieldCopySourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/CreateTokenCopySourceEffect.java index ac09d74151..d0220524e7 100644 --- a/Mage/src/main/java/mage/abilities/effects/PutTokenOntoBattlefieldCopySourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/CreateTokenCopySourceEffect.java @@ -1,7 +1,7 @@ package mage.abilities.effects; import mage.abilities.Ability; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -10,21 +10,21 @@ import mage.target.targetpointer.FixedTarget; /** * Created by glerman on 20/6/15. */ -public class PutTokenOntoBattlefieldCopySourceEffect extends OneShotEffect { +public class CreateTokenCopySourceEffect extends OneShotEffect { private final int number; - public PutTokenOntoBattlefieldCopySourceEffect() { + public CreateTokenCopySourceEffect() { this(1); } - public PutTokenOntoBattlefieldCopySourceEffect(int copies) { + public CreateTokenCopySourceEffect(int copies) { super(Outcome.PutCreatureInPlay); this.number = copies; - staticText = "put a token onto the battlefield that's a copy of {this}"; + staticText = "create a token that's a copy of {this}"; } - public PutTokenOntoBattlefieldCopySourceEffect(final PutTokenOntoBattlefieldCopySourceEffect effect) { + public CreateTokenCopySourceEffect(final CreateTokenCopySourceEffect effect) { super(effect); this.number = effect.number; } @@ -33,7 +33,7 @@ public class PutTokenOntoBattlefieldCopySourceEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (permanent != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, false, number); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), null, false, number); effect.setTargetPointer(new FixedTarget(source.getSourceId())); return effect.apply(game, source); } @@ -41,7 +41,7 @@ public class PutTokenOntoBattlefieldCopySourceEffect extends OneShotEffect { } @Override - public PutTokenOntoBattlefieldCopySourceEffect copy() { - return new PutTokenOntoBattlefieldCopySourceEffect(this); + public CreateTokenCopySourceEffect copy() { + return new CreateTokenCopySourceEffect(this); } } diff --git a/Mage/src/main/java/mage/abilities/effects/RequirementEffect.java b/Mage/src/main/java/mage/abilities/effects/RequirementEffect.java index 93a34bd5ff..89afa2bd49 100644 --- a/Mage/src/main/java/mage/abilities/effects/RequirementEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/RequirementEffect.java @@ -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,12 +20,11 @@ * 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.abilities.effects; import java.util.UUID; @@ -36,20 +35,33 @@ import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; - /** * * @author BetaSteward_at_googlemail.com */ public abstract class RequirementEffect extends ContinuousEffectImpl { + boolean playerRelated; // defines a requirement that is more related to a player than a single creature + public RequirementEffect(Duration duration) { + this(duration, false); + } + + /** + * + * @param duration + * @param playerRelated defines a requirement that is more related to a + * player than a single creature + */ + public RequirementEffect(Duration duration, boolean playerRelated) { super(duration, Outcome.Detriment); this.effectType = EffectType.REQUIREMENT; + this.playerRelated = playerRelated; } public RequirementEffect(final RequirementEffect effect) { super(effect); + this.playerRelated = effect.playerRelated; } @Override @@ -67,6 +79,13 @@ public abstract class RequirementEffect extends ContinuousEffectImpl { return false; } + /** + * Defines the defender a attacker has to attack + * + * @param source + * @param game + * @return + */ public UUID mustAttackDefender(Ability source, Game game) { return null; } @@ -79,4 +98,20 @@ public abstract class RequirementEffect extends ContinuousEffectImpl { return null; } + /** + * Player related check The player returned or controlled planeswalker must + * be attacked with at least one attacker + * + * @param source + * @param game + * @return + */ + public UUID playerMustBeAttackedIfAble(Ability source, Game game) { + return null; + } + + public boolean isPlayerRelated() { + return playerRelated; + } + } diff --git a/Mage/src/main/java/mage/abilities/effects/common/AddConditionalManaOfAnyColorEffect.java b/Mage/src/main/java/mage/abilities/effects/common/AddConditionalManaOfAnyColorEffect.java index 2da6d5747f..633d8a0bd3 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/AddConditionalManaOfAnyColorEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/AddConditionalManaOfAnyColorEffect.java @@ -35,6 +35,7 @@ import mage.abilities.mana.builder.ConditionalManaBuilder; import mage.choices.ChoiceColor; import mage.game.Game; import mage.players.Player; +import mage.util.CardUtil; /** * @author noxx @@ -59,8 +60,12 @@ public class AddConditionalManaOfAnyColorEffect extends ManaEffect { this.manaBuilder = manaBuilder; this.oneChoice = oneChoice; // - staticText = "Add " + amount + " mana of " - + (oneChoice ? "any one color" : "in any combination of colors") + staticText = "Add " + + (amount instanceof StaticValue ? (CardUtil.numberToText(((StaticValue) amount).toString())) : "") + + " mana " + + (oneChoice ? "of any" + + (amount instanceof StaticValue && (((StaticValue) amount).toString()).equals("1") ? "" : " one") + + " color" : "in any combination of colors") + " to your mana pool. " + manaBuilder.getRule(); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/CantBeRegeneratedSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CantBeRegeneratedSourceEffect.java index 5d21c6e346..f1b8a2238f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CantBeRegeneratedSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CantBeRegeneratedSourceEffect.java @@ -78,9 +78,8 @@ public class CantBeRegeneratedSourceEffect extends ContinuousRuleModifyingEffect return staticText; } StringBuilder sb = new StringBuilder(); - sb.append(" {this} can't be regenerated"); + sb.append("{this} can't be regenerated"); if (!duration.toString().isEmpty()) { - sb.append(' '); if (duration == Duration.EndOfTurn) { sb.append(" this turn"); } else { diff --git a/Mage/src/main/java/mage/abilities/effects/common/CastSourceTriggeredAbility.java b/Mage/src/main/java/mage/abilities/effects/common/CastSourceTriggeredAbility.java index f1c4c1d3a5..97a11cd3e7 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CastSourceTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CastSourceTriggeredAbility.java @@ -46,11 +46,12 @@ public class CastSourceTriggeredAbility extends TriggeredAbilityImpl { public CastSourceTriggeredAbility(Effect effect) { this(effect, false); } - + public CastSourceTriggeredAbility(Effect effect, boolean optional) { super(Zone.STACK, effect, optional); + this.ruleAtTheTop = true; } - + public CastSourceTriggeredAbility(final CastSourceTriggeredAbility ability) { super(ability); } @@ -70,7 +71,7 @@ public class CastSourceTriggeredAbility extends TriggeredAbilityImpl { if (event.getSourceId().equals(this.getSourceId())) { MageObject spellObject = game.getObject(sourceId); if (spellObject != null && (spellObject instanceof Spell)) { - Spell spell = (Spell)spellObject; + Spell spell = (Spell) spellObject; if (spell.getSpellAbility() != null) { for (Effect effect : getEffects()) { effect.setValue(SOURCE_CAST_SPELL_ABILITY, spell.getSpellAbility()); diff --git a/Mage/src/main/java/mage/abilities/effects/common/ChooseCreatureTypeEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ChooseCreatureTypeEffect.java index 412278414f..3a9b80b994 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ChooseCreatureTypeEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ChooseCreatureTypeEffect.java @@ -27,6 +27,8 @@ */ package mage.abilities.effects.common; +import java.util.LinkedHashSet; +import java.util.stream.Collectors; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; @@ -39,9 +41,6 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.util.CardUtil; -import java.util.LinkedHashSet; -import java.util.stream.Collectors; - /** * @author LevelX2 */ @@ -72,6 +71,9 @@ public class ChooseCreatureTypeEffect extends OneShotEffect { return false; } } + if (typeChoice.getChoice() == null) { + return false; + } if (!game.isSimulation()) { game.informPlayers(mageObject.getName() + ": " + controller.getLogName() + " has chosen " + typeChoice.getChoice()); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/CopyTargetSpellEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CopyTargetSpellEffect.java index 567dac9b35..56d50b8c40 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CopyTargetSpellEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CopyTargetSpellEffect.java @@ -43,17 +43,30 @@ import mage.players.Player; */ public class CopyTargetSpellEffect extends OneShotEffect { + private boolean useLKI = false; + public CopyTargetSpellEffect() { super(Outcome.Copy); } + public CopyTargetSpellEffect(boolean useLKI) { + super(Outcome.Copy); + this.useLKI = useLKI; + } + public CopyTargetSpellEffect(final CopyTargetSpellEffect effect) { super(effect); + this.useLKI = effect.useLKI; } @Override public boolean apply(Game game, Ability source) { - Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source)); + Spell spell; + if (useLKI) { + spell = game.getSpellOrLKIStack(targetPointer.getFirst(game, source)); + } else { + spell = game.getStack().getSpell(targetPointer.getFirst(game, source)); + } if (spell == null) { spell = (Spell) game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.STACK); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/CounterUnlessPaysEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CounterUnlessPaysEffect.java index a409e5b1fd..d0cdc8fdf2 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CounterUnlessPaysEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CounterUnlessPaysEffect.java @@ -113,7 +113,7 @@ public class CounterUnlessPaysEffect extends OneShotEffect { if (mode.getTargets().isEmpty()) { sb.append("counter it"); } else { - sb.append("Counter target ").append(mode.getTargets().get(0).getTargetName()); + sb.append("counter target ").append(mode.getTargets().get(0).getTargetName()); } sb.append(" unless its controller pays "); if (cost != null) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenCopyTargetEffect.java similarity index 79% rename from Mage/src/main/java/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CreateTokenCopyTargetEffect.java index 337f8c05d4..a6c556be36 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenCopyTargetEffect.java @@ -27,9 +27,6 @@ */ package mage.abilities.effects.common; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; import mage.MageObject; import mage.ObjectColor; import mage.abilities.Ability; @@ -41,6 +38,8 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.Card; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.SuperType; import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.permanent.token.EmptyToken; @@ -49,19 +48,23 @@ import mage.util.CardUtil; import mage.util.functions.ApplyToPermanent; import mage.util.functions.EmptyApplyToPermanent; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + /** * * @author LevelX2 */ -public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { +public class CreateTokenCopyTargetEffect extends OneShotEffect { private final UUID playerId; private final CardType additionalCardType; private boolean gainsHaste; private final int number; private List addedTokenPermanents; - private String additionalSubType; - private String onlySubType; + private SubType additionalSubType; + private SubType onlySubType; private boolean tapped; private boolean attacking; private UUID attackedPlayer; @@ -71,13 +74,14 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { private boolean becomesArtifact; private ObjectColor color; private boolean useLKI = false; + private boolean isntLegendary = false; - public PutTokenOntoBattlefieldCopyTargetEffect(boolean useLKI) { + public CreateTokenCopyTargetEffect(boolean useLKI) { this(); this.useLKI = useLKI; } - public PutTokenOntoBattlefieldCopyTargetEffect() { + public CreateTokenCopyTargetEffect() { super(Outcome.PutCreatureInPlay); this.playerId = null; this.additionalCardType = null; @@ -93,15 +97,15 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { this.color = null; } - public PutTokenOntoBattlefieldCopyTargetEffect(UUID playerId) { + public CreateTokenCopyTargetEffect(UUID playerId) { this(playerId, null, false); } - public PutTokenOntoBattlefieldCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean gainsHaste) { + public CreateTokenCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean gainsHaste) { this(playerId, additionalCardType, gainsHaste, 1); } - public PutTokenOntoBattlefieldCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean gainsHaste, int number) { + public CreateTokenCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean gainsHaste, int number) { this(playerId, additionalCardType, gainsHaste, number, false, false); } @@ -115,15 +119,15 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { * @param tapped * @param attacking */ - public PutTokenOntoBattlefieldCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean gainsHaste, int number, boolean tapped, boolean attacking) { + public CreateTokenCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean gainsHaste, int number, boolean tapped, boolean attacking) { this(playerId, additionalCardType, gainsHaste, number, tapped, attacking, null); } - public PutTokenOntoBattlefieldCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean gainsHaste, int number, boolean tapped, boolean attacking, UUID attackedPlayer) { + public CreateTokenCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean gainsHaste, int number, boolean tapped, boolean attacking, UUID attackedPlayer) { this(playerId, additionalCardType, gainsHaste, number, tapped, attacking, attackedPlayer, Integer.MIN_VALUE, Integer.MIN_VALUE, false); } - public PutTokenOntoBattlefieldCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean gainsHaste, int number, boolean tapped, boolean attacking, UUID attackedPlayer, int power, int toughness, boolean gainsFlying) { + public CreateTokenCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean gainsHaste, int number, boolean tapped, boolean attacking, UUID attackedPlayer, int power, int toughness, boolean gainsFlying) { super(Outcome.PutCreatureInPlay); this.playerId = playerId; this.additionalCardType = additionalCardType; @@ -138,7 +142,7 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { this.gainsFlying = gainsFlying; } - public PutTokenOntoBattlefieldCopyTargetEffect(final PutTokenOntoBattlefieldCopyTargetEffect effect) { + public CreateTokenCopyTargetEffect(final CreateTokenCopyTargetEffect effect) { super(effect); this.playerId = effect.playerId; this.additionalCardType = effect.additionalCardType; @@ -156,12 +160,17 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { this.becomesArtifact = effect.becomesArtifact; this.color = effect.color; this.useLKI = effect.useLKI; + this.isntLegendary = effect.isntLegendary; } public void setBecomesArtifact(boolean becomesArtifact) { this.becomesArtifact = becomesArtifact; } + public void setIsntLegendary(boolean isntLegendary) { + this.isntLegendary = isntLegendary; + } + @Override public boolean apply(Game game, Ability source) { UUID targetId; @@ -211,6 +220,9 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { if (becomesArtifact) { token.addCardType(CardType.ARTIFACT); } + if (isntLegendary) { + token.getSuperType().remove(SuperType.LEGENDARY); + } if (additionalCardType != null && !token.getCardType().contains(additionalCardType)) { token.addCardType(additionalCardType); } @@ -221,15 +233,17 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { token.addAbility(FlyingAbility.getInstance()); } if (tokenPower != Integer.MIN_VALUE) { + token.removePTCDA(); token.getPower().modifyBaseValue(tokenPower); } if (tokenToughness != Integer.MIN_VALUE) { + token.removePTCDA(); token.getToughness().modifyBaseValue(tokenToughness); } - if (additionalSubType != null && !token.getSubtype(game).contains(additionalSubType)) { + if (additionalSubType != null && !token.hasSubtype(additionalSubType, game)) { token.getSubtype(game).add(additionalSubType); } - if (onlySubType != null && !token.getSubtype(game).contains(onlySubType)) { + if (onlySubType != null && !token.hasSubtype(onlySubType, game)) { token.getSubtype(game).clear(); token.getSubtype(game).add(onlySubType); } @@ -248,8 +262,8 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { } @Override - public PutTokenOntoBattlefieldCopyTargetEffect copy() { - return new PutTokenOntoBattlefieldCopyTargetEffect(this); + public CreateTokenCopyTargetEffect copy() { + return new CreateTokenCopyTargetEffect(this); } @Override @@ -257,38 +271,40 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { if (staticText != null && !staticText.isEmpty()) { return staticText; } - StringBuilder sb = new StringBuilder(); - sb.append("Put "); + StringBuilder sb = new StringBuilder("create "); if (number == 1) { - sb.append("a token"); + sb.append("a "); + if (tapped && !attacking) { + sb.append("tapped "); + } + sb.append("token that's a copy of target creature"); } else { - sb.append(CardUtil.numberToText(number)).append(" tokens"); + sb.append(number); + sb.append(" "); + if (tapped && !attacking) { + sb.append("tapped "); + } + sb.append("tokens that are copies of target creature"); } - sb.append(" onto the battlefield "); - if (tapped && !attacking) { - sb.append("tapped "); - } else if (!tapped && attacking) { - sb.append("attacking "); - } else if (tapped && attacking) { - sb.append("tapped and attacking "); - } - sb.append("that's a copy of target "); - if (mode.getTargets() != null) { - sb.append(mode.getTargets().get(0).getTargetName()); + if (attacking) { + sb.append(" that are"); + if (tapped) { + sb.append(" tapped and"); + } + sb.append(" attacking"); } return sb.toString(); - } public List getAddedPermanent() { return addedTokenPermanents; } - public void setAdditionalSubType(String additionalSubType) { + public void setAdditionalSubType(SubType additionalSubType) { this.additionalSubType = additionalSubType; } - public void setOnlySubType(String onlySubType) { + public void setOnlySubType(SubType onlySubType) { this.onlySubType = onlySubType; } diff --git a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenEffect.java index 025cebb7ac..05712cd92e 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenEffect.java @@ -27,8 +27,6 @@ */ package mage.abilities.effects.common; -import java.util.ArrayList; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; @@ -43,6 +41,9 @@ import mage.game.permanent.token.Token; import mage.target.targetpointer.FixedTarget; import mage.util.CardUtil; +import java.util.ArrayList; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -113,7 +114,7 @@ public class CreateTokenEffect extends OneShotEffect { public ArrayList getLastAddedTokenIds() { return lastAddedTokenIds; } - + public void exileTokensCreatedAtNextEndStep(Game game, Ability source) { for (UUID tokenId : this.getLastAddedTokenIds()) { Permanent tokenPermanent = game.getPermanent(tokenId); @@ -122,7 +123,7 @@ public class CreateTokenEffect extends OneShotEffect { exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect), source); } - } + } } public void exileTokensCreatedAtEndOfCombat(Game game, Ability source) { @@ -133,9 +134,9 @@ public class CreateTokenEffect extends OneShotEffect { exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); game.addDelayedTriggeredAbility(new AtTheEndOfCombatDelayedTriggeredAbility(exileEffect), source); } - } + } } - + private void setText() { StringBuilder sb = new StringBuilder("create "); if (amount.toString().equals("1")) { @@ -151,10 +152,15 @@ public class CreateTokenEffect extends OneShotEffect { } sb.append(token.getDescription()); if (token.getDescription().endsWith("token")) { - sb.append("s "); + sb.append("s"); + } + int tokenLocation = sb.indexOf("token "); + if (tokenLocation != -1) { + sb.replace(tokenLocation, tokenLocation + 6, "tokens "); } } if (attacking) { + sb.append(" that are"); if (tapped) { sb.append(" tapped and"); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenTargetEffect.java index 863528dbbe..418b9e7593 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenTargetEffect.java @@ -67,25 +67,45 @@ public class CreateTokenTargetEffect extends OneShotEffect { if (staticText != null && !staticText.isEmpty()) { return staticText; } - StringBuilder sb = new StringBuilder("put "); - sb.append(CardUtil.numberToText(amount.toString(), "a")); - sb.append(' ').append(token.getDescription()).append(" onto the battlefield"); - if (tapped) { - sb.append(" tapped"); + StringBuilder sb = new StringBuilder(); + sb.append("target ").append(mode.getTargets().get(0).getTargetName()); + sb.append(" creates "); + if (amount.toString().equals("1")) { + sb.append("a "); + if (tapped && !attacking) { + sb.append("tapped "); + } + sb.append(token.getDescription()); + } else { + sb.append(CardUtil.numberToText(amount.toString())).append(' '); + if (tapped && !attacking) { + sb.append("tapped "); + } + sb.append(token.getDescription()); + if (token.getDescription().endsWith("token")) { + sb.append("s "); + } + int tokenLocation = sb.indexOf("token "); + if (tokenLocation != -1) { + sb.replace(tokenLocation, tokenLocation + 6, "tokens "); + } } if (attacking) { + sb.append(" that are"); if (tapped) { - sb.append(" and"); + sb.append(" tapped and"); } sb.append(" attacking"); } String message = amount.getMessage(); if (!message.isEmpty()) { - sb.append(" for each "); + if (amount.toString().equals("X")) { + sb.append(", where X is "); + } else { + sb.append(" for each "); + } } sb.append(message); - sb.append(" under target ").append(mode.getTargets().get(0).getTargetName()); - sb.append("'s control"); return sb.toString(); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/CreatureExploresTriggeredAbility.java b/Mage/src/main/java/mage/abilities/effects/common/CreatureExploresTriggeredAbility.java new file mode 100644 index 0000000000..e78b559cc4 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/CreatureExploresTriggeredAbility.java @@ -0,0 +1,43 @@ +package mage.abilities.effects.common; + +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +public class CreatureExploresTriggeredAbility extends TriggeredAbilityImpl { + + public CreatureExploresTriggeredAbility(Effect effect) { + super(Zone.BATTLEFIELD, effect, false); + } + + public CreatureExploresTriggeredAbility(final CreatureExploresTriggeredAbility effect) { + super(effect); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.EXPLORED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent creature = game.getPermanentOrLKIBattlefield(event.getSourceId()); + if (creature != null) { + return creature.getControllerId().equals(controllerId); + } + return false; + } + + @Override + public CreatureExploresTriggeredAbility copy() { + return new CreatureExploresTriggeredAbility(this); + } + + @Override + public String getRule() { + return "Whenever a creature you control explores, " + super.getRule(); + } +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/DoUnlessAnyPlayerPaysEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DoUnlessAnyPlayerPaysEffect.java index 15bff45982..b05f8501cf 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DoUnlessAnyPlayerPaysEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DoUnlessAnyPlayerPaysEffect.java @@ -98,7 +98,6 @@ public class DoUnlessAnyPlayerPaysEffect extends OneShotEffect { game.informPlayers(player.getLogName() + " pays the cost to prevent the effect"); } doEffect = false; - break; } } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileAllEffect.java index 5c076adc38..ec46d23210 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ExileAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileAllEffect.java @@ -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.abilities.effects.common; import java.util.List; @@ -52,6 +51,7 @@ public class ExileAllEffect extends OneShotEffect { public ExileAllEffect(FilterPermanent filter) { this(filter, null, null); } + public ExileAllEffect(FilterPermanent filter, UUID exileId, String exileZone) { super(Outcome.Exile); this.filter = filter; @@ -77,19 +77,18 @@ public class ExileAllEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { List permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game); - for (Permanent permanent: permanents) { + for (Permanent permanent : permanents) { controller.moveCardToExileWithInfo(permanent, exileId, exileZone, source.getSourceId(), game, Zone.BATTLEFIELD, true); } return true; } return false; - } private void setText() { StringBuilder sb = new StringBuilder(); - sb.append("Exile all ").append(filter.getMessage()); + sb.append("exile all ").append(filter.getMessage()); staticText = sb.toString(); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java index 476ae10141..3a5d55092a 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java @@ -23,9 +23,12 @@ import mage.players.Player; */ public class ExileAndReturnTransformedSourceEffect extends OneShotEffect { - protected Effect additionalEffect; + public ExileAndReturnTransformedSourceEffect() { + this(Gender.NEUTRAL); + } + public ExileAndReturnTransformedSourceEffect(Gender gender) { this(gender, null); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileGraveyardAllPlayersEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileGraveyardAllPlayersEffect.java index ac7883cdbf..cc909ce53f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ExileGraveyardAllPlayersEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileGraveyardAllPlayersEffect.java @@ -33,6 +33,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.constants.Outcome; import mage.constants.Zone; +import mage.filter.FilterCard; import mage.game.Game; import mage.players.Player; @@ -42,9 +43,16 @@ import mage.players.Player; */ public class ExileGraveyardAllPlayersEffect extends OneShotEffect { + private final FilterCard filter; + public ExileGraveyardAllPlayersEffect() { + this(new FilterCard("cards")); + } + + public ExileGraveyardAllPlayersEffect(FilterCard filter) { super(Outcome.Detriment); - staticText = "exile all cards from all graveyards"; + staticText = "exile all " + filter.getMessage() + " from all graveyards"; + this.filter = filter; } @Override @@ -64,7 +72,7 @@ public class ExileGraveyardAllPlayersEffect extends OneShotEffect { if (player != null) { for (UUID cid : player.getGraveyard().copy()) { Card card = game.getCard(cid); - if (card != null) { + if (card != null && filter.match(card, game)) { controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.GRAVEYARD, true); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileSourceEffect.java index 60efb497e9..455d3a5466 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ExileSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileSourceEffect.java @@ -57,7 +57,7 @@ public class ExileSourceEffect extends OneShotEffect { */ public ExileSourceEffect(boolean toUniqueExileZone) { super(Outcome.Exile); - staticText = "Exile {this}"; + staticText = "exile {this}"; this.toUniqueExileZone = toUniqueExileZone; } diff --git a/Mage/src/main/java/mage/abilities/effects/common/GetEmblemEffect.java b/Mage/src/main/java/mage/abilities/effects/common/GetEmblemEffect.java index 796fb67700..7ceebd0111 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/GetEmblemEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/GetEmblemEffect.java @@ -27,6 +27,7 @@ */ package mage.abilities.effects.common; +import java.util.List; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; @@ -45,7 +46,7 @@ public class GetEmblemEffect extends OneShotEffect { public GetEmblemEffect(Emblem emblem) { super(Outcome.Benefit); this.emblem = emblem; - this.staticText = "You get an emblem with \"" + emblem.getAbilities().getRules(null) + '"'; + this.staticText = getText(); } public GetEmblemEffect(final GetEmblemEffect effect) { @@ -68,4 +69,22 @@ public class GetEmblemEffect extends OneShotEffect { return true; } + public String getText() { + StringBuilder sb = new StringBuilder(); + sb.append("You get an emblem with \""); + List rules = emblem.getAbilities().getRules(null); + if (rules.size() == 1) { + for (String s : rules) { + sb.append(s); + } + sb.append('"'); + } else if (rules.size() == 2) { + for (String s : rules) { + sb.append(s); + sb.append("\" and \""); + } + sb.append('"'); + } + return sb.toString(); + } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java index b7e43315d5..5a93cbae46 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java @@ -264,9 +264,11 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff sb.append(". You may reveal "); sb.append(filter.getMessage()).append(" from among them and put it into your "); } else if (targetPickedCards == Zone.BATTLEFIELD) { - sb.append(". You "); + sb.append(". "); if (optional) { - sb.append("may "); + sb.append("You may p"); + } else { + sb.append('P'); } sb.append("put ").append(filter.getMessage()).append(" from among them onto the "); } else { diff --git a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryControllerEffect.java index 4b53c47eaf..42bd8e092f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryControllerEffect.java @@ -243,7 +243,7 @@ public class LookLibraryControllerEffect extends OneShotEffect { sb.append(" cards "); } - sb.append("of your Library"); + sb.append("of your library"); if (numberLook == 0) { sb.append(", where {X} is the number of cards ").append(numberOfCards.getMessage()); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryTopCardTargetPlayerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryTopCardTargetPlayerEffect.java index bf7c607f31..3081206ac6 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryTopCardTargetPlayerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryTopCardTargetPlayerEffect.java @@ -106,7 +106,7 @@ public class LookLibraryTopCardTargetPlayerEffect extends OneShotEffect { sb.append(CardUtil.numberToText(amount)); sb.append(" cards "); } else { - sb.append(" card "); + sb.append("card "); } sb.append("of target player's library"); if (putToGraveyard) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/NameACardEffect.java b/Mage/src/main/java/mage/abilities/effects/common/NameACardEffect.java index 63effc4e1c..8c0d69c78c 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/NameACardEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/NameACardEffect.java @@ -82,27 +82,27 @@ public class NameACardEffect extends OneShotEffect { switch (typeOfName) { case ALL: cardChoice.setChoices(CardRepository.instance.getNames()); - cardChoice.setMessage("Name a card"); + cardChoice.setMessage("Choose a card name"); break; case NON_ARTIFACT_AND_NON_LAND_NAME: cardChoice.setChoices(CardRepository.instance.getNonArtifactAndNonLandNames()); - cardChoice.setMessage("Name a non artifact and non land card"); + cardChoice.setMessage("Choose a nonartifact, nonland card name"); break; case NON_LAND_AND_NON_CREATURE_NAME: cardChoice.setChoices(CardRepository.instance.getNonLandAndNonCreatureNames()); - cardChoice.setMessage("Name a non land and non creature card"); + cardChoice.setMessage("Choose a nonland and non creature card"); break; case NON_LAND_NAME: cardChoice.setChoices(CardRepository.instance.getNonLandNames()); - cardChoice.setMessage("Name a non land card"); + cardChoice.setMessage("Choose a nonland card name"); break; case CREATURE_NAME: cardChoice.setChoices(CardRepository.instance.getCreatureNames()); - cardChoice.setMessage("Name a creature card"); + cardChoice.setMessage("Choose a creature card name"); break; case ARTIFACT_NAME: cardChoice.setChoices(CardRepository.instance.getArtifactNames()); - cardChoice.setMessage("Name an artifact card"); + cardChoice.setMessage("Choose an artifact card name"); break; } cardChoice.clearChoice(); @@ -130,7 +130,7 @@ public class NameACardEffect extends OneShotEffect { } private String setText() { - StringBuilder sb = new StringBuilder("name a "); + StringBuilder sb = new StringBuilder("choose a "); switch (typeOfName) { case ALL: sb.append("card"); @@ -139,7 +139,7 @@ public class NameACardEffect extends OneShotEffect { sb.append("nonartifact, nonland card"); break; case NON_LAND_AND_NON_CREATURE_NAME: - sb.append("card other than a creature or a land card"); + sb.append("noncreature, nonland card"); break; case NON_LAND_NAME: sb.append("nonland card"); @@ -151,6 +151,7 @@ public class NameACardEffect extends OneShotEffect { sb.append("artifact card"); break; } + sb.append(" name"); return sb.toString(); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/PopulateEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PopulateEffect.java index aceb92f35a..3b80d45ba1 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/PopulateEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/PopulateEffect.java @@ -90,7 +90,7 @@ public class PopulateEffect extends OneShotEffect { if (!game.isSimulation()) { game.informPlayers("Token selected for populate: " + tokenToCopy.getLogName()); } - Effect effect = new PutTokenOntoBattlefieldCopyTargetEffect(); + Effect effect = new CreateTokenCopyTargetEffect(); effect.setTargetPointer(new FixedTarget(target.getFirstTarget())); return effect.apply(game, source); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAllPermanentsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAllPermanentsEffect.java index cee08029fb..13948eef4d 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAllPermanentsEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAllPermanentsEffect.java @@ -31,6 +31,7 @@ import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.PreventionEffectImpl; import mage.constants.Duration; +import static mage.constants.Duration.EndOfTurn; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; @@ -98,10 +99,19 @@ public class PreventAllDamageByAllPermanentsEffect extends PreventionEffectImpl sb.append("combat "); } sb.append("damage "); - sb.append(duration.toString()); - if (filter != null) { - sb.append(" dealt by "); - sb.append(filter.getMessage()); + if (duration == EndOfTurn) { + if (filter != null) { + sb.append(filter.getMessage()); + sb.append(" would deal this turn"); + } else { + sb.append("that would be dealt this turn"); + } + } else { + sb.append(duration.toString()); + if (filter != null) { + sb.append(" dealt by "); + sb.append(filter.getMessage()); + } } return sb.toString(); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/PreventDamageByColorEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageByColorEffect.java new file mode 100644 index 0000000000..c70887bc4f --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageByColorEffect.java @@ -0,0 +1,77 @@ +/* + * 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.abilities.effects.common; + +import mage.MageObject; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.effects.PreventionEffectImpl; +import mage.constants.Duration; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author LevelX2 + */ +public class PreventDamageByColorEffect extends PreventionEffectImpl { + + private final ObjectColor color; + + public PreventDamageByColorEffect(ObjectColor color, int amount) { + super(Duration.WhileOnBattlefield, amount, false, false); + this.color = color; + this.staticText = "If a " + color.getDescription() + " source would deal damage to you, prevent " + amount + " of that damage"; + } + + public PreventDamageByColorEffect(PreventDamageByColorEffect effect) { + super(effect); + this.color = effect.color; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DAMAGE_PLAYER; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getTargetId().equals(source.getControllerId())) { + MageObject sourceObject = game.getObject(event.getSourceId()); + if (sourceObject != null && sourceObject.getColor(game).contains(color)) { + return super.applies(event, source, game); + } + } + return false; + } + + @Override + public PreventDamageByColorEffect copy() { + return new PreventDamageByColorEffect(this); + } +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToSourceEffect.java index e4a0e40806..c1f0ade074 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToSourceEffect.java @@ -31,6 +31,7 @@ import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.PreventionEffectImpl; import mage.constants.Duration; +import static mage.constants.Duration.EndOfTurn; import mage.game.Game; import mage.game.events.GameEvent; @@ -74,7 +75,12 @@ public class PreventDamageToSourceEffect extends PreventionEffectImpl { } else { sb.append("Prevent the next ").append(amountToPrevent).append(" damage that would be dealt to "); } - sb.append("{source} ").append(duration.toString()); + sb.append("{source} "); + if (duration == EndOfTurn) { + sb.append("this turn"); + } else { + sb.append(duration.toString()); + } return sb.toString(); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetEffect.java index a1167c7f02..aa07e5bdd0 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetEffect.java @@ -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.abilities.effects.common; import mage.constants.Duration; @@ -45,23 +44,23 @@ public class PreventDamageToTargetEffect extends PreventionEffectImpl { public PreventDamageToTargetEffect(Duration duration) { this(duration, false); } - + public PreventDamageToTargetEffect(Duration duration, boolean onlyCombat) { this(duration, Integer.MAX_VALUE, onlyCombat); } - + public PreventDamageToTargetEffect(Duration duration, int amount) { this(duration, amount, false); } - + public PreventDamageToTargetEffect(Duration duration, int amount, boolean onlyCombat) { super(duration, amount, onlyCombat); } - + public PreventDamageToTargetEffect(Duration duration, boolean onlyCombat, boolean consumable, DynamicValue amountToPreventDynamic) { super(duration, 0, onlyCombat, consumable, amountToPreventDynamic); } - + public PreventDamageToTargetEffect(final PreventDamageToTargetEffect effect) { super(effect); } @@ -83,9 +82,9 @@ public class PreventDamageToTargetEffect extends PreventionEffectImpl { } StringBuilder sb = new StringBuilder(); if (amountToPrevent == Integer.MAX_VALUE) { - sb.append("Prevent all damage that would be dealt to target "); + sb.append("prevent all damage that would be dealt to target "); } else { - sb.append("Prevent the next ").append(amountToPrevent).append(" damage that would be dealt to target "); + sb.append("prevent the next ").append(amountToPrevent).append(" damage that would be dealt to target "); } sb.append(mode.getTargets().get(0).getTargetName()); if (!duration.toString().isEmpty()) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveTargetEffect.java index 27b2e0c149..717a3426b5 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveTargetEffect.java @@ -75,7 +75,7 @@ public class PutTopCardOfLibraryIntoGraveTargetEffect extends OneShotEffect { } private String setText() { - StringBuilder sb = new StringBuilder("Target player puts the top "); + StringBuilder sb = new StringBuilder("target player puts the top "); if (numberCards.toString().equals("1")) { sb.append(" card"); } else { diff --git a/Mage/src/main/java/mage/abilities/effects/common/ReturnFromGraveyardToBattlefieldTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnFromGraveyardToBattlefieldTargetEffect.java index 90516fa4ff..1d81545d46 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ReturnFromGraveyardToBattlefieldTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ReturnFromGraveyardToBattlefieldTargetEffect.java @@ -75,7 +75,7 @@ public class ReturnFromGraveyardToBattlefieldTargetEffect extends OneShotEffect Set cardsToMove = new HashSet<>(); for (UUID targetId : getTargetPointer().getTargets(game, source)) { Card card = game.getCard(targetId); - if (card != null) { + if (card != null && game.getState().getZone(card.getId()) == Zone.GRAVEYARD) { cardsToMove.add(card); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandChosenControlledPermanentEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandChosenControlledPermanentEffect.java index 6a6949d37e..dced11b2a7 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandChosenControlledPermanentEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandChosenControlledPermanentEffect.java @@ -66,7 +66,12 @@ public class ReturnToHandChosenControlledPermanentEffect extends ReturnToHandCho protected String getText() { StringBuilder sb = new StringBuilder("return "); if (!filter.getMessage().startsWith("another")) { - sb.append(CardUtil.numberToText(number, "a")); + if(filter.getMessage().startsWith("a")){ + sb.append("an"); + } + else { + sb.append(CardUtil.numberToText(number, "a")); + } } sb.append(' ').append(filter.getMessage()); if (number > 1) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandTargetEffect.java index 2ab4c45591..ad80dffa49 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandTargetEffect.java @@ -27,7 +27,9 @@ */ package mage.abilities.effects.common; +import java.util.ArrayList; import java.util.LinkedHashSet; +import java.util.List; import java.util.Set; import java.util.UUID; import mage.MageObject; @@ -38,6 +40,7 @@ import mage.cards.Card; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; +import mage.game.stack.Spell; import mage.players.Player; import mage.target.Target; import mage.util.CardUtil; @@ -74,12 +77,15 @@ public class ReturnToHandTargetEffect extends OneShotEffect { if (controller == null) { return false; } + List copyIds = new ArrayList<>(); Set cards = new LinkedHashSet<>(); if (multitargetHandling) { for (Target target : source.getTargets()) { for (UUID targetId : target.getTargets()) { MageObject mageObject = game.getObject(targetId); - if (mageObject instanceof Card) { + if (mageObject instanceof Spell && ((Spell) mageObject).isCopy()) { + copyIds.add(targetId); + } else if (mageObject instanceof Card) { cards.add((Card) mageObject); } } @@ -88,10 +94,17 @@ public class ReturnToHandTargetEffect extends OneShotEffect { for (UUID targetId : targetPointer.getTargets(game, source)) { MageObject mageObject = game.getObject(targetId); if (mageObject != null) { - cards.add((Card) mageObject); + if (mageObject instanceof Spell && ((Spell) mageObject).isCopy()) { + copyIds.add(targetId); + } else { + cards.add((Card) mageObject); + } } } } + for (UUID copyId : copyIds) { + game.getStack().remove(game.getSpell(copyId)); + } return controller.moveCards(cards, Zone.HAND, source, game); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/RevealLibraryPutIntoHandEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RevealLibraryPutIntoHandEffect.java index 5d8965fde1..d0b5710466 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/RevealLibraryPutIntoHandEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/RevealLibraryPutIntoHandEffect.java @@ -117,7 +117,7 @@ public class RevealLibraryPutIntoHandEffect extends OneShotEffect { } private String setText() { - StringBuilder sb = new StringBuilder("Reveal the top "); + StringBuilder sb = new StringBuilder("reveal the top "); sb.append(CardUtil.numberToText(amountCards.toString())).append(" cards of your library. Put all "); sb.append(filter.getMessage()); sb.append(" revealed this way into your hand and the rest "); diff --git a/Mage/src/main/java/mage/abilities/effects/common/SkipUntapStepEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SkipUntapStepEffect.java new file mode 100644 index 0000000000..ed3c8ff666 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/SkipUntapStepEffect.java @@ -0,0 +1,69 @@ +/* + * + * 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.abilities.effects.common; + +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.players.Player; + +/** + * + * @author jeffwadsworth + */ + +public class SkipUntapStepEffect extends ContinuousRuleModifyingEffectImpl { + + public SkipUntapStepEffect() { + super(Duration.WhileOnBattlefield, Outcome.Neutral, false, false); + staticText = "Players skip their untap steps"; + } + + public SkipUntapStepEffect(final SkipUntapStepEffect effect) { + super(effect); + } + + @Override + public SkipUntapStepEffect copy() { + return new SkipUntapStepEffect(this); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + Player controller = game.getPlayer(source.getControllerId()); + return event.getType() == GameEvent.EventType.UNTAP_STEP + && controller != null + && game.getState().getPlayersInRange(controller.getId(), game).contains(event.getPlayerId()); + } +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/TapAllTargetPlayerControlsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/TapAllTargetPlayerControlsEffect.java index 0ad564a721..08ca0c506f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/TapAllTargetPlayerControlsEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/TapAllTargetPlayerControlsEffect.java @@ -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.abilities.effects.common; import java.util.List; @@ -60,10 +59,10 @@ public class TapAllTargetPlayerControlsEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(targetPointer.getFirst(game, source)); - if(player != null) { + if (player != null) { filter.add(new ControllerIdPredicate(player.getId())); List permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game); - for(Permanent p : permanents) { + for (Permanent p : permanents) { p.tap(game); } return true; @@ -78,9 +77,9 @@ public class TapAllTargetPlayerControlsEffect extends OneShotEffect { @Override public String getText(Mode mode) { - if(staticText != null && !staticText.isEmpty()) { + if (staticText != null && !staticText.isEmpty()) { return staticText; } - return "tap all " + filter.getMessage() + " target player controls"; + return "tap all " + filter.toString() + " target " + mode.getTargets().get(0).getMessage() + " controls"; } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/TurnFaceUpTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/TurnFaceUpTargetEffect.java new file mode 100644 index 0000000000..2270370e17 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/TurnFaceUpTargetEffect.java @@ -0,0 +1,73 @@ +/* +* 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.abilities.effects.common; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author cg5 + */ +public class TurnFaceUpTargetEffect extends OneShotEffect { + + public TurnFaceUpTargetEffect() { + super(Outcome.Benefit); + } + + public TurnFaceUpTargetEffect(final TurnFaceUpTargetEffect effect) { + super(effect); + } + + @Override + public TurnFaceUpTargetEffect copy() { + return new TurnFaceUpTargetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + UUID target = targetPointer.getFirst(game, source); + if (target != null) { + Permanent permanent = game.getPermanent(target); + if (permanent != null) { + return permanent.turnFaceUp(game, source.getControllerId()); + } + } + return false; + } + + @Override + public String getText(Mode mode) { + return "turn target " + mode.getTargets().toString() + " face-up"; + } +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/UntapAllThatAttackedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/UntapAllThatAttackedEffect.java index f5a366b6c1..7cf8dbfd71 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/UntapAllThatAttackedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/UntapAllThatAttackedEffect.java @@ -48,7 +48,7 @@ public class UntapAllThatAttackedEffect extends OneShotEffect { public UntapAllThatAttackedEffect() { super(Outcome.Benefit); - staticText = " Untap all creatures that attacked this turn"; + staticText = "Untap all creatures that attacked this turn"; } public UntapAllThatAttackedEffect(final UntapAllThatAttackedEffect effect) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/AttacksIfAbleTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/AttacksIfAbleTargetEffect.java index cc9600fb9c..6a5f2e3d90 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/AttacksIfAbleTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/AttacksIfAbleTargetEffect.java @@ -74,9 +74,9 @@ public class AttacksIfAbleTargetEffect extends RequirementEffect { return staticText; } if (this.duration == Duration.EndOfTurn) { - return new StringBuilder("Target ").append(mode.getTargets().get(0).getTargetName()).append(" attacks this turn if able").toString(); + return "Target " + mode.getTargets().get(0).getTargetName() + " attacks this turn if able"; } else { - return new StringBuilder("Target ").append(mode.getTargets().get(0).getTargetName()).append(" attacks each turn if able").toString(); + return "Target " + mode.getTargets().get(0).getTargetName() + " attacks each turn if able"; } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleAttachedEffect.java index 988c75ff76..c7dd2cf8c2 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleAttachedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleAttachedEffect.java @@ -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.abilities.effects.common.combat; import mage.abilities.Ability; @@ -38,12 +37,11 @@ import mage.game.permanent.Permanent; /** * @author LevelX2 */ - public class BlocksIfAbleAttachedEffect extends RequirementEffect { public BlocksIfAbleAttachedEffect(Duration duration, AttachmentType attachmentType) { super(duration); - this.staticText = attachmentType.verb() + " creature blocks each turn if able"; + this.staticText = attachmentType.verb() + " creature blocks each combat if able"; } public BlocksIfAbleAttachedEffect(final BlocksIfAbleAttachedEffect effect) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleSourceEffect.java index 97e46cc571..1fda34c497 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleSourceEffect.java @@ -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.abilities.effects.common.combat; import mage.abilities.Ability; @@ -39,7 +38,6 @@ import mage.game.permanent.Permanent; * * @author LevelX2 */ - public class BlocksIfAbleSourceEffect extends RequirementEffect { public BlocksIfAbleSourceEffect(Duration duration) { @@ -78,7 +76,7 @@ public class BlocksIfAbleSourceEffect extends RequirementEffect { @Override public String getText(Mode mode) { - return "{this} blocks each turn if able."; + return "{this} blocks each combat if able."; } -} \ No newline at end of file +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouEffect.java index 42907477df..314897ecba 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouEffect.java @@ -40,15 +40,8 @@ import mage.game.permanent.Permanent; */ public class CantAttackYouEffect extends RestrictionEffect { - private boolean canAttackYouAnyway = false; - public CantAttackYouEffect(Duration duration) { - this(duration, false); - } - - public CantAttackYouEffect(Duration duration, boolean canAttackYouAnyway) { super(duration); - this.canAttackYouAnyway = canAttackYouAnyway; } public CantAttackYouEffect(final CantAttackYouEffect effect) { @@ -67,11 +60,6 @@ public class CantAttackYouEffect extends RestrictionEffect { @Override public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) { - for (UUID player : game.getOpponents(source.getId())) { - if (attacker.canAttack(player, game)) { - return false; - } - } - return !canAttackYouAnyway; + return !defenderId.equals(source.getControllerId()); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByAllTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByAllTargetEffect.java index fdd2aefac5..fae351becc 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByAllTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByAllTargetEffect.java @@ -30,6 +30,7 @@ package mage.abilities.effects.common.combat; import mage.abilities.Ability; import mage.abilities.effects.RestrictionEffect; import mage.constants.Duration; +import static mage.constants.Duration.EndOfTurn; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.permanent.Permanent; @@ -45,8 +46,9 @@ public class CantBeBlockedByAllTargetEffect extends RestrictionEffect { public CantBeBlockedByAllTargetEffect(FilterCreaturePermanent filterBlockedBy, Duration duration) { super(duration); this.filterBlockedBy = filterBlockedBy; - staticText = "Target creature" + staticText = "target creature" + " can't be blocked " + + (duration == EndOfTurn ? "this turn " : "") + (filterBlockedBy.getMessage().startsWith("except by") ? "" : "by ") + filterBlockedBy.getMessage(); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java index 76a23da819..f622abea91 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java @@ -31,6 +31,7 @@ import mage.abilities.Ability; import mage.abilities.effects.RestrictionEffect; import mage.constants.AttachmentType; import mage.constants.Duration; +import static mage.constants.Duration.EndOfTurn; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.permanent.Permanent; @@ -61,7 +62,9 @@ public class CantBlockAttachedEffect extends RestrictionEffect { if (!filter.getMessage().equals("creature")) { sb.append(' ').append(filter.getMessage()); } - if (!duration.toString().isEmpty()) { + if (duration == EndOfTurn) { + sb.append(" this turn"); + } else if (!duration.toString().isEmpty()) { sb.append(' ').append(duration.toString()); } staticText = sb.toString(); diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/GoadTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/GoadTargetEffect.java index 8384f291b9..5b5a7b55dd 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/GoadTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/GoadTargetEffect.java @@ -33,6 +33,8 @@ import mage.abilities.effects.OneShotEffect; import mage.constants.Duration; import mage.constants.Outcome; import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; import mage.target.targetpointer.FixedTarget; /** @@ -63,12 +65,17 @@ public class GoadTargetEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - ContinuousEffect effect = new AttacksIfAbleTargetEffect(Duration.UntilYourNextTurn); - effect.setTargetPointer(new FixedTarget(getTargetPointer().getFirst(game, source))); - game.addEffect(effect, source); - effect = new CantAttackYouEffect(Duration.UntilYourNextTurn, true); - effect.setTargetPointer(new FixedTarget(getTargetPointer().getFirst(game, source))); - game.addEffect(effect, source); + Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); + Player controller = game.getPlayer(source.getControllerId()); + if (targetCreature != null && controller != null) { + ContinuousEffect effect = new AttacksIfAbleTargetEffect(Duration.UntilYourNextTurn); + effect.setTargetPointer(new FixedTarget(getTargetPointer().getFirst(game, source))); + game.addEffect(effect, source); + effect = new CantAttackYouEffect(Duration.UntilYourNextTurn); + effect.setTargetPointer(new FixedTarget(getTargetPointer().getFirst(game, source))); + game.addEffect(effect, source); + game.informPlayers(controller.getLogName() + " is goating " + targetCreature.getLogName()); + } return true; } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneTargetEffect.java index 7f1c8b1de7..c03f59a035 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneTargetEffect.java @@ -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.abilities.effects.common.combat; import java.util.UUID; @@ -35,35 +34,32 @@ import mage.constants.Duration; import mage.game.Game; import mage.game.permanent.Permanent; - /** * !! This effect does only support one target. * * * http://tappedout.net/mtg-questions/must-be-blocked-if-able-effect-makes-other-attacking-creatures-essentially-unblockable/ * - * When you Declare Blockers, you choose an arrangement for your blockers, - * then check to see if there are any restrictions or requirements. + * When you Declare Blockers, you choose an arrangement for your blockers, then + * check to see if there are any restrictions or requirements. * - * If any restrictions are violated, the block is illegal. (For example, - * trying to block with Sightless Ghoul) - * If any requirements are violated, the least possible number of requirements - * must be violated, otherwise the block is illegal. (For example, your opponent - * control two creatures that he has cast Deadly Allure on, but you control only - * one creature. Blocking either one will violate a requirement, "This creature - * must be blocked this turn if able", but it will also violate the least - * possible number of requirements, thus it is legal.) - * If the block is illegal, the game state backs up and you declare blockers - * again. (Note that while you can, in some cases, circumvent requirements - * such as "This creature must be blocked" or "This creature must block - * any attacking creature" you can never circumvent restrictions: "This creature - * can't block" or "Only one creature may block this turn.") - * Because you declare ALL your blockers at once, THEN check for - * restrictions/requirements, you may block Deadly Allure'd creatures - * with only one creature, if you choose. - * This still works with Lure: This card sets up a requirement that ALL - * creatures must block it if able. Any block that violates more than - * the minimum number of requirements is still illegal. + * If any restrictions are violated, the block is illegal. (For example, trying + * to block with Sightless Ghoul) If any requirements are violated, the least + * possible number of requirements must be violated, otherwise the block is + * illegal. (For example, your opponent control two creatures that he has cast + * Deadly Allure on, but you control only one creature. Blocking either one will + * violate a requirement, "This creature must be blocked this turn if able", but + * it will also violate the least possible number of requirements, thus it is + * legal.) If the block is illegal, the game state backs up and you declare + * blockers again. (Note that while you can, in some cases, circumvent + * requirements such as "This creature must be blocked" or "This creature must + * block any attacking creature" you can never circumvent restrictions: "This + * creature can't block" or "Only one creature may block this turn.") Because + * you declare ALL your blockers at once, THEN check for + * restrictions/requirements, you may block Deadly Allure'd creatures with only + * one creature, if you choose. This still works with Lure: This card sets up a + * requirement that ALL creatures must block it if able. Any block that violates + * more than the minimum number of requirements is still illegal. * * @author LevelX2 */ @@ -75,7 +71,7 @@ public class MustBeBlockedByAtLeastOneTargetEffect extends RequirementEffect { public MustBeBlockedByAtLeastOneTargetEffect(Duration duration) { super(duration); - staticText = "Target creature must be blocked this turn if able"; + staticText = "target creature must be blocked this turn if able"; } public MustBeBlockedByAtLeastOneTargetEffect(final MustBeBlockedByAtLeastOneTargetEffect effect) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/AddCardSubtypeAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/AddCardSubtypeAllEffect.java index e4ca732835..67aad3e4cb 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/AddCardSubtypeAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/AddCardSubtypeAllEffect.java @@ -59,7 +59,7 @@ public class AddCardSubtypeAllEffect extends ContinuousEffectImpl { @Override public boolean apply(Game game, Ability source) { for (Permanent perm : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { - if (perm != null && !perm.getSubtype(game).contains(addedSubtype)) { + if (perm != null && !perm.hasSubtype(addedSubtype, game)) { perm.getSubtype(game).add(addedSubtype); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/AddCardSubtypeAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/AddCardSubtypeAttachedEffect.java index 76aefcab8a..e7f41ef050 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/AddCardSubtypeAttachedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/AddCardSubtypeAttachedEffect.java @@ -59,7 +59,7 @@ public class AddCardSubtypeAttachedEffect extends ContinuousEffectImpl { Permanent equipment = game.getPermanent(source.getSourceId()); if (equipment != null && equipment.getAttachedTo() != null) { Permanent target = game.getPermanent(equipment.getAttachedTo()); - if (target != null && !target.getSubtype(game).contains(addedSubtype)) + if (target != null && !target.hasSubtype(addedSubtype, game)) target.getSubtype(game).add(addedSubtype); } return true; diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesAuraSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesAuraSourceEffect.java index 4a27866dd3..010cf646b3 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesAuraSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesAuraSourceEffect.java @@ -36,6 +36,7 @@ import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; import mage.constants.SubLayer; +import mage.constants.SubType; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.Target; @@ -83,8 +84,8 @@ public class BecomesAuraSourceEffect extends ContinuousEffectImpl implements Sou switch (layer) { case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { - if (!permanent.getSubtype(game).contains("Aura")) { - permanent.getSubtype(game).add("Aura"); + if (!permanent.hasSubtype(SubType.AURA, game)) { + permanent.getSubtype(game).add(SubType.AURA); } } break; diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesBasicLandEnchantedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesBasicLandEnchantedEffect.java index a8007645ec..0db8746d06 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesBasicLandEnchantedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesBasicLandEnchantedEffect.java @@ -75,27 +75,27 @@ public class BecomesBasicLandEnchantedEffect extends ContinuousEffectImpl { for (SubType landType : landTypes) { switch (landType) { case SWAMP: - if (permanent.getSubtype(game).contains(SubType.SWAMP)) { // type can be removed by other effect with newer timestamp, so no ability adding + if (permanent.hasSubtype(SubType.SWAMP, game)) { // type can be removed by other effect with newer timestamp, so no ability adding permanent.addAbility(new BlackManaAbility(), source.getSourceId(), game); } break; case MOUNTAIN: - if (permanent.getSubtype(game).contains(SubType.MOUNTAIN)) { + if (permanent.hasSubtype(SubType.MOUNTAIN, game)) { permanent.addAbility(new RedManaAbility(), source.getSourceId(), game); } break; case FOREST: - if (permanent.getSubtype(game).contains(SubType.FOREST)) { + if (permanent.hasSubtype(SubType.FOREST, game)) { permanent.addAbility(new GreenManaAbility(), source.getSourceId(), game); } break; case ISLAND: - if (permanent.getSubtype(game).contains(SubType.ISLAND)) { + if (permanent.hasSubtype(SubType.ISLAND, game)) { permanent.addAbility(new BlueManaAbility(), source.getSourceId(), game); } break; case PLAINS: - if (permanent.getSubtype(game).contains(SubType.PLAINS)) { + if (permanent.hasSubtype(SubType.PLAINS, game)) { permanent.addAbility(new WhiteManaAbility(), source.getSourceId(), game); } break; diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java index 845dba8896..4d0bb0703e 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java @@ -149,7 +149,7 @@ public class BecomesBasicLandTargetEffect extends ContinuousEffectImpl { } else { landTypesToAdd.clear(); for (SubType subtype : landTypes) { - if (!land.getSubtype(game).contains(subtype)) { + if (!land.hasSubtype(subtype, game)) { land.getSubtype(game).add(subtype); landTypesToAdd.add(subtype); } @@ -191,7 +191,7 @@ public class BecomesBasicLandTargetEffect extends ContinuousEffectImpl { private String setText() { StringBuilder sb = new StringBuilder(); if (chooseLandType) { - sb.append("Target land becomes the basic land type of your choice "); + sb.append("Target land becomes the basic land type of your choice"); } else { sb.append("Target land becomes a "); int i = 1; diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeSourceEffect.java new file mode 100644 index 0000000000..56d90e8f21 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeSourceEffect.java @@ -0,0 +1,42 @@ +package mage.abilities.effects.common.continuous; + +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.targetpointer.FixedTarget; + +public class BecomesChosenCreatureTypeSourceEffect extends OneShotEffect { + + public BecomesChosenCreatureTypeSourceEffect() { + this(false); + } + + public BecomesChosenCreatureTypeSourceEffect(boolean nonWall) { + super(Outcome.BoostCreature); + staticText = "{this} becomes the creature type of your choice until end of turn."; + } + + public BecomesChosenCreatureTypeSourceEffect(final BecomesChosenCreatureTypeSourceEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent sourcePerm = game.getPermanent(source.getSourceId()); + if (sourcePerm == null) { + return false; + } + Effect effect = new BecomesChosenCreatureTypeTargetEffect(); + effect.setTargetPointer(new FixedTarget(sourcePerm, game)); + return effect.apply(game, source); + } + + @Override + public Effect copy() { + return new BecomesChosenCreatureTypeSourceEffect(this); + } + +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeTargetEffect.java index 6a21fcf093..dde5970a68 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeTargetEffect.java @@ -26,7 +26,7 @@ public class BecomesChosenCreatureTypeTargetEffect extends OneShotEffect { super(Outcome.BoostCreature); this.nonWall = nonWall; if(nonWall) { - staticText = "choose a creature type other than wall, target creature's type becomes that type until end of turn"; + staticText = "choose a creature type other than Wall. Target creature becomes that type until end of turn"; } else { staticText = "target creature becomes the creature type of your choice until end of turn"; diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesColorTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesColorTargetEffect.java index abf36d2d3a..c437a9404f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesColorTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesColorTargetEffect.java @@ -52,12 +52,13 @@ public class BecomesColorTargetEffect extends ContinuousEffectImpl { /** * Set the color of a spell or permanent - * - * @param duration + * + * @param duration */ public BecomesColorTargetEffect(Duration duration) { this(null, duration, null); } + public BecomesColorTargetEffect(ObjectColor setColor, Duration duration) { this(setColor, duration, null); } @@ -78,7 +79,7 @@ public class BecomesColorTargetEffect extends ContinuousEffectImpl { Player controller = game.getPlayer(source.getControllerId()); if (controller == null) { return; - } + } if (setColor == null) { ChoiceColor choice = new ChoiceColor(); while (!choice.isChosen()) { @@ -95,9 +96,8 @@ public class BecomesColorTargetEffect extends ContinuousEffectImpl { if (!game.isSimulation()) { game.informPlayers(controller.getLogName() + " has chosen the color: " + setColor.toString()); } - } - - + } + super.init(source, game); //To change body of generated methods, choose Tools | Templates. } @@ -109,11 +109,11 @@ public class BecomesColorTargetEffect extends ContinuousEffectImpl { } if (setColor != null) { boolean objectFound = false; - for (UUID targetId :targetPointer.getTargets(game, source)) { + for (UUID targetId : targetPointer.getTargets(game, source)) { MageObject targetObject = game.getObject(targetId); if (targetObject != null) { objectFound = true; - targetObject.getColor(game).setColor(setColor); + targetObject.getColor(game).setColor(setColor); } } if (!objectFound && this.getDuration() == Duration.Custom) { @@ -143,7 +143,9 @@ public class BecomesColorTargetEffect extends ContinuousEffectImpl { } else { sb.append(setColor.getDescription()); } - sb.append(' ').append(duration.toString()); + if (!duration.toString().equals("")) { + sb.append(' ').append(duration.toString()); + } return sb.toString(); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAllEffect.java index f6f796c25f..d78d9a26ef 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAllEffect.java @@ -138,7 +138,6 @@ public class BecomesCreatureAllEffect extends ContinuousEffectImpl { if (duration.toString() != null && !duration.toString().isEmpty()) { sb.append(duration.toString()).append(", "); } - sb.append("all "); sb.append(filter.getMessage()); if (duration.toString() != null && duration.toString().isEmpty()) { sb.append(" are "); @@ -147,7 +146,7 @@ public class BecomesCreatureAllEffect extends ContinuousEffectImpl { } sb.append(token.getDescription()); if (type != null && !type.isEmpty()) { - sb.append(". They are still ").append(type); + sb.append(". They're still ").append(type); } return sb.toString(); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAttachedEffect.java index 6310cc7115..da2e7b4a5e 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAttachedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAttachedEffect.java @@ -104,7 +104,7 @@ public class BecomesCreatureAttachedEffect extends ContinuousEffectImpl { break; } for (SubType t : token.getSubtype(game)) { - if (!permanent.getSubtype(game).contains(t)) { + if (!permanent.hasSubtype(t, game)) { permanent.getSubtype(game).add(t); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAttachedWithActivatedAbilityOrSpellEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAttachedWithActivatedAbilityOrSpellEffect.java index 5e2f408753..9b62e1e933 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAttachedWithActivatedAbilityOrSpellEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAttachedWithActivatedAbilityOrSpellEffect.java @@ -120,7 +120,7 @@ public class BecomesCreatureAttachedWithActivatedAbilityOrSpellEffect extends Co break; } for (SubType subType : token.getSubtype(game)) { - if (!permanentAttachedTo.getSubtype(game).contains(subType)) { + if (!permanentAttachedTo.hasSubtype(subType, game)) { permanentAttachedTo.getSubtype(game).add(subType); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureIfVehicleEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureIfVehicleEffect.java index 2fc8214a36..43915d9ac7 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureIfVehicleEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureIfVehicleEffect.java @@ -27,7 +27,7 @@ public class BecomesCreatureIfVehicleEffect extends ContinuousEffectImpl { Permanent aura = game.getPermanent(source.getSourceId()); if (aura != null && aura.getAttachedTo() != null) { Permanent enchanted = game.getPermanent(aura.getAttachedTo()); - if (enchanted != null && enchanted.getSubtype(game).contains("Vehicle")) { + if (enchanted != null && enchanted.hasSubtype(SubType.VEHICLE, game)) { enchanted.addCardType(addedType); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureTargetEffect.java index 0872acbf64..b95e5b79e5 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureTargetEffect.java @@ -89,7 +89,7 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl { } else { if (!token.getSubtype(game).isEmpty()) { for (SubType subtype : token.getSubtype(game)) { - if (!permanent.getSubtype(game).contains(subtype)) { + if (!permanent.hasSubtype(subtype, game)) { permanent.getSubtype(game).add(subtype); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureTypeTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureTypeTargetEffect.java index 04702ba86b..e5a140ff81 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureTypeTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureTypeTargetEffect.java @@ -77,7 +77,7 @@ public class BecomesCreatureTypeTargetEffect extends ContinuousEffectImpl { permanent.getSubtype(game).addAll(subtypes); } else { for (SubType subtype : subtypes) { - if (!permanent.getSubtype(game).contains(subtype)) { + if (!permanent.hasSubtype(subtype, game)) { permanent.getSubtype(game).add(subtype); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesSubtypeAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesSubtypeAllEffect.java index 0758cd8519..3bc5c7a936 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesSubtypeAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesSubtypeAllEffect.java @@ -74,7 +74,7 @@ public class BecomesSubtypeAllEffect extends ContinuousEffectImpl { permanent.getSubtype(game).addAll(subtypes); } else { for (SubType subtype : subtypes) { - if (!permanent.getSubtype(game).contains(subtype)) { + if (!permanent.hasSubtype(subtype, game)) { permanent.getSubtype(game).add(subtype); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java index 884cc61e3a..4b9eedc8f6 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java @@ -125,7 +125,7 @@ public class BoostEnchantedEffect extends ContinuousEffectImpl { private void setText() { StringBuilder sb = new StringBuilder(); - sb.append("Enchanted creature gets "); + sb.append("enchanted creature gets "); String p = power.toString(); if (!p.startsWith("-")) { sb.append('+'); diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEquippedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEquippedEffect.java index 796fa3060c..0de648e5bf 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEquippedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEquippedEffect.java @@ -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.abilities.effects.common.continuous; import mage.constants.Duration; @@ -116,21 +115,24 @@ public class BoostEquippedEffect extends ContinuousEffectImpl { private void setText() { StringBuilder sb = new StringBuilder(); - sb.append("Equipped creature gets "); + sb.append("equipped creature gets "); String p = power.toString(); - if (!p.startsWith("-")) + if (!p.startsWith("-")) { sb.append('+'); + } sb.append(p).append('/'); String t = toughness.toString(); if (!t.startsWith("-")) { - if (p.startsWith("-")) + if (p.startsWith("-")) { sb.append('-'); - else + } else { sb.append('+'); + } } sb.append(t); - if (duration != Duration.WhileOnBattlefield) + if (duration != Duration.WhileOnBattlefield) { sb.append(' ').append(duration.toString()); + } String message = power.getMessage(); if (!message.isEmpty()) { sb.append(" for each "); diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/ControlEnchantedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/ControlEnchantedEffect.java index 27fa75de2e..44074e0028 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/ControlEnchantedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/ControlEnchantedEffect.java @@ -41,7 +41,7 @@ public class ControlEnchantedEffect extends ContinuousEffectImpl { switch (layer) { case ControlChangingEffects_2: if (sublayer == SubLayer.NA) { - permanent.changeControllerId(source.getControllerId(), game); + permanent.changeControllerId(enchantment.getControllerId(), game); } break; } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityControlledSpellsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityControlledSpellsEffect.java index 59ea028475..4fb3d05810 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityControlledSpellsEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityControlledSpellsEffect.java @@ -53,7 +53,7 @@ public class GainAbilityControlledSpellsEffect extends ContinuousEffectImpl { super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); this.ability = ability; this.filter = filter; - staticText = filter.getMessage() + " you cast have " + ability.getRule(); + staticText = filter.getMessage() + " you cast have " + ability.getRule() + '.'; } public GainAbilityControlledSpellsEffect(final GainAbilityControlledSpellsEffect effect) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/GainControlAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainControlAllEffect.java index 9cbe784ae8..ad85f73ad2 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/GainControlAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainControlAllEffect.java @@ -5,6 +5,7 @@ */ package mage.abilities.effects.common.continuous; +import java.util.UUID; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.ContinuousEffectImpl; @@ -22,16 +23,23 @@ import mage.game.permanent.Permanent; */ public class GainControlAllEffect extends ContinuousEffectImpl { - final FilterPermanent filter; + private final FilterPermanent filter; + private final UUID controllingPlayerId; public GainControlAllEffect(Duration duration, FilterPermanent filter) { + this(duration, filter, null); + } + + public GainControlAllEffect(Duration duration, FilterPermanent filter, UUID controllingPlayerId) { super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl); this.filter = filter; + this.controllingPlayerId = controllingPlayerId; } public GainControlAllEffect(final GainControlAllEffect effect) { super(effect); this.filter = effect.filter.copy(); + this.controllingPlayerId = effect.controllingPlayerId; } @Override @@ -43,7 +51,12 @@ public class GainControlAllEffect extends ContinuousEffectImpl { public boolean apply(Game game, Ability source) { for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) { if (permanent != null) { - permanent.changeControllerId(source.getControllerId(), game); + if (controllingPlayerId == null) { + permanent.changeControllerId(source.getControllerId(), game); + } else { + permanent.changeControllerId(controllingPlayerId, game); + } + } } return true; diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAbilityTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAbilityTargetEffect.java index 3ac29f8314..a27e56fa95 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAbilityTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAbilityTargetEffect.java @@ -27,7 +27,9 @@ */ package mage.abilities.effects.common.continuous; +import java.util.Iterator; import mage.abilities.Ability; +import mage.abilities.MageSingleton; import mage.abilities.Mode; import mage.abilities.effects.ContinuousEffectImpl; import mage.constants.Duration; @@ -69,8 +71,17 @@ public class LoseAbilityTargetEffect extends ContinuousEffectImpl { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); if (permanent != null) { - while (permanent.getAbilities().contains(ability)) { - permanent.getAbilities().remove(ability); + if (ability instanceof MageSingleton) { + while (permanent.getAbilities().contains(ability)) { + permanent.getAbilities().remove(ability); + } + } else { + for (Iterator iter = permanent.getAbilities().iterator(); iter.hasNext();) { + Ability ab = iter.next(); + if (ab.getClass().equals(ability.getClass())) { + iter.remove(); + } + } } } return true; diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetCardSubtypeAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetCardSubtypeAttachedEffect.java index fafe47f266..f68d71d251 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetCardSubtypeAttachedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetCardSubtypeAttachedEffect.java @@ -29,13 +29,16 @@ package mage.abilities.effects.common.continuous; import mage.abilities.Ability; import mage.abilities.effects.ContinuousEffectImpl; -import mage.constants.*; +import mage.constants.AttachmentType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.constants.SubType; import mage.game.Game; import mage.game.permanent.Permanent; import mage.util.SubTypeList; -import java.util.List; - /** * @author nantuko */ @@ -44,7 +47,14 @@ public class SetCardSubtypeAttachedEffect extends ContinuousEffectImpl { private SubTypeList setSubtypes = new SubTypeList(); private final AttachmentType attachmentType; - public SetCardSubtypeAttachedEffect(SubType setSubtype, Duration duration, AttachmentType attachmentType) { + public SetCardSubtypeAttachedEffect(Duration duration, AttachmentType attachmentType, SubType... setSubtype) { + super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit); + this.setSubtypes.add(setSubtype); + this.attachmentType = attachmentType; + this.setText(); + } + + /*public SetCardSubtypeAttachedEffect(SubType setSubtype, Duration duration, AttachmentType attachmentType) { super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit); this.setSubtypes.add(setSubtype); this.attachmentType = attachmentType; @@ -56,7 +66,7 @@ public class SetCardSubtypeAttachedEffect extends ContinuousEffectImpl { this.setSubtypes.addAll(setSubtypes); this.attachmentType = attachmentType; setText(); - } + }*/ public SetCardSubtypeAttachedEffect(final SetCardSubtypeAttachedEffect effect) { super(effect); diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerSourceEffect.java index dbafe0c94b..c344149b8d 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerSourceEffect.java @@ -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.abilities.effects.common.continuous; import mage.MageObject; @@ -42,13 +41,16 @@ import mage.game.Game; * * @author LevelX2 */ - public class SetPowerSourceEffect extends ContinuousEffectImpl { private final DynamicValue amount; public SetPowerSourceEffect(DynamicValue amount, Duration duration) { - super(duration, Layer.PTChangingEffects_7, SubLayer.SetPT_7b, Outcome.BoostCreature); + this(amount, duration, SubLayer.CharacteristicDefining_7a); + } + + public SetPowerSourceEffect(DynamicValue amount, Duration duration, SubLayer subLayer) { + super(duration, Layer.PTChangingEffects_7, subLayer, Outcome.BoostCreature); this.amount = amount; staticText = "{this}'s power is equal to the number of " + amount.getMessage(); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetToughnessSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetToughnessSourceEffect.java index af48b2b92c..b539625c80 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetToughnessSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetToughnessSourceEffect.java @@ -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.abilities.effects.common.continuous; import mage.MageObject; @@ -46,7 +45,11 @@ public class SetToughnessSourceEffect extends ContinuousEffectImpl { private final DynamicValue amount; public SetToughnessSourceEffect(DynamicValue amount, Duration duration) { - super(duration, Layer.PTChangingEffects_7, SubLayer.SetPT_7b, Outcome.BoostCreature); + this(amount, duration, SubLayer.CharacteristicDefining_7a); + } + + public SetToughnessSourceEffect(DynamicValue amount, Duration duration, SubLayer subLayer) { + super(duration, Layer.PTChangingEffects_7, subLayer, Outcome.BoostCreature); this.amount = amount; staticText = "{this}'s toughness is equal to the number of " + amount.getMessage(); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/cost/CastWithoutPayingManaCostEffect.java b/Mage/src/main/java/mage/abilities/effects/common/cost/CastWithoutPayingManaCostEffect.java index 97938cd85d..c389ece434 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/cost/CastWithoutPayingManaCostEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/cost/CastWithoutPayingManaCostEffect.java @@ -25,13 +25,12 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.effects.common.cost; import mage.abilities.Ability; -import mage.constants.ComparisonType; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; +import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.filter.common.FilterNonlandCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -39,13 +38,15 @@ import mage.game.Game; import mage.players.Player; import mage.target.Target; import mage.target.common.TargetCardInHand; +import org.apache.log4j.Logger; /** * @author fireshoes - Original Code * @author JRHerlehy - Implement as seperate class - *

- * Allows player to choose to cast as card from hand without paying its mana cost. - *

+ *

+ * Allows player to choose to cast as card from hand without paying its mana + * cost. + *

*/ public class CastWithoutPayingManaCostEffect extends OneShotEffect { @@ -73,19 +74,27 @@ public class CastWithoutPayingManaCostEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - if (controller == null) return false; + if (controller == null) { + return false; + } Target target = new TargetCardInHand(filter); - if (target.canChoose(source.getSourceId(), controller.getId(), game) && - controller.chooseUse(outcome, "Cast a card with converted mana cost " + manaCost + - " or less from your hand without paying its mana cost?", source, game)) { + if (target.canChoose(source.getSourceId(), controller.getId(), game) + && controller.chooseUse(outcome, "Cast a card with converted mana cost " + manaCost + + " or less from your hand without paying its mana cost?", source, game)) { Card cardToCast = null; boolean cancel = false; while (controller.canRespond() && !cancel) { if (controller.chooseTarget(outcome, target, source, game)) { cardToCast = game.getCard(target.getFirstTarget()); - if (cardToCast != null && cardToCast.getSpellAbility().canChooseTarget(game)) { - cancel = true; + if (cardToCast != null) { + if (cardToCast.getSpellAbility() == null) { + Logger.getLogger(CastWithoutPayingManaCostEffect.class).fatal("Card: " + cardToCast.getName() + " is no land and has no spell ability!"); + cancel = true; + } + if (cardToCast.getSpellAbility().canChooseTarget(game)) { + cancel = true; + } } } else { cancel = true; diff --git a/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersAllEffect.java index 3bc9ba0e98..b896c2b950 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersAllEffect.java @@ -36,6 +36,7 @@ import mage.filter.FilterPermanent; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import mage.util.CardUtil; /** * @@ -82,7 +83,7 @@ public class AddCountersAllEffect extends OneShotEffect { StringBuilder sb = new StringBuilder(); sb.append("put "); if (counter.getCount() > 1) { - sb.append(Integer.toString(counter.getCount())).append(' ').append(counter.getName().toLowerCase()).append(" counters on each "); + sb.append(CardUtil.numberToText(counter.getCount(), "a")).append(' ').append(counter.getName().toLowerCase()).append(" counters on each "); } else { sb.append("a ").append(counter.getName().toLowerCase()).append(" counter on each "); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersSourceEffect.java index 1f28040a73..9376340acf 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersSourceEffect.java @@ -152,14 +152,20 @@ public class AddCountersSourceEffect extends OneShotEffect { private void setText() { StringBuilder sb = new StringBuilder(); sb.append("put "); + boolean plural = true; if (counter.getCount() > 1) { sb.append(CardUtil.numberToText(counter.getCount())).append(' '); } else if (amount.toString().equals("X") && amount.getMessage().isEmpty()) { sb.append("X "); } else { sb.append("a "); + plural = false; } - sb.append(counter.getName().toLowerCase()).append(" counter on {this}"); + sb.append(counter.getName().toLowerCase()).append(" counter"); + if (plural) { + sb.append('s'); + } + sb.append(" on {this}"); if (!amount.getMessage().isEmpty()) { sb.append(" for each ").append(amount.getMessage()); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardTargetEffect.java index a053e6f256..4bf488649b 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardTargetEffect.java @@ -108,7 +108,7 @@ public class DiscardTargetEffect extends OneShotEffect { } sb.append(" discards "); if (amount.toString().equals("1")) { - sb.append(" a card"); + sb.append("a card"); } else { sb.append(CardUtil.numberToText(amount.toString())).append(" cards"); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryGraveyardPutInHandEffect.java b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryGraveyardPutInHandEffect.java index cba730ab17..137a384bf1 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryGraveyardPutInHandEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryGraveyardPutInHandEffect.java @@ -57,8 +57,8 @@ public class SearchLibraryGraveyardPutInHandEffect extends OneShotEffect { super(Outcome.Benefit); this.filter = filter; this.forceToSearchBoth = forceToSearchBoth; - staticText = "Search your library and" + (forceToSearchBoth ? "" : "/or ") + " graveyard for a card named " + filter.getMessage() + - ", reveal it, and put it into your hand. " + (forceToSearchBoth ? "Then shuffle your library" : "If you search your library this way, shuffle it"); + staticText = "search your library and" + (forceToSearchBoth ? "" : "/or") + " graveyard for a card named " + filter.getMessage() + + ", reveal it, and put it into your hand. " + (forceToSearchBoth ? "Then shuffle your library" : "If you search your library this way, shuffle it"); } public SearchLibraryGraveyardPutInHandEffect(final SearchLibraryGraveyardPutInHandEffect effect) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java index 52f45373b0..75ba52ece3 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java @@ -37,6 +37,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInLibrary; +import mage.util.CardUtil; /** * @@ -106,9 +107,9 @@ public class SearchLibraryPutInPlayEffect extends SearchEffect { sb.append("search your library for "); if (target.getNumberOfTargets() == 0 && target.getMaxNumberOfTargets() > 0) { if (target.getMaxNumberOfTargets() == Integer.MAX_VALUE) { - sb.append("any number of ").append(' '); + sb.append("any number of "); } else { - sb.append("up to ").append(target.getMaxNumberOfTargets()).append(' '); + sb.append("up to ").append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(' '); } sb.append(target.getTargetName()).append(" and put them onto the battlefield"); } else { diff --git a/Mage/src/main/java/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java b/Mage/src/main/java/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java index 797a5edcf9..5be2bb16f2 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java @@ -129,7 +129,7 @@ public abstract class SearchTargetGraveyardHandLibraryForCardNameAndExileEffect @Override public String getText(Mode mode) { StringBuilder sb = new StringBuilder(); - sb.append("Search ").append(this.searchWhatText); + sb.append("search ").append(this.searchWhatText); sb.append(" graveyard, hand, and library for "); sb.append(this.searchForText); sb.append(" and exile them. Then that player shuffles his or her library"); diff --git a/Mage/src/main/java/mage/abilities/effects/keyword/BolsterEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/BolsterEffect.java index c29a2ef4cf..c090088572 100644 --- a/Mage/src/main/java/mage/abilities/effects/keyword/BolsterEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/keyword/BolsterEffect.java @@ -122,7 +122,7 @@ public class BolsterEffect extends OneShotEffect { } else { sb.append("X, where X is the number of "); sb.append(amount.getMessage()); - sb.append(". (Choose a creature with the least toughness among creatures you control and put X +1/+1 counters on it.)"); + sb.append(" (Choose a creature with the least toughness among creatures you control and put X +1/+1 counters on it.)"); } return sb.toString(); } diff --git a/Mage/src/main/java/mage/abilities/effects/keyword/ExploreSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/ExploreSourceEffect.java new file mode 100644 index 0000000000..a64c9aad8c --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/keyword/ExploreSourceEffect.java @@ -0,0 +1,105 @@ +/* + * 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.abilities.effects.keyword; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public class ExploreSourceEffect extends OneShotEffect { + + private static final FilterCard filter = new FilterCard("a land card"); + + static { + filter.add(new CardTypePredicate(CardType.LAND)); + } + + public ExploreSourceEffect() { + super(Outcome.Benefit); + this.staticText = "it explores. (Reveal the top card of your library. Put that card into your hand if it's a land. Otherwise, put a +1/+1 counter on this creature, then put the card back or put it into your graveyard.)"; + } + + public ExploreSourceEffect(final ExploreSourceEffect effect) { + super(effect); + } + + @Override + public ExploreSourceEffect copy() { + return new ExploreSourceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent creature = game.getPermanent(source.getSourceId()); + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.EXPLORED, source.getSourceId(), source.getSourceId(), source.getControllerId())); + if (player.getLibrary().hasCards()) { + Card card = player.getLibrary().getFromTop(game); + Cards cards = new CardsImpl(); + cards.add(card); + player.revealCards("Explored card", cards, game); + + if (card != null) { + if (filter.match(card, game)) { + card.moveToZone(Zone.HAND, source.getSourceId(), game, true); + } else { + if (creature != null) { + creature.addCounters(CounterType.P1P1.createInstance(), source, game); + } + if (player.chooseUse(Outcome.Neutral, "Put " + card.getLogName() + " in your graveyard?", source, game)) { + card.moveToZone(Zone.GRAVEYARD, source.getSourceId(), game, true); + game.informPlayers(player.getLogName() + " puts " + card.getLogName() + " into their graveyard."); + } else { + game.informPlayers(player.getLogName() + " leaves " + card.getLogName() + " on top of their library."); + } + } + } + return true; + } + return false; + } +} diff --git a/Mage/src/main/java/mage/abilities/keyword/AuraSwapAbility.java b/Mage/src/main/java/mage/abilities/keyword/AuraSwapAbility.java index c623bc5966..b662a74911 100644 --- a/Mage/src/main/java/mage/abilities/keyword/AuraSwapAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/AuraSwapAbility.java @@ -94,7 +94,7 @@ class AuraSwapEffect extends OneShotEffect { if (controller != null) { Permanent auraSourcePermanent = game.getPermanent(source.getSourceId()); if (auraSourcePermanent != null - && auraSourcePermanent.getSubtype(game).contains(SubType.AURA) + && auraSourcePermanent.hasSubtype(SubType.AURA, game) && auraSourcePermanent.getOwnerId().equals(source.getControllerId())) { Permanent enchantedPermanent = game.getPermanent(auraSourcePermanent.getAttachedTo()); filterCardToCheck.add(new AuraCardCanAttachToPermanentId(enchantedPermanent.getId())); diff --git a/Mage/src/main/java/mage/abilities/keyword/AwakenAbility.java b/Mage/src/main/java/mage/abilities/keyword/AwakenAbility.java index 918cb89326..71bd01757f 100644 --- a/Mage/src/main/java/mage/abilities/keyword/AwakenAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/AwakenAbility.java @@ -43,6 +43,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SpellAbilityType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterControlledLandPermanent; @@ -163,7 +164,7 @@ class AwakenElementalToken extends Token { super("", "0/0 Elemental creature with haste"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage/src/main/java/mage/abilities/keyword/BestowAbility.java b/Mage/src/main/java/mage/abilities/keyword/BestowAbility.java index 0ae699c711..0aab88b1f3 100644 --- a/Mage/src/main/java/mage/abilities/keyword/BestowAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/BestowAbility.java @@ -39,6 +39,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SpellAbilityType; +import mage.constants.SubType; import mage.constants.TimingRule; import mage.constants.Zone; import mage.game.Game; @@ -149,12 +150,12 @@ public class BestowAbility extends SpellAbility { if (permanent != null) { MageObject basicObject = permanent.getBasicMageObject(game); if (basicObject != null) { - basicObject.getSubtype(null).remove("Aura"); + basicObject.getSubtype(null).remove(SubType.AURA); if (!basicObject.isCreature()) { basicObject.addCardType(CardType.CREATURE); } } - permanent.getSubtype(null).remove("Aura"); + permanent.getSubtype(null).remove(SubType.AURA); if (!permanent.isCreature()) { permanent.addCardType(CardType.CREATURE); } @@ -187,9 +188,9 @@ class BestowEntersBattlefieldEffect extends ReplacementEffectImpl { public boolean replaceEvent(GameEvent event, Ability source, Game game) { Permanent bestowPermanent = game.getPermanentEntering(source.getSourceId()); if (bestowPermanent != null) { - if (bestowPermanent.getSubtype(game).contains("Aura")) { + if (bestowPermanent.hasSubtype(SubType.AURA, game)) { MageObject basicObject = bestowPermanent.getBasicMageObject(game); - basicObject.getSubtype(null).add("Aura"); + basicObject.getSubtype(null).add(SubType.AURA); basicObject.getCardType().remove(CardType.CREATURE); } } diff --git a/Mage/src/main/java/mage/abilities/keyword/ConspireAbility.java b/Mage/src/main/java/mage/abilities/keyword/ConspireAbility.java index ce90e57208..c83a5e0511 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ConspireAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ConspireAbility.java @@ -41,7 +41,6 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SharesColorWithSourcePredicate; import mage.filter.predicate.permanent.TappedPredicate; @@ -56,6 +55,9 @@ import java.util.HashSet; import java.util.Iterator; import java.util.Set; import java.util.UUID; +import mage.constants.CardType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; /* * 702.77. Conspire @@ -75,12 +77,13 @@ import java.util.UUID; public class ConspireAbility extends StaticAbility implements OptionalAdditionalSourceCosts { private static final String keywordText = "Conspire"; - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creatures you control that share a color with it"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped creatures you control that share a color with it"); protected static final String CONSPIRE_ACTIVATION_KEY = "ConspireActivation"; static { filter.add(Predicates.not(new TappedPredicate())); filter.add(new SharesColorWithSourcePredicate()); + filter.add(new CardTypePredicate(CardType.CREATURE)); } public enum ConspireTargets { @@ -166,7 +169,7 @@ public class ConspireAbility extends StaticAbility implements OptionalAdditional if (conspireCost.canPay(ability, getSourceId(), getControllerId(), game) && player.chooseUse(Outcome.Benefit, "Pay " + conspireCost.getText(false) + " ?", ability, game)) { activateConspire(ability, game); - for (Iterator it = conspireCost.iterator(); it.hasNext(); ) { + for (Iterator it = conspireCost.iterator(); it.hasNext();) { Cost cost = (Cost) it.next(); ability.getCosts().add(cost.copy()); } diff --git a/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java b/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java index f24a1a8817..42144532db 100644 --- a/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java @@ -31,6 +31,7 @@ import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.costs.Cost; import mage.abilities.costs.CostsImpl; +import mage.abilities.costs.OrCost; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; @@ -70,9 +71,11 @@ public class CumulativeUpkeepAbility extends BeginningOfUpkeepTriggeredAbility { @Override public String getRule() { - StringBuilder sb = new StringBuilder("Cumulative upkeep "); - if (!(cumulativeCost instanceof ManaCost)) { - sb.append("— "); + StringBuilder sb = new StringBuilder("Cumulative upkeep"); + if (!(cumulativeCost instanceof ManaCost || cumulativeCost instanceof OrCost)) { + sb.append("—"); + } else { + sb.append(' '); } sb.append(cumulativeCost.getText()); return sb.toString(); diff --git a/Mage/src/main/java/mage/abilities/keyword/DashAbility.java b/Mage/src/main/java/mage/abilities/keyword/DashAbility.java index 93a7f9fe42..96d2e45a43 100644 --- a/Mage/src/main/java/mage/abilities/keyword/DashAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/DashAbility.java @@ -78,6 +78,7 @@ public class DashAbility extends StaticAbility implements AlternativeSourceCosts new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.Custom, false), DashedCondition.instance, "", ""); ability.addEffect(new DashAddDelayedTriggeredAbilityEffect()); + ability.setRuleVisible(false); addSubAbility(ability); } diff --git a/Mage/src/main/java/mage/abilities/keyword/DeathtouchAbility.java b/Mage/src/main/java/mage/abilities/keyword/DeathtouchAbility.java index 514a4e3370..b746561a41 100644 --- a/Mage/src/main/java/mage/abilities/keyword/DeathtouchAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/DeathtouchAbility.java @@ -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.abilities.keyword; import mage.constants.Zone; @@ -40,7 +39,7 @@ import java.io.ObjectStreamException; */ public class DeathtouchAbility extends StaticAbility implements MageSingleton { - private static final DeathtouchAbility instance = new DeathtouchAbility(); + private static final DeathtouchAbility instance = new DeathtouchAbility(); private Object readResolve() throws ObjectStreamException { return instance; @@ -56,7 +55,7 @@ public class DeathtouchAbility extends StaticAbility implements MageSingleton { @Override public String getRule() { - return "Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.)"; + return "deathtouch"; } @Override @@ -64,6 +63,4 @@ public class DeathtouchAbility extends StaticAbility implements MageSingleton { return instance; } - - } diff --git a/Mage/src/main/java/mage/abilities/keyword/EmbalmAbility.java b/Mage/src/main/java/mage/abilities/keyword/EmbalmAbility.java index 2e54362a8d..8d082c8076 100644 --- a/Mage/src/main/java/mage/abilities/keyword/EmbalmAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/EmbalmAbility.java @@ -105,23 +105,24 @@ class EmbalmEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Card card = game.getCard(source.getSourceId()); - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null && card != null) { - EmptyToken token = new EmptyToken(); - CardUtil.copyTo(token).from(card); // needed so that entersBattlefied triggered abilities see the attributes (e.g. Master Biomancer) - token.getColor(game).setColor(ObjectColor.WHITE); - if (!token.getSubtype(game).contains(SubType.ZOMBIE)) { - token.getSubtype(game).add(0, SubType.ZOMBIE); - } - token.getManaCost().clear(); - game.fireEvent(GameEvent.getEvent(GameEvent.EventType.EMBALMED_CREATURE, token.getId(), source.getSourceId(), controller.getId())); - token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId(), false, false, null); - // Probably it makes sense to remove also the Embalm ability (it's not shown on the token cards). - // Also it can never get active or? But it's not mentioned in the reminder text. - return true; + if (card == null) { + return false; } - - return false; + Player controller = game.getPlayer(card.getOwnerId()); + if (controller == null) { + return false; + } + EmptyToken token = new EmptyToken(); + CardUtil.copyTo(token).from(card); // needed so that entersBattlefied triggered abilities see the attributes (e.g. Master Biomancer) + token.getColor(game).setColor(ObjectColor.WHITE); + if (!token.hasSubtype(SubType.ZOMBIE, game)) { + token.getSubtype(game).add(0, SubType.ZOMBIE); + } + token.getManaCost().clear(); + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.EMBALMED_CREATURE, token.getId(), source.getSourceId(), controller.getId())); + token.putOntoBattlefield(1, game, source.getSourceId(), controller.getId(), false, false, null); + // Probably it makes sense to remove also the Embalm ability (it's not shown on the token cards). + // Also it can never get active or? But it's not mentioned in the reminder text. + return true; } - } diff --git a/Mage/src/main/java/mage/abilities/keyword/EternalizeAbility.java b/Mage/src/main/java/mage/abilities/keyword/EternalizeAbility.java index 10260b59d6..c25c06d639 100644 --- a/Mage/src/main/java/mage/abilities/keyword/EternalizeAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/EternalizeAbility.java @@ -59,11 +59,11 @@ public class EternalizeAbility extends ActivatedAbilityImpl { this.timing = TimingRule.SORCERY; setRule(cost, card); } - + public EternalizeAbility(Cost cost, Card card, String rule) { this(cost, card); this.rule = rule; - } + } public EternalizeAbility(final EternalizeAbility ability) { super(ability); @@ -110,25 +110,27 @@ class EternalizeEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Card card = game.getCard(source.getSourceId()); - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null && card != null) { - EmptyToken token = new EmptyToken(); - CardUtil.copyTo(token).from(card); // needed so that entersBattlefied triggered abilities see the attributes (e.g. Master Biomancer) - token.getColor(game).setColor(ObjectColor.BLACK); - if (!token.getSubtype(game).contains(SubType.ZOMBIE)) { - token.getSubtype(game).add(0, SubType.ZOMBIE); - } - token.getManaCost().clear(); - token.getPower().modifyBaseValue(4); - token.getToughness().modifyBaseValue(4); - game.fireEvent(GameEvent.getEvent(GameEvent.EventType.ETERNALIZED_CREATURE, token.getId(), source.getSourceId(), controller.getId())); - token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId(), false, false, null); - // Probably it makes sense to remove also the Eternalize ability (it's not shown on the token cards). - // Also it can never get active or? But it's not mentioned in the reminder text. - return true; + if (card == null) { + return false; } - - return false; + Player controller = game.getPlayer(card.getOwnerId()); + if (controller == null) { + return false; + } + EmptyToken token = new EmptyToken(); + CardUtil.copyTo(token).from(card); // needed so that entersBattlefied triggered abilities see the attributes (e.g. Master Biomancer) + token.getColor(game).setColor(ObjectColor.BLACK); + if (!token.hasSubtype(SubType.ZOMBIE, game)) { + token.getSubtype(game).add(0, SubType.ZOMBIE); + } + token.getManaCost().clear(); + token.removePTCDA(); + token.getPower().modifyBaseValue(4); + token.getToughness().modifyBaseValue(4); + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.ETERNALIZED_CREATURE, token.getId(), source.getSourceId(), controller.getId())); + token.putOntoBattlefield(1, game, source.getSourceId(), controller.getId(), false, false, null); + // Probably it makes sense to remove also the Eternalize ability (it's not shown on the token cards). + // Also it can never get active or? But it's not mentioned in the reminder text. + return true; } - } diff --git a/Mage/src/main/java/mage/abilities/keyword/FearAbility.java b/Mage/src/main/java/mage/abilities/keyword/FearAbility.java index e730552c9d..939b05cfab 100644 --- a/Mage/src/main/java/mage/abilities/keyword/FearAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/FearAbility.java @@ -24,11 +24,9 @@ * 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.abilities.keyword; -import mage.constants.CardType; import mage.constants.Duration; import mage.abilities.Ability; import mage.abilities.EvasionAbility; @@ -45,7 +43,7 @@ import java.io.ObjectStreamException; */ public class FearAbility extends EvasionAbility implements MageSingleton { - private static final FearAbility instance = new FearAbility(); + private static final FearAbility instance = new FearAbility(); private Object readResolve() throws ObjectStreamException { return instance; @@ -61,7 +59,7 @@ public class FearAbility extends EvasionAbility implements MageSingleton { @Override public String getRule() { - return "Fear"; + return "fear"; } @Override @@ -102,4 +100,4 @@ class FearEffect extends RestrictionEffect implements MageSingleton { return new FearEffect(this); } -} \ No newline at end of file +} diff --git a/Mage/src/main/java/mage/abilities/keyword/FlankingAbility.java b/Mage/src/main/java/mage/abilities/keyword/FlankingAbility.java index d8df61ca87..ce887d86e0 100644 --- a/Mage/src/main/java/mage/abilities/keyword/FlankingAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/FlankingAbility.java @@ -1,4 +1,3 @@ - package mage.abilities.keyword; import mage.abilities.TriggeredAbilityImpl; @@ -11,12 +10,9 @@ import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.target.targetpointer.FixedTarget; - /** * @author Plopman */ - - public class FlankingAbility extends TriggeredAbilityImpl { public FlankingAbility() { @@ -37,9 +33,8 @@ public class FlankingAbility extends TriggeredAbilityImpl { if (event.getTargetId().equals(this.getSourceId())) { Permanent permanent = game.getPermanent(event.getSourceId()); if (permanent != null) { - boolean hasFlankingAbility = - permanent.getAbilities().stream().anyMatch(ability -> ability instanceof FlankingAbility); - + boolean hasFlankingAbility + = permanent.getAbilities().stream().anyMatch(ability -> ability instanceof FlankingAbility); if (!hasFlankingAbility) { for (Effect effect : this.getEffects()) { @@ -54,7 +49,7 @@ public class FlankingAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Flanking"; + return "flanking"; } @Override @@ -62,5 +57,4 @@ public class FlankingAbility extends TriggeredAbilityImpl { return new FlankingAbility(this); } - } diff --git a/Mage/src/main/java/mage/abilities/keyword/FlyingAbility.java b/Mage/src/main/java/mage/abilities/keyword/FlyingAbility.java index 86d243c675..1e0bf34cb1 100644 --- a/Mage/src/main/java/mage/abilities/keyword/FlyingAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/FlyingAbility.java @@ -24,8 +24,7 @@ * 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.abilities.keyword; import mage.abilities.Ability; @@ -46,7 +45,7 @@ import java.io.ObjectStreamException; */ public class FlyingAbility extends EvasionAbility implements MageSingleton { - private static final FlyingAbility instance = new FlyingAbility(); + private static final FlyingAbility instance = new FlyingAbility(); private Object readResolve() throws ObjectStreamException { return instance; @@ -62,7 +61,7 @@ public class FlyingAbility extends EvasionAbility implements MageSingleton { @Override public String getRule() { - return "Flying"; + return "flying"; } @Override @@ -91,7 +90,7 @@ class FlyingEffect extends RestrictionEffect implements MageSingleton { public boolean canBeBlocked(Permanent attacker, Permanent blocker, Ability source, Game game) { return blocker.getAbilities().containsKey(FlyingAbility.getInstance().getId()) || blocker.getAbilities().containsKey(ReachAbility.getInstance().getId()) - || (game.getContinuousEffects().asThough(blocker.getId(), AsThoughEffectType.BLOCK_DRAGON, source, blocker.getControllerId(), game) && attacker.hasSubtype(SubType.DRAGON, game)) ; + || (game.getContinuousEffects().asThough(blocker.getId(), AsThoughEffectType.BLOCK_DRAGON, source, blocker.getControllerId(), game) && attacker.hasSubtype(SubType.DRAGON, game)); } @Override diff --git a/Mage/src/main/java/mage/abilities/keyword/IndestructibleAbility.java b/Mage/src/main/java/mage/abilities/keyword/IndestructibleAbility.java index d5a09f1629..70d7008032 100644 --- a/Mage/src/main/java/mage/abilities/keyword/IndestructibleAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/IndestructibleAbility.java @@ -32,15 +32,15 @@ import mage.constants.Zone; import mage.abilities.StaticAbility; /** - * OLD RULES: - * 700.4. If a permanent is indestructible, rules and effects can't destroy it. (See rule 701.6, "Destroy.") - * Such permanents are not destroyed by lethal damage, and they ignore the lethal-damage state-based action - * (see rule 704.5g). Rules or effects may cause an indestructible permanent to be sacrificed, put into a - * graveyard, or exiled. # + * OLD RULES: 700.4. If a permanent is indestructible, rules and effects can't + * destroy it. (See rule 701.6, "Destroy.") Such permanents are not destroyed by + * lethal damage, and they ignore the lethal-damage state-based action (see rule + * 704.5g). Rules or effects may cause an indestructible permanent to be + * sacrificed, put into a graveyard, or exiled. # * - * 700.4a Although the text "[This permanent] is indestructible" is an ability, actually being - * indestructible is neither an ability nor a characteristic. It's just something that's true - * about a permanent. + * 700.4a Although the text "[This permanent] is indestructible" is an ability, + * actually being indestructible is neither an ability nor a characteristic. + * It's just something that's true about a permanent. * * NEW RULES * @@ -48,10 +48,9 @@ import mage.abilities.StaticAbility; * * * - * + * * @author BetaSteward_at_googlemail.com */ - public class IndestructibleAbility extends StaticAbility { private static final IndestructibleAbility instance; @@ -79,7 +78,7 @@ public class IndestructibleAbility extends StaticAbility { @Override public String getRule() { - return "Indestructible"; + return "indestructible"; } } diff --git a/Mage/src/main/java/mage/abilities/keyword/MenaceAbility.java b/Mage/src/main/java/mage/abilities/keyword/MenaceAbility.java index 8735b17d3f..22654b647b 100644 --- a/Mage/src/main/java/mage/abilities/keyword/MenaceAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/MenaceAbility.java @@ -14,7 +14,7 @@ import mage.constants.Zone; * * @author LevelX2 */ -public class MenaceAbility extends StaticAbility { +public class MenaceAbility extends StaticAbility { // Menace may not be a Singleton because the source ability is needed in the continuous effect public MenaceAbility() { super(Zone.BATTLEFIELD, new CantBeBlockedByOneEffect(2)); diff --git a/Mage/src/main/java/mage/abilities/keyword/MorphAbility.java b/Mage/src/main/java/mage/abilities/keyword/MorphAbility.java index 555fb72c33..dfe545198c 100644 --- a/Mage/src/main/java/mage/abilities/keyword/MorphAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/MorphAbility.java @@ -138,7 +138,11 @@ public class MorphAbility extends StaticAbility implements AlternativeSourceCost break; } } - sb.append(morphCosts.getText()).append(' '); + sb.append(morphCosts.getText()); + if (!(morphCosts.get(morphCosts.size() - 1) instanceof ManaCosts)) { + sb.append('.'); + } + sb.append(' '); if (megamorph) { sb.append(REMINDER_TEXT_MEGA); } else { @@ -194,8 +198,7 @@ public class MorphAbility extends StaticAbility implements AlternativeSourceCost @Override public boolean isAvailable(Ability source, Game game) { - return game.isMainPhase() && game.getActivePlayerId().equals(source.getControllerId()) - && (game.getStack().isEmpty() || (game.getStack().size() == 1 && game.getStack().getFirst().getSourceId().equals(source.getSourceId()))); + return true; } @Override diff --git a/Mage/src/main/java/mage/abilities/keyword/MyriadAbility.java b/Mage/src/main/java/mage/abilities/keyword/MyriadAbility.java index d09b69ee59..79f0754e57 100644 --- a/Mage/src/main/java/mage/abilities/keyword/MyriadAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/MyriadAbility.java @@ -35,7 +35,7 @@ import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.game.Game; @@ -102,7 +102,7 @@ class MyriadEffect extends OneShotEffect { Player opponent = game.getPlayer(playerId); if (opponent != null && controller.chooseUse(Outcome.PutCreatureInPlay, "Put a copy of " + sourceObject.getIdName() + " onto battlefield attacking " + opponent.getName() + '?', source, game)) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(controller.getId(), null, false, 1, true, true, playerId); + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(controller.getId(), null, false, 1, true, true, playerId); effect.setTargetPointer(new FixedTarget(sourceObject, game)); effect.apply(game, source); tokens.addAll(effect.getAddedPermanent()); diff --git a/Mage/src/main/java/mage/abilities/keyword/ProtectionAbility.java b/Mage/src/main/java/mage/abilities/keyword/ProtectionAbility.java index 1e8c5adc2b..5f1b480406 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ProtectionAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ProtectionAbility.java @@ -32,7 +32,6 @@ import mage.MageObject; import mage.ObjectColor; import mage.abilities.StaticAbility; import mage.cards.Card; -import mage.constants.CardType; import mage.constants.Zone; import mage.filter.Filter; import mage.filter.FilterCard; diff --git a/Mage/src/main/java/mage/abilities/keyword/RampageAbility.java b/Mage/src/main/java/mage/abilities/keyword/RampageAbility.java index 29fde94fe9..b35919daa5 100644 --- a/Mage/src/main/java/mage/abilities/keyword/RampageAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/RampageAbility.java @@ -46,7 +46,7 @@ public class RampageAbility extends BecomesBlockedTriggeredAbility { public RampageAbility(int amount) { super(null, false); - rule = "rampage " + amount + "(Whenever this creature becomes blocked, it gets +" + rule = "rampage " + amount + " (Whenever this creature becomes blocked, it gets +" + amount + "/+" + amount + " until end of turn for each creature blocking it beyond the first.)"; RampageValue rv = new RampageValue(amount); this.addEffect(new BoostSourceEffect(rv, rv, Duration.EndOfTurn, true)); diff --git a/Mage/src/main/java/mage/abilities/keyword/ReachAbility.java b/Mage/src/main/java/mage/abilities/keyword/ReachAbility.java index 88e97204f6..b871cf0b81 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ReachAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ReachAbility.java @@ -24,8 +24,7 @@ * 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.abilities.keyword; import mage.constants.Zone; @@ -40,7 +39,7 @@ import java.io.ObjectStreamException; */ public class ReachAbility extends StaticAbility implements MageSingleton { - private static final ReachAbility instance = new ReachAbility(); + private static final ReachAbility instance = new ReachAbility(); private Object readResolve() throws ObjectStreamException { return instance; @@ -56,7 +55,7 @@ public class ReachAbility extends StaticAbility implements MageSingleton { @Override public String getRule() { - return "Reach"; + return "reach"; } @Override diff --git a/Mage/src/main/java/mage/abilities/keyword/RippleAbility.java b/Mage/src/main/java/mage/abilities/keyword/RippleAbility.java index dde3a57961..cf70a57336 100644 --- a/Mage/src/main/java/mage/abilities/keyword/RippleAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/RippleAbility.java @@ -56,13 +56,11 @@ public class RippleAbility extends TriggeredAbilityImpl { return new RippleAbility(this); } - @Override public String getRule() { - return "Ripple " + rippleNumber + " (When you cast this spell, you may reveal the top " + CardUtil.numberToText(rippleNumber) + " cards of your library. You may cast any revealed cards with the same name as this spell without paying their mana costs. Put the rest on the bottom of your library.)"; + return "ripple " + rippleNumber + " (When you cast this spell, you may reveal the top " + CardUtil.numberToText(rippleNumber) + " cards of your library. You may cast any revealed cards with the same name as this spell without paying their mana costs. Put the rest on the bottom of your library.)"; } - } class RippleEffect extends OneShotEffect { @@ -84,13 +82,12 @@ class RippleEffect extends OneShotEffect { return new RippleEffect(this); } - @Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); if (player != null) { - if (!player.chooseUse(Outcome.Neutral, "Reveal " + rippleNumber + " cards from the top of your library?", source, game)){ + if (!player.chooseUse(Outcome.Neutral, "Reveal " + rippleNumber + " cards from the top of your library?", source, game)) { return true; //fizzle } // reveal to/**/p cards from library @@ -123,4 +120,3 @@ class RippleEffect extends OneShotEffect { } } - diff --git a/Mage/src/main/java/mage/abilities/keyword/ShadowAbility.java b/Mage/src/main/java/mage/abilities/keyword/ShadowAbility.java index 667e4aa22f..2573570731 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ShadowAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ShadowAbility.java @@ -12,10 +12,12 @@ import mage.game.permanent.Permanent; /** * "Shadow" keyword + * * @author Loki */ public class ShadowAbility extends EvasionAbility implements MageSingleton { - private static final ShadowAbility instance = new ShadowAbility(); + + private static final ShadowAbility instance = new ShadowAbility(); private Object readResolve() throws ObjectStreamException { return instance; @@ -31,7 +33,7 @@ public class ShadowAbility extends EvasionAbility implements MageSingleton { @Override public String getRule() { - return "Shadow (This creature can block or be blocked by only creatures with shadow.)"; + return "shadow (This creature can block or be blocked by only creatures with shadow.)"; } @Override diff --git a/Mage/src/main/java/mage/abilities/keyword/ShroudAbility.java b/Mage/src/main/java/mage/abilities/keyword/ShroudAbility.java index 53e32db450..556f9addb9 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ShroudAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ShroudAbility.java @@ -56,7 +56,7 @@ public class ShroudAbility extends StaticAbility implements MageSingleton { @Override public String getRule() { - return "Shroud"; + return "shroud"; } @Override diff --git a/Mage/src/main/java/mage/abilities/keyword/SpliceOntoArcaneAbility.java b/Mage/src/main/java/mage/abilities/keyword/SpliceOntoArcaneAbility.java index e0d1475826..b21ebe7d89 100644 --- a/Mage/src/main/java/mage/abilities/keyword/SpliceOntoArcaneAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/SpliceOntoArcaneAbility.java @@ -27,7 +27,6 @@ */ package mage.abilities.keyword; -import java.util.Iterator; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.SpellAbility; @@ -38,14 +37,13 @@ import mage.abilities.costs.CostsImpl; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.SpliceCardEffectImpl; import mage.cards.Card; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.SpellAbilityType; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; import mage.game.stack.Spell; import mage.players.Player; +import java.util.Iterator; + /** * 702.45. Splice @@ -182,7 +180,7 @@ class SpliceOntoArcaneEffect extends SpliceCardEffectImpl { @Override public boolean applies(Ability abilityToModify, Ability source, Game game) { MageObject object = game.getObject(abilityToModify.getSourceId()); - if (object != null && object.getSubtype(game).contains("Arcane")) { + if (object != null && object.hasSubtype(SubType.ARCANE, game)) { return spliceSpellCanBeActivated(source, game); } return false; diff --git a/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java b/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java index 3382b061db..0921b18e12 100644 --- a/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java @@ -166,7 +166,7 @@ public class SuspendAbility extends SpecialAction { } StringBuilder sb = new StringBuilder("Suspend "); if (cost != null) { - sb.append(suspend == Integer.MAX_VALUE ? "X" : suspend).append(" - ").append(cost.getText()); + sb.append(suspend == Integer.MAX_VALUE ? "X" : suspend).append(" - ").append(cost.getText()).append(suspend == Integer.MAX_VALUE ? ". X can't be 0" : ""); if (!shortRule) { sb.append(" (Rather than cast this card from your hand, pay ") .append(cost.getText()) diff --git a/Mage/src/main/java/mage/abilities/keyword/VigilanceAbility.java b/Mage/src/main/java/mage/abilities/keyword/VigilanceAbility.java index a4d5f29d5a..13925a8ee3 100644 --- a/Mage/src/main/java/mage/abilities/keyword/VigilanceAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/VigilanceAbility.java @@ -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.abilities.keyword; import mage.constants.Zone; @@ -40,7 +39,7 @@ import java.io.ObjectStreamException; */ public class VigilanceAbility extends StaticAbility implements MageSingleton { - private static final VigilanceAbility instance = new VigilanceAbility(); + private static final VigilanceAbility instance = new VigilanceAbility(); private Object readResolve() throws ObjectStreamException { return instance; @@ -56,7 +55,7 @@ public class VigilanceAbility extends StaticAbility implements MageSingleton { @Override public String getRule() { - return "Vigilance"; + return "vigilance"; } @Override diff --git a/Mage/src/main/java/mage/abilities/keyword/WitherAbility.java b/Mage/src/main/java/mage/abilities/keyword/WitherAbility.java index a88922d345..69381c0a15 100644 --- a/Mage/src/main/java/mage/abilities/keyword/WitherAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/WitherAbility.java @@ -24,8 +24,7 @@ * 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.abilities.keyword; import mage.constants.Zone; @@ -37,19 +36,24 @@ import java.io.ObjectStreamException; /** * 702.77. Wither * - * 702.77a. Wither is a static ability. Damage dealt to a creature by a source with wither isn't marked on that creature. Rather, it causes that many -1/-1 counters to be put on that creature. See rule 119.3. + * 702.77a. Wither is a static ability. Damage dealt to a creature by a source + * with wither isn't marked on that creature. Rather, it causes that many -1/-1 + * counters to be put on that creature. See rule 119.3. * - * 702.77b. If a permanent leaves the battlefield before an effect causes it to deal damage, its last known information is used to determine whether it had wither. + * 702.77b. If a permanent leaves the battlefield before an effect causes it to + * deal damage, its last known information is used to determine whether it had + * wither. * - * 702.77c. The wither rules function no matter what zone an object with wither deals damage from. + * 702.77c. The wither rules function no matter what zone an object with wither + * deals damage from. * - * 702.77d. Multiple instances of wither on the same object are redundant. + * 702.77d. Multiple instances of wither on the same object are redundant. * - * @author nantuko + * @author nantuko */ public class WitherAbility extends StaticAbility implements MageSingleton { - private static final WitherAbility instance = new WitherAbility(); + private static final WitherAbility instance = new WitherAbility(); private Object readResolve() throws ObjectStreamException { return instance; @@ -65,7 +69,7 @@ public class WitherAbility extends StaticAbility implements MageSingleton { @Override public String getRule() { - return "Wither (This deals damage to creatures in the form of -1/-1 counters.)"; + return "wither (This deals damage to creatures in the form of -1/-1 counters.)"; } @Override diff --git a/Mage/src/main/java/mage/abilities/mana/ActivateIfConditionManaAbility.java b/Mage/src/main/java/mage/abilities/mana/ActivateIfConditionManaAbility.java index f12d8e5565..f6c63bc2d4 100644 --- a/Mage/src/main/java/mage/abilities/mana/ActivateIfConditionManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/ActivateIfConditionManaAbility.java @@ -27,7 +27,6 @@ */ package mage.abilities.mana; -import java.util.UUID; import mage.abilities.condition.Condition; import mage.abilities.costs.Cost; import mage.abilities.effects.common.AddConditionalColorlessManaEffect; @@ -37,8 +36,6 @@ import mage.game.Game; public class ActivateIfConditionManaAbility extends ActivatedManaAbilityImpl { - private final Condition condition; - public ActivateIfConditionManaAbility(Zone zone, BasicManaEffect effect, Cost cost, Condition condition) { super(zone, effect, cost); this.netMana.add(effect.getMana()); @@ -53,23 +50,11 @@ public class ActivateIfConditionManaAbility extends ActivatedManaAbilityImpl { public ActivateIfConditionManaAbility(ActivateIfConditionManaAbility ability) { super(ability); - this.condition = ability.condition; - } - - @Override - public boolean canActivate(UUID playerId, Game game) { - if (condition.apply(game, this)) { - return super.canActivate(playerId, game); - } - return false; } @Override public boolean activate(Game game, boolean noMana) { - if (canActivate(this.controllerId, game)) { - return super.activate(game, noMana); - } - return false; + return super.activate(game, noMana); } @Override diff --git a/Mage/src/main/java/mage/abilities/mana/ActivateOncePerTurnManaAbility.java b/Mage/src/main/java/mage/abilities/mana/ActivateOncePerTurnManaAbility.java index 56ec6843b0..dc5f46335a 100644 --- a/Mage/src/main/java/mage/abilities/mana/ActivateOncePerTurnManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/ActivateOncePerTurnManaAbility.java @@ -24,8 +24,7 @@ * 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.abilities.mana; import mage.Mana; @@ -34,9 +33,6 @@ import mage.abilities.effects.common.AddManaOfAnyColorEffect; import mage.abilities.effects.common.BasicManaEffect; import mage.constants.Zone; import mage.game.Game; -import mage.util.CardUtil; - -import java.util.UUID; /** * @@ -44,60 +40,26 @@ import java.util.UUID; */ public class ActivateOncePerTurnManaAbility extends ActivatedManaAbilityImpl { - static class ActivationInfo { - - public int turnNum; - public int activationCounter; - - public ActivationInfo(int turnNum, int activationCounter) { - this.turnNum = turnNum; - this.activationCounter = activationCounter; - } - } - public ActivateOncePerTurnManaAbility(Zone zone, BasicManaEffect effect, Cost cost) { super(zone, effect, cost); this.netMana.add(effect.getMana()); + this.maxActivationsPerTurn = 1; } public ActivateOncePerTurnManaAbility(Zone zone, AddManaOfAnyColorEffect effect, Cost cost) { super(zone, effect, cost); - this.netMana.add(new Mana(0,0,0,0,0,0,effect.getAmount(), 0)); + this.netMana.add(new Mana(0, 0, 0, 0, 0, 0, effect.getAmount(), 0)); + this.maxActivationsPerTurn = 1; } public ActivateOncePerTurnManaAbility(ActivateOncePerTurnManaAbility ability) { super(ability); } - @Override - public boolean canActivate(UUID playerId, Game game) { - if (super.canActivate(playerId, game)) { - ActivationInfo activationInfo = getActivationInfo(game); - if (activationInfo == null || activationInfo.turnNum != game.getTurnNum() || activationInfo.activationCounter < 1) { - return true; - } - } - return false; - } - @Override public boolean activate(Game game, boolean noMana) { if (canActivate(this.controllerId, game)) { - if (super.activate(game, noMana)) { - ActivationInfo activationInfo = getActivationInfo(game); - if (activationInfo == null) { - activationInfo = new ActivationInfo(game.getTurnNum(), 1); - } else { - if (activationInfo.turnNum != game.getTurnNum()) { - activationInfo.turnNum = game.getTurnNum(); - activationInfo.activationCounter = 1; - } else { - activationInfo.activationCounter++; - } - } - setActivationInfo(activationInfo, game); - return true; - } + return super.activate(game, noMana); } return false; } @@ -112,18 +74,4 @@ public class ActivateOncePerTurnManaAbility extends ActivatedManaAbilityImpl { return new ActivateOncePerTurnManaAbility(this); } - private ActivationInfo getActivationInfo(Game game) { - Integer turnNum = (Integer) game.getState().getValue(CardUtil.getCardZoneString("activationsTurn", sourceId, game)); - Integer activationCount = (Integer) game.getState().getValue(CardUtil.getCardZoneString("activationsCount", sourceId, game)); - if (turnNum == null || activationCount == null) { - return null; - } - return new ActivationInfo(turnNum, activationCount); - } - - private void setActivationInfo(ActivationInfo activationInfo, Game game) { - game.getState().setValue(CardUtil.getCardZoneString("activationsTurn", sourceId, game), activationInfo.turnNum); - game.getState().setValue(CardUtil.getCardZoneString("activationsCount", sourceId, game), activationInfo.activationCounter); - } - } diff --git a/Mage/src/main/java/mage/abilities/mana/ActivatedManaAbilityImpl.java b/Mage/src/main/java/mage/abilities/mana/ActivatedManaAbilityImpl.java index fef2dd0eb6..61da85343a 100644 --- a/Mage/src/main/java/mage/abilities/mana/ActivatedManaAbilityImpl.java +++ b/Mage/src/main/java/mage/abilities/mana/ActivatedManaAbilityImpl.java @@ -69,10 +69,13 @@ public abstract class ActivatedManaAbilityImpl extends ActivatedAbilityImpl impl @Override public boolean canActivate(UUID playerId, Game game) { + if (!super.hasMoreActivationsThisTurn(game) || !(condition == null || condition.apply(game, this))) { + return false; + } if (!controlsAbility(playerId, game)) { return false; } - if (timing == TimingRule.SORCERY + if (timing == TimingRule.SORCERY && !game.canPlaySorcery(playerId) && !game.getContinuousEffects().asThough(sourceId, AsThoughEffectType.ACTIVATE_AS_INSTANT, this, controllerId, game)) { return false; diff --git a/Mage/src/main/java/mage/abilities/text/TextPart.java b/Mage/src/main/java/mage/abilities/text/TextPart.java new file mode 100644 index 0000000000..03778cb53e --- /dev/null +++ b/Mage/src/main/java/mage/abilities/text/TextPart.java @@ -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.abilities.text; + +import java.io.Serializable; +import java.util.UUID; +import mage.util.Copyable; + +/** + * + * @author LevelX2 + * @param + */ +public interface TextPart extends Serializable, Copyable { + + UUID getId(); + + String getText(); + + E getBaseValue(); + + E getCurrentValue(); + + void replaceWith(E o); + + void reset(); +} diff --git a/Mage/src/main/java/mage/abilities/text/TextPartColor.java b/Mage/src/main/java/mage/abilities/text/TextPartColor.java new file mode 100644 index 0000000000..280ad78e02 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/text/TextPartColor.java @@ -0,0 +1,90 @@ +/* + * 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.abilities.text; + +import mage.ObjectColor; + +/** + * + * This implementation is not finished yet. There is no support to also change + * the rules text of an object. + * + * @author LevelX2 + */ +public class TextPartColor extends TextPartImpl { + + private final ObjectColor objectColorBase; + private ObjectColor objectColorCurrent; + + public TextPartColor(ObjectColor objectColor) { + this.objectColorBase = objectColor; + this.objectColorCurrent = objectColor; + } + + public TextPartColor(final TextPartColor textPartColor) { + super(); + this.objectColorBase = textPartColor.objectColorBase; + this.objectColorCurrent = textPartColor.objectColorCurrent; + } + + @Override + public String getText() { + return objectColorCurrent.getDescription(); + } + + @Override + public ObjectColor getCurrentValue() { + return objectColorCurrent; + } + + @Override + public ObjectColor getBaseValue() { + return objectColorBase; + } + + @Override + public void replaceWith(ObjectColor objectColor) { + this.objectColorCurrent = objectColor; + } + + @Override + public void reset() { + this.objectColorCurrent = this.objectColorBase; + } + + @Override + public TextPartColor copy() { + return new TextPartColor(this); + } + + @Override + public String toString() { + return objectColorCurrent.toString(); + } + +} diff --git a/Mage/src/main/java/mage/abilities/text/TextPartImpl.java b/Mage/src/main/java/mage/abilities/text/TextPartImpl.java new file mode 100644 index 0000000000..abc79ebfb9 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/text/TextPartImpl.java @@ -0,0 +1,32 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.abilities.text; + +import java.util.UUID; + +/** + * + * @author LevelX2 + * @param + */ +public abstract class TextPartImpl implements TextPart { + + private final UUID id; + + public TextPartImpl() { + this.id = UUID.randomUUID(); + } + + public TextPartImpl(final TextPartImpl textPartimpl) { + this.id = textPartimpl.id; + } + + @Override + public UUID getId() { + return id; + } + +} diff --git a/Mage/src/main/java/mage/abilities/text/TextPartSubType.java b/Mage/src/main/java/mage/abilities/text/TextPartSubType.java new file mode 100644 index 0000000000..ae067fbe06 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/text/TextPartSubType.java @@ -0,0 +1,90 @@ +/* + * 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.abilities.text; + +import mage.constants.SubType; + +/** + * This implementation is not finished yet. There is no support to also change + * the rules text of an object. Also all the cards that user subtypes in the + * text have to be updated with the new elements. + * + * @author LevelX2 + */ +public class TextPartSubType extends TextPartImpl { + + private final SubType subTypeBase; + private SubType subTypeCurrent; + + public TextPartSubType(SubType subType) { + this.subTypeBase = subType; + this.subTypeCurrent = subType; + } + + public TextPartSubType(final TextPartSubType textPartSubType) { + super(); + this.subTypeBase = textPartSubType.subTypeBase; + this.subTypeCurrent = textPartSubType.subTypeCurrent; + } + + @Override + public String getText() { + return subTypeCurrent.getDescription(); + } + + @Override + public SubType getCurrentValue() { + return subTypeCurrent; + } + + @Override + public SubType getBaseValue() { + return subTypeBase; + } + + @Override + public void replaceWith(SubType subType) { + this.subTypeCurrent = subType; + } + + @Override + public void reset() { + this.subTypeCurrent = this.subTypeBase; + } + + @Override + public TextPartSubType copy() { + return new TextPartSubType(this); + } + + @Override + public String toString() { + return subTypeCurrent.toString(); + } + +} diff --git a/Mage/src/main/java/mage/cards/CardImpl.java b/Mage/src/main/java/mage/cards/CardImpl.java index b791473878..0e045b2153 100644 --- a/Mage/src/main/java/mage/cards/CardImpl.java +++ b/Mage/src/main/java/mage/cards/CardImpl.java @@ -27,33 +27,47 @@ */ package mage.cards; +import java.lang.reflect.Constructor; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; import mage.MageObject; import mage.MageObjectImpl; import mage.Mana; import mage.ObjectColor; import mage.abilities.*; +import mage.abilities.effects.common.NameACardEffect; import mage.abilities.mana.ActivatedManaAbilityImpl; import mage.cards.repository.PluginClassloaderRegistery; import mage.constants.*; import mage.counters.Counter; +import mage.counters.CounterType; import mage.counters.Counters; +import mage.filter.FilterCard; +import mage.filter.FilterPermanent; +import mage.filter.FilterSpell; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.*; import mage.game.events.GameEvent; import mage.game.events.ZoneChangeEvent; import mage.game.permanent.Permanent; import mage.game.stack.Spell; import mage.game.stack.StackObject; +import mage.target.TargetCard; +import mage.target.TargetPermanent; +import mage.target.TargetSpell; +import mage.target.common.TargetCardInOpponentsGraveyard; +import mage.target.common.TargetCreaturePermanent; import mage.util.GameLog; import mage.util.SubTypeList; import mage.watchers.Watcher; import org.apache.log4j.Logger; -import java.lang.reflect.Constructor; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - public abstract class CardImpl extends MageObjectImpl implements Card { private static final long serialVersionUID = 1L; @@ -318,6 +332,94 @@ public abstract class CardImpl extends MageObjectImpl implements Card { return spellAbility; } +// @Override +// public void adjustCosts(Ability ability, Game game) { +// } + @Override + public void adjustTargets(Ability ability, Game game) { + int xValue; + TargetPermanent oldTargetPermanent; + FilterPermanent permanentFilter; + int minTargets; + int maxTargets; + switch (ability.getTargetAdjustment()) { + case NONE: + break; + case X_CMC_EQUAL_PERM: + xValue = ability.getManaCostsToPay().getX(); + oldTargetPermanent = (TargetPermanent) ability.getTargets().get(0); + minTargets = oldTargetPermanent.getMinNumberOfTargets(); + maxTargets = oldTargetPermanent.getMaxNumberOfTargets(); + permanentFilter = oldTargetPermanent.getFilter().copy(); + permanentFilter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, xValue)); + ability.getTargets().clear(); + ability.getTargets().add(new TargetPermanent(minTargets, maxTargets, permanentFilter, false)); + break; + case X_TARGETS: + xValue = ability.getManaCostsToPay().getX(); + permanentFilter = ((TargetPermanent) ability.getTargets().get(0)).getFilter(); + ability.getTargets().clear(); + ability.addTarget(new TargetPermanent(xValue, permanentFilter)); + break; + case X_POWER_LEQ:// Minamo Sightbender only + xValue = ability.getManaCostsToPay().getX(); + oldTargetPermanent = (TargetPermanent) ability.getTargets().get(0); + minTargets = oldTargetPermanent.getMinNumberOfTargets(); + maxTargets = oldTargetPermanent.getMaxNumberOfTargets(); + permanentFilter = oldTargetPermanent.getFilter().copy(); + permanentFilter.add(new PowerPredicate(ComparisonType.FEWER_THAN, xValue + 1)); + ability.getTargets().clear(); + ability.getTargets().add(new TargetPermanent(minTargets, maxTargets, permanentFilter, false)); + break; + case VERSE_COUNTER_TARGETS: + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(ability.getSourceId()); + if (sourcePermanent != null) { + xValue = sourcePermanent.getCounters(game).getCount(CounterType.VERSE); + permanentFilter = ((TargetPermanent) ability.getTargets().get(0)).getFilter(); + ability.getTargets().clear(); + ability.addTarget(new TargetPermanent(0, xValue, permanentFilter, false)); + } + break; + case X_CMC_EQUAL_GY_CARD: //Geth, Lord of the Vault only + xValue = ability.getManaCostsToPay().getX(); + TargetCard oldTarget = (TargetCard) ability.getTargets().get(0); + FilterCard filterCard = oldTarget.getFilter().copy(); + filterCard.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, xValue)); + ability.getTargets().clear(); + ability.getTargets().add(new TargetCardInOpponentsGraveyard(filterCard)); + break; + case CHOSEN_NAME: //Declaration of Naught only + ability.getTargets().clear(); + FilterSpell filterSpell = new FilterSpell("spell with the chosen name"); + filterSpell.add(new NamePredicate((String) game.getState().getValue(ability.getSourceId().toString() + NameACardEffect.INFO_KEY))); + TargetSpell target = new TargetSpell(1, filterSpell); + ability.addTarget(target); + break; + case CHOSEN_COLOR: //Pentarch Paladin only + ObjectColor chosenColor = (ObjectColor) game.getState().getValue(ability.getSourceId() + "_color"); + ability.getTargets().clear(); + FilterPermanent filter = new FilterPermanent("permanent of the chosen color."); + if (chosenColor != null) { + filter.add(new ColorPredicate(chosenColor)); + } else { + filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, -5));// Pretty sure this is always false + } + oldTargetPermanent = new TargetPermanent(filter); + ability.addTarget(oldTargetPermanent); + break; + case TREASURE_COUNTER_POWER: //Legacy's Allure only + sourcePermanent = game.getPermanentOrLKIBattlefield(ability.getSourceId()); + if (sourcePermanent != null) { + xValue = sourcePermanent.getCounters(game).getCount(CounterType.TREASURE); + FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creature with power less than or equal to the number of treasure counters on {this}"); + filter2.add(new PowerPredicate(ComparisonType.FEWER_THAN, xValue + 1)); + ability.getTargets().clear(); + ability.getTargets().add(new TargetCreaturePermanent(filter2)); + } + break; + } + } + @Override public void setOwnerId(UUID ownerId) { this.ownerId = ownerId; @@ -669,7 +771,9 @@ public abstract class CardImpl extends MageObjectImpl implements Card { @Override public void removeCounters(Counter counter, Game game) { - removeCounters(counter.getName(), counter.getCount(), game); + if (counter != null) { + removeCounters(counter.getName(), counter.getCount(), game); + } } @Override diff --git a/Mage/src/main/java/mage/cards/SplitCard.java b/Mage/src/main/java/mage/cards/SplitCard.java index 9e57f04b9f..58fd8e0a08 100644 --- a/Mage/src/main/java/mage/cards/SplitCard.java +++ b/Mage/src/main/java/mage/cards/SplitCard.java @@ -119,6 +119,8 @@ public abstract class SplitCard extends CardImpl { case SPLIT_RIGHT: return this.getRightHalfCard().cast(game, fromZone, ability, controllerId); default: + this.getLeftHalfCard().getSpellAbility().setControllerId(controllerId); + this.getRightHalfCard().getSpellAbility().setControllerId(controllerId); return super.cast(game, fromZone, ability, controllerId); } } diff --git a/Mage/src/main/java/mage/cards/basiclands/BasicLand.java b/Mage/src/main/java/mage/cards/basiclands/BasicLand.java index b4b76bac54..567f24dd9d 100644 --- a/Mage/src/main/java/mage/cards/basiclands/BasicLand.java +++ b/Mage/src/main/java/mage/cards/basiclands/BasicLand.java @@ -24,8 +24,7 @@ * 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.cards.basiclands; import java.util.UUID; @@ -34,6 +33,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.abilities.mana.ActivatedManaAbilityImpl; import mage.cards.CardImpl; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -44,7 +44,7 @@ public abstract class BasicLand extends CardImpl { public BasicLand(UUID ownerId, CardSetInfo setInfo, ActivatedManaAbilityImpl mana) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); addSuperType(SuperType.BASIC); - this.subtype.add(name); + this.subtype.add(SubType.byDescription(name)); this.addAbility(mana); } diff --git a/Mage/src/main/java/mage/cards/repository/CardRepository.java b/Mage/src/main/java/mage/cards/repository/CardRepository.java index 7889341d5a..91530a64df 100644 --- a/Mage/src/main/java/mage/cards/repository/CardRepository.java +++ b/Mage/src/main/java/mage/cards/repository/CardRepository.java @@ -58,7 +58,7 @@ public enum CardRepository { // raise this if db structure was changed private static final long CARD_DB_VERSION = 51; // raise this if new cards were added to the server - private static final long CARD_CONTENT_VERSION = 89; + private static final long CARD_CONTENT_VERSION = 94; private Dao cardDao; private Set classNames; diff --git a/Mage/src/main/java/mage/choices/ChoiceColorOrArtifact.java b/Mage/src/main/java/mage/choices/ChoiceColorOrArtifact.java index 5cef5dd467..eb4f52699d 100644 --- a/Mage/src/main/java/mage/choices/ChoiceColorOrArtifact.java +++ b/Mage/src/main/java/mage/choices/ChoiceColorOrArtifact.java @@ -1,6 +1,7 @@ package mage.choices; public class ChoiceColorOrArtifact extends ChoiceColor { + public ChoiceColorOrArtifact() { this.choices.add("Artifacts"); this.message = "Choose protection from"; @@ -16,6 +17,6 @@ public class ChoiceColorOrArtifact extends ChoiceColor { } public boolean isArtifactSelected() { - return choice.equals("Artifacts"); + return "Artifacts".equals(choice); } } diff --git a/Mage/src/main/java/mage/constants/AbilityWord.java b/Mage/src/main/java/mage/constants/AbilityWord.java index 892091a644..ef215e87a0 100644 --- a/Mage/src/main/java/mage/constants/AbilityWord.java +++ b/Mage/src/main/java/mage/constants/AbilityWord.java @@ -43,6 +43,7 @@ public enum AbilityWord { DELIRIUM("Delirium"), DOMAIN("Domain"), EMINENCE("Eminence"), + ENRAGE("Enrage"), FATEFUL_HOUR("Fateful hour"), FEROCIOUS("Ferocious"), FORMIDABLE("Formidable"), diff --git a/Mage/src/main/java/mage/constants/SubType.java b/Mage/src/main/java/mage/constants/SubType.java index 1bb17a3a62..755d1ea658 100644 --- a/Mage/src/main/java/mage/constants/SubType.java +++ b/Mage/src/main/java/mage/constants/SubType.java @@ -1,394 +1,408 @@ package mage.constants; -import mage.util.SubTypeList; - import java.util.Arrays; import java.util.EnumSet; import java.util.Set; import java.util.stream.Collectors; +import mage.util.SubTypeList; public enum SubType { //205.3k Instants and sorceries share their lists of subtypes; these subtypes are called spell types. - ARCANE("Arcane", SubTypeSet.SpellType, false), - TRAP("Trap", SubTypeSet.SpellType, false), + ARCANE("Arcane", SubTypeSet.SpellType), + TRAP("Trap", SubTypeSet.SpellType), // 205.3i: Lands have their own unique set of subtypes; these subtypes are called land types. // Of that list, Forest, Island, Mountain, Plains, and Swamp are the basic land types. - FOREST("Forest", SubTypeSet.BasicLandType, false), - ISLAND("Island", SubTypeSet.BasicLandType, false), - MOUNTAIN("Mountain", SubTypeSet.BasicLandType, false), - PLAINS("Plains", SubTypeSet.BasicLandType, false), - SWAMP("Swamp", SubTypeSet.BasicLandType, false), - DESERT("Desert", SubTypeSet.NonBasicLandType, false), - GATE("Gate", SubTypeSet.NonBasicLandType, false), - LAIR("Lair", SubTypeSet.NonBasicLandType, false), - LOCUS("Locus", SubTypeSet.NonBasicLandType, false), - URZAS("Urza's", SubTypeSet.NonBasicLandType, false), - MINE("Mine", SubTypeSet.NonBasicLandType, false), - POWER_PLANT("Power-Plant", SubTypeSet.NonBasicLandType, false), - TOWER("Tower", SubTypeSet.NonBasicLandType, false), + FOREST("Forest", SubTypeSet.BasicLandType), + ISLAND("Island", SubTypeSet.BasicLandType), + MOUNTAIN("Mountain", SubTypeSet.BasicLandType), + PLAINS("Plains", SubTypeSet.BasicLandType), + SWAMP("Swamp", SubTypeSet.BasicLandType), + DESERT("Desert", SubTypeSet.NonBasicLandType), + GATE("Gate", SubTypeSet.NonBasicLandType), + LAIR("Lair", SubTypeSet.NonBasicLandType), + LOCUS("Locus", SubTypeSet.NonBasicLandType), + URZAS("Urza's", SubTypeSet.NonBasicLandType), + MINE("Mine", SubTypeSet.NonBasicLandType), + POWER_PLANT("Power-Plant", SubTypeSet.NonBasicLandType), + TOWER("Tower", SubTypeSet.NonBasicLandType), // 205.3h Enchantments have their own unique set of subtypes; these subtypes are called enchantment types. - AURA("Aura", SubTypeSet.EnchantmentType, false), - CARTOUCHE("Cartouche", SubTypeSet.EnchantmentType, false), - CURSE("Curse", SubTypeSet.EnchantmentType, false), - SHRINE("Shrine", SubTypeSet.EnchantmentType, false), + AURA("Aura", SubTypeSet.EnchantmentType), + CARTOUCHE("Cartouche", SubTypeSet.EnchantmentType), + CURSE("Curse", SubTypeSet.EnchantmentType), + SHRINE("Shrine", SubTypeSet.EnchantmentType), // 205.3g: Artifacts have their own unique set of subtypes; these subtypes are called artifact types. - CLUE("Clue", SubTypeSet.ArtifactType, false), - CONTRAPTION("Contraption", SubTypeSet.ArtifactType, false), - EQUIPMENT("Equipment", SubTypeSet.ArtifactType, false), - FORTIFICATION("Fortification", SubTypeSet.ArtifactType, false), - VEHICLE("Vehicle", SubTypeSet.ArtifactType, false), + CLUE("Clue", SubTypeSet.ArtifactType), + CONTRAPTION("Contraption", SubTypeSet.ArtifactType), + EQUIPMENT("Equipment", SubTypeSet.ArtifactType), + FORTIFICATION("Fortification", SubTypeSet.ArtifactType), + TREASURE("Treasure", SubTypeSet.ArtifactType), + VEHICLE("Vehicle", SubTypeSet.ArtifactType), // 205.3m : Creatures and tribals share their lists of subtypes; these subtypes are called creature types. // A - ADVISOR("Advisor", SubTypeSet.CreatureType, false), - AETHERBORN("Aetherborn", SubTypeSet.CreatureType, false), - ALLY("Ally", SubTypeSet.CreatureType, false), - ANGEL("Angel", SubTypeSet.CreatureType, false), - ANTELOPE("Antelope", SubTypeSet.CreatureType, false), + ADVISOR("Advisor", SubTypeSet.CreatureType), + AETHERBORN("Aetherborn", SubTypeSet.CreatureType), + ALLY("Ally", SubTypeSet.CreatureType), + ANGEL("Angel", SubTypeSet.CreatureType), + ANTELOPE("Antelope", SubTypeSet.CreatureType), AQUALISH("Aqualish", SubTypeSet.CreatureType, true), // Star Wars - APE("Ape", SubTypeSet.CreatureType, false), + APE("Ape", SubTypeSet.CreatureType), ARCONA("Arcona", SubTypeSet.CreatureType, true), - ARCHER("Archer", SubTypeSet.CreatureType, false), - ARCHON("Archon", SubTypeSet.CreatureType, false), - ARTIFICER("Artificer", SubTypeSet.CreatureType, false), + ARCHER("Archer", SubTypeSet.CreatureType), + ARCHON("Archon", SubTypeSet.CreatureType), + ARTIFICER("Artificer", SubTypeSet.CreatureType), ARTIFICIER("Artificier", SubTypeSet.CreatureType, true), - ASSASSIN("Assassin", SubTypeSet.CreatureType, false), - ASSEMBLY_WORKER("Assembly-Worker", SubTypeSet.CreatureType, false), - ATOG("Atog", SubTypeSet.CreatureType, false), + ASSASSIN("Assassin", SubTypeSet.CreatureType), + ASSEMBLY_WORKER("Assembly-Worker", SubTypeSet.CreatureType), + ATOG("Atog", SubTypeSet.CreatureType), ATAT("AT-AT", SubTypeSet.CreatureType, true), - AUROCHS("Aurochs", SubTypeSet.CreatureType, false), + AUROCHS("Aurochs", SubTypeSet.CreatureType), AUTOBOT("Autobot", SubTypeSet.CreatureType, true), // H17, Grimlock - AVATAR("Avatar", SubTypeSet.CreatureType, false), + AVATAR("Avatar", SubTypeSet.CreatureType), // B - BADGER("Badger", SubTypeSet.CreatureType, false), - BARBARIAN("Barbarian", SubTypeSet.CreatureType, false), - BASILISK("Basilisk", SubTypeSet.CreatureType, false), - BAT("Bat", SubTypeSet.CreatureType, false), - BEAR("Bear", SubTypeSet.CreatureType, false), - BEAST("Beast", SubTypeSet.CreatureType, false), - BEEBLE("Beeble", SubTypeSet.CreatureType, false), - BERSERKER("Berserker", SubTypeSet.CreatureType, false), - BIRD("Bird", SubTypeSet.CreatureType, false), + BADGER("Badger", SubTypeSet.CreatureType), + BARBARIAN("Barbarian", SubTypeSet.CreatureType), + BASILISK("Basilisk", SubTypeSet.CreatureType), + BAT("Bat", SubTypeSet.CreatureType), + BEAR("Bear", SubTypeSet.CreatureType), + BEAST("Beast", SubTypeSet.CreatureType), + BEEBLE("Beeble", SubTypeSet.CreatureType), + BERSERKER("Berserker", SubTypeSet.CreatureType), + BIRD("Bird", SubTypeSet.CreatureType), BITH("Bith", SubTypeSet.CreatureType, true), // Star Wars - BLINKMOTH("Blinkmoth", SubTypeSet.CreatureType, false), - BOAR("Boar", SubTypeSet.CreatureType, false), - BRINGER("Bringer", SubTypeSet.CreatureType, false), - BRUSHWAGG("Brushwagg", SubTypeSet.CreatureType, false), + BLINKMOTH("Blinkmoth", SubTypeSet.CreatureType), + BOAR("Boar", SubTypeSet.CreatureType), + BRINGER("Bringer", SubTypeSet.CreatureType), + BRUSHWAGG("Brushwagg", SubTypeSet.CreatureType), // C CALAMARI("Calamari", SubTypeSet.CreatureType, true), // Star Wars - CAMARID("Camarid", SubTypeSet.CreatureType, false), - CAMEL("Camel", SubTypeSet.CreatureType, false), - CARIBOU("Caribou", SubTypeSet.CreatureType, false), - CARRIER("Carrier", SubTypeSet.CreatureType, false), - CAT("Cat", SubTypeSet.CreatureType, false), - CENTAUR("Centaur", SubTypeSet.CreatureType, false), + CAMARID("Camarid", SubTypeSet.CreatureType), + CAMEL("Camel", SubTypeSet.CreatureType), + CARIBOU("Caribou", SubTypeSet.CreatureType), + CARRIER("Carrier", SubTypeSet.CreatureType), + CAT("Cat", SubTypeSet.CreatureType), + CENTAUR("Centaur", SubTypeSet.CreatureType), CEREAN("Cerean", SubTypeSet.CreatureType, true), // Star Wars - CEPHALID("Cephalid", SubTypeSet.CreatureType, false), - CHIMERA("Chimera", SubTypeSet.CreatureType, false), + CEPHALID("Cephalid", SubTypeSet.CreatureType), + CHIMERA("Chimera", SubTypeSet.CreatureType), CHISS("Chiss", SubTypeSet.CreatureType, true), - CITIZEN("Citizen", SubTypeSet.CreatureType, false), - CLERIC("Cleric", SubTypeSet.CreatureType, false), - COCKATRICE("Cockatrice", SubTypeSet.CreatureType, false), - CONSTRUCT("Construct", SubTypeSet.CreatureType, false), - COWARD("Coward", SubTypeSet.CreatureType, false), - CRAB("Crab", SubTypeSet.CreatureType, false), - CROCODILE("Crocodile", SubTypeSet.CreatureType, false), + CITIZEN("Citizen", SubTypeSet.CreatureType), + CLERIC("Cleric", SubTypeSet.CreatureType), + COCKATRICE("Cockatrice", SubTypeSet.CreatureType), + CONSTRUCT("Construct", SubTypeSet.CreatureType), + COWARD("Coward", SubTypeSet.CreatureType), + CRAB("Crab", SubTypeSet.CreatureType), + CROCODILE("Crocodile", SubTypeSet.CreatureType), CYBORG("Cyborg", SubTypeSet.CreatureType, true), // Star Wars - CYCLOPS("Cyclops", SubTypeSet.CreatureType, false), + CYCLOPS("Cyclops", SubTypeSet.CreatureType), // D DATHOMIRIAN("Dathomirian", SubTypeSet.CreatureType, true), // Star Wars - DAUTHI("Dauthi", SubTypeSet.CreatureType, false), - DEMON("Demon", SubTypeSet.CreatureType, false), - DESERTER("Deserter", SubTypeSet.CreatureType, false), - DEVIL("Devil", SubTypeSet.CreatureType, false), - DINOSAUR("Dinosaur", SubTypeSet.CreatureType, true), // only Grimlock right now, until Ixalan - DJINN("Djinn", SubTypeSet.CreatureType, false), - DRAGON("Dragon", SubTypeSet.CreatureType, false), - DRAKE("Drake", SubTypeSet.CreatureType, false), - DREADNOUGHT("Dreadnought", SubTypeSet.CreatureType, false), - DRONE("Drone", SubTypeSet.CreatureType, false), - DRUID("Druid", SubTypeSet.CreatureType, false), + DAUTHI("Dauthi", SubTypeSet.CreatureType), + DEMON("Demon", SubTypeSet.CreatureType), + DESERTER("Deserter", SubTypeSet.CreatureType), + DEVIL("Devil", SubTypeSet.CreatureType), + DINOSAUR("Dinosaur", SubTypeSet.CreatureType), // With Ixalan now being spoiled, need this to be selectable + DJINN("Djinn", SubTypeSet.CreatureType), + DRAGON("Dragon", SubTypeSet.CreatureType), + DRAKE("Drake", SubTypeSet.CreatureType), + DREADNOUGHT("Dreadnought", SubTypeSet.CreatureType), + DRONE("Drone", SubTypeSet.CreatureType), + DRUID("Druid", SubTypeSet.CreatureType), DROID("Droid", SubTypeSet.CreatureType, true), // Star Wars - DRYAD("Dryad", SubTypeSet.CreatureType, false), - DWARF("Dwarf", SubTypeSet.CreatureType, false), + DRYAD("Dryad", SubTypeSet.CreatureType), + DWARF("Dwarf", SubTypeSet.CreatureType), // E - EFREET("Efreet", SubTypeSet.CreatureType, false), - ELDER("Elder", SubTypeSet.CreatureType, false), - ELDRAZI("Eldrazi", SubTypeSet.CreatureType, false), - ELEMENTAL("Elemental", SubTypeSet.CreatureType, false), - ELEPHANT("Elephant", SubTypeSet.CreatureType, false), - ELF("Elf", SubTypeSet.CreatureType, false), - ELK("Elk", SubTypeSet.CreatureType, false), - EYE("Eye", SubTypeSet.CreatureType, false), + EFREET("Efreet", SubTypeSet.CreatureType), + ELDER("Elder", SubTypeSet.CreatureType), + ELDRAZI("Eldrazi", SubTypeSet.CreatureType), + ELEMENTAL("Elemental", SubTypeSet.CreatureType), + ELEPHANT("Elephant", SubTypeSet.CreatureType), + ELF("Elf", SubTypeSet.CreatureType), + ELK("Elk", SubTypeSet.CreatureType), + EYE("Eye", SubTypeSet.CreatureType), EWOK("Ewok", SubTypeSet.CreatureType, true), // Star Wars // F - FAERIE("Faerie", SubTypeSet.CreatureType, false), - FERRET("Ferret", SubTypeSet.CreatureType, false), - FISH("Fish", SubTypeSet.CreatureType, false), - FLAGBEARER("Flagbearer", SubTypeSet.CreatureType, false), - FOX("Fox", SubTypeSet.CreatureType, false), - FROG("Frog", SubTypeSet.CreatureType, false), - FUNGUS("Fungus", SubTypeSet.CreatureType, false), + FAERIE("Faerie", SubTypeSet.CreatureType), + FERRET("Ferret", SubTypeSet.CreatureType), + FISH("Fish", SubTypeSet.CreatureType), + FLAGBEARER("Flagbearer", SubTypeSet.CreatureType), + FOX("Fox", SubTypeSet.CreatureType), + FROG("Frog", SubTypeSet.CreatureType), + FUNGUS("Fungus", SubTypeSet.CreatureType), // G GAMORREAN("Gamorrean", SubTypeSet.CreatureType, true), // Star Wars GAND("Gand", SubTypeSet.CreatureType, true), // Star Wars - GARGOYLE("Gargoyle", SubTypeSet.CreatureType, false), - GERM("Germ", SubTypeSet.CreatureType, false), - GIANT("Giant", SubTypeSet.CreatureType, false), - GNOME("Gnome", SubTypeSet.CreatureType, false), - GOLEM("Golem", SubTypeSet.CreatureType, false), - GOAT("Goat", SubTypeSet.CreatureType, false), - GOBLIN("Goblin", SubTypeSet.CreatureType, false), - GOD("God", SubTypeSet.CreatureType, false), - GORGON("Gorgon", SubTypeSet.CreatureType, false), - GRAVEBORN("Graveborn", SubTypeSet.CreatureType, false), - GREMLIN("Gremlin", SubTypeSet.CreatureType, false), - GRIFFIN("Griffin", SubTypeSet.CreatureType, false), + GARGOYLE("Gargoyle", SubTypeSet.CreatureType), + GERM("Germ", SubTypeSet.CreatureType), + GIANT("Giant", SubTypeSet.CreatureType), + GNOME("Gnome", SubTypeSet.CreatureType), + GOLEM("Golem", SubTypeSet.CreatureType), + GOAT("Goat", SubTypeSet.CreatureType), + GOBLIN("Goblin", SubTypeSet.CreatureType), + GOD("God", SubTypeSet.CreatureType), + GORGON("Gorgon", SubTypeSet.CreatureType), + GRAVEBORN("Graveborn", SubTypeSet.CreatureType), + GREMLIN("Gremlin", SubTypeSet.CreatureType), + GRIFFIN("Griffin", SubTypeSet.CreatureType), GUNGAN("Gungan", SubTypeSet.CreatureType, true), // Star Wars // H - HAG("Hag", SubTypeSet.CreatureType, false), - HARPY("Harpy", SubTypeSet.CreatureType, false), - HELLION("Hellion", SubTypeSet.CreatureType, false), - HIPPO("Hippo", SubTypeSet.CreatureType, false), - HIPPOGRIFF("Hippogriff", SubTypeSet.CreatureType, false), - HOMARID("Homarid", SubTypeSet.CreatureType, false), - HOMUNCULUS("Homunculus", SubTypeSet.CreatureType, false), - HORROR("Horror", SubTypeSet.CreatureType, false), - HORSE("Horse", SubTypeSet.CreatureType, false), - HOUND("Hound", SubTypeSet.CreatureType, false), - HUMAN("Human", SubTypeSet.CreatureType, false), - HUNTER("Hunter", SubTypeSet.CreatureType, false), + HAG("Hag", SubTypeSet.CreatureType), + HARPY("Harpy", SubTypeSet.CreatureType), + HELLION("Hellion", SubTypeSet.CreatureType), + HIPPO("Hippo", SubTypeSet.CreatureType), + HIPPOGRIFF("Hippogriff", SubTypeSet.CreatureType), + HOMARID("Homarid", SubTypeSet.CreatureType), + HOMUNCULUS("Homunculus", SubTypeSet.CreatureType), + HORROR("Horror", SubTypeSet.CreatureType), + HORSE("Horse", SubTypeSet.CreatureType), + HOUND("Hound", SubTypeSet.CreatureType), + HUMAN("Human", SubTypeSet.CreatureType), + HUNTER("Hunter", SubTypeSet.CreatureType), HUTT("Hutt", SubTypeSet.CreatureType, true), // Star Wars - HYDRA("Hydra", SubTypeSet.CreatureType, false), - HYENA("Hyena", SubTypeSet.CreatureType, false), + HYDRA("Hydra", SubTypeSet.CreatureType), + HYENA("Hyena", SubTypeSet.CreatureType), // I - ILLUSION("Illusion", SubTypeSet.CreatureType, false), - IMP("Imp", SubTypeSet.CreatureType, false), - INCARNATION("Incarnation", SubTypeSet.CreatureType, false), - INSECT("Insect", SubTypeSet.CreatureType, false), + ILLUSION("Illusion", SubTypeSet.CreatureType), + IMP("Imp", SubTypeSet.CreatureType), + INCARNATION("Incarnation", SubTypeSet.CreatureType), + INSECT("Insect", SubTypeSet.CreatureType), ITHORIAN("Ithorian", SubTypeSet.CreatureType, true), // Star Wars // J - JACKAL("Jackal", SubTypeSet.CreatureType, false), + JACKAL("Jackal", SubTypeSet.CreatureType), JAWA("Jawa", SubTypeSet.CreatureType, true), JEDI("Jedi", SubTypeSet.CreatureType, true), // Star Wars - JELLYFISH("Jellyfish", SubTypeSet.CreatureType, false), - JUGGERNAUT("Juggernaut", SubTypeSet.CreatureType, false), + JELLYFISH("Jellyfish", SubTypeSet.CreatureType), + JUGGERNAUT("Juggernaut", SubTypeSet.CreatureType), // K KALEESH("Kaleesh", SubTypeSet.CreatureType, true), // Star Wars - KAVU("Kavu", SubTypeSet.CreatureType, false), + KAVU("Kavu", SubTypeSet.CreatureType), KELDOR("KelDor", SubTypeSet.CreatureType, true), - KIRIN("Kirin", SubTypeSet.CreatureType, false), - KITHKIN("Kithkin", SubTypeSet.CreatureType, false), - KNIGHT("Knight", SubTypeSet.CreatureType, false), - KOBOLD("Kobold", SubTypeSet.CreatureType, false), + KIRIN("Kirin", SubTypeSet.CreatureType), + KITHKIN("Kithkin", SubTypeSet.CreatureType), + KNIGHT("Knight", SubTypeSet.CreatureType), + KOBOLD("Kobold", SubTypeSet.CreatureType), KOORIVAR("Koorivar", SubTypeSet.CreatureType, true), - KOR("Kor", SubTypeSet.CreatureType, false), - KRAKEN("Kraken", SubTypeSet.CreatureType, false), + KOR("Kor", SubTypeSet.CreatureType), + KRAKEN("Kraken", SubTypeSet.CreatureType), // L - LAMIA("Lamia", SubTypeSet.CreatureType, false), - LAMMASU("Lammasu", SubTypeSet.CreatureType, false), - LEECH("Leech", SubTypeSet.CreatureType, false), - LEVIATHAN("Leviathan", SubTypeSet.CreatureType, false), - LHURGOYF("Lhurgoyf", SubTypeSet.CreatureType, false), - LICID("Licid", SubTypeSet.CreatureType, false), - LIZARD("Lizard", SubTypeSet.CreatureType, false), + LAMIA("Lamia", SubTypeSet.CreatureType), + LAMMASU("Lammasu", SubTypeSet.CreatureType), + LEECH("Leech", SubTypeSet.CreatureType), + LEVIATHAN("Leviathan", SubTypeSet.CreatureType), + LHURGOYF("Lhurgoyf", SubTypeSet.CreatureType), + LICID("Licid", SubTypeSet.CreatureType), + LIZARD("Lizard", SubTypeSet.CreatureType), // M MANTELLIAN("Mantellian", SubTypeSet.CreatureType, true), // Star Wars - MANTICORE("Manticore", SubTypeSet.CreatureType, false), - MASTICORE("Masticore", SubTypeSet.CreatureType, false), - MERCENARY("Mercenary", SubTypeSet.CreatureType, false), - MERFOLK("Merfolk", SubTypeSet.CreatureType, false), - METATHRAN("Metathran", SubTypeSet.CreatureType, false), - MINION("Minion", SubTypeSet.CreatureType, false), - MINOTAUR("Minotaur", SubTypeSet.CreatureType, false), + MANTICORE("Manticore", SubTypeSet.CreatureType), + MASTICORE("Masticore", SubTypeSet.CreatureType), + MERCENARY("Mercenary", SubTypeSet.CreatureType), + MERFOLK("Merfolk", SubTypeSet.CreatureType), + METATHRAN("Metathran", SubTypeSet.CreatureType), + MINION("Minion", SubTypeSet.CreatureType), + MINOTAUR("Minotaur", SubTypeSet.CreatureType), MIRIALAN("Mirialan", SubTypeSet.CreatureType, true), // Star Wars - MOLE("Mole", SubTypeSet.CreatureType, false), - MONGER("Monger", SubTypeSet.CreatureType, false), - MONGOOSE("Mongoose", SubTypeSet.CreatureType, false), - MONK("Monk", SubTypeSet.CreatureType, false), - MONKEY("Monkey", SubTypeSet.CreatureType, false), - MOONFOLK("Moonfolk", SubTypeSet.CreatureType, false), - MUTANT("Mutant", SubTypeSet.CreatureType, false), - MYR("Myr", SubTypeSet.CreatureType, false), - MYSTIC("Mystic", SubTypeSet.CreatureType, false), + MOLE("Mole", SubTypeSet.CreatureType), + MONGER("Monger", SubTypeSet.CreatureType), + MONGOOSE("Mongoose", SubTypeSet.CreatureType), + MONK("Monk", SubTypeSet.CreatureType), + MONKEY("Monkey", SubTypeSet.CreatureType), + MOONFOLK("Moonfolk", SubTypeSet.CreatureType), + MUTANT("Mutant", SubTypeSet.CreatureType), + MYR("Myr", SubTypeSet.CreatureType), + MYSTIC("Mystic", SubTypeSet.CreatureType), // N - NAGA("Naga", SubTypeSet.CreatureType, false), - NAUTILUS("Nautilus", SubTypeSet.CreatureType, false), + NAGA("Naga", SubTypeSet.CreatureType), + NAUTILUS("Nautilus", SubTypeSet.CreatureType), NAUTOLAN("Nautolan", SubTypeSet.CreatureType, true), // Star Wars NEIMOIDIAN("Neimoidian", SubTypeSet.CreatureType, true), // Star Wars - NEPHILIM("Nephilim", SubTypeSet.CreatureType, false), - NIGHTMARE("Nightmare", SubTypeSet.CreatureType, false), - NIGHTSTALKER("Nightstalker", SubTypeSet.CreatureType, false), - NINJA("Ninja", SubTypeSet.CreatureType, false), - NOGGLE("Noggle", SubTypeSet.CreatureType, false), - NOMAD("Nomad", SubTypeSet.CreatureType, false), - NYMPH("Nymph", SubTypeSet.CreatureType, false), + NEPHILIM("Nephilim", SubTypeSet.CreatureType), + NIGHTMARE("Nightmare", SubTypeSet.CreatureType), + NIGHTSTALKER("Nightstalker", SubTypeSet.CreatureType), + NINJA("Ninja", SubTypeSet.CreatureType), + NOGGLE("Noggle", SubTypeSet.CreatureType), + NOMAD("Nomad", SubTypeSet.CreatureType), + NYMPH("Nymph", SubTypeSet.CreatureType), // O - OCTOPUS("Octopus", SubTypeSet.CreatureType, false), - OGRE("Ogre", SubTypeSet.CreatureType, false), - OOZE("Ooze", SubTypeSet.CreatureType, false), - ORB("Orb", SubTypeSet.CreatureType, false), - ORC("Orc", SubTypeSet.CreatureType, false), - ORGG("Orgg", SubTypeSet.CreatureType, false), + OCTOPUS("Octopus", SubTypeSet.CreatureType), + OGRE("Ogre", SubTypeSet.CreatureType), + OOZE("Ooze", SubTypeSet.CreatureType), + ORB("Orb", SubTypeSet.CreatureType), + ORC("Orc", SubTypeSet.CreatureType), + ORGG("Orgg", SubTypeSet.CreatureType), ORTOLAN("Ortolan", SubTypeSet.CreatureType, true), - OUPHE("Ouphe", SubTypeSet.CreatureType, false), - OX("Ox", SubTypeSet.CreatureType, false), - OYSTER("Oyster", SubTypeSet.CreatureType, false), + OUPHE("Ouphe", SubTypeSet.CreatureType), + OX("Ox", SubTypeSet.CreatureType), + OYSTER("Oyster", SubTypeSet.CreatureType), // P - PEGASUS("Pegasus", SubTypeSet.CreatureType, false), - PENTAVITE("Pentavite", SubTypeSet.CreatureType, false), - PEST("Pest", SubTypeSet.CreatureType, false), - PHELDDAGRIF("Phelddagrif", SubTypeSet.CreatureType, false), - PHOENIX("Phoenix", SubTypeSet.CreatureType, false), - PILOT("Pilot", SubTypeSet.CreatureType, false), - PINCHER("Pincher", SubTypeSet.CreatureType, false), - PIRATE("Pirate", SubTypeSet.CreatureType, false), - PLANT("Plant", SubTypeSet.CreatureType, false), - PRAETOR("Praetor", SubTypeSet.CreatureType, false), - PRISM("Prism", SubTypeSet.CreatureType, false), - PROCESSOR("Processor", SubTypeSet.CreatureType, false), + PEGASUS("Pegasus", SubTypeSet.CreatureType), + PENTAVITE("Pentavite", SubTypeSet.CreatureType), + PEST("Pest", SubTypeSet.CreatureType), + PHELDDAGRIF("Phelddagrif", SubTypeSet.CreatureType), + PHOENIX("Phoenix", SubTypeSet.CreatureType), + PILOT("Pilot", SubTypeSet.CreatureType), + PINCHER("Pincher", SubTypeSet.CreatureType), + PIRATE("Pirate", SubTypeSet.CreatureType), + PLANT("Plant", SubTypeSet.CreatureType), + PRAETOR("Praetor", SubTypeSet.CreatureType), + PRISM("Prism", SubTypeSet.CreatureType), + PROCESSOR("Processor", SubTypeSet.CreatureType), PUREBLOOD("Pureblood", SubTypeSet.CreatureType, true), // Q QUARREN("Quarren", SubTypeSet.CreatureType, true), // Star Wars // R - RABBIT("Rabbit", SubTypeSet.CreatureType, false), - RAT("Rat", SubTypeSet.CreatureType, false), - REBEL("Rebel", SubTypeSet.CreatureType, false), - REFLECTION("Reflection", SubTypeSet.CreatureType, false), - RHINO("Rhino", SubTypeSet.CreatureType, false), - RIGGER("Rigger", SubTypeSet.CreatureType, false), + RABBIT("Rabbit", SubTypeSet.CreatureType), + RAIDER("Raider", SubTypeSet.CreatureType, true), // Star Wars + RAT("Rat", SubTypeSet.CreatureType), + REBEL("Rebel", SubTypeSet.CreatureType), + REFLECTION("Reflection", SubTypeSet.CreatureType), + RHINO("Rhino", SubTypeSet.CreatureType), + RIGGER("Rigger", SubTypeSet.CreatureType), RODIAN("Rodian", SubTypeSet.CreatureType, true), // Star Wars - ROGUE("Rogue", SubTypeSet.CreatureType, false), + ROGUE("Rogue", SubTypeSet.CreatureType), // S - SABLE("Sable", SubTypeSet.CreatureType, false), - SALAMANDER("Salamander", SubTypeSet.CreatureType, false), - SAMURAI("Samurai", SubTypeSet.CreatureType, false), - SAND("Sand", SubTypeSet.CreatureType, false), - SAPROLING("Saproling", SubTypeSet.CreatureType, false), - SATYR("Satyr", SubTypeSet.CreatureType, false), - SCARECROW("Scarecrow", SubTypeSet.CreatureType, false), - SCION("Scion", SubTypeSet.CreatureType, false), - SCORPION("Scorpion", SubTypeSet.CreatureType, false), - SCOUT("Scout", SubTypeSet.CreatureType, false), - SERF("Serf", SubTypeSet.CreatureType, false), - SERPENT("Serpent", SubTypeSet.CreatureType, false), - SERVO("Servo", SubTypeSet.CreatureType, false), - SHADE("Shade", SubTypeSet.CreatureType, false), - SHAMAN("Shaman", SubTypeSet.CreatureType, false), - SHAPESHIFTER("Shapeshifter", SubTypeSet.CreatureType, false), - SHEEP("Sheep", SubTypeSet.CreatureType, false), - SIREN("Siren", SubTypeSet.CreatureType, false), - SITH("Sith", SubTypeSet.CreatureType, false), - SKELETON("Skeleton", SubTypeSet.CreatureType, false), - SLITH("Slith", SubTypeSet.CreatureType, false), - SLIVER("Sliver", SubTypeSet.CreatureType, false), - SLUG("Slug", SubTypeSet.CreatureType, false), - SNAKE("Snake", SubTypeSet.CreatureType, false), - SOLDIER("Soldier", SubTypeSet.CreatureType, false), - SOLTARI("Soltari", SubTypeSet.CreatureType, false), - SPAWN("Spawn", SubTypeSet.CreatureType, false), - SPECTER("Specter", SubTypeSet.CreatureType, false), - SPELLSHAPER("Spellshaper", SubTypeSet.CreatureType, false), - SPHINX("Sphinx", SubTypeSet.CreatureType, false), - SPIDER("Spider", SubTypeSet.CreatureType, false), - SPIKE("Spike", SubTypeSet.CreatureType, false), - SPIRIT("Spirit", SubTypeSet.CreatureType, false), - SPLITTER("Splitter", SubTypeSet.CreatureType, false), - SPONGE("Sponge", SubTypeSet.CreatureType, false), - SQUID("Squid", SubTypeSet.CreatureType, false), - SQUIRREL("Squirrel", SubTypeSet.CreatureType, false), - STARFISH("Starfish", SubTypeSet.CreatureType, false), + SABLE("Sable", SubTypeSet.CreatureType), + SALAMANDER("Salamander", SubTypeSet.CreatureType), + SAMURAI("Samurai", SubTypeSet.CreatureType), + SAND("Sand", SubTypeSet.CreatureType), + SAPROLING("Saproling", SubTypeSet.CreatureType), + SATYR("Satyr", SubTypeSet.CreatureType), + SCARECROW("Scarecrow", SubTypeSet.CreatureType), + SCION("Scion", SubTypeSet.CreatureType), + SCORPION("Scorpion", SubTypeSet.CreatureType), + SCOUT("Scout", SubTypeSet.CreatureType), + SERF("Serf", SubTypeSet.CreatureType), + SERPENT("Serpent", SubTypeSet.CreatureType), + SERVO("Servo", SubTypeSet.CreatureType), + SHADE("Shade", SubTypeSet.CreatureType), + SHAMAN("Shaman", SubTypeSet.CreatureType), + SHAPESHIFTER("Shapeshifter", SubTypeSet.CreatureType), + SHEEP("Sheep", SubTypeSet.CreatureType), + SIREN("Siren", SubTypeSet.CreatureType), + SITH("Sith", SubTypeSet.CreatureType), + SKELETON("Skeleton", SubTypeSet.CreatureType), + SLITH("Slith", SubTypeSet.CreatureType), + SLIVER("Sliver", SubTypeSet.CreatureType), + SLUG("Slug", SubTypeSet.CreatureType), + SNAKE("Snake", SubTypeSet.CreatureType), + SOLDIER("Soldier", SubTypeSet.CreatureType), + SOLTARI("Soltari", SubTypeSet.CreatureType), + SPAWN("Spawn", SubTypeSet.CreatureType), + SPECTER("Specter", SubTypeSet.CreatureType), + SPELLSHAPER("Spellshaper", SubTypeSet.CreatureType), + SPHINX("Sphinx", SubTypeSet.CreatureType), + SPIDER("Spider", SubTypeSet.CreatureType), + SPIKE("Spike", SubTypeSet.CreatureType), + SPIRIT("Spirit", SubTypeSet.CreatureType), + SPLITTER("Splitter", SubTypeSet.CreatureType), + SPONGE("Sponge", SubTypeSet.CreatureType), + SQUID("Squid", SubTypeSet.CreatureType), + SQUIRREL("Squirrel", SubTypeSet.CreatureType), + STARFISH("Starfish", SubTypeSet.CreatureType), STARSHIP("Starship", SubTypeSet.CreatureType, true), // Star Wars SULLUSTAN("Sullustan", SubTypeSet.CreatureType, true), // Star Wars - SURRAKAR("Surrakar", SubTypeSet.CreatureType, false), - SURVIVOR("Survivor", SubTypeSet.CreatureType, false), + SURRAKAR("Surrakar", SubTypeSet.CreatureType), + SURVIVOR("Survivor", SubTypeSet.CreatureType), // T - TETRAVITE("Tetravite", SubTypeSet.CreatureType, false), - THALAKOS("Thalakos", SubTypeSet.CreatureType, false), - THOPTER("Thopter", SubTypeSet.CreatureType, false), + TETRAVITE("Tetravite", SubTypeSet.CreatureType), + THALAKOS("Thalakos", SubTypeSet.CreatureType), + THOPTER("Thopter", SubTypeSet.CreatureType), TRANDOSHAN("Trandoshan", SubTypeSet.CreatureType, true), // Star Wars - THRULL("Thrull", SubTypeSet.CreatureType, false), - TREEFOLK("Treefolk", SubTypeSet.CreatureType, false), - TRISKELAVITE("Triskelavite", SubTypeSet.CreatureType, false), - TROLL("Troll", SubTypeSet.CreatureType, false), - TURTLE("Turtle", SubTypeSet.CreatureType, false), + THRULL("Thrull", SubTypeSet.CreatureType), + TREEFOLK("Treefolk", SubTypeSet.CreatureType), + TRISKELAVITE("Triskelavite", SubTypeSet.CreatureType), + TROLL("Troll", SubTypeSet.CreatureType), + TURTLE("Turtle", SubTypeSet.CreatureType), + TUSKEN("Tusken", SubTypeSet.CreatureType, true), // Star Wars TROOPER("Trooper", SubTypeSet.CreatureType, true), // Star Wars + TRILOBITE("Trilobite", SubTypeSet.CreatureType), TWILEK("Twi'lek", SubTypeSet.CreatureType, true), // Star Wars // U UGNAUGHT("Ugnaught", SubTypeSet.CreatureType, true), - UNICORN("Unicorn", SubTypeSet.CreatureType, false), + UNICORN("Unicorn", SubTypeSet.CreatureType), //V - VAMPIRE("Vampire", SubTypeSet.CreatureType, false), - VEDALKEN("Vedalken", SubTypeSet.CreatureType, false), - VIASHINO("Viashino", SubTypeSet.CreatureType, false), - VOLVER("Volver", SubTypeSet.CreatureType, false), + VAMPIRE("Vampire", SubTypeSet.CreatureType), + VEDALKEN("Vedalken", SubTypeSet.CreatureType), + VIASHINO("Viashino", SubTypeSet.CreatureType), + VOLVER("Volver", SubTypeSet.CreatureType), //W - WALL("Wall", SubTypeSet.CreatureType, false), - WARRIOR("Warrior", SubTypeSet.CreatureType, false), + WALL("Wall", SubTypeSet.CreatureType), + WARRIOR("Warrior", SubTypeSet.CreatureType), WEEQUAY("Weequay", SubTypeSet.CreatureType, true), - WEIRD("Weird", SubTypeSet.CreatureType, false), - WEREWOLF("Werewolf", SubTypeSet.CreatureType, false), - WHALE("Whale", SubTypeSet.CreatureType, false), - WIZARD("Wizard", SubTypeSet.CreatureType, false), - WOLF("Wolf", SubTypeSet.CreatureType, false), - WOLVERINE("Wolverine", SubTypeSet.CreatureType, false), - WOMBAT("Wombat", SubTypeSet.CreatureType, false), + WEIRD("Weird", SubTypeSet.CreatureType), + WEREWOLF("Werewolf", SubTypeSet.CreatureType), + WHALE("Whale", SubTypeSet.CreatureType), + WIZARD("Wizard", SubTypeSet.CreatureType), + WOLF("Wolf", SubTypeSet.CreatureType), + WOLVERINE("Wolverine", SubTypeSet.CreatureType), + WOMBAT("Wombat", SubTypeSet.CreatureType), WOOKIEE("Wookiee", SubTypeSet.CreatureType, true), // Star Wars - WORM("Worm", SubTypeSet.CreatureType, false), - WRAITH("Wraith", SubTypeSet.CreatureType, false), - WURM("Wurm", SubTypeSet.CreatureType, false), + WORM("Worm", SubTypeSet.CreatureType), + WRAITH("Wraith", SubTypeSet.CreatureType), + WURM("Wurm", SubTypeSet.CreatureType), // Y - YETI("Yeti", SubTypeSet.CreatureType, false), + YETI("Yeti", SubTypeSet.CreatureType), // Z ZABRAK("Zabrak", SubTypeSet.CreatureType, true), // Star Wars - ZOMBIE("Zombie", SubTypeSet.CreatureType, false), - ZUBERA("Zubera", SubTypeSet.CreatureType, false), + ZOMBIE("Zombie", SubTypeSet.CreatureType), + ZUBERA("Zubera", SubTypeSet.CreatureType), // Planeswalker - AJANI("Ajani", SubTypeSet.PlaneswalkerType, false), - ARLINN("Arlinn", SubTypeSet.PlaneswalkerType, false), - ASHIOK("Ashiok", SubTypeSet.PlaneswalkerType, false), + AJANI("Ajani", SubTypeSet.PlaneswalkerType), + ARLINN("Arlinn", SubTypeSet.PlaneswalkerType), + ASHIOK("Ashiok", SubTypeSet.PlaneswalkerType), AURRA("Aurra", SubTypeSet.PlaneswalkerType, true), // Star Wars - BOLAS("Bolas", SubTypeSet.PlaneswalkerType, false), - CHANDRA("Chandra", SubTypeSet.PlaneswalkerType, false), - DACK("Dack", SubTypeSet.PlaneswalkerType, false), - DARETTI("Daretti", SubTypeSet.PlaneswalkerType, false), - DOMRI("Domri", SubTypeSet.PlaneswalkerType, false), + BOLAS("Bolas", SubTypeSet.PlaneswalkerType), + CHANDRA("Chandra", SubTypeSet.PlaneswalkerType), + DACK("Dack", SubTypeSet.PlaneswalkerType), + DARETTI("Daretti", SubTypeSet.PlaneswalkerType), + DOMRI("Domri", SubTypeSet.PlaneswalkerType), DOOKU("Dooku", SubTypeSet.PlaneswalkerType, true), // Star Wars - DOVIN("Dovin", SubTypeSet.PlaneswalkerType, false), - ELSPETH("Elspeth", SubTypeSet.PlaneswalkerType, false), - FREYALISE("Freyalise", SubTypeSet.PlaneswalkerType, false), - GARRUK("Garruk", SubTypeSet.PlaneswalkerType, false), - GIDEON("Gideon", SubTypeSet.PlaneswalkerType, false), - JACE("Jace", SubTypeSet.PlaneswalkerType, false), - KARN("Karn", SubTypeSet.PlaneswalkerType, false), - KAYA("Kaya", SubTypeSet.PlaneswalkerType, false), - KIORA("Kiora", SubTypeSet.PlaneswalkerType, false), - KOTH("Koth", SubTypeSet.PlaneswalkerType, false), - LILIANA("Liliana", SubTypeSet.PlaneswalkerType, false), - NAHIRI("Nahiri", SubTypeSet.PlaneswalkerType, false), - NARSET("Narset", SubTypeSet.PlaneswalkerType, false), - NISSA("Nissa", SubTypeSet.PlaneswalkerType, false), - NIXILIS("Nixilis", SubTypeSet.PlaneswalkerType, false), + DOVIN("Dovin", SubTypeSet.PlaneswalkerType), + ELSPETH("Elspeth", SubTypeSet.PlaneswalkerType), + FREYALISE("Freyalise", SubTypeSet.PlaneswalkerType), + GARRUK("Garruk", SubTypeSet.PlaneswalkerType), + GIDEON("Gideon", SubTypeSet.PlaneswalkerType), + HUATLI("Huatli", SubTypeSet.PlaneswalkerType), + JACE("Jace", SubTypeSet.PlaneswalkerType), + KARN("Karn", SubTypeSet.PlaneswalkerType), + KAYA("Kaya", SubTypeSet.PlaneswalkerType), + KIORA("Kiora", SubTypeSet.PlaneswalkerType), + KOTH("Koth", SubTypeSet.PlaneswalkerType), + LILIANA("Liliana", SubTypeSet.PlaneswalkerType), + NAHIRI("Nahiri", SubTypeSet.PlaneswalkerType), + NARSET("Narset", SubTypeSet.PlaneswalkerType), + NISSA("Nissa", SubTypeSet.PlaneswalkerType), + NIXILIS("Nixilis", SubTypeSet.PlaneswalkerType), OBI_WAN("Obi-Wan", SubTypeSet.PlaneswalkerType, true), // Star Wars - RAL("Ral", SubTypeSet.PlaneswalkerType, false), - SAHEELI("Saheeli", SubTypeSet.PlaneswalkerType, false), - SAMUT("Samut", SubTypeSet.PlaneswalkerType, false), - SARKHAN("Sarkhan", SubTypeSet.PlaneswalkerType, false), + RAL("Ral", SubTypeSet.PlaneswalkerType), + SAHEELI("Saheeli", SubTypeSet.PlaneswalkerType), + SAMUT("Samut", SubTypeSet.PlaneswalkerType), + SARKHAN("Sarkhan", SubTypeSet.PlaneswalkerType), SIDIOUS("Sidious", SubTypeSet.PlaneswalkerType, true), // Star Wars - SORIN("Sorin", SubTypeSet.PlaneswalkerType, false), - TAMIYO("Tamiyo", SubTypeSet.PlaneswalkerType, false), - TEFERI("Teferi", SubTypeSet.PlaneswalkerType, false), - TEZZERET("Tezzeret", SubTypeSet.PlaneswalkerType, false), - TIBALT("Tibalt", SubTypeSet.PlaneswalkerType, false), - UGIN("Ugin", SubTypeSet.PlaneswalkerType, false), - VENSER("Venser", SubTypeSet.PlaneswalkerType, false), - VRASKA("Vraska", SubTypeSet.PlaneswalkerType, false), - XENAGOS("Xenagos", SubTypeSet.PlaneswalkerType, false), + SORIN("Sorin", SubTypeSet.PlaneswalkerType), + TAMIYO("Tamiyo", SubTypeSet.PlaneswalkerType), + TEFERI("Teferi", SubTypeSet.PlaneswalkerType), + TEZZERET("Tezzeret", SubTypeSet.PlaneswalkerType), + TIBALT("Tibalt", SubTypeSet.PlaneswalkerType), + UGIN("Ugin", SubTypeSet.PlaneswalkerType), + VENSER("Venser", SubTypeSet.PlaneswalkerType), + VRASKA("Vraska", SubTypeSet.PlaneswalkerType), + XENAGOS("Xenagos", SubTypeSet.PlaneswalkerType), YODA("Yoda", SubTypeSet.PlaneswalkerType, true); // Star Wars private final SubTypeSet subTypeSet; + SubType(String description, SubTypeSet subTypeSet) { + this(description, subTypeSet, false); + } + + SubType(String description, SubTypeSet subTypeSet, boolean customSet) { + this.description = description; + this.subTypeSet = subTypeSet; + this.customSet = customSet; + } + public String getDescription() { return description; } @@ -402,21 +416,18 @@ public enum SubType { return description; } - SubType(String description, SubTypeSet subTypeSet, boolean customSet) { - this.description = description; - this.subTypeSet = subTypeSet; - this.customSet = customSet; - } - public static SubType byDescription(String subType) { for (SubType s : values()) { if (s.getDescription().equals(subType)) { return s; } } - throw new IllegalArgumentException("no subtype for " + subType + " exists"); + org.apache.log4j.Logger.getLogger(SubType.class).error("no subtype for " + subType + " exists"); + return null; } + ; + public SubTypeSet getSubTypeSet() { return subTypeSet; } @@ -432,7 +443,10 @@ public enum SubType { } public static Set getBasicLands(boolean customSet) { - return Arrays.stream(values()).filter(s -> s.customSet == customSet).filter(p -> p.getSubTypeSet() == SubTypeSet.BasicLandType).collect(Collectors.toSet()); + return Arrays.stream(values()) + .filter(p -> p.getSubTypeSet() == SubTypeSet.BasicLandType) + .filter(s -> s.customSet == customSet) + .collect(Collectors.toSet()); } public static SubTypeList getLandTypes(boolean customSet) { diff --git a/Mage/src/main/java/mage/constants/TargetAdjustment.java b/Mage/src/main/java/mage/constants/TargetAdjustment.java new file mode 100644 index 0000000000..0eb07153af --- /dev/null +++ b/Mage/src/main/java/mage/constants/TargetAdjustment.java @@ -0,0 +1,16 @@ +package mage.constants; + +/** + * + * @author TheElk801 + */ +public enum TargetAdjustment { + NONE, + X_TARGETS, + X_CMC_EQUAL_PERM, + X_CMC_EQUAL_GY_CARD, + X_POWER_LEQ, CHOSEN_NAME, + CHOSEN_COLOR, + VERSE_COUNTER_TARGETS, + TREASURE_COUNTER_POWER +} diff --git a/Mage/src/main/java/mage/counters/CounterType.java b/Mage/src/main/java/mage/counters/CounterType.java index 8f5ff8ba91..d4b4464157 100644 --- a/Mage/src/main/java/mage/counters/CounterType.java +++ b/Mage/src/main/java/mage/counters/CounterType.java @@ -78,6 +78,7 @@ public enum CounterType { INTERVENTION("intervention"), JAVELIN("javelin"), KI("ki"), + LANDMARK("landmark"), LEVEL("level"), LORE("lore"), LUCK("luck"), @@ -86,6 +87,7 @@ public enum CounterType { M1M1(new BoostCounter(-1, -1).name), M2M1(new BoostCounter(-2, -1).name), M2M2(new BoostCounter(-2, -2).name), + MINE("mine"), MINING("mining"), MIRE("mire"), MUSTER("muster"), @@ -120,6 +122,7 @@ public enum CounterType { TIME("time"), TOWER("tower"), TRAP("trap"), + TREASURE("treasure"), UNITY("unity"), VELOCITY("velocity"), VERSE("verse"), diff --git a/Mage/src/main/java/mage/designations/Designation.java b/Mage/src/main/java/mage/designations/Designation.java index e1ba4ab45a..7d3d842a9c 100644 --- a/Mage/src/main/java/mage/designations/Designation.java +++ b/Mage/src/main/java/mage/designations/Designation.java @@ -215,4 +215,7 @@ public abstract class Designation implements MageObject { throw new UnsupportedOperationException("Unsupported operation"); } + @Override + public void removePTCDA() { + } } diff --git a/Mage/src/main/java/mage/designations/Monarch.java b/Mage/src/main/java/mage/designations/Monarch.java index 7563f8956b..6f6cd57404 100644 --- a/Mage/src/main/java/mage/designations/Monarch.java +++ b/Mage/src/main/java/mage/designations/Monarch.java @@ -27,11 +27,14 @@ */ package mage.designations; +import java.util.List; +import java.util.UUID; import mage.MageObject; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.effects.common.BecomesMonarchTargetEffect; import mage.abilities.effects.common.DrawCardTargetEffect; +import mage.abilities.text.TextPart; import mage.constants.TargetController; import mage.constants.Zone; import mage.game.Game; @@ -40,8 +43,6 @@ import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.target.targetpointer.FixedTarget; -import java.util.UUID; - /** * * @author LevelX2 @@ -73,6 +74,16 @@ public class Monarch extends Designation { public void setIsAllCreatureTypes(boolean value) { } + + @Override + public List getTextParts() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public TextPart addTextPart(TextPart textPart) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } } // At the beginning of the monarch’s end step, that player draws a card @@ -159,5 +170,4 @@ class MonarchDealsCombatDamageToAPlayerTriggeredAbility extends TriggeredAbility return "Whenever a creature deals combat damage to the monarch, its controller becomes the monarch."; } - } diff --git a/Mage/src/main/java/mage/filter/FilterPermanent.java b/Mage/src/main/java/mage/filter/FilterPermanent.java index 287c4df445..1f4acaa17a 100644 --- a/Mage/src/main/java/mage/filter/FilterPermanent.java +++ b/Mage/src/main/java/mage/filter/FilterPermanent.java @@ -73,7 +73,7 @@ public class FilterPermanent extends FilterObject implements FilterIn @Override public boolean match(Permanent permanent, UUID sourceId, UUID playerId, Game game) { - if (!this.match(permanent, game)) { + if (!permanent.isPhasedIn() || !this.match(permanent, game)) { return false; } diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index 8b0b40b5a6..84695fd94f 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -8,6 +8,7 @@ package mage.filter; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.SuperType; +import mage.constants.TargetController; import mage.filter.common.*; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -15,6 +16,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SupertypePredicate; import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AttackingPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; import mage.filter.predicate.permanent.TokenPredicate; /** @@ -41,7 +43,12 @@ public final class StaticFilters { public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_ARTIFACT = new FilterControlledArtifactPermanent(); public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_ARTIFACT_OR_CREATURE = new FilterControlledPermanent("artifact or creature you control"); - public static final FilterControlledPermanent FILTER_CONTROLLED_A_CREATURE = new FilterControlledCreaturePermanent("a creature you control"); + public static final FilterPermanent FILTER_OPPONENTS_PERMANENT = new FilterPermanent("permanent an opponent controls"); + public static final FilterPermanent FILTER_OPPONENTS_PERMANENT_CREATURE = new FilterCreaturePermanent("creature an opponent controls"); + public static final FilterPermanent FILTER_OPPONENTS_PERMANENT_ARTIFACT = new FilterPermanent("artifact an opponent controls"); + public static final FilterPermanent FILTER_OPPONENTS_PERMANENT_ARTIFACT_OR_CREATURE = new FilterPermanent("artifact or creature an opponent controls"); + + public static final FilterPermanent FILTER_CONTROLLED_A_CREATURE = new FilterControlledCreaturePermanent("a creature you control"); public static final FilterControlledCreaturePermanent FILTER_CONTROLLED_ANOTHER_CREATURE = new FilterControlledCreaturePermanent("another creature"); public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_NON_LAND = new FilterControlledPermanent("nonland permanent"); public static final FilterLandPermanent FILTER_LAND = new FilterLandPermanent(); @@ -52,7 +59,7 @@ public final class StaticFilters { public static final FilterCreaturePermanent FILTER_PERMANENT_A_CREATURE = new FilterCreaturePermanent("a creature"); public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURES = new FilterCreaturePermanent("creatures"); public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_GOBLINS = new FilterCreaturePermanent(SubType.GOBLIN, "Goblin creatures"); - public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_SLIVERS = new FilterCreaturePermanent(SubType.SLIVER, "Sliver creatures"); + public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_SLIVERS = new FilterCreaturePermanent(SubType.SLIVER, "all Sliver creatures"); public static final FilterPlaneswalkerPermanent FILTER_PERMANENT_PLANESWALKER = new FilterPlaneswalkerPermanent(); public static final FilterPermanent FILTER_PERMANENT_NON_LAND = new FilterNonlandPermanent(); @@ -62,34 +69,37 @@ public final class StaticFilters { = (FilterSpell) new FilterSpell("noncreature spell").add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); public static final FilterSpell FILTER_SPELL = new FilterSpell(); + public static final FilterSpell FILTER_A_SPELL = new FilterSpell("a spell"); public static final FilterSpell FILTER_INSTANT_OR_SORCERY_SPELL = new FilterSpell("instant or sorcery spell"); + public static final FilterSpell FILTER_INSTANT_OR_SORCERY_SPELLS = new FilterSpell("instant or sorcery spells"); public static final FilterPermanent FILTER_CREATURE_TOKENS = new FilterCreaturePermanent("creature tokens"); - public static final FilterPermanent FILTER_ATTACKING_CREATURES = new FilterCreaturePermanent("attacking creatures"); + public static final FilterCreaturePermanent FILTER_ATTACKING_CREATURES = new FilterCreaturePermanent("attacking creatures"); - public static final FilterPermanent FILTER_AURA = new FilterPermanent(); - public static final FilterPermanent FILTER_EQUIPMENT = new FilterPermanent(); - public static final FilterPermanent FILTER_FORTIFICATION = new FilterPermanent(); - public static final FilterPermanent FILTER_LEGENDARY = new FilterPermanent(); + public static final FilterPermanent FILTER_PERMANENT_AURA = new FilterPermanent(); + public static final FilterPermanent FILTER_PERMANENT_EQUIPMENT = new FilterPermanent(); + public static final FilterPermanent FILTER_PERMANENT_FORTIFICATION = new FilterPermanent(); + public static final FilterPermanent FILTER_PERMANENT_LEGENDARY = new FilterPermanent(); static { - FILTER_AURA.add(new CardTypePredicate(CardType.ENCHANTMENT)); - FILTER_AURA.add(new SubtypePredicate(SubType.AURA)); + FILTER_PERMANENT_AURA.add(new CardTypePredicate(CardType.ENCHANTMENT)); + FILTER_PERMANENT_AURA.add(new SubtypePredicate(SubType.AURA)); - FILTER_EQUIPMENT.add(new CardTypePredicate(CardType.ARTIFACT)); - FILTER_EQUIPMENT.add(new SubtypePredicate(SubType.EQUIPMENT)); + FILTER_PERMANENT_EQUIPMENT.add(new CardTypePredicate(CardType.ARTIFACT)); + FILTER_PERMANENT_EQUIPMENT.add(new SubtypePredicate(SubType.EQUIPMENT)); - FILTER_FORTIFICATION.add(new CardTypePredicate(CardType.ARTIFACT)); - FILTER_FORTIFICATION.add(new SubtypePredicate(SubType.FORTIFICATION)); + FILTER_PERMANENT_FORTIFICATION.add(new CardTypePredicate(CardType.ARTIFACT)); + FILTER_PERMANENT_FORTIFICATION.add(new SubtypePredicate(SubType.FORTIFICATION)); - FILTER_LEGENDARY.add(new SupertypePredicate(SuperType.LEGENDARY)); + FILTER_PERMANENT_LEGENDARY.add(new SupertypePredicate(SuperType.LEGENDARY)); } static { FILTER_CONTROLLED_PERMANENT_NON_LAND.add( - Predicates.not(new CardTypePredicate(CardType.LAND))); + Predicates.not(new CardTypePredicate(CardType.LAND)) + ); FILTER_CREATURE_TOKENS.add(new TokenPredicate()); @@ -114,6 +124,20 @@ public final class StaticFilters { new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.CREATURE) )); + + FILTER_OPPONENTS_PERMANENT.add(new ControllerPredicate(TargetController.OPPONENT)); + + FILTER_OPPONENTS_PERMANENT_CREATURE.add(new ControllerPredicate(TargetController.OPPONENT)); + + FILTER_OPPONENTS_PERMANENT_ARTIFACT.add(new ControllerPredicate(TargetController.OPPONENT)); + FILTER_OPPONENTS_PERMANENT_ARTIFACT.add(new CardTypePredicate(CardType.ARTIFACT)); + + FILTER_OPPONENTS_PERMANENT_ARTIFACT_OR_CREATURE.add(new ControllerPredicate(TargetController.OPPONENT)); + FILTER_OPPONENTS_PERMANENT_ARTIFACT_OR_CREATURE.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.CREATURE) + )); + FILTER_CONTROLLED_ANOTHER_CREATURE.add(new AnotherPredicate()); FILTER_CARD_ARTIFACT_OR_CREATURE.add(Predicates.or( @@ -125,6 +149,14 @@ public final class StaticFilters { new CardTypePredicate(CardType.INSTANT), new CardTypePredicate(CardType.SORCERY) )); + + FILTER_INSTANT_OR_SORCERY_SPELLS.add(Predicates.or( + new CardTypePredicate(CardType.INSTANT), + new CardTypePredicate(CardType.SORCERY) + )); + } + + private StaticFilters() { } } diff --git a/Mage/src/main/java/mage/filter/common/FilterBlockingCreature.java b/Mage/src/main/java/mage/filter/common/FilterBlockingCreature.java index 7e6aa11769..896517c0bf 100644 --- a/Mage/src/main/java/mage/filter/common/FilterBlockingCreature.java +++ b/Mage/src/main/java/mage/filter/common/FilterBlockingCreature.java @@ -24,8 +24,7 @@ * 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.filter.common; import mage.filter.predicate.permanent.BlockingPredicate; @@ -37,7 +36,7 @@ import mage.filter.predicate.permanent.BlockingPredicate; public class FilterBlockingCreature extends FilterCreaturePermanent { public FilterBlockingCreature() { - this("Blocking creature"); + this("blocking creature"); } public FilterBlockingCreature(String name) { diff --git a/Mage/src/main/java/mage/filter/common/FilterControlledCreaturePermanent.java b/Mage/src/main/java/mage/filter/common/FilterControlledCreaturePermanent.java index f8fcd1a77c..34e81d3e43 100644 --- a/Mage/src/main/java/mage/filter/common/FilterControlledCreaturePermanent.java +++ b/Mage/src/main/java/mage/filter/common/FilterControlledCreaturePermanent.java @@ -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,12 +20,11 @@ * 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.filter.common; import mage.constants.CardType; @@ -46,8 +45,8 @@ public class FilterControlledCreaturePermanent extends FilterControlledPermanent public FilterControlledCreaturePermanent(String name) { super(name); this.add(new CardTypePredicate(CardType.CREATURE)); - } - + // this.add(new ControllerPredicate(TargetController.YOU)); + } public FilterControlledCreaturePermanent(SubType subtype, String name) { super(name); diff --git a/Mage/src/main/java/mage/filter/predicate/mageobject/TextPartSubtypePredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/TextPartSubtypePredicate.java new file mode 100644 index 0000000000..a00c416634 --- /dev/null +++ b/Mage/src/main/java/mage/filter/predicate/mageobject/TextPartSubtypePredicate.java @@ -0,0 +1,34 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.filter.predicate.mageobject; + +import mage.MageObject; +import mage.abilities.text.TextPartSubType; +import mage.filter.predicate.Predicate; +import mage.game.Game; + +/** + * + * @author LevelX2 + */ +public class TextPartSubtypePredicate implements Predicate { + + private final TextPartSubType textPartSubtype; + + public TextPartSubtypePredicate(TextPartSubType textPartSubtype) { + this.textPartSubtype = textPartSubtype; + } + + @Override + public boolean apply(MageObject input, Game game) { + return input.hasSubtype(textPartSubtype.getCurrentValue(), game); + } + + @Override + public String toString() { + return "Subtype(" + textPartSubtype.getCurrentValue() + ')'; + } +} diff --git a/Mage/src/main/java/mage/filter/predicate/permanent/BlockedPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/BlockedPredicate.java index 603d3ae6d7..198bf268c0 100644 --- a/Mage/src/main/java/mage/filter/predicate/permanent/BlockedPredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/permanent/BlockedPredicate.java @@ -29,7 +29,6 @@ package mage.filter.predicate.permanent; import mage.filter.predicate.Predicate; import mage.game.Game; -import mage.game.combat.CombatGroup; import mage.game.permanent.Permanent; /** @@ -40,12 +39,7 @@ public class BlockedPredicate implements Predicate { @Override public boolean apply(Permanent input, Game game) { - for (CombatGroup combatGroup : game.getCombat().getGroups()) { - if (!combatGroup.getBlockers().isEmpty() && combatGroup.getAttackers().contains(input.getId())) { - return true; - } - } - return false; + return input.isBlocked(game); } @Override diff --git a/Mage/src/main/java/mage/filter/predicate/permanent/DefendingPlayerControlsPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/DefendingPlayerControlsPredicate.java new file mode 100644 index 0000000000..af1a7d4c90 --- /dev/null +++ b/Mage/src/main/java/mage/filter/predicate/permanent/DefendingPlayerControlsPredicate.java @@ -0,0 +1,50 @@ +/* + * 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.filter.predicate.permanent; + +import mage.filter.predicate.ObjectSourcePlayer; +import mage.filter.predicate.ObjectSourcePlayerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author TheElk801 + */ +public class DefendingPlayerControlsPredicate implements ObjectSourcePlayerPredicate> { + + @Override + public boolean apply(ObjectSourcePlayer input, Game game) { + return input.getObject().getControllerId().equals(game.getCombat().getDefendingPlayerId(input.getSourceId(), game)); + } + + @Override + public String toString() { + return "Another"; + } +} diff --git a/Mage/src/main/java/mage/filter/predicate/permanent/DefendingPlayerOwnsCardPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/DefendingPlayerOwnsCardPredicate.java new file mode 100644 index 0000000000..fbe57d8ffb --- /dev/null +++ b/Mage/src/main/java/mage/filter/predicate/permanent/DefendingPlayerOwnsCardPredicate.java @@ -0,0 +1,50 @@ +/* + * 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.filter.predicate.permanent; + +import mage.cards.Card; +import mage.filter.predicate.ObjectSourcePlayer; +import mage.filter.predicate.ObjectSourcePlayerPredicate; +import mage.game.Game; + +/** + * + * @author TheElk801 + */ +public class DefendingPlayerOwnsCardPredicate implements ObjectSourcePlayerPredicate> { + + @Override + public boolean apply(ObjectSourcePlayer input, Game game) { + return input.getObject().getOwnerId().equals(game.getCombat().getDefendingPlayerId(input.getSourceId(), game)); + } + + @Override + public String toString() { + return "Another"; + } +} diff --git a/Mage/src/main/java/mage/filter/predicate/permanent/EquippedPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/EquippedPredicate.java index a6c2abbee1..87ca0911f6 100644 --- a/Mage/src/main/java/mage/filter/predicate/permanent/EquippedPredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/permanent/EquippedPredicate.java @@ -6,6 +6,7 @@ package mage.filter.predicate.permanent; import java.util.UUID; +import mage.constants.SubType; import mage.filter.predicate.Predicate; import mage.game.Game; import mage.game.permanent.Permanent; @@ -20,7 +21,7 @@ public class EquippedPredicate implements Predicate { public boolean apply(Permanent input, Game game) { for (UUID attachmentId : input.getAttachments()) { Permanent attachment = game.getPermanent(attachmentId); - if (attachment != null && attachment.getSubtype(game).contains("Equipment")) { + if (attachment != null && attachment.hasSubtype(SubType.EQUIPMENT, game)) { return true; } } diff --git a/Mage/src/main/java/mage/game/CardAttribute.java b/Mage/src/main/java/mage/game/CardAttribute.java index 5aa24b9e5f..e0f9945ec5 100644 --- a/Mage/src/main/java/mage/game/CardAttribute.java +++ b/Mage/src/main/java/mage/game/CardAttribute.java @@ -5,42 +5,43 @@ */ package mage.game; +import java.io.Serializable; import mage.ObjectColor; import mage.cards.Card; import mage.util.SubTypeList; -import java.io.Serializable; - /** - * This class saves changed attributes of cards (e.g. in graveyard, exile or player hands or libraries). - * + * This class saves changed attributes of cards (e.g. in graveyard, exile or + * player hands or libraries). + * * @author LevelX2 */ -public class CardAttribute implements Serializable { - +public class CardAttribute implements Serializable { + protected ObjectColor color; protected SubTypeList subtype; - public CardAttribute(Card card) { + public CardAttribute(Card card, Game game) { color = card.getColor(null).copy(); - subtype = card.getSubtype(null); + subtype = new SubTypeList(); + subtype.addAll(card.getSubtype(game)); } public CardAttribute(CardAttribute cardAttribute) { this.color = cardAttribute.color; this.subtype = cardAttribute.subtype; } - + public CardAttribute copy() { return new CardAttribute(this); } - + public ObjectColor getColor() { - return color; + return color; } - + public SubTypeList getSubtype() { return subtype; } - + } diff --git a/Mage/src/main/java/mage/game/Game.java b/Mage/src/main/java/mage/game/Game.java index 9ac4302df8..044e6a3ae7 100644 --- a/Mage/src/main/java/mage/game/Game.java +++ b/Mage/src/main/java/mage/game/Game.java @@ -57,6 +57,7 @@ import mage.game.match.MatchType; import mage.game.permanent.Battlefield; import mage.game.permanent.Permanent; import mage.game.permanent.PermanentCard; +import mage.game.stack.Spell; import mage.game.stack.SpellStack; import mage.game.turn.Phase; import mage.game.turn.Step; @@ -106,6 +107,10 @@ public interface Game extends MageItem, Serializable { UUID getOwnerId(MageObject object); + Spell getSpell(UUID spellId); + + Spell getSpellOrLKIStack(UUID spellId); + Permanent getPermanent(UUID permanentId); Permanent getPermanentOrLKIBattlefield(UUID permanentId); diff --git a/Mage/src/main/java/mage/game/GameImpl.java b/Mage/src/main/java/mage/game/GameImpl.java index 4cbe21e3e8..768703d804 100644 --- a/Mage/src/main/java/mage/game/GameImpl.java +++ b/Mage/src/main/java/mage/game/GameImpl.java @@ -60,9 +60,7 @@ import mage.filter.FilterCard; import mage.filter.FilterPermanent; import mage.filter.StaticFilters; import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.common.FilterPlaneswalkerPermanent; import mage.filter.predicate.mageobject.NamePredicate; -import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SupertypePredicate; import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.combat.Combat; @@ -447,6 +445,20 @@ public abstract class GameImpl implements Game, Serializable { return null; } + @Override + public Spell getSpell(UUID spellId) { + return state.getStack().getSpell(spellId); + } + + @Override + public Spell getSpellOrLKIStack(UUID spellId) { + Spell spell = state.getStack().getSpell(spellId); + if (spell == null) { + spell = (Spell) this.getLastKnownInformation(spellId, Zone.STACK); + } + return spell; + } + @Override public Permanent getPermanent(UUID permanentId) { return state.getPermanent(permanentId); @@ -1774,7 +1786,7 @@ public abstract class GameImpl implements Game, Serializable { if (perm.isWorld()) { worldEnchantment.add(perm); } - if (StaticFilters.FILTER_AURA.match(perm, this)) { + if (StaticFilters.FILTER_PERMANENT_AURA.match(perm, this)) { //20091005 - 704.5n, 702.14c if (perm.getAttachedTo() == null) { Card card = this.getCard(perm.getId()); @@ -1852,10 +1864,10 @@ public abstract class GameImpl implements Game, Serializable { } } } - if (this.getState().isLegendaryRuleActive() && StaticFilters.FILTER_LEGENDARY.match(perm, this)) { + if (this.getState().isLegendaryRuleActive() && StaticFilters.FILTER_PERMANENT_LEGENDARY.match(perm, this)) { legendary.add(perm); } - if (StaticFilters.FILTER_EQUIPMENT.match(perm, this)) { + if (StaticFilters.FILTER_PERMANENT_EQUIPMENT.match(perm, this)) { //20091005 - 704.5p, 702.14d if (perm.getAttachedTo() != null) { Permanent attachedTo = getPermanent(perm.getAttachedTo()); @@ -1880,7 +1892,7 @@ public abstract class GameImpl implements Game, Serializable { } } } - if (StaticFilters.FILTER_FORTIFICATION.match(perm, this)) { + if (StaticFilters.FILTER_PERMANENT_FORTIFICATION.match(perm, this)) { if (perm.getAttachedTo() != null) { Permanent land = getPermanent(perm.getAttachedTo()); if (land == null || !land.getAttachments().contains(perm.getId())) { @@ -1900,9 +1912,9 @@ public abstract class GameImpl implements Game, Serializable { Permanent attachment = getPermanent(attachmentId); if (attachment != null && (attachment.isCreature() - || !(attachment.getSubtype(this).contains("Aura") - || attachment.getSubtype(this).contains("Equipment") - || attachment.getSubtype(this).contains("Fortification")))) { + || !(attachment.getSubtype(this).contains(SubType.AURA) + || attachment.getSubtype(this).contains(SubType.EQUIPMENT) + || attachment.getSubtype(this).contains(SubType.FORTIFICATION)))) { if (perm.removeAttachment(attachment.getId(), this)) { somethingHappened = true; break; @@ -1934,33 +1946,6 @@ public abstract class GameImpl implements Game, Serializable { } } } - //201300713 - 704.5j - // If a player controls two or more planeswalkers that share a planeswalker type, that player - // chooses one of them, and the rest are put into their owners' graveyards. - // This is called the "planeswalker uniqueness rule." - if (planeswalkers.size() > 1) { //don't bother checking if less than 2 planeswalkers in play - for (Permanent planeswalker : planeswalkers) { - for (SubType planeswalkertype : planeswalker.getSubtype(this)) { - FilterPlaneswalkerPermanent filterPlaneswalker = new FilterPlaneswalkerPermanent(); - filterPlaneswalker.add(new SubtypePredicate(planeswalkertype)); - filterPlaneswalker.add(new ControllerIdPredicate(planeswalker.getControllerId())); - if (getBattlefield().contains(filterPlaneswalker, planeswalker.getControllerId(), this, 2)) { - Player controller = this.getPlayer(planeswalker.getControllerId()); - if (controller != null) { - Target targetPlaneswalkerToKeep = new TargetPermanent(filterPlaneswalker); - targetPlaneswalkerToKeep.setTargetName(planeswalkertype.toString() + " to keep?"); - controller.chooseTarget(Outcome.Benefit, targetPlaneswalkerToKeep, null, this); - for (Permanent dupPlaneswalker : this.getBattlefield().getActivePermanents(filterPlaneswalker, planeswalker.getControllerId(), this)) { - if (!targetPlaneswalkerToKeep.getTargets().contains(dupPlaneswalker.getId())) { - movePermanentToGraveyardWithInfo(dupPlaneswalker); - } - } - } - return true; - } - } - } - } //201300713 - 704.5k // If a player controls two or more legendary permanents with the same name, that player // chooses one of them, and the rest are put into their owners' graveyards. @@ -2374,6 +2359,15 @@ public abstract class GameImpl implements Game, Serializable { } } + //Remove all emblems the player controls + for (Iterator it = this.getState().getCommand().iterator(); it.hasNext();) { + CommandObject obj = it.next(); + if (obj instanceof Emblem && obj.getControllerId().equals(playerId)) { + ((Emblem) obj).discardEffects();// This may not be the best fix but it works + it.remove(); + } + } + Iterator> it = gameCards.entrySet().iterator(); while (it.hasNext()) { @@ -2953,6 +2947,9 @@ public abstract class GameImpl implements Game, Serializable { @Override public void setMonarchId(Ability source, UUID monarchId) { + if (monarchId == getMonarchId()) { // Nothing happens if you're already the monarch + return; + } Player newMonarch = getPlayer(monarchId); if (getMonarchId() == null) { getState().addDesignation(new Monarch(), this, monarchId); diff --git a/Mage/src/main/java/mage/game/GameState.java b/Mage/src/main/java/mage/game/GameState.java index 95a88bceb8..7dbfeedc9a 100644 --- a/Mage/src/main/java/mage/game/GameState.java +++ b/Mage/src/main/java/mage/game/GameState.java @@ -1079,8 +1079,8 @@ public class GameState implements Serializable, Copyable { return cardAttribute.get(cardId); } - public CardAttribute getCreateCardAttribute(Card card) { - CardAttribute cardAtt = cardAttribute.computeIfAbsent(card.getId(), k -> new CardAttribute(card)); + public CardAttribute getCreateCardAttribute(Card card, Game game) { + CardAttribute cardAtt = cardAttribute.computeIfAbsent(card.getId(), k -> new CardAttribute(card, game)); return cardAtt; } diff --git a/Mage/src/main/java/mage/game/combat/Combat.java b/Mage/src/main/java/mage/game/combat/Combat.java index 496520ed0c..1ad1948a1b 100644 --- a/Mage/src/main/java/mage/game/combat/Combat.java +++ b/Mage/src/main/java/mage/game/combat/Combat.java @@ -306,7 +306,9 @@ public class Combat implements Serializable, Copyable { for (Permanent creature : player.getAvailableAttackers(game)) { boolean mustAttack = false; Set defendersForcedToAttack = new HashSet<>(); - for (Map.Entry> entry : game.getContinuousEffects().getApplicableRequirementEffects(creature, game).entrySet()) { + + // check if a creature has to attack + for (Map.Entry> entry : game.getContinuousEffects().getApplicableRequirementEffects(creature, false, game).entrySet()) { RequirementEffect effect = entry.getKey(); if (effect.mustAttack(game)) { mustAttack = true; @@ -379,6 +381,7 @@ public class Combat implements Serializable, Copyable { boolean check = true; int numberOfChecks = 0; UUID attackerToRemove = null; + Player attackingPlayer = game.getPlayer(attackingPlayerId); Check: while (check) { check = false; @@ -387,7 +390,6 @@ public class Combat implements Serializable, Copyable { for (CombatGroup group : groups) { numberAttackers += group.getAttackers().size(); } - Player attackingPlayer = game.getPlayer(attackingPlayerId); if (attackerToRemove != null) { removeAttacker(attackerToRemove, game); } @@ -579,7 +581,7 @@ public class Combat implements Serializable, Copyable { return; } for (Permanent possibleBlocker : game.getBattlefield().getActivePermanents(filterBlockers, attackingPlayer.getId(), game)) { - for (Map.Entry> requirementEntry : game.getContinuousEffects().getApplicableRequirementEffects(possibleBlocker, game).entrySet()) { + for (Map.Entry> requirementEntry : game.getContinuousEffects().getApplicableRequirementEffects(possibleBlocker, false, game).entrySet()) { if (requirementEntry.getKey().mustBlock(game)) { for (Ability ability : requirementEntry.getValue()) { UUID attackingCreatureId = requirementEntry.getKey().mustBlockAttacker(ability, game); @@ -656,7 +658,7 @@ public class Combat implements Serializable, Copyable { // Creature is already blocking but not forced to do so if (creature.getBlocking() > 0) { // get all requirement effects that apply to the creature (e.g. is able to block attacker) - for (Map.Entry> entry : game.getContinuousEffects().getApplicableRequirementEffects(creature, game).entrySet()) { + for (Map.Entry> entry : game.getContinuousEffects().getApplicableRequirementEffects(creature, false, game).entrySet()) { RequirementEffect effect = entry.getKey(); // get possible mustBeBlockedByAtLeastOne blocker for (Ability ability : entry.getValue()) { @@ -678,7 +680,7 @@ public class Combat implements Serializable, Copyable { // Creature is not blocking yet if (creature.getBlocking() == 0) { // get all requirement effects that apply to the creature - for (Map.Entry> entry : game.getContinuousEffects().getApplicableRequirementEffects(creature, game).entrySet()) { + for (Map.Entry> entry : game.getContinuousEffects().getApplicableRequirementEffects(creature, false, game).entrySet()) { RequirementEffect effect = entry.getKey(); // get possible mustBeBlockedByAtLeastOne blocker for (Ability ability : entry.getValue()) { diff --git a/Mage/src/main/java/mage/game/combat/CombatGroup.java b/Mage/src/main/java/mage/game/combat/CombatGroup.java index 3b900692b7..fc40f7e958 100644 --- a/Mage/src/main/java/mage/game/combat/CombatGroup.java +++ b/Mage/src/main/java/mage/game/combat/CombatGroup.java @@ -105,6 +105,10 @@ public class CombatGroup implements Serializable, Copyable { return defenderId; } + public UUID getDefendingPlayerId() { + return defendingPlayerId; + } + public List getAttackers() { return attackers; } @@ -651,6 +655,10 @@ public class CombatGroup implements Serializable, Copyable { this.blocked = blocked; } + public boolean getBlocked() { + return blocked; + } + @Override public CombatGroup copy() { return new CombatGroup(this); diff --git a/Mage/src/main/java/mage/game/command/Commander.java b/Mage/src/main/java/mage/game/command/Commander.java index 6fe81c4281..7d7e0c9c6d 100644 --- a/Mage/src/main/java/mage/game/command/Commander.java +++ b/Mage/src/main/java/mage/game/command/Commander.java @@ -27,6 +27,9 @@ */ package mage.game.command; +import java.util.EnumSet; +import java.util.List; +import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.Abilities; @@ -36,6 +39,7 @@ import mage.abilities.SpellAbility; import mage.abilities.common.CastCommanderAbility; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCosts; +import mage.abilities.text.TextPart; import mage.cards.Card; import mage.cards.FrameStyle; import mage.constants.CardType; @@ -46,9 +50,6 @@ import mage.game.events.ZoneChangeEvent; import mage.util.GameLog; import mage.util.SubTypeList; -import java.util.EnumSet; -import java.util.UUID; - public class Commander implements CommandObject { private final Card sourceObject; @@ -229,7 +230,26 @@ public class Commander implements CommandObject { sourceObject.setZoneChangeCounter(value, game); } - public boolean isAllCreatureTypes() { return false;} + @Override + public boolean isAllCreatureTypes() { + return false; + } - public void setIsAllCreatureTypes(boolean value){} + @Override + public void setIsAllCreatureTypes(boolean value) { + } + + @Override + public List getTextParts() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public TextPart addTextPart(TextPart textPart) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void removePTCDA() { + } } diff --git a/Mage/src/main/java/mage/game/command/Emblem.java b/Mage/src/main/java/mage/game/command/Emblem.java index b0c0e67107..85d6fe8d9a 100644 --- a/Mage/src/main/java/mage/game/command/Emblem.java +++ b/Mage/src/main/java/mage/game/command/Emblem.java @@ -27,6 +27,10 @@ */ package mage.game.command; +import java.util.ArrayList; +import java.util.EnumSet; +import java.util.List; +import java.util.UUID; import mage.MageInt; import mage.MageObject; import mage.ObjectColor; @@ -36,6 +40,9 @@ import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.text.TextPart; import mage.cards.Card; import mage.cards.FrameStyle; import mage.constants.CardType; @@ -46,18 +53,12 @@ import mage.game.events.ZoneChangeEvent; import mage.util.GameLog; import mage.util.SubTypeList; -import java.util.ArrayList; -import java.util.EnumSet; -import java.util.List; -import java.util.UUID; - /** * @author nantuko */ public class Emblem implements CommandObject { private static EnumSet emptySet = EnumSet.noneOf(CardType.class); - private static List emptyList = new ArrayList(); private static ObjectColor emptyColor = new ObjectColor(); private static ManaCosts emptyCost = new ManaCostsImpl(); @@ -268,8 +269,34 @@ public class Emblem implements CommandObject { throw new UnsupportedOperationException("Unsupported operation"); } - public boolean isAllCreatureTypes(){ return false;} + public boolean isAllCreatureTypes() { + return false; + } - public void setIsAllCreatureTypes(boolean value){} + public void setIsAllCreatureTypes(boolean value) { + } + public void discardEffects() { + for (Ability ability : abilites) { + for (Effect effect : ability.getEffects()) { + if (effect instanceof ContinuousEffect) { + ((ContinuousEffect) effect).discard(); + } + } + } + } + + @Override + public List getTextParts() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public TextPart addTextPart(TextPart textPart) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void removePTCDA() { + } } diff --git a/Mage/src/main/java/mage/game/draft/DraftImpl.java b/Mage/src/main/java/mage/game/draft/DraftImpl.java index 702ae547fe..409bc796f0 100644 --- a/Mage/src/main/java/mage/game/draft/DraftImpl.java +++ b/Mage/src/main/java/mage/game/draft/DraftImpl.java @@ -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,14 +20,14 @@ * 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.game.draft; +import java.util.*; import mage.cards.Card; import mage.cards.ExpansionSet; import mage.game.draft.DraftOptions.TimingOption; @@ -36,8 +36,6 @@ import mage.game.events.TableEvent.EventType; import mage.players.Player; import mage.players.PlayerList; -import java.util.*; - /** * * @author BetaSteward_at_googlemail.com @@ -89,9 +87,9 @@ public abstract class DraftImpl implements Draft { DraftPlayer newDraftPlayer = new DraftPlayer(newPlayer); DraftPlayer oldDraftPlayer = players.get(oldPlayer.getId()); newDraftPlayer.setBooster(oldDraftPlayer.getBooster()); - Map newPlayers = new LinkedHashMap<>(); + Map newPlayers = new LinkedHashMap<>(); synchronized (players) { - for(Map.Entry entry :players.entrySet()) { + for (Map.Entry entry : players.entrySet()) { if (entry.getKey().equals(oldPlayer.getId())) { newPlayers.put(newPlayer.getId(), newDraftPlayer); } else { @@ -99,7 +97,7 @@ public abstract class DraftImpl implements Draft { } } players.clear(); - for (Map.Entry entry: newPlayers.entrySet()) { + for (Map.Entry entry : newPlayers.entrySet()) { players.put(entry.getKey(), entry.getValue()); } } @@ -109,7 +107,7 @@ public abstract class DraftImpl implements Draft { currentId = newPlayer.getId(); } table.clear(); - for(UUID playerId : players.keySet()) { + for (UUID playerId : players.keySet()) { table.add(playerId); } @@ -117,7 +115,9 @@ public abstract class DraftImpl implements Draft { } if (oldDraftPlayer.isPicking()) { newDraftPlayer.setPicking(); - newDraftPlayer.getPlayer().pickCard(newDraftPlayer.getBooster(), newDraftPlayer.getDeck(), this); + if (!newDraftPlayer.getBooster().isEmpty()) { + newDraftPlayer.getPlayer().pickCard(newDraftPlayer.getBooster(), newDraftPlayer.getDeck(), this); + } } return true; } @@ -143,7 +143,7 @@ public abstract class DraftImpl implements Draft { /** * Number of boosters that each player gets in this draft - * + * * @return */ @Override @@ -151,7 +151,6 @@ public abstract class DraftImpl implements Draft { return numberBoosters; } - @Override public List getSets() { return sets; @@ -219,10 +218,9 @@ public abstract class DraftImpl implements Draft { } } - protected void openBooster() { if (boosterNum < numberBoosters) { - for (DraftPlayer player: players.values()) { + for (DraftPlayer player : players.values()) { if (draftCube != null) { player.setBooster(draftCube.createBooster()); } else { @@ -237,25 +235,26 @@ public abstract class DraftImpl implements Draft { protected boolean pickCards() { cardNum++; - for (DraftPlayer player: players.values()) { + for (DraftPlayer player : players.values()) { if (player.getBooster().isEmpty()) { return false; } player.setPicking(); player.getPlayer().pickCard(player.getBooster(), player.getDeck(), this); } - synchronized(this) { + synchronized (this) { while (!donePicking()) { try { this.wait(); - } catch (InterruptedException ex) { } + } catch (InterruptedException ex) { + } } } return true; } protected boolean donePicking() { - if(isAbort()) { + if (isAbort()) { return true; } return players.values() @@ -304,14 +303,14 @@ public abstract class DraftImpl implements Draft { public boolean addPick(UUID playerId, UUID cardId, Set hiddenCards) { DraftPlayer player = players.get(playerId); if (player.isPicking()) { - for (Card card: player.booster) { + for (Card card : player.booster) { if (card.getId().equals(cardId)) { player.addPick(card, hiddenCards); player.booster.remove(card); break; } } - synchronized(this) { + synchronized (this) { this.notifyAll(); } } @@ -341,7 +340,7 @@ public abstract class DraftImpl implements Draft { @Override public void resetBufferedCards() { Set setsDone = new HashSet<>(); - for(ExpansionSet set: sets) { + for (ExpansionSet set : sets) { if (!setsDone.contains(set)) { set.removeSavedCards(); setsDone.add(set); @@ -350,5 +349,4 @@ public abstract class DraftImpl implements Draft { } - } diff --git a/Mage/src/main/java/mage/game/events/GameEvent.java b/Mage/src/main/java/mage/game/events/GameEvent.java index 5033931abc..b6b65c4847 100644 --- a/Mage/src/main/java/mage/game/events/GameEvent.java +++ b/Mage/src/main/java/mage/game/events/GameEvent.java @@ -91,6 +91,7 @@ public class GameEvent implements Serializable { EMPTY_DRAW, DRAW_CARDS, // applies to an instruction to draw more than one card before any replacement effects apply to individual cards drawn DRAW_CARD, DREW_CARD, + EXPLORED, MIRACLE_CARD_REVEALED, MADNESS_CARD_EXILED, INVESTIGATED, diff --git a/Mage/src/main/java/mage/game/permanent/Permanent.java b/Mage/src/main/java/mage/game/permanent/Permanent.java index c7d0a4c1d2..fedf9aad48 100644 --- a/Mage/src/main/java/mage/game/permanent/Permanent.java +++ b/Mage/src/main/java/mage/game/permanent/Permanent.java @@ -27,6 +27,9 @@ */ package mage.game.permanent; +import java.util.List; +import java.util.Set; +import java.util.UUID; import mage.MageObject; import mage.MageObjectReference; import mage.abilities.Ability; @@ -37,10 +40,6 @@ import mage.game.Controllable; import mage.game.Game; import mage.game.GameState; -import java.util.List; -import java.util.Set; -import java.util.UUID; - public interface Permanent extends Card, Controllable { void setControllerId(UUID controllerId); @@ -194,6 +193,8 @@ public interface Permanent extends Card, Controllable { boolean isAttacking(); + boolean isBlocked(Game game); + int getBlocking(); void setAttacking(boolean attacking); @@ -223,16 +224,24 @@ public interface Permanent extends Card, Controllable { */ void setMaxBlockedBy(int maxBlockedBy); - boolean canAttack(Game game); - /** * - * @param defenderId id of planeswalker or player to attack + * @param defenderId id of planeswalker or player to attack - can be empty + * to check generally * @param game * @return */ boolean canAttack(UUID defenderId, Game game); + /** + * Checks if a creature can attack (also if it is tapped) + * + * @param defenderId + * @param game + * @return + */ + boolean canAttackInPrinciple(UUID defenderId, Game game); + boolean canBlock(UUID attackerId, Game game); boolean canBlockAny(Game game); diff --git a/Mage/src/main/java/mage/game/permanent/PermanentImpl.java b/Mage/src/main/java/mage/game/permanent/PermanentImpl.java index 106e61bcdf..f4bd39bb1a 100644 --- a/Mage/src/main/java/mage/game/permanent/PermanentImpl.java +++ b/Mage/src/main/java/mage/game/permanent/PermanentImpl.java @@ -27,6 +27,7 @@ */ package mage.game.permanent; +import java.util.*; import mage.MageObject; import mage.MageObjectReference; import mage.ObjectColor; @@ -36,6 +37,7 @@ import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.Effect; import mage.abilities.effects.RestrictionEffect; import mage.abilities.keyword.*; +import mage.abilities.text.TextPart; import mage.cards.Card; import mage.cards.CardImpl; import mage.constants.*; @@ -46,6 +48,7 @@ import mage.game.Game; import mage.game.GameState; import mage.game.ZoneChangeInfo; import mage.game.ZonesHandler; +import mage.game.combat.CombatGroup; import mage.game.command.CommandObject; import mage.game.events.*; import mage.game.events.GameEvent.EventType; @@ -55,8 +58,6 @@ import mage.players.Player; import mage.util.GameLog; import mage.util.ThreadLocalStringBuilder; -import java.util.*; - /** * @author BetaSteward_at_googlemail.com */ @@ -204,6 +205,9 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { this.minBlockedBy = 1; this.maxBlockedBy = 0; this.copy = false; + for (TextPart textPart : textParts) { + textPart.reset(); + } } @Override @@ -506,6 +510,16 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { return attacking; } + @Override + public boolean isBlocked(Game game) { + for (CombatGroup combatGroup : game.getCombat().getGroups()) { + if (combatGroup.getBlocked() && combatGroup.getAttackers().contains(this.getId())) { + return true; + } + } + return false; + } + @Override public int getBlocking() { return blocking; @@ -926,7 +940,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { @Override public boolean cantBeAttachedBy(MageObject source, Game game) { for (ProtectionAbility ability : this.getAbilities(game).getProtectionAbilities()) { - if (!(source.getSubtype(game).contains(SubType.AURA) + if (!(source.hasSubtype(SubType.AURA, game) && !ability.removesAuras()) && !source.getId().equals(ability.getAuraIdNotToBeRemoved()) && !ability.canTarget(source, game)) { @@ -1026,16 +1040,16 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { return game.replaceEvent(GameEvent.getEvent(eventType, this.objectId, ownerId));// controllerId seems to me more logical (LevelX2) } - @Override - public boolean canAttack(Game game) { - return canAttack(null, game); - } - @Override public boolean canAttack(UUID defenderId, Game game) { if (tapped) { return false; } + return canAttackInPrinciple(defenderId, game); + } + + @Override + public boolean canAttackInPrinciple(UUID defenderId, Game game) { if (hasSummoningSickness() && !game.getContinuousEffects().asThough(this.objectId, AsThoughEffectType.ATTACK_AS_HASTE, this.getControllerId(), game)) { return false; } @@ -1210,7 +1224,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { @Override public boolean imprint(UUID imprintedCard, Game game) { - if (!game.getExile().containsId(imprintedCard, game)){ + if (!game.getExile().containsId(imprintedCard, game)) { return false; } if (connectedCards.containsKey("imprint")) { diff --git a/Mage/src/main/java/mage/game/permanent/token/ATATToken.java b/Mage/src/main/java/mage/game/permanent/token/ATATToken.java index 73e71fa468..e282ed722b 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ATATToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ATATToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; @@ -45,7 +46,7 @@ public class ATATToken extends Token { cardType.add(CardType.ARTIFACT); color.setWhite(true); addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new TrooperToken(), 2))); - subtype.add("AT-AT"); + subtype.add(SubType.ATAT); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/AbhorrentOverlordHarpyToken.java b/Mage/src/main/java/mage/game/permanent/token/AbhorrentOverlordHarpyToken.java index f1acb99180..aea4aa9903 100644 --- a/Mage/src/main/java/mage/game/permanent/token/AbhorrentOverlordHarpyToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/AbhorrentOverlordHarpyToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -42,7 +43,7 @@ public class AbhorrentOverlordHarpyToken extends Token { super("Harpy", "1/1 black Harpy creature tokens with flying"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Harpy"); + subtype.add(SubType.HARPY); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/AerieWorshippersBirdToken.java b/Mage/src/main/java/mage/game/permanent/token/AerieWorshippersBirdToken.java index fafc54defc..160c4d4047 100644 --- a/Mage/src/main/java/mage/game/permanent/token/AerieWorshippersBirdToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/AerieWorshippersBirdToken.java @@ -30,6 +30,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -44,7 +45,7 @@ public class AerieWorshippersBirdToken extends Token { cardType.add(CardType.ENCHANTMENT); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Bird"); + subtype.add(SubType.BIRD); power = new MageInt(2); toughness = new MageInt(2); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/AkoumStonewakerElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/AkoumStonewakerElementalToken.java index 16858815e5..81f406e432 100644 --- a/Mage/src/main/java/mage/game/permanent/token/AkoumStonewakerElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/AkoumStonewakerElementalToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.TrampleAbility; @@ -43,7 +44,7 @@ public class AkoumStonewakerElementalToken extends Token { super("Elemental", "3/1 red Elemental creature token with trample and haste"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(3); toughness = new MageInt(1); this.addAbility(TrampleAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/AkroanSoldierToken.java b/Mage/src/main/java/mage/game/permanent/token/AkroanSoldierToken.java index 189f1be7d3..b74428880f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/AkroanSoldierToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/AkroanSoldierToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.HasteAbility; @@ -42,7 +43,7 @@ public class AkroanSoldierToken extends Token { setTokenType(3); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Soldier"); + subtype.add(SubType.SOLDIER); power = new MageInt(1); toughness = new MageInt(1); this.addAbility(HasteAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/AngelToken.java b/Mage/src/main/java/mage/game/permanent/token/AngelToken.java index 318d8c066b..c86ba86678 100644 --- a/Mage/src/main/java/mage/game/permanent/token/AngelToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/AngelToken.java @@ -6,6 +6,7 @@ import java.util.List; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.constants.CardType; +import mage.constants.SubType; public class AngelToken extends Token { @@ -26,7 +27,7 @@ public class AngelToken extends Token { cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Angel"); + subtype.add(SubType.ANGEL); power = new MageInt(4); toughness = new MageInt(4); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/AnotherSpiritToken.java b/Mage/src/main/java/mage/game/permanent/token/AnotherSpiritToken.java index b59d8097bf..58cb310943 100644 --- a/Mage/src/main/java/mage/game/permanent/token/AnotherSpiritToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/AnotherSpiritToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -41,7 +42,7 @@ public class AnotherSpiritToken extends Token { super("Spirit", "3/3 white Spirit creature token with flying"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); power = new MageInt(3); toughness = new MageInt(3); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/AnthousaWarriorToken.java b/Mage/src/main/java/mage/game/permanent/token/AnthousaWarriorToken.java index 657ab6ab59..5cd59f5aaf 100644 --- a/Mage/src/main/java/mage/game/permanent/token/AnthousaWarriorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/AnthousaWarriorToken.java @@ -32,6 +32,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -43,7 +44,7 @@ public class AnthousaWarriorToken extends Token { public AnthousaWarriorToken() { super("", "2/2 Warrior creatures"); cardType.add(CardType.CREATURE); - subtype.add("Warrior"); + subtype.add(SubType.WARRIOR); power = new MageInt(2); toughness = new MageInt(2); } diff --git a/Mage/src/main/java/mage/game/permanent/token/ApeToken.java b/Mage/src/main/java/mage/game/permanent/token/ApeToken.java index f28ce8fc43..a100952596 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ApeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ApeToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class ApeToken extends Token { super("Ape", "2/2 green Ape creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Ape"); + subtype.add(SubType.APE); power = new MageInt(2); toughness = new MageInt(2); } diff --git a/Mage/src/main/java/mage/game/permanent/token/ArchitectOfTheUntamedBeastToken.java b/Mage/src/main/java/mage/game/permanent/token/ArchitectOfTheUntamedBeastToken.java index 2d72df573b..abdd03049b 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ArchitectOfTheUntamedBeastToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ArchitectOfTheUntamedBeastToken.java @@ -32,6 +32,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -44,7 +45,7 @@ public class ArchitectOfTheUntamedBeastToken extends Token { super("Beast", "6/6 colorless Beast artifact creature token"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Beast"); + subtype.add(SubType.BEAST); power = new MageInt(6); toughness = new MageInt(6); } diff --git a/Mage/src/main/java/mage/game/permanent/token/AssassinToken.java b/Mage/src/main/java/mage/game/permanent/token/AssassinToken.java index 026037100c..47f25b10e7 100644 --- a/Mage/src/main/java/mage/game/permanent/token/AssassinToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/AssassinToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.effects.common.LoseGameTargetPlayerEffect; @@ -43,7 +44,7 @@ public class AssassinToken extends Token { super("Assassin", "1/1 black Assassin creature tokens with \"Whenever this creature deals combat damage to a player, that player loses the game.\""); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Assassin"); + subtype.add(SubType.ASSASSIN); power = new MageInt(1); toughness = new MageInt(1); addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new LoseGameTargetPlayerEffect(), false, true)); diff --git a/Mage/src/main/java/mage/game/permanent/token/AssemblyWorkerToken.java b/Mage/src/main/java/mage/game/permanent/token/AssemblyWorkerToken.java index 08ddc464d3..1de7c226aa 100644 --- a/Mage/src/main/java/mage/game/permanent/token/AssemblyWorkerToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/AssemblyWorkerToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class AssemblyWorkerToken extends Token { super("Assembly-Worker", "2/2 Assembly-Worker artifact creature"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - this.subtype.add("Assembly-Worker"); + this.subtype.add(SubType.ASSEMBLY_WORKER); power = new MageInt(2); toughness = new MageInt(2); } diff --git a/Mage/src/main/java/mage/game/permanent/token/AvatarToken.java b/Mage/src/main/java/mage/game/permanent/token/AvatarToken.java index 865f295706..7148509b88 100644 --- a/Mage/src/main/java/mage/game/permanent/token/AvatarToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/AvatarToken.java @@ -30,6 +30,7 @@ package mage.game.permanent.token; import mage.abilities.Ability; import mage.constants.CardType; +import mage.constants.SubType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousEffectImpl; import mage.constants.Duration; @@ -50,7 +51,7 @@ public class AvatarToken extends Token { public AvatarToken() { super("Avatar", "white Avatar creature token with \"This creature's power and toughness are each equal to your life total.\""); cardType.add(CardType.CREATURE); - subtype.add("Avatar"); + subtype.add(SubType.AVATAR); color.setWhite(true); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AvatarTokenEffect())); } diff --git a/Mage/src/main/java/mage/game/permanent/token/BalduvianToken.java b/Mage/src/main/java/mage/game/permanent/token/BalduvianToken.java index 11f750fbd6..bc979dc26c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BalduvianToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BalduvianToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.HasteAbility; @@ -44,7 +45,7 @@ public class BalduvianToken extends Token { color.setRed(true); power = new MageInt(3); toughness = new MageInt(1); - subtype.add("Graveborn"); + subtype.add(SubType.GRAVEBORN); addAbility(HasteAbility.getInstance()); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/BaruFistOfKrosaToken.java b/Mage/src/main/java/mage/game/permanent/token/BaruFistOfKrosaToken.java index a2db539e2a..f02508dd2d 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BaruFistOfKrosaToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BaruFistOfKrosaToken.java @@ -32,6 +32,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -48,7 +49,7 @@ public class BaruFistOfKrosaToken extends Token { super("Wurm", "X/X green Wurm creature token, where X is the number of lands you control"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Wurm"); + subtype.add(SubType.WURM); power = new MageInt(xValue); toughness = new MageInt(xValue); } diff --git a/Mage/src/main/java/mage/game/permanent/token/BatToken.java b/Mage/src/main/java/mage/game/permanent/token/BatToken.java index 0ae8fa20fe..7f6acbdf58 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BatToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BatToken.java @@ -3,6 +3,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.constants.CardType; +import mage.constants.SubType; public class BatToken extends Token { @@ -10,7 +11,7 @@ public class BatToken extends Token { super("Bat", "1/1 black Bat creature token with flying"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Bat"); + subtype.add(SubType.BAT); power = new MageInt(1); toughness = new MageInt(1); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/BearToken.java b/Mage/src/main/java/mage/game/permanent/token/BearToken.java index 66b6f1674d..a54e86137a 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BearToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BearToken.java @@ -30,6 +30,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class BearToken extends Token { super("Bear", "2/2 green Bear creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Bear"); + subtype.add(SubType.BEAR); power = new MageInt(2); toughness = new MageInt(2); } diff --git a/Mage/src/main/java/mage/game/permanent/token/BearsCompanionBearToken.java b/Mage/src/main/java/mage/game/permanent/token/BearsCompanionBearToken.java index 17c1627ad6..84135d0079 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BearsCompanionBearToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BearsCompanionBearToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,7 +42,7 @@ public class BearsCompanionBearToken extends Token { setOriginalExpansionSetCode("KTK"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Bear"); + subtype.add(SubType.BEAR); power = new MageInt(4); toughness = new MageInt(4); } diff --git a/Mage/src/main/java/mage/game/permanent/token/BeastToken.java b/Mage/src/main/java/mage/game/permanent/token/BeastToken.java index 042fe4ff1e..5e416b6ed1 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BeastToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BeastToken.java @@ -32,6 +32,7 @@ import java.util.Arrays; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -59,7 +60,7 @@ public class BeastToken extends Token { setOriginalExpansionSetCode(setCode); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Beast"); + subtype.add(SubType.BEAST); power = new MageInt(3); toughness = new MageInt(3); diff --git a/Mage/src/main/java/mage/game/permanent/token/BeastToken2.java b/Mage/src/main/java/mage/game/permanent/token/BeastToken2.java index 8ebf665a7a..7bba12d976 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BeastToken2.java +++ b/Mage/src/main/java/mage/game/permanent/token/BeastToken2.java @@ -32,6 +32,7 @@ import java.util.Arrays; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -59,7 +60,7 @@ public class BeastToken2 extends Token { setOriginalExpansionSetCode(setCode); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Beast"); + subtype.add(SubType.BEAST); power = new MageInt(4); toughness = new MageInt(4); } diff --git a/Mage/src/main/java/mage/game/permanent/token/BeastToken3.java b/Mage/src/main/java/mage/game/permanent/token/BeastToken3.java index 450a8640ba..74300155e6 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BeastToken3.java +++ b/Mage/src/main/java/mage/game/permanent/token/BeastToken3.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -49,7 +50,7 @@ public class BeastToken3 extends Token { setOriginalExpansionSetCode("AKH"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Beast"); + subtype.add(SubType.BEAST); power = new MageInt(4); toughness = new MageInt(2); } diff --git a/Mage/src/main/java/mage/game/permanent/token/BeckonApparitionToken.java b/Mage/src/main/java/mage/game/permanent/token/BeckonApparitionToken.java index 9e7753f75a..41e5ca8fba 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BeckonApparitionToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BeckonApparitionToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -43,7 +44,7 @@ public class BeckonApparitionToken extends Token { cardType.add(CardType.CREATURE); color.setWhite(true); color.setBlack(true); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); power = new MageInt(1); toughness = new MageInt(1); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/BirdSoldierToken.java b/Mage/src/main/java/mage/game/permanent/token/BirdSoldierToken.java index f32d1f99ad..e5db23fa9d 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BirdSoldierToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BirdSoldierToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -40,7 +41,7 @@ public class BirdSoldierToken extends Token { public BirdSoldierToken() { super("Bird Soldier", "1/1 white Bird Soldier creature with flying"); cardType.add(CardType.CREATURE); - subtype.add("Bird"); + subtype.add(SubType.BIRD); color.setWhite(true); power = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/BirdToken.java b/Mage/src/main/java/mage/game/permanent/token/BirdToken.java index 6babfef8b3..e918308843 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BirdToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BirdToken.java @@ -32,6 +32,7 @@ import java.util.Arrays; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class BirdToken extends Token { super("Bird", "1/1 white Bird creature token with flying"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Bird"); + subtype.add(SubType.BIRD); power = new MageInt(1); toughness = new MageInt(1); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/BoarToken.java b/Mage/src/main/java/mage/game/permanent/token/BoarToken.java index baa19434d3..0661651b57 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BoarToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BoarToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class BoarToken extends Token { super("Boar", "3/3 green Boar creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Boar"); + subtype.add(SubType.BOAR); power = new MageInt(3); toughness = new MageInt(3); } diff --git a/Mage/src/main/java/mage/game/permanent/token/BreedingPitThrullToken.java b/Mage/src/main/java/mage/game/permanent/token/BreedingPitThrullToken.java index 33dde09e53..04976cc413 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BreedingPitThrullToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BreedingPitThrullToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -39,7 +40,7 @@ public class BreedingPitThrullToken extends Token { public BreedingPitThrullToken() { super("Thrull", "0/1 black Thrull creature token"); cardType.add(CardType.CREATURE); - subtype.add("Thrull"); + subtype.add(SubType.THRULL); color.setBlack(true); power = new MageInt(0); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/BroodKeeperDragonToken.java b/Mage/src/main/java/mage/game/permanent/token/BroodKeeperDragonToken.java index 05f0117755..cee7d55e6b 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BroodKeeperDragonToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BroodKeeperDragonToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; @@ -47,7 +48,7 @@ public class BroodKeeperDragonToken extends Token { this.setOriginalExpansionSetCode("M15"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Dragon"); + subtype.add(SubType.DRAGON); power = new MageInt(2); toughness = new MageInt(2); diff --git a/Mage/src/main/java/mage/game/permanent/token/ButterflyToken.java b/Mage/src/main/java/mage/game/permanent/token/ButterflyToken.java index 50f66be9d0..a7ea17d877 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ButterflyToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ButterflyToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -41,7 +42,7 @@ public class ButterflyToken extends Token { super("Butterfly", "1/1 green Insect creature token with flying named Butterfly"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Insect"); + subtype.add(SubType.INSECT); power = new MageInt(1); toughness = new MageInt(1); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/CallTheSkyBreakerElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/CallTheSkyBreakerElementalToken.java index 34a96baa0b..1595e4c128 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CallTheSkyBreakerElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CallTheSkyBreakerElementalToken.java @@ -30,6 +30,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class CallTheSkyBreakerElementalToken extends Token { cardType.add(CardType.CREATURE); color.setBlue(true); color.setRed(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("EMA")) { setTokenType(2); } diff --git a/Mage/src/main/java/mage/game/permanent/token/CamaridToken.java b/Mage/src/main/java/mage/game/permanent/token/CamaridToken.java index c6cd560223..8da6341b16 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CamaridToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CamaridToken.java @@ -25,9 +25,10 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.game.permanent.token; + import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class CamaridToken extends Token { this.getPower().modifyBaseValue(1); this.getToughness().modifyBaseValue(1); this.color.setBlue(true); - this.getSubtype(null).add("Camarid"); + this.getSubtype(null).add(SubType.CAMARID); this.addCardType(CardType.CREATURE); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/CaribouToken.java b/Mage/src/main/java/mage/game/permanent/token/CaribouToken.java index 3116180784..17deaabd3f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CaribouToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CaribouToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class CaribouToken extends Token { super("Caribou", "0/1 white Caribou creature token"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Caribou"); + subtype.add(SubType.CARIBOU); power = new MageInt(0); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/CarnivoreToken.java b/Mage/src/main/java/mage/game/permanent/token/CarnivoreToken.java index 02541ca713..9cd40a0a87 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CarnivoreToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CarnivoreToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class CarnivoreToken extends Token { super("Carnivore", "3/1 red Beast creature token"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Beast"); + subtype.add(SubType.BEAST); power = new MageInt(3); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/CarrionBlackInsectToken.java b/Mage/src/main/java/mage/game/permanent/token/CarrionBlackInsectToken.java index 764b99070a..e9224511de 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CarrionBlackInsectToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CarrionBlackInsectToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class CarrionBlackInsectToken extends Token { super("Insect", "0/1 black Insect creature token"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Insect"); + subtype.add(SubType.INSECT); power = new MageInt(0); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/CatSoldierCreatureToken.java b/Mage/src/main/java/mage/game/permanent/token/CatSoldierCreatureToken.java index 566146bd28..97d8373769 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CatSoldierCreatureToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CatSoldierCreatureToken.java @@ -30,6 +30,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.abilities.keyword.VigilanceAbility; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.Token; /** @@ -43,8 +44,8 @@ public class CatSoldierCreatureToken extends Token { cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Cat"); - subtype.add("Soldier"); + subtype.add(SubType.CAT); + subtype.add(SubType.SOLDIER); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/CatToken.java b/Mage/src/main/java/mage/game/permanent/token/CatToken.java index b88e700998..817e9e5780 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CatToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CatToken.java @@ -33,6 +33,7 @@ import java.util.Arrays; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -60,7 +61,7 @@ public class CatToken extends Token { setOriginalExpansionSetCode(setCode); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Cat"); + subtype.add(SubType.CAT); power = new MageInt(2); toughness = new MageInt(2); } diff --git a/Mage/src/main/java/mage/game/permanent/token/CatToken2.java b/Mage/src/main/java/mage/game/permanent/token/CatToken2.java index 2e664ec2d5..91f7f086e7 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CatToken2.java +++ b/Mage/src/main/java/mage/game/permanent/token/CatToken2.java @@ -31,6 +31,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.abilities.keyword.LifelinkAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -51,7 +52,7 @@ public class CatToken2 extends Token { setOriginalExpansionSetCode("AKH"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Cat"); + subtype.add(SubType.CAT); power = new MageInt(1); toughness = new MageInt(1); addAbility(LifelinkAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/CatWarriorToken.java b/Mage/src/main/java/mage/game/permanent/token/CatWarriorToken.java index 4e2d45467d..1d04241095 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CatWarriorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CatWarriorToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.constants.CardType; import mage.abilities.keyword.ForestwalkAbility; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class CatWarriorToken extends Token { this.getPower().modifyBaseValue(2); this.getToughness().modifyBaseValue(2); this.color.setGreen(true); - this.getSubtype(null).add("Cat"); - this.getSubtype(null).add("Warrior"); + this.getSubtype(null).add(SubType.CAT); + this.getSubtype(null).add(SubType.WARRIOR); this.addCardType(CardType.CREATURE); this.addAbility(new ForestwalkAbility()); } diff --git a/Mage/src/main/java/mage/game/permanent/token/CentaurEnchantmentCreatureToken.java b/Mage/src/main/java/mage/game/permanent/token/CentaurEnchantmentCreatureToken.java index 0fb1641405..275c4088f9 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CentaurEnchantmentCreatureToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CentaurEnchantmentCreatureToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.Token; /** @@ -42,7 +43,7 @@ public class CentaurEnchantmentCreatureToken extends Token { cardType.add(CardType.ENCHANTMENT); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Centaur"); + subtype.add(SubType.CENTAUR); power = new MageInt(3); toughness = new MageInt(3); this.setOriginalExpansionSetCode("BNG"); diff --git a/Mage/src/main/java/mage/game/permanent/token/CentaurToken.java b/Mage/src/main/java/mage/game/permanent/token/CentaurToken.java index 57f0be773b..578ef67768 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CentaurToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CentaurToken.java @@ -32,6 +32,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.util.RandomUtil; @@ -52,7 +53,7 @@ public class CentaurToken extends Token { cardType.add(CardType.CREATURE); setTokenType(RandomUtil.nextInt(2) +1); // randomly take image 1 or 2 color.setGreen(true); - subtype.add("Centaur"); + subtype.add(SubType.CENTAUR); power = new MageInt(3); toughness = new MageInt(3); } diff --git a/Mage/src/main/java/mage/game/permanent/token/ChasmSkulkerSquidToken.java b/Mage/src/main/java/mage/game/permanent/token/ChasmSkulkerSquidToken.java index 29fd4f40e2..9cd1ee70c2 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ChasmSkulkerSquidToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ChasmSkulkerSquidToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.IslandwalkAbility; @@ -42,7 +43,7 @@ public class ChasmSkulkerSquidToken extends Token { this.setOriginalExpansionSetCode("M15"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Squid"); + subtype.add(SubType.SQUID); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/CitizenToken.java b/Mage/src/main/java/mage/game/permanent/token/CitizenToken.java index 938036389c..b1bc366b6f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CitizenToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CitizenToken.java @@ -30,6 +30,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class CitizenToken extends Token { cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Citizen"); + subtype.add(SubType.CITIZEN); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/CloudSpriteToken.java b/Mage/src/main/java/mage/game/permanent/token/CloudSpriteToken.java index 370d543b6b..8e6323301f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CloudSpriteToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CloudSpriteToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.common.CanBlockOnlyFlyingAbility; import mage.abilities.keyword.FlyingAbility; @@ -43,7 +44,7 @@ public class CloudSpriteToken extends Token { this.setOriginalExpansionSetCode("FUT"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Faerie"); + subtype.add(SubType.FAERIE); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/ConstructToken.java b/Mage/src/main/java/mage/game/permanent/token/ConstructToken.java index a746701226..6c4d51096f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ConstructToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ConstructToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.DefenderAbility; @@ -46,7 +47,7 @@ public class ConstructToken extends Token { this.setOriginalExpansionSetCode(setCode); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Construct"); + subtype.add(SubType.CONSTRUCT); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/CoralBarrierSquidToken.java b/Mage/src/main/java/mage/game/permanent/token/CoralBarrierSquidToken.java index 5d05d69246..a78c9d8056 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CoralBarrierSquidToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CoralBarrierSquidToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.IslandwalkAbility; @@ -42,7 +43,7 @@ public class CoralBarrierSquidToken extends Token { this.setOriginalExpansionSetCode("M15"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Squid"); + subtype.add(SubType.SQUID); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/CorpseweftZombieToken.java b/Mage/src/main/java/mage/game/permanent/token/CorpseweftZombieToken.java index 4aa0a16126..188493fda9 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CorpseweftZombieToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CorpseweftZombieToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -43,8 +44,8 @@ public class CorpseweftZombieToken extends Token { public CorpseweftZombieToken(int power, int toughness) { super("Zombie Horror", "X/X black Zombie Horror creature token, where X is twice the number of cards exiled this way"); cardType.add(CardType.CREATURE); - subtype.add("Zombie"); - subtype.add("Horror"); + subtype.add(SubType.ZOMBIE); + subtype.add(SubType.HORROR); color.setBlack(true); this.power = new MageInt(power); this.toughness = new MageInt(toughness); diff --git a/Mage/src/main/java/mage/game/permanent/token/CorruptedZendikonOozeToken.java b/Mage/src/main/java/mage/game/permanent/token/CorruptedZendikonOozeToken.java index 4f6f355fa0..6df769b69d 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CorruptedZendikonOozeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CorruptedZendikonOozeToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class CorruptedZendikonOozeToken extends Token { super("Ooze", "3/3 black Ooze creature"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Ooze"); + subtype.add(SubType.OOZE); this.power = new MageInt(3); this.toughness = new MageInt(3); } diff --git a/Mage/src/main/java/mage/game/permanent/token/CreakwoodLiegeToken.java b/Mage/src/main/java/mage/game/permanent/token/CreakwoodLiegeToken.java index 9bf1f3a611..11699a7019 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CreakwoodLiegeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CreakwoodLiegeToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,7 +42,7 @@ public class CreakwoodLiegeToken extends Token { cardType.add(CardType.CREATURE); color.setBlack(true); color.setGreen(true); - subtype.add("Worm"); + subtype.add(SubType.WORM); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/CrestedSunmareToken.java b/Mage/src/main/java/mage/game/permanent/token/CrestedSunmareToken.java index 5c102cd8ae..4bcb277751 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CrestedSunmareToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CrestedSunmareToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,7 +42,7 @@ public class CrestedSunmareToken extends Token { power = new MageInt(5); toughness = new MageInt(5); color.setWhite(true); - subtype.add("Horse"); + subtype.add(SubType.HORSE); cardType.add(CardType.CREATURE); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/CribSwapShapeshifterWhiteToken.java b/Mage/src/main/java/mage/game/permanent/token/CribSwapShapeshifterWhiteToken.java index 7aa0150ecb..9058f6c631 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CribSwapShapeshifterWhiteToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CribSwapShapeshifterWhiteToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.ChangelingAbility; @@ -41,7 +42,7 @@ public class CribSwapShapeshifterWhiteToken extends Token { super("Shapeshifter", "1/1 colorless Shapeshifter creature token with changeling"); this.setOriginalExpansionSetCode("LRW"); cardType.add(CardType.CREATURE); - subtype.add("Shapeshifter"); + subtype.add(SubType.SHAPESHIFTER); power = new MageInt(1); toughness = new MageInt(1); addAbility(ChangelingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/CrushOfTentaclesToken.java b/Mage/src/main/java/mage/game/permanent/token/CrushOfTentaclesToken.java index fb9c597372..68b84ac610 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CrushOfTentaclesToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CrushOfTentaclesToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,7 +42,7 @@ public class CrushOfTentaclesToken extends Token { this.setExpansionSetCodeForImage("BFZ"); this.cardType.add(CardType.CREATURE); this.color.setBlue(true); - this.subtype.add("Octopus"); + this.subtype.add(SubType.OCTOPUS); this.power = new MageInt(8); this.toughness = new MageInt(8); } diff --git a/Mage/src/main/java/mage/game/permanent/token/CurseOfTheSwineBoarToken.java b/Mage/src/main/java/mage/game/permanent/token/CurseOfTheSwineBoarToken.java index 6c1afdf6ba..48794ab47a 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CurseOfTheSwineBoarToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CurseOfTheSwineBoarToken.java @@ -32,6 +32,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -44,7 +45,7 @@ public class CurseOfTheSwineBoarToken extends Token { super("Boar", "2/2 green Boar creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Boar"); + subtype.add(SubType.BOAR); power = new MageInt(2); toughness = new MageInt(2); } diff --git a/Mage/src/main/java/mage/game/permanent/token/DarettiConstructToken.java b/Mage/src/main/java/mage/game/permanent/token/DarettiConstructToken.java index a0a5fe4db2..5cda40be04 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DarettiConstructToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DarettiConstructToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.DefenderAbility; @@ -46,7 +47,7 @@ public class DarettiConstructToken extends Token { this.setOriginalExpansionSetCode(setCode); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Construct"); + subtype.add(SubType.CONSTRUCT); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/DaxosSpiritToken.java b/Mage/src/main/java/mage/game/permanent/token/DaxosSpiritToken.java index 4403dd058b..51192985f8 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DaxosSpiritToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DaxosSpiritToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.MageObjectReference; import mage.abilities.Ability; @@ -57,7 +58,7 @@ public class DaxosSpiritToken extends Token { cardType.add(CardType.CREATURE); color.setWhite(true); color.setBlack(true); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); power = new MageInt(0); toughness = new MageInt(0); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DaxosSpiritSetPTEffect())); diff --git a/Mage/src/main/java/mage/game/permanent/token/DeadlyGrubToken.java b/Mage/src/main/java/mage/game/permanent/token/DeadlyGrubToken.java index 8def318f67..979359d9b3 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DeadlyGrubToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DeadlyGrubToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.ShroudAbility; @@ -41,7 +42,7 @@ public class DeadlyGrubToken extends Token { super("Insect", "6/1 green Insect creature token with shroud"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Insect"); + subtype.add(SubType.INSECT); power = new MageInt(6); toughness = new MageInt(1); this.addAbility(ShroudAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/DeathpactAngelToken.java b/Mage/src/main/java/mage/game/permanent/token/DeathpactAngelToken.java index de9f456f91..afec4f66e4 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DeathpactAngelToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DeathpactAngelToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -59,7 +60,7 @@ public class DeathpactAngelToken extends Token { color.setWhite(true); color.setBlack(true); - subtype.add("Cleric"); + subtype.add(SubType.CLERIC); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/DeathtouchSnakeToken.java b/Mage/src/main/java/mage/game/permanent/token/DeathtouchSnakeToken.java index e5486d6437..a9c5e45255 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DeathtouchSnakeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DeathtouchSnakeToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.DeathtouchAbility; @@ -41,7 +42,7 @@ public class DeathtouchSnakeToken extends Token { super("Snake", "1/1 green Snake creature token with deathtouch"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Snake"); + subtype.add(SubType.SNAKE); power = new MageInt(1); toughness = new MageInt(1); addAbility(DeathtouchAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/DefenderPlantToken.java b/Mage/src/main/java/mage/game/permanent/token/DefenderPlantToken.java new file mode 100644 index 0000000000..b1915879c1 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/DefenderPlantToken.java @@ -0,0 +1,59 @@ +/* + * 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.game.permanent.token; + +import mage.MageInt; +import mage.abilities.keyword.DefenderAbility; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author TheElk801 + */ +public class DefenderPlantToken extends Token { + + public DefenderPlantToken() { + this(null, 0); + } + + public DefenderPlantToken(String setCode) { + this(setCode, 0); + } + + public DefenderPlantToken(String setCode, int tokenType) { + super("Plant", "0/2 green Plant creature token with defender"); + color.setGreen(true); + cardType.add(CardType.CREATURE); + subtype.add(SubType.PLANT); + power = new MageInt(0); + toughness = new MageInt(2); + + this.addAbility(DefenderAbility.getInstance()); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/DemonToken.java b/Mage/src/main/java/mage/game/permanent/token/DemonToken.java index e1079b741b..ea7fc60f5b 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DemonToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DemonToken.java @@ -32,6 +32,7 @@ import java.util.Arrays; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class DemonToken extends Token { super("Demon", "5/5 black Demon creature token with flying"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Demon"); + subtype.add(SubType.DEMON); power = new MageInt(5); toughness = new MageInt(5); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/cards/decks/InvalidDeckException.java b/Mage/src/main/java/mage/game/permanent/token/DeserterToken.java similarity index 60% rename from Mage/src/main/java/mage/cards/decks/InvalidDeckException.java rename to Mage/src/main/java/mage/game/permanent/token/DeserterToken.java index c4e70bcb68..ec4daf2b44 100644 --- a/Mage/src/main/java/mage/cards/decks/InvalidDeckException.java +++ b/Mage/src/main/java/mage/game/permanent/token/DeserterToken.java @@ -1,5 +1,5 @@ /* -* Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved. +* 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: @@ -11,7 +11,7 @@ * 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 +* 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 @@ -24,38 +24,25 @@ * 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.game.permanent.token; -package mage.cards.decks; - -import java.util.Map; -import java.util.Map.Entry; -import mage.game.GameException; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.MageInt; /** * - * @author BetaSteward_at_googlemail.com + * @author spjspj */ -public class InvalidDeckException extends GameException { +public class DeserterToken extends Token { - Map invalid; - - public InvalidDeckException (String message, Map invalid) { - super(message); - this.invalid = invalid; - } - - public Map getInvalid() { - return invalid; - } - - @Override - public String getMessage() { - StringBuilder sb = new StringBuilder(); - sb.append(super.getMessage()).append('\n'); - for (Entry entry: invalid.entrySet()) { - sb.append(entry.getKey()).append(' ').append(entry.getValue()).append('\n'); - } - return sb.toString(); + public DeserterToken() { + super("Deserter", "0/1 white Deserter creature token"); + cardType.add(CardType.CREATURE); + color.setWhite(true); + subtype.add(SubType.DESERTER); + power = new MageInt(0); + toughness = new MageInt(1); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/DevastatingSummonsElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/DevastatingSummonsElementalToken.java index 2668ffe512..8529088e4e 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DevastatingSummonsElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DevastatingSummonsElementalToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -39,6 +40,6 @@ public class DevastatingSummonsElementalToken extends Token { super("Elemental", "X/X red Elemental creature"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/DevilToken.java b/Mage/src/main/java/mage/game/permanent/token/DevilToken.java index 4b67258340..47dcf6d93f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DevilToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DevilToken.java @@ -35,6 +35,7 @@ import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DamageTargetEffect; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; /** @@ -47,7 +48,7 @@ public class DevilToken extends Token { super("Devil", "1/1 red Devil creature with \"When this creature dies, it deals 1 damage to target creature or player.\""); availableImageSetCodes.addAll(Collections.singletonList("SOI")); cardType.add(CardType.CREATURE); - subtype.add("Devil"); + subtype.add(SubType.DEVIL); color.setRed(true); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/DinOfTheFireherdToken.java b/Mage/src/main/java/mage/game/permanent/token/DinOfTheFireherdToken.java index 84f096daf8..1e38c8c1bb 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DinOfTheFireherdToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DinOfTheFireherdToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -39,7 +40,7 @@ public class DinOfTheFireherdToken extends Token { public DinOfTheFireherdToken() { super("Elemental", "5/5 black and red Elemental creature"); cardType.add(CardType.CREATURE); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); color.setBlack(true); color.setRed(true); power = new MageInt(5); diff --git a/Mage/src/main/java/mage/game/permanent/token/DinosaurToken.java b/Mage/src/main/java/mage/game/permanent/token/DinosaurToken.java new file mode 100644 index 0000000000..8ba4b59073 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/DinosaurToken.java @@ -0,0 +1,50 @@ +/* +* 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.game.permanent.token; + +import mage.constants.CardType; +import mage.MageInt; +import mage.abilities.keyword.TrampleAbility; +import mage.constants.SubType; + +/** + * + * @author TheElk801 + */ +public class DinosaurToken extends Token { + + public DinosaurToken() { + super("Dinosaur", "3/3 green Dinosaur creature token with trample"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add(SubType.DINOSAUR); + power = new MageInt(3); + toughness = new MageInt(3); + addAbility(TrampleAbility.getInstance()); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/DjinnMonkToken.java b/Mage/src/main/java/mage/game/permanent/token/DjinnMonkToken.java index c595f9ab0d..3cb23cc235 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DjinnMonkToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DjinnMonkToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -41,8 +42,8 @@ public class DjinnMonkToken extends Token { super("Djinn Monk", "2/2 blue Djinn Monk creature token with flying"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Djinn"); - subtype.add("Monk"); + subtype.add(SubType.DJINN); + subtype.add(SubType.MONK); power = new MageInt(2); toughness = new MageInt(2); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/DjinnToken.java b/Mage/src/main/java/mage/game/permanent/token/DjinnToken.java index c254a42481..dcfa3bda34 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DjinnToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DjinnToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -41,7 +42,7 @@ public class DjinnToken extends Token { super("Djinn", "5/5 colorless Djinn artifact creature token with flying"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Djinn"); + subtype.add(SubType.DJINN); power = new MageInt(5); toughness = new MageInt(5); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/DokaiWeaverofLifeToken.java b/Mage/src/main/java/mage/game/permanent/token/DokaiWeaverofLifeToken.java index f79a1ff844..5d74281ff3 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DokaiWeaverofLifeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DokaiWeaverofLifeToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.DynamicValue; @@ -50,7 +51,7 @@ public class DokaiWeaverofLifeToken extends Token { super("Elemental", "X/X green Elemental creature token, where X is the number of lands you control"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(0); toughness = new MageInt(0); DynamicValue controlledLands = new PermanentsOnBattlefieldCount(filterLands); diff --git a/Mage/src/main/java/mage/game/permanent/token/DovescapeToken.java b/Mage/src/main/java/mage/game/permanent/token/DovescapeToken.java index 33c8652a10..3cd64164d6 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DovescapeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DovescapeToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -42,7 +43,7 @@ public class DovescapeToken extends Token { cardType.add(CardType.CREATURE); color.setWhite(true); color.setBlue(true); - subtype.add("Bird"); + subtype.add(SubType.BIRD); power = new MageInt(1); toughness = new MageInt(1); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/DragonBroodmotherDragonToken.java b/Mage/src/main/java/mage/game/permanent/token/DragonBroodmotherDragonToken.java index 04c28f886a..dbd0e12b1c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DragonBroodmotherDragonToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DragonBroodmotherDragonToken.java @@ -32,6 +32,7 @@ import mage.abilities.effects.common.DevourEffect; import mage.abilities.keyword.DevourAbility; import mage.abilities.keyword.FlyingAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class DragonBroodmotherDragonToken extends Token { cardType.add(CardType.CREATURE); color.setGreen(true); color.setRed(true); - subtype.add("Dragon"); + subtype.add(SubType.DRAGON); power = new MageInt(1); toughness = new MageInt(1); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/DragonEggDragonToken.java b/Mage/src/main/java/mage/game/permanent/token/DragonEggDragonToken.java index 716c0ee2c6..fd9ceca27c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DragonEggDragonToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DragonEggDragonToken.java @@ -33,6 +33,7 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; @@ -47,7 +48,7 @@ public class DragonEggDragonToken extends Token { this.setOriginalExpansionSetCode("M14"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Dragon"); + subtype.add(SubType.DRAGON); power = new MageInt(2); toughness = new MageInt(2); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/DragonToken.java b/Mage/src/main/java/mage/game/permanent/token/DragonToken.java index 579c9c89c7..8ac9bd92e9 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DragonToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DragonToken.java @@ -34,6 +34,7 @@ import java.util.List; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -61,7 +62,7 @@ public class DragonToken extends Token { setOriginalExpansionSetCode(setCode); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Dragon"); + subtype.add(SubType.DRAGON); power = new MageInt(4); toughness = new MageInt(4); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/DragonToken2.java b/Mage/src/main/java/mage/game/permanent/token/DragonToken2.java index 0b7e7342d9..ca5a62ed0e 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DragonToken2.java +++ b/Mage/src/main/java/mage/game/permanent/token/DragonToken2.java @@ -33,6 +33,7 @@ import java.util.List; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -60,7 +61,7 @@ public class DragonToken2 extends Token { setOriginalExpansionSetCode(setCode); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Dragon"); + subtype.add(SubType.DRAGON); power = new MageInt(5); toughness = new MageInt(5); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/DragonTokenGold.java b/Mage/src/main/java/mage/game/permanent/token/DragonTokenGold.java index 7d6ab86563..b2e3f69fd3 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DragonTokenGold.java +++ b/Mage/src/main/java/mage/game/permanent/token/DragonTokenGold.java @@ -34,6 +34,7 @@ import java.util.List; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -61,7 +62,7 @@ public class DragonTokenGold extends Token { setOriginalExpansionSetCode(setCode); cardType.add(CardType.CREATURE); color.setGold(true); - subtype.add("Dragon"); + subtype.add(SubType.DRAGON); power = new MageInt(4); toughness = new MageInt(4); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/DrakeToken.java b/Mage/src/main/java/mage/game/permanent/token/DrakeToken.java index 50238dd256..7791224ffa 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DrakeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DrakeToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.ObjectColor; import mage.abilities.keyword.FlyingAbility; @@ -41,7 +42,7 @@ public class DrakeToken extends Token { public DrakeToken() { super("Drake", "2/2 blue Drake creature token with flying"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Drake"); + this.subtype.add(SubType.DRAKE); this.color = ObjectColor.BLUE; this.power = new MageInt(2); diff --git a/Mage/src/main/java/mage/game/permanent/token/DroidToken.java b/Mage/src/main/java/mage/game/permanent/token/DroidToken.java index bf94743f5c..3d641d44ff 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DroidToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DroidToken.java @@ -31,6 +31,7 @@ import java.util.Collections; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class DroidToken extends Token { cardType.add(CardType.CREATURE); cardType.add(CardType.ARTIFACT); - subtype.add("Droid"); + subtype.add(SubType.DROID); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/DuneBroodNephilimToken.java b/Mage/src/main/java/mage/game/permanent/token/DuneBroodNephilimToken.java index 6857258cf2..042bb3076c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DuneBroodNephilimToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DuneBroodNephilimToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -39,7 +40,7 @@ public class DuneBroodNephilimToken extends Token { public DuneBroodNephilimToken() { super("Sand", "1/1 colorless Sand creature token"); cardType.add(CardType.CREATURE); - subtype.add("Sand"); + subtype.add(SubType.SAND); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/EdgarMarkovToken.java b/Mage/src/main/java/mage/game/permanent/token/EdgarMarkovToken.java index 0488941cf2..363237897a 100644 --- a/Mage/src/main/java/mage/game/permanent/token/EdgarMarkovToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/EdgarMarkovToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class EdgarMarkovToken extends Token { super("Vampire", "1/1 black Vampire creature token"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Vampire"); + subtype.add(SubType.VAMPIRE); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/EldraziHorrorToken.java b/Mage/src/main/java/mage/game/permanent/token/EldraziHorrorToken.java index 15dd2d04b0..c0b47cb077 100644 --- a/Mage/src/main/java/mage/game/permanent/token/EldraziHorrorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/EldraziHorrorToken.java @@ -32,6 +32,7 @@ import java.util.Collections; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -48,8 +49,8 @@ public class EldraziHorrorToken extends Token { public EldraziHorrorToken() { super("Eldrazi Horror", "3/2 colorless Eldrazi Horror creature"); cardType.add(CardType.CREATURE); - subtype.add("Eldrazi"); - subtype.add("Horror"); + subtype.add(SubType.ELDRAZI); + subtype.add(SubType.HORROR); power = new MageInt(3); toughness = new MageInt(2); availableImageSetCodes = tokenImageSets; diff --git a/Mage/src/main/java/mage/game/permanent/token/EldraziScionToken.java b/Mage/src/main/java/mage/game/permanent/token/EldraziScionToken.java index 550e915f11..4b9f85e8b6 100644 --- a/Mage/src/main/java/mage/game/permanent/token/EldraziScionToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/EldraziScionToken.java @@ -36,6 +36,7 @@ import mage.Mana; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.mana.SimpleManaAbility; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.util.RandomUtil; @@ -54,8 +55,8 @@ public class EldraziScionToken extends Token { public EldraziScionToken() { super("Eldrazi Scion", "1/1 colorless Eldrazi Scion creature token with \"Sacrifice this creature: Add {C} to your mana pool.\""); cardType.add(CardType.CREATURE); - subtype.add("Eldrazi"); - subtype.add("Scion"); + subtype.add(SubType.ELDRAZI); + subtype.add(SubType.SCION); power = new MageInt(1); toughness = new MageInt(1); addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GenericMana(1), new SacrificeSourceCost())); diff --git a/Mage/src/main/java/mage/game/permanent/token/EldraziSpawnToken.java b/Mage/src/main/java/mage/game/permanent/token/EldraziSpawnToken.java index e7fab3ffbe..25bdb78ae3 100644 --- a/Mage/src/main/java/mage/game/permanent/token/EldraziSpawnToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/EldraziSpawnToken.java @@ -36,6 +36,7 @@ import mage.Mana; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.mana.SimpleManaAbility; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.util.RandomUtil; @@ -54,8 +55,8 @@ public class EldraziSpawnToken extends Token { public EldraziSpawnToken() { super("Eldrazi Spawn", "0/1 colorless Eldrazi Spawn creature with \"Sacrifice this creature: Add {C} to your mana pool.\""); cardType.add(CardType.CREATURE); - subtype.add("Eldrazi"); - subtype.add("Spawn"); + subtype.add(SubType.ELDRAZI); + subtype.add(SubType.SPAWN); power = new MageInt(0); toughness = new MageInt(1); addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(1), new SacrificeSourceCost())); diff --git a/Mage/src/main/java/mage/game/permanent/token/EldraziToken.java b/Mage/src/main/java/mage/game/permanent/token/EldraziToken.java index d999f56558..9207580b52 100644 --- a/Mage/src/main/java/mage/game/permanent/token/EldraziToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/EldraziToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -39,7 +40,7 @@ public class EldraziToken extends Token { public EldraziToken() { super("Eldrazi", "10/10 colorless Eldrazi creature token"); cardType.add(CardType.CREATURE); - subtype.add("Eldrazi"); + subtype.add(SubType.ELDRAZI); power = new MageInt(10); toughness = new MageInt(10); } diff --git a/Mage/src/main/java/mage/game/permanent/token/ElementalAppealElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/ElementalAppealElementalToken.java index d0a755825d..16bc84a54b 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ElementalAppealElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ElementalAppealElementalToken.java @@ -31,6 +31,7 @@ import mage.MageInt; import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.TrampleAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class ElementalAppealElementalToken extends Token { super("Elemental", "7/1 red Elemental creature token with trample and haste"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(7); toughness = new MageInt(1); addAbility(TrampleAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/ElementalCatToken.java b/Mage/src/main/java/mage/game/permanent/token/ElementalCatToken.java index 56bf2cd052..7b4e39878a 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ElementalCatToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ElementalCatToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.HasteAbility; @@ -41,8 +42,8 @@ public class ElementalCatToken extends Token { super("Elemental Cat", "1/1 red Elemental Cat creature token"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Elemental"); - subtype.add("Cat"); + subtype.add(SubType.ELEMENTAL); + subtype.add(SubType.CAT); addAbility(HasteAbility.getInstance()); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/ElementalMasteryElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/ElementalMasteryElementalToken.java index 343e54f558..2e667b58d8 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ElementalMasteryElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ElementalMasteryElementalToken.java @@ -30,6 +30,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.abilities.keyword.HasteAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -40,7 +41,7 @@ public class ElementalMasteryElementalToken extends Token { public ElementalMasteryElementalToken() { super("Elemental", "1/1 red Elemental creature token with haste"); cardType.add(CardType.CREATURE); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); color.setRed(true); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/ElementalShamanToken.java b/Mage/src/main/java/mage/game/permanent/token/ElementalShamanToken.java index 33c3b46e54..81543e2e12 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ElementalShamanToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ElementalShamanToken.java @@ -32,6 +32,7 @@ import java.util.Arrays; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -55,8 +56,8 @@ public class ElementalShamanToken extends Token { setOriginalExpansionSetCode(setCode); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Elemental"); - subtype.add("Shaman"); + subtype.add(SubType.ELEMENTAL); + subtype.add(SubType.SHAMAN); power = new MageInt(3); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/ElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/ElementalToken.java index 303f68c2fa..05b7cbbb02 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ElementalToken.java @@ -34,6 +34,7 @@ import java.util.List; import mage.MageInt; import mage.abilities.keyword.HasteAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -57,7 +58,7 @@ public class ElementalToken extends Token { setOriginalExpansionSetCode(setCode); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(3); toughness = new MageInt(1); @@ -71,7 +72,7 @@ public class ElementalToken extends Token { setOriginalExpansionSetCode(setCode); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(3); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/ElephantResurgenceToken.java b/Mage/src/main/java/mage/game/permanent/token/ElephantResurgenceToken.java new file mode 100644 index 0000000000..06f4a20770 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/ElephantResurgenceToken.java @@ -0,0 +1,61 @@ +/* +* 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.game.permanent.token; + +import mage.constants.CardType; +import mage.constants.SubType; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; + +/** + * + * @author TheElk801 + */ +public class ElephantResurgenceToken extends Token { + + public ElephantResurgenceToken() { + super("Elephant", "green Elephant creature token. Those creatures have \"This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard.\""); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add(SubType.ELEPHANT); + + power = new MageInt(0); + toughness = new MageInt(0); + + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, + new SetPowerToughnessSourceEffect(new CardsInControllerGraveyardCount(new FilterCreatureCard()), Duration.EndOfGame) + .setText("This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard.") + )); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/ElephantToken.java b/Mage/src/main/java/mage/game/permanent/token/ElephantToken.java index 1d4ce38168..853d3e9b55 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ElephantToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ElephantToken.java @@ -33,6 +33,7 @@ import java.util.Arrays; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -60,7 +61,7 @@ public class ElephantToken extends Token { setOriginalExpansionSetCode(setCode); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Elephant"); + subtype.add(SubType.ELEPHANT); power = new MageInt(3); toughness = new MageInt(3); } diff --git a/Mage/src/main/java/mage/game/permanent/token/ElfToken.java b/Mage/src/main/java/mage/game/permanent/token/ElfToken.java index bc357bd7c1..2df9697392 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ElfToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ElfToken.java @@ -32,6 +32,7 @@ import java.util.Arrays; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -50,8 +51,8 @@ public class ElfToken extends Token { availableImageSetCodes = tokenImageSets; cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Elf"); - subtype.add("Warrior"); + subtype.add(SubType.ELF); + subtype.add(SubType.WARRIOR); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/EwokToken.java b/Mage/src/main/java/mage/game/permanent/token/EwokToken.java index 6e1e7d06c6..651f96d196 100644 --- a/Mage/src/main/java/mage/game/permanent/token/EwokToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/EwokToken.java @@ -1,48 +1,49 @@ -/* - * 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.game.permanent.token; -import java.util.Collections; - -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class EwokToken extends Token { - - public EwokToken() { - super("Ewok", "1/1 green Ewok creature tokens", 1, 1); - availableImageSetCodes.addAll(Collections.singletonList("SWS")); - - cardType.add(CardType.CREATURE); - subtype.add("Ewok"); - color.setGreen(true); - } -} +/* + * 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.game.permanent.token; +import java.util.Collections; + +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author Styxo + */ +public class EwokToken extends Token { + + public EwokToken() { + super("Ewok", "1/1 green Ewok creature tokens", 1, 1); + availableImageSetCodes.addAll(Collections.singletonList("SWS")); + + cardType.add(CardType.CREATURE); + subtype.add(SubType.EWOK); + color.setGreen(true); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/EyesOfTheWisentElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/EyesOfTheWisentElementalToken.java index 6459e908a2..e3816179f5 100644 --- a/Mage/src/main/java/mage/game/permanent/token/EyesOfTheWisentElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/EyesOfTheWisentElementalToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,7 +42,7 @@ public class EyesOfTheWisentElementalToken extends Token { this.setOriginalExpansionSetCode("MMA"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(4); toughness = new MageInt(4); setTokenType(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/FaerieRogueToken.java b/Mage/src/main/java/mage/game/permanent/token/FaerieRogueToken.java index d4c111c324..b48d23fd00 100644 --- a/Mage/src/main/java/mage/game/permanent/token/FaerieRogueToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/FaerieRogueToken.java @@ -33,6 +33,7 @@ import java.util.Arrays; import java.util.List; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -52,8 +53,8 @@ public class FaerieRogueToken extends Token { super("Faerie Rogue", "1/1 black Faerie Rogue creature token with flying"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Faerie"); - subtype.add("Rogue"); + subtype.add(SubType.FAERIE); + subtype.add(SubType.ROGUE); power = new MageInt(1); toughness = new MageInt(1); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/FaerieToken.java b/Mage/src/main/java/mage/game/permanent/token/FaerieToken.java index 5a99d3efa2..9f7a163329 100644 --- a/Mage/src/main/java/mage/game/permanent/token/FaerieToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/FaerieToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -41,7 +42,7 @@ public class FaerieToken extends Token { super("Faerie", "1/1 blue Faerie creature tokens with flying"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Faerie"); + subtype.add(SubType.FAERIE); power = new MageInt(1); toughness = new MageInt(1); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/FesteringGoblinToken.java b/Mage/src/main/java/mage/game/permanent/token/FesteringGoblinToken.java index d535e123e8..24170449a1 100644 --- a/Mage/src/main/java/mage/game/permanent/token/FesteringGoblinToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/FesteringGoblinToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; @@ -46,8 +47,8 @@ public class FesteringGoblinToken extends Token { this.setOriginalExpansionSetCode("FUT"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Zombie"); - subtype.add("Goblin"); + subtype.add(SubType.ZOMBIE); + subtype.add(SubType.GOBLIN); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/FleshCarverHorrorToken.java b/Mage/src/main/java/mage/game/permanent/token/FleshCarverHorrorToken.java index bc4f45b568..f67d197ce5 100644 --- a/Mage/src/main/java/mage/game/permanent/token/FleshCarverHorrorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/FleshCarverHorrorToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -45,7 +46,7 @@ public class FleshCarverHorrorToken extends Token { setOriginalExpansionSetCode("C14"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Horror"); + subtype.add(SubType.HORROR); power = new MageInt(xValue); toughness = new MageInt(xValue); diff --git a/Mage/src/main/java/mage/game/permanent/token/FlurryOfHornsMinotaurToken.java b/Mage/src/main/java/mage/game/permanent/token/FlurryOfHornsMinotaurToken.java index 2b456bf73a..4369dfa8b4 100644 --- a/Mage/src/main/java/mage/game/permanent/token/FlurryOfHornsMinotaurToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/FlurryOfHornsMinotaurToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.ObjectColor; import mage.abilities.keyword.HasteAbility; @@ -43,7 +44,7 @@ public class FlurryOfHornsMinotaurToken extends Token { this.setOriginalExpansionSetCode("JOU"); cardType.add(CardType.CREATURE); color.setColor(ObjectColor.RED); - subtype.add("Minotaur"); + subtype.add(SubType.MINOTAUR); power = new MageInt(2); toughness = new MageInt(3); addAbility(HasteAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/ForlornPseudammaZombieToken.java b/Mage/src/main/java/mage/game/permanent/token/ForlornPseudammaZombieToken.java index fb1f657524..8bbea73b00 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ForlornPseudammaZombieToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ForlornPseudammaZombieToken.java @@ -32,6 +32,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -45,7 +46,7 @@ public class ForlornPseudammaZombieToken extends Token { cardType.add(CardType.ENCHANTMENT); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Zombie"); + subtype.add(SubType.ZOMBIE); power = new MageInt(2); toughness = new MageInt(2); this.setOriginalExpansionSetCode("BNG"); diff --git a/Mage/src/main/java/mage/game/permanent/token/FreyaliseLlanowarsFuryToken.java b/Mage/src/main/java/mage/game/permanent/token/FreyaliseLlanowarsFuryToken.java index cc7c6312a6..61c18f4cf1 100644 --- a/Mage/src/main/java/mage/game/permanent/token/FreyaliseLlanowarsFuryToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/FreyaliseLlanowarsFuryToken.java @@ -31,6 +31,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.ObjectColor; import mage.abilities.mana.GreenManaAbility; @@ -61,8 +62,8 @@ public class FreyaliseLlanowarsFuryToken extends Token { setOriginalExpansionSetCode(setCode); this.cardType.add(CardType.CREATURE); this.color = ObjectColor.GREEN; - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/FrogToken.java b/Mage/src/main/java/mage/game/permanent/token/FrogToken.java index 031440d530..1ce60811c5 100644 --- a/Mage/src/main/java/mage/game/permanent/token/FrogToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/FrogToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,7 +42,7 @@ public class FrogToken extends Token { super("Frog", "1/1 blue Frog creature token"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Frog"); + subtype.add(SubType.FROG); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/GargoyleToken.java b/Mage/src/main/java/mage/game/permanent/token/GargoyleToken.java index a00e94837a..8afaa674f1 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GargoyleToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GargoyleToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -41,7 +42,7 @@ public class GargoyleToken extends Token { super("Gargoyle", "3/4 colorless Gargoyle artifact creature token with flying"); cardType.add(CardType.CREATURE); cardType.add(CardType.ARTIFACT); - subtype.add("Gargoyle"); + subtype.add(SubType.GARGOYLE); power = new MageInt(3); toughness = new MageInt(4); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/GarrukApexPredatorBeastToken.java b/Mage/src/main/java/mage/game/permanent/token/GarrukApexPredatorBeastToken.java index 5de2f7ff4d..8dc0703d34 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GarrukApexPredatorBeastToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GarrukApexPredatorBeastToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.DeathtouchAbility; @@ -43,7 +44,7 @@ public class GarrukApexPredatorBeastToken extends Token { setTokenType(1); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Beast"); + subtype.add(SubType.BEAST); power = new MageInt(3); toughness = new MageInt(3); diff --git a/Mage/src/main/java/mage/game/permanent/token/GeminiEngineTwinToken.java b/Mage/src/main/java/mage/game/permanent/token/GeminiEngineTwinToken.java new file mode 100644 index 0000000000..b7f169cde1 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/GeminiEngineTwinToken.java @@ -0,0 +1,17 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +public class GeminiEngineTwinToken extends Token { + + public GeminiEngineTwinToken(int power, int toughness) { + super("Twin", "colorless Construct artifact creature token named Twin that's attacking. Its power is equal to Gemini Engine's power and its toughness is equal to Gemini Engine's toughness."); + cardType.add(CardType.ARTIFACT); + cardType.add(CardType.CREATURE); + subtype.add(SubType.CONSTRUCT); + this.power = new MageInt(power); + this.toughness = new MageInt(toughness); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/GermToken.java b/Mage/src/main/java/mage/game/permanent/token/GermToken.java index 39af80aa80..a81b8d1a98 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GermToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GermToken.java @@ -32,6 +32,7 @@ import java.util.Arrays; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @author spjspj @@ -58,7 +59,7 @@ public class GermToken extends Token { setOriginalExpansionSetCode(setCode); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Germ"); + subtype.add(SubType.GERM); power = new MageInt(0); toughness = new MageInt(0); } diff --git a/Mage/src/main/java/mage/game/permanent/token/GiantBaitingGiantWarriorToken.java b/Mage/src/main/java/mage/game/permanent/token/GiantBaitingGiantWarriorToken.java index dcd57edfd0..ea1c123e94 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GiantBaitingGiantWarriorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GiantBaitingGiantWarriorToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.HasteAbility; @@ -42,8 +43,8 @@ public class GiantBaitingGiantWarriorToken extends Token { cardType.add(CardType.CREATURE); color.setRed(true); color.setGreen(true); - subtype.add("Giant"); - subtype.add("Warrior"); + subtype.add(SubType.GIANT); + subtype.add(SubType.WARRIOR); power = new MageInt(4); toughness = new MageInt(4); this.addAbility(HasteAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/GiantToken.java b/Mage/src/main/java/mage/game/permanent/token/GiantToken.java index dd5e983164..b7906df470 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GiantToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GiantToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -39,7 +40,7 @@ public class GiantToken extends Token { public GiantToken() { super("Giant", "4/4 red Giant creature token"); cardType.add(CardType.CREATURE); - subtype.add("Giant"); + subtype.add(SubType.GIANT); color.setRed(true); power = new MageInt(4); toughness = new MageInt(4); diff --git a/Mage/src/main/java/mage/game/permanent/token/GiantWarriorToken.java b/Mage/src/main/java/mage/game/permanent/token/GiantWarriorToken.java index 2fdd315bc5..40d5e06ac1 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GiantWarriorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GiantWarriorToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,8 +41,8 @@ public class GiantWarriorToken extends Token { super("Giant Warrior", "5/5 white Giant Warrior creature token"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Giant"); - subtype.add("Warrior"); + subtype.add(SubType.GIANT); + subtype.add(SubType.WARRIOR); power = new MageInt(5); toughness = new MageInt(5); } diff --git a/Mage/src/main/java/mage/game/permanent/token/GnomeToken.java b/Mage/src/main/java/mage/game/permanent/token/GnomeToken.java index 626a219666..d7cc93d726 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GnomeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GnomeToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class GnomeToken extends Token { super("Gnome", "1/1 colorless Gnome artifact creature token"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Gnome"); + subtype.add(SubType.GNOME); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/GoatToken.java b/Mage/src/main/java/mage/game/permanent/token/GoatToken.java index 09cc808a46..1a4392885f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GoatToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GoatToken.java @@ -33,6 +33,7 @@ import java.util.Arrays; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -60,7 +61,7 @@ public class GoatToken extends Token { setOriginalExpansionSetCode(setCode); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Goat"); + subtype.add(SubType.GOAT); power = new MageInt(0); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/GoblinRogueToken.java b/Mage/src/main/java/mage/game/permanent/token/GoblinRogueToken.java index b7839593c2..b2f5c52f25 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GoblinRogueToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GoblinRogueToken.java @@ -30,6 +30,7 @@ package mage.game.permanent.token; import java.util.Arrays; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -42,8 +43,8 @@ public class GoblinRogueToken extends Token { super("Goblin Rogue", "1/1 black Goblin Rogue creature token"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Goblin"); - subtype.add("Rogue"); + subtype.add(SubType.GOBLIN); + subtype.add(SubType.ROGUE); power = new MageInt(1); toughness = new MageInt(1); availableImageSetCodes.addAll(Arrays.asList("LRW", "MMA")); diff --git a/Mage/src/main/java/mage/game/permanent/token/GoblinScoutsToken.java b/Mage/src/main/java/mage/game/permanent/token/GoblinScoutsToken.java index 629f8aaf1f..781ec5e7e6 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GoblinScoutsToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GoblinScoutsToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.MountainwalkAbility; @@ -41,8 +42,8 @@ public class GoblinScoutsToken extends Token { super("Goblin Scout", "1/1 red Goblin Scout creature tokens with mountainwalk"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Goblin"); - subtype.add("Scout"); + subtype.add(SubType.GOBLIN); + subtype.add(SubType.SCOUT); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/GoblinSoldierToken.java b/Mage/src/main/java/mage/game/permanent/token/GoblinSoldierToken.java index d30081a9ae..3f8fbd3fed 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GoblinSoldierToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GoblinSoldierToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,8 +42,8 @@ public class GoblinSoldierToken extends Token { cardType.add(CardType.CREATURE); color.setRed(true); color.setWhite(true); - subtype.add("Goblin"); - subtype.add("Soldier"); + subtype.add(SubType.GOBLIN); + subtype.add(SubType.SOLDIER); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/GoblinToken.java b/Mage/src/main/java/mage/game/permanent/token/GoblinToken.java index 89cd0247c7..94751395ad 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GoblinToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GoblinToken.java @@ -32,6 +32,7 @@ import java.util.Arrays; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -59,7 +60,7 @@ public class GoblinToken extends Token { availableImageSetCodes = tokenImageSets; setOriginalExpansionSetCode(setCode); cardType.add(CardType.CREATURE); - subtype.add("Goblin"); + subtype.add(SubType.GOBLIN); color.setRed(true); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/GoblinTrenchesToken.java b/Mage/src/main/java/mage/game/permanent/token/GoblinTrenchesToken.java index 9aa34f7a90..601ea5a686 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GoblinTrenchesToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GoblinTrenchesToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,8 +42,8 @@ public class GoblinTrenchesToken extends Token { cardType.add(CardType.CREATURE); color.setRed(true); color.setWhite(true); - subtype.add("Goblin"); - subtype.add("Soldier"); + subtype.add(SubType.GOBLIN); + subtype.add(SubType.SOLDIER); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/GodFavoredGeneralSoldierToken.java b/Mage/src/main/java/mage/game/permanent/token/GodFavoredGeneralSoldierToken.java index 70297b0312..4b3a6275bd 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GodFavoredGeneralSoldierToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GodFavoredGeneralSoldierToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -42,7 +43,7 @@ public class GodFavoredGeneralSoldierToken extends Token { cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Soldier"); + subtype.add(SubType.SOLDIER); power = new MageInt(1); toughness = new MageInt(1); this.setOriginalExpansionSetCode("BNG"); diff --git a/Mage/src/main/java/mage/game/permanent/token/GodSireBeastToken.java b/Mage/src/main/java/mage/game/permanent/token/GodSireBeastToken.java index f7528ad9e2..d5afbb5f71 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GodSireBeastToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GodSireBeastToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -42,7 +43,7 @@ public class GodSireBeastToken extends Token { color.setGreen(true); color.setWhite(true); color.setRed(true); - subtype.add("Beast"); + subtype.add(SubType.BEAST); power = new MageInt(8); toughness = new MageInt(8); } diff --git a/Mage/src/main/java/mage/game/permanent/token/GoldToken.java b/Mage/src/main/java/mage/game/permanent/token/GoldToken.java index 657b28030d..41b5a8ddd2 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GoldToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GoldToken.java @@ -57,7 +57,7 @@ public class GoldToken extends Token { } public GoldToken(String setCode, int tokenType) { - super("Gold", "colorless artifact token named Gold onto the battlefield. It has \"Sacrifice this artifact: Add one mana of any color to your mana pool.\""); + super("Gold", "colorless artifact token named Gold with \"Sacrifice this artifact: Add one mana of any color to your mana pool.\""); availableImageSetCodes = tokenImageSets; setOriginalExpansionSetCode(setCode); cardType.add(CardType.ARTIFACT); diff --git a/Mage/src/main/java/mage/game/permanent/token/GoldmeadowHarrierToken.java b/Mage/src/main/java/mage/game/permanent/token/GoldmeadowHarrierToken.java index 6d4dfbbea5..d66c630ea0 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GoldmeadowHarrierToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GoldmeadowHarrierToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -48,8 +49,8 @@ public class GoldmeadowHarrierToken extends Token { this.setOriginalExpansionSetCode("FUT"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Kithkin"); - subtype.add("Soldier"); + subtype.add(SubType.KITHKIN); + subtype.add(SubType.SOLDIER); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/GolemToken.java b/Mage/src/main/java/mage/game/permanent/token/GolemToken.java index 83fcd2913d..2f9e97af1d 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GolemToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GolemToken.java @@ -32,6 +32,7 @@ import java.util.Arrays; import java.util.List; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -55,7 +56,7 @@ public class GolemToken extends Token { setOriginalExpansionSetCode(setCode); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Golem"); + subtype.add(SubType.GOLEM); power = new MageInt(3); toughness = new MageInt(3); diff --git a/Mage/src/main/java/mage/game/permanent/token/GremlinToken.java b/Mage/src/main/java/mage/game/permanent/token/GremlinToken.java index 9a47d9a9a8..57aa68d1f7 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GremlinToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GremlinToken.java @@ -1,48 +1,49 @@ -/* - * 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.game.permanent.token; - -import mage.MageInt; -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class GremlinToken extends Token { - - public GremlinToken() { - super("Gremlin", "2/2 red Gremlin creature token"); - cardType.add(CardType.CREATURE); - this.setOriginalExpansionSetCode("AER"); - subtype.add("Gremlin"); - color.setRed(true); - power = new MageInt(2); - toughness = new MageInt(2); - } -} +/* + * 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.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author Styxo + */ +public class GremlinToken extends Token { + + public GremlinToken() { + super("Gremlin", "2/2 red Gremlin creature token"); + cardType.add(CardType.CREATURE); + this.setOriginalExpansionSetCode("AER"); + subtype.add(SubType.GREMLIN); + color.setRed(true); + power = new MageInt(2); + toughness = new MageInt(2); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/GriffinToken.java b/Mage/src/main/java/mage/game/permanent/token/GriffinToken.java index 6d978e8f36..b71d93dbb6 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GriffinToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GriffinToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -42,7 +43,7 @@ public class GriffinToken extends Token { cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Griffin"); + subtype.add(SubType.GRIFFIN); power = new MageInt(2); toughness = new MageInt(2); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/GrovetenderDruidsPlantToken.java b/Mage/src/main/java/mage/game/permanent/token/GrovetenderDruidsPlantToken.java index 9fd5cfca2b..7d963d96b1 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GrovetenderDruidsPlantToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GrovetenderDruidsPlantToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class GrovetenderDruidsPlantToken extends Token { super("Plant", "1/1 green Plant creature"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Plant"); + subtype.add(SubType.PLANT); power = new MageInt(1); toughness = new MageInt(1); this.setOriginalExpansionSetCode("BFZ"); diff --git a/Mage/src/main/java/mage/game/permanent/token/GuardianIdolGolemToken.java b/Mage/src/main/java/mage/game/permanent/token/GuardianIdolGolemToken.java index fbe99a5acb..0459807fb7 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GuardianIdolGolemToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GuardianIdolGolemToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class GuardianIdolGolemToken extends Token { super("Golem", "2/2 Golem artifact creature token"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Golem"); + subtype.add(SubType.GOLEM); power = new MageInt(2); toughness = new MageInt(2); } diff --git a/Mage/src/main/java/mage/game/permanent/token/GutterGrimeToken.java b/Mage/src/main/java/mage/game/permanent/token/GutterGrimeToken.java index a53903d1c5..3b2cdcdf22 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GutterGrimeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GutterGrimeToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import java.util.UUID; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; @@ -57,7 +58,7 @@ public class GutterGrimeToken extends Token { public GutterGrimeToken(UUID sourceId) { super("Ooze", "green Ooze creature token with \"This creature's power and toughness are each equal to the number of slime counters on Gutter Grime.\""); cardType.add(CardType.CREATURE); - subtype.add("Ooze"); + subtype.add(SubType.OOZE); color.setGreen(true); power = new MageInt(0); toughness = new MageInt(0); diff --git a/Mage/src/main/java/mage/game/permanent/token/HammerOfPurphorosGolemToken.java b/Mage/src/main/java/mage/game/permanent/token/HammerOfPurphorosGolemToken.java index 52308b7b36..e8d76eaa5d 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HammerOfPurphorosGolemToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HammerOfPurphorosGolemToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -42,7 +43,7 @@ public class HammerOfPurphorosGolemToken extends Token { cardType.add(CardType.ENCHANTMENT); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Golem"); + subtype.add(SubType.GOLEM); power = new MageInt(3); toughness = new MageInt(3); } diff --git a/Mage/src/main/java/mage/game/permanent/token/HauntedAngelToken.java b/Mage/src/main/java/mage/game/permanent/token/HauntedAngelToken.java index 6a2efff0e3..a6dde5dd44 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HauntedAngelToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HauntedAngelToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -41,7 +42,7 @@ public class HauntedAngelToken extends Token { super("Angel", "3/3 black Angel creature token with flying"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Angel"); + subtype.add(SubType.ANGEL); power = new MageInt(3); toughness = new MageInt(3); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/HazezonTamarSandWarriorToken.java b/Mage/src/main/java/mage/game/permanent/token/HazezonTamarSandWarriorToken.java index 82d1961fd1..e544e5d003 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HazezonTamarSandWarriorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HazezonTamarSandWarriorToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,8 +43,8 @@ public class HazezonTamarSandWarriorToken extends Token { color.setRed(true); color.setGreen(true); color.setWhite(true); - subtype.add("Sand"); - subtype.add("Warrior"); + subtype.add(SubType.SAND); + subtype.add(SubType.WARRIOR); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/HeliodGodOfTheSunToken.java b/Mage/src/main/java/mage/game/permanent/token/HeliodGodOfTheSunToken.java index f870375f26..a6ccc85b75 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HeliodGodOfTheSunToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HeliodGodOfTheSunToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,7 +42,7 @@ public class HeliodGodOfTheSunToken extends Token { this.cardType.add(CardType.CREATURE); this.cardType.add(CardType.ENCHANTMENT); - this.subtype.add("Cleric"); + this.subtype.add(SubType.CLERIC); this.color.setWhite(true); this.power = new MageInt(2); diff --git a/Mage/src/main/java/mage/game/permanent/token/HellionHasteToken.java b/Mage/src/main/java/mage/game/permanent/token/HellionHasteToken.java index e746a497f5..06b3ed4b39 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HellionHasteToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HellionHasteToken.java @@ -30,6 +30,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.abilities.keyword.HasteAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class HellionHasteToken extends Token { super("Hellion", "4/4 red Hellion creature token with haste"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Hellion"); + subtype.add(SubType.HELLION); power = new MageInt(4); toughness = new MageInt(4); addAbility(HasteAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/HellionToken.java b/Mage/src/main/java/mage/game/permanent/token/HellionToken.java index a4672fb64e..31eed72112 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HellionToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HellionToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -40,7 +41,7 @@ public class HellionToken extends Token { super("Hellion", "4/4 red Hellion creature token"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Hellion"); + subtype.add(SubType.HELLION); power = new MageInt(4); toughness = new MageInt(4); } diff --git a/Mage/src/main/java/mage/game/permanent/token/HippoToken.java b/Mage/src/main/java/mage/game/permanent/token/HippoToken.java index 957c61254c..814140d980 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HippoToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HippoToken.java @@ -1,49 +1,50 @@ -/* - * 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.game.permanent.token; - -import mage.MageInt; -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class HippoToken extends Token { - - public HippoToken() { - super("Hippo", "1/1 green Hippo creature token"); - - cardType.add(CardType.CREATURE); - color.setGreen(true); - subtype.add("Hippo"); - - power = new MageInt(1); - toughness = new MageInt(1); - } -} +/* + * 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.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author Styxo + */ +public class HippoToken extends Token { + + public HippoToken() { + super("Hippo", "1/1 green Hippo creature token"); + + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add(SubType.HIPPO); + + power = new MageInt(1); + toughness = new MageInt(1); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/HippoToken2.java b/Mage/src/main/java/mage/game/permanent/token/HippoToken2.java index 2a820febe3..9a3a043ca3 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HippoToken2.java +++ b/Mage/src/main/java/mage/game/permanent/token/HippoToken2.java @@ -30,6 +30,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; import mage.util.RandomUtil; import java.util.ArrayList; @@ -45,7 +46,7 @@ public class HippoToken2 extends Token { super("Hippo", "3/3 green Hippo creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Hippo"); + subtype.add(SubType.HIPPO); power = new MageInt(3); toughness = new MageInt(3); } diff --git a/Mage/src/main/java/mage/game/permanent/token/HomunculusToken.java b/Mage/src/main/java/mage/game/permanent/token/HomunculusToken.java index 71b9217ebf..4485b36b4f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HomunculusToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HomunculusToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,7 +42,7 @@ public class HomunculusToken extends Token { cardType.add(CardType.CREATURE); cardType.add(CardType.ARTIFACT); color.setBlue(true); - subtype.add("Homunculus"); + subtype.add(SubType.HOMUNCULUS); power = new MageInt(0); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/HornetNestInsectToken.java b/Mage/src/main/java/mage/game/permanent/token/HornetNestInsectToken.java index 1384db11d6..fc4267e7d2 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HornetNestInsectToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HornetNestInsectToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.FlyingAbility; @@ -43,7 +44,7 @@ public class HornetNestInsectToken extends Token { setOriginalExpansionSetCode("M15"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Insect"); + subtype.add(SubType.INSECT); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/HornetQueenInsectToken.java b/Mage/src/main/java/mage/game/permanent/token/HornetQueenInsectToken.java index cb89725f0d..be57d6d360 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HornetQueenInsectToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HornetQueenInsectToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.FlyingAbility; @@ -43,7 +44,7 @@ public class HornetQueenInsectToken extends Token { setOriginalExpansionSetCode("M15"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Insect"); + subtype.add(SubType.INSECT); power = new MageInt(1); toughness = new MageInt(1); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/HornetToken.java b/Mage/src/main/java/mage/game/permanent/token/HornetToken.java index 12332fdfe1..6f050255e4 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HornetToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HornetToken.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.HasteAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -48,7 +49,7 @@ public class HornetToken extends Token { this.setOriginalExpansionSetCode(setCode); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Insect"); + subtype.add(SubType.INSECT); power = new MageInt(1); toughness = new MageInt(1); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/HorrorToken.java b/Mage/src/main/java/mage/game/permanent/token/HorrorToken.java index 7fed898d0d..42798c5b6d 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HorrorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HorrorToken.java @@ -31,6 +31,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -43,7 +44,7 @@ public class HorrorToken extends Token { super("Horror", "4/4 black Horror creature token"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Horror"); + subtype.add(SubType.HORROR); power = new MageInt(4); toughness = new MageInt(4); } diff --git a/Mage/src/main/java/mage/game/permanent/token/HoundToken.java b/Mage/src/main/java/mage/game/permanent/token/HoundToken.java index 1dad3e03c9..992b197439 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HoundToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HoundToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -39,7 +40,7 @@ public class HoundToken extends Token { public HoundToken() { super("Hound", "1/1 green Hound creature token"); cardType.add(CardType.CREATURE); - subtype.add("Hound"); + subtype.add(SubType.HOUND); color.setGreen(true); power = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/HourOfNeedSphinxToken.java b/Mage/src/main/java/mage/game/permanent/token/HourOfNeedSphinxToken.java index 28cf0ee146..64ec7246a2 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HourOfNeedSphinxToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HourOfNeedSphinxToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -42,7 +43,7 @@ public class HourOfNeedSphinxToken extends Token { this.setOriginalExpansionSetCode("JOU"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Sphinx"); + subtype.add(SubType.SPHINX); power = new MageInt(4); toughness = new MageInt(4); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/HumanClericToken.java b/Mage/src/main/java/mage/game/permanent/token/HumanClericToken.java index ff9f89465d..969938731e 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HumanClericToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HumanClericToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -39,8 +40,8 @@ public class HumanClericToken extends Token { public HumanClericToken() { super("Human Cleric", "1/1 white and black Human Cleric creature token"); cardType.add(CardType.CREATURE); - subtype.add("Human"); - subtype.add("Cleric"); + subtype.add(SubType.HUMAN); + subtype.add(SubType.CLERIC); color.setWhite(true); color.setBlack(true); power = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/HumanSoldierToken.java b/Mage/src/main/java/mage/game/permanent/token/HumanSoldierToken.java index fe7be2c48a..2b2fbe7fc3 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HumanSoldierToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HumanSoldierToken.java @@ -2,14 +2,15 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; public class HumanSoldierToken extends Token { public HumanSoldierToken() { super("Human Soldier", "1/1 white Human Soldier creature token"); cardType.add(CardType.CREATURE); - subtype.add("Human"); - subtype.add("Soldier"); + subtype.add(SubType.HUMAN); + subtype.add(SubType.SOLDIER); color.setWhite(true); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/HumanToken.java b/Mage/src/main/java/mage/game/permanent/token/HumanToken.java index 6e580a5642..e846da968b 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HumanToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HumanToken.java @@ -30,6 +30,7 @@ package mage.game.permanent.token; import java.util.Arrays; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -42,7 +43,7 @@ public class HumanToken extends Token { super("Human", "1/1 white Human creature token"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Human"); + subtype.add(SubType.HUMAN); power = new MageInt(1); toughness = new MageInt(1); availableImageSetCodes.addAll(Arrays.asList("DKA", "AVR", "FNMP")); diff --git a/Mage/src/main/java/mage/game/permanent/token/HumanWizardToken.java b/Mage/src/main/java/mage/game/permanent/token/HumanWizardToken.java index 1932f71adc..3725ae716f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HumanWizardToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HumanWizardToken.java @@ -2,14 +2,15 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; public class HumanWizardToken extends Token { public HumanWizardToken() { super("Human Wizard", "1/1 blue Human Wizard creature token"); cardType.add(CardType.CREATURE); - subtype.add("Human"); - subtype.add("Wizard"); + subtype.add(SubType.HUMAN); + subtype.add(SubType.WIZARD); color.setBlue(true); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/HuntedCentaurToken.java b/Mage/src/main/java/mage/game/permanent/token/HuntedCentaurToken.java index 3ba3a48d1b..373a928d2f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HuntedCentaurToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HuntedCentaurToken.java @@ -31,6 +31,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.ObjectColor; import mage.abilities.keyword.ProtectionAbility; @@ -51,7 +52,7 @@ public class HuntedCentaurToken extends Token { super("Centaur", "3/3 green Centaur creature tokens with protection from black"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Centaur"); + subtype.add(SubType.CENTAUR); power = new MageInt(3); toughness = new MageInt(3); this.addAbility(ProtectionAbility.from(ObjectColor.BLACK)); diff --git a/Mage/src/main/java/mage/game/permanent/token/HuntedDragonKnightToken.java b/Mage/src/main/java/mage/game/permanent/token/HuntedDragonKnightToken.java index 52dde71d3f..7b77bc2f37 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HuntedDragonKnightToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HuntedDragonKnightToken.java @@ -6,6 +6,7 @@ import java.util.List; import mage.MageInt; import mage.abilities.keyword.FirstStrikeAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -24,7 +25,7 @@ public class HuntedDragonKnightToken extends Token { cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Knight"); + subtype.add(SubType.KNIGHT); power = new MageInt(2); toughness = new MageInt(2); this.addAbility(FirstStrikeAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/HunterToken.java b/Mage/src/main/java/mage/game/permanent/token/HunterToken.java index 9d48b56936..a98d6e1b04 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HunterToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HunterToken.java @@ -32,6 +32,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -45,7 +46,7 @@ public class HunterToken extends Token { this.setOriginalExpansionSetCode("SWS"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Hunter"); + subtype.add(SubType.HUNTER); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/HydraBroodmasterToken.java b/Mage/src/main/java/mage/game/permanent/token/HydraBroodmasterToken.java index 0082d444cd..0f280f16c1 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HydraBroodmasterToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HydraBroodmasterToken.java @@ -32,6 +32,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -49,7 +50,7 @@ public class HydraBroodmasterToken extends Token { this.setOriginalExpansionSetCode("JOU"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Hydra"); + subtype.add(SubType.HYDRA); this.power = new MageInt(power); this.toughness = new MageInt(toughness); } diff --git a/Mage/src/main/java/mage/game/permanent/token/IllusionToken.java b/Mage/src/main/java/mage/game/permanent/token/IllusionToken.java index f1dce2ff38..6915af088c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/IllusionToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/IllusionToken.java @@ -25,9 +25,9 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,7 +41,7 @@ public class IllusionToken extends Token { cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Illusion"); + subtype.add(SubType.ILLUSION); power = new MageInt(2); toughness = new MageInt(2); } diff --git a/Mage/src/main/java/mage/game/permanent/token/InexorableBlobOozeToken.java b/Mage/src/main/java/mage/game/permanent/token/InexorableBlobOozeToken.java index f15027f5ac..cd3e0e5831 100644 --- a/Mage/src/main/java/mage/game/permanent/token/InexorableBlobOozeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/InexorableBlobOozeToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -39,7 +40,7 @@ public class InexorableBlobOozeToken extends Token { public InexorableBlobOozeToken() { super("Ooze", "3/3 green Ooze creature token"); cardType.add(CardType.CREATURE); - subtype.add("Ooze"); + subtype.add(SubType.OOZE); color.setGreen(true); power = new MageInt(3); toughness = new MageInt(3); diff --git a/Mage/src/main/java/mage/game/permanent/token/InsectInfectToken.java b/Mage/src/main/java/mage/game/permanent/token/InsectInfectToken.java index 8f33b8f176..87d6641bc1 100644 --- a/Mage/src/main/java/mage/game/permanent/token/InsectInfectToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/InsectInfectToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.InfectAbility; @@ -42,7 +43,7 @@ public class InsectInfectToken extends Token { super("Insect", "1/1 green Insect creature token with infect"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Insect"); + subtype.add(SubType.INSECT); power = new MageInt(1); toughness = new MageInt(1); addAbility(InfectAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/InsectToken.java b/Mage/src/main/java/mage/game/permanent/token/InsectToken.java index f9c0ce97dc..43b7b21de1 100644 --- a/Mage/src/main/java/mage/game/permanent/token/InsectToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/InsectToken.java @@ -33,6 +33,7 @@ import java.util.Arrays; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -55,7 +56,7 @@ public class InsectToken extends Token { setOriginalExpansionSetCode(setCode); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Insect"); + subtype.add(SubType.INSECT); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/IxalanVampireToken.java b/Mage/src/main/java/mage/game/permanent/token/IxalanVampireToken.java new file mode 100644 index 0000000000..82d97a4439 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/IxalanVampireToken.java @@ -0,0 +1,50 @@ +/* +* 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.game.permanent.token; + +import mage.constants.CardType; +import mage.constants.SubType; +import mage.MageInt; +import mage.abilities.keyword.LifelinkAbility; + +/** + * + * @author TheElk801 + */ +public class IxalanVampireToken extends Token { + + public IxalanVampireToken() { + super("Vampire", "1/1 white Vampire creature token with lifelink"); + cardType.add(CardType.CREATURE); + color.setWhite(true); + subtype.add(SubType.VAMPIRE); + power = new MageInt(1); + toughness = new MageInt(1); + addAbility(LifelinkAbility.getInstance()); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/JaceCunningCastawayIllusionToken.java b/Mage/src/main/java/mage/game/permanent/token/JaceCunningCastawayIllusionToken.java new file mode 100644 index 0000000000..54b1a6700f --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/JaceCunningCastawayIllusionToken.java @@ -0,0 +1,96 @@ +/* +* 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.game.permanent.token; + +import mage.constants.CardType; +import mage.constants.SubType; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.stack.Spell; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public class JaceCunningCastawayIllusionToken extends Token { + + public JaceCunningCastawayIllusionToken() { + super("Illusion", "2/2 blue Illusion creature token with \"When this creature becomes the target of a spell, sacrifice it.\""); + cardType.add(CardType.CREATURE); + color.setBlue(true); + + subtype.add(SubType.ILLUSION); + power = new MageInt(2); + toughness = new MageInt(2); + + this.addAbility(new IllusionTokenTriggeredAbility()); + } +} + +class IllusionTokenTriggeredAbility extends TriggeredAbilityImpl { + + public IllusionTokenTriggeredAbility() { + super(Zone.BATTLEFIELD, new SacrificeSourceEffect(), false); + } + + public IllusionTokenTriggeredAbility(final IllusionTokenTriggeredAbility ability) { + super(ability); + } + + @Override + public IllusionTokenTriggeredAbility copy() { + return new IllusionTokenTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.TARGETED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + MageObject eventSourceObject = game.getObject(event.getSourceId()); + if (eventSourceObject != null && event.getTargetId().equals(this.getSourceId()) && eventSourceObject instanceof Spell) { + getEffects().get(0).setTargetPointer(new FixedTarget(event.getPlayerId())); + return true; + } + return false; + } + + @Override + public String getRule() { + return "When this creature becomes the target of a spell, sacrifice it."; + } + +} diff --git a/Mage/src/main/java/mage/game/permanent/token/JoinTheRanksSoldierToken.java b/Mage/src/main/java/mage/game/permanent/token/JoinTheRanksSoldierToken.java index fd480f44bb..0e8e5e6b58 100644 --- a/Mage/src/main/java/mage/game/permanent/token/JoinTheRanksSoldierToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/JoinTheRanksSoldierToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,8 +42,8 @@ public class JoinTheRanksSoldierToken extends Token { this.setOriginalExpansionSetCode("WWK"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Soldier"); - subtype.add("Ally"); + subtype.add(SubType.SOLDIER); + subtype.add(SubType.ALLY); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/KaldraToken.java b/Mage/src/main/java/mage/game/permanent/token/KaldraToken.java index 50543720dd..79d8942b9b 100644 --- a/Mage/src/main/java/mage/game/permanent/token/KaldraToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/KaldraToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.constants.SuperType; @@ -41,7 +42,7 @@ public class KaldraToken extends Token { super("Kaldra", "legendary 4/4 colorless Avatar creature token named Kaldra"); addSuperType(SuperType.LEGENDARY); cardType.add(CardType.CREATURE); - subtype.add("Avatar"); + subtype.add(SubType.AVATAR); power = new MageInt(4); toughness = new MageInt(4); } diff --git a/Mage/src/main/java/mage/game/permanent/token/KalitasVampireToken.java b/Mage/src/main/java/mage/game/permanent/token/KalitasVampireToken.java index be89d7f739..c28435c239 100644 --- a/Mage/src/main/java/mage/game/permanent/token/KalitasVampireToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/KalitasVampireToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -44,7 +45,7 @@ public class KalitasVampireToken extends Token { super("Vampire", new StringBuilder(tokenPower).append('/').append(tokenToughness).append(" black Vampire creature token").toString()); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Vampire"); + subtype.add(SubType.VAMPIRE); power = new MageInt(tokenPower); toughness = new MageInt(tokenToughness); } diff --git a/Mage/src/main/java/mage/game/permanent/token/KalonianTwingroveTreefolkWarriorToken.java b/Mage/src/main/java/mage/game/permanent/token/KalonianTwingroveTreefolkWarriorToken.java index 559dadd584..45a6bfa663 100644 --- a/Mage/src/main/java/mage/game/permanent/token/KalonianTwingroveTreefolkWarriorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/KalonianTwingroveTreefolkWarriorToken.java @@ -55,8 +55,8 @@ public class KalonianTwingroveTreefolkWarriorToken extends Token { this.setOriginalExpansionSetCode("M15"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Treefolk"); - subtype.add("Warrior"); + subtype.add(SubType.TREEFOLK); + subtype.add(SubType.WARRIOR); power = new MageInt(0); toughness = new MageInt(0); diff --git a/Mage/src/main/java/mage/game/permanent/token/KelpToken.java b/Mage/src/main/java/mage/game/permanent/token/KelpToken.java index c908d153a1..0b09164d4f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/KelpToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/KelpToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.DefenderAbility; @@ -42,8 +43,8 @@ public class KelpToken extends Token { this.setOriginalExpansionSetCode("MIR"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Plant"); - subtype.add("Wall"); + subtype.add(SubType.PLANT); + subtype.add(SubType.WALL); power = new MageInt(0); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/KherKeepKoboldToken.java b/Mage/src/main/java/mage/game/permanent/token/KherKeepKoboldToken.java index 8f4a95ecb3..f851b8d33f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/KherKeepKoboldToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/KherKeepKoboldToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class KherKeepKoboldToken extends Token { super("Kobolds of Kher Keep", "0/1 red Kobold creature token named Kobolds of Kher Keep"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Kobold"); + subtype.add(SubType.KOBOLD); power = new MageInt(0); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/KioraKrakenToken.java b/Mage/src/main/java/mage/game/permanent/token/KioraKrakenToken.java index 5795779147..8787ceadbd 100644 --- a/Mage/src/main/java/mage/game/permanent/token/KioraKrakenToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/KioraKrakenToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class KioraKrakenToken extends Token { super("Kraken", "9/9 blue Kraken creature token"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Kraken"); + subtype.add(SubType.KRAKEN); power = new MageInt(9); toughness = new MageInt(9); this.setOriginalExpansionSetCode("BNG"); diff --git a/Mage/src/main/java/mage/game/permanent/token/KithkinToken.java b/Mage/src/main/java/mage/game/permanent/token/KithkinToken.java index 2a6ce0c485..45e6644586 100644 --- a/Mage/src/main/java/mage/game/permanent/token/KithkinToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/KithkinToken.java @@ -3,6 +3,7 @@ package mage.game.permanent.token; import java.util.Arrays; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -14,8 +15,8 @@ public class KithkinToken extends Token { super("Kithkin Soldier", "1/1 white Kithkin Soldier creature token"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Kithkin"); - subtype.add("Soldier"); + subtype.add(SubType.KITHKIN); + subtype.add(SubType.SOLDIER); power = new MageInt(1); toughness = new MageInt(1); availableImageSetCodes.addAll(Arrays.asList("LRW", "SHM", "MMA")); diff --git a/Mage/src/main/java/mage/game/permanent/token/KnightAllyToken.java b/Mage/src/main/java/mage/game/permanent/token/KnightAllyToken.java index 5964d9b230..57e353f063 100644 --- a/Mage/src/main/java/mage/game/permanent/token/KnightAllyToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/KnightAllyToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,8 +42,8 @@ public class KnightAllyToken extends Token { this.setExpansionSetCodeForImage("BFZ"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Knight"); - subtype.add("Ally"); + subtype.add(SubType.KNIGHT); + subtype.add(SubType.ALLY); power = new MageInt(2); toughness = new MageInt(2); } diff --git a/Mage/src/main/java/mage/game/permanent/token/KnightToken.java b/Mage/src/main/java/mage/game/permanent/token/KnightToken.java index 7f2b2f8b9b..d649fd78fe 100644 --- a/Mage/src/main/java/mage/game/permanent/token/KnightToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/KnightToken.java @@ -6,6 +6,7 @@ import java.util.List; import mage.MageInt; import mage.abilities.keyword.VigilanceAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -26,7 +27,7 @@ public class KnightToken extends Token { } cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Knight"); + subtype.add(SubType.KNIGHT); power = new MageInt(2); toughness = new MageInt(2); this.addAbility(VigilanceAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/KorAllyToken.java b/Mage/src/main/java/mage/game/permanent/token/KorAllyToken.java index c8a39ccb32..4aae560392 100644 --- a/Mage/src/main/java/mage/game/permanent/token/KorAllyToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/KorAllyToken.java @@ -2,6 +2,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; public class KorAllyToken extends Token { @@ -9,8 +10,8 @@ public class KorAllyToken extends Token { super("Kor Ally", "1/1 white Kor Ally creature token"); this.setExpansionSetCodeForImage("BFZ"); cardType.add(CardType.CREATURE); - subtype.add("Kor"); - subtype.add("Ally"); + subtype.add(SubType.KOR); + subtype.add(SubType.ALLY); color.setWhite(true); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/KorSoldierToken.java b/Mage/src/main/java/mage/game/permanent/token/KorSoldierToken.java index 8f6b41c93b..b477c69eb5 100644 --- a/Mage/src/main/java/mage/game/permanent/token/KorSoldierToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/KorSoldierToken.java @@ -31,6 +31,7 @@ package mage.game.permanent.token; import java.util.Arrays; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -43,8 +44,8 @@ public class KorSoldierToken extends Token { super("Kor Soldier", "1/1 white Kor Soldier creature token"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Kor"); - subtype.add("Soldier"); + subtype.add(SubType.KOR); + subtype.add(SubType.SOLDIER); power = new MageInt(1); toughness = new MageInt(1); availableImageSetCodes.addAll(Arrays.asList("C14", "ZEN")); } diff --git a/Mage/src/main/java/mage/game/permanent/token/LeafdrakeRoostDrakeToken.java b/Mage/src/main/java/mage/game/permanent/token/LeafdrakeRoostDrakeToken.java index 0baa767d45..09cf615aca 100644 --- a/Mage/src/main/java/mage/game/permanent/token/LeafdrakeRoostDrakeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/LeafdrakeRoostDrakeToken.java @@ -31,6 +31,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -61,7 +62,7 @@ public class LeafdrakeRoostDrakeToken extends Token { cardType.add(CardType.CREATURE); color.setGreen(true); color.setBlue(true); - subtype.add("Drake"); + subtype.add(SubType.DRAKE); power = new MageInt(2); toughness = new MageInt(2); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/LightningRagerToken.java b/Mage/src/main/java/mage/game/permanent/token/LightningRagerToken.java index 5de5d26cff..dcdf510f5f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/LightningRagerToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/LightningRagerToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; @@ -47,7 +48,7 @@ public class LightningRagerToken extends Token { this.setOriginalExpansionSetCode("C15"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(5); toughness = new MageInt(1); addAbility(TrampleAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/LinvalaAngelToken.java b/Mage/src/main/java/mage/game/permanent/token/LinvalaAngelToken.java index 7aebab1cf9..aebcc9af26 100644 --- a/Mage/src/main/java/mage/game/permanent/token/LinvalaAngelToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/LinvalaAngelToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -42,7 +43,7 @@ public class LinvalaAngelToken extends Token { setOriginalExpansionSetCode("OGW"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Angel"); + subtype.add(SubType.ANGEL); power = new MageInt(3); toughness = new MageInt(3); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/LizardToken.java b/Mage/src/main/java/mage/game/permanent/token/LizardToken.java index 4eb7a901d1..b83686ed81 100644 --- a/Mage/src/main/java/mage/game/permanent/token/LizardToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/LizardToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class LizardToken extends Token { super("Lizard", "2/2 green Lizard creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Lizard"); + subtype.add(SubType.LIZARD); power = new MageInt(2); toughness = new MageInt(2); } diff --git a/Mage/src/main/java/mage/game/permanent/token/LlanowarElvesToken.java b/Mage/src/main/java/mage/game/permanent/token/LlanowarElvesToken.java index 56db49cd84..f67026c12a 100644 --- a/Mage/src/main/java/mage/game/permanent/token/LlanowarElvesToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/LlanowarElvesToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.mana.GreenManaAbility; @@ -42,8 +43,8 @@ public class LlanowarElvesToken extends Token { this.setOriginalExpansionSetCode("FUT"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Elf"); - subtype.add("Druid"); + subtype.add(SubType.ELF); + subtype.add(SubType.DRUID); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/MarathWillOfTheWildElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/MarathWillOfTheWildElementalToken.java index 4b6797dea4..325d3fc4a4 100644 --- a/Mage/src/main/java/mage/game/permanent/token/MarathWillOfTheWildElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MarathWillOfTheWildElementalToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -39,7 +40,7 @@ public class MarathWillOfTheWildElementalToken extends Token { public MarathWillOfTheWildElementalToken() { super("Elemental", "X/X green Elemental creature token"); cardType.add(CardType.CREATURE); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); color.setGreen(true); power = new MageInt(0); toughness = new MageInt(0); diff --git a/Mage/src/main/java/mage/game/permanent/token/MarduStrikeLeaderWarriorToken.java b/Mage/src/main/java/mage/game/permanent/token/MarduStrikeLeaderWarriorToken.java index 15c79d2349..d75085fcd9 100644 --- a/Mage/src/main/java/mage/game/permanent/token/MarduStrikeLeaderWarriorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MarduStrikeLeaderWarriorToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class MarduStrikeLeaderWarriorToken extends Token { super("Warrior", "2/1 black Warrior creature token"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Warrior"); + subtype.add(SubType.WARRIOR); power = new MageInt(2); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/MaritLageToken.java b/Mage/src/main/java/mage/game/permanent/token/MaritLageToken.java index 3c8223014f..ad00e11797 100644 --- a/Mage/src/main/java/mage/game/permanent/token/MaritLageToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MaritLageToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.IndestructibleAbility; @@ -43,7 +44,7 @@ public class MaritLageToken extends Token { super("Marit Lage", "legendary 20/20 black Avatar creature token with flying and indestructible named Marit Lage"); this.setOriginalExpansionSetCode("CSP"); cardType.add(CardType.CREATURE); - subtype.add("Avatar"); + subtype.add(SubType.AVATAR); addSuperType(SuperType.LEGENDARY); color.setBlack(true); diff --git a/Mage/src/main/java/mage/game/permanent/token/MasterOfWavesElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/MasterOfWavesElementalToken.java index b3d6e20e62..213155bbeb 100644 --- a/Mage/src/main/java/mage/game/permanent/token/MasterOfWavesElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MasterOfWavesElementalToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -39,7 +40,7 @@ public class MasterOfWavesElementalToken extends Token { public MasterOfWavesElementalToken() { super("Elemental", "1/0 blue Elemental creature"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.color.setBlue(true); diff --git a/Mage/src/main/java/mage/game/permanent/token/MelokuTheCloudedMirrorToken.java b/Mage/src/main/java/mage/game/permanent/token/MelokuTheCloudedMirrorToken.java index e2be2f90a6..245023dd23 100644 --- a/Mage/src/main/java/mage/game/permanent/token/MelokuTheCloudedMirrorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MelokuTheCloudedMirrorToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -41,7 +42,7 @@ public class MelokuTheCloudedMirrorToken extends Token { super("Illusion", "1/1 blue Illusion creature token with flying"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Illusion"); + subtype.add(SubType.ILLUSION); power = new MageInt(1); toughness = new MageInt(1); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/MercyKillingToken.java b/Mage/src/main/java/mage/game/permanent/token/MercyKillingToken.java index 6f87dc5520..8eee24b0dc 100644 --- a/Mage/src/main/java/mage/game/permanent/token/MercyKillingToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MercyKillingToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,8 +42,8 @@ public class MercyKillingToken extends Token { cardType.add(CardType.CREATURE); color.setGreen(true); color.setWhite(true); - subtype.add("Elf"); - subtype.add("Warrior"); + subtype.add(SubType.ELF); + subtype.add(SubType.WARRIOR); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/MerfolkHexproofToken.java b/Mage/src/main/java/mage/game/permanent/token/MerfolkHexproofToken.java new file mode 100644 index 0000000000..53a6a70403 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/MerfolkHexproofToken.java @@ -0,0 +1,33 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.HexproofAbility; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author TacomenX + */ + +public class MerfolkHexproofToken extends Token { + + + + public MerfolkHexproofToken() { + super("Merfolk", "1/1 blue Merfolk creature token with hexproof"); + this.cardType.add(CardType.CREATURE); + this.subtype.add(SubType.MERFOLK); + this.color = ObjectColor.BLUE; + this.power = new MageInt(1); + this.toughness = new MageInt(1); + this.addAbility(HexproofAbility.getInstance()); + } + +} \ No newline at end of file diff --git a/Mage/src/main/java/mage/game/permanent/token/MerfolkToken.java b/Mage/src/main/java/mage/game/permanent/token/MerfolkToken.java index b0676675cf..83eab8422c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/MerfolkToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MerfolkToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class MerfolkToken extends Token { super("Merfolk", "1/1 blue Merfolk creature token"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Merfolk"); + subtype.add(SubType.MERFOLK); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/MerfolkWizardToken.java b/Mage/src/main/java/mage/game/permanent/token/MerfolkWizardToken.java index ad83a93e28..c9d8e835d0 100644 --- a/Mage/src/main/java/mage/game/permanent/token/MerfolkWizardToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MerfolkWizardToken.java @@ -2,6 +2,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -13,8 +14,8 @@ public class MerfolkWizardToken extends Token { super("Merfolk Wizard", "1/1 blue Merfolk Wizard creature token"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Merfolk"); - subtype.add("Wizard"); + subtype.add(SubType.MERFOLK); + subtype.add(SubType.WIZARD); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/MetallurgicSummoningsConstructToken.java b/Mage/src/main/java/mage/game/permanent/token/MetallurgicSummoningsConstructToken.java index 901ddfb8d1..e148918ef7 100644 --- a/Mage/src/main/java/mage/game/permanent/token/MetallurgicSummoningsConstructToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MetallurgicSummoningsConstructToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.util.RandomUtil; @@ -46,7 +47,7 @@ public class MetallurgicSummoningsConstructToken extends Token { setTokenType(RandomUtil.nextInt(2) + 1); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Construct"); + subtype.add(SubType.CONSTRUCT); power = new MageInt(xValue); toughness = new MageInt(xValue); } diff --git a/Mage/src/main/java/mage/game/permanent/token/MinionToken.java b/Mage/src/main/java/mage/game/permanent/token/MinionToken.java index b00ee22ce6..c885889f5f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/MinionToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MinionToken.java @@ -30,6 +30,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -45,7 +46,7 @@ public class MinionToken extends Token { super("Minion", "X/X black Minion creature token"); this.setOriginalExpansionSetCode(setCode); cardType.add(CardType.CREATURE); - subtype.add("Minion"); + subtype.add(SubType.MINION); color.setBlack(true); power = new MageInt(0); toughness = new MageInt(0); diff --git a/Mage/src/main/java/mage/game/permanent/token/MinorDemonToken.java b/Mage/src/main/java/mage/game/permanent/token/MinorDemonToken.java index 97dca7a84c..6d136c01d4 100644 --- a/Mage/src/main/java/mage/game/permanent/token/MinorDemonToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MinorDemonToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,7 +42,7 @@ public class MinorDemonToken extends Token { cardType.add(CardType.CREATURE); color.setBlack(true); color.setRed(true); - subtype.add("Demon"); + subtype.add(SubType.DEMON); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/MoltenBirthElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/MoltenBirthElementalToken.java index 1aa59de1cd..f0ae482dd8 100644 --- a/Mage/src/main/java/mage/game/permanent/token/MoltenBirthElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MoltenBirthElementalToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; import mage.util.RandomUtil; /** @@ -43,7 +44,7 @@ public class MoltenBirthElementalToken extends Token { this.setTokenType(RandomUtil.nextInt(2) + 1); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/MonasteryMentorToken.java b/Mage/src/main/java/mage/game/permanent/token/MonasteryMentorToken.java index 14bf959e3c..bcec81664d 100644 --- a/Mage/src/main/java/mage/game/permanent/token/MonasteryMentorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MonasteryMentorToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.ProwessAbility; @@ -41,7 +42,7 @@ public class MonasteryMentorToken extends Token { super("Monk", "1/1 white Monk creature token with prowess"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Monk"); + subtype.add(SubType.MONK); power = new MageInt(1); toughness = new MageInt(1); this.addAbility(new ProwessAbility()); diff --git a/Mage/src/main/java/mage/game/permanent/token/MyrToken.java b/Mage/src/main/java/mage/game/permanent/token/MyrToken.java index 9a3e10220c..11b46d905f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/MyrToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MyrToken.java @@ -6,6 +6,7 @@ import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; public class MyrToken extends Token { @@ -24,7 +25,7 @@ public class MyrToken extends Token { this.setOriginalExpansionSetCode(expansionSetCode); cardType.add(CardType.CREATURE); cardType.add(CardType.ARTIFACT); - subtype.add("Myr"); + subtype.add(SubType.MYR); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/MysticGenesisOozeToken.java b/Mage/src/main/java/mage/game/permanent/token/MysticGenesisOozeToken.java index 7a4ecdb145..8af9bf8fcc 100644 --- a/Mage/src/main/java/mage/game/permanent/token/MysticGenesisOozeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MysticGenesisOozeToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -43,7 +44,7 @@ public class MysticGenesisOozeToken extends Token { super("Ooze", "X/X green Ooze creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Ooze"); + subtype.add(SubType.OOZE); power = new MageInt(xValue); toughness = new MageInt(xValue); setOriginalExpansionSetCode("RTR"); diff --git a/Mage/src/main/java/mage/game/permanent/token/NahiriTheLithomancerEquipmentToken.java b/Mage/src/main/java/mage/game/permanent/token/NahiriTheLithomancerEquipmentToken.java index cb26e2870b..c2c0ac2822 100644 --- a/Mage/src/main/java/mage/game/permanent/token/NahiriTheLithomancerEquipmentToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/NahiriTheLithomancerEquipmentToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.GenericManaCost; @@ -50,7 +51,7 @@ public class NahiriTheLithomancerEquipmentToken extends Token { public NahiriTheLithomancerEquipmentToken() { super("Stoneforged Blade", "colorless Equipment artifact token named Stoneforged Blade with indestructible, \"Equipped creature gets +5/+5 and has double strike,\" and equip {0}"); cardType.add(CardType.ARTIFACT); - subtype.add("Equipment"); + subtype.add(SubType.EQUIPMENT); this.addAbility(IndestructibleAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/NestOfScarabsBlackInsectToken.java b/Mage/src/main/java/mage/game/permanent/token/NestOfScarabsBlackInsectToken.java index 565e086304..6655e1fc44 100644 --- a/Mage/src/main/java/mage/game/permanent/token/NestOfScarabsBlackInsectToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/NestOfScarabsBlackInsectToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class NestOfScarabsBlackInsectToken extends Token { super("Insect", "1/1 black Insect creature token"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Insect"); + subtype.add(SubType.INSECT); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/NighteyesTheDesecratorToken.java b/Mage/src/main/java/mage/game/permanent/token/NighteyesTheDesecratorToken.java index ec293c599f..49efc5c50c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/NighteyesTheDesecratorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/NighteyesTheDesecratorToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -49,8 +50,8 @@ public class NighteyesTheDesecratorToken extends Token { addSuperType(SuperType.LEGENDARY); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Rat"); - subtype.add("Wizard"); + subtype.add(SubType.RAT); + subtype.add(SubType.WIZARD); power = new MageInt(4); toughness = new MageInt(2); // {4}{B}: Put target creature card from a graveyard onto the battlefield under your control. diff --git a/Mage/src/main/java/mage/game/permanent/token/NightwingHorrorToken.java b/Mage/src/main/java/mage/game/permanent/token/NightwingHorrorToken.java index 024625a8bb..d51bdf0a37 100644 --- a/Mage/src/main/java/mage/game/permanent/token/NightwingHorrorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/NightwingHorrorToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -42,7 +43,7 @@ public class NightwingHorrorToken extends Token { cardType.add(CardType.CREATURE); this.color.setBlue(true); this.color.setBlack(true); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/NissaSageAnimistToken.java b/Mage/src/main/java/mage/game/permanent/token/NissaSageAnimistToken.java index 603856cc28..f5a15e5589 100644 --- a/Mage/src/main/java/mage/game/permanent/token/NissaSageAnimistToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/NissaSageAnimistToken.java @@ -25,9 +25,10 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.game.permanent.token; + import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -43,7 +44,7 @@ public class NissaSageAnimistToken extends Token { this.getPower().modifyBaseValue(4); this.getToughness().modifyBaseValue(4); this.color.setGreen(true); - this.getSubtype(null).add("Elemental"); + this.getSubtype(null).add(SubType.ELEMENTAL); this.addCardType(CardType.CREATURE); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/OctopusToken.java b/Mage/src/main/java/mage/game/permanent/token/OctopusToken.java index 590c25e35f..63c3990468 100644 --- a/Mage/src/main/java/mage/game/permanent/token/OctopusToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/OctopusToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class OctopusToken extends Token { super("Octopus", "8/8 blue Octopus creature token"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Octopus"); + subtype.add(SubType.OCTOPUS); power = new MageInt(8); toughness = new MageInt(8); this.setOriginalExpansionSetCode("BFZ"); diff --git a/Mage/src/main/java/mage/game/permanent/token/OgreToken.java b/Mage/src/main/java/mage/game/permanent/token/OgreToken.java index b76a68fcc1..a32e6075e0 100644 --- a/Mage/src/main/java/mage/game/permanent/token/OgreToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/OgreToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class OgreToken extends Token { super("Ogre", "3/3 red Ogre creature"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Ogre"); + subtype.add(SubType.OGRE); power = new MageInt(3); toughness = new MageInt(3); } diff --git a/Mage/src/main/java/mage/game/permanent/token/OmnathElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/OmnathElementalToken.java index 6f9b1ac024..d6c55c9cbe 100644 --- a/Mage/src/main/java/mage/game/permanent/token/OmnathElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/OmnathElementalToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,7 +42,7 @@ public class OmnathElementalToken extends Token { setTokenType(2); setOriginalExpansionSetCode("BFZ"); cardType.add(CardType.CREATURE); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); color.setRed(true); color.setGreen(true); diff --git a/Mage/src/main/java/mage/game/permanent/token/OneDozenEyesBeastToken.java b/Mage/src/main/java/mage/game/permanent/token/OneDozenEyesBeastToken.java index 39d703f1e7..9aebc235cf 100644 --- a/Mage/src/main/java/mage/game/permanent/token/OneDozenEyesBeastToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/OneDozenEyesBeastToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class OneDozenEyesBeastToken extends Token { super("Beast", "5/5 green Beast creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Beast"); + subtype.add(SubType.BEAST); power = new MageInt(5); toughness = new MageInt(5); } diff --git a/Mage/src/main/java/mage/game/permanent/token/OonaQueenFaerieToken.java b/Mage/src/main/java/mage/game/permanent/token/OonaQueenFaerieToken.java index bcbd37611a..cd68f66ad0 100644 --- a/Mage/src/main/java/mage/game/permanent/token/OonaQueenFaerieToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/OonaQueenFaerieToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -42,8 +43,8 @@ public class OonaQueenFaerieToken extends Token { cardType.add(CardType.CREATURE); color.setBlue(true); color.setBlack(true); - subtype.add("Faerie"); - subtype.add("Rogue"); + subtype.add(SubType.FAERIE); + subtype.add(SubType.ROGUE); power = new MageInt(1); toughness = new MageInt(1); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/Ooze2Token.java b/Mage/src/main/java/mage/game/permanent/token/Ooze2Token.java index b6026fab82..93fefc3e37 100644 --- a/Mage/src/main/java/mage/game/permanent/token/Ooze2Token.java +++ b/Mage/src/main/java/mage/game/permanent/token/Ooze2Token.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; @@ -41,7 +42,7 @@ public class Ooze2Token extends Token { public Ooze2Token() { super("Ooze", "2/2 green Ooze creature tokens with \"When this creature is put into a graveyard, create two 1/1 green Ooze creature tokens.\""); cardType.add(CardType.CREATURE); - subtype.add("Ooze"); + subtype.add(SubType.OOZE); color.setGreen(true); power = new MageInt(2); toughness = new MageInt(2); diff --git a/Mage/src/main/java/mage/game/permanent/token/OozeToken.java b/Mage/src/main/java/mage/game/permanent/token/OozeToken.java index 319f00dc58..cf5c18d6d9 100644 --- a/Mage/src/main/java/mage/game/permanent/token/OozeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/OozeToken.java @@ -2,6 +2,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; public class OozeToken extends Token { @@ -9,7 +10,7 @@ public class OozeToken extends Token { super("Ooze", power + "/" + toughness + " green ooze creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Ooze"); + subtype.add(SubType.OOZE); this.power = new MageInt(power); this.toughness = new MageInt(toughness); } @@ -18,7 +19,7 @@ public class OozeToken extends Token { super("Ooze", "X/X green ooze creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Ooze"); + subtype.add(SubType.OOZE); power = new MageInt(0); toughness = new MageInt(0); } diff --git a/Mage/src/main/java/mage/game/permanent/token/OphiomancerSnakeToken.java b/Mage/src/main/java/mage/game/permanent/token/OphiomancerSnakeToken.java index 004c3e85a2..0e6d7ca0f6 100644 --- a/Mage/src/main/java/mage/game/permanent/token/OphiomancerSnakeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/OphiomancerSnakeToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.DeathtouchAbility; @@ -41,7 +42,7 @@ public class OphiomancerSnakeToken extends Token { super("Snake", "1/1 black Snake creature token with deathtouch"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Snake"); + subtype.add(SubType.SNAKE); power = new MageInt(1); toughness = new MageInt(1); this.addAbility(DeathtouchAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/OrderedMigrationBirdToken.java b/Mage/src/main/java/mage/game/permanent/token/OrderedMigrationBirdToken.java index 8ac9e9fa5b..12c7878011 100644 --- a/Mage/src/main/java/mage/game/permanent/token/OrderedMigrationBirdToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/OrderedMigrationBirdToken.java @@ -30,6 +30,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class OrderedMigrationBirdToken extends Token { super("Bird", "1/1 blue Bird creature token with flying"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Bird"); + subtype.add(SubType.BIRD); power = new MageInt(1); toughness = new MageInt(1); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/OviyaPashiriSageLifecrafterToken.java b/Mage/src/main/java/mage/game/permanent/token/OviyaPashiriSageLifecrafterToken.java index 9d8517320e..6a6ba3d58e 100644 --- a/Mage/src/main/java/mage/game/permanent/token/OviyaPashiriSageLifecrafterToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/OviyaPashiriSageLifecrafterToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.filter.common.FilterControlledCreaturePermanent; import mage.util.RandomUtil; @@ -48,7 +49,7 @@ public class OviyaPashiriSageLifecrafterToken extends Token { super("Construct", "an X/X colorless Construct artifact creature token, where X is the number of creatures you control"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Construct"); + subtype.add(SubType.CONSTRUCT); setOriginalExpansionSetCode("KLD"); setTokenType(RandomUtil.nextInt(2) + 1); power = new MageInt(number); diff --git a/Mage/src/main/java/mage/game/permanent/token/OwlToken.java b/Mage/src/main/java/mage/game/permanent/token/OwlToken.java index 8534f57e3f..417e12c245 100644 --- a/Mage/src/main/java/mage/game/permanent/token/OwlToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/OwlToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -41,7 +42,7 @@ public class OwlToken extends Token { super("Bird", "1/1 blue Bird creature token with flying"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Bird"); + subtype.add(SubType.BIRD); power = new MageInt(1); toughness = new MageInt(1); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/PatagiaViperSnakeToken.java b/Mage/src/main/java/mage/game/permanent/token/PatagiaViperSnakeToken.java index 81efe8f80c..48d10553b6 100644 --- a/Mage/src/main/java/mage/game/permanent/token/PatagiaViperSnakeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/PatagiaViperSnakeToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,7 +42,7 @@ public class PatagiaViperSnakeToken extends Token { cardType.add(CardType.CREATURE); color.setGreen(true); color.setBlue(true); - subtype.add("Snake"); + subtype.add(SubType.SNAKE); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/PegasusToken.java b/Mage/src/main/java/mage/game/permanent/token/PegasusToken.java index 12e90966ac..1733333a9f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/PegasusToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/PegasusToken.java @@ -30,6 +30,7 @@ R package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -43,7 +44,7 @@ public class PegasusToken extends Token { super("Pegasus", "1/1 white Pegasus creature token with flying"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Pegasus"); + subtype.add(SubType.PEGASUS); power = new MageInt(1); toughness = new MageInt(1); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/PentaviteToken.java b/Mage/src/main/java/mage/game/permanent/token/PentaviteToken.java index 8159f18c69..e53ed24881 100644 --- a/Mage/src/main/java/mage/game/permanent/token/PentaviteToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/PentaviteToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -41,7 +42,7 @@ public class PentaviteToken extends Token { super("Pentavite", "1/1 colorless Pentavite artifact creature token with flying"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Pentavite"); + subtype.add(SubType.PENTAVITE); power = new MageInt(1); toughness = new MageInt(1); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/PenumbraBobcatToken.java b/Mage/src/main/java/mage/game/permanent/token/PenumbraBobcatToken.java index 737d1a4cd0..9890e8b124 100644 --- a/Mage/src/main/java/mage/game/permanent/token/PenumbraBobcatToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/PenumbraBobcatToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class PenumbraBobcatToken extends Token { super("Cat", "2/1 black Cat creature token"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Cat"); + subtype.add(SubType.CAT); power = new MageInt(2); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/PenumbraKavuToken.java b/Mage/src/main/java/mage/game/permanent/token/PenumbraKavuToken.java index 15c5d9d4e0..a68d76f931 100644 --- a/Mage/src/main/java/mage/game/permanent/token/PenumbraKavuToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/PenumbraKavuToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class PenumbraKavuToken extends Token { super("Kavu", "3/3 black Kavu creature token"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Kavu"); + subtype.add(SubType.KAVU); power = new MageInt(3); toughness = new MageInt(3); } diff --git a/Mage/src/main/java/mage/game/permanent/token/PenumbraSpiderToken.java b/Mage/src/main/java/mage/game/permanent/token/PenumbraSpiderToken.java index 234cd39899..bed3746093 100644 --- a/Mage/src/main/java/mage/game/permanent/token/PenumbraSpiderToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/PenumbraSpiderToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.ReachAbility; @@ -42,7 +43,7 @@ public class PenumbraSpiderToken extends Token { super("Spider", "2/4 black Spider creature token with reach"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Spider"); + subtype.add(SubType.SPIDER); power = new MageInt(2); toughness = new MageInt(4); addAbility(ReachAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/PenumbraWurmToken.java b/Mage/src/main/java/mage/game/permanent/token/PenumbraWurmToken.java index 39d36774d0..7ed681f518 100644 --- a/Mage/src/main/java/mage/game/permanent/token/PenumbraWurmToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/PenumbraWurmToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.TrampleAbility; @@ -41,7 +42,7 @@ public class PenumbraWurmToken extends Token { super("Wurm", "6/6 black Wurm creature token with trample"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Wurm"); + subtype.add(SubType.WURM); power = new MageInt(6); toughness = new MageInt(6); diff --git a/Mage/src/main/java/mage/game/permanent/token/PestToken.java b/Mage/src/main/java/mage/game/permanent/token/PestToken.java index 1d35449e68..3fc141f199 100644 --- a/Mage/src/main/java/mage/game/permanent/token/PestToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/PestToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class PestToken extends Token { super("Pest", "0/1 colorless Pest artifact creature token"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Pest"); + subtype.add(SubType.PEST); power = new MageInt(0); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/PharikaSnakeToken.java b/Mage/src/main/java/mage/game/permanent/token/PharikaSnakeToken.java index e692208ccb..ae279bf775 100644 --- a/Mage/src/main/java/mage/game/permanent/token/PharikaSnakeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/PharikaSnakeToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.abilities.keyword.DeathtouchAbility; /** @@ -41,7 +42,7 @@ public class PharikaSnakeToken extends Token { this.setOriginalExpansionSetCode("JOU"); cardType.add(CardType.ENCHANTMENT); cardType.add(CardType.CREATURE); - subtype.add("Snake"); + subtype.add(SubType.SNAKE); color.setBlack(true); color.setGreen(true); this.addAbility(DeathtouchAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/PhyrexianRebirthHorrorToken.java b/Mage/src/main/java/mage/game/permanent/token/PhyrexianRebirthHorrorToken.java index 5fc615a7b9..c7f05e9862 100644 --- a/Mage/src/main/java/mage/game/permanent/token/PhyrexianRebirthHorrorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/PhyrexianRebirthHorrorToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class PhyrexianRebirthHorrorToken extends Token { super("Horror", "X/X colorless Horror artifact creature token"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Horror"); + subtype.add(SubType.HORROR); power = new MageInt(0); toughness = new MageInt(0); } diff --git a/Mage/src/main/java/mage/game/permanent/token/PincherToken.java b/Mage/src/main/java/mage/game/permanent/token/PincherToken.java index fe0e505b9a..35c7e807b6 100644 --- a/Mage/src/main/java/mage/game/permanent/token/PincherToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/PincherToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class PincherToken extends Token { super("Pincher", "2/2 colorless Pincher creature token"); setOriginalExpansionSetCode("5ND"); cardType.add(CardType.CREATURE); - subtype.add("Pincher"); + subtype.add(SubType.PINCHER); power = new MageInt(2); toughness = new MageInt(2); diff --git a/Mage/src/main/java/mage/game/permanent/token/PirateToken.java b/Mage/src/main/java/mage/game/permanent/token/PirateToken.java new file mode 100644 index 0000000000..fe4d04270f --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/PirateToken.java @@ -0,0 +1,50 @@ +/* +* 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.game.permanent.token; + +import mage.constants.CardType; +import mage.MageInt; +import mage.abilities.keyword.MenaceAbility; +import mage.constants.SubType; + +/** + * + * @author TheElk801 + */ +public class PirateToken extends Token { + + public PirateToken() { + super("Pirate", "2/2 black Pirate creature token with menace"); + cardType.add(CardType.CREATURE); + color.setBlack(true); + subtype.add(SubType.PIRATE); + power = new MageInt(2); + toughness = new MageInt(2); + addAbility(new MenaceAbility()); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/PlantToken.java b/Mage/src/main/java/mage/game/permanent/token/PlantToken.java index c6151c9315..b6399a6f57 100644 --- a/Mage/src/main/java/mage/game/permanent/token/PlantToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/PlantToken.java @@ -33,6 +33,7 @@ import java.util.Arrays; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; public class PlantToken extends Token { @@ -46,7 +47,7 @@ public class PlantToken extends Token { super("Plant", "0/1 green Plant creature"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Plant"); + subtype.add(SubType.PLANT); power = new MageInt(0); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/PongifyApeToken.java b/Mage/src/main/java/mage/game/permanent/token/PongifyApeToken.java index fb6b331300..e88c758ef0 100644 --- a/Mage/src/main/java/mage/game/permanent/token/PongifyApeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/PongifyApeToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class PongifyApeToken extends Token { super("Ape", "3/3 green Ape creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Ape"); + subtype.add(SubType.APE); power = new MageInt(3); toughness = new MageInt(3); } diff --git a/Mage/src/main/java/mage/game/permanent/token/PrismToken.java b/Mage/src/main/java/mage/game/permanent/token/PrismToken.java index cb9f56b448..814082f49a 100644 --- a/Mage/src/main/java/mage/game/permanent/token/PrismToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/PrismToken.java @@ -32,6 +32,7 @@ import java.util.Collections; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -50,7 +51,7 @@ public class PrismToken extends Token { availableImageSetCodes = tokenImageSets; cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Prism"); + subtype.add(SubType.PRISM); power = new MageInt(0); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/PromiseOfPowerDemonToken.java b/Mage/src/main/java/mage/game/permanent/token/PromiseOfPowerDemonToken.java index fbbcceb2be..cd5fa9d064 100644 --- a/Mage/src/main/java/mage/game/permanent/token/PromiseOfPowerDemonToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/PromiseOfPowerDemonToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -46,7 +47,7 @@ public class PromiseOfPowerDemonToken extends Token { setTokenType(2); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Demon"); + subtype.add(SubType.DEMON); power = new MageInt(xValue); toughness = new MageInt(xValue); diff --git a/Mage/src/main/java/mage/game/permanent/token/ProsshKoboldToken.java b/Mage/src/main/java/mage/game/permanent/token/ProsshKoboldToken.java index cc3a19aa1c..cbc506185f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ProsshKoboldToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ProsshKoboldToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class ProsshKoboldToken extends Token { super("Kobolds of Kher Keep", "0/1 red Kobold creature tokens"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Kobold"); + subtype.add(SubType.KOBOLD); power = new MageInt(0); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/QueenMarchesaAssassinToken.java b/Mage/src/main/java/mage/game/permanent/token/QueenMarchesaAssassinToken.java index 1bde202df4..44247fafd6 100644 --- a/Mage/src/main/java/mage/game/permanent/token/QueenMarchesaAssassinToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/QueenMarchesaAssassinToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.HasteAbility; @@ -42,7 +43,7 @@ public class QueenMarchesaAssassinToken extends Token { super("Assassin", "1/1 black Assassin creature tokens with deathtouch and haste"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Assassin"); + subtype.add(SubType.ASSASSIN); power = new MageInt(1); toughness = new MageInt(1); addAbility(DeathtouchAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/QuestForTheGravelordZombieToken.java b/Mage/src/main/java/mage/game/permanent/token/QuestForTheGravelordZombieToken.java index 4090d51a07..a061e45fee 100644 --- a/Mage/src/main/java/mage/game/permanent/token/QuestForTheGravelordZombieToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/QuestForTheGravelordZombieToken.java @@ -30,6 +30,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -40,8 +41,8 @@ public class QuestForTheGravelordZombieToken extends Token { public QuestForTheGravelordZombieToken() { super("Zombie Giant", "5/5 black Zombie Giant creature token"); cardType.add(CardType.CREATURE); - subtype.add("Zombie"); - subtype.add("Giant"); + subtype.add(SubType.ZOMBIE); + subtype.add(SubType.GIANT); color.setBlack(true); power = new MageInt(5); diff --git a/Mage/src/main/java/mage/game/permanent/token/RagavanToken.java b/Mage/src/main/java/mage/game/permanent/token/RagavanToken.java index d7cd2a0d67..fe59b66577 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RagavanToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RagavanToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; /** @@ -43,7 +44,7 @@ public class RagavanToken extends Token { this.getPower().modifyBaseValue(2); this.getToughness().modifyBaseValue(1); this.color.setRed(true); - this.getSubtype(null).add("Monkey"); + this.getSubtype(null).add(SubType.MONKEY); this.addCardType(CardType.CREATURE); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/RakdosGuildmageGoblinToken.java b/Mage/src/main/java/mage/game/permanent/token/RakdosGuildmageGoblinToken.java index 4373ef988d..df5137bb05 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RakdosGuildmageGoblinToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RakdosGuildmageGoblinToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.HasteAbility; @@ -41,7 +42,7 @@ public class RakdosGuildmageGoblinToken extends Token { super("Goblin", "2/1 red Goblin creature token with haste"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Goblin"); + subtype.add(SubType.GOBLIN); power = new MageInt(2); toughness = new MageInt(1); this.addAbility(HasteAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/RakkaMarElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/RakkaMarElementalToken.java index 443391fd33..e4a372f11f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RakkaMarElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RakkaMarElementalToken.java @@ -30,6 +30,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.abilities.keyword.HasteAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class RakkaMarElementalToken extends Token { super("Elemental", "3/1 red Elemental creature with Haste"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(3); toughness = new MageInt(1); addAbility(HasteAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/RallyTheHordeWarriorToken.java b/Mage/src/main/java/mage/game/permanent/token/RallyTheHordeWarriorToken.java index 9e782a7188..b529fd1417 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RallyTheHordeWarriorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RallyTheHordeWarriorToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class RallyTheHordeWarriorToken extends Token { super("Warrior", "1/1 red Warrior creature token"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Warrior"); + subtype.add(SubType.WARRIOR); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/RapidHybridizationToken.java b/Mage/src/main/java/mage/game/permanent/token/RapidHybridizationToken.java index d22e593f70..92a1cfb8db 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RapidHybridizationToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RapidHybridizationToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -43,8 +44,8 @@ public class RapidHybridizationToken extends Token { color.setGreen(true); - subtype.add("Frog"); - subtype.add("Lizard"); + subtype.add(SubType.FROG); + subtype.add(SubType.LIZARD); power = new MageInt(3); toughness = new MageInt(3); diff --git a/Mage/src/main/java/mage/game/permanent/token/RatToken.java b/Mage/src/main/java/mage/game/permanent/token/RatToken.java index d1a004f4ce..264a4d686c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RatToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RatToken.java @@ -30,6 +30,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -46,7 +47,7 @@ public class RatToken extends Token { this.setOriginalExpansionSetCode(setCode); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Rat"); + subtype.add(SubType.RAT); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/RebelStarshipToken.java b/Mage/src/main/java/mage/game/permanent/token/RebelStarshipToken.java index b35e418a8e..4cdc4265b8 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RebelStarshipToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RebelStarshipToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.abilities.keyword.SpaceflightAbility; /** @@ -43,7 +44,7 @@ public class RebelStarshipToken extends Token { cardType.add(CardType.ARTIFACT); abilities.add(SpaceflightAbility.getInstance()); color.setBlue(true); - subtype.add("Rebel"); - subtype.add("Starship"); + subtype.add(SubType.REBEL); + subtype.add(SubType.STARSHIP); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/RebelToken.java b/Mage/src/main/java/mage/game/permanent/token/RebelToken.java index 50699ac436..bb0d4162c2 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RebelToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RebelToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -40,6 +41,6 @@ public class RebelToken extends Token { this.setOriginalExpansionSetCode("SWS"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Rebel"); + subtype.add(SubType.REBEL); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/RedHumanToken.java b/Mage/src/main/java/mage/game/permanent/token/RedHumanToken.java index 28348c4471..72e40b74f2 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RedHumanToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RedHumanToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.ObjectColor; @@ -40,7 +41,7 @@ public class RedHumanToken extends Token { public RedHumanToken() { super("Human", "1/1 red Human creature token"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); this.color = ObjectColor.RED; this.power = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/ReefWormFishToken.java b/Mage/src/main/java/mage/game/permanent/token/ReefWormFishToken.java index cd00acba9c..6e59edda2c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ReefWormFishToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ReefWormFishToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; @@ -43,7 +44,7 @@ public class ReefWormFishToken extends Token { setOriginalExpansionSetCode("C14"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Fish"); + subtype.add(SubType.FISH); power = new MageInt(3); toughness = new MageInt(3); diff --git a/Mage/src/main/java/mage/game/permanent/token/ReefWormKrakenToken.java b/Mage/src/main/java/mage/game/permanent/token/ReefWormKrakenToken.java index 625c23900b..9eac554493 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ReefWormKrakenToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ReefWormKrakenToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,7 +42,7 @@ public class ReefWormKrakenToken extends Token { setOriginalExpansionSetCode("C14"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Kraken"); + subtype.add(SubType.KRAKEN); power = new MageInt(9); toughness = new MageInt(9); } diff --git a/Mage/src/main/java/mage/game/permanent/token/ReefWormWhaleToken.java b/Mage/src/main/java/mage/game/permanent/token/ReefWormWhaleToken.java index 5cde984b63..65cd3a7bf3 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ReefWormWhaleToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ReefWormWhaleToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; @@ -43,7 +44,7 @@ public class ReefWormWhaleToken extends Token { setOriginalExpansionSetCode("C14"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Whale"); + subtype.add(SubType.WHALE); power = new MageInt(6); toughness = new MageInt(6); diff --git a/Mage/src/main/java/mage/game/permanent/token/ReflectionToken.java b/Mage/src/main/java/mage/game/permanent/token/ReflectionToken.java index 8c50d67b09..e40da5e375 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ReflectionToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ReflectionToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,7 +42,7 @@ public class ReflectionToken extends Token { this.setOriginalExpansionSetCode("TMP"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Reflection"); + subtype.add(SubType.REFLECTION); power = new MageInt(2); toughness = new MageInt(2); } diff --git a/Mage/src/main/java/mage/game/permanent/token/ReignOfThePitToken.java b/Mage/src/main/java/mage/game/permanent/token/ReignOfThePitToken.java index 2830ea3ec2..21e11c9071 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ReignOfThePitToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ReignOfThePitToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -45,7 +46,7 @@ public class ReignOfThePitToken extends Token { power = new MageInt(xValue); toughness = new MageInt(xValue); color.setBlack(true); - subtype.add("Demon"); + subtype.add(SubType.DEMON); cardType.add(CardType.CREATURE); this.addAbility(FlyingAbility.getInstance()); } diff --git a/Mage/src/main/java/mage/game/permanent/token/RenownedWeaverSpiderToken.java b/Mage/src/main/java/mage/game/permanent/token/RenownedWeaverSpiderToken.java index 4a9d295748..05c27e63c9 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RenownedWeaverSpiderToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RenownedWeaverSpiderToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.ObjectColor; import mage.abilities.keyword.ReachAbility; @@ -44,7 +45,7 @@ public class RenownedWeaverSpiderToken extends Token { cardType.add(CardType.ENCHANTMENT); cardType.add(CardType.CREATURE); color.setColor(ObjectColor.GREEN); - subtype.add("Spider"); + subtype.add(SubType.SPIDER); power = new MageInt(1); toughness = new MageInt(3); this.addAbility(ReachAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/RevelOfTheFallenGodSatyrToken.java b/Mage/src/main/java/mage/game/permanent/token/RevelOfTheFallenGodSatyrToken.java index 9701a858ff..14da9697bf 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RevelOfTheFallenGodSatyrToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RevelOfTheFallenGodSatyrToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.ObjectColor; import mage.abilities.keyword.HasteAbility; @@ -44,7 +45,7 @@ public class RevelOfTheFallenGodSatyrToken extends Token { cardType.add(CardType.CREATURE); color.setColor(ObjectColor.RED); color.setColor(ObjectColor.GREEN); - subtype.add("Satyr"); + subtype.add(SubType.SATYR); power = new MageInt(2); toughness = new MageInt(2); addAbility(HasteAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/RhinoToken.java b/Mage/src/main/java/mage/game/permanent/token/RhinoToken.java index 36a93b14ce..fbad63dec3 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RhinoToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RhinoToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.TrampleAbility; @@ -41,7 +42,7 @@ public class RhinoToken extends Token { super("Rhino", "4/4 green Rhino creature token with trample"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Rhino"); + subtype.add(SubType.RHINO); power = new MageInt(4); toughness = new MageInt(4); addAbility(TrampleAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/RhonassLastStandToken.java b/Mage/src/main/java/mage/game/permanent/token/RhonassLastStandToken.java index 204344b824..bd64e604bb 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RhonassLastStandToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RhonassLastStandToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.TrampleAbility; @@ -41,7 +42,7 @@ public class RhonassLastStandToken extends Token { super("Snake", "5/4 green Snake creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Snake"); + subtype.add(SubType.SNAKE); power = new MageInt(5); toughness = new MageInt(4); } diff --git a/Mage/src/main/java/mage/game/permanent/token/RhysTheRedeemedToken.java b/Mage/src/main/java/mage/game/permanent/token/RhysTheRedeemedToken.java index 300e7a359f..41149d7759 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RhysTheRedeemedToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RhysTheRedeemedToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,8 +42,8 @@ public class RhysTheRedeemedToken extends Token { cardType.add(CardType.CREATURE); color.setGreen(true); color.setWhite(true); - subtype.add("Elf"); - subtype.add("Warrior"); + subtype.add(SubType.ELF); + subtype.add(SubType.WARRIOR); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/RiftmarkedKnightToken.java b/Mage/src/main/java/mage/game/permanent/token/RiftmarkedKnightToken.java index 10b4de59aa..8fa987ca0c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RiftmarkedKnightToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RiftmarkedKnightToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.ObjectColor; import mage.abilities.keyword.FlankingAbility; @@ -44,7 +45,7 @@ public class RiftmarkedKnightToken extends Token { super("Knight", "2/2 black Knight creature token with flanking, protection from white, and haste"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Knight"); + subtype.add(SubType.KNIGHT); power = new MageInt(2); toughness = new MageInt(2); this.addAbility(ProtectionAbility.from(ObjectColor.WHITE)); diff --git a/Mage/src/main/java/mage/game/permanent/token/RiseOfEaglesBirdToken.java b/Mage/src/main/java/mage/game/permanent/token/RiseOfEaglesBirdToken.java index ac6a182ddb..e739b77b40 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RiseOfEaglesBirdToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RiseOfEaglesBirdToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.ObjectColor; import mage.abilities.keyword.FlyingAbility; @@ -45,7 +46,7 @@ public class RiseOfEaglesBirdToken extends Token { cardType.add(CardType.ENCHANTMENT); cardType.add(CardType.CREATURE); color.setColor(ObjectColor.BLUE); - subtype.add("Bird"); + subtype.add(SubType.BIRD); power = new MageInt(2); toughness = new MageInt(2); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/RitualOfTheReturnedZombieToken.java b/Mage/src/main/java/mage/game/permanent/token/RitualOfTheReturnedZombieToken.java index 5f682368f9..d03b104efe 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RitualOfTheReturnedZombieToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RitualOfTheReturnedZombieToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -44,7 +45,7 @@ public class RitualOfTheReturnedZombieToken extends Token { this.setOriginalExpansionSetCode("JOU"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Zombie"); + subtype.add(SubType.ZOMBIE); this.power = new MageInt(power); this.toughness = new MageInt(toughness); } diff --git a/Mage/src/main/java/mage/game/permanent/token/RocEggToken.java b/Mage/src/main/java/mage/game/permanent/token/RocEggToken.java index 2c4ee5efde..450bc9bcb9 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RocEggToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RocEggToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -40,7 +41,7 @@ public class RocEggToken extends Token { public RocEggToken() { super("Bird", "3/3 white Bird creature token with flying"); cardType.add(CardType.CREATURE); - subtype.add("Bird"); + subtype.add(SubType.BIRD); color.setWhite(true); power = new MageInt(3); toughness = new MageInt(3); diff --git a/Mage/src/main/java/mage/game/permanent/token/RoyalGuardToken.java b/Mage/src/main/java/mage/game/permanent/token/RoyalGuardToken.java index a50123ee9c..c479d10c8a 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RoyalGuardToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RoyalGuardToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.abilities.keyword.FirstStrikeAbility; /** @@ -42,6 +43,6 @@ public class RoyalGuardToken extends Token { cardType.add(CardType.CREATURE); color.setRed(true); addAbility(FirstStrikeAbility.getInstance()); - subtype.add("Soldier"); + subtype.add(SubType.SOLDIER); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/RukhEggBirdToken.java b/Mage/src/main/java/mage/game/permanent/token/RukhEggBirdToken.java index fbfa9422cc..491932ee75 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RukhEggBirdToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RukhEggBirdToken.java @@ -30,6 +30,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -47,7 +48,7 @@ public class RukhEggBirdToken extends Token { cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Bird"); + subtype.add(SubType.BIRD); power = new MageInt(4); toughness = new MageInt(4); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/SaprolingBurstToken.java b/Mage/src/main/java/mage/game/permanent/token/SaprolingBurstToken.java index e3eeebc51e..754351ddb9 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SaprolingBurstToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SaprolingBurstToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageObjectReference; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; @@ -56,7 +57,7 @@ public class SaprolingBurstToken extends Token { public SaprolingBurstToken(MageObjectReference saprolingBurstMOR) { super("Saproling", "green Saproling creature token with \"This creature's power and toughness are each equal to the number of fade counters on Saproling Burst.\""); this.color.setGreen(true); - this.subtype.add("Saproling"); + this.subtype.add(SubType.SAPROLING); this.cardType.add(CardType.CREATURE); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetPowerToughnessSourceEffect(new SaprolingBurstTokenDynamicValue(saprolingBurstMOR), Duration.WhileOnBattlefield))); } diff --git a/Mage/src/main/java/mage/game/permanent/token/SaprolingToken.java b/Mage/src/main/java/mage/game/permanent/token/SaprolingToken.java index 4c7f7b70a1..bb3befdd9b 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SaprolingToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SaprolingToken.java @@ -33,6 +33,7 @@ import java.util.Arrays; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; import mage.util.RandomUtil; /** @@ -64,7 +65,7 @@ public class SaprolingToken extends Token { } cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Saproling"); + subtype.add(SubType.SAPROLING); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/SatyrNyxSmithElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/SatyrNyxSmithElementalToken.java index f18d31d183..1557111c73 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SatyrNyxSmithElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SatyrNyxSmithElementalToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.HasteAbility; @@ -42,7 +43,7 @@ public class SatyrNyxSmithElementalToken extends Token { cardType.add(CardType.ENCHANTMENT); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(3); toughness = new MageInt(1); this.addAbility(HasteAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/SeedGuardianToken.java b/Mage/src/main/java/mage/game/permanent/token/SeedGuardianToken.java index 3b8147f55e..298202922d 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SeedGuardianToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SeedGuardianToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -45,7 +46,7 @@ public class SeedGuardianToken extends Token { setOriginalExpansionSetCode("OGW"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(xValue); toughness = new MageInt(xValue); diff --git a/Mage/src/main/java/mage/game/permanent/token/SekKuarDeathkeeperGravebornToken.java b/Mage/src/main/java/mage/game/permanent/token/SekKuarDeathkeeperGravebornToken.java index 7a1e075b3b..89a8864a73 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SekKuarDeathkeeperGravebornToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SekKuarDeathkeeperGravebornToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.HasteAbility; @@ -42,7 +43,7 @@ public class SekKuarDeathkeeperGravebornToken extends Token { cardType.add(CardType.CREATURE); color.setBlack(true); color.setRed(true); - subtype.add("Graveborn"); + subtype.add(SubType.GRAVEBORN); power = new MageInt(3); toughness = new MageInt(1); this.addAbility(HasteAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/SengirNosferatuBatToken.java b/Mage/src/main/java/mage/game/permanent/token/SengirNosferatuBatToken.java index 688b77e2cc..5b099b10c8 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SengirNosferatuBatToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SengirNosferatuBatToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import java.util.UUID; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -56,7 +57,7 @@ public class SengirNosferatuBatToken extends Token { super("Bat", "1/2 black Bat creature token with flying"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Bat"); + subtype.add(SubType.BAT); power = new MageInt(1); toughness = new MageInt(2); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/SerfToken.java b/Mage/src/main/java/mage/game/permanent/token/SerfToken.java index 40d8fb8f79..f083151c07 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SerfToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SerfToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class SerfToken extends Token { super("Serf", "0/1 black Serf creature token"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Serf"); + subtype.add(SubType.SERF); power = new MageInt(0); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/SerpentGeneratorSnakeToken.java b/Mage/src/main/java/mage/game/permanent/token/SerpentGeneratorSnakeToken.java index 84576d8f31..feb2f0d85f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SerpentGeneratorSnakeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SerpentGeneratorSnakeToken.java @@ -32,6 +32,7 @@ import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.counter.AddPoisonCounterTargetEffect; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -43,7 +44,7 @@ public class SerpentGeneratorSnakeToken extends Token { super("Snake", "1/1 colorless Snake artifact creature token with \"Whenever this creature deals damage to a player, that player gets a poison counter.\""); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Snake"); + subtype.add(SubType.SNAKE); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/ServoToken.java b/Mage/src/main/java/mage/game/permanent/token/ServoToken.java index 6be5dc0bde..09f37cf2d4 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ServoToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ServoToken.java @@ -32,6 +32,7 @@ import java.util.Collections; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; import mage.util.RandomUtil; /** @@ -51,7 +52,7 @@ public class ServoToken extends Token { availableImageSetCodes = tokenImageSets; cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Servo"); + subtype.add(SubType.SERVO); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/SheepToken.java b/Mage/src/main/java/mage/game/permanent/token/SheepToken.java new file mode 100644 index 0000000000..5d20d01cd9 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/SheepToken.java @@ -0,0 +1,48 @@ +/* + * 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.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class SheepToken extends Token { + + public SheepToken() { + super("Sheep", "0/1 green Sheep creature token"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add(SubType.SHEEP); + power = new MageInt(0); + toughness = new MageInt(1); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/SkeletonToken.java b/Mage/src/main/java/mage/game/permanent/token/SkeletonToken.java index f821ae81f1..846d28fe70 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SkeletonToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SkeletonToken.java @@ -5,6 +5,7 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ColoredManaCost; import mage.abilities.effects.common.RegenerateSourceEffect; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; @@ -12,7 +13,7 @@ public class SkeletonToken extends Token { public SkeletonToken() { super("Skeleton", "1/1 black Skeleton creature with \"{B}: Regenerate this creature\""); cardType.add(CardType.CREATURE); - this.subtype.add("Skeleton"); + this.subtype.add(SubType.SKELETON); color.setBlack(true); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/SkywiseTeachingsToken.java b/Mage/src/main/java/mage/game/permanent/token/SkywiseTeachingsToken.java index 5fb58a7465..1240e07edd 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SkywiseTeachingsToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SkywiseTeachingsToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -41,8 +42,8 @@ public class SkywiseTeachingsToken extends Token { super("Djinn Monk", "2/2 blue Djinn Monk creature token with flying"); cardType.add(CardType.CREATURE); color.setBlue(true); - this.subtype.add("Djinn"); - this.subtype.add("Monk"); + this.subtype.add(SubType.DJINN); + this.subtype.add(SubType.MONK); power = new MageInt(2); toughness = new MageInt(2); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/SliverToken.java b/Mage/src/main/java/mage/game/permanent/token/SliverToken.java index 1c95852bfe..837edf322c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SliverToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SliverToken.java @@ -30,6 +30,7 @@ package mage.game.permanent.token; import java.util.Arrays; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,7 +42,7 @@ public class SliverToken extends Token { public SliverToken() { super("Sliver", "1/1 colorless Sliver creature token"); cardType.add(CardType.CREATURE); - subtype.add("Sliver"); + subtype.add(SubType.SLIVER); power = new MageInt(1); toughness = new MageInt(1); availableImageSetCodes.addAll(Arrays.asList("M14", "M15")); diff --git a/Mage/src/main/java/mage/game/permanent/token/SliversmithToken.java b/Mage/src/main/java/mage/game/permanent/token/SliversmithToken.java index 3f9bb18771..93bb22f1d2 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SliversmithToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SliversmithToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class SliversmithToken extends Token { super("Metallic Sliver", "1/1 colorless Sliver creature token named Metallic Sliver"); cardType.add(CardType.CREATURE); cardType.add(CardType.ARTIFACT); - subtype.add("Sliver"); + subtype.add(SubType.SLIVER); power = new MageInt(1); toughness = new MageInt(1); this.setOriginalExpansionSetCode("FUT"); diff --git a/Mage/src/main/java/mage/game/permanent/token/SnakeToken.java b/Mage/src/main/java/mage/game/permanent/token/SnakeToken.java index 401e2cea7c..922f3f57ef 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SnakeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SnakeToken.java @@ -33,6 +33,7 @@ import java.util.Arrays; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -59,7 +60,7 @@ public class SnakeToken extends Token { } cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Snake"); + subtype.add(SubType.SNAKE); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/SoldierToken.java b/Mage/src/main/java/mage/game/permanent/token/SoldierToken.java index 08a1ddb3cb..eec6d47f31 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SoldierToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SoldierToken.java @@ -32,6 +32,7 @@ import java.util.Arrays; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; import mage.util.RandomUtil; /** @@ -53,7 +54,7 @@ public class SoldierToken extends Token { cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Soldier"); + subtype.add(SubType.SOLDIER); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/SoldierTokenWithHaste.java b/Mage/src/main/java/mage/game/permanent/token/SoldierTokenWithHaste.java index 7db5eb6c50..0dfc964681 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SoldierTokenWithHaste.java +++ b/Mage/src/main/java/mage/game/permanent/token/SoldierTokenWithHaste.java @@ -32,6 +32,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.HasteAbility; @@ -52,7 +53,7 @@ public class SoldierTokenWithHaste extends Token { cardType.add(CardType.CREATURE); color.setWhite(true); color.setRed(true); - subtype.add("Soldier"); + subtype.add(SubType.SOLDIER); power = new MageInt(1); toughness = new MageInt(1); addAbility(HasteAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/SorinLordOfInnistradVampireToken.java b/Mage/src/main/java/mage/game/permanent/token/SorinLordOfInnistradVampireToken.java index 1ec1623d1d..ae50cc90ae 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SorinLordOfInnistradVampireToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SorinLordOfInnistradVampireToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.LifelinkAbility; @@ -41,7 +42,7 @@ public class SorinLordOfInnistradVampireToken extends Token { super("Vampire", "1/1 black Vampire creature token with lifelink"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Vampire"); + subtype.add(SubType.VAMPIRE); power = new MageInt(1); toughness = new MageInt(1); addAbility(LifelinkAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/SorinSolemnVisitorVampireToken.java b/Mage/src/main/java/mage/game/permanent/token/SorinSolemnVisitorVampireToken.java index 88411de49d..84db3b5a1c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SorinSolemnVisitorVampireToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SorinSolemnVisitorVampireToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -42,7 +43,7 @@ public class SorinSolemnVisitorVampireToken extends Token { setOriginalExpansionSetCode("KTK"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Vampire"); + subtype.add(SubType.VAMPIRE); power = new MageInt(2); toughness = new MageInt(2); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/SoundTheCallToken.java b/Mage/src/main/java/mage/game/permanent/token/SoundTheCallToken.java new file mode 100644 index 0000000000..d422985b2e --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/SoundTheCallToken.java @@ -0,0 +1,70 @@ +/* +* 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.game.permanent.token; + +import mage.constants.CardType; +import mage.constants.SubType; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.CardsInAllGraveyardsCount; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.NamePredicate; + +/** + * + * @author TheElk801 + */ +public class SoundTheCallToken extends Token { + + private static final FilterCard filter = new FilterCard("card named Sound the Call"); + + static { + filter.add(new NamePredicate("Sound the Call")); + } + + public SoundTheCallToken() { + super("Wolf", "1/1 green Wolf creature token. It has \"This creature gets +1/+1 for each card named Sound the Call in each graveyard.\""); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add(SubType.WOLF); + power = new MageInt(1); + toughness = new MageInt(1); + + DynamicValue value = new CardsInAllGraveyardsCount(filter); + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, + new BoostSourceEffect(value, value, Duration.WhileOnBattlefield) + .setText("This creature gets +1/+1 for each card named Sound the Call in each graveyard.") + )); + } + +} diff --git a/Mage/src/main/java/mage/game/permanent/token/SparkElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/SparkElementalToken.java index 6c36b99a51..048877dc25 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SparkElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SparkElementalToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; @@ -46,7 +47,7 @@ public class SparkElementalToken extends Token { this.setOriginalExpansionSetCode("FUT"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(3); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/SpawningGroundsBeastToken.java b/Mage/src/main/java/mage/game/permanent/token/SpawningGroundsBeastToken.java index f403933e83..23bf83262e 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SpawningGroundsBeastToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SpawningGroundsBeastToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.TrampleAbility; @@ -41,7 +42,7 @@ public class SpawningGroundsBeastToken extends Token { super("Beast", "5/5 green Beast creature token with trample"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Beast"); + subtype.add(SubType.BEAST); power = new MageInt(5); toughness = new MageInt(5); this.addAbility(TrampleAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/SpawningPitToken.java b/Mage/src/main/java/mage/game/permanent/token/SpawningPitToken.java index 28611d33ca..94745eded5 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SpawningPitToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SpawningPitToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class SpawningPitToken extends Token { super("Spawn", "2/2 colorless Spawn artifact creature token"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - this.subtype.add("Spawn"); + this.subtype.add(SubType.SPAWN); power = new MageInt(2); toughness = new MageInt(2); } diff --git a/Mage/src/main/java/mage/game/permanent/token/SpiderToken.java b/Mage/src/main/java/mage/game/permanent/token/SpiderToken.java index f2b09b9bdf..b91873fa8d 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SpiderToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SpiderToken.java @@ -11,6 +11,7 @@ import java.util.List; import mage.MageInt; import mage.abilities.keyword.ReachAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -38,7 +39,7 @@ public class SpiderToken extends Token { setOriginalExpansionSetCode(setCode); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Spider"); + subtype.add(SubType.SPIDER); power = new MageInt(1); toughness = new MageInt(2); addAbility(ReachAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/SpikeToken.java b/Mage/src/main/java/mage/game/permanent/token/SpikeToken.java index 520fec7534..853aa3efa7 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SpikeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SpikeToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class SpikeToken extends Token { super("Spike", "1/1 green Spike creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Spike"); + subtype.add(SubType.SPIKE); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/SpiritBlueToken.java b/Mage/src/main/java/mage/game/permanent/token/SpiritBlueToken.java index f0d35ea44d..3a08f1a1b4 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SpiritBlueToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SpiritBlueToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -40,7 +41,7 @@ public class SpiritBlueToken extends Token { public SpiritBlueToken() { super("Spirit", "1/1 blue Spirit creature token with flying"); cardType.add(CardType.CREATURE); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); color.setBlue(true); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/SpiritToken.java b/Mage/src/main/java/mage/game/permanent/token/SpiritToken.java index e6c42da745..2cc4737d86 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SpiritToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SpiritToken.java @@ -32,6 +32,7 @@ import java.util.Arrays; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @author Loki @@ -60,7 +61,7 @@ public class SpiritToken extends Token { setTokenType(tokenType); } cardType.add(CardType.CREATURE); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/SpiritWhiteToken.java b/Mage/src/main/java/mage/game/permanent/token/SpiritWhiteToken.java index 80509c2e7e..d6f16e234e 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SpiritWhiteToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SpiritWhiteToken.java @@ -33,6 +33,7 @@ import java.util.List; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @author nantuko @@ -61,7 +62,7 @@ public class SpiritWhiteToken extends Token { setTokenType(tokenType); } cardType.add(CardType.CREATURE); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); color.setWhite(true); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/SpoilsOfBloodHorrorToken.java b/Mage/src/main/java/mage/game/permanent/token/SpoilsOfBloodHorrorToken.java index 6a8761563a..87a868b96d 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SpoilsOfBloodHorrorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SpoilsOfBloodHorrorToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -44,7 +45,7 @@ public class SpoilsOfBloodHorrorToken extends Token { setOriginalExpansionSetCode("C14"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Horror"); + subtype.add(SubType.HORROR); power = new MageInt(xValue); toughness = new MageInt(xValue); } diff --git a/Mage/src/main/java/mage/game/permanent/token/SpyMasterGoblinToken.java b/Mage/src/main/java/mage/game/permanent/token/SpyMasterGoblinToken.java index 3c2d3aca43..1f717fe857 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SpyMasterGoblinToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SpyMasterGoblinToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.Effect; @@ -54,7 +55,7 @@ public class SpyMasterGoblinToken extends Token { super("Goblin", "1/1 red Goblin creature token with \"Creatures you control attack each combat if able.\""); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Goblin"); + subtype.add(SubType.GOBLIN); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/SquirrelToken.java b/Mage/src/main/java/mage/game/permanent/token/SquirrelToken.java index 347546b0d6..1f3234464e 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SquirrelToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SquirrelToken.java @@ -32,6 +32,7 @@ import java.util.Collections; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -49,7 +50,7 @@ public class SquirrelToken extends Token { super("Squirrel", "1/1 green Squirrel creature token"); availableImageSetCodes = tokenImageSets; cardType.add(CardType.CREATURE); - subtype.add("Squirrel"); + subtype.add(SubType.SQUIRREL); color.setGreen(true); power = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/StitcherGeralfZombieToken.java b/Mage/src/main/java/mage/game/permanent/token/StitcherGeralfZombieToken.java index 6b0318cacc..a3d75a57be 100644 --- a/Mage/src/main/java/mage/game/permanent/token/StitcherGeralfZombieToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/StitcherGeralfZombieToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -45,7 +46,7 @@ public class StitcherGeralfZombieToken extends Token { setTokenType(1); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Zombie"); + subtype.add(SubType.ZOMBIE); power = new MageInt(xValue); toughness = new MageInt(xValue); } diff --git a/Mage/src/main/java/mage/game/permanent/token/StitchersApprenticeHomunculusToken.java b/Mage/src/main/java/mage/game/permanent/token/StitchersApprenticeHomunculusToken.java index c7d255ebee..b6eeb7f687 100644 --- a/Mage/src/main/java/mage/game/permanent/token/StitchersApprenticeHomunculusToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/StitchersApprenticeHomunculusToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class StitchersApprenticeHomunculusToken extends Token { super("Homunculus", "2/2 blue Homunculus creature"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Homunculus"); + subtype.add(SubType.HOMUNCULUS); power = new MageInt(2); toughness = new MageInt(2); } diff --git a/Mage/src/main/java/mage/game/permanent/token/StoneTrapIdolToken.java b/Mage/src/main/java/mage/game/permanent/token/StoneTrapIdolToken.java index 40d56412f9..2278099722 100644 --- a/Mage/src/main/java/mage/game/permanent/token/StoneTrapIdolToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/StoneTrapIdolToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.TrampleAbility; @@ -41,7 +42,7 @@ public class StoneTrapIdolToken extends Token { super("Construct", "6/12 colorless Construct artifact creature token with trample"); cardType.add(CardType.CREATURE); cardType.add(CardType.ARTIFACT); - subtype.add("Construct"); + subtype.add(SubType.CONSTRUCT); power = new MageInt(6); toughness = new MageInt(12); addAbility(TrampleAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/SubterraneanTremorsLizardToken.java b/Mage/src/main/java/mage/game/permanent/token/SubterraneanTremorsLizardToken.java index 6ffe45639c..73a4386a58 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SubterraneanTremorsLizardToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SubterraneanTremorsLizardToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class SubterraneanTremorsLizardToken extends Token { super("Lizard", "an 8/8 red Lizard creature token"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Lizard"); + subtype.add(SubType.LIZARD); power = new MageInt(8); toughness = new MageInt(8); } diff --git a/Mage/src/main/java/mage/game/permanent/token/SwanSongBirdToken.java b/Mage/src/main/java/mage/game/permanent/token/SwanSongBirdToken.java index adbff44b4e..714b6b3c34 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SwanSongBirdToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SwanSongBirdToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -41,7 +42,7 @@ public class SwanSongBirdToken extends Token { super("Bird", "2/2 blue Bird creature token with flying"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Bird"); + subtype.add(SubType.BIRD); if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("C16")) { setTokenType(2); } diff --git a/Mage/src/main/java/mage/game/permanent/token/SylvanOfferingTreefolkToken.java b/Mage/src/main/java/mage/game/permanent/token/SylvanOfferingTreefolkToken.java index 729f3562b5..04dbf88aee 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SylvanOfferingTreefolkToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SylvanOfferingTreefolkToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -43,7 +44,7 @@ public class SylvanOfferingTreefolkToken extends Token { super("Treefolk", "X/X green Treefolk creature token"); setOriginalExpansionSetCode("C14"); cardType.add(CardType.CREATURE); - subtype.add("Treefolk"); + subtype.add(SubType.TREEFOLK); color.setGreen(true); power = new MageInt(xValue); toughness = new MageInt(xValue); diff --git a/Mage/src/main/java/mage/game/permanent/token/TIEFighterToken.java b/Mage/src/main/java/mage/game/permanent/token/TIEFighterToken.java index 2d091f6f15..7d24c106a1 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TIEFighterToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TIEFighterToken.java @@ -1,26 +1,27 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package mage.game.permanent.token; - -import mage.abilities.keyword.SpaceflightAbility; -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class TIEFighterToken extends Token { - - public TIEFighterToken() { - super("TIE Fighter", "1/1 black Starship artifact creature tokens with Spaceflight named TIE Fighter", 1, 1); - this.setOriginalExpansionSetCode("SWS"); - cardType.add(CardType.CREATURE); - cardType.add(CardType.ARTIFACT); - color.setBlack(true); - addAbility(SpaceflightAbility.getInstance()); - subtype.add("Starship"); - } -} +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.game.permanent.token; + +import mage.abilities.keyword.SpaceflightAbility; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author Styxo + */ +public class TIEFighterToken extends Token { + + public TIEFighterToken() { + super("TIE Fighter", "1/1 black Starship artifact creature tokens with Spaceflight named TIE Fighter", 1, 1); + this.setOriginalExpansionSetCode("SWS"); + cardType.add(CardType.CREATURE); + cardType.add(CardType.ARTIFACT); + color.setBlack(true); + addAbility(SpaceflightAbility.getInstance()); + subtype.add(SubType.STARSHIP); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/TatsumaDragonToken.java b/Mage/src/main/java/mage/game/permanent/token/TatsumaDragonToken.java index ca12f17821..6663ccec93 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TatsumaDragonToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TatsumaDragonToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -41,8 +42,8 @@ public class TatsumaDragonToken extends Token { super("Dragon Spirit", "5/5 blue Dragon Spirit creature token with flying"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Dragon"); - subtype.add("Spirit"); + subtype.add(SubType.DRAGON); + subtype.add(SubType.SPIRIT); power = new MageInt(5); toughness = new MageInt(5); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/TemptWithVengeanceElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/TemptWithVengeanceElementalToken.java index f3a633e7de..91557241f0 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TemptWithVengeanceElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TemptWithVengeanceElementalToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.HasteAbility; @@ -40,7 +41,7 @@ public class TemptWithVengeanceElementalToken extends Token { public TemptWithVengeanceElementalToken() { super("Elemental", "1/1 red Elemental creature tokens with haste"); cardType.add(CardType.CREATURE); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); color.setRed(true); power = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/TetraviteToken.java b/Mage/src/main/java/mage/game/permanent/token/TetraviteToken.java index 4cf1dea7a5..2345916ce2 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TetraviteToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TetraviteToken.java @@ -46,7 +46,7 @@ public class TetraviteToken extends Token { super("Tetravite", "1/1 colorless Tetravite artifact creature token"); cardType.add(CardType.CREATURE); cardType.add(CardType.ARTIFACT); - subtype.add("Tetravite"); + subtype.add(SubType.TETRAVITE); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/TeysaEnvoyOfGhostsToken.java b/Mage/src/main/java/mage/game/permanent/token/TeysaEnvoyOfGhostsToken.java index 9cce86a93f..4dd3ca65e3 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TeysaEnvoyOfGhostsToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TeysaEnvoyOfGhostsToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -42,7 +43,7 @@ public class TeysaEnvoyOfGhostsToken extends Token { cardType.add(CardType.CREATURE); color.setWhite(true); color.setBlack(true); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); power = new MageInt(1); toughness = new MageInt(1); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/ThatcherHumanToken.java b/Mage/src/main/java/mage/game/permanent/token/ThatcherHumanToken.java index 9b174bee7f..b3c16d64ca 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ThatcherHumanToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ThatcherHumanToken.java @@ -31,6 +31,7 @@ import mage.MageInt; import mage.ObjectColor; import mage.abilities.keyword.HasteAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class ThatcherHumanToken extends Token { public ThatcherHumanToken() { super("Human", "1/1 red Human creature token with haste"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Human"); + this.subtype.add(SubType.HUMAN); addAbility(HasteAbility.getInstance()); this.color = ObjectColor.RED; diff --git a/Mage/src/main/java/mage/game/permanent/token/TheLocustGodInsectToken.java b/Mage/src/main/java/mage/game/permanent/token/TheLocustGodInsectToken.java index 11cb737036..2f772fa874 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TheLocustGodInsectToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TheLocustGodInsectToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.FlyingAbility; @@ -44,7 +45,7 @@ public class TheLocustGodInsectToken extends Token { cardType.add(CardType.CREATURE); color.setBlue(true); color.setRed(true); - subtype.add("Insect"); + subtype.add(SubType.INSECT); power = new MageInt(1); toughness = new MageInt(1); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/ThopterColorlessToken.java b/Mage/src/main/java/mage/game/permanent/token/ThopterColorlessToken.java index c5d6eaeac5..b0162d264f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ThopterColorlessToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ThopterColorlessToken.java @@ -33,6 +33,7 @@ import java.util.List; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.constants.CardType; +import mage.constants.SubType; import mage.util.RandomUtil; /** @@ -52,7 +53,7 @@ public class ThopterColorlessToken extends Token { availableImageSetCodes = tokenImageSets; cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Thopter"); + subtype.add(SubType.THOPTER); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/ThopterToken.java b/Mage/src/main/java/mage/game/permanent/token/ThopterToken.java index 2f8b852b1d..de0d5753e7 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ThopterToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ThopterToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -42,7 +43,7 @@ public class ThopterToken extends Token { cardType.add(CardType.CREATURE); cardType.add(CardType.ARTIFACT); color.setBlue(true); - subtype.add("Thopter"); + subtype.add(SubType.THOPTER); power = new MageInt(1); toughness = new MageInt(1); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/ThrullToken.java b/Mage/src/main/java/mage/game/permanent/token/ThrullToken.java index ca6bd3b3e3..144249e8d1 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ThrullToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ThrullToken.java @@ -33,6 +33,7 @@ import java.util.Collections; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -49,7 +50,7 @@ public class ThrullToken extends Token { public ThrullToken() { super("Thrull", "1/1 black Thrull creature token"); cardType.add(CardType.CREATURE); - subtype.add("Thrull"); + subtype.add(SubType.THRULL); color.setBlack(true); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/TidalWaveWallToken.java b/Mage/src/main/java/mage/game/permanent/token/TidalWaveWallToken.java index 75248c19fd..248b0b255c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TidalWaveWallToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TidalWaveWallToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.DefenderAbility; @@ -41,7 +42,7 @@ public class TidalWaveWallToken extends Token { super("Wall", "5/5 blue Wall creature token with defender"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Wall"); + subtype.add(SubType.WALL); power = new MageInt(5); toughness = new MageInt(5); this.addAbility(DefenderAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/TitanForgeGolemToken.java b/Mage/src/main/java/mage/game/permanent/token/TitanForgeGolemToken.java index 9256c43ee8..5a2a2e1594 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TitanForgeGolemToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TitanForgeGolemToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class TitanForgeGolemToken extends Token { super("Golem", "9/9 colorless Golem artifact creature token"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Golem"); + subtype.add(SubType.GOLEM); power = new MageInt(9); toughness = new MageInt(9); } diff --git a/Mage/src/main/java/mage/game/permanent/token/TitaniaProtectorOfArgothElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/TitaniaProtectorOfArgothElementalToken.java index cdaf846674..dc7570c55e 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TitaniaProtectorOfArgothElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TitaniaProtectorOfArgothElementalToken.java @@ -31,6 +31,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.ObjectColor; @@ -60,7 +61,7 @@ public class TitaniaProtectorOfArgothElementalToken extends Token { this.setOriginalExpansionSetCode(setCode); this.cardType.add(CardType.CREATURE); this.color = ObjectColor.GREEN; - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(3); } diff --git a/Mage/src/main/java/mage/game/permanent/token/Token.java b/Mage/src/main/java/mage/game/permanent/token/Token.java index 55f23dacdd..57aced4814 100644 --- a/Mage/src/main/java/mage/game/permanent/token/Token.java +++ b/Mage/src/main/java/mage/game/permanent/token/Token.java @@ -310,8 +310,4 @@ public class Token extends MageObjectImpl { this.setExpansionSetCodeForImage(setCode); return true; } - - - - } diff --git a/Mage/src/main/java/mage/game/permanent/token/TreasureToken.java b/Mage/src/main/java/mage/game/permanent/token/TreasureToken.java new file mode 100644 index 0000000000..3181357b06 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/TreasureToken.java @@ -0,0 +1,73 @@ +/* + * 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.game.permanent.token; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import mage.abilities.Ability; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.AddManaOfAnyColorEffect; +import mage.abilities.mana.SimpleManaAbility; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class TreasureToken extends Token { + + final static private List tokenImageSets = new ArrayList<>(); + + static { + tokenImageSets.addAll(Arrays.asList("XLN")); + } + + public TreasureToken() { + this(null, 0); + } + + public TreasureToken(String setCode) { + this(setCode, 0); + } + + public TreasureToken(String setCode, int tokenType) { + super("Treasure", "colorless Treasure artifact token with \"{T}, Sacrifice this artifact: Add one mana of any color to your mana pool.\""); + availableImageSetCodes = tokenImageSets; + setOriginalExpansionSetCode(setCode); + cardType.add(CardType.ARTIFACT); + subtype.add(SubType.TREASURE); + + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/TreefolkShamanToken.java b/Mage/src/main/java/mage/game/permanent/token/TreefolkShamanToken.java index 611c016ade..acfd5fd20a 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TreefolkShamanToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TreefolkShamanToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,8 +41,8 @@ public class TreefolkShamanToken extends Token { super("Treefolk Shaman", "2/5 green Treefolk Shaman creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Treefolk"); - subtype.add("Shaman"); + subtype.add(SubType.TREEFOLK); + subtype.add(SubType.SHAMAN); power = new MageInt(2); toughness = new MageInt(5); } diff --git a/Mage/src/main/java/mage/game/permanent/token/TriskelaviteToken.java b/Mage/src/main/java/mage/game/permanent/token/TriskelaviteToken.java index eeb361288d..b8ff7bd183 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TriskelaviteToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TriskelaviteToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -48,7 +49,7 @@ public class TriskelaviteToken extends Token { this.setOriginalExpansionSetCode("TSP"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Triskelavite"); + subtype.add(SubType.TRISKELAVITE); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/TrooperToken.java b/Mage/src/main/java/mage/game/permanent/token/TrooperToken.java index 3270d6b0b7..049be8c6c4 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TrooperToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TrooperToken.java @@ -1,52 +1,53 @@ -/* - * 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.game.permanent.token; - -import java.util.Collections; - -import mage.MageInt; -import mage.constants.CardType; - -/** - * - * @author Styxo - */ -public class TrooperToken extends Token { - - public TrooperToken() { - super("Trooper", "1/1 white Trooper creature token"); - availableImageSetCodes.addAll(Collections.singletonList("SWS")); - - cardType.add(CardType.CREATURE); - subtype.add("Trooper"); - - color.setWhite(true); - power = new MageInt(1); - toughness = new MageInt(1); - } -} +/* + * 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.game.permanent.token; + +import java.util.Collections; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author Styxo + */ +public class TrooperToken extends Token { + + public TrooperToken() { + super("Trooper", "1/1 white Trooper creature token"); + availableImageSetCodes.addAll(Collections.singletonList("SWS")); + + cardType.add(CardType.CREATURE); + subtype.add(SubType.TROOPER); + + color.setWhite(true); + power = new MageInt(1); + toughness = new MageInt(1); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/TuktukTheReturnedToken.java b/Mage/src/main/java/mage/game/permanent/token/TuktukTheReturnedToken.java index 1310ad5bd2..619b3ca85f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TuktukTheReturnedToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TuktukTheReturnedToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.constants.SuperType; @@ -47,7 +48,7 @@ public class TuktukTheReturnedToken extends Token { cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); addSuperType(SuperType.LEGENDARY); - subtype.add("Goblin"); + subtype.add(SubType.GOBLIN); power = new MageInt(5); toughness = new MageInt(5); } diff --git a/Mage/src/main/java/mage/game/permanent/token/TuskenRaiderToken.java b/Mage/src/main/java/mage/game/permanent/token/TuskenRaiderToken.java index 2b97409929..5300719902 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TuskenRaiderToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TuskenRaiderToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -40,7 +41,7 @@ public class TuskenRaiderToken extends Token { this.setOriginalExpansionSetCode("SWS"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Tusken"); - subtype.add("Raider"); + subtype.add(SubType.TUSKEN); + subtype.add(SubType.RAIDER); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/UramiToken.java b/Mage/src/main/java/mage/game/permanent/token/UramiToken.java index ba6f678aeb..870acaceea 100644 --- a/Mage/src/main/java/mage/game/permanent/token/UramiToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/UramiToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.constants.SuperType; @@ -41,8 +42,8 @@ public class UramiToken extends Token { public UramiToken() { super("Urami", "legendary 5/5 black Demon Spirit creature token with flying named Urami"); cardType.add(CardType.CREATURE); - subtype.add("Demon"); - subtype.add("Spirit"); + subtype.add(SubType.DEMON); + subtype.add(SubType.SPIRIT); addSuperType(SuperType.LEGENDARY); color.setBlack(true); diff --git a/Mage/src/main/java/mage/game/permanent/token/UtvaraHellkiteDragonToken.java b/Mage/src/main/java/mage/game/permanent/token/UtvaraHellkiteDragonToken.java index 24add4555b..043918910f 100644 --- a/Mage/src/main/java/mage/game/permanent/token/UtvaraHellkiteDragonToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/UtvaraHellkiteDragonToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -41,7 +42,7 @@ public class UtvaraHellkiteDragonToken extends Token { super("Dragon", "6/6 red Dragon creature token with flying"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Dragon"); + subtype.add(SubType.DRAGON); power = new MageInt(6); toughness = new MageInt(6); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/VampireKnightToken.java b/Mage/src/main/java/mage/game/permanent/token/VampireKnightToken.java index 90a87244db..e5966689f2 100644 --- a/Mage/src/main/java/mage/game/permanent/token/VampireKnightToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/VampireKnightToken.java @@ -3,14 +3,15 @@ package mage.game.permanent.token; import mage.MageInt; import mage.abilities.keyword.LifelinkAbility; import mage.constants.CardType; +import mage.constants.SubType; public class VampireKnightToken extends Token { public VampireKnightToken() { super("Vampire Knight", "1/1 black Vampire Knight creature token with lifelink"); cardType.add(CardType.CREATURE); - subtype.add("Vampire"); - subtype.add("Knight"); + subtype.add(SubType.VAMPIRE); + subtype.add(SubType.KNIGHT); color.setBlack(true); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/VampireToken.java b/Mage/src/main/java/mage/game/permanent/token/VampireToken.java index d415b9a969..f2afef969b 100644 --- a/Mage/src/main/java/mage/game/permanent/token/VampireToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/VampireToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -41,7 +42,7 @@ public class VampireToken extends Token { super("Vampire", "2/2 black Vampire creature token with flying"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Vampire"); + subtype.add(SubType.VAMPIRE); power = new MageInt(2); toughness = new MageInt(2); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/VoiceOfResurgenceToken.java b/Mage/src/main/java/mage/game/permanent/token/VoiceOfResurgenceToken.java index 98bce08daf..c18613f92c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/VoiceOfResurgenceToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/VoiceOfResurgenceToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; @@ -48,7 +49,7 @@ public class VoiceOfResurgenceToken extends Token { cardType.add(CardType.CREATURE); color.setGreen(true); color.setWhite(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(0); toughness = new MageInt(0); diff --git a/Mage/src/main/java/mage/game/permanent/token/VoiceOfTheWoodsElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/VoiceOfTheWoodsElementalToken.java index a6f02b781d..1ad400f91e 100644 --- a/Mage/src/main/java/mage/game/permanent/token/VoiceOfTheWoodsElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/VoiceOfTheWoodsElementalToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.TrampleAbility; @@ -41,7 +42,7 @@ public class VoiceOfTheWoodsElementalToken extends Token { super("Elemental", "7/7 green Elemental creature token with trample"); this.setOriginalExpansionSetCode("EVG"); cardType.add(CardType.CREATURE); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); color.setGreen(true); power = new MageInt(7); diff --git a/Mage/src/main/java/mage/game/permanent/token/VojaToken.java b/Mage/src/main/java/mage/game/permanent/token/VojaToken.java index 32d81c47de..f587e77b5d 100644 --- a/Mage/src/main/java/mage/game/permanent/token/VojaToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/VojaToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.constants.SuperType; @@ -41,7 +42,7 @@ public class VojaToken extends Token { super("Voja", "legendary 2/2 green and white Wolf creature token named Voja"); this.cardType.add(CardType.CREATURE); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Wolf"); + this.subtype.add(SubType.WOLF); this.color.setGreen(true); this.color.setWhite(true); diff --git a/Mage/src/main/java/mage/game/permanent/token/WaitingInTheWeedsCatToken.java b/Mage/src/main/java/mage/game/permanent/token/WaitingInTheWeedsCatToken.java index 940e0b913b..85e176e9bc 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WaitingInTheWeedsCatToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WaitingInTheWeedsCatToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -40,7 +41,7 @@ public class WaitingInTheWeedsCatToken extends Token { super("Cat", "1/1 green Cat creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Cat"); + subtype.add(SubType.CAT); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/WalkerOfTheGroveToken.java b/Mage/src/main/java/mage/game/permanent/token/WalkerOfTheGroveToken.java index 58273ff4d0..fc8f85bf8e 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WalkerOfTheGroveToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WalkerOfTheGroveToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -39,7 +40,7 @@ public class WalkerOfTheGroveToken extends Token { public WalkerOfTheGroveToken() { super("Elemental", "4/4 green Elemental creature token"); cardType.add(CardType.CREATURE); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.color.setGreen(true); power = new MageInt(4); toughness = new MageInt(4); diff --git a/Mage/src/main/java/mage/game/permanent/token/WallOfResurgenceToken.java b/Mage/src/main/java/mage/game/permanent/token/WallOfResurgenceToken.java index 84bb4b9cc9..f182cd8eb5 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WallOfResurgenceToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WallOfResurgenceToken.java @@ -3,6 +3,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.abilities.keyword.HasteAbility; import mage.constants.CardType; +import mage.constants.SubType; public class WallOfResurgenceToken extends Token { @@ -10,7 +11,7 @@ public class WallOfResurgenceToken extends Token { super("", "0/0 Elemental creature with haste"); this.cardType.add(CardType.CREATURE); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); diff --git a/Mage/src/main/java/mage/game/permanent/token/WallToken.java b/Mage/src/main/java/mage/game/permanent/token/WallToken.java index 97c11904d6..ed35d98309 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WallToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WallToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.DefenderAbility; @@ -41,7 +42,7 @@ public class WallToken extends Token { super("", "2/6 white wall creature with defender"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Wall"); + subtype.add(SubType.WALL); power = new MageInt(2); toughness = new MageInt(6); this.addAbility(DefenderAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/WandOfTheElementsFirstToken.java b/Mage/src/main/java/mage/game/permanent/token/WandOfTheElementsFirstToken.java index c89f41b77d..b309c31469 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WandOfTheElementsFirstToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WandOfTheElementsFirstToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -40,7 +41,7 @@ public class WandOfTheElementsFirstToken extends Token { public WandOfTheElementsFirstToken() { super("Elemental", "2/2 blue Elemental creature token with flying"); cardType.add(CardType.CREATURE); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.color.setBlue(true); power = new MageInt(2); toughness = new MageInt(2); diff --git a/Mage/src/main/java/mage/game/permanent/token/WandOfTheElementsSecondToken.java b/Mage/src/main/java/mage/game/permanent/token/WandOfTheElementsSecondToken.java index d897d79aa3..a4ba68b311 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WandOfTheElementsSecondToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WandOfTheElementsSecondToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -39,7 +40,7 @@ public class WandOfTheElementsSecondToken extends Token { public WandOfTheElementsSecondToken() { super("Elemental", "3/3 red Elemental creature token"); cardType.add(CardType.CREATURE); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.color.setRed(true); power = new MageInt(3); toughness = new MageInt(3); diff --git a/Mage/src/main/java/mage/game/permanent/token/WarriorToken.java b/Mage/src/main/java/mage/game/permanent/token/WarriorToken.java index f976c9fba0..8b39a35d62 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WarriorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WarriorToken.java @@ -32,6 +32,7 @@ import java.util.Arrays; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; import mage.util.RandomUtil; /** @@ -44,7 +45,7 @@ public class WarriorToken extends Token { super("Warrior", "1/1 white Warrior creature token"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Warrior"); + subtype.add(SubType.WARRIOR); power = new MageInt(1); toughness = new MageInt(1); availableImageSetCodes.addAll(Arrays.asList("KTK", "DTK")); diff --git a/Mage/src/main/java/mage/game/permanent/token/WarriorVigilantToken.java b/Mage/src/main/java/mage/game/permanent/token/WarriorVigilantToken.java index c3e00a228f..6a09017f74 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WarriorVigilantToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WarriorVigilantToken.java @@ -33,6 +33,7 @@ import java.util.Arrays; import mage.MageInt; import mage.abilities.keyword.VigilanceAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class WarriorVigilantToken extends Token { super("Warrior", "1/1 white Warrior creature token with vigilance"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Warrior"); + subtype.add(SubType.WARRIOR); power = new MageInt(1); toughness = new MageInt(1); addAbility(VigilanceAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/WasitoraCatDragonToken.java b/Mage/src/main/java/mage/game/permanent/token/WasitoraCatDragonToken.java index 8d60f3916a..1f3c90efe2 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WasitoraCatDragonToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WasitoraCatDragonToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -41,8 +42,8 @@ public class WasitoraCatDragonToken extends Token { super("Cat Dragon", "3/3 black, red, and green Cat Dragon creature token with flying"); cardType.add(CardType.CREATURE); - this.subtype.add("Cat"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.DRAGON); color.setBlack(true); color.setRed(true); color.setGreen(true); diff --git a/Mage/src/main/java/mage/game/permanent/token/WaspToken.java b/Mage/src/main/java/mage/game/permanent/token/WaspToken.java index 97c1e42c1d..10933c26d1 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WaspToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WaspToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -41,7 +42,7 @@ public class WaspToken extends Token { super("Wasp", "1/1 colorless Insect artifact creature token with flying"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - this.subtype.add("Insect"); + this.subtype.add(SubType.INSECT); power = new MageInt(1); toughness = new MageInt(1); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/WeirdToken.java b/Mage/src/main/java/mage/game/permanent/token/WeirdToken.java index fe86f0e12e..a3b269a6fd 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WeirdToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WeirdToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.DefenderAbility; import mage.abilities.keyword.FlyingAbility; @@ -42,7 +43,7 @@ public class WeirdToken extends Token { super("Weird", "3/3 blue Weird create token with defender and flying"); cardType.add(CardType.CREATURE); color.setBlue(true); - subtype.add("Weird"); + subtype.add(SubType.WEIRD); power = new MageInt(3); toughness = new MageInt(3); this.addAbility(DefenderAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/WhiteElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/WhiteElementalToken.java index 307216bc78..5c41093b7a 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WhiteElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WhiteElementalToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -41,7 +42,7 @@ public class WhiteElementalToken extends Token { super("Elemental", "4/4 white Elemental creature token with flying"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(4); toughness = new MageInt(4); setTokenType(2); diff --git a/Mage/src/main/java/mage/game/permanent/token/WingmateRocToken.java b/Mage/src/main/java/mage/game/permanent/token/WingmateRocToken.java index 35160cc87c..6c4198dde5 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WingmateRocToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WingmateRocToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -40,7 +41,7 @@ public class WingmateRocToken extends Token { public WingmateRocToken() { super("Bird", "3/4 white Bird creature token with flying"); cardType.add(CardType.CREATURE); - subtype.add("Bird"); + subtype.add(SubType.BIRD); color.setWhite(true); power = new MageInt(3); toughness = new MageInt(4); diff --git a/Mage/src/main/java/mage/game/permanent/token/WireflyToken.java b/Mage/src/main/java/mage/game/permanent/token/WireflyToken.java index ff0800e20b..cf7006cfd9 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WireflyToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WireflyToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.constants.CardType; import mage.abilities.keyword.FlyingAbility; +import mage.constants.SubType; /** * @@ -41,7 +42,7 @@ public class WireflyToken extends Token { this.setOriginalExpansionSetCode("DST"); this.getPower().modifyBaseValue(2); this.getToughness().modifyBaseValue(2); - this.getSubtype(null).add("Insect"); + this.getSubtype(null).add(SubType.INSECT); this.addCardType(CardType.ARTIFACT); this.addCardType(CardType.CREATURE); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/WolfToken.java b/Mage/src/main/java/mage/game/permanent/token/WolfToken.java index 127572df13..b5b5898d90 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WolfToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WolfToken.java @@ -33,6 +33,7 @@ import java.util.Arrays; import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -61,7 +62,7 @@ public class WolfToken extends Token { cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Wolf"); + subtype.add(SubType.WOLF); power = new MageInt(2); toughness = new MageInt(2); } diff --git a/Mage/src/main/java/mage/game/permanent/token/WolfTokenWithDeathtouch.java b/Mage/src/main/java/mage/game/permanent/token/WolfTokenWithDeathtouch.java index 6bef3bcdcd..3fe8fbb9a0 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WolfTokenWithDeathtouch.java +++ b/Mage/src/main/java/mage/game/permanent/token/WolfTokenWithDeathtouch.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.DeathtouchAbility; @@ -42,7 +43,7 @@ public class WolfTokenWithDeathtouch extends Token { super("Wolf", "1/1 black Wolf creature token with deathtouch"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Wolf"); + subtype.add(SubType.WOLF); power = new MageInt(1); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/WoodToken.java b/Mage/src/main/java/mage/game/permanent/token/WoodToken.java index 30a94db9f1..4c82960fb8 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WoodToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WoodToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.DefenderAbility; @@ -42,7 +43,7 @@ public class WoodToken extends Token { this.setOriginalExpansionSetCode("MIR"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Wall"); + subtype.add(SubType.WALL); power = new MageInt(0); toughness = new MageInt(1); diff --git a/Mage/src/main/java/mage/game/permanent/token/WormHarvestToken.java b/Mage/src/main/java/mage/game/permanent/token/WormHarvestToken.java index 9a8758f6b3..efcf25e90e 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WormHarvestToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WormHarvestToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,7 +42,7 @@ public class WormHarvestToken extends Token { cardType.add(CardType.CREATURE); color.setBlack(true); color.setGreen(true); - subtype.add("Worm"); + subtype.add(SubType.WORM); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/WortTheRaidmotherToken.java b/Mage/src/main/java/mage/game/permanent/token/WortTheRaidmotherToken.java index 9da6bc318b..73a8f18fd5 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WortTheRaidmotherToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WortTheRaidmotherToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -41,8 +42,8 @@ public class WortTheRaidmotherToken extends Token { cardType.add(CardType.CREATURE); color.setRed(true); color.setGreen(true); - subtype.add("Goblin"); - subtype.add("Warrior"); + subtype.add(SubType.GOBLIN); + subtype.add(SubType.WARRIOR); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/Wurm1Token.java b/Mage/src/main/java/mage/game/permanent/token/Wurm1Token.java index 537a2658a9..d2ca7a4a4c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/Wurm1Token.java +++ b/Mage/src/main/java/mage/game/permanent/token/Wurm1Token.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.DeathtouchAbility; @@ -45,7 +46,7 @@ public class Wurm1Token extends Token { setOriginalExpansionSetCode(setCode); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Wurm"); + subtype.add(SubType.WURM); power = new MageInt(3); toughness = new MageInt(3); this.addAbility(DeathtouchAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/Wurm2Token.java b/Mage/src/main/java/mage/game/permanent/token/Wurm2Token.java index 67c919be21..44413a9e17 100644 --- a/Mage/src/main/java/mage/game/permanent/token/Wurm2Token.java +++ b/Mage/src/main/java/mage/game/permanent/token/Wurm2Token.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.LifelinkAbility; @@ -46,7 +47,7 @@ public class Wurm2Token extends Token { setOriginalExpansionSetCode(setCode); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); - subtype.add("Wurm"); + subtype.add(SubType.WURM); power = new MageInt(3); toughness = new MageInt(3); this.addAbility(LifelinkAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/WurmCallingWurmToken.java b/Mage/src/main/java/mage/game/permanent/token/WurmCallingWurmToken.java index 94dbd14c33..9aff3b45e8 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WurmCallingWurmToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WurmCallingWurmToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @author spjspj @@ -39,7 +40,7 @@ public class WurmCallingWurmToken extends Token { super("Wurm", "X/X green Wurm creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Wurm"); + subtype.add(SubType.WURM); power = new MageInt(0); toughness = new MageInt(0); } diff --git a/Mage/src/main/java/mage/game/permanent/token/WurmToken.java b/Mage/src/main/java/mage/game/permanent/token/WurmToken.java index 679e554298..4e76813a0d 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WurmToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WurmToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @author magenoxx_at_gmail.com @@ -39,7 +40,7 @@ public class WurmToken extends Token { super("Wurm", "6/6 green Wurm creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Wurm"); + subtype.add(SubType.WURM); power = new MageInt(6); toughness = new MageInt(6); } diff --git a/Mage/src/main/java/mage/game/permanent/token/WurmToken2.java b/Mage/src/main/java/mage/game/permanent/token/WurmToken2.java index 43fcceceb1..b9228f156c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WurmToken2.java +++ b/Mage/src/main/java/mage/game/permanent/token/WurmToken2.java @@ -32,6 +32,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.TrampleAbility; @@ -51,7 +52,7 @@ public class WurmToken2 extends Token { super("Wurm", "5/5 green Wurm creature token with trample"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Wurm"); + subtype.add(SubType.WURM); power = new MageInt(5); toughness = new MageInt(5); addAbility(TrampleAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/WurmToken3.java b/Mage/src/main/java/mage/game/permanent/token/WurmToken3.java index aa8d61ab09..39628ace8e 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WurmToken3.java +++ b/Mage/src/main/java/mage/game/permanent/token/WurmToken3.java @@ -32,6 +32,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -50,7 +51,7 @@ public class WurmToken3 extends Token { super("Wurm", "5/5 green Wurm creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Wurm"); + subtype.add(SubType.WURM); power = new MageInt(5); toughness = new MageInt(5); } diff --git a/Mage/src/main/java/mage/game/permanent/token/XenagosSatyrToken.java b/Mage/src/main/java/mage/game/permanent/token/XenagosSatyrToken.java index 19dc537d35..578c23c2ce 100644 --- a/Mage/src/main/java/mage/game/permanent/token/XenagosSatyrToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/XenagosSatyrToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.HasteAbility; @@ -42,7 +43,7 @@ public class XenagosSatyrToken extends Token { cardType.add(CardType.CREATURE); color.setRed(true); color.setGreen(true); - subtype.add("Satyr"); + subtype.add(SubType.SATYR); power = new MageInt(2); toughness = new MageInt(2); diff --git a/Mage/src/main/java/mage/game/permanent/token/YoungPyromancerElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/YoungPyromancerElementalToken.java index 745e9e5424..bdd0531b07 100644 --- a/Mage/src/main/java/mage/game/permanent/token/YoungPyromancerElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/YoungPyromancerElementalToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; import mage.util.RandomUtil; /** @@ -47,7 +48,7 @@ public class YoungPyromancerElementalToken extends Token { } cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/ZektarShrineElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/ZektarShrineElementalToken.java index 3d1edf8f81..cabbb5e5e6 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ZektarShrineElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ZektarShrineElementalToken.java @@ -31,6 +31,7 @@ import mage.MageInt; import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.TrampleAbility; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -42,7 +43,7 @@ public class ZektarShrineElementalToken extends Token { super("Elemental", "7/1 red Elemental creature token with trample and haste"); cardType.add(CardType.CREATURE); color.setRed(true); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); power = new MageInt(7); toughness = new MageInt(1); addAbility(TrampleAbility.getInstance()); diff --git a/Mage/src/main/java/mage/game/permanent/token/ZendikarsRoilElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/ZendikarsRoilElementalToken.java index aae4360cf8..39ba7e9a3a 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ZendikarsRoilElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ZendikarsRoilElementalToken.java @@ -28,6 +28,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -40,7 +41,7 @@ public class ZendikarsRoilElementalToken extends Token { super("Elemental", "2/2 green Elemental creature token"); cardType.add(CardType.CREATURE); setOriginalExpansionSetCode("ORI"); - subtype.add("Elemental"); + subtype.add(SubType.ELEMENTAL); color.setGreen(true); power = new MageInt(2); toughness = new MageInt(2); diff --git a/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java b/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java index e3aea20a7a..ddc955b60e 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java @@ -33,6 +33,7 @@ import java.util.List; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; import mage.util.RandomUtil; /** @@ -53,7 +54,7 @@ public class ZombieToken extends Token { availableImageSetCodes = tokenImageSets; cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Zombie"); + subtype.add(SubType.ZOMBIE); power = new MageInt(2); toughness = new MageInt(2); } diff --git a/Mage/src/main/java/mage/game/permanent/token/ZombieToken2.java b/Mage/src/main/java/mage/game/permanent/token/ZombieToken2.java index efc8cdda7c..87b5ce1aba 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ZombieToken2.java +++ b/Mage/src/main/java/mage/game/permanent/token/ZombieToken2.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; +import mage.constants.SubType; /** * @@ -44,7 +45,7 @@ public class ZombieToken2 extends Token { super("Zombie", String.valueOf(zPower) + '/' + String.valueOf(zToughness) + " black Zombie creature token"); cardType.add(CardType.CREATURE); color.setBlack(true); - subtype.add("Zombie"); + subtype.add(SubType.ZOMBIE); power = new MageInt(zPower); toughness = new MageInt(zToughness); setOriginalExpansionSetCode("EMN"); diff --git a/Mage/src/main/java/mage/game/permanent/token/ZombieWizardToken.java b/Mage/src/main/java/mage/game/permanent/token/ZombieWizardToken.java index cd56807817..25333f1a92 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ZombieWizardToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ZombieWizardToken.java @@ -29,6 +29,7 @@ package mage.game.permanent.token; import mage.constants.CardType; +import mage.constants.SubType; import mage.MageInt; /** @@ -42,8 +43,8 @@ public class ZombieWizardToken extends Token { cardType.add(CardType.CREATURE); color.setBlue(true); color.setBlack(true); - subtype.add("Zombie"); - subtype.add("Wizard"); + subtype.add(SubType.ZOMBIE); + subtype.add(SubType.WIZARD); power = new MageInt(1); toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/stack/Spell.java b/Mage/src/main/java/mage/game/stack/Spell.java index 288f757d9f..38d664896e 100644 --- a/Mage/src/main/java/mage/game/stack/Spell.java +++ b/Mage/src/main/java/mage/game/stack/Spell.java @@ -27,10 +27,6 @@ */ package mage.game.stack; -import java.util.ArrayList; -import java.util.EnumSet; -import java.util.List; -import java.util.UUID; import mage.MageInt; import mage.MageObject; import mage.Mana; @@ -45,6 +41,7 @@ import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCosts; import mage.abilities.keyword.BestowAbility; import mage.abilities.keyword.MorphAbility; +import mage.abilities.text.TextPart; import mage.cards.Card; import mage.cards.CardsImpl; import mage.cards.FrameStyle; @@ -63,6 +60,11 @@ import mage.players.Player; import mage.util.GameLog; import mage.util.SubTypeList; +import java.util.ArrayList; +import java.util.EnumSet; +import java.util.List; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -244,7 +246,7 @@ public class Spell extends StackObjImpl implements Card { } counter(null, game); return false; - } else if (this.isEnchantment() && this.getSubtype(game).contains("Aura")) { + } else if (this.isEnchantment() && this.hasSubtype(SubType.AURA, game)) { if (ability.getTargets().stillLegal(ability, game)) { updateOptionalCosts(0); boolean bestow = ability instanceof BestowAbility; @@ -252,7 +254,7 @@ public class Spell extends StackObjImpl implements Card { // Must be removed first time, after that will be removed by continous effect // Otherwise effects like evolve trigger from creature comes into play event card.getCardType().remove(CardType.CREATURE); - card.getSubtype(game).add("Aura"); + card.getSubtype(game).add(SubType.AURA); } if (controller.moveCards(card, Zone.BATTLEFIELD, ability, game, false, faceDown, false, null)) { if (bestow) { @@ -481,7 +483,7 @@ public class Spell extends StackObjImpl implements Card { public SubTypeList getSubtype(Game game) { if (this.getSpellAbility() instanceof BestowAbility) { SubTypeList subtypes = card.getSubtype(game); - subtypes.add("Aura"); + subtypes.add(SubType.AURA); return subtypes; } return card.getSubtype(game); @@ -491,7 +493,7 @@ public class Spell extends StackObjImpl implements Card { public boolean hasSubtype(SubType subtype, Game game) { if (this.getSpellAbility() instanceof BestowAbility) { // workaround for Bestow (don't like it) SubTypeList subtypes = card.getSubtype(game); - subtypes.add("Aura"); + subtypes.add(SubType.AURA); if (subtypes.contains(subtype)) { return true; } @@ -927,10 +929,23 @@ public class Spell extends StackObjImpl implements Card { return copy; } + @Override public boolean isAllCreatureTypes() { return false; } + @Override public void setIsAllCreatureTypes(boolean value) { } + + @Override + public List getTextParts() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public TextPart addTextPart(TextPart textPart) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + } diff --git a/Mage/src/main/java/mage/game/stack/StackAbility.java b/Mage/src/main/java/mage/game/stack/StackAbility.java index 3a6158ede3..07509f5786 100644 --- a/Mage/src/main/java/mage/game/stack/StackAbility.java +++ b/Mage/src/main/java/mage/game/stack/StackAbility.java @@ -27,6 +27,10 @@ */ package mage.game.stack; +import java.util.ArrayList; +import java.util.EnumSet; +import java.util.List; +import java.util.UUID; import mage.MageInt; import mage.MageObject; import mage.ObjectColor; @@ -39,6 +43,7 @@ import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.Effect; import mage.abilities.effects.Effects; +import mage.abilities.text.TextPart; import mage.cards.Card; import mage.cards.FrameStyle; import mage.constants.*; @@ -52,11 +57,6 @@ import mage.util.GameLog; import mage.util.SubTypeList; import mage.watchers.Watcher; -import java.util.ArrayList; -import java.util.EnumSet; -import java.util.List; -import java.util.UUID; - /** * * @author BetaSteward_at_googlemail.com @@ -74,6 +74,7 @@ public class StackAbility extends StackObjImpl implements Ability { private UUID controllerId; private String name; private String expansionSetCode; + private TargetAdjustment targetAdjustment = TargetAdjustment.NONE; public StackAbility(Ability ability, UUID controllerId) { this.ability = ability; @@ -86,6 +87,7 @@ public class StackAbility extends StackObjImpl implements Ability { this.controllerId = stackAbility.controllerId; this.name = stackAbility.name; this.expansionSetCode = stackAbility.expansionSetCode; + this.targetAdjustment = stackAbility.targetAdjustment; } @Override @@ -537,7 +539,7 @@ public class StackAbility extends StackObjImpl implements Ability { @Override public int getSourceObjectZoneChangeCounter() { - throw new UnsupportedOperationException("Not supported."); + return ability.getSourceObjectZoneChangeCounter(); } @Override @@ -593,9 +595,32 @@ public class StackAbility extends StackObjImpl implements Ability { return newStackAbility; } - public boolean isAllCreatureTypes(){ + @Override + public boolean isAllCreatureTypes() { return false; } - public void setIsAllCreatureTypes(boolean value){} + @Override + public void setIsAllCreatureTypes(boolean value) { + } + + @Override + public List getTextParts() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public TextPart addTextPart(TextPart textPart) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void setTargetAdjustment(TargetAdjustment targetAdjustment) { + this.targetAdjustment = targetAdjustment; + } + + @Override + public TargetAdjustment getTargetAdjustment() { + return targetAdjustment; + } } diff --git a/Mage/src/main/java/mage/game/stack/StackObjImpl.java b/Mage/src/main/java/mage/game/stack/StackObjImpl.java index 4f21e40ce1..25a3088eab 100644 --- a/Mage/src/main/java/mage/game/stack/StackObjImpl.java +++ b/Mage/src/main/java/mage/game/stack/StackObjImpl.java @@ -268,4 +268,7 @@ public abstract class StackObjImpl implements StackObject { return name; } + @Override + public void removePTCDA() { + } } diff --git a/Mage/src/main/java/mage/game/stack/StackObject.java b/Mage/src/main/java/mage/game/stack/StackObject.java index b90d5a7a2f..7268f9ab03 100644 --- a/Mage/src/main/java/mage/game/stack/StackObject.java +++ b/Mage/src/main/java/mage/game/stack/StackObject.java @@ -50,7 +50,7 @@ public interface StackObject extends MageObject, Controllable { // int getConvertedManaCost(); boolean chooseNewTargets(Game game, UUID playerId, boolean forceChange, boolean onlyOneTarget, FilterPermanent filterNewTarget); - + StackObject createCopyOnStack(Game game, Ability source, UUID newControllerId, boolean chooseNewTargets); @Override diff --git a/Mage/src/main/java/mage/players/Library.java b/Mage/src/main/java/mage/players/Library.java index 34190ca4ec..1b507192a4 100644 --- a/Mage/src/main/java/mage/players/Library.java +++ b/Mage/src/main/java/mage/players/Library.java @@ -27,15 +27,16 @@ */ package mage.players; -import java.io.Serializable; -import java.util.*; -import java.util.stream.Collectors; import mage.cards.Card; import mage.constants.Zone; import mage.filter.FilterCard; import mage.game.Game; import mage.util.RandomUtil; +import java.io.Serializable; +import java.util.*; +import java.util.stream.Collectors; + /** * @author BetaSteward_at_googlemail.com */ @@ -138,9 +139,7 @@ public class Library implements Serializable { public void putOnBottom(Card card, Game game) { if (card.getOwnerId().equals(playerId)) { card.setZone(Zone.LIBRARY, game); - if (library.contains(card.getId())) { - library.remove(card.getId()); - } + library.remove(card.getId()); library.add(card.getId()); } else { game.getPlayer(card.getOwnerId()).getLibrary().putOnBottom(card, game); diff --git a/Mage/src/main/java/mage/players/Player.java b/Mage/src/main/java/mage/players/Player.java index e641a41c74..261a24c22f 100644 --- a/Mage/src/main/java/mage/players/Player.java +++ b/Mage/src/main/java/mage/players/Player.java @@ -650,12 +650,12 @@ public interface Player extends MageItem, Copyable { /** * Set the commanderId of the player * - * @param commandersIds + * @param commanderId */ void addCommanderId(UUID commanderId); /** - * Get the commanderId of the player + * Get the commanderIds of the player * * @return */ diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index 4aeb681206..dac2bddf9a 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -966,8 +966,13 @@ public abstract class PlayerImpl implements Player, Serializable { if (game == null || ability == null) { return false; } + ability.setControllerId(getId()); if (ability.getSpellAbilityType() != SpellAbilityType.BASE) { ability = chooseSpellAbilityForCast(ability, game, noMana); + if (ability == null) { + // No ability could be cast (selected), probably because of no valid targets (happens often if a card can be cast by an effect). + return false; + } } //20091005 - 601.2a if (ability.getSourceId() == null) { @@ -1103,6 +1108,7 @@ public abstract class PlayerImpl implements Player, Serializable { if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.ACTIVATE_ABILITY, ability.getId(), ability.getSourceId(), playerId))) { int bookmark = game.bookmarkState(); ability.newId(); + ability.setControllerId(playerId); game.getStack().push(new StackAbility(ability, playerId)); if (ability.activate(game, false)) { game.fireEvent(GameEvent.getEvent(GameEvent.EventType.ACTIVATED_ABILITY, ability.getId(), ability.getSourceId(), playerId)); @@ -1241,22 +1247,35 @@ public abstract class PlayerImpl implements Player, Serializable { LinkedHashMap useable = new LinkedHashMap<>(); for (Ability ability : object.getAbilities()) { if (ability instanceof SpellAbility) { - if (((SpellAbility) ability).getSpellAbilityType() == SpellAbilityType.SPLIT_FUSED) { - if (zone == Zone.HAND) { - // Fix so you don't need to choose Fuse twice - useable.clear(); - useable.put(ability.getId(), (SpellAbility) ability); + switch (((SpellAbility) ability).getSpellAbilityType()) { + case SPLIT_FUSED: + if (zone == Zone.HAND) { + if (((SpellAbility) ability).canChooseTarget(game)) { + useable.put(ability.getId(), (SpellAbility) ability); + } + } + case SPLIT: + if (((SplitCard) object).getLeftHalfCard().getSpellAbility().canChooseTarget(game)) { + useable.put(((SplitCard) object).getLeftHalfCard().getSpellAbility().getId(), ((SplitCard) object).getLeftHalfCard().getSpellAbility()); + } + if (((SplitCard) object).getRightHalfCard().getSpellAbility().canChooseTarget(game)) { + useable.put(((SplitCard) object).getRightHalfCard().getSpellAbility().getId(), ((SplitCard) object).getRightHalfCard().getSpellAbility()); + } return useable; - } else { - // Fuse only allowed from hand - continue; - } + case SPLIT_AFTERMATH: + if (zone == Zone.GRAVEYARD) { + if (((SplitCard) object).getRightHalfCard().getSpellAbility().canChooseTarget(game)) { + useable.put(((SplitCard) object).getRightHalfCard().getSpellAbility().getId(), ((SplitCard) object).getRightHalfCard().getSpellAbility()); + } + } else { + if (((SplitCard) object).getLeftHalfCard().getSpellAbility().canChooseTarget(game)) { + useable.put(((SplitCard) object).getLeftHalfCard().getSpellAbility().getId(), ((SplitCard) object).getLeftHalfCard().getSpellAbility()); + } + } + return useable; + default: + useable.put(ability.getId(), (SpellAbility) ability); } - if (((SpellAbility) ability).getSpellAbilityType() == SpellAbilityType.SPLIT - || ((SpellAbility) ability).getSpellAbilityType() == SpellAbilityType.SPLIT_AFTERMATH) { - continue; - } - useable.put(ability.getId(), (SpellAbility) ability); } } return useable; @@ -2941,7 +2960,7 @@ public abstract class PlayerImpl implements Player, Serializable { } public UserData getControllingPlayersUserData(Game game) { - if (isGameUnderControl()) { + if (!isGameUnderControl()) { Player player = game.getPlayer(getTurnControlledBy()); if (player.isHuman()) { return player.getUserData(); @@ -2951,8 +2970,7 @@ public abstract class PlayerImpl implements Player, Serializable { } @Override - public void setUserData(UserData userData - ) { + public void setUserData(UserData userData) { this.userData = userData; getManaPool().setAutoPayment(userData.isManaPoolAutomatic()); getManaPool().setAutoPaymentRestricted(userData.isManaPoolAutomaticRestricted()); @@ -3466,9 +3484,10 @@ public abstract class PlayerImpl implements Player, Serializable { } @Override - public boolean hasOpponent(UUID playerToCheckId, Game game - ) { - return !this.getId().equals(playerToCheckId) && game.isOpponent(this, playerToCheckId); + public boolean hasOpponent(UUID playerToCheckId, Game game) { + return !this.getId().equals(playerToCheckId) + && game.isOpponent(this, playerToCheckId) + && getInRange().contains(playerToCheckId); } @Override diff --git a/Mage/src/main/java/mage/players/net/SkipPrioritySteps.java b/Mage/src/main/java/mage/players/net/SkipPrioritySteps.java index c5c5e13a3c..1ad2853d17 100644 --- a/Mage/src/main/java/mage/players/net/SkipPrioritySteps.java +++ b/Mage/src/main/java/mage/players/net/SkipPrioritySteps.java @@ -35,13 +35,14 @@ import mage.constants.PhaseStep; * @author LevelX2 */ public class SkipPrioritySteps implements Serializable { - boolean upkeep; - boolean draw; - boolean main1; - boolean beforeCombat; - boolean endOfCombat; - boolean main2; - boolean endOfTurn; + + boolean upkeep = false; + boolean draw = false; + boolean main1 = true; + boolean beforeCombat = false; + boolean endOfCombat = false; + boolean main2 = true; + boolean endOfTurn = false; public boolean isUpkeep() { return upkeep; @@ -100,7 +101,7 @@ public class SkipPrioritySteps implements Serializable { } public boolean isPhaseStepSet(PhaseStep phaseStep) { - switch(phaseStep) { + switch (phaseStep) { case UPKEEP: return isUpkeep(); case DRAW: @@ -119,5 +120,5 @@ public class SkipPrioritySteps implements Serializable { return true; } } - + } diff --git a/Mage/src/main/java/mage/players/net/UserData.java b/Mage/src/main/java/mage/players/net/UserData.java index b6bb290d8f..fec7fbcba2 100644 --- a/Mage/src/main/java/mage/players/net/UserData.java +++ b/Mage/src/main/java/mage/players/net/UserData.java @@ -75,11 +75,11 @@ public class UserData implements Serializable { this.autoOrderTrigger = userData.autoOrderTrigger; this.useFirstManaAbility = userData.useFirstManaAbility; this.userIdStr = userData.userIdStr; - // todo: why we don't copy user stats here? + // todo: why we don't update user stats here? => can't be updated from client side } public static UserData getDefaultUserDataView() { - return new UserData(UserGroup.DEFAULT, 0, false, false, true, null, getDefaultFlagName(), false, true, true, false, false, false, false, ""); + return new UserData(UserGroup.DEFAULT, 0, false, false, true, new UserSkipPrioritySteps(), getDefaultFlagName(), false, true, true, false, false, false, false, ""); } public void setGroupId(int groupId) { diff --git a/Mage/src/main/java/mage/players/net/UserSkipPrioritySteps.java b/Mage/src/main/java/mage/players/net/UserSkipPrioritySteps.java index 9e405cc603..ee51ded5e5 100644 --- a/Mage/src/main/java/mage/players/net/UserSkipPrioritySteps.java +++ b/Mage/src/main/java/mage/players/net/UserSkipPrioritySteps.java @@ -33,15 +33,15 @@ import java.io.Serializable; * * @author LevelX2 */ - public class UserSkipPrioritySteps implements Serializable { + final SkipPrioritySteps yourTurn; final SkipPrioritySteps opponentTurn; - boolean stopOnDeclareAttackersDuringSkipAction; - boolean stopOnDeclareBlockerIfNoneAvailable; - boolean stopOnAllMainPhases; - boolean stopOnAllEndPhases; + boolean stopOnDeclareAttackersDuringSkipAction = true; + boolean stopOnDeclareBlockerIfNoneAvailable = true; + boolean stopOnAllMainPhases = true; + boolean stopOnAllEndPhases = true; public UserSkipPrioritySteps() { yourTurn = new SkipPrioritySteps(); diff --git a/Mage/src/main/java/mage/target/Target.java b/Mage/src/main/java/mage/target/Target.java index 647c6281e7..e36ef210c1 100644 --- a/Mage/src/main/java/mage/target/Target.java +++ b/Mage/src/main/java/mage/target/Target.java @@ -53,8 +53,7 @@ public interface Target extends Serializable { boolean isNotTarget(); /** - * controls if it will be checked, if the target can be targeted from - * source + * controls if it will be checked, if the target can be targeted from source * * @param notTarget true = do not check for protection, false = check for * protection @@ -113,6 +112,8 @@ public interface Target extends Serializable { int getNumberOfTargets(); + int getMinNumberOfTargets(); + int getMaxNumberOfTargets(); void setMinNumberOfTargets(int minNumberofTargets); @@ -157,8 +158,8 @@ public interface Target extends Serializable { void setTargetTag(int tag); Target getOriginalTarget(); - + // used for cards like Spellskite void setTargetAmount(UUID targetId, int amount, Game game); - + } diff --git a/Mage/src/main/java/mage/target/TargetImpl.java b/Mage/src/main/java/mage/target/TargetImpl.java index 546bafd5ad..3dbe7568cc 100644 --- a/Mage/src/main/java/mage/target/TargetImpl.java +++ b/Mage/src/main/java/mage/target/TargetImpl.java @@ -105,6 +105,11 @@ public abstract class TargetImpl implements Target { return this.minNumberOfTargets; } + @Override + public int getMinNumberOfTargets() { + return this.minNumberOfTargets; + } + @Override public int getMaxNumberOfTargets() { return this.maxNumberOfTargets; diff --git a/Mage/src/main/java/mage/target/common/TargetOpponentsChoicePermanent.java b/Mage/src/main/java/mage/target/common/TargetOpponentsChoicePermanent.java index 813ae0951d..5dce07ed4c 100644 --- a/Mage/src/main/java/mage/target/common/TargetOpponentsChoicePermanent.java +++ b/Mage/src/main/java/mage/target/common/TargetOpponentsChoicePermanent.java @@ -6,6 +6,7 @@ package mage.target.common; import java.util.UUID; +import mage.MageObject; import mage.abilities.Ability; import mage.constants.Outcome; import mage.filter.FilterPermanent; @@ -49,7 +50,7 @@ public class TargetOpponentsChoicePermanent extends TargetPermanent { if (opponentId != null) { if (permanent != null) { if (source != null) { - boolean canSourceControllerTarget = true; + boolean canSourceControllerTarget = true; if (!isNotTarget()) { if (!permanent.canBeTargetedBy(game.getObject(source.getId()), controllerId, game) || !permanent.canBeTargetedBy(game.getObject(source.getSourceId()), controllerId, game)) { @@ -70,6 +71,33 @@ public class TargetOpponentsChoicePermanent extends TargetPermanent { return super.chooseTarget(outcome, getOpponentId(playerId, source, game), source, game); } + @Override + public boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game) { + MageObject sourceObject = game.getObject(sourceId); + Player player = game.getPlayer(sourceControllerId); + if (sourceObject == null || player == null) { + return false; + } + int counter; + for (UUID oppId : game.getState().getPlayersInRange(player.getId(), game)) { + counter = 0; + Player opp = game.getPlayer(oppId); + if (opp != null && player.hasOpponent(opp.getId(), game)) { + for (Permanent perm : game.getBattlefield().getActivePermanents(opp.getId(), game)) { + if (!targets.containsKey(perm.getId()) + && filter.match(perm, sourceId, opp.getId(), game) + && perm.canBeTargetedBy(sourceObject, sourceControllerId, game)) { + counter++; + if (counter >= minNumberOfTargets) { + return true; + } + } + } + } + } + return false; + } + @Override public TargetOpponentsChoicePermanent copy() { return new TargetOpponentsChoicePermanent(this); diff --git a/Mage/src/main/java/mage/util/SubTypeList.java b/Mage/src/main/java/mage/util/SubTypeList.java index 71d920983d..cf6fd8ef9e 100644 --- a/Mage/src/main/java/mage/util/SubTypeList.java +++ b/Mage/src/main/java/mage/util/SubTypeList.java @@ -3,29 +3,48 @@ package mage.util; import mage.constants.SubType; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; public class SubTypeList extends ArrayList { + + + @Deprecated public boolean addAll(List subtypes) { - return addAll(subtypes.stream().map(SubType::byDescription).collect(Collectors.toList())); + return addAll(subtypes.stream() + .map(SubType::byDescription) + .collect(Collectors.toList())); } - public boolean removeAll(List subtypes){ - return removeAll(subtypes.stream().map(SubType::byDescription).collect(Collectors.toList())); + @Deprecated + public boolean removeAll(List subtypes) { + return removeAll(subtypes.stream() + .map(SubType::byDescription) + .collect(Collectors.toList())); } - public boolean add(SubType... subTypes) { return Collections.addAll(this, subTypes); } - public boolean add(String s) { - return add(SubType.byDescription(s)); + public boolean removeAll(SubType... subTypes) { + return super.removeAll(Arrays.stream(subTypes) + .collect(Collectors.toList())); } + @Deprecated + public boolean add(String s) { + SubType subType = SubType.byDescription(s); + if (subType != null) { + return add(subType); + } + return false; + } + + @Deprecated public boolean contains(String s) { return contains(SubType.byDescription(s)); } diff --git a/Mage/src/main/java/mage/util/functions/AddSubtypeApplier.java b/Mage/src/main/java/mage/util/functions/AddSubtypeApplier.java index d97b47f2e4..6f5c35e93d 100644 --- a/Mage/src/main/java/mage/util/functions/AddSubtypeApplier.java +++ b/Mage/src/main/java/mage/util/functions/AddSubtypeApplier.java @@ -5,27 +5,29 @@ */ package mage.util.functions; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; +import mage.constants.SubType; import mage.game.Game; import mage.game.permanent.Permanent; +import java.util.UUID; + /** * * @author LevelX2 */ public class AddSubtypeApplier extends ApplyToPermanent { - private final String subtype; + private final SubType subtype; - public AddSubtypeApplier(String subtype) { + public AddSubtypeApplier(SubType subtype) { this.subtype = subtype; } @Override public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) { - if (!permanent.getSubtype(game).contains(subtype)) { + if (!permanent.hasSubtype(subtype, game)) { permanent.getSubtype(game).add(subtype); } return true; @@ -33,7 +35,7 @@ public class AddSubtypeApplier extends ApplyToPermanent { @Override public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) { - if (!mageObject.getSubtype(game).contains(subtype)) { + if (!mageObject.hasSubtype(subtype, game)) { mageObject.getSubtype(game).add(subtype); } return true; diff --git a/Mage/src/main/java/mage/watchers/common/CastFromGraveyardWatcher.java b/Mage/src/main/java/mage/watchers/common/CastFromGraveyardWatcher.java index cb3418baf3..81a4704f89 100644 --- a/Mage/src/main/java/mage/watchers/common/CastFromGraveyardWatcher.java +++ b/Mage/src/main/java/mage/watchers/common/CastFromGraveyardWatcher.java @@ -27,11 +27,6 @@ */ package mage.watchers.common; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.UUID; import mage.constants.WatcherScope; import mage.constants.Zone; import mage.game.Game; @@ -39,6 +34,8 @@ import mage.game.events.GameEvent; import mage.game.stack.Spell; import mage.watchers.Watcher; +import java.util.*; + /** * * @author LevelX2 @@ -66,7 +63,7 @@ public class CastFromGraveyardWatcher extends Watcher { if (event.getType() == GameEvent.EventType.SPELL_CAST && event.getZone() == Zone.GRAVEYARD) { Spell spell = (Spell) game.getObject(event.getTargetId()); if (spell != null) { - HashSet zcc = spellsCastFromGraveyard.computeIfAbsent(spell.getSourceId(), k -> new HashSet<>()); + Set zcc = spellsCastFromGraveyard.computeIfAbsent(spell.getSourceId(), k -> new HashSet<>()); zcc.add(spell.getZoneChangeCounter(game)); } diff --git a/Mage/src/main/java/mage/watchers/common/PlayerAttackedStepWatcher.java b/Mage/src/main/java/mage/watchers/common/PlayerAttackedStepWatcher.java new file mode 100644 index 0000000000..03f56c9beb --- /dev/null +++ b/Mage/src/main/java/mage/watchers/common/PlayerAttackedStepWatcher.java @@ -0,0 +1,82 @@ +/* + * 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.watchers.common; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import mage.constants.WatcherScope; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.watchers.Watcher; + +/** + * @author LevelX2 + */ +public class PlayerAttackedStepWatcher extends Watcher { + + // With how many creatures attacked this player this turn + private final Map playerAttacked = new HashMap<>(); + + public PlayerAttackedStepWatcher() { + super(PlayerAttackedWatcher.class.getSimpleName(), WatcherScope.GAME); + } + + public PlayerAttackedStepWatcher(final PlayerAttackedStepWatcher watcher) { + super(watcher); + for (Map.Entry entry : watcher.playerAttacked.entrySet()) { + this.playerAttacked.put(entry.getKey(), entry.getValue()); + } + } + + @Override + public PlayerAttackedStepWatcher copy() { + return new PlayerAttackedStepWatcher(this); + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.DECLARE_ATTACKERS_STEP_POST) { + playerAttacked.clear(); + } + if (event.getType() == GameEvent.EventType.ATTACKER_DECLARED) { + playerAttacked.putIfAbsent(event.getTargetId(), 0); + playerAttacked.compute(event.getTargetId(), (p, amount) -> amount + 1); + } + } + + @Override + public void reset() { + super.reset(); + playerAttacked.clear(); + } + + public int getNumberAttackingCurrentStep(UUID playerId) { + return playerAttacked.getOrDefault(playerId, 0); + } +} diff --git a/Mage/src/test/java/mage/ManaTest.java b/Mage/src/test/java/mage/ManaTest.java index 2f49626955..1ad59de468 100644 --- a/Mage/src/test/java/mage/ManaTest.java +++ b/Mage/src/test/java/mage/ManaTest.java @@ -497,7 +497,7 @@ public class ManaTest { String ret = mana.toString(); // then - assertEquals("{6}{R}{G}{G}{U}{U}{U}{B}{B}{B}{Any}{Any}", ret); + assertEquals("{6}{U}{U}{U}{B}{B}{B}{R}{G}{G}{Any}{Any}", ret); } @Test diff --git a/Utils/cardClass.tmpl b/Utils/cardClass.tmpl index e5afa68f0a..6d1f92149d 100644 --- a/Utils/cardClass.tmpl +++ b/Utils/cardClass.tmpl @@ -35,6 +35,12 @@ if ($power || $power eq 0) { $OUT .= "\nimport mage.MageInt;" } } +if ($hasSubTypes eq 'true') { + $OUT .="\nimport mage.constants.SubType;" +} +if ($hasSuperTypes eq 'true') { + $OUT .="\nimport mage.constants.SuperType;" +} =][=$abilitiesImports=] import mage.cards.CardImpl; import mage.cards.CardSetInfo; diff --git a/Utils/cut.pl b/Utils/cut.pl new file mode 100644 index 0000000000..674a7982d1 --- /dev/null +++ b/Utils/cut.pl @@ -0,0 +1,902 @@ +#!/usr/bin/perl +## +# File : get_all.pl +# Author : spjspj +## + +use strict; +use LWP::Simple; +use POSIX qw(strftime); + +# Main +{ + if (scalar (@ARGV) < 4) + { + print ("Usage: cut.pl !\n"); + print (" . File can be - list, STDIN, or an actual file\n"); + print (" . Term can be - a regex you're looking for\n"); + print (" . Operation can be - grep, filegrep, count, size, strip_http, matrix_flip(for converting ringing touches!), oneupcount, wget\n"); + print (" . Helper is dependent on the operation you're doing. A number for grep will go +/- that amount \n"); + print (" cut.pl bob.txt dave 5 grep\n"); + print (" cut.pl all_java2.java TOKEN_STARTS_HERE TOKEN_ENDS_HERE grep_between\n"); + print (" cut.pl full_text.txt keys 0 filegrep\n"); + print (" cut.pl full_text.txt 0 0 make_code_bat\n"); + print (" dir /a /b /s *.java | cut.pl stdin 0 0 make_code_bat > bob.bat\n"); + print (" cut.pl d:\\perl_programs output.*txt 7 age_dir | cut.pl list . 0 grep\n"); + print (" cut.pl bob.txt 0 0 uniquelines \n"); + print (" cut.pl file 0 0 strip_http\n"); + print (" cut.pl stdin \";;;\" \"1,2,3,4\" fields\n"); + print (" cut.pl bob.txt 0 0 matrix_flip\n"); + print (" cut.pl bob.txt 0 0 condense (Used for making similar lines in files smaller..)\n"); + print (" cut.pl bob.txt 0 0 str_condense (Used for making similar lines in files smaller..)\n"); + print (" cut.pl stdin \"http://bob.com/a=XXX.id\" 1000 oneupcount \n"); + print (" cut.pl stdin \"http://www.comlaw.gov.au/Details/XXX\" 1000 wget\n"); + print (" cut.pl stdin \"http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=XXX\" 5274 oneupcount\n"); + print (" cut.pl stdin \"http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=XXX' 5274 wget\n"); + print (" cut.pl modern_bluesa \";;;\" \"0,7\" fields | cut.pl stdin \";;;\" 3 wordcombos\n"); + print (" cut.pl modern_bluesa \";;;\" \"0,7\" fields | cut.pl stdin 0 0 uniquewords\n"); + print (" cut.pl modern_bluesa \";;;\" \"0,2\" images_html\n"); + print (" cut.pl stdin start_ _end letters\n"); + print (' echo "" | cut.pl stdin "http://www.slightlymagic.net/forum/viewtopic.php?f=70&t=4554&start=30" 0 wget'); + print ("\n"); + print (" cut.pl all_java.java \"\\\+\\\+\\\+\\\+\" \"extends token\" cut_on_first_display_with_second\n\n"); + print ("\n"); + print ('\necho "" | cut.pl stdin "http://www.slightlymagic.net/forum/viewtopic.php?f=70&t=14062&start=XXX" 400 oneupcount | cut.pl stdin "XXX" 400 wget\n'); + print ("\n"); + print ('\necho "" | cut.pl stdin "http://mythicspoiler.com/c17/cards/stalkingleonin.html" 0 wget_card_spoiler\n'); + print ('dir /a /b /s *.jar | cut.pl stdin "^" "7z l -r \"" replace | cut.pl stdin "$" "\"" replace > d:\temp\xyz.bat'); + print ("\n"); + print ('echo "1" | cut.pl stdin "http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=16431&type=card" "6ED/Phantasmal Terrain.full.jpg" wget_image'); + print ("\n"); + exit 0; + } + + my $file = $ARGV [0]; + my $term = $ARGV [1]; + my $helper = $ARGV [2]; + my $operation = $ARGV [3]; + my %combos; + my %all_combos; + my %dedup_line_hash; + my $in_between_lines = 0; + + if ($file eq "list" && $operation ne "size") + { + while () + { + chomp $_; + my $file = $_; + my $found_output = 0; + #print "==========\n"; + #print "RUNNING: cut.pl $file $term $helper $operation \n"; + open PROC, "cut.pl $file $term $helper $operation |"; + while () + { + if ($found_output == 0) + { + print ("\n\n==================\nProcessing file: $file\n"); + $found_output = 1; + } + print ($_); + } + if ($found_output > 0) + { + print ("\n******************xx\n"); + } + close PROC; + } + + exit; + } + + if ($file eq "stdin") + { + open FILE, "-"; + } + elsif ($operation eq "strip_http") + { + open FILE, "$file"; + binmode (FILE); + } + elsif ($operation ne "age_dir") + { + open FILE, "$file"; + } + else + { + } + my $current_file = ''; + my $dot_current_file = ''; + my $in_file = 0; + my $num_files = 0; + + # size functions! + my $total_size = 0; + + # OldGrep functions! + my %grep_past_lines; + my $grep_past_lines_index = 1; + my $grep_forward_lines = -1; + + # Grep variables: + # Before and or after! + my $before = 0; + my $before_index = 0; + my $after = 0; + my $orig_after = 0; + my $after_index = 0; + my @before_lines; + my @after_lines; + + # Grep variables: + # Check before all the time (from first line), but only checkafter after the first line is matched! + my $use_before = 0; + my $use_after = 0; + my $num_lines_after = 0; + + if ($helper =~ m/^\d+$/) + { + $before = $helper; + $use_before = 1; + if ($helper eq "0") + { + $use_before = 0; + } + $after = 0; + $use_after = 1; + $orig_after = $helper; + } + elsif ($helper =~ m/^-\d+/) + { + $before = -1 * $helper; + $use_before = 1; + } + elsif ($helper =~ m/^\+\d+/) + { + $after = 0; + $orig_after = $helper; + $use_after = 1; + } + + # Count functions! + my $count = 1; + my $seen_http = 0; + my $lines_http = 0; + my %matrix_flip; + my $matrix_row = 0; + my $matrix_col = 0; + my $max_matrix_col = 0; + my $condense_begin = 1; + my $condense_line = ""; + my $condense_start = ""; + my $condense_regex = ""; + my $condense_count = 0; + + if ($operation eq "oneupcount") + { + my $i = 0; + for ($i = 0; $i < $helper; $i ++) + { + my $l = $term; + $l =~ s/XXX/$i/; + print ("$l\n"); + } + exit; + } + + if ($operation eq "wget_seed") + { + my $i; + for ($i = 10; $i < $helper + 10; $i++) + { + my $url = $term; + $url = "http://gatherer.wizards.com/Pages/Card/Details.aspx?action=random"; + my $content = get $url; + $content =~ s/\s\s/ /gim; + $content =~ s/\s\s/ /gim; + $content =~ s/\n//gim; + $content =~ s/.*multiverseid=(\d+).*/$1/gim; + + print "$content\n"; + } + } + + my %kkks; + if ($operation eq "filegrep") + { + open KEYS, "$term"; + while () + { + chomp; + $kkks {"^$_"} = 1; + } + } + if ($operation eq "make_code_bat") + { + print ("\@echo off\n"); + } + + my %ulines; + my $ulines_count = 0; + my @cut_on_term; + my $saw_helper_cut_on_term = 0; + while () + { + chomp $_; + my $line = $_; + + if ($operation eq "grepold") + { + if ($line !~ m/$term/i && $grep_forward_lines < 0) + { + $grep_past_lines {$grep_past_lines_index} = $line; + $grep_past_lines_index ++; + if ($grep_past_lines_index > $helper) + { + $grep_past_lines_index = 1; + } + } + elsif ($line =~ m/$term/i) + { + my $i = $grep_past_lines_index; + if (defined ($grep_past_lines {$i})) + { + print $grep_past_lines {$i}, " --- 22222\n"; + } + + $i++; + if ($i > $helper) { $i = 1; } + + while ($i != $grep_past_lines_index) + { + if (defined ($grep_past_lines {$i})) + { + print $grep_past_lines {$i}, " --- 33333\n"; + } + $i ++; + if ($i > $helper) { $i = 1; } + } + print "\n", $line, "\n"; + my %new_hash; + %grep_past_lines = %new_hash; + $grep_past_lines_index = 1; + $grep_forward_lines = $helper + 1; + } + + if ($grep_forward_lines <= $helper && $grep_forward_lines > 0) + { + print $line, " --- 44444\n"; + } + $grep_forward_lines--; + if ($grep_forward_lines == 0) + { + print "\n"; + } + } + + if ($operation eq "wget") + { + my $i; + { + my $url = $term; + $url =~ s/XXX/$line/; + print ("Looking at :$url:\n"); + my $content = get $url; + die "Couldn't get $url" unless defined $content; + $content =~ s/\s\s/ /gim; + $content =~ s/\s\s/ /gim; + $content =~ s/\n//gim; + + print $url, "\n\n\n\n\n", "=================\n", $content, "============\n"; + } + } + + if ($operation eq "wget_card_spoiler") + { + my $i; + { + my $url = $term; + $url =~ s/XXX/$line/; + my $content = get $url; + die "Couldn't get $url" unless defined $content; + $content =~ s/\s\s/ /gim; + $content =~ s/\s\s/ /gim; + $content =~ s/\n//gim; + $content =~ s/^.*CARD NAME-*->/CARD NAME-->/gim; + $content =~ s/Licia, Sanguine Tribune
5RWB
Legendary Creature - Vampire Soldier
Licia, Sanguine Tribune costs 1 less to cast for each 1 life you gained this turn.

First strike, lifelink

Pay 5 life: Put three +1/+1 counters on Licia. Activate this ability only on your turn and only once each turn.
"I give my blood, my life, all I have in exchange for victory."
Illus. Magali Villeneuve 4/4 + # >>> Duelist's Heritage|Commander 2016|1|R|{2}{W}|Enchantment|||Whenever one or more creatures attack, you may have target attacking creature gain double strike until end of turn.| + $content =~ m/.*CARD NAME-*-> *(.*?) *(.*?)(.*?)(.*?)/\$/img; + $text =~ s/\$ *\$/\$/img; + $text =~ s/<[^>]+>//img; + $text =~ s/[\$ ]*$//img; + $content =~ m/.*P\/T-*-> *(.*?) *\/ *(.*?) *(<|$)/im; + my $p = $1; + my $t = $2; + print ("$card_name|Commander 2017|??|CURM|$mana_cost|$type|$p|$t|$text|\n"); + } + } + if ($operation eq "wget_image") + { + my $i; + { + my $url = $term; + print ("Download :$url:\n"); + my $content = get $url; + print ("Saw " . length ($content) . " bytes!\n"); + print ("Save in $helper\n"); + open OUTPUT, "> " . $helper or die "No dice!"; + binmode (OUTPUT); + print OUTPUT $content; + close OUTPUT; + print $url, " >>> ", $helper, "\n"; + } + } + if ($operation eq "grep") + { + if ($line !~ m/$term/i && $use_after && $after > 0) + { + print ($line, "\n"); + $after--; + if ($after == 0) + { + print ("aaa===================\n"); + } + } + + if ($line !~ m/$term/i && $use_before) + { + $before_lines [$before_index] = $line; + #print (" >>>> adding in $before_index ($line)\n"); + #print (join (',,,', @before_lines)); + #print ("\n"); + $before_index ++; + if ($before_index >= $before) + { + $before_index = 0; + } + } + + if ($line =~ m/$term/i) + { + if ($use_before) + { + #print ("bbb===================\n"); + my $b = $before_index; + my $ok_once = 1; + + while ($b != $before_index || $ok_once) + { + if (defined ($before_lines [$b])) + { + #print ("bbb" , $before_lines [$b], "\n");#.($b, .$before. $before_index, $ok_once).\n"); + print ($before_lines [$b], "\n");#.($b, .$before. $before_index, $ok_once).\n"); + } + $ok_once = 0; + if ($b >= $before - 1) + { + $b = -1; + } + $b++; + } + my @new_array; + @before_lines = @new_array; + } + print ("$line\n"); + if ($use_after) + { + $after = $orig_after; + } + } + } + if ($operation eq "grep_between") + { + if ($line =~ m/$term/i) + { + print ("\n===================================================================\n"); + print ($line, "\n"); + $in_between_lines = 1; + } + if ($line !~ m/$helper/i && $in_between_lines) + { + print ($line, "\n"); + } + if ($line =~ m/$helper/i && $in_between_lines) + { + print ($line, "\n"); + $in_between_lines = 0; + } + } + + if ($operation eq "filegrep") + { + my $k; + my $print = 1; + foreach $k (keys (%kkks)) + { + if ($line =~ m/$k/ && $print) + { + $print = 0; + print ($line, "\n"); + } + } + } + + if ($operation eq "size") + { + if (-f $line) + { + my $sizer = -s $line; + my $zzz = " $sizer"; + $zzz =~ s/.*(........................)$/$1/; + print ($zzz, " --- $line\n"); + $total_size += $sizer; + } + } + + if ($operation eq "count") + { + print ("$count - $line\n"); + $count++; + } + + if ($operation eq "strip_http") + { + # Has to work on a file.. + if ($line =~ m/.*HTTP/) + { + $seen_http = 1; + print ("SEEN HTTP\n"); + } + + #print (">>$line<<\n"); + $lines_http ++; + + if ($seen_http && $line eq "") + { + $seen_http = 2; + } + } + + if ($operation eq "replace") + { + my $orig_line = $line; + $line =~ s/$term/$helper/gi; + if ($helper =~ m/\\n/) + { + $line =~ s/\\n/\n/gi; + } + if ($helper =~ m/''/) + { + $line =~ s/''/"/gi; + } + print ("$line\n"); + + eval("\$orig_line =~ s/$term/$helper/gi;"); + #print ("$orig_line\n"); + } + if ($operation eq "dedup_line") + { + $line =~ m/::(.*)::/; + my $user = $1; + my $new_line; + $line =~ s/.*://; + while ($line =~ s/,([^,]*),/,/im) + { + $new_line .= "\n$user:$1\n"; + if (not defined ($dedup_line_hash {"$user:$1"})) + { + $dedup_line_hash {"$user:$1"} = 1; + $dedup_line_hash {$user} ++; + } + } + print ("$new_line\n"); + } + + if ($operation eq "matrix_flip") + { + my @chars = split //, $line; + $matrix_col = 0; + my $char; + + foreach $char (@chars) + { + $matrix_flip {"$matrix_row,$matrix_col"} = $char; + $matrix_col ++; + if ($max_matrix_col < $matrix_col) + { + $max_matrix_col = $matrix_col; + } + } + $matrix_row ++; + } + + if ($operation eq "str_condense") + { + if ($line =~ m/(.)(\1{3,})/) + { + $line =~ s/(.)(\1{3,})/sprintf ("$1!%d#", length ($2));/eg; + } + print $line, "\n"; + } + + if ($operation eq "condense") + { + if ($condense_begin == 1) + { + #print (" begin........... $line \n"); + $condense_begin = 0; + $condense_line = $line; + $condense_start = $line; + $condense_start =~ s/^(.{10,25}).*/$1/; + $condense_start =~ s/\W/./g; + $condense_count = 0; + } + else + { + if ($line =~ $condense_start) + { + #print (" similar........... $line \n"); + $condense_count++; + } + else + { + if ($condense_count > 1) + { + $condense_line .= " {+similar=$condense_count}"; + } + print $condense_line, "\n"; + + $condense_line = $line; + if ($condense_line !~ m/......./) + { + $condense_begin = 1; + } + else + { + $condense_start = $line; + $condense_start =~ s/^(.{10,25}).*/$1/; + $condense_start =~ s/\W/./g; + $condense_count = 0; + } + } + } + } + + if ($operation eq "fields") + { + #$line = "BBB$term$line$term"; + my @fs = split /$term/, $line; + my @shows = split /,/, "$helper,"; + my $s; + foreach $s (@shows) + { + if ($s eq "Rest") + { + print $line; + } + elsif ($s eq "NewLine") + { + print "\n"; + } + else + { + print $fs [$s], "$term"; + } + } + print "\n"; + } + + if ($operation eq "wordcombos") + { + my @fs = split /$term/, $line; + + # The first one is key, the rest need to be made into something + my $current_key = $fs [0]; + my $current_val = $fs [1]; + + $current_val =~ s/ /XXX/g; + $current_val =~ s/\W//g; + $current_val =~ s/XXX*/ /g; + #print $current_key , " ---- ", $current_val, "\n"; + + my @words = split / /, uc ($current_val); + + my $w; + my $ws; + for ($w = 0; $w < scalar (@words); $w++) + { + my $x; + $ws = $words [$w]; + for ($x = $w + 1; $x < $w + $helper; $x++) + { + $ws .= "," . $words [$x]; + } + #$ws .= ";;;" . $current_key; + $combos {$ws} ++; + $all_combos {$ws} .= ";;;" . $current_key; + } + + } + + if ($operation eq "uniquewords") + { + $line .= " "; + my @words = split / /, uc ($line); + + my $w; + my $ws; + for ($w = 0; $w < scalar (@words); $w++) + { + $combos {$words [$w]} ++; + } + } + + if ($operation eq "cut_on_first_display_with_second") + { + if ($line =~ m/$helper/img) # cut_on_term + { + if ($saw_helper_cut_on_term) + { + print join ("\n", @cut_on_term); + } + else + { + #print ("\nNothing in this segment!!\n"); + } + $saw_helper_cut_on_term = 0; + my @new_array; + @cut_on_term = @new_array; + } + push @cut_on_term, $line; + if ($line =~ m/$term/img) + { + $saw_helper_cut_on_term = 1; + } + } + + if ($operation eq "images_html") + { + my @fs = split /$term/, $line; + my @shows = split /,/, "$helper,"; + my $s; + { + # + if ($fs[$shows[0]] =~ m/\*/) + { + my $id = $fs[$shows[0]]; + $id =~ s/\*//g; + $id =~ s/ //g; + my $x = ""; + $x =~ s/XXX/$id/; + print "$fs[$shows[1]]
$x"; + print "\n"; + } + } + } + + if ($operation eq "make_code_bat") + { + if ($line !~ m/all_/img) + { + print ("echo \" $line +++++++\"\n"); + print ("type \"$line\"\n"); + } + } + + if ($operation eq "uniquelines") + { + if (!defined ($ulines {$line})) + { + $ulines {$line} = 1; + $ulines_count ++; + print $line, "\n"; + #print "xxx $ulines_count\n"; + } + } + + if ($operation eq "countlines") + { + $ulines {$line} ++; + } + } + + if ($operation eq "age_dir2") + { + opendir DIR, $file or die "cannot open dir $file: $!"; + print $file, "\n"; + my $nextFile; + foreach $nextFile (grep {-f && ($helper > -M)} readdir DIR) + { + #print $nextFile, " -- $helper - ", -M, "\n"; + if ($nextFile =~ m/$term/) + { + print "type $nextFile\n"; + } + } + } + + if ($operation eq "age_dir") + { + my $i; + my $cmd = "type "; + my $next_term = $term; + + for ($i = 0; $i < $helper; $i++) + { + $next_term = $term; + my $now = time(); + my $yyyymmdd = strftime "%Y%m%d", localtime($now - $i * 24*3600); + $next_term =~ s/YYYYMMDD/$yyyymmdd/; + $cmd .= " $next_term "; + } + print $cmd; + } + + if ($operation eq "matrix_flip") + { + my $i; + my $j; + { + for ($i = 0; $i < $max_matrix_col; $i++) + { + for ($j = 0; $j < $matrix_row; $j++) + { + print ($matrix_flip {"$j,$i"}); + } + print ("\n"); + } + } + } + + if ($operation eq "size") + { + print ($total_size, " --- Cumulative total\n"); + } + + close FILE; + + if ($operation eq "strip_http") + { + if ($seen_http == 2) + { + `tail +$lines_http > /tmp/_cut_file; chmod 777 /tmp/_cut_file`; + `mv /tmp/_cut_file $file`; + } + } + + if ($operation eq "condense") + { + if ($condense_count > 1) + { + $condense_line .= " {+similar=$condense_count}"; + } + print $condense_line, "\n"; + } + + if ($operation eq "wordcombos") + { + my $v; + my @keys = keys (%combos); + my @new_keys; + my $v = 0; + my $k; + + foreach $k (@keys) + { + if ($k =~ m/,,/) { next; } + #if ($k !~ m/WHENEVER/) { next; } + #if ($combos {$k} > 10) + { + #push @new_keys, $combos {$k}; # . " ---- " . $k . ",,," . $all_combos {$k}; + push @new_keys, $k; + } + $v ++; + } + + my @jjs = sort @new_keys; + foreach $k (sort @jjs) + { + print $k, "\n"; + } + } + + if ($operation eq "dedup_line") + { + my $k; + for $k (sort keys (%dedup_line_hash)) + { + if ($k !~ m/.*:.*/) + { + print ("$k ---> $dedup_line_hash{$k}\n"); + } + if ($k =~ m/(.*):(.*)\s*$/) + { + if ($dedup_line_hash{$1} > 7) + { + print ("/h $2\n"); + } + } + } + } + + if ($operation eq "uniquewords") + { + my $v; + my @keys = keys (%combos); + my @new_keys; + my $v = 0; + my $k; + + my $i = 0; + foreach $k (@keys) + { + $i ++; + print $combos {$k}, "; $k\n"; + } + } + + if ($operation eq "countlines") + { + my $line; + #foreach $line (sort {$a <=> $b} values %ulines) + foreach $line (sort { $ulines{$a} <=> $ulines{$b} } keys %ulines) + { + print ("$ulines{$line} ==== $line\n"); + } + } + + if ($operation eq "letters") + { + #open PROC, "cut.pl $file $term $helper $operation |"; + my %as; + $as {"A"} = 1; + $as {"B"} = 1; + $as {"C"} = 1; + $as {"D"} = 1; + $as {"E"} = 1; + $as {"F"} = 1; + $as {"G"} = 1; + $as {"H"} = 1; + $as {"I"} = 1; + $as {"J"} = 1; + $as {"K"} = 1; + $as {"L"} = 1; + $as {"M"} = 1; + $as {"N"} = 1; + $as {"O"} = 1; + $as {"P"} = 1; + $as {"Q"} = 1; + $as {"R"} = 1; + $as {"S"} = 1; + $as {"T"} = 1; + $as {"U"} = 1; + $as {"V"} = 1; + $as {"W"} = 1; + $as {"X"} = 1; + $as {"Y"} = 1; + $as {"Z"} = 1; + + my $k; + foreach $k (sort keys (%as)) + { + my $k2; + foreach $k2 (sort keys (%as)) + { + print "$term$k$k2$helper\n"; + } + } + } + +} diff --git a/Utils/find_new_cards.pl b/Utils/find_new_cards.pl index 6970d3d92e..db6a7db5f3 100644 --- a/Utils/find_new_cards.pl +++ b/Utils/find_new_cards.pl @@ -81,6 +81,7 @@ sub get_name_of_card_from_class $card_name =~ s/ Of / of /g; $card_name =~ s/ To / to /g; $card_name =~ s/ And / and /g; + $card_name =~ s/ For / for /g; return $card_name; } return ""; @@ -143,7 +144,31 @@ if (exists ($new_order{$cmd})) { if ($new_cards {$line} > 0) { - print ($line, " in ", $all_cards {$line}, "\n"); + my $setname = $all_cards {$line}; + + # Check if name is correct if not try to fix with ' before the endings of first word + no warnings 'uninitialized'; + if (!(length $setname)) { # setname is not set correct + my $firstblank = index($line, " "); + my $char = substr $line, $firstblank - 1, 1; + if ($char eq "s") { + my $fixedname = (substr $line, 0, $firstblank - 1) . "'" . (substr $line , $firstblank -1); + $setname = $all_cards {$fixedname}; + if (length $setname) { + $line = $fixedname; + } + } + } + + + if (!(length $setname)){ + print ("*** Set not found - probably card name is not exactly correct\n"); + print ($line, "\n"); + } else { + print ($line, " in ", $setname, "\n"); + } + + } } } diff --git a/Utils/gen-card.pl b/Utils/gen-card.pl index 9f011e081f..7a2646f1cb 100755 --- a/Utils/gen-card.pl +++ b/Utils/gen-card.pl @@ -186,6 +186,8 @@ $vars{'toughness'} = $card[7]; my @types; $vars{'planeswalker'} = 'false'; $vars{'subType'} = ''; +$vars{'hasSubTypes'} = 'false'; +$vars{'hasSuperTypes'} = 'false'; my $cardAbilities = $card[8]; my $type = $card[5]; while ($type =~ m/([a-zA-Z]+)( )*/g) { @@ -197,10 +199,13 @@ while ($type =~ m/([a-zA-Z]+)( )*/g) { } } else { if (@types) { - $vars{'subType'} .= "\n this.subtype.add(\"$1\");"; + my $st = uc($1); + $vars{'subType'} .= "\n this.subtype.add(SubType.$st);"; + $vars{'hasSubTypes'} = 'true'; } else { my $st = uc($1); - $vars{'subType'} .= "\n addSuperType(SuperType.$st);"; + $vars{'subType'} .= "\n this.addSuperType(SuperType.$st);"; + $vars{'hasSuperTypes'} = 'true'; } } } diff --git a/Utils/gen-existing-cards-by-set.pl b/Utils/gen-existing-cards-by-set.pl index 800a39bd76..9c6e0a4f7f 100755 --- a/Utils/gen-existing-cards-by-set.pl +++ b/Utils/gen-existing-cards-by-set.pl @@ -71,6 +71,7 @@ foreach $potentialSideA (sort @setCards) { #print (">>$potentialSideA\n"); if ($potentialSideA =~ m/.*,,,(\d+)(a)$/) { my $cardNumSideB = $1 . "b"; + my $orig_cardNumSideB = $1 . "b"; my $val; foreach $val (sort @setCards) { if ($val =~ m/$cardNumSideB$/) { @@ -93,6 +94,7 @@ foreach $potentialSideA (sort @setCards) { print ("Adding in: $potentialSideA \/\/ $val,,,$cardNumSideB\n"); $cardsFound = $cardsFound - 1; + $cardNumSideB = $orig_cardNumSideB; } } } diff --git a/Utils/get_spoiler_txt_ixa.bat b/Utils/get_spoiler_txt_ixa.bat new file mode 100644 index 0000000000..f1b1342fc4 --- /dev/null +++ b/Utils/get_spoiler_txt_ixa.bat @@ -0,0 +1,16 @@ +del x +del x2 +del x3 +del x4 +del x5 +del x6 +del x7.bat +echo "" | cut.pl stdin "http://mythicspoiler.com/ixa/" 0 wget > x +type x | cut.pl stdin "cards\/" "\n\n\ncards/" replace > x2 +type x2 | cut.pl stdin "^" "\nhttp://mythicspoiler.com/ixa/" replace > x3 +find x3 "http://mythicspoiler.com/ixa/" | find /v /i "jpg" > x4 +type x4 | cut.pl stdin "><.*" "" replace > x5 +type x5 | cut.pl stdin "^" "echo '''' | cut.pl stdin ''" replace > x6 +echo @echo off > x7.bat +type x6 | cut.pl stdin "$" " 0 wget_card_spoiler" replace | cut.pl stdin 0 0 uniquelines | find /I "cards" >> x7.bat +type x7.bat diff --git a/Utils/known-sets.txt b/Utils/known-sets.txt index 1f20dfa9a9..15cf441444 100644 --- a/Utils/known-sets.txt +++ b/Utils/known-sets.txt @@ -90,6 +90,7 @@ Grand Prix|GrandPrix| Guildpact|Guildpact| Guru|Guru| HASCON Promo 2017|HasconPromo2017| +Heroes of the Realm|HeroesOfTheRealm| Homelands|Homelands| Hour of Devastation|HourOfDevastation| Ice Age|IceAge| diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 1159e57987..1152e94dc2 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -11196,7 +11196,7 @@ Daru Sanctifier|Legions|9|C|{3}{W}|Creature - Human Cleric|1|4|Morph {1}{W} Y Clickslither|Legions|90|R|{1}{R}{R}{R}|Creature - Insect|3|3|Haste$Sacrifice a Goblin: Clickslither gets +2/+2 and gains trample until end of turn.| Crested Craghorn|Legions|91|C|{4}{R}|Creature - Goat Beast|4|1|Haste$Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.)| Flamewave Invoker|Legions|92|C|{2}{R}|Creature - Goblin Mutant|2|2|{7}{R}: Flamewave Invoker deals 5 damage to target player.| -Frenetic Raptor|Legions|93|U|{5}{R}|Creature - Lizard Beast|6|6|Beasts can't block.| +Frenetic Raptor|Legions|93|U|{5}{R}|Creature - Dinosaur Beast|6|6|Beasts can't block.| Gempalm Incinerator|Legions|94|U|{2}{R}|Creature - Goblin|2|1|Cycling {1}{R} ({1}{R}, Discard this card: Draw a card.)$When you cycle Gempalm Incinerator, you may have it deal X damage to target creature, where X is the number of Goblins on the battlefield.| Goblin Assassin|Legions|95|U|{3}{R}{R}|Creature - Goblin Assassin|2|2|Whenever Goblin Assassin or another Goblin enters the battlefield, each player flips a coin. Each player whose coin comes up tails sacrifices a creature.| Goblin Clearcutter|Legions|96|U|{3}{R}|Creature - Goblin|3|3|{tap}, Sacrifice a Forest: Add three mana in any combination of {R} and/or {G} to your mana pool.| @@ -31789,7 +31789,7 @@ Black Market|Commander 2017|98|R|{3}{B}{B}|Enchantment|||Whenever a creature die Blood Artist|Commander 2017|99|U|{1}{B}|Creature - Vampire|0|1|Whenever Blood Artist or another creature dies, target player loses 1 life and you gain 1 life.| Blood Tribute|Commander 2017|100|R|{4}{B}{B}|Sorcery|||Kicker — Tap an untapped Vampire you control.$Target opponent loses half his or her life, rounded up. If Blood Tribute was kicked, you gain life equal to the life lost this way.| Bloodhusk Ritualist|Commander 2017|101|U|{2}{B}|Creature - Vampire Shaman|2|2|Multikicker {B}$When Bloodhusk Ritualist enters the battlefield, target opponent discards a card for each time it was kicked.| -Bloodlost of Vaasgoth|Commander 2017|102|M|{3}{B}{B}|Creature - Vampire Warrior|3|3|Bloodthirst 3$Flying$Whenever you cast a Vampire creature spell, it gains bloodthirst 3.| +Bloodlord of Vaasgoth|Commander 2017|102|M|{3}{B}{B}|Creature - Vampire Warrior|3|3|Bloodthirst 3$Flying$Whenever you cast a Vampire creature spell, it gains bloodthirst 3.| Butcher of Malakir|Commander 2017|103|R|{5}{B}{B}|Creature - Vampire Warrior|5|4|Flying$Whenever Butcher of Malakir or another creature you control dies, each opponent sacrifices a creature.| Captivating Vampire|Commander 2017|104|R|{1}{B}{B}|Creature - Vampire|2|2|Other Vampire creature you control get +1/+1.$Tap five untapped Vampires you control: Gain control of target creature. It becomes a Vampire in addition to its other types.| Consuming Vapors|Commander 2017|105|R|{3}{B}|Sorcery|||Target player sacrifices a creature. You gain life equal to that creature's toughness.$Rebound| @@ -32328,72 +32328,305 @@ Wasp of the Bitter End|Hour of Devastation|206|U|{1}{B}|Creature - Insect Horror Zealot of the God-Pharaoh|Hour of Devastation|207|C|{3}{R}|Creature - Minotaur Archer|4|3|{4}{R}: Zealot of the God-Pharaoh deals 2 damage to target opponent.| Visage of Bolas|Hour of Devastation|208|R|{4}|Artifact|||When Visage of Bolas enters the battlefield, you may search your library and/or graveyard for a card named Nicol Bolas, the Deceiver, reveal it, and put it into your hand. If you search your library this way, shuffle it.${t}: Add {U}, {B}, or {R} to your mana pool.| Cinder Barrens|Hour of Devastation|209|C||Land|||Cinder Barrens enters the battlefield tapped.${t}: Add {B} or {R} to your mana pool.| +Adanto Vanguard|Ixalan|1|U|{1}{W}|Creature - Vampire Soldier|1|1|As long as Adanto Vanguard is attacking, it gets +2/+0.$Pay 4 life: Adanto Vanguard gains indestructible until end of turn.| Ashes of the Abhorrent|Ixalan|2|R|{1}{W}|Enchantment|||Players can't cast spells from graveyards or activate abilities from graveyards.$Whenever a creature dies, you gain 1 life.| +Axis of Mortality|Ixalan|3|M|{4}{W}{W}|Enchantment|||At the beginning of your upkeep, you may have two target players exchange life totals.| +Bellowing Aegisaur|Ixalan|4|U|{5}{W}|Creature - Dinosaur|3|5|Enrage - Whenever Bellowing Aegisaur is dealt damage, put a +1/+1 counter on each other creature you control.| Bishop of Rebirth|Ixalan|5|R|Creature - Vampire Cleric|3|4|Vigilance$Whenever Bishop of Rebirth attacks, you may return target creature card with converted mana cost 3 or less from your graveyard to the battlefield.| +Bishop's Soldier|Ixalan|6|C|{1}{W}|Creature - Vampire Soldier|2|2|Lifelink| +Bright Reprisal|Ixalan|7|U|{4}{W}|Instant|||Destroy target attacking creature.$Draw a card.| +Demystify|Ixalan|8|C|{W}|Instant|||Destroy target enchantment.| +Duskborne Skymarcher|Ixalan|9|U|{W}|Creature - Vampire Cleric|1|1|Flying${W}, {T}: Target attacking vampire gets +1/+1 until end of turn.| +Emissary of Sunrise|Ixalan|10|U|{2}{W}|Creature - Human Cleric|2|1|First strike$When Emissary of Sunrise enters the battlefield, it explores. (Reveal the top card of your library. Put that card into your hand if it's a land. Otherwise, put a +1/+1 counter on this creature, then put the card back or put it into your graveyard.)| +Encampment Keeper|Ixalan|11|C|{W}|Creature - Hound|1|1|First strike${7}{W}, Sacrifice Encampment Keeper: Creatures you control get +2/+2 until end of turn.| +Glorifier of Dusk|Ixalan|12|U|{3}{W}{W}|Creature - Vampire Soldier|4|4|Pay 2 life: Glorifier of Dusk gains flying until end of turn.$Pay 2 life: Glorifier of Dusk gains vigilance until end of turn.| Goring Ceratops|Ixalan|13|R|Creature - Dinosaur|3|3|Double strike$Whenever Goring Ceratops attacks, other creatures you control gain double strike until end of turn.| +Imperial Aerosaur|Ixalan|14|U|{3}{W}|Creature - Dinosaur|3|3|Flying$When Imperial Aerosaur enters the battlefield, another target creature you control gets +1/+1 and gains flying until end of turn.| +Imperial Lancer|Ixalan|15|U|{W}|Creature - Human Knight|1|1|Imperial Lancer has double strike as long as you control a Dinosaur.| +Inspiring Cleric|Ixalan|16|U|{2}{W}|Creature - Vampire Cleric|3|2|When Inspiring Cleric enters the battlefield, you gain 4 life.| +Ixalan's Binding|Ixalan|17|U|{3}{W}|Enchantment|||When Ixalan's Binding enters the battlefield, exile target nonland permanent an opponent controls until Ixalan's Binding leaves the battlefield.$Your opponents can't cast spells with the same name as the exiled card.| +Kinjalli's Caller|Ixalan|18|C|{W}|Creature - Human Cleric|0|3|Dinosaur spells you cast cost {1} less to cast.| Kinjalli's Sunwing|Ixalan|19|R|{2}{W}|Creature - Dinosaur|2|3|Flying$Creatures your opponents control enter the battlefield tapped.| +Legion Conquistador|Ixalan|20|C|{2}{W}|Creature - Vampire Soldier|2|2|When Legion Conquistador enters the battlefield, you may search your library for any number of cards named Legion Conquistador, reveal them, put them into your hand, then shuffle your library| +Legion's Judgment|Ixalan|21|C|{2}{W}|Sorcery|||Destroy target creature with power 4 or greater.| +Legion's Landing|Ixalan|22a|R|{W}|Legendary Enchantment|||When Legion's Landing enters the battlefield, create a 1/1 white Vampire creature token with lifelink.$When you attack with three or more creatures, transform Legion's Landing.| +Adanto, the First Fort|Ixalan|22b|R||Legendary Land|||T: Add W to your mana pool.$2W, T: Create a 1/1 white Vampire creature token with lifelink.| +Looming Altisaur|Ixalan|23|C|{3}{W}|Creature - Dinosaur|1|7|| Mavren Fein, Dusk Apostle|Ixalan|24|R|{2}{W}|Legendary Creature - Vampire Cleric|2|2|Whenever one or more nontoken Vampires you control attack, create a 1/1 white Vampire creature token with lifelink.| +Paladin of the Bloodstained|Ixalan|25|C|{3}{W}|Creature - Vampire Knight|3|2|When Paladin of the Bloodstained enters the battlefield, create a 1/1 white Vampire creature token with lifelink.| +Pious Interdiction|Ixalan|26|C|{3}{W}|Enchantment - Aura|||Enchant creature$When Pious Interdiction enters the battlefield, you gain 2 life.$Enchanted creature can't attack or block.| Priest of the Wakening Sun|Ixalan|27|R|{W}|Creature - Human Cleric|1|1|At the beginning of your upkeep, you may reveal a Dinosaur card from your hand. If you do, you gain 2 life.${3}{W}{W}, Sacrifice Priest of the Wakening Sun: Search your library for a Dinosaur card, reveal it, put it into your hand, then shuffle your library.| +Pterodon Knight|Ixalan|28|C|{3}{W}|Creature - Human Knight|3|3|Pterodon Knight has flying as long as you control a Dinosaur.| +Queen's Commission|Ixalan|29|C|{2}{W}|Sorcery|||Create two 1/1 white Vampire creature tokens with lifelink.| +Rallying Roar|Ixalan|30|U|{2}{W}|Instant|||Creatures you control get +1/+1 until end of turn. Untap them.| +Raptor Companion|Ixalan|31|C|{1}{W}|Creature - Dinosaur|3|1|| +Ritual of Rejuvenation|Ixalan|32|C|{2}{W}|Instant|||You gain 4 life.$Draw a card.| Sanguine Sacrament|Ixalan|33|R|{X}{W}{W}|Instant|||You gain twice X life. Put Sanguine Sacrament on the bottom of its owner's library.| Settle the Wreckage|Ixalan|34|R|{2}{W}{W}|Instant|||Exile all attacking creatures target player controls. That player may search his or her library for that many basic land cards, put those cards onto the battlefield tapped, then shuffle his or her library.| +Sheltering Light|Ixalan|35|U|{W}|Instant|||Target creature gains indestructible until end of turn. Scry 1. | +Shining Aerosaur|Ixalan|36|C|{4}{W}|Creature - Dinosaur|3|4|Flying| +Skyblade of the Legion|Ixalan|37|C|{1}{W}|Creature - Vampire Soldier|1|3|Flying| +Slash of Talons|Ixalan|38|C|{W}|Instant|||Slash of Talons deals 2 damage to target attacking or blocking creature.| +Steadfast Armasaur|Ixalan|39|U|{3}{W}|Creature - Dinosaur|2|3|Vigilance${1}{W}, {T}: Steadfast Armasaur deals damage equal to its toughness to target creature blocking or blocked by it.| +Sunrise Seeker|Ixalan|40|C|{4}{W}|Creature - Human Scout|3|3|Vigilance$When Sunrise Seeker enters the battlefield, it explores. | +Territorial Hammerskull|Ixalan|41|C|{2}{W}|Creature - Dinosaur|2|3|Whenever Territorial Hammerskull attacks, tap target creature an opponent controls.| Tocatli Honor Guard|Ixalan|42|R|{1}{W}|Creature - Human Soldier|1|3|Creatures entering the battlefield don't cause abilities to trigger.| +Vampire's Zeal|Ixalan|43|C|{W}|Instant|||Target creature gets +2/+2 until end of turn. If it's a Vampire, it gains first strike until end of turn.| +Wakening Sun's Avatar|Ixalan|44|M|{5}{W}{W}{W}|Creature - Dinosaur Avatar|7|7|When Wakening Sun's Avatar enters the battlefield, if you cast if from you hand, destroy all non-Dinosaur creatures.| +Air Elemental|Ixalan|45|U|{3}{U}{U}|Creature - Elemental|4|4|Flying| Arcane Adaptation|Ixalan|46|R|{2}{U}|Enchantment|||As Arcane Adaptation enters the battlefield, choose a creature type.$Creatures you control are the chosen type in addition to their other types. The same is true for creature spells you control and creature cards you own that aren't on the battlefield.| +Cancel|Ixalan|47|C|{1}{U}{U}|Instant|||Counter target spell.| +Chart a Course|Ixalan|48|U|{1}{U}|Sorcery|||| Daring Saboteur|Ixalan|49|R|{1}{U}|Creature - Human Pirate|2|1|{2}{U}: Daring Saboteur can't be blocked this turn.$Whenever Daring Saboteur deals combat damage to a player, you may draw a card. If you do, discard a card.| +Deadeye Quartermaster|Ixalan|50|U|{3}{U}|Creature - Human Pirate|2|2|When Deadeye Quartermaster enters the battlefield, you may search your library for an Equipment or a Vehicle card and put it into your hand. If you do, shuffle your library.| Deeproot Waters|Ixalan|51|U|{2}{U}|Enchantment|||Whenever you cast a Merfolk spell, create a 1/1 blue Merfolk creature token with hexproof.| +Depths of Desire|Ixalan|52|C|{2}{U}|Instant|||Return target creature to its owner's hand. Create a colorless Treasure token with "{t}, Sacrifice this artifact: Add one mana of any color to your mana pool."| +Dive Down|Ixalan|53|C|{U}|Instant|||Target creature you control gets +0/+3 until end of turn. | Dreamcaller Siren|Ixalan|54|R|{2}{U}{U}|Creature - Siren Pirate|3|3|Flash$Flying$Dreamcaller Siren can only block creatures with flying.$When Dreamcaller Siren enters the battlefield, if you control another Pirate, tap up to two nonland permanents.| Entrancing Melody|Ixalan|55|R|{X}{U}{U}|Instant|||Gain control of target creature with converted mana cost X.| +Favorable Winds|Ixalan|56|U|{1}{U}|Enchantment|||Creatures you control with flying get +1/+1.| +Fleet Swallower|Ixalan|57|R|{5}{U}{U}|Creature - Fish|6|6|Whenever Fleet Swallower attacks, target player puts the top half of his or her library, rounded up, into his or her graveyard.| +Headwater Sentries|Ixalan|58|C|{3}{U}|Creature - Merfolk Warrior|2|5|| Herald of Secret Streams|Ixalan|59|R|{3}{U}|Creature - Merfolk Warrior|2|3|Creatures you control with +1/+1 counters on them can't be blocked.| Jace, Cunning Castaway|Ixalan|60|M|{1}{U}{U}|Legendary Planeswalker - Jace|||+1: Whenever one or more creatures you control deal combat damage to a player this turn, draw a card, then discard a card.$-2: Create a 2/2 blue Illusion creature token with "When this creature becomes the target of a spell, sacrifice it."$-5: Create two tokens that are copies of Jace, Cunning Castaway, except they're not legendary.| Kopala, Warden of Waves|Ixalan|61|R|{1}{U}{U}|Legendary Creature - Merfolk Wizard|2|2|Spells your opponents cast that target a Merfolk you control cost {2} more to cast.$Abilities your opponents activate that target a Merfolk you control cost {2} more to activate.| +Lookout's Dispersal|Ixalan|62|U|{2}{U}|Instant|||Lookout's Dispersal costs {1} less to cast if you control a Pirate.$Counter target spell unless its controller pays {4}.| +Navigator's Ruin|Ixalan|63|U|{2}{U}|Enchantment|||Raid/-- At the beginning of your end step, if you attacked with a creature this turm, target opponent puts the top four cards of his or her library into his or her graveyard.| +One with the Wind|Ixalan|64|C|{1}{U}|Enchantment - Aura|||Enchant Creature$Enchanted creature gets +2/+2 and has flying.| +Opt|Ixalan|65|C|{U}|Instant|||Scry 1.$Draw a card.| +Overflowing Insight|Ixalan|66|M|{4}{U}{U}{U}|Sorcery|||Target player draws seven cards.| +Perilous Voyage|Ixalan|67|U|{1}{U}|Instant|||Return target nonland permanent you don't control to its owner's hand. If its converted mana cost was 2 or less, scry 2.| +Pirate's Prize|Ixalan|68|C|{3}{U}|Sorcery|||Draw two cards. Create a colorless Treasure artifact token with "{t}, Sacrifice this artifact: Add one mana of any color to your mana pool."| Prosperous Pirates|Ixalan|69|C|{4}{U}|Creature - Human Pirate|3|4|When Prosperous Pirates enters the battlefield, create two colorless Treasure artifact tokens with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool."| +River Sneak|Ixalan|70|U|{1}{U}|Creature - Merfolk Warrior|1|1|River Sneak can't be blocked.$Whenever another Merfolk enters the battlefield under your control, River sneak gets +1/+1 until end of turn.| River's Rebuke|Ixalan|71|R|{4}{U}{U}|Sorcery|||Return all nonland permanents target player controls to their owner's hand.| +Run Aground|Ixalan|72|C|{3}{U}|Instant|||Put target artifact or creature on top of it's owner's library.| +Sailor of Means|Ixalan|73|C|{2}{U}|Creature - Human Pirate|1|4|When Sailor of Means enters the battlefield, create a colorless Treasure artifact token with "{t}, Sacrifice this artifact: Add one mana of any color to your mana pool."| +Search for Azcanta|Ixalan|74a|R|{1}{U}|Legendary Enchantment|||| +Azcanta, The Sunken Ruin|Ixalan|74b|R||Legendary Land|||(Transforms from Search for Azcanta)/${t} : Add {U} to your mana pool.${2U} , {t} : Look at the top four cards of your library. You may reveal a noncreature, nonland card from among them and put it into your hand. Put the rest on the bottom of your library in any order. | +Shaper Apprentice|Ixalan|75|C|{1}{U}|Creature - Merfolk Wizard|2|1|Shaper Apprentice has flying as long as you control another Merfolk.| +Shipwreck Looter|Ixalan|76|C|{1}{U}|Creature - Human Pirate|2|1|Raid/-- When Shipwreck Looter enters the battlefield,if you attacked with a creature this turn, you may draw a card. If you do, discard a card.| +Shore Keeper|Ixalan|77|C|{U}|Creature - Trilobite|0|3|{7u}, {t}, Sacrifice Shore Keeper: Draw three cards.| +Siren Lookout|Ixalan|78|C|{2}{U}|Creature - Siren Pirate|1|2|Flying$When Siren Lookout enters the battlefield, it explores. | +Siren Stormtamer|Ixalan|79|U|{U}|Creature - Siren Pirate Wizard|1|1|Flying${U}, Sacrifice Siren Stormtamer: Counter target spell or ability that targets you or a creature you control.| +Siren's Ruse|Ixalan|80|C|{1}{U}|Instant|||Exile target creature you control, then return that card to the battlefield under its owner's control. If a Pirate was exiled this way, draw a card.| +Spell Pierce|Ixalan|81|C|{U}|Instant|||Counter target noncreature spell unless its controller pays {2}.| +Spell Swindle|Ixalan|82|R|{3}{U}{U}|Instant|||Counter target spell. Create X colorless Treasure artifact tokens, where X is that spell's converted mana cost. They have "T, Sacrifice this artifact: Add one mana of any color to your mana pool."| +Storm Fleet Aerialist|Ixalan|83|U|{1}{U}|Creature - Human Pirate|1|2|Flying$Raid - Storm Fleet Aerialist enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn.| +Storm Fleet Spy|Ixalan|84|U|{2}{U}|Creature - Human Pirate|2|2|Raid - When Storm Fleet Spy enters the battlefield, if you attacked with a creature this turn, draw a card.| +Storm Sculptor|Ixalan|85|C|{3}{U}|Creature - Merfolk Wizard|3|2|Storm Sculptor can't be blocked.$When Storm Sculptor enters the battlefield, return a creature you control to its owner's hand.| +Tempest Caller|Ixalan|86|U|{2}{U}{U}|Creature - Merfolk Wizard|2|3|When Tempest Caller enters the battlefield, tap all creatures target opponent controls.| +Watertrap Weaver|Ixalan|87|C|{2}{U}|Creature - Merfolk Wizard|2|2|When Watertrap Weaver enters the battlefield, tap target creature an opponent controls. That creature doesn't untap during its controller's next untap step.| +Wind Strider|Ixalan|88|C|{4}{U}|Creature - Merfolk Wizard|3|3|Flash$Flying| +Anointed Deacon|Ixalan|89|C|{4}{B}|Creature - Vampire Cleric|3|3|At the beginning of combat on your turn, you may have target Vampire get +2/+0 until end of turn.| +Arguel's Blood Fast|Ixalan|90a|R|{1}{B}|Legendary Enchantment|||{1}{B}, Pay 2 life: Draw a card.$At the beginning of your upkeep, if you have 5 or less life, you may transform Arguel's Blood Fast.| +Temple of Aclazotz|Ixalan|90b|R||Legendary Land|||{T}: Add {B} to your mana pool${T}, Sacrifice a creature: You gain life equal to the sacrificed creature's toughness.| +Bishop of the Bloodstained|Ixalan|91|U|{3}{B}{B}|Creature - Vampire Cleric|3|3|When Bishop of the Bloodstained enters the battlefield, target player loses 1 life for each vampire you control.| +Blight Keeper|Ixalan|92|C|{B}|Creature - Bat Imp|1|1|Flying${7}{B}, {T}, Sacrifice Blight Keeper: Target opponent loses 4 life and you gain 4 life.| Bloodcrazed Paladin|Ixalan|93|R|{1}{B}|Creature - Vampire Knight|1|1|Flash$Bloodcrazed Paladin enters the battlefield with a +1/+1 counter on it for each creature that died this turn.| Boneyard Parley|Ixalan|94|M|{5}{B}{B}|Sorcery|||Exile up to five target creature cards from graveyards. An opponent separates those cards into two piles. Put all cards from the pile of your choice onto the battlefield under your control and the rest into their owners' graveyards.| +Contract Killing|Ixalan|95|C|{3}{B}{B}|Sorcery|||Destroy target creature. Create two colorless Treasure artifact tokens with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool."| +Costly Plunder|Ixalan|96|C|{1}{B}|Instant|||As an additional cost to cast Costly Plunder, sacrifice an artifact or creature.$Draw two cards.| +Dark Nourishment|Ixalan|97|U|{9}{7}|Instant|||Dark Nourishment deals 3 damage to target creature or player. You gain 3 life.| Deadeye Tormentor|Ixalan|98|C|{2}{B}|Creature - Human Pirate|2|2|Raid — When Deadeye Tormentor enters the battlefield, if you attacked with a creature this turn, target opponent discards a card.| Deadeye Tracker|Ixalan|99|R|{B}|Creature - Human Pirate|1|1|{1}{B}, {T}: Exile two target cards from an opponent's graveyard. Deadeye Tracker explores.| +Deathless Ancient|Ixalan|100|U|{4}{B}{B}|Creature - Vampire Knight|4|4|Flying$Tap three untapped Vampires you control: Return Deathless Ancient from your graveyard to your hand.| +Desperate Castaways|Ixalan|101|C|{1}{B}|Creature - Human Pirate|2|3|Desperate Castaways can't attack unless you control an artifact.| +Dire Fleet Hoarder|Ixalan|102|C|{1}{B}|Creature - Human Pirate|2|1|When Dire Fleet Hoarder dies, create a colorless Treasure artifact token with "{t}, Sacrifice this artifact: Add one mana of any color to your mana pool."| +Dire Fleet Interloper|Ixalan|103|C|{3}{B}|Creature - Human Pirate|2|2|Menace$When Dire Fleet Interloper enters the battlefield, it explores. | +Dire Fleet Ravager|Ixalan|104|M|{3}{B}{B}|Creature - Orc Pirate Wizard|4|4|Menace, deathtouch$When Dire Fleet Ravager enters the battlefield, each player loses a third of his or her life, rounded up.| +Duress|Ixalan|105|C|{B}|Sorcery|||Target opponent reveals his or her hand. You choose a noncreature, nonland card from it. That player discards that card.| Fathom Fleet Captain|Ixalan|106|R|{1}{B}|Creature - Human Pirate|2|1|Menace$Whenever Fathom Fleet Captain attacks, if you control another nontoken Pirate, you may pay {2}. If you do, creature a 2/2 black Pirate creature token with menace.| +Fathom Fleet Cutthroat|Ixalan|107|C|{3}{B}|Creature - Human Pirate|3|3|When Fathom Fleet Cutthroat enters the battlefield, destroy target creature an opponent controls that was dealt damage this turn.| +Grim Captain's Call|Ixalan|108|U|{2}{B}|Sorcery|||Return a Pirate card from your graveyard to your hand, then do the same for Vampire, Dinosaur, and Merfolk.| +Heartless Pillage|Ixalan|109|U|{2}{B}|Sorcery|||Target opponent discards two cards.$Raid/ — If you attacked with a creature this turn, create a colorless Treasure artifact token with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool."| +Kitesail Freebooter|Ixalan|110|U|{1}{B}|Creature - Human Pirate|1|2|Flying$When Kitesail Freebooter enters the battlefield, target opponent reveals his or her hand. You choose a noncreature, nonland card from it. Exile that card until Kitesail Freebooter leaves the battlefield.| +Lurking Chupacabra|Ixalan|111|U|{3}{B}|Creature - Beast Horror|2|3|Whenever a creature you control explores, target creature an opponent controls gets -2/-2 until end of turn| +March of the Drowned|Ixalan|112|C|{B}|Sorcery|||Choose one —$&bull; Return target creature card from your graveyard to your hand.$&bull; Return two target Pirate cards from your graveyard to your hand.| +Mark of the Vampire|Ixalan|113|C|{3}{B}|Enchantment - Aura|||Enchant creature$Enchanted creature gets +2/+2 and has lifelink.| +Queen's Agent|Ixalan|114|C|{5}{B}|Creature - Vampire Scout|3|3|Lifelink$When Queen's Agent enters the battlefield, it explores. | Queen's Bay Soldier|Ixalan|115|C|{1}{B}|Creature - Vampire Soldier|2|2|| +Raiders' Wake|Ixalan|116|U|{3}{B}|Enchantment|||Whenever an opponent discards a card, that player loses 2 life.$Raid — At the beginning of your end step, if you attacked with a creature this turn, target opponent discards a card.| Revel in Riches|Ixalan|117|R|{4}{B}|Enchantment|||Whenever a creature an opponent controls dies, create a colorless Treasure artifact token with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool."$At the beginning of your upkeep, if you control ten or more Treasures, you win the game.| Ruin Raider|Ixalan|118|R|{2}{B}|Creature - Orc Pirate|3|2|Raid — At the beginning of your end step, if you attacked with a creature this turn, reveal the top card of your library and put that card into your hand. You lose life equal to the card's converted mana cost.| +Ruthless Knave|Ixalan|119|U|{2}{B}|Creature - Orc Pirate|3|2|{2}{B}, Sacrifice a creature: Create two colorless Treasure artifact tokens with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool."$Sacrifice three Treasures: Draw a card.| +Sanctum Seeker|Ixalan|120|R|{2}{B}{B}|Creature - Vampire Knight|3|4|Whenever a Vampire you control attacks, each opponent loses 1 life and you gain 1 life.| +Seekers' Squire|Ixalan|121|U|{1}{B}|Creature - Human Scout|1|2|When Seekers' Squire enters the battlefield, it explores. | +Skittering Heartstopper|Ixalan|122|C|{B}|Creature - Insect|1|2|{B}: Skittering Heartstopper gains deathtouch until end of turn.| +Skulduggery|Ixalan|123|C|{B}|Instant|||Until end of turn, target creature you control gets +1/+1 and target creature an opponent controls gets -1/-1.| +Skymarch Bloodletter|Ixalan|124|C|{2}{B}|Creature - Vampire Soldier|2|2|Flying$When Skymarch Bloodletters enters the battlefield, target opponent loses 1 life and you gain 1 life.| +Spreading Rot|Ixalan|125|C|{4}{B}|Sorcery|||Destroy target land. Its controller loses 2 life.| +Sword-Point Diplomacy|Ixalan|126|R|{2}{B}|Sorcery|||Reveal the top three cards of your library. For each of those cards, put that card into your hand unless any opponent pays 3 life. Then exile the rest.| +Vanquish the Weak|Ixalan|127|C|{2}{B}|Instant|||Destroy target creature with power 3 or less.| +Vicious Conquistador|Ixalan|128|U|{B}|Creature - Vampire Soldier|1|2|Whenever Vicious Conquistador attacks, each opponent loses 1 life.| Vraska's Contempt|Ixalan|129|R|{2}{B}{B}|Instant|||Exile target creature or planeswalker. You gain 2 life.| Walk the Plank|Ixalan|130|U|{B}{B}|Sorcery|||Destroy target non-Merfolk creature.| +Wanted Scoundrels|Ixalan|131|U|{1}{B}|Creature - Human Pirate|4|3|When Wanted Scoundrels dies, target opponent creates two colorless Treasure artifact tokens with "T, Sacrifice this artifact: Add one mana of any color to your mana pool."| Angrath's Marauders|Ixalan|132|R|{5}{R}{R}|Creature - Human Pirate|4|4|If a source you control would deal damage to a permanent or player, it deals double that damage to that permanent or player instead.| +Bonded Horncrest|Ixalan|133|U|{3}{R}|Creature - Dinosaur|5|5|Bonded Horncrest can't attack or block alone.| +Brazen Buccaneers|Ixalan|134|C|{3}{R}|Creature - Human Pirate|2|2|Haste$When Brazen Buccaneers enters the battlefield, it explores.| Burning Sun's Avatar|Ixalan|135|R|{3}{R}{R}{R}|Creature - Dinosaur Avatar|6|6|When Burning Sun's Avatar enters the battlefield, it deals 3 damage to target opponent and 3 damage to up to one target creature.| Captain Lannery Storm|Ixalan|136|R|{2}{R}|Legendary Creature - Human Pirate|2|2|Haste$Whenever Captain lannery Storm attacks, create a colorless Treasure artifact token with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool."$Whenever you sacrifice a Treasure, Captain Lannery Storm gets +1/+0 until end of turn.| +Captivating Crew|Ixalan|137|R|{3}{R}|Creature - Human Pirate|4|3|{3}{R}: Gain control of target creature an opponent controls until end of turn. Untap that creature. It gains haste until end of turn. Activate this ability only any time you could cast a sorcery.| +Charging Monstrosaur|Ixalan|138|U|{4}{R}|Creature - Dinosaur|5|5|Trample, haste| +Demolish|Ixalan|139|C|{3}{R}|Sorcery|||Destroy target artifact or land.| +Dinosaur Stampede|Ixalan|140|U|{2}{R}|Instant|||| +Dual Shot|Ixalan|141|C|{R}|Instant|||Dual Shot deals 1 damage to each of up to two target creatures.| +Fathom Fleet Firebrand|Ixalan|142|C|{1}{R}|Creature - Human Pirate|2|2|{1}{r}: Fathom Fleet Firebrand gets +1/+0 until end of turn.| +Fiery Cannonade|Ixalan|143|U|{2}{R}|Instant|||Fiery Cannonade deals 2 damage to each non-Pirate creature.| +Fire Shrine Keeper|Ixalan|144|C|{R}|Creature - Elemental|1|1|Menace${7}{R}, {t}, Sacrifice Fire Shrine Keeper: It deals 3 damage to each of up to two target creatures.| +Firecannon Blast|Ixalan|145|C|{1}{R}{R}|Sorcery|||Firecannon Blast deals 3 damage to target creature.$Raid/ -- Firecannon Blast deals 6 damage to that creature instead if you attacked with a creature this turn.| +Frenzied Raptor|Ixalan|146|C|{2}{R}|Creature - Dinosaur|4|2|| +Headstrong Brute|Ixalan|147|C|{2}{R}|Creature - Orc Pirate|3|3|Headstrong Brute can't block.$Headstrong Brute has menace as long as you control another Pirate.| +Hijack|Ixalan|148|C|{1}{R}{R}|Sorcery|||Gain control of target artifact or creature until end of turn. Untap it. It gains haste until end of turn.| +Lightning Strike|Ixalan|149|U|{1}{R}|Instant|||Lightning Strike deals 3 damage to target creature or player.| +Lightning-Rig Crew|Ixalan|150|U|{2}{R}|Creature - Goblin Pirate|0|5|{T}: Lightning-Rig Crew deals 1 damage to each opponent.$Whenever you cast a Pirate spell, untap Lightning-Rig Crew.| +Makeshift Munitions|Ixalan|151|U|{1}{R}|Enchantment|||{1}, Sacrifice an artifact or creature: Makeshift Munitions deals 1 damage to target creature or player.| +Nest Robber|Ixalan|152|C|{1}{R}|Creature - Dinosaur|2|1|Haste| +Otepec Huntmaster|Ixalan|153|U|{1}{R}|Creature - Human Shaman|1|2|Dinosaur spells you cast cost {1} less to cast.${T}: Target Dinosaur gains haste until end of turn.| +Rampaging Ferocidon|Ixalan|154|R|{2}{R}|Creature - Dinosaur|3|3|Menace$Players can't gain life.$Whenever another creature enters the battlefield, Rampaging Ferocidon deals 1 damage to that creature's controller.| +Raptor Hatchling|Ixalan|155|U|{1}{R}|Creature - Dinosaur|1|1|Enrage - Whenever Raptor Hatchling is dealt damage, create a 3/3 green Dinosaur creature token with trample.| +Repeating Barrage|Ixalan|156|R|{1}{R}{R}|Sorcery|||Repeating Barrage deals 3 damage to target creature or player.$Raid — {3}{R}{R}: Return Repeating Barrage from your graveyard to your hand. Activate this ability only if you attacked with a creature this turn.| +Rigging Runner|Ixalan|157|U|{R}|Creature - Goblin Pirate|1|1|First strike$Raid/ — Rigging runner enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn.| +Rile|Ixalan|158|C|{R}|Sorcery|||Rile deals 1 damage to target creature you control. That creature gains trample until end of turn.$Draw a card.| Rowdy Crew|Ixalan|159|M|{2}{R}{R}|Creature - Human Pirate|3|3|Trample$When Rowdy Crew enters the battlefield, draw three cards, then discard two cards at random. If two cards that share a card type are discarded this way, put two +1/+1 counters on Rowdy Crew.| +Rummaging Goblin|Ixalan|160|C|{2}{R}|Creature - Goblin Rogue|1|1|{t}, Discard a card: Draw a card.| Star of Extinction|Ixalan|161|M|{5}{R}{R}|Sorcery|||Destroy target land. Star of Extinction deals 20 damage to each creature and each planeswalker.| +Storm Fleet Arsonist|Ixalan|162|U|{4}{R}|Creature - Orc Pirate|4|4|Raid - When Storm Fleet Arsonist enters the battlefield, if you attacked with a creature this turn, target opponent sacrifices a permanent.| +Storm Fleet Pyromancer|Ixalan|163|C|{4}{R}|Creature - Human Pirate Wizard|3|2|Raid/ -- When Storm Fleet Pyromancer enters the battlefield, if you attacked with a creature this turn, Storm Fleet Pyromancer deals 2 damage to target creature or player.| Sun-Crowned Hunters|Ixalan|164|C|{4}{R}{R}|Creature - Dinosaur|5|4|Enrage — Whenever Sun-Crowned Hunters is dealt damage, it deals 3 damage to target opponent.| Sunbird's Invocation|Ixalan|165|R|{5}{R}|Enchantment|||Whenever you cast a spell from your hand, reveal the top X cards of your library, where X is that spell's converted mana cost. You may cast a card revealed this way with converted mana cost X or less without paying its mana cost. Put the rest on the bottom of your library in a random order.| +Sure Strike|Ixalan|166|C|{1}{R}|Instant|||Target creature gets +3/+0 and gains first strike until end of turn.| +Swashbuckling|Ixalan|167|C|{1}{R}|Enchantment - Aura|||Enchant creature$Enchanted creature gets +2/+2 and has haste.| +Thrash of Raptors|Ixalan|168|C|{3}{R}|Creature - Dinosaur|3|3|As long as you control another Dinosaur, Thrash of Raptors gets +2/+0 and has trample.| +Tilonalli's Knight|Ixalan|169|C|{1}{R}|Creature - Human Knight|2|2|Whenever Tilonalli's Knight attacks, if you control a Dinosaur, Tilonalli's Knight gets +1/+1 until end of turn.| Tilonalli's Skinshifter|Ixalan|170|R|{2}{R}|Creature - Human Shaman|0|1|Whenever Tilonalli's Skinshifter attacks, it becomes a copy of another target nonlegendary attacking creature until end of turn.| +Trove of Temptation|Ixalan|171|U|{3}{R}|Enchantment|||Each opponent must attack you or a planeswalker you control with at least one creature each combat if able.$At the beginning of your end step, create a colorless Treasure artifact token with "t, Sacrifice this artifact: Add one mana of any color to your mana pool.”| Unfriendly Fire|Ixalan|172|C|{4}{R}|Instant|||Unfriendly Fire deals 4 damage to target creature or player.| +Vance's Blasting Cannons|Ixalan|173a|R|{3}{R}|Legendary Enchantment|||At the beginning of your upkeep, exile the top card of your library. If it's a nonland card, you may cast that card this turn.$Whenever you cast your third spell in a turn, transform Vance's Blasting Cannons.| +Spitfire Bastion|Ixalan|173b|R||Legendary Land|||{t}: Add {r} to your mana pool.${2}{r}, {t}: Spitfire Bastion deals 3 damage to target creature or player.| +Wily Goblin|Ixalan|174|U|{R}{R}|Creature - Goblin Pirate|1|1|When Wily Goblin enters the battlefield, create a colorless Treasure artifact token with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool."| +Ancient Brontodon|Ixalan|175|C|{6}{G}{G}|Creature - Dinosaur|9|9|| +Atzocan Archer|Ixalan|176|U|{2}{G}|Creature - Human Archer|1|4|Reach$When Atzocan Archer enters the battlefield, you may have it fight another target creature.| +Blinding Fog|Ixalan|177|C|{2}{G}|Instant|||Prevent all damage that would be dealt to creatures this turn. Creatures you control gain hexproof until end of turn.| +Blossom Dryad|Ixalan|178|C|{2}{G}|Creature - Dryad|2|2|{t}: Untap target land.| Carnage Tyrant|Ixalan|179|M|{4}{G}{G}|Creature - Dinosaur|7|6|Carnage Tyrant can't be countered.$Trample, hexproof| -Deathgorge Scavenger|Ixalan|???|R|???|Creature - Dinosaur|3|2|Whenever Deathgorge Scavenger enters the battlefield or attacks, you may exile target card from a graveyard. If a creature card is exiled this way, you may gain 2 life. If a noncreature card is exiled this way, Deathgorge Scavenger gets +1/+1 until end of turn.| +Colossal Dreadmaw|Ixalan|180|C|{4}{G}{G}|Creature - Dinosaur|6|6|Trample| +Commune with Dinosaurs|Ixalan|181|C|{G}|Sorcery|||| +Crash the Ramparts|Ixalan|182|C|{2}{G}|Instant|||Target creature gets +3/+3 and gains trample until end of turn.| +Crushing Canopy|Ixalan|183|C|{2}{G}|Instant|||Choose one --$* Destroy target creature with flying.$* Destroy target enchantment.| +Deathgorge Scavenger|Ixalan|184|R|{2}{G}|Creature - Dinosaur|3|2|Whenever Deathgorge Scavenger enters the battlefield or attacks, you may exile target card from a graveyard. If a creature card is exiled this way, you gain 2 life. If a noncreature card is exiled this way, Deathgorge Scavenger gets +1/+1 until end of turn.| Deeproot Champion|Ixalan|185|R|{1}{G}|Creature - Merfolk Shaman|1|1|Whenever you cast a noncreature spell, put a +1/+1 counter on Deeproot Champion.| +Deeproot Warrior|Ixalan|186|C|{1}{G}|Creature - Merfolk Warrior|2|2|Whenever Deeproot Warrior becomes blocked, it gets +1/+1 until end of turn.| +Drover of the Mighty|Ixalan|187|U|{1}{G}|Creature - Human Druid|1|1|Drover of the Mighty gets +2/+2 as long as you control a Dinosaur.${T}: Add one mana of any color to your mana pool.| +Emergent Growth|Ixalan|188|U|{3}{G}|Sorcery|||Target creature gets +5/+5 until end of turn and must be blocked this turn if able.| Emperor's Vanguard|Ixalan|189|R|{3}{G}|Creature - Human Scout|4|3|Whenever Emperor's Vanguard deals combat damage to a player, it explores.| +Grazing Whiptail|Ixalan|190|C|{2}{G}{G}|Creature - Dinosaur|3|4|Reach (This creature can block creatures with flying.)/| +Growing Rites of Itlimoc|Ixalan|191a|R|{2}{G}|Legendary Enchantment|||When Growing Rites of Itlimoc enters the battlefield, look at the top four cards of your library. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in any order.$At the beginning of your end step, if you control four or more creatures, transform Growing Rites of Itlimoc.| +Itlimoc, Cradle of the Sun|Ixalan|191b|R||Legendary Land|||(Transforms from Growing Rites of Itlimoc.)/${T}: Add {G} to your mana pool.${T}: Add {G} to your mana pool for each creature you control.| +Ixalli's Diviner|Ixalan|192|C|{1}{G}|Creature - Human Druid|0|3|When Ixalli's Diviner enters the battlefield, it explores. Reveal the top card of your library. Put that card into your hand if it's a land. Otherwise, put a +1/+1 counter on this creature, then put the card back or put it into your graveyard.)| +Ixalli's Keeper|Ixalan|193|C|{1}{G}|Creature - Human Shaman|2|2|{7}{g}, {t}, Sacrifice Ixalli's Keeper: Target creature gets +5/+5 and gains trample until end of turn.| +Jade Guardian|Ixalan|194|C|{3}{G}|Creature - Merfolk Shaman|2|2|Hexproof$When Jade Guardian enters the battlefield, put a +1/+1 counter on target Merfolk you control.| +Jungle Delver|Ixalan|195|C|{G}|Creature - Merfolk Warrior|1|1|{3}{g}: Put a +1/+1 counter on Jungle Delver.| +Kumena's Speaker|Ixalan|196|U|{G}|Creature - Merfolk|1|1|Kumena's Speaker gets +1/+1 as long as you control another Merfolk or an Island.| +Merfolk Branchwalker|Ixalan|197|U|{1}{G}|Creature - Merfolk Scout|2|1|When Merfolk Branchwalker enters the battlefield, it explores. (Reveal the top card of your library. Put that card into your hand if it's a land. Otherwise, put a +1/+1 counter on this creature, then put that card back or put it into your graveyard.)/| +New Horizons|Ixalan|198|C|{2}{G}|Enchantment - Aura|||Enchant land$When New Horizons enters the battlefield, put a +1/+1 counter on target creature you control.$Enchanted land has "{t]: Add two mana of any one color to your mana pool."| Old-Growth Dryads|Ixalan|199|R|{G}|Creature - Dryad|3|3|When Old-Growth Dryads enters the battlefield, each opponent may search his or her library for a basic land card, put it onto the battlefield tapped, then shuffle his or her library.| +Pounce|Ixalan|200|C|{1}{G}|Instant|||Target creature you control fights target creature you don't control.| +Ranging Raptors|Ixalan|201|U|{2}{G}|Creature - Dinosaur|2|3|Enrage - Whenever Ranging Raptors is dealt damage, you may search your library for a basic land card, put it onto the battlefield, then shuffle your library.| +Ravenous Daggertooth|Ixalan|202|C|{2}{G}|Creature - Dinosaur|3|2|Enrage - Whenever Ravenous Daggertooth is dealt damage, you gain 2 life.| Ripjaw Raptor|Ixalan|203|R|{2}{G}{G}|Creature - Dinosaur|4|5|Enrage — Whenever Ripjaw Raptor is dealt damage, draw a card.| +River Heralds' Boon|Ixalan|204|C|{1}{G}|Instant|||Put a +1/+1 counter on target creature and a +1/+1 counter on up to one target Merfolk.| +Savage Stomp|Ixalan|205|U|{2}{G}|Sorcery|||Savage Stomp cost {2} less to cast if it targets a Dinosaur you control.$Put a +1/+1 counter on target creature you control. Then that creature fights target creature you don't control.| Shapers' Sanctuary|Ixalan|206|R|{G}|Enchantment|||Whenever a creature you control becomes the target of a spell or ability an opponent controls, you may draw a card.| +Slice in Twain|Ixalan|207|U|{2}{G}{G}|Instant|||Destroy target artifact or enchantment.$Draw a card.| +Snapping Sailback|Ixalan|208|U|{4}{G}|Creature - Dinosaur|4|4|Flash$Enrage — Whenever Snapping Sailback is dealt damage, put a +1/+1 counter on it.| +Spike-Tailed Ceratops|Ixalan|209|C|{4}{G}|Creature - Dinosaur|4|4|Spike-Tailed Ceratops can block an additional creature each combat.| +Thundering Spineback|Ixalan|210|U|{5}{G}{G}|Creature - Dinosaur|5|5|Other Dinosaurs you control get +1/+1.${5}{G}: Create a 3/3 green Dinosaur creature token with trample.| Tishana's Wayfinder|Ixalan|211|C|{2}{G}|Creature - Merfolk Scout|2|2|When Tishana's Wayfinder enters the battlefield, it explores.| +Verdant Rebirth|Ixalan|212|U|{1}{G}|Instant|||Until end of turn, target creature gains "When this creature dies, return it to its owner's hand."$Draw a card.| Verdant Sun's Avatar|Ixalan|213|R|{5}{G}{G}|Creature - Dinosaur Avatar|5|5|When Verdant Sun's Avatar or another creature enters the battlefield under your control, you gain life equal to that creature's toughness.| +Vineshaper Mystic|Ixalan|214|U|{2}{G}|Creature - Merfolk Shaman|1|3|When Vineshaper Mystic enters the battlefield, put a +1/+1 counter on each of up to two target Merfolk you control.| Waker of the Wilds|Ixalan|215|R|{2}{G}{G}|Creature - Merfolk Shaman|3|3|{X}{G}{G}: Put X +1/+1 counters on target land you control. That land becomes a 0/0 Elemental creature with haste. It's still a land.| +Wildgrowth Walker|Ixalan|216|U|{1}{G}|Creature - Elemental|1|3|Whenever a creature you control explores, put a +1/+1 counter on Wildgrowth Walker and you gain 3 life.| Admiral Beckett Brass|Ixalan|217|M|{1}{U}{B}{R}|Legendary Creature - Human Pirate|3|3|Other Pirates you control get +1/+1.$At the beginning of your end step, gain control of target nonland permanent controlled by a player who was dealt damage by three or more Pirates this turn.| -???|Ixalan|218|U|{5}{G}{W}|Creature - Dinosaur|4|6|Each creature you control assigns combats damage equal to its toughness rather than its power.| -???|Ixalan|219|U|{2}{W}{B}|Sorcery|||Create three 1/1 white Vampire creature tokens with lifelink.| +Belligerent Brontodon|Ixalan|218|U|{5}{G}{W}|Creature - Dinosaur|4|6|Each creature you control assigns combats damage equal to its toughness rather than its power.| +Call to the Feast|Ixalan|219|U|{2}{W}{B}|Sorcery|||Create three 1/1 white Vampire creature tokens with lifelink.| Deadeye Plunderers|Ixalan|220|U|{3}{U}{B}|Creature - Human Pirate|3|3|Deadeye Plunderers gets +1/+1 for each artifact you control.${2}{U}{B}: Create a colorless artifact token named Treasure with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool."| Dire Fleet Captain|Ixalan|221|U|{B}{R}|Creature - Orc Pirate|2|2|Whenever Dire Fleet Captain attacks, it gets +1/+1 until end of turn for each other attacking Pirate.| Gishath, Sun's Avatar|Ixalan|222|M|{5}{R}{G}{W}|Legendary Creature - Dinosaur Avatar|7|6|Trample, vigilance, haste$Whenever Gishath, Sun's Avatar deals combat damage to a player, reveal that many cards from the top of your library. Put any number of Dinosaur creature cards from among them onto the battlefield and the rest on the bottom of your library in a random order.| Hostage Taker|Ixalan|223|R|{2}{U}{B}|Creature - Human Pirate|2|3|When Hostage Taker enters the battlefield, exile another target artifact or creature until Hostage Taker leaves the battlefield. You may cast that card as long as it remains exiled, and you may spend mana as though it were mana of any type to cast that spell.| -Tishana, Voice of Thunder|Ixalan|230|M|{5}{G}{U}||Legendary Creature - Merfolk Shaman|0|0|Tishana, Voice of Thunder's power and toughness are each equal to the number of cards in your hand.$You have no maximum hand size.$When Tishana enters the battlefield, draw a card for each creature you control.| +Huatli, Warrior Poet|Ixalan|224|M|{3}{R}{W}|Legendary Planeswalker - Huatli|||+2: You gain life equal to the greatest power among creatures you control.$0: Create a 3/3 green Dinosaur creature token with trample.$-X: Huatli, Warrior Poet deals X damage divided as you choose among any number of target creatures. Creatures dealt damage this way can't block this turn.| +Marauding Looter|Ixalan|225|U|{2}{U}{R}|Creature - Human Pirate|4|3|Raid - At the beginning of your end step, if you attacked with a creature this turn, you may draw a card. If you do, discard a card.| +Raging Swordtooth|Ixalan|226|U|{3}{R}{G}|Creature - Dinosaur|5|5|Trample$When Raging Swordtooth enters the battlefield, it deals 1 damage to each other creature.| +Regisaur Alpha|Ixalan|227|R|{3}{R}{G}|Creature - Dinosaur|4|4|Other Dinosaurs you control have haste.$When Regisaur Alpha enters the battlefield, create a 3/3 green Dinosaur creature token with trample.| +Shapers of Nature|Ixalan|228|U|{1}{G}{U}|Creature - Merfolk Shaman|3|3|{3}{G}: Put a +1/+1 counter on target creature.${2}{U}, Remove a +1/+1 counter from a creature you control: Draw a card.| +Sky Terror|Ixalan|229|U|{R}{W}|Creature - Dinosaur|2|2|Flying, Menace| +Tishana, Voice of Thunder|Ixalan|230|M|{5}{G}{U}|Legendary Creature - Merfolk Shaman|*|*|Tishana, Voice of Thunder's power and toughness are each equal to the number of cards in your hand.$You have no maximum hand size.$When Tishana enters the battlefield, draw a card for each creature you control.| +Vona, Butcher of Magan|Ixalan|231|M|{3}{W}{B}|Legendary Creature - Vampire Knight|4|4|Vigilance, lifelink${t}, Pay 7 life: Destroy target nonland permanent. Activate this ability only during your turn.| +Vraska, Relic Seeker|Ixalan|232|M|{4}{B}{G}|Legendary Planeswalker - Vraska|||+2: Create a 2/2 Black Pirate with Menace$-3: Destroy target artifact, creature or enchantment, create a treasure$-10: Target players life total becomes 1| +Cobbled Wings|Ixalan|233|C|{2}|Artifact - Equipment|||Equipped creature has flying.$Equip {1}| +Conqueror's Galleon|Ixalan|234a|R|{4}|Artifact - Vehicle|2|10|When Conqueror's Galleon attacks, exile it at the end of combat, then return it to the battlefield transformed under your control.$Crew 4| +Conqueror's Foothold|Ixalan|234b|R||Land|||{T}: Add {C} to your mana pool.${2}, {T}: Draw a card, then discard a card.${4}, {T}: Draw a card.${6}, {T}: Return target card from your graveyard to your hand.| +Dowsing Dagger|Ixalan|235a|R|{2}|Artifact - Equipment|||When Dowsing Dagger enters the battlefield, target opponent creates two 0/2 green Plant creature tokens with defender.$Equipped creature gets +2/+1.$Whenever equipped creature deals combat damage to a player, you may transform Dowsing Dagger.$Equip 2| +Lost Vale|Ixalan|235b|R||Land|||T: Add three mana of any one color to your mana pool.| +Dusk Legion Dreadnought|Ixalan|236|U|{5}|Artifact - Vehicle|4|6|Vigilance$Crew 2| +Elaborate Firecannon|Ixalan|237|U|{2}|Artifact|||Elaborate Firecannon doesn't untap during your untap step.${4}, {t}: Elaborate Firecannon deals 2 damage to target creature or player.$At the beginning of your upkeep, you may discard a card. If you do, untap Elaborate Firecannon.| +Fell Flagship|Ixalan|238|R|{3}|Artifact - Vehicle|||Pirates you control get +1/+0.$Whenever Fell Flagship deals combat damage to a player, that player discards a card.$Crew 3| +Gilded Sentinel|Ixalan|239|C|{4}|Artifact Creature - Golem|||| +Hierophant's Chalice|Ixalan|240|C|{3}|Artifact|||When Hierophant's Chalice enters the battlefield, target opponent loses 1 life and you gain 1 life.${t}: Add {c} to your mana pool.| +Pillar of Origins|Ixalan|241|U|{2}|Artifact|||As Pillar of Origins enters the battlefield, choose a creature type.${T}: Add one mana of any color to your mana pool. Spend this mana only to cast a creature spell if the chosen type.| +Pirate's Cutlass|Ixalan|242|C|{3}|Artifact - Equipment|||When Pirate's Cutlass enters the battlefield, attach it to target Pirate you control.$Equipped creature gets +2/+1.$Equip 2| +Primal Amulet|Ixalan|243a|R|{4}|Artifact|||Instant and sorcery spells you cast cost {1} less to cast.$Whenever you cast an instant or sorcery spell, put a charge counter on Primal Amulet. Then if there are four or more charge counters on it, you may remove those counters and transform it.| +Primal Wellspring|Ixalan|243b|R||Land|||Add one mana of any color to your mana pool. When that mana is spent to cast an instant or sorcery spell, copy that spell and you may choose new targets for the copy.| +Prying Blade|Ixalan|244|C|{1}|Artifact - Equipment|||Equipped creature gets +1/+0.$Whenever equipped creature deals combat damage to a player, create a colorless Treasure artifact token with "{t}, Sacrifice this artifact: Add one mana of any color to your mana pool."$Equip {2}| +Sentinel Totem|Ixalan|245|U|{1}|Artifact|||When Sentinel Totem enters the battlefield, scry 1.${T}, Exile Sentinel Totem: Exile all cards from all graveyards.| +Shadowed Caravel|Ixalan|246|R|{2}|Artifact - Vehicle|2|2|Whenever a creature you control explores, put a +1/+1 counter on Shadowed Caravel.$Crew 2| Sleek Schooner|Ixalan|247|U|{3}|Artifact - Vehicle|4|3|Crew 1| -Sorcerous Spyglass|Ixalan|248|R|Artifact|||As Sorcerous Spyglass enters the battlefield, look at an opponent's hand, then choose any card name.$Activated abilities of sources with the chosen name can't be activated unless they're mana abilities.| -Treasure Map|Ixalan|250|R|{2}|Artifact|||{1}, {T}: Scry 1. Put a landmark counter on Treasure Map. Then if there are three or more landmark counters on it, remove those counters, transform Treasure Map, and create three colorless Treasure artifact tokens with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool."| +Sorcerous Spyglass|Ixalan|248|R|{2}|Artifact|||As Sorcerous Spyglass enters the battlefield, look at an opponent's hand, then choose any card name.$Activated abilities of sources with the chosen name can't be activated unless they're mana abilities.| +Thaumatic Compass|Ixalan|249a|R|{2}|Artifact|||{3}, {T}: Search your library for a basic land card, reveal it, put it into your hand, then shuffle your library.$At the beginning of your end step, if you control seven or more lands, transform Thaumatic Compass.| +Spires of Orazca|Ixalan|249b|R||Land|||{T}: Add {C} to your mana pool.${T}: Untap target attacking creature an opponent controls and remove it from combat.| +Treasure Map|Ixalan|250a|R|{2}|Artifact|||{1}, {T}: Scry 1. Put a landmark counter on Treasure Map. Then if there are three or more landmark counters on it, remove those counters, transform Treasure Map, and create three colorless Treasure artifact tokens with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool."| +Treasure Cove|Ixalan|250b|R||Land|||{T}: Add {C} to your mana pool.${T}, Sacrifice a Treasure: Draw a card.| Vanquisher's Banner|Ixalan|251|R|{5}|Artifact|||As Vanquisher's Banner enters the battlefield, choose a creature type.$Creatures you control of the chosen type get +1/+1.$Whenever you cast a creature spell of the chosen type, draw a card.| Dragonskull Summit|Ixalan|252|R||Land|||Dragonskull Summit enters the battlefield tapped unless you control a Swamp or a Mountain.${T}: Add {B} or {R} to your mana pool.| Drowned Catacomb|Ixalan|253|R||Land|||Drowned Catacomb enters the battlefield tapped unless you control an Island or a Swamp.${T}: Add {U} or {B} to your mana pool.| +Field of Ruin|Ixalan|254|U||Land|||{T}: Add {C} to your mana pool.${2}, {T}, Sacrifice Field of Ruin: Destroy target nonbasic land an opponent controls. Each player searches his or her library for a basic land card, puts it onto the battlefield, then shuffles his or her library.| Glacial Fortress|Ixalan|255|R||Land|||Glacial Fortress enters the battlefield tapped unless you control a Plains or an Island.${T}: Add {W} or {U} to your mana pool.| Rootbound Crag|Ixalan|256|R||Land|||Rootbound Crag enters the battlefield tapped unless you control a Mountain or a Forest.${T}: Add {R} or {G} to your mana pool.| Sunpetal Grove|Ixalan|257|R||Land|||Sunpetal Grove enters the battlefield tapped unless you control a Forest or a Plains.${T}: Add {G} or {W} to your mana pool.| Unclaimed Territory|Ixalan|258|U||Land|||As Unclaimed Territory enters the battlefield, choose a creature type.${T}: Add {C} to your mana pool.${T}: Add one mana of any color to your mana pool. Spend this mana only to cast a creature spell of the chosen type.| +Unknown Shores|Ixalan|259|C||Land|||{t}: Add {c} to your mana pool.${1}, {t}: Add one mana of any color to your mana pool.| +Plains|Ixalan|260|L||Basic Land - Plains|||{T}: Add {W} to your mana pool.| +Plains|Ixalan|261|L||Basic Land - Plains|||{T}: Add {W} to your mana pool.| +Plains|Ixalan|262|L||Basic Land - Plains|||{T}: Add {W} to your mana pool.| +Plains|Ixalan|263|L||Basic Land - Plains|||{T}: Add {W} to your mana pool.| +Island|Ixalan|264|L||Basic Land - Island|||{T}: Add {U} to your mana pool.| +Island|Ixalan|265|L||Basic Land - Island|||{T}: Add {U} to your mana pool.| +Island|Ixalan|266|L||Basic Land - Island|||{T}: Add {U} to your mana pool.| +Island|Ixalan|267|L||Basic Land - Island|||{T}: Add {U} to your mana pool.| +Swamp|Ixalan|268|L||Basic Land - Swamp|||{T}: Add {B} to your mana pool.| +Swamp|Ixalan|269|L||Basic Land - Swamp|||{T}: Add {B} to your mana pool.| +Swamp|Ixalan|270|L||Basic Land - Swamp|||{T}: Add {B} to your mana pool.| +Swamp|Ixalan|271|L||Basic Land - Swamp|||{T}: Add {B} to your mana pool.| +Mountain|Ixalan|272|L||Basic Land - Mountain|||{T}: Add {R} to your mana pool.| +Mountain|Ixalan|273|L||Basic Land - Mountain|||{T}: Add {R} to your mana pool.| +Mountain|Ixalan|274|L||Basic Land - Mountain|||{T}: Add {R} to your mana pool.| +Mountain|Ixalan|275|L||Basic Land - Mountain|||{T}: Add {R} to your mana pool.| +Forest|Ixalan|276|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.| +Forest|Ixalan|277|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.| +Forest|Ixalan|278|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.| +Forest|Ixalan|279|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.| +Jace, Ingenious Mind-Mage|Ixalan|280|M|{4}{U}{U}|Legendary Planeswalker - Jace|||[+1]: Draw a card.$[+1]: Untap all creatures you control.$[-9]: Gain control of up to three target creatures.| +Castaway's Despair|Ixalan|281|C|{3}{U}|Enchantment - Aura|||Enchant creature$When Castaway's Despair enters the battlefield, tap enchanted creature.$Enchanted creature doesn't untap during its controller's untap step.| +Grasping Current|Ixalan|282|R|{4}{U}|Sorcery|||Return up to two target creature's to their owner's hand.$Search your library and/or graveyard for a card named Jace, Ingenious Mind-Mage, reveal it, then put it into your hand. If you searched your library this way, shuffle it.| +Jace's Sentinel|Ixalan|283|U|{1}{U}|Creature - Merfolk Warrior|1|3|As long as you control a Jace planeswalker, Jace's Sentinel gets +1/+0 and can't be blocked.| +Woodland Stream|Ixalan|284|C||Land|||Woodland Stream enters the battlefield tapped.${T}: Add {G} or {U} to your mana pool.| +Huatli, Dinosaur Knight|Ixalan|285|M|{4}{R}{W}|Legendary Planeswalker - Huatli|||[+2]: Put two +1/+1 counters on up to one target Dinosaur you control.$[-3]: Target Dinosaur you control deals damage equal to its power to target creature you don't control.$[-7]: Dinosaurs you control get +4/+4 until end of turn.| +Huatli's Snubhorn|Ixalan|286|C|{1}{W}|Creature - Dinosaur|2|2|Vigilance| +Huatli's Spurring|Ixalan|287|U|{R}|Instant|||Target creature gets +2/+0 until end of turn. If you control a Huatli planeswalker, that creature gets +4/+0 until end of turn instead.| +Sun-Blessed Mount|Ixalan|288|R|{3}{R}{W}|Creature - Dinosaur|4|4|When Sun-Blessed Mount enters the battlefield, you may search your library and/or graveyard for a card named Huatli, Dinosaur Knight, reveal it, then put it into your hand. If you searched your library this way, shuffle it.| +Stone Quarry|Ixalan|289|C||Land|||Stone Quarry enters the battlefield tapped.${T}: Add {R} or {W} to your mana pool.| Sword of Dungeons and Dragons|Unstable|1|M|{3}|Artifact - Equipment|||Equipped creature gets +2/+2 and has protection from Rogues and from Clerics.$Whenever equipped creature deals combat damage to a player, create a 4/4 gold Dragon creature token with flying and roll a d20. If you roll a 20, repeat this process.$Equip {2}| Jhoira of the Ghitu|Duel Decks: Mind vs. Might|1|M|{1}{U}{R}|Legendary Creature - Human Wizard|2|2|{2}, Exile a nonland card from your hand: Put four time counters on the exiled card. If it doesn't have suspend, it gains suspend.| Beacon of Tomorrows|Duel Decks: Mind vs. Might|2|R|{6}{U}{U}|Sorcery|||Target player takes an extra turn after this one. Shuffle Beacon of Tomorrows into its owner's library.| @@ -32459,4 +32692,7 @@ Mountain|Duel Decks: Mind vs. Might|61|L||Basic Land - Mountain|||{T}: Add {R} t Mountain|Duel Decks: Mind vs. Might|62|L||Basic Land - Mountain|||{T}: Add {R} to your mana pool.| Forest|Duel Decks: Mind vs. Might|63|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.| Forest|Duel Decks: Mind vs. Might|64|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.| -Forest|Duel Decks: Mind vs. Might|65|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.| \ No newline at end of file +Forest|Duel Decks: Mind vs. Might|65|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.| +Chandra, Gremlin Wrangler|Heroes of the Realm|1|M|{2}{R}{R}|Legendary Planeswalker - Chandra|3||+1: Create a 2/2 red Gremlin creature token.$-2:Chandra, Gremlin Wrangler deals X damage to target creature or player, where X is the number of Gremlins you control.| +Dungeon Master|Heroes of the Realm|1|M|{2}{W}{U}|Legendary Planeswalker - Dungeon Master|||+1: Target opponent creates a 1/1 black Skeleton creature token with “When this creature dies, each opponent loses 2 life.”$+1: Roll a d20. If you roll a 1, skip your next turn. If you roll a 12 or higher, draw a card.$-6: You get an adventuring party. (Your party is a 3/3 red Fighter with first strike, a 1/1 white Cleric with lifelink, a 2/2 black Rogue with hexproof, and a 1/1 blue Wizard with flying.)| +Nira, Hellkite Duelist|Heroes of the Realm|3|M|{W}{U}{B}{R}{G}|Legendary Creature — Dragon|6|6|Flash$Flying, trample, haste$When Nira, Hellkite Duelist enters the battlefield, the next time you would lose the game this turn, instead draw three cards and your life total becomes 5.| diff --git a/Utils/mtg-sets-data.txt b/Utils/mtg-sets-data.txt index b1ce026994..e5bd417a30 100644 --- a/Utils/mtg-sets-data.txt +++ b/Utils/mtg-sets-data.txt @@ -93,6 +93,7 @@ Gatecrash|GTC| Guru|GUR| Premium Deck Series: Slivers|H09| Homelands|HML| +Heroes of the Realm|HOTR| Planechase|HOP| Hour of Devastation|HOU| Ice Age|ICE| @@ -204,3 +205,4 @@ Weatherlight|WTH| Worldwake|WWK| Ixalan|XLN| Zendikar|ZEN| +Star Wars|SWS|